aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.editorconfig8
-rw-r--r--.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch95
-rw-r--r--.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch.license14
-rw-r--r--.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch134
-rw-r--r--.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch.license11
-rwxr-xr-x.yarn/releases/yarn-4.0.0-rc.45.cjs877
-rwxr-xr-x.yarn/releases/yarn-4.0.0-rc.50.cjs891
-rw-r--r--.yarnrc.yml2
-rw-r--r--LICENSES/BSD-3-Clause.txt11
-rw-r--r--LICENSES/ISC.txt8
-rw-r--r--LICENSES/LicenseRef-EPL-Steward.txt1
-rw-r--r--buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts4
-rw-r--r--buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts2
-rw-r--r--docker/Dockerfile71
-rwxr-xr-xdocker/build.sh39
-rw-r--r--gradle.properties4
-rw-r--r--gradle/libs.versions.toml29
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin62076 -> 63375 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties3
-rwxr-xr-xgradlew5
-rw-r--r--package.json10
-rw-r--r--settings.gradle.kts7
-rw-r--r--subprojects/frontend/build.gradle.kts10
-rw-r--r--subprojects/frontend/config/detectDevModeOptions.ts4
-rw-r--r--subprojects/frontend/config/graphvizUMDVitePlugin.ts69
-rw-r--r--subprojects/frontend/index.html3
-rw-r--r--subprojects/frontend/package.json89
-rw-r--r--subprojects/frontend/src/DirectionalSplitPane.tsx159
-rw-r--r--subprojects/frontend/src/ModelWorkArea.tsx193
-rw-r--r--subprojects/frontend/src/PaneButtons.tsx144
-rw-r--r--subprojects/frontend/src/Refinery.tsx4
-rw-r--r--subprojects/frontend/src/TopBar.tsx85
-rw-r--r--subprojects/frontend/src/WorkArea.tsx25
-rw-r--r--subprojects/frontend/src/editor/AnalysisErrorNotification.tsx74
-rw-r--r--subprojects/frontend/src/editor/AnimatedButton.tsx11
-rw-r--r--subprojects/frontend/src/editor/DiagnosticValue.ts1
-rw-r--r--subprojects/frontend/src/editor/EditorButtons.tsx6
-rw-r--r--subprojects/frontend/src/editor/EditorErrors.tsx93
-rw-r--r--subprojects/frontend/src/editor/EditorPane.tsx4
-rw-r--r--subprojects/frontend/src/editor/EditorStore.ts132
-rw-r--r--subprojects/frontend/src/editor/EditorTheme.ts15
-rw-r--r--subprojects/frontend/src/editor/GenerateButton.tsx68
-rw-r--r--subprojects/frontend/src/editor/GeneratedModelStore.ts50
-rw-r--r--subprojects/frontend/src/graph/DotGraphVisualizer.tsx162
-rw-r--r--subprojects/frontend/src/graph/GraphArea.tsx46
-rw-r--r--subprojects/frontend/src/graph/GraphPane.tsx34
-rw-r--r--subprojects/frontend/src/graph/GraphStore.ts187
-rw-r--r--subprojects/frontend/src/graph/GraphTheme.tsx111
-rw-r--r--subprojects/frontend/src/graph/RelationName.tsx72
-rw-r--r--subprojects/frontend/src/graph/VisibilityDialog.tsx315
-rw-r--r--subprojects/frontend/src/graph/VisibilityPanel.tsx91
-rw-r--r--subprojects/frontend/src/graph/ZoomButtons.tsx49
-rw-r--r--subprojects/frontend/src/graph/ZoomCanvas.tsx224
-rw-r--r--subprojects/frontend/src/graph/dotSource.ts366
-rw-r--r--subprojects/frontend/src/graph/parseBBox.ts68
-rw-r--r--subprojects/frontend/src/graph/postProcessSVG.ts186
-rw-r--r--subprojects/frontend/src/index.tsx127
-rw-r--r--subprojects/frontend/src/language/indentation.ts2
-rw-r--r--subprojects/frontend/src/table/SymbolSelector.tsx65
-rw-r--r--subprojects/frontend/src/table/TableArea.tsx109
-rw-r--r--subprojects/frontend/src/table/TablePane.tsx27
-rw-r--r--subprojects/frontend/src/table/TableToolbar.tsx41
-rw-r--r--subprojects/frontend/src/table/ValueRenderer.tsx62
-rw-r--r--subprojects/frontend/src/theme/ThemeProvider.tsx14
-rw-r--r--subprojects/frontend/src/theme/ThemeStore.ts48
-rw-r--r--subprojects/frontend/src/utils/svgURL.ts9
-rw-r--r--subprojects/frontend/src/xtext/BackendConfig.ts2
-rw-r--r--subprojects/frontend/src/xtext/ContentAssistService.ts18
-rw-r--r--subprojects/frontend/src/xtext/ModelGenerationService.ts66
-rw-r--r--subprojects/frontend/src/xtext/SemanticsService.ts32
-rw-r--r--subprojects/frontend/src/xtext/UpdateService.ts42
-rw-r--r--subprojects/frontend/src/xtext/ValidationService.ts44
-rw-r--r--subprojects/frontend/src/xtext/XtextClient.ts44
-rw-r--r--subprojects/frontend/src/xtext/XtextWebSocketClient.ts13
-rw-r--r--subprojects/frontend/src/xtext/webSocketMachine.ts40
-rw-r--r--subprojects/frontend/src/xtext/xtextMessages.ts7
-rw-r--r--subprojects/frontend/src/xtext/xtextServiceResults.ts70
-rw-r--r--subprojects/frontend/tsconfig.base.json2
-rw-r--r--subprojects/frontend/types/ImportMeta.d.ts2
-rw-r--r--subprojects/frontend/types/grammar.d.ts2
-rw-r--r--subprojects/frontend/types/node/@lezer-generator-rollup.d.ts2
-rw-r--r--subprojects/frontend/vite.config.ts6
-rw-r--r--subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java52
-rw-r--r--subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java13
-rw-r--r--subprojects/language-model/problem.aird153
-rw-r--r--subprojects/language-model/src/main/resources/model/problem.ecore11
-rw-r--r--subprojects/language-model/src/main/resources/model/problem.genmodel10
-rw-r--r--subprojects/language-semantics/build.gradle.kts9
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/BuiltInDetail.java10
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ClassDetail.java16
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/Metadata.java12
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/MetadataCreator.java200
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeKind.java12
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeMetadata.java9
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/OppositeReferenceDetail.java9
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/PredicateDetail.java16
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ReferenceDetail.java16
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationDetail.java10
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationMetadata.java9
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java674
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/SemanticsUtils.java31
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/TracedException.java51
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTree.java32
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTreeCursor.java9
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/MutableSeed.java28
-rw-r--r--subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/NullaryMutableSeed.java83
-rw-r--r--subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/CountPropagationTest.java79
-rw-r--r--subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/ModelGenerationTest.java339
-rw-r--r--subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/internal/DecisionTreeTests.java (renamed from subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/tests/DecisionTreeTests.java)14
-rw-r--r--subprojects/language-web/build.gradle.kts19
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java6
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebSocketServlet.java4
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/SecurityHeadersFilter.java4
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/ServerLauncher.java33
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/config/BackendConfigServlet.java3
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationCancelledResult.java11
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationErrorResult.java11
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationManager.java41
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationResult.java15
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationService.java60
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStartedResult.java13
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStatusResult.java11
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationSuccessResult.java17
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationWorker.java233
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/PartialInterpretation2Json.java81
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsInternalErrorResult.java9
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsIssuesResult.java13
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsResult.java12
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java142
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsSuccessResult.java16
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsWorker.java113
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/ThreadPoolExecutorServiceProvider.java158
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/TransactionExecutor.java48
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebOkResponse.java6
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebRequest.java9
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebResponse.java2
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushServiceDispatcher.java53
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocument.java60
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentAccess.java12
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentProvider.java9
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/RuntimeTypeAdapterFactory.java304
-rw-r--r--subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/XtextWebSocket.java26
-rw-r--r--subprojects/language-web/src/test/java/tools/refinery/language/web/ProblemWebSocketServletIntegrationTest.java19
-rw-r--r--subprojects/language-web/src/test/java/tools/refinery/language/web/tests/ProblemWebInjectorProvider.java1
-rw-r--r--subprojects/language-web/src/test/java/tools/refinery/language/web/tests/RestartableCachedThreadPool.java2
-rw-r--r--subprojects/language-web/src/test/java/tools/refinery/language/web/xtext/servlet/TransactionExecutorTest.java10
-rw-r--r--subprojects/language/build.gradle.kts8
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/Problem.xtext48
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/resource/ProblemDerivedStateComputer.java96
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/resource/ProblemLocationInFileProvider.java1
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java44
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java6
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/CollectedSymbols.java15
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/ContainmentRole.java22
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/NodeInfo.java9
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java24
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java47
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/RelationInfo.java29
-rw-r--r--subprojects/language/src/main/java/tools/refinery/language/utils/SymbolCollector.java255
-rw-r--r--subprojects/language/src/main/resources/tools/refinery/language/builtin.problem41
-rw-r--r--subprojects/language/src/test/java/tools/refinery/language/tests/ProblemParsingTest.java3
-rw-r--r--subprojects/language/src/test/java/tools/refinery/language/tests/parser/antlr/TransitiveClosureParserTest.java4
-rw-r--r--subprojects/language/src/test/java/tools/refinery/language/tests/serializer/ProblemSerializerTest.java4
-rw-r--r--subprojects/language/src/test/java/tools/refinery/language/tests/utils/SymbolCollectorTest.java243
-rw-r--r--subprojects/store-dse-visualization/build.gradle.kts (renamed from subprojects/visualization/build.gradle.kts)0
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerAdapter.java (renamed from subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerAdapter.java)13
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerBuilder.java (renamed from subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerBuilder.java)2
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerStoreAdapter.java (renamed from subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerStoreAdapter.java)0
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/FileFormat.java (renamed from subprojects/visualization/src/main/java/tools/refinery/visualization/internal/FileFormat.java)0
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java (renamed from subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java)0
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java (renamed from subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java)61
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerBuilderImpl.java (renamed from subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerBuilderImpl.java)6
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/VisualizationStore.java18
-rw-r--r--subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/internal/VisualizationStoreImpl.java51
-rw-r--r--subprojects/store-dse/build.gradle.kts7
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/ActionFactory.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationAdapter.java71
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationBuilder.java48
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationStoreAdapter.java29
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/Strategy.java13
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/Activation.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java303
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java67
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationStoreAdapterImpl.java65
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java99
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActionVariable.java12
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActivationVariable.java54
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/AtomicAction.java18
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java40
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/InsertAction.java94
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/NewItemVariable.java45
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/TransformationAction.java129
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/DanglingEdges.java12
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationAdapter.java24
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationBuilder.java11
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationStoreAdapter.java11
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java43
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java51
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java23
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationAdapterImpl.java107
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationBuilderImpl.java29
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationStoreAdapterImpl.java29
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedDummyHardObjective.java52
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java57
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/BaseObjective.java132
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Comparators.java26
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java46
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Objective.java101
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/ObjectiveComparatorHelper.java60
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/BoundPropagator.java11
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationAdapter.java20
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationBuilder.java32
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationResult.java28
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationStoreAdapter.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/Propagator.java17
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationAdapterImpl.java75
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationBuilderImpl.java53
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationStoreAdapterImpl.java38
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java40
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundRuleBasedPropagator.java43
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/RuleBasedPropagator.java36
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstExplorer.java65
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStoreManager.java87
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStrategy.java203
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstWorker.java164
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/DepthFirstStrategy.java92
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/SubmitResult.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationAdapter.java28
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationBuilder.java61
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationStoreAdapter.java27
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValue.java24
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValues.java69
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java99
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java71
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Transformation.java43
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/VersionWithObjectiveValue.java11
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/AbstractActionLiteral.java9
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java132
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java19
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java33
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundAction.java119
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundActionLiteral.java16
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java64
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback0.java15
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java16
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java16
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java16
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java16
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback0.java13
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java14
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationAdapterImpl.java94
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationBuilderImpl.java75
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationStoreAdapterImpl.java74
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java53
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java43
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeObjective.java69
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java47
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java47
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java22
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CriterionCalculator.java10
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objective.java23
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/ObjectiveCalculator.java10
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java41
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java53
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java59
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java41
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ActivationStore.java18
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/EquivalenceClassStore.java17
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ObjectivePriorityQueue.java21
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/SolutionStore.java17
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/AbstractEquivalenceClassStore.java54
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreBitVectorEntry.java50
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreEntry.java37
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreImpl.java138
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreListEntry.java104
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreWorker.java55
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/CompleteEquivalenceClassStore.java104
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/FastEquivalenceClassStore.java37
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ObjectivePriorityQueueImpl.java68
-rw-r--r--subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/SolutionStoreImpl.java52
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/ActionEqualsTest.java629
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java237
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/DebugTest.java118
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/DesignSpaceExplorationTest.java607
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/TransformationRuleTest.java413
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyCriterion.java22
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyObjective.java18
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomCriterion.java25
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomObjective.java23
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/QueryAssertions.java2
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java149
-rw-r--r--subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/statespace/internal/ActivationUnitTest.java131
-rw-r--r--subprojects/store-query-viatra/build.gradle.kts10
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryBuilder.java14
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryStoreAdapter.java2
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/RelationalScope.java8
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryAdapterImpl.java89
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryBuilderImpl.java90
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryStoreAdapterImpl.java30
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/DummyBaseIndexer.java10
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalEngineContext.java6
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalQueryMetaContext.java8
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalRuntimeContext.java33
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/FlatCostFunction.java12
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchBackendFactory.java60
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchResultProvider.java28
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalOperationCompiler.java70
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/AbstractViatraMatcher.java4
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalCursor.java4
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalViatraMatcher.java16
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/IndexerUtils.java53
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtils.java6
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RawPatternMatcher.java6
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalCursor.java2
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalViatraMatcher.java16
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/UnsafeFunctionalCursor.java2
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/CheckEvaluator.java (renamed from subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/AssumptionEvaluator.java)6
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/Dnf2PQuery.java151
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/QueryWrapperFactory.java24
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/RawPQuery.java16
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatefulMultisetAggregator.java2
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatelessMultisetAggregator.java2
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/SymbolViewWrapper.java2
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/TermEvaluator.java4
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/ValueProviderBasedValuation.java2
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/ModelUpdateListener.java6
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/RelationViewFilter.java8
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/SymbolViewUpdateListener.java8
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TupleChangingViewUpdateListener.java9
-rw-r--r--subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TuplePreservingViewUpdateListener.java2
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/DiagonalQueryTest.java3
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/FunctionalQueryTest.java42
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTest.java93
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTransactionTest.java2
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/StronglyConnectedComponentsTest.java261
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/WeaklyConnectedComponentsTest.java188
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtilsTest.java2
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryAssertions.java2
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryBackendHint.java2
-rw-r--r--subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryEvaluationHintSource.java2
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/InvalidQueryException.java23
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java3
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java7
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/ClausePostProcessor.java102
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Dnf.java30
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfBuilder.java73
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfClause.java9
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfPostProcessor.java112
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalDependency.java4
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQuery.java15
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/InvalidClauseException.java35
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Query.java23
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/RelationalQuery.java13
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/SymbolicParameter.java5
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DeepDnfEqualityChecker.java5
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DnfEqualityChecker.java4
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralEqualityHelper.java49
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralHashCodeHelper.java17
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralEqualityHelper.java59
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralHashCodeHelper.java42
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCallLiteral.java60
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCountLiteral.java107
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractLiteral.java34
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AggregationLiteral.java36
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssignLiteral.java49
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/BooleanLiteral.java6
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallLiteral.java28
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallPolarity.java4
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CheckLiteral.java (renamed from subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssumeLiteral.java)50
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Connectivity.java18
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/ConstantLiteral.java38
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CountLiteral.java80
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/EquivalenceLiteral.java61
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literal.java3
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literals.java4
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java119
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java2
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java2
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java2
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java6
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java2
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/AbstractRecursiveRewriter.java26
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/ClauseInputParameterResolver.java160
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/CompositeRewriter.java29
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DnfRewriter.java24
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DuplicateDnfRemover.java98
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/InputParameterResolver.java51
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/AbstractTerm.java16
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyDataVariable.java18
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyTerm.java3
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/BinaryTerm.java31
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/ConstantTerm.java24
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/DataVariable.java25
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/NodeVariable.java23
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/Parameter.java12
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/ParameterDirection.java4
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/UnaryTerm.java25
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/Variable.java8
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregator.java2
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/utils/OrderStatisticTree.java2
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java15
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java8
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java3
-rw-r--r--subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java16
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderLiteralEliminationTest.java55
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfToDefinitionStringTest.java4
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/HashCodeTest.java67
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/TopologicalSortTest.java7
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/VariableDirectionTest.java189
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java13
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/DuplicateDnfRemoverTest.java164
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/InputParameterResolverTest.java228
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/term/TermSubstitutionTest.java6
-rw-r--r--subprojects/store-query/src/test/java/tools/refinery/store/query/utils/OrderStatisticTreeTest.java2
-rw-r--r--subprojects/store-reasoning-scope/build.gradle.kts17
-rw-r--r--subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java240
-rw-r--r--subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java86
-rw-r--r--subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/RoundingUtil.java26
-rw-r--r--subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java102
-rw-r--r--subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java71
-rw-r--r--subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java59
-rw-r--r--subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MPSolverTest.java83
-rw-r--r--subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java206
-rw-r--r--subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/RoundingUtilTest.java69
-rw-r--r--subprojects/store-reasoning/build.gradle.kts4
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/MergeResult.java20
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/PartialInterpretation.java25
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java43
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java41
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningStoreAdapter.java10
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java43
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java48
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java60
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java42
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java223
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java53
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java186
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java153
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java92
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java38
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AnyPartialInterpretation.java (renamed from subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/AnyPartialInterpretation.java)8
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java34
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java195
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java63
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java182
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java136
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ModalDnf.java16
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Concreteness.java18
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java49
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java49
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java49
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java51
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java40
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java4
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java19
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java29
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AnyPartialInterpretationRefiner.java15
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java38
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/DefaultStorageRefiner.java79
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java22
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialModelInitializer.java14
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java34
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/StorageRefiner.java20
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java5
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java5
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java8
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/MapBasedSeed.java111
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java95
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java59
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java28
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/UniformSeed.java27
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/Advice.java159
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AdviceSlot.java30
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AnyPartialSymbolTranslator.java16
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java390
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java212
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/RoundingMode.java12
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslatedRelation.java27
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationException.java35
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationUnit.java32
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java93
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionTranslationUnit.java49
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/TranslatedBaseDecision.java54
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java255
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentInfo.java24
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java128
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainmentLinkView.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainsView.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java77
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainmentLinkView.java35
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainmentLinkView.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainsView.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java57
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java16
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java46
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java94
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java15
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java44
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java83
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ContainedTypeHierarchyBuilder.java33
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/Metamodel.java23
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java225
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTranslator.java37
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java13
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java64
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java85
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java55
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java22
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java135
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java45
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java107
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java23
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java23
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java37
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java141
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java14
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java28
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java77
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java32
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java62
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeUtils.java22
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java93
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java52
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/CandidateTypeView.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/EliminatedType.java11
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java40
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredType.java51
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java38
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeView.java (renamed from subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMustTypeView.java)21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MayTypeView.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MustTypeView.java21
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/PreservedType.java141
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java138
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchy.java (renamed from subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzer.java)109
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyBuilder.java66
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java64
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslationUnit.java37
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java111
-rw-r--r--subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeInfo.java44
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java108
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java395
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java128
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java58
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java152
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java321
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java145
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisExampleHierarchyTest.java (renamed from subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerExampleHierarchyTest.java)92
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerTest.java205
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java186
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java224
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTester.java (renamed from subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerTester.java)27
-rw-r--r--subprojects/store/build.gradle.kts2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/map/Cursors.java64
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/map/IteratorBasedCursor.java44
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/map/internal/delta/VersionedMapDeltaImpl.java7
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/AnyInterpretation.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/Interpretation.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/Model.java4
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/ModelStore.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreBuilder.java7
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreConfiguration.java11
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/BaseIndexer.java102
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/IndexedVersionedInterpretation.java48
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java16
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java34
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreImpl.java15
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelVersion.java12
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/NullaryVersionedInterpretation.java27
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/UnaryVersionedInterpretation.java48
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/model/internal/VersionedInterpretation.java39
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java5
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/TruthValue.java17
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java29
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityDomain.java68
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityInterval.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityIntervals.java6
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/EmptyCardinalityInterval.java7
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinality.java25
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java31
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UnboundedUpperCardinality.java19
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinalities.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinality.java7
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCodeCalculatorFactory.java3
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderAdapter.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/StateEquivalenceChecker.java9
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderBuilderImpl.java42
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderStoreAdapterImpl.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/AbstractNeighbourhoodCalculator.java22
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/LazyNeighbourhoodCalculator.java27
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/NeighbourhoodCalculator.java33
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/ObjectCodeImpl.java7
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairing.java82
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairingPermutations.java57
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/NodePairing.java6
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/PermutationMorphism.java4
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/StateEquivalenceCheckerImpl.java53
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple.java2
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple0.java5
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple1.java8
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple2.java9
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple3.java10
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple4.java11
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/tuple/TupleN.java10
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/util/CancellationToken.java13
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java4
-rw-r--r--subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java7
-rw-r--r--subprojects/store/src/test/java/tools/refinery/store/statecoding/EquivalenceTest.java3
-rw-r--r--subprojects/store/src/test/java/tools/refinery/store/statecoding/ExperimentalSetupTest.java11
-rw-r--r--subprojects/store/src/test/java/tools/refinery/store/statecoding/StateCoderBuildTest.java3
-rw-r--r--subprojects/viatra-runtime-localsearch/about.html26
-rw-r--r--subprojects/viatra-runtime-localsearch/build.gradle.kts14
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/ExecutionLoggerAdapter.java83
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/MatchingFrame.java114
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/exceptions/LocalSearchException.java33
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/CallWithAdornment.java55
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdaptable.java29
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdapter.java120
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ISearchContext.java120
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/LocalSearchMatcher.java301
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/MatcherReference.java97
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AbstractLocalSearchResultProvider.java532
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AllValidAdornments.java37
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenDisjunctive.java29
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenIncrementalPredicate.java44
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/GenericLocalSearchResultProvider.java49
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/IAdornmentProvider.java72
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LazyPlanningAdornments.java41
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchBackend.java259
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactory.java65
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactoryProvider.java24
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHintOptions.java70
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHints.java306
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/CheckOperationExecutor.java50
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/ExtendOperationExecutor.java (renamed from subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/ExtendOperationExecutor.java)23
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IIteratingSearchOperation.java27
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IPatternMatcherOperation.java26
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/ISearchOperation.java88
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/MatchingFrameValueProvider.java41
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/AggregatorCheck.java116
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/BinaryTransitiveClosureCheck.java135
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckConstant.java70
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckPositivePatternCall.java96
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CountCheck.java92
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionCheck.java78
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionEvalCheck.java95
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/InequalityCheck.java77
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/NACOperation.java89
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/AggregatorExtend.java106
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/CountOperation.java88
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExpressionEval.java104
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendBinaryTransitiveClosure.java185
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendConstant.java75
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendPositivePatternCall.java (renamed from subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/ExtendPositivePatternCall.java)57
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/SingleValueExtendOperationExecutor.java40
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeCheck.java96
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeExtend.java (renamed from subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/GenericTypeExtend.java)54
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeExtendSingleValue.java114
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/util/CallInformation.java186
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanDescriptor.java49
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanProvider.java33
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/PlanDescriptor.java84
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlan.java99
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanExecutor.java210
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanForBody.java115
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SimplePlanProvider.java49
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ILocalSearchPlanner.java38
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ISearchPlanCodeGenerator.java23
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchPlanner.java140
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchRuntimeBasedStrategy.java257
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintCategory.java41
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfo.java142
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfoInferrer.java278
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PlanState.java283
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/AbstractOperationCompiler.java430
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/GenericOperationCompiler.java101
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/IOperationCompiler.java53
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/IConstraintEvaluationContext.java63
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/ICostFunction.java22
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/HybridMatcherConstraintCostFunction.java91
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/IndexerBasedConstraintCostFunction.java49
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/StatisticsBasedConstraintCostFunction.java413
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/VariableBindingBasedCostFunction.java95
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/CompilerHelper.java209
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/OperationCostComparator.java26
-rw-r--r--subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/profiler/LocalSearchProfilerAdapter.java83
-rw-r--r--subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF18
-rw-r--r--subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF.license4
-rw-r--r--subprojects/viatra-runtime-rete-recipes/about.html26
-rw-r--r--subprojects/viatra-runtime-rete-recipes/build.gradle.kts62
-rw-r--r--subprojects/viatra-runtime-rete-recipes/build.properties15
-rw-r--r--subprojects/viatra-runtime-rete-recipes/plugin.properties9
-rw-r--r--subprojects/viatra-runtime-rete-recipes/plugin.xml23
-rw-r--r--subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/GenerateReteRecipes.mwe225
-rw-r--r--subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipeRecognizer.java204
-rw-r--r--subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipesHelper.java81
-rw-r--r--subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore400
-rw-r--r--subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore.license4
-rw-r--r--subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel171
-rw-r--r--subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license4
-rw-r--r--subprojects/viatra-runtime-rete/about.html26
-rw-r--r--subprojects/viatra-runtime-rete/build.gradle.kts15
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/AbstractColumnAggregatorNode.java474
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/ColumnAggregatorNode.java369
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/CountNode.java38
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedMap.java120
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedSet.java114
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IAggregatorNode.java26
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IndexerBasedAggregatorNode.java278
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulParallelTimelyColumnAggregatorNode.java212
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulSequentialTimelyColumnAggregatorNode.java279
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulTimelyColumnAggregatorNode.java247
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyParallelTimelyColumnAggregatorNode.java106
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlySequentialTimelyColumnAggregatorNode.java117
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyTimelyColumnAggregatorNode.java212
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/Disconnectable.java26
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputEnumeratorNode.java209
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputStatelessFilterNode.java68
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/InputConnector.java208
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ReteBoundary.java551
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/RetePatternBuildException.java50
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/BasicLinearLayout.java171
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/OrderingHeuristics.java90
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/CompilerHelper.java390
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/RecursionCutoffPoint.java86
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/ReteRecipeCompiler.java949
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinCandidate.java162
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinOrderingHeuristics.java49
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/QuasiTreeLayout.java205
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/TieBreaker.java30
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/AbstractEvaluatorNode.java65
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/EvaluatorCore.java180
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/IEvaluatorNode.java25
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/MemorylessEvaluatorNode.java75
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/OutputCachingEvaluatorNode.java311
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/RelationEvaluatorNode.java183
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DefaultIndexerListener.java28
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DualInputNode.java348
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ExistenceNode.java199
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/GenericProjectionIndexer.java76
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IdentityIndexer.java76
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/Indexer.java71
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerListener.java41
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerWithMemory.java284
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IterableIndexer.java34
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/JoinNode.java193
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryIdentityIndexer.java55
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryNullIndexer.java54
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/NullIndexer.java88
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/OnetimeIndexer.java47
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ProjectionIndexer.java21
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/SpecializedProjectionIndexer.java176
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/StandardIndexer.java127
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/TransitiveClosureNodeIndexer.java121
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryIdentityIndexer.java51
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryNullIndexer.java49
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingAlg.java226
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingTcRelation.java259
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/CountingListener.java36
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/IncSCCAlg.java609
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/DFSPathFinder.java146
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Edge.java38
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/GraphHelper.java169
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/IGraphPathFinder.java67
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/ITcRelation.java31
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Tuple.java60
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/bfs/BFS.java148
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/PKAlg.java179
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCC.java143
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCProperty.java37
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCResult.java81
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/topsort/TopologicalSorting.java73
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeElectionAlgorithm.java174
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeObserver.java12
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/StronglyConnectedComponentAlgorithm.java69
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/WeaklyConnectedComponentAlgorithm.java85
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/util/CollectionHelper.java64
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/DotGenerator.java160
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/Graph.java185
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalGraphDataSource.java37
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalWrapper.java110
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphDataSource.java70
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphObserver.java55
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcDataSource.java82
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcObserver.java39
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java49
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/HintConfigurator.java46
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/IncrementalMatcherCapability.java30
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactory.java100
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactoryProvider.java35
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteEngine.java579
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/RetePatternMatcher.java463
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyConfiguration.java61
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyReteBackendFactory.java64
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/Bag.java43
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/ConstantNode.java50
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DefaultDeltaMonitor.java43
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DeltaMonitor.java111
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/SimpleReceiver.java109
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/BaseNode.java108
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ConnectionFactory.java171
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/IGroupable.java31
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Network.java408
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NetworkStructureChangeSensitiveNode.java30
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Node.java62
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeFactory.java376
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeProvisioner.java346
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/PosetAwareReceiver.java39
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ProductionNode.java28
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Receiver.java85
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/RederivableNode.java34
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReinitializedNode.java14
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReteContainer.java729
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/StandardNode.java123
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Supplier.java82
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Tunnel.java19
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/UpdateMessage.java31
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationGroup.java103
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationTracker.java467
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/MessageSelector.java19
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/NodeComparator.java32
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/PhasedSelector.java34
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/Timestamp.java124
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/RecursiveCommunicationGroup.java164
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/SingletonCommunicationGroup.java86
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/TimelessCommunicationTracker.java149
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java36
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationGroup.java171
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationTracker.java216
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyIndexerListenerProxy.java81
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyMailboxProxy.java102
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimestampTransformation.java48
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedCommand.java81
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedConnectCommand.java27
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedDisconnectCommand.java30
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/DefaultMessageIndexer.java74
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/GroupBasedMessageIndexer.java95
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/MessageIndexer.java33
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java32
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/FallThroughCapableMailbox.java30
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/Mailbox.java78
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/MessageIndexerFactory.java23
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/AbstractUpdateSplittingMailbox.java109
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/BehaviorChangingMailbox.java117
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/DefaultMailbox.java163
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/PosetAwareMailbox.java218
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/UpdateSplittingMailbox.java135
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timely/TimelyMailbox.java150
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/Address.java125
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteReceiver.java63
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteSupplier.java54
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/AbstractUniquenessEnforcerNode.java138
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/CallbackNode.java37
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DefaultProductionNode.java79
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorBucketNode.java85
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorDispatcherNode.java154
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/EqualityFilterNode.java41
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/FilterNode.java69
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/InequalityFilterNode.java52
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/RepresentativeElectionNode.java125
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/SingleInputNode.java126
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyProductionNode.java63
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyUniquenessEnforcerNode.java161
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransformerNode.java49
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransitiveClosureNode.java147
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransparentNode.java48
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TrimmerNode.java61
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/UniquenessEnforcerNode.java321
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/ValueBinderFilterNode.java44
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ActiveNodeConflictTrace.java24
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java54
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledSubPlan.java51
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ParameterProjectionTrace.java42
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PatternTraceInfo.java17
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PlanningTrace.java80
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/RecipeTraceInfo.java81
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/TraceInfo.java33
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/UserRequestTrace.java36
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/LexicographicComparator.java58
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java111
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/OrderingCompareAgent.java92
-rw-r--r--subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/ReteHintOptions.java60
-rw-r--r--subprojects/viatra-runtime/about.html26
-rw-r--r--subprojects/viatra-runtime/build.gradle.kts15
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/CancellationToken.java13
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/AdvancedViatraQueryEngine.java363
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatch.java166
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatcher.java83
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQueryGroup.java82
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQuerySpecification.java76
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IMatchUpdateListener.java37
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IPatternMatch.java107
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQueryGroup.java46
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQuerySpecification.java86
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/MatchUpdateAdapter.java105
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngine.java153
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineInitializationListener.java26
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineLifecycleListener.java52
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineManager.java191
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineOptions.java293
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryMatcher.java258
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryModelUpdateListener.java55
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseGeneratedPatternGroup.java31
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseMatcher.java350
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BasePatternMatch.java91
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQueryGroup.java33
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQuerySpecification.java147
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IBaseIndex.java91
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IEngineContext.java49
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IIndexingErrorListener.java23
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IInstanceObserver.java21
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/QueryScope.java33
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/ViatraBaseIndexChangeListener.java34
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/exception/ViatraQueryException.java71
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/EngineContextFactory.java24
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/QueryResultWrapper.java32
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/ViatraQueryEngineImpl.java714
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/LifecycleProvider.java138
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ListenerContainer.java43
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ModelUpdateProvider.java214
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/ViatraQueryRuntimeException.java42
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/AverageAccumulator.java24
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleAverageOperator.java82
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleSumOperator.java62
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/ExtremumOperator.java135
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerAverageOperator.java82
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerSumOperator.java61
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongAverageOperator.java82
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongSumOperator.java61
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/avg.java39
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/count.java33
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/max.java44
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/min.java44
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/sum.java39
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/OrderedIterableMerge.java83
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFind.java214
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFindNodeProperty.java32
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/CommonQueryHintOptions.java36
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ICallDelegationStrategy.java89
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IMatcherCapability.java26
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackend.java68
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactory.java52
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactoryProvider.java46
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendHintProvider.java32
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryResultProvider.java202
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IUpdateable.java27
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryEvaluationHint.java241
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryHintOption.java122
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ResultProviderRequestor.java74
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryMetaContext.java69
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryRuntimeContext.java21
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IInputKey.java45
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IPosetComparator.java35
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryBackendContext.java49
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryCacheContext.java39
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryMetaContext.java98
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryResultProviderAccess.java31
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContext.java287
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContextListener.java27
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IndexingService.java36
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/InputKeyImplication.java103
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/BaseInputKeyWrapper.java55
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/JavaTransitiveInstancesKey.java165
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/surrogate/SurrogateQueryRegistry.java153
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/AbstractTrivialMaskedMemory.java58
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/DefaultMaskedTupleMemory.java127
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/IdentityMaskedTupleMemory.java77
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/MaskedTupleMemory.java385
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/NullaryMaskedTupleMemory.java85
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/UnaryMaskedTupleMemory.java143
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyMaskedMemory.java228
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyTrivialMaskedMemory.java100
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyDefaultMaskedTupleMemory.java98
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyIdentityMaskedTupleMemory.java106
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyNullaryMaskedTupleMemory.java108
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyUnaryMaskedTupleMemory.java133
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IOperationCompiler.java108
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IQueryPlannerStrategy.java29
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/QueryProcessingException.java102
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlan.java240
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlanFactory.java33
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/BuildHelper.java165
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/FunctionalDependencyHelper.java143
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/StatisticsHelper.java62
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/TypeHelper.java217
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PApply.java94
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PEnumerate.java76
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PJoin.java64
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/POperation.java52
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PProject.java109
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PStart.java90
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/BasePConstraint.java108
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/DeferredPConstraint.java31
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/EnumerablePConstraint.java59
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IExpressionEvaluator.java42
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IMultiQueryReference.java26
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IQueryReference.java33
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IRelationEvaluator.java47
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeConstraint.java65
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeInfoProviderConstraint.java28
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IValueProvider.java27
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/InitializablePQuery.java56
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/KeyedEnumerablePConstraint.java39
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PBody.java289
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PConstraint.java70
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PTraceable.java16
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PVariable.java203
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/TypeJudgement.java153
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/VariableDeferredPConstraint.java40
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AbstractMemorylessAggregationOperator.java31
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AggregatorType.java49
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/BoundAggregator.java61
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IAggregatorFactory.java40
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IMultisetAggregationOperator.java106
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/analysis/QueryAnalyzer.java194
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/PAnnotation.java94
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/ParameterReference.java30
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/AggregatorConstraint.java98
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/BaseTypeSafeConstraint.java99
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Equality.java96
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExportedParameter.java108
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExpressionEvaluation.java80
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Inequality.java151
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/NegativePatternCall.java52
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternCallBasedDeferred.java118
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternMatchCounter.java70
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/RelationEvaluation.java57
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/TypeFilterConstraint.java105
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/AbstractTransitiveClosure.java44
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryReflexiveTransitiveClosure.java57
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryTransitiveClosure.java33
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/Connectivity.java11
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/ConstantValue.java57
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/PositivePatternCall.java76
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/RepresentativeElectionConstraint.java43
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/TypeConstraint.java79
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/BasePQuery.java231
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PDisjunction.java104
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameter.java105
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameterDirection.java35
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PProblem.java68
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueries.java110
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQuery.java154
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueryHeader.java101
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PVisibility.java37
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/QueryInitializationException.java35
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/AbstractRewriterTraceSource.java53
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/ConstraintRemovalReason.java23
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/DefaultFlattenCallPredicate.java23
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/FlattenerCopier.java129
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IConstraintFilter.java48
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IDerivativeModificationReason.java19
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IFlattenCallPredicate.java50
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IPTraceableTraceProvider.java55
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IRewriterTraceCollector.java33
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IVariableRenamer.java59
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/MappingTraceCollector.java135
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NeverFlattenCallPredicate.java26
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NopTraceCollector.java68
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyCopier.java307
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyNormalizer.java310
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriter.java27
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriterCacher.java64
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PQueryFlattener.java253
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/RewriterException.java31
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/SurrogateQueryRewriter.java63
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/VariableMappingExpressionEvaluatorWrapper.java88
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/AbstractTuple.java136
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseFlatTuple.java20
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseLeftInheritanceTuple.java65
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple.java60
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple0.java46
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple1.java44
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple2.java51
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple3.java55
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple4.java59
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/IModifiableTuple.java27
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/ITuple.java64
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple.java172
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple1.java83
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple2.java73
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple3.java81
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple4.java88
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/MaskedTuple.java48
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuple.java69
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask.java560
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask0.java56
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMaskIdentity.java51
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleValueProvider.java48
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuples.java157
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileMaskedTuple.java50
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileModifiableMaskedTuple.java47
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java47
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Accuracy.java48
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Clearable.java23
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/CollectionsFactory.java188
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Direction.java61
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsBagMemory.java86
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsDeltaBag.java41
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsFactory.java159
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongMultiset.java150
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongSetMemory.java212
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiLookup.java226
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiset.java93
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsSetMemory.java94
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EmptyMemory.java93
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ICache.java32
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IDeltaBag.java26
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemory.java81
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemoryView.java205
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookup.java216
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookupAbstract.java485
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiset.java30
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IProvider.java30
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ISetMemory.java37
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MapBackedMemoryView.java102
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MarkedMemory.java21
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MemoryViewBackedMapView.java117
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Preconditions.java208
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/PurgableCache.java44
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Sets.java90
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Signed.java60
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonInstanceProvider.java29
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonMemoryView.java105
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/TimelyMemory.java517
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java36
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/Resumable.java27
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/UnmaskedResumable.java36
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/CompactTimeline.java111
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Diff.java55
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/SingletonTimeline.java73
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timeline.java146
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timelines.java46
-rw-r--r--subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/util/ViatraQueryLoggingUtil.java72
-rw-r--r--yarn.lock4006
1138 files changed, 83934 insertions, 10084 deletions
diff --git a/.editorconfig b/.editorconfig
index 7e5e9f16..7bf4c4d5 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -25,4 +25,10 @@ indent_style = space
25indent_size = 2 25indent_size = 2
26 26
27[libs.versions.toml] 27[libs.versions.toml]
28max_line_length = 999 \ No newline at end of file 28max_line_length = 999
29
30[*.{ecore,genmodel}]
31max_line_length = 999
32
33[*.mwe2]
34max_line_length = 999
diff --git a/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch
new file mode 100644
index 00000000..0a4110c5
--- /dev/null
+++ b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch
@@ -0,0 +1,95 @@
1diff --git a/src/dot.js b/src/dot.js
2index 96ae02b6edd947ac9086f3108986c08d91470cba..c4422b08d73f7fe73dc52ad905cf981d1f3cbcc5 100644
3--- a/src/dot.js
4+++ b/src/dot.js
5@@ -1,4 +1,3 @@
6-import { Graphviz } from "@hpcc-js/wasm/graphviz";
7 import * as d3 from "d3-selection";
8 import {extractAllElementsData, extractElementData, createElementWithAttributes} from "./element.js";
9 import {convertToPathData} from "./svg.js";
10@@ -8,31 +7,6 @@ import {getEdgeTitle} from "./data.js";
11
12
13 export function initViz() {
14-
15- // force JIT compilation of @hpcc-js/wasm
16- try {
17- Graphviz.load().then(graphviz => {
18- graphviz.layout("", "svg", "dot");
19- this.layoutSync = graphviz.layout.bind(graphviz);
20- if (this._worker == null) {
21- this._dispatch.call("initEnd", this);
22- }
23- if (this._afterInit) {
24- this._afterInit();
25- }
26- });
27-// after the port to ESM modules, we don't know how to trigger this so
28-// we just disable it from coverage
29-/* c8 ignore start */
30- } catch(error) {
31- // we end up here when the the script tag type used to load
32- // the "@hpcc-js/wasm" script is not "application/javascript"
33- // or "text/javascript", but typically "javascript/worker". In
34- // this case the browser does not load the script since it's
35- // unnecessary because it's loaded by the web worker
36- // instead. This is expected so we just ignore the error.
37- }
38-/* c8 ignore stop */
39 if (this._worker != null) {
40 var vizURL = this._vizURL;
41 var graphvizInstance = this;
42@@ -337,7 +311,8 @@ function layoutDone(svgDoc, callback) {
43
44 var newSvg = newDoc
45 .select('svg');
46-
47+
48+ this._dispatch.call('postProcessSVG', this, newSvg);
49 var data = extractAllElementsData(newSvg);
50 this._dispatch.call('dataExtractEnd', this);
51 postProcessDataPass1Local(data);
52diff --git a/src/element.js b/src/element.js
53index 5aa398a6cf2550e15f642aea4eaa5a1c69af69ad..5d799e38566e8f847aa1ba80f4c575911e9851cf 100644
54--- a/src/element.js
55+++ b/src/element.js
56@@ -108,6 +108,8 @@ export function createElement(data) {
57 return document.createTextNode("");
58 } else if (data.tag == '#comment') {
59 return document.createComment(data.comment);
60+ } else if (data.tag == 'div' || data.tag == 'DIV') {
61+ return document.createElement('div');
62 } else {
63 return document.createElementNS('http://www.w3.org/2000/svg', data.tag);
64 }
65diff --git a/src/graphviz.js b/src/graphviz.js
66index c4638cb0e4042844c59c52dfe4749e13999fef6e..28dcfb71ad787c78645c460a29e9c52295c5f6bf 100644
67--- a/src/graphviz.js
68+++ b/src/graphviz.js
69@@ -49,7 +49,6 @@ import {drawnNodeSelection} from "./drawNode.js";
70 import {workerCode} from "./workerCode.js";
71 import {sharedWorkerCode} from "./workerCode.js";
72 import {workerCodeBody} from "./workerCode.js";
73-import {Graphviz as hpccWasmGraphviz} from "@hpcc-js/wasm/graphviz";
74
75 export function Graphviz(selection, options) {
76 this._options = {
77@@ -119,10 +118,6 @@ export function Graphviz(selection, options) {
78 this._workerPort = this._worker;
79 this._workerPortClose = this._worker.terminate.bind(this._worker);
80 this._workerCallbacks = [];
81- } else {
82- hpccWasmGraphviz.load().then(((graphviz) => {
83- this._graphvizVersion = graphviz.version();
84- }).bind(this));
85 }
86 this._selection = selection;
87 this._active = false;
88@@ -143,6 +138,7 @@ export function Graphviz(selection, options) {
89 'start',
90 'layoutStart',
91 'layoutEnd',
92+ 'postProcessSVG',
93 'dataExtractEnd',
94 'dataProcessPass1End',
95 'dataProcessPass2End',
diff --git a/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch.license b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch.license
new file mode 100644
index 00000000..0c7bddfb
--- /dev/null
+++ b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch.license
@@ -0,0 +1,14 @@
1Copyright 2017, Magnus Jacobsson
2Copyright 2023, The Refinery Authors <https://refinery.tools/>
3
4SPDX-License-Identifier: BSD-3-Clause
5
6This file Incorporates patches from the Refinery authors.
7
8However, but redistribution and use is only permitted if neither
9the name of the copyright holder Magnus Jacobsson nor the names of other
10contributors to the d3-graphviz project are used to endorse or promote
11products derived from this software as per the 3rd clause of the
123-clause BSD license.
13
14See LICENSES/BSD-3-Clause.txt for more details.
diff --git a/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch
new file mode 100644
index 00000000..88d32c72
--- /dev/null
+++ b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch
@@ -0,0 +1,134 @@
1diff --git a/src/zoom.js b/src/zoom.js
2index d56438823b2882856f156b0915ccbac038d6923e..50936066a3597c46ad65f690e9c8417e9d3375f8 100644
3--- a/src/zoom.js
4+++ b/src/zoom.js
5@@ -14,6 +14,10 @@ function defaultFilter(event) {
6 return (!event.ctrlKey || event.type === 'wheel') && !event.button;
7 }
8
9+function defaultCenter(event) {
10+ return pointer(event, this);
11+}
12+
13 function defaultExtent() {
14 var e = this;
15 if (e instanceof SVGElement) {
16@@ -27,6 +31,10 @@ function defaultExtent() {
17 return [[0, 0], [e.clientWidth, e.clientHeight]];
18 }
19
20+function defaultCentroid(extent) {
21+ return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
22+}
23+
24 function defaultTransform() {
25 return this.__zoom || identity;
26 }
27@@ -52,7 +60,9 @@ function defaultConstrain(transform, extent, translateExtent) {
28
29 export default function() {
30 var filter = defaultFilter,
31+ center = defaultCenter,
32 extent = defaultExtent,
33+ centroid = defaultCentroid,
34 constrain = defaultConstrain,
35 wheelDelta = defaultWheelDelta,
36 touchable = defaultTouchable,
37@@ -148,9 +158,6 @@ export default function() {
38 return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);
39 }
40
41- function centroid(extent) {
42- return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
43- }
44
45 function schedule(transition, transform, point, event) {
46 transition
47@@ -243,6 +250,7 @@ export default function() {
48 if (g.wheel) {
49 if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
50 g.mouse[1] = t.invert(g.mouse[0] = p);
51+ g.mouse[2] = center.apply(this, arguments);
52 }
53 clearTimeout(g.wheel);
54 }
55@@ -252,14 +260,14 @@ export default function() {
56
57 // Otherwise, capture the mouse point and location at the start.
58 else {
59- g.mouse = [p, t.invert(p)];
60+ g.mouse = [p, t.invert(p), center.apply(this, arguments)];
61 interrupt(this);
62 g.start();
63 }
64
65 noevent(event);
66 g.wheel = setTimeout(wheelidled, wheelDelay);
67- g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
68+ g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[2], t.invert(g.mouse[2])), g.extent, translateExtent));
69
70 function wheelidled() {
71 g.wheel = null;
72@@ -278,7 +286,7 @@ export default function() {
73
74 dragDisable(event.view);
75 nopropagation(event);
76- g.mouse = [p, this.__zoom.invert(p)];
77+ g.prev = p;
78 interrupt(this);
79 g.start();
80
81@@ -288,8 +296,10 @@ export default function() {
82 var dx = event.clientX - x0, dy = event.clientY - y0;
83 g.moved = dx * dx + dy * dy > clickDistance2;
84 }
85+ var p = pointer(event, currentTarget);
86 g.event(event)
87- .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));
88+ .zoom("mouse", constrain(translate(g.that.__zoom, p, g.that.__zoom.invert(g.prev)), g.extent, translateExtent));
89+ g.prev = p;
90 }
91
92 function mouseupped(event) {
93@@ -303,7 +313,7 @@ export default function() {
94 function dblclicked(event, ...args) {
95 if (!filter.apply(this, arguments)) return;
96 var t0 = this.__zoom,
97- p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),
98+ p0 = center.call(this, event.changedTouches ? event.changedTouches[0] : event),
99 p1 = t0.invert(p0),
100 k1 = t0.k * (event.shiftKey ? 0.5 : 2),
101 t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
102@@ -322,7 +332,7 @@ export default function() {
103
104 nopropagation(event);
105 for (i = 0; i < n; ++i) {
106- t = touches[i], p = pointer(t, this);
107+ t = touches[i], p = center.call(this, t);
108 p = [p, this.__zoom.invert(p), t.identifier];
109 if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
110 else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
111@@ -345,7 +355,7 @@ export default function() {
112
113 noevent(event);
114 for (i = 0; i < n; ++i) {
115- t = touches[i], p = pointer(t, this);
116+ t = touches[i], p = center.call(this, t);
117 if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
118 else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
119 }
120@@ -406,6 +416,14 @@ export default function() {
121 return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom) : touchable;
122 };
123
124+ zoom.center = function(_) {
125+ return arguments.length ? (center = typeof _ === "function" ? _ : constant([+_[0], +_[1]]), zoom) : center;
126+ };
127+
128+ zoom.centroid = function(_) {
129+ return arguments.length ? (centroid = typeof _ === "function" ? _ : constant([+_[0], +_[1]]), zoom) : centroid;
130+ };
131+
132 zoom.extent = function(_) {
133 return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
134 };
diff --git a/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch.license b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch.license
new file mode 100644
index 00000000..d95053c1
--- /dev/null
+++ b/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch.license
@@ -0,0 +1,11 @@
1Copyright 2010-2021 Mike Bostock
2Copyright 2020-2023 Philippe Rivière
3Copyright 2023 The Refinery Authors <https://refinery.tools/>
4
5SPDX-License-Identifier: ISC OR EPL-2.0
6
7This file ncorporates patches from
8https://github.com/d3/d3-zoom/tree/3afbe2ae2dfb3129231c5567db56dafb2d6a56a6
9by Philippe Rivière.
10
11Morevoer, it includes other modifications by the Refinery authors.
diff --git a/.yarn/releases/yarn-4.0.0-rc.45.cjs b/.yarn/releases/yarn-4.0.0-rc.45.cjs
deleted file mode 100755
index e02fd942..00000000
--- a/.yarn/releases/yarn-4.0.0-rc.45.cjs
+++ /dev/null
@@ -1,877 +0,0 @@
1#!/usr/bin/env node
2/* eslint-disable */
3//prettier-ignore
4(()=>{var B_e=Object.create;var kR=Object.defineProperty;var v_e=Object.getOwnPropertyDescriptor;var D_e=Object.getOwnPropertyNames;var S_e=Object.getPrototypeOf,P_e=Object.prototype.hasOwnProperty;var Ie=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var dt=(t,e)=>()=>(t&&(e=t(t=0)),e);var U=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yt=(t,e)=>{for(var r in e)kR(t,r,{get:e[r],enumerable:!0})},x_e=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of D_e(e))!P_e.call(t,a)&&a!==r&&kR(t,a,{get:()=>e[a],enumerable:!(o=v_e(e,a))||o.enumerable});return t};var tt=(t,e,r)=>(r=t!=null?B_e(S_e(t)):{},x_e(e||!t||!t.__esModule?kR(r,"default",{value:t,enumerable:!0}):r,t));var Ii={};Yt(Ii,{SAFE_TIME:()=>P7,S_IFDIR:()=>cD,S_IFLNK:()=>uD,S_IFMT:()=>Hu,S_IFREG:()=>RI});var Hu,cD,RI,uD,P7,x7=dt(()=>{Hu=61440,cD=16384,RI=32768,uD=40960,P7=456789e3});var sr={};Yt(sr,{EBADF:()=>Co,EBUSY:()=>b_e,EEXIST:()=>N_e,EINVAL:()=>k_e,EISDIR:()=>T_e,ENOENT:()=>F_e,ENOSYS:()=>Q_e,ENOTDIR:()=>R_e,ENOTEMPTY:()=>O_e,EOPNOTSUPP:()=>M_e,EROFS:()=>L_e,ERR_DIR_CLOSED:()=>FR});function Ml(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function b_e(t){return Ml("EBUSY",t)}function Q_e(t,e){return Ml("ENOSYS",`${t}, ${e}`)}function k_e(t){return Ml("EINVAL",`invalid argument, ${t}`)}function Co(t){return Ml("EBADF",`bad file descriptor, ${t}`)}function F_e(t){return Ml("ENOENT",`no such file or directory, ${t}`)}function R_e(t){return Ml("ENOTDIR",`not a directory, ${t}`)}function T_e(t){return Ml("EISDIR",`illegal operation on a directory, ${t}`)}function N_e(t){return Ml("EEXIST",`file already exists, ${t}`)}function L_e(t){return Ml("EROFS",`read-only filesystem, ${t}`)}function O_e(t){return Ml("ENOTEMPTY",`directory not empty, ${t}`)}function M_e(t){return Ml("EOPNOTSUPP",`operation not supported, ${t}`)}function FR(){return Ml("ERR_DIR_CLOSED","Directory handle was closed")}var AD=dt(()=>{});var Ul={};Yt(Ul,{BigIntStatsEntry:()=>ny,DEFAULT_MODE:()=>NR,DirEntry:()=>RR,StatEntry:()=>ry,areStatsEqual:()=>LR,clearStats:()=>fD,convertToBigIntStats:()=>__e,makeDefaultStats:()=>b7,makeEmptyStats:()=>U_e});function b7(){return new ry}function U_e(){return fD(b7())}function fD(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):TR.types.isDate(r)&&(t[e]=new Date(0))}return t}function __e(t){let e=new ny;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let o=t[r];typeof o=="number"?e[r]=BigInt(o):TR.types.isDate(o)&&(e[r]=new Date(o))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function LR(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var TR,NR,RR,ry,ny,OR=dt(()=>{TR=tt(Ie("util")),NR=33188,RR=class{constructor(){this.name="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},ry=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=NR;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},ny=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(NR);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function k7(t){if(process.platform!=="win32")return t;let e,r;if(e=t.match(j_e))t=e[1];else if(r=t.match(G_e))t=`\\\\${r[1]?".\\":""}${r[2]}`;else return t;return t.replace(/\//g,"\\")}function MR(t){if(process.platform!=="win32")return t;t=t.replace(/\\/g,"/");let e,r;return(e=t.match(H_e))?t=`/${e[1]}`:(r=t.match(q_e))&&(t=`/unc/${r[1]?".dot/":""}${r[2]}`),t}function pD(t,e){return t===ue?k7(e):MR(e)}function Li(t){if(ue.parse(t).dir!==""||J.parse(t).dir!=="")throw new Error(`Invalid filename: "${t}"`);return t}var TI,wt,Lr,ue,J,Q7,H_e,q_e,j_e,G_e,Ca=dt(()=>{TI=tt(Ie("path")),wt={root:"/",dot:".",parent:".."},Lr={home:"~",nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",pnpData:".pnp.data.json",pnpEsmLoader:".pnp.loader.mjs",rc:".yarnrc.yml"},ue=Object.create(TI.default),J=Object.create(TI.default.posix);ue.cwd=()=>process.cwd();J.cwd=()=>MR(process.cwd());J.resolve=(...t)=>t.length>0&&J.isAbsolute(t[0])?TI.default.posix.resolve(...t):TI.default.posix.resolve(J.cwd(),...t);Q7=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?".":(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};ue.fromPortablePath=k7;ue.toPortablePath=MR;ue.contains=(t,e)=>Q7(ue,t,e);J.contains=(t,e)=>Q7(J,t,e);H_e=/^([a-zA-Z]:.*)$/,q_e=/^\/\/(\.\/)?(.*)$/,j_e=/^\/([a-zA-Z]:.*)$/,G_e=/^\/unc\/(\.dot\/)?(.*)$/});async function hD(t,e){let r="0123456789abcdef";await t.mkdirPromise(e.indexPath,{recursive:!0});let o=[];for(let a of r)for(let n of r)o.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(o),e.indexPath}async function F7(t,e,r,o,a){let n=t.pathUtils.normalize(e),u=r.pathUtils.normalize(o),A=[],p=[],{atime:h,mtime:C}=a.stableTime?{atime:Tg,mtime:Tg}:await r.lstatPromise(u);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,C]}),await UR(A,p,t,n,r,u,{...a,didParentExist:!0});for(let w of A)await w();await Promise.all(p.map(w=>w()))}async function UR(t,e,r,o,a,n,u){var v,b,E;let A=u.didParentExist?await R7(r,o):null,p=await a.lstatPromise(n),{atime:h,mtime:C}=u.stableTime?{atime:Tg,mtime:Tg}:p,w;switch(!0){case p.isDirectory():w=await Y_e(t,e,r,o,A,a,n,p,u);break;case p.isFile():w=await J_e(t,e,r,o,A,a,n,p,u);break;case p.isSymbolicLink():w=await z_e(t,e,r,o,A,a,n,p,u);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(((v=u.linkStrategy)==null?void 0:v.type)!=="HardlinkFromIndex"||!p.isFile())&&((w||((b=A==null?void 0:A.mtime)==null?void 0:b.getTime())!==C.getTime()||((E=A==null?void 0:A.atime)==null?void 0:E.getTime())!==h.getTime())&&(e.push(()=>r.lutimesPromise(o,h,C)),w=!0),(A===null||(A.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(o,p.mode&511)),w=!0)),w}async function R7(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function Y_e(t,e,r,o,a,n,u,A,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(o,{mode:A.mode})}catch(v){if(v.code!=="EEXIST")throw v}}),h=!0);let C=await n.readdirPromise(u),w=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let v of C.sort())await UR(t,e,r,r.pathUtils.join(o,v),n,n.pathUtils.join(u,v),w)&&(h=!0);else(await Promise.all(C.map(async b=>{await UR(t,e,r,r.pathUtils.join(o,b),n,n.pathUtils.join(u,b),w)}))).some(b=>b)&&(h=!0);return h}async function K_e(t,e,r,o,a,n,u,A,p,h){let C=await n.checksumFilePromise(u,{algorithm:"sha1"}),w=r.pathUtils.join(h.indexPath,C.slice(0,2),`${C}.dat`),v;(re=>(re[re.Lock=0]="Lock",re[re.Rename=1]="Rename"))(v||(v={}));let b=1,E=await R7(r,w);if(a){let _=E&&a.dev===E.dev&&a.ino===E.ino,V=(E==null?void 0:E.mtimeMs)!==W_e;if(_&&V&&h.autoRepair&&(b=0,E=null),!_)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1}let R=!E&&b===1?`${w}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0")}`:null,L=!1;return t.push(async()=>{if(!E&&(b===0&&await r.lockPromise(w,async()=>{let _=await n.readFilePromise(u);await r.writeFilePromise(w,_)}),b===1&&R)){let _=await n.readFilePromise(u);await r.writeFilePromise(R,_);try{await r.linkPromise(R,w)}catch(V){if(V.code==="EEXIST")L=!0,await r.unlinkPromise(R);else throw V}}a||await r.linkPromise(w,o)}),e.push(async()=>{E||await r.lutimesPromise(w,Tg,Tg),R&&!L&&await r.unlinkPromise(R)}),!1}async function V_e(t,e,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(u);await r.writeFilePromise(o,h)}),!0}async function J_e(t,e,r,o,a,n,u,A,p){var h;return((h=p.linkStrategy)==null?void 0:h.type)==="HardlinkFromIndex"?K_e(t,e,r,o,a,n,u,A,p,p.linkStrategy):V_e(t,e,r,o,a,n,u,A,p)}async function z_e(t,e,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(pD(r.pathUtils,await n.readlinkPromise(u)),o)}),!0}var Tg,W_e,_R=dt(()=>{Ca();Tg=new Date(456789e3*1e3),W_e=Tg.getTime()});function gD(t,e,r,o){let a=()=>{let n=r.shift();return typeof n>"u"?null:Object.assign(t.statSync(t.pathUtils.join(e,n)),{name:n})};return new NI(e,a,o)}var NI,T7=dt(()=>{AD();NI=class{constructor(e,r,o={}){this.path=e;this.nextDirent=r;this.opts=o;this.closed=!1}throwIfClosed(){if(this.closed)throw FR()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<"u"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<"u"?e(null):Promise.resolve()}closeSync(){var e,r;this.throwIfClosed(),(r=(e=this.opts).onClose)==null||r.call(e),this.closed=!0}}});function N7(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var L7,iy,O7=dt(()=>{L7=Ie("events");OR();iy=class extends L7.EventEmitter{constructor(r,o,{bigint:a=!1}={}){super();this.status="ready";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=o,this.bigint=a,this.lastStats=this.stat()}static create(r,o,a){let n=new iy(r,o,a);return n.start(),n}start(){N7(this.status,"ready"),this.status="running",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit("change",this.lastStats,this.lastStats)},3)}stop(){N7(this.status,"running"),this.status="stopped",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit("stop")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let o=this.bigint?new ny:new ry;return fD(o)}}makeInterval(r){let o=setInterval(()=>{let a=this.stat(),n=this.lastStats;LR(a,n)||(this.lastStats=a,this.emit("change",a,n))},r.interval);return r.persistent?o:o.unref()}registerChangeListener(r,o){this.addListener("change",r),this.changeListeners.set(r,this.makeInterval(o))}unregisterChangeListener(r){this.removeListener("change",r);let o=this.changeListeners.get(r);typeof o<"u"&&clearInterval(o),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function sy(t,e,r,o){let a,n,u,A;switch(typeof r){case"function":a=!1,n=!0,u=5007,A=r;break;default:({bigint:a=!1,persistent:n=!0,interval:u=5007}=r),A=o;break}let p=dD.get(t);typeof p>"u"&&dD.set(t,p=new Map);let h=p.get(e);return typeof h>"u"&&(h=iy.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(A,{persistent:n,interval:u}),h}function Ng(t,e,r){let o=dD.get(t);if(typeof o>"u")return;let a=o.get(e);typeof a>"u"||(typeof r>"u"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),o.delete(e)))}function Lg(t){let e=dD.get(t);if(!(typeof e>"u"))for(let r of e.keys())Ng(t,r)}var dD,HR=dt(()=>{O7();dD=new WeakMap});function X_e(t){let e=t.match(/\r?\n/g);if(e===null)return U7.EOL;let r=e.filter(a=>a===`\r
5`).length,o=e.length-r;return r>o?`\r
6`:`
7`}function Og(t,e){return e.replace(/\r?\n/g,X_e(t))}var M7,U7,df,qu,Mg=dt(()=>{M7=Ie("crypto"),U7=Ie("os");_R();Ca();df=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let o=[e];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let o=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,M7.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(e,{recursive:r=!0,maxRetries:o=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(u=>this.removePromise(this.pathUtils.resolve(e,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(e);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let o;try{o=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??(n=A),r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??(n=A),r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await F7(this,e,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(e,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(e);let p=o.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(e);let p=o.readlinkSync(r);this.symlinkSync(pD(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(e,A)}async changeFilePromise(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,o):this.changeFileTextPromise(e,r,o)}async changeFileBufferPromise(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:o})}async changeFileTextPromise(e,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let u=o?Og(n,r):r;n!==u&&await this.writeFilePromise(e,u,{mode:a})}changeFileSync(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,o):this.changeFileTextSync(e,r,o)}changeFileBufferSync(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:o})}changeFileTextSync(e,r,{automaticNewlines:o=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let u=o?Og(n,r):r;n!==u&&this.writeFileSync(e,u,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(o){if(o.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw o}}moveSync(e,r){try{this.renameSync(e,r)}catch(o){if(o.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw o}}async lockPromise(e,r){let o=`${e}.flock`,a=1e3/60,n=Date.now(),u=null,A=async()=>{let p;try{[p]=await this.readJsonPromise(o)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;u===null;)try{u=await this.openPromise(o,"wx")}catch(p){if(p.code==="EEXIST"){if(!await A())try{await this.unlinkPromise(o);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${o})`)}else throw p}await this.writePromise(u,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(u),await this.unlinkPromise(o)}catch{}}}async readJsonPromise(e){let r=await this.readFilePromise(e,"utf8");try{return JSON.parse(r)}catch(o){throw o.message+=` (in ${e})`,o}}readJsonSync(e){let r=this.readFileSync(e,"utf8");try{return JSON.parse(r)}catch(o){throw o.message+=` (in ${e})`,o}}async writeJsonPromise(e,r){return await this.writeFilePromise(e,`${JSON.stringify(r,null,2)}
8`)}writeJsonSync(e,r){return this.writeFileSync(e,`${JSON.stringify(r,null,2)}
9`)}async preserveTimePromise(e,r){let o=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,o.atime,o.mtime)}async preserveTimeSync(e,r){let o=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,o.atime,o.mtime)}},qu=class extends df{constructor(){super(J)}}});var vs,mf=dt(()=>{Mg();vs=class extends df{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,o){return this.baseFs.openPromise(this.mapToBase(e),r,o)}openSync(e,r,o){return this.baseFs.openSync(this.mapToBase(e),r,o)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,o,a,n){return await this.baseFs.readPromise(e,r,o,a,n)}readSync(e,r,o,a,n){return this.baseFs.readSync(e,r,o,a,n)}async writePromise(e,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,o):await this.baseFs.writePromise(e,r,o,a,n)}writeSync(e,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,o):this.baseFs.writeSync(e,r,o,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,o){return this.baseFs.fchownPromise(e,r,o)}fchownSync(e,r,o){return this.baseFs.fchownSync(e,r,o)}async chownPromise(e,r,o){return this.baseFs.chownPromise(this.mapToBase(e),r,o)}chownSync(e,r,o){return this.baseFs.chownSync(this.mapToBase(e),r,o)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,o=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),o)}copyFileSync(e,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),o)}async appendFilePromise(e,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,o)}appendFileSync(e,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,o)}async writeFilePromise(e,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,o)}writeFileSync(e,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,o)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,o){return this.baseFs.utimesPromise(this.mapToBase(e),r,o)}utimesSync(e,r,o){return this.baseFs.utimesSync(this.mapToBase(e),r,o)}async lutimesPromise(e,r,o){return this.baseFs.lutimesPromise(this.mapToBase(e),r,o)}lutimesSync(e,r,o){return this.baseFs.lutimesSync(this.mapToBase(e),r,o)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(u,a,o)}symlinkSync(e,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(u,a,o)}async readFilePromise(e,r){return this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return this.baseFs.readFileSync(this.fsMapToBase(e),r)}async readdirPromise(e,r){return this.baseFs.readdirPromise(this.mapToBase(e),r)}readdirSync(e,r){return this.baseFs.readdirSync(this.mapToBase(e),r)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,r){return this.baseFs.truncatePromise(this.mapToBase(e),r)}truncateSync(e,r){return this.baseFs.truncateSync(this.mapToBase(e),r)}async ftruncatePromise(e,r){return this.baseFs.ftruncatePromise(e,r)}ftruncateSync(e,r){return this.baseFs.ftruncateSync(e,r)}watch(e,r,o){return this.baseFs.watch(this.mapToBase(e),r,o)}watchFile(e,r,o){return this.baseFs.watchFile(this.mapToBase(e),r,o)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e=="number"?e:this.mapToBase(e)}}});var ju,_7=dt(()=>{mf();ju=class extends vs{constructor(r,{baseFs:o,pathUtils:a}){super(a);this.target=r,this.baseFs=o}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(r){return r}mapToBase(r){return r}}});var H7,xn,Ug=dt(()=>{H7=tt(Ie("fs"));Mg();Ca();xn=class extends qu{constructor(r=H7.default){super();this.realFs=r}getExtractHint(){return!1}getRealPath(){return wt.root}resolve(r){return J.resolve(r)}async openPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.open(ue.fromPortablePath(r),o,a,this.makeCallback(n,u))})}openSync(r,o,a){return this.realFs.openSync(ue.fromPortablePath(r),o,a)}async opendirPromise(r,o){return await new Promise((a,n)=>{typeof o<"u"?this.realFs.opendir(ue.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.opendir(ue.fromPortablePath(r),this.makeCallback(a,n))}).then(a=>Object.defineProperty(a,"path",{value:r,configurable:!0,writable:!0}))}opendirSync(r,o){let a=typeof o<"u"?this.realFs.opendirSync(ue.fromPortablePath(r),o):this.realFs.opendirSync(ue.fromPortablePath(r));return Object.defineProperty(a,"path",{value:r,configurable:!0,writable:!0})}async readPromise(r,o,a=0,n=0,u=-1){return await new Promise((A,p)=>{this.realFs.read(r,o,a,n,u,(h,C)=>{h?p(h):A(C)})})}readSync(r,o,a,n,u){return this.realFs.readSync(r,o,a,n,u)}async writePromise(r,o,a,n,u){return await new Promise((A,p)=>typeof o=="string"?this.realFs.write(r,o,a,this.makeCallback(A,p)):this.realFs.write(r,o,a,n,u,this.makeCallback(A,p)))}writeSync(r,o,a,n,u){return typeof o=="string"?this.realFs.writeSync(r,o,a):this.realFs.writeSync(r,o,a,n,u)}async closePromise(r){await new Promise((o,a)=>{this.realFs.close(r,this.makeCallback(o,a))})}closeSync(r){this.realFs.closeSync(r)}createReadStream(r,o){let a=r!==null?ue.fromPortablePath(r):r;return this.realFs.createReadStream(a,o)}createWriteStream(r,o){let a=r!==null?ue.fromPortablePath(r):r;return this.realFs.createWriteStream(a,o)}async realpathPromise(r){return await new Promise((o,a)=>{this.realFs.realpath(ue.fromPortablePath(r),{},this.makeCallback(o,a))}).then(o=>ue.toPortablePath(o))}realpathSync(r){return ue.toPortablePath(this.realFs.realpathSync(ue.fromPortablePath(r),{}))}async existsPromise(r){return await new Promise(o=>{this.realFs.exists(ue.fromPortablePath(r),o)})}accessSync(r,o){return this.realFs.accessSync(ue.fromPortablePath(r),o)}async accessPromise(r,o){return await new Promise((a,n)=>{this.realFs.access(ue.fromPortablePath(r),o,this.makeCallback(a,n))})}existsSync(r){return this.realFs.existsSync(ue.fromPortablePath(r))}async statPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.stat(ue.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.stat(ue.fromPortablePath(r),this.makeCallback(a,n))})}statSync(r,o){return o?this.realFs.statSync(ue.fromPortablePath(r),o):this.realFs.statSync(ue.fromPortablePath(r))}async fstatPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.fstat(r,o,this.makeCallback(a,n)):this.realFs.fstat(r,this.makeCallback(a,n))})}fstatSync(r,o){return o?this.realFs.fstatSync(r,o):this.realFs.fstatSync(r)}async lstatPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.lstat(ue.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.lstat(ue.fromPortablePath(r),this.makeCallback(a,n))})}lstatSync(r,o){return o?this.realFs.lstatSync(ue.fromPortablePath(r),o):this.realFs.lstatSync(ue.fromPortablePath(r))}async fchmodPromise(r,o){return await new Promise((a,n)=>{this.realFs.fchmod(r,o,this.makeCallback(a,n))})}fchmodSync(r,o){return this.realFs.fchmodSync(r,o)}async chmodPromise(r,o){return await new Promise((a,n)=>{this.realFs.chmod(ue.fromPortablePath(r),o,this.makeCallback(a,n))})}chmodSync(r,o){return this.realFs.chmodSync(ue.fromPortablePath(r),o)}async fchownPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.fchown(r,o,a,this.makeCallback(n,u))})}fchownSync(r,o,a){return this.realFs.fchownSync(r,o,a)}async chownPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.chown(ue.fromPortablePath(r),o,a,this.makeCallback(n,u))})}chownSync(r,o,a){return this.realFs.chownSync(ue.fromPortablePath(r),o,a)}async renamePromise(r,o){return await new Promise((a,n)=>{this.realFs.rename(ue.fromPortablePath(r),ue.fromPortablePath(o),this.makeCallback(a,n))})}renameSync(r,o){return this.realFs.renameSync(ue.fromPortablePath(r),ue.fromPortablePath(o))}async copyFilePromise(r,o,a=0){return await new Promise((n,u)=>{this.realFs.copyFile(ue.fromPortablePath(r),ue.fromPortablePath(o),a,this.makeCallback(n,u))})}copyFileSync(r,o,a=0){return this.realFs.copyFileSync(ue.fromPortablePath(r),ue.fromPortablePath(o),a)}async appendFilePromise(r,o,a){return await new Promise((n,u)=>{let A=typeof r=="string"?ue.fromPortablePath(r):r;a?this.realFs.appendFile(A,o,a,this.makeCallback(n,u)):this.realFs.appendFile(A,o,this.makeCallback(n,u))})}appendFileSync(r,o,a){let n=typeof r=="string"?ue.fromPortablePath(r):r;a?this.realFs.appendFileSync(n,o,a):this.realFs.appendFileSync(n,o)}async writeFilePromise(r,o,a){return await new Promise((n,u)=>{let A=typeof r=="string"?ue.fromPortablePath(r):r;a?this.realFs.writeFile(A,o,a,this.makeCallback(n,u)):this.realFs.writeFile(A,o,this.makeCallback(n,u))})}writeFileSync(r,o,a){let n=typeof r=="string"?ue.fromPortablePath(r):r;a?this.realFs.writeFileSync(n,o,a):this.realFs.writeFileSync(n,o)}async unlinkPromise(r){return await new Promise((o,a)=>{this.realFs.unlink(ue.fromPortablePath(r),this.makeCallback(o,a))})}unlinkSync(r){return this.realFs.unlinkSync(ue.fromPortablePath(r))}async utimesPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.utimes(ue.fromPortablePath(r),o,a,this.makeCallback(n,u))})}utimesSync(r,o,a){this.realFs.utimesSync(ue.fromPortablePath(r),o,a)}async lutimesPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.lutimes(ue.fromPortablePath(r),o,a,this.makeCallback(n,u))})}lutimesSync(r,o,a){this.realFs.lutimesSync(ue.fromPortablePath(r),o,a)}async mkdirPromise(r,o){return await new Promise((a,n)=>{this.realFs.mkdir(ue.fromPortablePath(r),o,this.makeCallback(a,n))})}mkdirSync(r,o){return this.realFs.mkdirSync(ue.fromPortablePath(r),o)}async rmdirPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.rmdir(ue.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.rmdir(ue.fromPortablePath(r),this.makeCallback(a,n))})}rmdirSync(r,o){return this.realFs.rmdirSync(ue.fromPortablePath(r),o)}async linkPromise(r,o){return await new Promise((a,n)=>{this.realFs.link(ue.fromPortablePath(r),ue.fromPortablePath(o),this.makeCallback(a,n))})}linkSync(r,o){return this.realFs.linkSync(ue.fromPortablePath(r),ue.fromPortablePath(o))}async symlinkPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.symlink(ue.fromPortablePath(r.replace(/\/+$/,"")),ue.fromPortablePath(o),a,this.makeCallback(n,u))})}symlinkSync(r,o,a){return this.realFs.symlinkSync(ue.fromPortablePath(r.replace(/\/+$/,"")),ue.fromPortablePath(o),a)}async readFilePromise(r,o){return await new Promise((a,n)=>{let u=typeof r=="string"?ue.fromPortablePath(r):r;this.realFs.readFile(u,o,this.makeCallback(a,n))})}readFileSync(r,o){let a=typeof r=="string"?ue.fromPortablePath(r):r;return this.realFs.readFileSync(a,o)}async readdirPromise(r,o){return await new Promise((a,n)=>{o!=null&&o.withFileTypes?this.realFs.readdir(ue.fromPortablePath(r),{withFileTypes:!0},this.makeCallback(a,n)):this.realFs.readdir(ue.fromPortablePath(r),this.makeCallback(u=>a(u),n))})}readdirSync(r,o){return o!=null&&o.withFileTypes?this.realFs.readdirSync(ue.fromPortablePath(r),{withFileTypes:!0}):this.realFs.readdirSync(ue.fromPortablePath(r))}async readlinkPromise(r){return await new Promise((o,a)=>{this.realFs.readlink(ue.fromPortablePath(r),this.makeCallback(o,a))}).then(o=>ue.toPortablePath(o))}readlinkSync(r){return ue.toPortablePath(this.realFs.readlinkSync(ue.fromPortablePath(r)))}async truncatePromise(r,o){return await new Promise((a,n)=>{this.realFs.truncate(ue.fromPortablePath(r),o,this.makeCallback(a,n))})}truncateSync(r,o){return this.realFs.truncateSync(ue.fromPortablePath(r),o)}async ftruncatePromise(r,o){return await new Promise((a,n)=>{this.realFs.ftruncate(r,o,this.makeCallback(a,n))})}ftruncateSync(r,o){return this.realFs.ftruncateSync(r,o)}watch(r,o,a){return this.realFs.watch(ue.fromPortablePath(r),o,a)}watchFile(r,o,a){return this.realFs.watchFile(ue.fromPortablePath(r),o,a)}unwatchFile(r,o){return this.realFs.unwatchFile(ue.fromPortablePath(r),o)}makeCallback(r,o){return(a,n)=>{a?o(a):r(n)}}}});var An,q7=dt(()=>{Ug();mf();Ca();An=class extends vs{constructor(r,{baseFs:o=new xn}={}){super(J);this.target=this.pathUtils.normalize(r),this.baseFs=o}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(r){return this.pathUtils.isAbsolute(r)?J.normalize(r):this.baseFs.resolve(J.join(this.target,r))}mapFromBase(r){return r}mapToBase(r){return this.pathUtils.isAbsolute(r)?r:this.pathUtils.join(this.target,r)}}});var j7,Gu,G7=dt(()=>{Ug();mf();Ca();j7=wt.root,Gu=class extends vs{constructor(r,{baseFs:o=new xn}={}){super(J);this.target=this.pathUtils.resolve(wt.root,r),this.baseFs=o}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(wt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(r){let o=this.pathUtils.normalize(r);if(this.pathUtils.isAbsolute(r))return this.pathUtils.resolve(this.target,this.pathUtils.relative(j7,r));if(o.match(/^\.\.\/?/))throw new Error(`Resolving this path (${r}) would escape the jail`);return this.pathUtils.resolve(this.target,r)}mapFromBase(r){return this.pathUtils.resolve(j7,this.pathUtils.relative(this.target,r))}}});var oy,W7=dt(()=>{mf();oy=class extends vs{constructor(r,o){super(o);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var _g,Ia,Hp,Y7=dt(()=>{_g=Ie("fs");Mg();Ug();HR();AD();Ca();Ia=4278190080,Hp=class extends qu{constructor({baseFs:r=new xn,filter:o=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:u=!0,maxAge:A=5e3,typeCheck:p=_g.constants.S_IFREG,getMountPoint:h,factoryPromise:C,factorySync:w}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error("The magic byte must be set to a round value between 1 and 127 included");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=u?new Map:null,this.factoryPromise=C,this.factorySync=w,this.filter=o,this.getMountPoint=h,this.magic=a<<24,this.maxAge=A,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){var r;if(Lg(this),this.mountInstances)for(let[o,{childFs:a}]of this.mountInstances.entries())(r=a.saveAndClose)==null||r.call(a),this.mountInstances.delete(o)}discardAndClose(){var r;if(Lg(this),this.mountInstances)for(let[o,{childFs:a}]of this.mountInstances.entries())(r=a.discardAndClose)==null||r.call(a),this.mountInstances.delete(o)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,o){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,o]),a}async openPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,o,a),async(n,{subPath:u})=>this.remapFd(n,await n.openPromise(u,o,a)))}openSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,o,a),(n,{subPath:u})=>this.remapFd(n,n.openSync(u,o,a)))}async opendirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,o),async(a,{subPath:n})=>await a.opendirPromise(n,o),{requireSubpath:!1})}opendirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,o),(a,{subPath:n})=>a.opendirSync(n,o),{requireSubpath:!1})}async readPromise(r,o,a,n,u){if((r&Ia)!==this.magic)return await this.baseFs.readPromise(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Co("read");let[p,h]=A;return await p.readPromise(h,o,a,n,u)}readSync(r,o,a,n,u){if((r&Ia)!==this.magic)return this.baseFs.readSync(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Co("readSync");let[p,h]=A;return p.readSync(h,o,a,n,u)}async writePromise(r,o,a,n,u){if((r&Ia)!==this.magic)return typeof o=="string"?await this.baseFs.writePromise(r,o,a):await this.baseFs.writePromise(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Co("write");let[p,h]=A;return typeof o=="string"?await p.writePromise(h,o,a):await p.writePromise(h,o,a,n,u)}writeSync(r,o,a,n,u){if((r&Ia)!==this.magic)return typeof o=="string"?this.baseFs.writeSync(r,o,a):this.baseFs.writeSync(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Co("writeSync");let[p,h]=A;return typeof o=="string"?p.writeSync(h,o,a):p.writeSync(h,o,a,n,u)}async closePromise(r){if((r&Ia)!==this.magic)return await this.baseFs.closePromise(r);let o=this.fdMap.get(r);if(typeof o>"u")throw Co("close");this.fdMap.delete(r);let[a,n]=o;return await a.closePromise(n)}closeSync(r){if((r&Ia)!==this.magic)return this.baseFs.closeSync(r);let o=this.fdMap.get(r);if(typeof o>"u")throw Co("closeSync");this.fdMap.delete(r);let[a,n]=o;return a.closeSync(n)}createReadStream(r,o){return r===null?this.baseFs.createReadStream(r,o):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,o),(a,{archivePath:n,subPath:u})=>{let A=a.createReadStream(u,o);return A.path=ue.fromPortablePath(this.pathUtils.join(n,u)),A})}createWriteStream(r,o){return r===null?this.baseFs.createWriteStream(r,o):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,o),(a,{subPath:n})=>a.createWriteStream(n,o))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(o,{archivePath:a,subPath:n})=>{let u=this.realPaths.get(a);return typeof u>"u"&&(u=await this.baseFs.realpathPromise(a),this.realPaths.set(a,u)),this.pathUtils.join(u,this.pathUtils.relative(wt.root,await o.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(o,{archivePath:a,subPath:n})=>{let u=this.realPaths.get(a);return typeof u>"u"&&(u=this.baseFs.realpathSync(a),this.realPaths.set(a,u)),this.pathUtils.join(u,this.pathUtils.relative(wt.root,o.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(o,{subPath:a})=>await o.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(o,{subPath:a})=>o.existsSync(a))}async accessPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,o),async(a,{subPath:n})=>await a.accessPromise(n,o))}accessSync(r,o){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,o),(a,{subPath:n})=>a.accessSync(n,o))}async statPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,o),async(a,{subPath:n})=>await a.statPromise(n,o))}statSync(r,o){return this.makeCallSync(r,()=>this.baseFs.statSync(r,o),(a,{subPath:n})=>a.statSync(n,o))}async fstatPromise(r,o){if((r&Ia)!==this.magic)return this.baseFs.fstatPromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Co("fstat");let[n,u]=a;return n.fstatPromise(u,o)}fstatSync(r,o){if((r&Ia)!==this.magic)return this.baseFs.fstatSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Co("fstatSync");let[n,u]=a;return n.fstatSync(u,o)}async lstatPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,o),async(a,{subPath:n})=>await a.lstatPromise(n,o))}lstatSync(r,o){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,o),(a,{subPath:n})=>a.lstatSync(n,o))}async fchmodPromise(r,o){if((r&Ia)!==this.magic)return this.baseFs.fchmodPromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Co("fchmod");let[n,u]=a;return n.fchmodPromise(u,o)}fchmodSync(r,o){if((r&Ia)!==this.magic)return this.baseFs.fchmodSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Co("fchmodSync");let[n,u]=a;return n.fchmodSync(u,o)}async chmodPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,o),async(a,{subPath:n})=>await a.chmodPromise(n,o))}chmodSync(r,o){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,o),(a,{subPath:n})=>a.chmodSync(n,o))}async fchownPromise(r,o,a){if((r&Ia)!==this.magic)return this.baseFs.fchownPromise(r,o,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Co("fchown");let[u,A]=n;return u.fchownPromise(A,o,a)}fchownSync(r,o,a){if((r&Ia)!==this.magic)return this.baseFs.fchownSync(r,o,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Co("fchownSync");let[u,A]=n;return u.fchownSync(A,o,a)}async chownPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,o,a),async(n,{subPath:u})=>await n.chownPromise(u,o,a))}chownSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,o,a),(n,{subPath:u})=>n.chownSync(u,o,a))}async renamePromise(r,o){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(o,async()=>await this.baseFs.renamePromise(r,o),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(a,{subPath:n})=>await this.makeCallPromise(o,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(u,{subPath:A})=>{if(a!==u)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await a.renamePromise(n,A)}))}renameSync(r,o){return this.makeCallSync(r,()=>this.makeCallSync(o,()=>this.baseFs.renameSync(r,o),()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(a,{subPath:n})=>this.makeCallSync(o,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(u,{subPath:A})=>{if(a!==u)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return a.renameSync(n,A)}))}async copyFilePromise(r,o,a=0){let n=async(u,A,p,h)=>{if((a&_g.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${A}' -> ${h}'`),{code:"EXDEV"});if(a&_g.constants.COPYFILE_EXCL&&await this.existsPromise(A))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${A}' -> '${h}'`),{code:"EEXIST"});let C;try{C=await u.readFilePromise(A)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${A}' -> '${h}'`),{code:"EINVAL"})}await p.writeFilePromise(h,C)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(o,async()=>await this.baseFs.copyFilePromise(r,o,a),async(u,{subPath:A})=>await n(this.baseFs,r,u,A)),async(u,{subPath:A})=>await this.makeCallPromise(o,async()=>await n(u,A,this.baseFs,o),async(p,{subPath:h})=>u!==p?await n(u,A,p,h):await u.copyFilePromise(A,h,a)))}copyFileSync(r,o,a=0){let n=(u,A,p,h)=>{if((a&_g.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${A}' -> ${h}'`),{code:"EXDEV"});if(a&_g.constants.COPYFILE_EXCL&&this.existsSync(A))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${A}' -> '${h}'`),{code:"EEXIST"});let C;try{C=u.readFileSync(A)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${A}' -> '${h}'`),{code:"EINVAL"})}p.writeFileSync(h,C)};return this.makeCallSync(r,()=>this.makeCallSync(o,()=>this.baseFs.copyFileSync(r,o,a),(u,{subPath:A})=>n(this.baseFs,r,u,A)),(u,{subPath:A})=>this.makeCallSync(o,()=>n(u,A,this.baseFs,o),(p,{subPath:h})=>u!==p?n(u,A,p,h):u.copyFileSync(A,h,a)))}async appendFilePromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,o,a),async(n,{subPath:u})=>await n.appendFilePromise(u,o,a))}appendFileSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,o,a),(n,{subPath:u})=>n.appendFileSync(u,o,a))}async writeFilePromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,o,a),async(n,{subPath:u})=>await n.writeFilePromise(u,o,a))}writeFileSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,o,a),(n,{subPath:u})=>n.writeFileSync(u,o,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(o,{subPath:a})=>await o.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(o,{subPath:a})=>o.unlinkSync(a))}async utimesPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,o,a),async(n,{subPath:u})=>await n.utimesPromise(u,o,a))}utimesSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,o,a),(n,{subPath:u})=>n.utimesSync(u,o,a))}async lutimesPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,o,a),async(n,{subPath:u})=>await n.lutimesPromise(u,o,a))}lutimesSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,o,a),(n,{subPath:u})=>n.lutimesSync(u,o,a))}async mkdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,o),async(a,{subPath:n})=>await a.mkdirPromise(n,o))}mkdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,o),(a,{subPath:n})=>a.mkdirSync(n,o))}async rmdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,o),async(a,{subPath:n})=>await a.rmdirPromise(n,o))}rmdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,o),(a,{subPath:n})=>a.rmdirSync(n,o))}async linkPromise(r,o){return await this.makeCallPromise(o,async()=>await this.baseFs.linkPromise(r,o),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,o){return this.makeCallSync(o,()=>this.baseFs.linkSync(r,o),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,o,a){return await this.makeCallPromise(o,async()=>await this.baseFs.symlinkPromise(r,o,a),async(n,{subPath:u})=>await n.symlinkPromise(r,u))}symlinkSync(r,o,a){return this.makeCallSync(o,()=>this.baseFs.symlinkSync(r,o,a),(n,{subPath:u})=>n.symlinkSync(r,u))}async readFilePromise(r,o){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,o),async(a,{subPath:n})=>await a.readFilePromise(n,o))}readFileSync(r,o){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,o),(a,{subPath:n})=>a.readFileSync(n,o))}async readdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,o),async(a,{subPath:n})=>await a.readdirPromise(n,o),{requireSubpath:!1})}readdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,o),(a,{subPath:n})=>a.readdirSync(n,o),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(o,{subPath:a})=>await o.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(o,{subPath:a})=>o.readlinkSync(a))}async truncatePromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,o),async(a,{subPath:n})=>await a.truncatePromise(n,o))}truncateSync(r,o){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,o),(a,{subPath:n})=>a.truncateSync(n,o))}async ftruncatePromise(r,o){if((r&Ia)!==this.magic)return this.baseFs.ftruncatePromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Co("ftruncate");let[n,u]=a;return n.ftruncatePromise(u,o)}ftruncateSync(r,o){if((r&Ia)!==this.magic)return this.baseFs.ftruncateSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Co("ftruncateSync");let[n,u]=a;return n.ftruncateSync(u,o)}watch(r,o,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,o,a),(n,{subPath:u})=>n.watch(u,o,a))}watchFile(r,o,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,o,a),()=>sy(this,r,o,a))}unwatchFile(r,o){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,o),()=>Ng(this,r,o))}async makeCallPromise(r,o,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return await o();let u=this.resolve(r),A=this.findMount(u);return A?n&&A.subPath==="/"?await o():await this.getMountPromise(A.archivePath,async p=>await a(p,A)):await o()}makeCallSync(r,o,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return o();let u=this.resolve(r),A=this.findMount(u);return!A||n&&A.subPath==="/"?o():this.getMountSync(A.archivePath,p=>a(p,A))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let o="";for(;;){let a=r.substring(o.length),n=this.getMountPoint(a,o);if(!n)return null;if(o=this.pathUtils.join(o,n),!this.isMount.has(o)){if(this.notMount.has(o))continue;try{if(this.typeCheck!==null&&(this.baseFs.lstatSync(o).mode&_g.constants.S_IFMT)!==this.typeCheck){this.notMount.add(o);continue}}catch{return null}this.isMount.add(o)}return{archivePath:o,subPath:this.pathUtils.join(wt.root,r.substring(o.length))}}}limitOpenFiles(r){var u,A,p;if(this.mountInstances===null)return;let o=Date.now(),a=o+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[h,{childFs:C,expiresAt:w,refCount:v}]of this.mountInstances.entries())if(!(v!==0||((u=C.hasOpenFileHandles)==null?void 0:u.call(C)))){if(o>=w){(A=C.saveAndClose)==null||A.call(C),this.mountInstances.delete(h),n-=1;continue}else if(r===null||n<=0){a=w;break}(p=C.saveAndClose)==null||p.call(C),this.mountInstances.delete(h),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-o).unref())}async getMountPromise(r,o){var a;if(this.mountInstances){let n=this.mountInstances.get(r);if(!n){let u=await this.factoryPromise(this.baseFs,r);n=this.mountInstances.get(r),n||(n={childFs:u(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,n),n.expiresAt=Date.now()+this.maxAge,n.refCount+=1;try{return await o(n.childFs)}finally{n.refCount-=1}}else{let n=(await this.factoryPromise(this.baseFs,r))();try{return await o(n)}finally{(a=n.saveAndClose)==null||a.call(n)}}}getMountSync(r,o){var a;if(this.mountInstances){let n=this.mountInstances.get(r);return n||(n={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,n),n.expiresAt=Date.now()+this.maxAge,o(n.childFs)}else{let n=this.factorySync(this.baseFs,r);try{return o(n)}finally{(a=n.saveAndClose)==null||a.call(n)}}}}});var zt,qR,LI,K7=dt(()=>{Mg();Ca();zt=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"}),qR=class extends df{constructor(){super(J)}getExtractHint(){throw zt()}getRealPath(){throw zt()}resolve(){throw zt()}async openPromise(){throw zt()}openSync(){throw zt()}async opendirPromise(){throw zt()}opendirSync(){throw zt()}async readPromise(){throw zt()}readSync(){throw zt()}async writePromise(){throw zt()}writeSync(){throw zt()}async closePromise(){throw zt()}closeSync(){throw zt()}createWriteStream(){throw zt()}createReadStream(){throw zt()}async realpathPromise(){throw zt()}realpathSync(){throw zt()}async readdirPromise(){throw zt()}readdirSync(){throw zt()}async existsPromise(e){throw zt()}existsSync(e){throw zt()}async accessPromise(){throw zt()}accessSync(){throw zt()}async statPromise(){throw zt()}statSync(){throw zt()}async fstatPromise(e){throw zt()}fstatSync(e){throw zt()}async lstatPromise(e){throw zt()}lstatSync(e){throw zt()}async fchmodPromise(){throw zt()}fchmodSync(){throw zt()}async chmodPromise(){throw zt()}chmodSync(){throw zt()}async fchownPromise(){throw zt()}fchownSync(){throw zt()}async chownPromise(){throw zt()}chownSync(){throw zt()}async mkdirPromise(){throw zt()}mkdirSync(){throw zt()}async rmdirPromise(){throw zt()}rmdirSync(){throw zt()}async linkPromise(){throw zt()}linkSync(){throw zt()}async symlinkPromise(){throw zt()}symlinkSync(){throw zt()}async renamePromise(){throw zt()}renameSync(){throw zt()}async copyFilePromise(){throw zt()}copyFileSync(){throw zt()}async appendFilePromise(){throw zt()}appendFileSync(){throw zt()}async writeFilePromise(){throw zt()}writeFileSync(){throw zt()}async unlinkPromise(){throw zt()}unlinkSync(){throw zt()}async utimesPromise(){throw zt()}utimesSync(){throw zt()}async lutimesPromise(){throw zt()}lutimesSync(){throw zt()}async readFilePromise(){throw zt()}readFileSync(){throw zt()}async readlinkPromise(){throw zt()}readlinkSync(){throw zt()}async truncatePromise(){throw zt()}truncateSync(){throw zt()}async ftruncatePromise(e,r){throw zt()}ftruncateSync(e,r){throw zt()}watch(){throw zt()}watchFile(){throw zt()}unwatchFile(){throw zt()}},LI=qR;LI.instance=new qR});var qp,V7=dt(()=>{mf();Ca();qp=class extends vs{constructor(r){super(ue);this.baseFs=r}mapFromBase(r){return ue.fromPortablePath(r)}mapToBase(r){return ue.toPortablePath(r)}}});var Z_e,jR,$_e,pi,J7=dt(()=>{Ug();mf();Ca();Z_e=/^[0-9]+$/,jR=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,$_e=/^([^/]+-)?[a-f0-9]+$/,pi=class extends vs{constructor({baseFs:r=new xn}={}){super(J);this.baseFs=r}static makeVirtualPath(r,o,a){if(J.basename(r)!=="__virtual__")throw new Error('Assertion failed: Virtual folders must be named "__virtual__"');if(!J.basename(o).match($_e))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");let u=J.relative(J.dirname(r),a).split("/"),A=0;for(;A<u.length&&u[A]==="..";)A+=1;let p=u.slice(A);return J.join(r,o,String(A),...p)}static resolveVirtual(r){let o=r.match(jR);if(!o||!o[3]&&o[5])return r;let a=J.dirname(o[1]);if(!o[3]||!o[4])return a;if(!Z_e.test(o[4]))return r;let u=Number(o[4]),A="../".repeat(u),p=o[5]||".";return pi.resolveVirtual(J.join(a,A,p))}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}realpathSync(r){let o=r.match(jR);if(!o)return this.baseFs.realpathSync(r);if(!o[5])return r;let a=this.baseFs.realpathSync(this.mapToBase(r));return pi.makeVirtualPath(o[1],o[3],a)}async realpathPromise(r){let o=r.match(jR);if(!o)return await this.baseFs.realpathPromise(r);if(!o[5])return r;let a=await this.baseFs.realpathPromise(this.mapToBase(r));return pi.makeVirtualPath(o[1],o[3],a)}mapToBase(r){if(r==="")return r;if(this.pathUtils.isAbsolute(r))return pi.resolveVirtual(r);let o=pi.resolveVirtual(this.baseFs.resolve(wt.dot)),a=pi.resolveVirtual(this.baseFs.resolve(r));return J.relative(o,a)||wt.dot}mapFromBase(r){return r}}});var yD,z7,mD,X7=dt(()=>{yD=Ie("url"),z7=Ie("util");mf();Ca();mD=class extends vs{constructor(r){super(ue);this.baseFs=r}mapFromBase(r){return r}mapToBase(r){if(typeof r=="string")return r;if(r instanceof yD.URL)return(0,yD.fileURLToPath)(r);if(Buffer.isBuffer(r)){let o=r.toString();if(Buffer.byteLength(o)!==r.byteLength)throw new Error("Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942");return o}throw new Error(`Unsupported path type: ${(0,z7.inspect)(r)}`)}}});var Z7,Io,yf,jp,ED,CD,ay,Mc,Uc,e8e,t8e,r8e,n8e,OI,$7=dt(()=>{Z7=Ie("readline"),Io=Symbol("kBaseFs"),yf=Symbol("kFd"),jp=Symbol("kClosePromise"),ED=Symbol("kCloseResolve"),CD=Symbol("kCloseReject"),ay=Symbol("kRefs"),Mc=Symbol("kRef"),Uc=Symbol("kUnref"),OI=class{constructor(e,r){this[e8e]=1;this[t8e]=void 0;this[r8e]=void 0;this[n8e]=void 0;this[Io]=r,this[yf]=e}get fd(){return this[yf]}async appendFile(e,r){try{this[Mc](this.appendFile);let o=(typeof r=="string"?r:r==null?void 0:r.encoding)??void 0;return await this[Io].appendFilePromise(this.fd,e,o?{encoding:o}:void 0)}finally{this[Uc]()}}async chown(e,r){try{return this[Mc](this.chown),await this[Io].fchownPromise(this.fd,e,r)}finally{this[Uc]()}}async chmod(e){try{return this[Mc](this.chmod),await this[Io].fchmodPromise(this.fd,e)}finally{this[Uc]()}}createReadStream(e){return this[Io].createReadStream(null,{...e,fd:this.fd})}createWriteStream(e){return this[Io].createWriteStream(null,{...e,fd:this.fd})}datasync(){throw new Error("Method not implemented.")}sync(){throw new Error("Method not implemented.")}async read(e,r,o,a){try{this[Mc](this.read);let n;return Buffer.isBuffer(e)?n=e:(e??(e={}),n=e.buffer??Buffer.alloc(16384),r=e.offset||0,o=e.length??n.byteLength,a=e.position??null),r??(r=0),o??(o=0),o===0?{bytesRead:o,buffer:n}:{bytesRead:await this[Io].readPromise(this.fd,n,r,o,a),buffer:n}}finally{this[Uc]()}}async readFile(e){try{this[Mc](this.readFile);let r=(typeof e=="string"?e:e==null?void 0:e.encoding)??void 0;return await this[Io].readFilePromise(this.fd,r)}finally{this[Uc]()}}readLines(e){return(0,Z7.createInterface)({input:this.createReadStream(e),crlfDelay:1/0})}async stat(e){try{return this[Mc](this.stat),await this[Io].fstatPromise(this.fd,e)}finally{this[Uc]()}}async truncate(e){try{return this[Mc](this.truncate),await this[Io].ftruncatePromise(this.fd,e)}finally{this[Uc]()}}utimes(e,r){throw new Error("Method not implemented.")}async writeFile(e,r){try{this[Mc](this.writeFile);let o=(typeof r=="string"?r:r==null?void 0:r.encoding)??void 0;await this[Io].writeFilePromise(this.fd,e,o)}finally{this[Uc]()}}async write(...e){try{if(this[Mc](this.write),ArrayBuffer.isView(e[0])){let[r,o,a,n]=e;return{bytesWritten:await this[Io].writePromise(this.fd,r,o??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,o,a]=e;return{bytesWritten:await this[Io].writePromise(this.fd,r,o,a),buffer:r}}}finally{this[Uc]()}}async writev(e,r){try{this[Mc](this.writev);let o=0;if(typeof r<"u")for(let a of e){let n=await this.write(a,void 0,void 0,r);o+=n.bytesWritten,r+=n.bytesWritten}else for(let a of e){let n=await this.write(a);o+=n.bytesWritten}return{buffers:e,bytesWritten:o}}finally{this[Uc]()}}readv(e,r){throw new Error("Method not implemented.")}close(){if(this[yf]===-1)return Promise.resolve();if(this[jp])return this[jp];if(this[ay]--,this[ay]===0){let e=this[yf];this[yf]=-1,this[jp]=this[Io].closePromise(e).finally(()=>{this[jp]=void 0})}else this[jp]=new Promise((e,r)=>{this[ED]=e,this[CD]=r}).finally(()=>{this[jp]=void 0,this[CD]=void 0,this[ED]=void 0});return this[jp]}[(Io,yf,e8e=ay,t8e=jp,r8e=ED,n8e=CD,Mc)](e){if(this[yf]===-1){let r=new Error("file closed");throw r.code="EBADF",r.syscall=e.name,r}this[ay]++}[Uc](){if(this[ay]--,this[ay]===0){let e=this[yf];this[yf]=-1,this[Io].closePromise(e).then(this[ED],this[CD])}}}});function MI(t,e){e=new mD(e);let r=(o,a,n)=>{let u=o[a];o[a]=n,typeof(u==null?void 0:u[ly.promisify.custom])<"u"&&(n[ly.promisify.custom]=u[ly.promisify.custom])};{r(t,"exists",(o,...a)=>{let u=typeof a[a.length-1]=="function"?a.pop():()=>{};process.nextTick(()=>{e.existsPromise(o).then(A=>{u(A)},()=>{u(!1)})})}),r(t,"read",(...o)=>{let[a,n,u,A,p,h]=o;if(o.length<=3){let C={};o.length<3?h=o[1]:(C=o[1],h=o[2]),{buffer:n=Buffer.alloc(16384),offset:u=0,length:A=n.byteLength,position:p}=C}if(u==null&&(u=0),A|=0,A===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{e.readPromise(a,n,u,A,p).then(C=>{h(null,C,n)},C=>{h(C,0,n)})})});for(let o of eW){let a=o.replace(/Promise$/,"");if(typeof t[a]>"u")continue;let n=e[o];if(typeof n>"u")continue;r(t,a,(...A)=>{let h=typeof A[A.length-1]=="function"?A.pop():()=>{};process.nextTick(()=>{n.apply(e,A).then(C=>{h(null,C)},C=>{h(C)})})})}t.realpath.native=t.realpath}{r(t,"existsSync",o=>{try{return e.existsSync(o)}catch{return!1}}),r(t,"readSync",(...o)=>{let[a,n,u,A,p]=o;return o.length<=3&&({offset:u=0,length:A=n.byteLength,position:p}=o[2]||{}),u==null&&(u=0),A|=0,A===0?0:(p==null&&(p=-1),e.readSync(a,n,u,A,p))});for(let o of i8e){let a=o;if(typeof t[a]>"u")continue;let n=e[o];typeof n>"u"||r(t,a,n.bind(e))}t.realpathSync.native=t.realpathSync}{let o=t.promises;for(let a of eW){let n=a.replace(/Promise$/,"");if(typeof o[n]>"u")continue;let u=e[a];typeof u>"u"||a!=="open"&&r(o,n,(A,...p)=>A instanceof OI?A[n].apply(A,p):u.call(e,A,...p))}r(o,"open",async(...a)=>{let n=await e.openPromise(...a);return new OI(n,e)})}t.read[ly.promisify.custom]=async(o,a,...n)=>({bytesRead:await e.readPromise(o,a,...n),buffer:a}),t.write[ly.promisify.custom]=async(o,a,...n)=>({bytesWritten:await e.writePromise(o,a,...n),buffer:a})}function ID(t,e){let r=Object.create(t);return MI(r,e),r}var ly,i8e,eW,tW=dt(()=>{ly=Ie("util");X7();$7();i8e=new Set(["accessSync","appendFileSync","createReadStream","createWriteStream","chmodSync","fchmodSync","chownSync","fchownSync","closeSync","copyFileSync","linkSync","lstatSync","fstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","ftruncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),eW=new Set(["accessPromise","appendFilePromise","fchmodPromise","chmodPromise","fchownPromise","chownPromise","closePromise","copyFilePromise","linkPromise","fstatPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","ftruncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"])});function rW(t){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,"0");return`${t}${e}`}function nW(){if(GR)return GR;let t=ue.toPortablePath(iW.default.tmpdir()),e=oe.realpathSync(t);return process.once("exit",()=>{oe.rmtempSync()}),GR={tmpdir:t,realTmpdir:e}}var iW,_c,GR,oe,sW=dt(()=>{iW=tt(Ie("os"));Ug();Ca();_c=new Set,GR=null;oe=Object.assign(new xn,{detachTemp(t){_c.delete(t)},mktempSync(t){let{tmpdir:e,realTmpdir:r}=nW();for(;;){let o=rW("xfs-");try{this.mkdirSync(J.join(e,o))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=J.join(r,o);if(_c.add(a),typeof t>"u")return a;try{return t(a)}finally{if(_c.has(a)){_c.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(t){let{tmpdir:e,realTmpdir:r}=nW();for(;;){let o=rW("xfs-");try{await this.mkdirPromise(J.join(e,o))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=J.join(r,o);if(_c.add(a),typeof t>"u")return a;try{return await t(a)}finally{if(_c.has(a)){_c.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(_c.values()).map(async t=>{try{await oe.removePromise(t,{maxRetries:0}),_c.delete(t)}catch{}}))},rmtempSync(){for(let t of _c)try{oe.removeSync(t),_c.delete(t)}catch{}}})});var UI={};Yt(UI,{AliasFS:()=>ju,BasePortableFakeFS:()=>qu,CustomDir:()=>NI,CwdFS:()=>An,FakeFS:()=>df,Filename:()=>Lr,JailFS:()=>Gu,LazyFS:()=>oy,MountFS:()=>Hp,NoFS:()=>LI,NodeFS:()=>xn,PortablePath:()=>wt,PosixFS:()=>qp,ProxiedFS:()=>vs,VirtualFS:()=>pi,constants:()=>Ii,errors:()=>sr,extendFs:()=>ID,normalizeLineEndings:()=>Og,npath:()=>ue,opendir:()=>gD,patchFs:()=>MI,ppath:()=>J,setupCopyIndex:()=>hD,statUtils:()=>Ul,toFilename:()=>Li,unwatchAllFiles:()=>Lg,unwatchFile:()=>Ng,watchFile:()=>sy,xfs:()=>oe});var St=dt(()=>{x7();AD();OR();_R();T7();HR();Mg();Ca();Ca();_7();Mg();q7();G7();W7();Y7();K7();Ug();V7();mf();J7();tW();sW()});var uW=U((hPt,cW)=>{cW.exports=lW;lW.sync=o8e;var oW=Ie("fs");function s8e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var o=0;o<r.length;o++){var a=r[o].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a)return!0}return!1}function aW(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:s8e(e,r)}function lW(t,e,r){oW.stat(t,function(o,a){r(o,o?!1:aW(a,t,e))})}function o8e(t,e){return aW(oW.statSync(t),t,e)}});var gW=U((gPt,hW)=>{hW.exports=fW;fW.sync=a8e;var AW=Ie("fs");function fW(t,e,r){AW.stat(t,function(o,a){r(o,o?!1:pW(a,e))})}function a8e(t,e){return pW(AW.statSync(t),e)}function pW(t,e){return t.isFile()&&l8e(t,e)}function l8e(t,e){var r=t.mode,o=t.uid,a=t.gid,n=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),u=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),A=parseInt("100",8),p=parseInt("010",8),h=parseInt("001",8),C=A|p,w=r&h||r&p&&a===u||r&A&&o===n||r&C&&n===0;return w}});var mW=U((mPt,dW)=>{var dPt=Ie("fs"),wD;process.platform==="win32"||global.TESTING_WINDOWS?wD=uW():wD=gW();dW.exports=WR;WR.sync=c8e;function WR(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,a){WR(t,e||{},function(n,u){n?a(n):o(u)})})}wD(t,e||{},function(o,a){o&&(o.code==="EACCES"||e&&e.ignoreErrors)&&(o=null,a=!1),r(o,a)})}function c8e(t,e){try{return wD.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var vW=U((yPt,BW)=>{var cy=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",yW=Ie("path"),u8e=cy?";":":",EW=mW(),CW=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),IW=(t,e)=>{let r=e.colon||u8e,o=t.match(/\//)||cy&&t.match(/\\/)?[""]:[...cy?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],a=cy?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",n=cy?a.split(r):[""];return cy&&t.indexOf(".")!==-1&&n[0]!==""&&n.unshift(""),{pathEnv:o,pathExt:n,pathExtExe:a}},wW=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:o,pathExt:a,pathExtExe:n}=IW(t,e),u=[],A=h=>new Promise((C,w)=>{if(h===o.length)return e.all&&u.length?C(u):w(CW(t));let v=o[h],b=/^".*"$/.test(v)?v.slice(1,-1):v,E=yW.join(b,t),R=!b&&/^\.[\\\/]/.test(t)?t.slice(0,2)+E:E;C(p(R,h,0))}),p=(h,C,w)=>new Promise((v,b)=>{if(w===a.length)return v(A(C+1));let E=a[w];EW(h+E,{pathExt:n},(R,L)=>{if(!R&&L)if(e.all)u.push(h+E);else return v(h+E);return v(p(h,C,w+1))})});return r?A(0).then(h=>r(null,h),r):A(0)},A8e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:o,pathExtExe:a}=IW(t,e),n=[];for(let u=0;u<r.length;u++){let A=r[u],p=/^".*"$/.test(A)?A.slice(1,-1):A,h=yW.join(p,t),C=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let w=0;w<o.length;w++){let v=C+o[w];try{if(EW.sync(v,{pathExt:a}))if(e.all)n.push(v);else return v}catch{}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw CW(t)};BW.exports=wW;wW.sync=A8e});var SW=U((EPt,YR)=>{"use strict";var DW=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};YR.exports=DW;YR.exports.default=DW});var QW=U((CPt,bW)=>{"use strict";var PW=Ie("path"),f8e=vW(),p8e=SW();function xW(t,e){let r=t.options.env||process.env,o=process.cwd(),a=t.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(t.options.cwd)}catch{}let u;try{u=f8e.sync(t.command,{path:r[p8e({env:r})],pathExt:e?PW.delimiter:void 0})}catch{}finally{n&&process.chdir(o)}return u&&(u=PW.resolve(a?t.options.cwd:"",u)),u}function h8e(t){return xW(t)||xW(t,!0)}bW.exports=h8e});var kW=U((IPt,VR)=>{"use strict";var KR=/([()\][%!^"`<>&|;, *?])/g;function g8e(t){return t=t.replace(KR,"^$1"),t}function d8e(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(KR,"^$1"),e&&(t=t.replace(KR,"^$1")),t}VR.exports.command=g8e;VR.exports.argument=d8e});var RW=U((wPt,FW)=>{"use strict";FW.exports=/^#!(.*)/});var NW=U((BPt,TW)=>{"use strict";var m8e=RW();TW.exports=(t="")=>{let e=t.match(m8e);if(!e)return null;let[r,o]=e[0].replace(/#! ?/,"").split(" "),a=r.split("/").pop();return a==="env"?o:o?`${a} ${o}`:a}});var OW=U((vPt,LW)=>{"use strict";var JR=Ie("fs"),y8e=NW();function E8e(t){let r=Buffer.alloc(150),o;try{o=JR.openSync(t,"r"),JR.readSync(o,r,0,150,0),JR.closeSync(o)}catch{}return y8e(r.toString())}LW.exports=E8e});var HW=U((DPt,_W)=>{"use strict";var C8e=Ie("path"),MW=QW(),UW=kW(),I8e=OW(),w8e=process.platform==="win32",B8e=/\.(?:com|exe)$/i,v8e=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function D8e(t){t.file=MW(t);let e=t.file&&I8e(t.file);return e?(t.args.unshift(t.file),t.command=e,MW(t)):t.file}function S8e(t){if(!w8e)return t;let e=D8e(t),r=!B8e.test(e);if(t.options.forceShell||r){let o=v8e.test(e);t.command=C8e.normalize(t.command),t.command=UW.command(t.command),t.args=t.args.map(n=>UW.argument(n,o));let a=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${a}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function P8e(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let o={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?o:S8e(o)}_W.exports=P8e});var GW=U((SPt,jW)=>{"use strict";var zR=process.platform==="win32";function XR(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function x8e(t,e){if(!zR)return;let r=t.emit;t.emit=function(o,a){if(o==="exit"){let n=qW(a,e,"spawn");if(n)return r.call(t,"error",n)}return r.apply(t,arguments)}}function qW(t,e){return zR&&t===1&&!e.file?XR(e.original,"spawn"):null}function b8e(t,e){return zR&&t===1&&!e.file?XR(e.original,"spawnSync"):null}jW.exports={hookChildProcess:x8e,verifyENOENT:qW,verifyENOENTSync:b8e,notFoundError:XR}});var eT=U((PPt,uy)=>{"use strict";var WW=Ie("child_process"),ZR=HW(),$R=GW();function YW(t,e,r){let o=ZR(t,e,r),a=WW.spawn(o.command,o.args,o.options);return $R.hookChildProcess(a,o),a}function Q8e(t,e,r){let o=ZR(t,e,r),a=WW.spawnSync(o.command,o.args,o.options);return a.error=a.error||$R.verifyENOENTSync(a.status,o),a}uy.exports=YW;uy.exports.spawn=YW;uy.exports.sync=Q8e;uy.exports._parse=ZR;uy.exports._enoent=$R});function VW(t){KW=t}function _I(){return typeof tT>"u"&&(tT=KW()),tT}var tT,KW,rT=dt(()=>{KW=()=>{throw new Error("Assertion failed: No libzip instance is available, and no factory was configured")}});var JW=U((BD,iT)=>{var k8e=Object.assign({},Ie("fs")),nT=function(){var t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(t=t||__filename),function(e){e=e||{};var r=typeof e<"u"?e:{},o,a;r.ready=new Promise(function(Be,xe){o=Be,a=xe});var n={},u;for(u in r)r.hasOwnProperty(u)&&(n[u]=r[u]);var A=[],p="./this.program",h=function(Be,xe){throw xe},C=!1,w=!0,v="";function b(Be){return r.locateFile?r.locateFile(Be,v):v+Be}var E,R,L,_;w&&(C?v=Ie("path").dirname(v)+"/":v=__dirname+"/",E=function(xe,Ve){var vt=$n(xe);return vt?Ve?vt:vt.toString():(L||(L=k8e),_||(_=Ie("path")),xe=_.normalize(xe),L.readFileSync(xe,Ve?null:"utf8"))},R=function(xe){var Ve=E(xe,!0);return Ve.buffer||(Ve=new Uint8Array(Ve)),ve(Ve.buffer),Ve},process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),A=process.argv.slice(2),h=function(Be){process.exit(Be)},r.inspect=function(){return"[Emscripten Module object]"});var V=r.print||console.log.bind(console),re=r.printErr||console.warn.bind(console);for(u in n)n.hasOwnProperty(u)&&(r[u]=n[u]);n=null,r.arguments&&(A=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var ae=0,he=function(Be){ae=Be},pe;r.wasmBinary&&(pe=r.wasmBinary);var De=r.noExitRuntime||!0;typeof WebAssembly!="object"&&ki("no native wasm support detected");function ge(Be,xe,Ve){switch(xe=xe||"i8",xe.charAt(xe.length-1)==="*"&&(xe="i32"),xe){case"i1":return _e[Be>>0];case"i8":return _e[Be>>0];case"i16":return up((Be>>1)*2);case"i32":return ks((Be>>2)*4);case"i64":return ks((Be>>2)*4);case"float":return gu((Be>>2)*4);case"double":return cp((Be>>3)*8);default:ki("invalid type for getValue: "+xe)}return null}var le,Pe=!1,g;function ve(Be,xe){Be||ki("Assertion failed: "+xe)}function Ee(Be){var xe=r["_"+Be];return ve(xe,"Cannot call unknown function "+Be+", make sure it is exported"),xe}function de(Be,xe,Ve,vt,tr){var Zr={string:function(yi){var ca=0;if(yi!=null&&yi!==0){var Ga=(yi.length<<2)+1;ca=ee(Ga),ut(yi,ca,Ga)}return ca},array:function(yi){var ca=ee(yi.length);return Me(yi,ca),ca}};function Tn(yi){return xe==="string"?me(yi):xe==="boolean"?Boolean(yi):yi}var _r=Ee(Be),ei=[],Ti=0;if(vt)for(var Kn=0;Kn<vt.length;Kn++){var ja=Zr[Ve[Kn]];ja?(Ti===0&&(Ti=qa()),ei[Kn]=ja(vt[Kn])):ei[Kn]=vt[Kn]}var la=_r.apply(null,ei);return la=Tn(la),Ti!==0&&aa(Ti),la}function ne(Be,xe,Ve,vt){Ve=Ve||[];var tr=Ve.every(function(Tn){return Tn==="number"}),Zr=xe!=="string";return Zr&&tr&&!vt?Ee(Be):function(){return de(Be,xe,Ve,arguments,vt)}}var Z=new TextDecoder("utf8");function me(Be,xe){if(!Be)return"";for(var Ve=Be+xe,vt=Be;!(vt>=Ve)&&qe[vt];)++vt;return Z.decode(qe.subarray(Be,vt))}function be(Be,xe,Ve,vt){if(!(vt>0))return 0;for(var tr=Ve,Zr=Ve+vt-1,Tn=0;Tn<Be.length;++Tn){var _r=Be.charCodeAt(Tn);if(_r>=55296&&_r<=57343){var ei=Be.charCodeAt(++Tn);_r=65536+((_r&1023)<<10)|ei&1023}if(_r<=127){if(Ve>=Zr)break;xe[Ve++]=_r}else if(_r<=2047){if(Ve+1>=Zr)break;xe[Ve++]=192|_r>>6,xe[Ve++]=128|_r&63}else if(_r<=65535){if(Ve+2>=Zr)break;xe[Ve++]=224|_r>>12,xe[Ve++]=128|_r>>6&63,xe[Ve++]=128|_r&63}else{if(Ve+3>=Zr)break;xe[Ve++]=240|_r>>18,xe[Ve++]=128|_r>>12&63,xe[Ve++]=128|_r>>6&63,xe[Ve++]=128|_r&63}}return xe[Ve]=0,Ve-tr}function ut(Be,xe,Ve){return be(Be,qe,xe,Ve)}function H(Be){for(var xe=0,Ve=0;Ve<Be.length;++Ve){var vt=Be.charCodeAt(Ve);vt>=55296&&vt<=57343&&(vt=65536+((vt&1023)<<10)|Be.charCodeAt(++Ve)&1023),vt<=127?++xe:vt<=2047?xe+=2:vt<=65535?xe+=3:xe+=4}return xe}function yt(Be){var xe=H(Be)+1,Ve=vl(xe);return Ve&&be(Be,_e,Ve,xe),Ve}function Me(Be,xe){_e.set(Be,xe)}function Te(Be,xe){return Be%xe>0&&(Be+=xe-Be%xe),Be}var Qe,_e,qe,At,Oe,x,I,P,y,F;function z(Be){Qe=Be,r.HEAP_DATA_VIEW=F=new DataView(Be),r.HEAP8=_e=new Int8Array(Be),r.HEAP16=At=new Int16Array(Be),r.HEAP32=x=new Int32Array(Be),r.HEAPU8=qe=new Uint8Array(Be),r.HEAPU16=Oe=new Uint16Array(Be),r.HEAPU32=I=new Uint32Array(Be),r.HEAPF32=P=new Float32Array(Be),r.HEAPF64=y=new Float64Array(Be)}var X=r.INITIAL_MEMORY||16777216,$,ie=[],ke=[],Ne=[],st=!1;function ht(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)xt(r.preRun.shift());no(ie)}function Ut(){st=!0,no(ke)}function Xt(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Dr(r.postRun.shift());no(Ne)}function xt(Be){ie.unshift(Be)}function tn(Be){ke.unshift(Be)}function Dr(Be){Ne.unshift(Be)}var fr=0,Br=null,jr=null;function Hn(Be){fr++,r.monitorRunDependencies&&r.monitorRunDependencies(fr)}function bs(Be){if(fr--,r.monitorRunDependencies&&r.monitorRunDependencies(fr),fr==0&&(Br!==null&&(clearInterval(Br),Br=null),jr)){var xe=jr;jr=null,xe()}}r.preloadedImages={},r.preloadedAudios={};function ki(Be){r.onAbort&&r.onAbort(Be),Be+="",re(Be),Pe=!0,g=1,Be="abort("+Be+"). Build with -s ASSERTIONS=1 for more info.";var xe=new WebAssembly.RuntimeError(Be);throw a(xe),xe}var gs="data:application/octet-stream;base64,";function to(Be){return Be.startsWith(gs)}var Di="data:application/octet-stream;base64,AGFz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gtB5J8BQeSfASgCAEEEcjYCAAsgAkH+////B0sNASACECghAUEAECghACABQX9GDQEgAEF/Rg0BIAAgAU0NASAAIAFrIgUgCEEoak0NAQtB2J8BQdifASgCACAFaiIANgIAQdyfASgCACAASQRAQdyfASAANgIACwJAAkACQEHAnAEoAgAiBwRAQeifASEAA0AgASAAKAIAIgMgACgCBCICakYNAiAAKAIIIgANAAsMAgtBuJwBKAIAIgBBACAAIAFNG0UEQEG4nAEgATYCAAtBACEAQeyfASAFNgIAQeifASABNgIAQcicAUF/NgIAQcycAUGAoAEoAgA2AgBB9J8BQQA2AgADQCAAQQN0IgNB2JwBaiADQdCcAWoiAjYCACADQdycAWogAjYCACAAQQFqIgBBIEcNAAtBtJwBIAVBKGsiA0F4IAFrQQdxQQAgAUEIakEHcRsiAGsiAjYCAEHAnAEgACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRBxJwBQZCgASgCADYCAAwCCyAALQAMQQhxDQAgAyAHSw0AIAEgB00NACAAIAIgBWo2AgRBwJwBIAdBeCAHa0EHcUEAIAdBCGpBB3EbIgBqIgI2AgBBtJwBQbScASgCACAFaiIBIABrIgA2AgAgAiAAQQFyNgIEIAEgB2pBKDYCBEHEnAFBkKABKAIANgIADAELQbicASgCACABSwRAQbicASABNgIACyABIAVqIQJB6J8BIQACQAJAAkACQAJAAkADQCACIAAoAgBHBEAgACgCCCIADQEMAgsLIAAtAAxBCHFFDQELQeifASEAA0AgByAAKAIAIgJPBEAgAiAAKAIEaiIEIAdLDQMLIAAoAgghAAwACwALIAAgATYCACAAIAAoAgQgBWo2AgQgAUF4IAFrQQdxQQAgAUEIakEHcRtqIgkgCEEDcjYCBCACQXggAmtBB3FBACACQQhqQQdxG2oiBSAIIAlqIgZrIQIgBSAHRgRAQcCcASAGNgIAQbScAUG0nAEoAgAgAmoiADYCACAGIABBAXI2AgQMAwsgBUG8nAEoAgBGBEBBvJwBIAY2AgBBsJwBQbCcASgCACACaiIANgIAIAYgAEEBcjYCB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AgACABOgAAIAJBA0kNACADQQJrIAE6AAAgACABOgABIANBA2sgAToAACAAIAE6AAIgAkEHSQ0AIANBBGsgAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgA2AgAgAyACIARrQXxxIgJqIgFBBGsgADYCACACQQlJDQAgAyAANgIIIAMgADYCBCABQQhrIAA2AgAgAUEMayAANgIAIAJBGUkNACADIAA2AhggAyAANgIUIAMgADYCECADIAA2AgwgAUEQayAANgIAIAFBFGsgADYCACABQRhrIAA2AgAgAUEcayAANgIAIAIgA0EEcUEYciIBayICQSBJDQAgAK1CgYCAgBB+IQUgASADaiEBA0AgASAFNwMYIAEgBTcDECABIAU3AwggASAFNwMAIAFBIGohASACQSBrIgJBH0sNAAsLC28BA38gAEEMaiECAkACfyAAKAIgIgFFBEBBfyEBQRIMAQsgACABQQFrIgM2AiBBACEBIAMNASAAQQBCAEECEA4aIAAoAgAiAEUNASAAEBtBf0oNAUEUCyEAIAIEQCACQQA2AgQgAiAANgIACwsgAQufAQIBfwF+An8CQAJ+IAAoAgAiAygCJEEBRkEAIAJCf1UbRQRAIANBDGoiAQRAIAFBADYCBCABQRI2AgALQn8MAQsgAyABIAJBCxAOCyIEQn9XBEAgACgCACEBIABBCGoiAARAIAAgASgCDDYCACAAIAEoAhA2AgQLDAELQQAgAiAEUQ0BGiAAQQhqBEAgAEEbNgIMIABBBjYCCAsLQX8LCyQBAX8gAARAA0AgACgCACEBIAAoAgwQBiAAEAYgASIADQALCwuYAQICfgF/AkACQCAALQAARQ0AIAApAxAiAUJ3Vg0AIAFCCHwiAiAAKQMIWA0BCyAAQQA6AABCAA8LIAAoAgQiA0UEQEIADwsgACACNwMQIAMgAadqIgAxAAZCMIYgADEAB0I4hoQgADEABUIohoQgADEABEIghoQgADEAA0IYhoQgADEAAkIQhoQgADEAAUIIhoQgADEAAHwLMgAgACgCJEEBRwRAIABBDGoiAARAIABBADYCBCAAQRI2AgALQn8PCyAAQQ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ADRQ0BC0H0mAEgADYCACABDwtB+JsBQTA2AgBBfwuGBQEGfyAAKAIwIgNBhgJrIQYgACgCPCECIAMhAQNAIAAoAkQgAiAAKAJkIgRqayECIAEgBmogBE0EQCAAKAJIIgEgASADaiADEAkaAkAgAyAAKAJoIgFNBEAgACABIANrNgJoDAELIABCADcDaAsgACAAKAJkIANrIgE2AmQgACAAKAJUIANrNgJUIAEgACgCqC1JBEAgACABNgKoLQsgAEHQmAEoAgARBAAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJkaiAFaiEFIAEgBCACazYCBAJAIAEoAhwoAhRBAkYEQCABIAUgAhBADAELIAUgASgCACACEAkhBCABKAIcKAIUQQFHDQAgASABKAIwIAQgAkHImAEoAgARAAA2AjALIAEgASgCACACajYCACABIAEoAgggAmo2AgggACgCPAUgBQsgAmoiAjYCPAJAIAAoAqgtIgEgAmpBA0kNACAAKAJkIAFrIgEEQCAAIAFBAWtBxJgBKAIAEQEAGiAAKAI8IQILIAAoAqgtIAJBAUZrIgRFDQAgACABIARBwJgBKAIAEQcAIAAgACgCqC0gBGs2AqgtIAAoAjwhAgsgAkGFAksNACAAKAIAKAIERQ0AIAAoAjAhAQwBCwsCQCAAKAJEIgIgACgCQCIDTQ0AIAACfyAAKAI8IAAoAmRqIgEgA0sEQCAAKAJIIAFqQQAgAiABayIDQYICIANBggJJGyIDEBogASADagwBCyABQYICaiIBIANNDQEgACgCSCADakEAIAIgA2siAiABIANrIgMgAiADSRsiAxAaIAAoAkAgA2oLNgJACws3ACAAQn83AxAgAEEANgIIIABCADcDACAAQQA2AjAgAEL/////DzcDKCAAQgA3AxggAEIANwMgC6UBAQF/QdgAEAgiAUUEQEEADwsCQCAABEAgASAAQdgAEAkaDAELIAFCADcDICABQQA2AhggAUL/////DzcDECABQQA7AQwgAUG/hig2AgggAUEBOgAGIAFBADoABCABQgA3A0ggAUGAgNiNeDYCRCABQgA3AyggA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9RBEAgBEEIahA2Qn8MAwsCQAJAIAEoAgAgBWooAgAiAy8BCiAELwESSQ0AIAMoAhAgBCgCGEcNACADKAIUIAQoAhxHDQAgAygCMCAEKAI4EGVFDQACQCAEKAIgIgYgAygCGEcEQCAEKQMoIQgMAQsgAykDICILIAQpAygiCFINACALIQggAykDKCAEKQMwUQ0CCyAELQAUQQhxRQ0AIAYNACAIQgBSDQAgBCkDMFANAQsgAgRAIAJBADYCBCACQRU2AgALIARBCGoQNkJ/DAMLIAEoAgAgBWooAgAoAjQgBCgCPBBzIQMgASgCACAFaigCACIFQQE6AAQgBSADNgI0IARBADYCPCAEQQhqEDYgCkIBfCIKIAEpAwhUDQALCyAHIAl9IgdC////////////ACAHQv///////////wBUGwshByAEQeAAaiQAIAcLxgEBAn9B2AAQCCIBRQRAIAAEQCAAQQA2AgQgAEEONgIAC0EADwsgAQJ/QRgQCCICRQRAIAAEQCAAQQA2AgQgAEEONgIAC0EADAELIAJBADYCECACQgA3AwggAkEANgIAIAILIgA2AlAgAEUEQCABEAZBAA8LIAFCADcDACABQQA2AhAgAUIANwIIIAFCADcCFCABQQA2AlQgAUIANwIcIAFCADcAISABQgA3AzAgAUIANwM4IAFBQGtCADcDACABQgA3A0ggAQuAEwIPfwJ+IwBB0ABrIgUkACAFIAE2AkwgBUE3aiETIAVBOGohEEEAIQEDQAJAIA5BAEgNAEH/////ByAOayABSARAQfibAUE9NgIAQX8hDgwBCyABIA5qIQ4LIAUoAkwiByEBAkACQAJAAkACQAJAAkACQCAFAn8CQCAHLQAAIgYEQANAAkACQCAGQf8BcSIGRQRAIAEhBgwBCyAGQSVHDQEgASEGA0AgAS0AAUElRw0BIAUgAUECaiIINgJMIAZBAWohBiABLQACIQwgCCEBIAxBJUYNAAsLIAYgB2shASAABEAgACAHIAEQLgsgAQ0NIAUoAkwhASAFKAJMLAABQTBrQQpPDQMgAS0AAkEkRw0DIAEsAAFBMGshD0EBIREgAUEDagwECyAFIAFBAWoiCDYCTCABLQABI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BEAgACAELQAAOgAAIABBAWohAAsgAiABayICIAFLDQALIAJFDQULAkAgByAAa0EBaiIBIAIgASACSRsiAkEISQ0AIAJBCGsiBEEDdkEBakEHcSIBBEADQCAAIAMpAAA3AAAgAkEIayECIANBCGohAyAAQQhqIQAgAUEBayIBDQALCyAEQThJDQADQCAAIAMpAAA3AAAgACADKQAINwAIIAAgAykAEDcAECAAIAMpABg3ABggACADKQAgNwAgIAAgAykAKDcAKCAAIAMpADA3ADAgACADKQA4NwA4IANBQGshAyAAQUBrIQAgAkFAaiICQQdLDQALCyACQQRPBEAgACADKAAANgAAIAJBBGshAiADQQRqIQMgAEEEaiEACyACQQJPBEAgACADLwAAOwAAIAJBAmshAiADQQJqIQMgAEECaiEACyACQQFHDQQgACADLQAAOgAAIABBAWoPCyAAIAMpAAA3AAAgACACQQFrIgFBB3FBAWoiAmohACABQQhJDQMgAiADaiEDIAFBA3YiAkEBayEEIAJBB3EiAQRAA0AgACADKQAANwAAIAJBAWshAiADQQhqIQMgAEEIaiEAIAFBAWsiAQ0ACwsgBEEHSQ0DA0AgACADKQAANwAAIAAgAykACDcACCAAIAMpABA3ABAgACADKQAYNwAYIAAgAykAIDcAICAAIAMpACg3ACggACADKQAwNwAwIAAgAykAODcAOCADQUBrIQMgAEFAayEAIAJBCGsiAg0ACwwDCyADLQAAQYGChAhsCyIBIQQLIAJBB3EhBgJAIAJBeHEiAkUNACABrSAErUIghoQhCCACQQhrIgRBA3ZBAWpBB3EiAQRAA0AgACAINwAAIAJBCGshAiAAQQhqIQAgAUEBayIBDQALCyAEQThJDQADQCAAIAg3ADggACAINwAwIAAgCDcAKCAAIAg3ACAgACAINwAYIAAgCDcAECAAIAg3AAggACAINwAAIABBQGshACACQUBqIgINAAsLIAZFDQAgACADIAYQCSAGaiEACyAADwsgACADLQABOgABIAJBAkYEQCAAQQJqDwsgACADLQACOgACIAJBA0YEQCAAQQNqDwsgACADLQADOgADIAJBBEYEQCAAQQRqDwsgACADLQAEOgAEIAJBBUYEQCAAQQVqDwsgACADLQAFOgAFIAJBBkYEQCAAQQZqDwsgACADLQAGOgAGIABBB2oLAwABC2wBA38CQCABKAIAIgNBB0sNACADIAIoAgBPDQAgACADayEEA0AgACAEKQAANwAAIAIgAigCACABKAIAIgVrNgIAIAEgASgCAEEBdCIDNgIAIAAgBWohACADQQdLDQEgAyACKAIASQ0ACwsgAAu8AgEBfwJAIAMgAGtBAWoiAyACIAIgA0sbIgJBCEkNACACQQhrIgRBA3ZBAWpBB3EiAwRAA0AgACABKQAANwAAIAJBCGshAiABQQhqIQEgAEEIaiEAIANBAWsiAw0ACwsgBEE4SQ0AA0AgACABKQAANwAAIAAgASkACDcACCAAIAEpABA3ABAgACABKQAYNwAYIAAgASkAIDcAICAAIAEpACg3ACggACABKQAwNwAwIAAgASkAODcAOCABQUBrIQEgAEFAayEAIAJBQGoiAkEHSw0ACwsgAkEETwRAIAAgASgAADYAACACQQRrIQIgAUEEaiEBIABBBGohAAsgAkECTwRAIAAgAS8AADsAACACQQJrIQIgAUECaiEBIABBAmohAAsgAkEBRgR/IAAgAS0AADoAACAAQQFqBSAACwvnAQECfyAAIAEpAAA3AAAgACACQQFrIgJBB3FBAWoiA2ohAAJAIAJBCEkNACABIANqIQEgAkEDdiICQQFrIQQgAkEHcSIDBEADQCAAIAEpAAA3AAAgAkEBayECIAFBCGohASAAQQhqIQAgA0EBayIDDQALCyAEQQdJDQADQCAAIAEpAAA3AAAgACABKQAINwAIIAAgASkAEDcAECAAIAEpABg3ABggACABKQAgNwAgIAAgASkAKDcAKCAAIAEpADA3ADAgACABKQA4NwA4IAFBQGshASAAQUBrIQAgAkEIayICDQALCyAAC/wFAQR/IABB//8DcSEDIABBEHYhBEEBIQAgAkEBRgRAIAMgAS0AAGoiAEHx/wNrIAAgAEHw/wNLGyIAIARqIgFBEHQiAkGAgDxqIAIgAUHw/wNLGyAAcg8LAkAgAQR/IAJBEEkNAQJAAkACQCACQa8rSwRAA0AgAkGwK2shAkG1BSEFI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AIAJFDQAgAkHBFCAFEDxFDQELQQAhAiAEBEAgBEEANgIEIARBFTYCAAsgARAHIABFDQEDQCAAKAIAIQEgACgCDBAGIAAQBiABIgANAAsMAQsgARAHIAMEQCADIAA2AgBBAQ8LQQEhAiAARQ0AA0AgACgCACEBIAAoAgwQBiAAEAYgASIADQALCyACC74BAQV/IAAEfyAAIQIDQCACIgQoAgAiAg0ACyABBEADQCABIgMvAQghBiADKAIAIQEgACECAkACQANAAkAgAi8BCCAGRw0AIAIvAQoiBSADLwEKRw0AIAVFDQIgAigCDCADKAIMIAUQPEUNAgsgAigCACICDQALIANBADYCACAEIAM2AgAgAyEEDAELIAIgAigCBCADKAIEQYAGcXI2AgQgA0EANgIAIAMoAgwQBiADEAYLIAENAAsLIAAFIAELC1UCAn4BfwJAAkAgAC0AAEUNACAAKQMQIgJCAXwiAyACVA0AIAMgACkDCFgNAQsgAEEAOgAADwsgACgCBCIERQRADwsgACADNwMQIAQgAqdqIAE6AAALWgICfgF/An8CQAJAIAAtAABFDQAgACkDECIBQgF8IgIgAVQNACACIAApAwhYDQELIABBADoAAEEADAELQQAgACgCBCIDRQ0AGiAAIAI3AxAgAyABp2otAAALC94BAQN/IAEgACkDMFoEQCAAQQhqBEAgAEEANgIMIABBEjYCCAtBfw8LIABBCGohAiAALQAYQQJxBEAgAgRAIAJBADYCBCACQRk2AgALQX8PC0F/IQMCQCAAIAFBACACEFQiBEUNACAAKAJQIAQgAhCBAUUNAAJ/IAEgACkDMFoEQCAAQQhqBEAgAEEANgIMIABBEjYCCAtBfwwBCyABp0EEdCICIAAoAkBqKAIEECAgACgCQCACaiICQQA2AgQgAhBBQQALDQAgACgCQCABp0EEdGpBAToADEEAIQMLIAMLpgIBBX9BfyEFAkAgACABQQBBABAmRQ0AIAAtABhBAnEEQCAAQQhqIgAEQCAAQQA2AgQgAEEZNgIAC0F/DwsCfyAAKAJAIgQgAaciBkEEdGooAgAiBUUEQCADQYCA2I14RyEHQQMMAQsgBSgCRCADRy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AAAgACAAKAIQIgFBAWo2AhAgASAAKAIEaiACQgiIPAAAIAAgACgCECIBQQFqNgIQIAEgACgCBGogAkIQiDwAACAAIAAoAhAiAUEBajYCECABIAAoAgRqIAJCGIg8AAAgACAAQbwtajUCADcDuC0gACAAKALALUEgayIBNgLALQsgAUEJTgRAIAAgACgCECIBQQFqNgIQIAEgACgCBGogACkDuC0iAjwAACAAIAAoAhAiAUEBajYCECABIAAoAgRqIAJCCIg8AAAgACAAKQO4LUIQiDcDuC0gACAAKALALUEQayIBNgLALQsgAUEBSA0AIAAgACgCECIBQQFqNgIQIAEgACgCBGogACkDuC08AAALIABBADYCwC0gAEIANwO4LQvwBAEDfyAAQYgBaiECA0AgAiABQQJ0IgNqQQA7AQAgAiADQQRyakEAOwEAIAFBAmoiAUGeAkcNAAsgAEEAOwHwFCAAQQA7AfwSIABBuBVqQQA7AQAgAEG0FWpBADsBACAAQbAVakEAOwEAIABBrBVqQQA7AQAgAEGoFWpBADsBACAAQaQVakEAOwEAIABBoBVqQQA7AQAgAEGcFWpBADsBACAAQZgVakEAOwEAIABBlBVqQQA7AQAgAEGQFWpBADsBACAAQYwVakEAOwEAIABBiBVqQQA7AQAgAEGEFWpBADsBACAAQYAVakEAOwEAIABB/BRqQQA7AQAgAEH4FGpBADsBACAAQfQUakEAOwEAIABB8BNqQQA7AQAgAEHsE2pBADsBACAAQegTakEAOwEAIABB5BNqQQA7AQAgAEHgE2pBADsBACAAQdwTakEAOwEAIABB2BNqQQA7AQAgAEHUE2pBADsBACAAQdATakEAOwEAIABBzBNqQQA7AQAgAEHIE2pBADsBACAAQcQTakEAOwEAIABBwBNqQQA7AQAgAEG8E2pBADsBACAAQbgTakEAOwEAIABBtBNqQQA7AQAgAEGwE2pBADsBACAAQawTakEAOwEAIABBqBNqQQA7AQAgAEGkE2pBADsBACAAQaATakEAOwEAIABBnBNqQQA7AQAgAEGYE2pBADsBACAAQZQTakEAOwEAIABBkBNqQQA7AQAgAEGME2pBADsBACAAQYgTakEAOwEAIABBhBNqQQA7AQAgAEGAE2pBADsBACAAQgA3A6AtIABBiAlqQQE7AQAgAEEANgKcLSAAQQA2ApQtC4oBAQR/IAAoAkggAWoiAyACIANqQQFrIgJNBEAgACgCUCEFA0AgAygAACEEIANBAWohAyAFIARBsfPd8XlsQQ92Qf7/B3FqIgQvAQAiBiABQf//A3FHBEAgACgCTCABIAAoAjhxQf//A3FBAXRqIAY7AQAgBCABOwEACyABQQFqIQEgAiADTw0ACwsLUAECfyABIAAoAlAgACgCSCABaigAAEGx893xeWxBD3ZB/v8HcWoiAy8BACICRwRAIAAoAkwgACgCOCABcUEBdGogAjsBACADIAE7AQALIAILhQUBE38gACgCcCIDIANBAnYgACgCbCIDQQEgAxsiAyAAKAKAAUkbIQcgACgCZCIKIAAoAjBBhgJrIgVrQf//A3FBACAFIApJGyEMIAAoAkgiCCAKaiIJIANBAWsiAmoiBS0AASENIAUtAAAhDiAJQQJqIQUgAiAIaiELIAAoAoQBIRIgACgCPCEPIAAoAkwhECAAKAI4IREgACgCeEEFSCETA0ACQCAKIAFB//8DcU0NAANAAkACQCALIAFB//8DcSIGai0AACAORw0AIAsgBkEBaiIBai0AACANRw0AIAYgCGoiAi0AACAJLQAARw0AIAEgCGotAAAgCS0AAUYNAQsgB0EBayIHRQ0CIAwgECAGIBFxQQF0ai8BACIBSQ0BDAILCyACQQJqIQRBACECIAUhAQJAA0AgAS0AACAELQAARw0BIAEtAAEgBC0AAUcEQCACQQFyIQIMAgsgAS0AAiAELQACRwRAIAJBAnIhAgwCCyABLQADIAQtAANHBEAgAkEDciECDAILIAEtAAQgBC0ABEcEQCACQQRyIQIMAgsgAS0ABSAELQAFRwRAIAJBBXIhAgwCCyABLQAGIAQtAAZHBEAgAkEGciECDAILIAEtAAcgBC0AB0cEQCACQQdyIQIMAgsgBEEIaiEEIAFBCGohASACQfgBSSEUIAJBCGohAiAUDQALQYACIQILAkAgAyACQQJqIgFJBEAgACAGNgJoIAEgD0sEQCAPDwsgAS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siASABIAJLGyIBEAkaIAAgACgCFCABajYCFCACCwYAQaSgAQsGAEGgoAELBgBBmKABCwcAIABBBGoLBwAgAEEIagsmAQF/IAAoAhQiAQRAIAEQCgsgACgCBCEBIABBBGoQLyAAEAYgAQupAQEDfwJAIAAtAAAiAkUNAANAIAEtAAAiBEUEQCACIQMMAgsCQCACIARGDQAgAkEgciACIAJBwQBrQRpJGyABLQAAIgJBIHIgAiACQcEAa0EaSRtGDQAgAC0AACEDDAILIAFBAWohASAALQABIQIgAEEBaiEAIAINAAsLIANB/wFxIgBBIHIgACAAQcEAa0EaSRsgAS0AACIAQSByIAAgAEHBAGtBGkkbawvMBgICfgJ/IwBB4ABrIgckAAJAAkACQAJAAkACQAJAAkACQAJAAkAgBA4PAAEKAgMEBgcICAgICAgFCAsgAUIANwMgDAkLIAAgAiADEBEiBUJ/VwRAIAFBCGoiAQRAIAEgACgCDDYCACABIAAoAhA2AgQLDAgLAkAgBVAEQCABKQMoIgMgASkDIFINASABIAM3AxggAUEBNgIEIAEoAgBFDQEgACAHQShqECFBf0wEQCABQQhqIgEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwKCwJAIAcpAygiA0Igg1ANACAHKAJUIAEoAjBGDQAgAUEIagRAIAFBADYCDCABQQc2AggLDAoLIANCBINQDQEgBykDQCABKQMYUQ0BIAFBCGoEQCABQQA2AgwgAUEVNgIICwwJCyABKAIEDQAgASkDKCIDIAEpAyAiBlQNACAFIAMgBn0iA1gNACABKAIwIQQDQCABAn8gBSADfSIGQv////8PIAZC/////w9UGyIGpyEAQQAgAiADp2oiCEUNABogBCAIIACtQcyYASgCABEDAAsiBDYCMCABIAEpAyggBnw3AyggBSADIAZ8IgNWDQALCyABIAEpAyAgBXw3AyAMCAsgASgCBEUNByACIAEpAxgiAzcDGCABKAIwIQAgAkEANgIwIAIgAzcDICACIAA2AiwgAiACKQMAQuwBhDcDAAwHCyADQghaBH4gAiABKAIINgIAIAIgASgCDDYCBEIIBUJ/CyEFDAYLIA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KAIAGyEFDAcLIAEoAqxAIAEoAqhAKAIQEQIArUIBfSEFDAYLIAEtABAEQCABLQANBEAgAiABLQAPBH9BAAVBCCABKAIUIgAgAEF9SxsLOwEwIAIgASkDGDcDICACIAIpAwBCyACENwMADAcLIAIgAikDAEK3////D4M3AwAMBgsgAkEAOwEwIAIpAwAhAyABLQANBEAgASkDGCEFIAIgA0LEAIQ3AwAgAiAFNwMYQgAhBQwGCyACIANCu////w+DQsAAhDcDAAwFCyABLQAPDQQgASgCrEAgASgCqEAoAggRAgCsIQUMBAsgA0IIWgR+IAIgASgCADYCACACIAEoAgQ2AgRCCAVCfwshBQwDCyABRQ0CIAEoAqxAIAEoAqhAKAIEEQQAIAEQLyABEAYMAgsgB0F/NgIAQRAgBxAkQj+EIQUMAQsgAQRAIAFBADYCBCABQRQ2AgALQn8hBQsgB0EQaiQAIAULYwBByAAQCCIARQRAQfibASgCACEBIAIEQCACIAE2AgQgAkEBNgIACyAADwsgAEEAOgAMIABBADoABCAAIAI2AgAgAEEANgI4IABCADcDMCAAIAFBCSABQQFrQQlJGzYCCCAAC0gBAX8gAEIANwIEIAAgATYCAAJAIAFBAEgNAEGwEygCACABTA0AIAFBAnRBwBNqKAIAQQFHDQBB+JsBKAIAIQILIAAgAjYCBAvuhwECJH8BfiACKQMAIScgACABNgIcIAAgJ0L/////DyAnQv////8PVBs+AiAgAEEQaiEKAn8gAC0ABARAAn8gAC0ADEECdCENQX4hAQJAAkACQCAKRQ0AIAooAiBFDQAgCigCJEUNACAKKAIcIgNFDQAgAygCACAKRw0AAkACQCADKAIgIgVBOWsOOQECAgICAgICAgICAgECAgIBAgICAgICAgICAgICAgICAgIBAgICAgICAgICAgIBAgICAgICAgICAQALIAVBmgVGDQAgBUEqRw0BCyANQQVLDQACQAJAIAooAgxFDQAgCigCBCIEBEAgCigCAEUNAQsgBUGaBUcNASANQQRGDQELIApBkPEAKAIANgIYQX4MBAsgCigCEEUNASADKAIkIQEgAyANNgIkAkAgAygCEARAIAMQFAJAIAooAhAiBSADKAIQIgkgBSAJSRsiAUUNACAKKAIMIAMoAgggARAJGiAKIAooAgwgAWo2AgwgAyADKAIIIAFqNgIIIAogCigCFCABajYCFCAKIAooAhAgAWsiBTYCECADIAMoAhAgAWsiCTYCECAJDQAgAyADKAIENgIIQQAhCQsgBQRAIAMoAiAhBQwCCwwECyAEDQAgDUEBdEF3QQAgDUEESxtqIAFBAXRBd0EAIAFBBEobakoNACANQQRGDQAMAgsCQAJAAkACQAJAIAVBKkcEQCAFQZoFRw0BIAooAgRFDQMMBwsgAygCFEUEQCADQfEANgIgDAILIAMoAjRBDHRBgPABayEBAkAgAygCfEECTg0AIAMoAngiBEEBTA0AIARBBUwEQCABQcAAciEBDAELQYABQcABIARBBkYbIAFyIQELIAMgCUEBajYCECADKAIEIAlqIAFBIHIgASADKAJkGyIBQQh2OgAAIAMgAygCECIEQQFqNgIQIAQgAygCBGogAUEfcCABckEfczoAACADKAJkBEAgAyAKKAIwEF0LIApBATYCMCADQfEANgIgIAoQDCADKAIQDQcgAygCICEFCwJAAkACQAJAIAVBOUYEfyADKAIAQQA2AjAgAyADKAIQIgFBAWo2AhAgASADKAIEakEfOgAAIAMgAygCECIBQQFqNgIQIAEgAygCBGpBiwE6AAAgAyADKAIQIgFBAWo2AhAgASADKAIEakEIOgAAAkAgAygCHCIBRQRAIANBABA0IAMgAygCECIBQQFqNgIQIAEgAygCBGpBADoAAEECIQEgAygCeCIEQQlHBEBBBCAEQQJIQQJ0IAMoAnxBAUobIQELIAMgAygCECIEQQFqNgIQIAQgAygCBGogAToAACADIAMoAhAiAUEBajYCECABIAMoAgRqQQM6AAAgA0HxADYCICAKEAwgAygCEEUNAQwNCyABKAIkIQQgASgCHCEFIAEoAhAhByABKAIsIQkgASgCACELIAMgAygCECIIQQFqNgIQQQIhASAIIAMoAgRqIAlBAEdBAXQgC0EAR3IgB0EAR0ECdHIgBUEAR0EDdHIgBEEAR0EEdHI6AAAgAyADKAIcKAIEEDQgAygCeCIEQQlHBEBBBCAEQQJIQQJ0IAMoAnxBAUobIQELIAMgAygCECIEQQFqNgIQIAQgAygCBGogAToAACADKAIcKAIMIQEgAyADKAIQIgRBAWo2AhAgBCADKAIEaiABOgAAIAMoAhwiASgCEAR/IAEoAhQhASADIAMoAhAiBEEBajYCECAEIAMoAgRqIAE6AAAgAyADKAIQIgRBAWo2AhAgBCADKAIEaiABQQh2OgAAIAMoAhwFIAELKAIsBEAgCgJ/IAooAjAhASADKAIQIQRBACADKAIEIgVFDQAaIAEgBSAErUHMmAEoAgARAwALNgIwCyADQcUANgIgIANBADYCGAwCCyADKAIgBSAFC0HFAGsOIwAEBAQBBAQEBAQEBAQEBAQEBAQEBAQCBAQEBAQEBAQEBAQDBAsgAygCHCIEKAIQIgUEQCADKAIMIgkgAygCECIBIAQvARQgAygCGCIHayIEakkEQANAIAMoAgQgAWogBSAHaiAJIAFrIgkQCRogAyADKAIMIgU2AhACQCADKAIcKAIsRQ0AIAEgBU8NACAKAn8gCigCMCEHQQAgAygCBCABaiILRQ0AGiAHIAsgBSABa61BzJgBKAIAEQMACzYCMAsgAyADKAIYIAlqNgIYIAooAhwiARAUAkAgCigCECIFIAEoAhAiByAFIAdJGyIFRQ0AIAooAgwgASgCCCAFEAkaIAogCigCDCAFajYCDCABIAEoAgggBWo2AgggCiAKKAIUIAVqNgIUIAogCigCECAFazYCECABIAEoAhAgBWsiBTYCECAFDQAgASABKAIENgIICyADKAIQDQwgAygCGCEHIAMoAhwoAhAhBUEAIQEgBCAJayIEIAMoAgwiCUsNAAsLIAMoAgQgAWogBSAHaiAEEAkaIAMgAygCECAEaiIENgIQAkAgAygCHCgCLEUNACABIARPDQAgCgJ/IAooAjAhBUEAIAMoAgQgAWoiB0UNABogBSAHIAQgAWutQcyYASgCABEDAAs2AjALIANBADYCGAsgA0HJADYCIAsgAygCHCgCHARAIAMoAhAiASEEA0ACQCABIAMoAgxHDQACQCADKAIcKAIsRQ0AIAEgBE0NACAKAn8gCigCMCEFQQAgAygCBCAEaiIHRQ0AGiAFIAcgASAEa61BzJgBKAIAEQMACzYCMAsgCigCHCIBEBQCQCAKKAIQIgQgASgCECIFIAQgBUkbIgRFDQAgCigCDCABKAIIIAQQCRogCiAKKAIMIARqNgIMIAEgASgCCCAEajYCCCAKIAooAhQgBGo2AhQgCiAKKAIQIARrNgIQIAEgASgCECAEayIENgIQIAQNACABIAEoAgQ2AggLQQAhAUEAIQQgAygCEEUNAAwLCyADKAIcKAIcIQUgAyADKAIYIgdBAWo2AhggBSAHai0AACEFIAMgAUEBajYCECADKAIEIAFqIAU6AAAgBQRAIAMoAhAhAQwBCwsCQCADKAIcKAIsRQ0AIAMoAhAiASAETQ0AIAoCfyAKKAIwIQVBACADKAIEIARqIgdFDQAaIAUgByABIARrrUHMmAEoAgARAwALNgIwCyADQQA2AhgLIANB2wA2AiALAkAgAygCHCgCJEUNACADKAIQIgEhBANAAkAgASADKAIMRw0AAkAgAygCHCgCLEUNACABIARNDQAgCgJ/IAooAjAhBUEAIAMoAgQgBGoiB0UNABogBSAHIAEgBGutQcyYASgCABEDAAs2AjALIAooAhwiARAUAkAgCigCECIEIAEoAhAiBSAEIAVJGyIERQ0AIAooAgwgASgCCCAEEAkaIAogCigCDCAEajYCDCABIAEoAgggBGo2AgggCiAKKAIUIARqNgIUIAogCigCECAEazYCECABIAEoAhAgBGsiBDYCECAEDQAgASABKAIENgIIC0EAIQFBACEEIAMoAhBFDQAMCgsgAygCHCgCJCEFIAMgAygCGCIHQQFqNgIYIAUgB2otAAAhBSADIAFBAWo2AhAgAygCBCABaiAFOgAAIAUEQCADKAIQIQEMAQsLIAMoAhwoAixFDQAgAygCECIBIARNDQAgCgJ/IAooAjAhBUEAIAMoAgQgBGoiB0UNABogBSAHIAEgBGutQcyYASgCABEDAAs2AjALIANB5wA2AiALAkAgAygCHCgCLARAIAMoAgwgAygCECIBQQJqSQRAIAoQDCADKAIQDQJBACEBCyAKKAIwIQQgAyABQQFqNgIQIAMoAgQgAW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sgBRAJGiABQQA2AjQgASABKAIsNgIwDAELIAEoAjQiDSABKAI4aiARIANrIAMgBSANayIFIAMgBUkbIgUQCRogAyAFayIDBEAgASgCOCARIANrIAMQCRogASADNgI0IAEgASgCLDYCMAwBCyABQQAgASgCNCAFaiIDIAMgASgCLCINRhs2AjQgASgCMCIDIA1PDQAgASADIAVqNgIwCyAKIB8gCigCBGsiBSAKKAIIajYCCCAKIBYgCigCEGsiASAKKAIUajYCFCAGIAYoAiAgAWo2AiACQCAGLQAMQQRxRQ0AIAFFDQAgBgJ/IAYoAhQEQAJ/IAYoAhwhA0EAIAooAgwgAWsiDUUNABogAyANIAGtQcyYASgCABEDAAsMAQsgBigCHCAKKAIMIAFrIAFByJgBKAIAEQAACyIDNgIcIAogAzYCMAsgCiAGKAJAIAYoAghBAEdBBnRqIAYoAgQiA0G//gBGQQd0akGAAiADQcL+AEZBCHQgA0HH/gBGG2o2AiwgBCAEQXsgBBsgASAFchshFwwCCyAGQdL+ADYCBAtBfCEXCyAUQRBqJAAgFwshASACIAIpAwAgADUCIH03AwACQAJAAkACQCABQQVqDgcBAgICAgMAAgtBAQ8LIAAoAhQNAEEDDwsgACgCACIABEAgACABNgIEIABBDTYCAAtBAiEBCyABCwkAIABBAToADAtEAAJAIAJC/////w9YBEAgACgCFEUNAQsgACgCACIABEAgAEEANgIEIABBEjYCAAtBAA8LIAAgATYCECAAIAI+AhRBAQu6AQEEfyAAQRBqIQECfyAALQAEBEAgARBeDAELQX4hAwJAIAFFDQAgASgCIEUNACABKAIkIgRFDQAgASgCHCICRQ0AIAIoAgAgAUcNACACKAIEQbT+AGtBH0sNACACKAI4IgMEQCABKAIoIAMgBBEGACABKAIkIQQgASgCHCECCyABKAIoIAIgBBEGAEEAIQMgAUEANgIcCyADCyIBBEAgACgCACIABEAgACABNgIEIABBDTYCAAsLIAFFC5gMAQZ/IABCADcCECAAQgA3AhwgAEEQaiEBAn8gAC0ABARAAn8gACgCCCECQXohBQJAQesMLQAAQTFHD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/czYCFCAHIAhRDQEgBSgCDEF/cyECIAenIQMgB0IBfCEHDAALAAsgACABQSQgBRBDIgMNACAFEAZBACEDCyAGQRBqJAAgAwudGgIGfgV/IwBB0ABrIgskAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMOFAUGFQsDBAkOAAIIEAoPDQcRAREMEQsCQEHIABAIIgEEQCABQgA3AwAgAUIANwMwIAFBADYCKCABQgA3AyAgAUIANwMYIAFCADcDECABQgA3AwggAUIANwM4IAFBCBAIIgM2AgQgAw0BIAEQBiAABEAgAEEANgIEIABBDjYCAAsLIABBADYCFAwUCyADQgA3AwAgACABNgIUIAFBQGtCADcDACABQgA3AzgMFAsCQAJAIAJQBEBByAAQCCIDRQ0UIANCADcDACADQgA3AzAgA0EANgIoIANCADcDICADQgA3AxggA0IANwMQIANCADcDCCADQgA3AzggA0EIEAgiATYCBCABDQEgAxAGIAAEQCAAQQA2AgQgAEEONgIACwwUCyACIAAoAhAiASkDMFYEQCAABEAgAEEANgIEIABBEjYCAAsMFAsgASgCKARAIAAEQCAAQQA2AgQgAEEdNgIACwwUCyABKAIEIQMCQCABKQMIIgZCAX0iB1ANAANAAkAgAiADIAcgBH1CAYggBHwiBadBA3RqKQMAVARAIAVCAX0hBwwBCyAFIAZRBEAgBiEFDAMLIAMgBUIBfCIEp0EDdGopAwAgAlYNAgsgBCEFIAQgB1QNAAsLAkAgAiADIAWnIgpBA3RqKQMAfSIEUEUEQCABKAIAIgMgCkEEdGopAwghBwwBCyABKAIAIgMgBUIBfSIFp0EEdGopAwgiByEECyACIAcgBH1UBEAgAARAIABBADYCBCAAQRw2AgALDBQLIAMgBUIBfCIFQQAgABCHASIDRQ0TIAMoAgAgAygCCCIKQQR0akEIayAENwMAIAMoAgQgCkEDdGogAjcDACADIAI3AzAgAyABKQMYIgYgAykDCCIEQgF9IgcgBiAHVBs3AxggASADNgIoIAMgATYCKCABIAQ3AyAgAyAFNwMgDAELIAFCADcDAAsgACADNgIUIAMgBDcDQCADIAI3AzhCACEEDBMLIAAoAhAiAQRAAkAgASgCKCIDRQRAIAEpAxghAgwBCyADQQA2AiggASgCKEIANwMgIAEgASkDGCICIAEpAyAiBSACIAVWGyICNwMYCyABKQMIIAJWBEADQCABKAIAIAKnQQR0aigCABAGIAJCAXwiAiABKQMIVA0ACwsgASgCABAGIAEoAgQQBiABEAYLIAAoAhQhASAAQQA2AhQgACABNgIQDBILIAJCCFoEfiABIAAoAgA2AgAgASAAKAIENgIEQggFQn8LIQQMEQsgACgCECIBBEACQCABKAIoIgNFBEAgASkDGCECDAELIANBADYCKCABKAIoQgA3AyAgASABKQMYIgIgASkDICIFIAIgBVYbIgI3AxgLIAEpAwggAlYEQANAIAEoAgAgAqdBBHRqKAIAEAYgAkIBfCICIAEpAwhUDQALCyABKAIAEAYgASgCBBAGIAEQBgsgACgCFCIBBEACQCABKAIoIgNFBEAgASkDGCECDAELIANBADYCKCABKAIoQgA3AyAgASABKQMYIgIgASkDICIFIAIgBVYbIgI3AxgLIAEpAwggAlYEQANAIAEoAgAgAqdBBHRqKAIAEAYgAkIBfCICIAEpAwhUDQALCyABKAIAEAYgASgCBBAGIAEQBgsgABAGDBALIAAoAhAiAEIANwM4IABBQGtCADcDAAwPCyACQn9XBEAgAARAIABBADYCBCAAQRI2AgALDA4LIAIgACgCECIDKQMwIAMpAzgiBn0iBSACIAVUGyIFUA0OIAEgAykDQCIHpyIAQQR0IgEgAygCAGoiCigCACAGIAMoAgQgAEEDdGopAwB9IgKnaiAFIAopAwggAn0iBiAFIAZUGyIEpxAJIQogByAEIAMoAgAiACABaikDCCACfVGtfCECIAUgBlYEQANAIAogBKdqIAAgAqdBBHQiAWoiACgCACAFIAR9IgYgACkDCCIHIAYgB1QbIganEAkaIAIgBiADKAIAIgAgAWopAwhRrXwhAiAFIAQgBnwiBFYNAAsLIAMgAjcDQCADIAMpAzggBHw3AzgMDgtCfyEEQcgAEAgiA0UNDSADQgA3AwAgA0IAN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AEAAAACAAAAAgAAAAMAAAADAAAABAAAAAQAAAAFAAAABQAAAAYAAAAGAAAABwAAAAcAAAAIAAAACAAAAAkAAAAJAAAACgAAAAoAAAALAAAACwAAAAwAAAAMAAAADQAAAA0AQdjaAAttBAAAAAQABAAIAAQABQAAAAQABAAIAAQABgAAAAQABgAgACAABgAAAAQABAAQABAABwAAAAgAEAAgACAABwAAAAgAEACAAIAABwAAAAgAIACAAAABCAAAACAAgAACAQAECAAAACAAAgECAQAQCABB0NsAC/cJDAAIAIwACABMAAgAzAAIACwACACsAAgAbAAIAOwACAAcAAgAnAAIAFwACADcAAgAPAAIALwACAB8AAgA/AAIAAIACACCAAgAQgAIAMIACAAiAAgAogAIAGIACADiAAgAEgAIAJIACABSAAgA0gAIADIACACyAAgAcgAIAPIACAAKAAgAigAIAEoACADKAAgAKgAIAKoACABqAAgA6gAIABoACACaAAgAWgAIANoACAA6AAgAugAIAHoACAD6AAgABgAIAIYACABGAAgAxgAIACYACACmAAgAZgAIAOYACAAWAAgAlgAIAFYACADWAAgANgAIALYACAB2AAgA9gAIAA4ACACOAAgATgAIAM4ACAAuAAgArgAIAG4ACADuAAgAHgAIAJ4ACABeAAgA3gAIAD4ACAC+AAgAfgAIAP4ACAABAAgAgQAIAEEACADBAAgAIQAIAKEACABhAAgA4QAIABEACACRAAgAUQAIANEACAAxAAgAsQAIAHEACADxAAgACQAIAIkACABJAAgAyQAIACkACACpAAgAaQAIAOkACAAZAAgAmQAIAFkACADZAAgAOQAIALkACAB5AAgA+QAIAAUACACFAAgARQAIAMUACAAlAAgApQAIAGUACADlAAgAFQAIAJUACABVAAgA1QAIADUACAC1AAgAdQAIAPUACAANAAgAjQAIAE0ACADNAAgALQAIAK0ACABtAAgA7QAIAB0ACACdAAgAXQAIAN0ACAA9AAgAvQAIAH0ACAD9AAgAEwAJABMBCQCTAAkAkwEJAFMACQBTAQkA0wAJANMBCQAzAAkAMwEJALMACQCzAQkAcwAJAHMBCQDzAAkA8wEJAAsACQ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ABDYW5ub3Qgc2VuZCBhZnRlciBzb2NrZXQgc2h1dGRvd24AT3BlcmF0aW9uIGFscmVhZHkgaW4gcHJvZ3Jlc3MAT3BlcmF0aW9uIGluIHByb2dyZXNzAFN0YWxlIGZpbGUgaGFuZGxlAFJlbW90ZSBJL08gZXJyb3IAUXVvdGEgZXhjZWVkZWQATm8gbWVkaXVtIGZvdW5kAFdyb25nIG1lZGl1bSB0eXBlAE5vIGVycm9yIGluZm9ybWF0aW9uAEHAmAELdRYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAABwUFAAJgAAACcAAAAoAAAAKQAAACoAAAArAAAALAAAAC0AAAAuAAAAJwAAACgAAAApAAAAKgAAACsAAAAsAAAALQBB5JoBCwJQUABBoJsBCxD/////////////////////";to(Di)||(Di=b(Di));function Qs(Be){try{if(Be==Di&&pe)return new Uint8Array(pe);var xe=$n(Be);if(xe)return xe;if(R)return R(Be);throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(Ve){ki(Ve)}}function ro(Be,xe){var Ve,vt,tr;try{tr=Qs(Be),vt=new WebAssembly.Module(tr),Ve=new WebAssembly.Instance(vt,xe)}catch(Tn){var Zr=Tn.toString();throw re("failed to compile wasm module: "+Zr),(Zr.includes("imported Memory")||Zr.includes("memory import"))&&re("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),Tn}return[Ve,vt]}function hc(){var Be={a:Ua};function xe(tr,Zr){var Tn=tr.exports;r.asm=Tn,le=r.asm.g,z(le.buffer),$=r.asm.$,tn(r.asm.h),bs("wasm-instantiate")}if(Hn("wasm-instantiate"),r.instantiateWasm)try{var Ve=r.instantiateWasm(Be,xe);return Ve}catch(tr){return re("Module.instantiateWasm callback failed with error: "+tr),!1}var vt=ro(Di,Be);return xe(vt[0]),r.asm}function gu(Be){return F.getFloat32(Be,!0)}function cp(Be){return F.getFloat64(Be,!0)}function up(Be){return F.getInt16(Be,!0)}function ks(Be){return F.getInt32(Be,!0)}function Cn(Be,xe){F.setInt32(Be,xe,!0)}function no(Be){for(;Be.length>0;){var xe=Be.shift();if(typeof xe=="function"){xe(r);continue}var Ve=xe.func;typeof Ve=="number"?xe.arg===void 0?$.get(Ve)():$.get(Ve)(xe.arg):Ve(xe.arg===void 0?null:xe.arg)}}function Fs(Be,xe){var Ve=new Date(ks((Be>>2)*4)*1e3);Cn((xe>>2)*4,Ve.getUTCSeconds()),Cn((xe+4>>2)*4,Ve.getUTCMinutes()),Cn((xe+8>>2)*4,Ve.getUTCHours()),Cn((xe+12>>2)*4,Ve.getUTCDate()),Cn((xe+16>>2)*4,Ve.getUTCMonth()),Cn((xe+20>>2)*4,Ve.getUTCFullYear()-1900),Cn((xe+24>>2)*4,Ve.getUTCDay()),Cn((xe+36>>2)*4,0),Cn((xe+32>>2)*4,0);var vt=Date.UTC(Ve.getUTCFullYear(),0,1,0,0,0,0),tr=(Ve.getTime()-vt)/(1e3*60*60*24)|0;return Cn((xe+28>>2)*4,tr),Fs.GMTString||(Fs.GMTString=yt("GMT")),Cn((xe+40>>2)*4,Fs.GMTString),xe}function Cl(Be,xe){return Fs(Be,xe)}function Il(Be,xe,Ve){qe.copyWithin(Be,xe,xe+Ve)}function io(Be){try{return le.grow(Be-Qe.byteLength+65535>>>16),z(le.buffer),1}catch{}}function Ue(Be){var xe=qe.length;Be=Be>>>0;var Ve=2147483648;if(Be>Ve)return!1;for(var vt=1;vt<=4;vt*=2){var tr=xe*(1+.2/vt);tr=Math.min(tr,Be+100663296);var Zr=Math.min(Ve,Te(Math.max(Be,tr),65536)),Tn=io(Zr);if(Tn)return!0}return!1}function Fn(Be){he(Be)}function Fi(Be){var xe=Date.now()/1e3|0;return Be&&Cn((Be>>2)*4,xe),xe}function Rn(){if(Rn.called)return;Rn.called=!0;var Be=new Date().getFullYear(),xe=new Date(Be,0,1),Ve=new Date(Be,6,1),vt=xe.getTimezoneOffset(),tr=Ve.getTimezoneOffset(),Zr=Math.max(vt,tr);Cn((mi()>>2)*4,Zr*60),Cn((es()>>2)*4,Number(vt!=tr));function Tn(ja){var la=ja.toTimeString().match(/\(([A-Za-z ]+)\)$/);return la?la[1]:"GMT"}var _r=Tn(xe),ei=Tn(Ve),Ti=yt(_r),Kn=yt(ei);tr<vt?(Cn(($i()>>2)*4,Ti),Cn(($i()+4>>2)*4,Kn)):(Cn(($i()>>2)*4,Kn),Cn(($i()+4>>2)*4,Ti))}function Ui(Be){Rn();var xe=Date.UTC(ks((Be+20>>2)*4)+1900,ks((Be+16>>2)*4),ks((Be+12>>2)*4),ks((Be+8>>2)*4),ks((Be+4>>2)*4),ks((Be>>2)*4),0),Ve=new Date(xe);Cn((Be+24>>2)*4,Ve.getUTCDay());var vt=Date.UTC(Ve.getUTCFullYear(),0,1,0,0,0,0),tr=(Ve.getTime()-vt)/(1e3*60*60*24)|0;return Cn((Be+28>>2)*4,tr),Ve.getTime()/1e3|0}var Zt=typeof atob=="function"?atob:function(Be){var xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ve="",vt,tr,Zr,Tn,_r,ei,Ti,Kn=0;Be=Be.replace(/[^A-Za-z0-9\+\/\=]/g,"");do Tn=xe.indexOf(Be.charAt(Kn++)),_r=xe.indexOf(Be.charAt(Kn++)),ei=xe.indexOf(Be.charAt(Kn++)),Ti=xe.indexOf(Be.charAt(Kn++)),vt=Tn<<2|_r>>4,tr=(_r&15)<<4|ei>>2,Zr=(ei&3)<<6|Ti,Ve=Ve+String.fromCharCode(vt),ei!==64&&(Ve=Ve+String.fromCharCode(tr)),Ti!==64&&(Ve=Ve+String.fromCharCode(Zr));while(Kn<Be.length);return Ve};function Ri(Be){if(typeof w=="boolean"&&w){var xe;try{xe=Buffer.from(Be,"base64")}catch{xe=new Buffer(Be,"base64")}return new Uint8Array(xe.buffer,xe.byteOffset,xe.byteLength)}try{for(var Ve=Zt(Be),vt=new Uint8Array(Ve.length),tr=0;tr<Ve.length;++tr)vt[tr]=Ve.charCodeAt(tr);return vt}catch{throw new Error("Converting base64 string to bytes failed.")}}function $n(Be){if(!!to(Be))return Ri(Be.slice(gs.length))}var Ua={e:Cl,c:Il,d:Ue,a:Fn,b:Fi,f:Ui},$t=hc(),gc=r.___wasm_call_ctors=$t.h,du=r._zip_ext_count_symlinks=$t.i,dc=r._zip_file_get_external_attributes=$t.j,wl=r._zipstruct_stat=$t.k,xA=r._zipstruct_statS=$t.l,mu=r._zipstruct_stat_name=$t.m,Ce=r._zipstruct_stat_index=$t.n,Rt=r._zipstruct_stat_size=$t.o,mc=r._zipstruct_stat_mtime=$t.p,_i=r._zipstruct_stat_crc=$t.q,yu=r._zipstruct_error=$t.r,qt=r._zipstruct_errorS=$t.s,Bl=r._zipstruct_error_code_zip=$t.t,bA=r._zipstruct_stat_comp_size=$t.u,Ap=r._zipstruct_stat_comp_method=$t.v,yc=r._zip_close=$t.w,QA=r._zip_delete=$t.x,Dn=r._zip_dir_add=$t.y,ui=r._zip_discard=$t.z,Ec=r._zip_error_init_with_code=$t.A,kA=r._zip_get_error=$t.B,na=r._zip_file_get_error=$t.C,Hi=r._zip_error_strerror=$t.D,Mo=r._zip_fclose=$t.E,$e=r._zip_file_add=$t.F,so=r._free=$t.G,vl=r._malloc=$t.H,Eu=r._zip_source_error=$t.I,qi=r._zip_source_seek=$t.J,Cu=r._zip_file_set_external_attributes=$t.K,FA=r._zip_file_set_mtime=$t.L,Ha=r._zip_fopen=$t.M,Cc=r._zip_fopen_index=$t.N,ds=r._zip_fread=$t.O,Ot=r._zip_get_name=$t.P,Sn=r._zip_get_num_entries=$t.Q,di=r._zip_source_read=$t.R,ia=r._zip_name_locate=$t.S,oo=r._zip_open_from_source=$t.T,Rs=r._zip_set_file_compression=$t.U,sa=r._zip_source_buffer=$t.V,oa=r._zip_source_buffer_create=$t.W,Uo=r._zip_source_close=$t.X,Zi=r._zip_source_free=$t.Y,Ts=r._zip_source_keep=$t.Z,Ns=r._zip_source_open=$t._,Ls=r._zip_source_set_mtime=$t.aa,ao=r._zip_source_tell=$t.ba,Yn=r._zip_stat=$t.ca,qn=r._zip_stat_index=$t.da,$i=r.__get_tzname=$t.ea,es=r.__get_daylight=$t.fa,mi=r.__get_timezone=$t.ga,qa=r.stackSave=$t.ha,aa=r.stackRestore=$t.ia,ee=r.stackAlloc=$t.ja;r.cwrap=ne,r.getValue=ge;var we;jr=function Be(){we||je(),we||(jr=Be)};function je(Be){if(Be=Be||A,fr>0||(ht(),fr>0))return;function xe(){we||(we=!0,r.calledRun=!0,!Pe&&(Ut(),o(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),Xt()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),xe()},1)):xe()}if(r.run=je,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return je(),e}}();typeof BD=="object"&&typeof iT=="object"?iT.exports=nT:typeof define=="function"&&define.amd?define([],function(){return nT}):typeof BD=="object"&&(BD.createModule=nT)});var Ef,zW,XW,ZW=dt(()=>{Ef=["number","number"],zW=(Z=>(Z[Z.ZIP_ER_OK=0]="ZIP_ER_OK",Z[Z.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",Z[Z.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",Z[Z.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",Z[Z.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",Z[Z.ZIP_ER_READ=5]="ZIP_ER_READ",Z[Z.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",Z[Z.ZIP_ER_CRC=7]="ZIP_ER_CRC",Z[Z.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",Z[Z.ZIP_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:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:t._malloc(1),uint16S:t._malloc(2),uint32S:t._malloc(4),uint64S:t._malloc(8),malloc:t._malloc,free:t._free,getValue:t.getValue,openFromSource:t.cwrap("zip_open_from_source","number",["number","number","number"]),close:t.cwrap("zip_close","number",["number"]),discard:t.cwrap("zip_discard",null,["number"]),getError:t.cwrap("zip_get_error","number",["number"]),getName:t.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:t.cwrap("zip_get_num_entries","number",["number","number"]),delete:t.cwrap("zip_delete","number",["number","number"]),stat:t.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:t.cwrap("zip_stat_index","number",["number",...Ef,"number","number"]),fopen:t.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:t.cwrap("zip_fopen_index","number",["number",...Ef,"number"]),fread:t.cwrap("zip_fread","number",["number","number","number","number"]),fclose:t.cwrap("zip_fclose","number",["number"]),dir:{add:t.cwrap("zip_dir_add","number",["number","string"])},file:{add:t.cwrap("zip_file_add","number",["number","string","number","number"]),getError:t.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:t.cwrap("zip_file_get_external_attributes","number",["number",...Ef,"number","number","number"]),setExternalAttributes:t.cwrap("zip_file_set_external_attributes","number",["number",...Ef,"number","number","number"]),setMtime:t.cwrap("zip_file_set_mtime","number",["number",...Ef,"number","number"]),setCompression:t.cwrap("zip_set_file_compression","number",["number",...Ef,"number","number"])},ext:{countSymlinks:t.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:t.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:t.cwrap("zip_error_strerror","string",["number"])},name:{locate:t.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:t.cwrap("zip_source_buffer_create","number",["number",...Ef,"number","number"]),fromBuffer:t.cwrap("zip_source_buffer","number",["number","number",...Ef,"number"]),free:t.cwrap("zip_source_free",null,["number"]),keep:t.cwrap("zip_source_keep",null,["number"]),open:t.cwrap("zip_source_open","number",["number"]),close:t.cwrap("zip_source_close","number",["number"]),seek:t.cwrap("zip_source_seek","number",["number",...Ef,"number"]),tell:t.cwrap("zip_source_tell","number",["number"]),read:t.cwrap("zip_source_read","number",["number","number","number"]),error:t.cwrap("zip_source_error","number",["number"]),setMtime:t.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:t.cwrap("zipstruct_stat","number",[]),statS:t.cwrap("zipstruct_statS","number",[]),statName:t.cwrap("zipstruct_stat_name","string",["number"]),statIndex:t.cwrap("zipstruct_stat_index","number",["number"]),statSize:t.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:t.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:t.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:t.cwrap("zipstruct_stat_mtime","number",["number"]),statCrc:t.cwrap("zipstruct_stat_crc","number",["number"]),error:t.cwrap("zipstruct_error","number",[]),errorS:t.cwrap("zipstruct_errorS","number",[]),errorCodeZip:t.cwrap("zipstruct_error_code_zip","number",["number"])}})});function sT(t,e){let r=t.indexOf(e);if(r<=0)return null;let o=r;for(;r>=0&&(o=r+e.length,t[o]!==J.sep);){if(t[r-1]===J.sep)return null;r=t.indexOf(e,o)}return t.length>o&&t[o]!==J.sep?null:t.slice(0,o)}var _l,$W=dt(()=>{St();St();Hc();_l=class extends Hp{static async openPromise(e,r){let o=new _l(r);try{return await e(o)}finally{o.saveAndClose()}}constructor(e={}){let r=e.fileExtensions,o=e.readOnlyArchives,a=typeof r>"u"?A=>sT(A,".zip"):A=>{for(let p of r){let h=sT(A,p);if(h)return h}return null},n=(A,p)=>new os(p,{baseFs:A,readOnly:o,stats:A.statSync(p)}),u=async(A,p)=>{let h={baseFs:A,readOnly:o,stats:await A.statPromise(p)};return()=>new os(p,h)};super({...e,factorySync:n,factoryPromise:u,getMountPoint:a})}}});function F8e(t){if(typeof t=="string"&&String(+t)===t)return+t;if(typeof t=="number"&&Number.isFinite(t))return t<0?Date.now()/1e3:t;if(eY.types.isDate(t))return t.getTime()/1e3;throw new Error("Invalid time")}function vD(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var Go,oT,eY,aT,Ay,DD,os,lT=dt(()=>{St();St();St();St();St();St();Go=Ie("fs"),oT=Ie("stream"),eY=Ie("util"),aT=tt(Ie("zlib"));rT();Ay="mixed";DD=class extends Error{constructor(r,o){super(r);this.name="Libzip Error",this.code=o}},os=class extends qu{constructor(r,o={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;let a=o;if(this.level=typeof a.level<"u"?a.level:Ay,r??(r=vD()),typeof r=="string"){let{baseFs:A=new xn}=a;this.baseFs=A,this.path=r}else this.path=null,this.baseFs=null;if(o.stats)this.stats=o.stats;else if(typeof r=="string")try{this.stats=this.baseFs.statSync(r)}catch(A){if(A.code==="ENOENT"&&a.create)this.stats=Ul.makeDefaultStats();else throw A}else this.stats=Ul.makeDefaultStats();this.libzip=_I();let n=this.libzip.malloc(4);try{let A=0;o.readOnly&&(A|=this.libzip.ZIP_RDONLY,this.readOnly=!0),typeof r=="string"&&(r=a.create?vD():this.baseFs.readFileSync(r));let p=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(p,A,n),this.lzSource=p}catch(h){throw this.libzip.source.free(p),h}if(this.zip===0){let h=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(h,this.libzip.getValue(n,"i32")),this.makeLibzipError(h)}}finally{this.libzip.free(n)}this.listings.set(wt.root,new Set);let u=this.libzip.getNumEntries(this.zip,0);for(let A=0;A<u;++A){let p=this.libzip.getName(this.zip,A,0);if(J.isAbsolute(p))continue;let h=J.resolve(wt.root,p);this.registerEntry(h,A),p.endsWith("/")&&this.registerListing(h)}if(this.symlinkCount=this.libzip.ext.countSymlinks(this.zip),this.symlinkCount===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.ready=!0}makeLibzipError(r){let o=this.libzip.struct.errorCodeZip(r),a=this.libzip.error.strerror(r),n=new DD(a,this.libzip.errors[o]);if(o===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${n.message}`);return n}getExtractHint(r){for(let o of this.entries.keys()){let a=this.pathUtils.extname(o);if(r.relevantExtensions.has(a))return!0}return!1}getAllFiles(){return Array.from(this.entries.keys())}getRealPath(){if(!this.path)throw new Error("ZipFS don't have real paths when loaded from a buffer");return this.path}prepareClose(){if(!this.ready)throw sr.EBUSY("archive closed, close");Lg(this)}getBufferAndClose(){if(this.prepareClose(),this.entries.size===0)return this.discardAndClose(),vD();try{if(this.libzip.source.keep(this.lzSource),this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let r=this.libzip.source.tell(this.lzSource);if(r===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let o=this.libzip.malloc(r);if(!o)throw new Error("Couldn't allocate enough memory");try{let a=this.libzip.source.read(this.lzSource,o,r);if(a===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(a<r)throw new Error("Incomplete read");if(a>r)throw new Error("Overread");let n=this.libzip.HEAPU8.subarray(o,o+r);return Buffer.from(n)}finally{this.libzip.free(o)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.readOnly){this.discardAndClose();return}let r=this.baseFs.existsSync(this.path)||this.stats.mode===Ul.DEFAULT_MODE?void 0:this.stats.mode;this.baseFs.writeFileSync(this.path,this.getBufferAndClose(),{mode:r}),this.ready=!1}resolve(r){return J.resolve(wt.root,r)}async openPromise(r,o,a){return this.openSync(r,o,a)}openSync(r,o,a){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:r}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(r,o){return this.opendirSync(r,o)}opendirSync(r,o={}){let a=this.resolveFilename(`opendir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw sr.ENOENT(`opendir '${r}'`);let n=this.listings.get(a);if(!n)throw sr.ENOTDIR(`opendir '${r}'`);let u=[...n],A=this.openSync(a,"r");return gD(this,a,u,{onClose:()=>{this.closeSync(A)}})}async readPromise(r,o,a,n,u){return this.readSync(r,o,a,n,u)}readSync(r,o,a=0,n=o.byteLength,u=-1){let A=this.fds.get(r);if(typeof A>"u")throw sr.EBADF("read");let p=u===-1||u===null?A.cursor:u,h=this.readFileSync(A.p);h.copy(o,a,p,p+n);let C=Math.max(0,Math.min(h.length-p,n));return(u===-1||u===null)&&(A.cursor+=C),C}async writePromise(r,o,a,n,u){return typeof o=="string"?this.writeSync(r,o,u):this.writeSync(r,o,a,n,u)}writeSync(r,o,a,n,u){throw typeof this.fds.get(r)>"u"?sr.EBADF("read"):new Error("Unimplemented")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>"u")throw sr.EBADF("read");this.fds.delete(r)}createReadStream(r,{encoding:o}={}){if(r===null)throw new Error("Unimplemented");let a=this.openSync(r,"r"),n=Object.assign(new oT.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(A,p)=>{clearImmediate(u),this.closeSync(a),p(A)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),u=setImmediate(async()=>{try{let A=await this.readFilePromise(r,o);n.bytesRead=A.length,n.end(A)}catch(A){n.destroy(A)}});return n}createWriteStream(r,{encoding:o}={}){if(this.readOnly)throw sr.EROFS(`open '${r}'`);if(r===null)throw new Error("Unimplemented");let a=[],n=this.openSync(r,"w"),u=Object.assign(new oT.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(A,p)=>{try{A?p(A):(this.writeFileSync(r,Buffer.concat(a),o),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){u.destroy()},bytesWritten:0,path:r,pending:!1});return u.on("data",A=>{let p=Buffer.from(A);u.bytesWritten+=p.length,a.push(p)}),u}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let o=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(o)&&!this.listings.has(o))throw sr.ENOENT(`lstat '${r}'`);return o}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw sr.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=J.resolve(wt.root,r);return this.entries.has(a)||this.listings.has(a)}let o;try{o=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return o===void 0?!1:this.entries.has(o)||this.listings.has(o)}async accessPromise(r,o){return this.accessSync(r,o)}accessSync(r,o=Go.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw sr.ENOENT(`access '${r}'`);if(this.readOnly&&o&Go.constants.W_OK)throw sr.EROFS(`access '${r}'`)}async statPromise(r,o={bigint:!1}){return o.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,o={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,o.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(o.throwIfNoEntry===!1)return;throw sr.ENOENT(`stat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw sr.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,o)}}async fstatPromise(r,o){return this.fstatSync(r,o)}fstatSync(r,o){let a=this.fds.get(r);if(typeof a>"u")throw sr.EBADF("fstatSync");let{p:n}=a,u=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(u)&&!this.listings.has(u))throw sr.ENOENT(`stat '${n}'`);if(n[n.length-1]==="/"&&!this.listings.has(u))throw sr.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,u,o)}async lstatPromise(r,o={bigint:!1}){return o.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,o={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,o.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(o.throwIfNoEntry===!1)return;throw sr.ENOENT(`lstat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw sr.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,o)}}statImpl(r,o,a={}){let n=this.entries.get(o);if(typeof n<"u"){let u=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,n,0,0,u)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let p=this.stats.uid,h=this.stats.gid,C=this.libzip.struct.statSize(u)>>>0,w=512,v=Math.ceil(C/w),b=(this.libzip.struct.statMtime(u)>>>0)*1e3,E=b,R=b,L=b,_=new Date(E),V=new Date(R),re=new Date(L),ae=new Date(b),he=this.listings.has(o)?Go.constants.S_IFDIR:this.isSymbolicLink(n)?Go.constants.S_IFLNK:Go.constants.S_IFREG,pe=he===Go.constants.S_IFDIR?493:420,De=he|this.getUnixMode(n,pe)&511,ge=this.libzip.struct.statCrc(u),le=Object.assign(new Ul.StatEntry,{uid:p,gid:h,size:C,blksize:w,blocks:v,atime:_,birthtime:V,ctime:re,mtime:ae,atimeMs:E,birthtimeMs:R,ctimeMs:L,mtimeMs:b,mode:De,crc:ge});return a.bigint===!0?Ul.convertToBigIntStats(le):le}if(this.listings.has(o)){let u=this.stats.uid,A=this.stats.gid,p=0,h=512,C=0,w=this.stats.mtimeMs,v=this.stats.mtimeMs,b=this.stats.mtimeMs,E=this.stats.mtimeMs,R=new Date(w),L=new Date(v),_=new Date(b),V=new Date(E),re=Go.constants.S_IFDIR|493,ae=0,he=Object.assign(new Ul.StatEntry,{uid:u,gid:A,size:p,blksize:h,blocks:C,atime:R,birthtime:L,ctime:_,mtime:V,atimeMs:w,birthtimeMs:v,ctimeMs:b,mtimeMs:E,mode:re,crc:ae});return a.bigint===!0?Ul.convertToBigIntStats(he):he}throw new Error("Unreachable")}getUnixMode(r,o){if(this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?o:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(r){let o=this.listings.get(r);if(o)return o;this.registerListing(J.dirname(r)).add(J.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,o){this.registerListing(J.dirname(r)).add(J.basename(r)),this.entries.set(r,o)}unregisterListing(r){this.listings.delete(r);let o=this.listings.get(J.dirname(r));o==null||o.delete(J.basename(r))}unregisterEntry(r){this.unregisterListing(r);let o=this.entries.get(r);this.entries.delete(r),!(typeof o>"u")&&(this.fileSources.delete(o),this.isSymbolicLink(o)&&this.symlinkCount--)}deleteEntry(r,o){if(this.unregisterEntry(r),this.libzip.delete(this.zip,o)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(r,o,a=!0,n=!0){if(!this.ready)throw sr.EBUSY(`archive closed, ${r}`);let u=J.resolve(wt.root,o);if(u==="/")return wt.root;let A=this.entries.get(u);if(a&&A!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(A)){let p=this.getFileSource(A).toString();return this.resolveFilename(r,J.resolve(J.dirname(u),p),!0,n)}else return u;for(;;){let p=this.resolveFilename(r,J.dirname(u),!0,n);if(p===void 0)return p;let h=this.listings.has(p),C=this.entries.has(p);if(!h&&!C){if(n===!1)return;throw sr.ENOENT(r)}if(!h)throw sr.ENOTDIR(r);if(u=J.resolve(p,J.basename(u)),!a||this.symlinkCount===0)break;let w=this.libzip.name.locate(this.zip,u.slice(1),0);if(w===-1)break;if(this.isSymbolicLink(w)){let v=this.getFileSource(w).toString();u=J.resolve(J.dirname(u),v)}else break}return u}allocateBuffer(r){Buffer.isBuffer(r)||(r=Buffer.from(r));let o=this.libzip.malloc(r.byteLength);if(!o)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,o,r.byteLength).set(r),{buffer:o,byteLength:r.byteLength}}allocateUnattachedSource(r){let o=this.libzip.struct.errorS(),{buffer:a,byteLength:n}=this.allocateBuffer(r),u=this.libzip.source.fromUnattachedBuffer(a,n,0,1,o);if(u===0)throw this.libzip.free(o),this.makeLibzipError(o);return u}allocateSource(r){let{buffer:o,byteLength:a}=this.allocateBuffer(r),n=this.libzip.source.fromBuffer(this.zip,o,a,0,1);if(n===0)throw this.libzip.free(o),this.makeLibzipError(this.libzip.getError(this.zip));return n}setFileSource(r,o){let a=Buffer.isBuffer(o)?o:Buffer.from(o),n=J.relative(wt.root,r),u=this.allocateSource(o);try{let A=this.libzip.file.add(this.zip,n,u,this.libzip.ZIP_FL_OVERWRITE);if(A===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.level!=="mixed"){let p=this.level===0?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(this.libzip.file.setCompression(this.zip,A,0,p,this.level)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(A,a),A}catch(A){throw this.libzip.source.free(u),A}}isSymbolicLink(r){if(this.symlinkCount===0)return!1;if(this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?!1:(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&Go.constants.S_IFMT)===Go.constants.S_IFLNK}getFileSource(r,o={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<"u")return a;let n=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,r,0,0,n)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let A=this.libzip.struct.statCompSize(n),p=this.libzip.struct.statCompMethod(n),h=this.libzip.malloc(A);try{let C=this.libzip.fopenIndex(this.zip,r,0,this.libzip.ZIP_FL_COMPRESSED);if(C===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let w=this.libzip.fread(C,h,A,0);if(w===-1)throw this.makeLibzipError(this.libzip.file.getError(C));if(w<A)throw new Error("Incomplete read");if(w>A)throw new Error("Overread");let v=this.libzip.HEAPU8.subarray(h,h+A),b=Buffer.from(v);if(p===0)return this.fileSources.set(r,b),b;if(o.asyncDecompress)return new Promise((E,R)=>{aT.default.inflateRaw(b,(L,_)=>{L?R(L):(this.fileSources.set(r,_),E(_))})});{let E=aT.default.inflateRawSync(b);return this.fileSources.set(r,E),E}}finally{this.libzip.fclose(C)}}finally{this.libzip.free(h)}}async fchmodPromise(r,o){return this.chmodPromise(this.fdToPath(r,"fchmod"),o)}fchmodSync(r,o){return this.chmodSync(this.fdToPath(r,"fchmodSync"),o)}async chmodPromise(r,o){return this.chmodSync(r,o)}chmodSync(r,o){if(this.readOnly)throw sr.EROFS(`chmod '${r}'`);o&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>"u")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let A=this.getUnixMode(n,Go.constants.S_IFREG|0)&-512|o;if(this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,A<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async fchownPromise(r,o,a){return this.chownPromise(this.fdToPath(r,"fchown"),o,a)}fchownSync(r,o,a){return this.chownSync(this.fdToPath(r,"fchownSync"),o,a)}async chownPromise(r,o,a){return this.chownSync(r,o,a)}chownSync(r,o,a){throw new Error("Unimplemented")}async renamePromise(r,o){return this.renameSync(r,o)}renameSync(r,o){throw new Error("Unimplemented")}async copyFilePromise(r,o,a){let{indexSource:n,indexDest:u,resolvedDestP:A}=this.prepareCopyFile(r,o,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(A,p);h!==u&&this.registerEntry(A,h)}copyFileSync(r,o,a=0){let{indexSource:n,indexDest:u,resolvedDestP:A}=this.prepareCopyFile(r,o,a),p=this.getFileSource(n),h=this.setFileSource(A,p);h!==u&&this.registerEntry(A,h)}prepareCopyFile(r,o,a=0){if(this.readOnly)throw sr.EROFS(`copyfile '${r} -> '${o}'`);if((a&Go.constants.COPYFILE_FICLONE_FORCE)!==0)throw sr.ENOSYS("unsupported clone operation",`copyfile '${r}' -> ${o}'`);let n=this.resolveFilename(`copyfile '${r} -> ${o}'`,r),u=this.entries.get(n);if(typeof u>"u")throw sr.EINVAL(`copyfile '${r}' -> '${o}'`);let A=this.resolveFilename(`copyfile '${r}' -> ${o}'`,o),p=this.entries.get(A);if((a&(Go.constants.COPYFILE_EXCL|Go.constants.COPYFILE_FICLONE_FORCE))!==0&&typeof p<"u")throw sr.EEXIST(`copyfile '${r}' -> '${o}'`);return{indexSource:u,resolvedDestP:A,indexDest:p}}async appendFilePromise(r,o,a){if(this.readOnly)throw sr.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFilePromise(r,o,a)}appendFileSync(r,o,a={}){if(this.readOnly)throw sr.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFileSync(r,o,a)}fdToPath(r,o){var n;let a=(n=this.fds.get(r))==null?void 0:n.p;if(typeof a>"u")throw sr.EBADF(o);return a}async writeFilePromise(r,o,a){let{encoding:n,mode:u,index:A,resolvedP:p}=this.prepareWriteFile(r,a);A!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(o=Buffer.concat([await this.getFileSource(A,{asyncDecompress:!0}),Buffer.from(o)])),n!==null&&(o=o.toString(n));let h=this.setFileSource(p,o);h!==A&&this.registerEntry(p,h),u!==null&&await this.chmodPromise(p,u)}writeFileSync(r,o,a){let{encoding:n,mode:u,index:A,resolvedP:p}=this.prepareWriteFile(r,a);A!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(o=Buffer.concat([this.getFileSource(A),Buffer.from(o)])),n!==null&&(o=o.toString(n));let h=this.setFileSource(p,o);h!==A&&this.registerEntry(p,h),u!==null&&this.chmodSync(p,u)}prepareWriteFile(r,o){if(typeof r=="number"&&(r=this.fdToPath(r,"read")),this.readOnly)throw sr.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw sr.EISDIR(`open '${r}'`);let n=null,u=null;typeof o=="string"?n=o:typeof o=="object"&&({encoding:n=null,mode:u=null}=o);let A=this.entries.get(a);return{encoding:n,mode:u,resolvedP:a,index:A}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw sr.EROFS(`unlink '${r}'`);let o=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(o))throw sr.EISDIR(`unlink '${r}'`);let a=this.entries.get(o);if(typeof a>"u")throw sr.EINVAL(`unlink '${r}'`);this.deleteEntry(o,a)}async utimesPromise(r,o,a){return this.utimesSync(r,o,a)}utimesSync(r,o,a){if(this.readOnly)throw sr.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,o,a){return this.lutimesSync(r,o,a)}lutimesSync(r,o,a){if(this.readOnly)throw sr.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,o){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error("Unreachable");if(this.libzip.file.setMtime(this.zip,a,0,F8e(o),0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(r,o){return this.mkdirSync(r,o)}mkdirSync(r,{mode:o=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:o});if(this.readOnly)throw sr.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw sr.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,o)}async rmdirPromise(r,o){return this.rmdirSync(r,o)}rmdirSync(r,{recursive:o=!1}={}){if(this.readOnly)throw sr.EROFS(`rmdir '${r}'`);if(o){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw sr.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw sr.ENOTEMPTY(`rmdir '${r}'`);let u=this.entries.get(a);if(typeof u>"u")throw sr.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,u)}hydrateDirectory(r){let o=this.libzip.dir.add(this.zip,J.relative(wt.root,r));if(o===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(r),this.registerEntry(r,o),o}async linkPromise(r,o){return this.linkSync(r,o)}linkSync(r,o){throw sr.EOPNOTSUPP(`link '${r}' -> '${o}'`)}async symlinkPromise(r,o){return this.symlinkSync(r,o)}symlinkSync(r,o){if(this.readOnly)throw sr.EROFS(`symlink '${r}' -> '${o}'`);let a=this.resolveFilename(`symlink '${r}' -> '${o}'`,o);if(this.listings.has(a))throw sr.EISDIR(`symlink '${r}' -> '${o}'`);if(this.entries.has(a))throw sr.EEXIST(`symlink '${r}' -> '${o}'`);let n=this.setFileSource(a,r);if(this.registerEntry(a,n),this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,(Go.constants.S_IFLNK|511)<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(r,o){typeof o=="object"&&(o=o?o.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return o?a.toString(o):a}readFileSync(r,o){typeof o=="object"&&(o=o?o.encoding:void 0);let a=this.readFileBuffer(r);return o?a.toString(o):a}readFileBuffer(r,o={asyncDecompress:!1}){typeof r=="number"&&(r=this.fdToPath(r,"read"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw sr.ENOENT(`open '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(a))throw sr.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw sr.EISDIR("read");let n=this.entries.get(a);if(n===void 0)throw new Error("Unreachable");return this.getFileSource(n,o)}async readdirPromise(r,o){return this.readdirSync(r,o)}readdirSync(r,o){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw sr.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw sr.ENOTDIR(`scandir '${r}'`);let u=[...n];return o!=null&&o.withFileTypes?u.map(A=>Object.assign(this.statImpl("lstat",J.join(r,A)),{name:A})):u}async readlinkPromise(r){let o=this.prepareReadlink(r);return(await this.getFileSource(o,{asyncDecompress:!0})).toString()}readlinkSync(r){let o=this.prepareReadlink(r);return this.getFileSource(o).toString()}prepareReadlink(r){let o=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(o)&&!this.listings.has(o))throw sr.ENOENT(`readlink '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(o))throw sr.ENOTDIR(`open '${r}'`);if(this.listings.has(o))throw sr.EINVAL(`readlink '${r}'`);let a=this.entries.get(o);if(a===void 0)throw new Error("Unreachable");if(!this.isSymbolicLink(a))throw sr.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,o=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw sr.EINVAL(`open '${r}'`);let u=await this.getFileSource(n,{asyncDecompress:!0}),A=Buffer.alloc(o,0);return u.copy(A),await this.writeFilePromise(r,A)}truncateSync(r,o=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw sr.EINVAL(`open '${r}'`);let u=this.getFileSource(n),A=Buffer.alloc(o,0);return u.copy(A),this.writeFileSync(r,A)}async ftruncatePromise(r,o){return this.truncatePromise(this.fdToPath(r,"ftruncate"),o)}ftruncateSync(r,o){return this.truncateSync(this.fdToPath(r,"ftruncateSync"),o)}watch(r,o,a){let n;switch(typeof o){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=o);break}if(!n)return{on:()=>{},close:()=>{}};let u=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(u)}}}watchFile(r,o,a){let n=J.resolve(wt.root,r);return sy(this,n,o,a)}unwatchFile(r,o){let a=J.resolve(wt.root,r);return Ng(this,a,o)}}});function rY(t,e,r=Buffer.alloc(0),o){let a=new os(r),n=w=>w===e||w.startsWith(`${e}/`)?w.slice(0,e.length):null,u=async(w,v)=>()=>a,A=(w,v)=>a,p={...t},h=new xn(p),C=new Hp({baseFs:h,getMountPoint:n,factoryPromise:u,factorySync:A,magicByte:21,maxAge:1/0,typeCheck:o==null?void 0:o.typeCheck});return MI(tY.default,new qp(C)),a}var tY,nY=dt(()=>{St();tY=tt(Ie("fs"));lT()});var iY=dt(()=>{$W();lT();nY()});var HI={};Yt(HI,{DEFAULT_COMPRESSION_LEVEL:()=>Ay,LibzipError:()=>DD,ZipFS:()=>os,ZipOpenFS:()=>_l,getArchivePart:()=>sT,getLibzipPromise:()=>T8e,getLibzipSync:()=>R8e,makeEmptyArchive:()=>vD,mountMemoryDrive:()=>rY});function R8e(){return _I()}async function T8e(){return _I()}var sY,Hc=dt(()=>{rT();sY=tt(JW());ZW();iY();VW(()=>{let t=(0,sY.default)();return XW(t)})});var aY=U((hxt,oY)=>{"use strict";function N8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Hg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Hg)}N8e(Hg,Error);Hg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",w;for(w=0;w<h.parts.length;w++)C+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),w,v;for(w=0;w<h.length;w++)C[w]=u(h[w]);if(C.sort(),C.length>0){for(w=1,v=1;w<C.length;w++)C[w-1]!==C[w]&&(C[v]=C[w],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function L8e(t,e){e=e!==void 0?e:{};var r={},o={Start:Ag},a=Ag,n=function(N){return N||[]},u=function(N,K,te){return[{command:N,type:K}].concat(te||[])},A=function(N,K){return[{command:N,type:K||";"}]},p=function(N){return N},h=";",C=yr(";",!1),w="&",v=yr("&",!1),b=function(N,K){return K?{chain:N,then:K}:{chain:N}},E=function(N,K){return{type:N,line:K}},R="&&",L=yr("&&",!1),_="||",V=yr("||",!1),re=function(N,K){return K?{...N,then:K}:N},ae=function(N,K){return{type:N,chain:K}},he="|&",pe=yr("|&",!1),De="|",ge=yr("|",!1),le="=",Pe=yr("=",!1),g=function(N,K){return{name:N,args:[K]}},ve=function(N){return{name:N,args:[]}},Ee="(",de=yr("(",!1),ne=")",Z=yr(")",!1),me=function(N,K){return{type:"subshell",subshell:N,args:K}},be="{",ut=yr("{",!1),H="}",yt=yr("}",!1),Me=function(N,K){return{type:"group",group:N,args:K}},Te=function(N,K){return{type:"command",args:K,envs:N}},Qe=function(N){return{type:"envs",envs:N}},_e=function(N){return N},qe=function(N){return N},At=/^[0-9]/,Oe=ys([["0","9"]],!1,!1),x=function(N,K,te){return{type:"redirection",subtype:K,fd:N!==null?parseInt(N):null,args:[te]}},I=">>",P=yr(">>",!1),y=">&",F=yr(">&",!1),z=">",X=yr(">",!1),$="<<<",ie=yr("<<<",!1),ke="<&",Ne=yr("<&",!1),st="<",ht=yr("<",!1),Ut=function(N){return{type:"argument",segments:[].concat(...N)}},Xt=function(N){return N},xt="$'",tn=yr("$'",!1),Dr="'",fr=yr("'",!1),Br=function(N){return[{type:"text",text:N}]},jr='""',Hn=yr('""',!1),bs=function(){return{type:"text",text:""}},ki='"',gs=yr('"',!1),to=function(N){return N},Di=function(N){return{type:"arithmetic",arithmetic:N,quoted:!0}},Qs=function(N){return{type:"shell",shell:N,quoted:!0}},ro=function(N){return{type:"variable",...N,quoted:!0}},hc=function(N){return{type:"text",text:N}},gu=function(N){return{type:"arithmetic",arithmetic:N,quoted:!1}},cp=function(N){return{type:"shell",shell:N,quoted:!1}},up=function(N){return{type:"variable",...N,quoted:!1}},ks=function(N){return{type:"glob",pattern:N}},Cn=/^[^']/,no=ys(["'"],!0,!1),Fs=function(N){return N.join("")},Cl=/^[^$"]/,Il=ys(["$",'"'],!0,!1),io=`\\
10`,Ue=yr(`\\
11`,!1),Fn=function(){return""},Fi="\\",Rn=yr("\\",!1),Ui=/^[\\$"`]/,Zt=ys(["\\","$",'"',"`"],!1,!1),Ri=function(N){return N},$n="\\a",Ua=yr("\\a",!1),$t=function(){return"a"},gc="\\b",du=yr("\\b",!1),dc=function(){return"\b"},wl=/^[Ee]/,xA=ys(["E","e"],!1,!1),mu=function(){return"\x1B"},Ce="\\f",Rt=yr("\\f",!1),mc=function(){return"\f"},_i="\\n",yu=yr("\\n",!1),qt=function(){return`
12`},Bl="\\r",bA=yr("\\r",!1),Ap=function(){return"\r"},yc="\\t",QA=yr("\\t",!1),Dn=function(){return" "},ui="\\v",Ec=yr("\\v",!1),kA=function(){return"\v"},na=/^[\\'"?]/,Hi=ys(["\\","'",'"',"?"],!1,!1),Mo=function(N){return String.fromCharCode(parseInt(N,16))},$e="\\x",so=yr("\\x",!1),vl="\\u",Eu=yr("\\u",!1),qi="\\U",Cu=yr("\\U",!1),FA=function(N){return String.fromCodePoint(parseInt(N,16))},Ha=/^[0-7]/,Cc=ys([["0","7"]],!1,!1),ds=/^[0-9a-fA-f]/,Ot=ys([["0","9"],["a","f"],["A","f"]],!1,!1),Sn=ag(),di="{}",ia=yr("{}",!1),oo=function(){return"{}"},Rs="-",sa=yr("-",!1),oa="+",Uo=yr("+",!1),Zi=".",Ts=yr(".",!1),Ns=function(N,K,te){return{type:"number",value:(N==="-"?-1:1)*parseFloat(K.join("")+"."+te.join(""))}},Ls=function(N,K){return{type:"number",value:(N==="-"?-1:1)*parseInt(K.join(""))}},ao=function(N){return{type:"variable",...N}},Yn=function(N){return{type:"variable",name:N}},qn=function(N){return N},$i="*",es=yr("*",!1),mi="/",qa=yr("/",!1),aa=function(N,K,te){return{type:K==="*"?"multiplication":"division",right:te}},ee=function(N,K){return K.reduce((te,Ae)=>({left:te,...Ae}),N)},we=function(N,K,te){return{type:K==="+"?"addition":"subtraction",right:te}},je="$((",Be=yr("$((",!1),xe="))",Ve=yr("))",!1),vt=function(N){return N},tr="$(",Zr=yr("$(",!1),Tn=function(N){return N},_r="${",ei=yr("${",!1),Ti=":-",Kn=yr(":-",!1),ja=function(N,K){return{name:N,defaultValue:K}},la=":-}",yi=yr(":-}",!1),ca=function(N){return{name:N,defaultValue:[]}},Ga=":+",lo=yr(":+",!1),RA=function(N,K){return{name:N,alternativeValue:K}},Ic=":+}",ua=yr(":+}",!1),ng=function(N){return{name:N,alternativeValue:[]}},wc=function(N){return{name:N}},bm="$",ig=yr("$",!1),Vn=function(N){return e.isGlobPattern(N)},fp=function(N){return N},sg=/^[a-zA-Z0-9_]/,TA=ys([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Os=function(){return og()},Iu=/^[$@*?#a-zA-Z0-9_\-]/,Wa=ys(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),ji=/^[()}<>$|&; \t"']/,Aa=ys(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),wu=/^[<>&; \t"']/,ms=ys(["<",">","&",";"," "," ",'"',"'"],!1,!1),Bc=/^[ \t]/,vc=ys([" "," "],!1,!1),G=0,Dt=0,Dl=[{line:1,column:1}],Si=0,Dc=[],lt=0,Bu;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function og(){return t.substring(Dt,G)}function cI(){return Sc(Dt,G)}function NA(N,K){throw K=K!==void 0?K:Sc(Dt,G),ug([cg(N)],t.substring(Dt,G),K)}function pp(N,K){throw K=K!==void 0?K:Sc(Dt,G),Qm(N,K)}function yr(N,K){return{type:"literal",text:N,ignoreCase:K}}function ys(N,K,te){return{type:"class",parts:N,inverted:K,ignoreCase:te}}function ag(){return{type:"any"}}function lg(){return{type:"end"}}function cg(N){return{type:"other",description:N}}function hp(N){var K=Dl[N],te;if(K)return K;for(te=N-1;!Dl[te];)te--;for(K=Dl[te],K={line:K.line,column:K.column};te<N;)t.charCodeAt(te)===10?(K.line++,K.column=1):K.column++,te++;return Dl[N]=K,K}function Sc(N,K){var te=hp(N),Ae=hp(K);return{start:{offset:N,line:te.line,column:te.column},end:{offset:K,line:Ae.line,column:Ae.column}}}function mt(N){G<Si||(G>Si&&(Si=G,Dc=[]),Dc.push(N))}function Qm(N,K){return new Hg(N,null,null,K)}function ug(N,K,te){return new Hg(Hg.buildMessage(N,K),N,K,te)}function Ag(){var N,K,te;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();return K!==r?(te=vu(),te===r&&(te=null),te!==r?(Dt=N,K=n(te),N=K):(G=N,N=r)):(G=N,N=r),N}function vu(){var N,K,te,Ae,ze;if(N=G,K=Du(),K!==r){for(te=[],Ae=kt();Ae!==r;)te.push(Ae),Ae=kt();te!==r?(Ae=fg(),Ae!==r?(ze=km(),ze===r&&(ze=null),ze!==r?(Dt=N,K=u(K,Ae,ze),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r)}else G=N,N=r;if(N===r)if(N=G,K=Du(),K!==r){for(te=[],Ae=kt();Ae!==r;)te.push(Ae),Ae=kt();te!==r?(Ae=fg(),Ae===r&&(Ae=null),Ae!==r?(Dt=N,K=A(K,Ae),N=K):(G=N,N=r)):(G=N,N=r)}else G=N,N=r;return N}function km(){var N,K,te,Ae,ze;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)if(te=vu(),te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();Ae!==r?(Dt=N,K=p(te),N=K):(G=N,N=r)}else G=N,N=r;else G=N,N=r;return N}function fg(){var N;return t.charCodeAt(G)===59?(N=h,G++):(N=r,lt===0&&mt(C)),N===r&&(t.charCodeAt(G)===38?(N=w,G++):(N=r,lt===0&&mt(v))),N}function Du(){var N,K,te;return N=G,K=fa(),K!==r?(te=uI(),te===r&&(te=null),te!==r?(Dt=N,K=b(K,te),N=K):(G=N,N=r)):(G=N,N=r),N}function uI(){var N,K,te,Ae,ze,gt,ur;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)if(te=Fm(),te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();if(Ae!==r)if(ze=Du(),ze!==r){for(gt=[],ur=kt();ur!==r;)gt.push(ur),ur=kt();gt!==r?(Dt=N,K=E(te,ze),N=K):(G=N,N=r)}else G=N,N=r;else G=N,N=r}else G=N,N=r;else G=N,N=r;return N}function Fm(){var N;return t.substr(G,2)===R?(N=R,G+=2):(N=r,lt===0&&mt(L)),N===r&&(t.substr(G,2)===_?(N=_,G+=2):(N=r,lt===0&&mt(V))),N}function fa(){var N,K,te;return N=G,K=pg(),K!==r?(te=Pc(),te===r&&(te=null),te!==r?(Dt=N,K=re(K,te),N=K):(G=N,N=r)):(G=N,N=r),N}function Pc(){var N,K,te,Ae,ze,gt,ur;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)if(te=Sl(),te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();if(Ae!==r)if(ze=fa(),ze!==r){for(gt=[],ur=kt();ur!==r;)gt.push(ur),ur=kt();gt!==r?(Dt=N,K=ae(te,ze),N=K):(G=N,N=r)}else G=N,N=r;else G=N,N=r}else G=N,N=r;else G=N,N=r;return N}function Sl(){var N;return t.substr(G,2)===he?(N=he,G+=2):(N=r,lt===0&&mt(pe)),N===r&&(t.charCodeAt(G)===124?(N=De,G++):(N=r,lt===0&&mt(ge))),N}function Su(){var N,K,te,Ae,ze,gt;if(N=G,K=mg(),K!==r)if(t.charCodeAt(G)===61?(te=le,G++):(te=r,lt===0&&mt(Pe)),te!==r)if(Ae=_o(),Ae!==r){for(ze=[],gt=kt();gt!==r;)ze.push(gt),gt=kt();ze!==r?(Dt=N,K=g(K,Ae),N=K):(G=N,N=r)}else G=N,N=r;else G=N,N=r;else G=N,N=r;if(N===r)if(N=G,K=mg(),K!==r)if(t.charCodeAt(G)===61?(te=le,G++):(te=r,lt===0&&mt(Pe)),te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();Ae!==r?(Dt=N,K=ve(K),N=K):(G=N,N=r)}else G=N,N=r;else G=N,N=r;return N}function pg(){var N,K,te,Ae,ze,gt,ur,gr,hn,ri,Ni;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)if(t.charCodeAt(G)===40?(te=Ee,G++):(te=r,lt===0&&mt(de)),te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();if(Ae!==r)if(ze=vu(),ze!==r){for(gt=[],ur=kt();ur!==r;)gt.push(ur),ur=kt();if(gt!==r)if(t.charCodeAt(G)===41?(ur=ne,G++):(ur=r,lt===0&&mt(Z)),ur!==r){for(gr=[],hn=kt();hn!==r;)gr.push(hn),hn=kt();if(gr!==r){for(hn=[],ri=Ya();ri!==r;)hn.push(ri),ri=Ya();if(hn!==r){for(ri=[],Ni=kt();Ni!==r;)ri.push(Ni),Ni=kt();ri!==r?(Dt=N,K=me(ze,hn),N=K):(G=N,N=r)}else G=N,N=r}else G=N,N=r}else G=N,N=r;else G=N,N=r}else G=N,N=r;else G=N,N=r}else G=N,N=r;else G=N,N=r;if(N===r){for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)if(t.charCodeAt(G)===123?(te=be,G++):(te=r,lt===0&&mt(ut)),te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();if(Ae!==r)if(ze=vu(),ze!==r){for(gt=[],ur=kt();ur!==r;)gt.push(ur),ur=kt();if(gt!==r)if(t.charCodeAt(G)===125?(ur=H,G++):(ur=r,lt===0&&mt(yt)),ur!==r){for(gr=[],hn=kt();hn!==r;)gr.push(hn),hn=kt();if(gr!==r){for(hn=[],ri=Ya();ri!==r;)hn.push(ri),ri=Ya();if(hn!==r){for(ri=[],Ni=kt();Ni!==r;)ri.push(Ni),Ni=kt();ri!==r?(Dt=N,K=Me(ze,hn),N=K):(G=N,N=r)}else G=N,N=r}else G=N,N=r}else G=N,N=r;else G=N,N=r}else G=N,N=r;else G=N,N=r}else G=N,N=r;else G=N,N=r;if(N===r){for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r){for(te=[],Ae=Su();Ae!==r;)te.push(Ae),Ae=Su();if(te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();if(Ae!==r){if(ze=[],gt=gp(),gt!==r)for(;gt!==r;)ze.push(gt),gt=gp();else ze=r;if(ze!==r){for(gt=[],ur=kt();ur!==r;)gt.push(ur),ur=kt();gt!==r?(Dt=N,K=Te(te,ze),N=K):(G=N,N=r)}else G=N,N=r}else G=N,N=r}else G=N,N=r}else G=N,N=r;if(N===r){for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r){if(te=[],Ae=Su(),Ae!==r)for(;Ae!==r;)te.push(Ae),Ae=Su();else te=r;if(te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();Ae!==r?(Dt=N,K=Qe(te),N=K):(G=N,N=r)}else G=N,N=r}else G=N,N=r}}}return N}function LA(){var N,K,te,Ae,ze;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r){if(te=[],Ae=dp(),Ae!==r)for(;Ae!==r;)te.push(Ae),Ae=dp();else te=r;if(te!==r){for(Ae=[],ze=kt();ze!==r;)Ae.push(ze),ze=kt();Ae!==r?(Dt=N,K=_e(te),N=K):(G=N,N=r)}else G=N,N=r}else G=N,N=r;return N}function gp(){var N,K,te;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r?(te=Ya(),te!==r?(Dt=N,K=qe(te),N=K):(G=N,N=r)):(G=N,N=r),N===r){for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();K!==r?(te=dp(),te!==r?(Dt=N,K=qe(te),N=K):(G=N,N=r)):(G=N,N=r)}return N}function Ya(){var N,K,te,Ae,ze;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();return K!==r?(At.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(Oe)),te===r&&(te=null),te!==r?(Ae=hg(),Ae!==r?(ze=dp(),ze!==r?(Dt=N,K=x(te,Ae,ze),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N}function hg(){var N;return t.substr(G,2)===I?(N=I,G+=2):(N=r,lt===0&&mt(P)),N===r&&(t.substr(G,2)===y?(N=y,G+=2):(N=r,lt===0&&mt(F)),N===r&&(t.charCodeAt(G)===62?(N=z,G++):(N=r,lt===0&&mt(X)),N===r&&(t.substr(G,3)===$?(N=$,G+=3):(N=r,lt===0&&mt(ie)),N===r&&(t.substr(G,2)===ke?(N=ke,G+=2):(N=r,lt===0&&mt(Ne)),N===r&&(t.charCodeAt(G)===60?(N=st,G++):(N=r,lt===0&&mt(ht))))))),N}function dp(){var N,K,te;for(N=G,K=[],te=kt();te!==r;)K.push(te),te=kt();return K!==r?(te=_o(),te!==r?(Dt=N,K=qe(te),N=K):(G=N,N=r)):(G=N,N=r),N}function _o(){var N,K,te;if(N=G,K=[],te=Es(),te!==r)for(;te!==r;)K.push(te),te=Es();else K=r;return K!==r&&(Dt=N,K=Ut(K)),N=K,N}function Es(){var N,K;return N=G,K=Ei(),K!==r&&(Dt=N,K=Xt(K)),N=K,N===r&&(N=G,K=Rm(),K!==r&&(Dt=N,K=Xt(K)),N=K,N===r&&(N=G,K=Tm(),K!==r&&(Dt=N,K=Xt(K)),N=K,N===r&&(N=G,K=Ho(),K!==r&&(Dt=N,K=Xt(K)),N=K))),N}function Ei(){var N,K,te,Ae;return N=G,t.substr(G,2)===xt?(K=xt,G+=2):(K=r,lt===0&&mt(tn)),K!==r?(te=rn(),te!==r?(t.charCodeAt(G)===39?(Ae=Dr,G++):(Ae=r,lt===0&&mt(fr)),Ae!==r?(Dt=N,K=Br(te),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N}function Rm(){var N,K,te,Ae;return N=G,t.charCodeAt(G)===39?(K=Dr,G++):(K=r,lt===0&&mt(fr)),K!==r?(te=yp(),te!==r?(t.charCodeAt(G)===39?(Ae=Dr,G++):(Ae=r,lt===0&&mt(fr)),Ae!==r?(Dt=N,K=Br(te),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N}function Tm(){var N,K,te,Ae;if(N=G,t.substr(G,2)===jr?(K=jr,G+=2):(K=r,lt===0&&mt(Hn)),K!==r&&(Dt=N,K=bs()),N=K,N===r)if(N=G,t.charCodeAt(G)===34?(K=ki,G++):(K=r,lt===0&&mt(gs)),K!==r){for(te=[],Ae=OA();Ae!==r;)te.push(Ae),Ae=OA();te!==r?(t.charCodeAt(G)===34?(Ae=ki,G++):(Ae=r,lt===0&&mt(gs)),Ae!==r?(Dt=N,K=to(te),N=K):(G=N,N=r)):(G=N,N=r)}else G=N,N=r;return N}function Ho(){var N,K,te;if(N=G,K=[],te=mp(),te!==r)for(;te!==r;)K.push(te),te=mp();else K=r;return K!==r&&(Dt=N,K=to(K)),N=K,N}function OA(){var N,K;return N=G,K=Hr(),K!==r&&(Dt=N,K=Di(K)),N=K,N===r&&(N=G,K=Ep(),K!==r&&(Dt=N,K=Qs(K)),N=K,N===r&&(N=G,K=bc(),K!==r&&(Dt=N,K=ro(K)),N=K,N===r&&(N=G,K=gg(),K!==r&&(Dt=N,K=hc(K)),N=K))),N}function mp(){var N,K;return N=G,K=Hr(),K!==r&&(Dt=N,K=gu(K)),N=K,N===r&&(N=G,K=Ep(),K!==r&&(Dt=N,K=cp(K)),N=K,N===r&&(N=G,K=bc(),K!==r&&(Dt=N,K=up(K)),N=K,N===r&&(N=G,K=AI(),K!==r&&(Dt=N,K=ks(K)),N=K,N===r&&(N=G,K=ha(),K!==r&&(Dt=N,K=hc(K)),N=K)))),N}function yp(){var N,K,te;for(N=G,K=[],Cn.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(no));te!==r;)K.push(te),Cn.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(no));return K!==r&&(Dt=N,K=Fs(K)),N=K,N}function gg(){var N,K,te;if(N=G,K=[],te=pa(),te===r&&(Cl.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(Il))),te!==r)for(;te!==r;)K.push(te),te=pa(),te===r&&(Cl.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(Il)));else K=r;return K!==r&&(Dt=N,K=Fs(K)),N=K,N}function pa(){var N,K,te;return N=G,t.substr(G,2)===io?(K=io,G+=2):(K=r,lt===0&&mt(Ue)),K!==r&&(Dt=N,K=Fn()),N=K,N===r&&(N=G,t.charCodeAt(G)===92?(K=Fi,G++):(K=r,lt===0&&mt(Rn)),K!==r?(Ui.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(Zt)),te!==r?(Dt=N,K=Ri(te),N=K):(G=N,N=r)):(G=N,N=r)),N}function rn(){var N,K,te;for(N=G,K=[],te=co(),te===r&&(Cn.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(no)));te!==r;)K.push(te),te=co(),te===r&&(Cn.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(no)));return K!==r&&(Dt=N,K=Fs(K)),N=K,N}function co(){var N,K,te;return N=G,t.substr(G,2)===$n?(K=$n,G+=2):(K=r,lt===0&&mt(Ua)),K!==r&&(Dt=N,K=$t()),N=K,N===r&&(N=G,t.substr(G,2)===gc?(K=gc,G+=2):(K=r,lt===0&&mt(du)),K!==r&&(Dt=N,K=dc()),N=K,N===r&&(N=G,t.charCodeAt(G)===92?(K=Fi,G++):(K=r,lt===0&&mt(Rn)),K!==r?(wl.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(xA)),te!==r?(Dt=N,K=mu(),N=K):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===Ce?(K=Ce,G+=2):(K=r,lt===0&&mt(Rt)),K!==r&&(Dt=N,K=mc()),N=K,N===r&&(N=G,t.substr(G,2)===_i?(K=_i,G+=2):(K=r,lt===0&&mt(yu)),K!==r&&(Dt=N,K=qt()),N=K,N===r&&(N=G,t.substr(G,2)===Bl?(K=Bl,G+=2):(K=r,lt===0&&mt(bA)),K!==r&&(Dt=N,K=Ap()),N=K,N===r&&(N=G,t.substr(G,2)===yc?(K=yc,G+=2):(K=r,lt===0&&mt(QA)),K!==r&&(Dt=N,K=Dn()),N=K,N===r&&(N=G,t.substr(G,2)===ui?(K=ui,G+=2):(K=r,lt===0&&mt(Ec)),K!==r&&(Dt=N,K=kA()),N=K,N===r&&(N=G,t.charCodeAt(G)===92?(K=Fi,G++):(K=r,lt===0&&mt(Rn)),K!==r?(na.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(Hi)),te!==r?(Dt=N,K=Ri(te),N=K):(G=N,N=r)):(G=N,N=r),N===r&&(N=MA()))))))))),N}function MA(){var N,K,te,Ae,ze,gt,ur,gr,hn,ri,Ni,Eg;return N=G,t.charCodeAt(G)===92?(K=Fi,G++):(K=r,lt===0&&mt(Rn)),K!==r?(te=Ka(),te!==r?(Dt=N,K=Mo(te),N=K):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===$e?(K=$e,G+=2):(K=r,lt===0&&mt(so)),K!==r?(te=G,Ae=G,ze=Ka(),ze!==r?(gt=ti(),gt!==r?(ze=[ze,gt],Ae=ze):(G=Ae,Ae=r)):(G=Ae,Ae=r),Ae===r&&(Ae=Ka()),Ae!==r?te=t.substring(te,G):te=Ae,te!==r?(Dt=N,K=Mo(te),N=K):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===vl?(K=vl,G+=2):(K=r,lt===0&&mt(Eu)),K!==r?(te=G,Ae=G,ze=ti(),ze!==r?(gt=ti(),gt!==r?(ur=ti(),ur!==r?(gr=ti(),gr!==r?(ze=[ze,gt,ur,gr],Ae=ze):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r),Ae!==r?te=t.substring(te,G):te=Ae,te!==r?(Dt=N,K=Mo(te),N=K):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===qi?(K=qi,G+=2):(K=r,lt===0&&mt(Cu)),K!==r?(te=G,Ae=G,ze=ti(),ze!==r?(gt=ti(),gt!==r?(ur=ti(),ur!==r?(gr=ti(),gr!==r?(hn=ti(),hn!==r?(ri=ti(),ri!==r?(Ni=ti(),Ni!==r?(Eg=ti(),Eg!==r?(ze=[ze,gt,ur,gr,hn,ri,Ni,Eg],Ae=ze):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r)):(G=Ae,Ae=r),Ae!==r?te=t.substring(te,G):te=Ae,te!==r?(Dt=N,K=FA(te),N=K):(G=N,N=r)):(G=N,N=r)))),N}function Ka(){var N;return Ha.test(t.charAt(G))?(N=t.charAt(G),G++):(N=r,lt===0&&mt(Cc)),N}function ti(){var N;return ds.test(t.charAt(G))?(N=t.charAt(G),G++):(N=r,lt===0&&mt(Ot)),N}function ha(){var N,K,te,Ae,ze;if(N=G,K=[],te=G,t.charCodeAt(G)===92?(Ae=Fi,G++):(Ae=r,lt===0&&mt(Rn)),Ae!==r?(t.length>G?(ze=t.charAt(G),G++):(ze=r,lt===0&&mt(Sn)),ze!==r?(Dt=te,Ae=Ri(ze),te=Ae):(G=te,te=r)):(G=te,te=r),te===r&&(te=G,t.substr(G,2)===di?(Ae=di,G+=2):(Ae=r,lt===0&&mt(ia)),Ae!==r&&(Dt=te,Ae=oo()),te=Ae,te===r&&(te=G,Ae=G,lt++,ze=Nm(),lt--,ze===r?Ae=void 0:(G=Ae,Ae=r),Ae!==r?(t.length>G?(ze=t.charAt(G),G++):(ze=r,lt===0&&mt(Sn)),ze!==r?(Dt=te,Ae=Ri(ze),te=Ae):(G=te,te=r)):(G=te,te=r))),te!==r)for(;te!==r;)K.push(te),te=G,t.charCodeAt(G)===92?(Ae=Fi,G++):(Ae=r,lt===0&&mt(Rn)),Ae!==r?(t.length>G?(ze=t.charAt(G),G++):(ze=r,lt===0&&mt(Sn)),ze!==r?(Dt=te,Ae=Ri(ze),te=Ae):(G=te,te=r)):(G=te,te=r),te===r&&(te=G,t.substr(G,2)===di?(Ae=di,G+=2):(Ae=r,lt===0&&mt(ia)),Ae!==r&&(Dt=te,Ae=oo()),te=Ae,te===r&&(te=G,Ae=G,lt++,ze=Nm(),lt--,ze===r?Ae=void 0:(G=Ae,Ae=r),Ae!==r?(t.length>G?(ze=t.charAt(G),G++):(ze=r,lt===0&&mt(Sn)),ze!==r?(Dt=te,Ae=Ri(ze),te=Ae):(G=te,te=r)):(G=te,te=r)));else K=r;return K!==r&&(Dt=N,K=Fs(K)),N=K,N}function xc(){var N,K,te,Ae,ze,gt;if(N=G,t.charCodeAt(G)===45?(K=Rs,G++):(K=r,lt===0&&mt(sa)),K===r&&(t.charCodeAt(G)===43?(K=oa,G++):(K=r,lt===0&&mt(Uo))),K===r&&(K=null),K!==r){if(te=[],At.test(t.charAt(G))?(Ae=t.charAt(G),G++):(Ae=r,lt===0&&mt(Oe)),Ae!==r)for(;Ae!==r;)te.push(Ae),At.test(t.charAt(G))?(Ae=t.charAt(G),G++):(Ae=r,lt===0&&mt(Oe));else te=r;if(te!==r)if(t.charCodeAt(G)===46?(Ae=Zi,G++):(Ae=r,lt===0&&mt(Ts)),Ae!==r){if(ze=[],At.test(t.charAt(G))?(gt=t.charAt(G),G++):(gt=r,lt===0&&mt(Oe)),gt!==r)for(;gt!==r;)ze.push(gt),At.test(t.charAt(G))?(gt=t.charAt(G),G++):(gt=r,lt===0&&mt(Oe));else ze=r;ze!==r?(Dt=N,K=Ns(K,te,ze),N=K):(G=N,N=r)}else G=N,N=r;else G=N,N=r}else G=N,N=r;if(N===r){if(N=G,t.charCodeAt(G)===45?(K=Rs,G++):(K=r,lt===0&&mt(sa)),K===r&&(t.charCodeAt(G)===43?(K=oa,G++):(K=r,lt===0&&mt(Uo))),K===r&&(K=null),K!==r){if(te=[],At.test(t.charAt(G))?(Ae=t.charAt(G),G++):(Ae=r,lt===0&&mt(Oe)),Ae!==r)for(;Ae!==r;)te.push(Ae),At.test(t.charAt(G))?(Ae=t.charAt(G),G++):(Ae=r,lt===0&&mt(Oe));else te=r;te!==r?(Dt=N,K=Ls(K,te),N=K):(G=N,N=r)}else G=N,N=r;if(N===r&&(N=G,K=bc(),K!==r&&(Dt=N,K=ao(K)),N=K,N===r&&(N=G,K=Va(),K!==r&&(Dt=N,K=Yn(K)),N=K,N===r)))if(N=G,t.charCodeAt(G)===40?(K=Ee,G++):(K=r,lt===0&&mt(de)),K!==r){for(te=[],Ae=kt();Ae!==r;)te.push(Ae),Ae=kt();if(te!==r)if(Ae=ts(),Ae!==r){for(ze=[],gt=kt();gt!==r;)ze.push(gt),gt=kt();ze!==r?(t.charCodeAt(G)===41?(gt=ne,G++):(gt=r,lt===0&&mt(Z)),gt!==r?(Dt=N,K=qn(Ae),N=K):(G=N,N=r)):(G=N,N=r)}else G=N,N=r;else G=N,N=r}else G=N,N=r}return N}function Pl(){var N,K,te,Ae,ze,gt,ur,gr;if(N=G,K=xc(),K!==r){for(te=[],Ae=G,ze=[],gt=kt();gt!==r;)ze.push(gt),gt=kt();if(ze!==r)if(t.charCodeAt(G)===42?(gt=$i,G++):(gt=r,lt===0&&mt(es)),gt===r&&(t.charCodeAt(G)===47?(gt=mi,G++):(gt=r,lt===0&&mt(qa))),gt!==r){for(ur=[],gr=kt();gr!==r;)ur.push(gr),gr=kt();ur!==r?(gr=xc(),gr!==r?(Dt=Ae,ze=aa(K,gt,gr),Ae=ze):(G=Ae,Ae=r)):(G=Ae,Ae=r)}else G=Ae,Ae=r;else G=Ae,Ae=r;for(;Ae!==r;){for(te.push(Ae),Ae=G,ze=[],gt=kt();gt!==r;)ze.push(gt),gt=kt();if(ze!==r)if(t.charCodeAt(G)===42?(gt=$i,G++):(gt=r,lt===0&&mt(es)),gt===r&&(t.charCodeAt(G)===47?(gt=mi,G++):(gt=r,lt===0&&mt(qa))),gt!==r){for(ur=[],gr=kt();gr!==r;)ur.push(gr),gr=kt();ur!==r?(gr=xc(),gr!==r?(Dt=Ae,ze=aa(K,gt,gr),Ae=ze):(G=Ae,Ae=r)):(G=Ae,Ae=r)}else G=Ae,Ae=r;else G=Ae,Ae=r}te!==r?(Dt=N,K=ee(K,te),N=K):(G=N,N=r)}else G=N,N=r;return N}function ts(){var N,K,te,Ae,ze,gt,ur,gr;if(N=G,K=Pl(),K!==r){for(te=[],Ae=G,ze=[],gt=kt();gt!==r;)ze.push(gt),gt=kt();if(ze!==r)if(t.charCodeAt(G)===43?(gt=oa,G++):(gt=r,lt===0&&mt(Uo)),gt===r&&(t.charCodeAt(G)===45?(gt=Rs,G++):(gt=r,lt===0&&mt(sa))),gt!==r){for(ur=[],gr=kt();gr!==r;)ur.push(gr),gr=kt();ur!==r?(gr=Pl(),gr!==r?(Dt=Ae,ze=we(K,gt,gr),Ae=ze):(G=Ae,Ae=r)):(G=Ae,Ae=r)}else G=Ae,Ae=r;else G=Ae,Ae=r;for(;Ae!==r;){for(te.push(Ae),Ae=G,ze=[],gt=kt();gt!==r;)ze.push(gt),gt=kt();if(ze!==r)if(t.charCodeAt(G)===43?(gt=oa,G++):(gt=r,lt===0&&mt(Uo)),gt===r&&(t.charCodeAt(G)===45?(gt=Rs,G++):(gt=r,lt===0&&mt(sa))),gt!==r){for(ur=[],gr=kt();gr!==r;)ur.push(gr),gr=kt();ur!==r?(gr=Pl(),gr!==r?(Dt=Ae,ze=we(K,gt,gr),Ae=ze):(G=Ae,Ae=r)):(G=Ae,Ae=r)}else G=Ae,Ae=r;else G=Ae,Ae=r}te!==r?(Dt=N,K=ee(K,te),N=K):(G=N,N=r)}else G=N,N=r;return N}function Hr(){var N,K,te,Ae,ze,gt;if(N=G,t.substr(G,3)===je?(K=je,G+=3):(K=r,lt===0&&mt(Be)),K!==r){for(te=[],Ae=kt();Ae!==r;)te.push(Ae),Ae=kt();if(te!==r)if(Ae=ts(),Ae!==r){for(ze=[],gt=kt();gt!==r;)ze.push(gt),gt=kt();ze!==r?(t.substr(G,2)===xe?(gt=xe,G+=2):(gt=r,lt===0&&mt(Ve)),gt!==r?(Dt=N,K=vt(Ae),N=K):(G=N,N=r)):(G=N,N=r)}else G=N,N=r;else G=N,N=r}else G=N,N=r;return N}function Ep(){var N,K,te,Ae;return N=G,t.substr(G,2)===tr?(K=tr,G+=2):(K=r,lt===0&&mt(Zr)),K!==r?(te=vu(),te!==r?(t.charCodeAt(G)===41?(Ae=ne,G++):(Ae=r,lt===0&&mt(Z)),Ae!==r?(Dt=N,K=Tn(te),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N}function bc(){var N,K,te,Ae,ze,gt;return N=G,t.substr(G,2)===_r?(K=_r,G+=2):(K=r,lt===0&&mt(ei)),K!==r?(te=Va(),te!==r?(t.substr(G,2)===Ti?(Ae=Ti,G+=2):(Ae=r,lt===0&&mt(Kn)),Ae!==r?(ze=LA(),ze!==r?(t.charCodeAt(G)===125?(gt=H,G++):(gt=r,lt===0&&mt(yt)),gt!==r?(Dt=N,K=ja(te,ze),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===_r?(K=_r,G+=2):(K=r,lt===0&&mt(ei)),K!==r?(te=Va(),te!==r?(t.substr(G,3)===la?(Ae=la,G+=3):(Ae=r,lt===0&&mt(yi)),Ae!==r?(Dt=N,K=ca(te),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===_r?(K=_r,G+=2):(K=r,lt===0&&mt(ei)),K!==r?(te=Va(),te!==r?(t.substr(G,2)===Ga?(Ae=Ga,G+=2):(Ae=r,lt===0&&mt(lo)),Ae!==r?(ze=LA(),ze!==r?(t.charCodeAt(G)===125?(gt=H,G++):(gt=r,lt===0&&mt(yt)),gt!==r?(Dt=N,K=RA(te,ze),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===_r?(K=_r,G+=2):(K=r,lt===0&&mt(ei)),K!==r?(te=Va(),te!==r?(t.substr(G,3)===Ic?(Ae=Ic,G+=3):(Ae=r,lt===0&&mt(ua)),Ae!==r?(Dt=N,K=ng(te),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.substr(G,2)===_r?(K=_r,G+=2):(K=r,lt===0&&mt(ei)),K!==r?(te=Va(),te!==r?(t.charCodeAt(G)===125?(Ae=H,G++):(Ae=r,lt===0&&mt(yt)),Ae!==r?(Dt=N,K=wc(te),N=K):(G=N,N=r)):(G=N,N=r)):(G=N,N=r),N===r&&(N=G,t.charCodeAt(G)===36?(K=bm,G++):(K=r,lt===0&&mt(ig)),K!==r?(te=Va(),te!==r?(Dt=N,K=wc(te),N=K):(G=N,N=r)):(G=N,N=r)))))),N}function AI(){var N,K,te;return N=G,K=dg(),K!==r?(Dt=G,te=Vn(K),te?te=void 0:te=r,te!==r?(Dt=N,K=fp(K),N=K):(G=N,N=r)):(G=N,N=r),N}function dg(){var N,K,te,Ae,ze;if(N=G,K=[],te=G,Ae=G,lt++,ze=yg(),lt--,ze===r?Ae=void 0:(G=Ae,Ae=r),Ae!==r?(t.length>G?(ze=t.charAt(G),G++):(ze=r,lt===0&&mt(Sn)),ze!==r?(Dt=te,Ae=Ri(ze),te=Ae):(G=te,te=r)):(G=te,te=r),te!==r)for(;te!==r;)K.push(te),te=G,Ae=G,lt++,ze=yg(),lt--,ze===r?Ae=void 0:(G=Ae,Ae=r),Ae!==r?(t.length>G?(ze=t.charAt(G),G++):(ze=r,lt===0&&mt(Sn)),ze!==r?(Dt=te,Ae=Ri(ze),te=Ae):(G=te,te=r)):(G=te,te=r);else K=r;return K!==r&&(Dt=N,K=Fs(K)),N=K,N}function mg(){var N,K,te;if(N=G,K=[],sg.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(TA)),te!==r)for(;te!==r;)K.push(te),sg.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(TA));else K=r;return K!==r&&(Dt=N,K=Os()),N=K,N}function Va(){var N,K,te;if(N=G,K=[],Iu.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(Wa)),te!==r)for(;te!==r;)K.push(te),Iu.test(t.charAt(G))?(te=t.charAt(G),G++):(te=r,lt===0&&mt(Wa));else K=r;return K!==r&&(Dt=N,K=Os()),N=K,N}function Nm(){var N;return ji.test(t.charAt(G))?(N=t.charAt(G),G++):(N=r,lt===0&&mt(Aa)),N}function yg(){var N;return wu.test(t.charAt(G))?(N=t.charAt(G),G++):(N=r,lt===0&&mt(ms)),N}function kt(){var N,K;if(N=[],Bc.test(t.charAt(G))?(K=t.charAt(G),G++):(K=r,lt===0&&mt(vc)),K!==r)for(;K!==r;)N.push(K),Bc.test(t.charAt(G))?(K=t.charAt(G),G++):(K=r,lt===0&&mt(vc));else N=r;return N}if(Bu=a(),Bu!==r&&G===t.length)return Bu;throw Bu!==r&&G<t.length&&mt(lg()),ug(Dc,Si<t.length?t.charAt(Si):null,Si<t.length?Sc(Si,Si+1):Sc(Si,Si))}oY.exports={SyntaxError:Hg,parse:L8e}});function PD(t,e={isGlobPattern:()=>!1}){try{return(0,lY.parse)(t,e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function fy(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:o},a)=>`${xD(r)}${o===";"?a!==t.length-1||e?";":"":" &"}`).join(" ")}function xD(t){return`${py(t.chain)}${t.then?` ${cT(t.then)}`:""}`}function cT(t){return`${t.type} ${xD(t.line)}`}function py(t){return`${AT(t)}${t.then?` ${uT(t.then)}`:""}`}function uT(t){return`${t.type} ${py(t.chain)}`}function AT(t){switch(t.type){case"command":return`${t.envs.length>0?`${t.envs.map(e=>SD(e)).join(" ")} `:""}${t.args.map(e=>fT(e)).join(" ")}`;case"subshell":return`(${fy(t.subshell)})${t.args.length>0?` ${t.args.map(e=>qI(e)).join(" ")}`:""}`;case"group":return`{ ${fy(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>qI(e)).join(" ")}`:""}`;case"envs":return t.envs.map(e=>SD(e)).join(" ");default:throw new Error(`Unsupported command type: "${t.type}"`)}}function SD(t){return`${t.name}=${t.args[0]?qg(t.args[0]):""}`}function fT(t){switch(t.type){case"redirection":return qI(t);case"argument":return qg(t);default:throw new Error(`Unsupported argument type: "${t.type}"`)}}function qI(t){return`${t.subtype} ${t.args.map(e=>qg(e)).join(" ")}`}function qg(t){return t.segments.map(e=>pT(e)).join("")}function pT(t){let e=(o,a)=>a?`"${o}"`:o,r=o=>o===""?'""':o.match(/[(){}<>$|&; \t"']/)?`$'${o.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0")}'`:o;switch(t.type){case"text":return r(t.text);case"glob":return t.pattern;case"shell":return e(`\${${fy(t.shell)}}`,t.quoted);case"variable":return e(typeof t.defaultValue>"u"?typeof t.alternativeValue>"u"?`\${${t.name}}`:t.alternativeValue.length===0?`\${${t.name}:+}`:`\${${t.name}:+${t.alternativeValue.map(o=>qg(o)).join(" ")}}`:t.defaultValue.length===0?`\${${t.name}:-}`:`\${${t.name}:-${t.defaultValue.map(o=>qg(o)).join(" ")}}`,t.quoted);case"arithmetic":return`$(( ${bD(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${t.type}"`)}}function bD(t){let e=a=>{switch(a){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${a}"`)}},r=(a,n)=>n?`( ${a} )`:a,o=a=>r(bD(a),!["number","variable"].includes(a.type));switch(t.type){case"number":return String(t.value);case"variable":return t.name;default:return`${o(t.left)} ${e(t.type)} ${o(t.right)}`}}var lY,cY=dt(()=>{lY=tt(aY())});var AY=U((xxt,uY)=>{"use strict";function O8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function jg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,jg)}O8e(jg,Error);jg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",w;for(w=0;w<h.parts.length;w++)C+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),w,v;for(w=0;w<h.length;w++)C[w]=u(h[w]);if(C.sort(),C.length>0){for(w=1,v=1;w<C.length;w++)C[w-1]!==C[w]&&(C[v]=C[w],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function M8e(t,e){e=e!==void 0?e:{};var r={},o={resolution:Te},a=Te,n="/",u=Ee("/",!1),A=function(Oe,x){return{from:Oe,descriptor:x}},p=function(Oe){return{descriptor:Oe}},h="@",C=Ee("@",!1),w=function(Oe,x){return{fullName:Oe,description:x}},v=function(Oe){return{fullName:Oe}},b=function(){return le()},E=/^[^\/@]/,R=de(["/","@"],!0,!1),L=/^[^\/]/,_=de(["/"],!0,!1),V=0,re=0,ae=[{line:1,column:1}],he=0,pe=[],De=0,ge;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function le(){return t.substring(re,V)}function Pe(){return ut(re,V)}function g(Oe,x){throw x=x!==void 0?x:ut(re,V),Me([me(Oe)],t.substring(re,V),x)}function ve(Oe,x){throw x=x!==void 0?x:ut(re,V),yt(Oe,x)}function Ee(Oe,x){return{type:"literal",text:Oe,ignoreCase:x}}function de(Oe,x,I){return{type:"class",parts:Oe,inverted:x,ignoreCase:I}}function ne(){return{type:"any"}}function Z(){return{type:"end"}}function me(Oe){return{type:"other",description:Oe}}function be(Oe){var x=ae[Oe],I;if(x)return x;for(I=Oe-1;!ae[I];)I--;for(x=ae[I],x={line:x.line,column:x.column};I<Oe;)t.charCodeAt(I)===10?(x.line++,x.column=1):x.column++,I++;return ae[Oe]=x,x}function ut(Oe,x){var I=be(Oe),P=be(x);return{start:{offset:Oe,line:I.line,column:I.column},end:{offset:x,line:P.line,column:P.column}}}function H(Oe){V<he||(V>he&&(he=V,pe=[]),pe.push(Oe))}function yt(Oe,x){return new jg(Oe,null,null,x)}function Me(Oe,x,I){return new jg(jg.buildMessage(Oe,x),Oe,x,I)}function Te(){var Oe,x,I,P;return Oe=V,x=Qe(),x!==r?(t.charCodeAt(V)===47?(I=n,V++):(I=r,De===0&&H(u)),I!==r?(P=Qe(),P!==r?(re=Oe,x=A(x,P),Oe=x):(V=Oe,Oe=r)):(V=Oe,Oe=r)):(V=Oe,Oe=r),Oe===r&&(Oe=V,x=Qe(),x!==r&&(re=Oe,x=p(x)),Oe=x),Oe}function Qe(){var Oe,x,I,P;return Oe=V,x=_e(),x!==r?(t.charCodeAt(V)===64?(I=h,V++):(I=r,De===0&&H(C)),I!==r?(P=At(),P!==r?(re=Oe,x=w(x,P),Oe=x):(V=Oe,Oe=r)):(V=Oe,Oe=r)):(V=Oe,Oe=r),Oe===r&&(Oe=V,x=_e(),x!==r&&(re=Oe,x=v(x)),Oe=x),Oe}function _e(){var Oe,x,I,P,y;return Oe=V,t.charCodeAt(V)===64?(x=h,V++):(x=r,De===0&&H(C)),x!==r?(I=qe(),I!==r?(t.charCodeAt(V)===47?(P=n,V++):(P=r,De===0&&H(u)),P!==r?(y=qe(),y!==r?(re=Oe,x=b(),Oe=x):(V=Oe,Oe=r)):(V=Oe,Oe=r)):(V=Oe,Oe=r)):(V=Oe,Oe=r),Oe===r&&(Oe=V,x=qe(),x!==r&&(re=Oe,x=b()),Oe=x),Oe}function qe(){var Oe,x,I;if(Oe=V,x=[],E.test(t.charAt(V))?(I=t.charAt(V),V++):(I=r,De===0&&H(R)),I!==r)for(;I!==r;)x.push(I),E.test(t.charAt(V))?(I=t.charAt(V),V++):(I=r,De===0&&H(R));else x=r;return x!==r&&(re=Oe,x=b()),Oe=x,Oe}function At(){var Oe,x,I;if(Oe=V,x=[],L.test(t.charAt(V))?(I=t.charAt(V),V++):(I=r,De===0&&H(_)),I!==r)for(;I!==r;)x.push(I),L.test(t.charAt(V))?(I=t.charAt(V),V++):(I=r,De===0&&H(_));else x=r;return x!==r&&(re=Oe,x=b()),Oe=x,Oe}if(ge=a(),ge!==r&&V===t.length)return ge;throw ge!==r&&V<t.length&&H(Z()),Me(pe,he<t.length?t.charAt(he):null,he<t.length?ut(he,he+1):ut(he,he))}uY.exports={SyntaxError:jg,parse:M8e}});function QD(t){let e=t.match(/^\*{1,2}\/(.*)/);if(e)throw new Error(`The override for '${t}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${e[1]}' instead.`);try{return(0,fY.parse)(t)}catch(r){throw r.location&&(r.message=r.message.replace(/(\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function kD(t){let e="";return t.from&&(e+=t.from.fullName,t.from.description&&(e+=`@${t.from.description}`),e+="/"),e+=t.descriptor.fullName,t.descriptor.description&&(e+=`@${t.descriptor.description}`),e}var fY,pY=dt(()=>{fY=tt(AY())});var Wg=U((Qxt,Gg)=>{"use strict";function hY(t){return typeof t>"u"||t===null}function U8e(t){return typeof t=="object"&&t!==null}function _8e(t){return Array.isArray(t)?t:hY(t)?[]:[t]}function H8e(t,e){var r,o,a,n;if(e)for(n=Object.keys(e),r=0,o=n.length;r<o;r+=1)a=n[r],t[a]=e[a];return t}function q8e(t,e){var r="",o;for(o=0;o<e;o+=1)r+=t;return r}function j8e(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}Gg.exports.isNothing=hY;Gg.exports.isObject=U8e;Gg.exports.toArray=_8e;Gg.exports.repeat=q8e;Gg.exports.isNegativeZero=j8e;Gg.exports.extend=H8e});var hy=U((kxt,gY)=>{"use strict";function jI(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}jI.prototype=Object.create(Error.prototype);jI.prototype.constructor=jI;jI.prototype.toString=function(e){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!e&&this.mark&&(r+=" "+this.mark.toString()),r};gY.exports=jI});var yY=U((Fxt,mY)=>{"use strict";var dY=Wg();function hT(t,e,r,o,a){this.name=t,this.buffer=e,this.position=r,this.line=o,this.column=a}hT.prototype.getSnippet=function(e,r){var o,a,n,u,A;if(!this.buffer)return null;for(e=e||4,r=r||75,o="",a=this.position;a>0&&`\0\r
13\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
14\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),dY.repeat(" ",e)+o+A+n+`
15`+dY.repeat(" ",e+this.position-a+o.length)+"^"};hT.prototype.toString=function(e){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(o+=`:
16`+r)),o};mY.exports=hT});var as=U((Rxt,CY)=>{"use strict";var EY=hy(),G8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],W8e=["scalar","sequence","mapping"];function Y8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function K8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(G8e.indexOf(r)===-1)throw new EY('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=Y8e(e.styleAliases||null),W8e.indexOf(this.kind)===-1)throw new EY('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}CY.exports=K8e});var Yg=U((Txt,wY)=>{"use strict";var IY=Wg(),FD=hy(),V8e=as();function gT(t,e,r){var o=[];return t.include.forEach(function(a){r=gT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function J8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function o(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(o);return t}function gy(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new FD("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=gT(this,"implicit",[]),this.compiledExplicit=gT(this,"explicit",[]),this.compiledTypeMap=J8e(this.compiledImplicit,this.compiledExplicit)}gy.DEFAULT=null;gy.create=function(){var e,r;switch(arguments.length){case 1:e=gy.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new FD("Wrong number of arguments for Schema.create function")}if(e=IY.toArray(e),r=IY.toArray(r),!e.every(function(o){return o instanceof gy}))throw new FD("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof V8e}))throw new FD("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new gy({include:e,explicit:r})};wY.exports=gy});var vY=U((Nxt,BY)=>{"use strict";var z8e=as();BY.exports=new z8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var SY=U((Lxt,DY)=>{"use strict";var X8e=as();DY.exports=new X8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var xY=U((Oxt,PY)=>{"use strict";var Z8e=as();PY.exports=new Z8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var RD=U((Mxt,bY)=>{"use strict";var $8e=Yg();bY.exports=new $8e({explicit:[vY(),SY(),xY()]})});var kY=U((Uxt,QY)=>{"use strict";var eHe=as();function tHe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function rHe(){return null}function nHe(t){return t===null}QY.exports=new eHe("tag:yaml.org,2002:null",{kind:"scalar",resolve:tHe,construct:rHe,predicate:nHe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var RY=U((_xt,FY)=>{"use strict";var iHe=as();function sHe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function oHe(t){return t==="true"||t==="True"||t==="TRUE"}function aHe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}FY.exports=new iHe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:sHe,construct:oHe,predicate:aHe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var NY=U((Hxt,TY)=>{"use strict";var lHe=Wg(),cHe=as();function uHe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function AHe(t){return 48<=t&&t<=55}function fHe(t){return 48<=t&&t<=57}function pHe(t){if(t===null)return!1;var e=t.length,r=0,o=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;o=!0}return o&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!uHe(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}for(;r<e;r++)if(a=t[r],a!=="_"){if(!AHe(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}if(a==="_")return!1;for(;r<e;r++)if(a=t[r],a!=="_"){if(a===":")break;if(!fHe(t.charCodeAt(r)))return!1;o=!0}return!o||a==="_"?!1:a!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))}function hHe(t){var e=t,r=1,o,a,n=[];return e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),o=e[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),e=e.slice(1),o=e[0]),e==="0"?0:o==="0"?e[1]==="b"?r*parseInt(e.slice(2),2):e[1]==="x"?r*parseInt(e,16):r*parseInt(e,8):e.indexOf(":")!==-1?(e.split(":").forEach(function(u){n.unshift(parseInt(u,10))}),e=0,a=1,n.forEach(function(u){e+=u*a,a*=60}),r*e):r*parseInt(e,10)}function gHe(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!lHe.isNegativeZero(t)}TY.exports=new cHe("tag:yaml.org,2002:int",{kind:"scalar",resolve:pHe,construct:hHe,predicate:gHe,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var MY=U((qxt,OY)=>{"use strict";var LY=Wg(),dHe=as(),mHe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function yHe(t){return!(t===null||!mHe.test(t)||t[t.length-1]==="_")}function EHe(t){var e,r,o,a;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,a=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(n){a.unshift(parseFloat(n,10))}),e=0,o=1,a.forEach(function(n){e+=n*o,o*=60}),r*e):r*parseFloat(e,10)}var CHe=/^[-+]?[0-9]+e/;function IHe(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(LY.isNegativeZero(t))return"-0.0";return r=t.toString(10),CHe.test(r)?r.replace("e",".e"):r}function wHe(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||LY.isNegativeZero(t))}OY.exports=new dHe("tag:yaml.org,2002:float",{kind:"scalar",resolve:yHe,construct:EHe,predicate:wHe,represent:IHe,defaultStyle:"lowercase"})});var dT=U((jxt,UY)=>{"use strict";var BHe=Yg();UY.exports=new BHe({include:[RD()],implicit:[kY(),RY(),NY(),MY()]})});var mT=U((Gxt,_Y)=>{"use strict";var vHe=Yg();_Y.exports=new vHe({include:[dT()]})});var GY=U((Wxt,jY)=>{"use strict";var DHe=as(),HY=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),qY=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function SHe(t){return t===null?!1:HY.exec(t)!==null||qY.exec(t)!==null}function PHe(t){var e,r,o,a,n,u,A,p=0,h=null,C,w,v;if(e=HY.exec(t),e===null&&(e=qY.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],o=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,o,a));if(n=+e[4],u=+e[5],A=+e[6],e[7]){for(p=e[7].slice(0,3);p.length<3;)p+="0";p=+p}return e[9]&&(C=+e[10],w=+(e[11]||0),h=(C*60+w)*6e4,e[9]==="-"&&(h=-h)),v=new Date(Date.UTC(r,o,a,n,u,A,p)),h&&v.setTime(v.getTime()-h),v}function xHe(t){return t.toISOString()}jY.exports=new DHe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:SHe,construct:PHe,instanceOf:Date,represent:xHe})});var YY=U((Yxt,WY)=>{"use strict";var bHe=as();function QHe(t){return t==="<<"||t===null}WY.exports=new bHe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:QHe})});var JY=U((Kxt,VY)=>{"use strict";var Kg;try{KY=Ie,Kg=KY("buffer").Buffer}catch{}var KY,kHe=as(),yT=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
17\r`;function FHe(t){if(t===null)return!1;var e,r,o=0,a=t.length,n=yT;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;o+=6}return o%8===0}function RHe(t){var e,r,o=t.replace(/[\r\n=]/g,""),a=o.length,n=yT,u=0,A=[];for(e=0;e<a;e++)e%4===0&&e&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(e));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),Kg?Kg.from?Kg.from(A):new Kg(A):A}function THe(t){var e="",r=0,o,a,n=t.length,u=yT;for(o=0;o<n;o++)o%3===0&&o&&(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]),r=(r<<8)+t[o];return a=n%3,a===0?(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]):a===2?(e+=u[r>>10&63],e+=u[r>>4&63],e+=u[r<<2&63],e+=u[64]):a===1&&(e+=u[r>>2&63],e+=u[r<<4&63],e+=u[64],e+=u[64]),e}function NHe(t){return Kg&&Kg.isBuffer(t)}VY.exports=new kHe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:FHe,construct:RHe,predicate:NHe,represent:THe})});var XY=U((Jxt,zY)=>{"use strict";var LHe=as(),OHe=Object.prototype.hasOwnProperty,MHe=Object.prototype.toString;function UHe(t){if(t===null)return!0;var e=[],r,o,a,n,u,A=t;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,MHe.call(a)!=="[object Object]")return!1;for(n in a)if(OHe.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function _He(t){return t!==null?t:[]}zY.exports=new LHe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:UHe,construct:_He})});var $Y=U((zxt,ZY)=>{"use strict";var HHe=as(),qHe=Object.prototype.toString;function jHe(t){if(t===null)return!0;var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1){if(o=u[e],qHe.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[e]=[a[0],o[a[0]]]}return!0}function GHe(t){if(t===null)return[];var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1)o=u[e],a=Object.keys(o),n[e]=[a[0],o[a[0]]];return n}ZY.exports=new HHe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:jHe,construct:GHe})});var tK=U((Xxt,eK)=>{"use strict";var WHe=as(),YHe=Object.prototype.hasOwnProperty;function KHe(t){if(t===null)return!0;var e,r=t;for(e in r)if(YHe.call(r,e)&&r[e]!==null)return!1;return!0}function VHe(t){return t!==null?t:{}}eK.exports=new WHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:KHe,construct:VHe})});var dy=U((Zxt,rK)=>{"use strict";var JHe=Yg();rK.exports=new JHe({include:[mT()],implicit:[GY(),YY()],explicit:[JY(),XY(),$Y(),tK()]})});var iK=U(($xt,nK)=>{"use strict";var zHe=as();function XHe(){return!0}function ZHe(){}function $He(){return""}function e6e(t){return typeof t>"u"}nK.exports=new zHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:XHe,construct:ZHe,predicate:e6e,represent:$He})});var oK=U((ebt,sK)=>{"use strict";var t6e=as();function r6e(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),o="";return!(e[0]==="/"&&(r&&(o=r[1]),o.length>3||e[e.length-o.length-1]!=="/"))}function n6e(t){var e=t,r=/\/([gim]*)$/.exec(t),o="";return e[0]==="/"&&(r&&(o=r[1]),e=e.slice(1,e.length-o.length-1)),new RegExp(e,o)}function i6e(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function s6e(t){return Object.prototype.toString.call(t)==="[object RegExp]"}sK.exports=new t6e("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r6e,construct:n6e,predicate:s6e,represent:i6e})});var cK=U((tbt,lK)=>{"use strict";var TD;try{aK=Ie,TD=aK("esprima")}catch{typeof window<"u"&&(TD=window.esprima)}var aK,o6e=as();function a6e(t){if(t===null)return!1;try{var e="("+t+")",r=TD.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function l6e(t){var e="("+t+")",r=TD.parse(e,{range:!0}),o=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){o.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(o,e.slice(a[0]+1,a[1]-1)):new Function(o,"return "+e.slice(a[0],a[1]))}function c6e(t){return t.toString()}function u6e(t){return Object.prototype.toString.call(t)==="[object Function]"}lK.exports=new o6e("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:a6e,construct:l6e,predicate:u6e,represent:c6e})});var GI=U((nbt,AK)=>{"use strict";var uK=Yg();AK.exports=uK.DEFAULT=new uK({include:[dy()],explicit:[iK(),oK(),cK()]})});var QK=U((ibt,WI)=>{"use strict";var Cf=Wg(),yK=hy(),A6e=yY(),EK=dy(),f6e=GI(),Wp=Object.prototype.hasOwnProperty,ND=1,CK=2,IK=3,LD=4,ET=1,p6e=2,fK=3,h6e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g6e=/[\x85\u2028\u2029]/,d6e=/[,\[\]\{\}]/,wK=/^(?:!|!!|![a-z\-]+!)$/i,BK=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function pK(t){return Object.prototype.toString.call(t)}function Wu(t){return t===10||t===13}function Jg(t){return t===9||t===32}function wa(t){return t===9||t===32||t===10||t===13}function my(t){return t===44||t===91||t===93||t===123||t===125}function m6e(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function y6e(t){return t===120?2:t===117?4:t===85?8:0}function E6e(t){return 48<=t&&t<=57?t-48:-1}function hK(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
18`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function C6e(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var vK=new Array(256),DK=new Array(256);for(Vg=0;Vg<256;Vg++)vK[Vg]=hK(Vg)?1:0,DK[Vg]=hK(Vg);var Vg;function I6e(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||f6e,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function SK(t,e){return new yK(e,new A6e(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function wr(t,e){throw SK(t,e)}function OD(t,e){t.onWarning&&t.onWarning.call(null,SK(t,e))}var gK={YAML:function(e,r,o){var a,n,u;e.version!==null&&wr(e,"duplication of %YAML directive"),o.length!==1&&wr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&wr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&wr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=u<2,u!==1&&u!==2&&OD(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&wr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],wK.test(a)||wr(e,"ill-formed tag handle (first argument) of the TAG directive"),Wp.call(e.tagMap,a)&&wr(e,'there is a previously declared suffix for "'+a+'" tag handle'),BK.test(n)||wr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function Gp(t,e,r,o){var a,n,u,A;if(e<r){if(A=t.input.slice(e,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||wr(t,"expected valid JSON character");else h6e.test(A)&&wr(t,"the stream contains non-printable characters");t.result+=A}}function dK(t,e,r,o){var a,n,u,A;for(Cf.isObject(r)||wr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],Wp.call(e,n)||(e[n]=r[n],o[n]=!0)}function yy(t,e,r,o,a,n,u,A){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&wr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&pK(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&pK(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)dK(t,e,n[p],r);else dK(t,e,n,r);else!t.json&&!Wp.call(r,a)&&Wp.call(e,a)&&(t.line=u||t.line,t.position=A||t.position,wr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function CT(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):wr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Wi(t,e,r){for(var o=0,a=t.input.charCodeAt(t.position);a!==0;){for(;Jg(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(Wu(a))for(CT(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&o!==0&&t.lineIndent<r&&OD(t,"deficient indentation"),o}function MD(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||wa(r)))}function IT(t,e){e===1?t.result+=" ":e>1&&(t.result+=Cf.repeat(`
19`,e-1))}function w6e(t,e,r){var o,a,n,u,A,p,h,C,w=t.kind,v=t.result,b;if(b=t.input.charCodeAt(t.position),wa(b)||my(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===45)&&(a=t.input.charCodeAt(t.position+1),wa(a)||r&&my(a)))return!1;for(t.kind="scalar",t.result="",n=u=t.position,A=!1;b!==0;){if(b===58){if(a=t.input.charCodeAt(t.position+1),wa(a)||r&&my(a))break}else if(b===35){if(o=t.input.charCodeAt(t.position-1),wa(o))break}else{if(t.position===t.lineStart&&MD(t)||r&&my(b))break;if(Wu(b))if(p=t.line,h=t.lineStart,C=t.lineIndent,Wi(t,!1,-1),t.lineIndent>=e){A=!0,b=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=C;break}}A&&(Gp(t,n,u,!1),IT(t,t.line-p),n=u=t.position,A=!1),Jg(b)||(u=t.position+1),b=t.input.charCodeAt(++t.position)}return Gp(t,n,u,!1),t.result?!0:(t.kind=w,t.result=v,!1)}function B6e(t,e){var r,o,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Gp(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,a=t.position;else return!0;else Wu(r)?(Gp(t,o,a,!0),IT(t,Wi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&MD(t)?wr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);wr(t,"unexpected end of the stream within a single quoted scalar")}function v6e(t,e){var r,o,a,n,u,A;if(A=t.input.charCodeAt(t.position),A!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(A=t.input.charCodeAt(t.position))!==0;){if(A===34)return Gp(t,r,t.position,!0),t.position++,!0;if(A===92){if(Gp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),Wu(A))Wi(t,!1,e);else if(A<256&&vK[A])t.result+=DK[A],t.position++;else if((u=y6e(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=m6e(A))>=0?n=(n<<4)+u:wr(t,"expected hexadecimal character");t.result+=C6e(n),t.position++}else wr(t,"unknown escape sequence");r=o=t.position}else Wu(A)?(Gp(t,r,o,!0),IT(t,Wi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&MD(t)?wr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}wr(t,"unexpected end of the stream within a double quoted scalar")}function D6e(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,C,w,v={},b,E,R,L;if(L=t.input.charCodeAt(t.position),L===91)p=93,w=!1,n=[];else if(L===123)p=125,w=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),L=t.input.charCodeAt(++t.position);L!==0;){if(Wi(t,!0,e),L=t.input.charCodeAt(t.position),L===p)return t.position++,t.tag=a,t.anchor=u,t.kind=w?"mapping":"sequence",t.result=n,!0;r||wr(t,"missed comma between flow collection entries"),E=b=R=null,h=C=!1,L===63&&(A=t.input.charCodeAt(t.position+1),wa(A)&&(h=C=!0,t.position++,Wi(t,!0,e))),o=t.line,Ey(t,e,ND,!1,!0),E=t.tag,b=t.result,Wi(t,!0,e),L=t.input.charCodeAt(t.position),(C||t.line===o)&&L===58&&(h=!0,L=t.input.charCodeAt(++t.position),Wi(t,!0,e),Ey(t,e,ND,!1,!0),R=t.result),w?yy(t,n,v,E,b,R):h?n.push(yy(t,null,v,E,b,R)):n.push(b),Wi(t,!0,e),L=t.input.charCodeAt(t.position),L===44?(r=!0,L=t.input.charCodeAt(++t.position)):r=!1}wr(t,"unexpected end of the stream within a flow collection")}function S6e(t,e){var r,o,a=ET,n=!1,u=!1,A=e,p=0,h=!1,C,w;if(w=t.input.charCodeAt(t.position),w===124)o=!1;else if(w===62)o=!0;else return!1;for(t.kind="scalar",t.result="";w!==0;)if(w=t.input.charCodeAt(++t.position),w===43||w===45)ET===a?a=w===43?fK:p6e:wr(t,"repeat of a chomping mode identifier");else if((C=E6e(w))>=0)C===0?wr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?wr(t,"repeat of an indentation width identifier"):(A=e+C-1,u=!0);else break;if(Jg(w)){do w=t.input.charCodeAt(++t.position);while(Jg(w));if(w===35)do w=t.input.charCodeAt(++t.position);while(!Wu(w)&&w!==0)}for(;w!==0;){for(CT(t),t.lineIndent=0,w=t.input.charCodeAt(t.position);(!u||t.lineIndent<A)&&w===32;)t.lineIndent++,w=t.input.charCodeAt(++t.position);if(!u&&t.lineIndent>A&&(A=t.lineIndent),Wu(w)){p++;continue}if(t.lineIndent<A){a===fK?t.result+=Cf.repeat(`
20`,n?1+p:p):a===ET&&n&&(t.result+=`
21`);break}for(o?Jg(w)?(h=!0,t.result+=Cf.repeat(`
22`,n?1+p:p)):h?(h=!1,t.result+=Cf.repeat(`
23`,p+1)):p===0?n&&(t.result+=" "):t.result+=Cf.repeat(`
24`,p):t.result+=Cf.repeat(`
25`,n?1+p:p),n=!0,u=!0,p=0,r=t.position;!Wu(w)&&w!==0;)w=t.input.charCodeAt(++t.position);Gp(t,r,t.position,!1)}return!0}function mK(t,e){var r,o=t.tag,a=t.anchor,n=[],u,A=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(u=t.input.charCodeAt(t.position+1),!wa(u)));){if(A=!0,t.position++,Wi(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,Ey(t,e,IK,!1,!0),n.push(t.result),Wi(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)wr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return A?(t.tag=o,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function P6e(t,e,r){var o,a,n,u,A=t.tag,p=t.anchor,h={},C={},w=null,v=null,b=null,E=!1,R=!1,L;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),L=t.input.charCodeAt(t.position);L!==0;){if(o=t.input.charCodeAt(t.position+1),n=t.line,u=t.position,(L===63||L===58)&&wa(o))L===63?(E&&(yy(t,h,C,w,v,null),w=v=b=null),R=!0,E=!0,a=!0):E?(E=!1,a=!0):wr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,L=o;else if(Ey(t,r,CK,!1,!0))if(t.line===n){for(L=t.input.charCodeAt(t.position);Jg(L);)L=t.input.charCodeAt(++t.position);if(L===58)L=t.input.charCodeAt(++t.position),wa(L)||wr(t,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(yy(t,h,C,w,v,null),w=v=b=null),R=!0,E=!1,a=!1,w=t.tag,v=t.result;else if(R)wr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=A,t.anchor=p,!0}else if(R)wr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=A,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(Ey(t,e,LD,!0,a)&&(E?v=t.result:b=t.result),E||(yy(t,h,C,w,v,b,n,u),w=v=b=null),Wi(t,!0,-1),L=t.input.charCodeAt(t.position)),t.lineIndent>e&&L!==0)wr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return E&&yy(t,h,C,w,v,null),R&&(t.tag=A,t.anchor=p,t.kind="mapping",t.result=h),R}function x6e(t){var e,r=!1,o=!1,a,n,u;if(u=t.input.charCodeAt(t.position),u!==33)return!1;if(t.tag!==null&&wr(t,"duplication of a tag property"),u=t.input.charCodeAt(++t.position),u===60?(r=!0,u=t.input.charCodeAt(++t.position)):u===33?(o=!0,a="!!",u=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do u=t.input.charCodeAt(++t.position);while(u!==0&&u!==62);t.position<t.length?(n=t.input.slice(e,t.position),u=t.input.charCodeAt(++t.position)):wr(t,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!wa(u);)u===33&&(o?wr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),wK.test(a)||wr(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),u=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),d6e.test(n)&&wr(t,"tag suffix cannot contain flow indicator characters")}return n&&!BK.test(n)&&wr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:Wp.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:wr(t,'undeclared tag handle "'+a+'"'),!0}function b6e(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&wr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!wa(r)&&!my(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&wr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Q6e(t){var e,r,o;if(o=t.input.charCodeAt(t.position),o!==42)return!1;for(o=t.input.charCodeAt(++t.position),e=t.position;o!==0&&!wa(o)&&!my(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&wr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Wp.call(t.anchorMap,r)||wr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Wi(t,!0,-1),!0}function Ey(t,e,r,o,a){var n,u,A,p=1,h=!1,C=!1,w,v,b,E,R;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=u=A=LD===r||IK===r,o&&Wi(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;x6e(t)||b6e(t);)Wi(t,!0,-1)?(h=!0,A=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):A=!1;if(A&&(A=h||a),(p===1||LD===r)&&(ND===r||CK===r?E=e:E=e+1,R=t.position-t.lineStart,p===1?A&&(mK(t,R)||P6e(t,R,E))||D6e(t,E)?C=!0:(u&&S6e(t,E)||B6e(t,E)||v6e(t,E)?C=!0:Q6e(t)?(C=!0,(t.tag!==null||t.anchor!==null)&&wr(t,"alias node should not have any properties")):w6e(t,E,ND===r)&&(C=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(C=A&&mK(t,R))),t.tag!==null&&t.tag!=="!")if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&wr(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),w=0,v=t.implicitTypes.length;w<v;w+=1)if(b=t.implicitTypes[w],b.resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else Wp.call(t.typeMap[t.kind||"fallback"],t.tag)?(b=t.typeMap[t.kind||"fallback"][t.tag],t.result!==null&&b.kind!==t.kind&&wr(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+b.kind+'", not "'+t.kind+'"'),b.resolve(t.result)?(t.result=b.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):wr(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):wr(t,"unknown tag !<"+t.tag+">");return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||C}function k6e(t){var e=t.position,r,o,a,n=!1,u;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(u=t.input.charCodeAt(t.position))!==0&&(Wi(t,!0,-1),u=t.input.charCodeAt(t.position),!(t.lineIndent>0||u!==37));){for(n=!0,u=t.input.charCodeAt(++t.position),r=t.position;u!==0&&!wa(u);)u=t.input.charCodeAt(++t.position);for(o=t.input.slice(r,t.position),a=[],o.length<1&&wr(t,"directive name must not be less than one character in length");u!==0;){for(;Jg(u);)u=t.input.charCodeAt(++t.position);if(u===35){do u=t.input.charCodeAt(++t.position);while(u!==0&&!Wu(u));break}if(Wu(u))break;for(r=t.position;u!==0&&!wa(u);)u=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}u!==0&&CT(t),Wp.call(gK,o)?gK[o](t,o,a):OD(t,'unknown document directive "'+o+'"')}if(Wi(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Wi(t,!0,-1)):n&&wr(t,"directives end mark is expected"),Ey(t,t.lineIndent-1,LD,!1,!0),Wi(t,!0,-1),t.checkLineBreaks&&g6e.test(t.input.slice(e,t.position))&&OD(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&MD(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Wi(t,!0,-1));return}if(t.position<t.length-1)wr(t,"end of the stream or a document separator is expected");else return}function PK(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
26`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new I6e(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,wr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)k6e(r);return r.documents}function xK(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=PK(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a<n;a+=1)e(o[a])}function bK(t,e){var r=PK(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new yK("expected a single document in the stream, but found more")}}function F6e(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),xK(t,e,Cf.extend({schema:EK},r))}function R6e(t,e){return bK(t,Cf.extend({schema:EK},e))}WI.exports.loadAll=xK;WI.exports.load=bK;WI.exports.safeLoadAll=F6e;WI.exports.safeLoad=R6e});var $K=U((sbt,DT)=>{"use strict";var KI=Wg(),VI=hy(),T6e=GI(),N6e=dy(),MK=Object.prototype.toString,UK=Object.prototype.hasOwnProperty,L6e=9,YI=10,O6e=13,M6e=32,U6e=33,_6e=34,_K=35,H6e=37,q6e=38,j6e=39,G6e=42,HK=44,W6e=45,qK=58,Y6e=61,K6e=62,V6e=63,J6e=64,jK=91,GK=93,z6e=96,WK=123,X6e=124,YK=125,wo={};wo[0]="\\0";wo[7]="\\a";wo[8]="\\b";wo[9]="\\t";wo[10]="\\n";wo[11]="\\v";wo[12]="\\f";wo[13]="\\r";wo[27]="\\e";wo[34]='\\"';wo[92]="\\\\";wo[133]="\\N";wo[160]="\\_";wo[8232]="\\L";wo[8233]="\\P";var Z6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function $6e(t,e){var r,o,a,n,u,A,p;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(e[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=t.compiledTypeMap.fallback[u],p&&UK.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function kK(t){var e,r,o;if(e=t.toString(16).toUpperCase(),t<=255)r="x",o=2;else if(t<=65535)r="u",o=4;else if(t<=4294967295)r="U",o=8;else throw new VI("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+KI.repeat("0",o-e.length)+e}function eqe(t){this.schema=t.schema||T6e,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=KI.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=$6e(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function FK(t,e){for(var r=KI.repeat(" ",e),o=0,a=-1,n="",u,A=t.length;o<A;)a=t.indexOf(`
27`,o),a===-1?(u=t.slice(o),o=A):(u=t.slice(o,a+1),o=a+1),u.length&&u!==`
28`&&(n+=r),n+=u;return n}function wT(t,e){return`
29`+KI.repeat(" ",t.indent*e)}function tqe(t,e){var r,o,a;for(r=0,o=t.implicitTypes.length;r<o;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function vT(t){return t===M6e||t===L6e}function Cy(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function rqe(t){return Cy(t)&&!vT(t)&&t!==65279&&t!==O6e&&t!==YI}function RK(t,e){return Cy(t)&&t!==65279&&t!==HK&&t!==jK&&t!==GK&&t!==WK&&t!==YK&&t!==qK&&(t!==_K||e&&rqe(e))}function nqe(t){return Cy(t)&&t!==65279&&!vT(t)&&t!==W6e&&t!==V6e&&t!==qK&&t!==HK&&t!==jK&&t!==GK&&t!==WK&&t!==YK&&t!==_K&&t!==q6e&&t!==G6e&&t!==U6e&&t!==X6e&&t!==Y6e&&t!==K6e&&t!==j6e&&t!==_6e&&t!==H6e&&t!==J6e&&t!==z6e}function KK(t){var e=/^\n* /;return e.test(t)}var VK=1,JK=2,zK=3,XK=4,UD=5;function iqe(t,e,r,o,a){var n,u,A,p=!1,h=!1,C=o!==-1,w=-1,v=nqe(t.charCodeAt(0))&&!vT(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),!Cy(u))return UD;A=n>0?t.charCodeAt(n-1):null,v=v&&RK(u,A)}else{for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),u===YI)p=!0,C&&(h=h||n-w-1>o&&t[w+1]!==" ",w=n);else if(!Cy(u))return UD;A=n>0?t.charCodeAt(n-1):null,v=v&&RK(u,A)}h=h||C&&n-w-1>o&&t[w+1]!==" "}return!p&&!h?v&&!a(t)?VK:JK:r>9&&KK(t)?UD:h?XK:zK}function sqe(t,e,r,o){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&Z6e.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),u=o||t.flowLevel>-1&&r>=t.flowLevel;function A(p){return tqe(t,p)}switch(iqe(e,u,t.indent,n,A)){case VK:return e;case JK:return"'"+e.replace(/'/g,"''")+"'";case zK:return"|"+TK(e,t.indent)+NK(FK(e,a));case XK:return">"+TK(e,t.indent)+NK(FK(oqe(e,n),a));case UD:return'"'+aqe(e,n)+'"';default:throw new VI("impossible error: invalid scalar style")}}()}function TK(t,e){var r=KK(t)?String(e):"",o=t[t.length-1]===`
30`,a=o&&(t[t.length-2]===`
31`||t===`
32`),n=a?"+":o?"":"-";return r+n+`
33`}function NK(t){return t[t.length-1]===`
34`?t.slice(0,-1):t}function oqe(t,e){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=t.indexOf(`
35`);return h=h!==-1?h:t.length,r.lastIndex=h,LK(t.slice(0,h),e)}(),a=t[0]===`
36`||t[0]===" ",n,u;u=r.exec(t);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
37`:"")+LK(p,e),a=n}return o}function LK(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(t);)A=o.index,A-a>e&&(n=u>a?u:A,p+=`
38`+t.slice(a,n),a=n+1),u=A;return p+=`
39`,t.length-a>e&&u>a?p+=t.slice(a,u)+`
40`+t.slice(u+1):p+=t.slice(a),p.slice(1)}function aqe(t){for(var e="",r,o,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)){e+=kK((r-55296)*1024+o-56320+65536),n++;continue}a=wo[r],e+=!a&&Cy(r)?t[n]:a||kK(r)}return e}function lqe(t,e,r){var o="",a=t.tag,n,u;for(n=0,u=r.length;n<u;n+=1)zg(t,e,r[n],!1,!1)&&(n!==0&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function cqe(t,e,r,o){var a="",n=t.tag,u,A;for(u=0,A=r.length;u<A;u+=1)zg(t,e+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=wT(t,e)),t.dump&&YI===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}function uqe(t,e,r){var o="",a=t.tag,n=Object.keys(r),u,A,p,h,C;for(u=0,A=n.length;u<A;u+=1)C="",u!==0&&(C+=", "),t.condenseFlow&&(C+='"'),p=n[u],h=r[p],zg(t,e,p,!1,!1)&&(t.dump.length>1024&&(C+="? "),C+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),zg(t,e,h,!1,!1)&&(C+=t.dump,o+=C));t.tag=a,t.dump="{"+o+"}"}function Aqe(t,e,r,o){var a="",n=t.tag,u=Object.keys(r),A,p,h,C,w,v;if(t.sortKeys===!0)u.sort();else if(typeof t.sortKeys=="function")u.sort(t.sortKeys);else if(t.sortKeys)throw new VI("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)v="",(!o||A!==0)&&(v+=wT(t,e)),h=u[A],C=r[h],zg(t,e+1,h,!0,!0,!0)&&(w=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,w&&(t.dump&&YI===t.dump.charCodeAt(0)?v+="?":v+="? "),v+=t.dump,w&&(v+=wT(t,e)),zg(t,e+1,C,!0,w)&&(t.dump&&YI===t.dump.charCodeAt(0)?v+=":":v+=": ",v+=t.dump,a+=v));t.tag=n,t.dump=a||"{}"}function OK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof e=="object"&&e instanceof A.instanceOf)&&(!A.predicate||A.predicate(e))){if(t.tag=r?A.tag:"?",A.represent){if(p=t.styleMap[A.tag]||A.defaultStyle,MK.call(A.represent)==="[object Function]")o=A.represent(e,p);else if(UK.call(A.represent,p))o=A.represent[p](e,p);else throw new VI("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function zg(t,e,r,o,a,n){t.tag=null,t.dump=r,OK(t,r,!1)||OK(t,r,!0);var u=MK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(Aqe(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(uqe(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var C=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(cqe(t,C,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(lqe(t,C,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&sqe(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new VI("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function fqe(t,e){var r=[],o=[],a,n;for(BT(t,r,o),a=0,n=o.length;a<n;a+=1)e.duplicates.push(r[o[a]]);e.usedDuplicates=new Array(n)}function BT(t,e,r){var o,a,n;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)BT(t[a],e,r);else for(o=Object.keys(t),a=0,n=o.length;a<n;a+=1)BT(t[o[a]],e,r)}function ZK(t,e){e=e||{};var r=new eqe(e);return r.noRefs||fqe(t,r),zg(r,0,t,!0,!0)?r.dump+`
41`:""}function pqe(t,e){return ZK(t,KI.extend({schema:N6e},e))}DT.exports.dump=ZK;DT.exports.safeDump=pqe});var tV=U((obt,Pi)=>{"use strict";var _D=QK(),eV=$K();function HD(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Pi.exports.Type=as();Pi.exports.Schema=Yg();Pi.exports.FAILSAFE_SCHEMA=RD();Pi.exports.JSON_SCHEMA=dT();Pi.exports.CORE_SCHEMA=mT();Pi.exports.DEFAULT_SAFE_SCHEMA=dy();Pi.exports.DEFAULT_FULL_SCHEMA=GI();Pi.exports.load=_D.load;Pi.exports.loadAll=_D.loadAll;Pi.exports.safeLoad=_D.safeLoad;Pi.exports.safeLoadAll=_D.safeLoadAll;Pi.exports.dump=eV.dump;Pi.exports.safeDump=eV.safeDump;Pi.exports.YAMLException=hy();Pi.exports.MINIMAL_SCHEMA=RD();Pi.exports.SAFE_SCHEMA=dy();Pi.exports.DEFAULT_SCHEMA=GI();Pi.exports.scan=HD("scan");Pi.exports.parse=HD("parse");Pi.exports.compose=HD("compose");Pi.exports.addConstructor=HD("addConstructor")});var nV=U((abt,rV)=>{"use strict";var hqe=tV();rV.exports=hqe});var sV=U((lbt,iV)=>{"use strict";function gqe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Xg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Xg)}gqe(Xg,Error);Xg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",w;for(w=0;w<h.parts.length;w++)C+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),w,v;for(w=0;w<h.length;w++)C[w]=u(h[w]);if(C.sort(),C.length>0){for(w=1,v=1;w<C.length;w++)C[w-1]!==C[w]&&(C[v]=C[w],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function dqe(t,e){e=e!==void 0?e:{};var r={},o={Start:Eu},a=Eu,n=function(ee){return[].concat(...ee)},u="-",A=Dn("-",!1),p=function(ee){return ee},h=function(ee){return Object.assign({},...ee)},C="#",w=Dn("#",!1),v=Ec(),b=function(){return{}},E=":",R=Dn(":",!1),L=function(ee,we){return{[ee]:we}},_=",",V=Dn(",",!1),re=function(ee,we){return we},ae=function(ee,we,je){return Object.assign({},...[ee].concat(we).map(Be=>({[Be]:je})))},he=function(ee){return ee},pe=function(ee){return ee},De=na("correct indentation"),ge=" ",le=Dn(" ",!1),Pe=function(ee){return ee.length===aa*qa},g=function(ee){return ee.length===(aa+1)*qa},ve=function(){return aa++,!0},Ee=function(){return aa--,!0},de=function(){return bA()},ne=na("pseudostring"),Z=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,me=ui(["\r",`
42`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),be=/^[^\r\n\t ,\][{}:#"']/,ut=ui(["\r",`
43`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),H=function(){return bA().replace(/^ *| *$/g,"")},yt="--",Me=Dn("--",!1),Te=/^[a-zA-Z\/0-9]/,Qe=ui([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),_e=/^[^\r\n\t :,]/,qe=ui(["\r",`
44`," "," ",":",","],!0,!1),At="null",Oe=Dn("null",!1),x=function(){return null},I="true",P=Dn("true",!1),y=function(){return!0},F="false",z=Dn("false",!1),X=function(){return!1},$=na("string"),ie='"',ke=Dn('"',!1),Ne=function(){return""},st=function(ee){return ee},ht=function(ee){return ee.join("")},Ut=/^[^"\\\0-\x1F\x7F]/,Xt=ui(['"',"\\",["\0",""],"\x7F"],!0,!1),xt='\\"',tn=Dn('\\"',!1),Dr=function(){return'"'},fr="\\\\",Br=Dn("\\\\",!1),jr=function(){return"\\"},Hn="\\/",bs=Dn("\\/",!1),ki=function(){return"/"},gs="\\b",to=Dn("\\b",!1),Di=function(){return"\b"},Qs="\\f",ro=Dn("\\f",!1),hc=function(){return"\f"},gu="\\n",cp=Dn("\\n",!1),up=function(){return`
45`},ks="\\r",Cn=Dn("\\r",!1),no=function(){return"\r"},Fs="\\t",Cl=Dn("\\t",!1),Il=function(){return" "},io="\\u",Ue=Dn("\\u",!1),Fn=function(ee,we,je,Be){return String.fromCharCode(parseInt(`0x${ee}${we}${je}${Be}`))},Fi=/^[0-9a-fA-F]/,Rn=ui([["0","9"],["a","f"],["A","F"]],!1,!1),Ui=na("blank space"),Zt=/^[ \t]/,Ri=ui([" "," "],!1,!1),$n=na("white space"),Ua=/^[ \t\n\r]/,$t=ui([" "," ",`
46`,"\r"],!1,!1),gc=`\r
47`,du=Dn(`\r
48`,!1),dc=`
49`,wl=Dn(`
50`,!1),xA="\r",mu=Dn("\r",!1),Ce=0,Rt=0,mc=[{line:1,column:1}],_i=0,yu=[],qt=0,Bl;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function bA(){return t.substring(Rt,Ce)}function Ap(){return Mo(Rt,Ce)}function yc(ee,we){throw we=we!==void 0?we:Mo(Rt,Ce),vl([na(ee)],t.substring(Rt,Ce),we)}function QA(ee,we){throw we=we!==void 0?we:Mo(Rt,Ce),so(ee,we)}function Dn(ee,we){return{type:"literal",text:ee,ignoreCase:we}}function ui(ee,we,je){return{type:"class",parts:ee,inverted:we,ignoreCase:je}}function Ec(){return{type:"any"}}function kA(){return{type:"end"}}function na(ee){return{type:"other",description:ee}}function Hi(ee){var we=mc[ee],je;if(we)return we;for(je=ee-1;!mc[je];)je--;for(we=mc[je],we={line:we.line,column:we.column};je<ee;)t.charCodeAt(je)===10?(we.line++,we.column=1):we.column++,je++;return mc[ee]=we,we}function Mo(ee,we){var je=Hi(ee),Be=Hi(we);return{start:{offset:ee,line:je.line,column:je.column},end:{offset:we,line:Be.line,column:Be.column}}}function $e(ee){Ce<_i||(Ce>_i&&(_i=Ce,yu=[]),yu.push(ee))}function so(ee,we){return new Xg(ee,null,null,we)}function vl(ee,we,je){return new Xg(Xg.buildMessage(ee,we),ee,we,je)}function Eu(){var ee;return ee=FA(),ee}function qi(){var ee,we,je;for(ee=Ce,we=[],je=Cu();je!==r;)we.push(je),je=Cu();return we!==r&&(Rt=ee,we=n(we)),ee=we,ee}function Cu(){var ee,we,je,Be,xe;return ee=Ce,we=ds(),we!==r?(t.charCodeAt(Ce)===45?(je=u,Ce++):(je=r,qt===0&&$e(A)),je!==r?(Be=qn(),Be!==r?(xe=Cc(),xe!==r?(Rt=ee,we=p(xe),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee}function FA(){var ee,we,je;for(ee=Ce,we=[],je=Ha();je!==r;)we.push(je),je=Ha();return we!==r&&(Rt=ee,we=h(we)),ee=we,ee}function Ha(){var ee,we,je,Be,xe,Ve,vt,tr,Zr;if(ee=Ce,we=qn(),we===r&&(we=null),we!==r){if(je=Ce,t.charCodeAt(Ce)===35?(Be=C,Ce++):(Be=r,qt===0&&$e(w)),Be!==r){if(xe=[],Ve=Ce,vt=Ce,qt++,tr=mi(),qt--,tr===r?vt=void 0:(Ce=vt,vt=r),vt!==r?(t.length>Ce?(tr=t.charAt(Ce),Ce++):(tr=r,qt===0&&$e(v)),tr!==r?(vt=[vt,tr],Ve=vt):(Ce=Ve,Ve=r)):(Ce=Ve,Ve=r),Ve!==r)for(;Ve!==r;)xe.push(Ve),Ve=Ce,vt=Ce,qt++,tr=mi(),qt--,tr===r?vt=void 0:(Ce=vt,vt=r),vt!==r?(t.length>Ce?(tr=t.charAt(Ce),Ce++):(tr=r,qt===0&&$e(v)),tr!==r?(vt=[vt,tr],Ve=vt):(Ce=Ve,Ve=r)):(Ce=Ve,Ve=r);else xe=r;xe!==r?(Be=[Be,xe],je=Be):(Ce=je,je=r)}else Ce=je,je=r;if(je===r&&(je=null),je!==r){if(Be=[],xe=es(),xe!==r)for(;xe!==r;)Be.push(xe),xe=es();else Be=r;Be!==r?(Rt=ee,we=b(),ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r}else Ce=ee,ee=r;if(ee===r&&(ee=Ce,we=ds(),we!==r?(je=ia(),je!==r?(Be=qn(),Be===r&&(Be=null),Be!==r?(t.charCodeAt(Ce)===58?(xe=E,Ce++):(xe=r,qt===0&&$e(R)),xe!==r?(Ve=qn(),Ve===r&&(Ve=null),Ve!==r?(vt=Cc(),vt!==r?(Rt=ee,we=L(je,vt),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r&&(ee=Ce,we=ds(),we!==r?(je=oo(),je!==r?(Be=qn(),Be===r&&(Be=null),Be!==r?(t.charCodeAt(Ce)===58?(xe=E,Ce++):(xe=r,qt===0&&$e(R)),xe!==r?(Ve=qn(),Ve===r&&(Ve=null),Ve!==r?(vt=Cc(),vt!==r?(Rt=ee,we=L(je,vt),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r))){if(ee=Ce,we=ds(),we!==r)if(je=oo(),je!==r)if(Be=qn(),Be!==r)if(xe=sa(),xe!==r){if(Ve=[],vt=es(),vt!==r)for(;vt!==r;)Ve.push(vt),vt=es();else Ve=r;Ve!==r?(Rt=ee,we=L(je,xe),ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r;else Ce=ee,ee=r;else Ce=ee,ee=r;else Ce=ee,ee=r;if(ee===r)if(ee=Ce,we=ds(),we!==r)if(je=oo(),je!==r){if(Be=[],xe=Ce,Ve=qn(),Ve===r&&(Ve=null),Ve!==r?(t.charCodeAt(Ce)===44?(vt=_,Ce++):(vt=r,qt===0&&$e(V)),vt!==r?(tr=qn(),tr===r&&(tr=null),tr!==r?(Zr=oo(),Zr!==r?(Rt=xe,Ve=re(je,Zr),xe=Ve):(Ce=xe,xe=r)):(Ce=xe,xe=r)):(Ce=xe,xe=r)):(Ce=xe,xe=r),xe!==r)for(;xe!==r;)Be.push(xe),xe=Ce,Ve=qn(),Ve===r&&(Ve=null),Ve!==r?(t.charCodeAt(Ce)===44?(vt=_,Ce++):(vt=r,qt===0&&$e(V)),vt!==r?(tr=qn(),tr===r&&(tr=null),tr!==r?(Zr=oo(),Zr!==r?(Rt=xe,Ve=re(je,Zr),xe=Ve):(Ce=xe,xe=r)):(Ce=xe,xe=r)):(Ce=xe,xe=r)):(Ce=xe,xe=r);else Be=r;Be!==r?(xe=qn(),xe===r&&(xe=null),xe!==r?(t.charCodeAt(Ce)===58?(Ve=E,Ce++):(Ve=r,qt===0&&$e(R)),Ve!==r?(vt=qn(),vt===r&&(vt=null),vt!==r?(tr=Cc(),tr!==r?(Rt=ee,we=ae(je,Be,tr),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)}else Ce=ee,ee=r;else Ce=ee,ee=r}return ee}function Cc(){var ee,we,je,Be,xe,Ve,vt;if(ee=Ce,we=Ce,qt++,je=Ce,Be=mi(),Be!==r?(xe=Ot(),xe!==r?(t.charCodeAt(Ce)===45?(Ve=u,Ce++):(Ve=r,qt===0&&$e(A)),Ve!==r?(vt=qn(),vt!==r?(Be=[Be,xe,Ve,vt],je=Be):(Ce=je,je=r)):(Ce=je,je=r)):(Ce=je,je=r)):(Ce=je,je=r),qt--,je!==r?(Ce=we,we=void 0):we=r,we!==r?(je=es(),je!==r?(Be=Sn(),Be!==r?(xe=qi(),xe!==r?(Ve=di(),Ve!==r?(Rt=ee,we=he(xe),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r&&(ee=Ce,we=mi(),we!==r?(je=Sn(),je!==r?(Be=FA(),Be!==r?(xe=di(),xe!==r?(Rt=ee,we=he(Be),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r))if(ee=Ce,we=Rs(),we!==r){if(je=[],Be=es(),Be!==r)for(;Be!==r;)je.push(Be),Be=es();else je=r;je!==r?(Rt=ee,we=pe(we),ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r;return ee}function ds(){var ee,we,je;for(qt++,ee=Ce,we=[],t.charCodeAt(Ce)===32?(je=ge,Ce++):(je=r,qt===0&&$e(le));je!==r;)we.push(je),t.charCodeAt(Ce)===32?(je=ge,Ce++):(je=r,qt===0&&$e(le));return we!==r?(Rt=Ce,je=Pe(we),je?je=void 0:je=r,je!==r?(we=[we,je],ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r),qt--,ee===r&&(we=r,qt===0&&$e(De)),ee}function Ot(){var ee,we,je;for(ee=Ce,we=[],t.charCodeAt(Ce)===32?(je=ge,Ce++):(je=r,qt===0&&$e(le));je!==r;)we.push(je),t.charCodeAt(Ce)===32?(je=ge,Ce++):(je=r,qt===0&&$e(le));return we!==r?(Rt=Ce,je=g(we),je?je=void 0:je=r,je!==r?(we=[we,je],ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee}function Sn(){var ee;return Rt=Ce,ee=ve(),ee?ee=void 0:ee=r,ee}function di(){var ee;return Rt=Ce,ee=Ee(),ee?ee=void 0:ee=r,ee}function ia(){var ee;return ee=Ns(),ee===r&&(ee=oa()),ee}function oo(){var ee,we,je;if(ee=Ns(),ee===r){if(ee=Ce,we=[],je=Uo(),je!==r)for(;je!==r;)we.push(je),je=Uo();else we=r;we!==r&&(Rt=ee,we=de()),ee=we}return ee}function Rs(){var ee;return ee=Zi(),ee===r&&(ee=Ts(),ee===r&&(ee=Ns(),ee===r&&(ee=oa()))),ee}function sa(){var ee;return ee=Zi(),ee===r&&(ee=Ns(),ee===r&&(ee=Uo())),ee}function oa(){var ee,we,je,Be,xe,Ve;if(qt++,ee=Ce,Z.test(t.charAt(Ce))?(we=t.charAt(Ce),Ce++):(we=r,qt===0&&$e(me)),we!==r){for(je=[],Be=Ce,xe=qn(),xe===r&&(xe=null),xe!==r?(be.test(t.charAt(Ce))?(Ve=t.charAt(Ce),Ce++):(Ve=r,qt===0&&$e(ut)),Ve!==r?(xe=[xe,Ve],Be=xe):(Ce=Be,Be=r)):(Ce=Be,Be=r);Be!==r;)je.push(Be),Be=Ce,xe=qn(),xe===r&&(xe=null),xe!==r?(be.test(t.charAt(Ce))?(Ve=t.charAt(Ce),Ce++):(Ve=r,qt===0&&$e(ut)),Ve!==r?(xe=[xe,Ve],Be=xe):(Ce=Be,Be=r)):(Ce=Be,Be=r);je!==r?(Rt=ee,we=H(),ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r;return qt--,ee===r&&(we=r,qt===0&&$e(ne)),ee}function Uo(){var ee,we,je,Be,xe;if(ee=Ce,t.substr(Ce,2)===yt?(we=yt,Ce+=2):(we=r,qt===0&&$e(Me)),we===r&&(we=null),we!==r)if(Te.test(t.charAt(Ce))?(je=t.charAt(Ce),Ce++):(je=r,qt===0&&$e(Qe)),je!==r){for(Be=[],_e.test(t.charAt(Ce))?(xe=t.charAt(Ce),Ce++):(xe=r,qt===0&&$e(qe));xe!==r;)Be.push(xe),_e.test(t.charAt(Ce))?(xe=t.charAt(Ce),Ce++):(xe=r,qt===0&&$e(qe));Be!==r?(Rt=ee,we=H(),ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r;else Ce=ee,ee=r;return ee}function Zi(){var ee,we;return ee=Ce,t.substr(Ce,4)===At?(we=At,Ce+=4):(we=r,qt===0&&$e(Oe)),we!==r&&(Rt=ee,we=x()),ee=we,ee}function Ts(){var ee,we;return ee=Ce,t.substr(Ce,4)===I?(we=I,Ce+=4):(we=r,qt===0&&$e(P)),we!==r&&(Rt=ee,we=y()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,5)===F?(we=F,Ce+=5):(we=r,qt===0&&$e(z)),we!==r&&(Rt=ee,we=X()),ee=we),ee}function Ns(){var ee,we,je,Be;return qt++,ee=Ce,t.charCodeAt(Ce)===34?(we=ie,Ce++):(we=r,qt===0&&$e(ke)),we!==r?(t.charCodeAt(Ce)===34?(je=ie,Ce++):(je=r,qt===0&&$e(ke)),je!==r?(Rt=ee,we=Ne(),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r&&(ee=Ce,t.charCodeAt(Ce)===34?(we=ie,Ce++):(we=r,qt===0&&$e(ke)),we!==r?(je=Ls(),je!==r?(t.charCodeAt(Ce)===34?(Be=ie,Ce++):(Be=r,qt===0&&$e(ke)),Be!==r?(Rt=ee,we=st(je),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)),qt--,ee===r&&(we=r,qt===0&&$e($)),ee}function Ls(){var ee,we,je;if(ee=Ce,we=[],je=ao(),je!==r)for(;je!==r;)we.push(je),je=ao();else we=r;return we!==r&&(Rt=ee,we=ht(we)),ee=we,ee}function ao(){var ee,we,je,Be,xe,Ve;return Ut.test(t.charAt(Ce))?(ee=t.charAt(Ce),Ce++):(ee=r,qt===0&&$e(Xt)),ee===r&&(ee=Ce,t.substr(Ce,2)===xt?(we=xt,Ce+=2):(we=r,qt===0&&$e(tn)),we!==r&&(Rt=ee,we=Dr()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===fr?(we=fr,Ce+=2):(we=r,qt===0&&$e(Br)),we!==r&&(Rt=ee,we=jr()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===Hn?(we=Hn,Ce+=2):(we=r,qt===0&&$e(bs)),we!==r&&(Rt=ee,we=ki()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===gs?(we=gs,Ce+=2):(we=r,qt===0&&$e(to)),we!==r&&(Rt=ee,we=Di()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===Qs?(we=Qs,Ce+=2):(we=r,qt===0&&$e(ro)),we!==r&&(Rt=ee,we=hc()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===gu?(we=gu,Ce+=2):(we=r,qt===0&&$e(cp)),we!==r&&(Rt=ee,we=up()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===ks?(we=ks,Ce+=2):(we=r,qt===0&&$e(Cn)),we!==r&&(Rt=ee,we=no()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===Fs?(we=Fs,Ce+=2):(we=r,qt===0&&$e(Cl)),we!==r&&(Rt=ee,we=Il()),ee=we,ee===r&&(ee=Ce,t.substr(Ce,2)===io?(we=io,Ce+=2):(we=r,qt===0&&$e(Ue)),we!==r?(je=Yn(),je!==r?(Be=Yn(),Be!==r?(xe=Yn(),xe!==r?(Ve=Yn(),Ve!==r?(Rt=ee,we=Fn(je,Be,xe,Ve),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)))))))))),ee}function Yn(){var ee;return Fi.test(t.charAt(Ce))?(ee=t.charAt(Ce),Ce++):(ee=r,qt===0&&$e(Rn)),ee}function qn(){var ee,we;if(qt++,ee=[],Zt.test(t.charAt(Ce))?(we=t.charAt(Ce),Ce++):(we=r,qt===0&&$e(Ri)),we!==r)for(;we!==r;)ee.push(we),Zt.test(t.charAt(Ce))?(we=t.charAt(Ce),Ce++):(we=r,qt===0&&$e(Ri));else ee=r;return qt--,ee===r&&(we=r,qt===0&&$e(Ui)),ee}function $i(){var ee,we;if(qt++,ee=[],Ua.test(t.charAt(Ce))?(we=t.charAt(Ce),Ce++):(we=r,qt===0&&$e($t)),we!==r)for(;we!==r;)ee.push(we),Ua.test(t.charAt(Ce))?(we=t.charAt(Ce),Ce++):(we=r,qt===0&&$e($t));else ee=r;return qt--,ee===r&&(we=r,qt===0&&$e($n)),ee}function es(){var ee,we,je,Be,xe,Ve;if(ee=Ce,we=mi(),we!==r){for(je=[],Be=Ce,xe=qn(),xe===r&&(xe=null),xe!==r?(Ve=mi(),Ve!==r?(xe=[xe,Ve],Be=xe):(Ce=Be,Be=r)):(Ce=Be,Be=r);Be!==r;)je.push(Be),Be=Ce,xe=qn(),xe===r&&(xe=null),xe!==r?(Ve=mi(),Ve!==r?(xe=[xe,Ve],Be=xe):(Ce=Be,Be=r)):(Ce=Be,Be=r);je!==r?(we=[we,je],ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r;return ee}function mi(){var ee;return t.substr(Ce,2)===gc?(ee=gc,Ce+=2):(ee=r,qt===0&&$e(du)),ee===r&&(t.charCodeAt(Ce)===10?(ee=dc,Ce++):(ee=r,qt===0&&$e(wl)),ee===r&&(t.charCodeAt(Ce)===13?(ee=xA,Ce++):(ee=r,qt===0&&$e(mu)))),ee}let qa=2,aa=0;if(Bl=a(),Bl!==r&&Ce===t.length)return Bl;throw Bl!==r&&Ce<t.length&&$e(kA()),vl(yu,_i<t.length?t.charAt(_i):null,_i<t.length?Mo(_i,_i+1):Mo(_i,_i))}iV.exports={SyntaxError:Xg,parse:dqe}});function aV(t){return t.match(mqe)?t:JSON.stringify(t)}function cV(t){return typeof t>"u"?!0:typeof t=="object"&&t!==null?Object.keys(t).every(e=>cV(t[e])):!1}function ST(t,e,r){if(t===null)return`null
51`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
52`;if(typeof t=="string")return`${aV(t)}
53`;if(Array.isArray(t)){if(t.length===0)return`[]
54`;let o=" ".repeat(e);return`
55${t.map(n=>`${o}- ${ST(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[o,a]=t instanceof qD?[t.data,!1]:[t,!0],n=" ".repeat(e),u=Object.keys(o);a&&u.sort((p,h)=>{let C=oV.indexOf(p),w=oV.indexOf(h);return C===-1&&w===-1?p<h?-1:p>h?1:0:C!==-1&&w===-1?-1:C===-1&&w!==-1?1:C-w});let A=u.filter(p=>!cV(o[p])).map((p,h)=>{let C=o[p],w=aV(p),v=ST(C,e+1,!0),b=h>0||r?n:"",E=w.length>1024?`? ${w}
56${b}:`:`${w}:`,R=v.startsWith(`
57`)?v:` ${v}`;return`${b}${E}${R}`}).join(e===0?`
58`:"")||`
59`;return r?`
60${A}`:`${A}`}throw new Error(`Unsupported value type (${t})`)}function Ba(t){try{let e=ST(t,0,!1);return e!==`
61`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function yqe(t){return t.endsWith(`
62`)||(t+=`
63`),(0,lV.parse)(t)}function Cqe(t){if(Eqe.test(t))return yqe(t);let e=(0,jD.safeLoad)(t,{schema:jD.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function Yi(t){return Cqe(t)}var jD,lV,mqe,oV,qD,Eqe,uV=dt(()=>{jD=tt(nV()),lV=tt(sV()),mqe=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,oV=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],qD=class{constructor(e){this.data=e}};Ba.PreserveOrdering=qD;Eqe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var JI={};Yt(JI,{parseResolution:()=>QD,parseShell:()=>PD,parseSyml:()=>Yi,stringifyArgument:()=>fT,stringifyArgumentSegment:()=>pT,stringifyArithmeticExpression:()=>bD,stringifyCommand:()=>AT,stringifyCommandChain:()=>py,stringifyCommandChainThen:()=>uT,stringifyCommandLine:()=>xD,stringifyCommandLineThen:()=>cT,stringifyEnvSegment:()=>SD,stringifyRedirectArgument:()=>qI,stringifyResolution:()=>kD,stringifyShell:()=>fy,stringifyShellLine:()=>fy,stringifySyml:()=>Ba,stringifyValueArgument:()=>qg});var Hl=dt(()=>{cY();pY();uV()});var fV=U((pbt,PT)=>{"use strict";var Iqe=t=>{let e=!1,r=!1,o=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+"-"+t.slice(a),e=!1,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+"-"+t.slice(a-1),o=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},AV=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=Iqe(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};PT.exports=AV;PT.exports.default=AV});var pV=U((hbt,wqe)=>{wqe.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var Zg=U(tl=>{"use strict";var gV=pV(),Yu=process.env;Object.defineProperty(tl,"_vendors",{value:gV.map(function(t){return t.constant})});tl.name=null;tl.isPR=null;gV.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(o){return hV(o)});if(tl[t.constant]=r,r)switch(tl.name=t.name,typeof t.pr){case"string":tl.isPR=!!Yu[t.pr];break;case"object":"env"in t.pr?tl.isPR=t.pr.env in Yu&&Yu[t.pr.env]!==t.pr.ne:"any"in t.pr?tl.isPR=t.pr.any.some(function(o){return!!Yu[o]}):tl.isPR=hV(t.pr);break;default:tl.isPR=null}});tl.isCI=!!(Yu.CI||Yu.CONTINUOUS_INTEGRATION||Yu.BUILD_NUMBER||Yu.RUN_ID||tl.name);function hV(t){return typeof t=="string"?!!Yu[t]:Object.keys(t).every(function(e){return Yu[e]===t[e]})}});var xT,js,bT,GD,dV,QT,kT,FT=dt(()=>{xT="",js="\0",bT=/^(-h|--help)(?:=([0-9]+))?$/,GD=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,dV=/^-[a-zA-Z]{2,}$/,QT=/^([^=]+)=([\s\S]*)$/,kT=process.env.DEBUG_CLI==="1"});var ot,Iy,WD,RT,YD=dt(()=>{FT();ot=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},Iy=class extends Error{constructor(e,r){if(super(),this.input=e,this.candidates=r,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(o=>o.reason!==null&&o.reason===r[0].reason)){let[{reason:o}]=this.candidates;this.message=`${o}
64
65${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
66`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
67
68$ ${o}
69${RT(e)}`}else this.message=`Command not found; did you mean one of:
70
71${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
72`)}
73
74${RT(e)}`}},WD=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
75
76${this.usages.map((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
77`)}
78
79${RT(e)}`}},RT=t=>`While running ${t.filter(e=>e!==js).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function Bqe(t){let e=t.split(`
80`),r=e.filter(a=>a.match(/\S/)),o=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(o).trimRight()).join(`
81`)}function Bo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
82`),t=Bqe(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
83
84`),t=t.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(t=t.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
85`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
86`)}).join(`
87
88`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>e.bold(a+n+a)),t?`${t}
89`:""}var TT,mV,yV,NT=dt(()=>{TT=Array(80).fill("\u2501");for(let t=0;t<=24;++t)TT[TT.length-t]=`\x1B[38;5;${232+t}m\u2501`;mV={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<80-5?` ${TT.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},yV={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Wo(t){return{...t,[zI]:!0}}function Ku(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function KD(t,e=!1){let r=t.replace(/^\.: /,"");return e&&(r=r[0].toLowerCase()+r.slice(1)),r}function XI(t,e){return e.length===1?new ot(`${t}: ${KD(e[0],!0)}`):new ot(`${t}:
90${e.map(r=>`
91- ${KD(r)}`).join("")}`)}function ZI(t,e,r){if(typeof r>"u")return e;let o=[],a=[],n=A=>{let p=e;return e=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throw XI(`Invalid value for ${t}`,o);for(let[,A]of a)A();return e}var zI,If=dt(()=>{YD();zI=Symbol("clipanion/isOption")});var Yo={};Yt(Yo,{KeyRelationship:()=>$g,applyCascade:()=>td,base64RegExp:()=>wV,colorStringAlphaRegExp:()=>IV,colorStringRegExp:()=>CV,computeKey:()=>Yp,getPrintable:()=>Ki,hasExactLength:()=>PV,hasForbiddenKeys:()=>Xqe,hasKeyRelationship:()=>HT,hasMaxLength:()=>Lqe,hasMinLength:()=>Nqe,hasMutuallyExclusiveKeys:()=>Zqe,hasRequiredKeys:()=>zqe,hasUniqueItems:()=>Oqe,isArray:()=>xqe,isAtLeast:()=>UT,isAtMost:()=>_qe,isBase64:()=>Vqe,isBoolean:()=>Sqe,isDate:()=>Pqe,isDict:()=>Qqe,isEnum:()=>Gs,isHexColor:()=>Kqe,isISO8601:()=>Yqe,isInExclusiveRange:()=>qqe,isInInclusiveRange:()=>Hqe,isInstanceOf:()=>Fqe,isInteger:()=>_T,isJSON:()=>Jqe,isLiteral:()=>vqe,isLowerCase:()=>jqe,isNegative:()=>Mqe,isNullable:()=>Tqe,isNumber:()=>OT,isObject:()=>kqe,isOneOf:()=>MT,isOptional:()=>Rqe,isPositive:()=>Uqe,isString:()=>$I,isTuple:()=>bqe,isUUID4:()=>Wqe,isUnknown:()=>SV,isUpperCase:()=>Gqe,iso8601RegExp:()=>LT,makeCoercionFn:()=>ed,makeSetter:()=>DV,makeTrait:()=>vV,makeValidator:()=>Yr,matchesRegExp:()=>ew,plural:()=>VD,pushError:()=>xr,simpleKeyRegExp:()=>EV,uuid4RegExp:()=>BV});function Yr({test:t}){return vV(t)()}function Ki(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":JSON.stringify(t)}function Yp(t,e){var r,o,a;return typeof e=="number"?`${(r=t==null?void 0:t.p)!==null&&r!==void 0?r:"."}[${e}]`:EV.test(e)?`${(o=t==null?void 0:t.p)!==null&&o!==void 0?o:""}.${e}`:`${(a=t==null?void 0:t.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function ed(t,e){return r=>{let o=t[e];return t[e]=r,ed(t,e).bind(null,o)}}function DV(t,e){return r=>{t[e]=r}}function VD(t,e,r){return t===1?e:r}function xr({errors:t,p:e}={},r){return t==null||t.push(`${e??"."}: ${r}`),!1}function vqe(t){return Yr({test:(e,r)=>e!==t?xr(r,`Expected a literal (got ${Ki(t)})`):!0})}function Gs(t){let e=Array.isArray(t)?t:Object.values(t),r=new Set(e);return Yr({test:(o,a)=>r.has(o)?!0:xr(a,`Expected a valid enumeration value (got ${Ki(o)})`)})}var EV,CV,IV,wV,BV,LT,vV,SV,$I,Dqe,Sqe,OT,Pqe,xqe,bqe,Qqe,kqe,Fqe,MT,td,Rqe,Tqe,Nqe,Lqe,PV,Oqe,Mqe,Uqe,UT,_qe,Hqe,qqe,_T,ew,jqe,Gqe,Wqe,Yqe,Kqe,Vqe,Jqe,zqe,Xqe,Zqe,$g,$qe,HT,rl=dt(()=>{EV=/^[a-zA-Z_][a-zA-Z0-9_]*$/,CV=/^#[0-9a-f]{6}$/i,IV=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,wV=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,BV=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,LT=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,vV=t=>()=>t;SV=()=>Yr({test:(t,e)=>!0});$I=()=>Yr({test:(t,e)=>typeof t!="string"?xr(e,`Expected a string (got ${Ki(t)})`):!0});Dqe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),Sqe=()=>Yr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return xr(e,"Unbound coercion result");let o=Dqe.get(t);if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return xr(e,`Expected a boolean (got ${Ki(t)})`)}return!0}}),OT=()=>Yr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return xr(e,"Unbound coercion result");let o;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)o=a;else return xr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return xr(e,`Expected a number (got ${Ki(t)})`)}return!0}}),Pqe=()=>Yr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return xr(e,"Unbound coercion result");let o;if(typeof t=="string"&&LT.test(t))o=new Date(t);else{let a;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch{}typeof n=="number"&&(a=n)}else typeof t=="number"&&(a=t);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))o=new Date(a*1e3);else return xr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return xr(e,`Expected a date (got ${Ki(t)})`)}return!0}}),xqe=(t,{delimiter:e}={})=>Yr({test:(r,o)=>{var a;if(typeof r=="string"&&typeof e<"u"&&typeof(o==null?void 0:o.coercions)<"u"){if(typeof(o==null?void 0:o.coercion)>"u")return xr(o,"Unbound coercion result");r=r.split(e),o.coercions.push([(a=o.p)!==null&&a!==void 0?a:".",o.coercion.bind(null,r)])}if(!Array.isArray(r))return xr(o,`Expected an array (got ${Ki(r)})`);let n=!0;for(let u=0,A=r.length;u<A&&(n=t(r[u],Object.assign(Object.assign({},o),{p:Yp(o,u),coercion:ed(r,u)}))&&n,!(!n&&(o==null?void 0:o.errors)==null));++u);return n}}),bqe=(t,{delimiter:e}={})=>{let r=PV(t.length);return Yr({test:(o,a)=>{var n;if(typeof o=="string"&&typeof e<"u"&&typeof(a==null?void 0:a.coercions)<"u"){if(typeof(a==null?void 0:a.coercion)>"u")return xr(a,"Unbound coercion result");o=o.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)])}if(!Array.isArray(o))return xr(a,`Expected a tuple (got ${Ki(o)})`);let u=r(o,Object.assign({},a));for(let A=0,p=o.length;A<p&&A<t.length&&(u=t[A](o[A],Object.assign(Object.assign({},a),{p:Yp(a,A),coercion:ed(o,A)}))&&u,!(!u&&(a==null?void 0:a.errors)==null));++A);return u}})},Qqe=(t,{keys:e=null}={})=>Yr({test:(r,o)=>{if(typeof r!="object"||r===null)return xr(o,`Expected an object (got ${Ki(r)})`);let a=Object.keys(r),n=!0;for(let u=0,A=a.length;u<A&&(n||(o==null?void 0:o.errors)!=null);++u){let p=a[u],h=r[p];if(p==="__proto__"||p==="constructor"){n=xr(Object.assign(Object.assign({},o),{p:Yp(o,p)}),"Unsafe property name");continue}if(e!==null&&!e(p,o)){n=!1;continue}if(!t(h,Object.assign(Object.assign({},o),{p:Yp(o,p),coercion:ed(r,p)}))){n=!1;continue}}return n}}),kqe=(t,{extra:e=null}={})=>{let r=Object.keys(t);return Yr({test:(o,a)=>{if(typeof o!="object"||o===null)return xr(a,`Expected an object (got ${Ki(o)})`);let n=new Set([...r,...Object.keys(o)]),u={},A=!0;for(let p of n){if(p==="constructor"||p==="__proto__")A=xr(Object.assign(Object.assign({},a),{p:Yp(a,p)}),"Unsafe property name");else{let h=Object.prototype.hasOwnProperty.call(t,p)?t[p]:void 0,C=Object.prototype.hasOwnProperty.call(o,p)?o[p]:void 0;typeof h<"u"?A=h(C,Object.assign(Object.assign({},a),{p:Yp(a,p),coercion:ed(o,p)}))&&A:e===null?A=xr(Object.assign(Object.assign({},a),{p:Yp(a,p)}),`Extraneous property (got ${Ki(C)})`):Object.defineProperty(u,p,{enumerable:!0,get:()=>C,set:DV(o,p)})}if(!A&&(a==null?void 0:a.errors)==null)break}return e!==null&&(A||(a==null?void 0:a.errors)!=null)&&(A=e(u,a)&&A),A}})},Fqe=t=>Yr({test:(e,r)=>e instanceof t?!0:xr(r,`Expected an instance of ${t.name} (got ${Ki(e)})`)}),MT=(t,{exclusive:e=!1}={})=>Yr({test:(r,o)=>{var a,n,u;let A=[],p=typeof(o==null?void 0:o.errors)<"u"?[]:void 0;for(let h=0,C=t.length;h<C;++h){let w=typeof(o==null?void 0:o.errors)<"u"?[]:void 0,v=typeof(o==null?void 0:o.coercions)<"u"?[]:void 0;if(t[h](r,Object.assign(Object.assign({},o),{errors:w,coercions:v,p:`${(a=o==null?void 0:o.p)!==null&&a!==void 0?a:"."}#${h+1}`}))){if(A.push([`#${h+1}`,v]),!e)break}else p==null||p.push(w[0])}if(A.length===1){let[,h]=A[0];return typeof h<"u"&&((n=o==null?void 0:o.coercions)===null||n===void 0||n.push(...h)),!0}return A.length>1?xr(o,`Expected to match exactly a single predicate (matched ${A.join(", ")})`):(u=o==null?void 0:o.errors)===null||u===void 0||u.push(...p),!1}}),td=(t,e)=>Yr({test:(r,o)=>{var a,n;let u={value:r},A=typeof(o==null?void 0:o.coercions)<"u"?ed(u,"value"):void 0,p=typeof(o==null?void 0:o.coercions)<"u"?[]:void 0;if(!t(r,Object.assign(Object.assign({},o),{coercion:A,coercions:p})))return!1;let h=[];if(typeof p<"u")for(let[,C]of p)h.push(C());try{if(typeof(o==null?void 0:o.coercions)<"u"){if(u.value!==r){if(typeof(o==null?void 0:o.coercion)>"u")return xr(o,"Unbound coercion result");o.coercions.push([(a=o.p)!==null&&a!==void 0?a:".",o.coercion.bind(null,u.value)])}(n=o==null?void 0:o.coercions)===null||n===void 0||n.push(...p)}return e.every(C=>C(u.value,o))}finally{for(let C of h)C()}}}),Rqe=t=>Yr({test:(e,r)=>typeof e>"u"?!0:t(e,r)}),Tqe=t=>Yr({test:(e,r)=>e===null?!0:t(e,r)}),Nqe=t=>Yr({test:(e,r)=>e.length>=t?!0:xr(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)}),Lqe=t=>Yr({test:(e,r)=>e.length<=t?!0:xr(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)}),PV=t=>Yr({test:(e,r)=>e.length!==t?xr(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0}),Oqe=({map:t}={})=>Yr({test:(e,r)=>{let o=new Set,a=new Set;for(let n=0,u=e.length;n<u;++n){let A=e[n],p=typeof t<"u"?t(A):A;if(o.has(p)){if(a.has(p))continue;xr(r,`Expected to contain unique elements; got a duplicate with ${Ki(e)}`),a.add(p)}else o.add(p)}return a.size===0}}),Mqe=()=>Yr({test:(t,e)=>t<=0?!0:xr(e,`Expected to be negative (got ${t})`)}),Uqe=()=>Yr({test:(t,e)=>t>=0?!0:xr(e,`Expected to be positive (got ${t})`)}),UT=t=>Yr({test:(e,r)=>e>=t?!0:xr(r,`Expected to be at least ${t} (got ${e})`)}),_qe=t=>Yr({test:(e,r)=>e<=t?!0:xr(r,`Expected to be at most ${t} (got ${e})`)}),Hqe=(t,e)=>Yr({test:(r,o)=>r>=t&&r<=e?!0:xr(o,`Expected to be in the [${t}; ${e}] range (got ${r})`)}),qqe=(t,e)=>Yr({test:(r,o)=>r>=t&&r<e?!0:xr(o,`Expected to be in the [${t}; ${e}[ range (got ${r})`)}),_T=({unsafe:t=!1}={})=>Yr({test:(e,r)=>e!==Math.round(e)?xr(r,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:xr(r,`Expected to be a safe integer (got ${e})`)}),ew=t=>Yr({test:(e,r)=>t.test(e)?!0:xr(r,`Expected to match the pattern ${t.toString()} (got ${Ki(e)})`)}),jqe=()=>Yr({test:(t,e)=>t!==t.toLowerCase()?xr(e,`Expected to be all-lowercase (got ${t})`):!0}),Gqe=()=>Yr({test:(t,e)=>t!==t.toUpperCase()?xr(e,`Expected to be all-uppercase (got ${t})`):!0}),Wqe=()=>Yr({test:(t,e)=>BV.test(t)?!0:xr(e,`Expected to be a valid UUID v4 (got ${Ki(t)})`)}),Yqe=()=>Yr({test:(t,e)=>LT.test(t)?!1:xr(e,`Expected to be a valid ISO 8601 date string (got ${Ki(t)})`)}),Kqe=({alpha:t=!1})=>Yr({test:(e,r)=>(t?CV.test(e):IV.test(e))?!0:xr(r,`Expected to be a valid hexadecimal color string (got ${Ki(e)})`)}),Vqe=()=>Yr({test:(t,e)=>wV.test(t)?!0:xr(e,`Expected to be a valid base 64 string (got ${Ki(t)})`)}),Jqe=(t=SV())=>Yr({test:(e,r)=>{let o;try{o=JSON.parse(e)}catch{return xr(r,`Expected to be a valid JSON string (got ${Ki(e)})`)}return t(o,r)}}),zqe=t=>{let e=new Set(t);return Yr({test:(r,o)=>{let a=new Set(Object.keys(r)),n=[];for(let u of e)a.has(u)||n.push(u);return n.length>0?xr(o,`Missing required ${VD(n.length,"property","properties")} ${n.map(u=>`"${u}"`).join(", ")}`):!0}})},Xqe=t=>{let e=new Set(t);return Yr({test:(r,o)=>{let a=new Set(Object.keys(r)),n=[];for(let u of e)a.has(u)&&n.push(u);return n.length>0?xr(o,`Forbidden ${VD(n.length,"property","properties")} ${n.map(u=>`"${u}"`).join(", ")}`):!0}})},Zqe=t=>{let e=new Set(t);return Yr({test:(r,o)=>{let a=new Set(Object.keys(r)),n=[];for(let u of e)a.has(u)&&n.push(u);return n.length>1?xr(o,`Mutually exclusive properties ${n.map(u=>`"${u}"`).join(", ")}`):!0}})};(function(t){t.Forbids="Forbids",t.Requires="Requires"})($g||($g={}));$qe={[$g.Forbids]:{expect:!1,message:"forbids using"},[$g.Requires]:{expect:!0,message:"requires using"}},HT=(t,e,r,{ignore:o=[]}={})=>{let a=new Set(o),n=new Set(r),u=$qe[e];return Yr({test:(A,p)=>{let h=new Set(Object.keys(A));if(!h.has(t)||a.has(A[t]))return!0;let C=[];for(let w of n)(h.has(w)&&!a.has(A[w]))!==u.expect&&C.push(w);return C.length>=1?xr(p,`Property "${t}" ${u.message} ${VD(C.length,"property","properties")} ${C.map(w=>`"${w}"`).join(", ")}`):!0}})}});var it,rd=dt(()=>{If();it=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:u}=await Promise.resolve().then(()=>(rl(),Yo)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw XI("Invalid option schema",p);for(let[,w]of h)w()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};it.isOption=zI;it.Default=[]});function va(t){kT&&console.log(t)}function bV(){return{nodes:[Ko(),Ko(),Ko()]}}function eje(t){let e=bV(),r=[],o=e.nodes.length;for(let a of t){r.push(o);for(let n=0;n<a.nodes.length;++n)FV(n)||e.nodes.push(cje(a.nodes[n],o));o+=a.nodes.length-2}for(let a of r)wy(e,0,a);return e}function qc(t,e){return t.nodes.push(e),t.nodes.length-1}function tje(t){let e=new Set,r=o=>{if(e.has(o))return;e.add(o);let a=t.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=t.nodes[u];for(let[p,h]of Object.entries(A.statics)){let C=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let w of h)C.some(({to:v})=>w.to===v)||C.push(w)}for(let[p,h]of A.dynamics)a.dynamics.some(([C,{to:w}])=>p===C&&h.to===w)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(0)}function rje(t,{prefix:e=""}={}){if(kT){va(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)va(`${e} ${r}: ${JSON.stringify(t.nodes[r])}`)}}function QV(t,e,r=!1){va(`Running a vm on ${JSON.stringify(e)}`);let o=[{node:0,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];rje(t,{prefix:" "});let a=[xT,...e];for(let n=0;n<a.length;++n){let u=a[n];va(` Processing ${JSON.stringify(u)}`);let A=[];for(let{node:p,state:h}of o){va(` Current node is ${p}`);let C=t.nodes[p];if(p===2){A.push({node:p,state:h});continue}console.assert(C.shortcuts.length===0,"Shortcuts should have been eliminated by now");let w=Object.prototype.hasOwnProperty.call(C.statics,u);if(!r||n<a.length-1||w)if(w){let v=C.statics[u];for(let{to:b,reducer:E}of v)A.push({node:b,state:typeof E<"u"?JD(jT,E,h,u):h}),va(` Static transition to ${b} found`)}else va(" No static transition found");else{let v=!1;for(let b of Object.keys(C.statics))if(!!b.startsWith(u)){if(u===b)for(let{to:E,reducer:R}of C.statics[b])A.push({node:E,state:typeof R<"u"?JD(jT,R,h,u):h}),va(` Static transition to ${E} found`);else for(let{to:E}of C.statics[b])A.push({node:E,state:{...h,remainder:b.slice(u.length)}}),va(` Static transition to ${E} found (partial match)`);v=!0}v||va(" No partial static transition found")}if(u!==js)for(let[v,{to:b,reducer:E}]of C.dynamics)JD(XD,v,h,u)&&(A.push({node:b,state:typeof E<"u"?JD(jT,E,h,u):h}),va(` Dynamic transition to ${b} found (via ${v})`))}if(A.length===0&&u===js&&e.length===1)return[{node:0,state:xV}];if(A.length===0)throw new Iy(e,o.filter(({node:p})=>p!==2).map(({state:p})=>({usage:p.candidateUsage,reason:null})));if(A.every(({node:p})=>p===2))throw new Iy(e,A.map(({state:p})=>({usage:p.candidateUsage,reason:p.errorMessage})));o=oje(A)}if(o.length>0){va(" Results:");for(let n of o)va(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else va(" No results");return o}function nje(t,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(t.statics,js)){for(let{to:r}of t.statics[js])if(r===1)return!0}return!1}function ije(t,e,r){let o=r&&e.length>0?[""]:[],a=QV(t,e,r),n=[],u=new Set,A=(p,h,C=!0)=>{let w=[h];for(;w.length>0;){let b=w;w=[];for(let E of b){let R=t.nodes[E],L=Object.keys(R.statics);for(let _ of Object.keys(R.statics)){let V=L[0];for(let{to:re,reducer:ae}of R.statics[V])ae==="pushPath"&&(C||p.push(V),w.push(re))}}C=!1}let v=JSON.stringify(p);u.has(v)||(n.push(p),u.add(v))};for(let{node:p,state:h}of a){if(h.remainder!==null){A([h.remainder],p);continue}let C=t.nodes[p],w=nje(C,h);for(let[v,b]of Object.entries(C.statics))(w&&v!==js||!v.startsWith("-")&&b.some(({reducer:E})=>E==="pushPath"))&&A([...o,v],p);if(!!w)for(let[v,{to:b}]of C.dynamics){if(b===2)continue;let E=uje(v,h);if(E!==null)for(let R of E)A([...o,R],p)}}return[...n].sort()}function sje(t,e){let r=QV(t,[...e,js]);return aje(e,r.map(({state:o})=>o))}function oje(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function aje(t,e){let r=e.filter(w=>w.selectedIndex!==null);if(r.length===0)throw new Error;let o=r.filter(w=>w.requiredOptions.every(v=>v.some(b=>w.options.find(E=>E.name===b))));if(o.length===0)throw new Iy(t,r.map(w=>({usage:w.candidateUsage,reason:null})));let a=0;for(let w of o)w.path.length>a&&(a=w.path.length);let n=o.filter(w=>w.path.length===a),u=w=>w.positionals.filter(({extra:v})=>!v).length+w.options.length,A=n.map(w=>({state:w,positionalCount:u(w)})),p=0;for(let{positionalCount:w}of A)w>p&&(p=w);let h=A.filter(({positionalCount:w})=>w===p).map(({state:w})=>w),C=lje(h);if(C.length>1)throw new WD(t,C.map(w=>w.candidateUsage));return C[0]}function lje(t){let e=[],r=[];for(let o of t)o.selectedIndex===-1?r.push(o):e.push(o);return r.length>0&&e.push({...xV,path:kV(...r.map(o=>o.path)),options:r.reduce((o,a)=>o.concat(a.options),[])}),e}function kV(t,e,...r){return e===void 0?Array.from(t):kV(t.filter((o,a)=>o===e[a]),...r)}function Ko(){return{dynamics:[],shortcuts:[],statics:{}}}function FV(t){return t===1||t===2}function qT(t,e=0){return{to:FV(t.to)?t.to:t.to>2?t.to+e-2:t.to+e,reducer:t.reducer}}function cje(t,e=0){let r=Ko();for(let[o,a]of t.dynamics)r.dynamics.push([o,qT(a,e)]);for(let o of t.shortcuts)r.shortcuts.push(qT(o,e));for(let[o,a]of Object.entries(t.statics))r.statics[o]=a.map(n=>qT(n,e));return r}function Ws(t,e,r,o,a){t.nodes[e].dynamics.push([r,{to:o,reducer:a}])}function wy(t,e,r,o){t.nodes[e].shortcuts.push({to:r,reducer:o})}function wf(t,e,r,o,a){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:o,reducer:a})}function JD(t,e,r,o){if(Array.isArray(e)){let[a,...n]=e;return t[a](r,o,...n)}else return t[e](r,o)}function uje(t,e){let r=Array.isArray(t)?XD[t[0]]:XD[t];if(typeof r.suggest>"u")return null;let o=Array.isArray(t)?t.slice(1):[];return r.suggest(e,...o)}var xV,XD,jT,nl,GT,vy,$D=dt(()=>{FT();YD();xV={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:-1};XD={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(t,e)=>t.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(t,e,r,o)=>!t.ignoreOptions&&e===r,isBatchOption:(t,e,r)=>!t.ignoreOptions&&dV.test(e)&&[...e.slice(1)].every(o=>r.includes(`-${o}`)),isBoundOption:(t,e,r,o)=>{let a=e.match(QT);return!t.ignoreOptions&&!!a&&GD.test(a[1])&&r.includes(a[1])&&o.filter(n=>n.names.includes(a[1])).every(n=>n.allowBinding)},isNegatedOption:(t,e,r)=>!t.ignoreOptions&&e===`--no-${r.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&bT.test(e),isUnsupportedOption:(t,e,r)=>!t.ignoreOptions&&e.startsWith("-")&&GD.test(e)&&!r.includes(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith("-")&&!GD.test(e)};XD.isOption.suggest=(t,e,r=!0)=>r?null:[e];jT={setCandidateState:(t,e,r)=>({...t,...r}),setSelectedIndex:(t,e,r)=>({...t,selectedIndex:r}),pushBatch:(t,e)=>({...t,options:t.options.concat([...e.slice(1)].map(r=>({name:`-${r}`,value:!0})))}),pushBound:(t,e)=>{let[,r,o]=e.match(QT);return{...t,options:t.options.concat({name:r,value:o})}},pushPath:(t,e)=>({...t,path:t.path.concat(e)}),pushPositional:(t,e)=>({...t,positionals:t.positionals.concat({value:e,extra:!1})}),pushExtra:(t,e)=>({...t,positionals:t.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(t,e)=>({...t,positionals:t.positionals.concat({value:e,extra:nl})}),pushTrue:(t,e,r=e)=>({...t,options:t.options.concat({name:e,value:!0})}),pushFalse:(t,e,r=e)=>({...t,options:t.options.concat({name:r,value:!1})}),pushUndefined:(t,e)=>({...t,options:t.options.concat({name:e,value:void 0})}),pushStringValue:(t,e)=>{var r;let o={...t,options:[...t.options]},a=t.options[t.options.length-1];return a.value=((r=a.value)!==null&&r!==void 0?r:[]).concat([e]),o},setStringValue:(t,e)=>{let r={...t,options:[...t.options]},o=t.options[t.options.length-1];return o.value=e,r},inhibateOptions:t=>({...t,ignoreOptions:!0}),useHelp:(t,e,r)=>{let[,,o]=e.match(bT);return typeof o<"u"?{...t,options:[{name:"-c",value:String(r)},{name:"-i",value:o}]}:{...t,options:[{name:"-c",value:String(r)}]}},setError:(t,e,r)=>e===js?{...t,errorMessage:`${r}.`}:{...t,errorMessage:`${r} ("${e}").`},setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return{...t,errorMessage:`Not enough arguments to option ${r.name}.`}}},nl=Symbol(),GT=class{constructor(e,r){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=r}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:r=this.arity.trailing,extra:o=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:o,proxy:a})}addPositional({name:e="arg",required:r=!0}={}){if(!r&&this.arity.extra===nl)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!r&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!r&&this.arity.extra!==nl?this.arity.extra.push(e):this.arity.extra!==nl&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:r=0}={}){if(this.arity.extra===nl)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let o=0;o<r;++o)this.addPositional({name:e});this.arity.extra=nl}addProxy({required:e=0}={}){this.addRest({required:e}),this.arity.proxy=!0}addOption({names:e,description:r,arity:o=0,hidden:a=!1,required:n=!1,allowBinding:u=!0}){if(!u&&o>1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(o))throw new Error(`The arity must be an integer, got ${o}`);if(o<0)throw new Error(`The arity must be positive, got ${o}`);this.allOptionNames.push(...e),this.options.push({names:e,description:r,arity:o,hidden:a,required:n,allowBinding:u})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let o=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&o.push(...this.paths[0]),e){for(let{names:u,arity:A,hidden:p,description:h,required:C}of this.options){if(p)continue;let w=[];for(let b=0;b<A;++b)w.push(` #${b}`);let v=`${u.join(",")}${w.join("")}`;!r&&h?a.push({definition:v,description:h,required:C}):o.push(C?`<${v}>`:`[${v}]`)}o.push(...this.arity.leading.map(u=>`<${u}>`)),this.arity.extra===nl?o.push("..."):o.push(...this.arity.extra.map(u=>`[${u}]`)),o.push(...this.arity.trailing.map(u=>`<${u}>`))}return{usage:o.join(" "),options:a}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=bV(),r=0,o=this.usage().usage,a=this.options.filter(A=>A.required).map(A=>A.names);r=qc(e,Ko()),wf(e,0,xT,r,["setCandidateState",{candidateUsage:o,requiredOptions:a}]);let n=this.arity.proxy?"always":"isNotOptionLike",u=this.paths.length>0?this.paths:[[]];for(let A of u){let p=r;if(A.length>0){let v=qc(e,Ko());wy(e,p,v),this.registerOptions(e,v),p=v}for(let v=0;v<A.length;++v){let b=qc(e,Ko());wf(e,p,A[v],b,"pushPath"),p=b}if(this.arity.leading.length>0||!this.arity.proxy){let v=qc(e,Ko());Ws(e,p,"isHelp",v,["useHelp",this.cliIndex]),wf(e,v,js,1,["setSelectedIndex",-1]),this.registerOptions(e,p)}this.arity.leading.length>0&&wf(e,p,js,2,["setError","Not enough positional arguments"]);let h=p;for(let v=0;v<this.arity.leading.length;++v){let b=qc(e,Ko());(!this.arity.proxy||v+1!==this.arity.leading.length)&&this.registerOptions(e,b),(this.arity.trailing.length>0||v+1!==this.arity.leading.length)&&wf(e,b,js,2,["setError","Not enough positional arguments"]),Ws(e,h,"isNotOptionLike",b,"pushPositional"),h=b}let C=h;if(this.arity.extra===nl||this.arity.extra.length>0){let v=qc(e,Ko());if(wy(e,h,v),this.arity.extra===nl){let b=qc(e,Ko());this.arity.proxy||this.registerOptions(e,b),Ws(e,h,n,b,"pushExtraNoLimits"),Ws(e,b,n,b,"pushExtraNoLimits"),wy(e,b,v)}else for(let b=0;b<this.arity.extra.length;++b){let E=qc(e,Ko());(!this.arity.proxy||b>0)&&this.registerOptions(e,E),Ws(e,C,n,E,"pushExtra"),wy(e,E,v),C=E}C=v}this.arity.trailing.length>0&&wf(e,C,js,2,["setError","Not enough positional arguments"]);let w=C;for(let v=0;v<this.arity.trailing.length;++v){let b=qc(e,Ko());this.arity.proxy||this.registerOptions(e,b),v+1<this.arity.trailing.length&&wf(e,b,js,2,["setError","Not enough positional arguments"]),Ws(e,w,"isNotOptionLike",b,"pushPositional"),w=b}Ws(e,w,n,2,["setError","Extraneous positional argument"]),wf(e,w,js,1,["setSelectedIndex",this.cliIndex])}return{machine:e,context:this.context}}registerOptions(e,r){Ws(e,r,["isOption","--"],r,"inhibateOptions"),Ws(e,r,["isBatchOption",this.allOptionNames],r,"pushBatch"),Ws(e,r,["isBoundOption",this.allOptionNames,this.options],r,"pushBound"),Ws(e,r,["isUnsupportedOption",this.allOptionNames],2,["setError","Unsupported option name"]),Ws(e,r,["isInvalidOption"],2,["setError","Invalid option name"]);for(let o of this.options){let a=o.names.reduce((n,u)=>u.length>n.length?u:n,"");if(o.arity===0)for(let n of o.names)Ws(e,r,["isOption",n,o.hidden||n!==a],r,"pushTrue"),n.startsWith("--")&&!n.startsWith("--no-")&&Ws(e,r,["isNegatedOption",n],r,["pushFalse",n]);else{let n=qc(e,Ko());for(let u of o.names)Ws(e,r,["isOption",u,o.hidden||u!==a],n,"pushUndefined");for(let u=0;u<o.arity;++u){let A=qc(e,Ko());wf(e,n,js,2,"setOptionArityError"),Ws(e,n,"isOptionLike",2,"setOptionArityError");let p=o.arity===1?"setStringValue":"pushStringValue";Ws(e,n,"isNotOptionLike",A,p),n=A}wy(e,n,r)}}}},vy=class{constructor({binaryName:e="..."}={}){this.builders=[],this.opts={binaryName:e}}static build(e,r={}){return new vy(r).commands(e).compile()}getBuilderByIndex(e){if(!(e>=0&&e<this.builders.length))throw new Error(`Assertion failed: Out-of-bound command index (${e})`);return this.builders[e]}commands(e){for(let r of e)r(this.command());return this}command(){let e=new GT(this.builders.length,this.opts);return this.builders.push(e),e}compile(){let e=[],r=[];for(let a of this.builders){let{machine:n,context:u}=a.compile();e.push(n),r.push(u)}let o=eje(e);return tje(o),{machine:o,contexts:r,process:a=>sje(o,a),suggest:(a,n)=>ije(o,a,n)}}}});function TV(){return eS.default&&"getColorDepth"in eS.default.WriteStream.prototype?eS.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}function NV(t){let e=RV;if(typeof e>"u"){if(t.stdout===process.stdout&&t.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=Ie("async_hooks");e=RV=new r;let o=process.stdout._write;process.stdout._write=function(n,u,A){let p=e.getStore();return typeof p>"u"?o.call(this,n,u,A):p.stdout.write(n,u,A)};let a=process.stderr._write;process.stderr._write=function(n,u,A){let p=e.getStore();return typeof p>"u"?a.call(this,n,u,A):p.stderr.write(n,u,A)}}return r=>e.run(t,r)}var eS,RV,LV=dt(()=>{eS=tt(Ie("tty"),1)});var Dy,OV=dt(()=>{rd();Dy=class extends it{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,r){let o=new Dy(r);o.path=e.path;for(let a of e.options)switch(a.name){case"-c":o.commands.push(Number(a.value));break;case"-i":o.index=Number(a.value);break}return o}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index<e.length&&(e=[e[this.index]]),e.length===0)this.context.stdout.write(this.cli.usage());else if(e.length===1)this.context.stdout.write(this.cli.usage(this.contexts[e[0]].commandClass,{detailed:!0}));else if(e.length>1){this.context.stdout.write(`Multiple commands match your selection:
92`),this.context.stdout.write(`
93`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
94`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
95`)}}}});async function _V(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=qV(t);return vo.from(r,e).runExit(o,a)}async function HV(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=qV(t);return vo.from(r,e).run(o,a)}function qV(t){let e,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof it||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?o=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],o=t[2]):t[0]&&t[0].prototype instanceof it||Array.isArray(t[0])?(r=t[0],o=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],o=t[2],a=t[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function UV(t){return t()}var MV,vo,jV=dt(()=>{$D();NT();LV();rd();OV();MV=Symbol("clipanion/errorCommand");vo=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new vy({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let o=new vo(r),a=Array.isArray(e)?e:[e];for(let n of a)o.register(n);return o}register(e){var r;let o=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[it.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(e,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{contexts:o,process:a}=this.builder.compile(),n=a(e),u={...vo.defaultContext,...r};switch(n.selectedIndex){case-1:{let A=Dy.from(n,o);return A.context=u,A}default:{let{commandClass:A}=o[n.selectedIndex],p=this.registrations.get(A);if(typeof p>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let h=new A;h.context=u,h.path=n.path;try{for(let[C,{transformer:w}]of p.specs.entries())h[C]=w(p.builder,C,n,u);return h}catch(C){throw C[MV]=h,C}}break}}async run(e,r){var o,a;let n,u={...vo.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,u)}catch(C){return u.stdout.write(this.error(C,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(C,w)=>this.error(C,w),format:C=>this.format(C),process:(C,w)=>this.process(C,{...u,...w}),run:(C,w)=>this.run(C,{...u,...w}),usage:(C,w)=>this.usage(C,w)};let p=this.enableCapture&&(a=NV(u))!==null&&a!==void 0?a:UV,h;try{h=await p(()=>n.validateAndExecute().catch(C=>n.catch(C).then(()=>0)))}catch(C){return u.stdout.write(this.error(C,{colored:A,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}suggest(e,r){let{suggest:o}=this.builder.compile();return o(e,r)}definitions({colored:e=!1}={}){let r=[];for(let[o,{index:a}]of this.registrations){if(typeof o.usage>"u")continue;let{usage:n}=this.getUsageByIndex(a,{detailed:!1}),{usage:u,options:A}=this.getUsageByIndex(a,{detailed:!0,inlineOptions:!1}),p=typeof o.usage.category<"u"?Bo(o.usage.category,{format:this.format(e),paragraphs:!1}):void 0,h=typeof o.usage.description<"u"?Bo(o.usage.description,{format:this.format(e),paragraphs:!1}):void 0,C=typeof o.usage.details<"u"?Bo(o.usage.details,{format:this.format(e),paragraphs:!0}):void 0,w=typeof o.usage.examples<"u"?o.usage.examples.map(([v,b])=>[Bo(v,{format:this.format(e),paragraphs:!1}),b.replace(/\$0/g,this.binaryName)]):void 0;r.push({path:n,usage:u,category:p,description:h,details:C,examples:w,options:A})}return r}usage(e=null,{colored:r,detailed:o=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,C=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h==null?void 0:h.some(b=>b.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(C){e=null;continue}}e&&(o=!0)}let u=e!==null&&e instanceof it?e.constructor:e,A="";if(u)if(o){let{description:p="",details:h="",examples:C=[]}=u.usage||{};p!==""&&(A+=Bo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,b=>b.toUpperCase()),A+=`
96`),(h!==""||C.length>0)&&(A+=`${this.format(r).header("Usage")}
97`,A+=`
98`);let{usage:w,options:v}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${w}
99`,v.length>0){A+=`
100`,A+=`${this.format(r).header("Options")}
101`;let b=v.reduce((E,R)=>Math.max(E,R.definition.length),0);A+=`
102`;for(let{definition:E,description:R}of v)A+=` ${this.format(r).bold(E.padEnd(b))} ${Bo(R,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(A+=`
103`,A+=`${this.format(r).header("Details")}
104`,A+=`
105`,A+=Bo(h,{format:this.format(r),paragraphs:!0})),C.length>0){A+=`
106`,A+=`${this.format(r).header("Examples")}
107`;for(let[b,E]of C)A+=`
108`,A+=Bo(b,{format:this.format(r),paragraphs:!1}),A+=`${E.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
109`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
110`}else{let p=new Map;for(let[v,{index:b}]of this.registrations.entries()){if(typeof v.usage>"u")continue;let E=typeof v.usage.category<"u"?Bo(v.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(E);typeof R>"u"&&p.set(E,R=[]);let{usage:L}=this.getUsageByIndex(b);R.push({commandClass:v,usage:L})}let h=Array.from(p.keys()).sort((v,b)=>v===null?-1:b===null?1:v.localeCompare(b,"en",{usage:"sort",caseFirst:"upper"})),C=typeof this.binaryLabel<"u",w=typeof this.binaryVersion<"u";C||w?(C&&w?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
111
112`:C?A+=`${this.format(r).header(`${this.binaryLabel}`)}
113`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
114`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
115`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
116`;for(let v of h){let b=p.get(v).slice().sort((R,L)=>R.usage.localeCompare(L.usage,"en",{usage:"sort",caseFirst:"upper"})),E=v!==null?v.trim():"General commands";A+=`
117`,A+=`${this.format(r).header(`${E}`)}
118`;for(let{commandClass:R,usage:L}of b){let _=R.usage.description||"undocumented";A+=`
119`,A+=` ${this.format(r).bold(L)}
120`,A+=` ${Bo(_,{format:this.format(r),paragraphs:!1})}`}}A+=`
121`,A+=Bo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return A}error(e,r){var o,{colored:a,command:n=(o=e[MV])!==null&&o!==void 0?o:null}=r===void 0?{}:r;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let u="",A=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${e.message}
122`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
123`,u+=this.usage(n)):e.stack&&(u+=`${e.stack.replace(/^.*\n/,"")}
124`),u}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:vo.defaultContext.colorDepth>1)?mV:yV}getUsageByRegistration(e,r){let o=this.registrations.get(e);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};vo.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:TV()}});var tw,GV=dt(()=>{rd();tw=class extends it{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
125`)}};tw.paths=[["--clipanion=definitions"]]});var rw,WV=dt(()=>{rd();rw=class extends it{async execute(){this.context.stdout.write(this.cli.usage())}};rw.paths=[["-h"],["--help"]]});var nw,YV=dt(()=>{rd();nw=class extends it{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
126`)}};nw.paths=[["-v"],["--version"]]});var WT={};Yt(WT,{DefinitionsCommand:()=>tw,HelpCommand:()=>rw,VersionCommand:()=>nw});var KV=dt(()=>{GV();WV();YV()});function VV(t,e,r){let[o,a]=Ku(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:n,hidden:a==null?void 0:a.hidden,description:a==null?void 0:a.description,required:a.required})},transformer(p,h,C){let w=typeof o<"u"?[...o]:void 0;for(let{name:v,value:b}of C.options)!A.has(v)||(w=w??[],w.push(b));return w}})}var JV=dt(()=>{If()});function zV(t,e,r){let[o,a]=Ku(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:w,value:v}of h.options)!u.has(w)||(C=v);return C}})}var XV=dt(()=>{If()});function ZV(t,e,r){let[o,a]=Ku(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:w,value:v}of h.options)!u.has(w)||(C??(C=0),v?C+=1:C=0);return C}})}var $V=dt(()=>{If()});function eJ(t={}){return Wo({definition(e,r){var o;e.addProxy({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){return o.positionals.map(({value:a})=>a)}})}var tJ=dt(()=>{If()});function rJ(t={}){return Wo({definition(e,r){var o;e.addRest({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){let a=u=>{let A=o.positionals[u];return A.extra===nl||A.extra===!1&&u<e.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var nJ=dt(()=>{$D();If()});function Aje(t,e,r){let[o,a]=Ku(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,C,w){let v,b=o;typeof a.env<"u"&&w.env[a.env]&&(v=a.env,b=w.env[a.env]);for(let{name:E,value:R}of C.options)!A.has(E)||(v=E,b=R);return typeof b=="string"?ZI(v??h,b,a.validator):b}})}function fje(t={}){let{required:e=!0}=t;return Wo({definition(r,o){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:o,required:t.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===nl||e&&a.positionals[u].extra===!0||!e&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return ZI((n=t.name)!==null&&n!==void 0?n:o,A.value,t.validator)}}})}function iJ(t,...e){return typeof t=="string"?Aje(t,...e):fje(t)}var sJ=dt(()=>{$D();If()});var fe={};Yt(fe,{Array:()=>VV,Boolean:()=>zV,Counter:()=>ZV,Proxy:()=>eJ,Rest:()=>rJ,String:()=>iJ,applyValidator:()=>ZI,cleanValidationError:()=>KD,formatError:()=>XI,isOptionSymbol:()=>zI,makeCommandOption:()=>Wo,rerouteArguments:()=>Ku});var oJ=dt(()=>{If();JV();XV();$V();tJ();nJ();sJ()});var iw={};Yt(iw,{Builtins:()=>WT,Cli:()=>vo,Command:()=>it,Option:()=>fe,UsageError:()=>ot,formatMarkdownish:()=>Bo,run:()=>HV,runExit:()=>_V});var _t=dt(()=>{YD();NT();rd();jV();KV();oJ()});var lJ=U((dQt,aJ)=>{"use strict";aJ.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var nd=U((mQt,YT)=>{"use strict";var pje=lJ(),cJ=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,o=()=>{r--,e.length>0&&e.shift()()},a=(A,p,...h)=>{r++;let C=pje(A,...h);p(C),C.then(o,o)},n=(A,p,...h)=>{r<t?a(A,p,...h):e.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>n(A,h,...p));return Object.defineProperties(u,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),u};YT.exports=cJ;YT.exports.default=cJ});function Vu(t){return`YN${t.toString(10).padStart(4,"0")}`}function tS(t){let e=Number(t.slice(2));if(typeof dr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var dr,rS=dt(()=>{dr=(Ue=>(Ue[Ue.UNNAMED=0]="UNNAMED",Ue[Ue.EXCEPTION=1]="EXCEPTION",Ue[Ue.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Ue[Ue.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Ue[Ue.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Ue[Ue.BUILD_DISABLED=5]="BUILD_DISABLED",Ue[Ue.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Ue[Ue.MUST_BUILD=7]="MUST_BUILD",Ue[Ue.MUST_REBUILD=8]="MUST_REBUILD",Ue[Ue.BUILD_FAILED=9]="BUILD_FAILED",Ue[Ue.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Ue[Ue.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Ue[Ue.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",Ue[Ue.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",Ue[Ue.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",Ue[Ue.REMOTE_INVALID=15]="REMOTE_INVALID",Ue[Ue.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",Ue[Ue.RESOLUTION_PACK=17]="RESOLUTION_PACK",Ue[Ue.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",Ue[Ue.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",Ue[Ue.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",Ue[Ue.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",Ue[Ue.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",Ue[Ue.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",Ue[Ue.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",Ue[Ue.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",Ue[Ue.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",Ue[Ue.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",Ue[Ue.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",Ue[Ue.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",Ue[Ue.FETCH_FAILED=30]="FETCH_FAILED",Ue[Ue.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",Ue[Ue.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",Ue[Ue.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",Ue[Ue.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",Ue[Ue.NETWORK_ERROR=35]="NETWORK_ERROR",Ue[Ue.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",Ue[Ue.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",Ue[Ue.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",Ue[Ue.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",Ue[Ue.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",Ue[Ue.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",Ue[Ue.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",Ue[Ue.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",Ue[Ue.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",Ue[Ue.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",Ue[Ue.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",Ue[Ue.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",Ue[Ue.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",Ue[Ue.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",Ue[Ue.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",Ue[Ue.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",Ue[Ue.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",Ue[Ue.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",Ue[Ue.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",Ue[Ue.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",Ue[Ue.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",Ue[Ue.INVALID_MANIFEST=57]="INVALID_MANIFEST",Ue[Ue.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",Ue[Ue.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",Ue[Ue.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",Ue[Ue.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",Ue[Ue.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",Ue[Ue.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",Ue[Ue.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",Ue[Ue.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",Ue[Ue.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",Ue[Ue.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",Ue[Ue.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",Ue[Ue.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION",Ue[Ue.AUTO_NM_SUCCESS=70]="AUTO_NM_SUCCESS",Ue[Ue.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]="NM_CANT_INSTALL_EXTERNAL_SOFT_LINK",Ue[Ue.NM_PRESERVE_SYMLINKS_REQUIRED=72]="NM_PRESERVE_SYMLINKS_REQUIRED",Ue[Ue.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]="UPDATE_LOCKFILE_ONLY_SKIP_LINK",Ue[Ue.NM_HARDLINKS_MODE_DOWNGRADED=74]="NM_HARDLINKS_MODE_DOWNGRADED",Ue[Ue.PROLOG_INSTANTIATION_ERROR=75]="PROLOG_INSTANTIATION_ERROR",Ue[Ue.INCOMPATIBLE_ARCHITECTURE=76]="INCOMPATIBLE_ARCHITECTURE",Ue[Ue.GHOST_ARCHITECTURE=77]="GHOST_ARCHITECTURE",Ue[Ue.RESOLUTION_MISMATCH=78]="RESOLUTION_MISMATCH",Ue[Ue.PROLOG_LIMIT_EXCEEDED=79]="PROLOG_LIMIT_EXCEEDED",Ue[Ue.NETWORK_DISABLED=80]="NETWORK_DISABLED",Ue[Ue.NETWORK_UNSAFE_HTTP=81]="NETWORK_UNSAFE_HTTP",Ue[Ue.RESOLUTION_FAILED=82]="RESOLUTION_FAILED",Ue[Ue.AUTOMERGE_GIT_ERROR=83]="AUTOMERGE_GIT_ERROR",Ue[Ue.CONSTRAINTS_CHECK_FAILED=84]="CONSTRAINTS_CHECK_FAILED",Ue))(dr||{})});var sw=U((EQt,uJ)=>{var hje="2.0.0",gje=Number.MAX_SAFE_INTEGER||9007199254740991,dje=16;uJ.exports={SEMVER_SPEC_VERSION:hje,MAX_LENGTH:256,MAX_SAFE_INTEGER:gje,MAX_SAFE_COMPONENT_LENGTH:dje}});var ow=U((CQt,AJ)=>{var mje=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};AJ.exports=mje});var id=U((Kp,fJ)=>{var{MAX_SAFE_COMPONENT_LENGTH:KT}=sw(),yje=ow();Kp=fJ.exports={};var Eje=Kp.re=[],or=Kp.src=[],ar=Kp.t={},Cje=0,Kr=(t,e,r)=>{let o=Cje++;yje(t,o,e),ar[t]=o,or[o]=e,Eje[o]=new RegExp(e,r?"g":void 0)};Kr("NUMERICIDENTIFIER","0|[1-9]\\d*");Kr("NUMERICIDENTIFIERLOOSE","[0-9]+");Kr("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");Kr("MAINVERSION",`(${or[ar.NUMERICIDENTIFIER]})\\.(${or[ar.NUMERICIDENTIFIER]})\\.(${or[ar.NUMERICIDENTIFIER]})`);Kr("MAINVERSIONLOOSE",`(${or[ar.NUMERICIDENTIFIERLOOSE]})\\.(${or[ar.NUMERICIDENTIFIERLOOSE]})\\.(${or[ar.NUMERICIDENTIFIERLOOSE]})`);Kr("PRERELEASEIDENTIFIER",`(?:${or[ar.NUMERICIDENTIFIER]}|${or[ar.NONNUMERICIDENTIFIER]})`);Kr("PRERELEASEIDENTIFIERLOOSE",`(?:${or[ar.NUMERICIDENTIFIERLOOSE]}|${or[ar.NONNUMERICIDENTIFIER]})`);Kr("PRERELEASE",`(?:-(${or[ar.PRERELEASEIDENTIFIER]}(?:\\.${or[ar.PRERELEASEIDENTIFIER]})*))`);Kr("PRERELEASELOOSE",`(?:-?(${or[ar.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${or[ar.PRERELEASEIDENTIFIERLOOSE]})*))`);Kr("BUILDIDENTIFIER","[0-9A-Za-z-]+");Kr("BUILD",`(?:\\+(${or[ar.BUILDIDENTIFIER]}(?:\\.${or[ar.BUILDIDENTIFIER]})*))`);Kr("FULLPLAIN",`v?${or[ar.MAINVERSION]}${or[ar.PRERELEASE]}?${or[ar.BUILD]}?`);Kr("FULL",`^${or[ar.FULLPLAIN]}$`);Kr("LOOSEPLAIN",`[v=\\s]*${or[ar.MAINVERSIONLOOSE]}${or[ar.PRERELEASELOOSE]}?${or[ar.BUILD]}?`);Kr("LOOSE",`^${or[ar.LOOSEPLAIN]}$`);Kr("GTLT","((?:<|>)?=?)");Kr("XRANGEIDENTIFIERLOOSE",`${or[ar.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Kr("XRANGEIDENTIFIER",`${or[ar.NUMERICIDENTIFIER]}|x|X|\\*`);Kr("XRANGEPLAIN",`[v=\\s]*(${or[ar.XRANGEIDENTIFIER]})(?:\\.(${or[ar.XRANGEIDENTIFIER]})(?:\\.(${or[ar.XRANGEIDENTIFIER]})(?:${or[ar.PRERELEASE]})?${or[ar.BUILD]}?)?)?`);Kr("XRANGEPLAINLOOSE",`[v=\\s]*(${or[ar.XRANGEIDENTIFIERLOOSE]})(?:\\.(${or[ar.XRANGEIDENTIFIERLOOSE]})(?:\\.(${or[ar.XRANGEIDENTIFIERLOOSE]})(?:${or[ar.PRERELEASELOOSE]})?${or[ar.BUILD]}?)?)?`);Kr("XRANGE",`^${or[ar.GTLT]}\\s*${or[ar.XRANGEPLAIN]}$`);Kr("XRANGELOOSE",`^${or[ar.GTLT]}\\s*${or[ar.XRANGEPLAINLOOSE]}$`);Kr("COERCE",`(^|[^\\d])(\\d{1,${KT}})(?:\\.(\\d{1,${KT}}))?(?:\\.(\\d{1,${KT}}))?(?:$|[^\\d])`);Kr("COERCERTL",or[ar.COERCE],!0);Kr("LONETILDE","(?:~>?)");Kr("TILDETRIM",`(\\s*)${or[ar.LONETILDE]}\\s+`,!0);Kp.tildeTrimReplace="$1~";Kr("TILDE",`^${or[ar.LONETILDE]}${or[ar.XRANGEPLAIN]}$`);Kr("TILDELOOSE",`^${or[ar.LONETILDE]}${or[ar.XRANGEPLAINLOOSE]}$`);Kr("LONECARET","(?:\\^)");Kr("CARETTRIM",`(\\s*)${or[ar.LONECARET]}\\s+`,!0);Kp.caretTrimReplace="$1^";Kr("CARET",`^${or[ar.LONECARET]}${or[ar.XRANGEPLAIN]}$`);Kr("CARETLOOSE",`^${or[ar.LONECARET]}${or[ar.XRANGEPLAINLOOSE]}$`);Kr("COMPARATORLOOSE",`^${or[ar.GTLT]}\\s*(${or[ar.LOOSEPLAIN]})$|^$`);Kr("COMPARATOR",`^${or[ar.GTLT]}\\s*(${or[ar.FULLPLAIN]})$|^$`);Kr("COMPARATORTRIM",`(\\s*)${or[ar.GTLT]}\\s*(${or[ar.LOOSEPLAIN]}|${or[ar.XRANGEPLAIN]})`,!0);Kp.comparatorTrimReplace="$1$2$3";Kr("HYPHENRANGE",`^\\s*(${or[ar.XRANGEPLAIN]})\\s+-\\s+(${or[ar.XRANGEPLAIN]})\\s*$`);Kr("HYPHENRANGELOOSE",`^\\s*(${or[ar.XRANGEPLAINLOOSE]})\\s+-\\s+(${or[ar.XRANGEPLAINLOOSE]})\\s*$`);Kr("STAR","(<|>)?=?\\s*\\*");Kr("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Kr("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var aw=U((IQt,pJ)=>{var Ije=["includePrerelease","loose","rtl"],wje=t=>t?typeof t!="object"?{loose:!0}:Ije.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};pJ.exports=wje});var nS=U((wQt,dJ)=>{var hJ=/^[0-9]+$/,gJ=(t,e)=>{let r=hJ.test(t),o=hJ.test(e);return r&&o&&(t=+t,e=+e),t===e?0:r&&!o?-1:o&&!r?1:t<e?-1:1},Bje=(t,e)=>gJ(e,t);dJ.exports={compareIdentifiers:gJ,rcompareIdentifiers:Bje}});var Do=U((BQt,CJ)=>{var iS=ow(),{MAX_LENGTH:mJ,MAX_SAFE_INTEGER:sS}=sw(),{re:yJ,t:EJ}=id(),vje=aw(),{compareIdentifiers:Sy}=nS(),il=class{constructor(e,r){if(r=vje(r),e instanceof il){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>mJ)throw new TypeError(`version is longer than ${mJ} characters`);iS("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let o=e.trim().match(r.loose?yJ[EJ.LOOSE]:yJ[EJ.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>sS||this.major<0)throw new TypeError("Invalid major version");if(this.minor>sS||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>sS||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n<sS)return n}return a}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(iS("SemVer.compare",this.version,this.options,e),!(e instanceof il)){if(typeof e=="string"&&e===this.version)return 0;e=new il(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof il||(e=new il(e,this.options)),Sy(this.major,e.major)||Sy(this.minor,e.minor)||Sy(this.patch,e.patch)}comparePre(e){if(e instanceof il||(e=new il(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let o=this.prerelease[r],a=e.prerelease[r];if(iS("prerelease compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return Sy(o,a)}while(++r)}compareBuild(e){e instanceof il||(e=new il(e,this.options));let r=0;do{let o=this.build[r],a=e.build[r];if(iS("prerelease compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return Sy(o,a)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);o===-1&&this.prerelease.push(0)}r&&(Sy(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};CJ.exports=il});var sd=U((vQt,vJ)=>{var{MAX_LENGTH:Dje}=sw(),{re:IJ,t:wJ}=id(),BJ=Do(),Sje=aw(),Pje=(t,e)=>{if(e=Sje(e),t instanceof BJ)return t;if(typeof t!="string"||t.length>Dje||!(e.loose?IJ[wJ.LOOSE]:IJ[wJ.FULL]).test(t))return null;try{return new BJ(t,e)}catch{return null}};vJ.exports=Pje});var SJ=U((DQt,DJ)=>{var xje=sd(),bje=(t,e)=>{let r=xje(t,e);return r?r.version:null};DJ.exports=bje});var xJ=U((SQt,PJ)=>{var Qje=sd(),kje=(t,e)=>{let r=Qje(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};PJ.exports=kje});var kJ=U((PQt,QJ)=>{var bJ=Do(),Fje=(t,e,r,o)=>{typeof r=="string"&&(o=r,r=void 0);try{return new bJ(t instanceof bJ?t.version:t,r).inc(e,o).version}catch{return null}};QJ.exports=Fje});var ql=U((xQt,RJ)=>{var FJ=Do(),Rje=(t,e,r)=>new FJ(t,r).compare(new FJ(e,r));RJ.exports=Rje});var oS=U((bQt,TJ)=>{var Tje=ql(),Nje=(t,e,r)=>Tje(t,e,r)===0;TJ.exports=Nje});var OJ=U((QQt,LJ)=>{var NJ=sd(),Lje=oS(),Oje=(t,e)=>{if(Lje(t,e))return null;{let r=NJ(t),o=NJ(e),a=r.prerelease.length||o.prerelease.length,n=a?"pre":"",u=a?"prerelease":"";for(let A in r)if((A==="major"||A==="minor"||A==="patch")&&r[A]!==o[A])return n+A;return u}};LJ.exports=Oje});var UJ=U((kQt,MJ)=>{var Mje=Do(),Uje=(t,e)=>new Mje(t,e).major;MJ.exports=Uje});var HJ=U((FQt,_J)=>{var _je=Do(),Hje=(t,e)=>new _je(t,e).minor;_J.exports=Hje});var jJ=U((RQt,qJ)=>{var qje=Do(),jje=(t,e)=>new qje(t,e).patch;qJ.exports=jje});var WJ=U((TQt,GJ)=>{var Gje=sd(),Wje=(t,e)=>{let r=Gje(t,e);return r&&r.prerelease.length?r.prerelease:null};GJ.exports=Wje});var KJ=U((NQt,YJ)=>{var Yje=ql(),Kje=(t,e,r)=>Yje(e,t,r);YJ.exports=Kje});var JJ=U((LQt,VJ)=>{var Vje=ql(),Jje=(t,e)=>Vje(t,e,!0);VJ.exports=Jje});var aS=U((OQt,XJ)=>{var zJ=Do(),zje=(t,e,r)=>{let o=new zJ(t,r),a=new zJ(e,r);return o.compare(a)||o.compareBuild(a)};XJ.exports=zje});var $J=U((MQt,ZJ)=>{var Xje=aS(),Zje=(t,e)=>t.sort((r,o)=>Xje(r,o,e));ZJ.exports=Zje});var tz=U((UQt,ez)=>{var $je=aS(),eGe=(t,e)=>t.sort((r,o)=>$je(o,r,e));ez.exports=eGe});var lw=U((_Qt,rz)=>{var tGe=ql(),rGe=(t,e,r)=>tGe(t,e,r)>0;rz.exports=rGe});var lS=U((HQt,nz)=>{var nGe=ql(),iGe=(t,e,r)=>nGe(t,e,r)<0;nz.exports=iGe});var VT=U((qQt,iz)=>{var sGe=ql(),oGe=(t,e,r)=>sGe(t,e,r)!==0;iz.exports=oGe});var cS=U((jQt,sz)=>{var aGe=ql(),lGe=(t,e,r)=>aGe(t,e,r)>=0;sz.exports=lGe});var uS=U((GQt,oz)=>{var cGe=ql(),uGe=(t,e,r)=>cGe(t,e,r)<=0;oz.exports=uGe});var JT=U((WQt,az)=>{var AGe=oS(),fGe=VT(),pGe=lw(),hGe=cS(),gGe=lS(),dGe=uS(),mGe=(t,e,r,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return AGe(t,r,o);case"!=":return fGe(t,r,o);case">":return pGe(t,r,o);case">=":return hGe(t,r,o);case"<":return gGe(t,r,o);case"<=":return dGe(t,r,o);default:throw new TypeError(`Invalid operator: ${e}`)}};az.exports=mGe});var cz=U((YQt,lz)=>{var yGe=Do(),EGe=sd(),{re:AS,t:fS}=id(),CGe=(t,e)=>{if(t instanceof yGe)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(AS[fS.COERCE]);else{let o;for(;(o=AS[fS.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||o.index+o[0].length!==r.index+r[0].length)&&(r=o),AS[fS.COERCERTL].lastIndex=o.index+o[1].length+o[2].length;AS[fS.COERCERTL].lastIndex=-1}return r===null?null:EGe(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};lz.exports=CGe});var Az=U((KQt,uz)=>{"use strict";uz.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var pS=U((VQt,fz)=>{"use strict";fz.exports=dn;dn.Node=od;dn.create=dn;function dn(t){var e=this;if(e instanceof dn||(e=new dn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){e.push(a)});else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)e.push(arguments[r]);return e}dn.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};dn.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};dn.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};dn.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)wGe(this,arguments[t]);return this.length};dn.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)BGe(this,arguments[t]);return this.length};dn.prototype.pop=function(){if(!!this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};dn.prototype.shift=function(){if(!!this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};dn.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,o=0;r!==null;o++)t.call(e,r.value,o,this),r=r.next};dn.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,o=this.length-1;r!==null;o--)t.call(e,r.value,o,this),r=r.prev};dn.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};dn.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};dn.prototype.map=function(t,e){e=e||this;for(var r=new dn,o=this.head;o!==null;)r.push(t.call(e,o.value,this)),o=o.next;return r};dn.prototype.mapReverse=function(t,e){e=e||this;for(var r=new dn,o=this.tail;o!==null;)r.push(t.call(e,o.value,this)),o=o.prev;return r};dn.prototype.reduce=function(t,e){var r,o=this.head;if(arguments.length>1)r=e;else if(this.head)o=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;o!==null;a++)r=t(r,o.value,a),o=o.next;return r};dn.prototype.reduceReverse=function(t,e){var r,o=this.tail;if(arguments.length>1)r=e;else if(this.tail)o=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;o!==null;a--)r=t(r,o.value,a),o=o.prev;return r};dn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};dn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};dn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new dn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var o=0,a=this.head;a!==null&&o<t;o++)a=a.next;for(;a!==null&&o<e;o++,a=a.next)r.push(a.value);return r};dn.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new dn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var o=this.length,a=this.tail;a!==null&&o>e;o--)a=a.prev;for(;a!==null&&o>t;o--,a=a.prev)r.push(a.value);return r};dn.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var o=0,a=this.head;a!==null&&o<t;o++)a=a.next;for(var n=[],o=0;a&&o<e;o++)n.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var o=0;o<r.length;o++)a=IGe(this,a,r[o]);return n};dn.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var o=r.prev;r.prev=r.next,r.next=o}return this.head=e,this.tail=t,this};function IGe(t,e,r){var o=e===t.head?new od(r,null,e,t):new od(r,e,e.next,t);return o.next===null&&(t.tail=o),o.prev===null&&(t.head=o),t.length++,o}function wGe(t,e){t.tail=new od(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function BGe(t,e){t.head=new od(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function od(t,e,r,o){if(!(this instanceof od))return new od(t,e,r,o);this.list=o,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Az()(dn)}catch{}});var mz=U((JQt,dz)=>{"use strict";var vGe=pS(),ad=Symbol("max"),vf=Symbol("length"),Py=Symbol("lengthCalculator"),uw=Symbol("allowStale"),ld=Symbol("maxAge"),Bf=Symbol("dispose"),pz=Symbol("noDisposeOnSet"),Ds=Symbol("lruList"),jc=Symbol("cache"),gz=Symbol("updateAgeOnGet"),zT=()=>1,ZT=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[ad]=e.max||1/0,o=e.length||zT;if(this[Py]=typeof o!="function"?zT:o,this[uw]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[ld]=e.maxAge||0,this[Bf]=e.dispose,this[pz]=e.noDisposeOnSet||!1,this[gz]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[ad]=e||1/0,cw(this)}get max(){return this[ad]}set allowStale(e){this[uw]=!!e}get allowStale(){return this[uw]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[ld]=e,cw(this)}get maxAge(){return this[ld]}set lengthCalculator(e){typeof e!="function"&&(e=zT),e!==this[Py]&&(this[Py]=e,this[vf]=0,this[Ds].forEach(r=>{r.length=this[Py](r.value,r.key),this[vf]+=r.length})),cw(this)}get lengthCalculator(){return this[Py]}get length(){return this[vf]}get itemCount(){return this[Ds].length}rforEach(e,r){r=r||this;for(let o=this[Ds].tail;o!==null;){let a=o.prev;hz(this,e,o,r),o=a}}forEach(e,r){r=r||this;for(let o=this[Ds].head;o!==null;){let a=o.next;hz(this,e,o,r),o=a}}keys(){return this[Ds].toArray().map(e=>e.key)}values(){return this[Ds].toArray().map(e=>e.value)}reset(){this[Bf]&&this[Ds]&&this[Ds].length&&this[Ds].forEach(e=>this[Bf](e.key,e.value)),this[jc]=new Map,this[Ds]=new vGe,this[vf]=0}dump(){return this[Ds].map(e=>hS(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ds]}set(e,r,o){if(o=o||this[ld],o&&typeof o!="number")throw new TypeError("maxAge must be a number");let a=o?Date.now():0,n=this[Py](r,e);if(this[jc].has(e)){if(n>this[ad])return xy(this,this[jc].get(e)),!1;let p=this[jc].get(e).value;return this[Bf]&&(this[pz]||this[Bf](e,p.value)),p.now=a,p.maxAge=o,p.value=r,this[vf]+=n-p.length,p.length=n,this.get(e),cw(this),!0}let u=new $T(e,r,n,a,o);return u.length>this[ad]?(this[Bf]&&this[Bf](e,r),!1):(this[vf]+=u.length,this[Ds].unshift(u),this[jc].set(e,this[Ds].head),cw(this),!0)}has(e){if(!this[jc].has(e))return!1;let r=this[jc].get(e).value;return!hS(this,r)}get(e){return XT(this,e,!0)}peek(e){return XT(this,e,!1)}pop(){let e=this[Ds].tail;return e?(xy(this,e),e.value):null}del(e){xy(this,this[jc].get(e))}load(e){this.reset();let r=Date.now();for(let o=e.length-1;o>=0;o--){let a=e[o],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let u=n-r;u>0&&this.set(a.k,a.v,u)}}}prune(){this[jc].forEach((e,r)=>XT(this,r,!1))}},XT=(t,e,r)=>{let o=t[jc].get(e);if(o){let a=o.value;if(hS(t,a)){if(xy(t,o),!t[uw])return}else r&&(t[gz]&&(o.value.now=Date.now()),t[Ds].unshiftNode(o));return a.value}},hS=(t,e)=>{if(!e||!e.maxAge&&!t[ld])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[ld]&&r>t[ld]},cw=t=>{if(t[vf]>t[ad])for(let e=t[Ds].tail;t[vf]>t[ad]&&e!==null;){let r=e.prev;xy(t,e),e=r}},xy=(t,e)=>{if(e){let r=e.value;t[Bf]&&t[Bf](r.key,r.value),t[vf]-=r.length,t[jc].delete(r.key),t[Ds].removeNode(e)}},$T=class{constructor(e,r,o,a,n){this.key=e,this.value=r,this.length=o,this.now=a,this.maxAge=n||0}},hz=(t,e,r,o)=>{let a=r.value;hS(t,a)&&(xy(t,r),t[uw]||(a=void 0)),a&&e.call(o,a.value,a.key,t)};dz.exports=ZT});var jl=U((zQt,Iz)=>{var cd=class{constructor(e,r){if(r=SGe(r),e instanceof cd)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new cd(e.raw,r);if(e instanceof eN)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(a=>!Ez(a[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&kGe(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let o=`parseRange:${Object.keys(this.options).join(",")}:${e}`,a=yz.get(o);if(a)return a;let n=this.options.loose,u=n?Sa[Vo.HYPHENRANGELOOSE]:Sa[Vo.HYPHENRANGE];e=e.replace(u,HGe(this.options.includePrerelease)),wi("hyphen replace",e),e=e.replace(Sa[Vo.COMPARATORTRIM],xGe),wi("comparator trim",e),e=e.replace(Sa[Vo.TILDETRIM],bGe),e=e.replace(Sa[Vo.CARETTRIM],QGe),e=e.split(/\s+/).join(" ");let A=e.split(" ").map(w=>FGe(w,this.options)).join(" ").split(/\s+/).map(w=>_Ge(w,this.options));n&&(A=A.filter(w=>(wi("loose invalid filter",w,this.options),!!w.match(Sa[Vo.COMPARATORLOOSE])))),wi("range list",A);let p=new Map,h=A.map(w=>new eN(w,this.options));for(let w of h){if(Ez(w))return[w];p.set(w.value,w)}p.size>1&&p.has("")&&p.delete("");let C=[...p.values()];return yz.set(o,C),C}intersects(e,r){if(!(e instanceof cd))throw new TypeError("a Range is required");return this.set.some(o=>Cz(o,r)&&e.set.some(a=>Cz(a,r)&&o.every(n=>a.every(u=>n.intersects(u,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new PGe(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(qGe(this.set[r],e,this.options))return!0;return!1}};Iz.exports=cd;var DGe=mz(),yz=new DGe({max:1e3}),SGe=aw(),eN=Aw(),wi=ow(),PGe=Do(),{re:Sa,t:Vo,comparatorTrimReplace:xGe,tildeTrimReplace:bGe,caretTrimReplace:QGe}=id(),Ez=t=>t.value==="<0.0.0-0",kGe=t=>t.value==="",Cz=(t,e)=>{let r=!0,o=t.slice(),a=o.pop();for(;r&&o.length;)r=o.every(n=>a.intersects(n,e)),a=o.pop();return r},FGe=(t,e)=>(wi("comp",t,e),t=NGe(t,e),wi("caret",t),t=RGe(t,e),wi("tildes",t),t=OGe(t,e),wi("xrange",t),t=UGe(t,e),wi("stars",t),t),Jo=t=>!t||t.toLowerCase()==="x"||t==="*",RGe=(t,e)=>t.trim().split(/\s+/).map(r=>TGe(r,e)).join(" "),TGe=(t,e)=>{let r=e.loose?Sa[Vo.TILDELOOSE]:Sa[Vo.TILDE];return t.replace(r,(o,a,n,u,A)=>{wi("tilde",t,o,a,n,u,A);let p;return Jo(a)?p="":Jo(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:Jo(u)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:A?(wi("replaceTilde pr",A),p=`>=${a}.${n}.${u}-${A} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${u} <${a}.${+n+1}.0-0`,wi("tilde return",p),p})},NGe=(t,e)=>t.trim().split(/\s+/).map(r=>LGe(r,e)).join(" "),LGe=(t,e)=>{wi("caret",t,e);let r=e.loose?Sa[Vo.CARETLOOSE]:Sa[Vo.CARET],o=e.includePrerelease?"-0":"";return t.replace(r,(a,n,u,A,p)=>{wi("caret",t,a,n,u,A,p);let h;return Jo(n)?h="":Jo(u)?h=`>=${n}.0.0${o} <${+n+1}.0.0-0`:Jo(A)?n==="0"?h=`>=${n}.${u}.0${o} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.0${o} <${+n+1}.0.0-0`:p?(wi("replaceCaret pr",p),n==="0"?u==="0"?h=`>=${n}.${u}.${A}-${p} <${n}.${u}.${+A+1}-0`:h=`>=${n}.${u}.${A}-${p} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.${A}-${p} <${+n+1}.0.0-0`):(wi("no pr"),n==="0"?u==="0"?h=`>=${n}.${u}.${A}${o} <${n}.${u}.${+A+1}-0`:h=`>=${n}.${u}.${A}${o} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.${A} <${+n+1}.0.0-0`),wi("caret return",h),h})},OGe=(t,e)=>(wi("replaceXRanges",t,e),t.split(/\s+/).map(r=>MGe(r,e)).join(" ")),MGe=(t,e)=>{t=t.trim();let r=e.loose?Sa[Vo.XRANGELOOSE]:Sa[Vo.XRANGE];return t.replace(r,(o,a,n,u,A,p)=>{wi("xRange",t,o,a,n,u,A,p);let h=Jo(n),C=h||Jo(u),w=C||Jo(A),v=w;return a==="="&&v&&(a=""),p=e.includePrerelease?"-0":"",h?a===">"||a==="<"?o="<0.0.0-0":o="*":a&&v?(C&&(u=0),A=0,a===">"?(a=">=",C?(n=+n+1,u=0,A=0):(u=+u+1,A=0)):a==="<="&&(a="<",C?n=+n+1:u=+u+1),a==="<"&&(p="-0"),o=`${a+n}.${u}.${A}${p}`):C?o=`>=${n}.0.0${p} <${+n+1}.0.0-0`:w&&(o=`>=${n}.${u}.0${p} <${n}.${+u+1}.0-0`),wi("xRange return",o),o})},UGe=(t,e)=>(wi("replaceStars",t,e),t.trim().replace(Sa[Vo.STAR],"")),_Ge=(t,e)=>(wi("replaceGTE0",t,e),t.trim().replace(Sa[e.includePrerelease?Vo.GTE0PRE:Vo.GTE0],"")),HGe=t=>(e,r,o,a,n,u,A,p,h,C,w,v,b)=>(Jo(o)?r="":Jo(a)?r=`>=${o}.0.0${t?"-0":""}`:Jo(n)?r=`>=${o}.${a}.0${t?"-0":""}`:u?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Jo(h)?p="":Jo(C)?p=`<${+h+1}.0.0-0`:Jo(w)?p=`<${h}.${+C+1}.0-0`:v?p=`<=${h}.${C}.${w}-${v}`:t?p=`<${h}.${C}.${+w+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),qGe=(t,e,r)=>{for(let o=0;o<t.length;o++)if(!t[o].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let o=0;o<t.length;o++)if(wi(t[o].semver),t[o].semver!==eN.ANY&&t[o].semver.prerelease.length>0){let a=t[o].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var Aw=U((XQt,Sz)=>{var fw=Symbol("SemVer ANY"),by=class{static get ANY(){return fw}constructor(e,r){if(r=jGe(r),e instanceof by){if(e.loose===!!r.loose)return e;e=e.value}rN("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===fw?this.value="":this.value=this.operator+this.semver.version,rN("comp",this)}parse(e){let r=this.options.loose?wz[Bz.COMPARATORLOOSE]:wz[Bz.COMPARATOR],o=e.match(r);if(!o)throw new TypeError(`Invalid comparator: ${e}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new vz(o[2],this.options.loose):this.semver=fw}toString(){return this.value}test(e){if(rN("Comparator.test",e,this.options.loose),this.semver===fw||e===fw)return!0;if(typeof e=="string")try{e=new vz(e,this.options)}catch{return!1}return tN(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof by))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Dz(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Dz(this.value,r).test(e.semver);let o=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),a=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),A=tN(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),p=tN(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return o||a||n&&u||A||p}};Sz.exports=by;var jGe=aw(),{re:wz,t:Bz}=id(),tN=JT(),rN=ow(),vz=Do(),Dz=jl()});var pw=U((ZQt,Pz)=>{var GGe=jl(),WGe=(t,e,r)=>{try{e=new GGe(e,r)}catch{return!1}return e.test(t)};Pz.exports=WGe});var bz=U(($Qt,xz)=>{var YGe=jl(),KGe=(t,e)=>new YGe(t,e).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));xz.exports=KGe});var kz=U((ekt,Qz)=>{var VGe=Do(),JGe=jl(),zGe=(t,e,r)=>{let o=null,a=null,n=null;try{n=new JGe(e,r)}catch{return null}return t.forEach(u=>{n.test(u)&&(!o||a.compare(u)===-1)&&(o=u,a=new VGe(o,r))}),o};Qz.exports=zGe});var Rz=U((tkt,Fz)=>{var XGe=Do(),ZGe=jl(),$Ge=(t,e,r)=>{let o=null,a=null,n=null;try{n=new ZGe(e,r)}catch{return null}return t.forEach(u=>{n.test(u)&&(!o||a.compare(u)===1)&&(o=u,a=new XGe(o,r))}),o};Fz.exports=$Ge});var Lz=U((rkt,Nz)=>{var nN=Do(),e9e=jl(),Tz=lw(),t9e=(t,e)=>{t=new e9e(t,e);let r=new nN("0.0.0");if(t.test(r)||(r=new nN("0.0.0-0"),t.test(r)))return r;r=null;for(let o=0;o<t.set.length;++o){let a=t.set[o],n=null;a.forEach(u=>{let A=new nN(u.semver.version);switch(u.operator){case">":A.prerelease.length===0?A.patch++:A.prerelease.push(0),A.raw=A.format();case"":case">=":(!n||Tz(A,n))&&(n=A);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),n&&(!r||Tz(r,n))&&(r=n)}return r&&t.test(r)?r:null};Nz.exports=t9e});var Mz=U((nkt,Oz)=>{var r9e=jl(),n9e=(t,e)=>{try{return new r9e(t,e).range||"*"}catch{return null}};Oz.exports=n9e});var gS=U((ikt,qz)=>{var i9e=Do(),Hz=Aw(),{ANY:s9e}=Hz,o9e=jl(),a9e=pw(),Uz=lw(),_z=lS(),l9e=uS(),c9e=cS(),u9e=(t,e,r,o)=>{t=new i9e(t,o),e=new o9e(e,o);let a,n,u,A,p;switch(r){case">":a=Uz,n=l9e,u=_z,A=">",p=">=";break;case"<":a=_z,n=c9e,u=Uz,A="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a9e(t,e,o))return!1;for(let h=0;h<e.set.length;++h){let C=e.set[h],w=null,v=null;if(C.forEach(b=>{b.semver===s9e&&(b=new Hz(">=0.0.0")),w=w||b,v=v||b,a(b.semver,w.semver,o)?w=b:u(b.semver,v.semver,o)&&(v=b)}),w.operator===A||w.operator===p||(!v.operator||v.operator===A)&&n(t,v.semver))return!1;if(v.operator===p&&u(t,v.semver))return!1}return!0};qz.exports=u9e});var Gz=U((skt,jz)=>{var A9e=gS(),f9e=(t,e,r)=>A9e(t,e,">",r);jz.exports=f9e});var Yz=U((okt,Wz)=>{var p9e=gS(),h9e=(t,e,r)=>p9e(t,e,"<",r);Wz.exports=h9e});var Jz=U((akt,Vz)=>{var Kz=jl(),g9e=(t,e,r)=>(t=new Kz(t,r),e=new Kz(e,r),t.intersects(e));Vz.exports=g9e});var Xz=U((lkt,zz)=>{var d9e=pw(),m9e=ql();zz.exports=(t,e,r)=>{let o=[],a=null,n=null,u=t.sort((C,w)=>m9e(C,w,r));for(let C of u)d9e(C,e,r)?(n=C,a||(a=C)):(n&&o.push([a,n]),n=null,a=null);a&&o.push([a,null]);let A=[];for(let[C,w]of o)C===w?A.push(C):!w&&C===u[0]?A.push("*"):w?C===u[0]?A.push(`<=${w}`):A.push(`${C} - ${w}`):A.push(`>=${C}`);let p=A.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e}});var rX=U((ckt,tX)=>{var Zz=jl(),dS=Aw(),{ANY:iN}=dS,hw=pw(),sN=ql(),y9e=(t,e,r={})=>{if(t===e)return!0;t=new Zz(t,r),e=new Zz(e,r);let o=!1;e:for(let a of t.set){for(let n of e.set){let u=E9e(a,n,r);if(o=o||u!==null,u)continue e}if(o)return!1}return!0},E9e=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===iN){if(e.length===1&&e[0].semver===iN)return!0;r.includePrerelease?t=[new dS(">=0.0.0-0")]:t=[new dS(">=0.0.0")]}if(e.length===1&&e[0].semver===iN){if(r.includePrerelease)return!0;e=[new dS(">=0.0.0")]}let o=new Set,a,n;for(let b of t)b.operator===">"||b.operator===">="?a=$z(a,b,r):b.operator==="<"||b.operator==="<="?n=eX(n,b,r):o.add(b.semver);if(o.size>1)return null;let u;if(a&&n){if(u=sN(a.semver,n.semver,r),u>0)return null;if(u===0&&(a.operator!==">="||n.operator!=="<="))return null}for(let b of o){if(a&&!hw(b,String(a),r)||n&&!hw(b,String(n),r))return null;for(let E of e)if(!hw(b,String(E),r))return!1;return!0}let A,p,h,C,w=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,v=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;w&&w.prerelease.length===1&&n.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(let b of e){if(C=C||b.operator===">"||b.operator===">=",h=h||b.operator==="<"||b.operator==="<=",a){if(v&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===v.major&&b.semver.minor===v.minor&&b.semver.patch===v.patch&&(v=!1),b.operator===">"||b.operator===">="){if(A=$z(a,b,r),A===b&&A!==a)return!1}else if(a.operator===">="&&!hw(a.semver,String(b),r))return!1}if(n){if(w&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===w.major&&b.semver.minor===w.minor&&b.semver.patch===w.patch&&(w=!1),b.operator==="<"||b.operator==="<="){if(p=eX(n,b,r),p===b&&p!==n)return!1}else if(n.operator==="<="&&!hw(n.semver,String(b),r))return!1}if(!b.operator&&(n||a)&&u!==0)return!1}return!(a&&h&&!n&&u!==0||n&&C&&!a&&u!==0||v||w)},$z=(t,e,r)=>{if(!t)return e;let o=sN(t.semver,e.semver,r);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},eX=(t,e,r)=>{if(!t)return e;let o=sN(t.semver,e.semver,r);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};tX.exports=y9e});var si=U((ukt,nX)=>{var oN=id();nX.exports={re:oN.re,src:oN.src,tokens:oN.t,SEMVER_SPEC_VERSION:sw().SEMVER_SPEC_VERSION,SemVer:Do(),compareIdentifiers:nS().compareIdentifiers,rcompareIdentifiers:nS().rcompareIdentifiers,parse:sd(),valid:SJ(),clean:xJ(),inc:kJ(),diff:OJ(),major:UJ(),minor:HJ(),patch:jJ(),prerelease:WJ(),compare:ql(),rcompare:KJ(),compareLoose:JJ(),compareBuild:aS(),sort:$J(),rsort:tz(),gt:lw(),lt:lS(),eq:oS(),neq:VT(),gte:cS(),lte:uS(),cmp:JT(),coerce:cz(),Comparator:Aw(),Range:jl(),satisfies:pw(),toComparators:bz(),maxSatisfying:kz(),minSatisfying:Rz(),minVersion:Lz(),validRange:Mz(),outside:gS(),gtr:Gz(),ltr:Yz(),intersects:Jz(),simplifyRange:Xz(),subset:rX()}});var sX=U((Akt,iX)=>{"use strict";function C9e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function ud(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ud)}C9e(ud,Error);ud.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",w;for(w=0;w<h.parts.length;w++)C+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),w,v;for(w=0;w<h.length;w++)C[w]=u(h[w]);if(C.sort(),C.length>0){for(w=1,v=1;w<C.length;w++)C[w-1]!==C[w]&&(C[v]=C[w],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function I9e(t,e){e=e!==void 0?e:{};var r={},o={Expression:y},a=y,n="|",u=Me("|",!1),A="&",p=Me("&",!1),h="^",C=Me("^",!1),w=function($,ie){return!!ie.reduce((ke,Ne)=>{switch(Ne[1]){case"|":return ke|Ne[3];case"&":return ke&Ne[3];case"^":return ke^Ne[3]}},$)},v="!",b=Me("!",!1),E=function($){return!$},R="(",L=Me("(",!1),_=")",V=Me(")",!1),re=function($){return $},ae=/^[^ \t\n\r()!|&\^]/,he=Te([" "," ",`
127`,"\r","(",")","!","|","&","^"],!0,!1),pe=function($){return e.queryPattern.test($)},De=function($){return e.checkFn($)},ge=qe("whitespace"),le=/^[ \t\n\r]/,Pe=Te([" "," ",`
128`,"\r"],!1,!1),g=0,ve=0,Ee=[{line:1,column:1}],de=0,ne=[],Z=0,me;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function be(){return t.substring(ve,g)}function ut(){return Oe(ve,g)}function H($,ie){throw ie=ie!==void 0?ie:Oe(ve,g),P([qe($)],t.substring(ve,g),ie)}function yt($,ie){throw ie=ie!==void 0?ie:Oe(ve,g),I($,ie)}function Me($,ie){return{type:"literal",text:$,ignoreCase:ie}}function Te($,ie,ke){return{type:"class",parts:$,inverted:ie,ignoreCase:ke}}function Qe(){return{type:"any"}}function _e(){return{type:"end"}}function qe($){return{type:"other",description:$}}function At($){var ie=Ee[$],ke;if(ie)return ie;for(ke=$-1;!Ee[ke];)ke--;for(ie=Ee[ke],ie={line:ie.line,column:ie.column};ke<$;)t.charCodeAt(ke)===10?(ie.line++,ie.column=1):ie.column++,ke++;return Ee[$]=ie,ie}function Oe($,ie){var ke=At($),Ne=At(ie);return{start:{offset:$,line:ke.line,column:ke.column},end:{offset:ie,line:Ne.line,column:Ne.column}}}function x($){g<de||(g>de&&(de=g,ne=[]),ne.push($))}function I($,ie){return new ud($,null,null,ie)}function P($,ie,ke){return new ud(ud.buildMessage($,ie),$,ie,ke)}function y(){var $,ie,ke,Ne,st,ht,Ut,Xt;if($=g,ie=F(),ie!==r){for(ke=[],Ne=g,st=X(),st!==r?(t.charCodeAt(g)===124?(ht=n,g++):(ht=r,Z===0&&x(u)),ht===r&&(t.charCodeAt(g)===38?(ht=A,g++):(ht=r,Z===0&&x(p)),ht===r&&(t.charCodeAt(g)===94?(ht=h,g++):(ht=r,Z===0&&x(C)))),ht!==r?(Ut=X(),Ut!==r?(Xt=F(),Xt!==r?(st=[st,ht,Ut,Xt],Ne=st):(g=Ne,Ne=r)):(g=Ne,Ne=r)):(g=Ne,Ne=r)):(g=Ne,Ne=r);Ne!==r;)ke.push(Ne),Ne=g,st=X(),st!==r?(t.charCodeAt(g)===124?(ht=n,g++):(ht=r,Z===0&&x(u)),ht===r&&(t.charCodeAt(g)===38?(ht=A,g++):(ht=r,Z===0&&x(p)),ht===r&&(t.charCodeAt(g)===94?(ht=h,g++):(ht=r,Z===0&&x(C)))),ht!==r?(Ut=X(),Ut!==r?(Xt=F(),Xt!==r?(st=[st,ht,Ut,Xt],Ne=st):(g=Ne,Ne=r)):(g=Ne,Ne=r)):(g=Ne,Ne=r)):(g=Ne,Ne=r);ke!==r?(ve=$,ie=w(ie,ke),$=ie):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,ie,ke,Ne,st,ht;return $=g,t.charCodeAt(g)===33?(ie=v,g++):(ie=r,Z===0&&x(b)),ie!==r?(ke=F(),ke!==r?(ve=$,ie=E(ke),$=ie):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(ie=R,g++):(ie=r,Z===0&&x(L)),ie!==r?(ke=X(),ke!==r?(Ne=y(),Ne!==r?(st=X(),st!==r?(t.charCodeAt(g)===41?(ht=_,g++):(ht=r,Z===0&&x(V)),ht!==r?(ve=$,ie=re(Ne),$=ie):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,ie,ke,Ne,st;if($=g,ie=X(),ie!==r){if(ke=g,Ne=[],ae.test(t.charAt(g))?(st=t.charAt(g),g++):(st=r,Z===0&&x(he)),st!==r)for(;st!==r;)Ne.push(st),ae.test(t.charAt(g))?(st=t.charAt(g),g++):(st=r,Z===0&&x(he));else Ne=r;Ne!==r?ke=t.substring(ke,g):ke=Ne,ke!==r?(ve=g,Ne=pe(ke),Ne?Ne=void 0:Ne=r,Ne!==r?(ve=$,ie=De(ke),$=ie):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,ie;for(Z++,$=[],le.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,Z===0&&x(Pe));ie!==r;)$.push(ie),le.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,Z===0&&x(Pe));return Z--,$===r&&(ie=r,Z===0&&x(ge)),$}if(me=a(),me!==r&&g===t.length)return me;throw me!==r&&g<t.length&&x(_e()),P(ne,de<t.length?t.charAt(de):null,de<t.length?Oe(de,de+1):Oe(de,de))}iX.exports={SyntaxError:ud,parse:I9e}});var oX=U(mS=>{var{parse:w9e}=sX();mS.makeParser=(t=/[a-z]+/)=>(e,r)=>w9e(e,{queryPattern:t,checkFn:r});mS.parse=mS.makeParser()});var lX=U((pkt,aX)=>{"use strict";aX.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var aN=U((hkt,uX)=>{var gw=lX(),cX={};for(let t of Object.keys(gw))cX[gw[t]]=t;var cr={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};uX.exports=cr;for(let t of Object.keys(cr)){if(!("channels"in cr[t]))throw new Error("missing channels property: "+t);if(!("labels"in cr[t]))throw new Error("missing channel labels property: "+t);if(cr[t].labels.length!==cr[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=cr[t];delete cr[t].channels,delete cr[t].labels,Object.defineProperty(cr[t],"channels",{value:e}),Object.defineProperty(cr[t],"labels",{value:r})}cr.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(e,r,o),n=Math.max(e,r,o),u=n-a,A,p;n===a?A=0:e===n?A=(r-o)/u:r===n?A=2+(o-e)/u:o===n&&(A=4+(e-r)/u),A=Math.min(A*60,360),A<0&&(A+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=u/(n+a):p=u/(2-n-a),[A,p*100,h*100]};cr.rgb.hsv=function(t){let e,r,o,a,n,u=t[0]/255,A=t[1]/255,p=t[2]/255,h=Math.max(u,A,p),C=h-Math.min(u,A,p),w=function(v){return(h-v)/6/C+1/2};return C===0?(a=0,n=0):(n=C/h,e=w(u),r=w(A),o=w(p),u===h?a=o-r:A===h?a=1/3+e-o:p===h&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};cr.rgb.hwb=function(t){let e=t[0],r=t[1],o=t[2],a=cr.rgb.hsl(t)[0],n=1/255*Math.min(e,Math.min(r,o));return o=1-1/255*Math.max(e,Math.max(r,o)),[a,n*100,o*100]};cr.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(1-e,1-r,1-o),n=(1-e-a)/(1-a)||0,u=(1-r-a)/(1-a)||0,A=(1-o-a)/(1-a)||0;return[n*100,u*100,A*100,a*100]};function B9e(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}cr.rgb.keyword=function(t){let e=cX[t];if(e)return e;let r=1/0,o;for(let a of Object.keys(gw)){let n=gw[a],u=B9e(t,n);u<r&&(r=u,o=a)}return o};cr.keyword.rgb=function(t){return gw[t]};cr.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,o=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;let a=e*.4124+r*.3576+o*.1805,n=e*.2126+r*.7152+o*.0722,u=e*.0193+r*.1192+o*.9505;return[a*100,n*100,u*100]};cr.rgb.lab=function(t){let e=cr.rgb.xyz(t),r=e[0],o=e[1],a=e[2];r/=95.047,o/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*o-16,u=500*(r-o),A=200*(o-a);return[n,u,A]};cr.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,o=t[2]/100,a,n,u;if(r===0)return u=o*255,[u,u,u];o<.5?a=o*(1+r):a=o+r-o*r;let A=2*o-a,p=[0,0,0];for(let h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?u=A+(a-A)*6*n:2*n<1?u=a:3*n<2?u=A+(a-A)*(2/3-n)*6:u=A,p[h]=u*255;return p};cr.hsl.hsv=function(t){let e=t[0],r=t[1]/100,o=t[2]/100,a=r,n=Math.max(o,.01);o*=2,r*=o<=1?o:2-o,a*=n<=1?n:2-n;let u=(o+r)/2,A=o===0?2*a/(n+a):2*r/(o+r);return[e,A*100,u*100]};cr.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,o=t[2]/100,a=Math.floor(e)%6,n=e-Math.floor(e),u=255*o*(1-r),A=255*o*(1-r*n),p=255*o*(1-r*(1-n));switch(o*=255,a){case 0:return[o,p,u];case 1:return[A,o,u];case 2:return[u,o,p];case 3:return[u,A,o];case 4:return[p,u,o];case 5:return[o,u,A]}};cr.hsv.hsl=function(t){let e=t[0],r=t[1]/100,o=t[2]/100,a=Math.max(o,.01),n,u;u=(2-r)*o;let A=(2-r)*a;return n=r*a,n/=A<=1?A:2-A,n=n||0,u/=2,[e,n*100,u*100]};cr.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,o=t[2]/100,a=r+o,n;a>1&&(r/=a,o/=a);let u=Math.floor(6*e),A=1-o;n=6*e-u,(u&1)!==0&&(n=1-n);let p=r+n*(A-r),h,C,w;switch(u){default:case 6:case 0:h=A,C=p,w=r;break;case 1:h=p,C=A,w=r;break;case 2:h=r,C=A,w=p;break;case 3:h=r,C=p,w=A;break;case 4:h=p,C=r,w=A;break;case 5:h=A,C=r,w=p;break}return[h*255,C*255,w*255]};cr.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,o=t[2]/100,a=t[3]/100,n=1-Math.min(1,e*(1-a)+a),u=1-Math.min(1,r*(1-a)+a),A=1-Math.min(1,o*(1-a)+a);return[n*255,u*255,A*255]};cr.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,o=t[2]/100,a,n,u;return a=e*3.2406+r*-1.5372+o*-.4986,n=e*-.9689+r*1.8758+o*.0415,u=e*.0557+r*-.204+o*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),u=Math.min(Math.max(0,u),1),[a*255,n*255,u*255]};cr.xyz.lab=function(t){let e=t[0],r=t[1],o=t[2];e/=95.047,r/=100,o/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let a=116*r-16,n=500*(e-r),u=200*(r-o);return[a,n,u]};cr.lab.xyz=function(t){let e=t[0],r=t[1],o=t[2],a,n,u;n=(e+16)/116,a=r/500+n,u=n-o/200;let A=n**3,p=a**3,h=u**3;return n=A>.008856?A:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,u=h>.008856?h:(u-16/116)/7.787,a*=95.047,n*=100,u*=108.883,[a,n,u]};cr.lab.lch=function(t){let e=t[0],r=t[1],o=t[2],a;a=Math.atan2(o,r)*360/2/Math.PI,a<0&&(a+=360);let u=Math.sqrt(r*r+o*o);return[e,u,a]};cr.lch.lab=function(t){let e=t[0],r=t[1],a=t[2]/360*2*Math.PI,n=r*Math.cos(a),u=r*Math.sin(a);return[e,n,u]};cr.rgb.ansi16=function(t,e=null){let[r,o,a]=t,n=e===null?cr.rgb.hsv(t)[2]:e;if(n=Math.round(n/50),n===0)return 30;let u=30+(Math.round(a/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return n===2&&(u+=60),u};cr.hsv.ansi16=function(t){return cr.rgb.ansi16(cr.hsv.rgb(t),t[2])};cr.rgb.ansi256=function(t){let e=t[0],r=t[1],o=t[2];return e===r&&r===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)};cr.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,o=(e&1)*r*255,a=(e>>1&1)*r*255,n=(e>>2&1)*r*255;return[o,a,n]};cr.ansi256.rgb=function(t){if(t>=232){let n=(t-232)*10+8;return[n,n,n]}t-=16;let e,r=Math.floor(t/36)/5*255,o=Math.floor((e=t%36)/6)/5*255,a=e%6/5*255;return[r,o,a]};cr.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};cr.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(A=>A+A).join(""));let o=parseInt(r,16),a=o>>16&255,n=o>>8&255,u=o&255;return[a,n,u]};cr.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.max(Math.max(e,r),o),n=Math.min(Math.min(e,r),o),u=a-n,A,p;return u<1?A=n/(1-u):A=0,u<=0?p=0:a===e?p=(r-o)/u%6:a===r?p=2+(o-e)/u:p=4+(e-r)/u,p/=6,p%=1,[p*360,u*100,A*100]};cr.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,o=r<.5?2*e*r:2*e*(1-r),a=0;return o<1&&(a=(r-.5*o)/(1-o)),[t[0],o*100,a*100]};cr.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,o=e*r,a=0;return o<1&&(a=(r-o)/(1-o)),[t[0],o*100,a*100]};cr.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,o=t[2]/100;if(r===0)return[o*255,o*255,o*255];let a=[0,0,0],n=e%1*6,u=n%1,A=1-u,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=u,a[2]=0;break;case 1:a[0]=A,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=u;break;case 3:a[0]=0,a[1]=A,a[2]=1;break;case 4:a[0]=u,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=A}return p=(1-r)*o,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};cr.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,o=e+r*(1-e),a=0;return o>0&&(a=e/o),[t[0],a*100,o*100]};cr.hcg.hsl=function(t){let e=t[1]/100,o=t[2]/100*(1-e)+.5*e,a=0;return o>0&&o<.5?a=e/(2*o):o>=.5&&o<1&&(a=e/(2*(1-o))),[t[0],a*100,o*100]};cr.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,o=e+r*(1-e);return[t[0],(o-e)*100,(1-o)*100]};cr.hwb.hcg=function(t){let e=t[1]/100,o=1-t[2]/100,a=o-e,n=0;return a<1&&(n=(o-a)/(1-a)),[t[0],a*100,n*100]};cr.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};cr.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};cr.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};cr.gray.hsl=function(t){return[0,0,t[0]]};cr.gray.hsv=cr.gray.hsl;cr.gray.hwb=function(t){return[0,100,t[0]]};cr.gray.cmyk=function(t){return[0,0,0,t[0]]};cr.gray.lab=function(t){return[t[0],0,0]};cr.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,o=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(o.length)+o};cr.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var fX=U((gkt,AX)=>{var yS=aN();function v9e(){let t={},e=Object.keys(yS);for(let r=e.length,o=0;o<r;o++)t[e[o]]={distance:-1,parent:null};return t}function D9e(t){let e=v9e(),r=[t];for(e[t].distance=0;r.length;){let o=r.pop(),a=Object.keys(yS[o]);for(let n=a.length,u=0;u<n;u++){let A=a[u],p=e[A];p.distance===-1&&(p.distance=e[o].distance+1,p.parent=o,r.unshift(A))}}return e}function S9e(t,e){return function(r){return e(t(r))}}function P9e(t,e){let r=[e[t].parent,t],o=yS[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)r.unshift(e[a].parent),o=S9e(yS[e[a].parent][a],o),a=e[a].parent;return o.conversion=r,o}AX.exports=function(t){let e=D9e(t),r={},o=Object.keys(e);for(let a=o.length,n=0;n<a;n++){let u=o[n];e[u].parent!==null&&(r[u]=P9e(u,e))}return r}});var hX=U((dkt,pX)=>{var lN=aN(),x9e=fX(),Qy={},b9e=Object.keys(lN);function Q9e(t){let e=function(...r){let o=r[0];return o==null?o:(o.length>1&&(r=o),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function k9e(t){let e=function(...r){let o=r[0];if(o==null)return o;o.length>1&&(r=o);let a=t(r);if(typeof a=="object")for(let n=a.length,u=0;u<n;u++)a[u]=Math.round(a[u]);return a};return"conversion"in t&&(e.conversion=t.conversion),e}b9e.forEach(t=>{Qy[t]={},Object.defineProperty(Qy[t],"channels",{value:lN[t].channels}),Object.defineProperty(Qy[t],"labels",{value:lN[t].labels});let e=x9e(t);Object.keys(e).forEach(o=>{let a=e[o];Qy[t][o]=k9e(a),Qy[t][o].raw=Q9e(a)})});pX.exports=Qy});var dw=U((mkt,EX)=>{"use strict";var gX=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,dX=(t,e)=>(...r)=>{let o=t(...r);return`\x1B[${38+e};5;${o}m`},mX=(t,e)=>(...r)=>{let o=t(...r);return`\x1B[${38+e};2;${o[0]};${o[1]};${o[2]}m`},ES=t=>t,yX=(t,e,r)=>[t,e,r],ky=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let o=r();return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0}),o},enumerable:!0,configurable:!0})},cN,Fy=(t,e,r,o)=>{cN===void 0&&(cN=hX());let a=o?10:0,n={};for(let[u,A]of Object.entries(cN)){let p=u==="ansi16"?"ansi":u;u===e?n[p]=t(r,a):typeof A=="object"&&(n[p]=t(A[e],a))}return n};function F9e(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,o]of Object.entries(e)){for(let[a,n]of Object.entries(o))e[a]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},o[a]=e[a],t.set(n[0],n[1]);Object.defineProperty(e,r,{value:o,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",ky(e.color,"ansi",()=>Fy(gX,"ansi16",ES,!1)),ky(e.color,"ansi256",()=>Fy(dX,"ansi256",ES,!1)),ky(e.color,"ansi16m",()=>Fy(mX,"rgb",yX,!1)),ky(e.bgColor,"ansi",()=>Fy(gX,"ansi16",ES,!0)),ky(e.bgColor,"ansi256",()=>Fy(dX,"ansi256",ES,!0)),ky(e.bgColor,"ansi16m",()=>Fy(mX,"rgb",yX,!0)),e}Object.defineProperty(EX,"exports",{enumerable:!0,get:F9e})});var IX=U((ykt,CX)=>{"use strict";CX.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(r+t),a=e.indexOf("--");return o!==-1&&(a===-1||o<a)}});var fN=U((Ekt,BX)=>{"use strict";var R9e=Ie("os"),wX=Ie("tty"),Gl=IX(),{env:ls}=process,Vp;Gl("no-color")||Gl("no-colors")||Gl("color=false")||Gl("color=never")?Vp=0:(Gl("color")||Gl("colors")||Gl("color=true")||Gl("color=always"))&&(Vp=1);"FORCE_COLOR"in ls&&(ls.FORCE_COLOR==="true"?Vp=1:ls.FORCE_COLOR==="false"?Vp=0:Vp=ls.FORCE_COLOR.length===0?1:Math.min(parseInt(ls.FORCE_COLOR,10),3));function uN(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function AN(t,e){if(Vp===0)return 0;if(Gl("color=16m")||Gl("color=full")||Gl("color=truecolor"))return 3;if(Gl("color=256"))return 2;if(t&&!e&&Vp===void 0)return 0;let r=Vp||0;if(ls.TERM==="dumb")return r;if(process.platform==="win32"){let o=R9e.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in ls)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(o=>o in ls)||ls.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in ls)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ls.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in ls)return 1;if(ls.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ls){let o=parseInt((ls.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ls.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ls.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ls.TERM)||"COLORTERM"in ls?1:r}function T9e(t){let e=AN(t,t&&t.isTTY);return uN(e)}BX.exports={supportsColor:T9e,stdout:uN(AN(!0,wX.isatty(1))),stderr:uN(AN(!0,wX.isatty(2)))}});var DX=U((Ckt,vX)=>{"use strict";var N9e=(t,e,r)=>{let o=t.indexOf(e);if(o===-1)return t;let a=e.length,n=0,u="";do u+=t.substr(n,o-n)+e+r,n=o+a,o=t.indexOf(e,n);while(o!==-1);return u+=t.substr(n),u},L9e=(t,e,r,o)=>{let a=0,n="";do{let u=t[o-1]==="\r";n+=t.substr(a,(u?o-1:o)-a)+e+(u?`\r
129`:`
130`)+r,a=o+1,o=t.indexOf(`
131`,a)}while(o!==-1);return n+=t.substr(a),n};vX.exports={stringReplaceAll:N9e,stringEncaseCRLFWithFirstIndex:L9e}});var QX=U((Ikt,bX)=>{"use strict";var O9e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,SX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,M9e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,U9e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,_9e=new Map([["n",`
132`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function xX(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):_9e.get(t)||t}function H9e(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(M9e))r.push(a[2].replace(U9e,(A,p,h)=>p?xX(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function q9e(t){SX.lastIndex=0;let e=[],r;for(;(r=SX.exec(t))!==null;){let o=r[1];if(r[2]){let a=H9e(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function PX(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}bX.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(O9e,(n,u,A,p,h,C)=>{if(u)a.push(xX(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:PX(t,r)(w)),r.push({inverse:A,styles:q9e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(PX(t,r)(a.join(""))),a=[],r.pop()}else a.push(C)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var yN=U((wkt,TX)=>{"use strict";var mw=dw(),{stdout:hN,stderr:gN}=fN(),{stringReplaceAll:j9e,stringEncaseCRLFWithFirstIndex:G9e}=DX(),kX=["ansi","ansi","ansi256","ansi16m"],Ry=Object.create(null),W9e=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=hN?hN.level:0;t.level=e.level===void 0?r:e.level},dN=class{constructor(e){return FX(e)}},FX=t=>{let e={};return W9e(e,t),e.template=(...r)=>V9e(e.template,...r),Object.setPrototypeOf(e,CS.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=dN,e.template};function CS(t){return FX(t)}for(let[t,e]of Object.entries(mw))Ry[t]={get(){let r=IS(this,mN(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Ry.visible={get(){let t=IS(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var RX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of RX)Ry[t]={get(){let{level:e}=this;return function(...r){let o=mN(mw.color[kX[e]][t](...r),mw.color.close,this._styler);return IS(this,o,this._isEmpty)}}};for(let t of RX){let e="bg"+t[0].toUpperCase()+t.slice(1);Ry[e]={get(){let{level:r}=this;return function(...o){let a=mN(mw.bgColor[kX[r]][t](...o),mw.bgColor.close,this._styler);return IS(this,a,this._isEmpty)}}}}var Y9e=Object.defineProperties(()=>{},{...Ry,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),mN=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},IS=(t,e,r)=>{let o=(...a)=>K9e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=Y9e,o._generator=t,o._styler=e,o._isEmpty=r,o},K9e=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=j9e(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
133`);return n!==-1&&(e=G9e(e,a,o,n)),o+e+a},pN,V9e=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return pN===void 0&&(pN=QX()),pN(t,a.join(""))};Object.defineProperties(CS.prototype,Ry);var yw=CS();yw.supportsColor=hN;yw.stderr=CS({level:gN?gN.level:0});yw.stderr.supportsColor=gN;yw.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};TX.exports=yw});var wS=U(Wl=>{"use strict";Wl.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Wl.find=(t,e)=>t.nodes.find(r=>r.type===e);Wl.exceedsLimit=(t,e,r=1,o)=>o===!1||!Wl.isInteger(t)||!Wl.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;Wl.escapeNode=(t,e=0,r)=>{let o=t.nodes[e];!o||(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};Wl.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;Wl.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Wl.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Wl.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Wl.flatten=(...t)=>{let e=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var BS=U((vkt,LX)=>{"use strict";var NX=wS();LX.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&NX.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A="";if(o.value)return(n||u)&&NX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(t)}});var MX=U((Dkt,OX)=>{"use strict";OX.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var KX=U((Skt,YX)=>{"use strict";var UX=MX(),Ad=(t,e,r)=>{if(UX(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(UX(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=t+":"+e+"="+a+n+u+A;if(Ad.cache.hasOwnProperty(p))return Ad.cache[p].result;let h=Math.min(t,e),C=Math.max(t,e);if(Math.abs(h-C)===1){let R=t+"|"+e;return o.capture?`(${R})`:o.wrap===!1?R:`(?:${R})`}let w=WX(t)||WX(e),v={min:t,max:e,a:h,b:C},b=[],E=[];if(w&&(v.isPadded=w,v.maxLen=String(v.max).length),h<0){let R=C<0?Math.abs(C):1;E=_X(R,Math.abs(h),v,o),h=v.a=0}return C>=0&&(b=_X(h,C,v,o)),v.negatives=E,v.positives=b,v.result=J9e(E,b,o),o.capture===!0?v.result=`(${v.result})`:o.wrap!==!1&&b.length+E.length>1&&(v.result=`(?:${v.result})`),Ad.cache[p]=v,v.result};function J9e(t,e,r){let o=EN(t,e,"-",!1,r)||[],a=EN(e,t,"",!1,r)||[],n=EN(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function z9e(t,e){let r=1,o=1,a=qX(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=qX(t,r);for(a=jX(e+1,o)-1;t<a&&a<=e;)n.add(a),o+=1,a=jX(e+1,o)-1;return n=[...n],n.sort($9e),n}function X9e(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let o=Z9e(t,e),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=e5e(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function _X(t,e,r,o){let a=z9e(t,e),n=[],u=t,A;for(let p=0;p<a.length;p++){let h=a[p],C=X9e(String(u),String(h),o),w="";if(!r.isPadded&&A&&A.pattern===C.pattern){A.count.length>1&&A.count.pop(),A.count.push(C.count[0]),A.string=A.pattern+GX(A.count),u=h+1;continue}r.isPadded&&(w=t5e(h,r,o)),C.string=w+C.pattern+GX(C.count),n.push(C),u=h+1,A=C}return n}function EN(t,e,r,o,a){let n=[];for(let u of t){let{string:A}=u;!o&&!HX(e,"string",A)&&n.push(r+A),o&&HX(e,"string",A)&&n.push(r+A)}return n}function Z9e(t,e){let r=[];for(let o=0;o<t.length;o++)r.push([t[o],e[o]]);return r}function $9e(t,e){return t>e?1:e>t?-1:0}function HX(t,e,r){return t.some(o=>o[e]===r)}function qX(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function jX(t,e){return t-t%Math.pow(10,e)}function GX(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function e5e(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function WX(t){return/^-?(0+)\d/.test(t)}function t5e(t,e,r){if(!e.isPadded)return t;let o=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${o}}`:`0{${o}}`}}Ad.cache={};Ad.clearCache=()=>Ad.cache={};YX.exports=Ad});var wN=U((Pkt,tZ)=>{"use strict";var r5e=Ie("util"),zX=KX(),VX=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),n5e=t=>e=>t===!0?Number(e):String(e),CN=t=>typeof t=="number"||typeof t=="string"&&t!=="",Ew=t=>Number.isInteger(+t),IN=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},i5e=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,s5e=(t,e,r)=>{if(e>0){let o=t[0]==="-"?"-":"";o&&(t=t.slice(1)),t=o+t.padStart(o?e-1:e,"0")}return r===!1?String(t):t},JX=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},o5e=(t,e)=>{t.negatives.sort((u,A)=>u<A?-1:u>A?1:0),t.positives.sort((u,A)=>u<A?-1:u>A?1:0);let r=e.capture?"":"?:",o="",a="",n;return t.positives.length&&(o=t.positives.join("|")),t.negatives.length&&(a=`-(${r}${t.negatives.join("|")})`),o&&a?n=`${o}|${a}`:n=o||a,e.wrap?`(${r}${n})`:n},XX=(t,e,r,o)=>{if(r)return zX(t,e,{wrap:!1,...o});let a=String.fromCharCode(t);if(t===e)return a;let n=String.fromCharCode(e);return`[${a}-${n}]`},ZX=(t,e,r)=>{if(Array.isArray(t)){let o=r.wrap===!0,a=r.capture?"":"?:";return o?`(${a}${t.join("|")})`:t.join("|")}return zX(t,e,r)},$X=(...t)=>new RangeError("Invalid range arguments: "+r5e.inspect(...t)),eZ=(t,e,r)=>{if(r.strictRanges===!0)throw $X([t,e]);return[]},a5e=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},l5e=(t,e,r=1,o={})=>{let a=Number(t),n=Number(e);if(!Number.isInteger(a)||!Number.isInteger(n)){if(o.strictRanges===!0)throw $X([t,e]);return[]}a===0&&(a=0),n===0&&(n=0);let u=a>n,A=String(t),p=String(e),h=String(r);r=Math.max(Math.abs(r),1);let C=IN(A)||IN(p)||IN(h),w=C?Math.max(A.length,p.length,h.length):0,v=C===!1&&i5e(t,e,o)===!1,b=o.transform||n5e(v);if(o.toRegex&&r===1)return XX(JX(t,w),JX(e,w),!0,o);let E={negatives:[],positives:[]},R=V=>E[V<0?"negatives":"positives"].push(Math.abs(V)),L=[],_=0;for(;u?a>=n:a<=n;)o.toRegex===!0&&r>1?R(a):L.push(s5e(b(a,_),w,v)),a=u?a-r:a+r,_++;return o.toRegex===!0?r>1?o5e(E,o):ZX(L,null,{wrap:!1,...o}):L},c5e=(t,e,r=1,o={})=>{if(!Ew(t)&&t.length>1||!Ew(e)&&e.length>1)return eZ(t,e,o);let a=o.transform||(v=>String.fromCharCode(v)),n=`${t}`.charCodeAt(0),u=`${e}`.charCodeAt(0),A=n>u,p=Math.min(n,u),h=Math.max(n,u);if(o.toRegex&&r===1)return XX(p,h,!1,o);let C=[],w=0;for(;A?n>=u:n<=u;)C.push(a(n,w)),n=A?n-r:n+r,w++;return o.toRegex===!0?ZX(C,null,{wrap:!1,options:o}):C},vS=(t,e,r,o={})=>{if(e==null&&CN(t))return[t];if(!CN(t)||!CN(e))return eZ(t,e,o);if(typeof r=="function")return vS(t,e,1,{transform:r});if(VX(r))return vS(t,e,0,r);let a={...o};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,Ew(r)?Ew(t)&&Ew(e)?l5e(t,e,r,a):c5e(t,e,Math.max(Math.abs(r),1),a):r!=null&&!VX(r)?a5e(r,a):vS(t,e,1,r)};tZ.exports=vS});var iZ=U((xkt,nZ)=>{"use strict";var u5e=wN(),rZ=wS(),A5e=(t,e={})=>{let r=(o,a={})=>{let n=rZ.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A=n===!0||u===!0,p=e.escapeInvalid===!0?"\\":"",h="";if(o.isOpen===!0||o.isClose===!0)return p+o.value;if(o.type==="open")return A?p+o.value:"(";if(o.type==="close")return A?p+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":A?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){let C=rZ.reduce(o.nodes),w=u5e(...C,{...e,wrap:!1,toRegex:!0});if(w.length!==0)return C.length>1&&w.length>1?`(${w})`:w}if(o.nodes)for(let C of o.nodes)h+=r(C,o);return h};return r(t)};nZ.exports=A5e});var aZ=U((bkt,oZ)=>{"use strict";var f5e=wN(),sZ=BS(),Ty=wS(),fd=(t="",e="",r=!1)=>{let o=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Ty.flatten(e).map(a=>`{${a}}`):e;for(let a of t)if(Array.isArray(a))for(let n of a)o.push(fd(n,e,r));else for(let n of e)r===!0&&typeof n=="string"&&(n=`{${n}}`),o.push(Array.isArray(n)?fd(a,n,r):a+n);return Ty.flatten(o)},p5e=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,o=(a,n={})=>{a.queue=[];let u=n,A=n.queue;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,A=u.queue;if(a.invalid||a.dollar){A.push(fd(A.pop(),sZ(a,e)));return}if(a.type==="brace"&&a.invalid!==!0&&a.nodes.length===2){A.push(fd(A.pop(),["{}"]));return}if(a.nodes&&a.ranges>0){let w=Ty.reduce(a.nodes);if(Ty.exceedsLimit(...w,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let v=f5e(...w,e);v.length===0&&(v=sZ(a,e)),A.push(fd(A.pop(),v)),a.nodes=[];return}let p=Ty.encloseBrace(a),h=a.queue,C=a;for(;C.type!=="brace"&&C.type!=="root"&&C.parent;)C=C.parent,h=C.queue;for(let w=0;w<a.nodes.length;w++){let v=a.nodes[w];if(v.type==="comma"&&a.type==="brace"){w===1&&h.push(""),h.push("");continue}if(v.type==="close"){A.push(fd(A.pop(),h,p));continue}if(v.value&&v.type!=="open"){h.push(fd(h.pop(),v.value));continue}v.nodes&&o(v,a)}return h};return Ty.flatten(o(t))};oZ.exports=p5e});var cZ=U((Qkt,lZ)=>{"use strict";lZ.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
134`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var hZ=U((kkt,pZ)=>{"use strict";var h5e=BS(),{MAX_LENGTH:uZ,CHAR_BACKSLASH:BN,CHAR_BACKTICK:g5e,CHAR_COMMA:d5e,CHAR_DOT:m5e,CHAR_LEFT_PARENTHESES:y5e,CHAR_RIGHT_PARENTHESES:E5e,CHAR_LEFT_CURLY_BRACE:C5e,CHAR_RIGHT_CURLY_BRACE:I5e,CHAR_LEFT_SQUARE_BRACKET:AZ,CHAR_RIGHT_SQUARE_BRACKET:fZ,CHAR_DOUBLE_QUOTE:w5e,CHAR_SINGLE_QUOTE:B5e,CHAR_NO_BREAK_SPACE:v5e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:D5e}=cZ(),S5e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(uZ,r.maxLength):uZ;if(t.length>o)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${o})`);let a={type:"root",input:t,nodes:[]},n=[a],u=a,A=a,p=0,h=t.length,C=0,w=0,v,b={},E=()=>t[C++],R=L=>{if(L.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&L.type==="text"){A.value+=L.value;return}return u.nodes.push(L),L.parent=u,L.prev=A,A=L,L};for(R({type:"bos"});C<h;)if(u=n[n.length-1],v=E(),!(v===D5e||v===v5e)){if(v===BN){R({type:"text",value:(e.keepEscaping?v:"")+E()});continue}if(v===fZ){R({type:"text",value:"\\"+v});continue}if(v===AZ){p++;let L=!0,_;for(;C<h&&(_=E());){if(v+=_,_===AZ){p++;continue}if(_===BN){v+=E();continue}if(_===fZ&&(p--,p===0))break}R({type:"text",value:v});continue}if(v===y5e){u=R({type:"paren",nodes:[]}),n.push(u),R({type:"text",value:v});continue}if(v===E5e){if(u.type!=="paren"){R({type:"text",value:v});continue}u=n.pop(),R({type:"text",value:v}),u=n[n.length-1];continue}if(v===w5e||v===B5e||v===g5e){let L=v,_;for(e.keepQuotes!==!0&&(v="");C<h&&(_=E());){if(_===BN){v+=_+E();continue}if(_===L){e.keepQuotes===!0&&(v+=_);break}v+=_}R({type:"text",value:v});continue}if(v===C5e){w++;let _={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:w,commas:0,ranges:0,nodes:[]};u=R(_),n.push(u),R({type:"open",value:v});continue}if(v===I5e){if(u.type!=="brace"){R({type:"text",value:v});continue}let L="close";u=n.pop(),u.close=!0,R({type:L,value:v}),w--,u=n[n.length-1];continue}if(v===d5e&&w>0){if(u.ranges>0){u.ranges=0;let L=u.nodes.shift();u.nodes=[L,{type:"text",value:h5e(u)}]}R({type:"comma",value:v}),u.commas++;continue}if(v===m5e&&w>0&&u.commas===0){let L=u.nodes;if(w===0||L.length===0){R({type:"text",value:v});continue}if(A.type==="dot"){if(u.range=[],A.value+=v,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){L.pop();let _=L[L.length-1];_.value+=A.value+v,A=_,u.ranges--;continue}R({type:"dot",value:v});continue}R({type:"text",value:v})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(V=>{V.nodes||(V.type==="open"&&(V.isOpen=!0),V.type==="close"&&(V.isClose=!0),V.nodes||(V.type="text"),V.invalid=!0)});let L=n[n.length-1],_=L.nodes.indexOf(u);L.nodes.splice(_,1,...u.nodes)}while(n.length>0);return R({type:"eos"}),a};pZ.exports=S5e});var mZ=U((Fkt,dZ)=>{"use strict";var gZ=BS(),P5e=iZ(),x5e=aZ(),b5e=hZ(),sl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=sl.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(sl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};sl.parse=(t,e={})=>b5e(t,e);sl.stringify=(t,e={})=>gZ(typeof t=="string"?sl.parse(t,e):t,e);sl.compile=(t,e={})=>(typeof t=="string"&&(t=sl.parse(t,e)),P5e(t,e));sl.expand=(t,e={})=>{typeof t=="string"&&(t=sl.parse(t,e));let r=x5e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};sl.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?sl.compile(t,e):sl.expand(t,e);dZ.exports=sl});var Cw=U((Rkt,wZ)=>{"use strict";var Q5e=Ie("path"),Ju="\\\\/",yZ=`[^${Ju}]`,Df="\\.",k5e="\\+",F5e="\\?",DS="\\/",R5e="(?=.)",EZ="[^/]",vN=`(?:${DS}|$)`,CZ=`(?:^|${DS})`,DN=`${Df}{1,2}${vN}`,T5e=`(?!${Df})`,N5e=`(?!${CZ}${DN})`,L5e=`(?!${Df}{0,1}${vN})`,O5e=`(?!${DN})`,M5e=`[^.${DS}]`,U5e=`${EZ}*?`,IZ={DOT_LITERAL:Df,PLUS_LITERAL:k5e,QMARK_LITERAL:F5e,SLASH_LITERAL:DS,ONE_CHAR:R5e,QMARK:EZ,END_ANCHOR:vN,DOTS_SLASH:DN,NO_DOT:T5e,NO_DOTS:N5e,NO_DOT_SLASH:L5e,NO_DOTS_SLASH:O5e,QMARK_NO_DOT:M5e,STAR:U5e,START_ANCHOR:CZ},_5e={...IZ,SLASH_LITERAL:`[${Ju}]`,QMARK:yZ,STAR:`${yZ}*?`,DOTS_SLASH:`${Df}{1,2}(?:[${Ju}]|$)`,NO_DOT:`(?!${Df})`,NO_DOTS:`(?!(?:^|[${Ju}])${Df}{1,2}(?:[${Ju}]|$))`,NO_DOT_SLASH:`(?!${Df}{0,1}(?:[${Ju}]|$))`,NO_DOTS_SLASH:`(?!${Df}{1,2}(?:[${Ju}]|$))`,QMARK_NO_DOT:`[^.${Ju}]`,START_ANCHOR:`(?:^|[${Ju}])`,END_ANCHOR:`(?:[${Ju}]|$)`},H5e={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};wZ.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:H5e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Q5e.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?_5e:IZ}}});var Iw=U(Pa=>{"use strict";var q5e=Ie("path"),j5e=process.platform==="win32",{REGEX_BACKSLASH:G5e,REGEX_REMOVE_BACKSLASH:W5e,REGEX_SPECIAL_CHARS:Y5e,REGEX_SPECIAL_CHARS_GLOBAL:K5e}=Cw();Pa.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Pa.hasRegexChars=t=>Y5e.test(t);Pa.isRegexChar=t=>t.length===1&&Pa.hasRegexChars(t);Pa.escapeRegex=t=>t.replace(K5e,"\\$1");Pa.toPosixSlashes=t=>t.replace(G5e,"/");Pa.removeBackslashes=t=>t.replace(W5e,e=>e==="\\"?"":e);Pa.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Pa.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:j5e===!0||q5e.sep==="\\";Pa.escapeLast=(t,e,r)=>{let o=t.lastIndexOf(e,r);return o===-1?t:t[o-1]==="\\"?Pa.escapeLast(t,e,o-1):`${t.slice(0,o)}\\${t.slice(o)}`};Pa.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Pa.wrapOutput=(t,e={},r={})=>{let o=r.contains?"":"^",a=r.contains?"":"$",n=`${o}(?:${t})${a}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var QZ=U((Nkt,bZ)=>{"use strict";var BZ=Iw(),{CHAR_ASTERISK:SN,CHAR_AT:V5e,CHAR_BACKWARD_SLASH:ww,CHAR_COMMA:J5e,CHAR_DOT:PN,CHAR_EXCLAMATION_MARK:xN,CHAR_FORWARD_SLASH:xZ,CHAR_LEFT_CURLY_BRACE:bN,CHAR_LEFT_PARENTHESES:QN,CHAR_LEFT_SQUARE_BRACKET:z5e,CHAR_PLUS:X5e,CHAR_QUESTION_MARK:vZ,CHAR_RIGHT_CURLY_BRACE:Z5e,CHAR_RIGHT_PARENTHESES:DZ,CHAR_RIGHT_SQUARE_BRACKET:$5e}=Cw(),SZ=t=>t===xZ||t===ww,PZ=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},e7e=(t,e)=>{let r=e||{},o=t.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],u=[],A=[],p=t,h=-1,C=0,w=0,v=!1,b=!1,E=!1,R=!1,L=!1,_=!1,V=!1,re=!1,ae=!1,he=!1,pe=0,De,ge,le={value:"",depth:0,isGlob:!1},Pe=()=>h>=o,g=()=>p.charCodeAt(h+1),ve=()=>(De=ge,p.charCodeAt(++h));for(;h<o;){ge=ve();let me;if(ge===ww){V=le.backslashes=!0,ge=ve(),ge===bN&&(_=!0);continue}if(_===!0||ge===bN){for(pe++;Pe()!==!0&&(ge=ve());){if(ge===ww){V=le.backslashes=!0,ve();continue}if(ge===bN){pe++;continue}if(_!==!0&&ge===PN&&(ge=ve())===PN){if(v=le.isBrace=!0,E=le.isGlob=!0,he=!0,a===!0)continue;break}if(_!==!0&&ge===J5e){if(v=le.isBrace=!0,E=le.isGlob=!0,he=!0,a===!0)continue;break}if(ge===Z5e&&(pe--,pe===0)){_=!1,v=le.isBrace=!0,he=!0;break}}if(a===!0)continue;break}if(ge===xZ){if(n.push(h),u.push(le),le={value:"",depth:0,isGlob:!1},he===!0)continue;if(De===PN&&h===C+1){C+=2;continue}w=h+1;continue}if(r.noext!==!0&&(ge===X5e||ge===V5e||ge===SN||ge===vZ||ge===xN)===!0&&g()===QN){if(E=le.isGlob=!0,R=le.isExtglob=!0,he=!0,ge===xN&&h===C&&(ae=!0),a===!0){for(;Pe()!==!0&&(ge=ve());){if(ge===ww){V=le.backslashes=!0,ge=ve();continue}if(ge===DZ){E=le.isGlob=!0,he=!0;break}}continue}break}if(ge===SN){if(De===SN&&(L=le.isGlobstar=!0),E=le.isGlob=!0,he=!0,a===!0)continue;break}if(ge===vZ){if(E=le.isGlob=!0,he=!0,a===!0)continue;break}if(ge===z5e){for(;Pe()!==!0&&(me=ve());){if(me===ww){V=le.backslashes=!0,ve();continue}if(me===$5e){b=le.isBracket=!0,E=le.isGlob=!0,he=!0;break}}if(a===!0)continue;break}if(r.nonegate!==!0&&ge===xN&&h===C){re=le.negated=!0,C++;continue}if(r.noparen!==!0&&ge===QN){if(E=le.isGlob=!0,a===!0){for(;Pe()!==!0&&(ge=ve());){if(ge===QN){V=le.backslashes=!0,ge=ve();continue}if(ge===DZ){he=!0;break}}continue}break}if(E===!0){if(he=!0,a===!0)continue;break}}r.noext===!0&&(R=!1,E=!1);let Ee=p,de="",ne="";C>0&&(de=p.slice(0,C),p=p.slice(C),w-=C),Ee&&E===!0&&w>0?(Ee=p.slice(0,w),ne=p.slice(w)):E===!0?(Ee="",ne=p):Ee=p,Ee&&Ee!==""&&Ee!=="/"&&Ee!==p&&SZ(Ee.charCodeAt(Ee.length-1))&&(Ee=Ee.slice(0,-1)),r.unescape===!0&&(ne&&(ne=BZ.removeBackslashes(ne)),Ee&&V===!0&&(Ee=BZ.removeBackslashes(Ee)));let Z={prefix:de,input:t,start:C,base:Ee,glob:ne,isBrace:v,isBracket:b,isGlob:E,isExtglob:R,isGlobstar:L,negated:re,negatedExtglob:ae};if(r.tokens===!0&&(Z.maxDepth=0,SZ(ge)||u.push(le),Z.tokens=u),r.parts===!0||r.tokens===!0){let me;for(let be=0;be<n.length;be++){let ut=me?me+1:C,H=n[be],yt=t.slice(ut,H);r.tokens&&(be===0&&C!==0?(u[be].isPrefix=!0,u[be].value=de):u[be].value=yt,PZ(u[be]),Z.maxDepth+=u[be].depth),(be!==0||yt!=="")&&A.push(yt),me=H}if(me&&me+1<t.length){let be=t.slice(me+1);A.push(be),r.tokens&&(u[u.length-1].value=be,PZ(u[u.length-1]),Z.maxDepth+=u[u.length-1].depth)}Z.slashes=n,Z.parts=A}return Z};bZ.exports=e7e});var RZ=U((Lkt,FZ)=>{"use strict";var SS=Cw(),ol=Iw(),{MAX_LENGTH:PS,POSIX_REGEX_SOURCE:t7e,REGEX_NON_SPECIAL_CHARS:r7e,REGEX_SPECIAL_CHARS_BACKREF:n7e,REPLACEMENTS:kZ}=SS,i7e=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(a=>ol.escapeRegex(a)).join("..")}return r},Ny=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,kN=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=kZ[t]||t;let r={...e},o=typeof r.maxLength=="number"?Math.min(PS,r.maxLength):PS,a=t.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);let n={type:"bos",value:"",output:r.prepend||""},u=[n],A=r.capture?"":"?:",p=ol.isWindows(e),h=SS.globChars(p),C=SS.extglobChars(h),{DOT_LITERAL:w,PLUS_LITERAL:v,SLASH_LITERAL:b,ONE_CHAR:E,DOTS_SLASH:R,NO_DOT:L,NO_DOT_SLASH:_,NO_DOTS_SLASH:V,QMARK:re,QMARK_NO_DOT:ae,STAR:he,START_ANCHOR:pe}=h,De=x=>`(${A}(?:(?!${pe}${x.dot?R:w}).)*?)`,ge=r.dot?"":L,le=r.dot?re:ae,Pe=r.bash===!0?De(r):he;r.capture&&(Pe=`(${Pe})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:u};t=ol.removePrefix(t,g),a=t.length;let ve=[],Ee=[],de=[],ne=n,Z,me=()=>g.index===a-1,be=g.peek=(x=1)=>t[g.index+x],ut=g.advance=()=>t[++g.index]||"",H=()=>t.slice(g.index+1),yt=(x="",I=0)=>{g.consumed+=x,g.index+=I},Me=x=>{g.output+=x.output!=null?x.output:x.value,yt(x.value)},Te=()=>{let x=1;for(;be()==="!"&&(be(2)!=="("||be(3)==="?");)ut(),g.start++,x++;return x%2===0?!1:(g.negated=!0,g.start++,!0)},Qe=x=>{g[x]++,de.push(x)},_e=x=>{g[x]--,de.pop()},qe=x=>{if(ne.type==="globstar"){let I=g.braces>0&&(x.type==="comma"||x.type==="brace"),P=x.extglob===!0||ve.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!I&&!P&&(g.output=g.output.slice(0,-ne.output.length),ne.type="star",ne.value="*",ne.output=Pe,g.output+=ne.output)}if(ve.length&&x.type!=="paren"&&(ve[ve.length-1].inner+=x.value),(x.value||x.output)&&Me(x),ne&&ne.type==="text"&&x.type==="text"){ne.value+=x.value,ne.output=(ne.output||"")+x.value;return}x.prev=ne,u.push(x),ne=x},At=(x,I)=>{let P={...C[I],conditions:1,inner:""};P.prev=ne,P.parens=g.parens,P.output=g.output;let y=(r.capture?"(":"")+P.open;Qe("parens"),qe({type:x,value:I,output:g.output?"":E}),qe({type:"paren",extglob:!0,value:ut(),output:y}),ve.push(P)},Oe=x=>{let I=x.close+(r.capture?")":""),P;if(x.type==="negate"){let y=Pe;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(y=De(r)),(y!==Pe||me()||/^\)+$/.test(H()))&&(I=x.close=`)$))${y}`),x.inner.includes("*")&&(P=H())&&/^\.[^\\/.]+$/.test(P)){let F=kN(P,{...e,fastpaths:!1}).output;I=x.close=`)${F})${y})`}x.prev.type==="bos"&&(g.negatedExtglob=!0)}qe({type:"paren",extglob:!0,value:Z,output:I}),_e("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let x=!1,I=t.replace(n7e,(P,y,F,z,X,$)=>z==="\\"?(x=!0,P):z==="?"?y?y+z+(X?re.repeat(X.length):""):$===0?le+(X?re.repeat(X.length):""):re.repeat(F.length):z==="."?w.repeat(F.length):z==="*"?y?y+z+(X?Pe:""):Pe:y?P:`\\${P}`);return x===!0&&(r.unescape===!0?I=I.replace(/\\/g,""):I=I.replace(/\\+/g,P=>P.length%2===0?"\\\\":P?"\\":"")),I===t&&r.contains===!0?(g.output=t,g):(g.output=ol.wrapOutput(I,g,e),g)}for(;!me();){if(Z=ut(),Z==="\0")continue;if(Z==="\\"){let P=be();if(P==="/"&&r.bash!==!0||P==="."||P===";")continue;if(!P){Z+="\\",qe({type:"text",value:Z});continue}let y=/^\\+/.exec(H()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(Z+="\\")),r.unescape===!0?Z=ut():Z+=ut(),g.brackets===0){qe({type:"text",value:Z});continue}}if(g.brackets>0&&(Z!=="]"||ne.value==="["||ne.value==="[^")){if(r.posix!==!1&&Z===":"){let P=ne.value.slice(1);if(P.includes("[")&&(ne.posix=!0,P.includes(":"))){let y=ne.value.lastIndexOf("["),F=ne.value.slice(0,y),z=ne.value.slice(y+2),X=t7e[z];if(X){ne.value=F+X,g.backtrack=!0,ut(),!n.output&&u.indexOf(ne)===1&&(n.output=E);continue}}}(Z==="["&&be()!==":"||Z==="-"&&be()==="]")&&(Z=`\\${Z}`),Z==="]"&&(ne.value==="["||ne.value==="[^")&&(Z=`\\${Z}`),r.posix===!0&&Z==="!"&&ne.value==="["&&(Z="^"),ne.value+=Z,Me({value:Z});continue}if(g.quotes===1&&Z!=='"'){Z=ol.escapeRegex(Z),ne.value+=Z,Me({value:Z});continue}if(Z==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&qe({type:"text",value:Z});continue}if(Z==="("){Qe("parens"),qe({type:"paren",value:Z});continue}if(Z===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ny("opening","("));let P=ve[ve.length-1];if(P&&g.parens===P.parens+1){Oe(ve.pop());continue}qe({type:"paren",value:Z,output:g.parens?")":"\\)"}),_e("parens");continue}if(Z==="["){if(r.nobracket===!0||!H().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ny("closing","]"));Z=`\\${Z}`}else Qe("brackets");qe({type:"bracket",value:Z});continue}if(Z==="]"){if(r.nobracket===!0||ne&&ne.type==="bracket"&&ne.value.length===1){qe({type:"text",value:Z,output:`\\${Z}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ny("opening","["));qe({type:"text",value:Z,output:`\\${Z}`});continue}_e("brackets");let P=ne.value.slice(1);if(ne.posix!==!0&&P[0]==="^"&&!P.includes("/")&&(Z=`/${Z}`),ne.value+=Z,Me({value:Z}),r.literalBrackets===!1||ol.hasRegexChars(P))continue;let y=ol.escapeRegex(ne.value);if(g.output=g.output.slice(0,-ne.value.length),r.literalBrackets===!0){g.output+=y,ne.value=y;continue}ne.value=`(${A}${y}|${ne.value})`,g.output+=ne.value;continue}if(Z==="{"&&r.nobrace!==!0){Qe("braces");let P={type:"brace",value:Z,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};Ee.push(P),qe(P);continue}if(Z==="}"){let P=Ee[Ee.length-1];if(r.nobrace===!0||!P){qe({type:"text",value:Z,output:Z});continue}let y=")";if(P.dots===!0){let F=u.slice(),z=[];for(let X=F.length-1;X>=0&&(u.pop(),F[X].type!=="brace");X--)F[X].type!=="dots"&&z.unshift(F[X].value);y=i7e(z,r),g.backtrack=!0}if(P.comma!==!0&&P.dots!==!0){let F=g.output.slice(0,P.outputIndex),z=g.tokens.slice(P.tokensIndex);P.value=P.output="\\{",Z=y="\\}",g.output=F;for(let X of z)g.output+=X.output||X.value}qe({type:"brace",value:Z,output:y}),_e("braces"),Ee.pop();continue}if(Z==="|"){ve.length>0&&ve[ve.length-1].conditions++,qe({type:"text",value:Z});continue}if(Z===","){let P=Z,y=Ee[Ee.length-1];y&&de[de.length-1]==="braces"&&(y.comma=!0,P="|"),qe({type:"comma",value:Z,output:P});continue}if(Z==="/"){if(ne.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",u.pop(),ne=n;continue}qe({type:"slash",value:Z,output:b});continue}if(Z==="."){if(g.braces>0&&ne.type==="dot"){ne.value==="."&&(ne.output=w);let P=Ee[Ee.length-1];ne.type="dots",ne.output+=Z,ne.value+=Z,P.dots=!0;continue}if(g.braces+g.parens===0&&ne.type!=="bos"&&ne.type!=="slash"){qe({type:"text",value:Z,output:w});continue}qe({type:"dot",value:Z,output:w});continue}if(Z==="?"){if(!(ne&&ne.value==="(")&&r.noextglob!==!0&&be()==="("&&be(2)!=="?"){At("qmark",Z);continue}if(ne&&ne.type==="paren"){let y=be(),F=Z;if(y==="<"&&!ol.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(ne.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(H()))&&(F=`\\${Z}`),qe({type:"text",value:Z,output:F});continue}if(r.dot!==!0&&(ne.type==="slash"||ne.type==="bos")){qe({type:"qmark",value:Z,output:ae});continue}qe({type:"qmark",value:Z,output:re});continue}if(Z==="!"){if(r.noextglob!==!0&&be()==="("&&(be(2)!=="?"||!/[!=<:]/.test(be(3)))){At("negate",Z);continue}if(r.nonegate!==!0&&g.index===0){Te();continue}}if(Z==="+"){if(r.noextglob!==!0&&be()==="("&&be(2)!=="?"){At("plus",Z);continue}if(ne&&ne.value==="("||r.regex===!1){qe({type:"plus",value:Z,output:v});continue}if(ne&&(ne.type==="bracket"||ne.type==="paren"||ne.type==="brace")||g.parens>0){qe({type:"plus",value:Z});continue}qe({type:"plus",value:v});continue}if(Z==="@"){if(r.noextglob!==!0&&be()==="("&&be(2)!=="?"){qe({type:"at",extglob:!0,value:Z,output:""});continue}qe({type:"text",value:Z});continue}if(Z!=="*"){(Z==="$"||Z==="^")&&(Z=`\\${Z}`);let P=r7e.exec(H());P&&(Z+=P[0],g.index+=P[0].length),qe({type:"text",value:Z});continue}if(ne&&(ne.type==="globstar"||ne.star===!0)){ne.type="star",ne.star=!0,ne.value+=Z,ne.output=Pe,g.backtrack=!0,g.globstar=!0,yt(Z);continue}let x=H();if(r.noextglob!==!0&&/^\([^?]/.test(x)){At("star",Z);continue}if(ne.type==="star"){if(r.noglobstar===!0){yt(Z);continue}let P=ne.prev,y=P.prev,F=P.type==="slash"||P.type==="bos",z=y&&(y.type==="star"||y.type==="globstar");if(r.bash===!0&&(!F||x[0]&&x[0]!=="/")){qe({type:"star",value:Z,output:""});continue}let X=g.braces>0&&(P.type==="comma"||P.type==="brace"),$=ve.length&&(P.type==="pipe"||P.type==="paren");if(!F&&P.type!=="paren"&&!X&&!$){qe({type:"star",value:Z,output:""});continue}for(;x.slice(0,3)==="/**";){let ie=t[g.index+4];if(ie&&ie!=="/")break;x=x.slice(3),yt("/**",3)}if(P.type==="bos"&&me()){ne.type="globstar",ne.value+=Z,ne.output=De(r),g.output=ne.output,g.globstar=!0,yt(Z);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&!z&&me()){g.output=g.output.slice(0,-(P.output+ne.output).length),P.output=`(?:${P.output}`,ne.type="globstar",ne.output=De(r)+(r.strictSlashes?")":"|$)"),ne.value+=Z,g.globstar=!0,g.output+=P.output+ne.output,yt(Z);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&x[0]==="/"){let ie=x[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(P.output+ne.output).length),P.output=`(?:${P.output}`,ne.type="globstar",ne.output=`${De(r)}${b}|${b}${ie})`,ne.value+=Z,g.output+=P.output+ne.output,g.globstar=!0,yt(Z+ut()),qe({type:"slash",value:"/",output:""});continue}if(P.type==="bos"&&x[0]==="/"){ne.type="globstar",ne.value+=Z,ne.output=`(?:^|${b}|${De(r)}${b})`,g.output=ne.output,g.globstar=!0,yt(Z+ut()),qe({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-ne.output.length),ne.type="globstar",ne.output=De(r),ne.value+=Z,g.output+=ne.output,g.globstar=!0,yt(Z);continue}let I={type:"star",value:Z,output:Pe};if(r.bash===!0){I.output=".*?",(ne.type==="bos"||ne.type==="slash")&&(I.output=ge+I.output),qe(I);continue}if(ne&&(ne.type==="bracket"||ne.type==="paren")&&r.regex===!0){I.output=Z,qe(I);continue}(g.index===g.start||ne.type==="slash"||ne.type==="dot")&&(ne.type==="dot"?(g.output+=_,ne.output+=_):r.dot===!0?(g.output+=V,ne.output+=V):(g.output+=ge,ne.output+=ge),be()!=="*"&&(g.output+=E,ne.output+=E)),qe(I)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ny("closing","]"));g.output=ol.escapeLast(g.output,"["),_e("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ny("closing",")"));g.output=ol.escapeLast(g.output,"("),_e("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ny("closing","}"));g.output=ol.escapeLast(g.output,"{"),_e("braces")}if(r.strictSlashes!==!0&&(ne.type==="star"||ne.type==="bracket")&&qe({type:"maybe_slash",value:"",output:`${b}?`}),g.backtrack===!0){g.output="";for(let x of g.tokens)g.output+=x.output!=null?x.output:x.value,x.suffix&&(g.output+=x.suffix)}return g};kN.fastpaths=(t,e)=>{let r={...e},o=typeof r.maxLength=="number"?Math.min(PS,r.maxLength):PS,a=t.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);t=kZ[t]||t;let n=ol.isWindows(e),{DOT_LITERAL:u,SLASH_LITERAL:A,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:C,NO_DOTS:w,NO_DOTS_SLASH:v,STAR:b,START_ANCHOR:E}=SS.globChars(n),R=r.dot?w:C,L=r.dot?v:C,_=r.capture?"":"?:",V={negated:!1,prefix:""},re=r.bash===!0?".*?":b;r.capture&&(re=`(${re})`);let ae=ge=>ge.noglobstar===!0?re:`(${_}(?:(?!${E}${ge.dot?h:u}).)*?)`,he=ge=>{switch(ge){case"*":return`${R}${p}${re}`;case".*":return`${u}${p}${re}`;case"*.*":return`${R}${re}${u}${p}${re}`;case"*/*":return`${R}${re}${A}${p}${L}${re}`;case"**":return R+ae(r);case"**/*":return`(?:${R}${ae(r)}${A})?${L}${p}${re}`;case"**/*.*":return`(?:${R}${ae(r)}${A})?${L}${re}${u}${p}${re}`;case"**/.*":return`(?:${R}${ae(r)}${A})?${u}${p}${re}`;default:{let le=/^(.*?)\.(\w+)$/.exec(ge);if(!le)return;let Pe=he(le[1]);return Pe?Pe+u+le[2]:void 0}}},pe=ol.removePrefix(t,V),De=he(pe);return De&&r.strictSlashes!==!0&&(De+=`${A}?`),De};FZ.exports=kN});var NZ=U((Okt,TZ)=>{"use strict";var s7e=Ie("path"),o7e=QZ(),FN=RZ(),RN=Iw(),a7e=Cw(),l7e=t=>t&&typeof t=="object"&&!Array.isArray(t),Oi=(t,e,r=!1)=>{if(Array.isArray(t)){let C=t.map(v=>Oi(v,e,r));return v=>{for(let b of C){let E=b(v);if(E)return E}return!1}}let o=l7e(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!o)throw new TypeError("Expected pattern to be a non-empty string");let a=e||{},n=RN.isWindows(e),u=o?Oi.compileRe(t,e):Oi.makeRe(t,e,!1,!0),A=u.state;delete u.state;let p=()=>!1;if(a.ignore){let C={...e,ignore:null,onMatch:null,onResult:null};p=Oi(a.ignore,C,r)}let h=(C,w=!1)=>{let{isMatch:v,match:b,output:E}=Oi.test(C,u,e,{glob:t,posix:n}),R={glob:t,state:A,regex:u,posix:n,input:C,output:E,match:b,isMatch:v};return typeof a.onResult=="function"&&a.onResult(R),v===!1?(R.isMatch=!1,w?R:!1):p(C)?(typeof a.onIgnore=="function"&&a.onIgnore(R),R.isMatch=!1,w?R:!1):(typeof a.onMatch=="function"&&a.onMatch(R),w?R:!0)};return r&&(h.state=A),h};Oi.test=(t,e,r,{glob:o,posix:a}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},u=n.format||(a?RN.toPosixSlashes:null),A=t===o,p=A&&u?u(t):t;return A===!1&&(p=u?u(t):t,A=p===o),(A===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?A=Oi.matchBase(t,e,r,a):A=e.exec(p)),{isMatch:Boolean(A),match:A,output:p}};Oi.matchBase=(t,e,r,o=RN.isWindows(r))=>(e instanceof RegExp?e:Oi.makeRe(e,r)).test(s7e.basename(t));Oi.isMatch=(t,e,r)=>Oi(e,r)(t);Oi.parse=(t,e)=>Array.isArray(t)?t.map(r=>Oi.parse(r,e)):FN(t,{...e,fastpaths:!1});Oi.scan=(t,e)=>o7e(t,e);Oi.compileRe=(t,e,r=!1,o=!1)=>{if(r===!0)return t.output;let a=e||{},n=a.contains?"":"^",u=a.contains?"":"$",A=`${n}(?:${t.output})${u}`;t&&t.negated===!0&&(A=`^(?!${A}).*$`);let p=Oi.toRegex(A,e);return o===!0&&(p.state=t),p};Oi.makeRe=(t,e={},r=!1,o=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(a.output=FN.fastpaths(t,e)),a.output||(a=FN(t,e)),Oi.compileRe(a,e,r,o)};Oi.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Oi.constants=a7e;TZ.exports=Oi});var OZ=U((Mkt,LZ)=>{"use strict";LZ.exports=NZ()});var zo=U((Ukt,HZ)=>{"use strict";var UZ=Ie("util"),_Z=mZ(),zu=OZ(),TN=Iw(),MZ=t=>t===""||t==="./",hi=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let o=new Set,a=new Set,n=new Set,u=0,A=C=>{n.add(C.output),r&&r.onResult&&r.onResult(C)};for(let C=0;C<e.length;C++){let w=zu(String(e[C]),{...r,onResult:A},!0),v=w.state.negated||w.state.negatedExtglob;v&&u++;for(let b of t){let E=w(b,!0);!(v?!E.isMatch:E.isMatch)||(v?o.add(E.output):(o.delete(E.output),a.add(E.output)))}}let h=(u===e.length?[...n]:[...a]).filter(C=>!o.has(C));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(C=>C.replace(/\\/g,"")):e}return h};hi.match=hi;hi.matcher=(t,e)=>zu(t,e);hi.isMatch=(t,e,r)=>zu(e,r)(t);hi.any=hi.isMatch;hi.not=(t,e,r={})=>{e=[].concat(e).map(String);let o=new Set,a=[],n=A=>{r.onResult&&r.onResult(A),a.push(A.output)},u=new Set(hi(t,e,{...r,onResult:n}));for(let A of a)u.has(A)||o.add(A);return[...o]};hi.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${UZ.inspect(t)}"`);if(Array.isArray(e))return e.some(o=>hi.contains(t,o,r));if(typeof e=="string"){if(MZ(t)||MZ(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return hi.isMatch(t,e,{...r,contains:!0})};hi.matchKeys=(t,e,r)=>{if(!TN.isObject(t))throw new TypeError("Expected the first argument to be an object");let o=hi(Object.keys(t),e,r),a={};for(let n of o)a[n]=t[n];return a};hi.some=(t,e,r)=>{let o=[].concat(t);for(let a of[].concat(e)){let n=zu(String(a),r);if(o.some(u=>n(u)))return!0}return!1};hi.every=(t,e,r)=>{let o=[].concat(t);for(let a of[].concat(e)){let n=zu(String(a),r);if(!o.every(u=>n(u)))return!1}return!0};hi.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${UZ.inspect(t)}"`);return[].concat(e).every(o=>zu(o,r)(t))};hi.capture=(t,e,r)=>{let o=TN.isWindows(r),n=zu.makeRe(String(t),{...r,capture:!0}).exec(o?TN.toPosixSlashes(e):e);if(n)return n.slice(1).map(u=>u===void 0?"":u)};hi.makeRe=(...t)=>zu.makeRe(...t);hi.scan=(...t)=>zu.scan(...t);hi.parse=(t,e)=>{let r=[];for(let o of[].concat(t||[]))for(let a of _Z(String(o),e))r.push(zu.parse(a,e));return r};hi.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:_Z(t,e)};hi.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return hi.braces(t,{...e,expand:!0})};HZ.exports=hi});var jZ=U((_kt,qZ)=>{"use strict";qZ.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var xS=U((Hkt,GZ)=>{"use strict";var c7e=jZ();GZ.exports=t=>typeof t=="string"?t.replace(c7e(),""):t});var YZ=U((qkt,WZ)=>{function u7e(){this.__data__=[],this.size=0}WZ.exports=u7e});var Ly=U((jkt,KZ)=>{function A7e(t,e){return t===e||t!==t&&e!==e}KZ.exports=A7e});var Bw=U((Gkt,VZ)=>{var f7e=Ly();function p7e(t,e){for(var r=t.length;r--;)if(f7e(t[r][0],e))return r;return-1}VZ.exports=p7e});var zZ=U((Wkt,JZ)=>{var h7e=Bw(),g7e=Array.prototype,d7e=g7e.splice;function m7e(t){var e=this.__data__,r=h7e(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():d7e.call(e,r,1),--this.size,!0}JZ.exports=m7e});var ZZ=U((Ykt,XZ)=>{var y7e=Bw();function E7e(t){var e=this.__data__,r=y7e(e,t);return r<0?void 0:e[r][1]}XZ.exports=E7e});var e$=U((Kkt,$Z)=>{var C7e=Bw();function I7e(t){return C7e(this.__data__,t)>-1}$Z.exports=I7e});var r$=U((Vkt,t$)=>{var w7e=Bw();function B7e(t,e){var r=this.__data__,o=w7e(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}t$.exports=B7e});var vw=U((Jkt,n$)=>{var v7e=YZ(),D7e=zZ(),S7e=ZZ(),P7e=e$(),x7e=r$();function Oy(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Oy.prototype.clear=v7e;Oy.prototype.delete=D7e;Oy.prototype.get=S7e;Oy.prototype.has=P7e;Oy.prototype.set=x7e;n$.exports=Oy});var s$=U((zkt,i$)=>{var b7e=vw();function Q7e(){this.__data__=new b7e,this.size=0}i$.exports=Q7e});var a$=U((Xkt,o$)=>{function k7e(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}o$.exports=k7e});var c$=U((Zkt,l$)=>{function F7e(t){return this.__data__.get(t)}l$.exports=F7e});var A$=U(($kt,u$)=>{function R7e(t){return this.__data__.has(t)}u$.exports=R7e});var NN=U((eFt,f$)=>{var T7e=typeof global=="object"&&global&&global.Object===Object&&global;f$.exports=T7e});var Yl=U((tFt,p$)=>{var N7e=NN(),L7e=typeof self=="object"&&self&&self.Object===Object&&self,O7e=N7e||L7e||Function("return this")();p$.exports=O7e});var pd=U((rFt,h$)=>{var M7e=Yl(),U7e=M7e.Symbol;h$.exports=U7e});var y$=U((nFt,m$)=>{var g$=pd(),d$=Object.prototype,_7e=d$.hasOwnProperty,H7e=d$.toString,Dw=g$?g$.toStringTag:void 0;function q7e(t){var e=_7e.call(t,Dw),r=t[Dw];try{t[Dw]=void 0;var o=!0}catch{}var a=H7e.call(t);return o&&(e?t[Dw]=r:delete t[Dw]),a}m$.exports=q7e});var C$=U((iFt,E$)=>{var j7e=Object.prototype,G7e=j7e.toString;function W7e(t){return G7e.call(t)}E$.exports=W7e});var hd=U((sFt,B$)=>{var I$=pd(),Y7e=y$(),K7e=C$(),V7e="[object Null]",J7e="[object Undefined]",w$=I$?I$.toStringTag:void 0;function z7e(t){return t==null?t===void 0?J7e:V7e:w$&&w$ in Object(t)?Y7e(t):K7e(t)}B$.exports=z7e});var al=U((oFt,v$)=>{function X7e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}v$.exports=X7e});var bS=U((aFt,D$)=>{var Z7e=hd(),$7e=al(),eWe="[object AsyncFunction]",tWe="[object Function]",rWe="[object GeneratorFunction]",nWe="[object Proxy]";function iWe(t){if(!$7e(t))return!1;var e=Z7e(t);return e==tWe||e==rWe||e==eWe||e==nWe}D$.exports=iWe});var P$=U((lFt,S$)=>{var sWe=Yl(),oWe=sWe["__core-js_shared__"];S$.exports=oWe});var Q$=U((cFt,b$)=>{var LN=P$(),x$=function(){var t=/[^.]+$/.exec(LN&&LN.keys&&LN.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function aWe(t){return!!x$&&x$ in t}b$.exports=aWe});var ON=U((uFt,k$)=>{var lWe=Function.prototype,cWe=lWe.toString;function uWe(t){if(t!=null){try{return cWe.call(t)}catch{}try{return t+""}catch{}}return""}k$.exports=uWe});var R$=U((AFt,F$)=>{var AWe=bS(),fWe=Q$(),pWe=al(),hWe=ON(),gWe=/[\\^$.*+?()[\]{}|]/g,dWe=/^\[object .+?Constructor\]$/,mWe=Function.prototype,yWe=Object.prototype,EWe=mWe.toString,CWe=yWe.hasOwnProperty,IWe=RegExp("^"+EWe.call(CWe).replace(gWe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wWe(t){if(!pWe(t)||fWe(t))return!1;var e=AWe(t)?IWe:dWe;return e.test(hWe(t))}F$.exports=wWe});var N$=U((fFt,T$)=>{function BWe(t,e){return t==null?void 0:t[e]}T$.exports=BWe});var Jp=U((pFt,L$)=>{var vWe=R$(),DWe=N$();function SWe(t,e){var r=DWe(t,e);return vWe(r)?r:void 0}L$.exports=SWe});var QS=U((hFt,O$)=>{var PWe=Jp(),xWe=Yl(),bWe=PWe(xWe,"Map");O$.exports=bWe});var Sw=U((gFt,M$)=>{var QWe=Jp(),kWe=QWe(Object,"create");M$.exports=kWe});var H$=U((dFt,_$)=>{var U$=Sw();function FWe(){this.__data__=U$?U$(null):{},this.size=0}_$.exports=FWe});var j$=U((mFt,q$)=>{function RWe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}q$.exports=RWe});var W$=U((yFt,G$)=>{var TWe=Sw(),NWe="__lodash_hash_undefined__",LWe=Object.prototype,OWe=LWe.hasOwnProperty;function MWe(t){var e=this.__data__;if(TWe){var r=e[t];return r===NWe?void 0:r}return OWe.call(e,t)?e[t]:void 0}G$.exports=MWe});var K$=U((EFt,Y$)=>{var UWe=Sw(),_We=Object.prototype,HWe=_We.hasOwnProperty;function qWe(t){var e=this.__data__;return UWe?e[t]!==void 0:HWe.call(e,t)}Y$.exports=qWe});var J$=U((CFt,V$)=>{var jWe=Sw(),GWe="__lodash_hash_undefined__";function WWe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=jWe&&e===void 0?GWe:e,this}V$.exports=WWe});var X$=U((IFt,z$)=>{var YWe=H$(),KWe=j$(),VWe=W$(),JWe=K$(),zWe=J$();function My(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}My.prototype.clear=YWe;My.prototype.delete=KWe;My.prototype.get=VWe;My.prototype.has=JWe;My.prototype.set=zWe;z$.exports=My});var eee=U((wFt,$$)=>{var Z$=X$(),XWe=vw(),ZWe=QS();function $We(){this.size=0,this.__data__={hash:new Z$,map:new(ZWe||XWe),string:new Z$}}$$.exports=$We});var ree=U((BFt,tee)=>{function eYe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}tee.exports=eYe});var Pw=U((vFt,nee)=>{var tYe=ree();function rYe(t,e){var r=t.__data__;return tYe(e)?r[typeof e=="string"?"string":"hash"]:r.map}nee.exports=rYe});var see=U((DFt,iee)=>{var nYe=Pw();function iYe(t){var e=nYe(this,t).delete(t);return this.size-=e?1:0,e}iee.exports=iYe});var aee=U((SFt,oee)=>{var sYe=Pw();function oYe(t){return sYe(this,t).get(t)}oee.exports=oYe});var cee=U((PFt,lee)=>{var aYe=Pw();function lYe(t){return aYe(this,t).has(t)}lee.exports=lYe});var Aee=U((xFt,uee)=>{var cYe=Pw();function uYe(t,e){var r=cYe(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}uee.exports=uYe});var kS=U((bFt,fee)=>{var AYe=eee(),fYe=see(),pYe=aee(),hYe=cee(),gYe=Aee();function Uy(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Uy.prototype.clear=AYe;Uy.prototype.delete=fYe;Uy.prototype.get=pYe;Uy.prototype.has=hYe;Uy.prototype.set=gYe;fee.exports=Uy});var hee=U((QFt,pee)=>{var dYe=vw(),mYe=QS(),yYe=kS(),EYe=200;function CYe(t,e){var r=this.__data__;if(r instanceof dYe){var o=r.__data__;if(!mYe||o.length<EYe-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new yYe(o)}return r.set(t,e),this.size=r.size,this}pee.exports=CYe});var RS=U((kFt,gee)=>{var IYe=vw(),wYe=s$(),BYe=a$(),vYe=c$(),DYe=A$(),SYe=hee();function _y(t){var e=this.__data__=new IYe(t);this.size=e.size}_y.prototype.clear=wYe;_y.prototype.delete=BYe;_y.prototype.get=vYe;_y.prototype.has=DYe;_y.prototype.set=SYe;gee.exports=_y});var mee=U((FFt,dee)=>{var PYe="__lodash_hash_undefined__";function xYe(t){return this.__data__.set(t,PYe),this}dee.exports=xYe});var Eee=U((RFt,yee)=>{function bYe(t){return this.__data__.has(t)}yee.exports=bYe});var Iee=U((TFt,Cee)=>{var QYe=kS(),kYe=mee(),FYe=Eee();function TS(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new QYe;++e<r;)this.add(t[e])}TS.prototype.add=TS.prototype.push=kYe;TS.prototype.has=FYe;Cee.exports=TS});var Bee=U((NFt,wee)=>{function RYe(t,e){for(var r=-1,o=t==null?0:t.length;++r<o;)if(e(t[r],r,t))return!0;return!1}wee.exports=RYe});var Dee=U((LFt,vee)=>{function TYe(t,e){return t.has(e)}vee.exports=TYe});var MN=U((OFt,See)=>{var NYe=Iee(),LYe=Bee(),OYe=Dee(),MYe=1,UYe=2;function _Ye(t,e,r,o,a,n){var u=r&MYe,A=t.length,p=e.length;if(A!=p&&!(u&&p>A))return!1;var h=n.get(t),C=n.get(e);if(h&&C)return h==e&&C==t;var w=-1,v=!0,b=r&UYe?new NYe:void 0;for(n.set(t,e),n.set(e,t);++w<A;){var E=t[w],R=e[w];if(o)var L=u?o(R,E,w,e,t,n):o(E,R,w,t,e,n);if(L!==void 0){if(L)continue;v=!1;break}if(b){if(!LYe(e,function(_,V){if(!OYe(b,V)&&(E===_||a(E,_,r,o,n)))return b.push(V)})){v=!1;break}}else if(!(E===R||a(E,R,r,o,n))){v=!1;break}}return n.delete(t),n.delete(e),v}See.exports=_Ye});var UN=U((MFt,Pee)=>{var HYe=Yl(),qYe=HYe.Uint8Array;Pee.exports=qYe});var bee=U((UFt,xee)=>{function jYe(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}xee.exports=jYe});var kee=U((_Ft,Qee)=>{function GYe(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}Qee.exports=GYe});var Lee=U((HFt,Nee)=>{var Fee=pd(),Ree=UN(),WYe=Ly(),YYe=MN(),KYe=bee(),VYe=kee(),JYe=1,zYe=2,XYe="[object Boolean]",ZYe="[object Date]",$Ye="[object Error]",eKe="[object Map]",tKe="[object Number]",rKe="[object RegExp]",nKe="[object Set]",iKe="[object String]",sKe="[object Symbol]",oKe="[object ArrayBuffer]",aKe="[object DataView]",Tee=Fee?Fee.prototype:void 0,_N=Tee?Tee.valueOf:void 0;function lKe(t,e,r,o,a,n,u){switch(r){case aKe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case oKe:return!(t.byteLength!=e.byteLength||!n(new Ree(t),new Ree(e)));case XYe:case ZYe:case tKe:return WYe(+t,+e);case $Ye:return t.name==e.name&&t.message==e.message;case rKe:case iKe:return t==e+"";case eKe:var A=KYe;case nKe:var p=o&JYe;if(A||(A=VYe),t.size!=e.size&&!p)return!1;var h=u.get(t);if(h)return h==e;o|=zYe,u.set(t,e);var C=YYe(A(t),A(e),o,a,n,u);return u.delete(t),C;case sKe:if(_N)return _N.call(t)==_N.call(e)}return!1}Nee.exports=lKe});var NS=U((qFt,Oee)=>{function cKe(t,e){for(var r=-1,o=e.length,a=t.length;++r<o;)t[a+r]=e[r];return t}Oee.exports=cKe});var Kl=U((jFt,Mee)=>{var uKe=Array.isArray;Mee.exports=uKe});var HN=U((GFt,Uee)=>{var AKe=NS(),fKe=Kl();function pKe(t,e,r){var o=e(t);return fKe(t)?o:AKe(o,r(t))}Uee.exports=pKe});var Hee=U((WFt,_ee)=>{function hKe(t,e){for(var r=-1,o=t==null?0:t.length,a=0,n=[];++r<o;){var u=t[r];e(u,r,t)&&(n[a++]=u)}return n}_ee.exports=hKe});var qN=U((YFt,qee)=>{function gKe(){return[]}qee.exports=gKe});var LS=U((KFt,Gee)=>{var dKe=Hee(),mKe=qN(),yKe=Object.prototype,EKe=yKe.propertyIsEnumerable,jee=Object.getOwnPropertySymbols,CKe=jee?function(t){return t==null?[]:(t=Object(t),dKe(jee(t),function(e){return EKe.call(t,e)}))}:mKe;Gee.exports=CKe});var Yee=U((VFt,Wee)=>{function IKe(t,e){for(var r=-1,o=Array(t);++r<t;)o[r]=e(r);return o}Wee.exports=IKe});var Xu=U((JFt,Kee)=>{function wKe(t){return t!=null&&typeof t=="object"}Kee.exports=wKe});var Jee=U((zFt,Vee)=>{var BKe=hd(),vKe=Xu(),DKe="[object Arguments]";function SKe(t){return vKe(t)&&BKe(t)==DKe}Vee.exports=SKe});var xw=U((XFt,Zee)=>{var zee=Jee(),PKe=Xu(),Xee=Object.prototype,xKe=Xee.hasOwnProperty,bKe=Xee.propertyIsEnumerable,QKe=zee(function(){return arguments}())?zee:function(t){return PKe(t)&&xKe.call(t,"callee")&&!bKe.call(t,"callee")};Zee.exports=QKe});var ete=U((ZFt,$ee)=>{function kKe(){return!1}$ee.exports=kKe});var Qw=U((bw,Hy)=>{var FKe=Yl(),RKe=ete(),nte=typeof bw=="object"&&bw&&!bw.nodeType&&bw,tte=nte&&typeof Hy=="object"&&Hy&&!Hy.nodeType&&Hy,TKe=tte&&tte.exports===nte,rte=TKe?FKe.Buffer:void 0,NKe=rte?rte.isBuffer:void 0,LKe=NKe||RKe;Hy.exports=LKe});var kw=U(($Ft,ite)=>{var OKe=9007199254740991,MKe=/^(?:0|[1-9]\d*)$/;function UKe(t,e){var r=typeof t;return e=e??OKe,!!e&&(r=="number"||r!="symbol"&&MKe.test(t))&&t>-1&&t%1==0&&t<e}ite.exports=UKe});var OS=U((eRt,ste)=>{var _Ke=9007199254740991;function HKe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=_Ke}ste.exports=HKe});var ate=U((tRt,ote)=>{var qKe=hd(),jKe=OS(),GKe=Xu(),WKe="[object Arguments]",YKe="[object Array]",KKe="[object Boolean]",VKe="[object Date]",JKe="[object Error]",zKe="[object Function]",XKe="[object Map]",ZKe="[object Number]",$Ke="[object Object]",eVe="[object RegExp]",tVe="[object Set]",rVe="[object String]",nVe="[object WeakMap]",iVe="[object ArrayBuffer]",sVe="[object DataView]",oVe="[object Float32Array]",aVe="[object Float64Array]",lVe="[object Int8Array]",cVe="[object Int16Array]",uVe="[object Int32Array]",AVe="[object Uint8Array]",fVe="[object Uint8ClampedArray]",pVe="[object Uint16Array]",hVe="[object Uint32Array]",oi={};oi[oVe]=oi[aVe]=oi[lVe]=oi[cVe]=oi[uVe]=oi[AVe]=oi[fVe]=oi[pVe]=oi[hVe]=!0;oi[WKe]=oi[YKe]=oi[iVe]=oi[KKe]=oi[sVe]=oi[VKe]=oi[JKe]=oi[zKe]=oi[XKe]=oi[ZKe]=oi[$Ke]=oi[eVe]=oi[tVe]=oi[rVe]=oi[nVe]=!1;function gVe(t){return GKe(t)&&jKe(t.length)&&!!oi[qKe(t)]}ote.exports=gVe});var MS=U((rRt,lte)=>{function dVe(t){return function(e){return t(e)}}lte.exports=dVe});var US=U((Fw,qy)=>{var mVe=NN(),cte=typeof Fw=="object"&&Fw&&!Fw.nodeType&&Fw,Rw=cte&&typeof qy=="object"&&qy&&!qy.nodeType&&qy,yVe=Rw&&Rw.exports===cte,jN=yVe&&mVe.process,EVe=function(){try{var t=Rw&&Rw.require&&Rw.require("util").types;return t||jN&&jN.binding&&jN.binding("util")}catch{}}();qy.exports=EVe});var _S=U((nRt,fte)=>{var CVe=ate(),IVe=MS(),ute=US(),Ate=ute&&ute.isTypedArray,wVe=Ate?IVe(Ate):CVe;fte.exports=wVe});var GN=U((iRt,pte)=>{var BVe=Yee(),vVe=xw(),DVe=Kl(),SVe=Qw(),PVe=kw(),xVe=_S(),bVe=Object.prototype,QVe=bVe.hasOwnProperty;function kVe(t,e){var r=DVe(t),o=!r&&vVe(t),a=!r&&!o&&SVe(t),n=!r&&!o&&!a&&xVe(t),u=r||o||a||n,A=u?BVe(t.length,String):[],p=A.length;for(var h in t)(e||QVe.call(t,h))&&!(u&&(h=="length"||a&&(h=="offset"||h=="parent")||n&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||PVe(h,p)))&&A.push(h);return A}pte.exports=kVe});var HS=U((sRt,hte)=>{var FVe=Object.prototype;function RVe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||FVe;return t===r}hte.exports=RVe});var WN=U((oRt,gte)=>{function TVe(t,e){return function(r){return t(e(r))}}gte.exports=TVe});var mte=U((aRt,dte)=>{var NVe=WN(),LVe=NVe(Object.keys,Object);dte.exports=LVe});var Ete=U((lRt,yte)=>{var OVe=HS(),MVe=mte(),UVe=Object.prototype,_Ve=UVe.hasOwnProperty;function HVe(t){if(!OVe(t))return MVe(t);var e=[];for(var r in Object(t))_Ve.call(t,r)&&r!="constructor"&&e.push(r);return e}yte.exports=HVe});var Tw=U((cRt,Cte)=>{var qVe=bS(),jVe=OS();function GVe(t){return t!=null&&jVe(t.length)&&!qVe(t)}Cte.exports=GVe});var qS=U((uRt,Ite)=>{var WVe=GN(),YVe=Ete(),KVe=Tw();function VVe(t){return KVe(t)?WVe(t):YVe(t)}Ite.exports=VVe});var YN=U((ARt,wte)=>{var JVe=HN(),zVe=LS(),XVe=qS();function ZVe(t){return JVe(t,XVe,zVe)}wte.exports=ZVe});var Dte=U((fRt,vte)=>{var Bte=YN(),$Ve=1,eJe=Object.prototype,tJe=eJe.hasOwnProperty;function rJe(t,e,r,o,a,n){var u=r&$Ve,A=Bte(t),p=A.length,h=Bte(e),C=h.length;if(p!=C&&!u)return!1;for(var w=p;w--;){var v=A[w];if(!(u?v in e:tJe.call(e,v)))return!1}var b=n.get(t),E=n.get(e);if(b&&E)return b==e&&E==t;var R=!0;n.set(t,e),n.set(e,t);for(var L=u;++w<p;){v=A[w];var _=t[v],V=e[v];if(o)var re=u?o(V,_,v,e,t,n):o(_,V,v,t,e,n);if(!(re===void 0?_===V||a(_,V,r,o,n):re)){R=!1;break}L||(L=v=="constructor")}if(R&&!L){var ae=t.constructor,he=e.constructor;ae!=he&&"constructor"in t&&"constructor"in e&&!(typeof ae=="function"&&ae instanceof ae&&typeof he=="function"&&he instanceof he)&&(R=!1)}return n.delete(t),n.delete(e),R}vte.exports=rJe});var Pte=U((pRt,Ste)=>{var nJe=Jp(),iJe=Yl(),sJe=nJe(iJe,"DataView");Ste.exports=sJe});var bte=U((hRt,xte)=>{var oJe=Jp(),aJe=Yl(),lJe=oJe(aJe,"Promise");xte.exports=lJe});var kte=U((gRt,Qte)=>{var cJe=Jp(),uJe=Yl(),AJe=cJe(uJe,"Set");Qte.exports=AJe});var Rte=U((dRt,Fte)=>{var fJe=Jp(),pJe=Yl(),hJe=fJe(pJe,"WeakMap");Fte.exports=hJe});var Nw=U((mRt,_te)=>{var KN=Pte(),VN=QS(),JN=bte(),zN=kte(),XN=Rte(),Ute=hd(),jy=ON(),Tte="[object Map]",gJe="[object Object]",Nte="[object Promise]",Lte="[object Set]",Ote="[object WeakMap]",Mte="[object DataView]",dJe=jy(KN),mJe=jy(VN),yJe=jy(JN),EJe=jy(zN),CJe=jy(XN),gd=Ute;(KN&&gd(new KN(new ArrayBuffer(1)))!=Mte||VN&&gd(new VN)!=Tte||JN&&gd(JN.resolve())!=Nte||zN&&gd(new zN)!=Lte||XN&&gd(new XN)!=Ote)&&(gd=function(t){var e=Ute(t),r=e==gJe?t.constructor:void 0,o=r?jy(r):"";if(o)switch(o){case dJe:return Mte;case mJe:return Tte;case yJe:return Nte;case EJe:return Lte;case CJe:return Ote}return e});_te.exports=gd});var Vte=U((yRt,Kte)=>{var ZN=RS(),IJe=MN(),wJe=Lee(),BJe=Dte(),Hte=Nw(),qte=Kl(),jte=Qw(),vJe=_S(),DJe=1,Gte="[object Arguments]",Wte="[object Array]",jS="[object Object]",SJe=Object.prototype,Yte=SJe.hasOwnProperty;function PJe(t,e,r,o,a,n){var u=qte(t),A=qte(e),p=u?Wte:Hte(t),h=A?Wte:Hte(e);p=p==Gte?jS:p,h=h==Gte?jS:h;var C=p==jS,w=h==jS,v=p==h;if(v&&jte(t)){if(!jte(e))return!1;u=!0,C=!1}if(v&&!C)return n||(n=new ZN),u||vJe(t)?IJe(t,e,r,o,a,n):wJe(t,e,p,r,o,a,n);if(!(r&DJe)){var b=C&&Yte.call(t,"__wrapped__"),E=w&&Yte.call(e,"__wrapped__");if(b||E){var R=b?t.value():t,L=E?e.value():e;return n||(n=new ZN),a(R,L,r,o,n)}}return v?(n||(n=new ZN),BJe(t,e,r,o,a,n)):!1}Kte.exports=PJe});var Zte=U((ERt,Xte)=>{var xJe=Vte(),Jte=Xu();function zte(t,e,r,o,a){return t===e?!0:t==null||e==null||!Jte(t)&&!Jte(e)?t!==t&&e!==e:xJe(t,e,r,o,zte,a)}Xte.exports=zte});var ere=U((CRt,$te)=>{var bJe=Zte();function QJe(t,e){return bJe(t,e)}$te.exports=QJe});var $N=U((IRt,tre)=>{var kJe=Jp(),FJe=function(){try{var t=kJe(Object,"defineProperty");return t({},"",{}),t}catch{}}();tre.exports=FJe});var GS=U((wRt,nre)=>{var rre=$N();function RJe(t,e,r){e=="__proto__"&&rre?rre(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}nre.exports=RJe});var eL=U((BRt,ire)=>{var TJe=GS(),NJe=Ly();function LJe(t,e,r){(r!==void 0&&!NJe(t[e],r)||r===void 0&&!(e in t))&&TJe(t,e,r)}ire.exports=LJe});var ore=U((vRt,sre)=>{function OJe(t){return function(e,r,o){for(var a=-1,n=Object(e),u=o(e),A=u.length;A--;){var p=u[t?A:++a];if(r(n[p],p,n)===!1)break}return e}}sre.exports=OJe});var lre=U((DRt,are)=>{var MJe=ore(),UJe=MJe();are.exports=UJe});var tL=U((Lw,Gy)=>{var _Je=Yl(),fre=typeof Lw=="object"&&Lw&&!Lw.nodeType&&Lw,cre=fre&&typeof Gy=="object"&&Gy&&!Gy.nodeType&&Gy,HJe=cre&&cre.exports===fre,ure=HJe?_Je.Buffer:void 0,Are=ure?ure.allocUnsafe:void 0;function qJe(t,e){if(e)return t.slice();var r=t.length,o=Are?Are(r):new t.constructor(r);return t.copy(o),o}Gy.exports=qJe});var WS=U((SRt,hre)=>{var pre=UN();function jJe(t){var e=new t.constructor(t.byteLength);return new pre(e).set(new pre(t)),e}hre.exports=jJe});var rL=U((PRt,gre)=>{var GJe=WS();function WJe(t,e){var r=e?GJe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}gre.exports=WJe});var YS=U((xRt,dre)=>{function YJe(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r<o;)e[r]=t[r];return e}dre.exports=YJe});var Ere=U((bRt,yre)=>{var KJe=al(),mre=Object.create,VJe=function(){function t(){}return function(e){if(!KJe(e))return{};if(mre)return mre(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();yre.exports=VJe});var KS=U((QRt,Cre)=>{var JJe=WN(),zJe=JJe(Object.getPrototypeOf,Object);Cre.exports=zJe});var nL=U((kRt,Ire)=>{var XJe=Ere(),ZJe=KS(),$Je=HS();function eze(t){return typeof t.constructor=="function"&&!$Je(t)?XJe(ZJe(t)):{}}Ire.exports=eze});var Bre=U((FRt,wre)=>{var tze=Tw(),rze=Xu();function nze(t){return rze(t)&&tze(t)}wre.exports=nze});var iL=U((RRt,Dre)=>{var ize=hd(),sze=KS(),oze=Xu(),aze="[object Object]",lze=Function.prototype,cze=Object.prototype,vre=lze.toString,uze=cze.hasOwnProperty,Aze=vre.call(Object);function fze(t){if(!oze(t)||ize(t)!=aze)return!1;var e=sze(t);if(e===null)return!0;var r=uze.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&vre.call(r)==Aze}Dre.exports=fze});var sL=U((TRt,Sre)=>{function pze(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}Sre.exports=pze});var VS=U((NRt,Pre)=>{var hze=GS(),gze=Ly(),dze=Object.prototype,mze=dze.hasOwnProperty;function yze(t,e,r){var o=t[e];(!(mze.call(t,e)&&gze(o,r))||r===void 0&&!(e in t))&&hze(t,e,r)}Pre.exports=yze});var dd=U((LRt,xre)=>{var Eze=VS(),Cze=GS();function Ize(t,e,r,o){var a=!r;r||(r={});for(var n=-1,u=e.length;++n<u;){var A=e[n],p=o?o(r[A],t[A],A,r,t):void 0;p===void 0&&(p=t[A]),a?Cze(r,A,p):Eze(r,A,p)}return r}xre.exports=Ize});var Qre=U((ORt,bre)=>{function wze(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}bre.exports=wze});var Fre=U((MRt,kre)=>{var Bze=al(),vze=HS(),Dze=Qre(),Sze=Object.prototype,Pze=Sze.hasOwnProperty;function xze(t){if(!Bze(t))return Dze(t);var e=vze(t),r=[];for(var o in t)o=="constructor"&&(e||!Pze.call(t,o))||r.push(o);return r}kre.exports=xze});var Wy=U((URt,Rre)=>{var bze=GN(),Qze=Fre(),kze=Tw();function Fze(t){return kze(t)?bze(t,!0):Qze(t)}Rre.exports=Fze});var Nre=U((_Rt,Tre)=>{var Rze=dd(),Tze=Wy();function Nze(t){return Rze(t,Tze(t))}Tre.exports=Nze});var Hre=U((HRt,_re)=>{var Lre=eL(),Lze=tL(),Oze=rL(),Mze=YS(),Uze=nL(),Ore=xw(),Mre=Kl(),_ze=Bre(),Hze=Qw(),qze=bS(),jze=al(),Gze=iL(),Wze=_S(),Ure=sL(),Yze=Nre();function Kze(t,e,r,o,a,n,u){var A=Ure(t,r),p=Ure(e,r),h=u.get(p);if(h){Lre(t,r,h);return}var C=n?n(A,p,r+"",t,e,u):void 0,w=C===void 0;if(w){var v=Mre(p),b=!v&&Hze(p),E=!v&&!b&&Wze(p);C=p,v||b||E?Mre(A)?C=A:_ze(A)?C=Mze(A):b?(w=!1,C=Lze(p,!0)):E?(w=!1,C=Oze(p,!0)):C=[]:Gze(p)||Ore(p)?(C=A,Ore(A)?C=Yze(A):(!jze(A)||qze(A))&&(C=Uze(p))):w=!1}w&&(u.set(p,C),a(C,p,o,n,u),u.delete(p)),Lre(t,r,C)}_re.exports=Kze});var Gre=U((qRt,jre)=>{var Vze=RS(),Jze=eL(),zze=lre(),Xze=Hre(),Zze=al(),$ze=Wy(),eXe=sL();function qre(t,e,r,o,a){t!==e&&zze(e,function(n,u){if(a||(a=new Vze),Zze(n))Xze(t,e,u,r,qre,o,a);else{var A=o?o(eXe(t,u),n,u+"",t,e,a):void 0;A===void 0&&(A=n),Jze(t,u,A)}},$ze)}jre.exports=qre});var oL=U((jRt,Wre)=>{function tXe(t){return t}Wre.exports=tXe});var Kre=U((GRt,Yre)=>{function rXe(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}Yre.exports=rXe});var aL=U((WRt,Jre)=>{var nXe=Kre(),Vre=Math.max;function iXe(t,e,r){return e=Vre(e===void 0?t.length-1:e,0),function(){for(var o=arguments,a=-1,n=Vre(o.length-e,0),u=Array(n);++a<n;)u[a]=o[e+a];a=-1;for(var A=Array(e+1);++a<e;)A[a]=o[a];return A[e]=r(u),nXe(t,this,A)}}Jre.exports=iXe});var Xre=U((YRt,zre)=>{function sXe(t){return function(){return t}}zre.exports=sXe});var ene=U((KRt,$re)=>{var oXe=Xre(),Zre=$N(),aXe=oL(),lXe=Zre?function(t,e){return Zre(t,"toString",{configurable:!0,enumerable:!1,value:oXe(e),writable:!0})}:aXe;$re.exports=lXe});var rne=U((VRt,tne)=>{var cXe=800,uXe=16,AXe=Date.now;function fXe(t){var e=0,r=0;return function(){var o=AXe(),a=uXe-(o-r);if(r=o,a>0){if(++e>=cXe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}tne.exports=fXe});var lL=U((JRt,nne)=>{var pXe=ene(),hXe=rne(),gXe=hXe(pXe);nne.exports=gXe});var sne=U((zRt,ine)=>{var dXe=oL(),mXe=aL(),yXe=lL();function EXe(t,e){return yXe(mXe(t,e,dXe),t+"")}ine.exports=EXe});var ane=U((XRt,one)=>{var CXe=Ly(),IXe=Tw(),wXe=kw(),BXe=al();function vXe(t,e,r){if(!BXe(r))return!1;var o=typeof e;return(o=="number"?IXe(r)&&wXe(e,r.length):o=="string"&&e in r)?CXe(r[e],t):!1}one.exports=vXe});var cne=U((ZRt,lne)=>{var DXe=sne(),SXe=ane();function PXe(t){return DXe(function(e,r){var o=-1,a=r.length,n=a>1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(n=t.length>3&&typeof n=="function"?(a--,n):void 0,u&&SXe(r[0],r[1],u)&&(n=a<3?void 0:n,a=1),e=Object(e);++o<a;){var A=r[o];A&&t(e,A,o,n)}return e})}lne.exports=PXe});var Ane=U(($Rt,une)=>{var xXe=Gre(),bXe=cne(),QXe=bXe(function(t,e,r,o){xXe(t,e,r,o)});une.exports=QXe});var We={};Yt(We,{AsyncActions:()=>AL,BufferStream:()=>uL,CachingStrategy:()=>Bne,DefaultStream:()=>fL,allSettledSafe:()=>Gc,assertNever:()=>hL,bufferStream:()=>Jy,buildIgnorePattern:()=>OXe,convertMapsToIndexableObjects:()=>JS,dynamicRequire:()=>zp,escapeRegExp:()=>FXe,getArrayWithDefault:()=>Yy,getFactoryWithDefault:()=>Sf,getMapWithDefault:()=>Ky,getSetWithDefault:()=>md,isIndexableObject:()=>cL,isPathLike:()=>MXe,isTaggedYarnVersion:()=>kXe,makeDeferred:()=>Cne,mapAndFilter:()=>Zu,mapAndFind:()=>Mw,mergeIntoTarget:()=>Dne,overrideType:()=>RXe,parseBoolean:()=>Uw,parseOptionalBoolean:()=>vne,prettifyAsyncErrors:()=>Vy,prettifySyncErrors:()=>gL,releaseAfterUseAsync:()=>NXe,replaceEnvVariables:()=>dL,sortMap:()=>xa,toMerged:()=>UXe,tryParseOptionalBoolean:()=>mL,validateEnum:()=>TXe});function kXe(t){return!!(mne.default.valid(t)&&t.match(/^[^-]+(-rc\.[0-9]+)?$/))}function FXe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RXe(t){}function hL(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function TXe(t,e){let r=Object.values(t);if(!r.includes(e))throw new ot(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(o=>JSON.stringify(o)).join(", ")})`);return e}function Zu(t,e){let r=[];for(let o of t){let a=e(o);a!==yne&&r.push(a)}return r}function Mw(t,e){for(let r of t){let o=e(r);if(o!==Ene)return o}}function cL(t){return typeof t=="object"&&t!==null}async function Gc(t){let e=await Promise.allSettled(t),r=[];for(let o of e){if(o.status==="rejected")throw o.reason;r.push(o.value)}return r}function JS(t){if(t instanceof Map&&(t=Object.fromEntries(t)),cL(t))for(let e of Object.keys(t)){let r=t[e];cL(r)&&(t[e]=JS(r))}return t}function Sf(t,e,r){let o=t.get(e);return typeof o>"u"&&t.set(e,o=r()),o}function Yy(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=[]),r}function md(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Set),r}function Ky(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Map),r}async function NXe(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function Vy(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function gL(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function Jy(t){return await new Promise((e,r)=>{let o=[];t.on("error",a=>{r(a)}),t.on("data",a=>{o.push(a)}),t.on("end",()=>{e(Buffer.concat(o))})})}function Cne(){let t,e;return{promise:new Promise((o,a)=>{t=o,e=a}),resolve:t,reject:e}}function Ine(t){return Ow(ue.fromPortablePath(t))}function wne(path){let physicalPath=ue.fromPortablePath(path),currentCacheEntry=Ow.cache[physicalPath];delete Ow.cache[physicalPath];let result;try{result=Ine(physicalPath);let freshCacheEntry=Ow.cache[physicalPath],dynamicModule=eval("module"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{Ow.cache[physicalPath]=currentCacheEntry}return result}function LXe(t){let e=fne.get(t),r=oe.statSync(t);if((e==null?void 0:e.mtime)===r.mtimeMs)return e.instance;let o=wne(t);return fne.set(t,{mtime:r.mtimeMs,instance:o}),o}function zp(t,{cachingStrategy:e=2}={}){switch(e){case 0:return wne(t);case 1:return LXe(t);case 2:return Ine(t);default:throw new Error("Unsupported caching strategy")}}function xa(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function OXe(t){return t.length===0?null:t.map(e=>`(${gne.default.makeRe(e,{windows:!1,dot:!0}).source})`).join("|")}function dL(t,{env:e}){let r=/\${(?<variableName>[\d\w_]+)(?<colon>:)?(?:-(?<fallback>[^}]*))?}/g;return t.replace(r,(...o)=>{let{variableName:a,colon:n,fallback:u}=o[o.length-1],A=Object.prototype.hasOwnProperty.call(e,a),p=e[a];if(p||A&&!n)return p;if(u!=null)return u;throw new ot(`Environment variable not found (${a})`)})}function Uw(t){switch(t){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${t}" as a boolean`)}}function vne(t){return typeof t>"u"?t:Uw(t)}function mL(t){try{return vne(t)}catch{return null}}function MXe(t){return!!(ue.isAbsolute(t)||t.match(/^(\.{1,2}|~)\//))}function Dne(t,...e){let r=u=>({value:u}),o=r(t),a=e.map(u=>r(u)),{value:n}=(0,hne.default)(o,...a,(u,A)=>{if(Array.isArray(u)&&Array.isArray(A)){for(let p of A)u.find(h=>(0,pne.default)(h,p))||u.push(p);return u}});return n}function UXe(...t){return Dne({},...t)}var pne,hne,gne,dne,mne,pL,yne,Ene,uL,AL,fL,Ow,fne,Bne,Vl=dt(()=>{St();_t();pne=tt(ere()),hne=tt(Ane()),gne=tt(zo()),dne=tt(nd()),mne=tt(si()),pL=Ie("stream");yne=Symbol();Zu.skip=yne;Ene=Symbol();Mw.skip=Ene;uL=class extends pL.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,o,a){if(o!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};AL=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,dne.default)(e)}set(e,r){let o=this.deferred.get(e);typeof o>"u"&&this.deferred.set(e,o=Cne());let a=this.limit(()=>r());return this.promises.set(e,a),a.then(()=>{this.promises.get(e)===a&&o.resolve()},n=>{this.promises.get(e)===a&&o.reject(n)}),o.promise}reduce(e,r){let o=this.promises.get(e)??Promise.resolve();this.set(e,()=>r(o))}async wait(){await Promise.all(this.promises.values())}},fL=class extends pL.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,o,a){if(o!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},Ow=eval("require");fne=new Map;Bne=(o=>(o[o.NoCache=0]="NoCache",o[o.FsTime=1]="FsTime",o[o.Node=2]="Node",o))(Bne||{})});var zy,yL,EL,Sne=dt(()=>{zy=(r=>(r.HARD="HARD",r.SOFT="SOFT",r))(zy||{}),yL=(o=>(o.Dependency="Dependency",o.PeerDependency="PeerDependency",o.PeerDependencyMeta="PeerDependencyMeta",o))(yL||{}),EL=(o=>(o.Inactive="inactive",o.Redundant="redundant",o.Active="active",o))(EL||{})});var ye={};Yt(ye,{LogLevel:()=>$S,Style:()=>IL,Type:()=>Bt,addLogFilterSupport:()=>qw,applyColor:()=>ba,applyHyperlink:()=>Xy,applyStyle:()=>ZS,json:()=>yd,jsonOrPretty:()=>qXe,mark:()=>DL,pretty:()=>Kt,prettyField:()=>$u,prettyList:()=>vL,supportsColor:()=>XS,supportsHyperlinks:()=>BL,tuple:()=>Wc});function Wc(t,e){return[e,t]}function ZS(t,e,r){return t.get("enableColors")&&r&2&&(e=Hw.default.bold(e)),e}function ba(t,e,r){if(!t.get("enableColors"))return e;let o=_Xe.get(r);if(o===null)return e;let a=typeof o>"u"?r:wL.level>=3?o[0]:o[1],n=typeof a=="number"?CL.ansi256(a):a.startsWith("#")?CL.hex(a):CL[a];if(typeof n!="function")throw new Error(`Invalid format type ${a}`);return n(e)}function Xy(t,e,r){return t.get("enableHyperlinks")?HXe?`\x1B]8;;${r}\x1B\\${e}\x1B]8;;\x1B\\`:`\x1B]8;;${r}\x07${e}\x1B]8;;\x07`:e}function Kt(t,e,r){if(e===null)return ba(t,"null",Bt.NULL);if(Object.prototype.hasOwnProperty.call(zS,r))return zS[r].pretty(t,e);if(typeof e!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return ba(t,e,r)}function vL(t,e,r,{separator:o=", "}={}){return[...e].map(a=>Kt(t,a,r)).join(o)}function yd(t,e){if(t===null)return null;if(Object.prototype.hasOwnProperty.call(zS,e))return zS[e].json(t);if(typeof t!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return t}function qXe(t,e,[r,o]){return t?yd(r,o):Kt(e,r,o)}function DL(t){return{Check:ba(t,"\u2713","green"),Cross:ba(t,"\u2718","red"),Question:ba(t,"?","cyan")}}function $u(t,{label:e,value:[r,o]}){return`${Kt(t,e,Bt.CODE)}: ${Kt(t,r,o)}`}function qw(t,{configuration:e}){let r=e.get("logFilters"),o=new Map,a=new Map,n=[];for(let w of r){let v=w.get("level");if(typeof v>"u")continue;let b=w.get("code");typeof b<"u"&&o.set(b,v);let E=w.get("text");typeof E<"u"&&a.set(E,v);let R=w.get("pattern");typeof R<"u"&&n.push([Pne.default.matcher(R,{contains:!0}),v])}n.reverse();let u=(w,v,b)=>{if(w===null||w===0)return b;let E=a.size>0||n.length>0?(0,xne.default)(v):v;if(a.size>0){let R=a.get(E);if(typeof R<"u")return R??b}if(n.length>0){for(let[R,L]of n)if(R(E))return L??b}if(o.size>0){let R=o.get(Vu(w));if(typeof R<"u")return R??b}return b},A=t.reportInfo,p=t.reportWarning,h=t.reportError,C=function(w,v,b,E){switch(u(v,b,E)){case"info":A.call(w,v,b);break;case"warning":p.call(w,v??0,b);break;case"error":h.call(w,v??0,b);break}};t.reportInfo=function(...w){return C(this,...w,"info")},t.reportWarning=function(...w){return C(this,...w,"warning")},t.reportError=function(...w){return C(this,...w,"error")}}var Hw,_w,Pne,xne,bne,Bt,IL,wL,XS,BL,CL,_Xe,ll,zS,HXe,$S,zl=dt(()=>{St();Hw=tt(yN()),_w=tt(Zg());_t();Pne=tt(zo()),xne=tt(xS()),bne=Ie("util");rS();Ks();Bt={NO_HINT:"NO_HINT",NULL:"NULL",SCOPE:"SCOPE",NAME:"NAME",RANGE:"RANGE",REFERENCE:"REFERENCE",NUMBER:"NUMBER",PATH:"PATH",URL:"URL",ADDED:"ADDED",REMOVED:"REMOVED",CODE:"CODE",INSPECT:"INSPECT",DURATION:"DURATION",SIZE:"SIZE",IDENT:"IDENT",DESCRIPTOR:"DESCRIPTOR",LOCATOR:"LOCATOR",RESOLUTION:"RESOLUTION",DEPENDENT:"DEPENDENT",PACKAGE_EXTENSION:"PACKAGE_EXTENSION",SETTING:"SETTING",MARKDOWN:"MARKDOWN"},IL=(e=>(e[e.BOLD=2]="BOLD",e))(IL||{}),wL=_w.default.GITHUB_ACTIONS?{level:2}:Hw.default.supportsColor?{level:Hw.default.supportsColor.level}:{level:0},XS=wL.level!==0,BL=XS&&!_w.default.GITHUB_ACTIONS&&!_w.default.CIRCLE&&!_w.default.GITLAB,CL=new Hw.default.Instance(wL),_Xe=new Map([[Bt.NO_HINT,null],[Bt.NULL,["#a853b5",129]],[Bt.SCOPE,["#d75f00",166]],[Bt.NAME,["#d7875f",173]],[Bt.RANGE,["#00afaf",37]],[Bt.REFERENCE,["#87afff",111]],[Bt.NUMBER,["#ffd700",220]],[Bt.PATH,["#d75fd7",170]],[Bt.URL,["#d75fd7",170]],[Bt.ADDED,["#5faf00",70]],[Bt.REMOVED,["#d70000",160]],[Bt.CODE,["#87afff",111]],[Bt.SIZE,["#ffd700",220]]]),ll=t=>t,zS={[Bt.INSPECT]:ll({pretty:(t,e)=>(0,bne.inspect)(e,{depth:1/0,colors:t.get("enableColors"),compact:!0,breakLength:1/0}),json:t=>t}),[Bt.NUMBER]:ll({pretty:(t,e)=>ba(t,`${e}`,Bt.NUMBER),json:t=>t}),[Bt.IDENT]:ll({pretty:(t,e)=>cs(t,e),json:t=>nn(t)}),[Bt.LOCATOR]:ll({pretty:(t,e)=>kr(t,e),json:t=>Jl(t)}),[Bt.DESCRIPTOR]:ll({pretty:(t,e)=>Ln(t,e),json:t=>Qa(t)}),[Bt.RESOLUTION]:ll({pretty:(t,{descriptor:e,locator:r})=>jw(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:Qa(t),locator:e!==null?Jl(e):null})}),[Bt.DEPENDENT]:ll({pretty:(t,{locator:e,descriptor:r})=>SL(t,e,r),json:({locator:t,descriptor:e})=>({locator:Jl(t),descriptor:Qa(e)})}),[Bt.PACKAGE_EXTENSION]:ll({pretty:(t,e)=>{switch(e.type){case"Dependency":return`${cs(t,e.parentDescriptor)} \u27A4 ${ba(t,"dependencies",Bt.CODE)} \u27A4 ${cs(t,e.descriptor)}`;case"PeerDependency":return`${cs(t,e.parentDescriptor)} \u27A4 ${ba(t,"peerDependencies",Bt.CODE)} \u27A4 ${cs(t,e.descriptor)}`;case"PeerDependencyMeta":return`${cs(t,e.parentDescriptor)} \u27A4 ${ba(t,"peerDependenciesMeta",Bt.CODE)} \u27A4 ${cs(t,Ys(e.selector))} \u27A4 ${ba(t,e.key,Bt.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case"Dependency":return`${nn(t.parentDescriptor)} > ${nn(t.descriptor)}`;case"PeerDependency":return`${nn(t.parentDescriptor)} >> ${nn(t.descriptor)}`;case"PeerDependencyMeta":return`${nn(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[Bt.SETTING]:ll({pretty:(t,e)=>(t.get(e),Xy(t,ba(t,e,Bt.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[Bt.DURATION]:ll({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),o=Math.ceil((e-r*60*1e3)/1e3);return o===0?`${r}m`:`${r}m ${o}s`}else{let r=Math.floor(e/1e3),o=e-r*1e3;return o===0?`${r}s`:`${r}s ${o}ms`}},json:t=>t}),[Bt.SIZE]:ll({pretty:(t,e)=>{let r=["KB","MB","GB","TB"],o=r.length;for(;o>1&&e<1024**o;)o-=1;let a=1024**o,n=Math.floor(e*100/a)/100;return ba(t,`${n} ${r[o-1]}`,Bt.NUMBER)},json:t=>t}),[Bt.PATH]:ll({pretty:(t,e)=>ba(t,ue.fromPortablePath(e),Bt.PATH),json:t=>ue.fromPortablePath(t)}),[Bt.MARKDOWN]:ll({pretty:(t,{text:e,format:r,paragraphs:o})=>Bo(e,{format:r,paragraphs:o}),json:({text:t})=>t})};HXe=!!process.env.KONSOLE_VERSION;$S=(a=>(a.Error="error",a.Warning="warning",a.Info="info",a.Discard="discard",a))($S||{})});var kne=U((uTt,Qne)=>{"use strict";Qne.exports=(...t)=>[...new Set([].concat(...t))]});var PL=U((ATt,Tne)=>{"use strict";var jXe=Ie("stream"),Fne=jXe.PassThrough,GXe=Array.prototype.slice;Tne.exports=WXe;function WXe(){let t=[],e=GXe.call(arguments),r=!1,o=e[e.length-1];o&&!Array.isArray(o)&&o.pipe==null?e.pop():o={};let a=o.end!==!1,n=o.pipeError===!0;o.objectMode==null&&(o.objectMode=!0),o.highWaterMark==null&&(o.highWaterMark=64*1024);let u=Fne(o);function A(){for(let C=0,w=arguments.length;C<w;C++)t.push(Rne(arguments[C],o));return p(),this}function p(){if(r)return;r=!0;let C=t.shift();if(!C){process.nextTick(h);return}Array.isArray(C)||(C=[C]);let w=C.length+1;function v(){--w>0||(r=!1,p())}function b(E){function R(){E.removeListener("merge2UnpipeEnd",R),E.removeListener("end",R),n&&E.removeListener("error",L),v()}function L(_){u.emit("error",_)}if(E._readableState.endEmitted)return v();E.on("merge2UnpipeEnd",R),E.on("end",R),n&&E.on("error",L),E.pipe(u,{end:!1}),E.resume()}for(let E=0;E<C.length;E++)b(C[E]);v()}function h(){r=!1,u.emit("queueDrain"),a&&u.end()}return u.setMaxListeners(0),u.add=A,u.on("unpipe",function(C){C.emit("merge2UnpipeEnd")}),e.length&&A.apply(null,e),u}function Rne(t,e){if(Array.isArray(t))for(let r=0,o=t.length;r<o;r++)t[r]=Rne(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Fne(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var Nne=U(Zy=>{"use strict";Object.defineProperty(Zy,"__esModule",{value:!0});Zy.splitWhen=Zy.flatten=void 0;function YXe(t){return t.reduce((e,r)=>[].concat(e,r),[])}Zy.flatten=YXe;function KXe(t,e){let r=[[]],o=0;for(let a of t)e(a)?(o++,r[o]=[]):r[o].push(a);return r}Zy.splitWhen=KXe});var Lne=U(eP=>{"use strict";Object.defineProperty(eP,"__esModule",{value:!0});eP.isEnoentCodeError=void 0;function VXe(t){return t.code==="ENOENT"}eP.isEnoentCodeError=VXe});var One=U(tP=>{"use strict";Object.defineProperty(tP,"__esModule",{value:!0});tP.createDirentFromStats=void 0;var xL=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function JXe(t,e){return new xL(t,e)}tP.createDirentFromStats=JXe});var Mne=U(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.removeLeadingDotSegment=eA.escape=eA.makeAbsolute=eA.unixify=void 0;var zXe=Ie("path"),XXe=2,ZXe=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function $Xe(t){return t.replace(/\\/g,"/")}eA.unixify=$Xe;function eZe(t,e){return zXe.resolve(t,e)}eA.makeAbsolute=eZe;function tZe(t){return t.replace(ZXe,"\\$2")}eA.escape=tZe;function rZe(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(XXe)}return t}eA.removeLeadingDotSegment=rZe});var _ne=U((dTt,Une)=>{Une.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var jne=U((mTt,qne)=>{var nZe=_ne(),Hne={"{":"}","(":")","[":"]"},iZe=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,o=-2,a=-2,n=-2,u=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||o!==-1&&t[e]==="["&&t[e+1]!=="]"&&(o<e&&(o=t.indexOf("]",e)),o>e&&(u===-1||u>o||(u=t.indexOf("\\",e),u===-1||u>o)))||a!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(a=t.indexOf("}",e),a>e&&(u=t.indexOf("\\",e),u===-1||u>a))||n!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(n=t.indexOf(")",e),n>e&&(u=t.indexOf("\\",e),u===-1||u>n))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(n=t.indexOf(")",r),n>r&&(u=t.indexOf("\\",r),u===-1||u>n))))return!0;if(t[e]==="\\"){var A=t[e+1];e+=2;var p=Hne[A];if(p){var h=t.indexOf(p,e);h!==-1&&(e=h+1)}if(t[e]==="!")return!0}else e++}return!1},sZe=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var o=Hne[r];if(o){var a=t.indexOf(o,e);a!==-1&&(e=a+1)}if(t[e]==="!")return!0}else e++}return!1};qne.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(nZe(e))return!0;var o=iZe;return r&&r.strict===!1&&(o=sZe),o(e)}});var Wne=U((yTt,Gne)=>{"use strict";var oZe=jne(),aZe=Ie("path").posix.dirname,lZe=Ie("os").platform()==="win32",bL="/",cZe=/\\/g,uZe=/[\{\[].*[\}\]]$/,AZe=/(^|[^\\])([\{\[]|\([^\)]+$)/,fZe=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Gne.exports=function(e,r){var o=Object.assign({flipBackslashes:!0},r);o.flipBackslashes&&lZe&&e.indexOf(bL)<0&&(e=e.replace(cZe,bL)),uZe.test(e)&&(e+=bL),e+="a";do e=aZe(e);while(oZe(e)||AZe.test(e));return e.replace(fZe,"$1")}});var $ne=U(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.matchAny=Or.convertPatternsToRe=Or.makeRe=Or.getPatternParts=Or.expandBraceExpansion=Or.expandPatternsWithBraceExpansion=Or.isAffectDepthOfReadingPattern=Or.endsWithSlashGlobStar=Or.hasGlobStar=Or.getBaseDirectory=Or.isPatternRelatedToParentDirectory=Or.getPatternsOutsideCurrentDirectory=Or.getPatternsInsideCurrentDirectory=Or.getPositivePatterns=Or.getNegativePatterns=Or.isPositivePattern=Or.isNegativePattern=Or.convertToNegativePattern=Or.convertToPositivePattern=Or.isDynamicPattern=Or.isStaticPattern=void 0;var pZe=Ie("path"),hZe=Wne(),QL=zo(),Yne="**",gZe="\\",dZe=/[*?]|^!/,mZe=/\[[^[]*]/,yZe=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,EZe=/[!*+?@]\([^(]*\)/,CZe=/,|\.\./;function Kne(t,e={}){return!Vne(t,e)}Or.isStaticPattern=Kne;function Vne(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(gZe)||dZe.test(t)||mZe.test(t)||yZe.test(t)||e.extglob!==!1&&EZe.test(t)||e.braceExpansion!==!1&&IZe(t))}Or.isDynamicPattern=Vne;function IZe(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let o=t.slice(e,r);return CZe.test(o)}function wZe(t){return rP(t)?t.slice(1):t}Or.convertToPositivePattern=wZe;function BZe(t){return"!"+t}Or.convertToNegativePattern=BZe;function rP(t){return t.startsWith("!")&&t[1]!=="("}Or.isNegativePattern=rP;function Jne(t){return!rP(t)}Or.isPositivePattern=Jne;function vZe(t){return t.filter(rP)}Or.getNegativePatterns=vZe;function DZe(t){return t.filter(Jne)}Or.getPositivePatterns=DZe;function SZe(t){return t.filter(e=>!kL(e))}Or.getPatternsInsideCurrentDirectory=SZe;function PZe(t){return t.filter(kL)}Or.getPatternsOutsideCurrentDirectory=PZe;function kL(t){return t.startsWith("..")||t.startsWith("./..")}Or.isPatternRelatedToParentDirectory=kL;function xZe(t){return hZe(t,{flipBackslashes:!1})}Or.getBaseDirectory=xZe;function bZe(t){return t.includes(Yne)}Or.hasGlobStar=bZe;function zne(t){return t.endsWith("/"+Yne)}Or.endsWithSlashGlobStar=zne;function QZe(t){let e=pZe.basename(t);return zne(t)||Kne(e)}Or.isAffectDepthOfReadingPattern=QZe;function kZe(t){return t.reduce((e,r)=>e.concat(Xne(r)),[])}Or.expandPatternsWithBraceExpansion=kZe;function Xne(t){return QL.braces(t,{expand:!0,nodupes:!0})}Or.expandBraceExpansion=Xne;function FZe(t,e){let{parts:r}=QL.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}Or.getPatternParts=FZe;function Zne(t,e){return QL.makeRe(t,e)}Or.makeRe=Zne;function RZe(t,e){return t.map(r=>Zne(r,e))}Or.convertPatternsToRe=RZe;function TZe(t,e){return e.some(r=>r.test(t))}Or.matchAny=TZe});var tie=U(nP=>{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});nP.merge=void 0;var NZe=PL();function LZe(t){let e=NZe(t);return t.forEach(r=>{r.once("error",o=>e.emit("error",o))}),e.once("close",()=>eie(t)),e.once("end",()=>eie(t)),e}nP.merge=LZe;function eie(t){t.forEach(e=>e.emit("close"))}});var rie=U($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.isEmpty=$y.isString=void 0;function OZe(t){return typeof t=="string"}$y.isString=OZe;function MZe(t){return t===""}$y.isEmpty=MZe});var Pf=U(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.string=So.stream=So.pattern=So.path=So.fs=So.errno=So.array=void 0;var UZe=Nne();So.array=UZe;var _Ze=Lne();So.errno=_Ze;var HZe=One();So.fs=HZe;var qZe=Mne();So.path=qZe;var jZe=$ne();So.pattern=jZe;var GZe=tie();So.stream=GZe;var WZe=rie();So.string=WZe});var sie=U(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.convertPatternGroupToTask=Po.convertPatternGroupsToTasks=Po.groupPatternsByBaseDirectory=Po.getNegativePatternsAsPositive=Po.getPositivePatterns=Po.convertPatternsToTasks=Po.generate=void 0;var xf=Pf();function YZe(t,e){let r=nie(t),o=iie(t,e.ignore),a=r.filter(p=>xf.pattern.isStaticPattern(p,e)),n=r.filter(p=>xf.pattern.isDynamicPattern(p,e)),u=FL(a,o,!1),A=FL(n,o,!0);return u.concat(A)}Po.generate=YZe;function FL(t,e,r){let o=[],a=xf.pattern.getPatternsOutsideCurrentDirectory(t),n=xf.pattern.getPatternsInsideCurrentDirectory(t),u=RL(a),A=RL(n);return o.push(...TL(u,e,r)),"."in A?o.push(NL(".",n,e,r)):o.push(...TL(A,e,r)),o}Po.convertPatternsToTasks=FL;function nie(t){return xf.pattern.getPositivePatterns(t)}Po.getPositivePatterns=nie;function iie(t,e){return xf.pattern.getNegativePatterns(t).concat(e).map(xf.pattern.convertToPositivePattern)}Po.getNegativePatternsAsPositive=iie;function RL(t){let e={};return t.reduce((r,o)=>{let a=xf.pattern.getBaseDirectory(o);return a in r?r[a].push(o):r[a]=[o],r},e)}Po.groupPatternsByBaseDirectory=RL;function TL(t,e,r){return Object.keys(t).map(o=>NL(o,t[o],e,r))}Po.convertPatternGroupsToTasks=TL;function NL(t,e,r,o){return{dynamic:o,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(xf.pattern.convertToNegativePattern))}}Po.convertPatternGroupToTask=NL});var aie=U(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.removeDuplicateSlashes=eE.transform=void 0;var KZe=/(?!^)\/{2,}/g;function VZe(t){return t.map(e=>oie(e))}eE.transform=VZe;function oie(t){return t.replace(KZe,"/")}eE.removeDuplicateSlashes=oie});var cie=U(iP=>{"use strict";Object.defineProperty(iP,"__esModule",{value:!0});iP.read=void 0;function JZe(t,e,r){e.fs.lstat(t,(o,a)=>{if(o!==null){lie(r,o);return}if(!a.isSymbolicLink()||!e.followSymbolicLink){LL(r,a);return}e.fs.stat(t,(n,u)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){lie(r,n);return}LL(r,a);return}e.markSymbolicLink&&(u.isSymbolicLink=()=>!0),LL(r,u)})})}iP.read=JZe;function lie(t,e){t(e)}function LL(t,e){t(null,e)}});var uie=U(sP=>{"use strict";Object.defineProperty(sP,"__esModule",{value:!0});sP.read=void 0;function zZe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let o=e.fs.statSync(t);return e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),o}catch(o){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw o}}sP.read=zZe});var Aie=U(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});Xp.createFileSystemAdapter=Xp.FILE_SYSTEM_ADAPTER=void 0;var oP=Ie("fs");Xp.FILE_SYSTEM_ADAPTER={lstat:oP.lstat,stat:oP.stat,lstatSync:oP.lstatSync,statSync:oP.statSync};function XZe(t){return t===void 0?Xp.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Xp.FILE_SYSTEM_ADAPTER),t)}Xp.createFileSystemAdapter=XZe});var fie=U(ML=>{"use strict";Object.defineProperty(ML,"__esModule",{value:!0});var ZZe=Aie(),OL=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=ZZe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};ML.default=OL});var Ed=U(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.statSync=Zp.stat=Zp.Settings=void 0;var pie=cie(),$Ze=uie(),UL=fie();Zp.Settings=UL.default;function e$e(t,e,r){if(typeof e=="function"){pie.read(t,_L(),e);return}pie.read(t,_L(e),r)}Zp.stat=e$e;function t$e(t,e){let r=_L(e);return $Ze.read(t,r)}Zp.statSync=t$e;function _L(t={}){return t instanceof UL.default?t:new UL.default(t)}});var gie=U((QTt,hie)=>{hie.exports=r$e;function r$e(t,e){var r,o,a,n=!0;Array.isArray(t)?(r=[],o=t.length):(a=Object.keys(t),r={},o=a.length);function u(p){function h(){e&&e(p,r),e=null}n?process.nextTick(h):h()}function A(p,h,C){r[p]=C,(--o===0||h)&&u(h)}o?a?a.forEach(function(p){t[p](function(h,C){A(p,h,C)})}):t.forEach(function(p,h){p(function(C,w){A(h,C,w)})}):u(null),n=!1}});var HL=U(lP=>{"use strict";Object.defineProperty(lP,"__esModule",{value:!0});lP.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var aP=process.versions.node.split(".");if(aP[0]===void 0||aP[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var die=Number.parseInt(aP[0],10),n$e=Number.parseInt(aP[1],10),mie=10,i$e=10,s$e=die>mie,o$e=die===mie&&n$e>=i$e;lP.IS_SUPPORT_READDIR_WITH_FILE_TYPES=s$e||o$e});var yie=U(cP=>{"use strict";Object.defineProperty(cP,"__esModule",{value:!0});cP.createDirentFromStats=void 0;var qL=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function a$e(t,e){return new qL(t,e)}cP.createDirentFromStats=a$e});var jL=U(uP=>{"use strict";Object.defineProperty(uP,"__esModule",{value:!0});uP.fs=void 0;var l$e=yie();uP.fs=l$e});var WL=U(AP=>{"use strict";Object.defineProperty(AP,"__esModule",{value:!0});AP.joinPathSegments=void 0;function c$e(t,e,r){return t.endsWith(r)?t+e:t+r+e}AP.joinPathSegments=c$e});var vie=U($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.readdir=$p.readdirWithFileTypes=$p.read=void 0;var u$e=Ed(),Eie=gie(),A$e=HL(),Cie=jL(),Iie=WL();function f$e(t,e,r){if(!e.stats&&A$e.IS_SUPPORT_READDIR_WITH_FILE_TYPES){wie(t,e,r);return}Bie(t,e,r)}$p.read=f$e;function wie(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(o,a)=>{if(o!==null){fP(r,o);return}let n=a.map(A=>({dirent:A,name:A.name,path:Iie.joinPathSegments(t,A.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){YL(r,n);return}let u=n.map(A=>p$e(A,e));Eie(u,(A,p)=>{if(A!==null){fP(r,A);return}YL(r,p)})})}$p.readdirWithFileTypes=wie;function p$e(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(o,a)=>{if(o!==null){if(e.throwErrorOnBrokenSymbolicLink){r(o);return}r(null,t);return}t.dirent=Cie.fs.createDirentFromStats(t.name,a),r(null,t)})}}function Bie(t,e,r){e.fs.readdir(t,(o,a)=>{if(o!==null){fP(r,o);return}let n=a.map(u=>{let A=Iie.joinPathSegments(t,u,e.pathSegmentSeparator);return p=>{u$e.stat(A,e.fsStatSettings,(h,C)=>{if(h!==null){p(h);return}let w={name:u,path:A,dirent:Cie.fs.createDirentFromStats(u,C)};e.stats&&(w.stats=C),p(null,w)})}});Eie(n,(u,A)=>{if(u!==null){fP(r,u);return}YL(r,A)})})}$p.readdir=Bie;function fP(t,e){t(e)}function YL(t,e){t(null,e)}});var bie=U(e0=>{"use strict";Object.defineProperty(e0,"__esModule",{value:!0});e0.readdir=e0.readdirWithFileTypes=e0.read=void 0;var h$e=Ed(),g$e=HL(),Die=jL(),Sie=WL();function d$e(t,e){return!e.stats&&g$e.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Pie(t,e):xie(t,e)}e0.read=d$e;function Pie(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(o=>{let a={dirent:o,name:o.name,path:Sie.joinPathSegments(t,o.name,e.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let n=e.fs.statSync(a.path);a.dirent=Die.fs.createDirentFromStats(a.name,n)}catch(n){if(e.throwErrorOnBrokenSymbolicLink)throw n}return a})}e0.readdirWithFileTypes=Pie;function xie(t,e){return e.fs.readdirSync(t).map(o=>{let a=Sie.joinPathSegments(t,o,e.pathSegmentSeparator),n=h$e.statSync(a,e.fsStatSettings),u={name:o,path:a,dirent:Die.fs.createDirentFromStats(o,n)};return e.stats&&(u.stats=n),u})}e0.readdir=xie});var Qie=U(t0=>{"use strict";Object.defineProperty(t0,"__esModule",{value:!0});t0.createFileSystemAdapter=t0.FILE_SYSTEM_ADAPTER=void 0;var tE=Ie("fs");t0.FILE_SYSTEM_ADAPTER={lstat:tE.lstat,stat:tE.stat,lstatSync:tE.lstatSync,statSync:tE.statSync,readdir:tE.readdir,readdirSync:tE.readdirSync};function m$e(t){return t===void 0?t0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t0.FILE_SYSTEM_ADAPTER),t)}t0.createFileSystemAdapter=m$e});var kie=U(VL=>{"use strict";Object.defineProperty(VL,"__esModule",{value:!0});var y$e=Ie("path"),E$e=Ed(),C$e=Qie(),KL=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=C$e.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,y$e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new E$e.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};VL.default=KL});var pP=U(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.Settings=r0.scandirSync=r0.scandir=void 0;var Fie=vie(),I$e=bie(),JL=kie();r0.Settings=JL.default;function w$e(t,e,r){if(typeof e=="function"){Fie.read(t,zL(),e);return}Fie.read(t,zL(e),r)}r0.scandir=w$e;function B$e(t,e){let r=zL(e);return I$e.read(t,r)}r0.scandirSync=B$e;function zL(t={}){return t instanceof JL.default?t:new JL.default(t)}});var Tie=U((_Tt,Rie)=>{"use strict";function v$e(t){var e=new t,r=e;function o(){var n=e;return n.next?e=n.next:(e=new t,r=e),n.next=null,n}function a(n){r.next=n,r=n}return{get:o,release:a}}Rie.exports=v$e});var Lie=U((HTt,XL)=>{"use strict";var D$e=Tie();function Nie(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var o=D$e(S$e),a=null,n=null,u=0,A=null,p={push:R,drain:Xl,saturated:Xl,pause:C,paused:!1,concurrency:r,running:h,resume:b,idle:E,length:w,getQueue:v,unshift:L,empty:Xl,kill:V,killAndDrain:re,error:ae};return p;function h(){return u}function C(){p.paused=!0}function w(){for(var he=a,pe=0;he;)he=he.next,pe++;return pe}function v(){for(var he=a,pe=[];he;)pe.push(he.value),he=he.next;return pe}function b(){if(!!p.paused){p.paused=!1;for(var he=0;he<p.concurrency;he++)u++,_()}}function E(){return u===0&&p.length()===0}function R(he,pe){var De=o.get();De.context=t,De.release=_,De.value=he,De.callback=pe||Xl,De.errorHandler=A,u===p.concurrency||p.paused?n?(n.next=De,n=De):(a=De,n=De,p.saturated()):(u++,e.call(t,De.value,De.worked))}function L(he,pe){var De=o.get();De.context=t,De.release=_,De.value=he,De.callback=pe||Xl,u===p.concurrency||p.paused?a?(De.next=a,a=De):(a=De,n=De,p.saturated()):(u++,e.call(t,De.value,De.worked))}function _(he){he&&o.release(he);var pe=a;pe?p.paused?u--:(n===a&&(n=null),a=pe.next,pe.next=null,e.call(t,pe.value,pe.worked),n===null&&p.empty()):--u===0&&p.drain()}function V(){a=null,n=null,p.drain=Xl}function re(){a=null,n=null,p.drain(),p.drain=Xl}function ae(he){A=he}}function Xl(){}function S$e(){this.value=null,this.callback=Xl,this.next=null,this.release=Xl,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,o){var a=t.callback,n=t.errorHandler,u=t.value;t.value=null,t.callback=Xl,t.errorHandler&&n(r,u),a.call(t.context,r,o),t.release(t)}}function P$e(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function o(C,w){e.call(this,C).then(function(v){w(null,v)},w)}var a=Nie(t,o,r),n=a.push,u=a.unshift;return a.push=A,a.unshift=p,a.drained=h,a;function A(C){var w=new Promise(function(v,b){n(C,function(E,R){if(E){b(E);return}v(R)})});return w.catch(Xl),w}function p(C){var w=new Promise(function(v,b){u(C,function(E,R){if(E){b(E);return}v(R)})});return w.catch(Xl),w}function h(){var C=a.drain,w=new Promise(function(v){a.drain=function(){C(),v()}});return w}}XL.exports=Nie;XL.exports.promise=P$e});var hP=U(tA=>{"use strict";Object.defineProperty(tA,"__esModule",{value:!0});tA.joinPathSegments=tA.replacePathSegmentSeparator=tA.isAppliedFilter=tA.isFatalError=void 0;function x$e(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}tA.isFatalError=x$e;function b$e(t,e){return t===null||t(e)}tA.isAppliedFilter=b$e;function Q$e(t,e){return t.split(/[/\\]/).join(e)}tA.replacePathSegmentSeparator=Q$e;function k$e(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}tA.joinPathSegments=k$e});var eO=U($L=>{"use strict";Object.defineProperty($L,"__esModule",{value:!0});var F$e=hP(),ZL=class{constructor(e,r){this._root=e,this._settings=r,this._root=F$e.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};$L.default=ZL});var nO=U(rO=>{"use strict";Object.defineProperty(rO,"__esModule",{value:!0});var R$e=Ie("events"),T$e=pP(),N$e=Lie(),gP=hP(),L$e=eO(),tO=class extends L$e.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=T$e.scandir,this._emitter=new R$e.EventEmitter,this._queue=N$e(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let o={directory:e,base:r};this._queue.push(o,a=>{a!==null&&this._handleError(a)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(o,a)=>{if(o!==null){r(o,void 0);return}for(let n of a)this._handleEntry(n,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!gP.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let o=e.path;r!==void 0&&(e.path=gP.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),gP.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&gP.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(o,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};rO.default=tO});var Oie=U(sO=>{"use strict";Object.defineProperty(sO,"__esModule",{value:!0});var O$e=nO(),iO=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new O$e.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(r=>{M$e(e,r)}),this._reader.onEntry(r=>{this._storage.add(r)}),this._reader.onEnd(()=>{U$e(e,[...this._storage])}),this._reader.read()}};sO.default=iO;function M$e(t,e){t(e)}function U$e(t,e){t(null,e)}});var Mie=U(aO=>{"use strict";Object.defineProperty(aO,"__esModule",{value:!0});var _$e=Ie("stream"),H$e=nO(),oO=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new H$e.default(this._root,this._settings),this._stream=new _$e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};aO.default=oO});var Uie=U(cO=>{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});var q$e=pP(),dP=hP(),j$e=eO(),lO=class extends j$e.default{constructor(){super(...arguments),this._scandir=q$e.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let o=this._scandir(e,this._settings.fsScandirSettings);for(let a of o)this._handleEntry(a,r)}catch(o){this._handleError(o)}}_handleError(e){if(!!dP.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let o=e.path;r!==void 0&&(e.path=dP.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),dP.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&dP.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(o,e.path)}_pushToStorage(e){this._storage.add(e)}};cO.default=lO});var _ie=U(AO=>{"use strict";Object.defineProperty(AO,"__esModule",{value:!0});var G$e=Uie(),uO=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new G$e.default(this._root,this._settings)}read(){return this._reader.read()}};AO.default=uO});var Hie=U(pO=>{"use strict";Object.defineProperty(pO,"__esModule",{value:!0});var W$e=Ie("path"),Y$e=pP(),fO=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,W$e.sep),this.fsScandirSettings=new Y$e.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};pO.default=fO});var yP=U(rA=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});rA.Settings=rA.walkStream=rA.walkSync=rA.walk=void 0;var qie=Oie(),K$e=Mie(),V$e=_ie(),hO=Hie();rA.Settings=hO.default;function J$e(t,e,r){if(typeof e=="function"){new qie.default(t,mP()).read(e);return}new qie.default(t,mP(e)).read(r)}rA.walk=J$e;function z$e(t,e){let r=mP(e);return new V$e.default(t,r).read()}rA.walkSync=z$e;function X$e(t,e){let r=mP(e);return new K$e.default(t,r).read()}rA.walkStream=X$e;function mP(t={}){return t instanceof hO.default?t:new hO.default(t)}});var EP=U(dO=>{"use strict";Object.defineProperty(dO,"__esModule",{value:!0});var Z$e=Ie("path"),$$e=Ed(),jie=Pf(),gO=class{constructor(e){this._settings=e,this._fsStatSettings=new $$e.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Z$e.resolve(this._settings.cwd,e)}_makeEntry(e,r){let o={name:r,path:r,dirent:jie.fs.createDirentFromStats(r,e)};return this._settings.stats&&(o.stats=e),o}_isFatalError(e){return!jie.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};dO.default=gO});var EO=U(yO=>{"use strict";Object.defineProperty(yO,"__esModule",{value:!0});var eet=Ie("stream"),tet=Ed(),ret=yP(),net=EP(),mO=class extends net.default{constructor(){super(...arguments),this._walkStream=ret.walkStream,this._stat=tet.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let o=e.map(this._getFullEntryPath,this),a=new eet.PassThrough({objectMode:!0});a._write=(n,u,A)=>this._getEntry(o[n],e[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===o.length-1&&a.end(),A()}).catch(A);for(let n=0;n<o.length;n++)a.write(n);return a}_getEntry(e,r,o){return this._getStat(e).then(a=>this._makeEntry(a,r)).catch(a=>{if(o.errorFilter(a))return null;throw a})}_getStat(e){return new Promise((r,o)=>{this._stat(e,this._fsStatSettings,(a,n)=>a===null?r(n):o(a))})}};yO.default=mO});var Gie=U(IO=>{"use strict";Object.defineProperty(IO,"__esModule",{value:!0});var iet=yP(),set=EP(),oet=EO(),CO=class extends set.default{constructor(){super(...arguments),this._walkAsync=iet.walk,this._readerStream=new oet.default(this._settings)}dynamic(e,r){return new Promise((o,a)=>{this._walkAsync(e,r,(n,u)=>{n===null?o(u):a(n)})})}async static(e,r){let o=[],a=this._readerStream.static(e,r);return new Promise((n,u)=>{a.once("error",u),a.on("data",A=>o.push(A)),a.once("end",()=>n(o))})}};IO.default=CO});var Wie=U(BO=>{"use strict";Object.defineProperty(BO,"__esModule",{value:!0});var rE=Pf(),wO=class{constructor(e,r,o){this._patterns=e,this._settings=r,this._micromatchOptions=o,this._storage=[],this._fillStorage()}_fillStorage(){let e=rE.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let o=this._getPatternSegments(r),a=this._splitSegmentsIntoSections(o);this._storage.push({complete:a.length<=1,pattern:r,segments:o,sections:a})}}_getPatternSegments(e){return rE.pattern.getPatternParts(e,this._micromatchOptions).map(o=>rE.pattern.isDynamicPattern(o,this._settings)?{dynamic:!0,pattern:o,patternRe:rE.pattern.makeRe(o,this._micromatchOptions)}:{dynamic:!1,pattern:o})}_splitSegmentsIntoSections(e){return rE.array.splitWhen(e,r=>r.dynamic&&rE.pattern.hasGlobStar(r.pattern))}};BO.default=wO});var Yie=U(DO=>{"use strict";Object.defineProperty(DO,"__esModule",{value:!0});var aet=Wie(),vO=class extends aet.default{match(e){let r=e.split("/"),o=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>o);for(let n of a){let u=n.sections[0];if(!n.complete&&o>u.length||r.every((p,h)=>{let C=n.segments[h];return!!(C.dynamic&&C.patternRe.test(p)||!C.dynamic&&C.pattern===p)}))return!0}return!1}};DO.default=vO});var Kie=U(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});var CP=Pf(),cet=Yie(),SO=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,o){let a=this._getMatcher(r),n=this._getNegativePatternsRe(o);return u=>this._filter(e,u,a,n)}_getMatcher(e){return new cet.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(CP.pattern.isAffectDepthOfReadingPattern);return CP.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,o,a){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=CP.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,o)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let o=r.split("/").length;if(e==="")return o;let a=e.split("/").length;return o-a}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!CP.pattern.matchAny(e,r)}};PO.default=SO});var Vie=U(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});var Cd=Pf(),xO=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let o=Cd.pattern.convertPatternsToRe(e,this._micromatchOptions),a=Cd.pattern.convertPatternsToRe(r,this._micromatchOptions);return n=>this._filter(n,o,a)}_filter(e,r,o){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,o))return!1;let a=this._settings.baseNameMatch?e.name:e.path,n=e.dirent.isDirectory(),u=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(e.path,o,n);return this._settings.unique&&u&&this._createIndexRecord(e),u}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let o=Cd.path.makeAbsolute(this._settings.cwd,e);return Cd.pattern.matchAny(o,r)}_isMatchToPatterns(e,r,o){let a=Cd.path.removeLeadingDotSegment(e),n=Cd.pattern.matchAny(a,r);return!n&&o?Cd.pattern.matchAny(a+"/",r):n}};bO.default=xO});var Jie=U(kO=>{"use strict";Object.defineProperty(kO,"__esModule",{value:!0});var uet=Pf(),QO=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return uet.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};kO.default=QO});var Xie=U(RO=>{"use strict";Object.defineProperty(RO,"__esModule",{value:!0});var zie=Pf(),FO=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=zie.path.makeAbsolute(this._settings.cwd,r),r=zie.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};RO.default=FO});var IP=U(NO=>{"use strict";Object.defineProperty(NO,"__esModule",{value:!0});var Aet=Ie("path"),fet=Kie(),pet=Vie(),het=Jie(),get=Xie(),TO=class{constructor(e){this._settings=e,this.errorFilter=new het.default(this._settings),this.entryFilter=new pet.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new fet.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new get.default(this._settings)}_getRootDirectory(e){return Aet.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};NO.default=TO});var Zie=U(OO=>{"use strict";Object.defineProperty(OO,"__esModule",{value:!0});var det=Gie(),met=IP(),LO=class extends met.default{constructor(){super(...arguments),this._reader=new det.default(this._settings)}async read(e){let r=this._getRootDirectory(e),o=this._getReaderOptions(e);return(await this.api(r,e,o)).map(n=>o.transform(n))}api(e,r,o){return r.dynamic?this._reader.dynamic(e,o):this._reader.static(r.patterns,o)}};OO.default=LO});var $ie=U(UO=>{"use strict";Object.defineProperty(UO,"__esModule",{value:!0});var yet=Ie("stream"),Eet=EO(),Cet=IP(),MO=class extends Cet.default{constructor(){super(...arguments),this._reader=new Eet.default(this._settings)}read(e){let r=this._getRootDirectory(e),o=this._getReaderOptions(e),a=this.api(r,e,o),n=new yet.Readable({objectMode:!0,read:()=>{}});return a.once("error",u=>n.emit("error",u)).on("data",u=>n.emit("data",o.transform(u))).once("end",()=>n.emit("end")),n.once("close",()=>a.destroy()),n}api(e,r,o){return r.dynamic?this._reader.dynamic(e,o):this._reader.static(r.patterns,o)}};UO.default=MO});var ese=U(HO=>{"use strict";Object.defineProperty(HO,"__esModule",{value:!0});var Iet=Ed(),wet=yP(),Bet=EP(),_O=class extends Bet.default{constructor(){super(...arguments),this._walkSync=wet.walkSync,this._statSync=Iet.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let o=[];for(let a of e){let n=this._getFullEntryPath(a),u=this._getEntry(n,a,r);u===null||!r.entryFilter(u)||o.push(u)}return o}_getEntry(e,r,o){try{let a=this._getStat(e);return this._makeEntry(a,r)}catch(a){if(o.errorFilter(a))return null;throw a}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};HO.default=_O});var tse=U(jO=>{"use strict";Object.defineProperty(jO,"__esModule",{value:!0});var vet=ese(),Det=IP(),qO=class extends Det.default{constructor(){super(...arguments),this._reader=new vet.default(this._settings)}read(e){let r=this._getRootDirectory(e),o=this._getReaderOptions(e);return this.api(r,e,o).map(o.transform)}api(e,r,o){return r.dynamic?this._reader.dynamic(e,o):this._reader.static(r.patterns,o)}};jO.default=qO});var rse=U(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var nE=Ie("fs"),Pet=Ie("os"),xet=Math.max(Pet.cpus().length,1);iE.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:nE.lstat,lstatSync:nE.lstatSync,stat:nE.stat,statSync:nE.statSync,readdir:nE.readdir,readdirSync:nE.readdirSync};var GO=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,xet),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},iE.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};iE.default=GO});var wP=U((fNt,sse)=>{"use strict";var nse=sie(),ise=aie(),bet=Zie(),Qet=$ie(),ket=tse(),WO=rse(),Id=Pf();async function YO(t,e){sE(t);let r=KO(t,bet.default,e),o=await Promise.all(r);return Id.array.flatten(o)}(function(t){function e(u,A){sE(u);let p=KO(u,ket.default,A);return Id.array.flatten(p)}t.sync=e;function r(u,A){sE(u);let p=KO(u,Qet.default,A);return Id.stream.merge(p)}t.stream=r;function o(u,A){sE(u);let p=ise.transform([].concat(u)),h=new WO.default(A);return nse.generate(p,h)}t.generateTasks=o;function a(u,A){sE(u);let p=new WO.default(A);return Id.pattern.isDynamicPattern(u,p)}t.isDynamicPattern=a;function n(u){return sE(u),Id.path.escape(u)}t.escapePath=n})(YO||(YO={}));function KO(t,e,r){let o=ise.transform([].concat(t)),a=new WO.default(r),n=nse.generate(o,a),u=new e(a);return n.map(u.read,u)}function sE(t){if(![].concat(t).every(o=>Id.string.isString(o)&&!Id.string.isEmpty(o)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}sse.exports=YO});var ase=U(wd=>{"use strict";var{promisify:Fet}=Ie("util"),ose=Ie("fs");async function VO(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Fet(ose[t])(r))[e]()}catch(o){if(o.code==="ENOENT")return!1;throw o}}function JO(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return ose[t](r)[e]()}catch(o){if(o.code==="ENOENT")return!1;throw o}}wd.isFile=VO.bind(null,"stat","isFile");wd.isDirectory=VO.bind(null,"stat","isDirectory");wd.isSymlink=VO.bind(null,"lstat","isSymbolicLink");wd.isFileSync=JO.bind(null,"statSync","isFile");wd.isDirectorySync=JO.bind(null,"statSync","isDirectory");wd.isSymlinkSync=JO.bind(null,"lstatSync","isSymbolicLink")});var fse=U((hNt,zO)=>{"use strict";var Bd=Ie("path"),lse=ase(),cse=t=>t.length>1?`{${t.join(",")}}`:t[0],use=(t,e)=>{let r=t[0]==="!"?t.slice(1):t;return Bd.isAbsolute(r)?r:Bd.join(e,r)},Ret=(t,e)=>Bd.extname(t)?`**/${t}`:`**/${t}.${cse(e)}`,Ase=(t,e)=>{if(e.files&&!Array.isArray(e.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof e.files}\``);if(e.extensions&&!Array.isArray(e.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof e.extensions}\``);return e.files&&e.extensions?e.files.map(r=>Bd.posix.join(t,Ret(r,e.extensions))):e.files?e.files.map(r=>Bd.posix.join(t,`**/${r}`)):e.extensions?[Bd.posix.join(t,`**/*.${cse(e.extensions)}`)]:[Bd.posix.join(t,"**")]};zO.exports=async(t,e)=>{if(e={cwd:process.cwd(),...e},typeof e.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``);let r=await Promise.all([].concat(t).map(async o=>await lse.isDirectory(use(o,e.cwd))?Ase(o,e):o));return[].concat.apply([],r)};zO.exports.sync=(t,e)=>{if(e={cwd:process.cwd(),...e},typeof e.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``);let r=[].concat(t).map(o=>lse.isDirectorySync(use(o,e.cwd))?Ase(o,e):o);return[].concat.apply([],r)}});var Ise=U((gNt,Cse)=>{function pse(t){return Array.isArray(t)?t:[t]}var mse="",hse=" ",XO="\\",Tet=/^\s+$/,Net=/^\\!/,Let=/^\\#/,Oet=/\r?\n/g,Met=/^\.*\/|^\.+$/,ZO="/",gse=typeof Symbol<"u"?Symbol.for("node-ignore"):"node-ignore",Uet=(t,e,r)=>Object.defineProperty(t,e,{value:r}),_et=/([0-z])-([0-z])/g,yse=()=>!1,Het=t=>t.replace(_et,(e,r,o)=>r.charCodeAt(0)<=o.charCodeAt(0)?e:mse),qet=t=>{let{length:e}=t;return t.slice(0,e-e%2)},jet=[[/\\?\s+$/,t=>t.indexOf("\\")===0?hse:mse],[/\\\s/g,()=>hse],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)\\\*(?=.+)/g,(t,e)=>`${e}[^\\/]*`],[/\\\\\\(?=[$.|*+(){^])/g,()=>XO],[/\\\\/g,()=>XO],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,r,o,a)=>e===XO?`\\[${r}${qet(o)}${a}`:a==="]"&&o.length%2===0?`[${Het(r)}${o}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],dse=Object.create(null),Get=(t,e)=>{let r=dse[t];return r||(r=jet.reduce((o,a)=>o.replace(a[0],a[1].bind(t)),t),dse[t]=r),e?new RegExp(r,"i"):new RegExp(r)},tM=t=>typeof t=="string",Wet=t=>t&&tM(t)&&!Tet.test(t)&&t.indexOf("#")!==0,Yet=t=>t.split(Oet),$O=class{constructor(e,r,o,a){this.origin=e,this.pattern=r,this.negative=o,this.regex=a}},Ket=(t,e)=>{let r=t,o=!1;t.indexOf("!")===0&&(o=!0,t=t.substr(1)),t=t.replace(Net,"!").replace(Let,"#");let a=Get(t,e);return new $O(r,t,o,a)},Vet=(t,e)=>{throw new e(t)},bf=(t,e,r)=>tM(t)?t?bf.isNotRelative(t)?r(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${e}\``,TypeError),Ese=t=>Met.test(t);bf.isNotRelative=Ese;bf.convert=t=>t;var eM=class{constructor({ignorecase:e=!0,ignoreCase:r=e,allowRelativePaths:o=!1}={}){Uet(this,gse,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=o,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[gse]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(Wet(e)){let r=Ket(e,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(e){return this._added=!1,pse(tM(e)?Yet(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,r){let o=!1,a=!1;return this._rules.forEach(n=>{let{negative:u}=n;if(a===u&&o!==a||u&&!o&&!a&&!r)return;n.regex.test(e)&&(o=!u,a=u)}),{ignored:o,unignored:a}}_test(e,r,o,a){let n=e&&bf.convert(e);return bf(n,e,this._allowRelativePaths?yse:Vet),this._t(n,r,o,a)}_t(e,r,o,a){if(e in r)return r[e];if(a||(a=e.split(ZO)),a.pop(),!a.length)return r[e]=this._testOne(e,o);let n=this._t(a.join(ZO)+ZO,r,o,a);return r[e]=n.ignored?n:this._testOne(e,o)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return pse(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},BP=t=>new eM(t),Jet=t=>bf(t&&bf.convert(t),t,yse);BP.isPathValid=Jet;BP.default=BP;Cse.exports=BP;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let t=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");bf.convert=t;let e=/^[a-z]:\//i;bf.isNotRelative=r=>e.test(r)||Ese(r)}});var Bse=U((dNt,wse)=>{"use strict";wse.exports=t=>{let e=/^\\\\\?\\/.test(t),r=/[^\u0000-\u0080]+/.test(t);return e||r?t:t.replace(/\\/g,"/")}});var Qse=U((mNt,rM)=>{"use strict";var{promisify:zet}=Ie("util"),vse=Ie("fs"),Qf=Ie("path"),Dse=wP(),Xet=Ise(),Gw=Bse(),Sse=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],Zet=zet(vse.readFile),$et=t=>e=>e.startsWith("!")?"!"+Qf.posix.join(t,e.slice(1)):Qf.posix.join(t,e),ett=(t,e)=>{let r=Gw(Qf.relative(e.cwd,Qf.dirname(e.fileName)));return t.split(/\r?\n/).filter(Boolean).filter(o=>!o.startsWith("#")).map($et(r))},Pse=t=>{let e=Xet();for(let r of t)e.add(ett(r.content,{cwd:r.cwd,fileName:r.filePath}));return e},ttt=(t,e)=>{if(t=Gw(t),Qf.isAbsolute(e)){if(Gw(e).startsWith(t))return e;throw new Error(`Path ${e} is not in cwd ${t}`)}return Qf.join(t,e)},xse=(t,e)=>r=>t.ignores(Gw(Qf.relative(e,ttt(e,r.path||r)))),rtt=async(t,e)=>{let r=Qf.join(e,t),o=await Zet(r,"utf8");return{cwd:e,filePath:r,content:o}},ntt=(t,e)=>{let r=Qf.join(e,t),o=vse.readFileSync(r,"utf8");return{cwd:e,filePath:r,content:o}},bse=({ignore:t=[],cwd:e=Gw(process.cwd())}={})=>({ignore:t,cwd:e});rM.exports=async t=>{t=bse(t);let e=await Dse("**/.gitignore",{ignore:Sse.concat(t.ignore),cwd:t.cwd}),r=await Promise.all(e.map(a=>rtt(a,t.cwd))),o=Pse(r);return xse(o,t.cwd)};rM.exports.sync=t=>{t=bse(t);let r=Dse.sync("**/.gitignore",{ignore:Sse.concat(t.ignore),cwd:t.cwd}).map(a=>ntt(a,t.cwd)),o=Pse(r);return xse(o,t.cwd)}});var Fse=U((yNt,kse)=>{"use strict";var{Transform:itt}=Ie("stream"),vP=class extends itt{constructor(){super({objectMode:!0})}},nM=class extends vP{constructor(e){super(),this._filter=e}_transform(e,r,o){this._filter(e)&&this.push(e),o()}},iM=class extends vP{constructor(){super(),this._pushed=new Set}_transform(e,r,o){this._pushed.has(e)||(this.push(e),this._pushed.add(e)),o()}};kse.exports={FilterStream:nM,UniqueStream:iM}});var lM=U((ENt,vd)=>{"use strict";var Tse=Ie("fs"),DP=kne(),stt=PL(),SP=wP(),PP=fse(),sM=Qse(),{FilterStream:ott,UniqueStream:att}=Fse(),Nse=()=>!1,Rse=t=>t[0]==="!",ltt=t=>{if(!t.every(e=>typeof e=="string"))throw new TypeError("Patterns must be a string or an array of strings")},ctt=(t={})=>{if(!t.cwd)return;let e;try{e=Tse.statSync(t.cwd)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},utt=t=>t.stats instanceof Tse.Stats?t.path:t,xP=(t,e)=>{t=DP([].concat(t)),ltt(t),ctt(e);let r=[];e={ignore:[],expandDirectories:!0,...e};for(let[o,a]of t.entries()){if(Rse(a))continue;let n=t.slice(o).filter(A=>Rse(A)).map(A=>A.slice(1)),u={...e,ignore:e.ignore.concat(n)};r.push({pattern:a,options:u})}return r},Att=(t,e)=>{let r={};return t.options.cwd&&(r.cwd=t.options.cwd),Array.isArray(t.options.expandDirectories)?r={...r,files:t.options.expandDirectories}:typeof t.options.expandDirectories=="object"&&(r={...r,...t.options.expandDirectories}),e(t.pattern,r)},oM=(t,e)=>t.options.expandDirectories?Att(t,e):[t.pattern],Lse=t=>t&&t.gitignore?sM.sync({cwd:t.cwd,ignore:t.ignore}):Nse,aM=t=>e=>{let{options:r}=t;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=PP.sync(r.ignore)),{pattern:e,options:r}};vd.exports=async(t,e)=>{let r=xP(t,e),o=async()=>e&&e.gitignore?sM({cwd:e.cwd,ignore:e.ignore}):Nse,a=async()=>{let p=await Promise.all(r.map(async h=>{let C=await oM(h,PP);return Promise.all(C.map(aM(h)))}));return DP(...p)},[n,u]=await Promise.all([o(),a()]),A=await Promise.all(u.map(p=>SP(p.pattern,p.options)));return DP(...A).filter(p=>!n(utt(p)))};vd.exports.sync=(t,e)=>{let r=xP(t,e),o=[];for(let u of r){let A=oM(u,PP.sync).map(aM(u));o.push(...A)}let a=Lse(e),n=[];for(let u of o)n=DP(n,SP.sync(u.pattern,u.options));return n.filter(u=>!a(u))};vd.exports.stream=(t,e)=>{let r=xP(t,e),o=[];for(let A of r){let p=oM(A,PP.sync).map(aM(A));o.push(...p)}let a=Lse(e),n=new ott(A=>!a(A)),u=new att;return stt(o.map(A=>SP.stream(A.pattern,A.options))).pipe(n).pipe(u)};vd.exports.generateGlobTasks=xP;vd.exports.hasMagic=(t,e)=>[].concat(t).some(r=>SP.isDynamicPattern(r,e));vd.exports.gitignore=sM});var bn={};Yt(bn,{checksumFile:()=>QP,checksumPattern:()=>kP,makeHash:()=>Vs});function Vs(...t){let e=(0,bP.createHash)("sha512"),r="";for(let o of t)typeof o=="string"?r+=o:o&&(r&&(e.update(r),r=""),e.update(o));return r&&e.update(r),e.digest("hex")}async function QP(t,{baseFs:e,algorithm:r}={baseFs:oe,algorithm:"sha512"}){let o=await e.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,bP.createHash)(r),A=0;for(;(A=await e.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await e.closePromise(o)}}async function kP(t,{cwd:e}){let o=(await(0,cM.default)(t,{cwd:ue.fromPortablePath(e),expandDirectories:!1,onlyDirectories:!0,unique:!0})).map(A=>`${A}/**/*`),a=await(0,cM.default)([t,...o],{cwd:ue.fromPortablePath(e),expandDirectories:!1,onlyFiles:!1,unique:!0});a.sort();let n=await Promise.all(a.map(async A=>{let p=[Buffer.from(A)],h=ue.toPortablePath(A),C=await oe.lstatPromise(h);return C.isSymbolicLink()?p.push(Buffer.from(await oe.readlinkPromise(h))):C.isFile()&&p.push(await oe.readFilePromise(h)),p.join("\0")})),u=(0,bP.createHash)("sha512");for(let A of n)u.update(A);return u.digest("hex")}var bP,cM,n0=dt(()=>{St();bP=Ie("crypto"),cM=tt(lM())});var Y={};Yt(Y,{areDescriptorsEqual:()=>Hse,areIdentsEqual:()=>Jw,areLocatorsEqual:()=>zw,areVirtualPackagesEquivalent:()=>Ctt,bindDescriptor:()=>ytt,bindLocator:()=>Ett,convertDescriptorToLocator:()=>FP,convertLocatorToDescriptor:()=>AM,convertPackageToLocator:()=>gtt,convertToIdent:()=>htt,convertToManifestRange:()=>vtt,copyPackage:()=>Yw,devirtualizeDescriptor:()=>Kw,devirtualizeLocator:()=>Vw,ensureDevirtualizedDescriptor:()=>dtt,ensureDevirtualizedLocator:()=>mtt,getIdentVendorPath:()=>dM,isPackageCompatible:()=>OP,isVirtualDescriptor:()=>kf,isVirtualLocator:()=>Yc,makeDescriptor:()=>mn,makeIdent:()=>nA,makeLocator:()=>us,makeRange:()=>TP,parseDescriptor:()=>i0,parseFileStyleRange:()=>wtt,parseIdent:()=>Ys,parseLocator:()=>Ff,parseRange:()=>Dd,prettyDependent:()=>SL,prettyDescriptor:()=>Ln,prettyIdent:()=>cs,prettyLocator:()=>kr,prettyLocatorNoColors:()=>gM,prettyRange:()=>LP,prettyReference:()=>Zw,prettyResolution:()=>jw,prettyWorkspace:()=>$w,renamePackage:()=>fM,slugifyIdent:()=>uM,slugifyLocator:()=>aE,sortDescriptors:()=>lE,stringifyDescriptor:()=>Qa,stringifyIdent:()=>nn,stringifyLocator:()=>Jl,tryParseDescriptor:()=>Xw,tryParseIdent:()=>qse,tryParseLocator:()=>RP,tryParseRange:()=>Itt,virtualizeDescriptor:()=>pM,virtualizePackage:()=>hM});function nA(t,e){if(t!=null&&t.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:Vs(t,e),scope:t,name:e}}function mn(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:Vs(t.identHash,e),range:e}}function us(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:Vs(t.identHash,e),reference:e}}function htt(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function FP(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function AM(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function gtt(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function fM(t,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:t.version,languageName:t.languageName,linkType:t.linkType,conditions:t.conditions,dependencies:new Map(t.dependencies),peerDependencies:new Map(t.peerDependencies),dependenciesMeta:new Map(t.dependenciesMeta),peerDependenciesMeta:new Map(t.peerDependenciesMeta),bin:new Map(t.bin)}}function Yw(t){return fM(t,t)}function pM(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return mn(t,`virtual:${e}#${t.range}`)}function hM(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return fM(t,us(t,`virtual:${e}#${t.reference}`))}function kf(t){return t.range.startsWith(Ww)}function Yc(t){return t.reference.startsWith(Ww)}function Kw(t){if(!kf(t))throw new Error("Not a virtual descriptor");return mn(t,t.range.replace(/^[^#]*#/,""))}function Vw(t){if(!Yc(t))throw new Error("Not a virtual descriptor");return us(t,t.reference.replace(/^[^#]*#/,""))}function dtt(t){return kf(t)?mn(t,t.range.replace(/^[^#]*#/,"")):t}function mtt(t){return Yc(t)?us(t,t.reference.replace(/^[^#]*#/,"")):t}function ytt(t,e){return t.range.includes("::")?t:mn(t,`${t.range}::${oE.default.stringify(e)}`)}function Ett(t,e){return t.reference.includes("::")?t:us(t,`${t.reference}::${oE.default.stringify(e)}`)}function Jw(t,e){return t.identHash===e.identHash}function Hse(t,e){return t.descriptorHash===e.descriptorHash}function zw(t,e){return t.locatorHash===e.locatorHash}function Ctt(t,e){if(!Yc(t))throw new Error("Invalid package type");if(!Yc(e))throw new Error("Invalid package type");if(!Jw(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let o=e.dependencies.get(r.identHash);if(!o||!Hse(r,o))return!1}return!0}function Ys(t){let e=qse(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function qse(t){let e=t.match(/^(?:@([^/]+?)\/)?([^@/]+)$/);if(!e)return null;let[,r,o]=e;return nA(typeof r<"u"?r:null,o)}function i0(t,e=!1){let r=Xw(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function Xw(t,e=!1){let r=e?t.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/):t.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/);if(!r)return null;let[,o,a,n]=r;if(n==="unknown")throw new Error(`Invalid range (${t})`);let u=typeof o<"u"?o:null,A=typeof n<"u"?n:"unknown";return mn(nA(u,a),A)}function Ff(t,e=!1){let r=RP(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function RP(t,e=!1){let r=e?t.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/):t.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/);if(!r)return null;let[,o,a,n]=r;if(n==="unknown")throw new Error(`Invalid reference (${t})`);let u=typeof o<"u"?o:null,A=typeof n<"u"?n:"unknown";return us(nA(u,a),A)}function Dd(t,e){let r=t.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(r===null)throw new Error(`Invalid range (${t})`);let o=typeof r[1]<"u"?r[1]:null;if(typeof(e==null?void 0:e.requireProtocol)=="string"&&o!==e.requireProtocol)throw new Error(`Invalid protocol (${o})`);if((e==null?void 0:e.requireProtocol)&&o===null)throw new Error(`Missing protocol (${o})`);let a=typeof r[3]<"u"?decodeURIComponent(r[2]):null;if((e==null?void 0:e.requireSource)&&a===null)throw new Error(`Missing source (${t})`);let n=typeof r[3]<"u"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),u=e!=null&&e.parseSelector?oE.default.parse(n):n,A=typeof r[4]<"u"?oE.default.parse(r[4]):null;return{protocol:o,source:a,selector:u,params:A}}function Itt(t,e){try{return Dd(t,e)}catch{return null}}function wtt(t,{protocol:e}){let{selector:r,params:o}=Dd(t,{requireProtocol:e,requireBindings:!0});if(typeof o.locator!="string")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:Ff(o.locator,!0),path:r}}function Ose(t){return t=t.replace(/%/g,"%25"),t=t.replace(/:/g,"%3A"),t=t.replace(/#/g,"%23"),t}function Btt(t){return t===null?!1:Object.entries(t).length>0}function TP({protocol:t,source:e,selector:r,params:o}){let a="";return t!==null&&(a+=`${t}`),e!==null&&(a+=`${Ose(e)}#`),a+=Ose(r),Btt(o)&&(a+=`::${oE.default.stringify(o)}`),a}function vtt(t){let{params:e,protocol:r,source:o,selector:a}=Dd(t);for(let n in e)n.startsWith("__")&&delete e[n];return TP({protocol:r,source:o,params:e,selector:a})}function nn(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function Qa(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function Jl(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function uM(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function aE(t){let{protocol:e,selector:r}=Dd(t.reference),o=e!==null?e.replace(/:$/,""):"exotic",a=Mse.default.valid(r),n=a!==null?`${o}-${a}`:`${o}`,u=10,A=t.scope?`${uM(t)}-${n}-${t.locatorHash.slice(0,u)}`:`${uM(t)}-${n}-${t.locatorHash.slice(0,u)}`;return Li(A)}function cs(t,e){return e.scope?`${Kt(t,`@${e.scope}/`,Bt.SCOPE)}${Kt(t,e.name,Bt.NAME)}`:`${Kt(t,e.name,Bt.NAME)}`}function NP(t){if(t.startsWith(Ww)){let e=NP(t.substring(t.indexOf("#")+1)),r=t.substring(Ww.length,Ww.length+ftt);return`${e} [${r}]`}else return t.replace(/\?.*/,"?[...]")}function LP(t,e){return`${Kt(t,NP(e),Bt.RANGE)}`}function Ln(t,e){return`${cs(t,e)}${Kt(t,"@",Bt.RANGE)}${LP(t,e.range)}`}function Zw(t,e){return`${Kt(t,NP(e),Bt.REFERENCE)}`}function kr(t,e){return`${cs(t,e)}${Kt(t,"@",Bt.REFERENCE)}${Zw(t,e.reference)}`}function gM(t){return`${nn(t)}@${NP(t.reference)}`}function lE(t){return xa(t,[e=>nn(e),e=>e.range])}function $w(t,e){return cs(t,e.locator)}function jw(t,e,r){let o=kf(e)?Kw(e):e;return r===null?`${Ln(t,o)} \u2192 ${DL(t).Cross}`:o.identHash===r.identHash?`${Ln(t,o)} \u2192 ${Zw(t,r.reference)}`:`${Ln(t,o)} \u2192 ${kr(t,r)}`}function SL(t,e,r){return r===null?`${kr(t,e)}`:`${kr(t,e)} (via ${LP(t,r.range)})`}function dM(t){return`node_modules/${nn(t)}`}function OP(t,e){return t.conditions?ptt(t.conditions,r=>{let[,o,a]=r.match(_se),n=e[o];return n?n.includes(a):!0}):!0}var oE,Mse,Use,Ww,ftt,_se,ptt,Ks=dt(()=>{St();oE=tt(Ie("querystring")),Mse=tt(si()),Use=tt(oX());zl();n0();Vl();Ks();Ww="virtual:",ftt=5,_se=/(os|cpu|libc)=([a-z0-9_-]+)/,ptt=(0,Use.makeParser)(_se)});var jse,Gse=dt(()=>{Ks();jse={hooks:{reduceDependency:(t,e,r,o,{resolver:a,resolveOptions:n})=>{for(let{pattern:u,reference:A}of e.topLevelWorkspace.manifest.resolutions){if(u.from&&(u.from.fullName!==nn(r)||e.configuration.normalizeLocator(us(Ys(u.from.fullName),u.from.description??r.reference)).locatorHash!==r.locatorHash)||u.descriptor.fullName!==nn(t)||e.configuration.normalizeDependency(mn(Ff(u.descriptor.fullName),u.descriptor.description??t.range)).descriptorHash!==t.descriptorHash)continue;return a.bindDescriptor(e.configuration.normalizeDependency(mn(t,A)),e.topLevelWorkspace.anchoredLocator,n)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let o=$w(t.configuration,r);await t.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>e.reportWarning(a,`${o}: ${n}`),reportError:(a,n)=>e.reportError(a,`${o}: ${n}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(let o of r.errors)e.reportWarning(57,o.message)}}}});var e1,Gn,Sd=dt(()=>{e1=class{supportsDescriptor(e,r){return!!(e.range.startsWith(e1.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(e1.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){return[o.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.getWorkspaceByCwd(e.reference.slice(e1.protocol.length));return{...e,version:o.manifest.version||"0.0.0",languageName:"unknown",linkType:"SOFT",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...o.manifest.dependencies,...o.manifest.devDependencies])),peerDependencies:new Map([...o.manifest.peerDependencies]),dependenciesMeta:o.manifest.dependenciesMeta,peerDependenciesMeta:o.manifest.peerDependenciesMeta,bin:o.manifest.bin}}},Gn=e1;Gn.protocol="workspace:"});var Tr={};Yt(Tr,{SemVer:()=>Kse.SemVer,clean:()=>Stt,satisfiesWithPrereleases:()=>Pd,validRange:()=>cl});function Pd(t,e,r=!1){if(!t)return!1;let o=`${e}${r}`,a=Wse.get(o);if(typeof a>"u")try{a=new MP.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{Wse.set(o,a||null)}else if(a===null)return!1;let n;try{n=new MP.default.SemVer(t,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(u=>{for(let A of u)A.semver.prerelease&&(A.semver.prerelease=[]);return u.every(A=>A.test(n))}))}function cl(t){if(t.indexOf(":")!==-1)return null;let e=Yse.get(t);if(typeof e<"u")return e;try{e=new MP.default.Range(t)}catch{e=null}return Yse.set(t,e),e}function Stt(t){let e=Dtt.exec(t);return e?e[1]:null}var MP,Kse,Wse,Yse,Dtt,s0=dt(()=>{MP=tt(si()),Kse=tt(si()),Wse=new Map;Yse=new Map;Dtt=/^(?:[\sv=]*?)((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\s*)$/});function Vse(t){let e=t.match(/^[ \t]+/m);return e?e[0]:" "}function Jse(t){return t.charCodeAt(0)===65279?t.slice(1):t}function Xo(t){return t.replace(/\\/g,"/")}function UP(t,{yamlCompatibilityMode:e}){return e?mL(t):typeof t>"u"||typeof t=="boolean"?t:null}function zse(t,e){let r=e.search(/[^!]/);if(r===-1)return"invalid";let o=r%2===0?"":"!",a=e.slice(r);return`${o}${t}=${a}`}function mM(t,e){return e.length===1?zse(t,e[0]):`(${e.map(r=>zse(t,r)).join(" | ")})`}var Xse,cE,Nt,uE=dt(()=>{St();Hl();Xse=tt(si());Sd();Vl();s0();Ks();cE=class{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static async tryFind(e,{baseFs:r=new xn}={}){let o=J.join(e,"package.json");try{return await cE.fromFile(o,{baseFs:r})}catch(a){if(a.code==="ENOENT")return null;throw a}}static async find(e,{baseFs:r}={}){let o=await cE.tryFind(e,{baseFs:r});if(o===null)throw new Error("Manifest not found");return o}static async fromFile(e,{baseFs:r=new xn}={}){let o=new cE;return await o.loadFile(e,{baseFs:r}),o}static fromText(e){let r=new cE;return r.loadFromText(e),r}loadFromText(e){let r;try{r=JSON.parse(Jse(e)||"{}")}catch(o){throw o.message+=` (when parsing ${e})`,o}this.load(r),this.indent=Vse(e)}async loadFile(e,{baseFs:r=new xn}){let o=await r.readFilePromise(e,"utf8"),a;try{a=JSON.parse(Jse(o)||"{}")}catch(n){throw n.message+=` (when parsing ${e})`,n}this.load(a),this.indent=Vse(o)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!="object"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let o=[];if(this.name=null,typeof e.name=="string")try{this.name=Ys(e.name)}catch{o.push(new Error("Parsing failed for the 'name' field"))}if(typeof e.version=="string"?this.version=e.version:this.version=null,Array.isArray(e.os)){let n=[];this.os=n;for(let u of e.os)typeof u!="string"?o.push(new Error("Parsing failed for the 'os' field")):n.push(u)}else this.os=null;if(Array.isArray(e.cpu)){let n=[];this.cpu=n;for(let u of e.cpu)typeof u!="string"?o.push(new Error("Parsing failed for the 'cpu' field")):n.push(u)}else this.cpu=null;if(Array.isArray(e.libc)){let n=[];this.libc=n;for(let u of e.libc)typeof u!="string"?o.push(new Error("Parsing failed for the 'libc' field")):n.push(u)}else this.libc=null;if(typeof e.type=="string"?this.type=e.type:this.type=null,typeof e.packageManager=="string"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private=="boolean"?this.private=e.private:this.private=!1,typeof e.license=="string"?this.license=e.license:this.license=null,typeof e.languageName=="string"?this.languageName=e.languageName:this.languageName=null,typeof e.main=="string"?this.main=Xo(e.main):this.main=null,typeof e.module=="string"?this.module=Xo(e.module):this.module=null,e.browser!=null)if(typeof e.browser=="string")this.browser=Xo(e.browser);else{this.browser=new Map;for(let[n,u]of Object.entries(e.browser))this.browser.set(Xo(n),typeof u=="string"?Xo(u):u)}else this.browser=null;if(this.bin=new Map,typeof e.bin=="string")this.name!==null?this.bin.set(this.name.name,Xo(e.bin)):o.push(new Error("String bin field, but no attached package name"));else if(typeof e.bin=="object"&&e.bin!==null)for(let[n,u]of Object.entries(e.bin)){if(typeof u!="string"){o.push(new Error(`Invalid bin definition for '${n}'`));continue}let A=Ys(n);this.bin.set(A.name,Xo(u))}if(this.scripts=new Map,typeof e.scripts=="object"&&e.scripts!==null)for(let[n,u]of Object.entries(e.scripts)){if(typeof u!="string"){o.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,u)}if(this.dependencies=new Map,typeof e.dependencies=="object"&&e.dependencies!==null)for(let[n,u]of Object.entries(e.dependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Ys(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=mn(A,u);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof e.devDependencies=="object"&&e.devDependencies!==null)for(let[n,u]of Object.entries(e.devDependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Ys(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=mn(A,u);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof e.peerDependencies=="object"&&e.peerDependencies!==null)for(let[n,u]of Object.entries(e.peerDependencies)){let A;try{A=Ys(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof u!="string"||!u.startsWith(Gn.protocol)&&!cl(u))&&(o.push(new Error(`Invalid dependency range for '${n}'`)),u="*");let p=mn(A,u);this.peerDependencies.set(p.identHash,p)}typeof e.workspaces=="object"&&e.workspaces!==null&&e.workspaces.nohoist&&o.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));let a=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces=="object"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!="string"){o.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta=="object"&&e.dependenciesMeta!==null)for(let[n,u]of Object.entries(e.dependenciesMeta)){if(typeof u!="object"||u===null){o.push(new Error(`Invalid meta field for '${n}`));continue}let A=i0(n),p=this.ensureDependencyMeta(A),h=UP(u.built,{yamlCompatibilityMode:r});if(h===null){o.push(new Error(`Invalid built meta field for '${n}'`));continue}let C=UP(u.optional,{yamlCompatibilityMode:r});if(C===null){o.push(new Error(`Invalid optional meta field for '${n}'`));continue}let w=UP(u.unplugged,{yamlCompatibilityMode:r});if(w===null){o.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:C,unplugged:w})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta=="object"&&e.peerDependenciesMeta!==null)for(let[n,u]of Object.entries(e.peerDependenciesMeta)){if(typeof u!="object"||u===null){o.push(new Error(`Invalid meta field for '${n}'`));continue}let A=i0(n),p=this.ensurePeerDependencyMeta(A),h=UP(u.optional,{yamlCompatibilityMode:r});if(h===null){o.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof e.resolutions=="object"&&e.resolutions!==null)for(let[n,u]of Object.entries(e.resolutions)){if(typeof u!="string"){o.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:QD(n),reference:u})}catch(A){o.push(A);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let n of e.files){if(typeof n!="string"){o.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof e.publishConfig=="object"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access=="string"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main=="string"&&(this.publishConfig.main=Xo(e.publishConfig.main)),typeof e.publishConfig.module=="string"&&(this.publishConfig.module=Xo(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser=="string")this.publishConfig.browser=Xo(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,u]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(Xo(n),typeof u=="string"?Xo(u):u)}if(typeof e.publishConfig.registry=="string"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.bin=="string")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,Xo(e.publishConfig.bin)]]):o.push(new Error("String bin field, but no attached package name"));else if(typeof e.publishConfig.bin=="object"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,u]of Object.entries(e.publishConfig.bin)){if(typeof u!="string"){o.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,Xo(u))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of e.publishConfig.executableFiles){if(typeof n!="string"){o.push(new Error("Invalid executable file definition"));continue}this.publishConfig.executableFiles.add(Xo(n))}}}else this.publishConfig=null;if(typeof e.installConfig=="object"&&e.installConfig!==null){this.installConfig={};for(let n of Object.keys(e.installConfig))n==="hoistingLimits"?typeof e.installConfig.hoistingLimits=="string"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:o.push(new Error("Invalid hoisting limits definition")):n=="selfReferences"?typeof e.installConfig.selfReferences=="boolean"?this.installConfig.selfReferences=e.installConfig.selfReferences:o.push(new Error("Invalid selfReferences definition, must be a boolean value")):o.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof e.optionalDependencies=="object"&&e.optionalDependencies!==null)for(let[n,u]of Object.entries(e.optionalDependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Ys(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=mn(A,u);this.dependencies.set(p.identHash,p);let h=mn(A,"unknown"),C=this.ensureDependencyMeta(h);Object.assign(C,{optional:!0})}typeof e.preferUnplugged=="boolean"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=o}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(mM("os",this.os)),this.cpu&&this.cpu.length>0&&e.push(mM("cpu",this.cpu)),this.libc&&this.libc.length>0&&e.push(mM("libc",this.libc)),e.length>0?e.join(" & "):null}ensureDependencyMeta(e){if(e.range!=="unknown"&&!Xse.default.valid(e.range))throw new Error(`Invalid meta field range for '${Qa(e)}'`);let r=nn(e),o=e.range!=="unknown"?e.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(o);return n||a.set(o,n={}),n}ensurePeerDependencyMeta(e){if(e.range!=="unknown")throw new Error(`Invalid meta field range for '${Qa(e)}'`);let r=nn(e),o=this.peerDependenciesMeta.get(r);return o||this.peerDependenciesMeta.set(r,o={}),o}setRawField(e,r,{after:o=[]}={}){let a=new Set(o.filter(n=>Object.prototype.hasOwnProperty.call(this.raw,n)));if(a.size===0||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=r;else{let n=this.raw,u=this.raw={},A=!1;for(let p of Object.keys(n))u[p]=n[p],A||(a.delete(p),a.size===0&&(u[e]=r,A=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){if(Object.assign(e,this.raw),this.name!==null?e.name=nn(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let n=this.browser;typeof n=="string"?e.browser=n:n instanceof Map&&(e.browser=Object.assign({},...Array.from(n.keys()).sort().map(u=>({[u]:n.get(u)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:e.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let o=[],a=[];for(let n of this.dependencies.values()){let u=this.dependenciesMeta.get(nn(n)),A=!1;if(r&&u){let p=u.get(null);p&&p.optional&&(A=!0)}A?a.push(n):o.push(n)}o.length>0?e.dependencies=Object.assign({},...lE(o).map(n=>({[nn(n)]:n.range}))):delete e.dependencies,a.length>0?e.optionalDependencies=Object.assign({},...lE(a).map(n=>({[nn(n)]:n.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...lE(this.devDependencies.values()).map(n=>({[nn(n)]:n.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...lE(this.peerDependencies.values()).map(n=>({[nn(n)]:n.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[n,u]of xa(this.dependenciesMeta.entries(),([A,p])=>A))for(let[A,p]of xa(u.entries(),([h,C])=>h!==null?`0${h}`:"1")){let h=A!==null?Qa(mn(Ys(n),A)):n,C={...p};r&&A===null&&delete C.optional,Object.keys(C).length!==0&&(e.dependenciesMeta[h]=C)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...xa(this.peerDependenciesMeta.entries(),([n,u])=>n).map(([n,u])=>({[n]:u}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:u})=>({[kD(n)]:u}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){e.scripts??(e.scripts={});for(let n of Object.keys(e.scripts))this.scripts.has(n)||delete e.scripts[n];for(let[n,u]of this.scripts.entries())e.scripts[n]=u}else delete e.scripts;return e}},Nt=cE;Nt.fileName="package.json",Nt.allDependencies=["dependencies","devDependencies","peerDependencies"],Nt.hardDependencies=["dependencies","devDependencies"]});var $se=U((LNt,Zse)=>{var Ptt=Yl(),xtt=function(){return Ptt.Date.now()};Zse.exports=xtt});var toe=U((ONt,eoe)=>{var btt=/\s/;function Qtt(t){for(var e=t.length;e--&&btt.test(t.charAt(e)););return e}eoe.exports=Qtt});var noe=U((MNt,roe)=>{var ktt=toe(),Ftt=/^\s+/;function Rtt(t){return t&&t.slice(0,ktt(t)+1).replace(Ftt,"")}roe.exports=Rtt});var AE=U((UNt,ioe)=>{var Ttt=hd(),Ntt=Xu(),Ltt="[object Symbol]";function Ott(t){return typeof t=="symbol"||Ntt(t)&&Ttt(t)==Ltt}ioe.exports=Ott});var loe=U((_Nt,aoe)=>{var Mtt=noe(),soe=al(),Utt=AE(),ooe=0/0,_tt=/^[-+]0x[0-9a-f]+$/i,Htt=/^0b[01]+$/i,qtt=/^0o[0-7]+$/i,jtt=parseInt;function Gtt(t){if(typeof t=="number")return t;if(Utt(t))return ooe;if(soe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=soe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Mtt(t);var r=Htt.test(t);return r||qtt.test(t)?jtt(t.slice(2),r?2:8):_tt.test(t)?ooe:+t}aoe.exports=Gtt});var Aoe=U((HNt,uoe)=>{var Wtt=al(),yM=$se(),coe=loe(),Ytt="Expected a function",Ktt=Math.max,Vtt=Math.min;function Jtt(t,e,r){var o,a,n,u,A,p,h=0,C=!1,w=!1,v=!0;if(typeof t!="function")throw new TypeError(Ytt);e=coe(e)||0,Wtt(r)&&(C=!!r.leading,w="maxWait"in r,n=w?Ktt(coe(r.maxWait)||0,e):n,v="trailing"in r?!!r.trailing:v);function b(pe){var De=o,ge=a;return o=a=void 0,h=pe,u=t.apply(ge,De),u}function E(pe){return h=pe,A=setTimeout(_,e),C?b(pe):u}function R(pe){var De=pe-p,ge=pe-h,le=e-De;return w?Vtt(le,n-ge):le}function L(pe){var De=pe-p,ge=pe-h;return p===void 0||De>=e||De<0||w&&ge>=n}function _(){var pe=yM();if(L(pe))return V(pe);A=setTimeout(_,R(pe))}function V(pe){return A=void 0,v&&o?b(pe):(o=a=void 0,u)}function re(){A!==void 0&&clearTimeout(A),h=0,o=p=a=A=void 0}function ae(){return A===void 0?u:V(yM())}function he(){var pe=yM(),De=L(pe);if(o=arguments,a=this,p=pe,De){if(A===void 0)return E(p);if(w)return clearTimeout(A),A=setTimeout(_,e),b(p)}return A===void 0&&(A=setTimeout(_,e)),u}return he.cancel=re,he.flush=ae,he}uoe.exports=Jtt});var EM=U((qNt,foe)=>{var ztt=Aoe(),Xtt=al(),Ztt="Expected a function";function $tt(t,e,r){var o=!0,a=!0;if(typeof t!="function")throw new TypeError(Ztt);return Xtt(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),ztt(t,e,{leading:o,maxWait:e,trailing:a})}foe.exports=$tt});function trt(t){return typeof t.reportCode<"u"}var poe,hoe,goe,ert,Vt,Js,Zl=dt(()=>{poe=tt(EM()),hoe=Ie("stream"),goe=Ie("string_decoder"),ert=15,Vt=class extends Error{constructor(r,o,a){super(o);this.reportExtra=a;this.reportCode=r}};Js=class{constructor(){this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}static progressViaCounter(e){let r=0,o,a=new Promise(p=>{o=p}),n=p=>{let h=o;a=new Promise(C=>{o=C}),r=p,h()},u=(p=0)=>{n(r+1)},A=async function*(){for(;r<e;)await a,yield{progress:r/e}}();return{[Symbol.asyncIterator](){return A},hasProgress:!0,hasTitle:!1,set:n,tick:u}}static progressViaTitle(){let e,r,o=new Promise(u=>{r=u}),a=(0,poe.default)(u=>{let A=r;o=new Promise(p=>{r=p}),e=u,A()},1e3/ert),n=async function*(){for(;;)await o,yield{title:e}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(e,r){let o=this.reportProgress(e);try{return await r(e)}finally{o.stop()}}startProgressSync(e,r){let o=this.reportProgress(e);try{return r(e)}finally{o.stop()}}reportInfoOnce(e,r,o){var n;let a=o&&o.key?o.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(e,r),(n=o==null?void 0:o.reportExtra)==null||n.call(o,this))}reportWarningOnce(e,r,o){var n;let a=o&&o.key?o.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(e,r),(n=o==null?void 0:o.reportExtra)==null||n.call(o,this))}reportErrorOnce(e,r,o){var n;let a=o&&o.key?o.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(e,r),(n=o==null?void 0:o.reportExtra)==null||n.call(o,this))}reportExceptionOnce(e){trt(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(1,e.stack||e.message,{key:e})}createStreamReporter(e=null){let r=new hoe.PassThrough,o=new goe.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
135`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var fE,CM=dt(()=>{Zl();Ks();fE=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));return o||null}getFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));if(!o)throw new Vt(11,`${kr(r.project.configuration,e)} isn't supported by any available fetcher`);return o}}});var xd,IM=dt(()=>{Ks();xd=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,o){return this.getResolverByDescriptor(e,o).bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,o){return await this.getResolverByDescriptor(e,o).getCandidates(e,r,o)}async getSatisfying(e,r,o,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,o,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));return o||null}getResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!o)throw new Error(`${Ln(r.project.configuration,e)} isn't supported by any available resolver`);return o}tryResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));return o||null}getResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));if(!o)throw new Error(`${kr(r.project.configuration,e)} isn't supported by any available resolver`);return o}}});var pE,wM=dt(()=>{St();Ks();pE=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=us(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=us(e,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,u,r)}getLocatorFilename(e){return aE(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(e),A=pi.makeVirtualPath(n,u,a),p=new ju(A,{baseFs:r.packageFs,pathUtils:J});return{...r,packageFs:p}}}});var hE,t1,doe=dt(()=>{hE=class{static isVirtualDescriptor(e){return!!e.range.startsWith(hE.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(hE.protocol)}supportsDescriptor(e,r){return hE.isVirtualDescriptor(e)}supportsLocator(e,r){return hE.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,o,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}},t1=hE;t1.protocol="virtual:"});var gE,BM=dt(()=>{St();Sd();gE=class{supports(e){return!!e.reference.startsWith(Gn.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let o=this.getWorkspace(e,r).cwd;return{packageFs:new An(o),prefixPath:wt.dot,localPath:o}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Gn.protocol.length))}}});function r1(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function moe(t){return typeof t>"u"?3:r1(t)?0:Array.isArray(t)?1:2}function SM(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function nrt(t){return r1(t)&&SM(t,"onConflict")&&typeof t.onConflict=="string"}function irt(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!nrt(t))return{onConflict:"default",value:t};if(SM(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function yoe(t,e){let r=r1(t)&&SM(t,e)?t[e]:void 0;return irt(r)}function dE(t,e){return[t,e,Eoe]}function PM(t){return Array.isArray(t)?t[2]===Eoe:!1}function vM(t,e){if(r1(t)){let r={};for(let o of Object.keys(t))r[o]=vM(t[o],e);return dE(e,r)}return Array.isArray(t)?dE(e,t.map(r=>vM(r,e))):dE(e,t)}function DM(t,e,r,o,a){let n,u=[],A=a,p=0;for(let C=a-1;C>=o;--C){let[w,v]=t[C],{onConflict:b,value:E}=yoe(v,r),R=moe(E);if(R!==3){if(n??(n=R),R!==n||b==="hardReset"){p=A;break}if(R===2)return dE(w,E);if(u.unshift([w,E]),b==="reset"){p=C;break}b==="extend"&&C===o&&(o=0),A=C}}if(typeof n>"u")return null;let h=u.map(([C])=>C).join(", ");switch(n){case 1:return dE(h,new Array().concat(...u.map(([C,w])=>w.map(v=>vM(v,C)))));case 0:{let C=Object.assign({},...u.map(([,R])=>R)),w=Object.keys(C),v={},b=t.map(([R,L])=>[R,yoe(L,r).value]),E=rrt(b,([R,L])=>{let _=moe(L);return _!==0&&_!==3});if(E!==-1){let R=b.slice(E+1);for(let L of w)v[L]=DM(R,e,L,0,R.length)}else for(let R of w)v[R]=DM(b,e,R,p,b.length);return dE(h,v)}default:throw new Error("Assertion failed: Non-extendable value type")}}function Coe(t){return DM(t.map(([e,r])=>[e,{["."]:r}]),[],".",0,t.length)}function n1(t){return PM(t)?t[1]:t}function _P(t){let e=PM(t)?t[1]:t;if(Array.isArray(e))return e.map(r=>_P(r));if(r1(e)){let r={};for(let[o,a]of Object.entries(e))r[o]=_P(a);return r}return e}function xM(t){return PM(t)?t[0]:null}var rrt,Eoe,Ioe=dt(()=>{rrt=(t,e,r)=>{let o=[...t];return o.reverse(),o.findIndex(e,r)};Eoe=Symbol()});var HP={};Yt(HP,{getDefaultGlobalFolder:()=>QM,getHomeFolder:()=>mE,isFolderInside:()=>kM});function QM(){if(process.platform==="win32"){let t=ue.toPortablePath(process.env.LOCALAPPDATA||ue.join((0,bM.homedir)(),"AppData","Local"));return J.resolve(t,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let t=ue.toPortablePath(process.env.XDG_DATA_HOME);return J.resolve(t,"yarn/berry")}return J.resolve(mE(),".yarn/berry")}function mE(){return ue.toPortablePath((0,bM.homedir)()||"/usr/local/share")}function kM(t,e){let r=J.relative(e,t);return r&&!r.startsWith("..")&&!J.isAbsolute(r)}var bM,qP=dt(()=>{St();bM=Ie("os")});var Doe=U(yE=>{"use strict";var tLt=Ie("net"),ort=Ie("tls"),FM=Ie("http"),woe=Ie("https"),art=Ie("events"),rLt=Ie("assert"),lrt=Ie("util");yE.httpOverHttp=crt;yE.httpsOverHttp=urt;yE.httpOverHttps=Art;yE.httpsOverHttps=frt;function crt(t){var e=new Rf(t);return e.request=FM.request,e}function urt(t){var e=new Rf(t);return e.request=FM.request,e.createSocket=Boe,e.defaultPort=443,e}function Art(t){var e=new Rf(t);return e.request=woe.request,e}function frt(t){var e=new Rf(t);return e.request=woe.request,e.createSocket=Boe,e.defaultPort=443,e}function Rf(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||FM.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(o,a,n,u){for(var A=voe(a,n,u),p=0,h=e.requests.length;p<h;++p){var C=e.requests[p];if(C.host===A.host&&C.port===A.port){e.requests.splice(p,1),C.request.onSocket(o);return}}o.destroy(),e.removeSocket(o)})}lrt.inherits(Rf,art.EventEmitter);Rf.prototype.addRequest=function(e,r,o,a){var n=this,u=RM({request:e},n.options,voe(r,o,a));if(n.sockets.length>=this.maxSockets){n.requests.push(u);return}n.createSocket(u,function(A){A.on("free",p),A.on("close",h),A.on("agentRemove",h),e.onSocket(A);function p(){n.emit("free",A,u)}function h(C){n.removeSocket(A),A.removeListener("free",p),A.removeListener("close",h),A.removeListener("agentRemove",h)}})};Rf.prototype.createSocket=function(e,r){var o=this,a={};o.sockets.push(a);var n=RM({},o.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(n.localAddress=e.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")),o0("making CONNECT request");var u=o.request(n);u.useChunkedEncodingByDefault=!1,u.once("response",A),u.once("upgrade",p),u.once("connect",h),u.once("error",C),u.end();function A(w){w.upgrade=!0}function p(w,v,b){process.nextTick(function(){h(w,v,b)})}function h(w,v,b){if(u.removeAllListeners(),v.removeAllListeners(),w.statusCode!==200){o0("tunneling socket could not be established, statusCode=%d",w.statusCode),v.destroy();var E=new Error("tunneling socket could not be established, statusCode="+w.statusCode);E.code="ECONNRESET",e.request.emit("error",E),o.removeSocket(a);return}if(b.length>0){o0("got illegal response body from proxy"),v.destroy();var E=new Error("got illegal response body from proxy");E.code="ECONNRESET",e.request.emit("error",E),o.removeSocket(a);return}return o0("tunneling connection has established"),o.sockets[o.sockets.indexOf(a)]=v,r(v)}function C(w){u.removeAllListeners(),o0(`tunneling socket could not be established, cause=%s
136`,w.message,w.stack);var v=new Error("tunneling socket could not be established, cause="+w.message);v.code="ECONNRESET",e.request.emit("error",v),o.removeSocket(a)}};Rf.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function Boe(t,e){var r=this;Rf.prototype.createSocket.call(r,t,function(o){var a=t.request.getHeader("host"),n=RM({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):t.host}),u=ort.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,e(u)})}function voe(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function RM(t){for(var e=1,r=arguments.length;e<r;++e){var o=arguments[e];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(t[A]=o[A])}}return t}var o0;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?o0=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:o0=function(){};yE.debug=o0});var Poe=U((iLt,Soe)=>{Soe.exports=Doe()});var Nf=U((Tf,jP)=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var xoe=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function prt(t){return xoe.includes(t)}var hrt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...xoe];function grt(t){return hrt.includes(t)}var drt=["null","undefined","string","number","bigint","boolean","symbol"];function mrt(t){return drt.includes(t)}function EE(t){return e=>typeof e===t}var{toString:boe}=Object.prototype,i1=t=>{let e=boe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Fe.domElement(t))return"HTMLElement";if(grt(e))return e},Jn=t=>e=>i1(e)===t;function Fe(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(Fe.observable(t))return"Observable";if(Fe.array(t))return"Array";if(Fe.buffer(t))return"Buffer";let e=i1(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Fe.undefined=EE("undefined");Fe.string=EE("string");var yrt=EE("number");Fe.number=t=>yrt(t)&&!Fe.nan(t);Fe.bigint=EE("bigint");Fe.function_=EE("function");Fe.null_=t=>t===null;Fe.class_=t=>Fe.function_(t)&&t.toString().startsWith("class ");Fe.boolean=t=>t===!0||t===!1;Fe.symbol=EE("symbol");Fe.numericString=t=>Fe.string(t)&&!Fe.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Fe.array=(t,e)=>Array.isArray(t)?Fe.function_(e)?t.every(e):!0:!1;Fe.buffer=t=>{var e,r,o,a;return(a=(o=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,t))!==null&&a!==void 0?a:!1};Fe.nullOrUndefined=t=>Fe.null_(t)||Fe.undefined(t);Fe.object=t=>!Fe.null_(t)&&(typeof t=="object"||Fe.function_(t));Fe.iterable=t=>{var e;return Fe.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Fe.asyncIterable=t=>{var e;return Fe.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Fe.generator=t=>Fe.iterable(t)&&Fe.function_(t.next)&&Fe.function_(t.throw);Fe.asyncGenerator=t=>Fe.asyncIterable(t)&&Fe.function_(t.next)&&Fe.function_(t.throw);Fe.nativePromise=t=>Jn("Promise")(t);var Ert=t=>{var e,r;return Fe.function_((e=t)===null||e===void 0?void 0:e.then)&&Fe.function_((r=t)===null||r===void 0?void 0:r.catch)};Fe.promise=t=>Fe.nativePromise(t)||Ert(t);Fe.generatorFunction=Jn("GeneratorFunction");Fe.asyncGeneratorFunction=t=>i1(t)==="AsyncGeneratorFunction";Fe.asyncFunction=t=>i1(t)==="AsyncFunction";Fe.boundFunction=t=>Fe.function_(t)&&!t.hasOwnProperty("prototype");Fe.regExp=Jn("RegExp");Fe.date=Jn("Date");Fe.error=Jn("Error");Fe.map=t=>Jn("Map")(t);Fe.set=t=>Jn("Set")(t);Fe.weakMap=t=>Jn("WeakMap")(t);Fe.weakSet=t=>Jn("WeakSet")(t);Fe.int8Array=Jn("Int8Array");Fe.uint8Array=Jn("Uint8Array");Fe.uint8ClampedArray=Jn("Uint8ClampedArray");Fe.int16Array=Jn("Int16Array");Fe.uint16Array=Jn("Uint16Array");Fe.int32Array=Jn("Int32Array");Fe.uint32Array=Jn("Uint32Array");Fe.float32Array=Jn("Float32Array");Fe.float64Array=Jn("Float64Array");Fe.bigInt64Array=Jn("BigInt64Array");Fe.bigUint64Array=Jn("BigUint64Array");Fe.arrayBuffer=Jn("ArrayBuffer");Fe.sharedArrayBuffer=Jn("SharedArrayBuffer");Fe.dataView=Jn("DataView");Fe.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;Fe.urlInstance=t=>Jn("URL")(t);Fe.urlString=t=>{if(!Fe.string(t))return!1;try{return new URL(t),!0}catch{return!1}};Fe.truthy=t=>Boolean(t);Fe.falsy=t=>!t;Fe.nan=t=>Number.isNaN(t);Fe.primitive=t=>Fe.null_(t)||mrt(typeof t);Fe.integer=t=>Number.isInteger(t);Fe.safeInteger=t=>Number.isSafeInteger(t);Fe.plainObject=t=>{if(boe.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};Fe.typedArray=t=>prt(i1(t));var Crt=t=>Fe.safeInteger(t)&&t>=0;Fe.arrayLike=t=>!Fe.nullOrUndefined(t)&&!Fe.function_(t)&&Crt(t.length);Fe.inRange=(t,e)=>{if(Fe.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(Fe.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Irt=1,wrt=["innerHTML","ownerDocument","style","attributes","nodeValue"];Fe.domElement=t=>Fe.object(t)&&t.nodeType===Irt&&Fe.string(t.nodeName)&&!Fe.plainObject(t)&&wrt.every(e=>e in t);Fe.observable=t=>{var e,r,o,a;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((a=(o=t)["@@observable"])===null||a===void 0?void 0:a.call(o)):!1};Fe.nodeStream=t=>Fe.object(t)&&Fe.function_(t.pipe)&&!Fe.observable(t);Fe.infinite=t=>t===1/0||t===-1/0;var Qoe=t=>e=>Fe.integer(e)&&Math.abs(e%2)===t;Fe.evenInteger=Qoe(0);Fe.oddInteger=Qoe(1);Fe.emptyArray=t=>Fe.array(t)&&t.length===0;Fe.nonEmptyArray=t=>Fe.array(t)&&t.length>0;Fe.emptyString=t=>Fe.string(t)&&t.length===0;Fe.nonEmptyString=t=>Fe.string(t)&&t.length>0;var Brt=t=>Fe.string(t)&&!/\S/.test(t);Fe.emptyStringOrWhitespace=t=>Fe.emptyString(t)||Brt(t);Fe.emptyObject=t=>Fe.object(t)&&!Fe.map(t)&&!Fe.set(t)&&Object.keys(t).length===0;Fe.nonEmptyObject=t=>Fe.object(t)&&!Fe.map(t)&&!Fe.set(t)&&Object.keys(t).length>0;Fe.emptySet=t=>Fe.set(t)&&t.size===0;Fe.nonEmptySet=t=>Fe.set(t)&&t.size>0;Fe.emptyMap=t=>Fe.map(t)&&t.size===0;Fe.nonEmptyMap=t=>Fe.map(t)&&t.size>0;Fe.propertyKey=t=>Fe.any([Fe.string,Fe.number,Fe.symbol],t);Fe.formData=t=>Jn("FormData")(t);Fe.urlSearchParams=t=>Jn("URLSearchParams")(t);var koe=(t,e,r)=>{if(!Fe.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};Fe.any=(t,...e)=>(Fe.array(t)?t:[t]).some(o=>koe(Array.prototype.some,o,e));Fe.all=(t,...e)=>koe(Array.prototype.every,t,e);var Mt=(t,e,r,o={})=>{if(!t){let{multipleValues:a}=o,n=a?`received values of types ${[...new Set(r.map(u=>`\`${Fe(u)}\``))].join(", ")}`:`received value of type \`${Fe(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${n}.`)}};Tf.assert={undefined:t=>Mt(Fe.undefined(t),"undefined",t),string:t=>Mt(Fe.string(t),"string",t),number:t=>Mt(Fe.number(t),"number",t),bigint:t=>Mt(Fe.bigint(t),"bigint",t),function_:t=>Mt(Fe.function_(t),"Function",t),null_:t=>Mt(Fe.null_(t),"null",t),class_:t=>Mt(Fe.class_(t),"Class",t),boolean:t=>Mt(Fe.boolean(t),"boolean",t),symbol:t=>Mt(Fe.symbol(t),"symbol",t),numericString:t=>Mt(Fe.numericString(t),"string with a number",t),array:(t,e)=>{Mt(Fe.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>Mt(Fe.buffer(t),"Buffer",t),nullOrUndefined:t=>Mt(Fe.nullOrUndefined(t),"null or undefined",t),object:t=>Mt(Fe.object(t),"Object",t),iterable:t=>Mt(Fe.iterable(t),"Iterable",t),asyncIterable:t=>Mt(Fe.asyncIterable(t),"AsyncIterable",t),generator:t=>Mt(Fe.generator(t),"Generator",t),asyncGenerator:t=>Mt(Fe.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>Mt(Fe.nativePromise(t),"native Promise",t),promise:t=>Mt(Fe.promise(t),"Promise",t),generatorFunction:t=>Mt(Fe.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>Mt(Fe.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>Mt(Fe.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>Mt(Fe.boundFunction(t),"Function",t),regExp:t=>Mt(Fe.regExp(t),"RegExp",t),date:t=>Mt(Fe.date(t),"Date",t),error:t=>Mt(Fe.error(t),"Error",t),map:t=>Mt(Fe.map(t),"Map",t),set:t=>Mt(Fe.set(t),"Set",t),weakMap:t=>Mt(Fe.weakMap(t),"WeakMap",t),weakSet:t=>Mt(Fe.weakSet(t),"WeakSet",t),int8Array:t=>Mt(Fe.int8Array(t),"Int8Array",t),uint8Array:t=>Mt(Fe.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>Mt(Fe.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>Mt(Fe.int16Array(t),"Int16Array",t),uint16Array:t=>Mt(Fe.uint16Array(t),"Uint16Array",t),int32Array:t=>Mt(Fe.int32Array(t),"Int32Array",t),uint32Array:t=>Mt(Fe.uint32Array(t),"Uint32Array",t),float32Array:t=>Mt(Fe.float32Array(t),"Float32Array",t),float64Array:t=>Mt(Fe.float64Array(t),"Float64Array",t),bigInt64Array:t=>Mt(Fe.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>Mt(Fe.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>Mt(Fe.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>Mt(Fe.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>Mt(Fe.dataView(t),"DataView",t),urlInstance:t=>Mt(Fe.urlInstance(t),"URL",t),urlString:t=>Mt(Fe.urlString(t),"string with a URL",t),truthy:t=>Mt(Fe.truthy(t),"truthy",t),falsy:t=>Mt(Fe.falsy(t),"falsy",t),nan:t=>Mt(Fe.nan(t),"NaN",t),primitive:t=>Mt(Fe.primitive(t),"primitive",t),integer:t=>Mt(Fe.integer(t),"integer",t),safeInteger:t=>Mt(Fe.safeInteger(t),"integer",t),plainObject:t=>Mt(Fe.plainObject(t),"plain object",t),typedArray:t=>Mt(Fe.typedArray(t),"TypedArray",t),arrayLike:t=>Mt(Fe.arrayLike(t),"array-like",t),domElement:t=>Mt(Fe.domElement(t),"HTMLElement",t),observable:t=>Mt(Fe.observable(t),"Observable",t),nodeStream:t=>Mt(Fe.nodeStream(t),"Node.js Stream",t),infinite:t=>Mt(Fe.infinite(t),"infinite number",t),emptyArray:t=>Mt(Fe.emptyArray(t),"empty array",t),nonEmptyArray:t=>Mt(Fe.nonEmptyArray(t),"non-empty array",t),emptyString:t=>Mt(Fe.emptyString(t),"empty string",t),nonEmptyString:t=>Mt(Fe.nonEmptyString(t),"non-empty string",t),emptyStringOrWhitespace:t=>Mt(Fe.emptyStringOrWhitespace(t),"empty string or whitespace",t),emptyObject:t=>Mt(Fe.emptyObject(t),"empty object",t),nonEmptyObject:t=>Mt(Fe.nonEmptyObject(t),"non-empty object",t),emptySet:t=>Mt(Fe.emptySet(t),"empty set",t),nonEmptySet:t=>Mt(Fe.nonEmptySet(t),"non-empty set",t),emptyMap:t=>Mt(Fe.emptyMap(t),"empty map",t),nonEmptyMap:t=>Mt(Fe.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>Mt(Fe.propertyKey(t),"PropertyKey",t),formData:t=>Mt(Fe.formData(t),"FormData",t),urlSearchParams:t=>Mt(Fe.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>Mt(Fe.evenInteger(t),"even integer",t),oddInteger:t=>Mt(Fe.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>Mt(Fe.directInstanceOf(t,e),"T",t),inRange:(t,e)=>Mt(Fe.inRange(t,e),"in range",t),any:(t,...e)=>Mt(Fe.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>Mt(Fe.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(Fe,{class:{value:Fe.class_},function:{value:Fe.function_},null:{value:Fe.null_}});Object.defineProperties(Tf.assert,{class:{value:Tf.assert.class_},function:{value:Tf.assert.function_},null:{value:Tf.assert.null_}});Tf.default=Fe;jP.exports=Fe;jP.exports.default=Fe;jP.exports.assert=Tf.assert});var Foe=U((sLt,TM)=>{"use strict";var GP=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},CE=class{static fn(e){return(...r)=>new CE((o,a,n)=>{r.push(n),e(...r).then(o,a)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,o)=>{this._reject=o;let a=A=>{this._isPending=!1,r(A)},n=A=>{this._isPending=!1,o(A)},u=A=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(A)};return Object.defineProperties(u,{shouldReject:{get:()=>this._rejectOnCancel,set:A=>{this._rejectOnCancel=A}}}),e(a,n,u)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new GP(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(CE.prototype,Promise.prototype);TM.exports=CE;TM.exports.CancelError=GP});var Roe=U((LM,OM)=>{"use strict";Object.defineProperty(LM,"__esModule",{value:!0});var vrt=Ie("tls"),NM=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let o=typeof r.connect=="function",a=typeof r.secureConnect=="function",n=typeof r.close=="function",u=()=>{o&&r.connect(),t instanceof vrt.TLSSocket&&a&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),n&&t.once("close",r.close)};t.writable&&!t.connecting?u():t.connecting?t.once("connect",u):t.destroyed&&n&&r.close(t._hadError)};LM.default=NM;OM.exports=NM;OM.exports.default=NM});var Toe=U((UM,_M)=>{"use strict";Object.defineProperty(UM,"__esModule",{value:!0});var Drt=Roe(),Srt=Number(process.versions.node.split(".")[0]),MM=t=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=u=>{let A=u.emit.bind(u);u.emit=(p,...h)=>(p==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,u.emit=A),A(p,...h))};r(t),t.prependOnceListener("abort",()=>{e.abort=Date.now(),(!e.response||Srt>=13)&&(e.phases.total=Date.now()-e.start)});let o=u=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let A=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};u.prependOnceListener("lookup",A),Drt.default(u,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(u.removeListener("lookup",A),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?o(t.socket):t.prependOnceListener("socket",o);let a=()=>{var u;e.upload=Date.now(),e.phases.request=e.upload-(u=e.secureConnect,u??e.connect)};return(()=>typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))()?a():t.prependOnceListener("finish",a),t.prependOnceListener("response",u=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,u.timings=e,r(u),u.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};UM.default=MM;_M.exports=MM;_M.exports.default=MM});var Hoe=U((oLt,jM)=>{"use strict";var{V4MAPPED:Prt,ADDRCONFIG:xrt,ALL:_oe,promises:{Resolver:Noe},lookup:brt}=Ie("dns"),{promisify:HM}=Ie("util"),Qrt=Ie("os"),IE=Symbol("cacheableLookupCreateConnection"),qM=Symbol("cacheableLookupInstance"),Loe=Symbol("expires"),krt=typeof _oe=="number",Ooe=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},Frt=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},Moe=()=>{let t=!1,e=!1;for(let r of Object.values(Qrt.networkInterfaces()))for(let o of r)if(!o.internal&&(o.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},Rrt=t=>Symbol.iterator in t,Uoe={ttl:!0},Trt={all:!0},WP=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:o=3600,errorTtl:a=.15,resolver:n=new Noe,lookup:u=brt}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=e,this._resolver=n,this._dnsLookup=HM(u),this._resolver instanceof Noe?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=HM(this._resolver.resolve4.bind(this._resolver)),this._resolve6=HM(this._resolver.resolve6.bind(this._resolver))),this._iface=Moe(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,o<1)this._fallback=!1;else{this._fallback=!0;let A=setInterval(()=>{this._hostnamesToFallback.clear()},o*1e3);A.unref&&A.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,o){if(typeof r=="function"?(o=r,r={}):typeof r=="number"&&(r={family:r}),!o)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(a=>{r.all?o(null,a):o(null,a.address,a.family,a.expires,a.ttl)},o)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let o=await this.query(e);if(r.family===6){let a=o.filter(n=>n.family===6);r.hints&Prt&&(krt&&r.hints&_oe||a.length===0)?Frt(o):o=a}else r.family===4&&(o=o.filter(a=>a.family===4));if(r.hints&xrt){let{_iface:a}=this;o=o.filter(n=>n.family===6?a.has6:a.has4)}if(o.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${e}`);throw a.code="ENOTFOUND",a.hostname=e,a}return r.all?o:o[0]}async query(e){let r=await this._cache.get(e);if(!r){let o=this._pending[e];if(o)r=await o;else{let a=this.queryAndCache(e);this._pending[e]=a,r=await a}}return r=r.map(o=>({...o})),r}async _resolve(e){let r=async h=>{try{return await h}catch(C){if(C.code==="ENODATA"||C.code==="ENOTFOUND")return[];throw C}},[o,a]=await Promise.all([this._resolve4(e,Uoe),this._resolve6(e,Uoe)].map(h=>r(h))),n=0,u=0,A=0,p=Date.now();for(let h of o)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,u=Math.max(u,h.ttl);return o.length>0?a.length>0?A=Math.min(n,u):A=n:A=u,{entries:[...o,...a],cacheTtl:A}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,o){if(this.maxTtl>0&&o>0){o=Math.min(o,this.maxTtl)*1e3,r[Loe]=Date.now()+o;try{await this._cache.set(e,r,o)}catch(a){this.lookupAsync=async()=>{let n=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw n.cause=a,n}}Rrt(this._cache)&&this._tick(o)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Trt);try{let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let o=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,o),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let o=1/0,a=Date.now();for(let[n,u]of this._cache){let A=u[Loe];a>=A?this._cache.delete(n):A<o&&(o=A)}o!==1/0&&this._tick(o-a)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Ooe(e),IE in e)throw new Error("CacheableLookup has been already installed");e[IE]=e.createConnection,e[qM]=this,e.createConnection=(r,o)=>("lookup"in r||(r.lookup=this.lookup),e[IE](r,o))}uninstall(e){if(Ooe(e),e[IE]){if(e[qM]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[IE],delete e[IE],delete e[qM]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=Moe(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};jM.exports=WP;jM.exports.default=WP});var Goe=U((aLt,GM)=>{"use strict";var Nrt=typeof URL>"u"?Ie("url").URL:URL,Lrt="text/plain",Ort="us-ascii",qoe=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Mrt=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let o=r[1].split(";"),a=r[2],n=e?"":r[3],u=!1;o[o.length-1]==="base64"&&(o.pop(),u=!0);let A=(o.shift()||"").toLowerCase(),h=[...o.map(C=>{let[w,v=""]=C.split("=").map(b=>b.trim());return w==="charset"&&(v=v.toLowerCase(),v===Ort)?"":`${w}${v?`=${v}`:""}`}).filter(Boolean)];return u&&h.push("base64"),(h.length!==0||A&&A!==Lrt)&&h.unshift(A),`data:${h.join(";")},${u?a.trim():a}${n?`#${n}`:""}`},joe=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},Reflect.has(e,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(e,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(e,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(t=t.trim(),/^data:/i.test(t))return Mrt(t,e);let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new Nrt(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash&&(a.hash=""),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\/{2,}/g,(n,u)=>/^(?!\/)/g.test(u)?`${u}/`:"/")),a.pathname&&(a.pathname=decodeURI(a.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=a.pathname.split("/"),u=n[n.length-1];qoe(u,e.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let n of[...a.searchParams.keys()])qoe(n,e.removeQueryParameters)&&a.searchParams.delete(n);return e.sortQueryParameters&&a.searchParams.sort(),e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,"")),t=a.toString(),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};GM.exports=joe;GM.exports.default=joe});var Koe=U((lLt,Yoe)=>{Yoe.exports=Woe;function Woe(t,e){if(t&&e)return Woe(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(o){r[o]=t[o]}),r;function r(){for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];var n=t.apply(this,o),u=o[o.length-1];return typeof n=="function"&&n!==u&&Object.keys(u).forEach(function(A){n[A]=u[A]}),n}}});var YM=U((cLt,WM)=>{var Voe=Koe();WM.exports=Voe(YP);WM.exports.strict=Voe(Joe);YP.proto=YP(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return YP(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Joe(this)},configurable:!0})});function YP(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Joe(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var KM=U((uLt,Xoe)=>{var Urt=YM(),_rt=function(){},Hrt=function(t){return t.setHeader&&typeof t.abort=="function"},qrt=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},zoe=function(t,e,r){if(typeof e=="function")return zoe(t,null,e);e||(e={}),r=Urt(r||_rt);var o=t._writableState,a=t._readableState,n=e.readable||e.readable!==!1&&t.readable,u=e.writable||e.writable!==!1&&t.writable,A=function(){t.writable||p()},p=function(){u=!1,n||r.call(t)},h=function(){n=!1,u||r.call(t)},C=function(E){r.call(t,E?new Error("exited with error code: "+E):null)},w=function(E){r.call(t,E)},v=function(){if(n&&!(a&&a.ended))return r.call(t,new Error("premature close"));if(u&&!(o&&o.ended))return r.call(t,new Error("premature close"))},b=function(){t.req.on("finish",p)};return Hrt(t)?(t.on("complete",p),t.on("abort",v),t.req?b():t.on("request",b)):u&&!o&&(t.on("end",A),t.on("close",A)),qrt(t)&&t.on("exit",C),t.on("end",h),t.on("finish",p),e.error!==!1&&t.on("error",w),t.on("close",v),function(){t.removeListener("complete",p),t.removeListener("abort",v),t.removeListener("request",b),t.req&&t.req.removeListener("finish",p),t.removeListener("end",A),t.removeListener("close",A),t.removeListener("finish",p),t.removeListener("exit",C),t.removeListener("end",h),t.removeListener("error",w),t.removeListener("close",v)}};Xoe.exports=zoe});var eae=U((ALt,$oe)=>{var jrt=YM(),Grt=KM(),VM=Ie("fs"),s1=function(){},Wrt=/^v?\.0/.test(process.version),KP=function(t){return typeof t=="function"},Yrt=function(t){return!Wrt||!VM?!1:(t instanceof(VM.ReadStream||s1)||t instanceof(VM.WriteStream||s1))&&KP(t.close)},Krt=function(t){return t.setHeader&&KP(t.abort)},Vrt=function(t,e,r,o){o=jrt(o);var a=!1;t.on("close",function(){a=!0}),Grt(t,{readable:e,writable:r},function(u){if(u)return o(u);a=!0,o()});var n=!1;return function(u){if(!a&&!n){if(n=!0,Yrt(t))return t.close(s1);if(Krt(t))return t.abort();if(KP(t.destroy))return t.destroy();o(u||new Error("stream was destroyed"))}}},Zoe=function(t){t()},Jrt=function(t,e){return t.pipe(e)},zrt=function(){var t=Array.prototype.slice.call(arguments),e=KP(t[t.length-1]||s1)&&t.pop()||s1;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,o=t.map(function(a,n){var u=n<t.length-1,A=n>0;return Vrt(a,u,A,function(p){r||(r=p),p&&o.forEach(Zoe),!u&&(o.forEach(Zoe),e(r))})});return t.reduce(Jrt)};$oe.exports=zrt});var rae=U((fLt,tae)=>{"use strict";var{PassThrough:Xrt}=Ie("stream");tae.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,o=r==="buffer",a=!1;e?a=!(r||o):r=r||"utf8",o&&(r=null);let n=new Xrt({objectMode:a});r&&n.setEncoding(r);let u=0,A=[];return n.on("data",p=>{A.push(p),a?u=A.length:u+=p.length}),n.getBufferedValue=()=>e?A:o?Buffer.concat(A,u):A.join(""),n.getBufferedLength=()=>u,n}});var nae=U((pLt,wE)=>{"use strict";var Zrt=eae(),$rt=rae(),VP=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function JP(t,e){if(!t)return Promise.reject(new Error("Expected a stream"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,o;return await new Promise((a,n)=>{let u=A=>{A&&(A.bufferedData=o.getBufferedValue()),n(A)};o=Zrt(t,$rt(e),A=>{if(A){u(A);return}a()}),o.on("data",()=>{o.getBufferedLength()>r&&u(new VP)})}),o.getBufferedValue()}wE.exports=JP;wE.exports.default=JP;wE.exports.buffer=(t,e)=>JP(t,{...e,encoding:"buffer"});wE.exports.array=(t,e)=>JP(t,{...e,array:!0});wE.exports.MaxBufferError=VP});var sae=U((gLt,iae)=>{"use strict";var ent=new Set([200,203,204,206,300,301,404,405,410,414,501]),tnt=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),rnt=new Set([500,502,503,504]),nnt={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},int={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function bd(t){let e=parseInt(t,10);return isFinite(e)?e:0}function snt(t){return t?rnt.has(t.status):!0}function JM(t){let e={};if(!t)return e;let r=t.trim().split(/\s*,\s*/);for(let o of r){let[a,n]=o.split(/\s*=\s*/,2);e[a]=n===void 0?!0:n.replace(/^"|"$/g,"")}return e}function ont(t){let e=[];for(let r in t){let o=t[r];e.push(o===!0?r:r+"="+o)}if(!!e.length)return e.join(", ")}iae.exports=class{constructor(e,r,{shared:o,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:u,_fromObject:A}={}){if(A){this._fromObject(A);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=o!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=JM(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=JM(e.headers["cache-control"]),u&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":ont(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&tnt.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||ent.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=JM(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let o of r)if(e.headers[o]!==this._reqHeaders[o])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let o in e)nnt[o]||(r[o]=e[o]);if(e.connection){let o=e.connection.trim().split(/\s*,\s*/);for(let a of o)delete r[a]}if(r.warning){let o=r.warning.split(/,/).filter(a=>!/^\s*1[0-9][0-9]/.test(a));o.length?r.warning=o.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return bd(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return bd(this._rescc["s-maxage"])}if(this._rescc["max-age"])return bd(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let o=Date.parse(this._resHeaders.expires);return Number.isNaN(o)||o<r?0:Math.max(e,(o-r)/1e3)}if(this._resHeaders["last-modified"]){let o=Date.parse(this._resHeaders["last-modified"]);if(isFinite(o)&&r>o)return Math.max(e,(r-o)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+bd(this._rescc["stale-if-error"]),o=e+bd(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,o)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+bd(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+bd(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let a=r["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));a.length?r["if-none-match"]=a.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&snt(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let o=!1;if(r.status!==void 0&&r.status!=304?o=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?o=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?o=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?o=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(o=!0),!o)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let a={};for(let u in this._resHeaders)a[u]=u in r.headers&&!int[u]?r.headers[u]:this._resHeaders[u];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var zP=U((dLt,oae)=>{"use strict";oae.exports=t=>{let e={};for(let[r,o]of Object.entries(t))e[r.toLowerCase()]=o;return e}});var lae=U((mLt,aae)=>{"use strict";var ant=Ie("stream").Readable,lnt=zP(),zM=class extends ant{constructor(e,r,o,a){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(o instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof a!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=lnt(r),this.body=o,this.url=a}_read(){this.push(this.body),this.push(null)}};aae.exports=zM});var uae=U((yLt,cae)=>{"use strict";var cnt=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];cae.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(cnt));for(let o of r)o in e||(e[o]=typeof t[o]=="function"?t[o].bind(t):t[o])}});var fae=U((ELt,Aae)=>{"use strict";var unt=Ie("stream").PassThrough,Ant=uae(),fnt=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new unt;return Ant(t,e),t.pipe(e)};Aae.exports=fnt});var pae=U(XM=>{XM.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",o=Array.isArray(e);r=o?"[":"{";var a=!0;for(var n in e){var u=typeof e[n]=="function"||!o&&typeof e[n]>"u";Object.hasOwnProperty.call(e,n)&&!u&&(a||(r+=","),a=!1,o?e[n]==null?r+="null":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+":"+t(e[n])))}return r+=o?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};XM.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var dae=U((ILt,gae)=>{"use strict";var pnt=Ie("events"),hae=pae(),hnt=t=>{let e={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(t.adapter||t.uri){let r=t.adapter||/^[^:]*/.exec(t.uri)[0];return new(Ie(e[r]))(t)}return new Map},ZM=class extends pnt{constructor(e,r){if(super(),this.opts=Object.assign({namespace:"keyv",serialize:hae.stringify,deserialize:hae.parse},typeof e=="string"?{uri:e}:e,r),!this.opts.store){let o=Object.assign({},this.opts);this.opts.store=hnt(o)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",o=>this.emit("error",o)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,r){e=this._getKeyPrefix(e);let{store:o}=this.opts;return Promise.resolve().then(()=>o.get(e)).then(a=>typeof a=="string"?this.opts.deserialize(a):a).then(a=>{if(a!==void 0){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e);return}return r&&r.raw?a:a.value}})}set(e,r,o){e=this._getKeyPrefix(e),typeof o>"u"&&(o=this.opts.ttl),o===0&&(o=void 0);let{store:a}=this.opts;return Promise.resolve().then(()=>{let n=typeof o=="number"?Date.now()+o:null;return r={value:r,expires:n},this.opts.serialize(r)}).then(n=>a.set(e,n,o)).then(()=>!0)}delete(e){e=this._getKeyPrefix(e);let{store:r}=this.opts;return Promise.resolve().then(()=>r.delete(e))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}};gae.exports=ZM});var Eae=U((BLt,yae)=>{"use strict";var gnt=Ie("events"),XP=Ie("url"),dnt=Goe(),mnt=nae(),$M=sae(),mae=lae(),ynt=zP(),Ent=fae(),Cnt=dae(),Kc=class{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new Cnt({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,o)=>{let a;if(typeof r=="string")a=e4(XP.parse(r)),r={};else if(r instanceof XP.URL)a=e4(XP.parse(r.toString())),r={};else{let[w,...v]=(r.path||"").split("?"),b=v.length>0?`?${v.join("?")}`:"";a=e4({...r,pathname:w,search:b})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...Int(a)},r.headers=ynt(r.headers);let n=new gnt,u=dnt(XP.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),A=`${r.method}:${u}`,p=!1,h=!1,C=w=>{h=!0;let v=!1,b,E=new Promise(L=>{b=()=>{v||(v=!0,L())}}),R=L=>{if(p&&!w.forceRefresh){L.status=L.statusCode;let V=$M.fromObject(p.cachePolicy).revalidatedPolicy(w,L);if(!V.modified){let re=V.policy.responseHeaders();L=new mae(p.statusCode,re,p.body,p.url),L.cachePolicy=V.policy,L.fromCache=!0}}L.fromCache||(L.cachePolicy=new $M(w,L,w),L.fromCache=!1);let _;w.cache&&L.cachePolicy.storable()?(_=Ent(L),(async()=>{try{let V=mnt.buffer(L);if(await Promise.race([E,new Promise(pe=>L.once("end",pe))]),v)return;let re=await V,ae={cachePolicy:L.cachePolicy.toObject(),url:L.url,statusCode:L.fromCache?p.statusCode:L.statusCode,body:re},he=w.strictTtl?L.cachePolicy.timeToLive():void 0;w.maxTtl&&(he=he?Math.min(he,w.maxTtl):w.maxTtl),await this.cache.set(A,ae,he)}catch(V){n.emit("error",new Kc.CacheError(V))}})()):w.cache&&p&&(async()=>{try{await this.cache.delete(A)}catch(V){n.emit("error",new Kc.CacheError(V))}})(),n.emit("response",_||L),typeof o=="function"&&o(_||L)};try{let L=e(w,R);L.once("error",b),L.once("abort",b),n.emit("request",L)}catch(L){n.emit("error",new Kc.RequestError(L))}};return(async()=>{let w=async b=>{await Promise.resolve();let E=b.cache?await this.cache.get(A):void 0;if(typeof E>"u")return C(b);let R=$M.fromObject(E.cachePolicy);if(R.satisfiesWithoutRevalidation(b)&&!b.forceRefresh){let L=R.responseHeaders(),_=new mae(E.statusCode,L,E.body,E.url);_.cachePolicy=R,_.fromCache=!0,n.emit("response",_),typeof o=="function"&&o(_)}else p=E,b.headers=R.revalidationHeaders(b),C(b)},v=b=>n.emit("error",new Kc.CacheError(b));this.cache.once("error",v),n.on("response",()=>this.cache.removeListener("error",v));try{await w(r)}catch(b){r.automaticFailover&&!h&&C(r),n.emit("error",new Kc.CacheError(b))}})(),n}}};function Int(t){let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function e4(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}Kc.RequestError=class extends Error{constructor(t){super(t.message),this.name="RequestError",Object.assign(this,t)}};Kc.CacheError=class extends Error{constructor(t){super(t.message),this.name="CacheError",Object.assign(this,t)}};yae.exports=Kc});var Iae=U((SLt,Cae)=>{"use strict";var wnt=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];Cae.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(wnt)),o={};for(let a of r)a in e||(o[a]={get(){let n=t[a];return typeof n=="function"?n.bind(t):n},set(n){t[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(e,o),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var Bae=U((PLt,wae)=>{"use strict";var{Transform:Bnt,PassThrough:vnt}=Ie("stream"),t4=Ie("zlib"),Dnt=Iae();wae.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof t4.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let o=!0,a=new Bnt({transform(A,p,h){o=!1,h(null,A)},flush(A){A()}}),n=new vnt({autoDestroy:!1,destroy(A,p){t.destroy(),p(A)}}),u=r?t4.createBrotliDecompress():t4.createUnzip();return u.once("error",A=>{if(o&&!t.readable){n.end();return}n.destroy(A)}),Dnt(t,n),t.pipe(a).pipe(u).pipe(n),n}});var n4=U((xLt,vae)=>{"use strict";var r4=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[o,a]of this.oldCache.entries())this.onEviction(o,a);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};vae.exports=r4});var s4=U((bLt,xae)=>{"use strict";var Snt=Ie("events"),Pnt=Ie("tls"),xnt=Ie("http2"),bnt=n4(),Zo=Symbol("currentStreamsCount"),Dae=Symbol("request"),$l=Symbol("cachedOriginSet"),BE=Symbol("gracefullyClosing"),Qnt=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],knt=(t,e,r)=>{let o=0,a=t.length;for(;o<a;){let n=o+a>>>1;r(t[n],e)?o=n+1:a=n}return o},Fnt=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,i4=(t,e)=>{for(let r of t)r[$l].length<e[$l].length&&r[$l].every(o=>e[$l].includes(o))&&r[Zo]+e[Zo]<=e.remoteSettings.maxConcurrentStreams&&Pae(r)},Rnt=(t,e)=>{for(let r of t)e[$l].length<r[$l].length&&e[$l].every(o=>r[$l].includes(o))&&e[Zo]+r[Zo]<=r.remoteSettings.maxConcurrentStreams&&Pae(e)},Sae=({agent:t,isFree:e})=>{let r={};for(let o in t.sessions){let n=t.sessions[o].filter(u=>{let A=u[iA.kCurrentStreamsCount]<u.remoteSettings.maxConcurrentStreams;return e?A:!A});n.length!==0&&(r[o]=n)}return r},Pae=t=>{t[BE]=!0,t[Zo]===0&&t.close()},iA=class extends Snt{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:o=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=o,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new bnt({maxSize:a})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(let o of Qnt)e[o]&&(r+=`:${e[o]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let o=this.queue[e][r];this._sessionsCount<this.maxSessions&&!o.completed&&(o.completed=!0,o())}getSession(e,r,o){return new Promise((a,n)=>{Array.isArray(o)?(o=[...o],a()):o=[{resolve:a,reject:n}];let u=this.normalizeOptions(r),A=iA.normalizeOrigin(e,r&&r.servername);if(A===void 0){for(let{reject:C}of o)C(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(u in this.sessions){let C=this.sessions[u],w=-1,v=-1,b;for(let E of C){let R=E.remoteSettings.maxConcurrentStreams;if(R<w)break;if(E[$l].includes(A)){let L=E[Zo];if(L>=R||E[BE]||E.destroyed)continue;b||(w=R),L>v&&(b=E,v=L)}}if(b){if(o.length!==1){for(let{reject:E}of o){let R=new Error(`Expected the length of listeners to be 1, got ${o.length}.
137Please report this to https://github.com/szmarczak/http2-wrapper/`);E(R)}return}o[0].resolve(b);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let C=`${A}:${u}`,w=!1;try{let v=xnt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(C),...r});v[Zo]=0,v[BE]=!1;let b=()=>v[Zo]<v.remoteSettings.maxConcurrentStreams,E=!0;v.socket.once("session",L=>{this.tlsSessionCache.set(C,L)}),v.once("error",L=>{for(let{reject:_}of o)_(L);this.tlsSessionCache.delete(C)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(w){E&&this._freeSessionsCount--,this._sessionsCount--;let L=this.sessions[u];L.splice(L.indexOf(v),1),L.length===0&&delete this.sessions[u]}else{let L=new Error("Session closed without receiving a SETTINGS frame");L.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:_}of o)_(L);p()}this._tryToCreateNewSession(u,A)});let R=()=>{if(!(!(u in this.queue)||!b())){for(let L of v[$l])if(L in this.queue[u]){let{listeners:_}=this.queue[u][L];for(;_.length!==0&&b();)_.shift().resolve(v);let V=this.queue[u];if(V[L].listeners.length===0&&(delete V[L],Object.keys(V).length===0)){delete this.queue[u];break}if(!b())break}}};v.on("origin",()=>{v[$l]=v.originSet,b()&&(R(),i4(this.sessions[u],v))}),v.once("remoteSettings",()=>{if(v.ref(),v.unref(),this._sessionsCount++,h.destroyed){let L=new Error("Agent has been destroyed");for(let _ of o)_.reject(L);v.destroy();return}v[$l]=v.originSet;{let L=this.sessions;if(u in L){let _=L[u];_.splice(knt(_,v,Fnt),0,v)}else L[u]=[v]}this._freeSessionsCount+=1,w=!0,this.emit("session",v),R(),p(),v[Zo]===0&&this._freeSessionsCount>this.maxFreeSessions&&v.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),v.on("remoteSettings",()=>{R(),i4(this.sessions[u],v)})}),v[Dae]=v.request,v.request=(L,_)=>{if(v[BE])throw new Error("The session is gracefully closing. No new streams are allowed.");let V=v[Dae](L,_);return v.ref(),++v[Zo],v[Zo]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,V.once("close",()=>{if(E=b(),--v[Zo],!v.destroyed&&!v.closed&&(Rnt(this.sessions[u],v),b()&&!v.closed)){E||(this._freeSessionsCount++,E=!0);let re=v[Zo]===0;re&&v.unref(),re&&(this._freeSessionsCount>this.maxFreeSessions||v[BE])?v.close():(i4(this.sessions[u],v),R())}}),V}}catch(v){for(let b of o)b.reject(v);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(e,r,o,a){return new Promise((n,u)=>{this.getSession(e,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(e,r){return iA.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let o=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Pnt.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Zo]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(e);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return Sae({agent:this,isFree:!0})}get busySessions(){return Sae({agent:this,isFree:!1})}};iA.kCurrentStreamsCount=Zo;iA.kGracefullyClosing=BE;xae.exports={Agent:iA,globalAgent:new iA}});var a4=U((QLt,bae)=>{"use strict";var{Readable:Tnt}=Ie("stream"),o4=class extends Tnt{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};bae.exports=o4});var l4=U((kLt,Qae)=>{"use strict";Qae.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var Fae=U((FLt,kae)=>{"use strict";kae.exports=(t,e,r)=>{for(let o of r)t.on(o,(...a)=>e.emit(o,...a))}});var Tae=U((RLt,Rae)=>{"use strict";Rae.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var Lae=U((NLt,Nae)=>{"use strict";var vE=(t,e,r)=>{Nae.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r:r(a)),this.name=`${super.name} [${e}]`,this.code=e}}};vE(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],o=Array.isArray(r);return o&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${o?"one of":"of"} type ${r}. Received ${typeof t[2]}`});vE(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);vE(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);vE(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);vE(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);vE(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var p4=U((LLt,jae)=>{"use strict";var Nnt=Ie("http2"),{Writable:Lnt}=Ie("stream"),{Agent:Oae,globalAgent:Ont}=s4(),Mnt=a4(),Unt=l4(),_nt=Fae(),Hnt=Tae(),{ERR_INVALID_ARG_TYPE:c4,ERR_INVALID_PROTOCOL:qnt,ERR_HTTP_HEADERS_SENT:Mae,ERR_INVALID_HTTP_TOKEN:jnt,ERR_HTTP_INVALID_HEADER_VALUE:Gnt,ERR_INVALID_CHAR:Wnt}=Lae(),{HTTP2_HEADER_STATUS:Uae,HTTP2_HEADER_METHOD:_ae,HTTP2_HEADER_PATH:Hae,HTTP2_METHOD_CONNECT:Ynt}=Nnt.constants,xo=Symbol("headers"),u4=Symbol("origin"),A4=Symbol("session"),qae=Symbol("options"),ZP=Symbol("flushedHeaders"),o1=Symbol("jobs"),Knt=/^[\^`\-\w!#$%&*+.|~]+$/,Vnt=/[^\t\u0020-\u007E\u0080-\u00FF]/,f4=class extends Lnt{constructor(e,r,o){super({autoDestroy:!1});let a=typeof e=="string"||e instanceof URL;if(a&&(e=Unt(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(o=r,r=a?e:{...e}):r={...e,...r},r.h2session)this[A4]=r.h2session;else if(r.agent===!1)this.agent=new Oae({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new Oae({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=Ont;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new c4("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new qnt(r.protocol,"https:");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,u=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:A}=r;if(r.timeout=void 0,this[xo]=Object.create(null),this[o1]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!("authorization"in this[xo])&&(this[xo].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[qae]=r,n===443?(this[u4]=`https://${u}`,":authority"in this[xo]||(this[xo][":authority"]=u)):(this[u4]=`https://${u}:${n}`,":authority"in this[xo]||(this[xo][":authority"]=`${u}:${n}`)),A&&this.setTimeout(A),o&&this.once("response",o),this[ZP]=!1}get method(){return this[xo][_ae]}set method(e){e&&(this[xo][_ae]=e.toUpperCase())}get path(){return this[xo][Hae]}set path(e){e&&(this[xo][Hae]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,o){if(this._mustNotHaveABody){o(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let a=()=>this._request.write(e,r,o);this._request?a():this[o1].push(a)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[o1].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[ZP]||this.destroyed)return;this[ZP]=!0;let e=this.method===Ynt,r=o=>{if(this._request=o,this.destroyed){o.destroy();return}e||_nt(o,this,["timeout","continue","close","error"]);let a=u=>(...A)=>{!this.writable&&!this.destroyed?u(...A):this.once("finish",()=>{u(...A)})};o.once("response",a((u,A,p)=>{let h=new Mnt(this.socket,o.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=u[Uae],h.headers=u,h.rawHeaders=p,h.once("end",()=>{this.aborted?(h.aborted=!0,h.emit("aborted")):(h.complete=!0,h.socket=null,h.connection=null)}),e?(h.upgrade=!0,this.emit("connect",h,o,Buffer.alloc(0))?this.emit("close"):o.destroy()):(o.on("data",C=>{!h._dumped&&!h.push(C)&&o.pause()}),o.once("end",()=>{h.push(null)}),this.emit("response",h)||h._dump())})),o.once("headers",a(u=>this.emit("information",{statusCode:u[Uae]}))),o.once("trailers",a((u,A,p)=>{let{res:h}=this;h.trailers=u,h.rawTrailers=p}));let{socket:n}=o.session;this.socket=n,this.connection=n;for(let u of this[o1])u();this.emit("socket",this.socket)};if(this[A4])try{r(this[A4].request(this[xo]))}catch(o){this.emit("error",o)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[u4],this[qae],this[xo]))}catch(o){this.emit("error",o)}}}getHeader(e){if(typeof e!="string")throw new c4("name","string",e);return this[xo][e.toLowerCase()]}get headersSent(){return this[ZP]}removeHeader(e){if(typeof e!="string")throw new c4("name","string",e);if(this.headersSent)throw new Mae("remove");delete this[xo][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Mae("set");if(typeof e!="string"||!Knt.test(e)&&!Hnt(e))throw new jnt("Header name",e);if(typeof r>"u")throw new Gnt(r,e);if(Vnt.test(r))throw new Wnt("header content",e);this[xo][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let o=()=>this._request.setTimeout(e,r);return this._request?o():this[o1].push(o),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};jae.exports=f4});var Wae=U((OLt,Gae)=>{"use strict";var Jnt=Ie("tls");Gae.exports=(t={})=>new Promise((e,r)=>{let o=Jnt.connect(t,()=>{t.resolveSocket?(o.off("error",r),e({alpnProtocol:o.alpnProtocol,socket:o})):(o.destroy(),e({alpnProtocol:o.alpnProtocol}))});o.on("error",r)})});var Kae=U((MLt,Yae)=>{"use strict";var znt=Ie("net");Yae.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),znt.isIP(e)?"":e}});var zae=U((ULt,g4)=>{"use strict";var Vae=Ie("http"),h4=Ie("https"),Xnt=Wae(),Znt=n4(),$nt=p4(),eit=Kae(),tit=l4(),$P=new Znt({maxSize:100}),a1=new Map,Jae=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let o=()=>{t.emit("free",e,r)};e.on("free",o);let a=()=>{t.removeSocket(e,r)};e.on("close",a);let n=()=>{t.removeSocket(e,r),e.off("close",a),e.off("free",o),e.off("agentRemove",n)};e.on("agentRemove",n),t.emit("free",e,r)},rit=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!$P.has(e)){if(a1.has(e))return(await a1.get(e)).alpnProtocol;let{path:r,agent:o}=t;t.path=t.socketPath;let a=Xnt(t);a1.set(e,a);try{let{socket:n,alpnProtocol:u}=await a;if($P.set(e,u),t.path=r,u==="h2")n.destroy();else{let{globalAgent:A}=h4,p=h4.Agent.prototype.createConnection;o?o.createConnection===p?Jae(o,n,t):n.destroy():A.createConnection===p?Jae(A,n,t):n.destroy()}return a1.delete(e),u}catch(n){throw a1.delete(e),n}}return $P.get(e)};g4.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=tit(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let o=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||eit(e),e.port=e.port||(o?443:80),e._defaultAgent=o?h4.globalAgent:Vae.globalAgent;let a=e.agent;if(a){if(a.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=a[o?"https":"http"]}return o&&await rit(e)==="h2"?(a&&(e.agent=a.http2),new $nt(e,r)):Vae.request(e,r)};g4.exports.protocolCache=$P});var Zae=U((_Lt,Xae)=>{"use strict";var nit=Ie("http2"),iit=s4(),d4=p4(),sit=a4(),oit=zae(),ait=(t,e,r)=>new d4(t,e,r),lit=(t,e,r)=>{let o=new d4(t,e,r);return o.end(),o};Xae.exports={...nit,ClientRequest:d4,IncomingMessage:sit,...iit,request:ait,get:lit,auto:oit}});var y4=U(m4=>{"use strict";Object.defineProperty(m4,"__esModule",{value:!0});var $ae=Nf();m4.default=t=>$ae.default.nodeStream(t)&&$ae.default.function_(t.getBoundary)});var nle=U(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});var tle=Ie("fs"),rle=Ie("util"),ele=Nf(),cit=y4(),uit=rle.promisify(tle.stat);E4.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(ele.default.string(t))return Buffer.byteLength(t);if(ele.default.buffer(t))return t.length;if(cit.default(t))return rle.promisify(t.getLength.bind(t))();if(t instanceof tle.ReadStream){let{size:r}=await uit(t.path);return r===0?void 0:r}}});var I4=U(C4=>{"use strict";Object.defineProperty(C4,"__esModule",{value:!0});function Ait(t,e,r){let o={};for(let a of r)o[a]=(...n)=>{e.emit(a,...n)},t.on(a,o[a]);return()=>{for(let a of r)t.off(a,o[a])}}C4.default=Ait});var ile=U(w4=>{"use strict";Object.defineProperty(w4,"__esModule",{value:!0});w4.default=()=>{let t=[];return{once(e,r,o){e.once(r,o),t.push({origin:e,event:r,fn:o})},unhandleAll(){for(let e of t){let{origin:r,event:o,fn:a}=e;r.removeListener(o,a)}t.length=0}}}});var ole=U(l1=>{"use strict";Object.defineProperty(l1,"__esModule",{value:!0});l1.TimeoutError=void 0;var fit=Ie("net"),pit=ile(),sle=Symbol("reentry"),hit=()=>{},ex=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};l1.TimeoutError=ex;l1.default=(t,e,r)=>{if(sle in t)return hit;t[sle]=!0;let o=[],{once:a,unhandleAll:n}=pit.default(),u=(w,v,b)=>{var E;let R=setTimeout(v,w,w,b);(E=R.unref)===null||E===void 0||E.call(R);let L=()=>{clearTimeout(R)};return o.push(L),L},{host:A,hostname:p}=r,h=(w,v)=>{t.destroy(new ex(w,v))},C=()=>{for(let w of o)w();n()};if(t.once("error",w=>{if(C(),t.listenerCount("error")===0)throw w}),t.once("close",C),a(t,"response",w=>{a(w,"end",C)}),typeof e.request<"u"&&u(e.request,h,"request"),typeof e.socket<"u"){let w=()=>{h(e.socket,"socket")};t.setTimeout(e.socket,w),o.push(()=>{t.removeListener("timeout",w)})}return a(t,"socket",w=>{var v;let{socketPath:b}=t;if(w.connecting){let E=Boolean(b??fit.isIP((v=p??A)!==null&&v!==void 0?v:"")!==0);if(typeof e.lookup<"u"&&!E&&typeof w.address().address>"u"){let R=u(e.lookup,h,"lookup");a(w,"lookup",R)}if(typeof e.connect<"u"){let R=()=>u(e.connect,h,"connect");E?a(w,"connect",R()):a(w,"lookup",L=>{L===null&&a(w,"connect",R())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&a(w,"connect",()=>{let R=u(e.secureConnect,h,"secureConnect");a(w,"secureConnect",R)})}if(typeof e.send<"u"){let E=()=>u(e.send,h,"send");w.connecting?a(w,"connect",()=>{a(t,"upload-complete",E())}):a(t,"upload-complete",E())}}),typeof e.response<"u"&&a(t,"upload-complete",()=>{let w=u(e.response,h,"response");a(t,"response",w)}),C}});var lle=U(B4=>{"use strict";Object.defineProperty(B4,"__esModule",{value:!0});var ale=Nf();B4.default=t=>{t=t;let e={protocol:t.protocol,hostname:ale.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return ale.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var cle=U(v4=>{"use strict";Object.defineProperty(v4,"__esModule",{value:!0});var git=Ie("url"),dit=["protocol","host","hostname","port","pathname","search"];v4.default=(t,e)=>{var r,o;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(o=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&o!==void 0?o:""}`}let a=new git.URL(t);if(e.path){let n=e.path.indexOf("?");n===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,n),e.search=e.path.slice(n+1)),delete e.path}for(let n of dit)e[n]&&(a[n]=e[n].toString());return a}});var ule=U(S4=>{"use strict";Object.defineProperty(S4,"__esModule",{value:!0});var D4=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};S4.default=D4});var x4=U(P4=>{"use strict";Object.defineProperty(P4,"__esModule",{value:!0});var mit=async t=>{let e=[],r=0;for await(let o of t)e.push(o),r+=Buffer.byteLength(o);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};P4.default=mit});var fle=U(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.dnsLookupIpVersionToFamily=Qd.isDnsLookupIpVersion=void 0;var Ale={auto:0,ipv4:4,ipv6:6};Qd.isDnsLookupIpVersion=t=>t in Ale;Qd.dnsLookupIpVersionToFamily=t=>{if(Qd.isDnsLookupIpVersion(t))return Ale[t];throw new Error("Invalid DNS lookup IP version")}});var b4=U(tx=>{"use strict";Object.defineProperty(tx,"__esModule",{value:!0});tx.isResponseOk=void 0;tx.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var hle=U(Q4=>{"use strict";Object.defineProperty(Q4,"__esModule",{value:!0});var ple=new Set;Q4.default=t=>{ple.has(t)||(ple.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var gle=U(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0});var ai=Nf(),yit=(t,e)=>{if(ai.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");ai.assert.any([ai.default.string,ai.default.undefined],t.encoding),ai.assert.any([ai.default.boolean,ai.default.undefined],t.resolveBodyOnly),ai.assert.any([ai.default.boolean,ai.default.undefined],t.methodRewriting),ai.assert.any([ai.default.boolean,ai.default.undefined],t.isStream),ai.assert.any([ai.default.string,ai.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:o=>o.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},ai.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(o=>o.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):ai.default.number(r)&&(t.retry.limit=r),ai.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(ai.default.number))),ai.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:o}=t;if(!ai.default.function_(o.transform))throw new Error("`options.pagination.transform` must be implemented");if(!ai.default.function_(o.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!ai.default.function_(o.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!ai.default.function_(o.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};k4.default=yit});var dle=U(c1=>{"use strict";Object.defineProperty(c1,"__esModule",{value:!0});c1.retryAfterStatusCodes=void 0;c1.retryAfterStatusCodes=new Set([413,429,503]);var Eit=({attemptCount:t,retryOptions:e,error:r,retryAfter:o})=>{if(t>e.limit)return 0;let a=e.methods.includes(r.options.method),n=e.errorCodes.includes(r.code),u=r.response&&e.statusCodes.includes(r.response.statusCode);if(!a||!n&&!u)return 0;if(r.response){if(o)return e.maxRetryAfter===void 0||o>e.maxRetryAfter?0:o;if(r.response.statusCode===413)return 0}let A=Math.random()*100;return 2**(t-1)*1e3+A};c1.default=Eit});var f1=U(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.UnsupportedProtocolError=yn.ReadError=yn.TimeoutError=yn.UploadError=yn.CacheError=yn.HTTPError=yn.MaxRedirectsError=yn.RequestError=yn.setNonEnumerableProperties=yn.knownHookEvents=yn.withoutBody=yn.kIsNormalizedAlready=void 0;var mle=Ie("util"),yle=Ie("stream"),Cit=Ie("fs"),a0=Ie("url"),Ele=Ie("http"),F4=Ie("http"),Iit=Ie("https"),wit=Toe(),Bit=Hoe(),Cle=Eae(),vit=Bae(),Dit=Zae(),Sit=zP(),nt=Nf(),Pit=nle(),Ile=y4(),xit=I4(),wle=ole(),bit=lle(),Ble=cle(),Qit=ule(),kit=x4(),vle=fle(),Fit=b4(),l0=hle(),Rit=gle(),Tit=dle(),R4,zs=Symbol("request"),ix=Symbol("response"),DE=Symbol("responseSize"),SE=Symbol("downloadedSize"),PE=Symbol("bodySize"),xE=Symbol("uploadedSize"),rx=Symbol("serverResponsesPiped"),Dle=Symbol("unproxyEvents"),Sle=Symbol("isFromCache"),T4=Symbol("cancelTimeouts"),Ple=Symbol("startedReading"),bE=Symbol("stopReading"),nx=Symbol("triggerRead"),c0=Symbol("body"),u1=Symbol("jobs"),xle=Symbol("originalResponse"),ble=Symbol("retryTimeout");yn.kIsNormalizedAlready=Symbol("isNormalizedAlready");var Nit=nt.default.string(process.versions.brotli);yn.withoutBody=new Set(["GET","HEAD"]);yn.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function Lit(t){for(let e in t){let r=t[e];if(!nt.default.string(r)&&!nt.default.number(r)&&!nt.default.boolean(r)&&!nt.default.null_(r)&&!nt.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function Oit(t){return nt.default.object(t)&&!("statusCode"in t)}var N4=new Qit.default,Mit=async t=>new Promise((e,r)=>{let o=a=>{r(a)};t.pending||e(),t.once("error",o),t.once("ready",()=>{t.off("error",o),e()})}),Uit=new Set([300,301,302,303,304,307,308]),_it=["context","body","json","form"];yn.setNonEnumerableProperties=(t,e)=>{let r={};for(let o of t)if(!!o)for(let a of _it)a in o&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:o[a]});Object.defineProperties(e,r)};var Vi=class extends Error{constructor(e,r,o){var a;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code,o instanceof Ax?(Object.defineProperty(this,"request",{enumerable:!1,value:o}),Object.defineProperty(this,"response",{enumerable:!1,value:o[ix]}),Object.defineProperty(this,"options",{enumerable:!1,value:o.options})):Object.defineProperty(this,"options",{enumerable:!1,value:o}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,nt.default.string(r.stack)&&nt.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,u=this.stack.slice(n).split(`
138`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
139`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
140`)}${A.reverse().join(`
141`)}`}}};yn.RequestError=Vi;var sx=class extends Vi{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};yn.MaxRedirectsError=sx;var ox=class extends Vi{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};yn.HTTPError=ox;var ax=class extends Vi{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};yn.CacheError=ax;var lx=class extends Vi{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};yn.UploadError=lx;var cx=class extends Vi{constructor(e,r,o){super(e.message,e,o),this.name="TimeoutError",this.event=e.event,this.timings=r}};yn.TimeoutError=cx;var A1=class extends Vi{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};yn.ReadError=A1;var ux=class extends Vi{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};yn.UnsupportedProtocolError=ux;var Hit=["socket","connect","continue","information","upgrade","timeout"],Ax=class extends yle.Duplex{constructor(e,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[SE]=0,this[xE]=0,this.requestInitialized=!1,this[rx]=new Set,this.redirects=[],this[bE]=!1,this[nx]=!1,this[u1]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof F4.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),yn.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,o)}catch(h){nt.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Cit.ReadStream&&await Mit(this.options.body);let{url:C}=this.options;if(!C)throw new TypeError("Missing `url` property");if(this.requestUrl=C.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[zs])===null||h===void 0||h.destroy();return}for(let w of this[u1])w();this[u1].length=0,this.requestInitialized=!0}catch(C){if(C instanceof Vi){this._beforeError(C);return}this.destroyed||this.destroy(C)}})()}static normalizeArguments(e,r,o){var a,n,u,A,p;let h=r;if(nt.default.object(e)&&!nt.default.urlInstance(e))r={...o,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},e!==void 0&&(r.url=e),nt.default.urlInstance(r.url)&&(r.url=new a0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),nt.assert.any([nt.default.string,nt.default.undefined],r.method),nt.assert.any([nt.default.object,nt.default.undefined],r.headers),nt.assert.any([nt.default.string,nt.default.urlInstance,nt.default.undefined],r.prefixUrl),nt.assert.any([nt.default.object,nt.default.undefined],r.cookieJar),nt.assert.any([nt.default.object,nt.default.string,nt.default.undefined],r.searchParams),nt.assert.any([nt.default.object,nt.default.string,nt.default.undefined],r.cache),nt.assert.any([nt.default.object,nt.default.number,nt.default.undefined],r.timeout),nt.assert.any([nt.default.object,nt.default.undefined],r.context),nt.assert.any([nt.default.object,nt.default.undefined],r.hooks),nt.assert.any([nt.default.boolean,nt.default.undefined],r.decompress),nt.assert.any([nt.default.boolean,nt.default.undefined],r.ignoreInvalidCookies),nt.assert.any([nt.default.boolean,nt.default.undefined],r.followRedirect),nt.assert.any([nt.default.number,nt.default.undefined],r.maxRedirects),nt.assert.any([nt.default.boolean,nt.default.undefined],r.throwHttpErrors),nt.assert.any([nt.default.boolean,nt.default.undefined],r.http2),nt.assert.any([nt.default.boolean,nt.default.undefined],r.allowGetBody),nt.assert.any([nt.default.string,nt.default.undefined],r.localAddress),nt.assert.any([vle.isDnsLookupIpVersion,nt.default.undefined],r.dnsLookupIpVersion),nt.assert.any([nt.default.object,nt.default.undefined],r.https),nt.assert.any([nt.default.boolean,nt.default.undefined],r.rejectUnauthorized),r.https&&(nt.assert.any([nt.default.boolean,nt.default.undefined],r.https.rejectUnauthorized),nt.assert.any([nt.default.function_,nt.default.undefined],r.https.checkServerIdentity),nt.assert.any([nt.default.string,nt.default.object,nt.default.array,nt.default.undefined],r.https.certificateAuthority),nt.assert.any([nt.default.string,nt.default.object,nt.default.array,nt.default.undefined],r.https.key),nt.assert.any([nt.default.string,nt.default.object,nt.default.array,nt.default.undefined],r.https.certificate),nt.assert.any([nt.default.string,nt.default.undefined],r.https.passphrase),nt.assert.any([nt.default.string,nt.default.buffer,nt.default.array,nt.default.undefined],r.https.pfx)),nt.assert.any([nt.default.object,nt.default.undefined],r.cacheOptions),nt.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===(o==null?void 0:o.headers)?r.headers={...r.headers}:r.headers=Sit({...o==null?void 0:o.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==(o==null?void 0:o.searchParams)){let b;if(nt.default.string(r.searchParams)||r.searchParams instanceof a0.URLSearchParams)b=new a0.URLSearchParams(r.searchParams);else{Lit(r.searchParams),b=new a0.URLSearchParams;for(let E in r.searchParams){let R=r.searchParams[E];R===null?b.append(E,""):R!==void 0&&b.append(E,R)}}(a=o==null?void 0:o.searchParams)===null||a===void 0||a.forEach((E,R)=>{b.has(R)||b.append(R,E)}),r.searchParams=b}if(r.username=(n=r.username)!==null&&n!==void 0?n:"",r.password=(u=r.password)!==null&&u!==void 0?u:"",nt.default.undefined(r.prefixUrl)?r.prefixUrl=(A=o==null?void 0:o.prefixUrl)!==null&&A!==void 0?A:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),nt.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=Ble.default(r.prefixUrl+r.url,r)}else(nt.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=Ble.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:b}=r;Object.defineProperty(r,"prefixUrl",{set:R=>{let L=r.url;if(!L.href.startsWith(R))throw new Error(`Cannot change \`prefixUrl\` from ${b} to ${R}: ${L.href}`);r.url=new a0.URL(R+L.href.slice(b.length)),b=R},get:()=>b});let{protocol:E}=r.url;if(E==="unix:"&&(E="http:",r.url=new a0.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),E!=="http:"&&E!=="https:")throw new ux(r);r.username===""?r.username=r.url.username:r.url.username=r.username,r.password===""?r.password=r.url.password:r.url.password=r.password}let{cookieJar:C}=r;if(C){let{setCookie:b,getCookieString:E}=C;nt.assert.function_(b),nt.assert.function_(E),b.length===4&&E.length===0&&(b=mle.promisify(b.bind(r.cookieJar)),E=mle.promisify(E.bind(r.cookieJar)),r.cookieJar={setCookie:b,getCookieString:E})}let{cache:w}=r;if(w&&(N4.has(w)||N4.set(w,new Cle((b,E)=>{let R=b[zs](b,E);return nt.default.promise(R)&&(R.once=(L,_)=>{if(L==="error")R.catch(_);else if(L==="abort")(async()=>{try{(await R).once("abort",_)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${L}`);return R}),R},w))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)R4||(R4=new Bit.default),r.dnsCache=R4;else if(!nt.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${nt.default(r.dnsCache)}`);nt.default.number(r.timeout)?r.timeout={request:r.timeout}:o&&r.timeout!==o.timeout?r.timeout={...o.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let v=r.hooks===(o==null?void 0:o.hooks);r.hooks={...r.hooks};for(let b of yn.knownHookEvents)if(b in r.hooks)if(nt.default.array(r.hooks[b]))r.hooks[b]=[...r.hooks[b]];else throw new TypeError(`Parameter \`${b}\` must be an Array, got ${nt.default(r.hooks[b])}`);else r.hooks[b]=[];if(o&&!v)for(let b of yn.knownHookEvents)o.hooks[b].length>0&&(r.hooks[b]=[...o.hooks[b],...r.hooks[b]]);if("family"in r&&l0.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),o!=null&&o.https&&(r.https={...o.https,...r.https}),"rejectUnauthorized"in r&&l0.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&l0.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&l0.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&l0.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&l0.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&l0.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&l0.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent){for(let b in r.agent)if(b!=="http"&&b!=="https"&&b!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${b}\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,yn.setNonEnumerableProperties([o,h],r),Rit.default(r,o)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,o=!nt.default.undefined(e.form),a=!nt.default.undefined(e.json),n=!nt.default.undefined(e.body),u=o||a||n,A=yn.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=A,u){if(A)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([n,o,a].filter(p=>p).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(n&&!(e.body instanceof yle.Readable)&&!nt.default.string(e.body)&&!nt.default.buffer(e.body)&&!Ile.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(o&&!nt.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let p=!nt.default.string(r["content-type"]);n?(Ile.default(e.body)&&p&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[c0]=e.body):o?(p&&(r["content-type"]="application/x-www-form-urlencoded"),this[c0]=new a0.URLSearchParams(e.form).toString()):(p&&(r["content-type"]="application/json"),this[c0]=e.stringifyJson(e.json));let h=await Pit.default(this[c0],e.headers);nt.default.undefined(r["content-length"])&&nt.default.undefined(r["transfer-encoding"])&&!A&&!nt.default.undefined(h)&&(r["content-length"]=String(h))}}else A?this._lockWrite():this._unlockWrite();this[PE]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:o}=r;this[xle]=e,r.decompress&&(e=vit(e));let a=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:Ele.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[Sle]=n.isFromCache,this[DE]=Number(e.headers["content-length"])||void 0,this[ix]=e,e.once("end",()=>{this[DE]=this[SE],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",A=>{e.destroy(),this._beforeError(new A1(A,this))}),e.once("aborted",()=>{this._beforeError(new A1({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let u=e.headers["set-cookie"];if(nt.default.object(r.cookieJar)&&u){let A=u.map(async p=>r.cookieJar.setCookie(p,o.toString()));r.ignoreInvalidCookies&&(A=A.map(async p=>p.catch(()=>{})));try{await Promise.all(A)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&e.headers.location&&Uit.has(a)){if(e.resume(),this[zs]&&(this[T4](),delete this[zs],this[Dle]()),(a===303&&r.method!=="GET"&&r.method!=="HEAD"||!r.methodRewriting)&&(r.method="GET","body"in r&&delete r.body,"json"in r&&delete r.json,"form"in r&&delete r.form,this[c0]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new sx(this));return}try{let p=Buffer.from(e.headers.location,"binary").toString(),h=new a0.URL(p,o),C=h.toString();decodeURI(C),h.hostname!==o.hostname||h.port!==o.port?("host"in r.headers&&delete r.headers.host,"cookie"in r.headers&&delete r.headers.cookie,"authorization"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username="",r.password="")):(h.username=r.username,h.password=r.password),this.redirects.push(C),r.url=h;for(let w of r.hooks.beforeRedirect)await w(r,n);this.emit("redirect",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!Fit.isResponseOk(n)){this._beforeError(new ox(n));return}e.on("readable",()=>{this[nx]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let A of this[rx])if(!A.headersSent){for(let p in e.headers){let h=r.decompress?p!=="content-encoding":!0,C=e.headers[p];h&&A.setHeader(p,C)}A.statusCode=a}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:o,url:a}=r;wit.default(e),this[T4]=wle.default(e,o,a);let n=r.cache?"cacheableResponse":"response";e.once(n,p=>{this._onResponse(p)}),e.once("error",p=>{var h;e.destroy(),(h=e.res)===null||h===void 0||h.removeAllListeners("end"),p=p instanceof wle.TimeoutError?new cx(p,this.timings,this):new Vi(p.message,p,this),this._beforeError(p)}),this[Dle]=xit.default(e,this,Hit),this[zs]=e,this.emit("uploadProgress",this.uploadProgress);let u=this[c0],A=this.redirects.length===0?this:e;nt.default.nodeStream(u)?(u.pipe(A),u.once("error",p=>{this._beforeError(new lx(p,this))})):(this._unlockWrite(),nt.default.undefined(u)?(this._cannotHaveBody||this._noPipe)&&(A.end(),this._lockWrite()):(this._writeRequest(u,void 0,()=>{}),A.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,r){return new Promise((o,a)=>{Object.assign(r,bit.default(e)),delete r.url;let n,u=N4.get(r.cache)(r,async A=>{A._readableState.autoDestroy=!1,n&&(await n).emit("cacheableResponse",A),o(A)});r.url=e,u.once("error",a),u.once("request",async A=>{n=A,o(n)})})}async _makeRequest(){var e,r,o,a,n;let{options:u}=this,{headers:A}=u;for(let _ in A)if(nt.default.undefined(A[_]))delete A[_];else if(nt.default.null_(A[_]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${_}\` header`);if(u.decompress&&nt.default.undefined(A["accept-encoding"])&&(A["accept-encoding"]=Nit?"gzip, deflate, br":"gzip, deflate"),u.cookieJar){let _=await u.cookieJar.getCookieString(u.url.toString());nt.default.nonEmptyString(_)&&(u.headers.cookie=_)}for(let _ of u.hooks.beforeRequest){let V=await _(u);if(!nt.default.undefined(V)){u.request=()=>V;break}}u.body&&this[c0]!==u.body&&(this[c0]=u.body);let{agent:p,request:h,timeout:C,url:w}=u;if(u.dnsCache&&!("lookup"in u)&&(u.lookup=u.dnsCache.lookup),w.hostname==="unix"){let _=/(?<socketPath>.+?):(?<path>.+)/.exec(`${w.pathname}${w.search}`);if(_!=null&&_.groups){let{socketPath:V,path:re}=_.groups;Object.assign(u,{socketPath:V,path:re,host:""})}}let v=w.protocol==="https:",b;u.http2?b=Dit.auto:b=v?Iit.request:Ele.request;let E=(e=u.request)!==null&&e!==void 0?e:b,R=u.cache?this._createCacheableRequest:E;p&&!u.http2&&(u.agent=p[v?"https":"http"]),u[zs]=E,delete u.request,delete u.timeout;let L=u;if(L.shared=(r=u.cacheOptions)===null||r===void 0?void 0:r.shared,L.cacheHeuristic=(o=u.cacheOptions)===null||o===void 0?void 0:o.cacheHeuristic,L.immutableMinTimeToLive=(a=u.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,L.ignoreCargoCult=(n=u.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,u.dnsLookupIpVersion!==void 0)try{L.family=vle.dnsLookupIpVersionToFamily(u.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}u.https&&("rejectUnauthorized"in u.https&&(L.rejectUnauthorized=u.https.rejectUnauthorized),u.https.checkServerIdentity&&(L.checkServerIdentity=u.https.checkServerIdentity),u.https.certificateAuthority&&(L.ca=u.https.certificateAuthority),u.https.certificate&&(L.cert=u.https.certificate),u.https.key&&(L.key=u.https.key),u.https.passphrase&&(L.passphrase=u.https.passphrase),u.https.pfx&&(L.pfx=u.https.pfx));try{let _=await R(w,L);nt.default.undefined(_)&&(_=b(w,L)),u.request=h,u.timeout=C,u.agent=p,u.https&&("rejectUnauthorized"in u.https&&delete L.rejectUnauthorized,u.https.checkServerIdentity&&delete L.checkServerIdentity,u.https.certificateAuthority&&delete L.ca,u.https.certificate&&delete L.cert,u.https.key&&delete L.key,u.https.passphrase&&delete L.passphrase,u.https.pfx&&delete L.pfx),Oit(_)?this._onRequest(_):this.writable?(this.once("finish",()=>{this._onResponse(_)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(_)}catch(_){throw _ instanceof Cle.CacheError?new ax(_,this):new Vi(_.message,_,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new Vi(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[bE])return;let{options:r}=this,o=this.retryCount+1;this[bE]=!0,e instanceof Vi||(e=new Vi(e.message,e,this));let a=e,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await kit.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let u;try{let A;n&&"retry-after"in n.headers&&(A=Number(n.headers["retry-after"]),Number.isNaN(A)?(A=Date.parse(n.headers["retry-after"])-Date.now(),A<=0&&(A=1)):A*=1e3),u=await r.retry.calculateDelay({attemptCount:o,retryOptions:r.retry,error:a,retryAfter:A,computedValue:Tit.default({attemptCount:o,retryOptions:r.retry,error:a,retryAfter:A,computedValue:0})})}catch(A){this._error(new Vi(A.message,A,this));return}if(u){let A=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,o)}catch(p){this._error(new Vi(p.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",o,e))};this[ble]=setTimeout(A,u);return}}this._error(a)})()}_read(){this[nx]=!0;let e=this[ix];if(e&&!this[bE]){e.readableLength&&(this[nx]=!1);let r;for(;(r=e.read())!==null;){this[SE]+=r.length,this[Ple]=!0;let o=this.downloadProgress;o.percent<1&&this.emit("downloadProgress",o),this.push(r)}}}_write(e,r,o){let a=()=>{this._writeRequest(e,r,o)};this.requestInitialized?a():this[u1].push(a)}_writeRequest(e,r,o){this[zs].destroyed||(this._progressCallbacks.push(()=>{this[xE]+=Buffer.byteLength(e,r);let a=this.uploadProgress;a.percent<1&&this.emit("uploadProgress",a)}),this[zs].write(e,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),o(a)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(zs in this)){e();return}if(this[zs].destroyed){e();return}this[zs].end(o=>{o||(this[PE]=this[xE],this.emit("uploadProgress",this.uploadProgress),this[zs].emit("upload-complete")),e(o)})};this.requestInitialized?r():this[u1].push(r)}_destroy(e,r){var o;this[bE]=!0,clearTimeout(this[ble]),zs in this&&(this[T4](),!((o=this[ix])===null||o===void 0)&&o.complete||this[zs].destroy()),e!==null&&!nt.default.undefined(e)&&!(e instanceof Vi)&&(e=new Vi(e.message,e,this)),r(e)}get _isAboutToError(){return this[bE]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,o;return((r=(e=this[zs])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((o=this[xle])===null||o===void 0)&&o.complete)}get socket(){var e,r;return(r=(e=this[zs])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[DE]?e=this[SE]/this[DE]:this[DE]===this[SE]?e=1:e=0,{percent:e,transferred:this[SE],total:this[DE]}}get uploadProgress(){let e;return this[PE]?e=this[xE]/this[PE]:this[PE]===this[xE]?e=1:e=0,{percent:e,transferred:this[xE],total:this[PE]}}get timings(){var e;return(e=this[zs])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[Sle]}pipe(e,r){if(this[Ple])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof F4.ServerResponse&&this[rx].add(e),super.pipe(e,r)}unpipe(e){return e instanceof F4.ServerResponse&&this[rx].delete(e),super.unpipe(e),this}};yn.default=Ax});var p1=U(Vc=>{"use strict";var qit=Vc&&Vc.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),jit=Vc&&Vc.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qit(e,t,r)};Object.defineProperty(Vc,"__esModule",{value:!0});Vc.CancelError=Vc.ParseError=void 0;var Qle=f1(),L4=class extends Qle.RequestError{constructor(e,r){let{options:o}=r.request;super(`${e.message} in "${o.url.toString()}"`,e,r.request),this.name="ParseError"}};Vc.ParseError=L4;var O4=class extends Qle.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError"}get isCanceled(){return!0}};Vc.CancelError=O4;jit(f1(),Vc)});var Fle=U(M4=>{"use strict";Object.defineProperty(M4,"__esModule",{value:!0});var kle=p1(),Git=(t,e,r,o)=>{let{rawBody:a}=t;try{if(e==="text")return a.toString(o);if(e==="json")return a.length===0?"":r(a.toString());if(e==="buffer")return a;throw new kle.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(n){throw new kle.ParseError(n,t)}};M4.default=Git});var U4=U(u0=>{"use strict";var Wit=u0&&u0.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),Yit=u0&&u0.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Wit(e,t,r)};Object.defineProperty(u0,"__esModule",{value:!0});var Kit=Ie("events"),Vit=Nf(),Jit=Foe(),fx=p1(),Rle=Fle(),Tle=f1(),zit=I4(),Xit=x4(),Nle=b4(),Zit=["request","response","redirect","uploadProgress","downloadProgress"];function Lle(t){let e,r,o=new Kit.EventEmitter,a=new Jit((u,A,p)=>{let h=C=>{let w=new Tle.default(void 0,t);w.retryCount=C,w._noPipe=!0,p(()=>w.destroy()),p.shouldReject=!1,p(()=>A(new fx.CancelError(w))),e=w,w.once("response",async E=>{var R;if(E.retryCount=C,E.request.aborted)return;let L;try{L=await Xit.default(w),E.rawBody=L}catch{return}if(w._isAboutToError)return;let _=((R=E.headers["content-encoding"])!==null&&R!==void 0?R:"").toLowerCase(),V=["gzip","deflate","br"].includes(_),{options:re}=w;if(V&&!re.decompress)E.body=L;else try{E.body=Rle.default(E,re.responseType,re.parseJson,re.encoding)}catch(ae){if(E.body=L.toString(),Nle.isResponseOk(E)){w._beforeError(ae);return}}try{for(let[ae,he]of re.hooks.afterResponse.entries())E=await he(E,async pe=>{let De=Tle.default.normalizeArguments(void 0,{...pe,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},re);De.hooks.afterResponse=De.hooks.afterResponse.slice(0,ae);for(let le of De.hooks.beforeRetry)await le(De);let ge=Lle(De);return p(()=>{ge.catch(()=>{}),ge.cancel()}),ge})}catch(ae){w._beforeError(new fx.RequestError(ae.message,ae,w));return}if(!Nle.isResponseOk(E)){w._beforeError(new fx.HTTPError(E));return}r=E,u(w.options.resolveBodyOnly?E.body:E)});let v=E=>{if(a.isCanceled)return;let{options:R}=w;if(E instanceof fx.HTTPError&&!R.throwHttpErrors){let{response:L}=E;u(w.options.resolveBodyOnly?L.body:L);return}A(E)};w.once("error",v);let b=w.options.body;w.once("retry",(E,R)=>{var L,_;if(b===((L=R.request)===null||L===void 0?void 0:L.options.body)&&Vit.default.nodeStream((_=R.request)===null||_===void 0?void 0:_.options.body)){v(R);return}h(E)}),zit.default(w,o,Zit)};h(0)});a.on=(u,A)=>(o.on(u,A),a);let n=u=>{let A=(async()=>{await a;let{options:p}=r.request;return Rle.default(r,u,p.parseJson,p.encoding)})();return Object.defineProperties(A,Object.getOwnPropertyDescriptors(a)),A};return a.json=()=>{let{headers:u}=e.options;return!e.writableFinished&&u.accept===void 0&&(u.accept="application/json"),n("json")},a.buffer=()=>n("buffer"),a.text=()=>n("text"),a}u0.default=Lle;Yit(p1(),u0)});var Ole=U(_4=>{"use strict";Object.defineProperty(_4,"__esModule",{value:!0});var $it=p1();function est(t,...e){let r=(async()=>{if(t instanceof $it.RequestError)try{for(let a of e)if(a)for(let n of a)t=await n(t)}catch(a){t=a}throw t})(),o=()=>r;return r.json=o,r.text=o,r.buffer=o,r.on=o,r}_4.default=est});var _le=U(H4=>{"use strict";Object.defineProperty(H4,"__esModule",{value:!0});var Mle=Nf();function Ule(t){for(let e of Object.values(t))(Mle.default.plainObject(e)||Mle.default.array(e))&&Ule(e);return Object.freeze(t)}H4.default=Ule});var qle=U(Hle=>{"use strict";Object.defineProperty(Hle,"__esModule",{value:!0})});var q4=U(tc=>{"use strict";var tst=tc&&tc.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),rst=tc&&tc.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tst(e,t,r)};Object.defineProperty(tc,"__esModule",{value:!0});tc.defaultHandler=void 0;var jle=Nf(),ec=U4(),nst=Ole(),hx=f1(),ist=_le(),sst={RequestError:ec.RequestError,CacheError:ec.CacheError,ReadError:ec.ReadError,HTTPError:ec.HTTPError,MaxRedirectsError:ec.MaxRedirectsError,TimeoutError:ec.TimeoutError,ParseError:ec.ParseError,CancelError:ec.CancelError,UnsupportedProtocolError:ec.UnsupportedProtocolError,UploadError:ec.UploadError},ost=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:px}=hx.default,Gle=(...t)=>{let e;for(let r of t)e=px(void 0,r,e);return e},ast=t=>t.isStream?new hx.default(void 0,t):ec.default(t),lst=t=>"defaults"in t&&"options"in t.defaults,cst=["get","post","put","patch","head","delete"];tc.defaultHandler=(t,e)=>e(t);var Wle=(t,e)=>{if(t)for(let r of t)r(e)},Yle=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(o=>(a,n)=>{let u,A=o(a,p=>(u=n(p),u));if(A!==u&&!a.isStream&&u){let p=A,{then:h,catch:C,finally:w}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(u)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(u)),p.then=h,p.catch=C,p.finally=w}return A});let e=(o,a={},n)=>{var u,A;let p=0,h=C=>t.handlers[p++](C,p===t.handlers.length?ast:h);if(jle.default.plainObject(o)){let C={...o,...a};hx.setNonEnumerableProperties([o,a],C),a=C,o=void 0}try{let C;try{Wle(t.options.hooks.init,a),Wle((u=a.hooks)===null||u===void 0?void 0:u.init,a)}catch(v){C=v}let w=px(o,a,n??t.options);if(w[hx.kIsNormalizedAlready]=!0,C)throw new ec.RequestError(C.message,C,w);return h(w)}catch(C){if(a.isStream)throw C;return nst.default(C,t.options.hooks.beforeError,(A=a.hooks)===null||A===void 0?void 0:A.beforeError)}};e.extend=(...o)=>{let a=[t.options],n=[...t._rawHandlers],u;for(let A of o)lst(A)?(a.push(A.defaults.options),n.push(...A.defaults._rawHandlers),u=A.defaults.mutableDefaults):(a.push(A),"handlers"in A&&n.push(...A.handlers),u=A.mutableDefaults);return n=n.filter(A=>A!==tc.defaultHandler),n.length===0&&n.push(tc.defaultHandler),Yle({options:Gle(...a),handlers:n,mutableDefaults:Boolean(u)})};let r=async function*(o,a){let n=px(o,a,t.options);n.resolveBodyOnly=!1;let u=n.pagination;if(!jle.default.object(u))throw new TypeError("`options.pagination` must be implemented");let A=[],{countLimit:p}=u,h=0;for(;h<u.requestLimit;){h!==0&&await ost(u.backoff);let C=await e(void 0,void 0,n),w=await u.transform(C),v=[];for(let E of w)if(u.filter(E,A,v)&&(!u.shouldContinue(E,A,v)||(yield E,u.stackAllItems&&A.push(E),v.push(E),--p<=0)))return;let b=u.paginate(C,A,v);if(b===!1)return;b===C.request.options?n=C.request.options:b!==void 0&&(n=px(void 0,b,n)),h++}};e.paginate=r,e.paginate.all=async(o,a)=>{let n=[];for await(let u of r(o,a))n.push(u);return n},e.paginate.each=r,e.stream=(o,a)=>e(o,{...a,isStream:!0});for(let o of cst)e[o]=(a,n)=>e(a,{...n,method:o}),e.stream[o]=(a,n)=>e(a,{...n,method:o,isStream:!0});return Object.assign(e,sst),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:ist.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=Gle,e};tc.default=Yle;rst(qle(),tc)});var Jle=U((Lf,gx)=>{"use strict";var ust=Lf&&Lf.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),Kle=Lf&&Lf.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ust(e,t,r)};Object.defineProperty(Lf,"__esModule",{value:!0});var Ast=Ie("url"),Vle=q4(),fst={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType==="json"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,"link"))return!1;let e=t.headers.link.split(","),r;for(let o of e){let a=o.split(";");if(a[1].includes("next")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new Ast.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[Vle.defaultHandler],mutableDefaults:!1},j4=Vle.default(fst);Lf.default=j4;gx.exports=j4;gx.exports.default=j4;gx.exports.__esModule=!0;Kle(q4(),Lf);Kle(U4(),Lf)});var ln={};Yt(ln,{Method:()=>rce,del:()=>mst,get:()=>K4,getNetworkSettings:()=>tce,post:()=>V4,put:()=>dst,request:()=>h1});function Zle(t){let e=new dx.URL(t),r={host:e.hostname,headers:{}};return e.port&&(r.port=Number(e.port)),e.username&&e.password&&(r.proxyAuth=`${e.username}:${e.password}`),{proxy:r}}async function G4(t){return Sf(Xle,t,()=>oe.readFilePromise(t).then(e=>(Xle.set(t,e),e)))}function gst({statusCode:t,statusMessage:e},r){let o=Kt(r,t,Bt.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return Xy(r,`${o}${e?` (${e})`:""}`,a)}async function mx(t,{configuration:e,customErrorMessage:r}){var o;try{return await t}catch(a){if(a.name!=="HTTPError")throw a;let n=(r==null?void 0:r(a,e))??((o=a.response.body)==null?void 0:o.error);n==null&&(a.message.startsWith("Response code")?n="The remote server failed to provide the requested resource":n=a.message),a.code==="ETIMEDOUT"&&a.event==="socket"&&(n+=`(can be increased via ${Kt(e,"httpTimeout",Bt.SETTING)})`);let u=new Vt(35,n,A=>{a.response&&A.reportError(35,` ${$u(e,{label:"Response Code",value:Wc(Bt.NO_HINT,gst(a.response,e))})}`),a.request&&(A.reportError(35,` ${$u(e,{label:"Request Method",value:Wc(Bt.NO_HINT,a.request.options.method)})}`),A.reportError(35,` ${$u(e,{label:"Request URL",value:Wc(Bt.URL,a.request.requestUrl)})}`)),a.request.redirects.length>0&&A.reportError(35,` ${$u(e,{label:"Request Redirects",value:Wc(Bt.NO_HINT,vL(e,a.request.redirects,Bt.URL))})}`),a.request.retryCount===a.request.options.retry.limit&&A.reportError(35,` ${$u(e,{label:"Request Retry Count",value:Wc(Bt.NO_HINT,`${Kt(e,a.request.retryCount,Bt.NUMBER)} (can be increased via ${Kt(e,"httpRetry",Bt.SETTING)})`)})}`)});throw u.originalError=a,u}}function tce(t,e){let r=[...e.configuration.get("networkSettings")].sort(([u],[A])=>A.length-u.length),o={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(o),n=typeof t=="string"?new dx.URL(t):t;for(let[u,A]of r)if(Y4.default.isMatch(n.hostname,u))for(let p of a){let h=A.get(p);h!==null&&typeof o[p]>"u"&&(o[p]=h)}for(let u of a)typeof o[u]>"u"&&(o[u]=e.configuration.get(u));return o}async function h1(t,e,{configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u="GET"}){let A=async()=>await yst(t,e,{configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u});return await(await r.reduceHook(h=>h.wrapNetworkRequest,A,{target:t,body:e,configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u}))()}async function K4(t,{configuration:e,jsonResponse:r,customErrorMessage:o,...a}){let n=Sf(zle,t,()=>mx(h1(t,null,{configuration:e,...a}),{configuration:e,customErrorMessage:o}).then(u=>(zle.set(t,u.body),u.body)));return Buffer.isBuffer(n)===!1&&(n=await n),r?JSON.parse(n.toString()):n}async function dst(t,e,{customErrorMessage:r,...o}){return(await mx(h1(t,e,{...o,method:"PUT"}),{customErrorMessage:r,configuration:o.configuration})).body}async function V4(t,e,{customErrorMessage:r,...o}){return(await mx(h1(t,e,{...o,method:"POST"}),{customErrorMessage:r,configuration:o.configuration})).body}async function mst(t,{customErrorMessage:e,...r}){return(await mx(h1(t,null,{...r,method:"DELETE"}),{customErrorMessage:e,configuration:r.configuration})).body}async function yst(t,e,{configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u="GET"}){let A=typeof t=="string"?new dx.URL(t):t,p=tce(A,{configuration:r});if(p.enableNetwork===!1)throw new Vt(80,`Request to '${A.href}' has been blocked because of your configuration settings`);if(A.protocol==="http:"&&!Y4.default.isMatch(A.hostname,r.get("unsafeHttpWhitelist")))throw new Vt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${A.hostname})`);let C={agent:{http:p.httpProxy?W4.default.httpOverHttp(Zle(p.httpProxy)):pst,https:p.httpsProxy?W4.default.httpsOverHttp(Zle(p.httpsProxy)):hst},headers:o,method:u};C.responseType=n?"json":"buffer",e!==null&&(Buffer.isBuffer(e)||!a&&typeof e=="string"?C.body=e:C.json=e);let w=r.get("httpTimeout"),v=r.get("httpRetry"),b=r.get("enableStrictSsl"),E=p.httpsCaFilePath,R=p.httpsCertFilePath,L=p.httpsKeyFilePath,{default:_}=await Promise.resolve().then(()=>tt(Jle())),V=E?await G4(E):void 0,re=R?await G4(R):void 0,ae=L?await G4(L):void 0,he=_.extend({timeout:{socket:w},retry:v,https:{rejectUnauthorized:b,certificateAuthority:V,certificate:re,key:ae},...C});return r.getLimit("networkConcurrency")(()=>he(A))}var $le,ece,Y4,W4,dx,zle,Xle,pst,hst,rce,yx=dt(()=>{St();$le=Ie("https"),ece=Ie("http"),Y4=tt(zo()),W4=tt(Poe()),dx=Ie("url");Zl();zl();Vl();zle=new Map,Xle=new Map,pst=new ece.Agent({keepAlive:!0}),hst=new $le.Agent({keepAlive:!0});rce=(a=>(a.GET="GET",a.PUT="PUT",a.POST="POST",a.DELETE="DELETE",a))(rce||{})});var As={};Yt(As,{availableParallelism:()=>X4,builtinModules:()=>J4,getArchitecture:()=>g1,getArchitectureName:()=>Ist,getArchitectureSet:()=>z4,getCaller:()=>Dst,openUrl:()=>Est});function J4(){return new Set(oce.default.builtinModules||Object.keys(process.binding("natives")))}function Cst(){var o;if(process.platform==="win32")return null;let e=(((o=process.report)==null?void 0:o.getReport())??{}).sharedObjects??[],r=/\/(?:(ld-linux-|[^/]+-linux-gnu\/)|(libc.musl-|ld-musl-))/;return Mw(e,a=>{let n=a.match(r);if(!n)return Mw.skip;if(n[1])return"glibc";if(n[2])return"musl";throw new Error("Assertion failed: Expected the libc variant to have been detected")})??null}function g1(){return ice=ice??{os:process.platform,cpu:process.arch,libc:Cst()}}function Ist(t=g1()){return t.libc?`${t.os}-${t.cpu}-${t.libc}`:`${t.os}-${t.cpu}`}function z4(){let t=g1();return sce=sce??{os:[t.os],cpu:[t.cpu],libc:t.libc?[t.libc]:[]}}function vst(t){let e=wst.exec(t);if(!e)return null;let r=e[2]&&e[2].indexOf("native")===0,o=e[2]&&e[2].indexOf("eval")===0,a=Bst.exec(e[2]);return o&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:r?null:e[2],methodName:e[1]||"<unknown>",arguments:r?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}function Dst(){let e=new Error().stack.split(`
142`)[3];return vst(e)}function X4(){return"availableParallelism"in Ex.default?Ex.default.availableParallelism():Math.max(1,Ex.default.cpus().length)}var oce,Ex,nce,Est,ice,sce,wst,Bst,d1=dt(()=>{St();oce=tt(Ie("module")),Ex=tt(Ie("os"));Cx();Vl();nce=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),Est=typeof nce<"u"?async t=>{try{return await Z4(nce,[t],{cwd:J.cwd()}),!0}catch{return!1}}:void 0;wst=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Bst=/\((\S*)(?::(\d+))(?::(\d+))\)/});function nU(t,e,r,o,a){let n=n1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>$4(t,`${e}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>$4(t,e,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return $4(t,e,r,o,a)}function $4(t,e,r,o,a){var p;let n=n1(r);switch(o.type){case"ANY":return _P(n);case"SHAPE":return bst(t,e,r,o,a);case"MAP":return Qst(t,e,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if((p=o.values)!=null&&p.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return Uw(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let h=dL(n,{env:process.env});switch(o.type){case"ABSOLUTE_PATH":{let C=a,w=xM(r);return w&&(C=J.resolve(w,"..")),J.resolve(C,ue.toPortablePath(h))}case"LOCATOR_LOOSE":return Ff(h,!1);case"NUMBER":return parseInt(h);case"LOCATOR":return Ff(h);case"BOOLEAN":return Uw(h);default:return h}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function bst(t,e,r,o,a){let n=n1(r);if(typeof n!="object"||Array.isArray(n))throw new ot(`Object configuration settings "${e}" must be an object`);let u=iU(t,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${e}.${A}`;if(!o.properties[A])throw new ot(`Unrecognized configuration settings found: ${e}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,nU(t,h,p,o.properties[A],a))}return u}function Qst(t,e,r,o,a){let n=n1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new ot(`Map configuration settings "${e}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,C=`${e}['${h}']`,w=o.valueDefinition;u.set(h,nU(t,C,p,w,a))}return u}function iU(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(e.properties))o.set(a,iU(t,n));return o}break;case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?J.isAbsolute(e.default)?J.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(o=>J.resolve(t.projectCwd,o)):J.resolve(t.projectCwd,e.default);default:return e.default}}function wx(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return xst;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return ue.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let o=[];for(let a of t)o.push(wx(a,e,r));return o}if(e.type==="MAP"&&t instanceof Map){let o=new Map;for(let[a,n]of t.entries())o.set(a,wx(n,e.valueDefinition,r));return o}if(e.type==="SHAPE"&&t instanceof Map){let o=new Map;for(let[a,n]of t.entries()){let u=e.properties[a];o.set(a,wx(n,u,r))}return o}return t}function kst(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(vx)&&(e=(0,lce.default)(e.slice(vx.length)),t[e]=r);return t}function Bx(){let t=`${vx}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return tU}var lce,Of,cce,eU,ace,Sst,m1,Pst,QE,vx,tU,rU,xst,y1,uce,Dx,Ix,sU,Jc,Xe,E1=dt(()=>{St();Hc();Hl();lce=tt(fV()),Of=tt(Zg());_t();cce=tt(nd()),eU=Ie("stream");Gse();uE();CM();IM();wM();doe();BM();Sd();Ioe();qP();zl();n0();yx();Vl();d1();s0();Ks();Sst=Of.GITHUB_ACTIONS&&process.env.GITHUB_EVENT_PATH?!(((ace=oe.readJsonSync(ue.toPortablePath(process.env.GITHUB_EVENT_PATH)).repository)==null?void 0:ace.private)??!0):!1,m1=new Set(["@yarnpkg/plugin-constraints","@yarnpkg/plugin-exec","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]),Pst=new Set(["isTestEnv","injectNpmUser","injectNpmPassword","injectNpm2FaToken","binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir","registry"]),QE=/^(?!v)[a-z0-9._-]+$/i,vx="yarn_",tU=".yarnrc.yml",rU="yarn.lock",xst="********",y1=(C=>(C.ANY="ANY",C.BOOLEAN="BOOLEAN",C.ABSOLUTE_PATH="ABSOLUTE_PATH",C.LOCATOR="LOCATOR",C.LOCATOR_LOOSE="LOCATOR_LOOSE",C.NUMBER="NUMBER",C.STRING="STRING",C.SECRET="SECRET",C.SHAPE="SHAPE",C.MAP="MAP",C))(y1||{}),uce=Bt,Dx=(r=>(r.JUNCTIONS="junctions",r.SYMLINKS="symlinks",r))(Dx||{}),Ix={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:"STRING",default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:"ABSOLUTE_PATH",default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:"BOOLEAN",default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:"BOOLEAN",default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:"STRING",default:null},globalFolder:{description:"Folder where all system-global files are stored",type:"ABSOLUTE_PATH",default:QM()},cacheFolder:{description:"Folder where the cache files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:"NUMBER",values:["mixed",0,1,2,3,4,5,6,7,8,9],default:Ay},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)",type:"ABSOLUTE_PATH",default:"./.yarn/__virtual__"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:"STRING",default:rU},installStatePath:{description:"Path of the file where the install state will be persisted",type:"ABSOLUTE_PATH",default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:"STRING",default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:"STRING",default:Bx()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:"BOOLEAN",default:!0},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:"BOOLEAN",default:XS,defaultText:"<dynamic>"},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:"BOOLEAN",default:BL,defaultText:"<dynamic>"},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:"BOOLEAN",default:Of.isCI,defaultText:"<dynamic>"},enableMessageNames:{description:"If true, the CLI will prefix most messages with codes suitable for search engines",type:"BOOLEAN",default:!0},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:"BOOLEAN",default:!Of.isCI,defaultText:"<dynamic>"},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:"BOOLEAN",default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:"BOOLEAN",default:Of.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:"BOOLEAN",default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:"BOOLEAN",default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:"STRING",default:void 0,defaultText:"<dynamic>"},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:"STRING",default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:"STRING",default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:"BOOLEAN",default:!0},supportedArchitectures:{description:"Architectures that Yarn will fetch and inject into the resolver",type:"SHAPE",properties:{os:{description:"Array of supported process.platform strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},cpu:{description:"Array of supported process.arch strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},libc:{description:"Array of supported libc libraries, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]}}},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:"BOOLEAN",default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:"BOOLEAN",default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:"STRING",default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:"NUMBER",default:6e4},httpRetry:{description:"Retry times on http failure",type:"NUMBER",default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:"NUMBER",default:50},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{httpsCaFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:"BOOLEAN",default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null}}}},httpsCaFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:"BOOLEAN",default:!0},logFilters:{description:"Overrides for log levels",type:"SHAPE",isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:"STRING",default:void 0},text:{description:"Code of the texts covered by this override",type:"STRING",default:void 0},pattern:{description:"Code of the patterns covered by this override",type:"STRING",default:void 0},level:{description:"Log level override, set to null to remove override",type:"STRING",values:Object.values($S),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:"BOOLEAN",default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:"NUMBER",default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:"STRING",default:null},enableHardenedMode:{description:"If true, automatically enable --check-resolutions --refresh-lockfile on installs",type:"BOOLEAN",default:Of.isPR&&Sst,defaultText:"<true on public PRs>"},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:"BOOLEAN",default:!0},enableStrictSettings:{description:"If true, unknown settings will cause Yarn to abort",type:"BOOLEAN",default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:"BOOLEAN",default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:"STRING",default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:"MAP",valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:"SHAPE",properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:"MAP",valueDefinition:{description:"A range",type:"STRING"}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:"MAP",valueDefinition:{description:"A semver range",type:"STRING"}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:"MAP",valueDefinition:{description:"The peerDependency meta",type:"SHAPE",properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:"BOOLEAN",default:!1}}}}}}}};sU=(o=>(o[o.LOCKFILE=0]="LOCKFILE",o[o.MANIFEST=1]="MANIFEST",o[o.NONE=2]="NONE",o))(sU||{}),Jc=class{constructor(e){this.isCI=Of.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.packageExtensions=new Map;this.limits=new Map;this.startingCwd=e}static create(e,r,o){let a=new Jc(e);typeof r<"u"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(Ix);let n=typeof o<"u"?o:r instanceof Map?r:new Map;for(let[u,A]of n)a.activatePlugin(u,A);return a}static async find(e,r,{lookup:o=0,strict:a=!0,usePath:n=!1,useRc:u=!0}={}){let A=kst();delete A.rcFilename;let p=await Jc.findRcFiles(e),h=await Jc.findHomeRcFile();h&&(p.find(De=>De.path===h.path)||p.unshift(h));let C=Coe(p.map(pe=>[pe.path,pe.data])),w=".",v=new Set(Object.keys(Ix)),b=({ignoreCwd:pe,yarnPath:De,ignorePath:ge,lockfileFilename:le})=>({ignoreCwd:pe,yarnPath:De,ignorePath:ge,lockfileFilename:le}),E=({ignoreCwd:pe,yarnPath:De,ignorePath:ge,lockfileFilename:le,...Pe})=>{let g={};for(let[ve,Ee]of Object.entries(Pe))v.has(ve)&&(g[ve]=Ee);return g},R=({ignoreCwd:pe,yarnPath:De,ignorePath:ge,lockfileFilename:le,...Pe})=>{let g={};for(let[ve,Ee]of Object.entries(Pe))v.has(ve)||(g[ve]=Ee);return g},L=new Jc(e);if(L.importSettings(b(Ix)),L.useWithSource("<environment>",b(A),e,{strict:!1}),C){let[pe,De]=C;L.useWithSource(pe,b(De),w,{strict:!1})}if(n){let pe=L.get("yarnPath"),De=L.get("ignorePath");if(pe!==null&&!De)return L}let _=L.get("lockfileFilename"),V;switch(o){case 0:V=await Jc.findProjectCwd(e,_);break;case 1:V=await Jc.findProjectCwd(e,null);break;case 2:oe.existsSync(J.join(e,"package.json"))?V=J.resolve(e):V=null;break}if(L.startingCwd=e,L.projectCwd=V,L.importSettings(E(Ix)),L.useWithSource("<environment>",E(A),e,{strict:a}),C){let[pe,De]=C;L.useWithSource(pe,E(De),w,{strict:a})}let re=pe=>"default"in pe?pe.default:pe,ae=new Map([["@@core",jse]]);if(r!==null)for(let pe of r.plugins.keys())ae.set(pe,re(r.modules.get(pe)));for(let[pe,De]of ae)L.activatePlugin(pe,De);let he=new Map([]);if(r!==null){let pe=new Map;for(let le of J4())pe.set(le,()=>zp(le));for(let[le,Pe]of r.modules)pe.set(le,()=>Pe);let De=new Set,ge=async(le,Pe)=>{let{factory:g,name:ve}=zp(le);if(!g||De.has(ve))return;let Ee=new Map(pe),de=Z=>{if(Ee.has(Z))return Ee.get(Z)();throw new ot(`This plugin cannot access the package referenced via ${Z} which is neither a builtin, nor an exposed entry`)},ne=await Vy(async()=>re(await g(de)),Z=>`${Z} (when initializing ${ve}, defined in ${Pe})`);pe.set(ve,()=>ne),De.add(ve),he.set(ve,ne)};if(A.plugins)for(let le of A.plugins.split(";")){let Pe=J.resolve(e,ue.toPortablePath(le));await ge(Pe,"<environment>")}for(let{path:le,cwd:Pe,data:g}of p)if(!!u&&!!Array.isArray(g.plugins))for(let ve of g.plugins){let Ee=typeof ve!="string"?ve.path:ve,de=(ve==null?void 0:ve.spec)??"",ne=(ve==null?void 0:ve.checksum)??"";if(m1.has(de))continue;let Z=J.resolve(Pe,ue.toPortablePath(Ee));if(!await oe.existsPromise(Z)){if(!de){let ut=Kt(L,J.basename(Z,".cjs"),Bt.NAME),H=Kt(L,".gitignore",Bt.NAME),yt=Kt(L,L.values.get("rcFilename"),Bt.NAME),Me=Kt(L,"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored",Bt.URL);throw new ot(`Missing source for the ${ut} plugin - please try to remove the plugin from ${yt} then reinstall it manually. This error usually occurs because ${H} is incorrect, check ${Me} to make sure your plugin folder isn't gitignored.`)}if(!de.match(/^https?:/)){let ut=Kt(L,J.basename(Z,".cjs"),Bt.NAME),H=Kt(L,L.values.get("rcFilename"),Bt.NAME);throw new ot(`Failed to recognize the source for the ${ut} plugin - please try to delete the plugin from ${H} then reinstall it manually.`)}let me=await K4(de,{configuration:L}),be=Vs(me);if(ne&&ne!==be){let ut=Kt(L,J.basename(Z,".cjs"),Bt.NAME),H=Kt(L,L.values.get("rcFilename"),Bt.NAME),yt=Kt(L,`yarn plugin import ${de}`,Bt.CODE);throw new ot(`Failed to fetch the ${ut} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${H} then run ${yt} to reimport it.`)}await oe.mkdirPromise(J.dirname(Z),{recursive:!0}),await oe.writeFilePromise(Z,me)}await ge(Z,le)}}for(let[pe,De]of he)L.activatePlugin(pe,De);if(L.useWithSource("<environment>",R(A),e,{strict:a}),C){let[pe,De]=C;L.useWithSource(pe,R(De),w,{strict:a})}return L.get("enableGlobalCache")&&(L.values.set("cacheFolder",`${L.get("globalFolder")}/cache`),L.sources.set("cacheFolder","<internal>")),await L.refreshPackageExtensions(),L}static async findRcFiles(e){let r=Bx(),o=[],a=e,n=null;for(;a!==n;){n=a;let u=J.join(n,r);if(oe.existsSync(u)){let A=await oe.readFilePromise(u,"utf8"),p;try{p=Yi(A)}catch{let C="";throw A.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(C=" (in particular, make sure you list the colons after each key name)"),new ot(`Parse error when loading ${u}; please check it's proper Yaml${C}`)}o.unshift({path:u,cwd:n,data:p})}a=J.dirname(n)}return o}static async findHomeRcFile(){let e=Bx(),r=mE(),o=J.join(r,e);if(oe.existsSync(o)){let a=await oe.readFilePromise(o,"utf8"),n=Yi(a);return{path:o,cwd:r,data:n}}return null}static async findProjectCwd(e,r){let o=null,a=e,n=null;for(;a!==n;){if(n=a,oe.existsSync(J.join(n,"package.json"))&&(o=n),r!==null){if(oe.existsSync(J.join(n,r))){o=n;break}}else if(o!==null)break;a=J.dirname(n)}return o}static async updateConfiguration(e,r,o={}){let a=Bx(),n=J.join(e,a),u=oe.existsSync(n)?Yi(await oe.readFilePromise(n,"utf8")):{},A=!1,p;if(typeof r=="function"){try{p=r(u)}catch{p=r({})}if(p===u)return!1}else{p=u;for(let h of Object.keys(r)){let C=u[h],w=r[h],v;if(typeof w=="function")try{v=w(C)}catch{v=w(void 0)}else v=w;C!==v&&(v===Jc.deleteProperty?delete p[h]:p[h]=v,A=!0)}if(!A)return!1}return await oe.changeFilePromise(n,Ba(p),{automaticNewlines:!0}),!0}static async addPlugin(e,r){r.length!==0&&await Jc.updateConfiguration(e,o=>{let a=o.plugins??[];if(a.length===0)return{...o,plugins:r};let n=[],u=[...r];for(let A of a){let p=typeof A!="string"?A.path:A,h=u.find(C=>C.path===p);h?(n.push(h),u=u.filter(C=>C!==h)):n.push(A)}return n.push(...u),{...o,plugins:n}})}static async updateHomeConfiguration(e){let r=mE();return await Jc.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration<"u"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,o]of Object.entries(e))if(o!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings "${r}"`);this.settings.set(r,o),this.values.set(r,iU(this,o))}}useWithSource(e,r,o,a){try{this.use(e,r,o,a)}catch(n){throw n.message+=` (in ${Kt(this,e,Bt.PATH)})`,n}}use(e,r,o,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get("enableStrictSettings");for(let u of["enableStrictSettings",...Object.keys(r)]){let A=r[u],p=xM(A);if(p&&(e=p),typeof A>"u"||u==="plugins"||e==="<environment>"&&Pst.has(u))continue;if(u==="rcFilename")throw new ot(`The rcFilename settings can only be set via ${`${vx}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(u);if(!h){let w=mE(),v=J.resolve(e,"..");if(a&&!(w===v))throw new ot(`Unrecognized or legacy configuration settings found: ${u} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(u,e);continue}if(this.sources.has(u)&&!(n||h.type==="MAP"||h.isArray&&h.concatenateValues))continue;let C;try{C=nU(this,u,A,h,o)}catch(w){throw w.message+=` in ${Kt(this,e,Bt.PATH)}`,w}if(u==="enableStrictSettings"&&e!=="<environment>"){a=C;continue}if(h.type==="MAP"){let w=this.values.get(u);this.values.set(u,new Map(n?[...w,...C]:[...C,...w])),this.sources.set(u,`${this.sources.get(u)}, ${e}`)}else if(h.isArray&&h.concatenateValues){let w=this.values.get(u);this.values.set(u,n?[...w,...C]:[...C,...w]),this.sources.set(u,`${this.sources.get(u)}, ${e}`)}else this.values.set(u,C),this.sources.set(u,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:r=!1,getNativePaths:o=!1}){let a=this.get(e),n=this.settings.get(e);if(typeof n>"u")throw new ot(`Couldn't find a configuration settings named "${e}"`);return wx(a,n,{hideSecrets:r,getNativePaths:o})}getSubprocessStreams(e,{header:r,prefix:o,report:a}){let n,u,A=oe.createWriteStream(e);if(this.get("enableInlineBuilds")){let p=a.createStreamReporter(`${o} ${Kt(this,"STDOUT","green")}`),h=a.createStreamReporter(`${o} ${Kt(this,"STDERR","red")}`);n=new eU.PassThrough,n.pipe(p),n.pipe(A),u=new eU.PassThrough,u.pipe(h),u.pipe(A)}else n=A,u=A,typeof r<"u"&&n.write(`${r}
143`);return{stdout:n,stderr:u}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new xd([new t1,new Gn,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new fE([new pE,new gE,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let o of r.linkers||[])e.push(new o);return e}getSupportedArchitectures(){let e=g1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?e.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?e.cpu:u));let n=r.get("libc");return n!==null&&(n=Zu(n,u=>u==="current"?e.libc??Zu.skip:u)),{os:o,cpu:a,libc:n}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!cl(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new Nt;u.load(a,{yamlCompatibilityMode:!0});let A=Yy(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let C of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:C});for(let C of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:C});for(let[C,w]of u.peerDependenciesMeta)for(let[v,b]of Object.entries(w))p.push({...h,type:"PeerDependencyMeta",selector:C,key:v,value:b})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(i0(o,!0),JS(a),{userProvided:!0})}normalizeLocator(e){return cl(e.reference)?us(e,`${this.get("defaultProtocol")}${e.reference}`):QE.test(e.reference)?us(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return cl(e.range)?mn(e,`${this.get("defaultProtocol")}${e.range}`):QE.test(e.range)?mn(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e){let r=Yw(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let o=this.packageExtensions.get(e.identHash);if(typeof o<"u"){let n=e.version;if(n!==null){for(let[u,A]of o)if(!!Pd(n,u))for(let p of A)switch(p.status==="inactive"&&(p.status="redundant"),p.type){case"Dependency":typeof r.dependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.dependencies.set(p.descriptor.identHash,this.normalizeDependency(p.descriptor)));break;case"PeerDependency":typeof r.peerDependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.peerDependencies.set(p.descriptor.identHash,p.descriptor));break;case"PeerDependencyMeta":{let h=r.peerDependenciesMeta.get(p.selector);(typeof h>"u"||!Object.prototype.hasOwnProperty.call(h,p.key)||h[p.key]!==p.value)&&(p.status="active",Sf(r.peerDependenciesMeta,p.selector,()=>({}))[p.key]=p.value)}break;default:hL(p);break}}}let a=n=>n.scope?`${n.scope}__${n.name}`:`${n.name}`;for(let n of r.peerDependenciesMeta.keys()){let u=Ys(n);r.peerDependencies.has(u.identHash)||r.peerDependencies.set(u.identHash,mn(u,"*"))}for(let n of r.peerDependencies.values()){if(n.scope==="types")continue;let u=a(n),A=nA("types",u),p=nn(A);r.peerDependencies.has(A.identHash)||r.peerDependenciesMeta.has(p)||(r.peerDependencies.set(A.identHash,mn(A,"*")),r.peerDependenciesMeta.set(p,{optional:!0}))}return r.dependencies=new Map(xa(r.dependencies,([,n])=>Qa(n))),r.peerDependencies=new Map(xa(r.peerDependencies,([,n])=>Qa(n))),r}getLimit(e){return Sf(this.limits,e,()=>(0,cce.default)(this.get(e)))}async triggerHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);!n||await n(...r)}}async triggerMultipleHooks(e,r){for(let o of r)await this.triggerHook(e,...o)}async reduceHook(e,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=e(u);!A||(a=await A(a,...o))}return a}async firstHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}},Xe=Jc;Xe.deleteProperty=Symbol(),Xe.telemetry=null});var Mr={};Yt(Mr,{EndStrategy:()=>cU,ExecError:()=>Sx,PipeError:()=>C1,execvp:()=>Z4,pipevp:()=>sA});function kd(t){return t!==null&&typeof t.fd=="number"}function oU(){}function aU(){for(let t of Fd)t.kill()}async function sA(t,e,{cwd:r,env:o=process.env,strict:a=!1,stdin:n=null,stdout:u,stderr:A,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":kd(n)&&(h[0]=n),kd(u)&&(h[1]=u),kd(A)&&(h[2]=A);let C=(0,lU.default)(t,e,{cwd:ue.fromPortablePath(r),env:{...o,PWD:ue.fromPortablePath(r)},stdio:h});Fd.add(C),Fd.size===1&&(process.on("SIGINT",oU),process.on("SIGTERM",aU)),!kd(n)&&n!==null&&n.pipe(C.stdin),kd(u)||C.stdout.pipe(u,{end:!1}),kd(A)||C.stderr.pipe(A,{end:!1});let w=()=>{for(let v of new Set([u,A]))kd(v)||v.end()};return new Promise((v,b)=>{C.on("error",E=>{Fd.delete(C),Fd.size===0&&(process.off("SIGINT",oU),process.off("SIGTERM",aU)),(p===2||p===1)&&w(),b(E)}),C.on("close",(E,R)=>{Fd.delete(C),Fd.size===0&&(process.off("SIGINT",oU),process.off("SIGTERM",aU)),(p===2||p===1&&E!==0)&&w(),E===0||!a?v({code:uU(E,R)}):b(new C1({fileName:t,code:E,signal:R}))})})}async function Z4(t,e,{cwd:r,env:o=process.env,encoding:a="utf8",strict:n=!1}){let u=["ignore","pipe","pipe"],A=[],p=[],h=ue.fromPortablePath(r);typeof o.PWD<"u"&&(o={...o,PWD:h});let C=(0,lU.default)(t,e,{cwd:h,env:o,stdio:u});return C.stdout.on("data",w=>{A.push(w)}),C.stderr.on("data",w=>{p.push(w)}),await new Promise((w,v)=>{C.on("error",b=>{let E=Xe.create(r),R=Kt(E,t,Bt.PATH);v(new Vt(1,`Process ${R} failed to spawn`,L=>{L.reportError(1,` ${$u(E,{label:"Thrown Error",value:Wc(Bt.NO_HINT,b.message)})}`)}))}),C.on("close",(b,E)=>{let R=a==="buffer"?Buffer.concat(A):Buffer.concat(A).toString(a),L=a==="buffer"?Buffer.concat(p):Buffer.concat(p).toString(a);b===0||!n?w({code:uU(b,E),stdout:R,stderr:L}):v(new Sx({fileName:t,code:b,signal:E,stdout:R,stderr:L}))})})}function uU(t,e){let r=Fst.get(e);return typeof r<"u"?128+r:t??1}function Rst(t,e,{configuration:r,report:o}){o.reportError(1,` ${$u(r,t!==null?{label:"Exit Code",value:Wc(Bt.NUMBER,t)}:{label:"Exit Signal",value:Wc(Bt.CODE,e)})}`)}var lU,cU,C1,Sx,Fd,Fst,Cx=dt(()=>{St();lU=tt(eT());E1();Zl();zl();cU=(o=>(o[o.Never=0]="Never",o[o.ErrorCode=1]="ErrorCode",o[o.Always=2]="Always",o))(cU||{}),C1=class extends Vt{constructor({fileName:r,code:o,signal:a}){let n=Xe.create(J.cwd()),u=Kt(n,r,Bt.PATH);super(1,`Child ${u} reported an error`,A=>{Rst(o,a,{configuration:n,report:A})});this.code=uU(o,a)}},Sx=class extends C1{constructor({fileName:r,code:o,signal:a,stdout:n,stderr:u}){super({fileName:r,code:o,signal:a});this.stdout=n,this.stderr=u}};Fd=new Set;Fst=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]])});var kE,Ace=dt(()=>{St();_t();I1();kE=class extends it{constructor(){super(...arguments);this.cwd=fe.String("--cwd",process.cwd(),{description:"The directory to run the command in"});this.commandName=fe.String();this.args=fe.Proxy()}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await FE(r,[],{cwd:ue.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}};kE.usage={description:"run a command using yarn's portable shell",details:`
144 This command will run a command using Yarn's portable shell.
145
146 Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
147
148 Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.
149
150 Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
151
152 For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
153 `,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}});var ul,fce=dt(()=>{ul=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var bx={};Yt(bx,{fastGlobOptions:()=>gce,isBraceExpansion:()=>AU,isGlobPattern:()=>Tst,match:()=>Nst,micromatchOptions:()=>xx});function Tst(t){if(!Px.default.scan(t,xx).isGlob)return!1;try{Px.default.parse(t,xx)}catch{return!1}return!0}function Nst(t,{cwd:e,baseFs:r}){return(0,pce.default)(t,{...gce,cwd:ue.fromPortablePath(e),fs:ID(hce.default,new qp(r))})}function AU(t){return Px.default.scan(t,xx).isBrace}var pce,hce,Px,xx,gce,dce=dt(()=>{St();pce=tt(wP()),hce=tt(Ie("fs")),Px=tt(zo()),xx={strictBrackets:!0},gce={onlyDirectories:!1,onlyFiles:!1}});function fU(){}function pU(){for(let t of Rd)t.kill()}function Cce(t,e,r,o){return a=>{let n=a[0]instanceof oA.Transform?"pipe":a[0],u=a[1]instanceof oA.Transform?"pipe":a[1],A=a[2]instanceof oA.Transform?"pipe":a[2],p=(0,yce.default)(t,e,{...o,stdio:[n,u,A]});return Rd.add(p),Rd.size===1&&(process.on("SIGINT",fU),process.on("SIGTERM",pU)),a[0]instanceof oA.Transform&&a[0].pipe(p.stdin),a[1]instanceof oA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof oA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",C=>{switch(Rd.delete(p),Rd.size===0&&(process.off("SIGINT",fU),process.off("SIGTERM",pU)),C.code){case"ENOENT":a[2].write(`command not found: ${t}
154`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t}
155`),h(128);break;default:a[2].write(`uncaught error: ${C.message}
156`),h(1);break}}),p.on("close",C=>{Rd.delete(p),Rd.size===0&&(process.off("SIGINT",fU),process.off("SIGTERM",pU)),h(C!==null?C:129)})})}}}function Ice(t){return e=>{let r=e[0]==="pipe"?new oA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function Qx(t,e){return RE.start(t,e)}function mce(t,e=null){let r=new oA.PassThrough,o=new Ece.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
157`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t(e!==null?`${e} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function wce(t,{prefix:e}){return{stdout:mce(r=>t.stdout.write(`${r}
158`),t.stdout.isTTY?e:null),stderr:mce(r=>t.stderr.write(`${r}
159`),t.stderr.isTTY?e:null)}}var yce,oA,Ece,Rd,rc,hU,RE,gU=dt(()=>{yce=tt(eT()),oA=Ie("stream"),Ece=Ie("string_decoder"),Rd=new Set;rc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},hU=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},RE=class{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:o,stderr:a}){let n=new RE(null,e);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(e,r=1){let o=new RE(this,e),a=new hU;return o.pipe=a,o.stdout=this.stdout,o.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),o}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,e[2]=o.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let e=[];for(let o=this;o;o=o.ancestor)e.push(o.exec());return(await Promise.all(e))[0]}}});var D1={};Yt(D1,{EntryCommand:()=>kE,ShellError:()=>ul,execute:()=>FE,globUtils:()=>bx});function Bce(t,e,r){let o=new Al.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(o,{end:!1}),(e&2)===2&&r.stdin instanceof Al.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new ul(`Bad file descriptor: "${t}"`)}return o}function Fx(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function Mst(t,e,r){let o=[],a=new Al.PassThrough;return a.on("data",n=>o.push(n)),await Rx(t,e,Fx(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function vce(t,e,r){let o=t.map(async n=>{let u=await Td(n.args,e,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function kx(t){return t.match(/[^ \r\n\t]+/g)||[]}async function Qce(t,e,r,o,a=o){switch(t.name){case"$":o(String(process.pid));break;case"#":o(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let u=kx(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)o(n);else for(let u of kx(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<e.args.length&&(u=e.args[n]):Object.prototype.hasOwnProperty.call(r.variables,t.name)?u=r.variables[t.name]:Object.prototype.hasOwnProperty.call(r.environment,t.name)&&(u=r.environment[t.name]),typeof u<"u"&&t.alternativeValue?u=(await Td(t.alternativeValue,e,r)).join(" "):typeof u>"u"&&(t.defaultValue?u=(await Td(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(u="")),typeof u>"u")throw A?new ul(`Unbound argument #${n}`):new ul(`Unbound variable "${t.name}"`);if(t.quoted)o(u);else{let p=kx(u);for(let C=0;C<p.length-1;++C)a(p[C]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function w1(t,e,r){if(t.type==="number"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: "${t.value}", only integers are allowed`)}else if(t.type==="variable"){let o=[];await Qce({...t,quoted:!0},e,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?w1({type:"variable",name:o.join(" ")},e,r):w1({type:"number",value:a},e,r)}else return Ust[t.type](await w1(t.left,e,r),await w1(t.right,e,r))}async function Td(t,e,r){let o=new Map,a=[],n=[],u=C=>{n.push(C)},A=()=>{n.length>0&&a.push(n.join("")),n=[]},p=C=>{u(C),A()},h=(C,w,v)=>{let b=JSON.stringify({type:C,fd:w}),E=o.get(b);typeof E>"u"&&o.set(b,E=[]),E.push(v)};for(let C of t){let w=!1;switch(C.type){case"redirection":{let v=await Td(C.args,e,r);for(let b of v)h(C.subtype,C.fd,b)}break;case"argument":for(let v of C.segments)switch(v.type){case"text":u(v.text);break;case"glob":u(v.pattern),w=!0;break;case"shell":{let b=await Mst(v.shell,e,r);if(v.quoted)u(b);else{let E=kx(b);for(let R=0;R<E.length-1;++R)p(E[R]);u(E[E.length-1])}}break;case"variable":await Qce(v,e,r,u,p);break;case"arithmetic":u(String(await w1(v.arithmetic,e,r)));break}break}if(A(),w){let v=a.pop();if(typeof v>"u")throw new Error("Assertion failed: Expected a glob pattern to have been set");let b=await e.glob.match(v,{cwd:r.cwd,baseFs:e.baseFs});if(b.length===0){let E=AU(v)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22":"";throw new ul(`No matches found: "${v}"${E}`)}for(let E of b.sort())p(E)}}if(o.size>0){let C=[];for(let[w,v]of o.entries())C.splice(C.length,0,w,String(v.length),...v);a.splice(0,0,"__ysh_set_redirects",...C,"--")}return a}function B1(t,e,r){e.builtins.has(t[0])||(t=["command",...t]);let o=ue.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<"u"&&(a={...a,PWD:o});let[n,...u]=t;if(n==="command")return Cce(u[0],u.slice(1),e,{cwd:o,env:a});let A=e.builtins.get(n);if(typeof A>"u")throw new Error(`Assertion failed: A builtin should exist for "${n}"`);return Ice(async({stdin:p,stdout:h,stderr:C})=>{let{stdin:w,stdout:v,stderr:b}=r;r.stdin=p,r.stdout=h,r.stderr=C;try{return await A(u,e,r)}finally{r.stdin=w,r.stdout=v,r.stderr=b}})}function _st(t,e,r){return o=>{let a=new Al.PassThrough,n=Rx(t,e,Fx(r,{stdin:a}));return{stdin:a,promise:n}}}function Hst(t,e,r){return o=>{let a=new Al.PassThrough,n=Rx(t,e,r);return{stdin:a,promise:n}}}function Dce(t,e,r,o){if(e.length===0)return t;{let a;do a=String(Math.random());while(Object.prototype.hasOwnProperty.call(o.procedures,a));return o.procedures={...o.procedures},o.procedures[a]=t,B1([...e,"__ysh_run_procedure",a],r,o)}}async function Sce(t,e,r){let o=t,a=null,n=null;for(;o;){let u=o.then?{...r}:r,A;switch(o.type){case"command":{let p=await Td(o.args,e,r),h=await vce(o.envs,e,r);A=o.envs.length?B1(p,e,Fx(u,{environment:h})):B1(p,e,u)}break;case"subshell":{let p=await Td(o.args,e,r),h=_st(o.subshell,e,u);A=Dce(h,p,e,u)}break;case"group":{let p=await Td(o.args,e,r),h=Hst(o.group,e,u);A=Dce(h,p,e,u)}break;case"envs":{let p=await vce(o.envs,e,r);u.environment={...u.environment,...p},A=B1(["true"],e,u)}break}if(typeof A>"u")throw new Error("Assertion failed: An action should have been generated");if(a===null)n=Qx(A,{stdin:new rc(u.stdin),stdout:new rc(u.stdout),stderr:new rc(u.stderr)});else{if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(a){case"|":n=n.pipeTo(A,1);break;case"|&":n=n.pipeTo(A,3);break}}o.then?(a=o.then.type,o=o.then.chain):o=null}if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");return await n.run()}async function qst(t,e,r,{background:o=!1}={}){function a(n){let u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[n%u.length];return Pce.default.hex(A)}if(o){let n=r.nextBackgroundJobIndex++,u=a(n),A=`[${n}]`,p=u(A),{stdout:h,stderr:C}=wce(r,{prefix:p});return r.backgroundJobs.push(Sce(t,e,Fx(r,{stdout:h,stderr:C})).catch(w=>C.write(`${w.message}
160`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(py(t))}' has ended
161`)})),0}return await Sce(t,e,r)}async function jst(t,e,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await qst(A.chain,e,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof ul))throw p;return r.stderr.write(`${p.message}
162`),1}};for(n(await u(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await u(t.then.line));break;case"||":a!==0&&n(await u(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function Rx(t,e,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of t){if(a=await jst(n,e,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function kce(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>v1(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>v1(e));case"arithmetic":return dU(t.arithmetic);case"shell":return mU(t.shell);default:return!1}}function v1(t){switch(t.type){case"redirection":return t.args.some(e=>v1(e));case"argument":return t.segments.some(e=>kce(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function dU(t){switch(t.type){case"variable":return kce(t);case"number":return!1;default:return dU(t.left)||dU(t.right)}}function mU(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let o;switch(r.type){case"subshell":o=mU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>v1(n)))||r.args.some(a=>v1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function FE(t,e=[],{baseFs:r=new xn,builtins:o={},cwd:a=ue.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:C=bx}={}){let w={};for(let[E,R]of Object.entries(n))typeof R<"u"&&(w[E]=R);let v=new Map(Ost);for(let[E,R]of Object.entries(o))v.set(E,R);u===null&&(u=new Al.PassThrough,u.end());let b=PD(t,C);if(!mU(b)&&b.length>0&&e.length>0){let{command:E}=b[b.length-1];for(;E.then;)E=E.then.line;let R=E.chain;for(;R.then;)R=R.then.chain;R.type==="command"&&(R.args=R.args.concat(e.map(L=>({type:"argument",segments:[{type:"text",text:L}]}))))}return await Rx(b,{args:e,baseFs:r,builtins:v,initialStdin:u,initialStdout:A,initialStderr:p,glob:C},{cwd:a,environment:w,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var Pce,xce,Al,bce,Lst,Ost,Ust,I1=dt(()=>{St();Hl();Pce=tt(yN()),xce=Ie("os"),Al=Ie("stream"),bce=Ie("util");Ace();fce();dce();gU();gU();Lst=(0,bce.promisify)(setTimeout);Ost=new Map([["cd",async([t=(0,xce.homedir)(),...e],r,o)=>{let a=J.resolve(o.cwd,ue.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new ul(`cd: no such file or directory: ${t}`):u})).isDirectory())throw new ul(`cd: not a directory: ${t}`);return o.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${ue.fromPortablePath(r.cwd)}
163`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,o)=>o.exitCode=parseInt(t??o.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
164`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new ul("sleep: missing operand");let o=Number(t);if(Number.isNaN(o))throw new ul(`sleep: invalid time interval '${t}'`);return await Lst(1e3*o,0)}],["__ysh_run_procedure",async(t,e,r)=>{let o=r.procedures[t[0]];return await Qx(o,{stdin:new rc(r.stdin),stdout:new rc(r.stdout),stderr:new rc(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;t[h]!=="--";){let w=t[h++],{type:v,fd:b}=JSON.parse(w),E=V=>{switch(b){case null:case 0:u.push(V);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},R=V=>{switch(b){case null:case 1:A.push(V);break;case 2:p.push(V);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},L=Number(t[h++]),_=h+L;for(let V=h;V<_;++h,++V)switch(v){case"<":E(()=>e.baseFs.createReadStream(J.resolve(r.cwd,ue.toPortablePath(t[V]))));break;case"<<<":E(()=>{let re=new Al.PassThrough;return process.nextTick(()=>{re.write(`${t[V]}
165`),re.end()}),re});break;case"<&":E(()=>Bce(Number(t[V]),1,r));break;case">":case">>":{let re=J.resolve(r.cwd,ue.toPortablePath(t[V]));R(re==="/dev/null"?new Al.Writable({autoDestroy:!0,emitClose:!0,write(ae,he,pe){setImmediate(pe)}}):e.baseFs.createWriteStream(re,v===">>"?{flags:"a"}:void 0))}break;case">&":R(Bce(Number(t[V]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${v}"`)}}if(u.length>0){let w=new Al.PassThrough;o=w;let v=b=>{if(b===u.length)w.end();else{let E=u[b]();E.pipe(w,{end:!1}),E.on("end",()=>{v(b+1)})}};v(0)}if(A.length>0){let w=new Al.PassThrough;a=w;for(let v of A)w.pipe(v)}if(p.length>0){let w=new Al.PassThrough;n=w;for(let v of p)w.pipe(v)}let C=await Qx(B1(t.slice(h+1),e,r),{stdin:new rc(o),stdout:new rc(a),stderr:new rc(n)}).run();return await Promise.all(A.map(w=>new Promise((v,b)=>{w.on("error",E=>{b(E)}),w.on("close",()=>{v()}),w.end()}))),await Promise.all(p.map(w=>new Promise((v,b)=>{w.on("error",E=>{b(E)}),w.on("close",()=>{v()}),w.end()}))),C}]]);Ust={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Tx=U((hMt,Fce)=>{function Gst(t,e){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r<o;)a[r]=e(t[r],r,t);return a}Fce.exports=Gst});var Mce=U((gMt,Oce)=>{var Rce=pd(),Wst=Tx(),Yst=Kl(),Kst=AE(),Vst=1/0,Tce=Rce?Rce.prototype:void 0,Nce=Tce?Tce.toString:void 0;function Lce(t){if(typeof t=="string")return t;if(Yst(t))return Wst(t,Lce)+"";if(Kst(t))return Nce?Nce.call(t):"";var e=t+"";return e=="0"&&1/t==-Vst?"-0":e}Oce.exports=Lce});var S1=U((dMt,Uce)=>{var Jst=Mce();function zst(t){return t==null?"":Jst(t)}Uce.exports=zst});var yU=U((mMt,_ce)=>{function Xst(t,e,r){var o=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++o<a;)n[o]=t[o+e];return n}_ce.exports=Xst});var qce=U((yMt,Hce)=>{var Zst=yU();function $st(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:Zst(t,e,r)}Hce.exports=$st});var EU=U((EMt,jce)=>{var eot="\\ud800-\\udfff",tot="\\u0300-\\u036f",rot="\\ufe20-\\ufe2f",not="\\u20d0-\\u20ff",iot=tot+rot+not,sot="\\ufe0e\\ufe0f",oot="\\u200d",aot=RegExp("["+oot+eot+iot+sot+"]");function lot(t){return aot.test(t)}jce.exports=lot});var Wce=U((CMt,Gce)=>{function cot(t){return t.split("")}Gce.exports=cot});var $ce=U((IMt,Zce)=>{var Yce="\\ud800-\\udfff",uot="\\u0300-\\u036f",Aot="\\ufe20-\\ufe2f",fot="\\u20d0-\\u20ff",pot=uot+Aot+fot,hot="\\ufe0e\\ufe0f",got="["+Yce+"]",CU="["+pot+"]",IU="\\ud83c[\\udffb-\\udfff]",dot="(?:"+CU+"|"+IU+")",Kce="[^"+Yce+"]",Vce="(?:\\ud83c[\\udde6-\\uddff]){2}",Jce="[\\ud800-\\udbff][\\udc00-\\udfff]",mot="\\u200d",zce=dot+"?",Xce="["+hot+"]?",yot="(?:"+mot+"(?:"+[Kce,Vce,Jce].join("|")+")"+Xce+zce+")*",Eot=Xce+zce+yot,Cot="(?:"+[Kce+CU+"?",CU,Vce,Jce,got].join("|")+")",Iot=RegExp(IU+"(?="+IU+")|"+Cot+Eot,"g");function wot(t){return t.match(Iot)||[]}Zce.exports=wot});var tue=U((wMt,eue)=>{var Bot=Wce(),vot=EU(),Dot=$ce();function Sot(t){return vot(t)?Dot(t):Bot(t)}eue.exports=Sot});var nue=U((BMt,rue)=>{var Pot=qce(),xot=EU(),bot=tue(),Qot=S1();function kot(t){return function(e){e=Qot(e);var r=xot(e)?bot(e):void 0,o=r?r[0]:e.charAt(0),a=r?Pot(r,1).join(""):e.slice(1);return o[t]()+a}}rue.exports=kot});var sue=U((vMt,iue)=>{var Fot=nue(),Rot=Fot("toUpperCase");iue.exports=Rot});var wU=U((DMt,oue)=>{var Tot=S1(),Not=sue();function Lot(t){return Not(Tot(t).toLowerCase())}oue.exports=Lot});var aue=U((SMt,Nx)=>{function Oot(){var t=0,e=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,C=10,w=11,v=12,b=13,E=14,R=15,L=16,_=17,V=0,re=1,ae=2,he=3,pe=4;function De(g,ve){return 55296<=g.charCodeAt(ve)&&g.charCodeAt(ve)<=56319&&56320<=g.charCodeAt(ve+1)&&g.charCodeAt(ve+1)<=57343}function ge(g,ve){ve===void 0&&(ve=0);var Ee=g.charCodeAt(ve);if(55296<=Ee&&Ee<=56319&&ve<g.length-1){var de=Ee,ne=g.charCodeAt(ve+1);return 56320<=ne&&ne<=57343?(de-55296)*1024+(ne-56320)+65536:de}if(56320<=Ee&&Ee<=57343&&ve>=1){var de=g.charCodeAt(ve-1),ne=Ee;return 55296<=de&&de<=56319?(de-55296)*1024+(ne-56320)+65536:ne}return Ee}function le(g,ve,Ee){var de=[g].concat(ve).concat([Ee]),ne=de[de.length-2],Z=Ee,me=de.lastIndexOf(E);if(me>1&&de.slice(1,me).every(function(H){return H==o})&&[o,b,_].indexOf(g)==-1)return ae;var be=de.lastIndexOf(a);if(be>0&&de.slice(1,be).every(function(H){return H==a})&&[v,a].indexOf(ne)==-1)return de.filter(function(H){return H==a}).length%2==1?he:pe;if(ne==t&&Z==e)return V;if(ne==r||ne==t||ne==e)return Z==E&&ve.every(function(H){return H==o})?ae:re;if(Z==r||Z==t||Z==e)return re;if(ne==u&&(Z==u||Z==A||Z==h||Z==C))return V;if((ne==h||ne==A)&&(Z==A||Z==p))return V;if((ne==C||ne==p)&&Z==p)return V;if(Z==o||Z==R)return V;if(Z==n)return V;if(ne==v)return V;var ut=de.indexOf(o)!=-1?de.lastIndexOf(o)-1:de.length-2;return[b,_].indexOf(de[ut])!=-1&&de.slice(ut+1,-1).every(function(H){return H==o})&&Z==E||ne==R&&[L,_].indexOf(Z)!=-1?V:ve.indexOf(a)!=-1?ae:ne==a&&Z==a?V:re}this.nextBreak=function(g,ve){if(ve===void 0&&(ve=0),ve<0)return 0;if(ve>=g.length-1)return g.length;for(var Ee=Pe(ge(g,ve)),de=[],ne=ve+1;ne<g.length;ne++)if(!De(g,ne-1)){var Z=Pe(ge(g,ne));if(le(Ee,de,Z))return ne;de.push(Z)}return g.length},this.splitGraphemes=function(g){for(var ve=[],Ee=0,de;(de=this.nextBreak(g,Ee))<g.length;)ve.push(g.slice(Ee,de)),Ee=de;return Ee<g.length&&ve.push(g.slice(Ee)),ve},this.iterateGraphemes=function(g){var ve=0,Ee={next:function(){var de,ne;return(ne=this.nextBreak(g,ve))<g.length?(de=g.slice(ve,ne),ve=ne,{value:de,done:!1}):ve<g.length?(de=g.slice(ve),ve=g.length,{value:de,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Ee[Symbol.iterator]=function(){return Ee}),Ee},this.countGraphemes=function(g){for(var ve=0,Ee=0,de;(de=this.nextBreak(g,Ee))<g.length;)Ee=de,ve++;return Ee<g.length&&ve++,ve};function Pe(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?v:g==13?t:g==10?e:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?r:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?o:127462<=g&&g<=127487?a:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?n:4352<=g&&g<=4447||43360<=g&&g<=43388?u:4448<=g&&g<=4519||55216<=g&&g<=55238?A:4520<=g&&g<=4607||55243<=g&&g<=55291?p:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?h:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?C:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?b:127995<=g&&g<=127999?E:g==8205?R:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?L:128102<=g&&g<=128105?_:w}return this}typeof Nx<"u"&&Nx.exports&&(Nx.exports=Oot)});var cue=U((PMt,lue)=>{var Mot=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,Lx;function Uot(){if(Lx)return Lx;if(typeof Intl.Segmenter<"u"){let t=new Intl.Segmenter("en",{granularity:"grapheme"});return Lx=e=>Array.from(t.segment(e),({segment:r})=>r)}else{let t=aue(),e=new t;return Lx=r=>e.splitGraphemes(r)}}lue.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");let o=r-e,a="",n=0,u=0;for(;t.length>0;){let A=t.match(Mot)||[t,t,void 0],p=Uot()(A[1]),h=Math.min(e-n,p.length);p=p.slice(h);let C=Math.min(o-u,p.length);a+=p.slice(0,C).join(""),n+=h,u+=C,typeof A[2]<"u"&&(a+=A[2]),t=t.slice(A[0].length)}return a}});function hue(t,{configuration:e,json:r}){if(!e.get("enableMessageNames"))return"";let a=Vu(t===null?0:t);return!r&&t===null?Kt(e,a,"grey"):a}function BU(t,{configuration:e,json:r}){let o=hue(t,{configuration:e,json:r});if(!o||t===null||t===0)return o;let a=dr[t],n=`https://yarnpkg.com/advanced/error-codes#${o}---${a}`.toLowerCase();return Xy(e,o,n)}var pue,Mx,uue,Aue,_ot,Hot,Ox,fue,qot,jot,Ux,Got,Ct,_x=dt(()=>{pue=tt(cue()),Mx=tt(Zg());rS();Zl();zl();Ks();uue=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],Aue=80,_ot=new Set([13,19]),Hot=5,Ox=Mx.default.GITHUB_ACTIONS?{start:t=>`::group::${t}
166`,end:t=>`::endgroup::
167`}:Mx.default.TRAVIS?{start:t=>`travis_fold:start:${t}
168`,end:t=>`travis_fold:end:${t}
169`}:Mx.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t}
170`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,fue=new Date,qot=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,jot=t=>t,Ux=jot({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),Got=qot&&Object.keys(Ux).find(t=>{let e=Ux[t];return!(e.date&&(e.date[0]!==fue.getDate()||e.date[1]!==fue.getMonth()+1))})||"default";Ct=class extends Js{constructor({configuration:r,stdout:o,json:a=!1,includeNames:n=!0,includePrefix:u=!0,includeFooter:A=!0,includeLogs:p=!a,includeInfos:h=p,includeWarnings:C=p,forgettableBufferSize:w=Hot,forgettableNames:v=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errors=[];this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;this.forgettableLines=[];if(qw(this,{configuration:r}),this.configuration=r,this.forgettableBufferSize=w,this.forgettableNames=new Set([...v,..._ot]),this.includeNames=n,this.includePrefix=u,this.includeFooter=A,this.includeInfos=h,this.includeWarnings=C,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let b=r.get("progressBarStyle")||Got;if(!Object.prototype.hasOwnProperty.call(Ux,b))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=Ux[b];let E=12,R=Math.max(0,Math.min(o.columns-E,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*R/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)};try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errors.length>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){this.cacheHitCount+=1}reportCacheMiss(r,o){this.lastCacheMiss=r,this.cacheMissCount+=1,typeof o<"u"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(13,o)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r==null||r()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&(o==null||o(p-A))}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r==null||r()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&(o==null||o(p-A))}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.reportInfo(null,`\u250C ${r}`),this.indent+=1,Ox!==null&&!this.json&&this.includeInfos&&this.stdout.write(Ox.start(r))},reportFooter:A=>{if(this.indent-=1,Ox!==null&&!this.json&&this.includeInfos){this.stdout.write(Ox.end(r));for(let[p,h]of this.errors)this.reportErrorImpl(p,h)}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${Kt(this.configuration,A,Bt.DURATION)}`):this.reportInfo(null,"\u2514 Completed")},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}async startCacheReport(r){let o=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await r()}catch(a){throw this.reportExceptionOnce(a),a}finally{o!==null&&this.reportCacheChanges(o)}}reportSeparator(){this.indent===0?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;if(this.json)this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o});else if(this.forgettableNames.has(r))if(this.forgettableLines.push(u),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(u,{truncate:!0});else this.writeLineWithForgettableReset(u)}reportWarning(r,o){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLineWithForgettableReset(`${this.formatPrefix(n,"yellowBright")}${o}`)}reportError(r,o){this.errors.push([r,o]),this.reportErrorImpl(r,o)}reportErrorImpl(r,o){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLineWithForgettableReset(`${this.formatPrefix(n,"redBright")}${o}`,{truncate:!1})}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error("Unimplemented: Progress bars can't have both progress and titles.");let o=!1,a=Promise.resolve().then(async()=>{let u={progress:r.hasProgress?0:void 0,title:r.hasTitle?"":void 0};this.progress.set(r,{definition:u,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:A,title:p}of r)o||u.progress===A&&u.title===p||(u.progress=A,u.title=p,this.refreshProgress());n()}),n=()=>{o||(o=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLineWithForgettableReset(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r="";this.errors.length>0?r="Failed with errors":this.warningCount>0?r="Done with warnings":r="Done";let o=Kt(this.configuration,Date.now()-this.startTime,Bt.DURATION),a=this.configuration.get("enableTimers")?`${r} in ${o}`:r;this.errors.length>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:o}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:o})}
171`),this.writeProgress()}writeLineWithForgettableReset(r,{truncate:o}={}){this.forgettableLines=[],this.writeLine(r,{truncate:o})}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
172`);this.writeProgress()}reportCacheChanges({cacheHitCount:r,cacheMissCount:o}){let a=this.cacheHitCount-r,n=this.cacheMissCount-o;if(a===0&&n===0)return;let u="";this.cacheHitCount>1?u+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?u+=" - one package was already cached":u+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?u+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(u+=`, one had to be fetched (${kr(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?u+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(u+=` - one package had to be fetched (${kr(this.configuration,this.lastCacheMiss)})`),this.reportInfo(13,u)}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Aue&&(this.progressFrame=(this.progressFrame+1)%uue.length,this.progressTime=r);let o=uue[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),C=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${C}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Kt(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
173`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Aue)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,pue.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?hue(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${Kt(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?BU(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return"\u2502 ".repeat(this.indent)}}});var On,vU=dt(()=>{On="4.0.0-rc.45"});var sn={};Yt(sn,{PackageManager:()=>mue,detectPackageManager:()=>yue,executePackageAccessibleBinary:()=>Bue,executePackageScript:()=>Hx,executePackageShellcode:()=>DU,executeWorkspaceAccessibleBinary:()=>Xot,executeWorkspaceLifecycleScript:()=>Iue,executeWorkspaceScript:()=>Cue,getPackageAccessibleBinaries:()=>qx,getWorkspaceAccessibleBinaries:()=>wue,hasPackageScript:()=>Vot,hasWorkspaceScript:()=>SU,makeScriptEnv:()=>P1,maybeExecuteWorkspaceLifecycleScript:()=>zot,prepareExternalProject:()=>Kot});async function Mf(t,e,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await oe.writeFilePromise(J.format({dir:t,name:e,ext:".cmd"}),a)}await oe.writeFilePromise(J.join(t,e),`#!/bin/sh
174exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
175`,{mode:493})}async function yue(t){let e=await Nt.tryFind(t);if(e!=null&&e.packageManager){let o=RP(e.packageManager);if(o!=null&&o.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await oe.readFilePromise(J.join(t,Lr.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:oe.existsSync(J.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:oe.existsSync(J.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function P1({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a}){let n={};for(let[h,C]of Object.entries(process.env))typeof C<"u"&&(n[h.toLowerCase()!=="path"?h:"PATH"]=C);let u=ue.fromPortablePath(r);n.BERRY_BIN_FOLDER=ue.fromPortablePath(u);let A=process.env.COREPACK_ROOT&&!o?ue.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([Mf(r,"node",process.execPath),...On!==null?[Mf(r,"run",process.execPath,[A,"run"]),Mf(r,"yarn",process.execPath,[A]),Mf(r,"yarnpkg",process.execPath,[A]),Mf(r,"node-gyp",process.execPath,[A,"run","--top-level","node-gyp"])]:[]]),t&&(n.INIT_CWD=ue.cwd(),n.PROJECT_CWD=ue.fromPortablePath(t.cwd)),n.PATH=n.PATH?`${u}${ue.delimiter}${n.PATH}`:`${u}`,n.npm_execpath=`${u}${ue.sep}yarn`,n.npm_node_execpath=`${u}${ue.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let h=t.tryWorkspaceByLocator(e),C=h?h.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";n.npm_package_name=nn(e),n.npm_package_version=C;let w;if(h)w=h.cwd;else{let v=t.storedPackages.get(e.locatorHash);if(!v)throw new Error(`Package for ${kr(t.configuration,e)} not found in the project`);let b=t.configuration.getLinkers(),E={project:t,report:new Ct({stdout:new A0.PassThrough,configuration:t.configuration})},R=b.find(L=>L.supportsPackage(v,E));if(!R)throw new Error(`The package ${kr(t.configuration,v)} isn't supported by any of the available linkers`);w=await R.findPackageLocation(v,E)}n.npm_package_json=ue.fromPortablePath(J.join(w,Lr.manifest))}let p=On!==null?`yarn/${On}`:`yarn/${zp("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${p} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(n.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(h=>h.setupScriptEnvironment,t,n,async(h,C,w)=>await Mf(r,Li(h),C,w)),n}async function Kot(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await Yot(async()=>{await oe.mktempPromise(async u=>{let A=J.join(u,"pack.log"),p=null,{stdout:h,stderr:C}=r.getSubprocessStreams(A,{prefix:ue.fromPortablePath(t),report:o}),w=n&&Yc(n)?Vw(n):n,v=w?Jl(w):"an external project";h.write(`Packing ${v} from sources
176`);let b=await yue(t),E;b!==null?(h.write(`Using ${b.packageManager} for bootstrap. Reason: ${b.reason}
177
178`),E=b.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
179
180`),E="Yarn");let R=E==="Yarn"&&!(b!=null&&b.packageManagerField);await oe.mktempPromise(async L=>{let _=await P1({binFolder:L,ignoreCorepack:R}),re=new Map([["Yarn Classic",async()=>{let he=a!==null?["workspace",a]:[],pe=J.join(t,Lr.manifest),De=await oe.readFilePromise(pe),ge=await sA(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:_,stdin:p,stdout:h,stderr:C,end:1});if(ge.code!==0)return ge.code;await oe.writeFilePromise(pe,De),await oe.appendFilePromise(J.join(t,".npmignore"),`/.yarn
181`),h.write(`
182`),delete _.NODE_ENV;let le=await sA("yarn",["install"],{cwd:t,env:_,stdin:p,stdout:h,stderr:C,end:1});if(le.code!==0)return le.code;h.write(`
183`);let Pe=await sA("yarn",[...he,"pack","--filename",ue.fromPortablePath(e)],{cwd:t,env:_,stdin:p,stdout:h,stderr:C});return Pe.code!==0?Pe.code:0}],["Yarn",async()=>{let he=a!==null?["workspace",a]:[];_.YARN_ENABLE_INLINE_BUILDS="1";let pe=J.join(t,Lr.lockfile);await oe.existsPromise(pe)||await oe.writeFilePromise(pe,"");let De=await sA("yarn",[...he,"pack","--install-if-needed","--filename",ue.fromPortablePath(e)],{cwd:t,env:_,stdin:p,stdout:h,stderr:C});return De.code!==0?De.code:0}],["npm",async()=>{if(a!==null){let ve=new A0.PassThrough,Ee=Jy(ve);ve.pipe(h,{end:!1});let de=await sA("npm",["--version"],{cwd:t,env:_,stdin:p,stdout:ve,stderr:C,end:0});if(ve.end(),de.code!==0)return h.end(),C.end(),de.code;let ne=(await Ee).toString().trim();if(!Pd(ne,">=7.x")){let Z=nA(null,"npm"),me=mn(Z,ne),be=mn(Z,">=7.x");throw new Error(`Workspaces aren't supported by ${Ln(r,me)}; please upgrade to ${Ln(r,be)} (npm has been detected as the primary package manager for ${Kt(r,t,Bt.PATH)})`)}}let he=a!==null?["--workspace",a]:[];delete _.npm_config_user_agent,delete _.npm_config_production,delete _.NPM_CONFIG_PRODUCTION,delete _.NODE_ENV;let pe=await sA("npm",["install"],{cwd:t,env:_,stdin:p,stdout:h,stderr:C,end:1});if(pe.code!==0)return pe.code;let De=new A0.PassThrough,ge=Jy(De);De.pipe(h);let le=await sA("npm",["pack","--silent",...he],{cwd:t,env:_,stdin:p,stdout:De,stderr:C});if(le.code!==0)return le.code;let Pe=(await ge).toString().trim().replace(/^.*\n/s,""),g=J.resolve(t,ue.toPortablePath(Pe));return await oe.renamePromise(g,e),0}]]).get(E);if(typeof re>"u")throw new Error("Assertion failed: Unsupported workflow");let ae=await re();if(!(ae===0||typeof ae>"u"))throw oe.detachTemp(u),new Vt(58,`Packing the package failed (exit code ${ae}, logs can be found here: ${Kt(r,A,Bt.PATH)})`)})})})}async function Vot(t,e,{project:r}){let o=r.tryWorkspaceByLocator(t);if(o!==null)return SU(o,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${kr(r.configuration,t)} not found in the project`);return await _l.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Ct({stdout:new A0.PassThrough,configuration:u})},h=A.find(b=>b.supportsPackage(a,p));if(!h)throw new Error(`The package ${kr(r.configuration,a)} isn't supported by any of the available linkers`);let C=await h.findPackageLocation(a,p),w=new An(C,{baseFs:n});return(await Nt.find(wt.dot,{baseFs:w})).scripts.has(e)})}async function Hx(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{manifest:h,env:C,cwd:w}=await Eue(t,{project:a,binFolder:p,cwd:o,lifecycleScript:e}),v=h.scripts.get(e);if(typeof v>"u")return 1;let b=async()=>await FE(v,r,{cwd:w,env:C,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,b,a,t,e,{script:v,args:r,cwd:w,env:C,stdin:n,stdout:u,stderr:A}))()})}async function DU(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{env:h,cwd:C}=await Eue(t,{project:a,binFolder:p,cwd:o});return await FE(e,r,{cwd:C,env:h,stdin:n,stdout:u,stderr:A})})}async function Jot(t,{binFolder:e,cwd:r,lifecycleScript:o}){let a=await P1({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:o});return await Promise.all(Array.from(await wue(t),([n,[,u]])=>Mf(e,Li(n),process.execPath,[u]))),typeof r>"u"&&(r=J.dirname(await oe.realpathPromise(J.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function Eue(t,{project:e,binFolder:r,cwd:o,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return Jot(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=e.storedPackages.get(t.locatorHash);if(!u)throw new Error(`Package for ${kr(e.configuration,t)} not found in the project`);return await _l.openPromise(async A=>{let p=e.configuration,h=e.configuration.getLinkers(),C={project:e,report:new Ct({stdout:new A0.PassThrough,configuration:p})},w=h.find(L=>L.supportsPackage(u,C));if(!w)throw new Error(`The package ${kr(e.configuration,u)} isn't supported by any of the available linkers`);let v=await P1({project:e,locator:t,binFolder:r,lifecycleScript:a});await Promise.all(Array.from(await qx(t,{project:e}),([L,[,_]])=>Mf(r,Li(L),process.execPath,[_])));let b=await w.findPackageLocation(u,C),E=new An(b,{baseFs:A}),R=await Nt.find(wt.dot,{baseFs:E});return typeof o>"u"&&(o=b),{manifest:R,binFolder:r,env:v,cwd:o}})}async function Cue(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u}){return await Hx(t.anchoredLocator,e,r,{cwd:o,project:t.project,stdin:a,stdout:n,stderr:u})}function SU(t,e){return t.manifest.scripts.has(e)}async function Iue(t,e,{cwd:r,report:o}){let{configuration:a}=t.project,n=null;await oe.mktempPromise(async u=>{let A=J.join(u,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${ue.fromPortablePath(t.cwd)}")
184`,{stdout:h,stderr:C}=a.getSubprocessStreams(A,{report:o,prefix:kr(a,t.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${e}" lifecycle script`);let w=await Cue(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:C});if(h.end(),C.end(),w!==0)throw oe.detachTemp(u),new Vt(36,`${(0,gue.default)(e)} script failed (exit code ${Kt(a,w,Bt.NUMBER)}, logs can be found here: ${Kt(a,A,Bt.PATH)}); run ${Kt(a,`yarn ${e}`,Bt.CODE)} to investigate`)})}async function zot(t,e,r){SU(t,e)&&await Iue(t,e,r)}async function qx(t,{project:e}){let r=e.configuration,o=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${kr(r,t)} not found in the project`);let n=new A0.Writable,u=r.getLinkers(),A={project:e,report:new Ct({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let C of a.dependencies.values()){let w=e.storedResolutions.get(C.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${Ln(r,C)}) should have been registered`);p.add(w)}let h=await Promise.all(Array.from(p,async C=>{let w=e.storedPackages.get(C);if(!w)throw new Error(`Assertion failed: The package (${C}) should have been registered`);if(w.bin.size===0)return Zu.skip;let v=u.find(E=>E.supportsPackage(w,A));if(!v)return Zu.skip;let b=null;try{b=await v.findPackageLocation(w,A)}catch(E){if(E.code==="LOCATOR_NOT_INSTALLED")return Zu.skip;throw E}return{dependency:w,packageLocation:b}}));for(let C of h){if(C===Zu.skip)continue;let{dependency:w,packageLocation:v}=C;for(let[b,E]of w.bin)o.set(b,[w,ue.fromPortablePath(J.resolve(v,E))])}return o}async function wue(t){return await qx(t.anchoredLocator,{project:t.project})}async function Bue(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??(h=await qx(t,{project:a}));let C=h.get(e);if(!C)throw new Error(`Binary not found (${e}) for ${kr(a.configuration,t)}`);return await oe.mktempPromise(async w=>{let[,v]=C,b=await P1({project:a,locator:t,binFolder:w});await Promise.all(Array.from(h,([R,[,L]])=>Mf(b.BERRY_BIN_FOLDER,Li(R),process.execPath,[L])));let E;try{E=await sA(process.execPath,[...p,v,...r],{cwd:o,env:b,stdin:n,stdout:u,stderr:A})}finally{await oe.removePromise(b.BERRY_BIN_FOLDER)}return E.code})}async function Xot(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await Bue(t.anchoredLocator,e,r,{project:t.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var gue,due,A0,mue,Wot,Yot,PU=dt(()=>{St();St();Hc();I1();gue=tt(wU()),due=tt(nd()),A0=Ie("stream");uE();Zl();_x();vU();Cx();zl();Vl();s0();Ks();mue=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(mue||{});Wot=2,Yot=(0,due.default)(Wot)});var TE=U((KMt,Due)=>{"use strict";var vue=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);Due.exports=t=>t?Object.keys(t).map(e=>[vue.has(e)?vue.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var LE=U((VMt,Tue)=>{"use strict";var Sue=typeof process=="object"&&process?process:{stdout:null,stderr:null},Zot=Ie("events"),Pue=Ie("stream"),xue=Ie("string_decoder").StringDecoder,Uf=Symbol("EOF"),_f=Symbol("maybeEmitEnd"),f0=Symbol("emittedEnd"),jx=Symbol("emittingEnd"),x1=Symbol("emittedError"),Gx=Symbol("closed"),bue=Symbol("read"),Wx=Symbol("flush"),Que=Symbol("flushChunk"),ka=Symbol("encoding"),Hf=Symbol("decoder"),Yx=Symbol("flowing"),b1=Symbol("paused"),NE=Symbol("resume"),Ss=Symbol("bufferLength"),xU=Symbol("bufferPush"),bU=Symbol("bufferShift"),bo=Symbol("objectMode"),Qo=Symbol("destroyed"),QU=Symbol("emitData"),kue=Symbol("emitEnd"),kU=Symbol("emitEnd2"),qf=Symbol("async"),Q1=t=>Promise.resolve().then(t),Fue=global._MP_NO_ITERATOR_SYMBOLS_!=="1",$ot=Fue&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),eat=Fue&&Symbol.iterator||Symbol("iterator not implemented"),tat=t=>t==="end"||t==="finish"||t==="prefinish",rat=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,nat=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Kx=class{constructor(e,r,o){this.src=e,this.dest=r,this.opts=o,this.ondrain=()=>e[NE](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},FU=class extends Kx{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,o){super(e,r,o),this.proxyErrors=a=>r.emit("error",a),e.on("error",this.proxyErrors)}};Tue.exports=class Rue extends Pue{constructor(e){super(),this[Yx]=!1,this[b1]=!1,this.pipes=[],this.buffer=[],this[bo]=e&&e.objectMode||!1,this[bo]?this[ka]=null:this[ka]=e&&e.encoding||null,this[ka]==="buffer"&&(this[ka]=null),this[qf]=e&&!!e.async||!1,this[Hf]=this[ka]?new xue(this[ka]):null,this[Uf]=!1,this[f0]=!1,this[jx]=!1,this[Gx]=!1,this[x1]=null,this.writable=!0,this.readable=!0,this[Ss]=0,this[Qo]=!1}get bufferLength(){return this[Ss]}get encoding(){return this[ka]}set encoding(e){if(this[bo])throw new Error("cannot set encoding in objectMode");if(this[ka]&&e!==this[ka]&&(this[Hf]&&this[Hf].lastNeed||this[Ss]))throw new Error("cannot change encoding");this[ka]!==e&&(this[Hf]=e?new xue(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Hf].write(r)))),this[ka]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[bo]}set objectMode(e){this[bo]=this[bo]||!!e}get async(){return this[qf]}set async(e){this[qf]=this[qf]||!!e}write(e,r,o){if(this[Uf])throw new Error("write after end");if(this[Qo])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(o=r,r="utf8"),r||(r="utf8");let a=this[qf]?Q1:n=>n();return!this[bo]&&!Buffer.isBuffer(e)&&(nat(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):rat(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[bo]?(this.flowing&&this[Ss]!==0&&this[Wx](!0),this.flowing?this.emit("data",e):this[xU](e),this[Ss]!==0&&this.emit("readable"),o&&a(o),this.flowing):e.length?(typeof e=="string"&&!(r===this[ka]&&!this[Hf].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ka]&&(e=this[Hf].write(e)),this.flowing&&this[Ss]!==0&&this[Wx](!0),this.flowing?this.emit("data",e):this[xU](e),this[Ss]!==0&&this.emit("readable"),o&&a(o),this.flowing):(this[Ss]!==0&&this.emit("readable"),o&&a(o),this.flowing)}read(e){if(this[Qo])return null;if(this[Ss]===0||e===0||e>this[Ss])return this[_f](),null;this[bo]&&(e=null),this.buffer.length>1&&!this[bo]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Ss])]);let r=this[bue](e||null,this.buffer[0]);return this[_f](),r}[bue](e,r){return e===r.length||e===null?this[bU]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Ss]-=e),this.emit("data",r),!this.buffer.length&&!this[Uf]&&this.emit("drain"),r}end(e,r,o){return typeof e=="function"&&(o=e,e=null),typeof r=="function"&&(o=r,r="utf8"),e&&this.write(e,r),o&&this.once("end",o),this[Uf]=!0,this.writable=!1,(this.flowing||!this[b1])&&this[_f](),this}[NE](){this[Qo]||(this[b1]=!1,this[Yx]=!0,this.emit("resume"),this.buffer.length?this[Wx]():this[Uf]?this[_f]():this.emit("drain"))}resume(){return this[NE]()}pause(){this[Yx]=!1,this[b1]=!0}get destroyed(){return this[Qo]}get flowing(){return this[Yx]}get paused(){return this[b1]}[xU](e){this[bo]?this[Ss]+=1:this[Ss]+=e.length,this.buffer.push(e)}[bU](){return this.buffer.length&&(this[bo]?this[Ss]-=1:this[Ss]-=this.buffer[0].length),this.buffer.shift()}[Wx](e){do;while(this[Que](this[bU]()));!e&&!this.buffer.length&&!this[Uf]&&this.emit("drain")}[Que](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Qo])return;let o=this[f0];return r=r||{},e===Sue.stdout||e===Sue.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,o?r.end&&e.end():(this.pipes.push(r.proxyErrors?new FU(this,e,r):new Kx(this,e,r)),this[qf]?Q1(()=>this[NE]()):this[NE]()),e}unpipe(e){let r=this.pipes.find(o=>o.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let o=super.on(e,r);return e==="data"&&!this.pipes.length&&!this.flowing?this[NE]():e==="readable"&&this[Ss]!==0?super.emit("readable"):tat(e)&&this[f0]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[x1]&&(this[qf]?Q1(()=>r.call(this,this[x1])):r.call(this,this[x1])),o}get emittedEnd(){return this[f0]}[_f](){!this[jx]&&!this[f0]&&!this[Qo]&&this.buffer.length===0&&this[Uf]&&(this[jx]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Gx]&&this.emit("close"),this[jx]=!1)}emit(e,r,...o){if(e!=="error"&&e!=="close"&&e!==Qo&&this[Qo])return;if(e==="data")return r?this[qf]?Q1(()=>this[QU](r)):this[QU](r):!1;if(e==="end")return this[kue]();if(e==="close"){if(this[Gx]=!0,!this[f0]&&!this[Qo])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[x1]=r;let n=super.emit("error",r);return this[_f](),n}else if(e==="resume"){let n=super.emit("resume");return this[_f](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,r,...o);return this[_f](),a}[QU](e){for(let o of this.pipes)o.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[_f](),r}[kue](){this[f0]||(this[f0]=!0,this.readable=!1,this[qf]?Q1(()=>this[kU]()):this[kU]())}[kU](){if(this[Hf]){let r=this[Hf].end();if(r){for(let o of this.pipes)o.dest.write(r);super.emit("data",r)}}for(let r of this.pipes)r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[bo]||(e.dataLength=0);let r=this.promise();return this.on("data",o=>{e.push(o),this[bo]||(e.dataLength+=o.length)}),r.then(()=>e)}concat(){return this[bo]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[bo]?Promise.reject(new Error("cannot concat in objectMode")):this[ka]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Qo,()=>r(new Error("stream destroyed"))),this.on("error",o=>r(o)),this.on("end",()=>e())})}[$ot](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Uf])return Promise.resolve({done:!0});let o=null,a=null,n=h=>{this.removeListener("data",u),this.removeListener("end",A),a(h)},u=h=>{this.removeListener("error",n),this.removeListener("end",A),this.pause(),o({value:h,done:!!this[Uf]})},A=()=>{this.removeListener("error",n),this.removeListener("data",u),o({done:!0})},p=()=>n(new Error("stream destroyed"));return new Promise((h,C)=>{a=C,o=h,this.once(Qo,p),this.once("error",n),this.once("end",A),this.once("data",u)})}}}[eat](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Qo]?(e?this.emit("error",e):this.emit(Qo),this):(this[Qo]=!0,this.buffer.length=0,this[Ss]=0,typeof this.close=="function"&&!this[Gx]&&this.close(),e?this.emit("error",e):this.emit(Qo),this)}static isStream(e){return!!e&&(e instanceof Rue||e instanceof Pue||e instanceof Zot&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Lue=U((JMt,Nue)=>{var iat=Ie("zlib").constants||{ZLIB_VERNUM:4736};Nue.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},iat))});var VU=U(fl=>{"use strict";var OU=Ie("assert"),p0=Ie("buffer").Buffer,Uue=Ie("zlib"),Nd=fl.constants=Lue(),sat=LE(),Oue=p0.concat,Ld=Symbol("_superWrite"),ME=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},oat=Symbol("opts"),k1=Symbol("flushFlag"),Mue=Symbol("finishFlushFlag"),KU=Symbol("fullFlushFlag"),zn=Symbol("handle"),Vx=Symbol("onError"),OE=Symbol("sawError"),RU=Symbol("level"),TU=Symbol("strategy"),NU=Symbol("ended"),zMt=Symbol("_defaultFullFlush"),Jx=class extends sat{constructor(e,r){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[OE]=!1,this[NU]=!1,this[oat]=e,this[k1]=e.flush,this[Mue]=e.finishFlush;try{this[zn]=new Uue[r](e)}catch(o){throw new ME(o)}this[Vx]=o=>{this[OE]||(this[OE]=!0,this.close(),this.emit("error",o))},this[zn].on("error",o=>this[Vx](new ME(o))),this.once("end",()=>this.close)}close(){this[zn]&&(this[zn].close(),this[zn]=null,this.emit("close"))}reset(){if(!this[OE])return OU(this[zn],"zlib binding closed"),this[zn].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[KU]),this.write(Object.assign(p0.alloc(0),{[k1]:e})))}end(e,r,o){return e&&this.write(e,r),this.flush(this[Mue]),this[NU]=!0,super.end(null,null,o)}get ended(){return this[NU]}write(e,r,o){if(typeof r=="function"&&(o=r,r="utf8"),typeof e=="string"&&(e=p0.from(e,r)),this[OE])return;OU(this[zn],"zlib binding closed");let a=this[zn]._handle,n=a.close;a.close=()=>{};let u=this[zn].close;this[zn].close=()=>{},p0.concat=h=>h;let A;try{let h=typeof e[k1]=="number"?e[k1]:this[k1];A=this[zn]._processChunk(e,h),p0.concat=Oue}catch(h){p0.concat=Oue,this[Vx](new ME(h))}finally{this[zn]&&(this[zn]._handle=a,a.close=n,this[zn].close=u,this[zn].removeAllListeners("error"))}this[zn]&&this[zn].on("error",h=>this[Vx](new ME(h)));let p;if(A)if(Array.isArray(A)&&A.length>0){p=this[Ld](p0.from(A[0]));for(let h=1;h<A.length;h++)p=this[Ld](A[h])}else p=this[Ld](p0.from(A));return o&&o(),p}[Ld](e){return super.write(e)}},jf=class extends Jx{constructor(e,r){e=e||{},e.flush=e.flush||Nd.Z_NO_FLUSH,e.finishFlush=e.finishFlush||Nd.Z_FINISH,super(e,r),this[KU]=Nd.Z_FULL_FLUSH,this[RU]=e.level,this[TU]=e.strategy}params(e,r){if(!this[OE]){if(!this[zn])throw new Error("cannot switch params when binding is closed");if(!this[zn].params)throw new Error("not supported in this implementation");if(this[RU]!==e||this[TU]!==r){this.flush(Nd.Z_SYNC_FLUSH),OU(this[zn],"zlib binding closed");let o=this[zn].flush;this[zn].flush=(a,n)=>{this.flush(a),n()};try{this[zn].params(e,r)}finally{this[zn].flush=o}this[zn]&&(this[RU]=e,this[TU]=r)}}}},MU=class extends jf{constructor(e){super(e,"Deflate")}},UU=class extends jf{constructor(e){super(e,"Inflate")}},LU=Symbol("_portable"),_U=class extends jf{constructor(e){super(e,"Gzip"),this[LU]=e&&!!e.portable}[Ld](e){return this[LU]?(this[LU]=!1,e[9]=255,super[Ld](e)):super[Ld](e)}},HU=class extends jf{constructor(e){super(e,"Gunzip")}},qU=class extends jf{constructor(e){super(e,"DeflateRaw")}},jU=class extends jf{constructor(e){super(e,"InflateRaw")}},GU=class extends jf{constructor(e){super(e,"Unzip")}},zx=class extends Jx{constructor(e,r){e=e||{},e.flush=e.flush||Nd.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Nd.BROTLI_OPERATION_FINISH,super(e,r),this[KU]=Nd.BROTLI_OPERATION_FLUSH}},WU=class extends zx{constructor(e){super(e,"BrotliCompress")}},YU=class extends zx{constructor(e){super(e,"BrotliDecompress")}};fl.Deflate=MU;fl.Inflate=UU;fl.Gzip=_U;fl.Gunzip=HU;fl.DeflateRaw=qU;fl.InflateRaw=jU;fl.Unzip=GU;typeof Uue.BrotliCompress=="function"?(fl.BrotliCompress=WU,fl.BrotliDecompress=YU):fl.BrotliCompress=fl.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var UE=U(($Mt,_ue)=>{var aat=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;_ue.exports=aat!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var Xx=U((t4t,Hue)=>{"use strict";var lat=LE(),JU=UE(),zU=Symbol("slurp");Hue.exports=class extends lat{constructor(e,r,o){switch(super(),this.pause(),this.extended=r,this.globalExtended=o,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=JU(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=JU(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[zU](r),o&&this[zU](o,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let o=this.remain,a=this.blockRemain;return this.remain=Math.max(0,o-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:o>=r?super.write(e):super.write(e.slice(0,o))}[zU](e,r){for(let o in e)e[o]!==null&&e[o]!==void 0&&!(r&&o==="path")&&(this[o]=o==="path"||o==="linkpath"?JU(e[o]):e[o])}}});var XU=U(Zx=>{"use strict";Zx.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);Zx.code=new Map(Array.from(Zx.name).map(t=>[t[1],t[0]]))});var Wue=U((n4t,Gue)=>{"use strict";var cat=(t,e)=>{if(Number.isSafeInteger(t))t<0?Aat(t,e):uat(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},uat=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},Aat=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var o=e.length;o>1;o--){var a=t&255;t=Math.floor(t/256),r?e[o-1]=que(a):a===0?e[o-1]=0:(r=!0,e[o-1]=jue(a))}},fat=t=>{let e=t[0],r=e===128?hat(t.slice(1,t.length)):e===255?pat(t):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},pat=t=>{for(var e=t.length,r=0,o=!1,a=e-1;a>-1;a--){var n=t[a],u;o?u=que(n):n===0?u=n:(o=!0,u=jue(n)),u!==0&&(r-=u*Math.pow(256,e-a-1))}return r},hat=t=>{for(var e=t.length,r=0,o=e-1;o>-1;o--){var a=t[o];a!==0&&(r+=a*Math.pow(256,e-o-1))}return r},que=t=>(255^t)&255,jue=t=>(255^t)+1&255;Gue.exports={encode:cat,parse:fat}});var HE=U((i4t,Kue)=>{"use strict";var ZU=XU(),_E=Ie("path").posix,Yue=Wue(),$U=Symbol("slurp"),pl=Symbol("type"),r3=class{constructor(e,r,o,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[pl]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,o,a):e&&this.set(e)}decode(e,r,o,a){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=Od(e,r,100),this.mode=h0(e,r+100,8),this.uid=h0(e,r+108,8),this.gid=h0(e,r+116,8),this.size=h0(e,r+124,12),this.mtime=e3(e,r+136,12),this.cksum=h0(e,r+148,12),this[$U](o),this[$U](a,!0),this[pl]=Od(e,r+156,1),this[pl]===""&&(this[pl]="0"),this[pl]==="0"&&this.path.substr(-1)==="/"&&(this[pl]="5"),this[pl]==="5"&&(this.size=0),this.linkpath=Od(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=Od(e,r+265,32),this.gname=Od(e,r+297,32),this.devmaj=h0(e,r+329,8),this.devmin=h0(e,r+337,8),e[r+475]!==0){let u=Od(e,r+345,155);this.path=u+"/"+this.path}else{let u=Od(e,r+345,130);u&&(this.path=u+"/"+this.path),this.atime=e3(e,r+476,12),this.ctime=e3(e,r+488,12)}let n=8*32;for(let u=r;u<r+148;u++)n+=e[u];for(let u=r+156;u<r+512;u++)n+=e[u];this.cksumValid=n===this.cksum,this.cksum===null&&n===8*32&&(this.nullBlock=!0)}[$U](e,r){for(let o in e)e[o]!==null&&e[o]!==void 0&&!(r&&o==="path")&&(this[o]=e[o])}encode(e,r){if(e||(e=this.block=Buffer.alloc(512),r=0),r||(r=0),!(e.length>=r+512))throw new Error("need 512 bytes for header");let o=this.ctime||this.atime?130:155,a=gat(this.path||"",o),n=a[0],u=a[1];this.needPax=a[2],this.needPax=Md(e,r,100,n)||this.needPax,this.needPax=g0(e,r+100,8,this.mode)||this.needPax,this.needPax=g0(e,r+108,8,this.uid)||this.needPax,this.needPax=g0(e,r+116,8,this.gid)||this.needPax,this.needPax=g0(e,r+124,12,this.size)||this.needPax,this.needPax=t3(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[pl].charCodeAt(0),this.needPax=Md(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=Md(e,r+265,32,this.uname)||this.needPax,this.needPax=Md(e,r+297,32,this.gname)||this.needPax,this.needPax=g0(e,r+329,8,this.devmaj)||this.needPax,this.needPax=g0(e,r+337,8,this.devmin)||this.needPax,this.needPax=Md(e,r+345,o,u)||this.needPax,e[r+475]!==0?this.needPax=Md(e,r+345,155,u)||this.needPax:(this.needPax=Md(e,r+345,130,u)||this.needPax,this.needPax=t3(e,r+476,12,this.atime)||this.needPax,this.needPax=t3(e,r+488,12,this.ctime)||this.needPax);let A=8*32;for(let p=r;p<r+148;p++)A+=e[p];for(let p=r+156;p<r+512;p++)A+=e[p];return this.cksum=A,g0(e,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let r in e)e[r]!==null&&e[r]!==void 0&&(this[r]=e[r])}get type(){return ZU.name.get(this[pl])||this[pl]}get typeKey(){return this[pl]}set type(e){ZU.code.has(e)?this[pl]=ZU.code.get(e):this[pl]=e}},gat=(t,e)=>{let o=t,a="",n,u=_E.parse(t).root||".";if(Buffer.byteLength(o)<100)n=[o,a,!1];else{a=_E.dirname(o),o=_E.basename(o);do Buffer.byteLength(o)<=100&&Buffer.byteLength(a)<=e?n=[o,a,!1]:Buffer.byteLength(o)>100&&Buffer.byteLength(a)<=e?n=[o.substr(0,100-1),a,!0]:(o=_E.join(_E.basename(a),o),a=_E.dirname(a));while(a!==u&&!n);n||(n=[t.substr(0,100-1),"",!0])}return n},Od=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),e3=(t,e,r)=>dat(h0(t,e,r)),dat=t=>t===null?null:new Date(t*1e3),h0=(t,e,r)=>t[e]&128?Yue.parse(t.slice(e,e+r)):yat(t,e,r),mat=t=>isNaN(t)?null:t,yat=(t,e,r)=>mat(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),Eat={12:8589934591,8:2097151},g0=(t,e,r,o)=>o===null?!1:o>Eat[r]||o<0?(Yue.encode(o,t.slice(e,e+r)),!0):(Cat(t,e,r,o),!1),Cat=(t,e,r,o)=>t.write(Iat(o,r),e,r,"ascii"),Iat=(t,e)=>wat(Math.floor(t).toString(8),e),wat=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",t3=(t,e,r,o)=>o===null?!1:g0(t,e,r,o.getTime()/1e3),Bat=new Array(156).join("\0"),Md=(t,e,r,o)=>o===null?!1:(t.write(o+Bat,e,r,"utf8"),o.length!==Buffer.byteLength(o)||o.length>r);Kue.exports=r3});var $x=U((s4t,Vue)=>{"use strict";var vat=HE(),Dat=Ie("path"),F1=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e==="")return null;let r=Buffer.byteLength(e),o=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(o);for(let n=0;n<512;n++)a[n]=0;new vat({path:("PaxHeader/"+Dat.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(e,512,r,"utf8");for(let n=r+512;n<a.length;n++)a[n]=0;return a}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===void 0)return"";let r=this[e]instanceof Date?this[e].getTime()/1e3:this[e],o=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+r+`
185`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};F1.parse=(t,e,r)=>new F1(Sat(Pat(t),e),r);var Sat=(t,e)=>e?Object.keys(t).reduce((r,o)=>(r[o]=t[o],r),e):t,Pat=t=>t.replace(/\n$/,"").split(`
186`).reduce(xat,Object.create(null)),xat=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let o=e.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=o.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};Vue.exports=F1});var qE=U((o4t,Jue)=>{Jue.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var eb=U((a4t,zue)=>{"use strict";zue.exports=t=>class extends t{warn(e,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||e,o.tarCode=e,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),o))}}});var i3=U((c4t,Xue)=>{"use strict";var tb=["|","<",">","?",":"],n3=tb.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),bat=new Map(tb.map((t,e)=>[t,n3[e]])),Qat=new Map(n3.map((t,e)=>[t,tb[e]]));Xue.exports={encode:t=>tb.reduce((e,r)=>e.split(r).join(bat.get(r)),t),decode:t=>n3.reduce((e,r)=>e.split(r).join(Qat.get(r)),t)}});var s3=U((u4t,$ue)=>{var{isAbsolute:kat,parse:Zue}=Ie("path").win32;$ue.exports=t=>{let e="",r=Zue(t);for(;kat(t)||r.root;){let o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(o.length),e+=o,r=Zue(t)}return[e,t]}});var tAe=U((A4t,eAe)=>{"use strict";eAe.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var g3=U((h4t,gAe)=>{"use strict";var lAe=LE(),cAe=$x(),uAe=HE(),lA=Ie("fs"),rAe=Ie("path"),aA=UE(),Fat=qE(),AAe=(t,e)=>e?(t=aA(t).replace(/^\.(\/|$)/,""),Fat(e)+"/"+t):aA(t),Rat=16*1024*1024,nAe=Symbol("process"),iAe=Symbol("file"),sAe=Symbol("directory"),a3=Symbol("symlink"),oAe=Symbol("hardlink"),R1=Symbol("header"),rb=Symbol("read"),l3=Symbol("lstat"),nb=Symbol("onlstat"),c3=Symbol("onread"),u3=Symbol("onreadlink"),A3=Symbol("openfile"),f3=Symbol("onopenfile"),d0=Symbol("close"),ib=Symbol("mode"),p3=Symbol("awaitDrain"),o3=Symbol("ondrain"),cA=Symbol("prefix"),aAe=Symbol("hadError"),fAe=eb(),Tat=i3(),pAe=s3(),hAe=tAe(),sb=fAe(class extends lAe{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=aA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||Rat,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=aA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?aA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=pAe(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Tat.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=aA(r.absolute||rAe.resolve(this.cwd,e)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[nb](this.statCache.get(this.absolute)):this[l3]()}emit(e,...r){return e==="error"&&(this[aAe]=!0),super.emit(e,...r)}[l3](){lA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[nb](r)})}[nb](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=Lat(e),this.emit("stat",e),this[nAe]()}[nAe](){switch(this.type){case"File":return this[iAe]();case"Directory":return this[sAe]();case"SymbolicLink":return this[a3]();default:return this.end()}}[ib](e){return hAe(e,this.type==="Directory",this.portable)}[cA](e){return AAe(e,this.prefix)}[R1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new uAe({path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,mode:this[ib](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new cAe({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[sAe](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[R1](),this.end()}[a3](){lA.readlink(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[u3](r)})}[u3](e){this.linkpath=aA(e),this[R1](),this.end()}[oAe](e){this.type="Link",this.linkpath=aA(rAe.relative(this.cwd,e)),this.stat.size=0,this[R1](),this.end()}[iAe](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[oAe](r)}this.linkCache.set(e,this.absolute)}if(this[R1](),this.stat.size===0)return this.end();this[A3]()}[A3](){lA.open(this.absolute,"r",(e,r)=>{if(e)return this.emit("error",e);this[f3](r)})}[f3](e){if(this.fd=e,this[aAe])return this[d0]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[rb]()}[rb](){let{fd:e,buf:r,offset:o,length:a,pos:n}=this;lA.read(e,r,o,a,n,(u,A)=>{if(u)return this[d0](()=>this.emit("error",u));this[c3](A)})}[d0](e){lA.close(this.fd,e)}[c3](e){if(e<=0&&this.remain>0){let a=new Error("encountered unexpected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[d0](()=>this.emit("error",a))}if(e>this.remain){let a=new Error("did not encounter expected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[d0](()=>this.emit("error",a))}if(e===this.remain)for(let a=e;a<this.length&&e<this.blockRemain;a++)this.buf[a+this.offset]=0,e++,this.remain++;let r=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(r)?this[o3]():this[p3](()=>this[o3]())}[p3](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){let r=new Error("writing more data than expected");return r.path=this.absolute,this.emit("error",r)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[o3](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[d0](e=>e?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[rb]()}}),h3=class extends sb{[l3](){this[nb](lA.lstatSync(this.absolute))}[a3](){this[u3](lA.readlinkSync(this.absolute))}[A3](){this[f3](lA.openSync(this.absolute,"r"))}[rb](){let e=!0;try{let{fd:r,buf:o,offset:a,length:n,pos:u}=this,A=lA.readSync(r,o,a,n,u);this[c3](A),e=!1}finally{if(e)try{this[d0](()=>{})}catch{}}}[p3](e){e()}[d0](e){lA.closeSync(this.fd),e()}},Nat=fAe(class extends lAe{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=aA(e.path),this.mode=this[ib](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=aA(e.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=pAe(this.path);a&&(this.path=n,o=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new uAe({path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.header.encode()&&!this.noPax&&super.write(new cAe({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[cA](e){return AAe(e,this.prefix)}[ib](e){return hAe(e,this.type==="Directory",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});sb.Sync=h3;sb.Tar=Nat;var Lat=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";gAe.exports=sb});var gb=U((d4t,wAe)=>{"use strict";var pb=class{constructor(e,r){this.path=e||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},Oat=LE(),Mat=VU(),Uat=Xx(),v3=g3(),_at=v3.Sync,Hat=v3.Tar,qat=pS(),dAe=Buffer.alloc(1024),lb=Symbol("onStat"),ob=Symbol("ended"),uA=Symbol("queue"),jE=Symbol("current"),Ud=Symbol("process"),ab=Symbol("processing"),mAe=Symbol("processJob"),AA=Symbol("jobs"),d3=Symbol("jobDone"),ub=Symbol("addFSEntry"),yAe=Symbol("addTarEntry"),C3=Symbol("stat"),I3=Symbol("readdir"),Ab=Symbol("onreaddir"),fb=Symbol("pipe"),EAe=Symbol("entry"),m3=Symbol("entryOpt"),w3=Symbol("writeEntryClass"),IAe=Symbol("write"),y3=Symbol("ondrain"),hb=Ie("fs"),CAe=Ie("path"),jat=eb(),E3=UE(),D3=jat(class extends Oat{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=E3(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[w3]=v3,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new Mat.Gzip(e.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[y3]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[y3]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:r=>!0,this[uA]=new qat,this[AA]=0,this.jobs=+e.jobs||4,this[ab]=!1,this[ob]=!1}[IAe](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[ob]=!0,this[Ud](),this}write(e){if(this[ob])throw new Error("write after end");return e instanceof Uat?this[yAe](e):this[ub](e),this.flowing}[yAe](e){let r=E3(CAe.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let o=new pb(e.path,r,!1);o.entry=new Hat(e,this[m3](o)),o.entry.on("end",a=>this[d3](o)),this[AA]+=1,this[uA].push(o)}this[Ud]()}[ub](e){let r=E3(CAe.resolve(this.cwd,e));this[uA].push(new pb(e,r)),this[Ud]()}[C3](e){e.pending=!0,this[AA]+=1;let r=this.follow?"stat":"lstat";hb[r](e.absolute,(o,a)=>{e.pending=!1,this[AA]-=1,o?this.emit("error",o):this[lb](e,a)})}[lb](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[Ud]()}[I3](e){e.pending=!0,this[AA]+=1,hb.readdir(e.absolute,(r,o)=>{if(e.pending=!1,this[AA]-=1,r)return this.emit("error",r);this[Ab](e,o)})}[Ab](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[Ud]()}[Ud](){if(!this[ab]){this[ab]=!0;for(let e=this[uA].head;e!==null&&this[AA]<this.jobs;e=e.next)if(this[mAe](e.value),e.value.ignore){let r=e.next;this[uA].removeNode(e),e.next=r}this[ab]=!1,this[ob]&&!this[uA].length&&this[AA]===0&&(this.zip?this.zip.end(dAe):(super.write(dAe),super.end()))}}get[jE](){return this[uA]&&this[uA].head&&this[uA].head.value}[d3](e){this[uA].shift(),this[AA]-=1,this[Ud]()}[mAe](e){if(!e.pending){if(e.entry){e===this[jE]&&!e.piped&&this[fb](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[lb](e,this.statCache.get(e.absolute)):this[C3](e)),!!e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[Ab](e,this.readdirCache.get(e.absolute)):this[I3](e),!e.readdir))){if(e.entry=this[EAe](e),!e.entry){e.ignore=!0;return}e===this[jE]&&!e.piped&&this[fb](e)}}}[m3](e){return{onwarn:(r,o,a)=>this.warn(r,o,a),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[EAe](e){this[AA]+=1;try{return new this[w3](e.path,this[m3](e)).on("end",()=>this[d3](e)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[y3](){this[jE]&&this[jE].entry&&this[jE].entry.resume()}[fb](e){e.piped=!0,e.readdir&&e.readdir.forEach(a=>{let n=e.path,u=n==="./"?"":n.replace(/\/*$/,"/");this[ub](u+a)});let r=e.entry,o=this.zip;o?r.on("data",a=>{o.write(a)||r.pause()}):r.on("data",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),B3=class extends D3{constructor(e){super(e),this[w3]=_at}pause(){}resume(){}[C3](e){let r=this.follow?"statSync":"lstatSync";this[lb](e,hb[r](e.absolute))}[I3](e,r){this[Ab](e,hb.readdirSync(e.absolute))}[fb](e){let r=e.entry,o=this.zip;e.readdir&&e.readdir.forEach(a=>{let n=e.path,u=n==="./"?"":n.replace(/\/*$/,"/");this[ub](u+a)}),o?r.on("data",a=>{o.write(a)}):r.on("data",a=>{super[IAe](a)})}};D3.Sync=B3;wAe.exports=D3});var XE=U(N1=>{"use strict";var Gat=LE(),Wat=Ie("events").EventEmitter,Fa=Ie("fs"),x3=Fa.writev;if(!x3){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;x3=(r,o,a,n)=>{let u=(p,h)=>n(p,h,o),A=new e;A.oncomplete=u,t.writeBuffers(r,o,a,A)}}var JE=Symbol("_autoClose"),zc=Symbol("_close"),T1=Symbol("_ended"),Mn=Symbol("_fd"),BAe=Symbol("_finished"),y0=Symbol("_flags"),S3=Symbol("_flush"),b3=Symbol("_handleChunk"),Q3=Symbol("_makeBuf"),Cb=Symbol("_mode"),db=Symbol("_needDrain"),KE=Symbol("_onerror"),zE=Symbol("_onopen"),P3=Symbol("_onread"),WE=Symbol("_onwrite"),E0=Symbol("_open"),Gf=Symbol("_path"),_d=Symbol("_pos"),fA=Symbol("_queue"),YE=Symbol("_read"),vAe=Symbol("_readSize"),m0=Symbol("_reading"),mb=Symbol("_remain"),DAe=Symbol("_size"),yb=Symbol("_write"),GE=Symbol("_writing"),Eb=Symbol("_defaultFlag"),VE=Symbol("_errored"),Ib=class extends Gat{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[VE]=!1,this[Mn]=typeof r.fd=="number"?r.fd:null,this[Gf]=e,this[vAe]=r.readSize||16*1024*1024,this[m0]=!1,this[DAe]=typeof r.size=="number"?r.size:1/0,this[mb]=this[DAe],this[JE]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[Mn]=="number"?this[YE]():this[E0]()}get fd(){return this[Mn]}get path(){return this[Gf]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[E0](){Fa.open(this[Gf],"r",(e,r)=>this[zE](e,r))}[zE](e,r){e?this[KE](e):(this[Mn]=r,this.emit("open",r),this[YE]())}[Q3](){return Buffer.allocUnsafe(Math.min(this[vAe],this[mb]))}[YE](){if(!this[m0]){this[m0]=!0;let e=this[Q3]();if(e.length===0)return process.nextTick(()=>this[P3](null,0,e));Fa.read(this[Mn],e,0,e.length,null,(r,o,a)=>this[P3](r,o,a))}}[P3](e,r,o){this[m0]=!1,e?this[KE](e):this[b3](r,o)&&this[YE]()}[zc](){if(this[JE]&&typeof this[Mn]=="number"){let e=this[Mn];this[Mn]=null,Fa.close(e,r=>r?this.emit("error",r):this.emit("close"))}}[KE](e){this[m0]=!0,this[zc](),this.emit("error",e)}[b3](e,r){let o=!1;return this[mb]-=e,e>0&&(o=super.write(e<r.length?r.slice(0,e):r)),(e===0||this[mb]<=0)&&(o=!1,this[zc](),super.end()),o}emit(e,r){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[Mn]=="number"&&this[YE]();break;case"error":return this[VE]?void 0:(this[VE]=!0,super.emit(e,r));default:return super.emit(e,r)}}},k3=class extends Ib{[E0](){let e=!0;try{this[zE](null,Fa.openSync(this[Gf],"r")),e=!1}finally{e&&this[zc]()}}[YE](){let e=!0;try{if(!this[m0]){this[m0]=!0;do{let r=this[Q3](),o=r.length===0?0:Fa.readSync(this[Mn],r,0,r.length,null);if(!this[b3](o,r))break}while(!0);this[m0]=!1}e=!1}finally{e&&this[zc]()}}[zc](){if(this[JE]&&typeof this[Mn]=="number"){let e=this[Mn];this[Mn]=null,Fa.closeSync(e),this.emit("close")}}},wb=class extends Wat{constructor(e,r){r=r||{},super(r),this.readable=!1,this.writable=!0,this[VE]=!1,this[GE]=!1,this[T1]=!1,this[db]=!1,this[fA]=[],this[Gf]=e,this[Mn]=typeof r.fd=="number"?r.fd:null,this[Cb]=r.mode===void 0?438:r.mode,this[_d]=typeof r.start=="number"?r.start:null,this[JE]=typeof r.autoClose=="boolean"?r.autoClose:!0;let o=this[_d]!==null?"r+":"w";this[Eb]=r.flags===void 0,this[y0]=this[Eb]?o:r.flags,this[Mn]===null&&this[E0]()}emit(e,r){if(e==="error"){if(this[VE])return;this[VE]=!0}return super.emit(e,r)}get fd(){return this[Mn]}get path(){return this[Gf]}[KE](e){this[zc](),this[GE]=!0,this.emit("error",e)}[E0](){Fa.open(this[Gf],this[y0],this[Cb],(e,r)=>this[zE](e,r))}[zE](e,r){this[Eb]&&this[y0]==="r+"&&e&&e.code==="ENOENT"?(this[y0]="w",this[E0]()):e?this[KE](e):(this[Mn]=r,this.emit("open",r),this[S3]())}end(e,r){return e&&this.write(e,r),this[T1]=!0,!this[GE]&&!this[fA].length&&typeof this[Mn]=="number"&&this[WE](null,0),this}write(e,r){return typeof e=="string"&&(e=Buffer.from(e,r)),this[T1]?(this.emit("error",new Error("write() after end()")),!1):this[Mn]===null||this[GE]||this[fA].length?(this[fA].push(e),this[db]=!0,!1):(this[GE]=!0,this[yb](e),!0)}[yb](e){Fa.write(this[Mn],e,0,e.length,this[_d],(r,o)=>this[WE](r,o))}[WE](e,r){e?this[KE](e):(this[_d]!==null&&(this[_d]+=r),this[fA].length?this[S3]():(this[GE]=!1,this[T1]&&!this[BAe]?(this[BAe]=!0,this[zc](),this.emit("finish")):this[db]&&(this[db]=!1,this.emit("drain"))))}[S3](){if(this[fA].length===0)this[T1]&&this[WE](null,0);else if(this[fA].length===1)this[yb](this[fA].pop());else{let e=this[fA];this[fA]=[],x3(this[Mn],e,this[_d],(r,o)=>this[WE](r,o))}}[zc](){if(this[JE]&&typeof this[Mn]=="number"){let e=this[Mn];this[Mn]=null,Fa.close(e,r=>r?this.emit("error",r):this.emit("close"))}}},F3=class extends wb{[E0](){let e;if(this[Eb]&&this[y0]==="r+")try{e=Fa.openSync(this[Gf],this[y0],this[Cb])}catch(r){if(r.code==="ENOENT")return this[y0]="w",this[E0]();throw r}else e=Fa.openSync(this[Gf],this[y0],this[Cb]);this[zE](null,e)}[zc](){if(this[JE]&&typeof this[Mn]=="number"){let e=this[Mn];this[Mn]=null,Fa.closeSync(e),this.emit("close")}}[yb](e){let r=!0;try{this[WE](null,Fa.writeSync(this[Mn],e,0,e.length,this[_d])),r=!1}finally{if(r)try{this[zc]()}catch{}}}};N1.ReadStream=Ib;N1.ReadStreamSync=k3;N1.WriteStream=wb;N1.WriteStreamSync=F3});var bb=U((E4t,FAe)=>{"use strict";var Yat=eb(),Kat=HE(),Vat=Ie("events"),Jat=pS(),zat=1024*1024,Xat=Xx(),SAe=$x(),Zat=VU(),R3=Buffer.from([31,139]),nc=Symbol("state"),Hd=Symbol("writeEntry"),Wf=Symbol("readEntry"),T3=Symbol("nextEntry"),PAe=Symbol("processEntry"),ic=Symbol("extendedHeader"),L1=Symbol("globalExtendedHeader"),C0=Symbol("meta"),xAe=Symbol("emitMeta"),li=Symbol("buffer"),Yf=Symbol("queue"),qd=Symbol("ended"),bAe=Symbol("emittedEnd"),jd=Symbol("emit"),Ra=Symbol("unzip"),Bb=Symbol("consumeChunk"),vb=Symbol("consumeChunkSub"),N3=Symbol("consumeBody"),QAe=Symbol("consumeMeta"),kAe=Symbol("consumeHeader"),Db=Symbol("consuming"),L3=Symbol("bufferConcat"),O3=Symbol("maybeEnd"),O1=Symbol("writing"),I0=Symbol("aborted"),Sb=Symbol("onDone"),Gd=Symbol("sawValidEntry"),Pb=Symbol("sawNullBlock"),xb=Symbol("sawEOF"),$at=t=>!0;FAe.exports=Yat(class extends Vat{constructor(e){e=e||{},super(e),this.file=e.file||"",this[Gd]=null,this.on(Sb,r=>{(this[nc]==="begin"||this[Gd]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(Sb,e.ondone):this.on(Sb,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||zat,this.filter=typeof e.filter=="function"?e.filter:$at,this.writable=!0,this.readable=!1,this[Yf]=new Jat,this[li]=null,this[Wf]=null,this[Hd]=null,this[nc]="begin",this[C0]="",this[ic]=null,this[L1]=null,this[qd]=!1,this[Ra]=null,this[I0]=!1,this[Pb]=!1,this[xb]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[kAe](e,r){this[Gd]===null&&(this[Gd]=!1);let o;try{o=new Kat(e,r,this[ic],this[L1])}catch(a){return this.warn("TAR_ENTRY_INVALID",a)}if(o.nullBlock)this[Pb]?(this[xb]=!0,this[nc]==="begin"&&(this[nc]="header"),this[jd]("eof")):(this[Pb]=!0,this[jd]("nullBlock"));else if(this[Pb]=!1,!o.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:o});else if(!o.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:o});else{let a=o.type;if(/^(Symbolic)?Link$/.test(a)&&!o.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:o});else if(!/^(Symbolic)?Link$/.test(a)&&o.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:o});else{let n=this[Hd]=new Xat(o,this[ic],this[L1]);if(!this[Gd])if(n.remain){let u=()=>{n.invalid||(this[Gd]=!0)};n.on("end",u)}else this[Gd]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[jd]("ignoredEntry",n),this[nc]="ignore",n.resume()):n.size>0&&(this[C0]="",n.on("data",u=>this[C0]+=u),this[nc]="meta"):(this[ic]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[jd]("ignoredEntry",n),this[nc]=n.remain?"ignore":"header",n.resume()):(n.remain?this[nc]="body":(this[nc]="header",n.end()),this[Wf]?this[Yf].push(n):(this[Yf].push(n),this[T3]())))}}}[PAe](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Wf]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",o=>this[T3]()),r=!1)):(this[Wf]=null,r=!1),r}[T3](){do;while(this[PAe](this[Yf].shift()));if(!this[Yf].length){let e=this[Wf];!e||e.flowing||e.size===e.remain?this[O1]||this.emit("drain"):e.once("drain",o=>this.emit("drain"))}}[N3](e,r){let o=this[Hd],a=o.blockRemain,n=a>=e.length&&r===0?e:e.slice(r,r+a);return o.write(n),o.blockRemain||(this[nc]="header",this[Hd]=null,o.end()),n.length}[QAe](e,r){let o=this[Hd],a=this[N3](e,r);return this[Hd]||this[xAe](o),a}[jd](e,r,o){!this[Yf].length&&!this[Wf]?this.emit(e,r,o):this[Yf].push([e,r,o])}[xAe](e){switch(this[jd]("meta",this[C0]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[ic]=SAe.parse(this[C0],this[ic],!1);break;case"GlobalExtendedHeader":this[L1]=SAe.parse(this[C0],this[L1],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[ic]=this[ic]||Object.create(null),this[ic].path=this[C0].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[ic]=this[ic]||Object.create(null),this[ic].linkpath=this[C0].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[I0]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[I0])return;if(this[Ra]===null&&e){if(this[li]&&(e=Buffer.concat([this[li],e]),this[li]=null),e.length<R3.length)return this[li]=e,!0;for(let o=0;this[Ra]===null&&o<R3.length;o++)e[o]!==R3[o]&&(this[Ra]=!1);if(this[Ra]===null){let o=this[qd];this[qd]=!1,this[Ra]=new Zat.Unzip,this[Ra].on("data",n=>this[Bb](n)),this[Ra].on("error",n=>this.abort(n)),this[Ra].on("end",n=>{this[qd]=!0,this[Bb]()}),this[O1]=!0;let a=this[Ra][o?"end":"write"](e);return this[O1]=!1,a}}this[O1]=!0,this[Ra]?this[Ra].write(e):this[Bb](e),this[O1]=!1;let r=this[Yf].length?!1:this[Wf]?this[Wf].flowing:!0;return!r&&!this[Yf].length&&this[Wf].once("drain",o=>this.emit("drain")),r}[L3](e){e&&!this[I0]&&(this[li]=this[li]?Buffer.concat([this[li],e]):e)}[O3](){if(this[qd]&&!this[bAe]&&!this[I0]&&!this[Db]){this[bAe]=!0;let e=this[Hd];if(e&&e.blockRemain){let r=this[li]?this[li].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[li]&&e.write(this[li]),e.end()}this[jd](Sb)}}[Bb](e){if(this[Db])this[L3](e);else if(!e&&!this[li])this[O3]();else{if(this[Db]=!0,this[li]){this[L3](e);let r=this[li];this[li]=null,this[vb](r)}else this[vb](e);for(;this[li]&&this[li].length>=512&&!this[I0]&&!this[xb];){let r=this[li];this[li]=null,this[vb](r)}this[Db]=!1}(!this[li]||this[qd])&&this[O3]()}[vb](e){let r=0,o=e.length;for(;r+512<=o&&!this[I0]&&!this[xb];)switch(this[nc]){case"begin":case"header":this[kAe](e,r),r+=512;break;case"ignore":case"body":r+=this[N3](e,r);break;case"meta":r+=this[QAe](e,r);break;default:throw new Error("invalid state: "+this[nc])}r<o&&(this[li]?this[li]=Buffer.concat([e.slice(r),this[li]]):this[li]=e.slice(r))}end(e){this[I0]||(this[Ra]?this[Ra].end(e):(this[qd]=!0,this.write(e)))}})});var Qb=U((C4t,LAe)=>{"use strict";var elt=TE(),TAe=bb(),ZE=Ie("fs"),tlt=XE(),RAe=Ie("path"),M3=qE();LAe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let o=elt(t);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&nlt(o,e),o.noResume||rlt(o),o.file&&o.sync?ilt(o):o.file?slt(o,r):NAe(o)};var rlt=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},nlt=(t,e)=>{let r=new Map(e.map(n=>[M3(n),!0])),o=t.filter,a=(n,u)=>{let A=u||RAe.parse(n).root||".",p=n===A?!1:r.has(n)?r.get(n):a(RAe.dirname(n),A);return r.set(n,p),p};t.filter=o?(n,u)=>o(n,u)&&a(M3(n)):n=>a(M3(n))},ilt=t=>{let e=NAe(t),r=t.file,o=!0,a;try{let n=ZE.statSync(r),u=t.maxReadSize||16*1024*1024;if(n.size<u)e.end(ZE.readFileSync(r));else{let A=0,p=Buffer.allocUnsafe(u);for(a=ZE.openSync(r,"r");A<n.size;){let h=ZE.readSync(a,p,0,u,A);A+=h,e.write(p.slice(0,h))}e.end()}o=!1}finally{if(o&&a)try{ZE.closeSync(a)}catch{}}},slt=(t,e)=>{let r=new TAe(t),o=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((u,A)=>{r.on("error",A),r.on("end",u),ZE.stat(a,(p,h)=>{if(p)A(p);else{let C=new tlt.ReadStream(a,{readSize:o,size:h.size});C.on("error",A),C.pipe(r)}})});return e?n.then(e,e):n},NAe=t=>new TAe(t)});var qAe=U((I4t,HAe)=>{"use strict";var olt=TE(),kb=gb(),OAe=XE(),MAe=Qb(),UAe=Ie("path");HAe.exports=(t,e,r)=>{if(typeof e=="function"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let o=olt(t);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return o.file&&o.sync?alt(o,e):o.file?llt(o,e,r):o.sync?clt(o,e):ult(o,e)};var alt=(t,e)=>{let r=new kb.Sync(t),o=new OAe.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(o),_Ae(r,e)},llt=(t,e,r)=>{let o=new kb(t),a=new OAe.WriteStream(t.file,{mode:t.mode||438});o.pipe(a);let n=new Promise((u,A)=>{a.on("error",A),a.on("close",u),o.on("error",A)});return U3(o,e),r?n.then(r,r):n},_Ae=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?MAe({file:UAe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:o=>t.add(o)}):t.add(r)}),t.end()},U3=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return MAe({file:UAe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:o=>t.add(o)}).then(o=>U3(t,e));t.add(r)}t.end()},clt=(t,e)=>{let r=new kb.Sync(t);return _Ae(r,e),r},ult=(t,e)=>{let r=new kb(t);return U3(r,e),r}});var _3=U((w4t,JAe)=>{"use strict";var Alt=TE(),jAe=gb(),hl=Ie("fs"),GAe=XE(),WAe=Qb(),YAe=Ie("path"),KAe=HE();JAe.exports=(t,e,r)=>{let o=Alt(t);if(!o.file)throw new TypeError("file is required");if(o.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),o.sync?flt(o,e):hlt(o,e,r)};var flt=(t,e)=>{let r=new jAe.Sync(t),o=!0,a,n;try{try{a=hl.openSync(t.file,"r+")}catch(p){if(p.code==="ENOENT")a=hl.openSync(t.file,"w+");else throw p}let u=hl.fstatSync(a),A=Buffer.alloc(512);e:for(n=0;n<u.size;n+=512){for(let C=0,w=0;C<512;C+=w){if(w=hl.readSync(a,A,C,A.length-C,n+C),n===0&&A[0]===31&&A[1]===139)throw new Error("cannot append to compressed archives");if(!w)break e}let p=new KAe(A);if(!p.cksumValid)break;let h=512*Math.ceil(p.size/512);if(n+h+512>u.size)break;n+=h,t.mtimeCache&&t.mtimeCache.set(p.path,p.mtime)}o=!1,plt(t,r,n,a,e)}finally{if(o)try{hl.closeSync(a)}catch{}}},plt=(t,e,r,o,a)=>{let n=new GAe.WriteStreamSync(t.file,{fd:o,start:r});e.pipe(n),glt(e,a)},hlt=(t,e,r)=>{e=Array.from(e);let o=new jAe(t),a=(u,A,p)=>{let h=(E,R)=>{E?hl.close(u,L=>p(E)):p(null,R)},C=0;if(A===0)return h(null,0);let w=0,v=Buffer.alloc(512),b=(E,R)=>{if(E)return h(E);if(w+=R,w<512&&R)return hl.read(u,v,w,v.length-w,C+w,b);if(C===0&&v[0]===31&&v[1]===139)return h(new Error("cannot append to compressed archives"));if(w<512)return h(null,C);let L=new KAe(v);if(!L.cksumValid)return h(null,C);let _=512*Math.ceil(L.size/512);if(C+_+512>A||(C+=_+512,C>=A))return h(null,C);t.mtimeCache&&t.mtimeCache.set(L.path,L.mtime),w=0,hl.read(u,v,0,512,C,b)};hl.read(u,v,0,512,C,b)},n=new Promise((u,A)=>{o.on("error",A);let p="r+",h=(C,w)=>{if(C&&C.code==="ENOENT"&&p==="r+")return p="w+",hl.open(t.file,p,h);if(C)return A(C);hl.fstat(w,(v,b)=>{if(v)return hl.close(w,()=>A(v));a(w,b.size,(E,R)=>{if(E)return A(E);let L=new GAe.WriteStream(t.file,{fd:w,start:R});o.pipe(L),L.on("error",A),L.on("close",u),VAe(o,e)})})};hl.open(t.file,p,h)});return r?n.then(r,r):n},glt=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?WAe({file:YAe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:o=>t.add(o)}):t.add(r)}),t.end()},VAe=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return WAe({file:YAe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:o=>t.add(o)}).then(o=>VAe(t,e));t.add(r)}t.end()}});var XAe=U((B4t,zAe)=>{"use strict";var dlt=TE(),mlt=_3();zAe.exports=(t,e,r)=>{let o=dlt(t);if(!o.file)throw new TypeError("file is required");if(o.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),ylt(o),mlt(o,e,r)};var ylt=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,o)=>e(r,o)&&!(t.mtimeCache.get(r)>o.mtime):(r,o)=>!(t.mtimeCache.get(r)>o.mtime)}});var efe=U((v4t,$Ae)=>{var{promisify:ZAe}=Ie("util"),w0=Ie("fs"),Elt=t=>{if(!t)t={mode:511,fs:w0};else if(typeof t=="object")t={mode:511,fs:w0,...t};else if(typeof t=="number")t={mode:t,fs:w0};else if(typeof t=="string")t={mode:parseInt(t,8),fs:w0};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||w0.mkdir,t.mkdirAsync=ZAe(t.mkdir),t.stat=t.stat||t.fs.stat||w0.stat,t.statAsync=ZAe(t.stat),t.statSync=t.statSync||t.fs.statSync||w0.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||w0.mkdirSync,t};$Ae.exports=Elt});var rfe=U((D4t,tfe)=>{var Clt=process.platform,{resolve:Ilt,parse:wlt}=Ie("path"),Blt=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=Ilt(t),Clt==="win32"){let e=/[*|"<>?:]/,{root:r}=wlt(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};tfe.exports=Blt});var afe=U((S4t,ofe)=>{var{dirname:nfe}=Ie("path"),ife=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(o=>o.isDirectory()?r:void 0,o=>o.code==="ENOENT"?ife(t,nfe(e),e):void 0),sfe=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(o){return o.code==="ENOENT"?sfe(t,nfe(e),e):void 0}};ofe.exports={findMade:ife,findMadeSync:sfe}});var j3=U((P4t,cfe)=>{var{dirname:lfe}=Ie("path"),H3=(t,e,r)=>{e.recursive=!1;let o=lfe(t);return o===t?e.mkdirAsync(t,e).catch(a=>{if(a.code!=="EISDIR")throw a}):e.mkdirAsync(t,e).then(()=>r||t,a=>{if(a.code==="ENOENT")return H3(o,e).then(n=>H3(t,e,n));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;return e.statAsync(t).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},q3=(t,e,r)=>{let o=lfe(t);if(e.recursive=!1,o===t)try{return e.mkdirSync(t,e)}catch(a){if(a.code!=="EISDIR")throw a;return}try{return e.mkdirSync(t,e),r||t}catch(a){if(a.code==="ENOENT")return q3(t,e,q3(o,e,r));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;try{if(!e.statSync(t).isDirectory())throw a}catch{throw a}}};cfe.exports={mkdirpManual:H3,mkdirpManualSync:q3}});var ffe=U((x4t,Afe)=>{var{dirname:ufe}=Ie("path"),{findMade:vlt,findMadeSync:Dlt}=afe(),{mkdirpManual:Slt,mkdirpManualSync:Plt}=j3(),xlt=(t,e)=>(e.recursive=!0,ufe(t)===t?e.mkdirAsync(t,e):vlt(e,t).then(o=>e.mkdirAsync(t,e).then(()=>o).catch(a=>{if(a.code==="ENOENT")return Slt(t,e);throw a}))),blt=(t,e)=>{if(e.recursive=!0,ufe(t)===t)return e.mkdirSync(t,e);let o=Dlt(e,t);try{return e.mkdirSync(t,e),o}catch(a){if(a.code==="ENOENT")return Plt(t,e);throw a}};Afe.exports={mkdirpNative:xlt,mkdirpNativeSync:blt}});var dfe=U((b4t,gfe)=>{var pfe=Ie("fs"),Qlt=process.version,G3=Qlt.replace(/^v/,"").split("."),hfe=+G3[0]>10||+G3[0]==10&&+G3[1]>=12,klt=hfe?t=>t.mkdir===pfe.mkdir:()=>!1,Flt=hfe?t=>t.mkdirSync===pfe.mkdirSync:()=>!1;gfe.exports={useNative:klt,useNativeSync:Flt}});var wfe=U((Q4t,Ife)=>{var $E=efe(),eC=rfe(),{mkdirpNative:mfe,mkdirpNativeSync:yfe}=ffe(),{mkdirpManual:Efe,mkdirpManualSync:Cfe}=j3(),{useNative:Rlt,useNativeSync:Tlt}=dfe(),tC=(t,e)=>(t=eC(t),e=$E(e),Rlt(e)?mfe(t,e):Efe(t,e)),Nlt=(t,e)=>(t=eC(t),e=$E(e),Tlt(e)?yfe(t,e):Cfe(t,e));tC.sync=Nlt;tC.native=(t,e)=>mfe(eC(t),$E(e));tC.manual=(t,e)=>Efe(eC(t),$E(e));tC.nativeSync=(t,e)=>yfe(eC(t),$E(e));tC.manualSync=(t,e)=>Cfe(eC(t),$E(e));Ife.exports=tC});var bfe=U((k4t,xfe)=>{"use strict";var sc=Ie("fs"),Wd=Ie("path"),Llt=sc.lchown?"lchown":"chown",Olt=sc.lchownSync?"lchownSync":"chownSync",vfe=sc.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),Bfe=(t,e,r)=>{try{return sc[Olt](t,e,r)}catch(o){if(o.code!=="ENOENT")throw o}},Mlt=(t,e,r)=>{try{return sc.chownSync(t,e,r)}catch(o){if(o.code!=="ENOENT")throw o}},Ult=vfe?(t,e,r,o)=>a=>{!a||a.code!=="EISDIR"?o(a):sc.chown(t,e,r,o)}:(t,e,r,o)=>o,W3=vfe?(t,e,r)=>{try{return Bfe(t,e,r)}catch(o){if(o.code!=="EISDIR")throw o;Mlt(t,e,r)}}:(t,e,r)=>Bfe(t,e,r),_lt=process.version,Dfe=(t,e,r)=>sc.readdir(t,e,r),Hlt=(t,e)=>sc.readdirSync(t,e);/^v4\./.test(_lt)&&(Dfe=(t,e,r)=>sc.readdir(t,r));var Fb=(t,e,r,o)=>{sc[Llt](t,e,r,Ult(t,e,r,a=>{o(a&&a.code!=="ENOENT"?a:null)}))},Sfe=(t,e,r,o,a)=>{if(typeof e=="string")return sc.lstat(Wd.resolve(t,e),(n,u)=>{if(n)return a(n.code!=="ENOENT"?n:null);u.name=e,Sfe(t,u,r,o,a)});if(e.isDirectory())Y3(Wd.resolve(t,e.name),r,o,n=>{if(n)return a(n);let u=Wd.resolve(t,e.name);Fb(u,r,o,a)});else{let n=Wd.resolve(t,e.name);Fb(n,r,o,a)}},Y3=(t,e,r,o)=>{Dfe(t,{withFileTypes:!0},(a,n)=>{if(a){if(a.code==="ENOENT")return o();if(a.code!=="ENOTDIR"&&a.code!=="ENOTSUP")return o(a)}if(a||!n.length)return Fb(t,e,r,o);let u=n.length,A=null,p=h=>{if(!A){if(h)return o(A=h);if(--u===0)return Fb(t,e,r,o)}};n.forEach(h=>Sfe(t,h,e,r,p))})},qlt=(t,e,r,o)=>{if(typeof e=="string")try{let a=sc.lstatSync(Wd.resolve(t,e));a.name=e,e=a}catch(a){if(a.code==="ENOENT")return;throw a}e.isDirectory()&&Pfe(Wd.resolve(t,e.name),r,o),W3(Wd.resolve(t,e.name),r,o)},Pfe=(t,e,r)=>{let o;try{o=Hlt(t,{withFileTypes:!0})}catch(a){if(a.code==="ENOENT")return;if(a.code==="ENOTDIR"||a.code==="ENOTSUP")return W3(t,e,r);throw a}return o&&o.length&&o.forEach(a=>qlt(t,a,e,r)),W3(t,e,r)};xfe.exports=Y3;Y3.sync=Pfe});var Rfe=U((F4t,K3)=>{"use strict";var Qfe=wfe(),oc=Ie("fs"),Rb=Ie("path"),kfe=bfe(),Xc=UE(),Tb=class extends Error{constructor(e,r){super("Cannot extract through symbolic link"),this.path=r,this.symlink=e}get name(){return"SylinkError"}},Nb=class extends Error{constructor(e,r){super(r+": Cannot cd into '"+e+"'"),this.path=e,this.code=r}get name(){return"CwdError"}},Lb=(t,e)=>t.get(Xc(e)),M1=(t,e,r)=>t.set(Xc(e),r),jlt=(t,e)=>{oc.stat(t,(r,o)=>{(r||!o.isDirectory())&&(r=new Nb(t,r&&r.code||"ENOTDIR")),e(r)})};K3.exports=(t,e,r)=>{t=Xc(t);let o=e.umask,a=e.mode|448,n=(a&o)!==0,u=e.uid,A=e.gid,p=typeof u=="number"&&typeof A=="number"&&(u!==e.processUid||A!==e.processGid),h=e.preserve,C=e.unlink,w=e.cache,v=Xc(e.cwd),b=(L,_)=>{L?r(L):(M1(w,t,!0),_&&p?kfe(_,u,A,V=>b(V)):n?oc.chmod(t,a,r):r())};if(w&&Lb(w,t)===!0)return b();if(t===v)return jlt(t,b);if(h)return Qfe(t,{mode:a}).then(L=>b(null,L),b);let R=Xc(Rb.relative(v,t)).split("/");Ob(v,R,a,w,C,v,null,b)};var Ob=(t,e,r,o,a,n,u,A)=>{if(!e.length)return A(null,u);let p=e.shift(),h=Xc(Rb.resolve(t+"/"+p));if(Lb(o,h))return Ob(h,e,r,o,a,n,u,A);oc.mkdir(h,r,Ffe(h,e,r,o,a,n,u,A))},Ffe=(t,e,r,o,a,n,u,A)=>p=>{p?oc.lstat(t,(h,C)=>{if(h)h.path=h.path&&Xc(h.path),A(h);else if(C.isDirectory())Ob(t,e,r,o,a,n,u,A);else if(a)oc.unlink(t,w=>{if(w)return A(w);oc.mkdir(t,r,Ffe(t,e,r,o,a,n,u,A))});else{if(C.isSymbolicLink())return A(new Tb(t,t+"/"+e.join("/")));A(p)}}):(u=u||t,Ob(t,e,r,o,a,n,u,A))},Glt=t=>{let e=!1,r="ENOTDIR";try{e=oc.statSync(t).isDirectory()}catch(o){r=o.code}finally{if(!e)throw new Nb(t,r)}};K3.exports.sync=(t,e)=>{t=Xc(t);let r=e.umask,o=e.mode|448,a=(o&r)!==0,n=e.uid,u=e.gid,A=typeof n=="number"&&typeof u=="number"&&(n!==e.processUid||u!==e.processGid),p=e.preserve,h=e.unlink,C=e.cache,w=Xc(e.cwd),v=L=>{M1(C,t,!0),L&&A&&kfe.sync(L,n,u),a&&oc.chmodSync(t,o)};if(C&&Lb(C,t)===!0)return v();if(t===w)return Glt(w),v();if(p)return v(Qfe.sync(t,o));let E=Xc(Rb.relative(w,t)).split("/"),R=null;for(let L=E.shift(),_=w;L&&(_+="/"+L);L=E.shift())if(_=Xc(Rb.resolve(_)),!Lb(C,_))try{oc.mkdirSync(_,o),R=R||_,M1(C,_,!0)}catch{let re=oc.lstatSync(_);if(re.isDirectory()){M1(C,_,!0);continue}else if(h){oc.unlinkSync(_),oc.mkdirSync(_,o),R=R||_,M1(C,_,!0);continue}else if(re.isSymbolicLink())return new Tb(_,_+"/"+E.join("/"))}return v(R)}});var J3=U((R4t,Tfe)=>{var V3=Object.create(null),{hasOwnProperty:Wlt}=Object.prototype;Tfe.exports=t=>(Wlt.call(V3,t)||(V3[t]=t.normalize("NFKD")),V3[t])});var Mfe=U((T4t,Ofe)=>{var Nfe=Ie("assert"),Ylt=J3(),Klt=qE(),{join:Lfe}=Ie("path"),Vlt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Jlt=Vlt==="win32";Ofe.exports=()=>{let t=new Map,e=new Map,r=h=>h.split("/").slice(0,-1).reduce((w,v)=>(w.length&&(v=Lfe(w[w.length-1],v)),w.push(v||"/"),w),[]),o=new Set,a=h=>{let C=e.get(h);if(!C)throw new Error("function does not have any path reservations");return{paths:C.paths.map(w=>t.get(w)),dirs:[...C.dirs].map(w=>t.get(w))}},n=h=>{let{paths:C,dirs:w}=a(h);return C.every(v=>v[0]===h)&&w.every(v=>v[0]instanceof Set&&v[0].has(h))},u=h=>o.has(h)||!n(h)?!1:(o.add(h),h(()=>A(h)),!0),A=h=>{if(!o.has(h))return!1;let{paths:C,dirs:w}=e.get(h),v=new Set;return C.forEach(b=>{let E=t.get(b);Nfe.equal(E[0],h),E.length===1?t.delete(b):(E.shift(),typeof E[0]=="function"?v.add(E[0]):E[0].forEach(R=>v.add(R)))}),w.forEach(b=>{let E=t.get(b);Nfe(E[0]instanceof Set),E[0].size===1&&E.length===1?t.delete(b):E[0].size===1?(E.shift(),v.add(E[0])):E[0].delete(h)}),o.delete(h),v.forEach(b=>u(b)),!0};return{check:n,reserve:(h,C)=>{h=Jlt?["win32 parallelization disabled"]:h.map(v=>Ylt(Klt(Lfe(v))).toLowerCase());let w=new Set(h.map(v=>r(v)).reduce((v,b)=>v.concat(b)));return e.set(C,{dirs:w,paths:h}),h.forEach(v=>{let b=t.get(v);b?b.push(C):t.set(v,[C])}),w.forEach(v=>{let b=t.get(v);b?b[b.length-1]instanceof Set?b[b.length-1].add(C):b.push(new Set([C])):t.set(v,[new Set([C])])}),u(C)}}}});var Hfe=U((N4t,_fe)=>{var zlt=process.platform,Xlt=zlt==="win32",Zlt=global.__FAKE_TESTING_FS__||Ie("fs"),{O_CREAT:$lt,O_TRUNC:ect,O_WRONLY:tct,UV_FS_O_FILEMAP:Ufe=0}=Zlt.constants,rct=Xlt&&!!Ufe,nct=512*1024,ict=Ufe|ect|$lt|tct;_fe.exports=rct?t=>t<nct?ict:"w":()=>"w"});var i_=U((L4t,tpe)=>{"use strict";var sct=Ie("assert"),oct=bb(),En=Ie("fs"),act=XE(),Kf=Ie("path"),Zfe=Rfe(),qfe=i3(),lct=Mfe(),cct=s3(),gl=UE(),uct=qE(),Act=J3(),jfe=Symbol("onEntry"),Z3=Symbol("checkFs"),Gfe=Symbol("checkFs2"),_b=Symbol("pruneCache"),$3=Symbol("isReusable"),ac=Symbol("makeFs"),e_=Symbol("file"),t_=Symbol("directory"),Hb=Symbol("link"),Wfe=Symbol("symlink"),Yfe=Symbol("hardlink"),Kfe=Symbol("unsupported"),Vfe=Symbol("checkPath"),B0=Symbol("mkdir"),ko=Symbol("onError"),Mb=Symbol("pending"),Jfe=Symbol("pend"),rC=Symbol("unpend"),z3=Symbol("ended"),X3=Symbol("maybeClose"),r_=Symbol("skip"),U1=Symbol("doChown"),_1=Symbol("uid"),H1=Symbol("gid"),q1=Symbol("checkedCwd"),$fe=Ie("crypto"),epe=Hfe(),fct=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,j1=fct==="win32",pct=(t,e)=>{if(!j1)return En.unlink(t,e);let r=t+".DELETE."+$fe.randomBytes(16).toString("hex");En.rename(t,r,o=>{if(o)return e(o);En.unlink(r,e)})},hct=t=>{if(!j1)return En.unlinkSync(t);let e=t+".DELETE."+$fe.randomBytes(16).toString("hex");En.renameSync(t,e),En.unlinkSync(e)},zfe=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,Xfe=t=>Act(uct(gl(t))).toLowerCase(),gct=(t,e)=>{e=Xfe(e);for(let r of t.keys()){let o=Xfe(r);(o===e||o.indexOf(e+"/")===0)&&t.delete(r)}},dct=t=>{for(let e of t.keys())t.delete(e)},G1=class extends oct{constructor(e){if(e||(e={}),e.ondone=r=>{this[z3]=!0,this[X3]()},super(e),this[q1]=!1,this.reservations=lct(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[Mb]=0,this[z3]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||j1,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=gl(Kf.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",r=>this[jfe](r))}warn(e,r,o={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(o.recoverable=!1),super.warn(e,r,o)}[X3](){this[z3]&&this[Mb]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[Vfe](e){if(this.strip){let r=gl(e.path).split("/");if(r.length<this.strip)return!1;if(e.path=r.slice(this.strip).join("/"),e.type==="Link"){let o=gl(e.linkpath).split("/");if(o.length>=this.strip)e.linkpath=o.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=gl(e.path),o=r.split("/");if(o.includes("..")||j1&&/^[a-z]:\.\.$/i.test(o[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:r}),!1;let[a,n]=cct(r);a&&(e.path=n,this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:e,path:r}))}if(Kf.isAbsolute(e.path)?e.absolute=gl(Kf.resolve(e.path)):e.absolute=gl(Kf.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:gl(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=Kf.win32.parse(e.absolute);e.absolute=r+qfe.encode(e.absolute.substr(r.length));let{root:o}=Kf.win32.parse(e.path);e.path=o+qfe.encode(e.path.substr(o.length))}return!0}[jfe](e){if(!this[Vfe](e))return e.resume();switch(sct.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Z3](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[Kfe](e)}}[ko](e,r){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:r}),this[rC](),r.resume())}[B0](e,r,o){Zfe(gl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},o)}[U1](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[_1](e){return zfe(this.uid,e.uid,this.processUid)}[H1](e){return zfe(this.gid,e.gid,this.processGid)}[e_](e,r){let o=e.mode&4095||this.fmode,a=new act.WriteStream(e.absolute,{flags:epe(e.size),mode:o,autoClose:!1});a.on("error",p=>{a.fd&&En.close(a.fd,()=>{}),a.write=()=>!0,this[ko](p,e),r()});let n=1,u=p=>{if(p){a.fd&&En.close(a.fd,()=>{}),this[ko](p,e),r();return}--n===0&&En.close(a.fd,h=>{h?this[ko](h,e):this[rC](),r()})};a.on("finish",p=>{let h=e.absolute,C=a.fd;if(e.mtime&&!this.noMtime){n++;let w=e.atime||new Date,v=e.mtime;En.futimes(C,w,v,b=>b?En.utimes(h,w,v,E=>u(E&&b)):u())}if(this[U1](e)){n++;let w=this[_1](e),v=this[H1](e);En.fchown(C,w,v,b=>b?En.chown(h,w,v,E=>u(E&&b)):u())}u()});let A=this.transform&&this.transform(e)||e;A!==e&&(A.on("error",p=>{this[ko](p,e),r()}),e.pipe(A)),A.pipe(a)}[t_](e,r){let o=e.mode&4095||this.dmode;this[B0](e.absolute,o,a=>{if(a){this[ko](a,e),r();return}let n=1,u=A=>{--n===0&&(r(),this[rC](),e.resume())};e.mtime&&!this.noMtime&&(n++,En.utimes(e.absolute,e.atime||new Date,e.mtime,u)),this[U1](e)&&(n++,En.chown(e.absolute,this[_1](e),this[H1](e),u)),u()})}[Kfe](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[Wfe](e,r){this[Hb](e,e.linkpath,"symlink",r)}[Yfe](e,r){let o=gl(Kf.resolve(this.cwd,e.linkpath));this[Hb](e,o,"link",r)}[Jfe](){this[Mb]++}[rC](){this[Mb]--,this[X3]()}[r_](e){this[rC](),e.resume()}[$3](e,r){return e.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!j1}[Z3](e){this[Jfe]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,o=>this[Gfe](e,o))}[_b](e){e.type==="SymbolicLink"?dct(this.dirCache):e.type!=="Directory"&&gct(this.dirCache,e.absolute)}[Gfe](e,r){this[_b](e);let o=A=>{this[_b](e),r(A)},a=()=>{this[B0](this.cwd,this.dmode,A=>{if(A){this[ko](A,e),o();return}this[q1]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let A=gl(Kf.dirname(e.absolute));if(A!==this.cwd)return this[B0](A,this.dmode,p=>{if(p){this[ko](p,e),o();return}u()})}u()},u=()=>{En.lstat(e.absolute,(A,p)=>{if(p&&(this.keep||this.newer&&p.mtime>e.mtime)){this[r_](e),o();return}if(A||this[$3](e,p))return this[ac](null,e,o);if(p.isDirectory()){if(e.type==="Directory"){let h=!this.noChmod&&e.mode&&(p.mode&4095)!==e.mode,C=w=>this[ac](w,e,o);return h?En.chmod(e.absolute,e.mode,C):C()}if(e.absolute!==this.cwd)return En.rmdir(e.absolute,h=>this[ac](h,e,o))}if(e.absolute===this.cwd)return this[ac](null,e,o);pct(e.absolute,h=>this[ac](h,e,o))})};this[q1]?n():a()}[ac](e,r,o){if(e){this[ko](e,r),o();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[e_](r,o);case"Link":return this[Yfe](r,o);case"SymbolicLink":return this[Wfe](r,o);case"Directory":case"GNUDumpDir":return this[t_](r,o)}}[Hb](e,r,o,a){En[o](r,e.absolute,n=>{n?this[ko](n,e):(this[rC](),e.resume()),a()})}},Ub=t=>{try{return[null,t()]}catch(e){return[e,null]}},n_=class extends G1{[ac](e,r){return super[ac](e,r,()=>{})}[Z3](e){if(this[_b](e),!this[q1]){let n=this[B0](this.cwd,this.dmode);if(n)return this[ko](n,e);this[q1]=!0}if(e.absolute!==this.cwd){let n=gl(Kf.dirname(e.absolute));if(n!==this.cwd){let u=this[B0](n,this.dmode);if(u)return this[ko](u,e)}}let[r,o]=Ub(()=>En.lstatSync(e.absolute));if(o&&(this.keep||this.newer&&o.mtime>e.mtime))return this[r_](e);if(r||this[$3](e,o))return this[ac](null,e);if(o.isDirectory()){if(e.type==="Directory"){let u=!this.noChmod&&e.mode&&(o.mode&4095)!==e.mode,[A]=u?Ub(()=>{En.chmodSync(e.absolute,e.mode)}):[];return this[ac](A,e)}let[n]=Ub(()=>En.rmdirSync(e.absolute));this[ac](n,e)}let[a]=e.absolute===this.cwd?[]:Ub(()=>hct(e.absolute));this[ac](a,e)}[e_](e,r){let o=e.mode&4095||this.fmode,a=A=>{let p;try{En.closeSync(n)}catch(h){p=h}(A||p)&&this[ko](A||p,e),r()},n;try{n=En.openSync(e.absolute,epe(e.size),o)}catch(A){return a(A)}let u=this.transform&&this.transform(e)||e;u!==e&&(u.on("error",A=>this[ko](A,e)),e.pipe(u)),u.on("data",A=>{try{En.writeSync(n,A,0,A.length)}catch(p){a(p)}}),u.on("end",A=>{let p=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,C=e.mtime;try{En.futimesSync(n,h,C)}catch(w){try{En.utimesSync(e.absolute,h,C)}catch{p=w}}}if(this[U1](e)){let h=this[_1](e),C=this[H1](e);try{En.fchownSync(n,h,C)}catch(w){try{En.chownSync(e.absolute,h,C)}catch{p=p||w}}}a(p)})}[t_](e,r){let o=e.mode&4095||this.dmode,a=this[B0](e.absolute,o);if(a){this[ko](a,e),r();return}if(e.mtime&&!this.noMtime)try{En.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[U1](e))try{En.chownSync(e.absolute,this[_1](e),this[H1](e))}catch{}r(),e.resume()}[B0](e,r){try{return Zfe.sync(gl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(o){return o}}[Hb](e,r,o,a){try{En[o+"Sync"](r,e.absolute),a(),e.resume()}catch(n){return this[ko](n,e)}}};G1.Sync=n_;tpe.exports=G1});var ope=U((O4t,spe)=>{"use strict";var mct=TE(),qb=i_(),npe=Ie("fs"),ipe=XE(),rpe=Ie("path"),s_=qE();spe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let o=mct(t);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&yct(o,e),o.file&&o.sync?Ect(o):o.file?Cct(o,r):o.sync?Ict(o):wct(o)};var yct=(t,e)=>{let r=new Map(e.map(n=>[s_(n),!0])),o=t.filter,a=(n,u)=>{let A=u||rpe.parse(n).root||".",p=n===A?!1:r.has(n)?r.get(n):a(rpe.dirname(n),A);return r.set(n,p),p};t.filter=o?(n,u)=>o(n,u)&&a(s_(n)):n=>a(s_(n))},Ect=t=>{let e=new qb.Sync(t),r=t.file,o=npe.statSync(r),a=t.maxReadSize||16*1024*1024;new ipe.ReadStreamSync(r,{readSize:a,size:o.size}).pipe(e)},Cct=(t,e)=>{let r=new qb(t),o=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((u,A)=>{r.on("error",A),r.on("close",u),npe.stat(a,(p,h)=>{if(p)A(p);else{let C=new ipe.ReadStream(a,{readSize:o,size:h.size});C.on("error",A),C.pipe(r)}})});return e?n.then(e,e):n},Ict=t=>new qb.Sync(t),wct=t=>new qb(t)});var ape=U(fs=>{"use strict";fs.c=fs.create=qAe();fs.r=fs.replace=_3();fs.t=fs.list=Qb();fs.u=fs.update=XAe();fs.x=fs.extract=ope();fs.Pack=gb();fs.Unpack=i_();fs.Parse=bb();fs.ReadEntry=Xx();fs.WriteEntry=g3();fs.Header=HE();fs.Pax=$x();fs.types=XU()});var lpe,cpe,v0,jb,upe=dt(()=>{lpe=tt(nd()),cpe=Ie("worker_threads");d1();v0=Symbol("kTaskInfo"),jb=class{constructor(e){this.source=e;this.workers=[];this.limit=(0,lpe.default)(X4());this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let r=this.workers.pop();r?r.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new cpe.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return e.on("message",r=>{if(!e[v0])throw new Error("Assertion failed: Worker sent a result without having a task assigned");e[v0].resolve(r),e[v0]=null,e.unref(),this.workers.push(e)}),e.on("error",r=>{var o;(o=e[v0])==null||o.reject(r),e[v0]=null}),e.on("exit",r=>{var o;r!==0&&((o=e[v0])==null||o.reject(new Error(`Worker exited with code ${r}`))),e[v0]=null}),e}run(e){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((o,a)=>{r[v0]={resolve:o,reject:a},r.postMessage(e)})})}}});var fpe=U((_4t,Ape)=>{var o_;Ape.exports.getContent=()=>(typeof o_>"u"&&(o_=Ie("zlib").brotliDecompressSync(Buffer.from("W6ZZVqNs+8SKoLwBmlrp7fYqeY0yhpgy0V/n2JQfhDBtpLoLihs2mwL+ug2hHFXtiXf+HI6qalbSMUST0gcQVbe1/16L3COQGc0RVMXJoqzqSGoDo2NWnxEJZZoXasuyIFpUzi/W0azjN5zD8tkdHyU0C4mFFAIpRAhZFzyFa6D6vq8bs7CVkGlFvoJmUxxUY2dxjo6g2hg9Zs2IcGgmZLzw+6ez7y/5fyAhfNnbzyu+HxK7SDKP5+zpjhI5RBJJ1off9mbzU54C6Lj1FVBCsEWGRVokWzzTF3mET/v+/VT7z8+Xcf0CwqIIUJRClwWqGldY+VRJycLKe0TNwGTr8KxJDgu3J1ovPLuZmb6+JUdFQEuWAG3SwxnGwWo2U+a8xLVzcVnlcKYWc7TC1sp3n339xgGXOmrrgCW1J4Rv73irdDrcACnghD0/vj/1v36JxqVSODikfSs+8QSB1HkA45H2Lss8YwlXjZFdSTzS2H72qvb1mxDBgIpEeN+bsrsGGIPp+rxaZJlWWtH1Ofiv+mbvatsQiue6zQEJ/12mkgo8s1jT2HjAmD9MwmPVtf/5Nvu+fonLpdJtH/xmWWWOVfS2kW1Wx0Vr4L5EFYgoY16GjvXSLKv2yxAdYptjecNJiMXPIgxog31TX6tqY09GA9gvDESKlEjuWxXt9T7c3021wp1Ls9c3Ig1SCysUETPO4gLWgJuU0Vxr3+s2D0+V2/9y8SfeF6flqdtTdRKSCgQJOwhaHcb3RG30pVZWfbp0t5ufGRVYQjYxQhqBvE8efN+cHq+BUY4eywN2K938pb5kqVsOwuObtTpeAw10zfFLVgoNKQb3st1YZWHY603aHCZbPR/7MKLnuc+ZySQNbYFpCIA/VtdpiMC6elfChF7gtPe6ZRBGwGUAfC7b7+t4hUSmhiPNSJBamUmQdOT22wKkw7PkZ4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iitFEzKsqhwNXIJG5kW9Z+WiwGX1gWOlbceGTsS9/wAXxbYJ/RFgPPpvb7XgRgiT7dMJky6nDBY/7NkG3KSPq65EeQJcTmJv9QWFT0vgCAqov44r9fQFSRHlaGRGmcTugxqr+4WeQfbx0gJNE/SbhYfS/xiMq+r9z/2I8OlL3P52g/eE9i3LzAte37JdvyHfL+Y14fogXmfl3rd0zroHECXx1Dy1vfW3uQ409L8ow5Y/10RO5Vg5dtfQQ3ovl7F5BvmS66L29PSaB8ddYcuO3A4rkZr5N09EfAA==","base64")).toString()),o_)});var Ji={};Yt(Ji,{convertToZip:()=>vct,extractArchiveTo:()=>Sct,makeArchiveFromDirectory:()=>Bct});async function Bct(t,{baseFs:e=new xn,prefixPath:r=wt.root,compressionLevel:o,inMemory:a=!1}={}){let n;if(a)n=new os(null,{level:o});else{let A=await oe.mktempPromise(),p=J.join(A,"archive.zip");n=new os(p,{create:!0,level:o})}let u=J.resolve(wt.root,r);return await n.copyPromise(u,t,{baseFs:e,stableTime:!0,stableSort:!0}),n}async function vct(t,e){let r=await oe.mktempPromise(),o=J.join(r,"archive.zip");return ppe||(ppe=new jb((0,dpe.getContent)())),await ppe.run({tmpFile:o,tgz:t,opts:e}),new os(o,{level:e.compressionLevel})}async function*Dct(t){let e=new gpe.default.Parse,r=new hpe.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on("entry",o=>{r.write(o)}),e.on("error",o=>{r.destroy(o)}),e.on("close",()=>{r.destroyed||r.end()}),e.end(t);for await(let o of r){let a=o;yield a,a.resume()}}async function Sct(t,e,{stripComponents:r=0,prefixPath:o=wt.dot}={}){function a(n){if(n.path[0]==="/")return!0;let u=n.path.split(/\//g);return!!(u.some(A=>A==="..")||u.length<=r)}for await(let n of Dct(t)){if(a(n))continue;let u=J.normalize(ue.toPortablePath(n.path)).replace(/\/$/,"").split(/\//g);if(u.length<=r)continue;let A=u.slice(r).join("/"),p=J.join(o,A),h=420;switch((n.type==="Directory"||((n.mode??0)&73)!==0)&&(h|=73),n.type){case"Directory":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[Ii.SAFE_TIME,Ii.SAFE_TIME]}),e.mkdirSync(p,{mode:h}),e.utimesSync(p,Ii.SAFE_TIME,Ii.SAFE_TIME);break;case"OldFile":case"File":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[Ii.SAFE_TIME,Ii.SAFE_TIME]}),e.writeFileSync(p,await Jy(n),{mode:h}),e.utimesSync(p,Ii.SAFE_TIME,Ii.SAFE_TIME);break;case"SymbolicLink":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[Ii.SAFE_TIME,Ii.SAFE_TIME]}),e.symlinkSync(n.linkpath,p),e.lutimesSync(p,Ii.SAFE_TIME,Ii.SAFE_TIME);break}}return e}var hpe,gpe,dpe,ppe,mpe=dt(()=>{St();Hc();hpe=Ie("stream"),gpe=tt(ape());upe();Vl();dpe=tt(fpe())});var Epe=U((a_,ype)=>{(function(t,e){typeof a_=="object"?ype.exports=e():typeof define=="function"&&define.amd?define(e):t.treeify=e()})(a_,function(){function t(a,n){var u=n?"\u2514":"\u251C";return a?u+="\u2500 ":u+="\u2500\u2500\u2510",u}function e(a,n){var u=[];for(var A in a)!a.hasOwnProperty(A)||n&&typeof a[A]=="function"||u.push(A);return u}function r(a,n,u,A,p,h,C){var w="",v=0,b,E,R=A.slice(0);if(R.push([n,u])&&A.length>0&&(A.forEach(function(_,V){V>0&&(w+=(_[1]?" ":"\u2502")+" "),!E&&_[0]===n&&(E=!0)}),w+=t(a,u)+a,p&&(typeof n!="object"||n instanceof Date)&&(w+=": "+n),E&&(w+=" (circular ref.)"),C(w)),!E&&typeof n=="object"){var L=e(n,h);L.forEach(function(_){b=++v===L.length,r(_,n[_],b,R,p,h,C)})}}var o={};return o.asLines=function(a,n,u,A){var p=typeof u!="function"?u:!1;r(".",a,!1,[],n,p,A||u)},o.asTree=function(a,n,u){var A="";return r(".",a,!1,[],n,u,function(p){A+=p+`
187`}),A},o})});var $o={};Yt($o,{emitList:()=>Pct,emitTree:()=>Bpe,treeNodeToJson:()=>wpe,treeNodeToTreeify:()=>Ipe});function Ipe(t,{configuration:e}){let r={},o=(a,n)=>{let u=Array.isArray(a)?a.entries():Object.entries(a);for(let[A,{label:p,value:h,children:C}]of u){let w=[];typeof p<"u"&&w.push(ZS(e,p,2)),typeof h<"u"&&w.push(Kt(e,h[0],h[1])),w.length===0&&w.push(ZS(e,`${A}`,2));let v=w.join(": "),b=n[v]={};typeof C<"u"&&o(C,b)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return o(t.children,r),r}function wpe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return yd(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)a[n]=e(u);return typeof r.value>"u"?a:{value:yd(r.value[0],r.value[1]),children:a}};return e(t)}function Pct(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));Bpe({children:a},{configuration:e,stdout:r,json:o})}function Bpe(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let A of u)r.write(`${JSON.stringify(wpe(A))}
188`);return}let n=(0,Cpe.asTree)(Ipe(t,{configuration:e}),!1,!1);if(a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
189$1`).replace(/^│\n/,"")),a>=2)for(let u=0;u<2;++u)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
190$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}var Cpe,vpe=dt(()=>{Cpe=tt(Epe());zl()});function l_(t){let e=t.indexOf("/");return e!==-1?t.slice(0,e):null}function bct(t){let e=t.indexOf("/");return e!==-1?t.slice(e+1):t}var Dpe,c_,xct,Ur,Spe=dt(()=>{St();St();Hc();Dpe=Ie("crypto"),c_=tt(Ie("fs"));Zl();n0();Vl();Ks();xct=9,Ur=class{constructor(e,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,Dpe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=o,this.check=a;let n=r.get("cacheKeyOverride");if(n!==null)this.cacheKey=`${n}`;else{let u=r.get("compressionLevel"),A=u!==Ay?`c${u}`:"";this.cacheKey=[xct,A].join("")}}static async find(e,{immutable:r,check:o}={}){let a=new Ur(e.get("cacheFolder"),{configuration:e,immutable:r,check:o});return await a.setup(),a}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${aE(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=bct(r).slice(0,10);return`${aE(e)}-${a}.zip`}getLocatorPath(e,r,o={}){var n;return this.mirrorCwd===null||((n=o.unstablePackages)==null?void 0:n.has(e.locatorHash))?J.resolve(this.cwd,this.getVersionFilename(e)):r===null||l_(r)!==this.cacheKey?null:J.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?J.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await oe.existsPromise(this.cwd))throw new Vt(56,"Cache path does not exist.")}else{await oe.mkdirPromise(this.cwd,{recursive:!0});let e=J.resolve(this.cwd,".gitignore");await oe.changeFilePromise(e,`/.gitignore
191*.flock
192*.tmp
193`)}(this.mirrorCwd||!this.immutable)&&await oe.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:o,onMiss:a,loader:n,...u}){var ge;let A=this.getLocatorMirrorPath(e),p=new xn,h=()=>{let le=new os,Pe=J.join(wt.root,dM(e));return le.mkdirSync(Pe,{recursive:!0}),le.writeJsonSync(J.join(Pe,Lr.manifest),{name:nn(e),mocked:!0}),le},C=async(le,Pe=null)=>{var ve;if(Pe===null&&((ve=u.unstablePackages)==null?void 0:ve.has(e.locatorHash)))return{isValid:!0,hash:null};let g=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await QP(le)}`:r;if(Pe!==null){let Ee=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await QP(Pe)}`:r;if(g!==Ee)throw new Vt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(r!==null&&g!==r){let Ee;switch(this.check?Ee="throw":l_(r)!==l_(g)?Ee="update":Ee=this.configuration.get("checksumBehavior"),Ee){case"ignore":return{isValid:!0,hash:r};case"update":return{isValid:!0,hash:g};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Vt(18,"The remote archive doesn't match the expected checksum")}}return{isValid:!0,hash:g}},w=async le=>{if(!n)throw new Error(`Cache check required but no loader configured for ${kr(this.configuration,e)}`);let Pe=await n(),g=Pe.getRealPath();Pe.saveAndClose(),await oe.chmodPromise(g,420);let ve=await C(le,g);if(!ve.isValid)throw new Error("Assertion failed: Expected a valid checksum");return ve.hash},v=async()=>{if(A===null||!await oe.existsPromise(A)){let le=await n(),Pe=le.getRealPath();return le.saveAndClose(),{source:"loader",path:Pe}}return{source:"mirror",path:A}},b=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${kr(this.configuration,e)}`);if(this.immutable)throw new Vt(56,`Cache entry required but missing for ${kr(this.configuration,e)}`);let{path:le,source:Pe}=await v(),g=(await C(le)).hash,ve=this.getLocatorPath(e,g,u);if(!ve)throw new Error("Assertion failed: Expected the cache path to be available");let Ee=[];Pe!=="mirror"&&A!==null&&Ee.push(async()=>{let ne=`${A}${this.cacheId}`;await oe.copyFilePromise(le,ne,c_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(ne,420),await oe.renamePromise(ne,A)}),(!u.mirrorWriteOnly||A===null)&&Ee.push(async()=>{let ne=`${ve}${this.cacheId}`;await oe.copyFilePromise(le,ne,c_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(ne,420),await oe.renamePromise(ne,ve)});let de=u.mirrorWriteOnly?A??ve:ve;return await Promise.all(Ee.map(ne=>ne())),[!1,de,g]},E=async()=>{let Pe=(async()=>{var Z;let g=this.getLocatorPath(e,r,u),ve=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,Ee=!!((Z=u.mockedPackages)!=null&&Z.has(e.locatorHash))&&(!this.check||!ve),de=Ee||ve,ne=de?o:a;if(ne&&ne(),de){let me=null,be=g;if(!Ee)if(this.check)me=await w(be);else{let ut=await C(be);if(ut.isValid)me=ut.hash;else return b()}return[Ee,be,me]}else return b()})();this.mutexes.set(e.locatorHash,Pe);try{return await Pe}finally{this.mutexes.delete(e.locatorHash)}};for(let le;le=this.mutexes.get(e.locatorHash);)await le;let[R,L,_]=await E();R||this.markedFiles.add(L);let V,re=R?()=>h():()=>new os(L,{baseFs:p,readOnly:!0}),ae=new oy(()=>gL(()=>V=re(),le=>`Failed to open the cache entry for ${kr(this.configuration,e)}: ${le}`),J),he=new ju(L,{baseFs:ae,pathUtils:J}),pe=()=>{V==null||V.discardAndClose()},De=(ge=u.unstablePackages)!=null&&ge.has(e.locatorHash)?null:_;return[he,pe,De]}}});var Gb,Ppe=dt(()=>{Gb=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(Gb||{})});var Qct,nC,u_=dt(()=>{St();Hl();s0();Ks();Qct=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>TP({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],nC=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let o=J.join(e.cwd,e.configuration.get("lockfileFilename"));if(!oe.existsSync(o))return;let a=await oe.readFilePromise(o,"utf8"),n=Yi(a);if(Object.prototype.hasOwnProperty.call(n,"__metadata"))return;let u=this.resolutions=new Map;for(let A of Object.keys(n)){let p=Xw(A);if(!p){r.reportWarning(14,`Failed to parse the string "${A}" into a proper descriptor`);continue}let h=cl(p.range)?mn(p,`npm:${p.range}`):p,{version:C,resolved:w}=n[A];if(!w)continue;let v;for(let[E,R]of Qct){let L=w.match(E);if(L){v=R(C,...L);break}}if(!v){r.reportWarning(14,`${Ln(e.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not "${w}")`);continue}let b=h;try{let E=Dd(h.range),R=Xw(E.selector,!0);R&&(b=R)}catch{}u.set(h.descriptorHash,us(b,v))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let a=this.resolutions.get(e.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");let n=AM(a),u=o.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(u,r,o)}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}});var pA,xpe=dt(()=>{Zl();_x();zl();pA=class extends Js{constructor({configuration:r,stdout:o,suggestInstall:a=!0}){super();this.errorCount=0;qw(this,{configuration:r}),this.configuration=r,this.stdout=o,this.suggestInstall=a}static async start(r,o){let a=new this(r);try{await o(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,o){return o()}async startSectionPromise(r,o){return await o()}startTimerSync(r,o,a){return(typeof o=="function"?o:a)()}async startTimerPromise(r,o,a){return await(typeof o=="function"?o:a)()}async startCacheReport(r){return await r()}reportSeparator(){}reportInfo(r,o){}reportWarning(r,o){}reportError(r,o){this.errorCount+=1,this.stdout.write(`${Kt(this.configuration,"\u27A4","redBright")} ${this.formatNameWithHyperlink(r)}: ${o}
194`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}async finalize(){this.errorCount>0&&(this.stdout.write(`
195`),this.stdout.write(`${Kt(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
196`),this.suggestInstall&&this.stdout.write(`${Kt(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
197`))}formatNameWithHyperlink(r){return BU(r,{configuration:this.configuration,json:!1})}}});var iC,A_=dt(()=>{Ks();iC=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(FP(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){let a=o.project.storedResolutions.get(e.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(FP(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.originalPackages.get(e.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Vf(){}function kct(t,e,r,o,a){for(var n=0,u=e.length,A=0,p=0;n<u;n++){var h=e[n];if(h.removed){if(h.value=t.join(o.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var w=e[n-1];e[n-1]=e[n],e[n]=w}}else{if(!h.added&&a){var C=r.slice(A,A+h.count);C=C.map(function(b,E){var R=o[p+E];return R.length>b.length?R:b}),h.value=t.join(C)}else h.value=t.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var v=e[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&t.equals("",v.value)&&(e[u-2].value+=v.value,e.pop()),e}function Fct(t){return{newPos:t.newPos,components:t.components.slice(0)}}function Rct(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function kpe(t,e,r){return r=Rct(r,{ignoreWhitespace:!0}),d_.diff(t,e,r)}function Tct(t,e,r){return m_.diff(t,e,r)}function Wb(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wb=function(e){return typeof e}:Wb=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wb(t)}function f_(t){return Oct(t)||Mct(t)||Uct(t)||_ct()}function Oct(t){if(Array.isArray(t))return p_(t)}function Mct(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Uct(t,e){if(!!t){if(typeof t=="string")return p_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p_(t,e)}}function p_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function _ct(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
198In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h_(t,e,r,o,a){e=e||[],r=r||[],o&&(t=o(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var u;if(Hct.call(t)==="[object Array]"){for(e.push(t),u=new Array(t.length),r.push(u),n=0;n<t.length;n+=1)u[n]=h_(t[n],e,r,o,a);return e.pop(),r.pop(),u}if(t&&t.toJSON&&(t=t.toJSON()),Wb(t)==="object"&&t!==null){e.push(t),u={},r.push(u);var A=[],p;for(p in t)t.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=h_(t[p],e,r,o,p);e.pop(),r.pop()}else u=t;return u}function Fpe(t,e,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=Tct(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(_){return _.map(function(V){return" "+V})}for(var h=[],C=0,w=0,v=[],b=1,E=1,R=function(V){var re=A[V],ae=re.lines||re.value.replace(/\n$/,"").split(`
199`);if(re.lines=ae,re.added||re.removed){var he;if(!C){var pe=A[V-1];C=b,w=E,pe&&(v=u.context>0?p(pe.lines.slice(-u.context)):[],C-=v.length,w-=v.length)}(he=v).push.apply(he,f_(ae.map(function(de){return(re.added?"+":"-")+de}))),re.added?E+=ae.length:b+=ae.length}else{if(C)if(ae.length<=u.context*2&&V<A.length-2){var De;(De=v).push.apply(De,f_(p(ae)))}else{var ge,le=Math.min(ae.length,u.context);(ge=v).push.apply(ge,f_(p(ae.slice(0,le))));var Pe={oldStart:C,oldLines:b-C+le,newStart:w,newLines:E-w+le,lines:v};if(V>=A.length-2&&ae.length<=u.context){var g=/\n$/.test(r),ve=/\n$/.test(o),Ee=ae.length==0&&v.length>Pe.oldLines;!g&&Ee&&r.length>0&&v.splice(Pe.oldLines,0,"\\ No newline at end of file"),(!g&&!Ee||!ve)&&v.push("\\ No newline at end of file")}h.push(Pe),C=0,w=0,v=[]}b+=ae.length,E+=ae.length}},L=0;L<A.length;L++)R(L);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var uUt,bpe,Qpe,d_,m_,Nct,Lct,Hct,W1,g_,y_=dt(()=>{Vf.prototype={diff:function(e,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=e.length,h=1,C=A+p;o.maxEditLength&&(C=Math.min(C,o.maxEditLength));var w=[{newPos:-1,components:[]}],v=this.extractCommon(w[0],r,e,0);if(w[0].newPos+1>=A&&v+1>=p)return u([{value:this.join(r),count:r.length}]);function b(){for(var R=-1*h;R<=h;R+=2){var L=void 0,_=w[R-1],V=w[R+1],re=(V?V.newPos:0)-R;_&&(w[R-1]=void 0);var ae=_&&_.newPos+1<A,he=V&&0<=re&&re<p;if(!ae&&!he){w[R]=void 0;continue}if(!ae||he&&_.newPos<V.newPos?(L=Fct(V),n.pushComponent(L.components,void 0,!0)):(L=_,L.newPos++,n.pushComponent(L.components,!0,void 0)),re=n.extractCommon(L,r,e,R),L.newPos+1>=A&&re+1>=p)return u(kct(n,L.components,r,e,n.useLongestToken));w[R]=L}h++}if(a)(function R(){setTimeout(function(){if(h>C)return a();b()||R()},0)})();else for(;h<=C;){var E=b();if(E)return E}},pushComponent:function(e,r,o){var a=e[e.length-1];a&&a.added===r&&a.removed===o?e[e.length-1]={count:a.count+1,added:r,removed:o}:e.push({count:1,added:r,removed:o})},extractCommon:function(e,r,o,a){for(var n=r.length,u=o.length,A=e.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&e.components.push({count:h}),e.newPos=A,p},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],o=0;o<e.length;o++)e[o]&&r.push(e[o]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};uUt=new Vf;bpe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Qpe=/\S/,d_=new Vf;d_.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Qpe.test(t)&&!Qpe.test(e)};d_.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&bpe.test(e[r])&&bpe.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};m_=new Vf;m_.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};Nct=new Vf;Nct.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};Lct=new Vf;Lct.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};Hct=Object.prototype.toString,W1=new Vf;W1.useLongestToken=!0;W1.tokenize=m_.tokenize;W1.castInput=function(t){var e=this.options,r=e.undefinedReplacement,o=e.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof t=="string"?t:JSON.stringify(h_(t,null,null,a),a," ")};W1.equals=function(t,e){return Vf.prototype.equals.call(W1,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};g_=new Vf;g_.tokenize=function(t){return t.slice()};g_.join=g_.removeEmpty=function(t){return t}});var Tpe=U((fUt,Rpe)=>{var qct=Kl(),jct=AE(),Gct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wct=/^\w*$/;function Yct(t,e){if(qct(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||jct(t)?!0:Wct.test(t)||!Gct.test(t)||e!=null&&t in Object(e)}Rpe.exports=Yct});var Ope=U((pUt,Lpe)=>{var Npe=kS(),Kct="Expected a function";function E_(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Kct);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],n=r.cache;if(n.has(a))return n.get(a);var u=t.apply(this,o);return r.cache=n.set(a,u)||n,u};return r.cache=new(E_.Cache||Npe),r}E_.Cache=Npe;Lpe.exports=E_});var Upe=U((hUt,Mpe)=>{var Vct=Ope(),Jct=500;function zct(t){var e=Vct(t,function(o){return r.size===Jct&&r.clear(),o}),r=e.cache;return e}Mpe.exports=zct});var C_=U((gUt,_pe)=>{var Xct=Upe(),Zct=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$ct=/\\(\\)?/g,eut=Xct(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Zct,function(r,o,a,n){e.push(a?n.replace($ct,"$1"):o||r)}),e});_pe.exports=eut});var Yd=U((dUt,Hpe)=>{var tut=Kl(),rut=Tpe(),nut=C_(),iut=S1();function sut(t,e){return tut(t)?t:rut(t,e)?[t]:nut(iut(t))}Hpe.exports=sut});var sC=U((mUt,qpe)=>{var out=AE(),aut=1/0;function lut(t){if(typeof t=="string"||out(t))return t;var e=t+"";return e=="0"&&1/t==-aut?"-0":e}qpe.exports=lut});var Yb=U((yUt,jpe)=>{var cut=Yd(),uut=sC();function Aut(t,e){e=cut(e,t);for(var r=0,o=e.length;t!=null&&r<o;)t=t[uut(e[r++])];return r&&r==o?t:void 0}jpe.exports=Aut});var I_=U((EUt,Wpe)=>{var fut=VS(),put=Yd(),hut=kw(),Gpe=al(),gut=sC();function dut(t,e,r,o){if(!Gpe(t))return t;e=put(e,t);for(var a=-1,n=e.length,u=n-1,A=t;A!=null&&++a<n;){var p=gut(e[a]),h=r;if(p==="__proto__"||p==="constructor"||p==="prototype")return t;if(a!=u){var C=A[p];h=o?o(C,p,A):void 0,h===void 0&&(h=Gpe(C)?C:hut(e[a+1])?[]:{})}fut(A,p,h),A=A[p]}return t}Wpe.exports=dut});var Kpe=U((CUt,Ype)=>{var mut=Yb(),yut=I_(),Eut=Yd();function Cut(t,e,r){for(var o=-1,a=e.length,n={};++o<a;){var u=e[o],A=mut(t,u);r(A,u)&&yut(n,Eut(u,t),A)}return n}Ype.exports=Cut});var Jpe=U((IUt,Vpe)=>{function Iut(t,e){return t!=null&&e in Object(t)}Vpe.exports=Iut});var w_=U((wUt,zpe)=>{var wut=Yd(),But=xw(),vut=Kl(),Dut=kw(),Sut=OS(),Put=sC();function xut(t,e,r){e=wut(e,t);for(var o=-1,a=e.length,n=!1;++o<a;){var u=Put(e[o]);if(!(n=t!=null&&r(t,u)))break;t=t[u]}return n||++o!=a?n:(a=t==null?0:t.length,!!a&&Sut(a)&&Dut(u,a)&&(vut(t)||But(t)))}zpe.exports=xut});var Zpe=U((BUt,Xpe)=>{var but=Jpe(),Qut=w_();function kut(t,e){return t!=null&&Qut(t,e,but)}Xpe.exports=kut});var e0e=U((vUt,$pe)=>{var Fut=Kpe(),Rut=Zpe();function Tut(t,e){return Fut(t,e,function(r,o){return Rut(t,o)})}$pe.exports=Tut});var i0e=U((DUt,n0e)=>{var t0e=pd(),Nut=xw(),Lut=Kl(),r0e=t0e?t0e.isConcatSpreadable:void 0;function Out(t){return Lut(t)||Nut(t)||!!(r0e&&t&&t[r0e])}n0e.exports=Out});var a0e=U((SUt,o0e)=>{var Mut=NS(),Uut=i0e();function s0e(t,e,r,o,a){var n=-1,u=t.length;for(r||(r=Uut),a||(a=[]);++n<u;){var A=t[n];e>0&&r(A)?e>1?s0e(A,e-1,r,o,a):Mut(a,A):o||(a[a.length]=A)}return a}o0e.exports=s0e});var c0e=U((PUt,l0e)=>{var _ut=a0e();function Hut(t){var e=t==null?0:t.length;return e?_ut(t,1):[]}l0e.exports=Hut});var B_=U((xUt,u0e)=>{var qut=c0e(),jut=aL(),Gut=lL();function Wut(t){return Gut(jut(t,void 0,qut),t+"")}u0e.exports=Wut});var f0e=U((bUt,A0e)=>{var Yut=e0e(),Kut=B_(),Vut=Kut(function(t,e){return t==null?{}:Yut(t,e)});A0e.exports=Vut});var Kb,p0e=dt(()=>{Zl();Kb=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,o){return this.resolver.bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){throw new Vt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(e,r,o,a){throw new Vt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(e,r){throw new Vt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}}});var xi,v_=dt(()=>{Zl();xi=class extends Js{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,o){return(typeof r=="function"?r:o)()}async startTimerPromise(e,r,o){return await(typeof r=="function"?r:o)()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(let{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){}}});var h0e,oC,D_=dt(()=>{St();h0e=tt(lM());uE();Sd();zl();n0();s0();Ks();oC=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=e}async setup(){this.manifest=await Nt.tryFind(this.cwd)??new Nt,this.relativeCwd=J.relative(this.project.cwd,this.cwd)||wt.dot;let e=this.manifest.name?this.manifest.name:nA(null,`${this.computeCandidateName()}-${Vs(this.relativeCwd).substring(0,6)}`),r=this.manifest.version?this.manifest.version:"0.0.0";this.locator=us(e,r),this.anchoredDescriptor=mn(this.locator,`${Gn.protocol}${this.relativeCwd}`),this.anchoredLocator=us(this.locator,`${Gn.protocol}${this.relativeCwd}`);let o=this.manifest.workspaceDefinitions.map(({pattern:n})=>n);if(o.length===0)return;let a=await(0,h0e.default)(o,{cwd:ue.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});a.sort(),await a.reduce(async(n,u)=>{let A=J.resolve(this.cwd,ue.toPortablePath(u)),p=await oe.existsPromise(J.join(A,"package.json"));await n,p&&this.workspacesCwds.add(A)},Promise.resolve())}get anchoredPackage(){let e=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!e)throw new Error(`Assertion failed: Expected workspace ${$w(this.project.configuration,this)} (${Kt(this.project.configuration,J.join(this.cwd,Lr.manifest),Bt.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);return e}accepts(e){let r=e.indexOf(":"),o=r!==-1?e.slice(0,r+1):null,a=r!==-1?e.slice(r+1):e;if(o===Gn.protocol&&J.normalize(a)===this.relativeCwd||o===Gn.protocol&&(a==="*"||a==="^"||a==="~"))return!0;let n=cl(a);return n?o===Gn.protocol?n.test(this.manifest.version??"0.0.0"):this.project.configuration.get("enableTransparentWorkspaces")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":`${J.basename(this.cwd)}`||"unnamed-workspace"}getRecursiveWorkspaceDependencies({dependencies:e=Nt.hardDependencies}={}){let r=new Set,o=a=>{for(let n of e)for(let u of a.manifest[n].values()){let A=this.project.tryWorkspaceByDescriptor(u);A===null||r.has(A)||(r.add(A),o(A))}};return o(this),r}getRecursiveWorkspaceDependents({dependencies:e=Nt.hardDependencies}={}){let r=new Set,o=a=>{for(let n of this.project.workspaces)e.some(A=>[...n.manifest[A].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&zw(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),o(n))};return o(this),r}getRecursiveWorkspaceChildren(){let e=[];for(let r of this.workspacesCwds){let o=this.project.workspacesByCwd.get(r);o&&e.push(o,...o.getRecursiveWorkspaceChildren())}return e}async persistManifest(){let e={};this.manifest.exportTo(e);let r=J.join(this.cwd,Nt.fileName),o=`${JSON.stringify(e,null,this.manifest.indent)}
200`;await oe.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function eAt({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,volatileDescriptors:A=new Set,report:p}){let h=new Map,C=[],w=new Map,v=new Map,b=new Map,E=new Map,R=new Map,L=new Map(t.workspaces.map(ge=>{let le=ge.anchoredLocator.locatorHash,Pe=o.get(le);if(typeof Pe>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[le,Yw(Pe)]})),_=()=>{let ge=oe.mktempSync(),le=J.join(ge,"stacktrace.log"),Pe=String(C.length+1).length,g=C.map((ve,Ee)=>`${`${Ee+1}.`.padStart(Pe," ")} ${Jl(ve)}
201`).join("");throw oe.writeFileSync(le,g),oe.detachTemp(ge),new Vt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${ue.fromPortablePath(le)}`)},V=ge=>{let le=r.get(ge.descriptorHash);if(typeof le>"u")throw new Error("Assertion failed: The resolution should have been registered");let Pe=o.get(le);if(!Pe)throw new Error("Assertion failed: The package could not be found");return Pe},re=(ge,le,Pe,{top:g,optional:ve})=>{C.length>1e3&&_(),C.push(le);let Ee=ae(ge,le,Pe,{top:g,optional:ve});return C.pop(),Ee},ae=(ge,le,Pe,{top:g,optional:ve})=>{if(a.has(le.locatorHash))return;a.add(le.locatorHash),ve||n.delete(le.locatorHash);let Ee=o.get(le.locatorHash);if(!Ee)throw new Error(`Assertion failed: The package (${kr(t.configuration,le)}) should have been registered`);let de=[],ne=[],Z=[],me=[],be=[];for(let H of Array.from(Ee.dependencies.values())){if(Ee.peerDependencies.has(H.identHash)&&Ee.locatorHash!==g)continue;if(kf(H))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");A.delete(H.descriptorHash);let yt=ve;if(!yt){let Oe=Ee.dependenciesMeta.get(nn(H));if(typeof Oe<"u"){let x=Oe.get(null);typeof x<"u"&&x.optional&&(yt=!0)}}let Me=r.get(H.descriptorHash);if(!Me)throw new Error(`Assertion failed: The resolution (${Ln(t.configuration,H)}) should have been registered`);let Te=L.get(Me)||o.get(Me);if(!Te)throw new Error(`Assertion failed: The package (${Me}, resolved from ${Ln(t.configuration,H)}) should have been registered`);if(Te.peerDependencies.size===0){re(H,Te,new Map,{top:g,optional:yt});continue}let Qe,_e,qe=new Set,At;ne.push(()=>{Qe=pM(H,le.locatorHash),_e=hM(Te,le.locatorHash),Ee.dependencies.delete(H.identHash),Ee.dependencies.set(Qe.identHash,Qe),r.set(Qe.descriptorHash,_e.locatorHash),e.set(Qe.descriptorHash,Qe),o.set(_e.locatorHash,_e),de.push([Te,Qe,_e])}),Z.push(()=>{At=new Map;for(let Oe of _e.peerDependencies.values()){let x=Ee.dependencies.get(Oe.identHash);if(!x&&Jw(le,Oe)&&(ge.identHash===le.identHash?x=ge:(x=mn(le,ge.range),e.set(x.descriptorHash,x),r.set(x.descriptorHash,le.locatorHash),A.delete(x.descriptorHash))),(!x||x.range==="missing:")&&_e.dependencies.has(Oe.identHash)){_e.peerDependencies.delete(Oe.identHash);continue}x||(x=mn(Oe,"missing:")),_e.dependencies.set(x.identHash,x),kf(x)&&md(b,x.descriptorHash).add(_e.locatorHash),w.set(x.identHash,x),x.range==="missing:"&&qe.add(x.identHash),At.set(Oe.identHash,Pe.get(Oe.identHash)??_e.locatorHash)}_e.dependencies=new Map(xa(_e.dependencies,([Oe,x])=>nn(x)))}),me.push(()=>{if(!o.has(_e.locatorHash))return;let Oe=h.get(Te.locatorHash);typeof Oe=="number"&&Oe>=2&&_();let x=h.get(Te.locatorHash),I=typeof x<"u"?x+1:1;h.set(Te.locatorHash,I),re(Qe,_e,At,{top:g,optional:yt}),h.set(Te.locatorHash,I-1)}),be.push(()=>{let Oe=Ee.dependencies.get(H.identHash);if(typeof Oe>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let x=r.get(Oe.descriptorHash);if(typeof x>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(md(R,x).add(le.locatorHash),!!o.has(_e.locatorHash)){for(let I of _e.peerDependencies.values()){let P=At.get(I.identHash);if(typeof P>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Yy(Ky(E,P),nn(I)).push(_e.locatorHash)}for(let I of qe)_e.dependencies.delete(I)}})}for(let H of[...ne,...Z])H();let ut;do{ut=!0;for(let[H,yt,Me]of de){let Te=Ky(v,H.locatorHash),Qe=Vs(...[...Me.dependencies.values()].map(Oe=>{let x=Oe.range!=="missing:"?r.get(Oe.descriptorHash):"missing:";if(typeof x>"u")throw new Error(`Assertion failed: Expected the resolution for ${Ln(t.configuration,Oe)} to have been registered`);return x===g?`${x} (top)`:x}),yt.identHash),_e=Te.get(Qe);if(typeof _e>"u"){Te.set(Qe,yt);continue}if(_e===yt)continue;o.delete(Me.locatorHash),e.delete(yt.descriptorHash),r.delete(yt.descriptorHash),a.delete(Me.locatorHash);let qe=b.get(yt.descriptorHash)||[],At=[Ee.locatorHash,...qe];b.delete(yt.descriptorHash);for(let Oe of At){let x=o.get(Oe);typeof x>"u"||(x.dependencies.get(yt.identHash).descriptorHash!==_e.descriptorHash&&(ut=!1),x.dependencies.set(yt.identHash,_e))}}}while(!ut);for(let H of[...me,...be])H()};for(let ge of t.workspaces){let le=ge.anchoredLocator;A.delete(ge.anchoredDescriptor.descriptorHash),re(ge.anchoredDescriptor,le,new Map,{top:le.locatorHash,optional:!1})}let he;(Pe=>(Pe[Pe.NotProvided=0]="NotProvided",Pe[Pe.NotCompatible=1]="NotCompatible"))(he||(he={}));let pe=[];for(let[ge,le]of R){let Pe=o.get(ge);if(typeof Pe>"u")throw new Error("Assertion failed: Expected the root to be registered");let g=E.get(ge);if(!(typeof g>"u"))for(let ve of le){let Ee=o.get(ve);if(!(typeof Ee>"u"))for(let[de,ne]of g){let Z=Ys(de);if(Ee.peerDependencies.has(Z.identHash))continue;let me=`p${Vs(ve,de,ge).slice(0,5)}`;u.set(me,{subject:ve,requested:Z,rootRequester:ge,allRequesters:ne});let be=Pe.dependencies.get(Z.identHash);if(typeof be<"u"){let ut=V(be),H=ut.version??"0.0.0",yt=new Set;for(let Te of ne){let Qe=o.get(Te);if(typeof Qe>"u")throw new Error("Assertion failed: Expected the link to be registered");let _e=Qe.peerDependencies.get(Z.identHash);if(typeof _e>"u")throw new Error("Assertion failed: Expected the ident to be registered");yt.add(_e.range)}[...yt].every(Te=>{if(Te.startsWith(Gn.protocol)){if(!t.tryWorkspaceByLocator(ut))return!1;Te=Te.slice(Gn.protocol.length),(Te==="^"||Te==="~")&&(Te="*")}return Pd(H,Te)})||pe.push({type:1,subject:Ee,requested:Z,requester:Pe,version:H,hash:me,requirementCount:ne.length})}else{let ut=Pe.peerDependenciesMeta.get(de);ut!=null&&ut.optional||pe.push({type:0,subject:Ee,requested:Z,requester:Pe,hash:me})}}}}let De=[ge=>gM(ge.subject),ge=>nn(ge.requested),ge=>`${ge.type}`];p==null||p.startSectionSync({reportFooter:()=>{p.reportWarning(0,`Some peer dependencies are incorrectly met; run ${Kt(t.configuration,"yarn explain peer-requirements <hash>",Bt.CODE)} for details, where ${Kt(t.configuration,"<hash>",Bt.CODE)} is the six-letter p-prefixed code`)},skipIfEmpty:!0},()=>{for(let ge of xa(pe,De))switch(ge.type){case 0:p.reportWarning(2,`${kr(t.configuration,ge.subject)} doesn't provide ${cs(t.configuration,ge.requested)} (${Kt(t.configuration,ge.hash,Bt.CODE)}), requested by ${cs(t.configuration,ge.requester)}`);break;case 1:{let le=ge.requirementCount>1?"and some of its descendants request":"requests";p.reportWarning(60,`${kr(t.configuration,ge.subject)} provides ${cs(t.configuration,ge.requested)} (${Kt(t.configuration,ge.hash,Bt.CODE)}) with version ${Zw(t.configuration,ge.version)}, which doesn't satisfy what ${cs(t.configuration,ge.requester)} ${le}`)}break}})}var Vb,Jb,zb,y0e,x_,P_,b_,g0e,Jut,zut,d0e,Xut,Zut,$ut,dl,S_,m0e,Pt,E0e=dt(()=>{St();St();Hl();_t();Vb=Ie("crypto");y_();Jb=tt(f0e()),zb=tt(nd()),y0e=tt(si()),x_=Ie("util"),P_=tt(Ie("v8")),b_=tt(Ie("zlib"));E1();u_();A_();uE();IM();Zl();p0e();v_();Sd();D_();qP();zl();n0();Vl();d1();PU();s0();Ks();g0e=7,Jut=2,zut=/ *, */g,d0e=/\/$/,Xut=32,Zut=(0,x_.promisify)(b_.default.gzip),$ut=(0,x_.promisify)(b_.default.gunzip),dl=(r=>(r.UpdateLockfile="update-lockfile",r.SkipBuild="skip-build",r))(dl||{}),S_={restoreLinkersCustomData:["linkersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["storedBuildState"]},m0e=t=>Vs(`${Jut}`,t),Pt=class{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){var E,R,L;if(!e.projectCwd)throw new ot(`No project found in ${r}`);let o=e.projectCwd,a=r,n=null;for(;n!==e.projectCwd;){if(n=a,oe.existsSync(J.join(n,Lr.manifest))){o=n;break}a=J.dirname(n)}let u=new Pt(e.projectCwd,{configuration:e});(E=Xe.telemetry)==null||E.reportProject(u.cwd),await u.setupResolutions(),await u.setupWorkspaces(),(R=Xe.telemetry)==null||R.reportWorkspaceCount(u.workspaces.length),(L=Xe.telemetry)==null||L.reportDependencyCount(u.workspaces.reduce((_,V)=>_+V.manifest.dependencies.size+V.manifest.devDependencies.size,0));let A=u.tryWorkspaceByCwd(o);if(A)return{project:u,workspace:A,locator:A.anchoredLocator};let p=await u.findLocatorForLocation(`${o}/`,{strict:!0});if(p)return{project:u,locator:p,workspace:null};let h=Kt(e,u.cwd,Bt.PATH),C=Kt(e,J.relative(u.cwd,o),Bt.PATH),w=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,v=`- If ${h} is intended to be a project, it might be that you forgot to list ${C} in its workspace configuration.`,b=`- Finally, if ${h} is fine and you intend ${C} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new ot(`The nearest package directory (${Kt(e,o,Bt.PATH)}) doesn't seem to be part of the project declared in ${Kt(e,u.cwd,Bt.PATH)}.
202
203${[w,v,b].join(`
204`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=J.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(oe.existsSync(e)){let o=await oe.readFilePromise(e,"utf8");this.lockFileChecksum=m0e(o);let a=Yi(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileNeedsRefresh=n<g0e;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=Ff(p.resolution,!0),C=new Nt;C.load(p,{yamlCompatibilityMode:!0});let w=C.version,v=C.languageName||r,b=p.linkType.toUpperCase(),E=p.conditions??null,R=C.dependencies,L=C.peerDependencies,_=C.dependenciesMeta,V=C.peerDependenciesMeta,re=C.bin;if(p.checksum!=null){let he=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,he)}let ae={...h,version:w,languageName:v,linkType:b,conditions:E,dependencies:R,peerDependencies:L,dependenciesMeta:_,peerDependenciesMeta:V,bin:re};this.originalPackages.set(ae.locatorHash,ae);for(let he of A.split(zut)){let pe=i0(he);n<=6&&(pe=this.configuration.normalizeDependency(pe),pe=mn(pe,pe.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(pe.descriptorHash,pe),this.storedResolutions.set(pe.descriptorHash,h.locatorHash)}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,zb.default)(4),o=async(a,n)=>{if(e.has(n))return a;e.add(n);let u=new oC(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.locator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${cs(this.configuration,e.locator)}: ${ue.fromPortablePath(e.cwd)} conflicts with ${ue.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.locator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){J.isAbsolute(e)||(e=J.resolve(this.cwd,e)),e=J.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let o of this.workspaces)J.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${cs(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Gn.protocol)){let o=e.range.slice(Gn.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!cl(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(e);return r===null||(kf(e)&&(e=Kw(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${Ln(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Yc(e)&&(e=Vw(e)),r.locator.locatorHash!==e.locatorHash&&r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${kr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if("descriptorHash"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let o=new Set(this.storedResolutions.values());typeof r<"u"&&!o.has(r)&&this.deleteLocator(r)}if("locatorHash"in e){this.deleteLocator(e.locatorHash);for(let[r,o]of this.storedResolutions)o===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[o,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(o)}for(let o of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(o,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(o.locatorHash);let n=r.get(o.locatorHash);if(n){r.delete(o.locatorHash);for(let u of n)this.deleteDescriptor(u)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,o]of e.dependencies)kf(o)&&e.dependencies.set(r,Kw(o))}getDependencyMeta(e,r){let o={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(nn(e));if(!n)return o;let u=n.get(null);if(u&&Object.assign(o,u),r===null||!y0e.default.valid(r))return o;for(let[A,p]of n)A!==null&&A===r&&Object.assign(o,p);return o}async findLocatorForLocation(e,{strict:r=!1}={}){let o=new xi,a=this.configuration.getLinkers(),n={project:this,report:o};for(let u of a){let A=await u.findPackageLocator(e,n);if(A){if(r&&(await u.findPackageLocation(A,n)).replace(d0e,"")!==e.replace(d0e,""))continue;return A}}return null}async loadUserConfig(){let e=J.join(this.cwd,"yarn.config.js");return await oe.existsPromise(e)?zp(e):null}async preparePackage(e,{resolver:r,resolveOptions:o}){let a=this.configuration.normalizePackage(e);for(let[n,u]of a.dependencies){let A=await this.configuration.reduceHook(h=>h.reduceDependency,u,this,a,u,{resolver:r,resolveOptions:o});if(!Jw(u,A))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");let p=r.bindDescriptor(A,a,o);a.dependencies.set(n,p)}return a}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();let r=e.resolver||this.configuration.makeResolver(),o=new nC(r);await o.setup(this,{report:e.report});let a=e.lockfileOnly?[new Kb(r)]:[o,r],n=new xd([new iC(r),...a]),u=new xd([...a]),A=this.configuration.makeFetcher(),p=e.lockfileOnly?{project:this,report:e.report,resolver:n}:{project:this,report:e.report,resolver:n,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:A,cacheOptions:{mirrorWriteOnly:!0}}},h=new Map,C=new Map,w=new Map,v=new Map,b=new Map,E=new Map,R=this.topLevelWorkspace.anchoredLocator,L=new Set,_=[],V=z4(),re=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(Js.progressViaTitle(),async Pe=>{let g=async Z=>{let me=await Vy(async()=>await n.resolve(Z,p),H=>`${kr(this.configuration,Z)}: ${H}`);if(!zw(Z,me))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${kr(this.configuration,Z)} to ${kr(this.configuration,me)})`);v.set(me.locatorHash,me);let be=await this.preparePackage(me,{resolver:n,resolveOptions:p}),ut=Gc([...be.dependencies.values()].map(H=>ne(H)));return _.push(ut),ut.catch(()=>{}),C.set(be.locatorHash,be),be},ve=async Z=>{let me=b.get(Z.locatorHash);if(typeof me<"u")return me;let be=Promise.resolve().then(()=>g(Z));return b.set(Z.locatorHash,be),be},Ee=async(Z,me)=>{let be=await ne(me);return h.set(Z.descriptorHash,Z),w.set(Z.descriptorHash,be.locatorHash),be},de=async Z=>{Pe.setTitle(Ln(this.configuration,Z));let me=this.resolutionAliases.get(Z.descriptorHash);if(typeof me<"u")return Ee(Z,this.storedDescriptors.get(me));let be=n.getResolutionDependencies(Z,p),ut=Object.fromEntries(await Gc(Object.entries(be).map(async([Me,Te])=>{let Qe=n.bindDescriptor(Te,R,p),_e=await ne(Qe);return L.add(_e.locatorHash),[Me,_e]}))),yt=(await Vy(async()=>await n.getCandidates(Z,ut,p),Me=>`${Ln(this.configuration,Z)}: ${Me}`))[0];if(typeof yt>"u")throw new Vt(82,`${Ln(this.configuration,Z)}: No candidates found`);if(e.checkResolutions){let{locators:Me}=await u.getSatisfying(Z,ut,[yt],{...p,resolver:u});if(!Me.find(Te=>Te.locatorHash===yt.locatorHash))throw new Vt(78,`Invalid resolution ${jw(this.configuration,Z,yt)}`)}return h.set(Z.descriptorHash,Z),w.set(Z.descriptorHash,yt.locatorHash),ve(yt)},ne=Z=>{let me=E.get(Z.descriptorHash);if(typeof me<"u")return me;h.set(Z.descriptorHash,Z);let be=Promise.resolve().then(()=>de(Z));return E.set(Z.descriptorHash,be),be};for(let Z of this.workspaces){let me=Z.anchoredDescriptor;_.push(ne(me))}for(;_.length>0;){let Z=[..._];_.length=0,await Gc(Z)}});let ae=new Set(this.resolutionAliases.values()),he=new Set(C.keys()),pe=new Set,De=new Map;eAt({project:this,report:e.report,accessibleLocators:pe,volatileDescriptors:ae,optionalBuilds:he,peerRequirements:De,allDescriptors:h,allResolutions:w,allPackages:C});for(let Pe of L)he.delete(Pe);for(let Pe of ae)h.delete(Pe),w.delete(Pe);let ge=new Set,le=new Set;for(let Pe of C.values())Pe.conditions!=null&&(!he.has(Pe.locatorHash)||(OP(Pe,re)||(OP(Pe,V)&&e.report.reportWarningOnce(77,`${kr(this.configuration,Pe)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Kt(this.configuration,"supportedArchitectures",Bt.SETTING)} setting`),le.add(Pe.locatorHash)),ge.add(Pe.locatorHash)));this.storedResolutions=w,this.storedDescriptors=h,this.storedPackages=C,this.accessibleLocators=pe,this.conditionalLocators=ge,this.disabledLocators=le,this.originalPackages=v,this.optionalBuilds=he,this.peerRequirements=De}async fetchEverything({cache:e,report:r,fetcher:o,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},u=o||this.configuration.makeFetcher(),A={checksums:this.storedChecksums,project:this,cache:e,fetcher:u,report:r,cacheOptions:n},p=Array.from(new Set(xa(this.storedResolutions.values(),[v=>{let b=this.storedPackages.get(v);if(!b)throw new Error("Assertion failed: The locator should have been registered");return Jl(b)}])));a==="update-lockfile"&&(p=p.filter(v=>!this.storedChecksums.has(v)));let h=!1,C=Js.progressViaCounter(p.length);await r.reportProgress(C);let w=(0,zb.default)(Xut);if(await r.startCacheReport(async()=>{await Gc(p.map(v=>w(async()=>{let b=this.storedPackages.get(v);if(!b)throw new Error("Assertion failed: The locator should have been registered");if(Yc(b))return;let E;try{E=await u.fetch(b,A)}catch(R){R.message=`${kr(this.configuration,b)}: ${R.message}`,r.reportExceptionOnce(R),h=R;return}E.checksum!=null?this.storedChecksums.set(b.locatorHash,E.checksum):this.storedChecksums.delete(b.locatorHash),E.releaseFs&&E.releaseFs()}).finally(()=>{C.tick()})))}),h)throw h}async linkEverything({cache:e,report:r,fetcher:o,mode:a}){var ve,Ee;let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},u=o||this.configuration.makeFetcher(),A={checksums:this.storedChecksums,project:this,cache:e,fetcher:u,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},C=new Map(p.map(de=>{let ne=de.makeInstaller(h),Z=de.getCustomDataKey(),me=this.linkersCustomData.get(Z);return typeof me<"u"&&ne.attachCustomData(me),[de,ne]})),w=new Map,v=new Map,b=new Map,E=new Map(await Gc([...this.accessibleLocators].map(async de=>{let ne=this.storedPackages.get(de);if(!ne)throw new Error("Assertion failed: The locator should have been registered");return[de,await u.fetch(ne,A)]}))),R=[];for(let de of this.accessibleLocators){let ne=this.storedPackages.get(de);if(typeof ne>"u")throw new Error("Assertion failed: The locator should have been registered");let Z=E.get(ne.locatorHash);if(typeof Z>"u")throw new Error("Assertion failed: The fetch result should have been registered");let me=[],be=H=>{me.push(H)},ut=this.tryWorkspaceByLocator(ne);if(ut!==null){let H=[],{scripts:yt}=ut.manifest;for(let Te of["preinstall","install","postinstall"])yt.has(Te)&&H.push([0,Te]);try{for(let[Te,Qe]of C)if(Te.supportsPackage(ne,h)&&(await Qe.installPackage(ne,Z,{holdFetchResult:be})).buildDirective!==null)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}finally{me.length===0?(ve=Z.releaseFs)==null||ve.call(Z):R.push(Gc(me).catch(()=>{}).then(()=>{var Te;(Te=Z.releaseFs)==null||Te.call(Z)}))}let Me=J.join(Z.packageFs.getRealPath(),Z.prefixPath);v.set(ne.locatorHash,Me),!Yc(ne)&&H.length>0&&b.set(ne.locatorHash,{directives:H,buildLocations:[Me]})}else{let H=p.find(Te=>Te.supportsPackage(ne,h));if(!H)throw new Vt(12,`${kr(this.configuration,ne)} isn't supported by any available linker`);let yt=C.get(H);if(!yt)throw new Error("Assertion failed: The installer should have been registered");let Me;try{Me=await yt.installPackage(ne,Z,{holdFetchResult:be})}finally{me.length===0?(Ee=Z.releaseFs)==null||Ee.call(Z):R.push(Gc(me).then(()=>{}).then(()=>{var Te;(Te=Z.releaseFs)==null||Te.call(Z)}))}w.set(ne.locatorHash,H),v.set(ne.locatorHash,Me.packageLocation),Me.buildDirective&&Me.buildDirective.length>0&&Me.packageLocation&&b.set(ne.locatorHash,{directives:Me.buildDirective,buildLocations:[Me.packageLocation]})}}let L=new Map;for(let de of this.accessibleLocators){let ne=this.storedPackages.get(de);if(!ne)throw new Error("Assertion failed: The locator should have been registered");let Z=this.tryWorkspaceByLocator(ne)!==null,me=async(be,ut)=>{let H=v.get(ne.locatorHash);if(typeof H>"u")throw new Error(`Assertion failed: The package (${kr(this.configuration,ne)}) should have been registered`);let yt=[];for(let Me of ne.dependencies.values()){let Te=this.storedResolutions.get(Me.descriptorHash);if(typeof Te>"u")throw new Error(`Assertion failed: The resolution (${Ln(this.configuration,Me)}, from ${kr(this.configuration,ne)})should have been registered`);let Qe=this.storedPackages.get(Te);if(typeof Qe>"u")throw new Error(`Assertion failed: The package (${Te}, resolved from ${Ln(this.configuration,Me)}) should have been registered`);let _e=this.tryWorkspaceByLocator(Qe)===null?w.get(Te):null;if(typeof _e>"u")throw new Error(`Assertion failed: The package (${Te}, resolved from ${Ln(this.configuration,Me)}) should have been registered`);_e===be||_e===null?v.get(Qe.locatorHash)!==null&&yt.push([Me,Qe]):!Z&&H!==null&&Yy(L,Te).push(H)}H!==null&&await ut.attachInternalDependencies(ne,yt)};if(Z)for(let[be,ut]of C)be.supportsPackage(ne,h)&&await me(be,ut);else{let be=w.get(ne.locatorHash);if(!be)throw new Error("Assertion failed: The linker should have been found");let ut=C.get(be);if(!ut)throw new Error("Assertion failed: The installer should have been registered");await me(be,ut)}}for(let[de,ne]of L){let Z=this.storedPackages.get(de);if(!Z)throw new Error("Assertion failed: The package should have been registered");let me=w.get(Z.locatorHash);if(!me)throw new Error("Assertion failed: The linker should have been found");let be=C.get(me);if(!be)throw new Error("Assertion failed: The installer should have been registered");await be.attachExternalDependents(Z,ne)}let _=new Map;for(let[de,ne]of C){let Z=await ne.finalizeInstall();for(let me of(Z==null?void 0:Z.records)??[])b.set(me.locatorHash,{directives:me.buildDirective,buildLocations:me.buildLocations});typeof(Z==null?void 0:Z.customData)<"u"&&_.set(de.getCustomDataKey(),Z.customData)}if(this.linkersCustomData=_,await Gc(R),a==="skip-build")return;let V=new Set(this.storedPackages.keys()),re=new Set(b.keys());for(let de of re)V.delete(de);let ae=(0,Vb.createHash)("sha512");ae.update(process.versions.node),await this.configuration.triggerHook(de=>de.globalHashGeneration,this,de=>{ae.update("\0"),ae.update(de)});let he=ae.digest("hex"),pe=new Map,De=de=>{let ne=pe.get(de.locatorHash);if(typeof ne<"u")return ne;let Z=this.storedPackages.get(de.locatorHash);if(typeof Z>"u")throw new Error("Assertion failed: The package should have been registered");let me=(0,Vb.createHash)("sha512");me.update(de.locatorHash),pe.set(de.locatorHash,"<recursive>");for(let be of Z.dependencies.values()){let ut=this.storedResolutions.get(be.descriptorHash);if(typeof ut>"u")throw new Error(`Assertion failed: The resolution (${Ln(this.configuration,be)}) should have been registered`);let H=this.storedPackages.get(ut);if(typeof H>"u")throw new Error("Assertion failed: The package should have been registered");me.update(De(H))}return ne=me.digest("hex"),pe.set(de.locatorHash,ne),ne},ge=(de,ne)=>{let Z=(0,Vb.createHash)("sha512");Z.update(he),Z.update(De(de));for(let me of ne)Z.update(me);return Z.digest("hex")},le=new Map,Pe=!1,g=de=>{let ne=new Set([de.locatorHash]);for(let Z of ne){let me=this.storedPackages.get(Z);if(!me)throw new Error("Assertion failed: The package should have been registered");for(let be of me.dependencies.values()){let ut=this.storedResolutions.get(be.descriptorHash);if(!ut)throw new Error(`Assertion failed: The resolution (${Ln(this.configuration,be)}) should have been registered`);if(ut!==de.locatorHash&&re.has(ut))return!1;let H=this.storedPackages.get(ut);if(!H)throw new Error("Assertion failed: The package should have been registered");let yt=this.tryWorkspaceByLocator(H);if(yt){if(yt.anchoredLocator.locatorHash!==de.locatorHash&&re.has(yt.anchoredLocator.locatorHash))return!1;ne.add(yt.anchoredLocator.locatorHash)}ne.add(ut)}}return!0};for(;re.size>0;){let de=re.size,ne=[];for(let Z of re){let me=this.storedPackages.get(Z);if(!me)throw new Error("Assertion failed: The package should have been registered");if(!g(me))continue;let be=b.get(me.locatorHash);if(!be)throw new Error("Assertion failed: The build directive should have been registered");let ut=ge(me,be.buildLocations);if(this.storedBuildState.get(me.locatorHash)===ut){le.set(me.locatorHash,ut),re.delete(Z);continue}Pe||(await this.persistInstallStateFile(),Pe=!0),this.storedBuildState.has(me.locatorHash)?r.reportInfo(8,`${kr(this.configuration,me)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${kr(this.configuration,me)} must be built because it never has been before or the last one failed`);let H=be.buildLocations.map(async yt=>{if(!J.isAbsolute(yt))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${yt})`);for(let[Me,Te]of be.directives){let Qe=`# This file contains the result of Yarn building a package (${Jl(me)})
205`;switch(Me){case 0:Qe+=`# Script name: ${Te}
206`;break;case 1:Qe+=`# Script code: ${Te}
207`;break}let _e=null;if(!await oe.mktempPromise(async At=>{let Oe=J.join(At,"build.log"),{stdout:x,stderr:I}=this.configuration.getSubprocessStreams(Oe,{header:Qe,prefix:kr(this.configuration,me),report:r}),P;try{switch(Me){case 0:P=await Hx(me,Te,[],{cwd:yt,project:this,stdin:_e,stdout:x,stderr:I});break;case 1:P=await DU(me,Te,[],{cwd:yt,project:this,stdin:_e,stdout:x,stderr:I});break}}catch(F){I.write(F.stack),P=1}if(x.end(),I.end(),P===0)return!0;oe.detachTemp(At);let y=`${kr(this.configuration,me)} couldn't be built successfully (exit code ${Kt(this.configuration,P,Bt.NUMBER)}, logs can be found here: ${Kt(this.configuration,Oe,Bt.PATH)})`;return this.optionalBuilds.has(me.locatorHash)?(r.reportInfo(9,y),!0):(r.reportError(9,y),!1)}))return!1}return!0});ne.push(...H,Promise.allSettled(H).then(yt=>{re.delete(Z),yt.every(Me=>Me.status==="fulfilled"&&Me.value===!0)&&le.set(me.locatorHash,ut)}))}if(await Gc(ne),de===re.size){let Z=Array.from(re).map(me=>{let be=this.storedPackages.get(me);if(!be)throw new Error("Assertion failed: The package should have been registered");return kr(this.configuration,be)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${Z})`);break}}this.storedBuildState=le}async install(e){var h,C;let r=this.configuration.get("nodeLinker");(h=Xe.telemetry)==null||h.reportInstall(r);let o=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(w=>w.validateProject,this,{reportWarning:(w,v)=>{e.report.reportWarning(w,v)},reportError:(w,v)=>{e.report.reportError(w,v),o=!0}})}),o)return;for(let w of this.configuration.packageExtensions.values())for(let[,v]of w)for(let b of v)b.status="inactive";let a=J.join(this.cwd,this.configuration.get("lockfileFilename")),n=null;if(e.immutable)try{n=await oe.readFilePromise(a,"utf8")}catch(w){throw w.code==="ENOENT"?new Vt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):w}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,w]of this.configuration.packageExtensions)for(let[,v]of w)for(let b of v)if(b.userProvided){let E=Kt(this.configuration,b,Bt.PACKAGE_EXTENSION);switch(b.status){case"inactive":e.report.reportWarning(68,`${E}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${E}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(n!==null){let w=Og(n,this.generateLockfile());if(w!==n){let v=Fpe(a,a,n,w,void 0,void 0,{maxEditLength:100});if(v){e.report.reportSeparator();for(let b of v.hunks){e.report.reportInfo(null,`@@ -${b.oldStart},${b.oldLines} +${b.newStart},${b.newLines} @@`);for(let E of b.lines)E.startsWith("+")?e.report.reportError(28,Kt(this.configuration,E,Bt.ADDED)):E.startsWith("-")?e.report.reportError(28,Kt(this.configuration,E,Bt.REMOVED)):e.report.reportInfo(null,Kt(this.configuration,E,"grey"))}e.report.reportSeparator()}throw new Vt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let w of this.configuration.packageExtensions.values())for(let[,v]of w)for(let b of v)b.userProvided&&b.status==="active"&&((C=Xe.telemetry)==null||C.reportPackageExtension(yd(b,Bt.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject>"u"||e.persistProject)&&e.mode!=="update-lockfile"&&await this.cacheCleanup(e)});let u=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],A=await Promise.all(u.map(async w=>kP(w,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skipped due to ${Kt(this.configuration,"mode=update-lockfile",Bt.CODE)}`);return}await this.linkEverything(e);let w=await Promise.all(u.map(async v=>kP(v,{cwd:this.cwd})));for(let v=0;v<u.length;++v)A[v]!==w[v]&&e.report.reportError(64,`The checksum for ${u[v]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let p=!1;await e.report.startTimerPromise("Post-install validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(w=>w.validateProjectAfterInstall,this,{reportWarning:(w,v)=>{e.report.reportWarning(w,v)},reportError:(w,v)=>{e.report.reportError(w,v),p=!0}})}),!p&&await this.configuration.triggerHook(w=>w.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[a,n]of this.storedResolutions.entries()){let u=e.get(n);u||e.set(n,u=new Set),u.add(a)}let r={};r.__metadata={version:g0e,cacheKey:void 0};for(let[a,n]of e.entries()){let u=this.originalPackages.get(a);if(!u)continue;let A=[];for(let v of n){let b=this.storedDescriptors.get(v);if(!b)throw new Error("Assertion failed: The descriptor should have been registered");A.push(b)}let p=A.map(v=>Qa(v)).sort().join(", "),h=new Nt;h.version=u.linkType==="HARD"?u.version:"0.0.0-use.local",h.languageName=u.languageName,h.dependencies=new Map(u.dependencies),h.peerDependencies=new Map(u.peerDependencies),h.dependenciesMeta=new Map(u.dependenciesMeta),h.peerDependenciesMeta=new Map(u.peerDependenciesMeta),h.bin=new Map(u.bin);let C,w=this.storedChecksums.get(u.locatorHash);if(typeof w<"u"){let v=w.indexOf("/");if(v===-1)throw new Error("Assertion failed: Expected the checksum to reference its cache key");let b=w.slice(0,v),E=w.slice(v+1);typeof r.__metadata.cacheKey>"u"&&(r.__metadata.cacheKey=b),b===r.__metadata.cacheKey?C=E:C=w}r[p]={...h.exportTo({},{compatibilityMode:!1}),linkType:u.linkType.toLowerCase(),resolution:Jl(u),checksum:C,conditions:u.conditions||void 0}}return`${[`# This file is generated by running "yarn install" inside your project.
208`,`# Manual changes might be lost - proceed with caution!
209`].join("")}
210`+Ba(r)}async persistLockfile(){let e=J.join(this.cwd,this.configuration.get("lockfileFilename")),r="";try{r=await oe.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=Og(r,o);a!==r&&(await oe.writeFilePromise(e,a),this.lockFileChecksum=m0e(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let u of Object.values(S_))e.push(...u);let r=(0,Jb.default)(this,e),o=P_.default.serialize(r),a=Vs(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await oe.mkdirPromise(J.dirname(n),{recursive:!0}),await oe.writeFilePromise(n,await Zut(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await $ut(await oe.readFilePromise(a));n=P_.default.deserialize(u),this.installStateChecksum=Vs(u)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,Jb.default)(n,S_.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,Jb.default)(n,S_.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new xi}),await this.persistInstallStateFile()}async persist(){let e=(0,zb.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return;let o=new Set([".gitignore"]);if(!kM(e.cwd,this.cwd)||!await oe.existsPromise(e.cwd))return;let a=this.configuration.get("preferAggregateCacheInfo"),n=0,u=null;for(let A of await oe.readdirPromise(e.cwd)){if(o.has(A))continue;let p=J.resolve(e.cwd,A);e.markedFiles.has(p)||(u=A,e.immutable?r.reportError(56,`${Kt(this.configuration,J.basename(p),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):(a?n+=1:r.reportInfo(19,`${Kt(this.configuration,J.basename(p),"magenta")} appears to be unused - removing`),await oe.removePromise(p)))}a&&n!==0&&r.reportInfo(19,n>1?`${n} packages appeared to be unused and were removed`:`${u} appeared to be unused and was removed`)}}});var aC,C0e=dt(()=>{St();n0();yx();Vl();aC=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.configuration=e;let o=this.getRegistryPath();this.isNew=!oe.existsSync(o),this.sendReport(r),this.startBuffer()}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"<none>")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){md(this.values,e).add(r)}reportEnumerator(e,r){md(this.enumerators,e).add(Vs(r))}reportHit(e,r="*"){let o=Ky(this.hits,e),a=Sf(o,r,()=>0);o.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return J.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),o;try{o=oe.readJsonSync(r)}catch{o={}}let a=Date.now(),n=this.configuration.get("telemetryInterval")*24*60*60*1e3,A=(o.lastUpdate??a+n+Math.floor(n*Math.random()))+n;if(A>a&&o.lastUpdate!=null)return;try{oe.mkdirSync(J.dirname(r),{recursive:!0}),oe.writeJsonSync(r,{lastUpdate:a})}catch{return}if(A>a||!o.blocks)return;let p=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,h=C=>V4(p,C,{configuration:this.configuration}).catch(()=>{});for(let[C,w]of Object.entries(o.blocks??{})){if(Object.keys(w).length===0)continue;let v=w;v.userId=C,v.reportType="primary";for(let R of Object.keys(v.enumerators??{}))v.enumerators[R]=v.enumerators[R].length;h(v);let b=new Map,E=20;for(let[R,L]of Object.entries(v.values))L.length>0&&b.set(R,L.slice(0,E));for(;b.size>0;){let R={};R.userId=C,R.reportType="secondary",R.metrics={};for(let[L,_]of b)R.metrics[L]=_.shift(),_.length===0&&b.delete(L);h(R)}}}applyChanges(){let e=this.getRegistryPath(),r;try{r=oe.readJsonSync(e)}catch{r={}}let o=this.configuration.get("telemetryUserId")??"*",a=r.blocks=r.blocks??{},n=a[o]=a[o]??{};for(let u of this.hits.keys()){let A=n.hits=n.hits??{},p=A[u]=A[u]??{};for(let[h,C]of this.hits.get(u))p[h]=(p[h]??0)+C}for(let u of["values","enumerators"])for(let A of this[u].keys()){let p=n[u]=n[u]??{};p[A]=[...new Set([...p[A]??[],...this[u].get(A)??[]])]}oe.mkdirSync(J.dirname(e),{recursive:!0}),oe.writeJsonSync(e,r)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}}});var Y1={};Yt(Y1,{BuildType:()=>Gb,Cache:()=>Ur,Configuration:()=>Xe,DEFAULT_LOCK_FILENAME:()=>rU,DEFAULT_RC_FILENAME:()=>tU,FormatType:()=>uce,InstallMode:()=>dl,LEGACY_PLUGINS:()=>m1,LegacyMigrationResolver:()=>nC,LightReport:()=>pA,LinkType:()=>zy,LockfileResolver:()=>iC,Manifest:()=>Nt,MessageName:()=>dr,MultiFetcher:()=>fE,PackageExtensionStatus:()=>EL,PackageExtensionType:()=>yL,Project:()=>Pt,ProjectLookup:()=>sU,Report:()=>Js,ReportError:()=>Vt,SettingsType:()=>y1,StreamReport:()=>Ct,TAG_REGEXP:()=>QE,TelemetryManager:()=>aC,ThrowReport:()=>xi,VirtualFetcher:()=>pE,WindowsLinkType:()=>Dx,Workspace:()=>oC,WorkspaceFetcher:()=>gE,WorkspaceResolver:()=>Gn,YarnVersion:()=>On,execUtils:()=>Mr,folderUtils:()=>HP,formatUtils:()=>ye,hashUtils:()=>bn,httpUtils:()=>ln,miscUtils:()=>We,nodeUtils:()=>As,parseMessageName:()=>tS,scriptUtils:()=>sn,semverUtils:()=>Tr,stringifyMessageName:()=>Vu,structUtils:()=>Y,tgzUtils:()=>Ji,treeUtils:()=>$o});var Ke=dt(()=>{Cx();qP();zl();n0();yx();Vl();d1();PU();s0();Ks();mpe();vpe();Spe();E1();E1();Ppe();u_();xpe();A_();uE();rS();CM();E0e();Zl();_x();C0e();v_();wM();BM();Sd();D_();vU();Sne()});var S0e=U((i_t,V1)=>{"use strict";var nAt=process.env.TERM_PROGRAM==="Hyper",iAt=process.platform==="win32",B0e=process.platform==="linux",F_={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},v0e=Object.assign({},F_,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),D0e=Object.assign({},F_,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:B0e?"\u25B8":"\u276F",pointerSmall:B0e?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});V1.exports=iAt&&!nAt?v0e:D0e;Reflect.defineProperty(V1.exports,"common",{enumerable:!1,value:F_});Reflect.defineProperty(V1.exports,"windows",{enumerable:!1,value:v0e});Reflect.defineProperty(V1.exports,"other",{enumerable:!1,value:D0e})});var Zc=U((s_t,R_)=>{"use strict";var sAt=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),oAt=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,P0e=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");let e=n=>{let u=n.open=`\x1B[${n.codes[0]}m`,A=n.close=`\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\u001b\\[${n.codes[1]}m`,"g");return n.wrap=(h,C)=>{h.includes(A)&&(h=h.replace(p,A+u));let w=u+h+A;return C?w.replace(/\r*\n/g,`${A}$&${u}`):w},n},r=(n,u,A)=>typeof n=="function"?n(u):n.wrap(u,A),o=(n,u)=>{if(n===""||n==null)return"";if(t.enabled===!1)return n;if(t.visible===!1)return"";let A=""+n,p=A.includes(`
211`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(t.styles[u[h]],A,p);return A},a=(n,u,A)=>{t.styles[n]=e({name:n,codes:u}),(t.keys[A]||(t.keys[A]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=C=>o(C,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=oAt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,u)=>{let A=typeof u=="string"?t[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),t.styles[n]=A,A.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},t.theme=n=>{if(!sAt(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))t.alias(u,n[u]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=S0e(),t.define=a,t};R_.exports=P0e();R_.exports.create=P0e});var Fo=U($r=>{"use strict";var aAt=Object.prototype.toString,lc=Zc(),x0e=!1,T_=[],b0e={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};$r.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);$r.hasColor=t=>!!t&&lc.hasColor(t);var $b=$r.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);$r.nativeType=t=>aAt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");$r.isAsyncFn=t=>$r.nativeType(t)==="asyncfunction";$r.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";$r.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;$r.scrollDown=(t=[])=>[...t.slice(1),t[0]];$r.scrollUp=(t=[])=>[t.pop(),...t];$r.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};$r.swap=(t,e,r)=>{let o=t.length,a=r===o?0:r<0?o-1:r,n=t[e];t[e]=t[a],t[a]=n};$r.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};$r.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};$r.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=`
212`+r,width:a=80}=e,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=t.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(C=>C.replace(/\n$/,"")),e.padEnd&&(h=h.map(C=>C.padEnd(a," "))),e.padStart&&(h=h.map(C=>C.padStart(a," "))),r+h.join(o)};$r.unmute=t=>{let e=t.stack.find(o=>lc.keys.color.includes(o));return e?lc[e]:t.stack.find(o=>o.slice(2)==="bg")?lc[e.slice(2)]:o=>o};$r.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";$r.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>lc.keys.color.includes(o));if(e){let o=lc["bg"+$r.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?lc[r.slice(2).toLowerCase()]||t:lc.none};$r.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>lc.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return lc[b0e[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=b0e[o];return a&&lc["bg"+$r.pascal(a)]||t}return lc.none};$r.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),o=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+o};$r.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!$r.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},t);$r.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};$r.mixin=(t,e)=>{if(!$b(t))return e;if(!$b(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&$b(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);$b(a.value)?t[r]=$r.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};$r.merge=(...t)=>{let e={};for(let r of t)$r.mixin(e,r);return e};$r.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?$r.define(t,o,a.bind(e)):$r.define(t,o,a)}};$r.onExit=t=>{let e=(r,o)=>{x0e||(x0e=!0,T_.forEach(a=>a()),r===!0&&process.exit(128+o))};T_.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),T_.push(t)};$r.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};$r.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var Q0e=U(uC=>{"use strict";uC.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};uC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};uC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};uC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};uC.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var R0e=U((l_t,F0e)=>{"use strict";var k0e=Ie("readline"),lAt=Q0e(),cAt=/^(?:\x1b)([a-zA-Z0-9])$/,uAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,AAt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function fAt(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function pAt(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var eQ=(t="",e={})=>{let r,o={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=o.sequence||""),o.sequence=o.sequence||t||o.name,t==="\r")o.raw=void 0,o.name="return";else if(t===`
213`)o.name="enter";else if(t===" ")o.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")o.name="backspace",o.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")o.name="escape",o.meta=t.length===2;else if(t===" "||t==="\x1B ")o.name="space",o.meta=t.length===2;else if(t<="")o.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),o.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")o.name="number";else if(t.length===1&&t>="a"&&t<="z")o.name=t;else if(t.length===1&&t>="A"&&t<="Z")o.name=t.toLowerCase(),o.shift=!0;else if(r=cAt.exec(t))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=uAt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=AAt[n],o.shift=fAt(n)||o.shift,o.ctrl=pAt(n)||o.ctrl}return o};eQ.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=k0e.createInterface({terminal:!0,input:r});k0e.emitKeypressEvents(r,o);let a=(A,p)=>e(A,eQ(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};eQ.action=(t,e,r)=>{let o={...lAt,...r};return e.ctrl?(e.action=o.ctrl[e.name],e):e.option&&o.option?(e.action=o.option[e.name],e):e.shift?(e.action=o.shift[e.name],e):(e.action=o.keys[e.name],e)};F0e.exports=eQ});var N0e=U((c_t,T0e)=>{"use strict";T0e.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let o=e[r];typeof o=="number"&&(o={interval:o}),hAt(t,r,o)}};function hAt(t,e,r={}){let o=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,t.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),t.once("close",()=>o.stop()),o.stop}});var O0e=U((u_t,L0e)=>{"use strict";var{define:gAt,width:dAt}=Fo(),N_=class{constructor(e){let r=e.options;gAt(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=dAt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};L0e.exports=N_});var U0e=U((A_t,M0e)=>{"use strict";var L_=Fo(),Xs=Zc(),O_={default:Xs.noop,noop:Xs.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||L_.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||L_.complement(this.primary)},primary:Xs.cyan,success:Xs.green,danger:Xs.magenta,strong:Xs.bold,warning:Xs.yellow,muted:Xs.dim,disabled:Xs.gray,dark:Xs.dim.gray,underline:Xs.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};O_.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(Xs.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(Xs.visible=t.styles.visible);let e=L_.merge({},O_,t.styles);delete e.merge;for(let r of Object.keys(Xs))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Xs[r]});for(let r of Object.keys(Xs.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Xs[r]});return e};M0e.exports=O_});var H0e=U((f_t,_0e)=>{"use strict";var M_=process.platform==="win32",Jf=Zc(),mAt=Fo(),U_={...Jf.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:Jf.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:Jf.symbols.question,submitted:Jf.symbols.check,cancelled:Jf.symbols.cross},separator:{pending:Jf.symbols.pointerSmall,submitted:Jf.symbols.middot,cancelled:Jf.symbols.middot},radio:{off:M_?"( )":"\u25EF",on:M_?"(*)":"\u25C9",disabled:M_?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};U_.merge=t=>{let e=mAt.merge({},Jf.symbols,U_,t.symbols);return delete e.merge,e};_0e.exports=U_});var j0e=U((p_t,q0e)=>{"use strict";var yAt=U0e(),EAt=H0e(),CAt=Fo();q0e.exports=t=>{t.options=CAt.merge({},t.options.theme,t.options),t.symbols=EAt.merge(t.options),t.styles=yAt.merge(t.options)}});var V0e=U((Y0e,K0e)=>{"use strict";var G0e=process.env.TERM_PROGRAM==="Apple_Terminal",IAt=Zc(),__=Fo(),$c=K0e.exports=Y0e,Bi="\x1B[",W0e="\x07",H_=!1,D0=$c.code={bell:W0e,beep:W0e,beginning:`${Bi}G`,down:`${Bi}J`,esc:Bi,getPosition:`${Bi}6n`,hide:`${Bi}?25l`,line:`${Bi}2K`,lineEnd:`${Bi}K`,lineStart:`${Bi}1K`,restorePosition:Bi+(G0e?"8":"u"),savePosition:Bi+(G0e?"7":"s"),screen:`${Bi}2J`,show:`${Bi}?25h`,up:`${Bi}1J`},Kd=$c.cursor={get hidden(){return H_},hide(){return H_=!0,D0.hide},show(){return H_=!1,D0.show},forward:(t=1)=>`${Bi}${t}C`,backward:(t=1)=>`${Bi}${t}D`,nextLine:(t=1)=>`${Bi}E`.repeat(t),prevLine:(t=1)=>`${Bi}F`.repeat(t),up:(t=1)=>t?`${Bi}${t}A`:"",down:(t=1)=>t?`${Bi}${t}B`:"",right:(t=1)=>t?`${Bi}${t}C`:"",left:(t=1)=>t?`${Bi}${t}D`:"",to(t,e){return e?`${Bi}${e+1};${t+1}H`:`${Bi}${t+1}G`},move(t=0,e=0){let r="";return r+=t<0?Kd.left(-t):t>0?Kd.right(t):"",r+=e<0?Kd.up(-e):e>0?Kd.down(e):"",r},restore(t={}){let{after:e,cursor:r,initial:o,input:a,prompt:n,size:u,value:A}=t;if(o=__.isPrimitive(o)?String(o):"",a=__.isPrimitive(a)?String(a):"",A=__.isPrimitive(A)?String(A):"",u){let p=$c.cursor.up(u)+$c.cursor.to(n.length),h=a.length-r;return h>0&&(p+=$c.cursor.left(h)),p}if(A||e){let p=!a&&!!o?-o.length:-a.length+r;return e&&(p-=e.length),a===""&&o&&!n.includes(o)&&(p+=o.length),$c.cursor.move(p)}}},q_=$c.erase={screen:D0.screen,up:D0.up,down:D0.down,line:D0.line,lineEnd:D0.lineEnd,lineStart:D0.lineStart,lines(t){let e="";for(let r=0;r<t;r++)e+=$c.erase.line+(r<t-1?$c.cursor.up(1):"");return t&&(e+=$c.code.beginning),e}};$c.clear=(t="",e=process.stdout.columns)=>{if(!e)return q_.line+Kd.to(0);let r=n=>[...IAt.unstyle(n)].length,o=t.split(/\r?\n/),a=0;for(let n of o)a+=1+Math.floor(Math.max(r(n)-1,0)/e);return(q_.line+Kd.prevLine()).repeat(a-1)+q_.line+Kd.to(0)}});var AC=U((h_t,z0e)=>{"use strict";var wAt=Ie("events"),J0e=Zc(),j_=R0e(),BAt=N0e(),vAt=O0e(),DAt=j0e(),Ta=Fo(),Vd=V0e(),J1=class extends wAt{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,DAt(this),BAt(this),this.state=new vAt(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=PAt(this.options.margin),this.setMaxListeners(0),SAt(this)}async keypress(e,r={}){this.keypressed=!0;let o=j_.action(e,j_(e,r),this.options.actions);this.state.keypress=o,this.emit("keypress",e,o),this.emit("state",this.state.clone());let a=this.options[o.action]||this[o.action]||this.dispatch;if(typeof a=="function")return await a.call(this,e,o);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(Vd.code.beep)}cursorHide(){this.stdout.write(Vd.cursor.hide()),Ta.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(Vd.cursor.show())}write(e){!e||(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!e||this.options.show===!1)&&this.stdout.write(Vd.cursor.down(e)+Vd.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:o}=this.sections(),{cursor:a,initial:n="",input:u="",value:A=""}=this,p=this.state.size=o.length,h={after:r,cursor:a,initial:n,input:u,prompt:e,size:p,value:A},C=Vd.cursor.restore(h);C&&this.stdout.write(C)}sections(){let{buffer:e,input:r,prompt:o}=this.state;o=J0e.unstyle(o);let a=J0e.unstyle(e),n=a.indexOf(o),u=a.slice(0,n),p=a.slice(n).split(`
214`),h=p[0],C=p[p.length-1],v=(o+(r?" "+r:"")).length,b=v<h.length?h.slice(v+1):"";return{header:u,prompt:h,after:b,rest:p.slice(1),last:C}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
215`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
216`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(Vd.cursor.down(e.rest.length)),this.write(`
217`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=j_.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:o}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>o.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[e];n.timer=p;let h=a[e]||n[e]||u[e],C=r&&r[e]!=null?r[e]:await h;if(C==="")return C;let w=await this.resolve(C,n,r,o);return!w&&r&&r[e]?this.resolve(h,n,r,o):w}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Ta.isObject(e)&&(e=e[o.status]||e.pending),Ta.hasColor(e)?e:(this.styles[o.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Ta.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=e[o.status]||e.pending||o.separator,n=await this.resolve(a,o);return Ta.isObject(n)&&(n=n[o.status]||n.pending),Ta.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let o=await this.element("pointer",e,r);if(typeof o=="string"&&Ta.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Ta.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(e,r){let o=await this.element("indicator",e,r);if(typeof o=="string"&&Ta.hasColor(o))return o;if(o){let a=this.styles,n=e.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Ta.hasColor(A)?A:u(A)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Ta.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return Ta.resolve(this,e,...r)}get base(){return J1.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Ta.height(this.stdout,25)}get width(){return this.options.columns||Ta.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,o=[r,e].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return e=>new this(e).run()}};function SAt(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?o.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function PAt(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`
218`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}z0e.exports=J1});var $0e=U((g_t,Z0e)=>{"use strict";var xAt=Fo(),X0e={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return X0e.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};Z0e.exports=(t,e={})=>{let r=xAt.merge({},X0e,e.roles);return r[t]||r.default}});var z1=U((d_t,rhe)=>{"use strict";var bAt=Zc(),QAt=AC(),kAt=$0e(),tQ=Fo(),{reorder:G_,scrollUp:FAt,scrollDown:RAt,isObject:ehe,swap:TAt}=tQ,W_=class extends QAt{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:o,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");ehe(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(e,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(e,r,o){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=kAt(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,tQ.define(e,"parent",o),e.level=o?o.level+1:1,e.indent==null&&(e.indent=o?o.indent+" ":e.indent||""),e.path=o?o.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,bAt.unstyle(e.message).length));let u={...e};return e.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))e[h]=u[h];e.input=A,e.value=p},a==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,o){let a=await this.toChoice(e,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,o);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(a=>this.toggle(a,r));let o=e.parent;for(;o;){let a=o.choices.filter(n=>this.isDisabled(n));o.enabled=a.every(n=>n.enabled===!0),o=o.parent}return the(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=o=>{let a=Number(o);if(a>this.choices.length-1)return this.alert();let n=this.focused,u=this.choices.find(A=>a===A.index);if(!u.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(u)===-1){let A=G_(this.choices),p=A.indexOf(u);if(n.index>p){let h=A.slice(p,p+this.limit),C=A.filter(w=>!h.includes(w));this.choices=h.concat(C)}else{let h=p-this.limit+1;this.choices=A.slice(h).concat(A.slice(0,h))}}return this.index=this.choices.indexOf(u),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(o=>{let a=this.choices.length,n=this.num,u=(A=!1,p)=>{clearTimeout(this.numberTimeout),A&&(p=r(n)),this.num="",o(p)};if(n==="0"||n.length===1&&Number(n+"0")>a)return u(!0);if(Number(n)>a)return u(!1,this.alert());this.numberTimeout=setTimeout(()=>u(!0),this.delay)})}home(){return this.choices=G_(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=G_(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,o=this.index;return this.options.scroll===!1&&o===0?this.alert():e>r&&o===0?this.scrollUp():(this.index=(o-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,o=this.index;return this.options.scroll===!1&&o===r-1?this.alert():e>r&&o===r-1?this.scrollDown():(this.index=(o+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=FAt(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=RAt(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){TAt(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(o=>e[o]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(o=>!this.isDisabled(o));return e.enabled&&r.every(o=>this.isEnabled(o))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((o,a)=>(o[a]=this.find(a,r),o),{})}filter(e,r){let a=typeof e=="function"?e:(A,p)=>[A.name,p].includes(e),u=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?u.map(A=>A[r]):u}find(e,r){if(ehe(e))return r?e[r]:e;let a=typeof e=="function"?e:(u,A)=>[u.name,A].includes(e),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(u=>u.newChoice))return this.alert();let{reorder:r,sort:o}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&o!==!0&&(n=tQ.reorder(n)),this.value=a?n.map(u=>u.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(o=>o.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let o=this.find(r);o&&(this.initial=o.index,this.focus(o,!0))}}}get choices(){return the(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:o}=this,a=e.limit||this._limit||r.limit||o.length;return Math.min(a,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function the(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(tQ.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let o=r.choices.filter(a=>!t.isDisabled(a));r.enabled=o.every(a=>a.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}rhe.exports=W_});var S0=U((m_t,nhe)=>{"use strict";var NAt=z1(),Y_=Fo(),K_=class extends NAt{constructor(e){super(e),this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let o=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!Y_.hasColor(o)&&(o=this.styles.strong(o)),this.resolve(o,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await this.indicator(e,r)+(e.pad||""),u=await this.resolve(e.hint,this.state,e,r);u&&!Y_.hasColor(u)&&(u=this.styles.muted(u));let A=this.indent(e),p=await this.choiceMessage(e,r),h=()=>[this.margin[3],A+a+n,p,this.margin[1],u].filter(Boolean).join(" ");return e.role==="heading"?h():e.disabled?(Y_.hasColor(p)||(p=this.styles.disabled(p)),h()):(o&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(n,u)=>await this.renderChoice(n,u)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let o=this.margin[0]+r.join(`
219`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].filter(Boolean).join(`
220`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),e&&!p&&!C.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,C,w].filter(Boolean).join(`
221`)),this.write(this.margin[2]),this.restore()}};nhe.exports=K_});var she=U((y_t,ihe)=>{"use strict";var LAt=S0(),OAt=(t,e)=>{let r=t.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=e(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},V_=class extends LAt{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:o}=this.state;return this.input=o.slice(0,r)+e+o.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let o=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=OAt(this.input,e),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};ihe.exports=V_});var z_=U((E_t,ohe)=>{"use strict";var J_=Fo();ohe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=e,A=u||t.styles.placeholder,p=J_.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),C=r,w=" ",v=h(w);if(t.blink&&t.blink.off===!0&&(h=R=>R,v=""),n&&a===0&&o===""&&r==="")return h(w);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=J_.isPrimitive(o)?`${o}`:"",r=J_.isPrimitive(r)?`${r}`:"";let b=o&&o.startsWith(r)&&o!==r,E=b?h(o[r.length]):v;if(a!==r.length&&n===!0&&(C=r.slice(0,a)+h(r[a])+r.slice(a+1),E=""),n===!1&&(E=""),b){let R=t.styles.unstyle(C+E);return C+E+A(o.slice(R.length))}return C+E}});var rQ=U((C_t,ahe)=>{"use strict";var MAt=Zc(),UAt=S0(),_At=z_(),X_=class extends UAt{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:o,input:a}=r;return r.value=r.input=a.slice(0,o)+e+a.slice(o),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:o}=e;return e.value=e.input=o.slice(0,r-1)+o.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:o}=e;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:o}=e;return r&&r.startsWith(o)&&o!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let o=await this.resolve(e.separator,this.state,e,r)||":";return o?" "+this.styles.disabled(o):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:o,styles:a}=this,{cursor:n,initial:u="",name:A,hint:p,input:h=""}=e,{muted:C,submitted:w,primary:v,danger:b}=a,E=p,R=this.index===r,L=e.validate||(()=>!0),_=await this.choiceSeparator(e,r),V=e.message;this.align==="right"&&(V=V.padStart(this.longest+1," ")),this.align==="left"&&(V=V.padEnd(this.longest+1," "));let re=this.values[A]=h||u,ae=h?"success":"dark";await L.call(e,re,this.state)!==!0&&(ae="danger");let he=a[ae],pe=he(await this.indicator(e,r))+(e.pad||""),De=this.indent(e),ge=()=>[De,pe,V+_,h,E].filter(Boolean).join(" ");if(o.submitted)return V=MAt.unstyle(V),h=w(h),E="",ge();if(e.format)h=await e.format.call(this,h,e,r);else{let le=this.styles.muted;h=_At(this,{input:h,initial:u,pos:n,showCursor:R,color:le})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[A]=await e.result.call(this,re,e,r)),R&&(V=v(V)),e.error?h+=(h?" ":"")+b(e.error.trim()):e.hint&&(h+=(h?" ":"")+C(e.hint.trim())),ge()}async submit(){return this.value=this.values,super.base.submit.call(this)}};ahe.exports=X_});var Z_=U((I_t,che)=>{"use strict";var HAt=rQ(),qAt=()=>{throw new Error("expected prompt to have a custom authenticate method")},lhe=(t=qAt)=>{class e extends HAt{constructor(o){super(o)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(o){return lhe(o)}}return e};che.exports=lhe()});var fhe=U((w_t,Ahe)=>{"use strict";var jAt=Z_();function GAt(t,e){return t.username===this.options.username&&t.password===this.options.password}var uhe=(t=GAt)=>{let e=[{name:"username",message:"username"},{name:"password",message:"password",format(o){return this.options.showPassword?o:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(o.length))}}];class r extends jAt.create(t){constructor(a){super({...a,choices:e})}static create(a){return uhe(a)}}return r};Ahe.exports=uhe()});var nQ=U((B_t,phe)=>{"use strict";var WAt=AC(),{isPrimitive:YAt,hasColor:KAt}=Fo(),$_=class extends WAt{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:o}=this;return o.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return YAt(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return KAt(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=this.styles.muted(this.default),A=[o,n,u,a].filter(Boolean).join(" ");this.state.prompt=A;let p=await this.header(),h=this.value=this.cast(e),C=await this.format(h),w=await this.error()||await this.hint(),v=await this.footer();w&&!A.includes(w)&&(C+=" "+w),A+=" "+C,this.clear(r),this.write([p,A,v].filter(Boolean).join(`
222`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};phe.exports=$_});var ghe=U((v_t,hhe)=>{"use strict";var VAt=nQ(),e8=class extends VAt{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};hhe.exports=e8});var mhe=U((D_t,dhe)=>{"use strict";var JAt=S0(),zAt=rQ(),fC=zAt.prototype,t8=class extends JAt{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():fC.dispatch.call(this,e,r)}append(e,r){return fC.append.call(this,e,r)}delete(e,r){return fC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?fC.next.call(this):super.next()}prev(){return this.focused.editable?fC.prev.call(this):super.prev()}async indicator(e,r){let o=e.indicator||"",a=e.editable?o:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?fC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),e=await r.validate(o,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};dhe.exports=t8});var Jd=U((S_t,yhe)=>{"use strict";var XAt=AC(),ZAt=z_(),{isPrimitive:$At}=Fo(),r8=class extends XAt{constructor(e){super(e),this.initial=$At(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.name!=="return")?this.append(`
223`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:o}=this.state;this.input=`${o}`.slice(0,r)+e+`${o}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),o=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):ZAt(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(e),this.write([u,n,h].filter(Boolean).join(`
224`)),this.restore()}};yhe.exports=r8});var Che=U((P_t,Ehe)=>{"use strict";var eft=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),iQ=t=>eft(t).filter(Boolean);Ehe.exports=(t,e={},r="")=>{let{past:o=[],present:a=""}=e,n,u;switch(t){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:iQ([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:iQ([...n,r]),present:u};case"save":return{past:iQ([...o,r]),present:""};case"remove":return u=iQ(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var i8=U((x_t,whe)=>{"use strict";var tft=Jd(),Ihe=Che(),n8=class extends tft{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Ihe(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=Ihe("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};whe.exports=n8});var vhe=U((b_t,Bhe)=>{"use strict";var rft=Jd(),s8=class extends rft{format(){return""}};Bhe.exports=s8});var She=U((Q_t,Dhe)=>{"use strict";var nft=Jd(),o8=class extends nft{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};Dhe.exports=o8});var xhe=U((k_t,Phe)=>{"use strict";var ift=S0(),a8=class extends ift{constructor(e){super({...e,multiple:!0})}};Phe.exports=a8});var c8=U((F_t,bhe)=>{"use strict";var sft=Jd(),l8=class extends sft{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(e){let r=e||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};bhe.exports=l8});var khe=U((R_t,Qhe)=>{Qhe.exports=c8()});var Rhe=U((T_t,Fhe)=>{"use strict";var oft=Jd(),u8=class extends oft{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};Fhe.exports=u8});var Lhe=U((N_t,Nhe)=>{"use strict";var aft=Zc(),lft=z1(),The=Fo(),A8=class extends lft{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`
225 `;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let o=0;o<this.scale.length;o++)r.scale.push({index:o})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,o){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
226`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(e,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,o);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let o=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!The.hasColor(n)&&(n=this.styles.muted(n));let u=E=>this.margin[3]+E.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),C=await this.renderScale(e,r),w=this.margin[1]+this.margin[3];this.scaleLength=aft.unstyle(C).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let b=The.wordWrap(h,{width:this.widths[0],newline:A}).split(`
227`).map(E=>u(E)+this.margin[1]);return o&&(C=this.styles.info(C),b=b.map(E=>this.styles.info(E))),b[0]+=C,this.linebreak&&b.push(""),[p+a,b.join(`
228`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
229`)}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),C=await this.error()||await this.hint(),w=await this.renderChoices(),v=await this.footer(),b=this.emptyError;p&&(u+=p),C&&!u.includes(C)&&(u+=" "+C),e&&!p&&!w.trim()&&this.multiple&&b!=null&&(u+=this.styles.danger(b)),this.clear(r),this.write([A,u,h,w,v].filter(Boolean).join(`
230`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};Nhe.exports=A8});var Uhe=U((L_t,Mhe)=>{"use strict";var Ohe=Zc(),cft=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",p8=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=cft(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},uft=async(t={},e={},r=o=>o)=>{let o=new Set,a=t.fields||[],n=t.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let C=-1,w=()=>n[++C],v=()=>n[C+1],b=E=>{E.line=h,u.push(E)};for(b({type:"bos",value:""});C<n.length-1;){let E=w();if(/^[^\S\n ]$/.test(E)){b({type:"text",value:E});continue}if(E===`
231`){b({type:"newline",value:E}),h++;continue}if(E==="\\"){E+=w(),b({type:"text",value:E});continue}if((E==="$"||E==="#"||E==="{")&&v()==="{"){let L=w();E+=L;let _={type:"template",open:E,inner:"",close:"",value:E},V;for(;V=w();){if(V==="}"){v()==="}"&&(V+=w()),_.value+=V,_.close=V;break}V===":"?(_.initial="",_.key=_.inner):_.initial!==void 0&&(_.initial+=V),_.value+=V,_.inner+=V}_.template=_.open+(_.initial||_.inner)+_.close,_.key=_.key||_.inner,e.hasOwnProperty(_.key)&&(_.initial=e[_.key]),_=r(_),b(_),p.push(_.key),o.add(_.key);let re=A.find(ae=>ae.name===_.key);_.field=a.find(ae=>ae.name===_.key),re||(re=new p8(_),A.push(re)),re.lines.push(_.line-1);continue}let R=u[u.length-1];R.type==="text"&&R.line===h?R.value+=E:b({type:"text",value:E})}return b({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};Mhe.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),o={...e.values,...e.initial},{tabstops:a,items:n,keys:u}=await uft(e,o),A=f8("result",t,e),p=f8("format",t,e),h=f8("validate",t,e,!0),C=t.isValue.bind(t);return async(w={},v=!1)=>{let b=0;w.required=r,w.items=n,w.keys=u,w.output="";let E=async(V,re,ae,he)=>{let pe=await h(V,re,ae,he);return pe===!1?"Invalid field "+ae.name:pe};for(let V of a){let re=V.value,ae=V.key;if(V.type!=="template"){re&&(w.output+=re);continue}if(V.type==="template"){let he=n.find(Pe=>Pe.name===ae);e.required===!0&&w.required.add(he.name);let pe=[he.input,w.values[he.value],he.value,re].find(C),ge=(he.field||{}).message||V.inner;if(v){let Pe=await E(w.values[ae],w,he,b);if(Pe&&typeof Pe=="string"||Pe===!1){w.invalid.set(ae,Pe);continue}w.invalid.delete(ae);let g=await A(w.values[ae],w,he,b);w.output+=Ohe.unstyle(g);continue}he.placeholder=!1;let le=re;re=await p(re,w,he,b),pe!==re?(w.values[ae]=pe,re=t.styles.typing(pe),w.missing.delete(ge)):(w.values[ae]=void 0,pe=`<${ge}>`,re=t.styles.primary(pe),he.placeholder=!0,w.required.has(ae)&&w.missing.add(ge)),w.missing.has(ge)&&w.validating&&(re=t.styles.warning(pe)),w.invalid.has(ae)&&w.validating&&(re=t.styles.danger(pe)),b===w.index&&(le!==re?re=t.styles.underline(re):re=t.styles.heading(Ohe.unstyle(re))),b++}re&&(w.output+=re)}let R=w.output.split(`
232`).map(V=>" "+V),L=n.length,_=0;for(let V of n)w.invalid.has(V.name)&&V.lines.forEach(re=>{R[re][0]===" "&&(R[re]=w.styles.danger(w.symbols.bullet)+R[re].slice(1))}),t.isValue(w.values[V.name])&&_++;return w.completed=(_/L*100).toFixed(0),w.output=R.join(`
233`),w.output}};function f8(t,e,r,o){return(a,n,u,A)=>typeof u.field[t]=="function"?u.field[t].call(e,a,n,u,A):[o,a].find(p=>e.isValue(p))}});var Hhe=U((O_t,_he)=>{"use strict";var Aft=Zc(),fft=Uhe(),pft=AC(),h8=class extends pft{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await fft(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),o=e.input.slice(0,this.cursor-1);this.input=e.input=`${o}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:o,size:a}=this.state,n=[this.options.newline,`
234`].find(V=>V!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let C=await this.header(),w=await this.error()||"",v=await this.hint()||"",b=o?"":await this.interpolate(this.state),E=this.state.key=r[e]||"",R=await this.format(E),L=await this.footer();R&&(h+=" "+R),v&&!R&&this.state.completed===0&&(h+=" "+v),this.clear(a);let _=[C,h,b,L,w.trim()];this.write(_.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:o,values:a}=this.state;if(e.size){let A="";for(let[p,h]of e)A+=`Invalid ${p}: ${h}
235`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=Aft.unstyle(o).split(`
236`).map(A=>A.slice(1)).join(`
237`);return this.value={values:a,result:u},super.submit()}};_he.exports=h8});var jhe=U((M_t,qhe)=>{"use strict";var hft="(Use <shift>+<up/down> to sort)",gft=S0(),g8=class extends gft{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,hft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let o=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};qhe.exports=g8});var Whe=U((U_t,Ghe)=>{"use strict";var dft=z1(),d8=class extends dft{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(o=>this.styles.muted(o)),this.state.header=r.join(`
238 `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let o of r)o.scale=mft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],o=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!o,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=re=>(re?this.styles.success("\u25C9"):"\u25EF")+u,C=r+1+".",w=o?this.styles.heading:this.styles.noop,v=await this.resolve(e.message,this.state,e,r),b=this.indent(e),E=b+e.scale.map((re,ae)=>h(ae===e.scaleIdx)).join(A),R=re=>re===e.scaleIdx?w(re):re,L=b+e.scale.map((re,ae)=>R(ae)).join(p),_=()=>[C,v].filter(Boolean).join(" "),V=()=>[_(),E,L," "].filter(Boolean).join(`
239`);return o&&(E=this.styles.cyan(E),L=this.styles.cyan(L)),V()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(o,a)=>await this.renderChoice(o,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
240`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),e&&!p&&!C&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,C,w].filter(Boolean).join(`
241`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function mft(t,e={}){if(Array.isArray(e.scale))return e.scale.map(o=>({...o}));let r=[];for(let o=1;o<t+1;o++)r.push({i:o,selected:!1});return r}Ghe.exports=d8});var Khe=U((__t,Yhe)=>{Yhe.exports=i8()});var Jhe=U((H_t,Vhe)=>{"use strict";var yft=nQ(),m8=class extends yft{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=o=>this.styles.primary.underline(o);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(e),this.write([r,h,p].filter(Boolean).join(`
242`)),this.write(this.margin[2]),this.restore()}};Vhe.exports=m8});var Xhe=U((q_t,zhe)=>{"use strict";var Eft=S0(),y8=class extends Eft{constructor(e){if(super(e),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let o=await super.toChoices(e,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};zhe.exports=y8});var $he=U(E8=>{"use strict";var Zhe=Fo(),ps=(t,e)=>{Zhe.defineExport(E8,t,e),Zhe.defineExport(E8,t.toLowerCase(),e)};ps("AutoComplete",()=>she());ps("BasicAuth",()=>fhe());ps("Confirm",()=>ghe());ps("Editable",()=>mhe());ps("Form",()=>rQ());ps("Input",()=>i8());ps("Invisible",()=>vhe());ps("List",()=>She());ps("MultiSelect",()=>xhe());ps("Numeral",()=>khe());ps("Password",()=>Rhe());ps("Scale",()=>Lhe());ps("Select",()=>S0());ps("Snippet",()=>Hhe());ps("Sort",()=>jhe());ps("Survey",()=>Whe());ps("Text",()=>Khe());ps("Toggle",()=>Jhe());ps("Quiz",()=>Xhe())});var tge=U((G_t,ege)=>{ege.exports={ArrayPrompt:z1(),AuthPrompt:Z_(),BooleanPrompt:nQ(),NumberPrompt:c8(),StringPrompt:Jd()}});var Z1=U((W_t,nge)=>{"use strict";var rge=Ie("assert"),I8=Ie("events"),P0=Fo(),eu=class extends I8{constructor(e,r){super(),this.options=P0.merge({},e),this.answers={...r}}register(e,r){if(P0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}rge.equal(typeof r,"function","expected a function");let o=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(P0.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=P0.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=P0;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];rge(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",C=>{this.emit("answer",a,C,A),n(this.answers,a,C)});let h=A.emit.bind(A);return A.emit=(...C)=>(this.emit.call(this,...C),h(...C)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||AC()}static get prompts(){return $he()}static get types(){return tge()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(e.emit(...u),n(...u)),a.prompt(r)};return P0.mixinEmitter(e,new I8),e}};P0.mixinEmitter(eu,new I8);var C8=eu.prompts;for(let t of Object.keys(C8)){let e=t.toLowerCase(),r=o=>new C8[t](o).run();eu.prompt[e]=r,eu[e]=r,eu[t]||Reflect.defineProperty(eu,t,{get:()=>C8[t]})}var X1=t=>{P0.defineExport(eu,t,()=>eu.types[t])};X1("ArrayPrompt");X1("AuthPrompt");X1("BooleanPrompt");X1("NumberPrompt");X1("StringPrompt");nge.exports=eu});var r2=U((P8t,uge)=>{var Dft=Yb();function Sft(t,e,r){var o=t==null?void 0:Dft(t,e);return o===void 0?r:o}uge.exports=Sft});var pge=U((R8t,fge)=>{function Pft(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}fge.exports=Pft});var gge=U((T8t,hge)=>{var xft=dd(),bft=qS();function Qft(t,e){return t&&xft(e,bft(e),t)}hge.exports=Qft});var mge=U((N8t,dge)=>{var kft=dd(),Fft=Wy();function Rft(t,e){return t&&kft(e,Fft(e),t)}dge.exports=Rft});var Ege=U((L8t,yge)=>{var Tft=dd(),Nft=LS();function Lft(t,e){return Tft(t,Nft(t),e)}yge.exports=Lft});var P8=U((O8t,Cge)=>{var Oft=NS(),Mft=KS(),Uft=LS(),_ft=qN(),Hft=Object.getOwnPropertySymbols,qft=Hft?function(t){for(var e=[];t;)Oft(e,Uft(t)),t=Mft(t);return e}:_ft;Cge.exports=qft});var wge=U((M8t,Ige)=>{var jft=dd(),Gft=P8();function Wft(t,e){return jft(t,Gft(t),e)}Ige.exports=Wft});var x8=U((U8t,Bge)=>{var Yft=HN(),Kft=P8(),Vft=Wy();function Jft(t){return Yft(t,Vft,Kft)}Bge.exports=Jft});var Dge=U((_8t,vge)=>{var zft=Object.prototype,Xft=zft.hasOwnProperty;function Zft(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Xft.call(t,"index")&&(r.index=t.index,r.input=t.input),r}vge.exports=Zft});var Pge=U((H8t,Sge)=>{var $ft=WS();function ept(t,e){var r=e?$ft(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}Sge.exports=ept});var bge=U((q8t,xge)=>{var tpt=/\w*$/;function rpt(t){var e=new t.constructor(t.source,tpt.exec(t));return e.lastIndex=t.lastIndex,e}xge.exports=rpt});var Tge=U((j8t,Rge)=>{var Qge=pd(),kge=Qge?Qge.prototype:void 0,Fge=kge?kge.valueOf:void 0;function npt(t){return Fge?Object(Fge.call(t)):{}}Rge.exports=npt});var Lge=U((G8t,Nge)=>{var ipt=WS(),spt=Pge(),opt=bge(),apt=Tge(),lpt=rL(),cpt="[object Boolean]",upt="[object Date]",Apt="[object Map]",fpt="[object Number]",ppt="[object RegExp]",hpt="[object Set]",gpt="[object String]",dpt="[object Symbol]",mpt="[object ArrayBuffer]",ypt="[object DataView]",Ept="[object Float32Array]",Cpt="[object Float64Array]",Ipt="[object Int8Array]",wpt="[object Int16Array]",Bpt="[object Int32Array]",vpt="[object Uint8Array]",Dpt="[object Uint8ClampedArray]",Spt="[object Uint16Array]",Ppt="[object Uint32Array]";function xpt(t,e,r){var o=t.constructor;switch(e){case mpt:return ipt(t);case cpt:case upt:return new o(+t);case ypt:return spt(t,r);case Ept:case Cpt:case Ipt:case wpt:case Bpt:case vpt:case Dpt:case Spt:case Ppt:return lpt(t,r);case Apt:return new o;case fpt:case gpt:return new o(t);case ppt:return opt(t);case hpt:return new o;case dpt:return apt(t)}}Nge.exports=xpt});var Mge=U((W8t,Oge)=>{var bpt=Nw(),Qpt=Xu(),kpt="[object Map]";function Fpt(t){return Qpt(t)&&bpt(t)==kpt}Oge.exports=Fpt});var qge=U((Y8t,Hge)=>{var Rpt=Mge(),Tpt=MS(),Uge=US(),_ge=Uge&&Uge.isMap,Npt=_ge?Tpt(_ge):Rpt;Hge.exports=Npt});var Gge=U((K8t,jge)=>{var Lpt=Nw(),Opt=Xu(),Mpt="[object Set]";function Upt(t){return Opt(t)&&Lpt(t)==Mpt}jge.exports=Upt});var Vge=U((V8t,Kge)=>{var _pt=Gge(),Hpt=MS(),Wge=US(),Yge=Wge&&Wge.isSet,qpt=Yge?Hpt(Yge):_pt;Kge.exports=qpt});var b8=U((J8t,Zge)=>{var jpt=RS(),Gpt=pge(),Wpt=VS(),Ypt=gge(),Kpt=mge(),Vpt=tL(),Jpt=YS(),zpt=Ege(),Xpt=wge(),Zpt=YN(),$pt=x8(),e0t=Nw(),t0t=Dge(),r0t=Lge(),n0t=nL(),i0t=Kl(),s0t=Qw(),o0t=qge(),a0t=al(),l0t=Vge(),c0t=qS(),u0t=Wy(),A0t=1,f0t=2,p0t=4,Jge="[object Arguments]",h0t="[object Array]",g0t="[object Boolean]",d0t="[object Date]",m0t="[object Error]",zge="[object Function]",y0t="[object GeneratorFunction]",E0t="[object Map]",C0t="[object Number]",Xge="[object Object]",I0t="[object RegExp]",w0t="[object Set]",B0t="[object String]",v0t="[object Symbol]",D0t="[object WeakMap]",S0t="[object ArrayBuffer]",P0t="[object DataView]",x0t="[object Float32Array]",b0t="[object Float64Array]",Q0t="[object Int8Array]",k0t="[object Int16Array]",F0t="[object Int32Array]",R0t="[object Uint8Array]",T0t="[object Uint8ClampedArray]",N0t="[object Uint16Array]",L0t="[object Uint32Array]",Xn={};Xn[Jge]=Xn[h0t]=Xn[S0t]=Xn[P0t]=Xn[g0t]=Xn[d0t]=Xn[x0t]=Xn[b0t]=Xn[Q0t]=Xn[k0t]=Xn[F0t]=Xn[E0t]=Xn[C0t]=Xn[Xge]=Xn[I0t]=Xn[w0t]=Xn[B0t]=Xn[v0t]=Xn[R0t]=Xn[T0t]=Xn[N0t]=Xn[L0t]=!0;Xn[m0t]=Xn[zge]=Xn[D0t]=!1;function oQ(t,e,r,o,a,n){var u,A=e&A0t,p=e&f0t,h=e&p0t;if(r&&(u=a?r(t,o,a,n):r(t)),u!==void 0)return u;if(!a0t(t))return t;var C=i0t(t);if(C){if(u=t0t(t),!A)return Jpt(t,u)}else{var w=e0t(t),v=w==zge||w==y0t;if(s0t(t))return Vpt(t,A);if(w==Xge||w==Jge||v&&!a){if(u=p||v?{}:n0t(t),!A)return p?Xpt(t,Kpt(u,t)):zpt(t,Ypt(u,t))}else{if(!Xn[w])return a?t:{};u=r0t(t,w,A)}}n||(n=new jpt);var b=n.get(t);if(b)return b;n.set(t,u),l0t(t)?t.forEach(function(L){u.add(oQ(L,e,r,L,t,n))}):o0t(t)&&t.forEach(function(L,_){u.set(_,oQ(L,e,r,_,t,n))});var E=h?p?$pt:Zpt:p?u0t:c0t,R=C?void 0:E(t);return Gpt(R||t,function(L,_){R&&(_=L,L=t[_]),Wpt(u,_,oQ(L,e,r,_,t,n))}),u}Zge.exports=oQ});var Q8=U((z8t,$ge)=>{var O0t=b8(),M0t=1,U0t=4;function _0t(t){return O0t(t,M0t|U0t)}$ge.exports=_0t});var k8=U((X8t,ede)=>{var H0t=I_();function q0t(t,e,r){return t==null?t:H0t(t,e,r)}ede.exports=q0t});var sde=U((nHt,ide)=>{var j0t=Object.prototype,G0t=j0t.hasOwnProperty;function W0t(t,e){return t!=null&&G0t.call(t,e)}ide.exports=W0t});var ade=U((iHt,ode)=>{var Y0t=sde(),K0t=w_();function V0t(t,e){return t!=null&&K0t(t,e,Y0t)}ode.exports=V0t});var cde=U((sHt,lde)=>{function J0t(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}lde.exports=J0t});var Ade=U((oHt,ude)=>{var z0t=Yb(),X0t=yU();function Z0t(t,e){return e.length<2?t:z0t(t,X0t(e,0,-1))}ude.exports=Z0t});var R8=U((aHt,fde)=>{var $0t=Yd(),eht=cde(),tht=Ade(),rht=sC();function nht(t,e){return e=$0t(e,t),t=tht(t,e),t==null||delete t[rht(eht(e))]}fde.exports=nht});var T8=U((lHt,pde)=>{var iht=R8();function sht(t,e){return t==null?!0:iht(t,e)}pde.exports=sht});var yde=U((OHt,lht)=>{lht.exports={name:"@yarnpkg/cli",version:"4.0.0-rc.45",stableVersion:"3.5.1",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspace:^","ci-info":"^3.2.0",clipanion:"^3.2.0-rc.10",semver:"^7.1.2",tslib:"^2.4.0",typanion:"^3.3.0"},devDependencies:{"@types/semver":"^7.1.0","@yarnpkg/builder":"workspace:^","@yarnpkg/monorepo":"workspace:^","@yarnpkg/pnpify":"workspace:^",micromatch:"^4.0.2"},peerDependencies:{"@yarnpkg/core":"workspace:^"},scripts:{postpack:"rm -rf lib",prepack:'run build:compile "$(pwd)"',"build:cli+hook":"run build:pnp:hook && builder build bundle","build:cli":"builder build bundle","run:cli":"builder run","update-local":"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/"},publishConfig:{main:"./lib/index.js",bin:null,exports:{".":"./lib/index.js","./package.json":"./package.json"}},files:["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{bundles:{standard:["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]}},repository:{type:"git",url:"ssh://git@github.com/yarnpkg/berry.git",directory:"packages/yarnpkg-cli"},engines:{node:">=14.15.0"}}});var j8=U((pGt,kde)=>{"use strict";kde.exports=function(e,r){r===!0&&(r=0);var o="";if(typeof e=="string")try{o=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(o=e.protocol);var a=o.split(/\:|\+/).filter(Boolean);return typeof r=="number"?a[r]:a}});var Rde=U((hGt,Fde)=>{"use strict";var Dht=j8();function Sht(t){var e={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=Dht(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||"",e.password=r.password||"",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=["file"],e.protocol=e.protocols[0],e.port="",e.resource="",e.user="",e.pathname="",e.hash="",e.search="",e.href=t,e.query={},e.parse_failed=!0}return e}Fde.exports=Sht});var Lde=U((gGt,Nde)=>{"use strict";var Pht=Rde();function xht(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var bht=xht(Pht),Qht="text/plain",kht="us-ascii",Tde=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Fht=(t,{stripHash:e})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:o,data:a,hash:n}=r.groups,u=o.split(";");n=e?"":n;let A=!1;u[u.length-1]==="base64"&&(u.pop(),A=!0);let p=(u.shift()||"").toLowerCase(),C=[...u.map(w=>{let[v,b=""]=w.split("=").map(E=>E.trim());return v==="charset"&&(b=b.toLowerCase(),b===kht)?"":`${v}${b?`=${b}`:""}`}).filter(Boolean)];return A&&C.push("base64"),(C.length>0||p&&p!==Qht)&&C.unshift(p),`data:${C.join(";")},${A?a.trim():a}${n?`#${n}`:""}`};function Rht(t,e){if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return Fht(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash?a.hash="":e.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname){let u=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,A=0,p="";for(;;){let C=u.exec(a.pathname);if(!C)break;let w=C[0],v=C.index,b=a.pathname.slice(A,v);p+=b.replace(/\/{2,}/g,"/"),p+=w,A=v+w.length}let h=a.pathname.slice(A,a.pathname.length);p+=h.replace(/\/{2,}/g,"/"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let u=a.pathname.split("/"),A=u[u.length-1];Tde(A,e.removeDirectoryIndex)&&(u=u.slice(0,-1),a.pathname=u.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let u of[...a.searchParams.keys()])Tde(u,e.removeQueryParameters)&&a.searchParams.delete(u);if(e.removeQueryParameters===!0&&(a.search=""),e.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,""));let n=t;return t=a.toString(),!e.removeSingleSlash&&a.pathname==="/"&&!n.endsWith("/")&&a.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}var G8=(t,e=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/,o=n=>{let u=new Error(n);throw u.subject_url=t,u};(typeof t!="string"||!t.trim())&&o("Invalid url."),t.length>G8.MAX_INPUT_LENGTH&&o("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),e&&(typeof e!="object"&&(e={stripHash:!1}),t=Rht(t,e));let a=bht.default(t);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=["ssh"],a.protocol="ssh",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):o("URL parsing failed.")}return a};G8.MAX_INPUT_LENGTH=2048;Nde.exports=G8});var Ude=U((dGt,Mde)=>{"use strict";var Tht=j8();function Ode(t){if(Array.isArray(t))return t.indexOf("ssh")!==-1||t.indexOf("rsync")!==-1;if(typeof t!="string")return!1;var e=Tht(t);if(t=t.substring(t.indexOf("://")+3),Ode(e))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@")<t.indexOf(":")}Mde.exports=Ode});var qde=U((mGt,Hde)=>{"use strict";var Nht=Lde(),_de=Ude();function Lht(t){var e=Nht(t);return e.token="",e.password==="x-oauth-basic"?e.token=e.user:e.user==="x-token-auth"&&(e.token=e.password),_de(e.protocols)||e.protocols.length===0&&_de(t)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol="file",e.protocols=["file"]),e.href=e.href.replace(/\/$/,""),e}Hde.exports=Lht});var Gde=U((yGt,jde)=>{"use strict";var Oht=qde();function W8(t){if(typeof t!="string")throw new Error("The url must be a string.");var e=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;e.test(t)&&(t="https://github.com/"+t);var r=Oht(t),o=r.resource.split("."),a=null;switch(r.toString=function(L){return W8.stringify(this,L)},r.source=o.length>2?o.slice(1-o.length).join("."):r.source=r.resource,r.git_suffix=/\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),r.owner=decodeURIComponent(r.user),r.source){case"git.cloudforge.com":r.owner=r.user,r.organization=o[0],r.source="cloudforge.com";break;case"visualstudio.com":if(r.resource==="vs-ssh.visualstudio.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+"/"+a[3]);break}else{a=r.name.split("/"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name);break}case"dev.azure.com":case"azure.com":if(r.resource==="ssh.dev.azure.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split("/"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\/+/g,"")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,""));break}default:a=r.name.split("/");var n=a.length-1;if(a.length>=2){var u=a.indexOf("-",2),A=a.indexOf("blob",2),p=a.indexOf("tree",2),h=a.indexOf("commit",2),C=a.indexOf("src",2),w=a.indexOf("raw",2),v=a.indexOf("edit",2);n=u>0?u-1:A>0?A-1:p>0?p-1:h>0?h-1:C>0?C-1:w>0?w-1:v>0?v-1:n,r.owner=a.slice(0,n).join("/"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref="",r.filepathtype="",r.filepath="";var b=a.length>n&&a[n+1]==="-"?n+1:n;a.length>b+2&&["raw","src","blob","tree","edit"].indexOf(a[b+1])>=0&&(r.filepathtype=a[b+1],r.ref=a[b+2],a.length>b+3&&(r.filepath=a.slice(b+3).join("/"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+="/"),r.full_name+=r.name)),r.owner.startsWith("scm/")&&(r.source="bitbucket-server",r.owner=r.owner.replace("scm/",""),r.organization=r.owner,r.full_name=r.owner+"/"+r.name);var E=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,R=E.exec(r.pathname);return R!=null&&(r.source="bitbucket-server",R[1]==="users"?r.owner="~"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split("/"),a.length>1&&(["raw","browse"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join("/"))):a[1]==="commits"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+"/"+r.name,r.query.at?r.ref=r.query.at:r.ref=""),r}W8.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join("+"):t.protocol);var r=t.port?":"+t.port:"",o=t.user||"git",a=t.git_suffix?".git":"";switch(e){case"ssh":return r?"ssh://"+o+"@"+t.resource+r+"/"+t.full_name+a:o+"@"+t.resource+":"+t.full_name+a;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+o+"@"+t.resource+r+"/"+t.full_name+a;case"http":case"https":var n=t.token?Mht(t):t.user&&(t.protocols.includes("http")||t.protocols.includes("https"))?t.user+"@":"";return e+"://"+n+t.resource+r+"/"+Uht(t)+a;default:return t.href}};function Mht(t){switch(t.source){case"bitbucket.org":return"x-token-auth:"+t.token+"@";default:return t.token+"@"}}function Uht(t){switch(t.source){case"bitbucket-server":return"scm/"+t.full_name;default:return""+t.full_name}}jde.exports=W8});var ome=U((J9t,sme)=>{var Jht=Tx(),zht=YS(),Xht=Kl(),Zht=AE(),$ht=C_(),egt=sC(),tgt=S1();function rgt(t){return Xht(t)?Jht(t,egt):Zht(t)?[t]:zht($ht(tgt(t)))}sme.exports=rgt});function ogt(t,e){return e===1&&sgt.has(t[0])}function u2(t){let e=Array.isArray(t)?t:(0,cme.default)(t);return e.map((o,a)=>ngt.test(o)?`[${o}]`:igt.test(o)&&!ogt(e,a)?`.${o}`:`[${JSON.stringify(o)}]`).join("").replace(/^\./,"")}function agt(t,e){let r=[];if(e.methodName!==null&&r.push(ye.pretty(t,e.methodName,ye.Type.CODE)),e.file!==null){let o=[];o.push(ye.pretty(t,e.file,ye.Type.PATH)),e.line!==null&&(o.push(ye.pretty(t,e.line,ye.Type.NUMBER)),e.column!==null&&o.push(ye.pretty(t,e.line,ye.Type.NUMBER))),r.push(`(${o.join(ye.pretty(t,":","grey"))})`)}return r.join(" ")}function uQ(t,{manifestUpdates:e,reportedErrors:r},{fix:o}={}){var u;let a=new Map,n=new Map;for(let[A,p]of e){let h=((u=r.get(A))==null?void 0:u.map(b=>({text:b,fixable:!1})))??[],C=!1,w=t.getWorkspaceByCwd(A),v=w.manifest.exportTo({});for(let[b,E]of p){if(E.size>1){let R=[...E].map(([L,_])=>{let V=ye.pretty(t.configuration,L,ye.Type.INSPECT),re=_.size>0?agt(t.configuration,_.values().next().value):null;return re!==null?`
243${V} at ${re}`:`
244${V}`}).join("");h.push({text:`Conflict detected in constraint targeting ${ye.pretty(t.configuration,b,ye.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=E,L=(0,ame.default)(v,b);if(L===R)continue;if(!o){let _=typeof L>"u"?`Missing field ${ye.pretty(t.configuration,b,ye.Type.CODE)}; expected ${ye.pretty(t.configuration,R,ye.Type.INSPECT)}`:typeof R>"u"?`Extraneous field ${ye.pretty(t.configuration,b,ye.Type.CODE)} currently set to ${ye.pretty(t.configuration,L,ye.Type.INSPECT)}`:`Invalid field ${ye.pretty(t.configuration,b,ye.Type.CODE)}; expected ${ye.pretty(t.configuration,R,ye.Type.INSPECT)}, found ${ye.pretty(t.configuration,L,ye.Type.INSPECT)}`;h.push({text:_,fixable:!0});continue}typeof R>"u"?(0,ume.default)(v,b):(0,lme.default)(v,b,R),C=!0}C&&a.set(w,v)}h.length>0&&n.set(w,h)}return{changedWorkspaces:a,remainingErrors:n}}function Ame(t,{configuration:e}){let r={children:[]};for(let[o,a]of t){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${ye.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:ye.tuple(ye.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:ye.tuple(ye.Type.NO_HINT,h)}))})}let u={value:ye.tuple(ye.Type.LOCATOR,o.anchoredLocator),children:We.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=We.sortMap(r.children,o=>o.value[1]),r}var ame,lme,cme,ume,c2,ngt,igt,sgt,A2=dt(()=>{Ke();ame=tt(r2()),lme=tt(k8()),cme=tt(ome()),ume=tt(T8()),c2=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let o=Object.prototype.hasOwnProperty.call(e,r)?e[r]:void 0;if(typeof o>"u")continue;We.getArrayWithDefault(this.indexes[r],o).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.prototype.hasOwnProperty.call(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let C=new Set(h.get(A)??[]);if(C.size===0)return[];if(typeof a>"u")a=C;else for(let w of a)C.has(w)||a.delete(w);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.prototype.hasOwnProperty.call(u,A)&&u[A]===p:Object.prototype.hasOwnProperty.call(u,A)===!1))return!1;return!0})),n}},ngt=/^[0-9]+$/,igt=/^[a-zA-Z0-9_]+$/,sgt=new Set(["scripts",...Nt.allDependencies])});var fme=U((s5t,oH)=>{var lgt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("X")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("Xs")])]))],"maplist/3":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs")])]))],"maplist/4":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs")])]))],"maplist/5":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds")])]))],"maplist/6":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es")])]))],"maplist/7":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs")])]))],"maplist/8":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")]),new t.type.Term(".",[new t.type.Var("G"),new t.type.Var("Gs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F"),new t.type.Var("G")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs"),new t.type.Var("Gs")])]))],"include/3":[new t.type.Rule(new t.type.Term("include",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("include",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("A")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("A"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("F"),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("F")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("L"),new t.type.Var("S")])]),new t.type.Term("include",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("S")])])])])]))],"exclude/3":[new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("E")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("Q")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("R"),new t.type.Var("Q")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("!",[]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("E")])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("E")])])])])])])]))],"foldl/4":[new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Var("I"),new t.type.Var("I")]),null),new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("I"),new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("I"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])])])]),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P2"),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P2")]),new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("R")])])])])]))],"select/3":[new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Xs")]),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term("select",[new t.type.Var("E"),new t.type.Var("Xs"),new t.type.Var("Ys")]))],"sum_list/2":[new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term("[]",[]),new t.type.Num(0,!1)]),null),new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("sum_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("+",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"max_list/2":[new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("max_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"min_list/2":[new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("min_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("=<",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"prod_list/2":[new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term("[]",[]),new t.type.Num(1,!1)]),null),new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("prod_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("*",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"last/2":[new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")]),new t.type.Var("X")]),new t.type.Term("last",[new t.type.Var("Xs"),new t.type.Var("X")]))],"prefix/2":[new t.type.Rule(new t.type.Term("prefix",[new t.type.Var("Part"),new t.type.Var("Whole")]),new t.type.Term("append",[new t.type.Var("Part"),new t.type.Var("_"),new t.type.Var("Whole")]))],"nth0/3":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth1/3":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth0/4":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth1/4":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth/5":[new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("N"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("X"),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("O"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("Y"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term(",",[new t.type.Term("is",[new t.type.Var("M"),new t.type.Term("+",[new t.type.Var("N"),new t.type.Num(1,!1)])]),new t.type.Term("nth",[new t.type.Var("M"),new t.type.Var("O"),new t.type.Var("Xs"),new t.type.Var("Y"),new t.type.Var("Ys")])]))],"length/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(!t.type.is_variable(A)&&!t.type.is_integer(A))o.throw_error(t.error.type("integer",A,n.indicator));else if(t.type.is_integer(A)&&A.value<0)o.throw_error(t.error.domain("not_less_than_zero",A,n.indicator));else{var p=new t.type.Term("length",[u,new t.type.Num(0,!1),A]);t.type.is_integer(A)&&(p=new t.type.Term(",",[p,new t.type.Term("!",[])])),o.prepend([new t.type.State(a.goal.replace(p),a.substitution,a)])}},"length/3":[new t.type.Rule(new t.type.Term("length",[new t.type.Term("[]",[]),new t.type.Var("N"),new t.type.Var("N")]),null),new t.type.Rule(new t.type.Term("length",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("X")]),new t.type.Var("A"),new t.type.Var("N")]),new t.type.Term(",",[new t.type.Term("succ",[new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("length",[new t.type.Var("X"),new t.type.Var("B"),new t.type.Var("N")])]))],"replicate/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(t.type.is_variable(A))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_integer(A))o.throw_error(t.error.type("integer",A,n.indicator));else if(A.value<0)o.throw_error(t.error.domain("not_less_than_zero",A,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))o.throw_error(t.error.type("list",p,n.indicator));else{for(var h=new t.type.Term("[]"),C=0;C<A.value;C++)h=new t.type.Term(".",[u,h]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[h,p])),a.substitution,a)])}},"sort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(A)&&!t.type.is_fully_list(A))o.throw_error(t.error.type("list",A,n.indicator));else{for(var p=[],h=u;h.indicator==="./2";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))o.throw_error(t.error.type("list",u,n.indicator));else{for(var C=p.sort(t.compare),w=C.length-1;w>0;w--)C[w].equals(C[w-1])&&C.splice(w,1);for(var v=new t.type.Term("[]"),w=C.length-1;w>=0;w--)v=new t.type.Term(".",[C[w],v]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[v,A])),a.substitution,a)])}}},"msort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(A)&&!t.type.is_fully_list(A))o.throw_error(t.error.type("list",A,n.indicator));else{for(var p=[],h=u;h.indicator==="./2";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))o.throw_error(t.error.type("list",u,n.indicator));else{for(var C=p.sort(t.compare),w=new t.type.Term("[]"),v=C.length-1;v>=0;v--)w=new t.type.Term(".",[C[v],w]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[w,A])),a.substitution,a)])}}},"keysort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(A)&&!t.type.is_fully_list(A))o.throw_error(t.error.type("list",A,n.indicator));else{for(var p=[],h,C=u;C.indicator==="./2";){if(h=C.args[0],t.type.is_variable(h)){o.throw_error(t.error.instantiation(n.indicator));return}else if(!t.type.is_term(h)||h.indicator!=="-/2"){o.throw_error(t.error.type("pair",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),C=C.args[1]}if(t.type.is_variable(C))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(C))o.throw_error(t.error.type("list",u,n.indicator));else{for(var w=p.sort(t.compare),v=new t.type.Term("[]"),b=w.length-1;b>=0;b--)v=new t.type.Term(".",[new t.type.Term("-",[w[b],w[b].pair]),v]),delete w[b].pair;o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[v,A])),a.substitution,a)])}}},"take/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(t.type.is_variable(A)||t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(A))o.throw_error(t.error.type("list",A,n.indicator));else if(!t.type.is_integer(u))o.throw_error(t.error.type("integer",u,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))o.throw_error(t.error.type("list",p,n.indicator));else{for(var h=u.value,C=[],w=A;h>0&&w.indicator==="./2";)C.push(w.args[0]),w=w.args[1],h--;if(h===0){for(var v=new t.type.Term("[]"),h=C.length-1;h>=0;h--)v=new t.type.Term(".",[C[h],v]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[v,p])),a.substitution,a)])}}},"drop/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(t.type.is_variable(A)||t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(A))o.throw_error(t.error.type("list",A,n.indicator));else if(!t.type.is_integer(u))o.throw_error(t.error.type("integer",u,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))o.throw_error(t.error.type("list",p,n.indicator));else{for(var h=u.value,C=[],w=A;h>0&&w.indicator==="./2";)C.push(w.args[0]),w=w.args[1],h--;h===0&&o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[w,p])),a.substitution,a)])}},"reverse/2":function(o,a,n){var u=n.args[0],A=n.args[1],p=t.type.is_instantiated_list(u),h=t.type.is_instantiated_list(A);if(t.type.is_variable(u)&&t.type.is_variable(A))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(u)&&!t.type.is_fully_list(u))o.throw_error(t.error.type("list",u,n.indicator));else if(!t.type.is_variable(A)&&!t.type.is_fully_list(A))o.throw_error(t.error.type("list",A,n.indicator));else if(!p&&!h)o.throw_error(t.error.instantiation(n.indicator));else{for(var C=p?u:A,w=new t.type.Term("[]",[]);C.indicator==="./2";)w=new t.type.Term(".",[C.args[0],w]),C=C.args[1];o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[w,p?A:u])),a.substitution,a)])}},"list_to_set/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else{for(var p=u,h=[];p.indicator==="./2";)h.push(p.args[0]),p=p.args[1];if(t.type.is_variable(p))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_term(p)||p.indicator!=="[]/0")o.throw_error(t.error.type("list",u,n.indicator));else{for(var C=[],w=new t.type.Term("[]",[]),v,b=0;b<h.length;b++){v=!1;for(var E=0;E<C.length&&!v;E++)v=t.compare(h[b],C[E])===0;v||C.push(h[b])}for(b=C.length-1;b>=0;b--)w=new t.type.Term(".",[C[b],w]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[A,w])),a.substitution,a)])}}}}},r=["append/2","append/3","member/2","permutation/2","maplist/2","maplist/3","maplist/4","maplist/5","maplist/6","maplist/7","maplist/8","include/3","exclude/3","foldl/4","sum_list/2","max_list/2","min_list/2","prod_list/2","last/2","prefix/2","nth0/3","nth1/3","nth0/4","nth1/4","length/2","replicate/3","select/3","sort/2","msort/2","keysort/2","take/3","drop/3","reverse/2","list_to_set/2"];typeof oH<"u"?oH.exports=function(o){t=o,new t.type.Module("lists",e(),r)}:new t.type.Module("lists",e(),r)})(lgt)});var Pme=U(qr=>{"use strict";var rm=process.platform==="win32",aH="aes-256-cbc",cgt="sha256",gme="The current environment doesn't support interactive reading from TTY.",Un=Ie("fs"),pme=process.binding("tty_wrap").TTY,cH=Ie("child_process"),ah=Ie("path"),uH={prompt:"> ",hideEchoBack:!1,mask:"*",limit:[],limitMessage:"Input another, please.$<( [)limit(])>",defaultInput:"",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:"utf8",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},Xf="none",ru,mC,hme=!1,oh,fQ,lH,ugt=0,gH="",tm=[],pQ,dme=!1,AH=!1,f2=!1;function mme(t){function e(r){return r.replace(/[^\w\u0080-\uFFFF]/g,function(o){return"#"+o.charCodeAt(0)+";"})}return fQ.concat(function(r){var o=[];return Object.keys(r).forEach(function(a){r[a]==="boolean"?t[a]&&o.push("--"+a):r[a]==="string"&&t[a]&&o.push("--"+a,e(t[a]))}),o}({display:"string",displayOnly:"boolean",keyIn:"boolean",hideEchoBack:"boolean",mask:"string",limit:"string",caseSensitive:"boolean"}))}function Agt(t,e){function r(_){var V,re="",ae;for(lH=lH||Ie("os").tmpdir();;){V=ah.join(lH,_+re);try{ae=Un.openSync(V,"wx")}catch(he){if(he.code==="EEXIST"){re++;continue}else throw he}Un.closeSync(ae);break}return V}var o,a,n,u={},A,p,h=r("readline-sync.stdout"),C=r("readline-sync.stderr"),w=r("readline-sync.exit"),v=r("readline-sync.done"),b=Ie("crypto"),E,R,L;E=b.createHash(cgt),E.update(""+process.pid+ugt+++Math.random()),L=E.digest("hex"),R=b.createDecipher(aH,L),o=mme(t),rm?(a=process.env.ComSpec||"cmd.exe",process.env.Q='"',n=["/V:ON","/S","/C","(%Q%"+a+"%Q% /V:ON /S /C %Q%%Q%"+oh+"%Q%"+o.map(function(_){return" %Q%"+_+"%Q%"}).join("")+" & (echo !ERRORLEVEL!)>%Q%"+w+"%Q%%Q%) 2>%Q%"+C+"%Q% |%Q%"+process.execPath+"%Q% %Q%"+__dirname+"\\encrypt.js%Q% %Q%"+aH+"%Q% %Q%"+L+"%Q% >%Q%"+h+"%Q% & (echo 1)>%Q%"+v+"%Q%"]):(a="/bin/sh",n=["-c",'("'+oh+'"'+o.map(function(_){return" '"+_.replace(/'/g,"'\\''")+"'"}).join("")+'; echo $?>"'+w+'") 2>"'+C+'" |"'+process.execPath+'" "'+__dirname+'/encrypt.js" "'+aH+'" "'+L+'" >"'+h+'"; echo 1 >"'+v+'"']),f2&&f2("_execFileSync",o);try{cH.spawn(a,n,e)}catch(_){u.error=new Error(_.message),u.error.method="_execFileSync - spawn",u.error.program=a,u.error.args=n}for(;Un.readFileSync(v,{encoding:t.encoding}).trim()!=="1";);return(A=Un.readFileSync(w,{encoding:t.encoding}).trim())==="0"?u.input=R.update(Un.readFileSync(h,{encoding:"binary"}),"hex",t.encoding)+R.final(t.encoding):(p=Un.readFileSync(C,{encoding:t.encoding}).trim(),u.error=new Error(gme+(p?`
245`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Un.unlinkSync(h),Un.unlinkSync(C),Un.unlinkSync(w),Un.unlinkSync(v),u}function fgt(t){var e,r={},o,a={env:process.env,encoding:t.encoding};if(oh||(rm?process.env.PSModulePath?(oh="powershell.exe",fQ=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(oh="cscript.exe",fQ=["//nologo",__dirname+"\\read.cs.js"]):(oh="/bin/sh",fQ=[__dirname+"/read.sh"])),rm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),cH.execFileSync){e=mme(t),f2&&f2("execFileSync",e);try{r.input=cH.execFileSync(oh,e,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(gme+(o?`
246`+o:"")),r.error.method="execFileSync",r.error.program=oh,r.error.args=e,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=Agt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function fH(t){var e="",r=t.display,o=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=fgt(t);if(n.error)throw n.error;return n.input}return AH&&AH(t),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Xf=="string")if(Xf=null,rm){if(A=function(h){var C=h.replace(/^\D+/,"").split("."),w=0;return(C[0]=+C[0])&&(w+=C[0]*1e4),(C[1]=+C[1])&&(w+=C[1]*100),(C[2]=+C[2])&&(w+=C[2]),w}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Xf=process.stdin.fd,mC=process.stdin._handle;else try{Xf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),mC=new pme(Xf,!0)}catch{}if(process.stdout.isTTY)ru=process.stdout.fd;else{try{ru=Un.openSync("\\\\.\\CON","w")}catch{}if(typeof ru!="number")try{ru=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Xf=Un.openSync("/dev/tty","r"),mC=process.stdin._handle}catch{}}else try{Xf=Un.openSync("/dev/tty","r"),mC=new pme(Xf,!1)}catch{}if(process.stdout.isTTY)ru=process.stdout.fd;else try{ru=Un.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!t.hideEchoBack&&!t.keyIn,p,h,C,w,v;pQ="";function b(E){return E===hme?!0:mC.setRawMode(E)!==0?!1:(hme=E,!0)}if(dme||!mC||typeof ru!="number"&&(t.display||!A)){e=a();return}if(t.display&&(Un.writeSync(ru,t.display),t.display=""),!t.displayOnly){if(!b(!A)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(u=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){C=0;try{C=Un.readSync(Xf,p,0,h)}catch(E){if(E.code!=="EOF"){b(!1),e+=a();return}}if(C>0?(w=p.toString(t.encoding,0,C),pQ+=w):(w=`
247`,pQ+=String.fromCharCode(0)),w&&typeof(v=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=v,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&u&&(w=w.replace(u,"")),w&&(A||(t.hideEchoBack?t.mask&&Un.writeSync(ru,new Array(w.length+1).join(t.mask)):Un.writeSync(ru,w)),e+=w),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!A&&!o&&Un.writeSync(ru,`
248`),b(!1)}}(),t.print&&!o&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
249`),t.encoding),t.displayOnly?"":gH=t.keepWhitespace||t.keyIn?e:e.trim()}function pgt(t,e){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!e||e(a))&&r.push(a))}return o(t),r}function dH(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function Ps(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(uH),t.unshift(uH))),t.reduce(function(o,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var u;if(!!a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=pgt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function pH(t,e,r){return e.some(function(o){var a=typeof o;return a==="string"?r?t===o:t.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(t)===o:a==="function"?o(t):o instanceof RegExp?o.test(t):!1})}function mH(t,e){var r=ah.normalize(rm?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=ah.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+dH(r)+"(?=\\/|\\\\|$)",rm?"i":""),"~")}function yC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,C,w){var v;return A||typeof(v=e(C))!="string"?p:v?(h||"")+v+(w||""):""}return t.replace(o,n).replace(a,n)}function yme(t,e,r){var o,a=[],n=-1,u=0,A="",p;function h(C,w){return w.length>3?(C.push(w[0]+"..."+w[w.length-1]),p=!0):w.length&&(C=C.concat(w)),C}return o=t.reduce(function(C,w){return C.concat((w+"").split(""))},[]).reduce(function(C,w){var v,b;return e||(w=w.toLowerCase()),v=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&v===0?A+=w:(b=w.charCodeAt(0),v&&v===n&&b===u+1?a.push(w):(C=h(C,a),a=[w],n=v),u=b),C},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Eme(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function Cme(t,e){var r,o,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":o=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=yme(o,e.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Eme(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=gH;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=ah.basename(r):t==="cwdHome"&&(r=mH(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=tm[tm.length-n]||"")}return r}function Ime(t){var e=/^(.)-(.)$/.exec(t),r="",o,a,n,u;if(!e)return null;for(o=e[1].charCodeAt(0),a=e[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode(n);return r}function hH(t){var e=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,o="",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||"",r[1]&&(a.push(o),o=""),o+=n;return o&&a.push(o),a}function wme(t,e){return e.trueValue.length&&pH(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&pH(t,e.falseValue,e.caseSensitive)?!1:t}function Bme(t){var e,r,o,a,n,u,A;function p(C){return Cme(C,t)}function h(C){t.display+=(/[^\r\n]$/.test(t.display)?`
250`:"")+C}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=yC(t.display+"",p);;){if(e=fH(t),r=!1,o="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=tm[0]||"",a[1]?r=!0:e=n,h(n+`
251`),r||(t.displayOnly=!0,fH(t),t.displayOnly=!1)):e&&e!==tm[tm.length-1]&&(tm=[e])),!r&&t.cd&&e)switch(u=hH(e),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(mH(u[1],!0))}catch(C){h(C+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(A=t.preCheck(e,t),e=A.res,A.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||pH(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(o=yC(t.limitMessage,p))}h((o?o+`
252`:"")+yC(t.displaySrc+"",p))}return wme(e,t)}qr._DBG_set_useExt=function(t){dme=t};qr._DBG_set_checkOptions=function(t){AH=t};qr._DBG_set_checkMethod=function(t){f2=t};qr._DBG_clearHistory=function(){gH="",tm=[]};qr.setDefaultOptions=function(t){return uH=Ps(!0,t),Ps(!0)};qr.question=function(t,e){return Bme(Ps(Ps(!0,e),{display:t}))};qr.prompt=function(t){var e=Ps(!0,t);return e.display=e.prompt,Bme(e)};qr.keyIn=function(t,e){var r=Ps(Ps(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return yC(o+"",Ime)}),r.limit=dH(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=yC(r.display+"",function(o){return Cme(o,r)}),wme(fH(r),r)};qr.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),qr.question(t,Ps({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};qr.questionNewPassword=function(t,e){var r,o,a,n=Ps({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
253And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(b){return b==="charlist"?r.text:b==="length"?o+"..."+a:null}}),u,A,p,h,C,w,v;for(e=e||{},u=yC(e.charlist?e.charlist+"":"$<!-~>",Ime),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+dH(u)+"]{"+o+","+a+"}$"),r=yme([u],n.caseSensitive,!0),r.text=Eme(r.values,r.suppressed),A=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),C=n.limitMessage;!v;)n.limit=h,n.limitMessage=C,w=qr.question(t,n),n.limit=[w,""],n.limitMessage=p,v=qr.question(A,n);return w};function vme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return qr.question(t,Ps({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}qr.questionInt=function(t,e){return vme(t,e,function(r){return parseInt(r,10)})};qr.questionFloat=function(t,e){return vme(t,e,parseFloat)};qr.questionPath=function(t,e){var r,o="",a=Ps({hideEchoBack:!1,limitMessage:`$<error(
254)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var u,A,p;n=mH(n,!0),o="";function h(C){C.split(/\/|\\/).reduce(function(w,v){var b=ah.resolve(w+=v+ah.sep);if(!Un.existsSync(b))Un.mkdirSync(b);else if(!Un.statSync(b).isDirectory())throw new Error("Non directory already exists: "+b);return w},"")}try{if(u=Un.existsSync(n),r=u?Un.realpathSync(n):ah.resolve(n),!e.hasOwnProperty("exists")&&!u||typeof e.exists=="boolean"&&e.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&e.create&&(e.isDirectory?h(r):(h(ah.dirname(r)),Un.closeSync(Un.openSync(r,"w"))),r=Un.realpathSync(r)),u&&(e.min||e.max||e.isFile||e.isDirectory)){if(A=Un.statSync(r),e.isFile&&!A.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(e.min&&A.size<+e.min||e.max&&A.size>+e.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(C){return o=C+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),qr.question(t,a),r};function Dme(t,e){var r={},o={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(o[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=hH(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=hH(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}qr.promptCL=function(t,e){var r=Ps({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Dme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,qr.prompt(r),o.args};qr.promptLoop=function(t,e){for(var r=Ps({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(qr.prompt(r)););};qr.promptCLLoop=function(t,e){var r=Ps({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Dme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;qr.prompt(r),!o.hRes;);};qr.promptSimShell=function(t){return qr.prompt(Ps({hideEchoBack:!1,history:!0},t,{prompt:function(){return rm?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function Sme(t,e,r){var o;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=qr.keyIn(t,Ps(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}qr.keyInYN=function(t,e){return Sme(t,e)};qr.keyInYNStrict=function(t,e){return Sme(t,e,"yn")};qr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),qr.keyIn(t,Ps({limit:null},e,{hideEchoBack:!0,mask:""}))};qr.keyInSelect=function(t,e,r){var o=Ps({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},u=49,A=`
255`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var C=String.fromCharCode(u);a+=C,n[C]=h,A+="["+C+"] "+(p+"").trim()+`
256`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
257`),o.limit=a,A+=`
258`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=e),n[qr.keyIn(A,o).toLowerCase()]};qr.getRawInput=function(){return pQ};function p2(t,e){var r;return e.length&&(r={},r[t]=e[0]),qr.setDefaultOptions(r)[t]}qr.setPrint=function(){return p2("print",arguments)};qr.setPrompt=function(){return p2("prompt",arguments)};qr.setEncoding=function(){return p2("encoding",arguments)};qr.setMask=function(){return p2("mask",arguments)};qr.setBufferSize=function(){return p2("bufferSize",arguments)}});var yH=U((a5t,ml)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(I,P,y){var F=tau_file_system.files[I];if(!F){if(y==="read")return null;F={path:I,text:"",type:P,get:function(z,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+z)},put:function(z,X){return X==="end_of_file"?(this.text+=z,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,X){var $=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var ie=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(ie=ie/256>>>0,ie=(ie&255)<<8|z&255):(ie=ie&255,ie=(z&255)<<8|ie&255),this.text.length===$?this.text+=u(ie):this.text=this.text.substring(0,$)+u(ie)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[I]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(I,P){for(var y;tau_user_input.buffer.length<I;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,I),tau_user_input.buffer=tau_user_input.buffer.substr(I),y}},tau_user_output={put:function(I,P){return console.log(I),!0},flush:function(){return!0}},nodejs_file_system={open:function(I,P,y){var F=Ie("fs"),z=F.openSync(I,y[0]);return y==="read"&&!F.existsSync(I)?null:{get:function(X,$){var ie=new Buffer(X);return F.readSync(z,ie,0,X,$),ie.toString()},put:function(X,$){var ie=Buffer.from(X);if($==="end_of_file")F.writeSync(z,ie);else{if($==="past_end_of_file")return null;F.writeSync(z,ie,0,ie.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:"",get:function(I,P){for(var y,F=Pme();nodejs_user_input.buffer.length<I;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,I),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(I),y}},nodejs_user_output={put:function(I,P){return process.stdout.write(I),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(I,P){return I.indexOf(P)}:e=function(I,P){for(var y=I.length,F=0;F<y;F++)if(P===I[F])return F;return-1};var r=function(I,P){if(I.length!==0){for(var y=I[0],F=I.length,z=1;z<F;z++)y=P(y,I[z]);return y}},o;Array.prototype.map?o=function(I,P){return I.map(P)}:o=function(I,P){for(var y=[],F=I.length,z=0;z<F;z++)y.push(P(I[z]));return y};var a;Array.prototype.filter?a=function(I,P){return I.filter(P)}:a=function(I,P){for(var y=[],F=I.length,z=0;z<F;z++)P(I[z])&&y.push(I[z]);return y};var n;String.prototype.codePointAt?n=function(I,P){return I.codePointAt(P)}:n=function(I,P){return I.charCodeAt(P)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,C={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function w(I){var P=[],y=!1;return I.replace(h,function(F,z,X,$,ie,ke,Ne,st,ht,Ut,Xt,xt,tn,Dr,fr,Br,jr){switch(!0){case ht!==void 0:return P.push(parseInt(ht,16)),"";case Ut!==void 0:return P.push(parseInt(Ut,8)),"";case Xt!==void 0:case xt!==void 0:case tn!==void 0:case Dr!==void 0:case fr!==void 0:return P.push(n(F.substr(1),0)),"";case jr!==void 0:return P.push(n(jr,0)),"";case Br!==void 0:y=!0;default:return P.push(C[F]),""}}),y?null:P}function v(I,P){var y="";if(I.length<2)return I;try{I=I.replace(/\\([0-7]+)\\/g,function($,ie){return u(parseInt(ie,8))}),I=I.replace(/\\x([0-9a-fA-F]+)\\/g,function($,ie){return u(parseInt(ie,16))})}catch{return null}for(var F=0;F<I.length;F++){var z=I.charAt(F),X=I.charAt(F+1);if(z===P&&X===P)F++,y+=P;else if(z==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
259`,"\r"," ","\v"].indexOf(X)!==-1)switch(F+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
260`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=z}return y}function b(I){for(var P="",y=0;y<I.length;y++)switch(I.charAt(y)){case"'":P+="\\'";break;case"\\":P+="\\\\";break;case"\b":P+="\\b";break;case"\f":P+="\\f";break;case`
261`:P+="\\n";break;case"\r":P+="\\r";break;case" ":P+="\\t";break;case"\v":P+="\\v";break;default:P+=I.charAt(y);break}return P}function E(I){var P=I.substr(2);switch(I.substr(0,2).toLowerCase()){case"0x":return parseInt(P,16);case"0b":return parseInt(P,2);case"0o":return parseInt(P,8);case"0'":return w(P)[0];default:return parseFloat(I)}}var R={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function L(I,P){return I.get_flag("char_conversion").id==="on"?P.replace(/./g,function(y){return I.get_char_conversion(y)}):P}function _(I){this.thread=I,this.text="",this.tokens=[]}_.prototype.set_last_tokens=function(I){return this.tokens=I},_.prototype.new_text=function(I){this.text=I,this.tokens=[]},_.prototype.get_tokens=function(I){var P,y=0,F=0,z=0,X=[],$=!1;if(I){var ie=this.tokens[I-1];y=ie.len,P=L(this.thread,this.text.substr(ie.len)),F=ie.line,z=ie.start}else P=this.text;if(/^\s*$/.test(P))return null;for(;P!=="";){var ke=[],Ne=!1;if(/^\n/.exec(P)!==null){F++,z=0,y++,P=P.replace(/\n/,""),$=!0;continue}for(var st in R)if(R.hasOwnProperty(st)){var ht=R[st].exec(P);ht&&ke.push({value:ht[0],name:st,matches:ht})}if(!ke.length)return this.set_last_tokens([{value:P,matches:[],name:"lexical",line:F,start:z}]);var ie=r(ke,function(Dr,fr){return Dr.value.length>=fr.value.length?Dr:fr});switch(ie.start=z,ie.line=F,P=P.replace(ie.value,""),z+=ie.value.length,y+=ie.value.length,ie.name){case"atom":ie.raw=ie.value,ie.value.charAt(0)==="'"&&(ie.value=v(ie.value.substr(1,ie.value.length-2),"'"),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence"));break;case"number":ie.float=ie.value.substring(0,2)!=="0x"&&ie.value.match(/[.eE]/)!==null&&ie.value!=="0'.",ie.value=E(ie.value),ie.blank=Ne;break;case"string":var Ut=ie.value.charAt(0);ie.value=v(ie.value.substr(1,ie.value.length-2),Ut),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence");break;case"whitespace":var Xt=X[X.length-1];Xt&&(Xt.space=!0),Ne=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(ie=X.pop(),ie.name="atom",ie.value="{}",ie.raw="{}",ie.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(ie=X.pop(),ie.name="atom",ie.value="[]",ie.raw="[]",ie.space=!1);break}ie.len=y,X.push(ie),Ne=!1}var xt=this.set_last_tokens(X);return xt.length===0?null:xt};function V(I,P,y,F,z){if(!P[y])return{type:A,value:x.error.syntax(P[y-1],"expression expected",!0)};var X;if(F==="0"){var $=P[y];switch($.name){case"number":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var($.value)};case"string":var ie;switch(I.get_flag("double_quotes").id){case"atom":ie=new H($.value,[]);break;case"codes":ie=new H("[]",[]);for(var ke=$.value.length-1;ke>=0;ke--)ie=new H(".",[new x.type.Num(n($.value,ke),!1),ie]);break;case"chars":ie=new H("[]",[]);for(var ke=$.value.length-1;ke>=0;ke--)ie=new H(".",[new x.type.Term($.value.charAt(ke),[]),ie]);break}return{type:p,len:y+1,value:ie};case"l_paren":var xt=V(I,P,y+1,I.__get_max_priority(),!0);return xt.type!==p?xt:P[xt.len]&&P[xt.len].name==="r_paren"?(xt.len++,xt):{type:A,derived:!0,value:x.error.syntax(P[xt.len]?P[xt.len]:P[xt.len-1],") or operator expected",!P[xt.len])};case"l_bracket":var xt=V(I,P,y+1,I.__get_max_priority(),!0);return xt.type!==p?xt:P[xt.len]&&P[xt.len].name==="r_bracket"?(xt.len++,xt.value=new H("{}",[xt.value]),xt):{type:A,derived:!0,value:x.error.syntax(P[xt.len]?P[xt.len]:P[xt.len-1],"} or operator expected",!P[xt.len])}}var Ne=re(I,P,y,z);return Ne.type===p||Ne.derived||(Ne=ae(I,P,y),Ne.type===p||Ne.derived)?Ne:{type:A,derived:!1,value:x.error.syntax(P[y],"unexpected token")}}var st=I.__get_max_priority(),ht=I.__get_next_priority(F),Ut=y;if(P[y].name==="atom"&&P[y+1]&&(P[y].space||P[y+1].name!=="l_paren")){var $=P[y++],Xt=I.__lookup_operator_classes(F,$.value);if(Xt&&Xt.indexOf("fy")>-1){var xt=V(I,P,y,F,z);if(xt.type!==A)return $.value==="-"&&!$.space&&x.type.is_number(xt.value)?{value:new x.type.Num(-xt.value.value,xt.value.is_float),len:xt.len,type:p}:{value:new x.type.Term($.value,[xt.value]),len:xt.len,type:p};X=xt}else if(Xt&&Xt.indexOf("fx")>-1){var xt=V(I,P,y,ht,z);if(xt.type!==A)return{value:new x.type.Term($.value,[xt.value]),len:xt.len,type:p};X=xt}}y=Ut;var xt=V(I,P,y,ht,z);if(xt.type===p){y=xt.len;var $=P[y];if(P[y]&&(P[y].name==="atom"&&I.__lookup_operator_classes(F,$.value)||P[y].name==="bar"&&I.__lookup_operator_classes(F,"|"))){var tn=ht,Dr=F,Xt=I.__lookup_operator_classes(F,$.value);if(Xt.indexOf("xf")>-1)return{value:new x.type.Term($.value,[xt.value]),len:++xt.len,type:p};if(Xt.indexOf("xfx")>-1){var fr=V(I,P,y+1,tn,z);return fr.type===p?{value:new x.type.Term($.value,[xt.value,fr.value]),len:fr.len,type:p}:(fr.derived=!0,fr)}else if(Xt.indexOf("xfy")>-1){var fr=V(I,P,y+1,Dr,z);return fr.type===p?{value:new x.type.Term($.value,[xt.value,fr.value]),len:fr.len,type:p}:(fr.derived=!0,fr)}else if(xt.type!==A)for(;;){y=xt.len;var $=P[y];if($&&$.name==="atom"&&I.__lookup_operator_classes(F,$.value)){var Xt=I.__lookup_operator_classes(F,$.value);if(Xt.indexOf("yf")>-1)xt={value:new x.type.Term($.value,[xt.value]),len:++y,type:p};else if(Xt.indexOf("yfx")>-1){var fr=V(I,P,++y,tn,z);if(fr.type===A)return fr.derived=!0,fr;y=fr.len,xt={value:new x.type.Term($.value,[xt.value,fr.value]),len:y,type:p}}else break}else break}}else X={type:A,value:x.error.syntax(P[xt.len-1],"operator expected")};return xt}return xt}function re(I,P,y,F){if(!P[y]||P[y].name==="atom"&&P[y].raw==="."&&!F&&(P[y].space||!P[y+1]||P[y+1].name!=="l_paren"))return{type:A,derived:!1,value:x.error.syntax(P[y-1],"unfounded token")};var z=P[y],X=[];if(P[y].name==="atom"&&P[y].raw!==","){if(y++,P[y-1].space)return{type:p,len:y,value:new x.type.Term(z.value,X)};if(P[y]&&P[y].name==="l_paren"){if(P[y+1]&&P[y+1].name==="r_paren")return{type:A,derived:!0,value:x.error.syntax(P[y+1],"argument expected")};var $=V(I,P,++y,"999",!0);if($.type===A)return $.derived?$:{type:A,derived:!0,value:x.error.syntax(P[y]?P[y]:P[y-1],"argument expected",!P[y])};for(X.push($.value),y=$.len;P[y]&&P[y].name==="atom"&&P[y].value===",";){if($=V(I,P,y+1,"999",!0),$.type===A)return $.derived?$:{type:A,derived:!0,value:x.error.syntax(P[y+1]?P[y+1]:P[y],"argument expected",!P[y+1])};X.push($.value),y=$.len}if(P[y]&&P[y].name==="r_paren")y++;else return{type:A,derived:!0,value:x.error.syntax(P[y]?P[y]:P[y-1],", or ) expected",!P[y])}}return{type:p,len:y,value:new x.type.Term(z.value,X)}}return{type:A,derived:!1,value:x.error.syntax(P[y],"term expected")}}function ae(I,P,y){if(!P[y])return{type:A,derived:!1,value:x.error.syntax(P[y-1],"[ expected")};if(P[y]&&P[y].name==="l_brace"){var F=V(I,P,++y,"999",!0),z=[F.value],X=void 0;if(F.type===A)return P[y]&&P[y].name==="r_brace"?{type:p,len:y+1,value:new x.type.Term("[]",[])}:{type:A,derived:!0,value:x.error.syntax(P[y],"] expected")};for(y=F.len;P[y]&&P[y].name==="atom"&&P[y].value===",";){if(F=V(I,P,y+1,"999",!0),F.type===A)return F.derived?F:{type:A,derived:!0,value:x.error.syntax(P[y+1]?P[y+1]:P[y],"argument expected",!P[y+1])};z.push(F.value),y=F.len}var $=!1;if(P[y]&&P[y].name==="bar"){if($=!0,F=V(I,P,y+1,"999",!0),F.type===A)return F.derived?F:{type:A,derived:!0,value:x.error.syntax(P[y+1]?P[y+1]:P[y],"argument expected",!P[y+1])};X=F.value,y=F.len}return P[y]&&P[y].name==="r_brace"?{type:p,len:y+1,value:g(z,X)}:{type:A,derived:!0,value:x.error.syntax(P[y]?P[y]:P[y-1],$?"] expected":", or | or ] expected",!P[y])}}return{type:A,derived:!1,value:x.error.syntax(P[y],"list expected")}}function he(I,P,y){var F=P[y].line,z=V(I,P,y,I.__get_max_priority(),!1),X=null,$;if(z.type!==A)if(y=z.len,P[y]&&P[y].name==="atom"&&P[y].raw===".")if(y++,x.type.is_term(z.value)){if(z.value.indicator===":-/2"?(X=new x.type.Rule(z.value.args[0],Pe(z.value.args[1])),$={value:X,len:y,type:p}):z.value.indicator==="-->/2"?(X=ge(new x.type.Rule(z.value.args[0],z.value.args[1]),I),X.body=Pe(X.body),$={value:X,len:y,type:x.type.is_rule(X)?p:A}):(X=new x.type.Rule(z.value,null),$={value:X,len:y,type:p}),X){var ie=X.singleton_variables();ie.length>0&&I.throw_warning(x.warning.singleton(ie,X.head.indicator,F))}return $}else return{type:A,value:x.error.syntax(P[y],"callable expected")};else return{type:A,value:x.error.syntax(P[y]?P[y]:P[y-1],". or operator expected")};return z}function pe(I,P,y){y=y||{},y.from=y.from?y.from:"$tau-js",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new _(I),z={},X;F.new_text(P);var $=0,ie=F.get_tokens($);do{if(ie===null||!ie[$])break;var ke=he(I,ie,$);if(ke.type===A)return new H("throw",[ke.value]);if(ke.value.body===null&&ke.value.head.indicator==="?-/1"){var Ne=new At(I.session);Ne.add_goal(ke.value.head.args[0]),Ne.answer(function(ht){x.type.is_error(ht)?I.throw_warning(ht.args[0]):(ht===!1||ht===null)&&I.throw_warning(x.warning.failed_goal(ke.value.head.args[0],ke.len))}),$=ke.len;var st=!0}else if(ke.value.body===null&&ke.value.head.indicator===":-/1"){var st=I.run_directive(ke.value.head.args[0]);$=ke.len,ke.value.head.args[0].indicator==="char_conversion/2"&&(ie=F.get_tokens($),$=0)}else{X=ke.value.head.indicator,y.reconsult!==!1&&z[X]!==!0&&!I.is_multifile_predicate(X)&&(I.session.rules[X]=a(I.session.rules[X]||[],function(Ut){return Ut.dynamic}),z[X]=!0);var st=I.add_rule(ke.value,y);$=ke.len}if(!st)return st}while(!0);return!0}function De(I,P){var y=new _(I);y.new_text(P);var F=0;do{var z=y.get_tokens(F);if(z===null)break;var X=V(I,z,0,I.__get_max_priority(),!1);if(X.type!==A){var $=X.len,ie=$;if(z[$]&&z[$].name==="atom"&&z[$].raw===".")I.add_goal(Pe(X.value));else{var ke=z[$];return new H("throw",[x.error.syntax(ke||z[$-1],". or operator expected",!ke)])}F=X.len+1}else return new H("throw",[X.value])}while(!0);return!0}function ge(I,P){I=I.rename(P);var y=P.next_free_variable(),F=le(I.body,y,P);return F.error?F.value:(I.body=F.value,I.head.args=I.head.args.concat([y,F.variable]),I.head=new H(I.head.id,I.head.args),I)}function le(I,P,y){var F;if(x.type.is_term(I)&&I.indicator==="!/0")return{value:I,variable:P,error:!1};if(x.type.is_term(I)&&I.indicator===",/2"){var z=le(I.args[0],P,y);if(z.error)return z;var X=le(I.args[1],z.variable,y);return X.error?X:{value:new H(",",[z.value,X.value]),variable:X.variable,error:!1}}else{if(x.type.is_term(I)&&I.indicator==="{}/1")return{value:I.args[0],variable:P,error:!1};if(x.type.is_empty_list(I))return{value:new H("true",[]),variable:P,error:!1};if(x.type.is_list(I)){F=y.next_free_variable();for(var $=I,ie;$.indicator==="./2";)ie=$,$=$.args[1];return x.type.is_variable($)?{value:x.error.instantiation("DCG"),variable:P,error:!0}:x.type.is_empty_list($)?(ie.args[1]=F,{value:new H("=",[P,I]),variable:F,error:!1}):{value:x.error.type("list",I,"DCG"),variable:P,error:!0}}else return x.type.is_callable(I)?(F=y.next_free_variable(),I.args=I.args.concat([P,F]),I=new H(I.id,I.args),{value:I,variable:F,error:!1}):{value:x.error.type("callable",I,"DCG"),variable:P,error:!0}}}function Pe(I){return x.type.is_variable(I)?new H("call",[I]):x.type.is_term(I)&&[",/2",";/2","->/2"].indexOf(I.indicator)!==-1?new H(I.id,[Pe(I.args[0]),Pe(I.args[1])]):I}function g(I,P){for(var y=P||new x.type.Term("[]",[]),F=I.length-1;F>=0;F--)y=new x.type.Term(".",[I[F],y]);return y}function ve(I,P){for(var y=I.length-1;y>=0;y--)I[y]===P&&I.splice(y,1)}function Ee(I){for(var P={},y=[],F=0;F<I.length;F++)I[F]in P||(y.push(I[F]),P[I[F]]=!0);return y}function de(I,P,y,F){if(I.session.rules[y]!==null){for(var z=0;z<I.session.rules[y].length;z++)if(I.session.rules[y][z]===F){I.session.rules[y].splice(z,1),I.success(P);break}}}function ne(I){return function(P,y,F){var z=F.args[0],X=F.args.slice(1,I);if(x.type.is_variable(z))P.throw_error(x.error.instantiation(P.level));else if(!x.type.is_callable(z))P.throw_error(x.error.type("callable",z,P.level));else{var $=new H(z.id,z.args.concat(X));P.prepend([new Qe(y.goal.replace($),y.substitution,y)])}}}function Z(I){for(var P=I.length-1;P>=0;P--)if(I.charAt(P)==="/")return new H("/",[new H(I.substring(0,P)),new be(parseInt(I.substring(P+1)),!1)])}function me(I){this.id=I}function be(I,P){this.is_float=P!==void 0?P:parseInt(I)!==I,this.value=this.is_float?I:parseInt(I)}var ut=0;function H(I,P,y){this.ref=y||++ut,this.id=I,this.args=P||[],this.indicator=I+"/"+this.args.length}var yt=0;function Me(I,P,y,F,z,X){this.id=yt++,this.stream=I,this.mode=P,this.alias=y,this.type=F!==void 0?F:"text",this.reposition=z!==void 0?z:!0,this.eof_action=X!==void 0?X:"eof_code",this.position=this.mode==="append"?"end_of_stream":0,this.output=this.mode==="write"||this.mode==="append",this.input=this.mode==="read"}function Te(I){I=I||{},this.links=I}function Qe(I,P,y){P=P||new Te,y=y||null,this.goal=I,this.substitution=P,this.parent=y}function _e(I,P,y){this.head=I,this.body=P,this.dynamic=y||!1}function qe(I){I=I===void 0||I<=0?1e3:I,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new At(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=I,this.streams={user_input:new Me(typeof ml<"u"&&ml.exports?nodejs_user_input:tau_user_input,"read","user_input","text",!1,"reset"),user_output:new Me(typeof ml<"u"&&ml.exports?nodejs_user_output:tau_user_output,"write","user_output","text",!1,"eof_code")},this.file_system=typeof ml<"u"&&ml.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(P){return P.substitution},this.format_error=function(P){return P.goal},this.flag={bounded:x.flag.bounded.value,max_integer:x.flag.max_integer.value,min_integer:x.flag.min_integer.value,integer_rounding_function:x.flag.integer_rounding_function.value,char_conversion:x.flag.char_conversion.value,debug:x.flag.debug.value,max_arity:x.flag.max_arity.value,unknown:x.flag.unknown.value,double_quotes:x.flag.double_quotes.value,occurs_check:x.flag.occurs_check.value,dialect:x.flag.dialect.value,version_data:x.flag.version_data.value,nodejs:x.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{":-":["fx","xfx"],"-->":["xfx"],"?-":["fx"]},1100:{";":["xfy"]},1050:{"->":["xfy"]},1e3:{",":["xfy"]},900:{"\\+":["fy"]},700:{"=":["xfx"],"\\=":["xfx"],"==":["xfx"],"\\==":["xfx"],"@<":["xfx"],"@=<":["xfx"],"@>":["xfx"],"@>=":["xfx"],"=..":["xfx"],is:["xfx"],"=:=":["xfx"],"=\\=":["xfx"],"<":["xfx"],"=<":["xfx"],">":["xfx"],">=":["xfx"]},600:{":":["xfy"]},500:{"+":["yfx"],"-":["yfx"],"/\\":["yfx"],"\\/":["yfx"]},400:{"*":["yfx"],"/":["yfx"],"//":["yfx"],rem:["yfx"],mod:["yfx"],"<<":["yfx"],">>":["yfx"]},200:{"**":["xfx"],"^":["xfy"],"-":["fy"],"+":["fy"],"\\":["fy"]}}}function At(I){this.epoch=Date.now(),this.session=I,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level="top_level/0",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function Oe(I,P,y){this.id=I,this.rules=P,this.exports=y,x.module[I]=this}Oe.prototype.exports_predicate=function(I){return this.exports.indexOf(I)!==-1},me.prototype.unify=function(I,P){if(P&&e(I.variables(),this.id)!==-1&&!x.type.is_variable(I))return null;var y={};return y[this.id]=I,new Te(y)},be.prototype.unify=function(I,P){return x.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float?new Te:null},H.prototype.unify=function(I,P){if(x.type.is_term(I)&&this.indicator===I.indicator){for(var y=new Te,F=0;F<this.args.length;F++){var z=x.unify(this.args[F].apply(y),I.args[F].apply(y),P);if(z===null)return null;for(var X in z.links)y.links[X]=z.links[X];y=y.apply(z)}return y}return null},Me.prototype.unify=function(I,P){return x.type.is_stream(I)&&this.id===I.id?new Te:null},me.prototype.toString=function(I){return this.id},be.prototype.toString=function(I){return this.is_float&&e(this.value.toString(),".")===-1?this.value+".0":this.value.toString()},H.prototype.toString=function(I,P,y){if(I=I||{},I.quoted=I.quoted===void 0?!0:I.quoted,I.ignore_ops=I.ignore_ops===void 0?!1:I.ignore_ops,I.numbervars=I.numbervars===void 0?!1:I.numbervars,P=P===void 0?1200:P,y=y===void 0?"":y,I.numbervars&&this.indicator==="$VAR/1"&&x.type.is_integer(this.args[0])&&this.args[0].value>=0){var F=this.args[0].value,z=Math.floor(F/26),X=F%26;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[X]+(z!==0?z:"")}switch(this.indicator){case"[]/0":case"{}/0":case"!/0":return this.id;case"{}/1":return"{"+this.args[0].toString(I)+"}";case"./2":for(var $="["+this.args[0].toString(I),ie=this.args[1];ie.indicator==="./2";)$+=", "+ie.args[0].toString(I),ie=ie.args[1];return ie.indicator!=="[]/0"&&($+="|"+ie.toString(I)),$+="]",$;case",/2":return"("+this.args[0].toString(I)+", "+this.args[1].toString(I)+")";default:var ke=this.id,Ne=I.session?I.session.lookup_operator(this.id,this.args.length):null;if(I.session===void 0||I.ignore_ops||Ne===null)return I.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(ke)&&ke!=="{}"&&ke!=="[]"&&(ke="'"+b(ke)+"'"),ke+(this.args.length?"("+o(this.args,function(Xt){return Xt.toString(I)}).join(", ")+")":"");var st=Ne.priority>P.priority||Ne.priority===P.priority&&(Ne.class==="xfy"&&this.indicator!==P.indicator||Ne.class==="yfx"&&this.indicator!==P.indicator||this.indicator===P.indicator&&Ne.class==="yfx"&&y==="right"||this.indicator===P.indicator&&Ne.class==="xfy"&&y==="left");Ne.indicator=this.indicator;var ht=st?"(":"",Ut=st?")":"";return this.args.length===0?"("+this.id+")":["fy","fx"].indexOf(Ne.class)!==-1?ht+ke+" "+this.args[0].toString(I,Ne)+Ut:["yf","xf"].indexOf(Ne.class)!==-1?ht+this.args[0].toString(I,Ne)+" "+ke+Ut:ht+this.args[0].toString(I,Ne,"left")+" "+this.id+" "+this.args[1].toString(I,Ne,"right")+Ut}},Me.prototype.toString=function(I){return"<stream>("+this.id+")"},Te.prototype.toString=function(I){var P="{";for(var y in this.links)!this.links.hasOwnProperty(y)||(P!=="{"&&(P+=", "),P+=y+"/"+this.links[y].toString(I));return P+="}",P},Qe.prototype.toString=function(I){return this.goal===null?"<"+this.substitution.toString(I)+">":"<"+this.goal.toString(I)+", "+this.substitution.toString(I)+">"},_e.prototype.toString=function(I){return this.body?this.head.toString(I)+" :- "+this.body.toString(I)+".":this.head.toString(I)+"."},qe.prototype.toString=function(I){for(var P="",y=0;y<this.modules.length;y++)P+=":- use_module(library("+this.modules[y]+`)).
262`;P+=`
263`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)P+=this.rules[key][y].toString(I),P+=`
264`;return P},me.prototype.clone=function(){return new me(this.id)},be.prototype.clone=function(){return new be(this.value,this.is_float)},H.prototype.clone=function(){return new H(this.id,o(this.args,function(I){return I.clone()}))},Me.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Te.prototype.clone=function(){var I={};for(var P in this.links)!this.links.hasOwnProperty(P)||(I[P]=this.links[P].clone());return new Te(I)},Qe.prototype.clone=function(){return new Qe(this.goal.clone(),this.substitution.clone(),this.parent)},_e.prototype.clone=function(){return new _e(this.head.clone(),this.body!==null?this.body.clone():null)},me.prototype.equals=function(I){return x.type.is_variable(I)&&this.id===I.id},be.prototype.equals=function(I){return x.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float},H.prototype.equals=function(I){if(!x.type.is_term(I)||this.indicator!==I.indicator)return!1;for(var P=0;P<this.args.length;P++)if(!this.args[P].equals(I.args[P]))return!1;return!0},Me.prototype.equals=function(I){return x.type.is_stream(I)&&this.id===I.id},Te.prototype.equals=function(I){var P;if(!x.type.is_substitution(I))return!1;for(P in this.links)if(!!this.links.hasOwnProperty(P)&&(!I.links[P]||!this.links[P].equals(I.links[P])))return!1;for(P in I.links)if(!!I.links.hasOwnProperty(P)&&!this.links[P])return!1;return!0},Qe.prototype.equals=function(I){return x.type.is_state(I)&&this.goal.equals(I.goal)&&this.substitution.equals(I.substitution)&&this.parent===I.parent},_e.prototype.equals=function(I){return x.type.is_rule(I)&&this.head.equals(I.head)&&(this.body===null&&I.body===null||this.body!==null&&this.body.equals(I.body))},me.prototype.rename=function(I){return I.get_free_variable(this)},be.prototype.rename=function(I){return this},H.prototype.rename=function(I){return new H(this.id,o(this.args,function(P){return P.rename(I)}))},Me.prototype.rename=function(I){return this},_e.prototype.rename=function(I){return new _e(this.head.rename(I),this.body!==null?this.body.rename(I):null)},me.prototype.variables=function(){return[this.id]},be.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(I){return I.variables()}))},Me.prototype.variables=function(){return[]},_e.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},me.prototype.apply=function(I){return I.lookup(this.id)?I.lookup(this.id):this},be.prototype.apply=function(I){return this},H.prototype.apply=function(I){if(this.indicator==="./2"){for(var P=[],y=this;y.indicator==="./2";)P.push(y.args[0].apply(I)),y=y.args[1];for(var F=y.apply(I),z=P.length-1;z>=0;z--)F=new H(".",[P[z],F]);return F}return new H(this.id,o(this.args,function(X){return X.apply(I)}),this.ref)},Me.prototype.apply=function(I){return this},_e.prototype.apply=function(I){return new _e(this.head.apply(I),this.body!==null?this.body.apply(I):null)},Te.prototype.apply=function(I){var P,y={};for(P in this.links)!this.links.hasOwnProperty(P)||(y[P]=this.links[P].apply(I));return new Te(y)},H.prototype.select=function(){for(var I=this;I.indicator===",/2";)I=I.args[0];return I},H.prototype.replace=function(I){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(I),this.args[1]]):I===null?this.args[1]:new H(",",[I,this.args[1]]):I},H.prototype.search=function(I){if(x.type.is_term(I)&&I.ref!==void 0&&this.ref===I.ref)return!0;for(var P=0;P<this.args.length;P++)if(x.type.is_term(this.args[P])&&this.args[P].search(I))return!0;return!1},qe.prototype.get_current_input=function(){return this.current_input},At.prototype.get_current_input=function(){return this.session.get_current_input()},qe.prototype.get_current_output=function(){return this.current_output},At.prototype.get_current_output=function(){return this.session.get_current_output()},qe.prototype.set_current_input=function(I){this.current_input=I},At.prototype.set_current_input=function(I){return this.session.set_current_input(I)},qe.prototype.set_current_output=function(I){this.current_input=I},At.prototype.set_current_output=function(I){return this.session.set_current_output(I)},qe.prototype.get_stream_by_alias=function(I){return this.streams[I]},At.prototype.get_stream_by_alias=function(I){return this.session.get_stream_by_alias(I)},qe.prototype.file_system_open=function(I,P,y){return this.file_system.open(I,P,y)},At.prototype.file_system_open=function(I,P,y){return this.session.file_system_open(I,P,y)},qe.prototype.get_char_conversion=function(I){return this.__char_conversion[I]||I},At.prototype.get_char_conversion=function(I){return this.session.get_char_conversion(I)},qe.prototype.parse=function(I){return this.thread.parse(I)},At.prototype.parse=function(I){var P=new _(this);P.new_text(I);var y=P.get_tokens();if(y===null)return!1;var F=V(this,y,0,this.__get_max_priority(),!1);return F.len!==y.length?!1:{value:F.value,expr:F,tokens:y}},qe.prototype.get_flag=function(I){return this.flag[I]},At.prototype.get_flag=function(I){return this.session.get_flag(I)},qe.prototype.add_rule=function(I,P){return P=P||{},P.from=P.from?P.from:"$tau-js",this.src_predicates[I.head.indicator]=P.from,this.rules[I.head.indicator]||(this.rules[I.head.indicator]=[]),this.rules[I.head.indicator].push(I),this.public_predicates.hasOwnProperty(I.head.indicator)||(this.public_predicates[I.head.indicator]=!1),!0},At.prototype.add_rule=function(I,P){return this.session.add_rule(I,P)},qe.prototype.run_directive=function(I){this.thread.run_directive(I)},At.prototype.run_directive=function(I){return x.type.is_directive(I)?(x.directive[I.indicator](this,I),!0):!1},qe.prototype.__get_max_priority=function(){return"1200"},At.prototype.__get_max_priority=function(){return this.session.__get_max_priority()},qe.prototype.__get_next_priority=function(I){var P=0;I=parseInt(I);for(var y in this.__operators)if(!!this.__operators.hasOwnProperty(y)){var F=parseInt(y);F>P&&F<I&&(P=F)}return P.toString()},At.prototype.__get_next_priority=function(I){return this.session.__get_next_priority(I)},qe.prototype.__lookup_operator_classes=function(I,P){return this.__operators.hasOwnProperty(I)&&this.__operators[I][P]instanceof Array&&this.__operators[I][P]||!1},At.prototype.__lookup_operator_classes=function(I,P){return this.session.__lookup_operator_classes(I,P)},qe.prototype.lookup_operator=function(I,P){for(var y in this.__operators)if(this.__operators[y][I]){for(var F=0;F<this.__operators[y][I].length;F++)if(P===0||this.__operators[y][I][F].length===P+1)return{priority:y,class:this.__operators[y][I][F]}}return null},At.prototype.lookup_operator=function(I,P){return this.session.lookup_operator(I,P)},qe.prototype.throw_warning=function(I){this.thread.throw_warning(I)},At.prototype.throw_warning=function(I){this.warnings.push(I)},qe.prototype.get_warnings=function(){return this.thread.get_warnings()},At.prototype.get_warnings=function(){return this.warnings},qe.prototype.add_goal=function(I,P){this.thread.add_goal(I,P)},At.prototype.add_goal=function(I,P,y){y=y||null,P===!0&&(this.points=[]);for(var F=I.variables(),z={},X=0;X<F.length;X++)z[F[X]]=new me(F[X]);this.points.push(new Qe(I,new Te(z),y))},qe.prototype.consult=function(I,P){return this.thread.consult(I,P)},At.prototype.consult=function(I,P){var y="";if(typeof I=="string"){y=I;var F=y.length;if(y.substring(F-3,F)===".pl"&&document.getElementById(y)){var z=document.getElementById(y),X=z.getAttribute("type");X!==null&&X.replace(/ /g,"").toLowerCase()==="text/prolog"&&(y=z.text)}}else if(I.nodeName)switch(I.nodeName.toLowerCase()){case"input":case"textarea":y=I.value;break;default:y=I.innerHTML;break}else return!1;return this.warnings=[],pe(this,y,P)},qe.prototype.query=function(I){return this.thread.query(I)},At.prototype.query=function(I){return this.points=[],this.debugger_points=[],De(this,I)},qe.prototype.head_point=function(){return this.thread.head_point()},At.prototype.head_point=function(){return this.points[this.points.length-1]},qe.prototype.get_free_variable=function(I){return this.thread.get_free_variable(I)},At.prototype.get_free_variable=function(I){var P=[];if(I.id==="_"||this.session.renamed_variables[I.id]===void 0){for(this.session.rename++,this.points.length>0&&(P=this.head_point().substitution.domain());e(P,x.format_variable(this.session.rename))!==-1;)this.session.rename++;if(I.id==="_")return new me(x.format_variable(this.session.rename));this.session.renamed_variables[I.id]=x.format_variable(this.session.rename)}return new me(this.session.renamed_variables[I.id])},qe.prototype.next_free_variable=function(){return this.thread.next_free_variable()},At.prototype.next_free_variable=function(){this.session.rename++;var I=[];for(this.points.length>0&&(I=this.head_point().substitution.domain());e(I,x.format_variable(this.session.rename))!==-1;)this.session.rename++;return new me(x.format_variable(this.session.rename))},qe.prototype.is_public_predicate=function(I){return!this.public_predicates.hasOwnProperty(I)||this.public_predicates[I]===!0},At.prototype.is_public_predicate=function(I){return this.session.is_public_predicate(I)},qe.prototype.is_multifile_predicate=function(I){return this.multifile_predicates.hasOwnProperty(I)&&this.multifile_predicates[I]===!0},At.prototype.is_multifile_predicate=function(I){return this.session.is_multifile_predicate(I)},qe.prototype.prepend=function(I){return this.thread.prepend(I)},At.prototype.prepend=function(I){for(var P=I.length-1;P>=0;P--)this.points.push(I[P])},qe.prototype.success=function(I,P){return this.thread.success(I,P)},At.prototype.success=function(I,y){var y=typeof y>"u"?I:y;this.prepend([new Qe(I.goal.replace(null),I.substitution,y)])},qe.prototype.throw_error=function(I){return this.thread.throw_error(I)},At.prototype.throw_error=function(I){this.prepend([new Qe(new H("throw",[I]),new Te,null,null)])},qe.prototype.step_rule=function(I,P){return this.thread.step_rule(I,P)},At.prototype.step_rule=function(I,P){var y=P.indicator;if(I==="user"&&(I=null),I===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=I===null?this.session.modules:e(this.session.modules,I)===-1?[]:[I],z=0;z<F.length;z++){var X=x.module[F[z]];if(X.rules.hasOwnProperty(y)&&(X.rules.hasOwnProperty(this.level)||X.exports_predicate(y)))return x.module[F[z]].rules[y]}return null},qe.prototype.step=function(){return this.thread.step()},At.prototype.step=function(){if(this.points.length!==0){var I=!1,P=this.points.pop();if(this.debugger&&this.debugger_states.push(P),x.type.is_term(P.goal)){var y=P.goal.select(),F=null,z=[];if(y!==null){this.total_steps++;for(var X=P;X.parent!==null&&X.parent.goal.search(y);)X=X.parent;if(this.level=X.parent===null?"top_level/0":X.parent.goal.select().indicator,x.type.is_term(y)&&y.indicator===":/2"&&(F=y.args[0].id,y=y.args[1]),F===null&&x.type.is_builtin(y))this.__call_indicator=y.indicator,I=x.predicate[y.indicator](this,P,y);else{var $=this.step_rule(F,y);if($===null)this.session.rules.hasOwnProperty(y.indicator)||(this.get_flag("unknown").id==="error"?this.throw_error(x.error.existence("procedure",y.indicator,this.level)):this.get_flag("unknown").id==="warning"&&this.throw_warning("unknown procedure "+y.indicator+" (from "+this.level+")"));else if($ instanceof Function)I=$(this,P,y);else{for(var ie in $)if(!!$.hasOwnProperty(ie)){var ke=$[ie];this.session.renamed_variables={},ke=ke.rename(this);var Ne=this.get_flag("occurs_check").indicator==="true/0",st=new Qe,ht=x.unify(y,ke.head,Ne);ht!==null&&(st.goal=P.goal.replace(ke.body),st.goal!==null&&(st.goal=st.goal.apply(ht)),st.substitution=P.substitution.apply(ht),st.parent=P,z.push(st))}this.prepend(z)}}}}else x.type.is_variable(P.goal)?this.throw_error(x.error.instantiation(this.level)):this.throw_error(x.error.type("callable",P.goal,this.level));return I}},qe.prototype.answer=function(I){return this.thread.answer(I)},At.prototype.answer=function(I){I=I||function(P){},this.__calls.push(I),!(this.__calls.length>1)&&this.again()},qe.prototype.answers=function(I,P,y){return this.thread.answers(I,P,y)},At.prototype.answers=function(I,P,y){var F=P||1e3,z=this;if(P<=0){y&&y();return}this.answer(function(X){I(X),X!==!1?setTimeout(function(){z.answers(I,P-1,y)},1):y&&y()})},qe.prototype.again=function(I){return this.thread.again(I)},At.prototype.again=function(I){for(var P,y=Date.now();this.__calls.length>0;){for(this.warnings=[],I!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!x.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var z=this.__calls.shift();this.current_limit<=0?z(null):this.points.length===0?z(!1):x.type.is_error(this.head_point().goal)?(P=this.session.format_error(this.points.pop()),this.points=[],z(P)):(this.debugger&&this.debugger_states.push(this.head_point()),P=this.session.format_success(this.points.pop()),z(P))}},qe.prototype.unfold=function(I){if(I.body===null)return!1;var P=I.head,y=I.body,F=y.select(),z=new At(this),X=[];z.add_goal(F),z.step();for(var $=z.points.length-1;$>=0;$--){var ie=z.points[$],ke=P.apply(ie.substitution),Ne=y.replace(ie.goal);Ne!==null&&(Ne=Ne.apply(ie.substitution)),X.push(new _e(ke,Ne))}var st=this.rules[P.indicator],ht=e(st,I);return X.length>0&&ht!==-1?(st.splice.apply(st,[ht,1].concat(X)),!0):!1},At.prototype.unfold=function(I){return this.session.unfold(I)},me.prototype.interpret=function(I){return x.error.instantiation(I.level)},be.prototype.interpret=function(I){return this},H.prototype.interpret=function(I){return x.type.is_unitary_list(this)?this.args[0].interpret(I):x.operate(I,this)},me.prototype.compare=function(I){return this.id<I.id?-1:this.id>I.id?1:0},be.prototype.compare=function(I){if(this.value===I.value&&this.is_float===I.is_float)return 0;if(this.value<I.value||this.value===I.value&&this.is_float&&!I.is_float)return-1;if(this.value>I.value)return 1},H.prototype.compare=function(I){if(this.args.length<I.args.length||this.args.length===I.args.length&&this.id<I.id)return-1;if(this.args.length>I.args.length||this.args.length===I.args.length&&this.id>I.id)return 1;for(var P=0;P<this.args.length;P++){var y=x.compare(this.args[P],I.args[P]);if(y!==0)return y}return 0},Te.prototype.lookup=function(I){return this.links[I]?this.links[I]:null},Te.prototype.filter=function(I){var P={};for(var y in this.links)if(!!this.links.hasOwnProperty(y)){var F=this.links[y];I(y,F)&&(P[y]=F)}return new Te(P)},Te.prototype.exclude=function(I){var P={};for(var y in this.links)!this.links.hasOwnProperty(y)||e(I,y)===-1&&(P[y]=this.links[y]);return new Te(P)},Te.prototype.add=function(I,P){this.links[I]=P},Te.prototype.domain=function(I){var P=I===!0?function(z){return z}:function(z){return new me(z)},y=[];for(var F in this.links)y.push(P(F));return y},me.prototype.compile=function(){return'new pl.type.Var("'+this.id.toString()+'")'},be.prototype.compile=function(){return"new pl.type.Num("+this.value.toString()+", "+this.is_float.toString()+")"},H.prototype.compile=function(){return'new pl.type.Term("'+this.id.replace(/"/g,'\\"')+'", ['+o(this.args,function(I){return I.compile()})+"])"},_e.prototype.compile=function(){return"new pl.type.Rule("+this.head.compile()+", "+(this.body===null?"null":this.body.compile())+")"},qe.prototype.compile=function(){var I,P=[],y;for(var F in this.rules)if(!!this.rules.hasOwnProperty(F)){var z=this.rules[F];y=[],I='"'+F+'": [';for(var X=0;X<z.length;X++)y.push(z[X].compile());I+=y.join(),I+="]",P.push(I)}return"{"+P.join()+"};"},me.prototype.toJavaScript=function(){},be.prototype.toJavaScript=function(){return this.value},H.prototype.toJavaScript=function(){if(this.args.length===0&&this.indicator!=="[]/0")return this.id;if(x.type.is_list(this)){for(var I=[],P=this,y;P.indicator==="./2";){if(y=P.args[0].toJavaScript(),y===void 0)return;I.push(y),P=P.args[1]}if(P.indicator==="[]/0")return I}},_e.prototype.singleton_variables=function(){var I=this.head.variables(),P={},y=[];this.body!==null&&(I=I.concat(this.body.variables()));for(var F=0;F<I.length;F++)P[I[F]]===void 0&&(P[I[F]]=0),P[I[F]]++;for(var z in P)z!=="_"&&P[z]===1&&y.push(z);return y};var x={__env:typeof ml<"u"&&ml.exports?global:window,module:{},version:t,parser:{tokenizer:_,expression:V},utils:{str_indicator:Z,codePointAt:n,fromCodePoint:u},statistics:{getCountTerms:function(){return ut}},fromJavaScript:{test:{boolean:function(I){return I===!0||I===!1},number:function(I){return typeof I=="number"},string:function(I){return typeof I=="string"},list:function(I){return I instanceof Array},variable:function(I){return I===void 0},any:function(I){return!0}},conversion:{boolean:function(I){return new H(I?"true":"false",[])},number:function(I){return new be(I,I%1!==0)},string:function(I){return new H(I,[])},list:function(I){for(var P=[],y,F=0;F<I.length;F++){if(y=x.fromJavaScript.apply(I[F]),y===void 0)return;P.push(y)}return g(P)},variable:function(I){return new me("_")},any:function(I){}},apply:function(I){for(var P in x.fromJavaScript.test)if(P!=="any"&&x.fromJavaScript.test[P](I))return x.fromJavaScript.conversion[P](I);return x.fromJavaScript.conversion.any(I)}},type:{Var:me,Num:be,Term:H,Rule:_e,State:Qe,Stream:Me,Module:Oe,Thread:At,Session:qe,Substitution:Te,order:[me,be,H,Me],compare:function(I,P){var y=e(x.type.order,I.constructor),F=e(x.type.order,P.constructor);if(y<F)return-1;if(y>F)return 1;if(I.constructor===be){if(I.is_float&&P.is_float)return 0;if(I.is_float)return-1;if(P.is_float)return 1}return 0},is_substitution:function(I){return I instanceof Te},is_state:function(I){return I instanceof Qe},is_rule:function(I){return I instanceof _e},is_variable:function(I){return I instanceof me},is_stream:function(I){return I instanceof Me},is_anonymous_var:function(I){return I instanceof me&&I.id==="_"},is_callable:function(I){return I instanceof H},is_number:function(I){return I instanceof be},is_integer:function(I){return I instanceof be&&!I.is_float},is_float:function(I){return I instanceof be&&I.is_float},is_term:function(I){return I instanceof H},is_atom:function(I){return I instanceof H&&I.args.length===0},is_ground:function(I){if(I instanceof me)return!1;if(I instanceof H){for(var P=0;P<I.args.length;P++)if(!x.type.is_ground(I.args[P]))return!1}return!0},is_atomic:function(I){return I instanceof H&&I.args.length===0||I instanceof be},is_compound:function(I){return I instanceof H&&I.args.length>0},is_list:function(I){return I instanceof H&&(I.indicator==="[]/0"||I.indicator==="./2")},is_empty_list:function(I){return I instanceof H&&I.indicator==="[]/0"},is_non_empty_list:function(I){return I instanceof H&&I.indicator==="./2"},is_fully_list:function(I){for(;I instanceof H&&I.indicator==="./2";)I=I.args[1];return I instanceof me||I instanceof H&&I.indicator==="[]/0"},is_instantiated_list:function(I){for(;I instanceof H&&I.indicator==="./2";)I=I.args[1];return I instanceof H&&I.indicator==="[]/0"},is_unitary_list:function(I){return I instanceof H&&I.indicator==="./2"&&I.args[1]instanceof H&&I.args[1].indicator==="[]/0"},is_character:function(I){return I instanceof H&&(I.id.length===1||I.id.length>0&&I.id.length<=2&&n(I.id,0)>=65536)},is_character_code:function(I){return I instanceof be&&!I.is_float&&I.value>=0&&I.value<=1114111},is_byte:function(I){return I instanceof be&&!I.is_float&&I.value>=0&&I.value<=255},is_operator:function(I){return I instanceof H&&x.arithmetic.evaluation[I.indicator]},is_directive:function(I){return I instanceof H&&x.directive[I.indicator]!==void 0},is_builtin:function(I){return I instanceof H&&x.predicate[I.indicator]!==void 0},is_error:function(I){return I instanceof H&&I.indicator==="throw/1"},is_predicate_indicator:function(I){return I instanceof H&&I.indicator==="//2"&&I.args[0]instanceof H&&I.args[0].args.length===0&&I.args[1]instanceof be&&I.args[1].is_float===!1},is_flag:function(I){return I instanceof H&&I.args.length===0&&x.flag[I.id]!==void 0},is_value_flag:function(I,P){if(!x.type.is_flag(I))return!1;for(var y in x.flag[I.id].allowed)if(!!x.flag[I.id].allowed.hasOwnProperty(y)&&x.flag[I.id].allowed[y].equals(P))return!0;return!1},is_io_mode:function(I){return x.type.is_atom(I)&&["read","write","append"].indexOf(I.id)!==-1},is_stream_option:function(I){return x.type.is_term(I)&&(I.indicator==="alias/1"&&x.type.is_atom(I.args[0])||I.indicator==="reposition/1"&&x.type.is_atom(I.args[0])&&(I.args[0].id==="true"||I.args[0].id==="false")||I.indicator==="type/1"&&x.type.is_atom(I.args[0])&&(I.args[0].id==="text"||I.args[0].id==="binary")||I.indicator==="eof_action/1"&&x.type.is_atom(I.args[0])&&(I.args[0].id==="error"||I.args[0].id==="eof_code"||I.args[0].id==="reset"))},is_stream_position:function(I){return x.type.is_integer(I)&&I.value>=0||x.type.is_atom(I)&&(I.id==="end_of_stream"||I.id==="past_end_of_stream")},is_stream_property:function(I){return x.type.is_term(I)&&(I.indicator==="input/0"||I.indicator==="output/0"||I.indicator==="alias/1"&&(x.type.is_variable(I.args[0])||x.type.is_atom(I.args[0]))||I.indicator==="file_name/1"&&(x.type.is_variable(I.args[0])||x.type.is_atom(I.args[0]))||I.indicator==="position/1"&&(x.type.is_variable(I.args[0])||x.type.is_stream_position(I.args[0]))||I.indicator==="reposition/1"&&(x.type.is_variable(I.args[0])||x.type.is_atom(I.args[0])&&(I.args[0].id==="true"||I.args[0].id==="false"))||I.indicator==="type/1"&&(x.type.is_variable(I.args[0])||x.type.is_atom(I.args[0])&&(I.args[0].id==="text"||I.args[0].id==="binary"))||I.indicator==="mode/1"&&(x.type.is_variable(I.args[0])||x.type.is_atom(I.args[0])&&(I.args[0].id==="read"||I.args[0].id==="write"||I.args[0].id==="append"))||I.indicator==="eof_action/1"&&(x.type.is_variable(I.args[0])||x.type.is_atom(I.args[0])&&(I.args[0].id==="error"||I.args[0].id==="eof_code"||I.args[0].id==="reset"))||I.indicator==="end_of_stream/1"&&(x.type.is_variable(I.args[0])||x.type.is_atom(I.args[0])&&(I.args[0].id==="at"||I.args[0].id==="past"||I.args[0].id==="not")))},is_streamable:function(I){return I.__proto__.stream!==void 0},is_read_option:function(I){return x.type.is_term(I)&&["variables/1","variable_names/1","singletons/1"].indexOf(I.indicator)!==-1},is_write_option:function(I){return x.type.is_term(I)&&(I.indicator==="quoted/1"&&x.type.is_atom(I.args[0])&&(I.args[0].id==="true"||I.args[0].id==="false")||I.indicator==="ignore_ops/1"&&x.type.is_atom(I.args[0])&&(I.args[0].id==="true"||I.args[0].id==="false")||I.indicator==="numbervars/1"&&x.type.is_atom(I.args[0])&&(I.args[0].id==="true"||I.args[0].id==="false"))},is_close_option:function(I){return x.type.is_term(I)&&I.indicator==="force/1"&&x.type.is_atom(I.args[0])&&(I.args[0].id==="true"||I.args[0].id==="false")},is_modifiable_flag:function(I){return x.type.is_flag(I)&&x.flag[I.id].changeable},is_module:function(I){return I instanceof H&&I.indicator==="library/1"&&I.args[0]instanceof H&&I.args[0].args.length===0&&x.module[I.args[0].id]!==void 0}},arithmetic:{evaluation:{"e/0":{type_args:null,type_result:!0,fn:function(I){return Math.E}},"pi/0":{type_args:null,type_result:!0,fn:function(I){return Math.PI}},"tau/0":{type_args:null,type_result:!0,fn:function(I){return 2*Math.PI}},"epsilon/0":{type_args:null,type_result:!0,fn:function(I){return Number.EPSILON}},"+/1":{type_args:null,type_result:null,fn:function(I,P){return I}},"-/1":{type_args:null,type_result:null,fn:function(I,P){return-I}},"\\/1":{type_args:!1,type_result:!1,fn:function(I,P){return~I}},"abs/1":{type_args:null,type_result:null,fn:function(I,P){return Math.abs(I)}},"sign/1":{type_args:null,type_result:null,fn:function(I,P){return Math.sign(I)}},"float_integer_part/1":{type_args:!0,type_result:!1,fn:function(I,P){return parseInt(I)}},"float_fractional_part/1":{type_args:!0,type_result:!0,fn:function(I,P){return I-parseInt(I)}},"float/1":{type_args:null,type_result:!0,fn:function(I,P){return parseFloat(I)}},"floor/1":{type_args:!0,type_result:!1,fn:function(I,P){return Math.floor(I)}},"truncate/1":{type_args:!0,type_result:!1,fn:function(I,P){return parseInt(I)}},"round/1":{type_args:!0,type_result:!1,fn:function(I,P){return Math.round(I)}},"ceiling/1":{type_args:!0,type_result:!1,fn:function(I,P){return Math.ceil(I)}},"sin/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.sin(I)}},"cos/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.cos(I)}},"tan/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.tan(I)}},"asin/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.asin(I)}},"acos/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.acos(I)}},"atan/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.atan(I)}},"atan2/2":{type_args:null,type_result:!0,fn:function(I,P,y){return Math.atan2(I,P)}},"exp/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.exp(I)}},"sqrt/1":{type_args:null,type_result:!0,fn:function(I,P){return Math.sqrt(I)}},"log/1":{type_args:null,type_result:!0,fn:function(I,P){return I>0?Math.log(I):x.error.evaluation("undefined",P.__call_indicator)}},"+/2":{type_args:null,type_result:null,fn:function(I,P,y){return I+P}},"-/2":{type_args:null,type_result:null,fn:function(I,P,y){return I-P}},"*/2":{type_args:null,type_result:null,fn:function(I,P,y){return I*P}},"//2":{type_args:null,type_result:!0,fn:function(I,P,y){return P?I/P:x.error.evaluation("zero_division",y.__call_indicator)}},"///2":{type_args:!1,type_result:!1,fn:function(I,P,y){return P?parseInt(I/P):x.error.evaluation("zero_division",y.__call_indicator)}},"**/2":{type_args:null,type_result:!0,fn:function(I,P,y){return Math.pow(I,P)}},"^/2":{type_args:null,type_result:null,fn:function(I,P,y){return Math.pow(I,P)}},"<</2":{type_args:!1,type_result:!1,fn:function(I,P,y){return I<<P}},">>/2":{type_args:!1,type_result:!1,fn:function(I,P,y){return I>>P}},"/\\/2":{type_args:!1,type_result:!1,fn:function(I,P,y){return I&P}},"\\//2":{type_args:!1,type_result:!1,fn:function(I,P,y){return I|P}},"xor/2":{type_args:!1,type_result:!1,fn:function(I,P,y){return I^P}},"rem/2":{type_args:!1,type_result:!1,fn:function(I,P,y){return P?I%P:x.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(I,P,y){return P?I-parseInt(I/P)*P:x.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(I,P,y){return Math.max(I,P)}},"min/2":{type_args:null,type_result:null,fn:function(I,P,y){return Math.min(I,P)}}}},directive:{"dynamic/1":function(I,P){var y=P.args[0];if(x.type.is_variable(y))I.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_compound(y)||y.indicator!=="//2")I.throw_error(x.error.type("predicate_indicator",y,P.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))I.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_atom(y.args[0]))I.throw_error(x.error.type("atom",y.args[0],P.indicator));else if(!x.type.is_integer(y.args[1]))I.throw_error(x.error.type("integer",y.args[1],P.indicator));else{var F=P.args[0].args[0].id+"/"+P.args[0].args[1].value;I.session.public_predicates[F]=!0,I.session.rules[F]||(I.session.rules[F]=[])}},"multifile/1":function(I,P){var y=P.args[0];x.type.is_variable(y)?I.throw_error(x.error.instantiation(P.indicator)):!x.type.is_compound(y)||y.indicator!=="//2"?I.throw_error(x.error.type("predicate_indicator",y,P.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?I.throw_error(x.error.instantiation(P.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?I.session.multifile_predicates[P.args[0].args[0].id+"/"+P.args[0].args[1].value]=!0:I.throw_error(x.error.type("integer",y.args[1],P.indicator)):I.throw_error(x.error.type("atom",y.args[0],P.indicator))},"set_prolog_flag/2":function(I,P){var y=P.args[0],F=P.args[1];x.type.is_variable(y)||x.type.is_variable(F)?I.throw_error(x.error.instantiation(P.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?I.session.flag[y.id]=F:I.throw_error(x.error.permission("modify","flag",y)):I.throw_error(x.error.domain("flag_value",new H("+",[y,F]),P.indicator)):I.throw_error(x.error.domain("prolog_flag",y,P.indicator)):I.throw_error(x.error.type("atom",y,P.indicator))},"use_module/1":function(I,P){var y=P.args[0];if(x.type.is_variable(y))I.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_term(y))I.throw_error(x.error.type("term",y,P.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;e(I.session.modules,F)===-1&&I.session.modules.push(F)}},"char_conversion/2":function(I,P){var y=P.args[0],F=P.args[1];x.type.is_variable(y)||x.type.is_variable(F)?I.throw_error(x.error.instantiation(P.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete I.session.__char_conversion[y.id]:I.session.__char_conversion[y.id]=F.id:I.throw_error(x.error.type("character",F,P.indicator)):I.throw_error(x.error.type("character",y,P.indicator))},"op/3":function(I,P){var y=P.args[0],F=P.args[1],z=P.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))I.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_integer(y))I.throw_error(x.error.type("integer",y,P.indicator));else if(!x.type.is_atom(F))I.throw_error(x.error.type("atom",F,P.indicator));else if(!x.type.is_atom(z))I.throw_error(x.error.type("atom",z,P.indicator));else if(y.value<0||y.value>1200)I.throw_error(x.error.domain("operator_priority",y,P.indicator));else if(z.id===",")I.throw_error(x.error.permission("modify","operator",z,P.indicator));else if(z.id==="|"&&(y.value<1001||F.id.length!==3))I.throw_error(x.error.permission("modify","operator",z,P.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(F.id)===-1)I.throw_error(x.error.domain("operator_specifier",F,P.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var $ in I.session.__operators)if(!!I.session.__operators.hasOwnProperty($)){var ie=I.session.__operators[$][z.id];ie&&(e(ie,"fx")!==-1&&(X.prefix={priority:$,type:"fx"}),e(ie,"fy")!==-1&&(X.prefix={priority:$,type:"fy"}),e(ie,"xf")!==-1&&(X.postfix={priority:$,type:"xf"}),e(ie,"yf")!==-1&&(X.postfix={priority:$,type:"yf"}),e(ie,"xfx")!==-1&&(X.infix={priority:$,type:"xfx"}),e(ie,"xfy")!==-1&&(X.infix={priority:$,type:"xfy"}),e(ie,"yfx")!==-1&&(X.infix={priority:$,type:"yfx"}))}var ke;switch(F.id){case"fy":case"fx":ke="prefix";break;case"yf":case"xf":ke="postfix";break;default:ke="infix";break}if(((X.prefix&&ke==="prefix"||X.postfix&&ke==="postfix"||X.infix&&ke==="infix")&&X[ke].type!==F.id||X.infix&&ke==="postfix"||X.postfix&&ke==="infix")&&y.value!==0)I.throw_error(x.error.permission("create","operator",z,P.indicator));else return X[ke]&&(ve(I.session.__operators[X[ke].priority][z.id],F.id),I.session.__operators[X[ke].priority][z.id].length===0&&delete I.session.__operators[X[ke].priority][z.id]),y.value>0&&(I.session.__operators[y.value]||(I.session.__operators[y.value.toString()]={}),I.session.__operators[y.value][z.id]||(I.session.__operators[y.value][z.id]=[]),I.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{"op/3":function(I,P,y){x.directive["op/3"](I,y)&&I.success(P)},"current_op/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=[];for(var ie in I.session.__operators)for(var ke in I.session.__operators[ie])for(var Ne=0;Ne<I.session.__operators[ie][ke].length;Ne++)$.push(new Qe(P.goal.replace(new H(",",[new H("=",[new be(ie,!1),F]),new H(",",[new H("=",[new H(I.session.__operators[ie][ke][Ne],[]),z]),new H("=",[new H(ke,[]),X])])])),P.substitution,P));I.prepend($)},";/2":function(I,P,y){if(x.type.is_term(y.args[0])&&y.args[0].indicator==="->/2"){var F=I.points,z=I.session.format_success,X=I.session.format_error;I.session.format_success=function(Ne){return Ne.substitution},I.session.format_error=function(Ne){return Ne.goal},I.points=[new Qe(y.args[0].args[0],P.substitution,P)];var $=function(Ne){I.points=F,I.session.format_success=z,I.session.format_error=X,Ne===!1?I.prepend([new Qe(P.goal.replace(y.args[1]),P.substitution,P)]):x.type.is_error(Ne)?I.throw_error(Ne.args[0]):Ne===null?(I.prepend([P]),I.__calls.shift()(null)):I.prepend([new Qe(P.goal.replace(y.args[0].args[1]).apply(Ne),P.substitution.apply(Ne),P)])};I.__calls.unshift($)}else{var ie=new Qe(P.goal.replace(y.args[0]),P.substitution,P),ke=new Qe(P.goal.replace(y.args[1]),P.substitution,P);I.prepend([ie,ke])}},"!/0":function(I,P,y){var F,z,X=[];for(F=P,z=null;F.parent!==null&&F.parent.goal.search(y);)if(z=F,F=F.parent,F.goal!==null){var $=F.goal.select();if($&&$.id==="call"&&$.search(y)){F=z;break}}for(var ie=I.points.length-1;ie>=0;ie--){for(var ke=I.points[ie],Ne=ke.parent;Ne!==null&&Ne!==F.parent;)Ne=Ne.parent;Ne===null&&Ne!==F.parent&&X.push(ke)}I.points=X.reverse(),I.success(P)},"\\+/1":function(I,P,y){var F=y.args[0];x.type.is_variable(F)?I.throw_error(x.error.instantiation(I.level)):x.type.is_callable(F)?I.prepend([new Qe(P.goal.replace(new H(",",[new H(",",[new H("call",[F]),new H("!",[])]),new H("fail",[])])),P.substitution,P),new Qe(P.goal.replace(null),P.substitution,P)]):I.throw_error(x.error.type("callable",F,I.level))},"->/2":function(I,P,y){var F=P.goal.replace(new H(",",[y.args[0],new H(",",[new H("!"),y.args[1]])]));I.prepend([new Qe(F,P.substitution,P)])},"fail/0":function(I,P,y){},"false/0":function(I,P,y){},"true/0":function(I,P,y){I.success(P)},"call/1":ne(1),"call/2":ne(2),"call/3":ne(3),"call/4":ne(4),"call/5":ne(5),"call/6":ne(6),"call/7":ne(7),"call/8":ne(8),"once/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("call",[F]),new H("!",[])])),P.substitution,P)])},"forall/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H("\\+",[new H(",",[new H("call",[F]),new H("\\+",[new H("call",[z])])])])),P.substitution,P)])},"repeat/0":function(I,P,y){I.prepend([new Qe(P.goal.replace(null),P.substitution,P),P])},"throw/1":function(I,P,y){x.type.is_variable(y.args[0])?I.throw_error(x.error.instantiation(I.level)):I.throw_error(y.args[0])},"catch/3":function(I,P,y){var F=I.points;I.points=[],I.prepend([new Qe(y.args[0],P.substitution,P)]);var z=I.session.format_success,X=I.session.format_error;I.session.format_success=function(ie){return ie.substitution},I.session.format_error=function(ie){return ie.goal};var $=function(ie){var ke=I.points;if(I.points=F,I.session.format_success=z,I.session.format_error=X,x.type.is_error(ie)){for(var Ne=[],st=I.points.length-1;st>=0;st--){for(var Xt=I.points[st],ht=Xt.parent;ht!==null&&ht!==P.parent;)ht=ht.parent;ht===null&&ht!==P.parent&&Ne.push(Xt)}I.points=Ne;var Ut=I.get_flag("occurs_check").indicator==="true/0",Xt=new Qe,xt=x.unify(ie.args[0],y.args[1],Ut);xt!==null?(Xt.substitution=P.substitution.apply(xt),Xt.goal=P.goal.replace(y.args[2]).apply(xt),Xt.parent=P,I.prepend([Xt])):I.throw_error(ie.args[0])}else if(ie!==!1){for(var tn=ie===null?[]:[new Qe(P.goal.apply(ie).replace(null),P.substitution.apply(ie),P)],Dr=[],st=ke.length-1;st>=0;st--){Dr.push(ke[st]);var fr=ke[st].goal!==null?ke[st].goal.select():null;if(x.type.is_term(fr)&&fr.indicator==="!/0")break}var Br=o(Dr,function(jr){return jr.goal===null&&(jr.goal=new H("true",[])),jr=new Qe(P.goal.replace(new H("catch",[jr.goal,y.args[1],y.args[2]])),P.substitution.apply(jr.substitution),jr.parent),jr.exclude=y.args[0].variables(),jr}).reverse();I.prepend(Br),I.prepend(tn),ie===null&&(this.current_limit=0,I.__calls.shift()(null))}};I.__calls.unshift($)},"=/2":function(I,P,y){var F=I.get_flag("occurs_check").indicator==="true/0",z=new Qe,X=x.unify(y.args[0],y.args[1],F);X!==null&&(z.goal=P.goal.apply(X).replace(null),z.substitution=P.substitution.apply(X),z.parent=P,I.prepend([z]))},"unify_with_occurs_check/2":function(I,P,y){var F=new Qe,z=x.unify(y.args[0],y.args[1],!0);z!==null&&(F.goal=P.goal.apply(z).replace(null),F.substitution=P.substitution.apply(z),F.parent=P,I.prepend([F]))},"\\=/2":function(I,P,y){var F=I.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[0],y.args[1],F);z===null&&I.success(P)},"subsumes_term/2":function(I,P,y){var F=I.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[1],y.args[0],F);z!==null&&y.args[1].apply(z).equals(y.args[1])&&I.success(P)},"findall/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(z))I.throw_error(x.error.type("callable",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))I.throw_error(x.error.type("list",X,y.indicator));else{var $=I.next_free_variable(),ie=new H(",",[z,new H("=",[$,F])]),ke=I.points,Ne=I.session.limit,st=I.session.format_success;I.session.format_success=function(Xt){return Xt.substitution},I.add_goal(ie,!0,P);var ht=[],Ut=function(Xt){if(Xt!==!1&&Xt!==null&&!x.type.is_error(Xt))I.__calls.unshift(Ut),ht.push(Xt.links[$.id]),I.session.limit=I.current_limit;else if(I.points=ke,I.session.limit=Ne,I.session.format_success=st,x.type.is_error(Xt))I.throw_error(Xt.args[0]);else if(I.current_limit>0){for(var xt=new H("[]"),tn=ht.length-1;tn>=0;tn--)xt=new H(".",[ht[tn],xt]);I.prepend([new Qe(P.goal.replace(new H("=",[X,xt])),P.substitution,P)])}};I.__calls.unshift(Ut)}},"bagof/3":function(I,P,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))I.throw_error(x.error.type("callable",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))I.throw_error(x.error.type("list",$,y.indicator));else{var ie=I.next_free_variable(),ke;X.indicator==="^/2"?(ke=X.args[0].variables(),X=X.args[1]):ke=[],ke=ke.concat(z.variables());for(var Ne=X.variables().filter(function(Br){return e(ke,Br)===-1}),st=new H("[]"),ht=Ne.length-1;ht>=0;ht--)st=new H(".",[new me(Ne[ht]),st]);var Ut=new H(",",[X,new H("=",[ie,new H(",",[st,z])])]),Xt=I.points,xt=I.session.limit,tn=I.session.format_success;I.session.format_success=function(Br){return Br.substitution},I.add_goal(Ut,!0,P);var Dr=[],fr=function(Br){if(Br!==!1&&Br!==null&&!x.type.is_error(Br)){I.__calls.unshift(fr);var jr=!1,Hn=Br.links[ie.id].args[0],bs=Br.links[ie.id].args[1];for(var ki in Dr)if(!!Dr.hasOwnProperty(ki)){var gs=Dr[ki];if(gs.variables.equals(Hn)){gs.answers.push(bs),jr=!0;break}}jr||Dr.push({variables:Hn,answers:[bs]}),I.session.limit=I.current_limit}else if(I.points=Xt,I.session.limit=xt,I.session.format_success=tn,x.type.is_error(Br))I.throw_error(Br.args[0]);else if(I.current_limit>0){for(var to=[],Di=0;Di<Dr.length;Di++){Br=Dr[Di].answers;for(var Qs=new H("[]"),ro=Br.length-1;ro>=0;ro--)Qs=new H(".",[Br[ro],Qs]);to.push(new Qe(P.goal.replace(new H(",",[new H("=",[st,Dr[Di].variables]),new H("=",[$,Qs])])),P.substitution,P))}I.prepend(to)}};I.__calls.unshift(fr)}},"setof/3":function(I,P,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))I.throw_error(x.error.type("callable",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))I.throw_error(x.error.type("list",$,y.indicator));else{var ie=I.next_free_variable(),ke;X.indicator==="^/2"?(ke=X.args[0].variables(),X=X.args[1]):ke=[],ke=ke.concat(z.variables());for(var Ne=X.variables().filter(function(Br){return e(ke,Br)===-1}),st=new H("[]"),ht=Ne.length-1;ht>=0;ht--)st=new H(".",[new me(Ne[ht]),st]);var Ut=new H(",",[X,new H("=",[ie,new H(",",[st,z])])]),Xt=I.points,xt=I.session.limit,tn=I.session.format_success;I.session.format_success=function(Br){return Br.substitution},I.add_goal(Ut,!0,P);var Dr=[],fr=function(Br){if(Br!==!1&&Br!==null&&!x.type.is_error(Br)){I.__calls.unshift(fr);var jr=!1,Hn=Br.links[ie.id].args[0],bs=Br.links[ie.id].args[1];for(var ki in Dr)if(!!Dr.hasOwnProperty(ki)){var gs=Dr[ki];if(gs.variables.equals(Hn)){gs.answers.push(bs),jr=!0;break}}jr||Dr.push({variables:Hn,answers:[bs]}),I.session.limit=I.current_limit}else if(I.points=Xt,I.session.limit=xt,I.session.format_success=tn,x.type.is_error(Br))I.throw_error(Br.args[0]);else if(I.current_limit>0){for(var to=[],Di=0;Di<Dr.length;Di++){Br=Dr[Di].answers.sort(x.compare);for(var Qs=new H("[]"),ro=Br.length-1;ro>=0;ro--)Qs=new H(".",[Br[ro],Qs]);to.push(new Qe(P.goal.replace(new H(",",[new H("=",[st,Dr[Di].variables]),new H("=",[$,Qs])])),P.substitution,P))}I.prepend(to)}};I.__calls.unshift(fr)}},"functor/3":function(I,P,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(z)&&(x.type.is_variable(X)||x.type.is_variable($)))I.throw_error(x.error.instantiation("functor/3"));else if(!x.type.is_variable($)&&!x.type.is_integer($))I.throw_error(x.error.type("integer",y.args[2],"functor/3"));else if(!x.type.is_variable(X)&&!x.type.is_atomic(X))I.throw_error(x.error.type("atomic",y.args[1],"functor/3"));else if(x.type.is_integer(X)&&x.type.is_integer($)&&$.value!==0)I.throw_error(x.error.type("atom",y.args[1],"functor/3"));else if(x.type.is_variable(z)){if(y.args[2].value>=0){for(var ie=[],ke=0;ke<$.value;ke++)ie.push(I.next_free_variable());var Ne=x.type.is_integer(X)?X:new H(X.id,ie);I.prepend([new Qe(P.goal.replace(new H("=",[z,Ne])),P.substitution,P)])}}else{var st=x.type.is_integer(z)?z:new H(z.id,[]),ht=x.type.is_integer(z)?new be(0,!1):new be(z.args.length,!1),Ut=new H(",",[new H("=",[st,X]),new H("=",[ht,$])]);I.prepend([new Qe(P.goal.replace(Ut),P.substitution,P)])}},"arg/3":function(I,P,y){if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))I.throw_error(x.error.instantiation(y.indicator));else if(y.args[0].value<0)I.throw_error(x.error.domain("not_less_than_zero",y.args[0],y.indicator));else if(!x.type.is_compound(y.args[1]))I.throw_error(x.error.type("compound",y.args[1],y.indicator));else{var F=y.args[0].value;if(F>0&&F<=y.args[1].args.length){var z=new H("=",[y.args[1].args[F-1],y.args[2]]);I.prepend([new Qe(P.goal.replace(z),P.substitution,P)])}}},"=../2":function(I,P,y){var F;if(x.type.is_variable(y.args[0])&&(x.type.is_variable(y.args[1])||x.type.is_non_empty_list(y.args[1])&&x.type.is_variable(y.args[1].args[0])))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_fully_list(y.args[1]))I.throw_error(x.error.type("list",y.args[1],y.indicator));else if(x.type.is_variable(y.args[0])){if(!x.type.is_variable(y.args[1])){var X=[];for(F=y.args[1].args[1];F.indicator==="./2";)X.push(F.args[0]),F=F.args[1];x.type.is_variable(y.args[0])&&x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):X.length===0&&x.type.is_compound(y.args[1].args[0])?I.throw_error(x.error.type("atomic",y.args[1].args[0],y.indicator)):X.length>0&&(x.type.is_compound(y.args[1].args[0])||x.type.is_number(y.args[1].args[0]))?I.throw_error(x.error.type("atom",y.args[1].args[0],y.indicator)):X.length===0?I.prepend([new Qe(P.goal.replace(new H("=",[y.args[1].args[0],y.args[0]],P)),P.substitution,P)]):I.prepend([new Qe(P.goal.replace(new H("=",[new H(y.args[1].args[0].id,X),y.args[0]])),P.substitution,P)])}}else{if(x.type.is_atomic(y.args[0]))F=new H(".",[y.args[0],new H("[]")]);else{F=new H("[]");for(var z=y.args[0].args.length-1;z>=0;z--)F=new H(".",[y.args[0].args[z],F]);F=new H(".",[new H(y.args[0].id),F])}I.prepend([new Qe(P.goal.replace(new H("=",[F,y.args[1]])),P.substitution,P)])}},"copy_term/2":function(I,P,y){var F=y.args[0].rename(I);I.prepend([new Qe(P.goal.replace(new H("=",[F,y.args[1]])),P.substitution,P.parent)])},"term_variables/2":function(I,P,y){var F=y.args[0],z=y.args[1];if(!x.type.is_fully_list(z))I.throw_error(x.error.type("list",z,y.indicator));else{var X=g(o(Ee(F.variables()),function($){return new me($)}));I.prepend([new Qe(P.goal.replace(new H("=",[z,X])),P.substitution,P)])}},"clause/2":function(I,P,y){if(x.type.is_variable(y.args[0]))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))I.throw_error(x.error.type("callable",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_callable(y.args[1]))I.throw_error(x.error.type("callable",y.args[1],y.indicator));else if(I.session.rules[y.args[0].indicator]!==void 0)if(I.is_public_predicate(y.args[0].indicator)){var F=[];for(var z in I.session.rules[y.args[0].indicator])if(!!I.session.rules[y.args[0].indicator].hasOwnProperty(z)){var X=I.session.rules[y.args[0].indicator][z];I.session.renamed_variables={},X=X.rename(I),X.body===null&&(X.body=new H("true"));var $=new H(",",[new H("=",[X.head,y.args[0]]),new H("=",[X.body,y.args[1]])]);F.push(new Qe(P.goal.replace($),P.substitution,P))}I.prepend(F)}else I.throw_error(x.error.permission("access","private_procedure",y.args[0].indicator,y.indicator))},"current_predicate/1":function(I,P,y){var F=y.args[0];if(!x.type.is_variable(F)&&(!x.type.is_compound(F)||F.indicator!=="//2"))I.throw_error(x.error.type("predicate_indicator",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[0])&&!x.type.is_atom(F.args[0]))I.throw_error(x.error.type("atom",F.args[0],y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[1])&&!x.type.is_integer(F.args[1]))I.throw_error(x.error.type("integer",F.args[1],y.indicator));else{var z=[];for(var X in I.session.rules)if(!!I.session.rules.hasOwnProperty(X)){var $=X.lastIndexOf("/"),ie=X.substr(0,$),ke=parseInt(X.substr($+1,X.length-($+1))),Ne=new H("/",[new H(ie),new be(ke,!1)]),st=new H("=",[Ne,F]);z.push(new Qe(P.goal.replace(st),P.substitution,P))}I.prepend(z)}},"asserta/1":function(I,P,y){if(x.type.is_variable(y.args[0]))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))I.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=Pe(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?I.throw_error(x.error.type("callable",z,y.indicator)):I.is_public_predicate(F.indicator)?(I.session.rules[F.indicator]===void 0&&(I.session.rules[F.indicator]=[]),I.session.public_predicates[F.indicator]=!0,I.session.rules[F.indicator]=[new _e(F,z,!0)].concat(I.session.rules[F.indicator]),I.success(P)):I.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):I.throw_error(x.error.type("callable",F,y.indicator))}},"assertz/1":function(I,P,y){if(x.type.is_variable(y.args[0]))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))I.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=Pe(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?I.throw_error(x.error.type("callable",z,y.indicator)):I.is_public_predicate(F.indicator)?(I.session.rules[F.indicator]===void 0&&(I.session.rules[F.indicator]=[]),I.session.public_predicates[F.indicator]=!0,I.session.rules[F.indicator].push(new _e(F,z,!0)),I.success(P)):I.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):I.throw_error(x.error.type("callable",F,y.indicator))}},"retract/1":function(I,P,y){if(x.type.is_variable(y.args[0]))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))I.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;if(y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=y.args[0].args[1]):(F=y.args[0],z=new H("true")),typeof P.retract>"u")if(I.is_public_predicate(F.indicator)){if(I.session.rules[F.indicator]!==void 0){for(var X=[],$=0;$<I.session.rules[F.indicator].length;$++){I.session.renamed_variables={};var ie=I.session.rules[F.indicator][$],ke=ie.rename(I);ke.body===null&&(ke.body=new H("true",[]));var Ne=I.get_flag("occurs_check").indicator==="true/0",st=x.unify(new H(",",[F,z]),new H(",",[ke.head,ke.body]),Ne);if(st!==null){var ht=new Qe(P.goal.replace(new H(",",[new H("retract",[new H(":-",[F,z])]),new H(",",[new H("=",[F,ke.head]),new H("=",[z,ke.body])])])),P.substitution,P);ht.retract=ie,X.push(ht)}}I.prepend(X)}}else I.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator));else de(I,P,F.indicator,P.retract)}},"retractall/1":function(I,P,y){var F=y.args[0];x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_callable(F)?I.prepend([new Qe(P.goal.replace(new H(",",[new H("retract",[new x.type.Term(":-",[F,new me("_")])]),new H("fail",[])])),P.substitution,P),new Qe(P.goal.replace(null),P.substitution,P)]):I.throw_error(x.error.type("callable",F,y.indicator))},"abolish/1":function(I,P,y){if(x.type.is_variable(y.args[0])||x.type.is_term(y.args[0])&&y.args[0].indicator==="//2"&&(x.type.is_variable(y.args[0].args[0])||x.type.is_variable(y.args[0].args[1])))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_term(y.args[0])||y.args[0].indicator!=="//2")I.throw_error(x.error.type("predicate_indicator",y.args[0],y.indicator));else if(!x.type.is_atom(y.args[0].args[0]))I.throw_error(x.error.type("atom",y.args[0].args[0],y.indicator));else if(!x.type.is_integer(y.args[0].args[1]))I.throw_error(x.error.type("integer",y.args[0].args[1],y.indicator));else if(y.args[0].args[1].value<0)I.throw_error(x.error.domain("not_less_than_zero",y.args[0].args[1],y.indicator));else if(x.type.is_number(I.get_flag("max_arity"))&&y.args[0].args[1].value>I.get_flag("max_arity").value)I.throw_error(x.error.representation("max_arity",y.indicator));else{var F=y.args[0].args[0].id+"/"+y.args[0].args[1].value;I.is_public_predicate(F)?(delete I.session.rules[F],I.success(P)):I.throw_error(x.error.permission("modify","static_procedure",F,y.indicator))}},"atom_length/2":function(I,P,y){if(x.type.is_variable(y.args[0]))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_atom(y.args[0]))I.throw_error(x.error.type("atom",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_integer(y.args[1]))I.throw_error(x.error.type("integer",y.args[1],y.indicator));else if(x.type.is_integer(y.args[1])&&y.args[1].value<0)I.throw_error(x.error.domain("not_less_than_zero",y.args[1],y.indicator));else{var F=new be(y.args[0].id.length,!1);I.prepend([new Qe(P.goal.replace(new H("=",[F,y.args[1]])),P.substitution,P)])}},"atom_concat/3":function(I,P,y){var F,z,X=y.args[0],$=y.args[1],ie=y.args[2];if(x.type.is_variable(ie)&&(x.type.is_variable(X)||x.type.is_variable($)))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))I.throw_error(x.error.type("atom",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_atom($))I.throw_error(x.error.type("atom",$,y.indicator));else if(!x.type.is_variable(ie)&&!x.type.is_atom(ie))I.throw_error(x.error.type("atom",ie,y.indicator));else{var ke=x.type.is_variable(X),Ne=x.type.is_variable($);if(!ke&&!Ne)z=new H("=",[ie,new H(X.id+$.id)]),I.prepend([new Qe(P.goal.replace(z),P.substitution,P)]);else if(ke&&!Ne)F=ie.id.substr(0,ie.id.length-$.id.length),F+$.id===ie.id&&(z=new H("=",[X,new H(F)]),I.prepend([new Qe(P.goal.replace(z),P.substitution,P)]));else if(Ne&&!ke)F=ie.id.substr(X.id.length),X.id+F===ie.id&&(z=new H("=",[$,new H(F)]),I.prepend([new Qe(P.goal.replace(z),P.substitution,P)]));else{for(var st=[],ht=0;ht<=ie.id.length;ht++){var Ut=new H(ie.id.substr(0,ht)),Xt=new H(ie.id.substr(ht));z=new H(",",[new H("=",[Ut,X]),new H("=",[Xt,$])]),st.push(new Qe(P.goal.replace(z),P.substitution,P))}I.prepend(st)}}},"sub_atom/5":function(I,P,y){var F,z=y.args[0],X=y.args[1],$=y.args[2],ie=y.args[3],ke=y.args[4];if(x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))I.throw_error(x.error.type("integer",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_integer($))I.throw_error(x.error.type("integer",$,y.indicator));else if(!x.type.is_variable(ie)&&!x.type.is_integer(ie))I.throw_error(x.error.type("integer",ie,y.indicator));else if(x.type.is_integer(X)&&X.value<0)I.throw_error(x.error.domain("not_less_than_zero",X,y.indicator));else if(x.type.is_integer($)&&$.value<0)I.throw_error(x.error.domain("not_less_than_zero",$,y.indicator));else if(x.type.is_integer(ie)&&ie.value<0)I.throw_error(x.error.domain("not_less_than_zero",ie,y.indicator));else{var Ne=[],st=[],ht=[];if(x.type.is_variable(X))for(F=0;F<=z.id.length;F++)Ne.push(F);else Ne.push(X.value);if(x.type.is_variable($))for(F=0;F<=z.id.length;F++)st.push(F);else st.push($.value);if(x.type.is_variable(ie))for(F=0;F<=z.id.length;F++)ht.push(F);else ht.push(ie.value);var Ut=[];for(var Xt in Ne)if(!!Ne.hasOwnProperty(Xt)){F=Ne[Xt];for(var xt in st)if(!!st.hasOwnProperty(xt)){var tn=st[xt],Dr=z.id.length-F-tn;if(e(ht,Dr)!==-1&&F+tn+Dr===z.id.length){var fr=z.id.substr(F,tn);if(z.id===z.id.substr(0,F)+fr+z.id.substr(F+tn,Dr)){var Br=new H("=",[new H(fr),ke]),jr=new H("=",[X,new be(F)]),Hn=new H("=",[$,new be(tn)]),bs=new H("=",[ie,new be(Dr)]),ki=new H(",",[new H(",",[new H(",",[jr,Hn]),bs]),Br]);Ut.push(new Qe(P.goal.replace(ki),P.substitution,P))}}}}I.prepend(Ut)}},"atom_chars/2":function(I,P,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))I.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var ie=z,ke=x.type.is_variable(F),Ne="";ie.indicator==="./2";){if(x.type.is_character(ie.args[0]))Ne+=ie.args[0].id;else if(x.type.is_variable(ie.args[0])&&ke){I.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(ie.args[0])){I.throw_error(x.error.type("character",ie.args[0],y.indicator));return}ie=ie.args[1]}x.type.is_variable(ie)&&ke?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)?I.throw_error(x.error.type("list",z,y.indicator)):I.prepend([new Qe(P.goal.replace(new H("=",[new H(Ne),F])),P.substitution,P)])}else{for(var X=new H("[]"),$=F.id.length-1;$>=0;$--)X=new H(".",[new H(F.id.charAt($)),X]);I.prepend([new Qe(P.goal.replace(new H("=",[z,X])),P.substitution,P)])}},"atom_codes/2":function(I,P,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))I.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var ie=z,ke=x.type.is_variable(F),Ne="";ie.indicator==="./2";){if(x.type.is_character_code(ie.args[0]))Ne+=u(ie.args[0].value);else if(x.type.is_variable(ie.args[0])&&ke){I.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(ie.args[0])){I.throw_error(x.error.representation("character_code",y.indicator));return}ie=ie.args[1]}x.type.is_variable(ie)&&ke?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)?I.throw_error(x.error.type("list",z,y.indicator)):I.prepend([new Qe(P.goal.replace(new H("=",[new H(Ne),F])),P.substitution,P)])}else{for(var X=new H("[]"),$=F.id.length-1;$>=0;$--)X=new H(".",[new be(n(F.id,$),!1),X]);I.prepend([new Qe(P.goal.replace(new H("=",[z,X])),P.substitution,P)])}},"char_code/2":function(I,P,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_character(F))I.throw_error(x.error.type("character",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))I.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character_code(z))I.throw_error(x.error.representation("character_code",y.indicator));else if(x.type.is_variable(z)){var X=new be(n(F.id,0),!1);I.prepend([new Qe(P.goal.replace(new H("=",[X,z])),P.substitution,P)])}else{var $=new H(u(z.value));I.prepend([new Qe(P.goal.replace(new H("=",[$,F])),P.substitution,P)])}},"number_chars/2":function(I,P,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))I.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))I.throw_error(x.error.type("list",X,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(X)){var ie=X,ke=!0;for(F="";ie.indicator==="./2";){if(x.type.is_character(ie.args[0]))F+=ie.args[0].id;else if(x.type.is_variable(ie.args[0]))ke=!1;else if(!x.type.is_variable(ie.args[0])){I.throw_error(x.error.type("character",ie.args[0],y.indicator));return}ie=ie.args[1]}if(ke=ke&&x.type.is_empty_list(ie),!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)){I.throw_error(x.error.type("list",X,y.indicator));return}if(!ke&&$){I.throw_error(x.error.instantiation(y.indicator));return}else if(ke)if(x.type.is_variable(ie)&&$){I.throw_error(x.error.instantiation(y.indicator));return}else{var Ne=I.parse(F),st=Ne.value;!x.type.is_number(st)||Ne.tokens[Ne.tokens.length-1].space?I.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):I.prepend([new Qe(P.goal.replace(new H("=",[z,st])),P.substitution,P)]);return}}if(!$){F=z.toString();for(var ht=new H("[]"),Ut=F.length-1;Ut>=0;Ut--)ht=new H(".",[new H(F.charAt(Ut)),ht]);I.prepend([new Qe(P.goal.replace(new H("=",[X,ht])),P.substitution,P)])}}},"number_codes/2":function(I,P,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))I.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))I.throw_error(x.error.type("list",X,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(X)){var ie=X,ke=!0;for(F="";ie.indicator==="./2";){if(x.type.is_character_code(ie.args[0]))F+=u(ie.args[0].value);else if(x.type.is_variable(ie.args[0]))ke=!1;else if(!x.type.is_variable(ie.args[0])){I.throw_error(x.error.type("character_code",ie.args[0],y.indicator));return}ie=ie.args[1]}if(ke=ke&&x.type.is_empty_list(ie),!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)){I.throw_error(x.error.type("list",X,y.indicator));return}if(!ke&&$){I.throw_error(x.error.instantiation(y.indicator));return}else if(ke)if(x.type.is_variable(ie)&&$){I.throw_error(x.error.instantiation(y.indicator));return}else{var Ne=I.parse(F),st=Ne.value;!x.type.is_number(st)||Ne.tokens[Ne.tokens.length-1].space?I.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):I.prepend([new Qe(P.goal.replace(new H("=",[z,st])),P.substitution,P)]);return}}if(!$){F=z.toString();for(var ht=new H("[]"),Ut=F.length-1;Ut>=0;Ut--)ht=new H(".",[new be(n(F,Ut),!1),ht]);I.prepend([new Qe(P.goal.replace(new H("=",[X,ht])),P.substitution,P)])}}},"upcase_atom/2":function(I,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?I.throw_error(x.error.type("atom",z,y.indicator)):I.prepend([new Qe(P.goal.replace(new H("=",[z,new H(F.id.toUpperCase(),[])])),P.substitution,P)]):I.throw_error(x.error.type("atom",F,y.indicator))},"downcase_atom/2":function(I,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?I.throw_error(x.error.type("atom",z,y.indicator)):I.prepend([new Qe(P.goal.replace(new H("=",[z,new H(F.id.toLowerCase(),[])])),P.substitution,P)]):I.throw_error(x.error.type("atom",F,y.indicator))},"atomic_list_concat/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H("atomic_list_concat",[F,new H("",[]),z])),P.substitution,P)])},"atomic_list_concat/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z)||x.type.is_variable(F)&&x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_list(F))I.throw_error(x.error.type("list",F,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))I.throw_error(x.error.type("atom",X,y.indicator));else if(x.type.is_variable(X)){for(var ie="",ke=F;x.type.is_term(ke)&&ke.indicator==="./2";){if(!x.type.is_atom(ke.args[0])&&!x.type.is_number(ke.args[0])){I.throw_error(x.error.type("atomic",ke.args[0],y.indicator));return}ie!==""&&(ie+=z.id),x.type.is_atom(ke.args[0])?ie+=ke.args[0].id:ie+=""+ke.args[0].value,ke=ke.args[1]}ie=new H(ie,[]),x.type.is_variable(ke)?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_term(ke)||ke.indicator!=="[]/0"?I.throw_error(x.error.type("list",F,y.indicator)):I.prepend([new Qe(P.goal.replace(new H("=",[ie,X])),P.substitution,P)])}else{var $=g(o(X.id.split(z.id),function(Ne){return new H(Ne,[])}));I.prepend([new Qe(P.goal.replace(new H("=",[$,F])),P.substitution,P)])}},"@=</2":function(I,P,y){x.compare(y.args[0],y.args[1])<=0&&I.success(P)},"==/2":function(I,P,y){x.compare(y.args[0],y.args[1])===0&&I.success(P)},"\\==/2":function(I,P,y){x.compare(y.args[0],y.args[1])!==0&&I.success(P)},"@</2":function(I,P,y){x.compare(y.args[0],y.args[1])<0&&I.success(P)},"@>/2":function(I,P,y){x.compare(y.args[0],y.args[1])>0&&I.success(P)},"@>=/2":function(I,P,y){x.compare(y.args[0],y.args[1])>=0&&I.success(P)},"compare/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(!x.type.is_variable(F)&&!x.type.is_atom(F))I.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_atom(F)&&["<",">","="].indexOf(F.id)===-1)I.throw_error(x.type.domain("order",F,y.indicator));else{var $=x.compare(z,X);$=$===0?"=":$===-1?"<":">",I.prepend([new Qe(P.goal.replace(new H("=",[F,new H($,[])])),P.substitution,P)])}},"is/2":function(I,P,y){var F=y.args[1].interpret(I);x.type.is_number(F)?I.prepend([new Qe(P.goal.replace(new H("=",[y.args[0],F],I.level)),P.substitution,P)]):I.throw_error(F)},"between/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(F)||x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_integer(F))I.throw_error(x.error.type("integer",F,y.indicator));else if(!x.type.is_integer(z))I.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))I.throw_error(x.error.type("integer",X,y.indicator));else if(x.type.is_variable(X)){var $=[new Qe(P.goal.replace(new H("=",[X,F])),P.substitution,P)];F.value<z.value&&$.push(new Qe(P.goal.replace(new H("between",[new be(F.value+1,!1),z,X])),P.substitution,P)),I.prepend($)}else F.value<=X.value&&z.value>=X.value&&I.success(P)},"succ/2":function(I,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)&&x.type.is_variable(z)?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_integer(F)?I.throw_error(x.error.type("integer",F,y.indicator)):!x.type.is_variable(z)&&!x.type.is_integer(z)?I.throw_error(x.error.type("integer",z,y.indicator)):!x.type.is_variable(F)&&F.value<0?I.throw_error(x.error.domain("not_less_than_zero",F,y.indicator)):!x.type.is_variable(z)&&z.value<0?I.throw_error(x.error.domain("not_less_than_zero",z,y.indicator)):(x.type.is_variable(z)||z.value>0)&&(x.type.is_variable(F)?I.prepend([new Qe(P.goal.replace(new H("=",[F,new be(z.value-1,!1)])),P.substitution,P)]):I.prepend([new Qe(P.goal.replace(new H("=",[z,new be(F.value+1,!1)])),P.substitution,P)]))},"=:=/2":function(I,P,y){var F=x.arithmetic_compare(I,y.args[0],y.args[1]);x.type.is_term(F)?I.throw_error(F):F===0&&I.success(P)},"=\\=/2":function(I,P,y){var F=x.arithmetic_compare(I,y.args[0],y.args[1]);x.type.is_term(F)?I.throw_error(F):F!==0&&I.success(P)},"</2":function(I,P,y){var F=x.arithmetic_compare(I,y.args[0],y.args[1]);x.type.is_term(F)?I.throw_error(F):F<0&&I.success(P)},"=</2":function(I,P,y){var F=x.arithmetic_compare(I,y.args[0],y.args[1]);x.type.is_term(F)?I.throw_error(F):F<=0&&I.success(P)},">/2":function(I,P,y){var F=x.arithmetic_compare(I,y.args[0],y.args[1]);x.type.is_term(F)?I.throw_error(F):F>0&&I.success(P)},">=/2":function(I,P,y){var F=x.arithmetic_compare(I,y.args[0],y.args[1]);x.type.is_term(F)?I.throw_error(F):F>=0&&I.success(P)},"var/1":function(I,P,y){x.type.is_variable(y.args[0])&&I.success(P)},"atom/1":function(I,P,y){x.type.is_atom(y.args[0])&&I.success(P)},"atomic/1":function(I,P,y){x.type.is_atomic(y.args[0])&&I.success(P)},"compound/1":function(I,P,y){x.type.is_compound(y.args[0])&&I.success(P)},"integer/1":function(I,P,y){x.type.is_integer(y.args[0])&&I.success(P)},"float/1":function(I,P,y){x.type.is_float(y.args[0])&&I.success(P)},"number/1":function(I,P,y){x.type.is_number(y.args[0])&&I.success(P)},"nonvar/1":function(I,P,y){x.type.is_variable(y.args[0])||I.success(P)},"ground/1":function(I,P,y){y.variables().length===0&&I.success(P)},"acyclic_term/1":function(I,P,y){for(var F=P.substitution.apply(P.substitution),z=y.args[0].variables(),X=0;X<z.length;X++)if(P.substitution.links[z[X]]!==void 0&&!P.substitution.links[z[X]].equals(F.links[z[X]]))return;I.success(P)},"callable/1":function(I,P,y){x.type.is_callable(y.args[0])&&I.success(P)},"is_list/1":function(I,P,y){for(var F=y.args[0];x.type.is_term(F)&&F.indicator==="./2";)F=F.args[1];x.type.is_term(F)&&F.indicator==="[]/0"&&I.success(P)},"current_input/1":function(I,P,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream",F,y.indicator)):(x.type.is_atom(F)&&I.get_stream_by_alias(F.id)&&(F=I.get_stream_by_alias(F.id)),I.prepend([new Qe(P.goal.replace(new H("=",[F,I.get_current_input()])),P.substitution,P)]))},"current_output/1":function(I,P,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):(x.type.is_atom(F)&&I.get_stream_by_alias(F.id)&&(F=I.get_stream_by_alias(F.id)),I.prepend([new Qe(P.goal.replace(new H("=",[F,I.get_current_output()])),P.substitution,P)]))},"set_input/1":function(I,P,y){var F=y.args[0],z=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):x.type.is_stream(z)?z.output===!0?I.throw_error(x.error.permission("input","stream",F,y.indicator)):(I.set_current_input(z),I.success(P)):I.throw_error(x.error.existence("stream",F,y.indicator))},"set_output/1":function(I,P,y){var F=y.args[0],z=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):x.type.is_stream(z)?z.input===!0?I.throw_error(x.error.permission("output","stream",F,y.indicator)):(I.set_current_output(z),I.success(P)):I.throw_error(x.error.existence("stream",F,y.indicator))},"open/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];I.prepend([new Qe(P.goal.replace(new H("open",[F,z,X,new H("[]",[])])),P.substitution,P)])},"open/4":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=y.args[3];if(x.type.is_variable(F)||x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_atom(z))I.throw_error(x.error.type("atom",z,y.indicator));else if(!x.type.is_list($))I.throw_error(x.error.type("list",$,y.indicator));else if(!x.type.is_variable(X))I.throw_error(x.error.type("variable",X,y.indicator));else if(!x.type.is_atom(F)&&!x.type.is_streamable(F))I.throw_error(x.error.domain("source_sink",F,y.indicator));else if(!x.type.is_io_mode(z))I.throw_error(x.error.domain("io_mode",z,y.indicator));else{for(var ie={},ke=$,Ne;x.type.is_term(ke)&&ke.indicator==="./2";){if(Ne=ke.args[0],x.type.is_variable(Ne)){I.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_stream_option(Ne)){I.throw_error(x.error.domain("stream_option",Ne,y.indicator));return}ie[Ne.id]=Ne.args[0].id,ke=ke.args[1]}if(ke.indicator!=="[]/0"){x.type.is_variable(ke)?I.throw_error(x.error.instantiation(y.indicator)):I.throw_error(x.error.type("list",$,y.indicator));return}else{var st=ie.alias;if(st&&I.get_stream_by_alias(st)){I.throw_error(x.error.permission("open","source_sink",new H("alias",[new H(st,[])]),y.indicator));return}ie.type||(ie.type="text");var ht;if(x.type.is_atom(F)?ht=I.file_system_open(F.id,ie.type,z.id):ht=F.stream(ie.type,z.id),ht===!1){I.throw_error(x.error.permission("open","source_sink",F,y.indicator));return}else if(ht===null){I.throw_error(x.error.existence("source_sink",F,y.indicator));return}var Ut=new Me(ht,z.id,ie.alias,ie.type,ie.reposition==="true",ie.eof_action);st?I.session.streams[st]=Ut:I.session.streams[Ut.id]=Ut,I.prepend([new Qe(P.goal.replace(new H("=",[X,Ut])),P.substitution,P)])}}},"close/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H("close",[F,new H("[]",[])])),P.substitution,P)])},"close/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(z))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(z))I.throw_error(x.error.type("list",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else{for(var $={},ie=z,ke;x.type.is_term(ie)&&ie.indicator==="./2";){if(ke=ie.args[0],x.type.is_variable(ke)){I.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_close_option(ke)){I.throw_error(x.error.domain("close_option",ke,y.indicator));return}$[ke.id]=ke.args[0].id==="true",ie=ie.args[1]}if(ie.indicator!=="[]/0"){x.type.is_variable(ie)?I.throw_error(x.error.instantiation(y.indicator)):I.throw_error(x.error.type("list",z,y.indicator));return}else{if(X===I.session.standard_input||X===I.session.standard_output){I.success(P);return}else X===I.session.current_input?I.session.current_input=I.session.standard_input:X===I.session.current_output&&(I.session.current_output=I.session.current_output);X.alias!==null?delete I.session.streams[X.alias]:delete I.session.streams[X.id],X.output&&X.stream.flush();var Ne=X.stream.close();X.stream=null,($.force===!0||Ne===!0)&&I.success(P)}}},"flush_output/0":function(I,P,y){I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("flush_output",[new me("S")])])),P.substitution,P)])},"flush_output/1":function(I,P,y){var F=y.args[0],z=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(z)||z.stream===null?I.throw_error(x.error.existence("stream",F,y.indicator)):F.input===!0?I.throw_error(x.error.permission("output","stream",output,y.indicator)):(z.stream.flush(),I.success(P))},"stream_property/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_variable(F)&&(!x.type.is_stream(X)||X.stream===null))I.throw_error(x.error.existence("stream",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_stream_property(z))I.throw_error(x.error.domain("stream_property",z,y.indicator));else{var $=[],ie=[];if(!x.type.is_variable(F))$.push(X);else for(var ke in I.session.streams)$.push(I.session.streams[ke]);for(var Ne=0;Ne<$.length;Ne++){var st=[];$[Ne].filename&&st.push(new H("file_name",[new H($[Ne].file_name,[])])),st.push(new H("mode",[new H($[Ne].mode,[])])),st.push(new H($[Ne].input?"input":"output",[])),$[Ne].alias&&st.push(new H("alias",[new H($[Ne].alias,[])])),st.push(new H("position",[typeof $[Ne].position=="number"?new be($[Ne].position,!1):new H($[Ne].position,[])])),st.push(new H("end_of_stream",[new H($[Ne].position==="end_of_stream"?"at":$[Ne].position==="past_end_of_stream"?"past":"not",[])])),st.push(new H("eof_action",[new H($[Ne].eof_action,[])])),st.push(new H("reposition",[new H($[Ne].reposition?"true":"false",[])])),st.push(new H("type",[new H($[Ne].type,[])]));for(var ht=0;ht<st.length;ht++)ie.push(new Qe(P.goal.replace(new H(",",[new H("=",[x.type.is_variable(F)?F:X,$[Ne]]),new H("=",[z,st[ht]])])),P.substitution,P))}I.prepend(ie)}},"at_end_of_stream/0":function(I,P,y){I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H(",",[new H("stream_property",[new me("S"),new H("end_of_stream",[new me("E")])]),new H(",",[new H("!",[]),new H(";",[new H("=",[new me("E"),new H("at",[])]),new H("=",[new me("E"),new H("past",[])])])])])])),P.substitution,P)])},"at_end_of_stream/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("stream_property",[F,new H("end_of_stream",[new me("E")])]),new H(",",[new H("!",[]),new H(";",[new H("=",[new me("E"),new H("at",[])]),new H("=",[new me("E"),new H("past",[])])])])])),P.substitution,P)])},"set_stream_position/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?I.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?I.throw_error(x.error.existence("stream",F,y.indicator)):x.type.is_stream_position(z)?X.reposition===!1?I.throw_error(x.error.permission("reposition","stream",F,y.indicator)):(x.type.is_integer(z)?X.position=z.value:X.position=z.id,I.success(P)):I.throw_error(x.error.domain("stream_position",z,y.indicator))},"get_char/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("get_char",[new me("S"),F])])),P.substitution,P)])},"get_char/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))I.throw_error(x.error.type("in_character",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")I.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else{if($=X.stream.get(1,X.position),$===null){I.throw_error(x.error.representation("character",y.indicator));return}X.position++}I.prepend([new Qe(P.goal.replace(new H("=",[new H($,[]),z])),P.substitution,P)])}},"get_code/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("get_code",[new me("S"),F])])),P.substitution,P)])},"get_code/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))I.throw_error(x.error.type("integer",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")I.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$=-1,X.position="past_end_of_stream";else{if($=X.stream.get(1,X.position),$===null){I.throw_error(x.error.representation("character",y.indicator));return}$=n($,0),X.position++}I.prepend([new Qe(P.goal.replace(new H("=",[new be($,!1),z])),P.substitution,P)])}},"peek_char/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("peek_char",[new me("S"),F])])),P.substitution,P)])},"peek_char/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))I.throw_error(x.error.type("in_character",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")I.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else if($=X.stream.get(1,X.position),$===null){I.throw_error(x.error.representation("character",y.indicator));return}I.prepend([new Qe(P.goal.replace(new H("=",[new H($,[]),z])),P.substitution,P)])}},"peek_code/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("peek_code",[new me("S"),F])])),P.substitution,P)])},"peek_code/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))I.throw_error(x.error.type("integer",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")I.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$=-1,X.position="past_end_of_stream";else{if($=X.stream.get(1,X.position),$===null){I.throw_error(x.error.representation("character",y.indicator));return}$=n($,0)}I.prepend([new Qe(P.goal.replace(new H("=",[new be($,!1),z])),P.substitution,P)])}},"put_char/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("put_char",[new me("S"),F])])),P.substitution,P)])},"put_char/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_character(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?I.throw_error(x.error.existence("stream",F,y.indicator)):X.input?I.throw_error(x.error.permission("output","stream",F,y.indicator)):X.type==="binary"?I.throw_error(x.error.permission("output","binary_stream",F,y.indicator)):X.stream.put(z.id,X.position)&&(typeof X.position=="number"&&X.position++,I.success(P)):I.throw_error(x.error.type("character",z,y.indicator))},"put_code/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("put_code",[new me("S"),F])])),P.substitution,P)])},"put_code/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(z)?x.type.is_character_code(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?I.throw_error(x.error.existence("stream",F,y.indicator)):X.input?I.throw_error(x.error.permission("output","stream",F,y.indicator)):X.type==="binary"?I.throw_error(x.error.permission("output","binary_stream",F,y.indicator)):X.stream.put_char(u(z.value),X.position)&&(typeof X.position=="number"&&X.position++,I.success(P)):I.throw_error(x.error.representation("character_code",y.indicator)):I.throw_error(x.error.type("integer",z,y.indicator))},"nl/0":function(I,P,y){I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("put_char",[new me("S"),new H(`
265`,[])])])),P.substitution,P)])},"nl/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H("put_char",[F,new H(`
266`,[])])),P.substitution,P)])},"get_byte/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("get_byte",[new me("S"),F])])),P.substitution,P)])},"get_byte/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else{if($=X.stream.get_byte(X.position),$===null){I.throw_error(x.error.representation("byte",y.indicator));return}X.position++}I.prepend([new Qe(P.goal.replace(new H("=",[new be($,!1),z])),P.substitution,P)])}},"peek_byte/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("peek_byte",[new me("S"),F])])),P.substitution,P)])},"peek_byte/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else if($=X.stream.get_byte(X.position),$===null){I.throw_error(x.error.representation("byte",y.indicator));return}I.prepend([new Qe(P.goal.replace(new H("=",[new be($,!1),z])),P.substitution,P)])}},"put_byte/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("put_byte",[new me("S"),F])])),P.substitution,P)])},"put_byte/2":function(I,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?I.throw_error(x.error.existence("stream",F,y.indicator)):X.input?I.throw_error(x.error.permission("output","stream",F,y.indicator)):X.type==="text"?I.throw_error(x.error.permission("output","text_stream",F,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position=="number"&&X.position++,I.success(P)):I.throw_error(x.error.type("byte",z,y.indicator))},"read/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("read_term",[new me("S"),F,new H("[]",[])])])),P.substitution,P)])},"read/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H("read_term",[F,z,new H("[]",[])])),P.substitution,P)])},"read_term/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("read_term",[new me("S"),F,z])])),P.substitution,P)])},"read_term/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))I.throw_error(x.error.type("list",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if($.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if($.type==="binary")I.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{for(var ie={},ke=X,Ne;x.type.is_term(ke)&&ke.indicator==="./2";){if(Ne=ke.args[0],x.type.is_variable(Ne)){I.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_read_option(Ne)){I.throw_error(x.error.domain("read_option",Ne,y.indicator));return}ie[Ne.id]=Ne.args[0],ke=ke.args[1]}if(ke.indicator!=="[]/0"){x.type.is_variable(ke)?I.throw_error(x.error.instantiation(y.indicator)):I.throw_error(x.error.type("list",X,y.indicator));return}else{for(var st,ht,Ut,Xt="",xt=[],tn=null;tn===null||tn.name!=="atom"||tn.value!=="."||Ut.type===A&&x.flatten_error(new H("throw",[Ut.value])).found==="token_not_found";){if(st=$.stream.get(1,$.position),st===null){I.throw_error(x.error.representation("character",y.indicator));return}if(st==="end_of_file"||st==="past_end_of_file"){Ut?I.throw_error(x.error.syntax(xt[Ut.len-1],". or expression expected",!1)):I.throw_error(x.error.syntax(null,"token not found",!0));return}$.position++,Xt+=st,ht=new _(I),ht.new_text(Xt),xt=ht.get_tokens(),tn=xt!==null&&xt.length>0?xt[xt.length-1]:null,xt!==null&&(Ut=V(I,xt,0,I.__get_max_priority(),!1))}if(Ut.type===p&&Ut.len===xt.length-1&&tn.value==="."){Ut=Ut.value.rename(I);var Dr=new H("=",[z,Ut]);if(ie.variables){var fr=g(o(Ee(Ut.variables()),function(Br){return new me(Br)}));Dr=new H(",",[Dr,new H("=",[ie.variables,fr])])}if(ie.variable_names){var fr=g(o(Ee(Ut.variables()),function(jr){var Hn;for(Hn in I.session.renamed_variables)if(I.session.renamed_variables.hasOwnProperty(Hn)&&I.session.renamed_variables[Hn]===jr)break;return new H("=",[new H(Hn,[]),new me(jr)])}));Dr=new H(",",[Dr,new H("=",[ie.variable_names,fr])])}if(ie.singletons){var fr=g(o(new _e(Ut,null).singleton_variables(),function(jr){var Hn;for(Hn in I.session.renamed_variables)if(I.session.renamed_variables.hasOwnProperty(Hn)&&I.session.renamed_variables[Hn]===jr)break;return new H("=",[new H(Hn,[]),new me(jr)])}));Dr=new H(",",[Dr,new H("=",[ie.singletons,fr])])}I.prepend([new Qe(P.goal.replace(Dr),P.substitution,P)])}else Ut.type===p?I.throw_error(x.error.syntax(xt[Ut.len],"unexpected token",!1)):I.throw_error(Ut.value)}}},"write/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("write",[new me("S"),F])])),P.substitution,P)])},"write/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H("write_term",[F,z,new H(".",[new H("quoted",[new H("false",[])]),new H(".",[new H("ignore_ops",[new H("false")]),new H(".",[new H("numbervars",[new H("true")]),new H("[]",[])])])])])),P.substitution,P)])},"writeq/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("writeq",[new me("S"),F])])),P.substitution,P)])},"writeq/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H("write_term",[F,z,new H(".",[new H("quoted",[new H("true",[])]),new H(".",[new H("ignore_ops",[new H("false")]),new H(".",[new H("numbervars",[new H("true")]),new H("[]",[])])])])])),P.substitution,P)])},"write_canonical/1":function(I,P,y){var F=y.args[0];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("write_canonical",[new me("S"),F])])),P.substitution,P)])},"write_canonical/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H("write_term",[F,z,new H(".",[new H("quoted",[new H("true",[])]),new H(".",[new H("ignore_ops",[new H("true")]),new H(".",[new H("numbervars",[new H("false")]),new H("[]",[])])])])])),P.substitution,P)])},"write_term/2":function(I,P,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(P.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("write_term",[new me("S"),F,z])])),P.substitution,P)])},"write_term/3":function(I,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))I.throw_error(x.error.type("list",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if($.input)I.throw_error(x.error.permission("output","stream",F,y.indicator));else if($.type==="binary")I.throw_error(x.error.permission("output","binary_stream",F,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")I.throw_error(x.error.permission("output","past_end_of_stream",F,y.indicator));else{for(var ie={},ke=X,Ne;x.type.is_term(ke)&&ke.indicator==="./2";){if(Ne=ke.args[0],x.type.is_variable(Ne)){I.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_write_option(Ne)){I.throw_error(x.error.domain("write_option",Ne,y.indicator));return}ie[Ne.id]=Ne.args[0].id==="true",ke=ke.args[1]}if(ke.indicator!=="[]/0"){x.type.is_variable(ke)?I.throw_error(x.error.instantiation(y.indicator)):I.throw_error(x.error.type("list",X,y.indicator));return}else{ie.session=I.session;var st=z.toString(ie);$.stream.put(st,$.position),typeof $.position=="number"&&($.position+=st.length),I.success(P)}}},"halt/0":function(I,P,y){I.points=[]},"halt/1":function(I,P,y){var F=y.args[0];x.type.is_variable(F)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(F)?I.points=[]:I.throw_error(x.error.type("integer",F,y.indicator))},"current_prolog_flag/2":function(I,P,y){var F=y.args[0],z=y.args[1];if(!x.type.is_variable(F)&&!x.type.is_atom(F))I.throw_error(x.error.type("atom",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_flag(F))I.throw_error(x.error.domain("prolog_flag",F,y.indicator));else{var X=[];for(var $ in x.flag)if(!!x.flag.hasOwnProperty($)){var ie=new H(",",[new H("=",[new H($),F]),new H("=",[I.get_flag($),z])]);X.push(new Qe(P.goal.replace(ie),P.substitution,P))}I.prepend(X)}},"set_prolog_flag/2":function(I,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)||x.type.is_variable(z)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?x.type.is_flag(F)?x.type.is_value_flag(F,z)?x.type.is_modifiable_flag(F)?(I.session.flag[F.id]=z,I.success(P)):I.throw_error(x.error.permission("modify","flag",F)):I.throw_error(x.error.domain("flag_value",new H("+",[F,z]),y.indicator)):I.throw_error(x.error.domain("prolog_flag",F,y.indicator)):I.throw_error(x.error.type("atom",F,y.indicator))}},flag:{bounded:{allowed:[new H("true"),new H("false")],value:new H("true"),changeable:!1},max_integer:{allowed:[new be(Number.MAX_SAFE_INTEGER)],value:new be(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new be(Number.MIN_SAFE_INTEGER)],value:new be(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new H("down"),new H("toward_zero")],value:new H("toward_zero"),changeable:!1},char_conversion:{allowed:[new H("on"),new H("off")],value:new H("on"),changeable:!0},debug:{allowed:[new H("on"),new H("off")],value:new H("off"),changeable:!0},max_arity:{allowed:[new H("unbounded")],value:new H("unbounded"),changeable:!1},unknown:{allowed:[new H("error"),new H("fail"),new H("warning")],value:new H("error"),changeable:!0},double_quotes:{allowed:[new H("chars"),new H("codes"),new H("atom")],value:new H("codes"),changeable:!0},occurs_check:{allowed:[new H("false"),new H("true")],value:new H("false"),changeable:!0},dialect:{allowed:[new H("tau")],value:new H("tau"),changeable:!1},version_data:{allowed:[new H("tau",[new be(t.major,!1),new be(t.minor,!1),new be(t.patch,!1),new H(t.status)])],value:new H("tau",[new be(t.major,!1),new be(t.minor,!1),new be(t.patch,!1),new H(t.status)]),changeable:!1},nodejs:{allowed:[new H("yes"),new H("no")],value:new H(typeof ml<"u"&&ml.exports?"yes":"no"),changeable:!1}},unify:function(I,P,y){y=y===void 0?!1:y;for(var F=[{left:I,right:P}],z={};F.length!==0;){var X=F.pop();if(I=X.left,P=X.right,x.type.is_term(I)&&x.type.is_term(P)){if(I.indicator!==P.indicator)return null;for(var $=0;$<I.args.length;$++)F.push({left:I.args[$],right:P.args[$]})}else if(x.type.is_number(I)&&x.type.is_number(P)){if(I.value!==P.value||I.is_float!==P.is_float)return null}else if(x.type.is_variable(I)){if(x.type.is_variable(P)&&I.id===P.id)continue;if(y===!0&&P.variables().indexOf(I.id)!==-1)return null;if(I.id!=="_"){var ie=new Te;ie.add(I.id,P);for(var $=0;$<F.length;$++)F[$].left=F[$].left.apply(ie),F[$].right=F[$].right.apply(ie);for(var $ in z)z[$]=z[$].apply(ie);z[I.id]=P}}else if(x.type.is_variable(P))F.push({left:P,right:I});else if(I.unify!==void 0){if(!I.unify(P))return null}else return null}return new Te(z)},compare:function(I,P){var y=x.type.compare(I,P);return y!==0?y:I.compare(P)},arithmetic_compare:function(I,P,y){var F=P.interpret(I);if(x.type.is_number(F)){var z=y.interpret(I);return x.type.is_number(z)?F.value<z.value?-1:F.value>z.value?1:0:z}else return F},operate:function(I,P){if(x.type.is_operator(P)){for(var y=x.type.is_operator(P),F=[],z,X=!1,$=0;$<P.args.length;$++){if(z=P.args[$].interpret(I),x.type.is_number(z)){if(y.type_args!==null&&z.is_float!==y.type_args)return x.error.type(y.type_args?"float":"integer",z,I.__call_indicator);F.push(z.value)}else return z;X=X||z.is_float}return F.push(I),z=x.arithmetic.evaluation[P.indicator].fn.apply(this,F),X=y.type_result===null?X:y.type_result,x.type.is_term(z)?z:z===Number.POSITIVE_INFINITY||z===Number.NEGATIVE_INFINITY?x.error.evaluation("overflow",I.__call_indicator):X===!1&&I.get_flag("bounded").id==="true"&&(z>I.get_flag("max_integer").value||z<I.get_flag("min_integer").value)?x.error.evaluation("int_overflow",I.__call_indicator):new be(z,X)}else return x.error.type("evaluable",P.indicator,I.__call_indicator)},error:{existence:function(I,P,y){return typeof P=="string"&&(P=Z(P)),new H("error",[new H("existence_error",[new H(I),P]),Z(y)])},type:function(I,P,y){return new H("error",[new H("type_error",[new H(I),P]),Z(y)])},instantiation:function(I){return new H("error",[new H("instantiation_error"),Z(I)])},domain:function(I,P,y){return new H("error",[new H("domain_error",[new H(I),P]),Z(y)])},representation:function(I,P){return new H("error",[new H("representation_error",[new H(I)]),Z(P)])},permission:function(I,P,y,F){return new H("error",[new H("permission_error",[new H(I),new H(P),y]),Z(F)])},evaluation:function(I,P){return new H("error",[new H("evaluation_error",[new H(I)]),Z(P)])},syntax:function(I,P,y){I=I||{value:"",line:0,column:0,matches:[""],start:0};var F=y&&I.matches.length>0?I.start+I.matches[0].length:I.start,z=y?new H("token_not_found"):new H("found",[new H(I.value.toString())]),X=new H(".",[new H("line",[new be(I.line+1)]),new H(".",[new H("column",[new be(F+1)]),new H(".",[z,new H("[]",[])])])]);return new H("error",[new H("syntax_error",[new H(P)]),X])},syntax_by_predicate:function(I,P){return new H("error",[new H("syntax_error",[new H(I)]),Z(P)])}},warning:{singleton:function(I,P,y){for(var F=new H("[]"),z=I.length-1;z>=0;z--)F=new H(".",[new me(I[z]),F]);return new H("warning",[new H("singleton_variables",[F,Z(P)]),new H(".",[new H("line",[new be(y,!1)]),new H("[]")])])},failed_goal:function(I,P){return new H("warning",[new H("failed_goal",[I]),new H(".",[new H("line",[new be(P,!1)]),new H("[]")])])}},format_variable:function(I){return"_"+I},format_answer:function(I,P,F){P instanceof qe&&(P=P.thread);var F=F||{};if(F.session=P?P.session:void 0,x.type.is_error(I))return"uncaught exception: "+I.args[0].toString();if(I===!1)return"false.";if(I===null)return"limit exceeded ;";var z=0,X="";if(x.type.is_substitution(I)){var $=I.domain(!0);I=I.filter(function(Ne,st){return!x.type.is_variable(st)||$.indexOf(st.id)!==-1&&Ne!==st.id})}for(var ie in I.links)!I.links.hasOwnProperty(ie)||(z++,X!==""&&(X+=", "),X+=ie.toString(F)+" = "+I.links[ie].toString(F));var ke=typeof P>"u"||P.points.length>0?" ;":".";return z===0?"true"+ke:X+ke},flatten_error:function(I){if(!x.type.is_error(I))return null;I=I.args[0];var P={};return P.type=I.args[0].id,P.thrown=P.type==="syntax_error"?null:I.args[1].id,P.expected=null,P.found=null,P.representation=null,P.existence=null,P.existence_type=null,P.line=null,P.column=null,P.permission_operation=null,P.permission_type=null,P.evaluation_type=null,P.type==="type_error"||P.type==="domain_error"?(P.expected=I.args[0].args[0].id,P.found=I.args[0].args[1].toString()):P.type==="syntax_error"?I.args[1].indicator==="./2"?(P.expected=I.args[0].args[0].id,P.found=I.args[1].args[1].args[1].args[0],P.found=P.found.id==="token_not_found"?P.found.id:P.found.args[0].id,P.line=I.args[1].args[0].args[0].value,P.column=I.args[1].args[1].args[0].args[0].value):P.thrown=I.args[1].id:P.type==="permission_error"?(P.found=I.args[0].args[2].toString(),P.permission_operation=I.args[0].args[0].id,P.permission_type=I.args[0].args[1].id):P.type==="evaluation_error"?P.evaluation_type=I.args[0].args[0].id:P.type==="representation_error"?P.representation=I.args[0].args[0].id:P.type==="existence_error"&&(P.existence=I.args[0].args[1].toString(),P.existence_type=I.args[0].args[0].id),P},create:function(I){return new x.type.Session(I)}};typeof ml<"u"?ml.exports=x:window.pl=x})()});function xme(t,e,r){t.prepend(r.map(o=>new Na.default.type.State(e.goal.replace(o),e.substitution,e)))}function EH(t){let e=Qme.get(t.session);if(e==null)throw new Error("Assertion failed: A project should have been registered for the active session");return e}function kme(t,e){Qme.set(t,e),t.consult(`:- use_module(library(${dgt.id})).`)}var CH,Na,bme,lh,hgt,ggt,Qme,dgt,Fme=dt(()=>{Ke();CH=tt(r2()),Na=tt(yH()),bme=tt(Ie("vm")),{is_atom:lh,is_variable:hgt,is_instantiated_list:ggt}=Na.default.type;Qme=new WeakMap;dgt=new Na.default.type.Module("constraints",{["project_workspaces_by_descriptor/3"]:(t,e,r)=>{let[o,a,n]=r.args;if(!lh(o)||!lh(a)){t.throw_error(Na.default.error.instantiation(r.indicator));return}let u=Y.parseIdent(o.id),A=Y.makeDescriptor(u,a.id),h=EH(t).tryWorkspaceByDescriptor(A);hgt(n)&&h!==null&&xme(t,e,[new Na.default.type.Term("=",[n,new Na.default.type.Term(String(h.relativeCwd))])]),lh(n)&&h!==null&&h.relativeCwd===n.id&&t.success(e)},["workspace_field/3"]:(t,e,r)=>{let[o,a,n]=r.args;if(!lh(o)||!lh(a)){t.throw_error(Na.default.error.instantiation(r.indicator));return}let A=EH(t).tryWorkspaceByCwd(o.id);if(A==null)return;let p=(0,CH.default)(A.manifest.raw,a.id);typeof p>"u"||xme(t,e,[new Na.default.type.Term("=",[n,new Na.default.type.Term(typeof p=="object"?JSON.stringify(p):p)])])},["workspace_field_test/3"]:(t,e,r)=>{let[o,a,n]=r.args;t.prepend([new Na.default.type.State(e.goal.replace(new Na.default.type.Term("workspace_field_test",[o,a,n,new Na.default.type.Term("[]",[])])),e.substitution,e)])},["workspace_field_test/4"]:(t,e,r)=>{let[o,a,n,u]=r.args;if(!lh(o)||!lh(a)||!lh(n)||!ggt(u)){t.throw_error(Na.default.error.instantiation(r.indicator));return}let p=EH(t).tryWorkspaceByCwd(o.id);if(p==null)return;let h=(0,CH.default)(p.manifest.raw,a.id);if(typeof h>"u")return;let C={$$:h};for(let[v,b]of u.toJavaScript().entries())C[`$${v}`]=b;bme.default.runInNewContext(n.id,C)&&t.success(e)}},["project_workspaces_by_descriptor/3","workspace_field/3","workspace_field_test/3","workspace_field_test/4"])});var g2={};Yt(g2,{Constraints:()=>h2,DependencyType:()=>Lme});function Zs(t){if(t instanceof EC.default.type.Num)return t.value;if(t instanceof EC.default.type.Term)switch(t.indicator){case"throw/1":return Zs(t.args[0]);case"error/1":return Zs(t.args[0]);case"error/2":if(t.args[0]instanceof EC.default.type.Term&&t.args[0].indicator==="syntax_error/1")return Object.assign(Zs(t.args[0]),...Zs(t.args[1]));{let e=Zs(t.args[0]);return e.message+=` (in ${Zs(t.args[1])})`,e}case"syntax_error/1":return new Vt(43,`Syntax error: ${Zs(t.args[0])}`);case"existence_error/2":return new Vt(44,`Existence error: ${Zs(t.args[0])} ${Zs(t.args[1])} not found`);case"instantiation_error/0":return new Vt(75,"Instantiation error: an argument is variable when an instantiated argument was expected");case"line/1":return{line:Zs(t.args[0])};case"column/1":return{column:Zs(t.args[0])};case"found/1":return{found:Zs(t.args[0])};case"./2":return[Zs(t.args[0])].concat(Zs(t.args[1]));case"//2":return`${Zs(t.args[0])}/${Zs(t.args[1])}`;default:return t.id}throw`couldn't pretty print because of unsupported node ${t}`}function Tme(t){let e;try{e=Zs(t)}catch(r){throw typeof r=="string"?new Vt(42,`Unknown error: ${t} (note: ${r})`):r}return typeof e.line<"u"&&typeof e.column<"u"&&(e.message+=` at line ${e.line}, column ${e.column}`),e}function nm(t){return t.id==="null"?null:`${t.toJavaScript()}`}function mgt(t){if(t.id==="null")return null;{let e=t.toJavaScript();if(typeof e!="string")return JSON.stringify(e);try{return JSON.stringify(JSON.parse(e))}catch{return JSON.stringify(e)}}}function ch(t){return typeof t=="string"?`'${t}'`:"[]"}var Nme,EC,Lme,Rme,IH,h2,d2=dt(()=>{Ke();Ke();St();Nme=tt(fme()),EC=tt(yH());A2();Fme();(0,Nme.default)(EC.default);Lme=(o=>(o.Dependencies="dependencies",o.DevDependencies="devDependencies",o.PeerDependencies="peerDependencies",o))(Lme||{}),Rme=["dependencies","devDependencies","peerDependencies"];IH=class{constructor(e,r){let o=1e3*e.workspaces.length;this.session=EC.default.create(o),kme(this.session,e),this.session.consult(":- use_module(library(lists))."),this.session.consult(r)}fetchNextAnswer(){return new Promise(e=>{this.session.answer(r=>{e(r)})})}async*makeQuery(e){let r=this.session.query(e);if(r!==!0)throw Tme(r);for(;;){let o=await this.fetchNextAnswer();if(o===null)throw new Vt(79,"Resolution limit exceeded");if(!o)break;if(o.id==="throw")throw Tme(o);yield o}}};h2=class{constructor(e){this.source="";this.project=e;let r=e.configuration.get("constraintsPath");oe.existsSync(r)&&(this.source=oe.readFileSync(r,"utf8"))}static async find(e){return new h2(e)}getProjectDatabase(){let e="";for(let r of Rme)e+=`dependency_type(${r}).
267`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;e+=`workspace(${ch(o)}).
268`,e+=`workspace_ident(${ch(o)}, ${ch(Y.stringifyIdent(r.locator))}).
269`,e+=`workspace_version(${ch(o)}, ${ch(r.manifest.version)}).
270`;for(let a of Rme)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${ch(o)}, ${ch(Y.stringifyIdent(n))}, ${ch(n.range)}, ${a}).
271`}return e+=`workspace(_) :- false.
272`,e+=`workspace_ident(_, _) :- false.
273`,e+=`workspace_version(_, _) :- false.
274`,e+=`workspace_has_dependency(_, _, _, _) :- false.
275`,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false.
276`,e+=`gen_enforced_field(_, _, _) :- false.
277`,e}get fullSource(){return`${this.getProjectDatabase()}
278${this.source}
279${this.getDeclarations()}`}createSession(){return new IH(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of e){let p=u2([A,Y.stringifyIdent(n)]),h=We.getMapWithDefault(o,a.cwd);We.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=u2(n),p=We.getMapWithDefault(o,a.cwd);We.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=J.resolve(this.project.cwd,nm(o.links.WorkspaceCwd)),n=nm(o.links.DependencyIdent),u=nm(o.links.DependencyRange),A=nm(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=Y.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return We.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>Y.stringifyIdent(o.locator),({dependencyIdent:o})=>Y.stringifyIdent(o)])}async genEnforcedFields(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=J.resolve(this.project.cwd,nm(o.links.WorkspaceCwd)),n=nm(o.links.FieldPath),u=mgt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return We.sortMap(r,[({workspace:o})=>Y.stringifyIdent(o.locator),({fieldPath:o})=>o])}async*query(e){let r=this.createSession();for await(let o of r.makeQuery(e)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=nm(u));yield a}}}});var Gme=U(mQ=>{"use strict";Object.defineProperty(mQ,"__esModule",{value:!0});function F2(t){let e=[...t.caches],r=e.shift();return r===void 0?jme():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>F2({caches:e}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>F2({caches:e}).set(o,a))},delete(o){return r.delete(o).catch(()=>F2({caches:e}).delete(o))},clear(){return r.clear().catch(()=>F2({caches:e}).clear())}}}function jme(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}mQ.createFallbackableCache=F2;mQ.createNullCache=jme});var Yme=U((_Wt,Wme)=>{Wme.exports=Gme()});var Kme=U(NH=>{"use strict";Object.defineProperty(NH,"__esModule",{value:!0});function Lgt(t={serializable:!0}){let e={};return{get(r,o,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}NH.createInMemoryCache=Lgt});var Jme=U((qWt,Vme)=>{Vme.exports=Kme()});var Xme=U(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});function Ogt(t,e,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===LH.WithinHeaders?o:{}},queryParameters(){return t===LH.WithinQueryParameters?o:{}}}}function Mgt(t){let e=0,r=()=>(e++,new Promise(o=>{setTimeout(()=>{o(t(r))},Math.min(100*e,1e3))}));return t(r)}function zme(t,e=(r,o)=>Promise.resolve()){return Object.assign(t,{wait(r){return zme(t.then(o=>Promise.all([e(o,r),o])).then(o=>o[1]))}})}function Ugt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),o=t[e];t[e]=t[r],t[r]=o}return t}function _gt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function Hgt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var qgt="4.14.2",jgt=t=>()=>t.transporter.requester.destroy(),LH={WithinQueryParameters:0,WithinHeaders:1};nu.AuthMode=LH;nu.addMethods=_gt;nu.createAuth=Ogt;nu.createRetryablePromise=Mgt;nu.createWaitablePromise=zme;nu.destroy=jgt;nu.encode=Hgt;nu.shuffle=Ugt;nu.version=qgt});var R2=U((GWt,Zme)=>{Zme.exports=Xme()});var $me=U(OH=>{"use strict";Object.defineProperty(OH,"__esModule",{value:!0});var Ggt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};OH.MethodEnum=Ggt});var T2=U((YWt,eye)=>{eye.exports=$me()});var gye=U(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});var rye=T2();function MH(t,e){let r=t||{},o=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(o[a]=r[a])}),{data:Object.entries(o).length>0?o:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var N2={Read:1,Write:2,Any:3},BC={Up:1,Down:2,Timeouted:3},nye=2*60*1e3;function _H(t,e=BC.Up){return{...t,status:e,lastUpdate:Date.now()}}function iye(t){return t.status===BC.Up||Date.now()-t.lastUpdate>nye}function sye(t){return t.status===BC.Timeouted&&Date.now()-t.lastUpdate<=nye}function HH(t){return typeof t=="string"?{protocol:"https",url:t,accept:N2.Any}:{protocol:t.protocol||"https",url:t.url,accept:t.accept||N2.Any}}function Wgt(t,e){return Promise.all(e.map(r=>t.get(r,()=>Promise.resolve(_H(r))))).then(r=>{let o=r.filter(A=>iye(A)),a=r.filter(A=>sye(A)),n=[...o,...a],u=n.length>0?n.map(A=>HH(A)):e;return{getTimeout(A,p){return(a.length===0&&A===0?1:a.length+3+A)*p},statelessHosts:u}})}var Ygt=({isTimedOut:t,status:e})=>!t&&~~e===0,Kgt=t=>{let e=t.status;return t.isTimedOut||Ygt(t)||~~(e/100)!==2&&~~(e/100)!==4},Vgt=({status:t})=>~~(t/100)===2,Jgt=(t,e)=>Kgt(t)?e.onRetry(t):Vgt(t)?e.onSuccess(t):e.onFail(t);function tye(t,e,r,o){let a=[],n=uye(r,o),u=Aye(t,o),A=r.method,p=r.method!==rye.MethodEnum.Get?{}:{...r.data,...o.data},h={"x-algolia-agent":t.userAgent.value,...t.queryParameters,...p,...o.queryParameters},C=0,w=(v,b)=>{let E=v.pop();if(E===void 0)throw hye(UH(a));let R={data:n,headers:u,method:A,url:lye(E,r.path,h),connectTimeout:b(C,t.timeouts.connect),responseTimeout:b(C,o.timeout)},L=V=>{let re={request:R,response:V,host:E,triesLeft:v.length};return a.push(re),re},_={onSuccess:V=>oye(V),onRetry(V){let re=L(V);return V.isTimedOut&&C++,Promise.all([t.logger.info("Retryable failure",qH(re)),t.hostsCache.set(E,_H(E,V.isTimedOut?BC.Timeouted:BC.Down))]).then(()=>w(v,b))},onFail(V){throw L(V),aye(V,UH(a))}};return t.requester.send(R).then(V=>Jgt(V,_))};return Wgt(t.hostsCache,e).then(v=>w([...v.statelessHosts].reverse(),v.getTimeout))}function zgt(t){let{hostsCache:e,logger:r,requester:o,requestsCache:a,responsesCache:n,timeouts:u,userAgent:A,hosts:p,queryParameters:h,headers:C}=t,w={hostsCache:e,logger:r,requester:o,requestsCache:a,responsesCache:n,timeouts:u,userAgent:A,headers:C,queryParameters:h,hosts:p.map(v=>HH(v)),read(v,b){let E=MH(b,w.timeouts.read),R=()=>tye(w,w.hosts.filter(V=>(V.accept&N2.Read)!==0),v,E);if((E.cacheable!==void 0?E.cacheable:v.cacheable)!==!0)return R();let _={request:v,mappedRequestOptions:E,transporter:{queryParameters:w.queryParameters,headers:w.headers}};return w.responsesCache.get(_,()=>w.requestsCache.get(_,()=>w.requestsCache.set(_,R()).then(V=>Promise.all([w.requestsCache.delete(_),V]),V=>Promise.all([w.requestsCache.delete(_),Promise.reject(V)])).then(([V,re])=>re)),{miss:V=>w.responsesCache.set(_,V)})},write(v,b){return tye(w,w.hosts.filter(E=>(E.accept&N2.Write)!==0),v,MH(b,w.timeouts.write))}};return w}function Xgt(t){let e={value:`Algolia for JavaScript (${t})`,add(r){let o=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return e.value.indexOf(o)===-1&&(e.value=`${e.value}${o}`),e}};return e}function oye(t){try{return JSON.parse(t.content)}catch(e){throw pye(e.message,t)}}function aye({content:t,status:e},r){let o=t;try{o=JSON.parse(t).message}catch{}return fye(o,e,r)}function Zgt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}function lye(t,e,r){let o=cye(r),a=`${t.protocol}://${t.url}/${e.charAt(0)==="/"?e.substr(1):e}`;return o.length&&(a+=`?${o}`),a}function cye(t){let e=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(t).map(r=>Zgt("%s=%s",r,e(t[r])?JSON.stringify(t[r]):t[r])).join("&")}function uye(t,e){if(t.method===rye.MethodEnum.Get||t.data===void 0&&e.data===void 0)return;let r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function Aye(t,e){let r={...t.headers,...e.headers},o={};return Object.keys(r).forEach(a=>{let n=r[a];o[a.toLowerCase()]=n}),o}function UH(t){return t.map(e=>qH(e))}function qH(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function fye(t,e,r){return{name:"ApiError",message:t,status:e,transporterStackTrace:r}}function pye(t,e){return{name:"DeserializationError",message:t,response:e}}function hye(t){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:t}}bi.CallEnum=N2;bi.HostStatusEnum=BC;bi.createApiError=fye;bi.createDeserializationError=pye;bi.createMappedRequestOptions=MH;bi.createRetryError=hye;bi.createStatefulHost=_H;bi.createStatelessHost=HH;bi.createTransporter=zgt;bi.createUserAgent=Xgt;bi.deserializeFailure=aye;bi.deserializeSuccess=oye;bi.isStatefulHostTimeouted=sye;bi.isStatefulHostUp=iye;bi.serializeData=uye;bi.serializeHeaders=Aye;bi.serializeQueryParameters=cye;bi.serializeUrl=lye;bi.stackFrameWithoutCredentials=qH;bi.stackTraceWithoutCredentials=UH});var L2=U((VWt,dye)=>{dye.exports=gye()});var mye=U(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var vC=R2(),$gt=L2(),O2=T2(),edt=t=>{let e=t.region||"us",r=vC.createAuth(vC.AuthMode.WithinHeaders,t.appId,t.apiKey),o=$gt.createTransporter({hosts:[{url:`analytics.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a=t.appId;return vC.addMethods({appId:a,transporter:o},t.methods)},tdt=t=>(e,r)=>t.transporter.write({method:O2.MethodEnum.Post,path:"2/abtests",data:e},r),rdt=t=>(e,r)=>t.transporter.write({method:O2.MethodEnum.Delete,path:vC.encode("2/abtests/%s",e)},r),ndt=t=>(e,r)=>t.transporter.read({method:O2.MethodEnum.Get,path:vC.encode("2/abtests/%s",e)},r),idt=t=>e=>t.transporter.read({method:O2.MethodEnum.Get,path:"2/abtests"},e),sdt=t=>(e,r)=>t.transporter.write({method:O2.MethodEnum.Post,path:vC.encode("2/abtests/%s/stop",e)},r);gh.addABTest=tdt;gh.createAnalyticsClient=edt;gh.deleteABTest=rdt;gh.getABTest=ndt;gh.getABTests=idt;gh.stopABTest=sdt});var Eye=U((zWt,yye)=>{yye.exports=mye()});var Iye=U(M2=>{"use strict";Object.defineProperty(M2,"__esModule",{value:!0});var jH=R2(),odt=L2(),Cye=T2(),adt=t=>{let e=t.region||"us",r=jH.createAuth(jH.AuthMode.WithinHeaders,t.appId,t.apiKey),o=odt.createTransporter({hosts:[{url:`personalization.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}});return jH.addMethods({appId:t.appId,transporter:o},t.methods)},ldt=t=>e=>t.transporter.read({method:Cye.MethodEnum.Get,path:"1/strategies/personalization"},e),cdt=t=>(e,r)=>t.transporter.write({method:Cye.MethodEnum.Post,path:"1/strategies/personalization",data:e},r);M2.createPersonalizationClient=adt;M2.getPersonalizationStrategy=ldt;M2.setPersonalizationStrategy=cdt});var Bye=U((ZWt,wye)=>{wye.exports=Iye()});var Oye=U(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});var Ht=R2(),La=L2(),mr=T2(),udt=Ie("crypto");function yQ(t){let e=r=>t.request(r).then(o=>{if(t.batch!==void 0&&t.batch(o.hits),!t.shouldStop(o))return o.cursor?e({cursor:o.cursor}):e({page:(r.page||0)+1})});return e({})}var Adt=t=>{let e=t.appId,r=Ht.createAuth(t.authMode!==void 0?t.authMode:Ht.AuthMode.WithinHeaders,e,t.apiKey),o=La.createTransporter({hosts:[{url:`${e}-dsn.algolia.net`,accept:La.CallEnum.Read},{url:`${e}.algolia.net`,accept:La.CallEnum.Write}].concat(Ht.shuffle([{url:`${e}-1.algolianet.com`},{url:`${e}-2.algolianet.com`},{url:`${e}-3.algolianet.com`}])),...t,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a={transporter:o,appId:e,addAlgoliaAgent(n,u){o.userAgent.add({segment:n,version:u})},clearCache(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(()=>{})}};return Ht.addMethods(a,t.methods)};function vye(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function Dye(){return{name:"ObjectNotFoundError",message:"Object not found."}}function Sye(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var fdt=t=>(e,r)=>{let{queryParameters:o,...a}=r||{},n={acl:e,...o!==void 0?{queryParameters:o}:{}},u=(A,p)=>Ht.createRetryablePromise(h=>U2(t)(A.key,p).catch(C=>{if(C.status!==404)throw C;return h()}));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:"1/keys",data:n},a),u)},pdt=t=>(e,r,o)=>{let a=La.createMappedRequestOptions(o);return a.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:mr.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:r}},a)},hdt=t=>(e,r,o)=>t.transporter.write({method:mr.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:e,cluster:r}},o),gdt=t=>(e,r)=>Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},r),(o,a)=>DC(t)(o.taskID,a)),EQ=t=>(e,r,o)=>{let a=(n,u)=>_2(t)(e,{methods:{waitTask:zi}}).waitTask(n.taskID,u);return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/operation",e),data:{operation:"copy",destination:r}},o),a)},ddt=t=>(e,r,o)=>EQ(t)(e,r,{...o,scope:[IQ.Rules]}),mdt=t=>(e,r,o)=>EQ(t)(e,r,{...o,scope:[IQ.Settings]}),ydt=t=>(e,r,o)=>EQ(t)(e,r,{...o,scope:[IQ.Synonyms]}),Edt=t=>(e,r)=>e.method===mr.MethodEnum.Get?t.transporter.read(e,r):t.transporter.write(e,r),Cdt=t=>(e,r)=>{let o=(a,n)=>Ht.createRetryablePromise(u=>U2(t)(e,n).then(u).catch(A=>{if(A.status!==404)throw A}));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Delete,path:Ht.encode("1/keys/%s",e)},r),o)},Idt=t=>(e,r,o)=>{let a=r.map(n=>({action:"deleteEntry",body:{objectID:n}}));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},o),(n,u)=>DC(t)(n.taskID,u))},wdt=()=>(t,e)=>{let r=La.serializeQueryParameters(e),o=udt.createHmac("sha256",t).update(r).digest("hex");return Buffer.from(o+r).toString("base64")},U2=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/keys/%s",e)},r),Pye=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/task/%s",e.toString())},r),Bdt=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:"/1/dictionaries/*/settings"},e),vdt=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:"1/logs"},e),Ddt=()=>t=>{let e=Buffer.from(t,"base64").toString("ascii"),r=/validUntil=(\d+)/,o=e.match(r);if(o===null)throw Sye();return parseInt(o[1],10)-Math.round(new Date().getTime()/1e3)},Sdt=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:"1/clusters/mapping/top"},e),Pdt=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/clusters/mapping/%s",e)},r),xdt=t=>e=>{let{retrieveMappings:r,...o}=e||{};return r===!0&&(o.getClusters=!0),t.transporter.read({method:mr.MethodEnum.Get,path:"1/clusters/mapping/pending"},o)},_2=t=>(e,r={})=>{let o={transporter:t.transporter,appId:t.appId,indexName:e};return Ht.addMethods(o,r.methods)},bdt=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:"1/keys"},e),Qdt=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:"1/clusters"},e),kdt=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:"1/indexes"},e),Fdt=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:"1/clusters/mapping"},e),Rdt=t=>(e,r,o)=>{let a=(n,u)=>_2(t)(e,{methods:{waitTask:zi}}).waitTask(n.taskID,u);return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/operation",e),data:{operation:"move",destination:r}},o),a)},Tdt=t=>(e,r)=>{let o=(a,n)=>Promise.all(Object.keys(a.taskID).map(u=>_2(t)(u,{methods:{waitTask:zi}}).waitTask(a.taskID[u],n)));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:e}},r),o)},Ndt=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:e}},r),Ldt=t=>(e,r)=>{let o=e.map(a=>({...a,params:La.serializeQueryParameters(a.params||{})}));return t.transporter.read({method:mr.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:o},cacheable:!0},r)},Odt=t=>(e,r)=>Promise.all(e.map(o=>{let{facetName:a,facetQuery:n,...u}=o.params;return _2(t)(o.indexName,{methods:{searchForFacetValues:Tye}}).searchForFacetValues(a,n,{...r,...u})})),Mdt=t=>(e,r)=>{let o=La.createMappedRequestOptions(r);return o.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:mr.MethodEnum.Delete,path:"1/clusters/mapping"},o)},Udt=t=>(e,r,o)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:a}},o),(n,u)=>DC(t)(n.taskID,u))},_dt=t=>(e,r)=>{let o=(a,n)=>Ht.createRetryablePromise(u=>U2(t)(e,n).catch(A=>{if(A.status!==404)throw A;return u()}));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/keys/%s/restore",e)},r),o)},Hdt=t=>(e,r,o)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},o),(n,u)=>DC(t)(n.taskID,u))},qdt=t=>(e,r,o)=>t.transporter.read({method:mr.MethodEnum.Post,path:Ht.encode("/1/dictionaries/%s/search",e),data:{query:r},cacheable:!0},o),jdt=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:e}},r),Gdt=t=>(e,r)=>Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Put,path:"/1/dictionaries/*/settings",data:e},r),(o,a)=>DC(t)(o.taskID,a)),Wdt=t=>(e,r)=>{let o=Object.assign({},r),{queryParameters:a,...n}=r||{},u=a?{queryParameters:a}:{},A=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],p=C=>Object.keys(o).filter(w=>A.indexOf(w)!==-1).every(w=>C[w]===o[w]),h=(C,w)=>Ht.createRetryablePromise(v=>U2(t)(e,w).then(b=>p(b)?Promise.resolve():v()));return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Put,path:Ht.encode("1/keys/%s",e),data:u},n),h)},DC=t=>(e,r)=>Ht.createRetryablePromise(o=>Pye(t)(e,r).then(a=>a.status!=="published"?o():void 0)),xye=t=>(e,r)=>{let o=(a,n)=>zi(t)(a.taskID,n);return Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/batch",t.indexName),data:{requests:e}},r),o)},Ydt=t=>e=>yQ({shouldStop:r=>r.cursor===void 0,...e,request:r=>t.transporter.read({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/browse",t.indexName),data:r},e)}),Kdt=t=>e=>{let r={hitsPerPage:1e3,...e};return yQ({shouldStop:o=>o.hits.length<r.hitsPerPage,...r,request(o){return Nye(t)("",{...r,...o}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},Vdt=t=>e=>{let r={hitsPerPage:1e3,...e};return yQ({shouldStop:o=>o.hits.length<r.hitsPerPage,...r,request(o){return Lye(t)("",{...r,...o}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},CQ=t=>(e,r,o)=>{let{batchSize:a,...n}=o||{},u={taskIDs:[],objectIDs:[]},A=(p=0)=>{let h=[],C;for(C=p;C<e.length&&(h.push(e[C]),h.length!==(a||1e3));C++);return h.length===0?Promise.resolve(u):xye(t)(h.map(w=>({action:r,body:w})),n).then(w=>(u.objectIDs=u.objectIDs.concat(w.objectIDs),u.taskIDs.push(w.taskID),C++,A(C)))};return Ht.createWaitablePromise(A(),(p,h)=>Promise.all(p.taskIDs.map(C=>zi(t)(C,h))))},Jdt=t=>e=>Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/clear",t.indexName)},e),(r,o)=>zi(t)(r.taskID,o)),zdt=t=>e=>{let{forwardToReplicas:r,...o}=e||{},a=La.createMappedRequestOptions(o);return r&&(a.queryParameters.forwardToReplicas=1),Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/rules/clear",t.indexName)},a),(n,u)=>zi(t)(n.taskID,u))},Xdt=t=>e=>{let{forwardToReplicas:r,...o}=e||{},a=La.createMappedRequestOptions(o);return r&&(a.queryParameters.forwardToReplicas=1),Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/synonyms/clear",t.indexName)},a),(n,u)=>zi(t)(n.taskID,u))},Zdt=t=>(e,r)=>Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/deleteByQuery",t.indexName),data:e},r),(o,a)=>zi(t)(o.taskID,a)),$dt=t=>e=>Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Delete,path:Ht.encode("1/indexes/%s",t.indexName)},e),(r,o)=>zi(t)(r.taskID,o)),emt=t=>(e,r)=>Ht.createWaitablePromise(bye(t)([e],r).then(o=>({taskID:o.taskIDs[0]})),(o,a)=>zi(t)(o.taskID,a)),bye=t=>(e,r)=>{let o=e.map(a=>({objectID:a}));return CQ(t)(o,om.DeleteObject,r)},tmt=t=>(e,r)=>{let{forwardToReplicas:o,...a}=r||{},n=La.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Delete,path:Ht.encode("1/indexes/%s/rules/%s",t.indexName,e)},n),(u,A)=>zi(t)(u.taskID,A))},rmt=t=>(e,r)=>{let{forwardToReplicas:o,...a}=r||{},n=La.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Delete,path:Ht.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},n),(u,A)=>zi(t)(u.taskID,A))},nmt=t=>e=>Qye(t)(e).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),imt=t=>(e,r,o)=>t.transporter.read({method:mr.MethodEnum.Post,path:Ht.encode("1/answers/%s/prediction",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},o),smt=t=>(e,r)=>{let{query:o,paginate:a,...n}=r||{},u=0,A=()=>Rye(t)(o||"",{...n,page:u}).then(p=>{for(let[h,C]of Object.entries(p.hits))if(e(C))return{object:C,position:parseInt(h,10),page:u};if(u++,a===!1||u>=p.nbPages)throw Dye();return A()});return A()},omt=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/indexes/%s/%s",t.indexName,e)},r),amt=()=>(t,e)=>{for(let[r,o]of Object.entries(t.hits))if(o.objectID===e)return parseInt(r,10);return-1},lmt=t=>(e,r)=>{let{attributesToRetrieve:o,...a}=r||{},n=e.map(u=>({indexName:t.indexName,objectID:u,...o?{attributesToRetrieve:o}:{}}));return t.transporter.read({method:mr.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:n}},a)},cmt=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/indexes/%s/rules/%s",t.indexName,e)},r),Qye=t=>e=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/indexes/%s/settings",t.indexName),data:{getVersion:2}},e),umt=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},r),kye=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Get,path:Ht.encode("1/indexes/%s/task/%s",t.indexName,e.toString())},r),Amt=t=>(e,r)=>Ht.createWaitablePromise(Fye(t)([e],r).then(o=>({objectID:o.objectIDs[0],taskID:o.taskIDs[0]})),(o,a)=>zi(t)(o.taskID,a)),Fye=t=>(e,r)=>{let{createIfNotExists:o,...a}=r||{},n=o?om.PartialUpdateObject:om.PartialUpdateObjectNoCreate;return CQ(t)(e,n,a)},fmt=t=>(e,r)=>{let{safe:o,autoGenerateObjectIDIfNotExist:a,batchSize:n,...u}=r||{},A=(E,R,L,_)=>Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/operation",E),data:{operation:L,destination:R}},_),(V,re)=>zi(t)(V.taskID,re)),p=Math.random().toString(36).substring(7),h=`${t.indexName}_tmp_${p}`,C=GH({appId:t.appId,transporter:t.transporter,indexName:h}),w=[],v=A(t.indexName,h,"copy",{...u,scope:["settings","synonyms","rules"]});w.push(v);let b=(o?v.wait(u):v).then(()=>{let E=C(e,{...u,autoGenerateObjectIDIfNotExist:a,batchSize:n});return w.push(E),o?E.wait(u):E}).then(()=>{let E=A(h,t.indexName,"move",u);return w.push(E),o?E.wait(u):E}).then(()=>Promise.all(w)).then(([E,R,L])=>({objectIDs:R.objectIDs,taskIDs:[E.taskID,...R.taskIDs,L.taskID]}));return Ht.createWaitablePromise(b,(E,R)=>Promise.all(w.map(L=>L.wait(R))))},pmt=t=>(e,r)=>WH(t)(e,{...r,clearExistingRules:!0}),hmt=t=>(e,r)=>YH(t)(e,{...r,clearExistingSynonyms:!0}),gmt=t=>(e,r)=>Ht.createWaitablePromise(GH(t)([e],r).then(o=>({objectID:o.objectIDs[0],taskID:o.taskIDs[0]})),(o,a)=>zi(t)(o.taskID,a)),GH=t=>(e,r)=>{let{autoGenerateObjectIDIfNotExist:o,...a}=r||{},n=o?om.AddObject:om.UpdateObject;if(n===om.UpdateObject){for(let u of e)if(u.objectID===void 0)return Ht.createWaitablePromise(Promise.reject(vye()))}return CQ(t)(e,n,a)},dmt=t=>(e,r)=>WH(t)([e],r),WH=t=>(e,r)=>{let{forwardToReplicas:o,clearExistingRules:a,...n}=r||{},u=La.createMappedRequestOptions(n);return o&&(u.queryParameters.forwardToReplicas=1),a&&(u.queryParameters.clearExistingRules=1),Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/rules/batch",t.indexName),data:e},u),(A,p)=>zi(t)(A.taskID,p))},mmt=t=>(e,r)=>YH(t)([e],r),YH=t=>(e,r)=>{let{forwardToReplicas:o,clearExistingSynonyms:a,replaceExistingSynonyms:n,...u}=r||{},A=La.createMappedRequestOptions(u);return o&&(A.queryParameters.forwardToReplicas=1),(n||a)&&(A.queryParameters.replaceExistingSynonyms=1),Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/synonyms/batch",t.indexName),data:e},A),(p,h)=>zi(t)(p.taskID,h))},Rye=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},r),Tye=t=>(e,r,o)=>t.transporter.read({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:r},cacheable:!0},o),Nye=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/rules/search",t.indexName),data:{query:e}},r),Lye=t=>(e,r)=>t.transporter.read({method:mr.MethodEnum.Post,path:Ht.encode("1/indexes/%s/synonyms/search",t.indexName),data:{query:e}},r),ymt=t=>(e,r)=>{let{forwardToReplicas:o,...a}=r||{},n=La.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),Ht.createWaitablePromise(t.transporter.write({method:mr.MethodEnum.Put,path:Ht.encode("1/indexes/%s/settings",t.indexName),data:e},n),(u,A)=>zi(t)(u.taskID,A))},zi=t=>(e,r)=>Ht.createRetryablePromise(o=>kye(t)(e,r).then(a=>a.status!=="published"?o():void 0)),Emt={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Personalization:"personalization",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},om={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},IQ={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Cmt={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Imt={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};Ft.ApiKeyACLEnum=Emt;Ft.BatchActionEnum=om;Ft.ScopeEnum=IQ;Ft.StrategyEnum=Cmt;Ft.SynonymEnum=Imt;Ft.addApiKey=fdt;Ft.assignUserID=pdt;Ft.assignUserIDs=hdt;Ft.batch=xye;Ft.browseObjects=Ydt;Ft.browseRules=Kdt;Ft.browseSynonyms=Vdt;Ft.chunkedBatch=CQ;Ft.clearDictionaryEntries=gdt;Ft.clearObjects=Jdt;Ft.clearRules=zdt;Ft.clearSynonyms=Xdt;Ft.copyIndex=EQ;Ft.copyRules=ddt;Ft.copySettings=mdt;Ft.copySynonyms=ydt;Ft.createBrowsablePromise=yQ;Ft.createMissingObjectIDError=vye;Ft.createObjectNotFoundError=Dye;Ft.createSearchClient=Adt;Ft.createValidUntilNotFoundError=Sye;Ft.customRequest=Edt;Ft.deleteApiKey=Cdt;Ft.deleteBy=Zdt;Ft.deleteDictionaryEntries=Idt;Ft.deleteIndex=$dt;Ft.deleteObject=emt;Ft.deleteObjects=bye;Ft.deleteRule=tmt;Ft.deleteSynonym=rmt;Ft.exists=nmt;Ft.findAnswers=imt;Ft.findObject=smt;Ft.generateSecuredApiKey=wdt;Ft.getApiKey=U2;Ft.getAppTask=Pye;Ft.getDictionarySettings=Bdt;Ft.getLogs=vdt;Ft.getObject=omt;Ft.getObjectPosition=amt;Ft.getObjects=lmt;Ft.getRule=cmt;Ft.getSecuredApiKeyRemainingValidity=Ddt;Ft.getSettings=Qye;Ft.getSynonym=umt;Ft.getTask=kye;Ft.getTopUserIDs=Sdt;Ft.getUserID=Pdt;Ft.hasPendingMappings=xdt;Ft.initIndex=_2;Ft.listApiKeys=bdt;Ft.listClusters=Qdt;Ft.listIndices=kdt;Ft.listUserIDs=Fdt;Ft.moveIndex=Rdt;Ft.multipleBatch=Tdt;Ft.multipleGetObjects=Ndt;Ft.multipleQueries=Ldt;Ft.multipleSearchForFacetValues=Odt;Ft.partialUpdateObject=Amt;Ft.partialUpdateObjects=Fye;Ft.removeUserID=Mdt;Ft.replaceAllObjects=fmt;Ft.replaceAllRules=pmt;Ft.replaceAllSynonyms=hmt;Ft.replaceDictionaryEntries=Udt;Ft.restoreApiKey=_dt;Ft.saveDictionaryEntries=Hdt;Ft.saveObject=gmt;Ft.saveObjects=GH;Ft.saveRule=dmt;Ft.saveRules=WH;Ft.saveSynonym=mmt;Ft.saveSynonyms=YH;Ft.search=Rye;Ft.searchDictionaryEntries=qdt;Ft.searchForFacetValues=Tye;Ft.searchRules=Nye;Ft.searchSynonyms=Lye;Ft.searchUserIDs=jdt;Ft.setDictionarySettings=Gdt;Ft.setSettings=ymt;Ft.updateApiKey=Wdt;Ft.waitAppTask=DC;Ft.waitTask=zi});var Uye=U((eYt,Mye)=>{Mye.exports=Oye()});var _ye=U(wQ=>{"use strict";Object.defineProperty(wQ,"__esModule",{value:!0});function wmt(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var Bmt={Debug:1,Info:2,Error:3};wQ.LogLevelEnum=Bmt;wQ.createNullLogger=wmt});var qye=U((rYt,Hye)=>{Hye.exports=_ye()});var Yye=U(KH=>{"use strict";Object.defineProperty(KH,"__esModule",{value:!0});var jye=Ie("http"),Gye=Ie("https"),vmt=Ie("url"),Wye={keepAlive:!0},Dmt=new jye.Agent(Wye),Smt=new Gye.Agent(Wye);function Pmt({agent:t,httpAgent:e,httpsAgent:r,requesterOptions:o={}}={}){let a=e||t||Dmt,n=r||t||Smt;return{send(u){return new Promise(A=>{let p=vmt.parse(u.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,C={...o,agent:p.protocol==="https:"?n:a,hostname:p.hostname,path:h,method:u.method,headers:{...o&&o.headers?o.headers:{},...u.headers},...p.port!==void 0?{port:p.port||""}:{}},w=(p.protocol==="https:"?Gye:jye).request(C,R=>{let L=[];R.on("data",_=>{L=L.concat(_)}),R.on("end",()=>{clearTimeout(b),clearTimeout(E),A({status:R.statusCode||0,content:Buffer.concat(L).toString(),isTimedOut:!1})})}),v=(R,L)=>setTimeout(()=>{w.abort(),A({status:0,content:L,isTimedOut:!0})},R*1e3),b=v(u.connectTimeout,"Connection timeout"),E;w.on("error",R=>{clearTimeout(b),clearTimeout(E),A({status:0,content:R.message,isTimedOut:!1})}),w.once("response",()=>{clearTimeout(b),E=v(u.responseTimeout,"Socket timeout")}),u.data!==void 0&&w.write(u.data),w.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}KH.createNodeHttpRequester=Pmt});var Vye=U((iYt,Kye)=>{Kye.exports=Yye()});var Zye=U((sYt,Xye)=>{"use strict";var Jye=Yme(),xmt=Jme(),SC=Eye(),JH=R2(),VH=Bye(),Lt=Uye(),bmt=qye(),Qmt=Vye(),kmt=L2();function zye(t,e,r){let o={appId:t,apiKey:e,timeouts:{connect:2,read:5,write:30},requester:Qmt.createNodeHttpRequester(),logger:bmt.createNullLogger(),responsesCache:Jye.createNullCache(),requestsCache:Jye.createNullCache(),hostsCache:xmt.createInMemoryCache(),userAgent:kmt.createUserAgent(JH.version).add({segment:"Node.js",version:process.versions.node})},a={...o,...r},n=()=>u=>VH.createPersonalizationClient({...o,...u,methods:{getPersonalizationStrategy:VH.getPersonalizationStrategy,setPersonalizationStrategy:VH.setPersonalizationStrategy}});return Lt.createSearchClient({...a,methods:{search:Lt.multipleQueries,searchForFacetValues:Lt.multipleSearchForFacetValues,multipleBatch:Lt.multipleBatch,multipleGetObjects:Lt.multipleGetObjects,multipleQueries:Lt.multipleQueries,copyIndex:Lt.copyIndex,copySettings:Lt.copySettings,copyRules:Lt.copyRules,copySynonyms:Lt.copySynonyms,moveIndex:Lt.moveIndex,listIndices:Lt.listIndices,getLogs:Lt.getLogs,listClusters:Lt.listClusters,multipleSearchForFacetValues:Lt.multipleSearchForFacetValues,getApiKey:Lt.getApiKey,addApiKey:Lt.addApiKey,listApiKeys:Lt.listApiKeys,updateApiKey:Lt.updateApiKey,deleteApiKey:Lt.deleteApiKey,restoreApiKey:Lt.restoreApiKey,assignUserID:Lt.assignUserID,assignUserIDs:Lt.assignUserIDs,getUserID:Lt.getUserID,searchUserIDs:Lt.searchUserIDs,listUserIDs:Lt.listUserIDs,getTopUserIDs:Lt.getTopUserIDs,removeUserID:Lt.removeUserID,hasPendingMappings:Lt.hasPendingMappings,generateSecuredApiKey:Lt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:Lt.getSecuredApiKeyRemainingValidity,destroy:JH.destroy,clearDictionaryEntries:Lt.clearDictionaryEntries,deleteDictionaryEntries:Lt.deleteDictionaryEntries,getDictionarySettings:Lt.getDictionarySettings,getAppTask:Lt.getAppTask,replaceDictionaryEntries:Lt.replaceDictionaryEntries,saveDictionaryEntries:Lt.saveDictionaryEntries,searchDictionaryEntries:Lt.searchDictionaryEntries,setDictionarySettings:Lt.setDictionarySettings,waitAppTask:Lt.waitAppTask,customRequest:Lt.customRequest,initIndex:u=>A=>Lt.initIndex(u)(A,{methods:{batch:Lt.batch,delete:Lt.deleteIndex,findAnswers:Lt.findAnswers,getObject:Lt.getObject,getObjects:Lt.getObjects,saveObject:Lt.saveObject,saveObjects:Lt.saveObjects,search:Lt.search,searchForFacetValues:Lt.searchForFacetValues,waitTask:Lt.waitTask,setSettings:Lt.setSettings,getSettings:Lt.getSettings,partialUpdateObject:Lt.partialUpdateObject,partialUpdateObjects:Lt.partialUpdateObjects,deleteObject:Lt.deleteObject,deleteObjects:Lt.deleteObjects,deleteBy:Lt.deleteBy,clearObjects:Lt.clearObjects,browseObjects:Lt.browseObjects,getObjectPosition:Lt.getObjectPosition,findObject:Lt.findObject,exists:Lt.exists,saveSynonym:Lt.saveSynonym,saveSynonyms:Lt.saveSynonyms,getSynonym:Lt.getSynonym,searchSynonyms:Lt.searchSynonyms,browseSynonyms:Lt.browseSynonyms,deleteSynonym:Lt.deleteSynonym,clearSynonyms:Lt.clearSynonyms,replaceAllObjects:Lt.replaceAllObjects,replaceAllSynonyms:Lt.replaceAllSynonyms,searchRules:Lt.searchRules,getRule:Lt.getRule,deleteRule:Lt.deleteRule,saveRule:Lt.saveRule,saveRules:Lt.saveRules,replaceAllRules:Lt.replaceAllRules,browseRules:Lt.browseRules,clearRules:Lt.clearRules}}),initAnalytics:()=>u=>SC.createAnalyticsClient({...o,...u,methods:{addABTest:SC.addABTest,getABTest:SC.getABTest,getABTests:SC.getABTests,stopABTest:SC.stopABTest,deleteABTest:SC.deleteABTest}}),initPersonalization:n,initRecommendation:()=>u=>(a.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),n()(u))}})}zye.version=JH.version;Xye.exports=zye});var XH=U((oYt,zH)=>{var $ye=Zye();zH.exports=$ye;zH.exports.default=$ye});var e6=U((lYt,rEe)=>{"use strict";var tEe=Object.getOwnPropertySymbols,Rmt=Object.prototype.hasOwnProperty,Tmt=Object.prototype.propertyIsEnumerable;function Nmt(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Lmt(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(o.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}rEe.exports=Lmt()?Object.assign:function(t,e){for(var r,o=Nmt(t),a,n=1;n<arguments.length;n++){r=Object(arguments[n]);for(var u in r)Rmt.call(r,u)&&(o[u]=r[u]);if(tEe){a=tEe(r);for(var A=0;A<a.length;A++)Tmt.call(r,a[A])&&(o[a[A]]=r[a[A]])}}return o}});var hEe=U(Qn=>{"use strict";var s6=e6(),iu=typeof Symbol=="function"&&Symbol.for,H2=iu?Symbol.for("react.element"):60103,Omt=iu?Symbol.for("react.portal"):60106,Mmt=iu?Symbol.for("react.fragment"):60107,Umt=iu?Symbol.for("react.strict_mode"):60108,_mt=iu?Symbol.for("react.profiler"):60114,Hmt=iu?Symbol.for("react.provider"):60109,qmt=iu?Symbol.for("react.context"):60110,jmt=iu?Symbol.for("react.forward_ref"):60112,Gmt=iu?Symbol.for("react.suspense"):60113,Wmt=iu?Symbol.for("react.memo"):60115,Ymt=iu?Symbol.for("react.lazy"):60116,nEe=typeof Symbol=="function"&&Symbol.iterator;function q2(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var iEe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sEe={};function PC(t,e,r){this.props=t,this.context=e,this.refs=sEe,this.updater=r||iEe}PC.prototype.isReactComponent={};PC.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error(q2(85));this.updater.enqueueSetState(this,t,e,"setState")};PC.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function oEe(){}oEe.prototype=PC.prototype;function o6(t,e,r){this.props=t,this.context=e,this.refs=sEe,this.updater=r||iEe}var a6=o6.prototype=new oEe;a6.constructor=o6;s6(a6,PC.prototype);a6.isPureReactComponent=!0;var l6={current:null},aEe=Object.prototype.hasOwnProperty,lEe={key:!0,ref:!0,__self:!0,__source:!0};function cEe(t,e,r){var o,a={},n=null,u=null;if(e!=null)for(o in e.ref!==void 0&&(u=e.ref),e.key!==void 0&&(n=""+e.key),e)aEe.call(e,o)&&!lEe.hasOwnProperty(o)&&(a[o]=e[o]);var A=arguments.length-2;if(A===1)a.children=r;else if(1<A){for(var p=Array(A),h=0;h<A;h++)p[h]=arguments[h+2];a.children=p}if(t&&t.defaultProps)for(o in A=t.defaultProps,A)a[o]===void 0&&(a[o]=A[o]);return{$$typeof:H2,type:t,key:n,ref:u,props:a,_owner:l6.current}}function Kmt(t,e){return{$$typeof:H2,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function c6(t){return typeof t=="object"&&t!==null&&t.$$typeof===H2}function Vmt(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(r){return e[r]})}var uEe=/\/+/g,BQ=[];function AEe(t,e,r,o){if(BQ.length){var a=BQ.pop();return a.result=t,a.keyPrefix=e,a.func=r,a.context=o,a.count=0,a}return{result:t,keyPrefix:e,func:r,context:o,count:0}}function fEe(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>BQ.length&&BQ.push(t)}function r6(t,e,r,o){var a=typeof t;(a==="undefined"||a==="boolean")&&(t=null);var n=!1;if(t===null)n=!0;else switch(a){case"string":case"number":n=!0;break;case"object":switch(t.$$typeof){case H2:case Omt:n=!0}}if(n)return r(o,t,e===""?"."+t6(t,0):e),1;if(n=0,e=e===""?".":e+":",Array.isArray(t))for(var u=0;u<t.length;u++){a=t[u];var A=e+t6(a,u);n+=r6(a,A,r,o)}else if(t===null||typeof t!="object"?A=null:(A=nEe&&t[nEe]||t["@@iterator"],A=typeof A=="function"?A:null),typeof A=="function")for(t=A.call(t),u=0;!(a=t.next()).done;)a=a.value,A=e+t6(a,u++),n+=r6(a,A,r,o);else if(a==="object")throw r=""+t,Error(q2(31,r==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return n}function n6(t,e,r){return t==null?0:r6(t,"",e,r)}function t6(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Vmt(t.key):e.toString(36)}function Jmt(t,e){t.func.call(t.context,e,t.count++)}function zmt(t,e,r){var o=t.result,a=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?i6(t,o,r,function(n){return n}):t!=null&&(c6(t)&&(t=Kmt(t,a+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(uEe,"$&/")+"/")+r)),o.push(t))}function i6(t,e,r,o,a){var n="";r!=null&&(n=(""+r).replace(uEe,"$&/")+"/"),e=AEe(e,n,o,a),n6(t,zmt,e),fEe(e)}var pEe={current:null};function Zf(){var t=pEe.current;if(t===null)throw Error(q2(321));return t}var Xmt={ReactCurrentDispatcher:pEe,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:l6,IsSomeRendererActing:{current:!1},assign:s6};Qn.Children={map:function(t,e,r){if(t==null)return t;var o=[];return i6(t,o,null,e,r),o},forEach:function(t,e,r){if(t==null)return t;e=AEe(null,null,e,r),n6(t,Jmt,e),fEe(e)},count:function(t){return n6(t,function(){return null},null)},toArray:function(t){var e=[];return i6(t,e,null,function(r){return r}),e},only:function(t){if(!c6(t))throw Error(q2(143));return t}};Qn.Component=PC;Qn.Fragment=Mmt;Qn.Profiler=_mt;Qn.PureComponent=o6;Qn.StrictMode=Umt;Qn.Suspense=Gmt;Qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xmt;Qn.cloneElement=function(t,e,r){if(t==null)throw Error(q2(267,t));var o=s6({},t.props),a=t.key,n=t.ref,u=t._owner;if(e!=null){if(e.ref!==void 0&&(n=e.ref,u=l6.current),e.key!==void 0&&(a=""+e.key),t.type&&t.type.defaultProps)var A=t.type.defaultProps;for(p in e)aEe.call(e,p)&&!lEe.hasOwnProperty(p)&&(o[p]=e[p]===void 0&&A!==void 0?A[p]:e[p])}var p=arguments.length-2;if(p===1)o.children=r;else if(1<p){A=Array(p);for(var h=0;h<p;h++)A[h]=arguments[h+2];o.children=A}return{$$typeof:H2,type:t.type,key:a,ref:n,props:o,_owner:u}};Qn.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:qmt,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:Hmt,_context:t},t.Consumer=t};Qn.createElement=cEe;Qn.createFactory=function(t){var e=cEe.bind(null,t);return e.type=t,e};Qn.createRef=function(){return{current:null}};Qn.forwardRef=function(t){return{$$typeof:jmt,render:t}};Qn.isValidElement=c6;Qn.lazy=function(t){return{$$typeof:Ymt,_ctor:t,_status:-1,_result:null}};Qn.memo=function(t,e){return{$$typeof:Wmt,type:t,compare:e===void 0?null:e}};Qn.useCallback=function(t,e){return Zf().useCallback(t,e)};Qn.useContext=function(t,e){return Zf().useContext(t,e)};Qn.useDebugValue=function(){};Qn.useEffect=function(t,e){return Zf().useEffect(t,e)};Qn.useImperativeHandle=function(t,e,r){return Zf().useImperativeHandle(t,e,r)};Qn.useLayoutEffect=function(t,e){return Zf().useLayoutEffect(t,e)};Qn.useMemo=function(t,e){return Zf().useMemo(t,e)};Qn.useReducer=function(t,e,r){return Zf().useReducer(t,e,r)};Qn.useRef=function(t){return Zf().useRef(t)};Qn.useState=function(t){return Zf().useState(t)};Qn.version="16.13.1"});var en=U((uYt,gEe)=>{"use strict";gEe.exports=hEe()});var A6=U((AYt,u6)=>{"use strict";var on=u6.exports;u6.exports.default=on;var kn="\x1B[",j2="\x1B]",xC="\x07",vQ=";",dEe=process.env.TERM_PROGRAM==="Apple_Terminal";on.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?kn+(t+1)+"G":kn+(e+1)+";"+(t+1)+"H"};on.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=kn+-t+"D":t>0&&(r+=kn+t+"C"),e<0?r+=kn+-e+"A":e>0&&(r+=kn+e+"B"),r};on.cursorUp=(t=1)=>kn+t+"A";on.cursorDown=(t=1)=>kn+t+"B";on.cursorForward=(t=1)=>kn+t+"C";on.cursorBackward=(t=1)=>kn+t+"D";on.cursorLeft=kn+"G";on.cursorSavePosition=dEe?"\x1B7":kn+"s";on.cursorRestorePosition=dEe?"\x1B8":kn+"u";on.cursorGetPosition=kn+"6n";on.cursorNextLine=kn+"E";on.cursorPrevLine=kn+"F";on.cursorHide=kn+"?25l";on.cursorShow=kn+"?25h";on.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=on.eraseLine+(r<t-1?on.cursorUp():"");return t&&(e+=on.cursorLeft),e};on.eraseEndLine=kn+"K";on.eraseStartLine=kn+"1K";on.eraseLine=kn+"2K";on.eraseDown=kn+"J";on.eraseUp=kn+"1J";on.eraseScreen=kn+"2J";on.scrollUp=kn+"S";on.scrollDown=kn+"T";on.clearScreen="\x1Bc";on.clearTerminal=process.platform==="win32"?`${on.eraseScreen}${kn}0f`:`${on.eraseScreen}${kn}3J${kn}H`;on.beep=xC;on.link=(t,e)=>[j2,"8",vQ,vQ,e,xC,t,j2,"8",vQ,vQ,xC].join("");on.image=(t,e={})=>{let r=`${j2}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+xC};on.iTerm={setCwd:(t=process.cwd())=>`${j2}50;CurrentDir=${t}${xC}`,annotation:(t,e={})=>{let r=`${j2}1337;`,o=typeof e.x<"u",a=typeof e.y<"u";if((o||a)&&!(o&&a&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(o?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+xC}}});var yEe=U((fYt,f6)=>{"use strict";var mEe=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};f6.exports=mEe;f6.exports.default=mEe});var CEe=U((pYt,SQ)=>{"use strict";var Zmt=yEe(),DQ=new WeakMap,EEe=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,o=0,a=t.displayName||t.name||"<anonymous>",n=function(...u){if(DQ.set(n,++o),o===1)r=t.apply(this,u),t=null;else if(e.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return r};return Zmt(n,t),DQ.set(n,o),n};SQ.exports=EEe;SQ.exports.default=EEe;SQ.exports.callCount=t=>{if(!DQ.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return DQ.get(t)}});var IEe=U((hYt,PQ)=>{PQ.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&PQ.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&PQ.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var g6=U((gYt,kC)=>{var gi=global.process,am=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};am(gi)?(wEe=Ie("assert"),bC=IEe(),BEe=/^win/i.test(gi.platform),G2=Ie("events"),typeof G2!="function"&&(G2=G2.EventEmitter),gi.__signal_exit_emitter__?xs=gi.__signal_exit_emitter__:(xs=gi.__signal_exit_emitter__=new G2,xs.count=0,xs.emitted={}),xs.infinite||(xs.setMaxListeners(1/0),xs.infinite=!0),kC.exports=function(t,e){if(!am(global.process))return function(){};wEe.equal(typeof t,"function","a callback must be provided for exit handler"),QC===!1&&p6();var r="exit";e&&e.alwaysLast&&(r="afterexit");var o=function(){xs.removeListener(r,t),xs.listeners("exit").length===0&&xs.listeners("afterexit").length===0&&xQ()};return xs.on(r,t),o},xQ=function(){!QC||!am(global.process)||(QC=!1,bC.forEach(function(e){try{gi.removeListener(e,bQ[e])}catch{}}),gi.emit=QQ,gi.reallyExit=h6,xs.count-=1)},kC.exports.unload=xQ,lm=function(e,r,o){xs.emitted[e]||(xs.emitted[e]=!0,xs.emit(e,r,o))},bQ={},bC.forEach(function(t){bQ[t]=function(){if(!!am(global.process)){var r=gi.listeners(t);r.length===xs.count&&(xQ(),lm("exit",null,t),lm("afterexit",null,t),BEe&&t==="SIGHUP"&&(t="SIGINT"),gi.kill(gi.pid,t))}}}),kC.exports.signals=function(){return bC},QC=!1,p6=function(){QC||!am(global.process)||(QC=!0,xs.count+=1,bC=bC.filter(function(e){try{return gi.on(e,bQ[e]),!0}catch{return!1}}),gi.emit=DEe,gi.reallyExit=vEe)},kC.exports.load=p6,h6=gi.reallyExit,vEe=function(e){!am(global.process)||(gi.exitCode=e||0,lm("exit",gi.exitCode,null),lm("afterexit",gi.exitCode,null),h6.call(gi,gi.exitCode))},QQ=gi.emit,DEe=function(e,r){if(e==="exit"&&am(global.process)){r!==void 0&&(gi.exitCode=r);var o=QQ.apply(this,arguments);return lm("exit",gi.exitCode,null),lm("afterexit",gi.exitCode,null),o}else return QQ.apply(this,arguments)}):kC.exports=function(){return function(){}};var wEe,bC,BEe,G2,xs,xQ,lm,bQ,QC,p6,h6,vEe,QQ,DEe});var PEe=U((dYt,SEe)=>{"use strict";var $mt=CEe(),eyt=g6();SEe.exports=$mt(()=>{eyt(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var d6=U(FC=>{"use strict";var tyt=PEe(),kQ=!1;FC.show=(t=process.stderr)=>{!t.isTTY||(kQ=!1,t.write("\x1B[?25h"))};FC.hide=(t=process.stderr)=>{!t.isTTY||(tyt(),kQ=!0,t.write("\x1B[?25l"))};FC.toggle=(t,e)=>{t!==void 0&&(kQ=t),kQ?FC.show(e):FC.hide(e)}});var kEe=U(W2=>{"use strict";var QEe=W2&&W2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(W2,"__esModule",{value:!0});var xEe=QEe(A6()),bEe=QEe(d6()),ryt=(t,{showCursor:e=!1}={})=>{let r=0,o="",a=!1,n=u=>{!e&&!a&&(bEe.default.hide(),a=!0);let A=u+`
280`;A!==o&&(o=A,t.write(xEe.default.eraseLines(r)+A),r=A.split(`
281`).length)};return n.clear=()=>{t.write(xEe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,e||(bEe.default.show(),a=!1)},n};W2.default={create:ryt}});var FEe=U((EYt,nyt)=>{nyt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var NEe=U(yl=>{"use strict";var TEe=FEe(),gA=process.env;Object.defineProperty(yl,"_vendors",{value:TEe.map(function(t){return t.constant})});yl.name=null;yl.isPR=null;TEe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(o){return REe(o)});if(yl[t.constant]=r,r)switch(yl.name=t.name,typeof t.pr){case"string":yl.isPR=!!gA[t.pr];break;case"object":"env"in t.pr?yl.isPR=t.pr.env in gA&&gA[t.pr.env]!==t.pr.ne:"any"in t.pr?yl.isPR=t.pr.any.some(function(o){return!!gA[o]}):yl.isPR=REe(t.pr);break;default:yl.isPR=null}});yl.isCI=!!(gA.CI||gA.CONTINUOUS_INTEGRATION||gA.BUILD_NUMBER||gA.RUN_ID||yl.name);function REe(t){return typeof t=="string"?!!gA[t]:Object.keys(t).every(function(e){return gA[e]===t[e]})}});var OEe=U((IYt,LEe)=>{"use strict";LEe.exports=NEe().isCI});var UEe=U((wYt,MEe)=>{"use strict";var iyt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};MEe.exports=(t,{include:e,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of iyt(t.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(t[n]=t[n].bind(t))}return t}});var YEe=U(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var TC,V2,LQ,OQ,B6;typeof window>"u"||typeof MessageChannel!="function"?(RC=null,m6=null,y6=function(){if(RC!==null)try{var t=vn.unstable_now();RC(!0,t),RC=null}catch(e){throw setTimeout(y6,0),e}},_Ee=Date.now(),vn.unstable_now=function(){return Date.now()-_Ee},TC=function(t){RC!==null?setTimeout(TC,0,t):(RC=t,setTimeout(y6,0))},V2=function(t,e){m6=setTimeout(t,e)},LQ=function(){clearTimeout(m6)},OQ=function(){return!1},B6=vn.unstable_forceFrameRate=function(){}):(FQ=window.performance,E6=window.Date,HEe=window.setTimeout,qEe=window.clearTimeout,typeof console<"u"&&(jEe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof jEe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof FQ=="object"&&typeof FQ.now=="function"?vn.unstable_now=function(){return FQ.now()}:(GEe=E6.now(),vn.unstable_now=function(){return E6.now()-GEe}),Y2=!1,K2=null,RQ=-1,C6=5,I6=0,OQ=function(){return vn.unstable_now()>=I6},B6=function(){},vn.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):C6=0<t?Math.floor(1e3/t):5},w6=new MessageChannel,TQ=w6.port2,w6.port1.onmessage=function(){if(K2!==null){var t=vn.unstable_now();I6=t+C6;try{K2(!0,t)?TQ.postMessage(null):(Y2=!1,K2=null)}catch(e){throw TQ.postMessage(null),e}}else Y2=!1},TC=function(t){K2=t,Y2||(Y2=!0,TQ.postMessage(null))},V2=function(t,e){RQ=HEe(function(){t(vn.unstable_now())},e)},LQ=function(){qEe(RQ),RQ=-1});var RC,m6,y6,_Ee,FQ,E6,HEe,qEe,jEe,GEe,Y2,K2,RQ,C6,I6,w6,TQ;function v6(t,e){var r=t.length;t.push(e);e:for(;;){var o=Math.floor((r-1)/2),a=t[o];if(a!==void 0&&0<NQ(a,e))t[o]=e,t[r]=a,r=o;else break e}}function cc(t){return t=t[0],t===void 0?null:t}function MQ(t){var e=t[0];if(e!==void 0){var r=t.pop();if(r!==e){t[0]=r;e:for(var o=0,a=t.length;o<a;){var n=2*(o+1)-1,u=t[n],A=n+1,p=t[A];if(u!==void 0&&0>NQ(u,r))p!==void 0&&0>NQ(p,u)?(t[o]=p,t[A]=r,o=A):(t[o]=u,t[n]=r,o=n);else if(p!==void 0&&0>NQ(p,r))t[o]=p,t[A]=r,o=A;else break e}}return e}return null}function NQ(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}var su=[],dh=[],syt=1,ta=null,Ro=3,UQ=!1,cm=!1,J2=!1;function _Q(t){for(var e=cc(dh);e!==null;){if(e.callback===null)MQ(dh);else if(e.startTime<=t)MQ(dh),e.sortIndex=e.expirationTime,v6(su,e);else break;e=cc(dh)}}function D6(t){if(J2=!1,_Q(t),!cm)if(cc(su)!==null)cm=!0,TC(S6);else{var e=cc(dh);e!==null&&V2(D6,e.startTime-t)}}function S6(t,e){cm=!1,J2&&(J2=!1,LQ()),UQ=!0;var r=Ro;try{for(_Q(e),ta=cc(su);ta!==null&&(!(ta.expirationTime>e)||t&&!OQ());){var o=ta.callback;if(o!==null){ta.callback=null,Ro=ta.priorityLevel;var a=o(ta.expirationTime<=e);e=vn.unstable_now(),typeof a=="function"?ta.callback=a:ta===cc(su)&&MQ(su),_Q(e)}else MQ(su);ta=cc(su)}if(ta!==null)var n=!0;else{var u=cc(dh);u!==null&&V2(D6,u.startTime-e),n=!1}return n}finally{ta=null,Ro=r,UQ=!1}}function WEe(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var oyt=B6;vn.unstable_ImmediatePriority=1;vn.unstable_UserBlockingPriority=2;vn.unstable_NormalPriority=3;vn.unstable_IdlePriority=5;vn.unstable_LowPriority=4;vn.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=Ro;Ro=t;try{return e()}finally{Ro=r}};vn.unstable_next=function(t){switch(Ro){case 1:case 2:case 3:var e=3;break;default:e=Ro}var r=Ro;Ro=e;try{return t()}finally{Ro=r}};vn.unstable_scheduleCallback=function(t,e,r){var o=vn.unstable_now();if(typeof r=="object"&&r!==null){var a=r.delay;a=typeof a=="number"&&0<a?o+a:o,r=typeof r.timeout=="number"?r.timeout:WEe(t)}else r=WEe(t),a=o;return r=a+r,t={id:syt++,callback:e,priorityLevel:t,startTime:a,expirationTime:r,sortIndex:-1},a>o?(t.sortIndex=a,v6(dh,t),cc(su)===null&&t===cc(dh)&&(J2?LQ():J2=!0,V2(D6,a-o))):(t.sortIndex=r,v6(su,t),cm||UQ||(cm=!0,TC(S6))),t};vn.unstable_cancelCallback=function(t){t.callback=null};vn.unstable_wrapCallback=function(t){var e=Ro;return function(){var r=Ro;Ro=e;try{return t.apply(this,arguments)}finally{Ro=r}}};vn.unstable_getCurrentPriorityLevel=function(){return Ro};vn.unstable_shouldYield=function(){var t=vn.unstable_now();_Q(t);var e=cc(su);return e!==ta&&ta!==null&&e!==null&&e.callback!==null&&e.startTime<=t&&e.expirationTime<ta.expirationTime||OQ()};vn.unstable_requestPaint=oyt;vn.unstable_continueExecution=function(){cm||UQ||(cm=!0,TC(S6))};vn.unstable_pauseExecution=function(){};vn.unstable_getFirstCallbackNode=function(){return cc(su)};vn.unstable_Profiling=null});var P6=U((vYt,KEe)=>{"use strict";KEe.exports=YEe()});var VEe=U((DYt,z2)=>{z2.exports=function t(e){"use strict";var r=e6(),o=en(),a=P6();function n(S){for(var D="https://reactjs.org/docs/error-decoder.html?invariant="+S,T=1;T<arguments.length;T++)D+="&args[]="+encodeURIComponent(arguments[T]);return"Minified React error #"+S+"; visit "+D+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;u.hasOwnProperty("ReactCurrentDispatcher")||(u.ReactCurrentDispatcher={current:null}),u.hasOwnProperty("ReactCurrentBatchConfig")||(u.ReactCurrentBatchConfig={suspense:null});var A=typeof Symbol=="function"&&Symbol.for,p=A?Symbol.for("react.element"):60103,h=A?Symbol.for("react.portal"):60106,C=A?Symbol.for("react.fragment"):60107,w=A?Symbol.for("react.strict_mode"):60108,v=A?Symbol.for("react.profiler"):60114,b=A?Symbol.for("react.provider"):60109,E=A?Symbol.for("react.context"):60110,R=A?Symbol.for("react.concurrent_mode"):60111,L=A?Symbol.for("react.forward_ref"):60112,_=A?Symbol.for("react.suspense"):60113,V=A?Symbol.for("react.suspense_list"):60120,re=A?Symbol.for("react.memo"):60115,ae=A?Symbol.for("react.lazy"):60116;A&&Symbol.for("react.fundamental"),A&&Symbol.for("react.responder"),A&&Symbol.for("react.scope");var he=typeof Symbol=="function"&&Symbol.iterator;function pe(S){return S===null||typeof S!="object"?null:(S=he&&S[he]||S["@@iterator"],typeof S=="function"?S:null)}function De(S){if(S._status===-1){S._status=0;var D=S._ctor;D=D(),S._result=D,D.then(function(T){S._status===0&&(T=T.default,S._status=1,S._result=T)},function(T){S._status===0&&(S._status=2,S._result=T)})}}function ge(S){if(S==null)return null;if(typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case C:return"Fragment";case h:return"Portal";case v:return"Profiler";case w:return"StrictMode";case _:return"Suspense";case V:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case E:return"Context.Consumer";case b:return"Context.Provider";case L:var D=S.render;return D=D.displayName||D.name||"",S.displayName||(D!==""?"ForwardRef("+D+")":"ForwardRef");case re:return ge(S.type);case ae:if(S=S._status===1?S._result:null)return ge(S)}return null}function le(S){var D=S,T=S;if(S.alternate)for(;D.return;)D=D.return;else{S=D;do D=S,(D.effectTag&1026)!==0&&(T=D.return),S=D.return;while(S)}return D.tag===3?T:null}function Pe(S){if(le(S)!==S)throw Error(n(188))}function g(S){var D=S.alternate;if(!D){if(D=le(S),D===null)throw Error(n(188));return D!==S?null:S}for(var T=S,q=D;;){var W=T.return;if(W===null)break;var ce=W.alternate;if(ce===null){if(q=W.return,q!==null){T=q;continue}break}if(W.child===ce.child){for(ce=W.child;ce;){if(ce===T)return Pe(W),S;if(ce===q)return Pe(W),D;ce=ce.sibling}throw Error(n(188))}if(T.return!==q.return)T=W,q=ce;else{for(var Se=!1,It=W.child;It;){if(It===T){Se=!0,T=W,q=ce;break}if(It===q){Se=!0,q=W,T=ce;break}It=It.sibling}if(!Se){for(It=ce.child;It;){if(It===T){Se=!0,T=ce,q=W;break}if(It===q){Se=!0,q=ce,T=W;break}It=It.sibling}if(!Se)throw Error(n(189))}}if(T.alternate!==q)throw Error(n(190))}if(T.tag!==3)throw Error(n(188));return T.stateNode.current===T?S:D}function ve(S){if(S=g(S),!S)return null;for(var D=S;;){if(D.tag===5||D.tag===6)return D;if(D.child)D.child.return=D,D=D.child;else{if(D===S)break;for(;!D.sibling;){if(!D.return||D.return===S)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function Ee(S){if(S=g(S),!S)return null;for(var D=S;;){if(D.tag===5||D.tag===6)return D;if(D.child&&D.tag!==4)D.child.return=D,D=D.child;else{if(D===S)break;for(;!D.sibling;){if(!D.return||D.return===S)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}var de=e.getPublicInstance,ne=e.getRootHostContext,Z=e.getChildHostContext,me=e.prepareForCommit,be=e.resetAfterCommit,ut=e.createInstance,H=e.appendInitialChild,yt=e.finalizeInitialChildren,Me=e.prepareUpdate,Te=e.shouldSetTextContent,Qe=e.shouldDeprioritizeSubtree,_e=e.createTextInstance,qe=e.setTimeout,At=e.clearTimeout,Oe=e.noTimeout,x=e.isPrimaryRenderer,I=e.supportsMutation,P=e.supportsPersistence,y=e.supportsHydration,F=e.appendChild,z=e.appendChildToContainer,X=e.commitTextUpdate,$=e.commitMount,ie=e.commitUpdate,ke=e.insertBefore,Ne=e.insertInContainerBefore,st=e.removeChild,ht=e.removeChildFromContainer,Ut=e.resetTextContent,Xt=e.hideInstance,xt=e.hideTextInstance,tn=e.unhideInstance,Dr=e.unhideTextInstance,fr=e.cloneInstance,Br=e.createContainerChildSet,jr=e.appendChildToContainerChildSet,Hn=e.finalizeContainerChildren,bs=e.replaceContainerChildren,ki=e.cloneHiddenInstance,gs=e.cloneHiddenTextInstance,to=e.canHydrateInstance,Di=e.canHydrateTextInstance,Qs=e.isSuspenseInstancePending,ro=e.isSuspenseInstanceFallback,hc=e.getNextHydratableSibling,gu=e.getFirstHydratableChild,cp=e.hydrateInstance,up=e.hydrateTextInstance,ks=e.getNextHydratableInstanceAfterSuspenseInstance,Cn=e.commitHydratedContainer,no=e.commitHydratedSuspenseInstance,Fs=/^(.*)[\\\/]/;function Cl(S){var D="";do{e:switch(S.tag){case 3:case 4:case 6:case 7:case 10:case 9:var T="";break e;default:var q=S._debugOwner,W=S._debugSource,ce=ge(S.type);T=null,q&&(T=ge(q.type)),q=ce,ce="",W?ce=" (at "+W.fileName.replace(Fs,"")+":"+W.lineNumber+")":T&&(ce=" (created by "+T+")"),T=`
282 in `+(q||"Unknown")+ce}D+=T,S=S.return}while(S);return D}var Il=[],io=-1;function Ue(S){0>io||(S.current=Il[io],Il[io]=null,io--)}function Fn(S,D){io++,Il[io]=S.current,S.current=D}var Fi={},Rn={current:Fi},Ui={current:!1},Zt=Fi;function Ri(S,D){var T=S.type.contextTypes;if(!T)return Fi;var q=S.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===D)return q.__reactInternalMemoizedMaskedChildContext;var W={},ce;for(ce in T)W[ce]=D[ce];return q&&(S=S.stateNode,S.__reactInternalMemoizedUnmaskedChildContext=D,S.__reactInternalMemoizedMaskedChildContext=W),W}function $n(S){return S=S.childContextTypes,S!=null}function Ua(S){Ue(Ui,S),Ue(Rn,S)}function $t(S){Ue(Ui,S),Ue(Rn,S)}function gc(S,D,T){if(Rn.current!==Fi)throw Error(n(168));Fn(Rn,D,S),Fn(Ui,T,S)}function du(S,D,T){var q=S.stateNode;if(S=D.childContextTypes,typeof q.getChildContext!="function")return T;q=q.getChildContext();for(var W in q)if(!(W in S))throw Error(n(108,ge(D)||"Unknown",W));return r({},T,{},q)}function dc(S){var D=S.stateNode;return D=D&&D.__reactInternalMemoizedMergedChildContext||Fi,Zt=Rn.current,Fn(Rn,D,S),Fn(Ui,Ui.current,S),!0}function wl(S,D,T){var q=S.stateNode;if(!q)throw Error(n(169));T?(D=du(S,D,Zt),q.__reactInternalMemoizedMergedChildContext=D,Ue(Ui,S),Ue(Rn,S),Fn(Rn,D,S)):Ue(Ui,S),Fn(Ui,T,S)}var xA=a.unstable_runWithPriority,mu=a.unstable_scheduleCallback,Ce=a.unstable_cancelCallback,Rt=a.unstable_shouldYield,mc=a.unstable_requestPaint,_i=a.unstable_now,yu=a.unstable_getCurrentPriorityLevel,qt=a.unstable_ImmediatePriority,Bl=a.unstable_UserBlockingPriority,bA=a.unstable_NormalPriority,Ap=a.unstable_LowPriority,yc=a.unstable_IdlePriority,QA={},Dn=mc!==void 0?mc:function(){},ui=null,Ec=null,kA=!1,na=_i(),Hi=1e4>na?_i:function(){return _i()-na};function Mo(){switch(yu()){case qt:return 99;case Bl:return 98;case bA:return 97;case Ap:return 96;case yc:return 95;default:throw Error(n(332))}}function $e(S){switch(S){case 99:return qt;case 98:return Bl;case 97:return bA;case 96:return Ap;case 95:return yc;default:throw Error(n(332))}}function so(S,D){return S=$e(S),xA(S,D)}function vl(S,D,T){return S=$e(S),mu(S,D,T)}function Eu(S){return ui===null?(ui=[S],Ec=mu(qt,Cu)):ui.push(S),QA}function qi(){if(Ec!==null){var S=Ec;Ec=null,Ce(S)}Cu()}function Cu(){if(!kA&&ui!==null){kA=!0;var S=0;try{var D=ui;so(99,function(){for(;S<D.length;S++){var T=D[S];do T=T(!0);while(T!==null)}}),ui=null}catch(T){throw ui!==null&&(ui=ui.slice(S+1)),mu(qt,qi),T}finally{kA=!1}}}var FA=3;function Ha(S,D,T){return T/=10,1073741821-(((1073741821-S+D/10)/T|0)+1)*T}function Cc(S,D){return S===D&&(S!==0||1/S===1/D)||S!==S&&D!==D}var ds=typeof Object.is=="function"?Object.is:Cc,Ot=Object.prototype.hasOwnProperty;function Sn(S,D){if(ds(S,D))return!0;if(typeof S!="object"||S===null||typeof D!="object"||D===null)return!1;var T=Object.keys(S),q=Object.keys(D);if(T.length!==q.length)return!1;for(q=0;q<T.length;q++)if(!Ot.call(D,T[q])||!ds(S[T[q]],D[T[q]]))return!1;return!0}function di(S,D){if(S&&S.defaultProps){D=r({},D),S=S.defaultProps;for(var T in S)D[T]===void 0&&(D[T]=S[T])}return D}var ia={current:null},oo=null,Rs=null,sa=null;function oa(){sa=Rs=oo=null}function Uo(S,D){var T=S.type._context;x?(Fn(ia,T._currentValue,S),T._currentValue=D):(Fn(ia,T._currentValue2,S),T._currentValue2=D)}function Zi(S){var D=ia.current;Ue(ia,S),S=S.type._context,x?S._currentValue=D:S._currentValue2=D}function Ts(S,D){for(;S!==null;){var T=S.alternate;if(S.childExpirationTime<D)S.childExpirationTime=D,T!==null&&T.childExpirationTime<D&&(T.childExpirationTime=D);else if(T!==null&&T.childExpirationTime<D)T.childExpirationTime=D;else break;S=S.return}}function Ns(S,D){oo=S,sa=Rs=null,S=S.dependencies,S!==null&&S.firstContext!==null&&(S.expirationTime>=D&&(_o=!0),S.firstContext=null)}function Ls(S,D){if(sa!==S&&D!==!1&&D!==0)if((typeof D!="number"||D===1073741823)&&(sa=S,D=1073741823),D={context:S,observedBits:D,next:null},Rs===null){if(oo===null)throw Error(n(308));Rs=D,oo.dependencies={expirationTime:0,firstContext:D,responders:null}}else Rs=Rs.next=D;return x?S._currentValue:S._currentValue2}var ao=!1;function Yn(S){return{baseState:S,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function qn(S){return{baseState:S.baseState,firstUpdate:S.firstUpdate,lastUpdate:S.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function $i(S,D){return{expirationTime:S,suspenseConfig:D,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function es(S,D){S.lastUpdate===null?S.firstUpdate=S.lastUpdate=D:(S.lastUpdate.next=D,S.lastUpdate=D)}function mi(S,D){var T=S.alternate;if(T===null){var q=S.updateQueue,W=null;q===null&&(q=S.updateQueue=Yn(S.memoizedState))}else q=S.updateQueue,W=T.updateQueue,q===null?W===null?(q=S.updateQueue=Yn(S.memoizedState),W=T.updateQueue=Yn(T.memoizedState)):q=S.updateQueue=qn(W):W===null&&(W=T.updateQueue=qn(q));W===null||q===W?es(q,D):q.lastUpdate===null||W.lastUpdate===null?(es(q,D),es(W,D)):(es(q,D),W.lastUpdate=D)}function qa(S,D){var T=S.updateQueue;T=T===null?S.updateQueue=Yn(S.memoizedState):aa(S,T),T.lastCapturedUpdate===null?T.firstCapturedUpdate=T.lastCapturedUpdate=D:(T.lastCapturedUpdate.next=D,T.lastCapturedUpdate=D)}function aa(S,D){var T=S.alternate;return T!==null&&D===T.updateQueue&&(D=S.updateQueue=qn(D)),D}function ee(S,D,T,q,W,ce){switch(T.tag){case 1:return S=T.payload,typeof S=="function"?S.call(ce,q,W):S;case 3:S.effectTag=S.effectTag&-4097|64;case 0:if(S=T.payload,W=typeof S=="function"?S.call(ce,q,W):S,W==null)break;return r({},q,W);case 2:ao=!0}return q}function we(S,D,T,q,W){ao=!1,D=aa(S,D);for(var ce=D.baseState,Se=null,It=0,Et=D.firstUpdate,bt=ce;Et!==null;){var Nr=Et.expirationTime;Nr<W?(Se===null&&(Se=Et,ce=bt),It<Nr&&(It=Nr)):(yI(Nr,Et.suspenseConfig),bt=ee(S,D,Et,bt,T,q),Et.callback!==null&&(S.effectTag|=32,Et.nextEffect=null,D.lastEffect===null?D.firstEffect=D.lastEffect=Et:(D.lastEffect.nextEffect=Et,D.lastEffect=Et))),Et=Et.next}for(Nr=null,Et=D.firstCapturedUpdate;Et!==null;){var is=Et.expirationTime;is<W?(Nr===null&&(Nr=Et,Se===null&&(ce=bt)),It<is&&(It=is)):(bt=ee(S,D,Et,bt,T,q),Et.callback!==null&&(S.effectTag|=32,Et.nextEffect=null,D.lastCapturedEffect===null?D.firstCapturedEffect=D.lastCapturedEffect=Et:(D.lastCapturedEffect.nextEffect=Et,D.lastCapturedEffect=Et))),Et=Et.next}Se===null&&(D.lastUpdate=null),Nr===null?D.lastCapturedUpdate=null:S.effectTag|=32,Se===null&&Nr===null&&(ce=bt),D.baseState=ce,D.firstUpdate=Se,D.firstCapturedUpdate=Nr,jm(It),S.expirationTime=It,S.memoizedState=bt}function je(S,D,T){D.firstCapturedUpdate!==null&&(D.lastUpdate!==null&&(D.lastUpdate.next=D.firstCapturedUpdate,D.lastUpdate=D.lastCapturedUpdate),D.firstCapturedUpdate=D.lastCapturedUpdate=null),Be(D.firstEffect,T),D.firstEffect=D.lastEffect=null,Be(D.firstCapturedEffect,T),D.firstCapturedEffect=D.lastCapturedEffect=null}function Be(S,D){for(;S!==null;){var T=S.callback;if(T!==null){S.callback=null;var q=D;if(typeof T!="function")throw Error(n(191,T));T.call(q)}S=S.nextEffect}}var xe=u.ReactCurrentBatchConfig,Ve=new o.Component().refs;function vt(S,D,T,q){D=S.memoizedState,T=T(q,D),T=T==null?D:r({},D,T),S.memoizedState=T,q=S.updateQueue,q!==null&&S.expirationTime===0&&(q.baseState=T)}var tr={isMounted:function(S){return(S=S._reactInternalFiber)?le(S)===S:!1},enqueueSetState:function(S,D,T){S=S._reactInternalFiber;var q=da(),W=xe.suspense;q=jA(q,S,W),W=$i(q,W),W.payload=D,T!=null&&(W.callback=T),mi(S,W),kc(S,q)},enqueueReplaceState:function(S,D,T){S=S._reactInternalFiber;var q=da(),W=xe.suspense;q=jA(q,S,W),W=$i(q,W),W.tag=1,W.payload=D,T!=null&&(W.callback=T),mi(S,W),kc(S,q)},enqueueForceUpdate:function(S,D){S=S._reactInternalFiber;var T=da(),q=xe.suspense;T=jA(T,S,q),q=$i(T,q),q.tag=2,D!=null&&(q.callback=D),mi(S,q),kc(S,T)}};function Zr(S,D,T,q,W,ce,Se){return S=S.stateNode,typeof S.shouldComponentUpdate=="function"?S.shouldComponentUpdate(q,ce,Se):D.prototype&&D.prototype.isPureReactComponent?!Sn(T,q)||!Sn(W,ce):!0}function Tn(S,D,T){var q=!1,W=Fi,ce=D.contextType;return typeof ce=="object"&&ce!==null?ce=Ls(ce):(W=$n(D)?Zt:Rn.current,q=D.contextTypes,ce=(q=q!=null)?Ri(S,W):Fi),D=new D(T,ce),S.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=tr,S.stateNode=D,D._reactInternalFiber=S,q&&(S=S.stateNode,S.__reactInternalMemoizedUnmaskedChildContext=W,S.__reactInternalMemoizedMaskedChildContext=ce),D}function _r(S,D,T,q){S=D.state,typeof D.componentWillReceiveProps=="function"&&D.componentWillReceiveProps(T,q),typeof D.UNSAFE_componentWillReceiveProps=="function"&&D.UNSAFE_componentWillReceiveProps(T,q),D.state!==S&&tr.enqueueReplaceState(D,D.state,null)}function ei(S,D,T,q){var W=S.stateNode;W.props=T,W.state=S.memoizedState,W.refs=Ve;var ce=D.contextType;typeof ce=="object"&&ce!==null?W.context=Ls(ce):(ce=$n(D)?Zt:Rn.current,W.context=Ri(S,ce)),ce=S.updateQueue,ce!==null&&(we(S,ce,T,W,q),W.state=S.memoizedState),ce=D.getDerivedStateFromProps,typeof ce=="function"&&(vt(S,D,ce,T),W.state=S.memoizedState),typeof D.getDerivedStateFromProps=="function"||typeof W.getSnapshotBeforeUpdate=="function"||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(D=W.state,typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount(),D!==W.state&&tr.enqueueReplaceState(W,W.state,null),ce=S.updateQueue,ce!==null&&(we(S,ce,T,W,q),W.state=S.memoizedState)),typeof W.componentDidMount=="function"&&(S.effectTag|=4)}var Ti=Array.isArray;function Kn(S,D,T){if(S=T.ref,S!==null&&typeof S!="function"&&typeof S!="object"){if(T._owner){if(T=T._owner,T){if(T.tag!==1)throw Error(n(309));var q=T.stateNode}if(!q)throw Error(n(147,S));var W=""+S;return D!==null&&D.ref!==null&&typeof D.ref=="function"&&D.ref._stringRef===W?D.ref:(D=function(ce){var Se=q.refs;Se===Ve&&(Se=q.refs={}),ce===null?delete Se[W]:Se[W]=ce},D._stringRef=W,D)}if(typeof S!="string")throw Error(n(284));if(!T._owner)throw Error(n(290,S))}return S}function ja(S,D){if(S.type!=="textarea")throw Error(n(31,Object.prototype.toString.call(D)==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":D,""))}function la(S){function D(rt,Je){if(S){var ft=rt.lastEffect;ft!==null?(ft.nextEffect=Je,rt.lastEffect=Je):rt.firstEffect=rt.lastEffect=Je,Je.nextEffect=null,Je.effectTag=8}}function T(rt,Je){if(!S)return null;for(;Je!==null;)D(rt,Je),Je=Je.sibling;return null}function q(rt,Je){for(rt=new Map;Je!==null;)Je.key!==null?rt.set(Je.key,Je):rt.set(Je.index,Je),Je=Je.sibling;return rt}function W(rt,Je,ft){return rt=KA(rt,Je,ft),rt.index=0,rt.sibling=null,rt}function ce(rt,Je,ft){return rt.index=ft,S?(ft=rt.alternate,ft!==null?(ft=ft.index,ft<Je?(rt.effectTag=2,Je):ft):(rt.effectTag=2,Je)):Je}function Se(rt){return S&&rt.alternate===null&&(rt.effectTag=2),rt}function It(rt,Je,ft,jt){return Je===null||Je.tag!==6?(Je=BI(ft,rt.mode,jt),Je.return=rt,Je):(Je=W(Je,ft,jt),Je.return=rt,Je)}function Et(rt,Je,ft,jt){return Je!==null&&Je.elementType===ft.type?(jt=W(Je,ft.props,jt),jt.ref=Kn(rt,Je,ft),jt.return=rt,jt):(jt=Gm(ft.type,ft.key,ft.props,null,rt.mode,jt),jt.ref=Kn(rt,Je,ft),jt.return=rt,jt)}function bt(rt,Je,ft,jt){return Je===null||Je.tag!==4||Je.stateNode.containerInfo!==ft.containerInfo||Je.stateNode.implementation!==ft.implementation?(Je=vI(ft,rt.mode,jt),Je.return=rt,Je):(Je=W(Je,ft.children||[],jt),Je.return=rt,Je)}function Nr(rt,Je,ft,jt,Er){return Je===null||Je.tag!==7?(Je=Fu(ft,rt.mode,jt,Er),Je.return=rt,Je):(Je=W(Je,ft,jt),Je.return=rt,Je)}function is(rt,Je,ft){if(typeof Je=="string"||typeof Je=="number")return Je=BI(""+Je,rt.mode,ft),Je.return=rt,Je;if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case p:return ft=Gm(Je.type,Je.key,Je.props,null,rt.mode,ft),ft.ref=Kn(rt,null,Je),ft.return=rt,ft;case h:return Je=vI(Je,rt.mode,ft),Je.return=rt,Je}if(Ti(Je)||pe(Je))return Je=Fu(Je,rt.mode,ft,null),Je.return=rt,Je;ja(rt,Je)}return null}function fi(rt,Je,ft,jt){var Er=Je!==null?Je.key:null;if(typeof ft=="string"||typeof ft=="number")return Er!==null?null:It(rt,Je,""+ft,jt);if(typeof ft=="object"&&ft!==null){switch(ft.$$typeof){case p:return ft.key===Er?ft.type===C?Nr(rt,Je,ft.props.children,jt,Er):Et(rt,Je,ft,jt):null;case h:return ft.key===Er?bt(rt,Je,ft,jt):null}if(Ti(ft)||pe(ft))return Er!==null?null:Nr(rt,Je,ft,jt,null);ja(rt,ft)}return null}function Ao(rt,Je,ft,jt,Er){if(typeof jt=="string"||typeof jt=="number")return rt=rt.get(ft)||null,It(Je,rt,""+jt,Er);if(typeof jt=="object"&&jt!==null){switch(jt.$$typeof){case p:return rt=rt.get(jt.key===null?ft:jt.key)||null,jt.type===C?Nr(Je,rt,jt.props.children,Er,jt.key):Et(Je,rt,jt,Er);case h:return rt=rt.get(jt.key===null?ft:jt.key)||null,bt(Je,rt,jt,Er)}if(Ti(jt)||pe(jt))return rt=rt.get(ft)||null,Nr(Je,rt,jt,Er,null);ja(Je,jt)}return null}function JA(rt,Je,ft,jt){for(var Er=null,In=null,Sr=Je,wn=Je=0,ni=null;Sr!==null&&wn<ft.length;wn++){Sr.index>wn?(ni=Sr,Sr=null):ni=Sr.sibling;var Xr=fi(rt,Sr,ft[wn],jt);if(Xr===null){Sr===null&&(Sr=ni);break}S&&Sr&&Xr.alternate===null&&D(rt,Sr),Je=ce(Xr,Je,wn),In===null?Er=Xr:In.sibling=Xr,In=Xr,Sr=ni}if(wn===ft.length)return T(rt,Sr),Er;if(Sr===null){for(;wn<ft.length;wn++)Sr=is(rt,ft[wn],jt),Sr!==null&&(Je=ce(Sr,Je,wn),In===null?Er=Sr:In.sibling=Sr,In=Sr);return Er}for(Sr=q(rt,Sr);wn<ft.length;wn++)ni=Ao(Sr,rt,wn,ft[wn],jt),ni!==null&&(S&&ni.alternate!==null&&Sr.delete(ni.key===null?wn:ni.key),Je=ce(ni,Je,wn),In===null?Er=ni:In.sibling=ni,In=ni);return S&&Sr.forEach(function(fo){return D(rt,fo)}),Er}function qo(rt,Je,ft,jt){var Er=pe(ft);if(typeof Er!="function")throw Error(n(150));if(ft=Er.call(ft),ft==null)throw Error(n(151));for(var In=Er=null,Sr=Je,wn=Je=0,ni=null,Xr=ft.next();Sr!==null&&!Xr.done;wn++,Xr=ft.next()){Sr.index>wn?(ni=Sr,Sr=null):ni=Sr.sibling;var fo=fi(rt,Sr,Xr.value,jt);if(fo===null){Sr===null&&(Sr=ni);break}S&&Sr&&fo.alternate===null&&D(rt,Sr),Je=ce(fo,Je,wn),In===null?Er=fo:In.sibling=fo,In=fo,Sr=ni}if(Xr.done)return T(rt,Sr),Er;if(Sr===null){for(;!Xr.done;wn++,Xr=ft.next())Xr=is(rt,Xr.value,jt),Xr!==null&&(Je=ce(Xr,Je,wn),In===null?Er=Xr:In.sibling=Xr,In=Xr);return Er}for(Sr=q(rt,Sr);!Xr.done;wn++,Xr=ft.next())Xr=Ao(Sr,rt,wn,Xr.value,jt),Xr!==null&&(S&&Xr.alternate!==null&&Sr.delete(Xr.key===null?wn:Xr.key),Je=ce(Xr,Je,wn),In===null?Er=Xr:In.sibling=Xr,In=Xr);return S&&Sr.forEach(function(CF){return D(rt,CF)}),Er}return function(rt,Je,ft,jt){var Er=typeof ft=="object"&&ft!==null&&ft.type===C&&ft.key===null;Er&&(ft=ft.props.children);var In=typeof ft=="object"&&ft!==null;if(In)switch(ft.$$typeof){case p:e:{for(In=ft.key,Er=Je;Er!==null;){if(Er.key===In)if(Er.tag===7?ft.type===C:Er.elementType===ft.type){T(rt,Er.sibling),Je=W(Er,ft.type===C?ft.props.children:ft.props,jt),Je.ref=Kn(rt,Er,ft),Je.return=rt,rt=Je;break e}else{T(rt,Er);break}else D(rt,Er);Er=Er.sibling}ft.type===C?(Je=Fu(ft.props.children,rt.mode,jt,ft.key),Je.return=rt,rt=Je):(jt=Gm(ft.type,ft.key,ft.props,null,rt.mode,jt),jt.ref=Kn(rt,Je,ft),jt.return=rt,rt=jt)}return Se(rt);case h:e:{for(Er=ft.key;Je!==null;){if(Je.key===Er)if(Je.tag===4&&Je.stateNode.containerInfo===ft.containerInfo&&Je.stateNode.implementation===ft.implementation){T(rt,Je.sibling),Je=W(Je,ft.children||[],jt),Je.return=rt,rt=Je;break e}else{T(rt,Je);break}else D(rt,Je);Je=Je.sibling}Je=vI(ft,rt.mode,jt),Je.return=rt,rt=Je}return Se(rt)}if(typeof ft=="string"||typeof ft=="number")return ft=""+ft,Je!==null&&Je.tag===6?(T(rt,Je.sibling),Je=W(Je,ft,jt),Je.return=rt,rt=Je):(T(rt,Je),Je=BI(ft,rt.mode,jt),Je.return=rt,rt=Je),Se(rt);if(Ti(ft))return JA(rt,Je,ft,jt);if(pe(ft))return qo(rt,Je,ft,jt);if(In&&ja(rt,ft),typeof ft>"u"&&!Er)switch(rt.tag){case 1:case 0:throw rt=rt.type,Error(n(152,rt.displayName||rt.name||"Component"))}return T(rt,Je)}}var yi=la(!0),ca=la(!1),Ga={},lo={current:Ga},RA={current:Ga},Ic={current:Ga};function ua(S){if(S===Ga)throw Error(n(174));return S}function ng(S,D){Fn(Ic,D,S),Fn(RA,S,S),Fn(lo,Ga,S),D=ne(D),Ue(lo,S),Fn(lo,D,S)}function wc(S){Ue(lo,S),Ue(RA,S),Ue(Ic,S)}function bm(S){var D=ua(Ic.current),T=ua(lo.current);D=Z(T,S.type,D),T!==D&&(Fn(RA,S,S),Fn(lo,D,S))}function ig(S){RA.current===S&&(Ue(lo,S),Ue(RA,S))}var Vn={current:0};function fp(S){for(var D=S;D!==null;){if(D.tag===13){var T=D.memoizedState;if(T!==null&&(T=T.dehydrated,T===null||Qs(T)||ro(T)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if((D.effectTag&64)!==0)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===S)break;for(;D.sibling===null;){if(D.return===null||D.return===S)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}function sg(S,D){return{responder:S,props:D}}var TA=u.ReactCurrentDispatcher,Os=u.ReactCurrentBatchConfig,Iu=0,Wa=null,ji=null,Aa=null,wu=null,ms=null,Bc=null,vc=0,G=null,Dt=0,Dl=!1,Si=null,Dc=0;function lt(){throw Error(n(321))}function Bu(S,D){if(D===null)return!1;for(var T=0;T<D.length&&T<S.length;T++)if(!ds(S[T],D[T]))return!1;return!0}function og(S,D,T,q,W,ce){if(Iu=ce,Wa=D,Aa=S!==null?S.memoizedState:null,TA.current=Aa===null?uI:Fm,D=T(q,W),Dl){do Dl=!1,Dc+=1,Aa=S!==null?S.memoizedState:null,Bc=wu,G=ms=ji=null,TA.current=Fm,D=T(q,W);while(Dl);Si=null,Dc=0}if(TA.current=Du,S=Wa,S.memoizedState=wu,S.expirationTime=vc,S.updateQueue=G,S.effectTag|=Dt,S=ji!==null&&ji.next!==null,Iu=0,Bc=ms=wu=Aa=ji=Wa=null,vc=0,G=null,Dt=0,S)throw Error(n(300));return D}function cI(){TA.current=Du,Iu=0,Bc=ms=wu=Aa=ji=Wa=null,vc=0,G=null,Dt=0,Dl=!1,Si=null,Dc=0}function NA(){var S={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return ms===null?wu=ms=S:ms=ms.next=S,ms}function pp(){if(Bc!==null)ms=Bc,Bc=ms.next,ji=Aa,Aa=ji!==null?ji.next:null;else{if(Aa===null)throw Error(n(310));ji=Aa;var S={memoizedState:ji.memoizedState,baseState:ji.baseState,queue:ji.queue,baseUpdate:ji.baseUpdate,next:null};ms=ms===null?wu=S:ms.next=S,Aa=ji.next}return ms}function yr(S,D){return typeof D=="function"?D(S):D}function ys(S){var D=pp(),T=D.queue;if(T===null)throw Error(n(311));if(T.lastRenderedReducer=S,0<Dc){var q=T.dispatch;if(Si!==null){var W=Si.get(T);if(W!==void 0){Si.delete(T);var ce=D.memoizedState;do ce=S(ce,W.action),W=W.next;while(W!==null);return ds(ce,D.memoizedState)||(_o=!0),D.memoizedState=ce,D.baseUpdate===T.last&&(D.baseState=ce),T.lastRenderedState=ce,[ce,q]}}return[D.memoizedState,q]}q=T.last;var Se=D.baseUpdate;if(ce=D.baseState,Se!==null?(q!==null&&(q.next=null),q=Se.next):q=q!==null?q.next:null,q!==null){var It=W=null,Et=q,bt=!1;do{var Nr=Et.expirationTime;Nr<Iu?(bt||(bt=!0,It=Se,W=ce),Nr>vc&&(vc=Nr,jm(vc))):(yI(Nr,Et.suspenseConfig),ce=Et.eagerReducer===S?Et.eagerState:S(ce,Et.action)),Se=Et,Et=Et.next}while(Et!==null&&Et!==q);bt||(It=Se,W=ce),ds(ce,D.memoizedState)||(_o=!0),D.memoizedState=ce,D.baseUpdate=It,D.baseState=W,T.lastRenderedState=ce}return[D.memoizedState,T.dispatch]}function ag(S){var D=NA();return typeof S=="function"&&(S=S()),D.memoizedState=D.baseState=S,S=D.queue={last:null,dispatch:null,lastRenderedReducer:yr,lastRenderedState:S},S=S.dispatch=fg.bind(null,Wa,S),[D.memoizedState,S]}function lg(S){return ys(yr,S)}function cg(S,D,T,q){return S={tag:S,create:D,destroy:T,deps:q,next:null},G===null?(G={lastEffect:null},G.lastEffect=S.next=S):(D=G.lastEffect,D===null?G.lastEffect=S.next=S:(T=D.next,D.next=S,S.next=T,G.lastEffect=S)),S}function hp(S,D,T,q){var W=NA();Dt|=S,W.memoizedState=cg(D,T,void 0,q===void 0?null:q)}function Sc(S,D,T,q){var W=pp();q=q===void 0?null:q;var ce=void 0;if(ji!==null){var Se=ji.memoizedState;if(ce=Se.destroy,q!==null&&Bu(q,Se.deps)){cg(0,T,ce,q);return}}Dt|=S,W.memoizedState=cg(D,T,ce,q)}function mt(S,D){return hp(516,192,S,D)}function Qm(S,D){return Sc(516,192,S,D)}function ug(S,D){if(typeof D=="function")return S=S(),D(S),function(){D(null)};if(D!=null)return S=S(),D.current=S,function(){D.current=null}}function Ag(){}function vu(S,D){return NA().memoizedState=[S,D===void 0?null:D],S}function km(S,D){var T=pp();D=D===void 0?null:D;var q=T.memoizedState;return q!==null&&D!==null&&Bu(D,q[1])?q[0]:(T.memoizedState=[S,D],S)}function fg(S,D,T){if(!(25>Dc))throw Error(n(301));var q=S.alternate;if(S===Wa||q!==null&&q===Wa)if(Dl=!0,S={expirationTime:Iu,suspenseConfig:null,action:T,eagerReducer:null,eagerState:null,next:null},Si===null&&(Si=new Map),T=Si.get(D),T===void 0)Si.set(D,S);else{for(D=T;D.next!==null;)D=D.next;D.next=S}else{var W=da(),ce=xe.suspense;W=jA(W,S,ce),ce={expirationTime:W,suspenseConfig:ce,action:T,eagerReducer:null,eagerState:null,next:null};var Se=D.last;if(Se===null)ce.next=ce;else{var It=Se.next;It!==null&&(ce.next=It),Se.next=ce}if(D.last=ce,S.expirationTime===0&&(q===null||q.expirationTime===0)&&(q=D.lastRenderedReducer,q!==null))try{var Et=D.lastRenderedState,bt=q(Et,T);if(ce.eagerReducer=q,ce.eagerState=bt,ds(bt,Et))return}catch{}finally{}kc(S,W)}}var Du={readContext:Ls,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useResponder:lt,useDeferredValue:lt,useTransition:lt},uI={readContext:Ls,useCallback:vu,useContext:Ls,useEffect:mt,useImperativeHandle:function(S,D,T){return T=T!=null?T.concat([S]):null,hp(4,36,ug.bind(null,D,S),T)},useLayoutEffect:function(S,D){return hp(4,36,S,D)},useMemo:function(S,D){var T=NA();return D=D===void 0?null:D,S=S(),T.memoizedState=[S,D],S},useReducer:function(S,D,T){var q=NA();return D=T!==void 0?T(D):D,q.memoizedState=q.baseState=D,S=q.queue={last:null,dispatch:null,lastRenderedReducer:S,lastRenderedState:D},S=S.dispatch=fg.bind(null,Wa,S),[q.memoizedState,S]},useRef:function(S){var D=NA();return S={current:S},D.memoizedState=S},useState:ag,useDebugValue:Ag,useResponder:sg,useDeferredValue:function(S,D){var T=ag(S),q=T[0],W=T[1];return mt(function(){a.unstable_next(function(){var ce=Os.suspense;Os.suspense=D===void 0?null:D;try{W(S)}finally{Os.suspense=ce}})},[S,D]),q},useTransition:function(S){var D=ag(!1),T=D[0],q=D[1];return[vu(function(W){q(!0),a.unstable_next(function(){var ce=Os.suspense;Os.suspense=S===void 0?null:S;try{q(!1),W()}finally{Os.suspense=ce}})},[S,T]),T]}},Fm={readContext:Ls,useCallback:km,useContext:Ls,useEffect:Qm,useImperativeHandle:function(S,D,T){return T=T!=null?T.concat([S]):null,Sc(4,36,ug.bind(null,D,S),T)},useLayoutEffect:function(S,D){return Sc(4,36,S,D)},useMemo:function(S,D){var T=pp();D=D===void 0?null:D;var q=T.memoizedState;return q!==null&&D!==null&&Bu(D,q[1])?q[0]:(S=S(),T.memoizedState=[S,D],S)},useReducer:ys,useRef:function(){return pp().memoizedState},useState:lg,useDebugValue:Ag,useResponder:sg,useDeferredValue:function(S,D){var T=lg(S),q=T[0],W=T[1];return Qm(function(){a.unstable_next(function(){var ce=Os.suspense;Os.suspense=D===void 0?null:D;try{W(S)}finally{Os.suspense=ce}})},[S,D]),q},useTransition:function(S){var D=lg(!1),T=D[0],q=D[1];return[km(function(W){q(!0),a.unstable_next(function(){var ce=Os.suspense;Os.suspense=S===void 0?null:S;try{q(!1),W()}finally{Os.suspense=ce}})},[S,T]),T]}},fa=null,Pc=null,Sl=!1;function Su(S,D){var T=bl(5,null,null,0);T.elementType="DELETED",T.type="DELETED",T.stateNode=D,T.return=S,T.effectTag=8,S.lastEffect!==null?(S.lastEffect.nextEffect=T,S.lastEffect=T):S.firstEffect=S.lastEffect=T}function pg(S,D){switch(S.tag){case 5:return D=to(D,S.type,S.pendingProps),D!==null?(S.stateNode=D,!0):!1;case 6:return D=Di(D,S.pendingProps),D!==null?(S.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function LA(S){if(Sl){var D=Pc;if(D){var T=D;if(!pg(S,D)){if(D=hc(T),!D||!pg(S,D)){S.effectTag=S.effectTag&-1025|2,Sl=!1,fa=S;return}Su(fa,T)}fa=S,Pc=gu(D)}else S.effectTag=S.effectTag&-1025|2,Sl=!1,fa=S}}function gp(S){for(S=S.return;S!==null&&S.tag!==5&&S.tag!==3&&S.tag!==13;)S=S.return;fa=S}function Ya(S){if(!y||S!==fa)return!1;if(!Sl)return gp(S),Sl=!0,!1;var D=S.type;if(S.tag!==5||D!=="head"&&D!=="body"&&!Te(D,S.memoizedProps))for(D=Pc;D;)Su(S,D),D=hc(D);if(gp(S),S.tag===13){if(!y)throw Error(n(316));if(S=S.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(n(317));Pc=ks(S)}else Pc=fa?hc(S.stateNode):null;return!0}function hg(){y&&(Pc=fa=null,Sl=!1)}var dp=u.ReactCurrentOwner,_o=!1;function Es(S,D,T,q){D.child=S===null?ca(D,null,T,q):yi(D,S.child,T,q)}function Ei(S,D,T,q,W){T=T.render;var ce=D.ref;return Ns(D,W),q=og(S,D,T,q,ce,W),S!==null&&!_o?(D.updateQueue=S.updateQueue,D.effectTag&=-517,S.expirationTime<=W&&(S.expirationTime=0),ti(S,D,W)):(D.effectTag|=1,Es(S,D,q,W),D.child)}function Rm(S,D,T,q,W,ce){if(S===null){var Se=T.type;return typeof Se=="function"&&!wI(Se)&&Se.defaultProps===void 0&&T.compare===null&&T.defaultProps===void 0?(D.tag=15,D.type=Se,Tm(S,D,Se,q,W,ce)):(S=Gm(T.type,null,q,null,D.mode,ce),S.ref=D.ref,S.return=D,D.child=S)}return Se=S.child,W<ce&&(W=Se.memoizedProps,T=T.compare,T=T!==null?T:Sn,T(W,q)&&S.ref===D.ref)?ti(S,D,ce):(D.effectTag|=1,S=KA(Se,q,ce),S.ref=D.ref,S.return=D,D.child=S)}function Tm(S,D,T,q,W,ce){return S!==null&&Sn(S.memoizedProps,q)&&S.ref===D.ref&&(_o=!1,W<ce)?ti(S,D,ce):OA(S,D,T,q,ce)}function Ho(S,D){var T=D.ref;(S===null&&T!==null||S!==null&&S.ref!==T)&&(D.effectTag|=128)}function OA(S,D,T,q,W){var ce=$n(T)?Zt:Rn.current;return ce=Ri(D,ce),Ns(D,W),T=og(S,D,T,q,ce,W),S!==null&&!_o?(D.updateQueue=S.updateQueue,D.effectTag&=-517,S.expirationTime<=W&&(S.expirationTime=0),ti(S,D,W)):(D.effectTag|=1,Es(S,D,T,W),D.child)}function mp(S,D,T,q,W){if($n(T)){var ce=!0;dc(D)}else ce=!1;if(Ns(D,W),D.stateNode===null)S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),Tn(D,T,q,W),ei(D,T,q,W),q=!0;else if(S===null){var Se=D.stateNode,It=D.memoizedProps;Se.props=It;var Et=Se.context,bt=T.contextType;typeof bt=="object"&&bt!==null?bt=Ls(bt):(bt=$n(T)?Zt:Rn.current,bt=Ri(D,bt));var Nr=T.getDerivedStateFromProps,is=typeof Nr=="function"||typeof Se.getSnapshotBeforeUpdate=="function";is||typeof Se.UNSAFE_componentWillReceiveProps!="function"&&typeof Se.componentWillReceiveProps!="function"||(It!==q||Et!==bt)&&_r(D,Se,q,bt),ao=!1;var fi=D.memoizedState;Et=Se.state=fi;var Ao=D.updateQueue;Ao!==null&&(we(D,Ao,q,Se,W),Et=D.memoizedState),It!==q||fi!==Et||Ui.current||ao?(typeof Nr=="function"&&(vt(D,T,Nr,q),Et=D.memoizedState),(It=ao||Zr(D,T,It,q,fi,Et,bt))?(is||typeof Se.UNSAFE_componentWillMount!="function"&&typeof Se.componentWillMount!="function"||(typeof Se.componentWillMount=="function"&&Se.componentWillMount(),typeof Se.UNSAFE_componentWillMount=="function"&&Se.UNSAFE_componentWillMount()),typeof Se.componentDidMount=="function"&&(D.effectTag|=4)):(typeof Se.componentDidMount=="function"&&(D.effectTag|=4),D.memoizedProps=q,D.memoizedState=Et),Se.props=q,Se.state=Et,Se.context=bt,q=It):(typeof Se.componentDidMount=="function"&&(D.effectTag|=4),q=!1)}else Se=D.stateNode,It=D.memoizedProps,Se.props=D.type===D.elementType?It:di(D.type,It),Et=Se.context,bt=T.contextType,typeof bt=="object"&&bt!==null?bt=Ls(bt):(bt=$n(T)?Zt:Rn.current,bt=Ri(D,bt)),Nr=T.getDerivedStateFromProps,(is=typeof Nr=="function"||typeof Se.getSnapshotBeforeUpdate=="function")||typeof Se.UNSAFE_componentWillReceiveProps!="function"&&typeof Se.componentWillReceiveProps!="function"||(It!==q||Et!==bt)&&_r(D,Se,q,bt),ao=!1,Et=D.memoizedState,fi=Se.state=Et,Ao=D.updateQueue,Ao!==null&&(we(D,Ao,q,Se,W),fi=D.memoizedState),It!==q||Et!==fi||Ui.current||ao?(typeof Nr=="function"&&(vt(D,T,Nr,q),fi=D.memoizedState),(Nr=ao||Zr(D,T,It,q,Et,fi,bt))?(is||typeof Se.UNSAFE_componentWillUpdate!="function"&&typeof Se.componentWillUpdate!="function"||(typeof Se.componentWillUpdate=="function"&&Se.componentWillUpdate(q,fi,bt),typeof Se.UNSAFE_componentWillUpdate=="function"&&Se.UNSAFE_componentWillUpdate(q,fi,bt)),typeof Se.componentDidUpdate=="function"&&(D.effectTag|=4),typeof Se.getSnapshotBeforeUpdate=="function"&&(D.effectTag|=256)):(typeof Se.componentDidUpdate!="function"||It===S.memoizedProps&&Et===S.memoizedState||(D.effectTag|=4),typeof Se.getSnapshotBeforeUpdate!="function"||It===S.memoizedProps&&Et===S.memoizedState||(D.effectTag|=256),D.memoizedProps=q,D.memoizedState=fi),Se.props=q,Se.state=fi,Se.context=bt,q=Nr):(typeof Se.componentDidUpdate!="function"||It===S.memoizedProps&&Et===S.memoizedState||(D.effectTag|=4),typeof Se.getSnapshotBeforeUpdate!="function"||It===S.memoizedProps&&Et===S.memoizedState||(D.effectTag|=256),q=!1);return yp(S,D,T,q,ce,W)}function yp(S,D,T,q,W,ce){Ho(S,D);var Se=(D.effectTag&64)!==0;if(!q&&!Se)return W&&wl(D,T,!1),ti(S,D,ce);q=D.stateNode,dp.current=D;var It=Se&&typeof T.getDerivedStateFromError!="function"?null:q.render();return D.effectTag|=1,S!==null&&Se?(D.child=yi(D,S.child,null,ce),D.child=yi(D,null,It,ce)):Es(S,D,It,ce),D.memoizedState=q.state,W&&wl(D,T,!0),D.child}function gg(S){var D=S.stateNode;D.pendingContext?gc(S,D.pendingContext,D.pendingContext!==D.context):D.context&&gc(S,D.context,!1),ng(S,D.containerInfo)}var pa={dehydrated:null,retryTime:0};function rn(S,D,T){var q=D.mode,W=D.pendingProps,ce=Vn.current,Se=!1,It;if((It=(D.effectTag&64)!==0)||(It=(ce&2)!==0&&(S===null||S.memoizedState!==null)),It?(Se=!0,D.effectTag&=-65):S!==null&&S.memoizedState===null||W.fallback===void 0||W.unstable_avoidThisFallback===!0||(ce|=1),Fn(Vn,ce&1,D),S===null){if(W.fallback!==void 0&&LA(D),Se){if(Se=W.fallback,W=Fu(null,q,0,null),W.return=D,(D.mode&2)===0)for(S=D.memoizedState!==null?D.child.child:D.child,W.child=S;S!==null;)S.return=W,S=S.sibling;return T=Fu(Se,q,T,null),T.return=D,W.sibling=T,D.memoizedState=pa,D.child=W,T}return q=W.children,D.memoizedState=null,D.child=ca(D,null,q,T)}if(S.memoizedState!==null){if(S=S.child,q=S.sibling,Se){if(W=W.fallback,T=KA(S,S.pendingProps,0),T.return=D,(D.mode&2)===0&&(Se=D.memoizedState!==null?D.child.child:D.child,Se!==S.child))for(T.child=Se;Se!==null;)Se.return=T,Se=Se.sibling;return q=KA(q,W,q.expirationTime),q.return=D,T.sibling=q,T.childExpirationTime=0,D.memoizedState=pa,D.child=T,q}return T=yi(D,S.child,W.children,T),D.memoizedState=null,D.child=T}if(S=S.child,Se){if(Se=W.fallback,W=Fu(null,q,0,null),W.return=D,W.child=S,S!==null&&(S.return=W),(D.mode&2)===0)for(S=D.memoizedState!==null?D.child.child:D.child,W.child=S;S!==null;)S.return=W,S=S.sibling;return T=Fu(Se,q,T,null),T.return=D,W.sibling=T,T.effectTag|=2,W.childExpirationTime=0,D.memoizedState=pa,D.child=W,T}return D.memoizedState=null,D.child=yi(D,S,W.children,T)}function co(S,D){S.expirationTime<D&&(S.expirationTime=D);var T=S.alternate;T!==null&&T.expirationTime<D&&(T.expirationTime=D),Ts(S.return,D)}function MA(S,D,T,q,W,ce){var Se=S.memoizedState;Se===null?S.memoizedState={isBackwards:D,rendering:null,last:q,tail:T,tailExpiration:0,tailMode:W,lastEffect:ce}:(Se.isBackwards=D,Se.rendering=null,Se.last=q,Se.tail=T,Se.tailExpiration=0,Se.tailMode=W,Se.lastEffect=ce)}function Ka(S,D,T){var q=D.pendingProps,W=q.revealOrder,ce=q.tail;if(Es(S,D,q.children,T),q=Vn.current,(q&2)!==0)q=q&1|2,D.effectTag|=64;else{if(S!==null&&(S.effectTag&64)!==0)e:for(S=D.child;S!==null;){if(S.tag===13)S.memoizedState!==null&&co(S,T);else if(S.tag===19)co(S,T);else if(S.child!==null){S.child.return=S,S=S.child;continue}if(S===D)break e;for(;S.sibling===null;){if(S.return===null||S.return===D)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}q&=1}if(Fn(Vn,q,D),(D.mode&2)===0)D.memoizedState=null;else switch(W){case"forwards":for(T=D.child,W=null;T!==null;)S=T.alternate,S!==null&&fp(S)===null&&(W=T),T=T.sibling;T=W,T===null?(W=D.child,D.child=null):(W=T.sibling,T.sibling=null),MA(D,!1,W,T,ce,D.lastEffect);break;case"backwards":for(T=null,W=D.child,D.child=null;W!==null;){if(S=W.alternate,S!==null&&fp(S)===null){D.child=W;break}S=W.sibling,W.sibling=T,T=W,W=S}MA(D,!0,T,null,ce,D.lastEffect);break;case"together":MA(D,!1,null,null,void 0,D.lastEffect);break;default:D.memoizedState=null}return D.child}function ti(S,D,T){S!==null&&(D.dependencies=S.dependencies);var q=D.expirationTime;if(q!==0&&jm(q),D.childExpirationTime<T)return null;if(S!==null&&D.child!==S.child)throw Error(n(153));if(D.child!==null){for(S=D.child,T=KA(S,S.pendingProps,S.expirationTime),D.child=T,T.return=D;S.sibling!==null;)S=S.sibling,T=T.sibling=KA(S,S.pendingProps,S.expirationTime),T.return=D;T.sibling=null}return D.child}function ha(S){S.effectTag|=4}var xc,Pl,ts,Hr;if(I)xc=function(S,D){for(var T=D.child;T!==null;){if(T.tag===5||T.tag===6)H(S,T.stateNode);else if(T.tag!==4&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===D)break;for(;T.sibling===null;){if(T.return===null||T.return===D)return;T=T.return}T.sibling.return=T.return,T=T.sibling}},Pl=function(){},ts=function(S,D,T,q,W){if(S=S.memoizedProps,S!==q){var ce=D.stateNode,Se=ua(lo.current);T=Me(ce,T,S,q,W,Se),(D.updateQueue=T)&&ha(D)}},Hr=function(S,D,T,q){T!==q&&ha(D)};else if(P){xc=function(S,D,T,q){for(var W=D.child;W!==null;){if(W.tag===5){var ce=W.stateNode;T&&q&&(ce=ki(ce,W.type,W.memoizedProps,W)),H(S,ce)}else if(W.tag===6)ce=W.stateNode,T&&q&&(ce=gs(ce,W.memoizedProps,W)),H(S,ce);else if(W.tag!==4){if(W.tag===13&&(W.effectTag&4)!==0&&(ce=W.memoizedState!==null)){var Se=W.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,xc(S,Se,!0,ce)),ce=Se.sibling,ce!==null)){ce.return=W,W=ce;continue}}if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===D)break;for(;W.sibling===null;){if(W.return===null||W.return===D)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};var Ep=function(S,D,T,q){for(var W=D.child;W!==null;){if(W.tag===5){var ce=W.stateNode;T&&q&&(ce=ki(ce,W.type,W.memoizedProps,W)),jr(S,ce)}else if(W.tag===6)ce=W.stateNode,T&&q&&(ce=gs(ce,W.memoizedProps,W)),jr(S,ce);else if(W.tag!==4){if(W.tag===13&&(W.effectTag&4)!==0&&(ce=W.memoizedState!==null)){var Se=W.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,Ep(S,Se,!0,ce)),ce=Se.sibling,ce!==null)){ce.return=W,W=ce;continue}}if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===D)break;for(;W.sibling===null;){if(W.return===null||W.return===D)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};Pl=function(S){var D=S.stateNode;if(S.firstEffect!==null){var T=D.containerInfo,q=Br(T);Ep(q,S,!1,!1),D.pendingChildren=q,ha(S),Hn(T,q)}},ts=function(S,D,T,q,W){var ce=S.stateNode,Se=S.memoizedProps;if((S=D.firstEffect===null)&&Se===q)D.stateNode=ce;else{var It=D.stateNode,Et=ua(lo.current),bt=null;Se!==q&&(bt=Me(It,T,Se,q,W,Et)),S&&bt===null?D.stateNode=ce:(ce=fr(ce,bt,T,Se,q,D,S,It),yt(ce,T,q,W,Et)&&ha(D),D.stateNode=ce,S?ha(D):xc(ce,D,!1,!1))}},Hr=function(S,D,T,q){T!==q&&(S=ua(Ic.current),T=ua(lo.current),D.stateNode=_e(q,S,T,D),ha(D))}}else Pl=function(){},ts=function(){},Hr=function(){};function bc(S,D){switch(S.tailMode){case"hidden":D=S.tail;for(var T=null;D!==null;)D.alternate!==null&&(T=D),D=D.sibling;T===null?S.tail=null:T.sibling=null;break;case"collapsed":T=S.tail;for(var q=null;T!==null;)T.alternate!==null&&(q=T),T=T.sibling;q===null?D||S.tail===null?S.tail=null:S.tail.sibling=null:q.sibling=null}}function AI(S){switch(S.tag){case 1:$n(S.type)&&Ua(S);var D=S.effectTag;return D&4096?(S.effectTag=D&-4097|64,S):null;case 3:if(wc(S),$t(S),D=S.effectTag,(D&64)!==0)throw Error(n(285));return S.effectTag=D&-4097|64,S;case 5:return ig(S),null;case 13:return Ue(Vn,S),D=S.effectTag,D&4096?(S.effectTag=D&-4097|64,S):null;case 19:return Ue(Vn,S),null;case 4:return wc(S),null;case 10:return Zi(S),null;default:return null}}function dg(S,D){return{value:S,source:D,stack:Cl(D)}}var mg=typeof WeakSet=="function"?WeakSet:Set;function Va(S,D){var T=D.source,q=D.stack;q===null&&T!==null&&(q=Cl(T)),T!==null&&ge(T.type),D=D.value,S!==null&&S.tag===1&&ge(S.type);try{console.error(D)}catch(W){setTimeout(function(){throw W})}}function Nm(S,D){try{D.props=S.memoizedProps,D.state=S.memoizedState,D.componentWillUnmount()}catch(T){YA(S,T)}}function yg(S){var D=S.ref;if(D!==null)if(typeof D=="function")try{D(null)}catch(T){YA(S,T)}else D.current=null}function kt(S,D){switch(D.tag){case 0:case 11:case 15:N(2,0,D);break;case 1:if(D.effectTag&256&&S!==null){var T=S.memoizedProps,q=S.memoizedState;S=D.stateNode,D=S.getSnapshotBeforeUpdate(D.elementType===D.type?T:di(D.type,T),q),S.__reactInternalSnapshotBeforeUpdate=D}break;case 3:case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}function N(S,D,T){if(T=T.updateQueue,T=T!==null?T.lastEffect:null,T!==null){var q=T=T.next;do{if((q.tag&S)!==0){var W=q.destroy;q.destroy=void 0,W!==void 0&&W()}(q.tag&D)!==0&&(W=q.create,q.destroy=W()),q=q.next}while(q!==T)}}function K(S,D,T){switch(typeof II=="function"&&II(D),D.tag){case 0:case 11:case 14:case 15:if(S=D.updateQueue,S!==null&&(S=S.lastEffect,S!==null)){var q=S.next;so(97<T?97:T,function(){var W=q;do{var ce=W.destroy;if(ce!==void 0){var Se=D;try{ce()}catch(It){YA(Se,It)}}W=W.next}while(W!==q)})}break;case 1:yg(D),T=D.stateNode,typeof T.componentWillUnmount=="function"&&Nm(D,T);break;case 5:yg(D);break;case 4:I?gr(S,D,T):P&&ze(D)}}function te(S,D,T){for(var q=D;;)if(K(S,q,T),q.child===null||I&&q.tag===4){if(q===D)break;for(;q.sibling===null;){if(q.return===null||q.return===D)return;q=q.return}q.sibling.return=q.return,q=q.sibling}else q.child.return=q,q=q.child}function Ae(S){var D=S.alternate;S.return=null,S.child=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.alternate=null,S.firstEffect=null,S.lastEffect=null,S.pendingProps=null,S.memoizedProps=null,D!==null&&Ae(D)}function ze(S){if(P){S=S.stateNode.containerInfo;var D=Br(S);bs(S,D)}}function gt(S){return S.tag===5||S.tag===3||S.tag===4}function ur(S){if(I){e:{for(var D=S.return;D!==null;){if(gt(D)){var T=D;break e}D=D.return}throw Error(n(160))}switch(D=T.stateNode,T.tag){case 5:var q=!1;break;case 3:D=D.containerInfo,q=!0;break;case 4:D=D.containerInfo,q=!0;break;default:throw Error(n(161))}T.effectTag&16&&(Ut(D),T.effectTag&=-17);e:t:for(T=S;;){for(;T.sibling===null;){if(T.return===null||gt(T.return)){T=null;break e}T=T.return}for(T.sibling.return=T.return,T=T.sibling;T.tag!==5&&T.tag!==6&&T.tag!==18;){if(T.effectTag&2||T.child===null||T.tag===4)continue t;T.child.return=T,T=T.child}if(!(T.effectTag&2)){T=T.stateNode;break e}}for(var W=S;;){var ce=W.tag===5||W.tag===6;if(ce)ce=ce?W.stateNode:W.stateNode.instance,T?q?Ne(D,ce,T):ke(D,ce,T):q?z(D,ce):F(D,ce);else if(W.tag!==4&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===S)break;for(;W.sibling===null;){if(W.return===null||W.return===S)return;W=W.return}W.sibling.return=W.return,W=W.sibling}}}function gr(S,D,T){for(var q=D,W=!1,ce,Se;;){if(!W){W=q.return;e:for(;;){if(W===null)throw Error(n(160));switch(ce=W.stateNode,W.tag){case 5:Se=!1;break e;case 3:ce=ce.containerInfo,Se=!0;break e;case 4:ce=ce.containerInfo,Se=!0;break e}W=W.return}W=!0}if(q.tag===5||q.tag===6)te(S,q,T),Se?ht(ce,q.stateNode):st(ce,q.stateNode);else if(q.tag===4){if(q.child!==null){ce=q.stateNode.containerInfo,Se=!0,q.child.return=q,q=q.child;continue}}else if(K(S,q,T),q.child!==null){q.child.return=q,q=q.child;continue}if(q===D)break;for(;q.sibling===null;){if(q.return===null||q.return===D)return;q=q.return,q.tag===4&&(W=!1)}q.sibling.return=q.return,q=q.sibling}}function hn(S,D){if(I)switch(D.tag){case 0:case 11:case 14:case 15:N(4,8,D);break;case 1:break;case 5:var T=D.stateNode;if(T!=null){var q=D.memoizedProps;S=S!==null?S.memoizedProps:q;var W=D.type,ce=D.updateQueue;D.updateQueue=null,ce!==null&&ie(T,ce,W,S,q,D)}break;case 6:if(D.stateNode===null)throw Error(n(162));T=D.memoizedProps,X(D.stateNode,S!==null?S.memoizedProps:T,T);break;case 3:y&&(D=D.stateNode,D.hydrate&&(D.hydrate=!1,Cn(D.containerInfo)));break;case 12:break;case 13:ri(D),Ni(D);break;case 19:Ni(D);break;case 17:break;case 20:break;case 21:break;default:throw Error(n(163))}else{switch(D.tag){case 0:case 11:case 14:case 15:N(4,8,D);return;case 12:return;case 13:ri(D),Ni(D);return;case 19:Ni(D);return;case 3:y&&(T=D.stateNode,T.hydrate&&(T.hydrate=!1,Cn(T.containerInfo)))}e:if(P)switch(D.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:D=D.stateNode,bs(D.containerInfo,D.pendingChildren);break e;default:throw Error(n(163))}}}function ri(S){var D=S;if(S.memoizedState===null)var T=!1;else T=!0,D=S.child,hI=Hi();if(I&&D!==null){e:if(S=D,I)for(D=S;;){if(D.tag===5){var q=D.stateNode;T?Xt(q):tn(D.stateNode,D.memoizedProps)}else if(D.tag===6)q=D.stateNode,T?xt(q):Dr(q,D.memoizedProps);else if(D.tag===13&&D.memoizedState!==null&&D.memoizedState.dehydrated===null){q=D.child.sibling,q.return=D,D=q;continue}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===S)break e;for(;D.sibling===null;){if(D.return===null||D.return===S)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}}}function Ni(S){var D=S.updateQueue;if(D!==null){S.updateQueue=null;var T=S.stateNode;T===null&&(T=S.stateNode=new mg),D.forEach(function(q){var W=hF.bind(null,S,q);T.has(q)||(T.add(q),q.then(W,W))})}}var Eg=typeof WeakMap=="function"?WeakMap:Map;function Fv(S,D,T){T=$i(T,null),T.tag=3,T.payload={element:null};var q=D.value;return T.callback=function(){xu||(xu=!0,_m=q),Va(S,D)},T}function Rv(S,D,T){T=$i(T,null),T.tag=3;var q=S.type.getDerivedStateFromError;if(typeof q=="function"){var W=D.value;T.payload=function(){return Va(S,D),q(W)}}var ce=S.stateNode;return ce!==null&&typeof ce.componentDidCatch=="function"&&(T.callback=function(){typeof q!="function"&&(bu===null?bu=new Set([this]):bu.add(this),Va(S,D));var Se=D.stack;this.componentDidCatch(D.value,{componentStack:Se!==null?Se:""})}),T}var fI=Math.ceil,Cp=u.ReactCurrentDispatcher,pI=u.ReactCurrentOwner,gn=0,Lm=8,rs=16,Ms=32,Pu=0,Om=1,Ci=2,ga=3,xl=4,Qc=5,pr=gn,Ai=null,Fr=null,ns=0,Gi=Pu,Mm=null,Ja=1073741823,UA=1073741823,Um=null,Ip=0,_A=!1,hI=0,gI=500,nr=null,xu=!1,_m=null,bu=null,wp=!1,Cg=null,HA=90,qA=null,Ig=0,dI=null,Hm=0;function da(){return(pr&(rs|Ms))!==gn?1073741821-(Hi()/10|0):Hm!==0?Hm:Hm=1073741821-(Hi()/10|0)}function jA(S,D,T){if(D=D.mode,(D&2)===0)return 1073741823;var q=Mo();if((D&4)===0)return q===99?1073741823:1073741822;if((pr&rs)!==gn)return ns;if(T!==null)S=Ha(S,T.timeoutMs|0||5e3,250);else switch(q){case 99:S=1073741823;break;case 98:S=Ha(S,150,100);break;case 97:case 96:S=Ha(S,5e3,250);break;case 95:S=2;break;default:throw Error(n(326))}return Ai!==null&&S===ns&&--S,S}function kc(S,D){if(50<Ig)throw Ig=0,dI=null,Error(n(185));if(S=wg(S,D),S!==null){var T=Mo();D===1073741823?(pr&Lm)!==gn&&(pr&(rs|Ms))===gn?mI(S):(uo(S),pr===gn&&qi()):uo(S),(pr&4)===gn||T!==98&&T!==99||(qA===null?qA=new Map([[S,D]]):(T=qA.get(S),(T===void 0||T>D)&&qA.set(S,D)))}}function wg(S,D){S.expirationTime<D&&(S.expirationTime=D);var T=S.alternate;T!==null&&T.expirationTime<D&&(T.expirationTime=D);var q=S.return,W=null;if(q===null&&S.tag===3)W=S.stateNode;else for(;q!==null;){if(T=q.alternate,q.childExpirationTime<D&&(q.childExpirationTime=D),T!==null&&T.childExpirationTime<D&&(T.childExpirationTime=D),q.return===null&&q.tag===3){W=q.stateNode;break}q=q.return}return W!==null&&(Ai===W&&(jm(D),Gi===xl&&VA(W,ns)),qv(W,D)),W}function qm(S){var D=S.lastExpiredTime;return D!==0||(D=S.firstPendingTime,!Hv(S,D))?D:(D=S.lastPingedTime,S=S.nextKnownPendingLevel,D>S?D:S)}function uo(S){if(S.lastExpiredTime!==0)S.callbackExpirationTime=1073741823,S.callbackPriority=99,S.callbackNode=Eu(mI.bind(null,S));else{var D=qm(S),T=S.callbackNode;if(D===0)T!==null&&(S.callbackNode=null,S.callbackExpirationTime=0,S.callbackPriority=90);else{var q=da();if(D===1073741823?q=99:D===1||D===2?q=95:(q=10*(1073741821-D)-10*(1073741821-q),q=0>=q?99:250>=q?98:5250>=q?97:95),T!==null){var W=S.callbackPriority;if(S.callbackExpirationTime===D&&W>=q)return;T!==QA&&Ce(T)}S.callbackExpirationTime=D,S.callbackPriority=q,D=D===1073741823?Eu(mI.bind(null,S)):vl(q,Tv.bind(null,S),{timeout:10*(1073741821-D)-Hi()}),S.callbackNode=D}}}function Tv(S,D){if(Hm=0,D)return D=da(),Wm(S,D),uo(S),null;var T=qm(S);if(T!==0){if(D=S.callbackNode,(pr&(rs|Ms))!==gn)throw Error(n(327));if(Bp(),S===Ai&&T===ns||Qu(S,T),Fr!==null){var q=pr;pr|=rs;var W=WA(S);do try{cF();break}catch(It){GA(S,It)}while(1);if(oa(),pr=q,Cp.current=W,Gi===Om)throw D=Mm,Qu(S,T),VA(S,T),uo(S),D;if(Fr===null)switch(W=S.finishedWork=S.current.alternate,S.finishedExpirationTime=T,q=Gi,Ai=null,q){case Pu:case Om:throw Error(n(345));case Ci:Wm(S,2<T?2:T);break;case ga:if(VA(S,T),q=S.lastSuspendedTime,T===q&&(S.nextKnownPendingLevel=EI(W)),Ja===1073741823&&(W=hI+gI-Hi(),10<W)){if(_A){var ce=S.lastPingedTime;if(ce===0||ce>=T){S.lastPingedTime=T,Qu(S,T);break}}if(ce=qm(S),ce!==0&&ce!==T)break;if(q!==0&&q!==T){S.lastPingedTime=q;break}S.timeoutHandle=qe(ku.bind(null,S),W);break}ku(S);break;case xl:if(VA(S,T),q=S.lastSuspendedTime,T===q&&(S.nextKnownPendingLevel=EI(W)),_A&&(W=S.lastPingedTime,W===0||W>=T)){S.lastPingedTime=T,Qu(S,T);break}if(W=qm(S),W!==0&&W!==T)break;if(q!==0&&q!==T){S.lastPingedTime=q;break}if(UA!==1073741823?q=10*(1073741821-UA)-Hi():Ja===1073741823?q=0:(q=10*(1073741821-Ja)-5e3,W=Hi(),T=10*(1073741821-T)-W,q=W-q,0>q&&(q=0),q=(120>q?120:480>q?480:1080>q?1080:1920>q?1920:3e3>q?3e3:4320>q?4320:1960*fI(q/1960))-q,T<q&&(q=T)),10<q){S.timeoutHandle=qe(ku.bind(null,S),q);break}ku(S);break;case Qc:if(Ja!==1073741823&&Um!==null){ce=Ja;var Se=Um;if(q=Se.busyMinDurationMs|0,0>=q?q=0:(W=Se.busyDelayMs|0,ce=Hi()-(10*(1073741821-ce)-(Se.timeoutMs|0||5e3)),q=ce<=W?0:W+q-ce),10<q){VA(S,T),S.timeoutHandle=qe(ku.bind(null,S),q);break}}ku(S);break;default:throw Error(n(329))}if(uo(S),S.callbackNode===D)return Tv.bind(null,S)}}return null}function mI(S){var D=S.lastExpiredTime;if(D=D!==0?D:1073741823,S.finishedExpirationTime===D)ku(S);else{if((pr&(rs|Ms))!==gn)throw Error(n(327));if(Bp(),S===Ai&&D===ns||Qu(S,D),Fr!==null){var T=pr;pr|=rs;var q=WA(S);do try{lF();break}catch(W){GA(S,W)}while(1);if(oa(),pr=T,Cp.current=q,Gi===Om)throw T=Mm,Qu(S,D),VA(S,D),uo(S),T;if(Fr!==null)throw Error(n(261));S.finishedWork=S.current.alternate,S.finishedExpirationTime=D,Ai=null,ku(S),uo(S)}}return null}function Nv(S,D){Wm(S,D),uo(S),(pr&(rs|Ms))===gn&&qi()}function aF(){if(qA!==null){var S=qA;qA=null,S.forEach(function(D,T){Wm(T,D),uo(T)}),qi()}}function Lv(S,D){if((pr&(rs|Ms))!==gn)throw Error(n(187));var T=pr;pr|=1;try{return so(99,S.bind(null,D))}finally{pr=T,qi()}}function Qu(S,D){S.finishedWork=null,S.finishedExpirationTime=0;var T=S.timeoutHandle;if(T!==Oe&&(S.timeoutHandle=Oe,At(T)),Fr!==null)for(T=Fr.return;T!==null;){var q=T;switch(q.tag){case 1:var W=q.type.childContextTypes;W!=null&&Ua(q);break;case 3:wc(q),$t(q);break;case 5:ig(q);break;case 4:wc(q);break;case 13:Ue(Vn,q);break;case 19:Ue(Vn,q);break;case 10:Zi(q)}T=T.return}Ai=S,Fr=KA(S.current,null,D),ns=D,Gi=Pu,Mm=null,UA=Ja=1073741823,Um=null,Ip=0,_A=!1}function GA(S,D){do{try{if(oa(),cI(),Fr===null||Fr.return===null)return Gi=Om,Mm=D,null;e:{var T=S,q=Fr.return,W=Fr,ce=D;if(D=ns,W.effectTag|=2048,W.firstEffect=W.lastEffect=null,ce!==null&&typeof ce=="object"&&typeof ce.then=="function"){var Se=ce,It=(Vn.current&1)!==0,Et=q;do{var bt;if(bt=Et.tag===13){var Nr=Et.memoizedState;if(Nr!==null)bt=Nr.dehydrated!==null;else{var is=Et.memoizedProps;bt=is.fallback===void 0?!1:is.unstable_avoidThisFallback!==!0?!0:!It}}if(bt){var fi=Et.updateQueue;if(fi===null){var Ao=new Set;Ao.add(Se),Et.updateQueue=Ao}else fi.add(Se);if((Et.mode&2)===0){if(Et.effectTag|=64,W.effectTag&=-2981,W.tag===1)if(W.alternate===null)W.tag=17;else{var JA=$i(1073741823,null);JA.tag=2,mi(W,JA)}W.expirationTime=1073741823;break e}ce=void 0,W=D;var qo=T.pingCache;if(qo===null?(qo=T.pingCache=new Eg,ce=new Set,qo.set(Se,ce)):(ce=qo.get(Se),ce===void 0&&(ce=new Set,qo.set(Se,ce))),!ce.has(W)){ce.add(W);var rt=pF.bind(null,T,Se,W);Se.then(rt,rt)}Et.effectTag|=4096,Et.expirationTime=D;break e}Et=Et.return}while(Et!==null);ce=Error((ge(W.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
283
284Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+Cl(W))}Gi!==Qc&&(Gi=Ci),ce=dg(ce,W),Et=q;do{switch(Et.tag){case 3:Se=ce,Et.effectTag|=4096,Et.expirationTime=D;var Je=Fv(Et,Se,D);qa(Et,Je);break e;case 1:Se=ce;var ft=Et.type,jt=Et.stateNode;if((Et.effectTag&64)===0&&(typeof ft.getDerivedStateFromError=="function"||jt!==null&&typeof jt.componentDidCatch=="function"&&(bu===null||!bu.has(jt)))){Et.effectTag|=4096,Et.expirationTime=D;var Er=Rv(Et,Se,D);qa(Et,Er);break e}}Et=Et.return}while(Et!==null)}Fr=Mv(Fr)}catch(In){D=In;continue}break}while(1)}function WA(){var S=Cp.current;return Cp.current=Du,S===null?Du:S}function yI(S,D){S<Ja&&2<S&&(Ja=S),D!==null&&S<UA&&2<S&&(UA=S,Um=D)}function jm(S){S>Ip&&(Ip=S)}function lF(){for(;Fr!==null;)Fr=Ov(Fr)}function cF(){for(;Fr!==null&&!Rt();)Fr=Ov(Fr)}function Ov(S){var D=_v(S.alternate,S,ns);return S.memoizedProps=S.pendingProps,D===null&&(D=Mv(S)),pI.current=null,D}function Mv(S){Fr=S;do{var D=Fr.alternate;if(S=Fr.return,(Fr.effectTag&2048)===0){e:{var T=D;D=Fr;var q=ns,W=D.pendingProps;switch(D.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:$n(D.type)&&Ua(D);break;case 3:wc(D),$t(D),W=D.stateNode,W.pendingContext&&(W.context=W.pendingContext,W.pendingContext=null),(T===null||T.child===null)&&Ya(D)&&ha(D),Pl(D);break;case 5:ig(D);var ce=ua(Ic.current);if(q=D.type,T!==null&&D.stateNode!=null)ts(T,D,q,W,ce),T.ref!==D.ref&&(D.effectTag|=128);else if(W){if(T=ua(lo.current),Ya(D)){if(W=D,!y)throw Error(n(175));T=cp(W.stateNode,W.type,W.memoizedProps,ce,T,W),W.updateQueue=T,T=T!==null,T&&ha(D)}else{var Se=ut(q,W,ce,T,D);xc(Se,D,!1,!1),D.stateNode=Se,yt(Se,q,W,ce,T)&&ha(D)}D.ref!==null&&(D.effectTag|=128)}else if(D.stateNode===null)throw Error(n(166));break;case 6:if(T&&D.stateNode!=null)Hr(T,D,T.memoizedProps,W);else{if(typeof W!="string"&&D.stateNode===null)throw Error(n(166));if(T=ua(Ic.current),ce=ua(lo.current),Ya(D)){if(T=D,!y)throw Error(n(176));(T=up(T.stateNode,T.memoizedProps,T))&&ha(D)}else D.stateNode=_e(W,T,ce,D)}break;case 11:break;case 13:if(Ue(Vn,D),W=D.memoizedState,(D.effectTag&64)!==0){D.expirationTime=q;break e}W=W!==null,ce=!1,T===null?D.memoizedProps.fallback!==void 0&&Ya(D):(q=T.memoizedState,ce=q!==null,W||q===null||(q=T.child.sibling,q!==null&&(Se=D.firstEffect,Se!==null?(D.firstEffect=q,q.nextEffect=Se):(D.firstEffect=D.lastEffect=q,q.nextEffect=null),q.effectTag=8))),W&&!ce&&(D.mode&2)!==0&&(T===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||(Vn.current&1)!==0?Gi===Pu&&(Gi=ga):((Gi===Pu||Gi===ga)&&(Gi=xl),Ip!==0&&Ai!==null&&(VA(Ai,ns),qv(Ai,Ip)))),P&&W&&(D.effectTag|=4),I&&(W||ce)&&(D.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:wc(D),Pl(D);break;case 10:Zi(D);break;case 9:break;case 14:break;case 17:$n(D.type)&&Ua(D);break;case 19:if(Ue(Vn,D),W=D.memoizedState,W===null)break;if(ce=(D.effectTag&64)!==0,Se=W.rendering,Se===null){if(ce)bc(W,!1);else if(Gi!==Pu||T!==null&&(T.effectTag&64)!==0)for(T=D.child;T!==null;){if(Se=fp(T),Se!==null){for(D.effectTag|=64,bc(W,!1),T=Se.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),W.lastEffect===null&&(D.firstEffect=null),D.lastEffect=W.lastEffect,T=q,W=D.child;W!==null;)ce=W,q=T,ce.effectTag&=2,ce.nextEffect=null,ce.firstEffect=null,ce.lastEffect=null,Se=ce.alternate,Se===null?(ce.childExpirationTime=0,ce.expirationTime=q,ce.child=null,ce.memoizedProps=null,ce.memoizedState=null,ce.updateQueue=null,ce.dependencies=null):(ce.childExpirationTime=Se.childExpirationTime,ce.expirationTime=Se.expirationTime,ce.child=Se.child,ce.memoizedProps=Se.memoizedProps,ce.memoizedState=Se.memoizedState,ce.updateQueue=Se.updateQueue,q=Se.dependencies,ce.dependencies=q===null?null:{expirationTime:q.expirationTime,firstContext:q.firstContext,responders:q.responders}),W=W.sibling;Fn(Vn,Vn.current&1|2,D),D=D.child;break e}T=T.sibling}}else{if(!ce)if(T=fp(Se),T!==null){if(D.effectTag|=64,ce=!0,T=T.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),bc(W,!0),W.tail===null&&W.tailMode==="hidden"&&!Se.alternate){D=D.lastEffect=W.lastEffect,D!==null&&(D.nextEffect=null);break}}else Hi()>W.tailExpiration&&1<q&&(D.effectTag|=64,ce=!0,bc(W,!1),D.expirationTime=D.childExpirationTime=q-1);W.isBackwards?(Se.sibling=D.child,D.child=Se):(T=W.last,T!==null?T.sibling=Se:D.child=Se,W.last=Se)}if(W.tail!==null){W.tailExpiration===0&&(W.tailExpiration=Hi()+500),T=W.tail,W.rendering=T,W.tail=T.sibling,W.lastEffect=D.lastEffect,T.sibling=null,W=Vn.current,W=ce?W&1|2:W&1,Fn(Vn,W,D),D=T;break e}break;case 20:break;case 21:break;default:throw Error(n(156,D.tag))}D=null}if(T=Fr,ns===1||T.childExpirationTime!==1){for(W=0,ce=T.child;ce!==null;)q=ce.expirationTime,Se=ce.childExpirationTime,q>W&&(W=q),Se>W&&(W=Se),ce=ce.sibling;T.childExpirationTime=W}if(D!==null)return D;S!==null&&(S.effectTag&2048)===0&&(S.firstEffect===null&&(S.firstEffect=Fr.firstEffect),Fr.lastEffect!==null&&(S.lastEffect!==null&&(S.lastEffect.nextEffect=Fr.firstEffect),S.lastEffect=Fr.lastEffect),1<Fr.effectTag&&(S.lastEffect!==null?S.lastEffect.nextEffect=Fr:S.firstEffect=Fr,S.lastEffect=Fr))}else{if(D=AI(Fr,ns),D!==null)return D.effectTag&=2047,D;S!==null&&(S.firstEffect=S.lastEffect=null,S.effectTag|=2048)}if(D=Fr.sibling,D!==null)return D;Fr=S}while(Fr!==null);return Gi===Pu&&(Gi=Qc),null}function EI(S){var D=S.expirationTime;return S=S.childExpirationTime,D>S?D:S}function ku(S){var D=Mo();return so(99,uF.bind(null,S,D)),null}function uF(S,D){do Bp();while(Cg!==null);if((pr&(rs|Ms))!==gn)throw Error(n(327));var T=S.finishedWork,q=S.finishedExpirationTime;if(T===null)return null;if(S.finishedWork=null,S.finishedExpirationTime=0,T===S.current)throw Error(n(177));S.callbackNode=null,S.callbackExpirationTime=0,S.callbackPriority=90,S.nextKnownPendingLevel=0;var W=EI(T);if(S.firstPendingTime=W,q<=S.lastSuspendedTime?S.firstSuspendedTime=S.lastSuspendedTime=S.nextKnownPendingLevel=0:q<=S.firstSuspendedTime&&(S.firstSuspendedTime=q-1),q<=S.lastPingedTime&&(S.lastPingedTime=0),q<=S.lastExpiredTime&&(S.lastExpiredTime=0),S===Ai&&(Fr=Ai=null,ns=0),1<T.effectTag?T.lastEffect!==null?(T.lastEffect.nextEffect=T,W=T.firstEffect):W=T:W=T.firstEffect,W!==null){var ce=pr;pr|=Ms,pI.current=null,me(S.containerInfo),nr=W;do try{AF()}catch(fo){if(nr===null)throw Error(n(330));YA(nr,fo),nr=nr.nextEffect}while(nr!==null);nr=W;do try{for(var Se=S,It=D;nr!==null;){var Et=nr.effectTag;if(Et&16&&I&&Ut(nr.stateNode),Et&128){var bt=nr.alternate;if(bt!==null){var Nr=bt.ref;Nr!==null&&(typeof Nr=="function"?Nr(null):Nr.current=null)}}switch(Et&1038){case 2:ur(nr),nr.effectTag&=-3;break;case 6:ur(nr),nr.effectTag&=-3,hn(nr.alternate,nr);break;case 1024:nr.effectTag&=-1025;break;case 1028:nr.effectTag&=-1025,hn(nr.alternate,nr);break;case 4:hn(nr.alternate,nr);break;case 8:var is=Se,fi=nr,Ao=It;I?gr(is,fi,Ao):te(is,fi,Ao),Ae(fi)}nr=nr.nextEffect}}catch(fo){if(nr===null)throw Error(n(330));YA(nr,fo),nr=nr.nextEffect}while(nr!==null);be(S.containerInfo),S.current=T,nr=W;do try{for(Et=q;nr!==null;){var JA=nr.effectTag;if(JA&36){var qo=nr.alternate;switch(bt=nr,Nr=Et,bt.tag){case 0:case 11:case 15:N(16,32,bt);break;case 1:var rt=bt.stateNode;if(bt.effectTag&4)if(qo===null)rt.componentDidMount();else{var Je=bt.elementType===bt.type?qo.memoizedProps:di(bt.type,qo.memoizedProps);rt.componentDidUpdate(Je,qo.memoizedState,rt.__reactInternalSnapshotBeforeUpdate)}var ft=bt.updateQueue;ft!==null&&je(bt,ft,rt,Nr);break;case 3:var jt=bt.updateQueue;if(jt!==null){if(Se=null,bt.child!==null)switch(bt.child.tag){case 5:Se=de(bt.child.stateNode);break;case 1:Se=bt.child.stateNode}je(bt,jt,Se,Nr)}break;case 5:var Er=bt.stateNode;qo===null&&bt.effectTag&4&&$(Er,bt.type,bt.memoizedProps,bt);break;case 6:break;case 4:break;case 12:break;case 13:if(y&&bt.memoizedState===null){var In=bt.alternate;if(In!==null){var Sr=In.memoizedState;if(Sr!==null){var wn=Sr.dehydrated;wn!==null&&no(wn)}}}break;case 19:case 17:case 20:case 21:break;default:throw Error(n(163))}}if(JA&128){bt=void 0;var ni=nr.ref;if(ni!==null){var Xr=nr.stateNode;switch(nr.tag){case 5:bt=de(Xr);break;default:bt=Xr}typeof ni=="function"?ni(bt):ni.current=bt}}nr=nr.nextEffect}}catch(fo){if(nr===null)throw Error(n(330));YA(nr,fo),nr=nr.nextEffect}while(nr!==null);nr=null,Dn(),pr=ce}else S.current=T;if(wp)wp=!1,Cg=S,HA=D;else for(nr=W;nr!==null;)D=nr.nextEffect,nr.nextEffect=null,nr=D;if(D=S.firstPendingTime,D===0&&(bu=null),D===1073741823?S===dI?Ig++:(Ig=0,dI=S):Ig=0,typeof CI=="function"&&CI(T.stateNode,q),uo(S),xu)throw xu=!1,S=_m,_m=null,S;return(pr&Lm)!==gn||qi(),null}function AF(){for(;nr!==null;){var S=nr.effectTag;(S&256)!==0&&kt(nr.alternate,nr),(S&512)===0||wp||(wp=!0,vl(97,function(){return Bp(),null})),nr=nr.nextEffect}}function Bp(){if(HA!==90){var S=97<HA?97:HA;return HA=90,so(S,fF)}}function fF(){if(Cg===null)return!1;var S=Cg;if(Cg=null,(pr&(rs|Ms))!==gn)throw Error(n(331));var D=pr;for(pr|=Ms,S=S.current.firstEffect;S!==null;){try{var T=S;if((T.effectTag&512)!==0)switch(T.tag){case 0:case 11:case 15:N(128,0,T),N(0,64,T)}}catch(q){if(S===null)throw Error(n(330));YA(S,q)}T=S.nextEffect,S.nextEffect=null,S=T}return pr=D,qi(),!0}function Uv(S,D,T){D=dg(T,D),D=Fv(S,D,1073741823),mi(S,D),S=wg(S,1073741823),S!==null&&uo(S)}function YA(S,D){if(S.tag===3)Uv(S,S,D);else for(var T=S.return;T!==null;){if(T.tag===3){Uv(T,S,D);break}else if(T.tag===1){var q=T.stateNode;if(typeof T.type.getDerivedStateFromError=="function"||typeof q.componentDidCatch=="function"&&(bu===null||!bu.has(q))){S=dg(D,S),S=Rv(T,S,1073741823),mi(T,S),T=wg(T,1073741823),T!==null&&uo(T);break}}T=T.return}}function pF(S,D,T){var q=S.pingCache;q!==null&&q.delete(D),Ai===S&&ns===T?Gi===xl||Gi===ga&&Ja===1073741823&&Hi()-hI<gI?Qu(S,ns):_A=!0:Hv(S,T)&&(D=S.lastPingedTime,D!==0&&D<T||(S.lastPingedTime=T,S.finishedExpirationTime===T&&(S.finishedExpirationTime=0,S.finishedWork=null),uo(S)))}function hF(S,D){var T=S.stateNode;T!==null&&T.delete(D),D=0,D===0&&(D=da(),D=jA(D,S,null)),S=wg(S,D),S!==null&&uo(S)}var _v;_v=function(S,D,T){var q=D.expirationTime;if(S!==null){var W=D.pendingProps;if(S.memoizedProps!==W||Ui.current)_o=!0;else{if(q<T){switch(_o=!1,D.tag){case 3:gg(D),hg();break;case 5:if(bm(D),D.mode&4&&T!==1&&Qe(D.type,W))return D.expirationTime=D.childExpirationTime=1,null;break;case 1:$n(D.type)&&dc(D);break;case 4:ng(D,D.stateNode.containerInfo);break;case 10:Uo(D,D.memoizedProps.value);break;case 13:if(D.memoizedState!==null)return q=D.child.childExpirationTime,q!==0&&q>=T?rn(S,D,T):(Fn(Vn,Vn.current&1,D),D=ti(S,D,T),D!==null?D.sibling:null);Fn(Vn,Vn.current&1,D);break;case 19:if(q=D.childExpirationTime>=T,(S.effectTag&64)!==0){if(q)return Ka(S,D,T);D.effectTag|=64}if(W=D.memoizedState,W!==null&&(W.rendering=null,W.tail=null),Fn(Vn,Vn.current,D),!q)return null}return ti(S,D,T)}_o=!1}}else _o=!1;switch(D.expirationTime=0,D.tag){case 2:if(q=D.type,S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),S=D.pendingProps,W=Ri(D,Rn.current),Ns(D,T),W=og(null,D,q,S,W,T),D.effectTag|=1,typeof W=="object"&&W!==null&&typeof W.render=="function"&&W.$$typeof===void 0){if(D.tag=1,cI(),$n(q)){var ce=!0;dc(D)}else ce=!1;D.memoizedState=W.state!==null&&W.state!==void 0?W.state:null;var Se=q.getDerivedStateFromProps;typeof Se=="function"&&vt(D,q,Se,S),W.updater=tr,D.stateNode=W,W._reactInternalFiber=D,ei(D,q,S,T),D=yp(null,D,q,!0,ce,T)}else D.tag=0,Es(null,D,W,T),D=D.child;return D;case 16:if(W=D.elementType,S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),S=D.pendingProps,De(W),W._status!==1)throw W._result;switch(W=W._result,D.type=W,ce=D.tag=mF(W),S=di(W,S),ce){case 0:D=OA(null,D,W,S,T);break;case 1:D=mp(null,D,W,S,T);break;case 11:D=Ei(null,D,W,S,T);break;case 14:D=Rm(null,D,W,di(W.type,S),q,T);break;default:throw Error(n(306,W,""))}return D;case 0:return q=D.type,W=D.pendingProps,W=D.elementType===q?W:di(q,W),OA(S,D,q,W,T);case 1:return q=D.type,W=D.pendingProps,W=D.elementType===q?W:di(q,W),mp(S,D,q,W,T);case 3:if(gg(D),q=D.updateQueue,q===null)throw Error(n(282));if(W=D.memoizedState,W=W!==null?W.element:null,we(D,q,D.pendingProps,null,T),q=D.memoizedState.element,q===W)hg(),D=ti(S,D,T);else{if((W=D.stateNode.hydrate)&&(y?(Pc=gu(D.stateNode.containerInfo),fa=D,W=Sl=!0):W=!1),W)for(T=ca(D,null,q,T),D.child=T;T;)T.effectTag=T.effectTag&-3|1024,T=T.sibling;else Es(S,D,q,T),hg();D=D.child}return D;case 5:return bm(D),S===null&&LA(D),q=D.type,W=D.pendingProps,ce=S!==null?S.memoizedProps:null,Se=W.children,Te(q,W)?Se=null:ce!==null&&Te(q,ce)&&(D.effectTag|=16),Ho(S,D),D.mode&4&&T!==1&&Qe(q,W)?(D.expirationTime=D.childExpirationTime=1,D=null):(Es(S,D,Se,T),D=D.child),D;case 6:return S===null&&LA(D),null;case 13:return rn(S,D,T);case 4:return ng(D,D.stateNode.containerInfo),q=D.pendingProps,S===null?D.child=yi(D,null,q,T):Es(S,D,q,T),D.child;case 11:return q=D.type,W=D.pendingProps,W=D.elementType===q?W:di(q,W),Ei(S,D,q,W,T);case 7:return Es(S,D,D.pendingProps,T),D.child;case 8:return Es(S,D,D.pendingProps.children,T),D.child;case 12:return Es(S,D,D.pendingProps.children,T),D.child;case 10:e:{if(q=D.type._context,W=D.pendingProps,Se=D.memoizedProps,ce=W.value,Uo(D,ce),Se!==null){var It=Se.value;if(ce=ds(It,ce)?0:(typeof q._calculateChangedBits=="function"?q._calculateChangedBits(It,ce):1073741823)|0,ce===0){if(Se.children===W.children&&!Ui.current){D=ti(S,D,T);break e}}else for(It=D.child,It!==null&&(It.return=D);It!==null;){var Et=It.dependencies;if(Et!==null){Se=It.child;for(var bt=Et.firstContext;bt!==null;){if(bt.context===q&&(bt.observedBits&ce)!==0){It.tag===1&&(bt=$i(T,null),bt.tag=2,mi(It,bt)),It.expirationTime<T&&(It.expirationTime=T),bt=It.alternate,bt!==null&&bt.expirationTime<T&&(bt.expirationTime=T),Ts(It.return,T),Et.expirationTime<T&&(Et.expirationTime=T);break}bt=bt.next}}else Se=It.tag===10&&It.type===D.type?null:It.child;if(Se!==null)Se.return=It;else for(Se=It;Se!==null;){if(Se===D){Se=null;break}if(It=Se.sibling,It!==null){It.return=Se.return,Se=It;break}Se=Se.return}It=Se}}Es(S,D,W.children,T),D=D.child}return D;case 9:return W=D.type,ce=D.pendingProps,q=ce.children,Ns(D,T),W=Ls(W,ce.unstable_observedBits),q=q(W),D.effectTag|=1,Es(S,D,q,T),D.child;case 14:return W=D.type,ce=di(W,D.pendingProps),ce=di(W.type,ce),Rm(S,D,W,ce,q,T);case 15:return Tm(S,D,D.type,D.pendingProps,q,T);case 17:return q=D.type,W=D.pendingProps,W=D.elementType===q?W:di(q,W),S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),D.tag=1,$n(q)?(S=!0,dc(D)):S=!1,Ns(D,T),Tn(D,q,W,T),ei(D,q,W,T),yp(null,D,q,!0,S,T);case 19:return Ka(S,D,T)}throw Error(n(156,D.tag))};var CI=null,II=null;function gF(S){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(D.isDisabled||!D.supportsFiber)return!0;try{var T=D.inject(S);CI=function(q){try{D.onCommitFiberRoot(T,q,void 0,(q.current.effectTag&64)===64)}catch{}},II=function(q){try{D.onCommitFiberUnmount(T,q)}catch{}}}catch{}return!0}function dF(S,D,T,q){this.tag=S,this.key=T,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=D,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=q,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function bl(S,D,T,q){return new dF(S,D,T,q)}function wI(S){return S=S.prototype,!(!S||!S.isReactComponent)}function mF(S){if(typeof S=="function")return wI(S)?1:0;if(S!=null){if(S=S.$$typeof,S===L)return 11;if(S===re)return 14}return 2}function KA(S,D){var T=S.alternate;return T===null?(T=bl(S.tag,D,S.key,S.mode),T.elementType=S.elementType,T.type=S.type,T.stateNode=S.stateNode,T.alternate=S,S.alternate=T):(T.pendingProps=D,T.effectTag=0,T.nextEffect=null,T.firstEffect=null,T.lastEffect=null),T.childExpirationTime=S.childExpirationTime,T.expirationTime=S.expirationTime,T.child=S.child,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,D=S.dependencies,T.dependencies=D===null?null:{expirationTime:D.expirationTime,firstContext:D.firstContext,responders:D.responders},T.sibling=S.sibling,T.index=S.index,T.ref=S.ref,T}function Gm(S,D,T,q,W,ce){var Se=2;if(q=S,typeof S=="function")wI(S)&&(Se=1);else if(typeof S=="string")Se=5;else e:switch(S){case C:return Fu(T.children,W,ce,D);case R:Se=8,W|=7;break;case w:Se=8,W|=1;break;case v:return S=bl(12,T,D,W|8),S.elementType=v,S.type=v,S.expirationTime=ce,S;case _:return S=bl(13,T,D,W),S.type=_,S.elementType=_,S.expirationTime=ce,S;case V:return S=bl(19,T,D,W),S.elementType=V,S.expirationTime=ce,S;default:if(typeof S=="object"&&S!==null)switch(S.$$typeof){case b:Se=10;break e;case E:Se=9;break e;case L:Se=11;break e;case re:Se=14;break e;case ae:Se=16,q=null;break e}throw Error(n(130,S==null?S:typeof S,""))}return D=bl(Se,T,D,W),D.elementType=S,D.type=q,D.expirationTime=ce,D}function Fu(S,D,T,q){return S=bl(7,S,q,D),S.expirationTime=T,S}function BI(S,D,T){return S=bl(6,S,null,D),S.expirationTime=T,S}function vI(S,D,T){return D=bl(4,S.children!==null?S.children:[],S.key,D),D.expirationTime=T,D.stateNode={containerInfo:S.containerInfo,pendingChildren:null,implementation:S.implementation},D}function yF(S,D,T){this.tag=D,this.current=null,this.containerInfo=S,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=Oe,this.pendingContext=this.context=null,this.hydrate=T,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Hv(S,D){var T=S.firstSuspendedTime;return S=S.lastSuspendedTime,T!==0&&T>=D&&S<=D}function VA(S,D){var T=S.firstSuspendedTime,q=S.lastSuspendedTime;T<D&&(S.firstSuspendedTime=D),(q>D||T===0)&&(S.lastSuspendedTime=D),D<=S.lastPingedTime&&(S.lastPingedTime=0),D<=S.lastExpiredTime&&(S.lastExpiredTime=0)}function qv(S,D){D>S.firstPendingTime&&(S.firstPendingTime=D);var T=S.firstSuspendedTime;T!==0&&(D>=T?S.firstSuspendedTime=S.lastSuspendedTime=S.nextKnownPendingLevel=0:D>=S.lastSuspendedTime&&(S.lastSuspendedTime=D+1),D>S.nextKnownPendingLevel&&(S.nextKnownPendingLevel=D))}function Wm(S,D){var T=S.lastExpiredTime;(T===0||T>D)&&(S.lastExpiredTime=D)}function jv(S){var D=S._reactInternalFiber;if(D===void 0)throw typeof S.render=="function"?Error(n(188)):Error(n(268,Object.keys(S)));return S=ve(D),S===null?null:S.stateNode}function Gv(S,D){S=S.memoizedState,S!==null&&S.dehydrated!==null&&S.retryTime<D&&(S.retryTime=D)}function Ym(S,D){Gv(S,D),(S=S.alternate)&&Gv(S,D)}var Wv={createContainer:function(S,D,T){return S=new yF(S,D,T),D=bl(3,null,null,D===2?7:D===1?3:0),S.current=D,D.stateNode=S},updateContainer:function(S,D,T,q){var W=D.current,ce=da(),Se=xe.suspense;ce=jA(ce,W,Se);e:if(T){T=T._reactInternalFiber;t:{if(le(T)!==T||T.tag!==1)throw Error(n(170));var It=T;do{switch(It.tag){case 3:It=It.stateNode.context;break t;case 1:if($n(It.type)){It=It.stateNode.__reactInternalMemoizedMergedChildContext;break t}}It=It.return}while(It!==null);throw Error(n(171))}if(T.tag===1){var Et=T.type;if($n(Et)){T=du(T,Et,It);break e}}T=It}else T=Fi;return D.context===null?D.context=T:D.pendingContext=T,D=$i(ce,Se),D.payload={element:S},q=q===void 0?null:q,q!==null&&(D.callback=q),mi(W,D),kc(W,ce),ce},batchedEventUpdates:function(S,D){var T=pr;pr|=2;try{return S(D)}finally{pr=T,pr===gn&&qi()}},batchedUpdates:function(S,D){var T=pr;pr|=1;try{return S(D)}finally{pr=T,pr===gn&&qi()}},unbatchedUpdates:function(S,D){var T=pr;pr&=-2,pr|=Lm;try{return S(D)}finally{pr=T,pr===gn&&qi()}},deferredUpdates:function(S){return so(97,S)},syncUpdates:function(S,D,T,q){return so(99,S.bind(null,D,T,q))},discreteUpdates:function(S,D,T,q){var W=pr;pr|=4;try{return so(98,S.bind(null,D,T,q))}finally{pr=W,pr===gn&&qi()}},flushDiscreteUpdates:function(){(pr&(1|rs|Ms))===gn&&(aF(),Bp())},flushControlled:function(S){var D=pr;pr|=1;try{so(99,S)}finally{pr=D,pr===gn&&qi()}},flushSync:Lv,flushPassiveEffects:Bp,IsThisRendererActing:{current:!1},getPublicRootInstance:function(S){if(S=S.current,!S.child)return null;switch(S.child.tag){case 5:return de(S.child.stateNode);default:return S.child.stateNode}},attemptSynchronousHydration:function(S){switch(S.tag){case 3:var D=S.stateNode;D.hydrate&&Nv(D,D.firstPendingTime);break;case 13:Lv(function(){return kc(S,1073741823)}),D=Ha(da(),150,100),Ym(S,D)}},attemptUserBlockingHydration:function(S){if(S.tag===13){var D=Ha(da(),150,100);kc(S,D),Ym(S,D)}},attemptContinuousHydration:function(S){if(S.tag===13){da();var D=FA++;kc(S,D),Ym(S,D)}},attemptHydrationAtCurrentPriority:function(S){if(S.tag===13){var D=da();D=jA(D,S,null),kc(S,D),Ym(S,D)}},findHostInstance:jv,findHostInstanceWithWarning:function(S){return jv(S)},findHostInstanceWithNoPortals:function(S){return S=Ee(S),S===null?null:S.tag===20?S.stateNode.instance:S.stateNode},shouldSuspend:function(){return!1},injectIntoDevTools:function(S){var D=S.findFiberByHostInstance;return gF(r({},S,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:u.ReactCurrentDispatcher,findHostInstanceByFiber:function(T){return T=ve(T),T===null?null:T.stateNode},findFiberByHostInstance:function(T){return D?D(T):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}};z2.exports=Wv.default||Wv;var EF=z2.exports;return z2.exports=t,EF}});var zEe=U((SYt,JEe)=>{"use strict";JEe.exports=VEe()});var ZEe=U((PYt,XEe)=>{"use strict";var ayt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};XEe.exports=ayt});var rCe=U((xYt,tCe)=>{"use strict";var lyt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},HQ=function(){function t(e,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),e}}();function x6(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ou=ZEe(),cyt=function(){function t(e,r,o,a,n,u){b6(this,t),this.left=e,this.right=r,this.top=o,this.bottom=a,this.width=n,this.height=u}return HQ(t,[{key:"fromJS",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:"toString",value:function(){return"<Layout#"+this.left+":"+this.right+";"+this.top+":"+this.bottom+";"+this.width+":"+this.height+">"}}]),t}(),$Ee=function(){HQ(t,null,[{key:"fromJS",value:function(r){var o=r.width,a=r.height;return new t(o,a)}}]);function t(e,r){b6(this,t),this.width=e,this.height=r}return HQ(t,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toString",value:function(){return"<Size#"+this.width+"x"+this.height+">"}}]),t}(),eCe=function(){function t(e,r){b6(this,t),this.unit=e,this.value=r}return HQ(t,[{key:"fromJS",value:function(r){r(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case ou.UNIT_POINT:return String(this.value);case ou.UNIT_PERCENT:return this.value+"%";case ou.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),t}();tCe.exports=function(t,e){function r(u,A,p){var h=u[A];u[A]=function(){for(var C=arguments.length,w=Array(C),v=0;v<C;v++)w[v]=arguments[v];return p.call.apply(p,[this,h].concat(w))}}for(var o=["setPosition","setMargin","setFlexBasis","setWidth","setHeight","setMinWidth","setMinHeight","setMaxWidth","setMaxHeight","setPadding"],a=function(){var A,p=o[n],h=(A={},x6(A,ou.UNIT_POINT,e.Node.prototype[p]),x6(A,ou.UNIT_PERCENT,e.Node.prototype[p+"Percent"]),x6(A,ou.UNIT_AUTO,e.Node.prototype[p+"Auto"]),A);r(e.Node.prototype,p,function(C){for(var w=arguments.length,v=Array(w>1?w-1:0),b=1;b<w;b++)v[b-1]=arguments[b];var E=v.pop(),R=void 0,L=void 0;if(E==="auto")R=ou.UNIT_AUTO,L=void 0;else if(E instanceof eCe)R=E.unit,L=E.valueOf();else if(R=typeof E=="string"&&E.endsWith("%")?ou.UNIT_PERCENT:ou.UNIT_POINT,L=parseFloat(E),!Number.isNaN(E)&&Number.isNaN(L))throw new Error("Invalid value "+E+" for "+p);if(!h[R])throw new Error('Failed to execute "'+p+`": Unsupported unit '`+E+"'");if(L!==void 0){var _;return(_=h[R]).call.apply(_,[this].concat(v,[L]))}else{var V;return(V=h[R]).call.apply(V,[this].concat(v))}})},n=0;n<o.length;n++)a();return r(e.Config.prototype,"free",function(){e.Config.destroy(this)}),r(e.Node,"create",function(u,A){return A?e.Node.createWithConfig(A):e.Node.createDefault()}),r(e.Node.prototype,"free",function(){e.Node.destroy(this)}),r(e.Node.prototype,"freeRecursive",function(){for(var u=0,A=this.getChildCount();u<A;++u)this.getChild(0).freeRecursive();this.free()}),r(e.Node.prototype,"setMeasureFunc",function(u,A){return A?u.call(this,function(){return $Ee.fromJS(A.apply(void 0,arguments))}):this.unsetMeasureFunc()}),r(e.Node.prototype,"calculateLayout",function(u){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ou.DIRECTION_LTR;return u.call(this,A,p,h)}),lyt({Config:e.Config,Node:e.Node,Layout:t("Layout",cyt),Size:t("Size",$Ee),Value:t("Value",eCe),getInstanceCount:function(){return e.getInstanceCount.apply(e,arguments)}},ou)}});var nCe=U((exports,module)=>{(function(t,e){typeof define=="function"&&define.amd?define([],function(){return e}):typeof module=="object"&&module.exports?module.exports=e:(t.nbind=t.nbind||{}).init=e})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(t,e){return function(){t&&t.apply(this,arguments);try{Module.ccall("nbind_init")}catch(r){e(r);return}e(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof Ie=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),e=nodePath.normalize(e);var o=nodeFS.readFileSync(e);return r?o:o.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert(typeof r=="object"),r},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(t,e){quit(t)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,o){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):o()},a.onerror=o,a.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(t){dump(t)}:function(t){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(t){document.title=t})}else throw"Unknown runtime environment. Where are we?";function globalEval(t){eval.call(null,t)}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(t,e){throw e}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(t){return tempRet0=t,t},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(t){STACKTOP=t},getNativeTypeSize:function(t){switch(t){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(t[t.length-1]==="*")return Runtime.QUANTUM_SIZE;if(t[0]==="i"){var e=parseInt(t.substr(1));return assert(e%8===0),e/8}else return 0}}},getNativeFieldSize:function(t){return Math.max(Runtime.getNativeTypeSize(t),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(t,e){return e==="double"||e==="i64"?t&7&&(assert((t&7)===4),t+=4):assert((t&3)===0),t},getAlignSize:function(t,e,r){return!r&&(t=="i64"||t=="double")?8:t?Math.min(e||(t?Runtime.getNativeFieldSize(t):0),Runtime.QUANTUM_SIZE):Math.min(e,8)},dynCall:function(t,e,r){return r&&r.length?Module["dynCall_"+t].apply(null,[e].concat(r)):Module["dynCall_"+t].call(null,e)},functionPointers:[],addFunction:function(t){for(var e=0;e<Runtime.functionPointers.length;e++)if(!Runtime.functionPointers[e])return Runtime.functionPointers[e]=t,2*(1+e);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(t){Runtime.functionPointers[(t-2)/2]=null},warnOnce:function(t){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[t]||(Runtime.warnOnce.shown[t]=1,Module.printErr(t))},funcWrappers:{},getFuncWrapper:function(t,e){if(!!t){assert(e),Runtime.funcWrappers[e]||(Runtime.funcWrappers[e]={});var r=Runtime.funcWrappers[e];return r[t]||(e.length===1?r[t]=function(){return Runtime.dynCall(e,t)}:e.length===2?r[t]=function(a){return Runtime.dynCall(e,t,[a])}:r[t]=function(){return Runtime.dynCall(e,t,Array.prototype.slice.call(arguments))}),r[t]}},getCompilerSetting:function(t){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(t){var e=STACKTOP;return STACKTOP=STACKTOP+t|0,STACKTOP=STACKTOP+15&-16,e},staticAlloc:function(t){var e=STATICTOP;return STATICTOP=STATICTOP+t|0,STATICTOP=STATICTOP+15&-16,e},dynamicAlloc:function(t){var e=HEAP32[DYNAMICTOP_PTR>>2],r=(e+t+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var o=enlargeMemory();if(!o)return HEAP32[DYNAMICTOP_PTR>>2]=e,0}return e},alignMemory:function(t,e){var r=t=Math.ceil(t/(e||16))*(e||16);return r},makeBigInt:function(t,e,r){var o=r?+(t>>>0)+ +(e>>>0)*4294967296:+(t>>>0)+ +(e|0)*4294967296;return o},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(t,e){t||abort("Assertion failed: "+e)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(t){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(t){var e=Runtime.stackAlloc(t.length);return writeArrayToMemory(t,e),e},stringToC:function(t){var e=0;if(t!=null&&t!==0){var r=(t.length<<2)+1;e=Runtime.stackAlloc(r),stringToUTF8(t,e,r)}return e}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,o,a,n){var u=getCFunc(e),A=[],p=0;if(a)for(var h=0;h<a.length;h++){var C=toC[o[h]];C?(p===0&&(p=Runtime.stackSave()),A[h]=C(a[h])):A[h]=a[h]}var w=u.apply(null,A);if(r==="string"&&(w=Pointer_stringify(w)),p!==0){if(n&&n.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(p)});return}Runtime.stackRestore(p)}return w};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(t){var e=t.toString().match(sourceRegex).slice(1);return{arguments:e[0],body:e[1],returnValue:e[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var t in JSfuncs)JSfuncs.hasOwnProperty(t)&&(JSsource[t]=parseJSFunc(JSfuncs[t]))}}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(t){return t==="number"}),numericRet=returnType!=="string";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(t,e){return"$"+e}),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if(type!=="number"){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap;function setValue(t,e,r,o){switch(r=r||"i8",r.charAt(r.length-1)==="*"&&(r="i32"),r){case"i1":HEAP8[t>>0]=e;break;case"i8":HEAP8[t>>0]=e;break;case"i16":HEAP16[t>>1]=e;break;case"i32":HEAP32[t>>2]=e;break;case"i64":tempI64=[e>>>0,(tempDouble=e,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t>>2]=tempI64[0],HEAP32[t+4>>2]=tempI64[1];break;case"float":HEAPF32[t>>2]=e;break;case"double":HEAPF64[t>>3]=e;break;default:abort("invalid type for setValue: "+r)}}Module.setValue=setValue;function getValue(t,e,r){switch(e=e||"i8",e.charAt(e.length-1)==="*"&&(e="i32"),e){case"i1":return HEAP8[t>>0];case"i8":return HEAP8[t>>0];case"i16":return HEAP16[t>>1];case"i32":return HEAP32[t>>2];case"i64":return HEAP32[t>>2];case"float":return HEAPF32[t>>2];case"double":return HEAPF64[t>>3];default:abort("invalid type for setValue: "+e)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(t,e,r,o){var a,n;typeof t=="number"?(a=!0,n=t):(a=!1,n=t.length);var u=typeof e=="string"?e:null,A;if(r==ALLOC_NONE?A=o:A=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,u?1:e.length)),a){var o=A,p;for(assert((A&3)==0),p=A+(n&-4);o<p;o+=4)HEAP32[o>>2]=0;for(p=A+n;o<p;)HEAP8[o++>>0]=0;return A}if(u==="i8")return t.subarray||t.slice?HEAPU8.set(t,A):HEAPU8.set(new Uint8Array(t),A),A;for(var h=0,C,w,v;h<n;){var b=t[h];if(typeof b=="function"&&(b=Runtime.getFunctionIndex(b)),C=u||e[h],C===0){h++;continue}C=="i64"&&(C="i32"),setValue(A+h,b,C),v!==C&&(w=Runtime.getNativeTypeSize(C),v=C),h+=w}return A}Module.allocate=allocate;function getMemory(t){return staticSealed?runtimeInitialized?_malloc(t):Runtime.dynamicAlloc(t):Runtime.staticAlloc(t)}Module.getMemory=getMemory;function Pointer_stringify(t,e){if(e===0||!t)return"";for(var r=0,o,a=0;o=HEAPU8[t+a>>0],r|=o,!(o==0&&!e||(a++,e&&a==e)););e||(e=a);var n="";if(r<128){for(var u=1024,A;e>0;)A=String.fromCharCode.apply(String,HEAPU8.subarray(t,t+Math.min(e,u))),n=n?n+A:A,t+=u,e-=u;return n}return Module.UTF8ToString(t)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(t){for(var e="";;){var r=HEAP8[t++>>0];if(!r)return e;e+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(t,e){return writeAsciiToMemory(t,e,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(t,e){for(var r=e;t[r];)++r;if(r-e>16&&t.subarray&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,r));for(var o,a,n,u,A,p,h="";;){if(o=t[e++],!o)return h;if(!(o&128)){h+=String.fromCharCode(o);continue}if(a=t[e++]&63,(o&224)==192){h+=String.fromCharCode((o&31)<<6|a);continue}if(n=t[e++]&63,(o&240)==224?o=(o&15)<<12|a<<6|n:(u=t[e++]&63,(o&248)==240?o=(o&7)<<18|a<<12|n<<6|u:(A=t[e++]&63,(o&252)==248?o=(o&3)<<24|a<<18|n<<12|u<<6|A:(p=t[e++]&63,o=(o&1)<<30|a<<24|n<<18|u<<12|A<<6|p))),o<65536)h+=String.fromCharCode(o);else{var C=o-65536;h+=String.fromCharCode(55296|C>>10,56320|C&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(t){return UTF8ArrayToString(HEAPU8,t)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(t,e,r,o){if(!(o>0))return 0;for(var a=r,n=r+o-1,u=0;u<t.length;++u){var A=t.charCodeAt(u);if(A>=55296&&A<=57343&&(A=65536+((A&1023)<<10)|t.charCodeAt(++u)&1023),A<=127){if(r>=n)break;e[r++]=A}else if(A<=2047){if(r+1>=n)break;e[r++]=192|A>>6,e[r++]=128|A&63}else if(A<=65535){if(r+2>=n)break;e[r++]=224|A>>12,e[r++]=128|A>>6&63,e[r++]=128|A&63}else if(A<=2097151){if(r+3>=n)break;e[r++]=240|A>>18,e[r++]=128|A>>12&63,e[r++]=128|A>>6&63,e[r++]=128|A&63}else if(A<=67108863){if(r+4>=n)break;e[r++]=248|A>>24,e[r++]=128|A>>18&63,e[r++]=128|A>>12&63,e[r++]=128|A>>6&63,e[r++]=128|A&63}else{if(r+5>=n)break;e[r++]=252|A>>30,e[r++]=128|A>>24&63,e[r++]=128|A>>18&63,e[r++]=128|A>>12&63,e[r++]=128|A>>6&63,e[r++]=128|A&63}}return e[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(t,e,r){return stringToUTF8Array(t,HEAPU8,e,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(t){for(var e=0,r=0;r<t.length;++r){var o=t.charCodeAt(r);o>=55296&&o<=57343&&(o=65536+((o&1023)<<10)|t.charCodeAt(++r)&1023),o<=127?++e:o<=2047?e+=2:o<=65535?e+=3:o<=2097151?e+=4:o<=67108863?e+=5:e+=6}return e}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function demangle(t){var e=Module.___cxa_demangle||Module.__cxa_demangle;if(e){try{var r=t.substr(1),o=lengthBytesUTF8(r)+1,a=_malloc(o);stringToUTF8(r,a,o);var n=_malloc(4),u=e(a,0,0,n);if(getValue(n,"i32")===0&&u)return Pointer_stringify(u)}catch{}finally{a&&_free(a),n&&_free(n),u&&_free(u)}return t}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t}function demangleAll(t){var e=/__Z[\w\d_]+/g;return t.replace(e,function(r){var o=demangle(r);return r===o?r:r+" ["+o+"]"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function stackTrace(){var t=jsStackTrace();return Module.extraStackTrace&&(t+=`
285`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var o=r>0?r:lengthBytesUTF8(t)+1,a=new Array(o),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];o>255&&(o&=255),e.push(String.fromCharCode(o))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var o,a;r&&(a=e+lengthBytesUTF8(t),o=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var o=0;o<t.length;++o)HEAP8[e++>>0]=t.charCodeAt(o);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var o=e>>>16,a=e&65535,n=r>>>16,u=r&65535;return a*u+(o*u+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}function addRunDependency(t){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(t,e,r,o,a,n,u,A){return _nbind.callbackSignatureList[t].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(t,e,r,o,a,n,u,A){return ASM_CONSTS[t](e,r,o,a,n,u,A)}function _emscripten_asm_const_iiiii(t,e,r,o,a){return ASM_CONSTS[t](e,r,o,a)}function _emscripten_asm_const_iiidddddd(t,e,r,o,a,n,u,A,p){return ASM_CONSTS[t](e,r,o,a,n,u,A,p)}function _emscripten_asm_const_iiididi(t,e,r,o,a,n,u){return ASM_CONSTS[t](e,r,o,a,n,u)}function _emscripten_asm_const_iiii(t,e,r,o){return ASM_CONSTS[t](e,r,o)}function _emscripten_asm_const_iiiid(t,e,r,o,a){return ASM_CONSTS[t](e,r,o,a)}function _emscripten_asm_const_iiiiii(t,e,r,o,a,n){return ASM_CONSTS[t](e,r,o,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(t,e){__ATEXIT__.unshift({func:t,arg:e})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(t,e,r,o){var a=arguments.length,n=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,o);else for(var A=t.length-1;A>=0;A--)(u=t[A])&&(n=(a<3?u(n):a>3?u(e,r,n):u(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n}function _defineHidden(t){return function(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!1,value:t,writable:!0})}}var _nbind={};function __nbind_free_external(t){_nbind.externalList[t].dereference(t)}function __nbind_reference_external(t){_nbind.externalList[t].reference()}function _llvm_stackrestore(t){var e=_llvm_stacksave,r=e.LLVM_SAVEDSTACKS[t];e.LLVM_SAVEDSTACKS.splice(t,1),Runtime.stackRestore(r)}function __nbind_register_pool(t,e,r,o){_nbind.Pool.pageSize=t,_nbind.Pool.usedPtr=e/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=o/4,HEAP32[e/4]=16909060,HEAP8[e]==1&&(_nbind.bigEndian=!0),HEAP32[e/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(t,e){if(Browser.mainLoop.timingMode=t,Browser.mainLoop.timingValue=e,!Browser.mainLoop.func)return 1;if(t==0)Browser.mainLoop.scheduler=function(){var u=Math.max(0,Browser.mainLoop.tickStartTime+e-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,u)},Browser.mainLoop.method="timeout";else if(t==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(t==2){if(!window.setImmediate){let n=function(u){u.source===window&&u.data===o&&(u.stopPropagation(),r.shift()())};var a=n,r=[],o="setimmediate";window.addEventListener("message",n,!0),window.setImmediate=function(A){r.push(A),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(A),window.postMessage({target:o})):window.postMessage(o,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(t,e,r,o,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=t,Browser.mainLoop.arg=o;var n;typeof o<"u"?n=function(){Module.dynCall_vi(t,o)}:n=function(){Module.dynCall_v(t)};var u=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var C=Browser.mainLoop.remainingBlockers,w=C%1==0?C-1:Math.floor(C);h.counted?Browser.mainLoop.remainingBlockers=w:(w=w+.5,Browser.mainLoop.remainingBlockers=(8*C+w)/9)}if(console.log('main loop blocker "'+h.name+'" took '+(Date.now()-p)+" ms"),Browser.mainLoop.updateStatus(),u<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(!(u<Browser.mainLoop.currentlyRunningMainloop)){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(n),!(u<Browser.mainLoop.currentlyRunningMainloop)&&(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())}}},a||(e&&e>0?_emscripten_set_main_loop_timing(0,1e3/e):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var t=Browser.mainLoop.timingMode,e=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(t,e),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var t=Module.statusMessage||"Please wait...",e=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;e?e<r?Module.setStatus(t+" ("+(r-e)+"/"+r+")"):Module.setStatus(t):Module.setStatus("")}},runIter:function(t){if(!ABORT){if(Module.preMainLoop){var e=Module.preMainLoop();if(e===!1)return}try{t()}catch(r){if(r instanceof ExitStatus)return;throw r&&typeof r=="object"&&r.stack&&Module.printErr("exception thrown: "+[r,r.stack]),r}Module.postMainLoop&&Module.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Module.preloadPlugins||(Module.preloadPlugins=[]),Browser.initted)return;Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch{Browser.hasBlobConstructor=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder=typeof MozBlobBuilder<"u"?MozBlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log("warning: no BlobBuilder"),Browser.URLObject=typeof window<"u"?window.URL?window.URL:window.webkitURL:void 0,!Module.noImageDecoding&&typeof Browser.URLObject>"u"&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var t={};t.canHandle=function(n){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(n)},t.handle=function(n,u,A,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(u)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(u)}))}catch(b){Runtime.warnOnce("Blob constructor present but fails: "+b+"; falling back to blob builder")}if(!h){var C=new Browser.BlobBuilder;C.append(new Uint8Array(n).buffer),h=C.getBlob()}var w=Browser.URLObject.createObjectURL(h),v=new Image;v.onload=function(){assert(v.complete,"Image "+u+" could not be decoded");var E=document.createElement("canvas");E.width=v.width,E.height=v.height;var R=E.getContext("2d");R.drawImage(v,0,0),Module.preloadedImages[u]=E,Browser.URLObject.revokeObjectURL(w),A&&A(n)},v.onerror=function(E){console.log("Image "+w+" could not be decoded"),p&&p()},v.src=w},Module.preloadPlugins.push(t);var e={};e.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},e.handle=function(n,u,A,p){var h=!1;function C(R){h||(h=!0,Module.preloadedAudios[u]=R,A&&A(n))}function w(){h||(h=!0,Module.preloadedAudios[u]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var v=new Blob([n],{type:Browser.getMimetype(u)})}catch{return w()}var b=Browser.URLObject.createObjectURL(v),E=new Audio;E.addEventListener("canplaythrough",function(){C(E)},!1),E.onerror=function(L){if(h)return;console.log("warning: browser could not fully decode audio "+u+", trying slower base64 approach");function _(V){for(var re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ae="=",he="",pe=0,De=0,ge=0;ge<V.length;ge++)for(pe=pe<<8|V[ge],De+=8;De>=6;){var le=pe>>De-6&63;De-=6,he+=re[le]}return De==2?(he+=re[(pe&3)<<4],he+=ae+ae):De==4&&(he+=re[(pe&15)<<2],he+=ae),he}E.src="data:audio/x-"+u.substr(-3)+";base64,"+_(n),C(E)},E.src=b,Browser.safeSetTimeout(function(){C(E)},1e4)}else return w()},Module.preloadPlugins.push(e);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var o=Module.canvas;o&&(o.requestPointerLock=o.requestPointerLock||o.mozRequestPointerLock||o.webkitRequestPointerLock||o.msRequestPointerLock||function(){},o.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},o.exitPointerLock=o.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",r,!1),document.addEventListener("mozpointerlockchange",r,!1),document.addEventListener("webkitpointerlockchange",r,!1),document.addEventListener("mspointerlockchange",r,!1),Module.elementPointerLock&&o.addEventListener("click",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(t,e,r,o){if(e&&Module.ctx&&t==Module.canvas)return Module.ctx;var a,n;if(e){var u={antialias:!1,alpha:!1};if(o)for(var A in o)u[A]=o[A];n=GL.createContext(t,u),n&&(a=GL.getContext(n).GLctx)}else a=t.getContext("2d");return a?(r&&(e||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=a,e&&GL.makeContextCurrent(n),Module.useWebGL=e,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(t,e,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,e,r){Browser.lockPointer=t,Browser.resizeCanvas=e,Browser.vrDevice=r,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var o=Module.canvas;function a(){Browser.isFullscreen=!1;var u=o.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===u?(o.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},o.exitFullscreen=o.exitFullscreen.bind(document),Browser.lockPointer&&o.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(u.parentNode.insertBefore(o,u),u.parentNode.removeChild(u),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(o)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",a,!1),document.addEventListener("mozfullscreenchange",a,!1),document.addEventListener("webkitfullscreenchange",a,!1),document.addEventListener("MSFullscreenChange",a,!1));var n=document.createElement("div");o.parentNode.insertBefore(n,o),n.appendChild(o),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(t,e,r){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(o,a,n){return Browser.requestFullscreen(o,a,n)},Browser.requestFullscreen(t,e,r)},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=e+1e3/60;else for(;e+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-e,0);setTimeout(t,r)},requestAnimationFrame:function t(e){typeof window>"u"?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(t){return function(){if(!ABORT)return t.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var t=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],t.forEach(function(e){e()})}},safeRequestAnimationFrame:function(t){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))})},safeSetTimeout:function(t,e){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))},e)},safeSetInterval:function(t,e){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&t()},e)},getMimetype:function(t){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[t.substr(t.lastIndexOf(".")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case"DOMMouseScroll":e=t.detail;break;case"mousewheel":e=t.wheelDelta;break;case"wheel":e=t.deltaY;break;default:throw"unrecognized mouse wheel event: "+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Browser.pointerLock)t.type!="mousemove"&&"mozMovementX"in t?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(t),Browser.mouseMovementY=Browser.getMovementY(t)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var e=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,o=Module.canvas.height,a=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(t.type==="touchstart"||t.type==="touchend"||t.type==="touchmove"){var u=t.touch;if(u===void 0)return;var A=u.pageX-(a+e.left),p=u.pageY-(n+e.top);A=A*(r/e.width),p=p*(o/e.height);var h={x:A,y:p};if(t.type==="touchstart")Browser.lastTouches[u.identifier]=h,Browser.touches[u.identifier]=h;else if(t.type==="touchend"||t.type==="touchmove"){var C=Browser.touches[u.identifier];C||(C=h),Browser.lastTouches[u.identifier]=C,Browser.touches[u.identifier]=h}return}var w=t.pageX-(a+e.left),v=t.pageY-(n+e.top);w=w*(r/e.width),v=v*(o/e.height),Browser.mouseMovementX=w-Browser.mouseX,Browser.mouseMovementY=v-Browser.mouseY,Browser.mouseX=w,Browser.mouseY=v}},asyncLoad:function(t,e,r,o){var a=o?"":"al "+t;Module.readAsync(t,function(n){assert(n,'Loading data file "'+t+'" failed (no arrayBuffer).'),e(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file "'+t+'" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var t=Module.canvas;Browser.resizeListeners.forEach(function(e){e(t.width,t.height)})},setCanvasSize:function(t,e,r){var o=Module.canvas;Browser.updateCanvasDimensions(o,t,e),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},updateCanvasDimensions:function(t,e,r){e&&r?(t.widthNative=e,t.heightNative=r):(e=t.widthNative,r=t.heightNative);var o=e,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(o/a<Module.forcedAspectRatio?o=Math.round(a*Module.forcedAspectRatio):a=Math.round(o/Module.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&typeof screen<"u"){var n=Math.min(screen.width/o,screen.height/a);o=Math.round(o*n),a=Math.round(a*n)}Browser.resizeCanvas?(t.width!=o&&(t.width=o),t.height!=a&&(t.height=a),typeof t.style<"u"&&(t.style.removeProperty("width"),t.style.removeProperty("height"))):(t.width!=e&&(t.width=e),t.height!=r&&(t.height=r),typeof t.style<"u"&&(o!=e||a!=r?(t.style.setProperty("width",o+"px","important"),t.style.setProperty("height",a+"px","important")):(t.style.removeProperty("width"),t.style.removeProperty("height"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var t=Browser.nextWgetRequestHandle;return Browser.nextWgetRequestHandle++,t}},SYSCALLS={varargs:0,get:function(t){SYSCALLS.varargs+=4;var e=HEAP32[SYSCALLS.varargs-4>>2];return e},getStr:function(){var t=Pointer_stringify(SYSCALLS.get());return t},get64:function(){var t=SYSCALLS.get(),e=SYSCALLS.get();return t>=0?assert(e===0):assert(e===-1),t},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(o){return(typeof FS>"u"||!(o instanceof FS.ErrnoError))&&abort(o),-o.errno}}function ___syscall54(t,e){SYSCALLS.varargs=e;try{return 0}catch(r){return(typeof FS>"u"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(t){var e=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr<X>"],[640,1,"std::unique_ptr<X>"],[5120,1,"std::vector<X>"],[6144,2,"std::array<X, Y>"],[9216,-1,"std::function<X (Y)>"]];function r(p,h,C,w,v,b){if(h==1){var E=w&896;(E==128||E==256||E==384)&&(p="X const")}var R;return b?R=C.replace("X",p).replace("Y",v):R=p.replace("X",C).replace("Y",v),R.replace(/([*&]) (?=[*&])/g,"$1")}function o(p,h,C,w,v){throw new Error(p+" type "+C.replace("X",h+"?")+(w?" with flag "+w:"")+" in "+v)}function a(p,h,C,w,v,b,E,R){b===void 0&&(b="X"),R===void 0&&(R=1);var L=C(p);if(L)return L;var _=w(p),V=_.placeholderFlag,re=e[V];E&&re&&(b=r(E[2],E[0],b,re[0],"?",!0));var ae;V==0&&(ae="Unbound"),V>=10&&(ae="Corrupt"),R>20&&(ae="Deeply nested"),ae&&o(ae,p,b,V,v||"?");var he=_.paramList[0],pe=a(he,h,C,w,v,b,re,R+1),De,ge={flags:re[0],id:p,name:"",paramList:[pe]},le=[],Pe="?";switch(_.placeholderFlag){case 1:De=pe.spec;break;case 2:if((pe.flags&15360)==1024&&pe.spec.ptrSize==1){ge.flags=7168;break}case 3:case 6:case 5:De=pe.spec,pe.flags&15360;break;case 8:Pe=""+_.paramList[1],ge.paramList.push(_.paramList[1]);break;case 9:for(var g=0,ve=_.paramList[1];g<ve.length;g++){var Ee=ve[g],de=a(Ee,h,C,w,v,b,re,R+1);le.push(de.name),ge.paramList.push(de)}Pe=le.join(", ");break;default:break}if(ge.name=r(re[2],re[0],pe.name,pe.flags,Pe),De){for(var ne=0,Z=Object.keys(De);ne<Z.length;ne++){var me=Z[ne];ge[me]=ge[me]||De[me]}ge.flags|=De.flags}return n(h,ge)}function n(p,h){var C=h.flags,w=C&896,v=C&15360;return!h.name&&v==1024&&(h.ptrSize==1?h.name=(C&16?"":(C&8?"un":"")+"signed ")+"char":h.name=(C&8?"u":"")+(C&32?"float":"int")+(h.ptrSize*8+"_t")),h.ptrSize==8&&!(C&32)&&(v=64),v==2048&&(w==512||w==640?v=4096:w&&(v=3072)),p(v,h)}var u=function(){function p(h){this.id=h.id,this.name=h.name,this.flags=h.flags,this.spec=h}return p.prototype.toString=function(){return this.name},p}(),A={Type:u,getComplexType:a,makeType:n,structureList:e};return t.output=A,t.output||A}function __nbind_register_type(t,e){var r=_nbind.readAsciiString(e),o={flags:10240,id:t,name:r};_nbind.makeType(_nbind.constructType,o)}function __nbind_register_callback_signature(t,e){var r=_nbind.readTypeIdList(t,e),o=_nbind.callbackSignatureList.length;return _nbind.callbackSignatureList[o]=_nbind.makeJSCaller(r),o}function __extends(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o}function __nbind_register_class(t,e,r,o,a,n,u){var A=_nbind.readAsciiString(u),p=_nbind.readPolicyList(e),h=HEAPU32.subarray(t/4,t/4+2),C={flags:2048|(p.Value?2:0),id:h[0],name:A},w=_nbind.makeType(_nbind.constructType,C);w.ptrType=_nbind.getComplexType(h[1],_nbind.constructType,_nbind.getType,_nbind.queryType),w.destroy=_nbind.makeMethodCaller(w.ptrType,{boundID:C.id,flags:0,name:"destroy",num:0,ptr:n,title:w.name+".free",typeList:["void","uint32_t","uint32_t"]}),a&&(w.superIdList=Array.prototype.slice.call(HEAPU32.subarray(r/4,r/4+a)),w.upcastList=Array.prototype.slice.call(HEAPU32.subarray(o/4,o/4+a))),Module[w.name]=w.makeBound(p),_nbind.BindClass.list.push(w)}function _removeAccessorPrefix(t){var e=/^[Gg]et_?([A-Z]?([A-Z]?))/;return t.replace(e,function(r,o,a){return a?o:o.toLowerCase()})}function __nbind_register_function(t,e,r,o,a,n,u,A,p,h){var C=_nbind.getType(t),w=_nbind.readPolicyList(e),v=_nbind.readTypeIdList(r,o),b;if(u==5)b=[{direct:a,name:"__nbindConstructor",ptr:0,title:C.name+" constructor",typeList:["uint32_t"].concat(v.slice(1))},{direct:n,name:"__nbindValueConstructor",ptr:0,title:C.name+" value constructor",typeList:["void","uint32_t"].concat(v.slice(1))}];else{var E=_nbind.readAsciiString(A),R=(C.name&&C.name+".")+E;(u==3||u==4)&&(E=_removeAccessorPrefix(E)),b=[{boundID:t,direct:n,name:E,ptr:a,title:R,typeList:v}]}for(var L=0,_=b;L<_.length;L++){var V=_[L];V.signatureType=u,V.policyTbl=w,V.num=p,V.flags=h,C.addMethod(V)}}function _nbind_value(t,e){_nbind.typeNameTbl[t]||_nbind.throwError("Unknown value type "+t),Module.NBind.bind_value(t,e),_defineHidden(_nbind.typeNameTbl[t].proto.prototype.__nbindValueConstructor)(e.prototype,"__nbindValueConstructor")}Module._nbind_value=_nbind_value;function __nbind_get_value_object(t,e){var r=_nbind.popValue(t);if(!r.fromJS)throw new Error("Object "+r+" has no fromJS function");r.fromJS(function(){r.__nbindValueConstructor.apply(this,Array.prototype.concat.apply([e],arguments))})}function _emscripten_memcpy_big(t,e,r){return HEAPU8.set(HEAPU8.subarray(e,e+r),t),t}function __nbind_register_primitive(t,e,r){var o={flags:1024|r,id:t,ptrSize:e};_nbind.makeType(_nbind.constructType,o)}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___setErrNo(t){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=t),t}function _llvm_stacksave(){var t=_llvm_stacksave;return t.LLVM_SAVEDSTACKS||(t.LLVM_SAVEDSTACKS=[]),t.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),t.LLVM_SAVEDSTACKS.length-1}function ___syscall140(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD(),o=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),u=SYSCALLS.get(),A=a;return FS.llseek(r,A,u),HEAP32[n>>2]=r.position,r.getdents&&A===0&&u===0&&(r.getdents=null),0}catch(p){return(typeof FS>"u"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.get(),o=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(C,w){var v=___syscall146.buffers[C];assert(v),w===0||w===10?((C===1?Module.print:Module.printErr)(UTF8ArrayToString(v,0)),v.length=0):v.push(w)});for(var u=0;u<a;u++){for(var A=HEAP32[o+u*8>>2],p=HEAP32[o+(u*8+4)>>2],h=0;h<p;h++)___syscall146.printChar(r,HEAPU8[A+h]);n+=p}return n}catch(C){return(typeof FS>"u"||!(C instanceof FS.ErrnoError))&&abort(C),-C.errno}}function __nbind_finish(){for(var t=0,e=_nbind.BindClass.list;t<e.length;t++){var r=e[t];r.finish()}}var ___dso_handle=STATICTOP;STATICTOP+=16,function(_nbind){var typeIdTbl={};_nbind.typeNameTbl={};var Pool=function(){function t(){}return t.lalloc=function(e){e=e+7&-8;var r=HEAPU32[t.usedPtr];if(e>t.pageSize/2||e>t.pageSize-r){var o=_nbind.typeNameTbl.NBind.proto;return o.lalloc(e)}else return HEAPU32[t.usedPtr]=r+e,t.rootPtr+r},t.lreset=function(e,r){var o=HEAPU32[t.pagePtr];if(o){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(e,r)}else HEAPU32[t.usedPtr]=e},t}();_nbind.Pool=Pool;function constructType(t,e){var r=t==10240?_nbind.makeTypeNameTbl[e.name]||_nbind.BindType:_nbind.makeTypeKindTbl[t],o=new r(e);return typeIdTbl[e.id]=o,_nbind.typeNameTbl[e.name]=o,o}_nbind.constructType=constructType;function getType(t){return typeIdTbl[t]}_nbind.getType=getType;function queryType(t){var e=HEAPU8[t],r=_nbind.structureList[e][1];t/=4,r<0&&(++t,r=HEAPU32[t]+1);var o=Array.prototype.slice.call(HEAPU32.subarray(t+1,t+1+r));return e==9&&(o=[o[0],o.slice(1)]),{paramList:o,placeholderFlag:e}}_nbind.queryType=queryType;function getTypes(t,e){return t.map(function(r){return typeof r=="number"?_nbind.getComplexType(r,constructType,getType,queryType,e):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(t,e){return Array.prototype.slice.call(HEAPU32,t/4,t/4+e)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(t){for(var e=t;HEAPU8[e++];);return String.fromCharCode.apply("",HEAPU8.subarray(t,e-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(t){var e={};if(t)for(;;){var r=HEAPU32[t/4];if(!r)break;e[readAsciiString(r)]=!0,t+=4}return e}_nbind.readPolicyList=readPolicyList;function getDynCall(t,e){var r={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},o=t.map(function(n){return r[n.name]||"i"}).join(""),a=Module["dynCall_"+o];if(!a)throw new Error("dynCall_"+o+" not found for "+e+"("+t.map(function(n){return n.name}).join(", ")+")");return a}_nbind.getDynCall=getDynCall;function addMethod(t,e,r,o){var a=t[e];t.hasOwnProperty(e)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),t[e]=a),a.addMethod(r,o)):(r.arity=o,t[e]=r)}_nbind.addMethod=addMethod;function throwError(t){throw new Error(t)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return e.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},e.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},e}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(t){__extends(e,t);function e(r){var o=t.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return o.heap=a[r.ptrSize*8],o.ptrSize=r.ptrSize,o}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireWrite=function(r,o){return o&&o.Strict&&function(a){if(typeof a=="number")return a;throw new Error("Type mismatch")}},e}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(t,e){if(t==null){if(e&&e.Nullable)return 0;throw new Error("Type mismatch")}if(e&&e.Strict){if(typeof t!="string")throw new Error("Type mismatch")}else t=t.toString();var r=Module.lengthBytesUTF8(t)+1,o=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(t,HEAPU8,o,r),o}_nbind.pushCString=pushCString;function popCString(t){return t===0?null:Module.Pointer_stringify(t)}_nbind.popCString=popCString;var CStringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,o){return function(a){return pushCString(a,o)}},e}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=function(o){return!!o},r}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireRead=function(r){return"!!("+r+")"},e.prototype.makeWireWrite=function(r,o){return o&&o.Strict&&function(a){if(typeof a=="boolean")return a;throw new Error("Type mismatch")}||r},e}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function t(){}return t.prototype.persist=function(){this.__nbindState|=1},t}();_nbind.Wrapper=Wrapper;function makeBound(t,e){var r=function(o){__extends(a,o);function a(n,u,A,p){var h=o.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var C=u,w=A,v=p;if(n!==_nbind.ptrMarker){var b=h.__nbindConstructor.apply(h,arguments);C=4608,v=HEAPU32[b/4],w=HEAPU32[b/4+1]}var E={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:C,__nbindPtr:w};v&&(R.__nbindShared=v,_nbind.mark(h));for(var L=0,_=Object.keys(R);L<_.length;L++){var V=_[L];E.value=R[V],Object.defineProperty(h,V,E)}return _defineHidden(0)(h,"__nbindState"),h}return a.prototype.free=function(){e.destroy.call(this,this.__nbindShared,this.__nbindFlags),this.__nbindState|=2,disableMember(this,"__nbindShared"),disableMember(this,"__nbindPtr")},a}(Wrapper);return __decorate([_defineHidden()],r.prototype,"__nbindConstructor",void 0),__decorate([_defineHidden()],r.prototype,"__nbindValueConstructor",void 0),__decorate([_defineHidden(t)],r.prototype,"__nbindPolicies",void 0),r}_nbind.makeBound=makeBound;function disableMember(t,e){function r(){throw new Error("Accessing deleted object")}Object.defineProperty(t,e,{configurable:!1,enumerable:!1,get:r,set:r})}_nbind.ptrMarker={};var BindClass=function(t){__extends(e,t);function e(r){var o=t.call(this,r)||this;return o.wireRead=function(a){return _nbind.popValue(a,o.ptrType)},o.wireWrite=function(a){return pushPointer(a,o.ptrType,!0)},o.pendingSuperCount=0,o.ready=!1,o.methodTbl={},r.paramList?(o.classType=r.paramList[0].classType,o.proto=o.classType.proto):o.classType=o,o}return e.prototype.makeBound=function(r){var o=_nbind.makeBound(r,this);return this.proto=o,this.ptrType.proto=o,o},e.prototype.addMethod=function(r){var o=this.methodTbl[r.name]||[];o.push(r),this.methodTbl[r.name]=o},e.prototype.registerMethods=function(r,o){for(var a,n=0,u=Object.keys(r.methodTbl);n<u.length;n++)for(var A=u[n],p=r.methodTbl[A],h=0,C=p;h<C.length;h++){var w=C[h],v=void 0,b=void 0;if(v=this.proto.prototype,!(o&&w.signatureType!=1))switch(w.signatureType){case 1:v=this.proto;case 5:b=_nbind.makeCaller(w),_nbind.addMethod(v,w.name,b,w.typeList.length-1);break;case 4:a=_nbind.makeMethodCaller(r.ptrType,w);break;case 3:Object.defineProperty(v,w.name,{configurable:!0,enumerable:!1,get:_nbind.makeMethodCaller(r.ptrType,w),set:a});break;case 2:b=_nbind.makeMethodCaller(r.ptrType,w),_nbind.addMethod(v,w.name,b,w.typeList.length-1);break;default:break}}},e.prototype.registerSuperMethods=function(r,o,a){if(!a[r.name]){a[r.name]=!0;for(var n=0,u,A=0,p=r.superIdList||[];A<p.length;A++){var h=p[A],C=_nbind.getType(h);n++<o||o<0?u=-1:u=0,this.registerSuperMethods(C,u,a)}this.registerMethods(r,o<0)}},e.prototype.finish=function(){if(this.ready)return this;this.ready=!0,this.superList=(this.superIdList||[]).map(function(a){return _nbind.getType(a).finish()});var r=this.proto;if(this.superList.length){var o=function(){this.constructor=r};o.prototype=this.superList[0].proto.prototype,r.prototype=new o}return r!=Module&&(r.prototype.__nbindType=this),this.registerSuperMethods(this,1,{}),this},e.prototype.upcastStep=function(r,o){if(r==this)return o;for(var a=0;a<this.superList.length;++a){var n=this.superList[a].upcastStep(r,_nbind.callUpcast(this.upcastList[a],o));if(n)return n}return 0},e}(_nbind.BindType);BindClass.list=[],_nbind.BindClass=BindClass;function popPointer(t,e){return t?new e.proto(_nbind.ptrMarker,e.flags,t):null}_nbind.popPointer=popPointer;function pushPointer(t,e,r){if(!(t instanceof _nbind.Wrapper)){if(r)return _nbind.pushValue(t);throw new Error("Type mismatch")}var o=t.__nbindPtr,a=t.__nbindType.classType,n=e.classType;if(t instanceof e.proto)for(;a!=n;)o=_nbind.callUpcast(a.upcastList[0],o),a=a.superList[0];else if(o=a.upcastStep(n,o),!o)throw new Error("Type mismatch");return o}_nbind.pushPointer=pushPointer;function pushMutablePointer(t,e){var r=pushPointer(t,e);if(t.__nbindFlags&1)throw new Error("Passing a const value as a non-const argument");return r}var BindClassPtr=function(t){__extends(e,t);function e(r){var o=t.call(this,r)||this;o.classType=r.paramList[0].classType,o.proto=o.classType.proto;var a=r.flags&1,n=(o.flags&896)==256&&r.flags&2,u=a?pushPointer:pushMutablePointer,A=n?_nbind.popValue:popPointer;return o.makeWireWrite=function(p,h){return h.Nullable?function(C){return C?u(C,o):0}:function(C){return u(C,o)}},o.wireRead=function(p){return A(p,o)},o.wireWrite=function(p){return u(p,o)},o}return e}(_nbind.BindType);_nbind.BindClassPtr=BindClassPtr;function popShared(t,e){var r=HEAPU32[t/4],o=HEAPU32[t/4+1];return o?new e.proto(_nbind.ptrMarker,e.flags,o,r):null}_nbind.popShared=popShared;function pushShared(t,e){if(!(t instanceof e.proto))throw new Error("Type mismatch");return t.__nbindShared}function pushMutableShared(t,e){if(!(t instanceof e.proto))throw new Error("Type mismatch");if(t.__nbindFlags&1)throw new Error("Passing a const value as a non-const argument");return t.__nbindShared}var SharedClassPtr=function(t){__extends(e,t);function e(r){var o=t.call(this,r)||this;o.readResources=[_nbind.resources.pool],o.classType=r.paramList[0].classType,o.proto=o.classType.proto;var a=r.flags&1,n=a?pushShared:pushMutableShared;return o.wireRead=function(u){return popShared(u,o)},o.wireWrite=function(u){return n(u,o)},o}return e}(_nbind.BindType);_nbind.SharedClassPtr=SharedClassPtr,_nbind.externalList=[0];var firstFreeExternal=0,External=function(){function t(e){this.refCount=1,this.data=e}return t.prototype.register=function(){var e=firstFreeExternal;return e?firstFreeExternal=_nbind.externalList[e]:e=_nbind.externalList.length,_nbind.externalList[e]=this,e},t.prototype.reference=function(){++this.refCount},t.prototype.dereference=function(e){--this.refCount==0&&(this.free&&this.free(),_nbind.externalList[e]=firstFreeExternal,firstFreeExternal=e)},t}();_nbind.External=External;function popExternal(t){var e=_nbind.externalList[t];return e.dereference(t),e.data}function pushExternal(t){var e=new External(t);return e.reference(),e.register()}var ExternalType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popExternal,r.wireWrite=pushExternal,r}return e}(_nbind.BindType);_nbind.ExternalType=ExternalType,_nbind.callbackSignatureList=[];var CallbackType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=function(o){return typeof o!="function"&&_nbind.throwError("Type mismatch"),new _nbind.External(o).register()},r}return e}(_nbind.BindType);_nbind.CallbackType=CallbackType,_nbind.valueList=[0];var firstFreeValue=0;function pushValue(t){var e=firstFreeValue;return e?firstFreeValue=_nbind.valueList[e]:e=_nbind.valueList.length,_nbind.valueList[e]=t,e*2+1}_nbind.pushValue=pushValue;function popValue(t,e){if(t||_nbind.throwError("Value type JavaScript class is missing or not registered"),t&1){t>>=1;var r=_nbind.valueList[t];return _nbind.valueList[t]=firstFreeValue,firstFreeValue=t,r}else{if(e)return _nbind.popShared(t,e);throw new Error("Invalid value slot "+t)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(t){return typeof t=="number"?t:pushValue(t)*4096+valueBase}function pop64(t){return t<valueBase?t:popValue((t-valueBase)/4096)}var CreateValueType=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeWireWrite=function(r){return"(_nbind.pushValue(new "+r+"))"},e}(_nbind.BindType);_nbind.CreateValueType=CreateValueType;var Int64Type=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=push64,r.wireRead=pop64,r}return e}(_nbind.BindType);_nbind.Int64Type=Int64Type;function pushArray(t,e){if(!t)return 0;var r=t.length;if((e.size||e.size===0)&&r<e.size)throw new Error("Type mismatch");var o=e.memberType.ptrSize,a=_nbind.Pool.lalloc(4+r*o);HEAPU32[a/4]=r;var n=e.memberType.heap,u=(a+4)/o,A=e.memberType.wireWrite,p=0;if(A)for(;p<r;)n[u++]=A(t[p++]);else for(;p<r;)n[u++]=t[p++];return a}_nbind.pushArray=pushArray;function popArray(t,e){if(t===0)return null;var r=HEAPU32[t/4],o=new Array(r),a=e.memberType.heap;t=(t+4)/e.memberType.ptrSize;var n=e.memberType.wireRead,u=0;if(n)for(;u<r;)o[u++]=n(a[t++]);else for(;u<r;)o[u++]=a[t++];return o}_nbind.popArray=popArray;var ArrayType=function(t){__extends(e,t);function e(r){var o=t.call(this,r)||this;return o.wireRead=function(a){return popArray(a,o)},o.wireWrite=function(a){return pushArray(a,o)},o.readResources=[_nbind.resources.pool],o.writeResources=[_nbind.resources.pool],o.memberType=r.paramList[0],r.paramList[1]&&(o.size=r.paramList[1]),o}return e}(_nbind.BindType);_nbind.ArrayType=ArrayType;function pushString(t,e){if(t==null)if(e&&e.Nullable)t="";else throw new Error("Type mismatch");if(e&&e.Strict){if(typeof t!="string")throw new Error("Type mismatch")}else t=t.toString();var r=Module.lengthBytesUTF8(t),o=_nbind.Pool.lalloc(4+r+1);return HEAPU32[o/4]=r,Module.stringToUTF8Array(t,HEAPU8,o+4,r+1),o}_nbind.pushString=pushString;function popString(t){if(t===0)return null;var e=HEAPU32[t/4];return Module.Pointer_stringify(t+4,e)}_nbind.popString=popString;var StringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popString,r.wireWrite=pushString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,o){return function(a){return pushString(a,o)}},e}(_nbind.BindType);_nbind.StringType=StringType;function makeArgList(t){return Array.apply(null,Array(t)).map(function(e,r){return"a"+(r+1)})}function anyNeedsWireWrite(t,e){return t.reduce(function(r,o){return r||o.needsWireWrite(e)},!1)}function anyNeedsWireRead(t,e){return t.reduce(function(r,o){return r||!!o.needsWireRead(e)},!1)}function makeWireRead(t,e,r,o){var a=t.length;return r.makeWireRead?r.makeWireRead(o,t,a):r.wireRead?(t[a]=r.wireRead,"(convertParamList["+a+"]("+o+"))"):o}function makeWireWrite(t,e,r,o){var a,n=t.length;return r.makeWireWrite?a=r.makeWireWrite(o,e,t,n):a=r.wireWrite,a?typeof a=="string"?a:(t[n]=a,"(convertParamList["+n+"]("+o+"))"):o}function buildCallerFunction(dynCall,ptrType,ptr,num,policyTbl,needsWireWrite,prefix,returnType,argTypeList,mask,err){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireRead(convertParamList,policyTbl,returnType,"dynCall("+[prefix].concat(argList.map(function(t,e){return makeWireWrite(convertParamList,policyTbl,argTypeList[e],t)})).join(",")+")"),resourceSet=_nbind.listResources([returnType],argTypeList),sourceCode="function("+argList.join(",")+"){"+(mask?"this.__nbindFlags&mask&&err();":"")+resourceSet.makeOpen()+"var r="+callExpression+";"+resourceSet.makeClose()+"return r;}";return eval("("+sourceCode+")")}function buildJSCallerFunction(returnType,argTypeList){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireWrite(convertParamList,null,returnType,"_nbind.externalList[num].data("+argList.map(function(t,e){return makeWireRead(convertParamList,null,argTypeList[e],t)}).join(",")+")"),resourceSet=_nbind.listResources(argTypeList,[returnType]);resourceSet.remove(_nbind.resources.pool);var sourceCode="function("+["dummy","num"].concat(argList).join(",")+"){"+resourceSet.makeOpen()+"var r="+callExpression+";"+resourceSet.makeClose()+"return r;}";return eval("("+sourceCode+")")}_nbind.buildJSCallerFunction=buildJSCallerFunction;function makeJSCaller(t){var e=t.length-1,r=_nbind.getTypes(t,"callback"),o=r[0],a=r.slice(1),n=anyNeedsWireRead(a,null),u=o.needsWireWrite(null);if(!u&&!n)switch(e){case 0:return function(A,p){return _nbind.externalList[p].data()};case 1:return function(A,p,h){return _nbind.externalList[p].data(h)};case 2:return function(A,p,h,C){return _nbind.externalList[p].data(h,C)};case 3:return function(A,p,h,C,w){return _nbind.externalList[p].data(h,C,w)};default:break}return buildJSCallerFunction(o,a)}_nbind.makeJSCaller=makeJSCaller;function makeMethodCaller(t,e){var r=e.typeList.length-1,o=e.typeList.slice(0);o.splice(1,0,"uint32_t",e.boundID);var a=_nbind.getTypes(o,e.title),n=a[0],u=a.slice(3),A=n.needsWireRead(e.policyTbl),p=anyNeedsWireWrite(u,e.policyTbl),h=e.ptr,C=e.num,w=_nbind.getDynCall(a,e.title),v=~e.flags&1;function b(){throw new Error("Calling a non-const method on a const object")}if(!A&&!p)switch(r){case 0:return function(){return this.__nbindFlags&v?b():w(h,C,_nbind.pushPointer(this,t))};case 1:return function(E){return this.__nbindFlags&v?b():w(h,C,_nbind.pushPointer(this,t),E)};case 2:return function(E,R){return this.__nbindFlags&v?b():w(h,C,_nbind.pushPointer(this,t),E,R)};case 3:return function(E,R,L){return this.__nbindFlags&v?b():w(h,C,_nbind.pushPointer(this,t),E,R,L)};default:break}return buildCallerFunction(w,t,h,C,e.policyTbl,p,"ptr,num,pushPointer(this,ptrType)",n,u,v,b)}_nbind.makeMethodCaller=makeMethodCaller;function makeCaller(t){var e=t.typeList.length-1,r=_nbind.getTypes(t.typeList,t.title),o=r[0],a=r.slice(1),n=o.needsWireRead(t.policyTbl),u=anyNeedsWireWrite(a,t.policyTbl),A=t.direct,p=t.ptr;if(t.direct&&!n&&!u){var h=_nbind.getDynCall(r,t.title);switch(e){case 0:return function(){return h(A)};case 1:return function(b){return h(A,b)};case 2:return function(b,E){return h(A,b,E)};case 3:return function(b,E,R){return h(A,b,E,R)};default:break}p=0}var C;if(p){var w=t.typeList.slice(0);w.splice(1,0,"uint32_t"),r=_nbind.getTypes(w,t.title),C="ptr,num"}else p=A,C="ptr";var v=_nbind.getDynCall(r,t.title);return buildCallerFunction(v,null,p,t.num,t.policyTbl,u,C,o,a)}_nbind.makeCaller=makeCaller;function makeOverloader(t,e){var r=[];function o(){return r[arguments.length].apply(this,arguments)}return o.addMethod=function(a,n){r[n]=a},o.addMethod(t,e),o}_nbind.makeOverloader=makeOverloader;var Resource=function(){function t(e,r){var o=this;this.makeOpen=function(){return Object.keys(o.openTbl).join("")},this.makeClose=function(){return Object.keys(o.closeTbl).join("")},this.openTbl={},this.closeTbl={},e&&(this.openTbl[e]=!0),r&&(this.closeTbl[r]=!0)}return t.prototype.add=function(e){for(var r=0,o=Object.keys(e.openTbl);r<o.length;r++){var a=o[r];this.openTbl[a]=!0}for(var n=0,u=Object.keys(e.closeTbl);n<u.length;n++){var a=u[n];this.closeTbl[a]=!0}},t.prototype.remove=function(e){for(var r=0,o=Object.keys(e.openTbl);r<o.length;r++){var a=o[r];delete this.openTbl[a]}for(var n=0,u=Object.keys(e.closeTbl);n<u.length;n++){var a=u[n];delete this.closeTbl[a]}},t}();_nbind.Resource=Resource;function listResources(t,e){for(var r=new Resource,o=0,a=t;o<a.length;o++)for(var n=a[o],u=0,A=n.readResources||[];u<A.length;u++){var p=A[u];r.add(p)}for(var h=0,C=e;h<C.length;h++)for(var n=C[h],w=0,v=n.writeResources||[];w<v.length;w++){var p=v[w];r.add(p)}return r}_nbind.listResources=listResources,_nbind.resources={pool:new Resource("var used=HEAPU32[_nbind.Pool.usedPtr],page=HEAPU32[_nbind.Pool.pagePtr];","_nbind.Pool.lreset(used,page);")};var ExternalBuffer=function(t){__extends(e,t);function e(r,o){var a=t.call(this,r)||this;return a.ptr=o,a}return e.prototype.free=function(){_free(this.ptr)},e}(_nbind.External);function getBuffer(t){return t instanceof ArrayBuffer?new Uint8Array(t):t instanceof DataView?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function pushBuffer(t,e){if(t==null&&e&&e.Nullable&&(t=[]),typeof t!="object")throw new Error("Type mismatch");var r=t,o=r.byteLength||r.length;if(!o&&o!==0&&r.byteLength!==0)throw new Error("Type mismatch");var a=_nbind.Pool.lalloc(8),n=_malloc(o),u=a/4;return HEAPU32[u++]=o,HEAPU32[u++]=n,HEAPU32[u++]=new ExternalBuffer(t,n).register(),HEAPU8.set(getBuffer(t),n),a}var BufferType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=pushBuffer,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,o){return function(a){return pushBuffer(a,o)}},e}(_nbind.BindType);_nbind.BufferType=BufferType;function commitBuffer(t,e,r){var o=_nbind.externalList[t].data,a=Buffer;if(typeof Buffer!="function"&&(a=function(){}),!(o instanceof Array)){var n=HEAPU8.subarray(e,e+r);if(o instanceof a){var u=void 0;typeof Buffer.from=="function"&&Buffer.from.length>=3?u=Buffer.from(n):u=new Buffer(n),u.copy(o)}else getBuffer(o).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var t=0,e=dirtyList;t<e.length;t++){var r=e[t];r.__nbindState&3||r.free()}dirtyList=[],gcTimer=0}_nbind.mark=function(t){};function toggleLightGC(t){t?_nbind.mark=function(e){dirtyList.push(e),gcTimer||(gcTimer=setTimeout(sweep,0))}:_nbind.mark=function(e){}}_nbind.toggleLightGC=toggleLightGC}(_nbind),Module.requestFullScreen=function t(e,r,o){Module.printErr("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."),Module.requestFullScreen=Module.requestFullscreen,Browser.requestFullScreen(e,r,o)},Module.requestFullscreen=function t(e,r,o){Browser.requestFullscreen(e,r,o)},Module.requestAnimationFrame=function t(e){Browser.requestAnimationFrame(e)},Module.setCanvasSize=function t(e,r,o){Browser.setCanvasSize(e,r,o)},Module.pauseMainLoop=function t(){Browser.mainLoop.pause()},Module.resumeMainLoop=function t(){Browser.mainLoop.resume()},Module.getUserMedia=function t(){Browser.getUserMedia()},Module.createContext=function t(e,r,o,a){return Browser.createContext(e,r,o,a)},ENVIRONMENT_IS_NODE?_emscripten_get_now=function(){var e=process.hrtime();return e[0]*1e3+e[1]/1e6}:typeof dateNow<"u"?_emscripten_get_now=dateNow:typeof self=="object"&&self.performance&&typeof self.performance.now=="function"?_emscripten_get_now=function(){return self.performance.now()}:typeof performance=="object"&&typeof performance.now=="function"?_emscripten_get_now=function(){return performance.now()}:_emscripten_get_now=Date.now,__ATEXIT__.push(function(){var t=Module._fflush;t&&t(0);var e=___syscall146.printChar;if(!!e){var r=___syscall146.buffers;r[1].length&&e(1,10),r[2].length&&e(2,10)}}),DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(t,e,r,o,a,n){try{Module.dynCall_viiiii(t,e,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_vif(t,e,r){try{Module.dynCall_vif(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_vid(t,e,r){try{Module.dynCall_vid(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_fiff(t,e,r,o){try{return Module.dynCall_fiff(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vi(t,e){try{Module.dynCall_vi(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_vii(t,e,r){try{Module.dynCall_vii(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_ii(t,e){try{return Module.dynCall_ii(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_viddi(t,e,r,o,a){try{Module.dynCall_viddi(t,e,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_vidd(t,e,r,o){try{Module.dynCall_vidd(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iiii(t,e,r,o){try{return Module.dynCall_iiii(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_diii(t,e,r,o){try{return Module.dynCall_diii(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_di(t,e){try{return Module.dynCall_di(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_iid(t,e,r){try{return Module.dynCall_iid(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iii(t,e,r){try{return Module.dynCall_iii(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viiddi(t,e,r,o,a,n){try{Module.dynCall_viiddi(t,e,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_viiiiii(t,e,r,o,a,n,u){try{Module.dynCall_viiiiii(t,e,r,o,a,n,u)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_dii(t,e,r){try{return Module.dynCall_dii(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_i(t){try{return Module.dynCall_i(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_iiiiii(t,e,r,o,a,n){try{return Module.dynCall_iiiiii(t,e,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_viiid(t,e,r,o,a){try{Module.dynCall_viiid(t,e,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_viififi(t,e,r,o,a,n,u){try{Module.dynCall_viififi(t,e,r,o,a,n,u)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_viii(t,e,r,o){try{Module.dynCall_viii(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_v(t){try{Module.dynCall_v(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_viid(t,e,r,o){try{Module.dynCall_viid(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_idd(t,e,r){try{return Module.dynCall_idd(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viiii(t,e,r,o,a){try{Module.dynCall_viiii(t,e,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(t,e,r){var o=new t.Int8Array(r),a=new t.Int16Array(r),n=new t.Int32Array(r),u=new t.Uint8Array(r),A=new t.Uint16Array(r),p=new t.Uint32Array(r),h=new t.Float32Array(r),C=new t.Float64Array(r),w=e.DYNAMICTOP_PTR|0,v=e.tempDoublePtr|0,b=e.ABORT|0,E=e.STACKTOP|0,R=e.STACK_MAX|0,L=e.cttz_i8|0,_=e.___dso_handle|0,V=0,re=0,ae=0,he=0,pe=t.NaN,De=t.Infinity,ge=0,le=0,Pe=0,g=0,ve=0,Ee=0,de=t.Math.floor,ne=t.Math.abs,Z=t.Math.sqrt,me=t.Math.pow,be=t.Math.cos,ut=t.Math.sin,H=t.Math.tan,yt=t.Math.acos,Me=t.Math.asin,Te=t.Math.atan,Qe=t.Math.atan2,_e=t.Math.exp,qe=t.Math.log,At=t.Math.ceil,Oe=t.Math.imul,x=t.Math.min,I=t.Math.max,P=t.Math.clz32,y=t.Math.fround,F=e.abort,z=e.assert,X=e.enlargeMemory,$=e.getTotalMemory,ie=e.abortOnCannotGrowMemory,ke=e.invoke_viiiii,Ne=e.invoke_vif,st=e.invoke_vid,ht=e.invoke_fiff,Ut=e.invoke_vi,Xt=e.invoke_vii,xt=e.invoke_ii,tn=e.invoke_viddi,Dr=e.invoke_vidd,fr=e.invoke_iiii,Br=e.invoke_diii,jr=e.invoke_di,Hn=e.invoke_iid,bs=e.invoke_iii,ki=e.invoke_viiddi,gs=e.invoke_viiiiii,to=e.invoke_dii,Di=e.invoke_i,Qs=e.invoke_iiiiii,ro=e.invoke_viiid,hc=e.invoke_viififi,gu=e.invoke_viii,cp=e.invoke_v,up=e.invoke_viid,ks=e.invoke_idd,Cn=e.invoke_viiii,no=e._emscripten_asm_const_iiiii,Fs=e._emscripten_asm_const_iiidddddd,Cl=e._emscripten_asm_const_iiiid,Il=e.__nbind_reference_external,io=e._emscripten_asm_const_iiiiiiii,Ue=e._removeAccessorPrefix,Fn=e._typeModule,Fi=e.__nbind_register_pool,Rn=e.__decorate,Ui=e._llvm_stackrestore,Zt=e.___cxa_atexit,Ri=e.__extends,$n=e.__nbind_get_value_object,Ua=e.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,$t=e._emscripten_set_main_loop_timing,gc=e.__nbind_register_primitive,du=e.__nbind_register_type,dc=e._emscripten_memcpy_big,wl=e.__nbind_register_function,xA=e.___setErrNo,mu=e.__nbind_register_class,Ce=e.__nbind_finish,Rt=e._abort,mc=e._nbind_value,_i=e._llvm_stacksave,yu=e.___syscall54,qt=e._defineHidden,Bl=e._emscripten_set_main_loop,bA=e._emscripten_get_now,Ap=e.__nbind_register_callback_signature,yc=e._emscripten_asm_const_iiiiii,QA=e.__nbind_free_external,Dn=e._emscripten_asm_const_iiii,ui=e._emscripten_asm_const_iiididi,Ec=e.___syscall6,kA=e._atexit,na=e.___syscall140,Hi=e.___syscall146,Mo=y(0);let $e=y(0);function so(s){s=s|0;var l=0;return l=E,E=E+s|0,E=E+15&-16,l|0}function vl(){return E|0}function Eu(s){s=s|0,E=s}function qi(s,l){s=s|0,l=l|0,E=s,R=l}function Cu(s,l){s=s|0,l=l|0,V||(V=s,re=l)}function FA(s){s=s|0,Ee=s}function Ha(){return Ee|0}function Cc(){var s=0,l=0;Cr(8104,8,400)|0,Cr(8504,408,540)|0,s=9044,l=s+44|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));o[9088]=0,o[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,Zt(17,8104,_|0)|0}function ds(s){s=s|0,Be(s+948|0)}function Ot(s){return s=y(s),((bu(s)|0)&2147483647)>>>0>2139095040|0}function Sn(s,l,c){s=s|0,l=l|0,c=c|0;e:do if(n[s+(l<<3)+4>>2]|0)s=s+(l<<3)|0;else{if((l|2|0)==3&&n[s+60>>2]|0){s=s+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[s+52>>2]|0){s=s+48|0;break e}break}default:}if(n[s+68>>2]|0){s=s+64|0;break}else{s=(l|1|0)==5?948:c;break}}while(0);return s|0}function di(s){s=s|0;var l=0;return l=tD(1e3)|0,ia(s,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,Cr(l|0,8104,1e3)|0,o[s+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=s,l|0}function ia(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;d=E,E=E+16|0,f=d,l||(n[f>>2]=c,dg(s,5,3197,f)),E=d}function oo(){return di(956)|0}function Rs(s){s=s|0;var l=0;return l=Gt(1e3)|0,sa(l,s),ia(n[s+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function sa(s,l){s=s|0,l=l|0;var c=0;Cr(s|0,l|0,948)|0,Nm(s+948|0,l+948|0),c=s+960|0,s=l+960|0,l=c+40|0;do n[c>>2]=n[s>>2],c=c+4|0,s=s+4|0;while((c|0)<(l|0))}function oa(s){s=s|0;var l=0,c=0,f=0,d=0;if(l=s+944|0,c=n[l>>2]|0,c|0&&(Uo(c+948|0,s)|0,n[l>>2]=0),c=Zi(s)|0,c|0){l=0;do n[(Ts(s,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(c|0))}c=s+948|0,f=n[c>>2]|0,d=s+952|0,l=n[d>>2]|0,(l|0)!=(f|0)&&(n[d>>2]=l+(~((l+-4-f|0)>>>2)<<2)),Ns(c),rD(s),n[2276]=(n[2276]|0)+-1}function Uo(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0;f=n[s>>2]|0,Q=s+4|0,c=n[Q>>2]|0,m=c;e:do if((f|0)==(c|0))d=f,B=4;else for(s=f;;){if((n[s>>2]|0)==(l|0)){d=s,B=4;break e}if(s=s+4|0,(s|0)==(c|0)){s=0;break}}while(0);return(B|0)==4&&((d|0)!=(c|0)?(f=d+4|0,s=m-f|0,l=s>>2,l&&(bI(d|0,f|0,s|0)|0,c=n[Q>>2]|0),s=d+(l<<2)|0,(c|0)==(s|0)||(n[Q>>2]=c+(~((c+-4-s|0)>>>2)<<2)),s=1):s=0),s|0}function Zi(s){return s=s|0,(n[s+952>>2]|0)-(n[s+948>>2]|0)>>2|0}function Ts(s,l){s=s|0,l=l|0;var c=0;return c=n[s+948>>2]|0,(n[s+952>>2]|0)-c>>2>>>0>l>>>0?s=n[c+(l<<2)>>2]|0:s=0,s|0}function Ns(s){s=s|0;var l=0,c=0,f=0,d=0;f=E,E=E+32|0,l=f,d=n[s>>2]|0,c=(n[s+4>>2]|0)-d|0,((n[s+8>>2]|0)-d|0)>>>0>c>>>0&&(d=c>>2,wp(l,d,d,s+8|0),Cg(s,l),HA(l)),E=f}function Ls(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;M=Zi(s)|0;do if(M|0){if((n[(Ts(s,0)|0)+944>>2]|0)==(s|0)){if(!(Uo(s+948|0,l)|0))break;Cr(l+400|0,8504,540)|0,n[l+944>>2]=0,je(s);break}B=n[(n[s+976>>2]|0)+12>>2]|0,Q=s+948|0,k=(B|0)==0,c=0,m=0;do f=n[(n[Q>>2]|0)+(m<<2)>>2]|0,(f|0)==(l|0)?je(s):(d=Rs(f)|0,n[(n[Q>>2]|0)+(c<<2)>>2]=d,n[d+944>>2]=s,k||QR[B&15](f,d,s,c),c=c+1|0),m=m+1|0;while((m|0)!=(M|0));if(c>>>0<M>>>0){k=s+948|0,Q=s+952|0,B=c,c=n[Q>>2]|0;do m=(n[k>>2]|0)+(B<<2)|0,f=m+4|0,d=c-f|0,l=d>>2,l&&(bI(m|0,f|0,d|0)|0,c=n[Q>>2]|0),d=c,f=m+(l<<2)|0,(d|0)!=(f|0)&&(c=d+(~((d+-4-f|0)>>>2)<<2)|0,n[Q>>2]=c),B=B+1|0;while((B|0)!=(M|0))}}while(0)}function ao(s){s=s|0;var l=0,c=0,f=0,d=0;Yn(s,(Zi(s)|0)==0,2491),Yn(s,(n[s+944>>2]|0)==0,2545),l=s+948|0,c=n[l>>2]|0,f=s+952|0,d=n[f>>2]|0,(d|0)!=(c|0)&&(n[f>>2]=d+(~((d+-4-c|0)>>>2)<<2)),Ns(l),l=s+976|0,c=n[l>>2]|0,Cr(s|0,8104,1e3)|0,o[c+2>>0]|0&&(n[s+4>>2]=2,n[s+12>>2]=4),n[l>>2]=c}function Yn(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;d=E,E=E+16|0,f=d,l||(n[f>>2]=c,co(s,5,3197,f)),E=d}function qn(){return n[2276]|0}function $i(){var s=0;return s=tD(20)|0,es((s|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[s>>2]=n[239],n[s+4>>2]=n[240],n[s+8>>2]=n[241],n[s+12>>2]=n[242],n[s+16>>2]=n[243],s|0}function es(s,l){s=s|0,l=l|0;var c=0,f=0;f=E,E=E+16|0,c=f,s||(n[c>>2]=l,co(0,5,3197,c)),E=f}function mi(s){s=s|0,rD(s),n[2277]=(n[2277]|0)+-1}function qa(s,l){s=s|0,l=l|0;var c=0;l?(Yn(s,(Zi(s)|0)==0,2629),c=1):(c=0,l=0),n[s+964>>2]=l,n[s+988>>2]=c}function aa(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,m=f+8|0,d=f+4|0,B=f,n[d>>2]=l,Yn(s,(n[l+944>>2]|0)==0,2709),Yn(s,(n[s+964>>2]|0)==0,2763),ee(s),l=s+948|0,n[B>>2]=(n[l>>2]|0)+(c<<2),n[m>>2]=n[B>>2],we(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=s,je(s),E=f}function ee(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;if(c=Zi(s)|0,c|0&&(n[(Ts(s,0)|0)+944>>2]|0)!=(s|0)){f=n[(n[s+976>>2]|0)+12>>2]|0,d=s+948|0,m=(f|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,Q=Rs(B)|0,n[(n[d>>2]|0)+(l<<2)>>2]=Q,n[Q+944>>2]=s,m||QR[f&15](B,Q,s,l),l=l+1|0;while((l|0)!=(c|0))}}function we(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0,Ye=0,Le=0,Re=0,et=0,Ze=0;et=E,E=E+64|0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2],n[O>>2]=(n[O>>2]|0)+4,l=Ig(s,Re,l)|0,HA(Re)}while(0);return E=et,l|0}function je(s){s=s|0;var l=0;do{if(l=s+984|0,o[l>>0]|0)break;o[l>>0]=1,h[s+504>>2]=y(pe),s=n[s+944>>2]|0}while((s|0)!=0)}function Be(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),pt(c))}function xe(s){return s=s|0,n[s+944>>2]|0}function Ve(s){s=s|0,Yn(s,(n[s+964>>2]|0)!=0,2832),je(s)}function vt(s){return s=s|0,(o[s+984>>0]|0)!=0|0}function tr(s,l){s=s|0,l=l|0,r3e(s,l,400)|0&&(Cr(s|0,l|0,400)|0,je(s))}function Zr(s){s=s|0;var l=$e;return l=y(h[s+44>>2]),s=Ot(l)|0,y(s?y(0):l)}function Tn(s){s=s|0;var l=$e;return l=y(h[s+48>>2]),Ot(l)|0&&(l=o[(n[s+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function _r(s,l){s=s|0,l=l|0,n[s+980>>2]=l}function ei(s){return s=s|0,n[s+980>>2]|0}function Ti(s,l){s=s|0,l=l|0;var c=0;c=s+4|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function Kn(s){return s=s|0,n[s+4>>2]|0}function ja(s,l){s=s|0,l=l|0;var c=0;c=s+8|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function la(s){return s=s|0,n[s+8>>2]|0}function yi(s,l){s=s|0,l=l|0;var c=0;c=s+12|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function ca(s){return s=s|0,n[s+12>>2]|0}function Ga(s,l){s=s|0,l=l|0;var c=0;c=s+16|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function lo(s){return s=s|0,n[s+16>>2]|0}function RA(s,l){s=s|0,l=l|0;var c=0;c=s+20|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function Ic(s){return s=s|0,n[s+20>>2]|0}function ua(s,l){s=s|0,l=l|0;var c=0;c=s+24|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function ng(s){return s=s|0,n[s+24>>2]|0}function wc(s,l){s=s|0,l=l|0;var c=0;c=s+28|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function bm(s){return s=s|0,n[s+28>>2]|0}function ig(s,l){s=s|0,l=l|0;var c=0;c=s+32|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function Vn(s){return s=s|0,n[s+32>>2]|0}function fp(s,l){s=s|0,l=l|0;var c=0;c=s+36|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,je(s))}function sg(s){return s=s|0,n[s+36>>2]|0}function TA(s,l){s=s|0,l=y(l);var c=0;c=s+40|0,y(h[c>>2])!=l&&(h[c>>2]=l,je(s))}function Os(s,l){s=s|0,l=y(l);var c=0;c=s+44|0,y(h[c>>2])!=l&&(h[c>>2]=l,je(s))}function Iu(s,l){s=s|0,l=y(l);var c=0;c=s+48|0,y(h[c>>2])!=l&&(h[c>>2]=l,je(s))}function Wa(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=(m^1)&1,f=s+52|0,d=s+56|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function ji(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+52|0,c=s+56|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ot(l)|0,n[c>>2]=f?3:2,je(s))}function Aa(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+52|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function wu(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ot(c)|0,f=(m^1)&1,d=s+132+(l<<3)|0,l=s+132+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,je(s))}function ms(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ot(c)|0,f=m?0:2,d=s+132+(l<<3)|0,l=s+132+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,je(s))}function Bc(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+132+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function vc(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ot(c)|0,f=(m^1)&1,d=s+60+(l<<3)|0,l=s+60+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,je(s))}function G(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ot(c)|0,f=m?0:2,d=s+60+(l<<3)|0,l=s+60+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,je(s))}function Dt(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+60+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function Dl(s,l){s=s|0,l=l|0;var c=0;c=s+60+(l<<3)+4|0,(n[c>>2]|0)!=3&&(h[s+60+(l<<3)>>2]=y(pe),n[c>>2]=3,je(s))}function Si(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ot(c)|0,f=(m^1)&1,d=s+204+(l<<3)|0,l=s+204+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,je(s))}function Dc(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ot(c)|0,f=m?0:2,d=s+204+(l<<3)|0,l=s+204+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,je(s))}function lt(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+204+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function Bu(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ot(c)|0,f=(m^1)&1,d=s+276+(l<<3)|0,l=s+276+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,je(s))}function og(s,l){return s=s|0,l=l|0,y(h[s+276+(l<<3)>>2])}function cI(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=(m^1)&1,f=s+348|0,d=s+352|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function NA(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+348|0,c=s+352|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ot(l)|0,n[c>>2]=f?3:2,je(s))}function pp(s){s=s|0;var l=0;l=s+352|0,(n[l>>2]|0)!=3&&(h[s+348>>2]=y(pe),n[l>>2]=3,je(s))}function yr(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+348|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function ys(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=(m^1)&1,f=s+356|0,d=s+360|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function ag(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+356|0,c=s+360|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ot(l)|0,n[c>>2]=f?3:2,je(s))}function lg(s){s=s|0;var l=0;l=s+360|0,(n[l>>2]|0)!=3&&(h[s+356>>2]=y(pe),n[l>>2]=3,je(s))}function cg(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+356|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function hp(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=(m^1)&1,f=s+364|0,d=s+368|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function Sc(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=m?0:2,f=s+364|0,d=s+368|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function mt(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+364|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Qm(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=(m^1)&1,f=s+372|0,d=s+376|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function ug(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=m?0:2,f=s+372|0,d=s+376|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function Ag(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+372|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function vu(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=(m^1)&1,f=s+380|0,d=s+384|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function km(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=m?0:2,f=s+380|0,d=s+384|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function fg(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+380|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Du(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=(m^1)&1,f=s+388|0,d=s+392|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function uI(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ot(l)|0,c=m?0:2,f=s+388|0,d=s+392|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,je(s))}function Fm(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+388|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function fa(s,l){s=s|0,l=y(l);var c=0;c=s+396|0,y(h[c>>2])!=l&&(h[c>>2]=l,je(s))}function Pc(s){return s=s|0,y(h[s+396>>2])}function Sl(s){return s=s|0,y(h[s+400>>2])}function Su(s){return s=s|0,y(h[s+404>>2])}function pg(s){return s=s|0,y(h[s+408>>2])}function LA(s){return s=s|0,y(h[s+412>>2])}function gp(s){return s=s|0,y(h[s+416>>2])}function Ya(s){return s=s|0,y(h[s+420>>2])}function hg(s,l){switch(s=s|0,l=l|0,Yn(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+424+(l<<2)>>2])}function dp(s,l){switch(s=s|0,l=l|0,Yn(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+448+(l<<2)>>2])}function _o(s,l){switch(s=s|0,l=l|0,Yn(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+472+(l<<2)>>2])}function Es(s,l){s=s|0,l=l|0;var c=0,f=$e;return c=n[s+4>>2]|0,(c|0)==(n[l+4>>2]|0)?c?(f=y(h[s>>2]),s=y(ne(y(f-y(h[l>>2]))))<y(999999974e-13)):s=1:s=0,s|0}function Ei(s,l){s=y(s),l=y(l);var c=0;return Ot(s)|0?c=Ot(l)|0:c=y(ne(y(s-l)))<y(999999974e-13),c|0}function Rm(s,l){s=s|0,l=l|0,Tm(s,l)}function Tm(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c+4|0,n[f>>2]=0,n[f+4>>2]=0,n[f+8>>2]=0,Ua(f|0,s|0,l|0,0),co(s,3,(o[f+11>>0]|0)<0?n[f>>2]|0:f,c),D3e(f),E=c}function Ho(s,l,c,f){s=y(s),l=y(l),c=c|0,f=f|0;var d=$e;s=y(s*l),d=y(vR(s,y(1)));do if(Ei(d,y(0))|0)s=y(s-d);else{if(s=y(s-d),Ei(d,y(1))|0){s=y(s+y(1));break}if(c){s=y(s+y(1));break}f||(d>y(.5)?d=y(1):(f=Ei(d,y(.5))|0,d=y(f?1:0)),s=y(s+d))}while(0);return y(s/l)}function OA(s,l,c,f,d,m,B,Q,k,M,O,j,se){s=s|0,l=y(l),c=c|0,f=y(f),d=d|0,m=y(m),B=B|0,Q=y(Q),k=y(k),M=y(M),O=y(O),j=y(j),se=se|0;var Ye=0,Le=$e,Re=$e,et=$e,Ze=$e,at=$e,He=$e;return k<y(0)|M<y(0)?se=0:((se|0)!=0&&(Le=y(h[se+4>>2]),Le!=y(0))?(et=y(Ho(l,Le,0,0)),Ze=y(Ho(f,Le,0,0)),Re=y(Ho(m,Le,0,0)),Le=y(Ho(Q,Le,0,0))):(Re=m,et=l,Le=Q,Ze=f),(d|0)==(s|0)?Ye=Ei(Re,et)|0:Ye=0,(B|0)==(c|0)?se=Ei(Le,Ze)|0:se=0,!Ye&&(at=y(l-O),!(mp(s,at,k)|0))&&!(yp(s,at,d,k)|0)?Ye=gg(s,at,d,m,k)|0:Ye=1,!se&&(He=y(f-j),!(mp(c,He,M)|0))&&!(yp(c,He,B,M)|0)?se=gg(c,He,B,Q,M)|0:se=1,se=Ye&se),se|0}function mp(s,l,c){return s=s|0,l=y(l),c=y(c),(s|0)==1?s=Ei(l,c)|0:s=0,s|0}function yp(s,l,c,f){return s=s|0,l=y(l),c=c|0,f=y(f),(s|0)==2&(c|0)==0?l>=f?s=1:s=Ei(l,f)|0:s=0,s|0}function gg(s,l,c,f,d){return s=s|0,l=y(l),c=c|0,f=y(f),d=y(d),(s|0)==2&(c|0)==2&f>l?d<=l?s=1:s=Ei(l,d)|0:s=0,s|0}function pa(s,l,c,f,d,m,B,Q,k,M,O){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=m|0,B=y(B),Q=y(Q),k=k|0,M=M|0,O=O|0;var j=0,se=0,Ye=0,Le=0,Re=$e,et=$e,Ze=0,at=0,He=0,Ge=0,Tt=0,Rr=0,ir=0,Jt=0,Ir=0,Qr=0,rr=0,Bn=$e,po=$e,ho=$e,go=0,Ea=0;rr=E,E=E+160|0,Jt=rr+152|0,ir=rr+120|0,Rr=rr+104|0,He=rr+72|0,Le=rr+56|0,Tt=rr+8|0,at=rr,Ge=(n[2279]|0)+1|0,n[2279]=Ge,Ir=s+984|0,(o[Ir>>0]|0)!=0&&(n[s+512>>2]|0)!=(n[2278]|0)?Ze=4:(n[s+516>>2]|0)==(f|0)?Qr=0:Ze=4,(Ze|0)==4&&(n[s+520>>2]=0,n[s+924>>2]=-1,n[s+928>>2]=-1,h[s+932>>2]=y(-1),h[s+936>>2]=y(-1),Qr=1);e:do if(n[s+964>>2]|0)if(Re=y(rn(s,2,B)),et=y(rn(s,0,B)),j=s+916|0,ho=y(h[j>>2]),po=y(h[s+920>>2]),Bn=y(h[s+932>>2]),OA(d,l,m,c,n[s+924>>2]|0,ho,n[s+928>>2]|0,po,Bn,y(h[s+936>>2]),Re,et,O)|0)Ze=22;else if(Ye=n[s+520>>2]|0,!Ye)Ze=21;else for(se=0;;){if(j=s+524+(se*24|0)|0,Bn=y(h[j>>2]),po=y(h[s+524+(se*24|0)+4>>2]),ho=y(h[s+524+(se*24|0)+16>>2]),OA(d,l,m,c,n[s+524+(se*24|0)+8>>2]|0,Bn,n[s+524+(se*24|0)+12>>2]|0,po,ho,y(h[s+524+(se*24|0)+20>>2]),Re,et,O)|0){Ze=22;break e}if(se=se+1|0,se>>>0>=Ye>>>0){Ze=21;break}}else{if(k){if(j=s+916|0,!(Ei(y(h[j>>2]),l)|0)){Ze=21;break}if(!(Ei(y(h[s+920>>2]),c)|0)){Ze=21;break}if((n[s+924>>2]|0)!=(d|0)){Ze=21;break}j=(n[s+928>>2]|0)==(m|0)?j:0,Ze=22;break}if(Ye=n[s+520>>2]|0,!Ye)Ze=21;else for(se=0;;){if(j=s+524+(se*24|0)|0,Ei(y(h[j>>2]),l)|0&&Ei(y(h[s+524+(se*24|0)+4>>2]),c)|0&&(n[s+524+(se*24|0)+8>>2]|0)==(d|0)&&(n[s+524+(se*24|0)+12>>2]|0)==(m|0)){Ze=22;break e}if(se=se+1|0,se>>>0>=Ye>>>0){Ze=21;break}}}while(0);do if((Ze|0)==21)o[11697]|0?(j=0,Ze=28):(j=0,Ze=31);else if((Ze|0)==22){if(se=(o[11697]|0)!=0,!((j|0)!=0&(Qr^1)))if(se){Ze=28;break}else{Ze=31;break}Le=j+16|0,n[s+908>>2]=n[Le>>2],Ye=j+20|0,n[s+912>>2]=n[Ye>>2],(o[11698]|0)==0|se^1||(n[at>>2]=MA(Ge)|0,n[at+4>>2]=Ge,co(s,4,2972,at),se=n[s+972>>2]|0,se|0&&rf[se&127](s),d=Ka(d,k)|0,m=Ka(m,k)|0,Ea=+y(h[Le>>2]),go=+y(h[Ye>>2]),n[Tt>>2]=d,n[Tt+4>>2]=m,C[Tt+8>>3]=+l,C[Tt+16>>3]=+c,C[Tt+24>>3]=Ea,C[Tt+32>>3]=go,n[Tt+40>>2]=M,co(s,4,2989,Tt))}while(0);return(Ze|0)==28&&(se=MA(Ge)|0,n[Le>>2]=se,n[Le+4>>2]=Ge,n[Le+8>>2]=Qr?3047:11699,co(s,4,3038,Le),se=n[s+972>>2]|0,se|0&&rf[se&127](s),Tt=Ka(d,k)|0,Ze=Ka(m,k)|0,n[He>>2]=Tt,n[He+4>>2]=Ze,C[He+8>>3]=+l,C[He+16>>3]=+c,n[He+24>>2]=M,co(s,4,3049,He),Ze=31),(Ze|0)==31&&(ti(s,l,c,f,d,m,B,Q,k,O),o[11697]|0&&(se=n[2279]|0,Tt=MA(se)|0,n[Rr>>2]=Tt,n[Rr+4>>2]=se,n[Rr+8>>2]=Qr?3047:11699,co(s,4,3083,Rr),se=n[s+972>>2]|0,se|0&&rf[se&127](s),Tt=Ka(d,k)|0,Rr=Ka(m,k)|0,go=+y(h[s+908>>2]),Ea=+y(h[s+912>>2]),n[ir>>2]=Tt,n[ir+4>>2]=Rr,C[ir+8>>3]=go,C[ir+16>>3]=Ea,n[ir+24>>2]=M,co(s,4,3092,ir)),n[s+516>>2]=f,j||(se=s+520|0,j=n[se>>2]|0,(j|0)==16&&(o[11697]|0&&co(s,4,3124,Jt),n[se>>2]=0,j=0),k?j=s+916|0:(n[se>>2]=j+1,j=s+524+(j*24|0)|0),h[j>>2]=l,h[j+4>>2]=c,n[j+8>>2]=d,n[j+12>>2]=m,n[j+16>>2]=n[s+908>>2],n[j+20>>2]=n[s+912>>2],j=0)),k&&(n[s+416>>2]=n[s+908>>2],n[s+420>>2]=n[s+912>>2],o[s+985>>0]=1,o[Ir>>0]=0),n[2279]=(n[2279]|0)+-1,n[s+512>>2]=n[2278],E=rr,Qr|(j|0)==0|0}function rn(s,l,c){s=s|0,l=l|0,c=y(c);var f=$e;return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r(j,Pr,rr,vr,Tl,el),pr(j,lr,Pn,vr,jo,Us);do if(!(ts(j,lr,Pn)|0)&&(ga(s,j)|0)==4){if((n[(xl(j,lr)|0)+4>>2]|0)==3){O=0;break}O=(n[(Qc(j,lr)|0)+4>>2]|0)!=3}else O=0;while(0);Wt=y(h[el>>2]),Jt=y(h[Us>>2]),gf=n[Tl>>2]|0,ii=n[jo>>2]|0,pa(j,jn?Wt:Jt,jn?Jt:Wt,Bs,jn?gf:ii,jn?ii:gf,vr,mo,k&(O^1),3488,M)|0,o[Rl>>0]=o[Rl>>0]|o[j+508>>0],j=n[j+960>>2]|0}while((j|0)!=0)}}else l=y(0);if(l=y(Ir+l),ii=l<y(0)&1,o[Rl>>0]=ii|u[Rl>>0],Rp&l>y(0)?(O=n[Fl>>2]|0,(n[s+364+(O<<3)+4>>2]|0)!=0&&(_s=y(Hr(s+364+(O<<3)|0,yo)),_s>=y(0))?Re=y(Nn(y(0),y(_s-y(rr-l)))):Re=y(0)):Re=l,Tt=Qr>>>0<ir>>>0,Tt){Ye=n[Eo>>2]|0,se=Qr,O=0;do j=n[Ye+(se<<2)>>2]|0,n[j+24>>2]|0||(O=((n[(xl(j,Pr)|0)+4>>2]|0)==3&1)+O|0,O=O+((n[(Qc(j,Pr)|0)+4>>2]|0)==3&1)|0),se=se+1|0;while((se|0)!=(ir|0));O?(Ze=y(0),c=y(0)):Jr=101}else Jr=101;e:do if((Jr|0)==101)switch(Jr=0,Mp|0){case 1:{O=0,Ze=y(Re*y(.5)),c=y(0);break e}case 2:{O=0,Ze=Re,c=y(0);break e}case 3:{if(m>>>0<=1){O=0,Ze=y(0),c=y(0);break e}c=y((m+-1|0)>>>0),O=0,Ze=y(0),c=y(y(Nn(Re,y(0)))/c);break e}case 5:{c=y(Re/y((m+1|0)>>>0)),O=0,Ze=c;break e}case 4:{c=y(Re/y(m>>>0)),O=0,Ze=y(c*y(.5));break e}default:{O=0,Ze=y(0),c=y(0);break e}}while(0);if(l=y(Up+Ze),Tt){et=y(Re/y(O|0)),se=n[Eo>>2]|0,j=Qr,Re=y(0);do{O=n[se+(j<<2)>>2]|0;e:do if((n[O+36>>2]|0)!=1){switch(n[O+24>>2]|0){case 1:{if(Ai(O,Pr)|0){if(!k)break e;Wt=y(Fr(O,Pr,rr)),Wt=y(Wt+y(gr(s,Pr))),Wt=y(Wt+y(K(O,Pr,vr))),h[O+400+(n[Ou>>2]<<2)>>2]=Wt;break e}break}case 0:if(ii=(n[(xl(O,Pr)|0)+4>>2]|0)==3,Wt=y(et+l),l=ii?Wt:l,k&&(ii=O+400+(n[Ou>>2]<<2)|0,h[ii>>2]=y(l+y(h[ii>>2]))),ii=(n[(Qc(O,Pr)|0)+4>>2]|0)==3,Wt=y(et+l),l=ii?Wt:l,Ea){Wt=y(c+y(rn(O,Pr,vr))),Re=Pn,l=y(l+y(Wt+y(h[O+504>>2])));break e}else{l=y(l+y(c+y(ns(O,Pr,vr)))),Re=y(Nn(Re,y(ns(O,lr,vr))));break e}default:}k&&(Wt=y(Ze+y(gr(s,Pr))),ii=O+400+(n[Ou>>2]<<2)|0,h[ii>>2]=y(Wt+y(h[ii>>2])))}while(0);j=j+1|0}while((j|0)!=(ir|0))}else Re=y(0);if(c=y(_p+l),Tp?Ze=y(y(Ci(s,lr,y(Hs+Re),Oc,B))-Hs):Ze=Pn,et=y(y(Ci(s,lr,y(Hs+(Op?Pn:Re)),Oc,B))-Hs),Tt&k){j=Qr;do{se=n[(n[Eo>>2]|0)+(j<<2)>>2]|0;do if((n[se+36>>2]|0)!=1){if((n[se+24>>2]|0)==1){if(Ai(se,lr)|0){if(Wt=y(Fr(se,lr,Pn)),Wt=y(Wt+y(gr(s,lr))),Wt=y(Wt+y(K(se,lr,vr))),O=n[Lu>>2]|0,h[se+400+(O<<2)>>2]=Wt,!(Ot(Wt)|0))break}else O=n[Lu>>2]|0;Wt=y(gr(s,lr)),h[se+400+(O<<2)>>2]=y(Wt+y(K(se,lr,vr)));break}O=ga(s,se)|0;do if((O|0)==4){if((n[(xl(se,lr)|0)+4>>2]|0)==3){Jr=139;break}if((n[(Qc(se,lr)|0)+4>>2]|0)==3){Jr=139;break}if(ts(se,lr,Pn)|0){l=Le;break}gf=n[se+908+(n[Fl>>2]<<2)>>2]|0,n[Us>>2]=gf,l=y(h[se+396>>2]),ii=Ot(l)|0,Re=(n[v>>2]=gf,y(h[v>>2])),ii?l=et:(Ir=y(rn(se,lr,vr)),Wt=y(Re/l),l=y(l*Re),l=y(Ir+(jn?Wt:l))),h[el>>2]=l,h[Us>>2]=y(y(rn(se,Pr,vr))+Re),n[jo>>2]=1,n[Tl>>2]=1,pr(se,Pr,rr,vr,jo,Us),pr(se,lr,Pn,vr,Tl,el),l=y(h[Us>>2]),Ir=y(h[el>>2]),Wt=jn?l:Ir,l=jn?Ir:l,ii=((Ot(Wt)|0)^1)&1,pa(se,Wt,l,Bs,ii,((Ot(l)|0)^1)&1,vr,mo,1,3493,M)|0,l=Le}else Jr=139;while(0);e:do if((Jr|0)==139){Jr=0,l=y(Ze-y(ns(se,lr,vr)));do if((n[(xl(se,lr)|0)+4>>2]|0)==3){if((n[(Qc(se,lr)|0)+4>>2]|0)!=3)break;l=y(Le+y(Nn(y(0),y(l*y(.5)))));break e}while(0);if((n[(Qc(se,lr)|0)+4>>2]|0)==3){l=Le;break}if((n[(xl(se,lr)|0)+4>>2]|0)==3){l=y(Le+y(Nn(y(0),l)));break}switch(O|0){case 1:{l=Le;break e}case 2:{l=y(Le+y(l*y(.5)));break e}default:{l=y(Le+l);break e}}}while(0);Wt=y(ws+l),ii=se+400+(n[Lu>>2]<<2)|0,h[ii>>2]=y(Wt+y(h[ii>>2]))}while(0);j=j+1|0}while((j|0)!=(ir|0))}if(ws=y(ws+et),Tc=y(Nn(Tc,c)),m=go+1|0,ir>>>0>=qs>>>0)break;l=rr,Qr=ir,go=m}do if(k){if(O=m>>>0>1,!O&&!(Gi(s)|0))break;if(!(Ot(Pn)|0)){l=y(Pn-ws);e:do switch(n[s+12>>2]|0){case 3:{Le=y(Le+l),He=y(0);break}case 2:{Le=y(Le+y(l*y(.5))),He=y(0);break}case 4:{Pn>ws?He=y(l/y(m>>>0)):He=y(0);break}case 7:if(Pn>ws){Le=y(Le+y(l/y(m<<1>>>0))),He=y(l/y(m>>>0)),He=O?He:y(0);break e}else{Le=y(Le+y(l*y(.5))),He=y(0);break e}case 6:{He=y(l/y(go>>>0)),He=Pn>ws&O?He:y(0);break}default:He=y(0)}while(0);if(m|0)for(Tt=1040+(lr<<2)|0,Rr=976+(lr<<2)|0,Ye=0,j=0;;){e:do if(j>>>0<qs>>>0)for(Re=y(0),et=y(0),l=y(0),se=j;;){O=n[(n[Eo>>2]|0)+(se<<2)>>2]|0;do if((n[O+36>>2]|0)!=1&&(n[O+24>>2]|0)==0){if((n[O+940>>2]|0)!=(Ye|0))break e;if(Mm(O,lr)|0&&(Wt=y(h[O+908+(n[Rr>>2]<<2)>>2]),l=y(Nn(l,y(Wt+y(rn(O,lr,vr)))))),(ga(s,O)|0)!=5)break;_s=y(Ja(O)),_s=y(_s+y(K(O,0,vr))),Wt=y(h[O+912>>2]),Wt=y(y(Wt+y(rn(O,0,vr)))-_s),_s=y(Nn(et,_s)),Wt=y(Nn(Re,Wt)),Re=Wt,et=_s,l=y(Nn(l,y(_s+Wt)))}while(0);if(O=se+1|0,O>>>0<qs>>>0)se=O;else{se=O;break}}else et=y(0),l=y(0),se=j;while(0);if(at=y(He+l),c=Le,Le=y(Le+at),j>>>0<se>>>0){Ze=y(c+et),O=j;do{j=n[(n[Eo>>2]|0)+(O<<2)>>2]|0;e:do if((n[j+36>>2]|0)!=1&&(n[j+24>>2]|0)==0)switch(ga(s,j)|0){case 1:{Wt=y(c+y(K(j,lr,vr))),h[j+400+(n[Tt>>2]<<2)>>2]=Wt;break e}case 3:{Wt=y(y(Le-y(te(j,lr,vr)))-y(h[j+908+(n[Rr>>2]<<2)>>2])),h[j+400+(n[Tt>>2]<<2)>>2]=Wt;break e}case 2:{Wt=y(c+y(y(at-y(h[j+908+(n[Rr>>2]<<2)>>2]))*y(.5))),h[j+400+(n[Tt>>2]<<2)>>2]=Wt;break e}case 4:{if(Wt=y(c+y(K(j,lr,vr))),h[j+400+(n[Tt>>2]<<2)>>2]=Wt,ts(j,lr,Pn)|0||(jn?(Re=y(h[j+908>>2]),l=y(Re+y(rn(j,Pr,vr))),et=at):(et=y(h[j+912>>2]),et=y(et+y(rn(j,lr,vr))),l=at,Re=y(h[j+908>>2])),Ei(l,Re)|0&&Ei(et,y(h[j+912>>2]))|0))break e;pa(j,l,et,Bs,1,1,vr,mo,1,3501,M)|0;break e}case 5:{h[j+404>>2]=y(y(Ze-y(Ja(j)))+y(Fr(j,0,Pn)));break e}default:break e}while(0);O=O+1|0}while((O|0)!=(se|0))}if(Ye=Ye+1|0,(Ye|0)==(m|0))break;j=se}}}while(0);if(h[s+908>>2]=y(Ci(s,2,Nc,B,B)),h[s+912>>2]=y(Ci(s,0,cf,Q,B)),(Nl|0)!=0&&(uf=n[s+32>>2]|0,Af=(Nl|0)==2,!(Af&(uf|0)!=2))?Af&(uf|0)==2&&(l=y(Lc+rr),l=y(Nn(y(kg(l,y(UA(s,Pr,Tc,yo)))),Lc)),Jr=198):(l=y(Ci(s,Pr,Tc,yo,B)),Jr=198),(Jr|0)==198&&(h[s+908+(n[976+(Pr<<2)>>2]<<2)>>2]=l),(Ll|0)!=0&&(pf=n[s+32>>2]|0,hf=(Ll|0)==2,!(hf&(pf|0)!=2))?hf&(pf|0)==2&&(l=y(Hs+Pn),l=y(Nn(y(kg(l,y(UA(s,lr,y(Hs+ws),Oc)))),Hs)),Jr=204):(l=y(Ci(s,lr,y(Hs+ws),Oc,B)),Jr=204),(Jr|0)==204&&(h[s+908+(n[976+(lr<<2)>>2]<<2)>>2]=l),k){if((n[ff>>2]|0)==2){j=976+(lr<<2)|0,se=1040+(lr<<2)|0,O=0;do Ye=Ts(s,O)|0,n[Ye+24>>2]|0||(gf=n[j>>2]|0,Wt=y(h[s+908+(gf<<2)>>2]),ii=Ye+400+(n[se>>2]<<2)|0,Wt=y(Wt-y(h[ii>>2])),h[ii>>2]=y(Wt-y(h[Ye+908+(gf<<2)>>2]))),O=O+1|0;while((O|0)!=(qs|0))}if(f|0){O=jn?Nl:d;do Um(s,f,vr,O,mo,Bs,M),f=n[f+960>>2]|0;while((f|0)!=0)}if(O=(Pr|2|0)==3,j=(lr|2|0)==3,O|j){f=0;do se=n[(n[Eo>>2]|0)+(f<<2)>>2]|0,(n[se+36>>2]|0)!=1&&(O&&Ip(s,se,Pr),j&&Ip(s,se,lr)),f=f+1|0;while((f|0)!=(qs|0))}}}while(0);E=Ol}function ha(s,l){s=s|0,l=y(l);var c=0;ia(s,l>=y(0),3147),c=l==y(0),h[s+4>>2]=c?y(0):l}function xc(s,l,c,f){s=s|0,l=y(l),c=y(c),f=f|0;var d=$e,m=$e,B=0,Q=0,k=0;n[2278]=(n[2278]|0)+1,Pl(s),ts(s,2,l)|0?(d=y(Hr(n[s+992>>2]|0,l)),k=1,d=y(d+y(rn(s,2,l)))):(d=y(Hr(s+380|0,l)),d>=y(0)?k=2:(k=((Ot(l)|0)^1)&1,d=l)),ts(s,0,c)|0?(m=y(Hr(n[s+996>>2]|0,c)),Q=1,m=y(m+y(rn(s,0,l)))):(m=y(Hr(s+388|0,c)),m>=y(0)?Q=2:(Q=((Ot(c)|0)^1)&1,m=c)),B=s+976|0,pa(s,d,m,f,k,Q,l,c,1,3189,n[B>>2]|0)|0&&(Ep(s,n[s+496>>2]|0,l,c,l),bc(s,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),o[11696]|0)&&Rm(s,7)}function Pl(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;Q=E,E=E+32|0,B=Q+24|0,m=Q+16|0,f=Q+8|0,d=Q,c=0;do l=s+380+(c<<3)|0,(n[s+380+(c<<3)+4>>2]|0)!=0&&(k=l,M=n[k+4>>2]|0,O=f,n[O>>2]=n[k>>2],n[O+4>>2]=M,O=s+364+(c<<3)|0,M=n[O+4>>2]|0,k=d,n[k>>2]=n[O>>2],n[k+4>>2]=M,n[m>>2]=n[f>>2],n[m+4>>2]=n[f+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],Es(m,B)|0)||(l=s+348+(c<<3)|0),n[s+992+(c<<2)>>2]=l,c=c+1|0;while((c|0)!=2);E=Q}function ts(s,l,c){s=s|0,l=l|0,c=y(c);var f=0;switch(s=n[s+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[s+4>>2]|0){case 0:case 3:{s=0;break}case 1:{y(h[s>>2])<y(0)?s=0:f=5;break}case 2:{y(h[s>>2])<y(0)?s=0:s=(Ot(c)|0)^1;break}default:f=5}return(f|0)==5&&(s=1),s|0}function Hr(s,l){switch(s=s|0,l=y(l),n[s+4>>2]|0){case 2:{l=y(y(y(h[s>>2])*l)/y(100));break}case 1:{l=y(h[s>>2]);break}default:l=y(pe)}return y(l)}function Ep(s,l,c,f,d){s=s|0,l=l|0,c=y(c),f=y(f),d=y(d);var m=0,B=$e;l=n[s+944>>2]|0?l:1,m=ur(n[s+4>>2]|0,l)|0,l=fI(m,l)|0,c=y(_m(s,m,c)),f=y(_m(s,l,f)),B=y(c+y(K(s,m,d))),h[s+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,c=y(c+y(te(s,m,d))),h[s+400+(n[1e3+(m<<2)>>2]<<2)>>2]=c,c=y(f+y(K(s,l,d))),h[s+400+(n[1040+(l<<2)>>2]<<2)>>2]=c,d=y(f+y(te(s,l,d))),h[s+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function bc(s,l,c,f){s=s|0,l=y(l),c=y(c),f=y(f);var d=0,m=0,B=$e,Q=$e,k=0,M=0,O=$e,j=0,se=$e,Ye=$e,Le=$e,Re=$e;if(l!=y(0)&&(d=s+400|0,Re=y(h[d>>2]),m=s+404|0,Le=y(h[m>>2]),j=s+416|0,Ye=y(h[j>>2]),M=s+420|0,B=y(h[M>>2]),se=y(Re+c),O=y(Le+f),f=y(se+Ye),Q=y(O+B),k=(n[s+988>>2]|0)==1,h[d>>2]=y(Ho(Re,l,0,k)),h[m>>2]=y(Ho(Le,l,0,k)),c=y(vR(y(Ye*l),y(1))),Ei(c,y(0))|0?m=0:m=(Ei(c,y(1))|0)^1,c=y(vR(y(B*l),y(1))),Ei(c,y(0))|0?d=0:d=(Ei(c,y(1))|0)^1,Re=y(Ho(f,l,k&m,k&(m^1))),h[j>>2]=y(Re-y(Ho(se,l,0,k))),Re=y(Ho(Q,l,k&d,k&(d^1))),h[M>>2]=y(Re-y(Ho(O,l,0,k))),m=(n[s+952>>2]|0)-(n[s+948>>2]|0)>>2,m|0)){d=0;do bc(Ts(s,d)|0,l,se,O),d=d+1|0;while((d|0)!=(m|0))}}function AI(s,l,c,f,d){switch(s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,c|0){case 5:case 0:{s=r7(n[489]|0,f,d)|0;break}default:s=I3e(f,d)|0}return s|0}function dg(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;d=E,E=E+16|0,m=d,n[m>>2]=f,mg(s,0,l,c,m),E=d}function mg(s,l,c,f,d){if(s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,s=s|0?s:956,B7[n[s+8>>2]&1](s,l,c,f,d)|0,(c|0)==5)Rt();else return}function Va(s,l,c){s=s|0,l=l|0,c=c|0,o[s+l>>0]=c&1}function Nm(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(yg(s,f),kt(s,n[l>>2]|0,n[c>>2]|0,f))}function yg(s,l){s=s|0,l=l|0;var c=0;if((N(s)|0)>>>0<l>>>0&&Vr(s),l>>>0>1073741823)Rt();else{c=Gt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function kt(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(Cr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function N(s){return s=s|0,1073741823}function K(s,l,c){return s=s|0,l=l|0,c=y(c),Ae(l)|0&&(n[s+96>>2]|0)!=0?s=s+92|0:s=Sn(s+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(ze(s,c))}function te(s,l,c){return s=s|0,l=l|0,c=y(c),Ae(l)|0&&(n[s+104>>2]|0)!=0?s=s+100|0:s=Sn(s+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(ze(s,c))}function Ae(s){return s=s|0,(s|1|0)==3|0}function ze(s,l){return s=s|0,l=y(l),(n[s+4>>2]|0)==3?l=y(0):l=y(Hr(s,l)),y(l)}function gt(s,l){return s=s|0,l=l|0,s=n[s>>2]|0,((s|0)==0?(l|0)>1?l:1:s)|0}function ur(s,l){s=s|0,l=l|0;var c=0;e:do if((l|0)==2){switch(s|0){case 2:{s=3;break e}case 3:break;default:{c=4;break e}}s=2}else c=4;while(0);return s|0}function gr(s,l){s=s|0,l=l|0;var c=$e;return Ae(l)|0&&(n[s+312>>2]|0)!=0&&(c=y(h[s+308>>2]),c>=y(0))||(c=y(Nn(y(h[(Sn(s+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(c)}function hn(s,l){s=s|0,l=l|0;var c=$e;return Ae(l)|0&&(n[s+320>>2]|0)!=0&&(c=y(h[s+316>>2]),c>=y(0))||(c=y(Nn(y(h[(Sn(s+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(c)}function ri(s,l,c){s=s|0,l=l|0,c=y(c);var f=$e;return Ae(l)|0&&(n[s+240>>2]|0)!=0&&(f=y(Hr(s+236|0,c)),f>=y(0))||(f=y(Nn(y(Hr(Sn(s+204|0,n[1040+(l<<2)>>2]|0,992)|0,c)),y(0)))),y(f)}function Ni(s,l,c){s=s|0,l=l|0,c=y(c);var f=$e;return Ae(l)|0&&(n[s+248>>2]|0)!=0&&(f=y(Hr(s+244|0,c)),f>=y(0))||(f=y(Nn(y(Hr(Sn(s+204|0,n[1e3+(l<<2)>>2]|0,992)|0,c)),y(0)))),y(f)}function Eg(s,l,c,f,d,m,B){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=y(m),B=y(B);var Q=$e,k=$e,M=$e,O=$e,j=$e,se=$e,Ye=0,Le=0,Re=0;Re=E,E=E+16|0,Ye=Re,Le=s+964|0,Yn(s,(n[Le>>2]|0)!=0,3519),Q=y(gn(s,2,l)),k=y(gn(s,0,l)),M=y(rn(s,2,l)),O=y(rn(s,0,l)),Ot(l)|0?j=l:j=y(Nn(y(0),y(y(l-M)-Q))),Ot(c)|0?se=c:se=y(Nn(y(0),y(y(c-O)-k))),(f|0)==1&(d|0)==1?(h[s+908>>2]=y(Ci(s,2,y(l-M),m,m)),l=y(Ci(s,0,y(c-O),B,m))):(v7[n[Le>>2]&1](Ye,s,j,f,se,d),j=y(Q+y(h[Ye>>2])),se=y(l-M),h[s+908>>2]=y(Ci(s,2,(f|2|0)==2?j:se,m,m)),se=y(k+y(h[Ye+4>>2])),l=y(c-O),l=y(Ci(s,0,(d|2|0)==2?se:l,B,m))),h[s+912>>2]=l,E=Re}function Fv(s,l,c,f,d,m,B){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=y(m),B=y(B);var Q=$e,k=$e,M=$e,O=$e;M=y(gn(s,2,m)),Q=y(gn(s,0,m)),O=y(rn(s,2,m)),k=y(rn(s,0,m)),l=y(l-O),h[s+908>>2]=y(Ci(s,2,(f|2|0)==2?M:l,m,m)),c=y(c-k),h[s+912>>2]=y(Ci(s,0,(d|2|0)==2?Q:c,B,m))}function Rv(s,l,c,f,d,m,B){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=y(m),B=y(B);var Q=0,k=$e,M=$e;return Q=(f|0)==2,!(l<=y(0)&Q)&&!(c<=y(0)&(d|0)==2)&&!((f|0)==1&(d|0)==1)?s=0:(k=y(rn(s,0,m)),M=y(rn(s,2,m)),Q=l<y(0)&Q|(Ot(l)|0),l=y(l-M),h[s+908>>2]=y(Ci(s,2,Q?y(0):l,m,m)),l=y(c-k),Q=c<y(0)&(d|0)==2|(Ot(c)|0),h[s+912>>2]=y(Ci(s,0,Q?y(0):l,B,m)),s=1),s|0}function fI(s,l){return s=s|0,l=l|0,_A(s)|0?s=ur(2,l)|0:s=0,s|0}function Cp(s,l,c){return s=s|0,l=l|0,c=y(c),c=y(ri(s,l,c)),y(c+y(gr(s,l)))}function pI(s,l,c){return s=s|0,l=l|0,c=y(c),c=y(Ni(s,l,c)),y(c+y(hn(s,l)))}function gn(s,l,c){s=s|0,l=l|0,c=y(c);var f=$e;return f=y(Cp(s,l,c)),y(f+y(pI(s,l,c)))}function Lm(s){return s=s|0,n[s+24>>2]|0?s=0:y(rs(s))!=y(0)?s=1:s=y(Ms(s))!=y(0),s|0}function rs(s){s=s|0;var l=$e;if(n[s+944>>2]|0){if(l=y(h[s+44>>2]),Ot(l)|0)return l=y(h[s+40>>2]),s=l>y(0)&((Ot(l)|0)^1),y(s?l:y(0))}else l=y(0);return y(l)}function Ms(s){s=s|0;var l=$e,c=0,f=$e;do if(n[s+944>>2]|0){if(l=y(h[s+48>>2]),Ot(l)|0){if(c=o[(n[s+976>>2]|0)+2>>0]|0,c<<24>>24==0&&(f=y(h[s+40>>2]),f<y(0)&((Ot(f)|0)^1))){l=y(-f);break}l=c<<24>>24?y(1):y(0)}}else l=y(0);while(0);return y(l)}function Pu(s){s=s|0;var l=0,c=0;if($m(s+400|0,0,540)|0,o[s+985>>0]=1,ee(s),c=Zi(s)|0,c|0){l=s+948|0,s=0;do Pu(n[(n[l>>2]|0)+(s<<2)>>2]|0),s=s+1|0;while((s|0)!=(c|0))}}function Om(s,l,c,f,d,m,B,Q,k,M){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=y(m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=Ye;else{if((Ye|0)==1&at){h[ir>>2]=y(y(Le-Ze)/Re),n[Ir>>2]=1,O=1,se=1;break}Ge&(O|0)==1?(h[Rr>>2]=y(Re*y(j-He)),n[Jt>>2]=1,O=1,se=1):se=Ye}while(0);po=Ot(c)|0,Ye=(ga(s,l)|0)!=4,!(Ge|Tt|((f|0)!=1|po)|(Ye|(se|0)==1))&&(h[Rr>>2]=c,n[Jt>>2]=1,!et)&&(h[ir>>2]=y(y(c-Ze)/Re),n[Ir>>2]=1,O=1),!(Qr|at|((Q|0)!=1|(Ot(d)|0))|(Ye|(O|0)==1))&&(h[ir>>2]=d,n[Ir>>2]=1,!et)&&(h[Rr>>2]=y(Re*y(d-He)),n[Jt>>2]=1),pr(l,2,m,m,Jt,Rr),pr(l,0,B,m,Ir,ir),c=y(h[Rr>>2]),d=y(h[ir>>2]),pa(l,c,d,k,n[Jt>>2]|0,n[Ir>>2]|0,m,B,0,3565,M)|0,B=y(h[l+908+(n[976+(rr<<2)>>2]<<2)>>2]),h[l+504>>2]=y(Nn(B,y(gn(l,rr,m))))}while(0);n[l+500>>2]=n[2278],E=Bn}function Ci(s,l,c,f,d){return s=s|0,l=l|0,c=y(c),f=y(f),d=y(d),f=y(UA(s,l,c,f)),y(Nn(f,y(gn(s,l,d))))}function ga(s,l){return s=s|0,l=l|0,l=l+20|0,l=n[((n[l>>2]|0)==0?s+16|0:l)>>2]|0,(l|0)==5&&_A(n[s+4>>2]|0)|0&&(l=1),l|0}function xl(s,l){return s=s|0,l=l|0,Ae(l)|0&&(n[s+96>>2]|0)!=0?l=4:l=n[1040+(l<<2)>>2]|0,s+60+(l<<3)|0}function Qc(s,l){return s=s|0,l=l|0,Ae(l)|0&&(n[s+104>>2]|0)!=0?l=5:l=n[1e3+(l<<2)>>2]|0,s+60+(l<<3)|0}function pr(s,l,c,f,d,m){switch(s=s|0,l=l|0,c=y(c),f=y(f),d=d|0,m=m|0,c=y(Hr(s+380+(n[976+(l<<2)>>2]<<3)|0,c)),c=y(c+y(rn(s,l,f))),n[d>>2]|0){case 2:case 1:{d=Ot(c)|0,f=y(h[m>>2]),h[m>>2]=d|f<c?f:c;break}case 0:{Ot(c)|0||(n[d>>2]=2,h[m>>2]=c);break}default:}}function Ai(s,l){return s=s|0,l=l|0,s=s+132|0,Ae(l)|0&&(n[(Sn(s,4,948)|0)+4>>2]|0)!=0?s=1:s=(n[(Sn(s,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,s|0}function Fr(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0;return s=s+132|0,Ae(l)|0&&(f=Sn(s,4,948)|0,(n[f+4>>2]|0)!=0)?d=4:(f=Sn(s,n[1040+(l<<2)>>2]|0,948)|0,n[f+4>>2]|0?d=4:c=y(0)),(d|0)==4&&(c=y(Hr(f,c))),y(c)}function ns(s,l,c){s=s|0,l=l|0,c=y(c);var f=$e;return f=y(h[s+908+(n[976+(l<<2)>>2]<<2)>>2]),f=y(f+y(K(s,l,c))),y(f+y(te(s,l,c)))}function Gi(s){s=s|0;var l=0,c=0,f=0;e:do if(_A(n[s+4>>2]|0)|0)l=0;else if((n[s+16>>2]|0)!=5)if(c=Zi(s)|0,!c)l=0;else for(l=0;;){if(f=Ts(s,l)|0,(n[f+24>>2]|0)==0&&(n[f+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=c>>>0){l=0;break}}else l=1;while(0);return l|0}function Mm(s,l){s=s|0,l=l|0;var c=$e;return c=y(h[s+908+(n[976+(l<<2)>>2]<<2)>>2]),c>=y(0)&((Ot(c)|0)^1)|0}function Ja(s){s=s|0;var l=$e,c=0,f=0,d=0,m=0,B=0,Q=0,k=$e;if(c=n[s+968>>2]|0,c)k=y(h[s+908>>2]),l=y(h[s+912>>2]),l=y(E7[c&0](s,k,l)),Yn(s,(Ot(l)|0)^1,3573);else{m=Zi(s)|0;do if(m|0){for(c=0,d=0;;){if(f=Ts(s,d)|0,n[f+940>>2]|0){B=8;break}if((n[f+24>>2]|0)!=1)if(Q=(ga(s,f)|0)==5,Q){c=f;break}else c=(c|0)==0?f:c;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!c)break;return l=y(Ja(c)),y(l+y(h[c+404>>2]))}while(0);l=y(h[s+912>>2])}return y(l)}function UA(s,l,c,f){s=s|0,l=l|0,c=y(c),f=y(f);var d=$e,m=0;return _A(l)|0?(l=1,m=3):Ae(l)|0?(l=0,m=3):(f=y(pe),d=y(pe)),(m|0)==3&&(d=y(Hr(s+364+(l<<3)|0,f)),f=y(Hr(s+380+(l<<3)|0,f))),m=f<c&(f>=y(0)&((Ot(f)|0)^1)),c=m?f:c,m=d>=y(0)&((Ot(d)|0)^1)&c<d,y(m?d:c)}function Um(s,l,c,f,d,m,B){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=m|0,B=B|0;var Q=$e,k=$e,M=0,O=0,j=$e,se=$e,Ye=$e,Le=0,Re=0,et=0,Ze=0,at=$e,He=0;et=ur(n[s+4>>2]|0,m)|0,Le=fI(et,m)|0,Re=Ae(et)|0,j=y(rn(l,2,c)),se=y(rn(l,0,c)),ts(l,2,c)|0?Q=y(j+y(Hr(n[l+992>>2]|0,c))):Ai(l,2)|0&&nr(l,2)|0?(Q=y(h[s+908>>2]),k=y(gr(s,2)),k=y(Q-y(k+y(hn(s,2)))),Q=y(Fr(l,2,c)),Q=y(Ci(l,2,y(k-y(Q+y(xu(l,2,c)))),c,c))):Q=y(pe),ts(l,0,d)|0?k=y(se+y(Hr(n[l+996>>2]|0,d))):Ai(l,0)|0&&nr(l,0)|0?(k=y(h[s+912>>2]),at=y(gr(s,0)),at=y(k-y(at+y(hn(s,0)))),k=y(Fr(l,0,d)),k=y(Ci(l,0,y(at-y(k+y(xu(l,0,d)))),d,c))):k=y(pe),M=Ot(Q)|0,O=Ot(k)|0;do if(M^O&&(Ye=y(h[l+396>>2]),!(Ot(Ye)|0)))if(M){Q=y(j+y(y(k-se)*Ye));break}else{at=y(se+y(y(Q-j)/Ye)),k=O?at:k;break}while(0);O=Ot(Q)|0,M=Ot(k)|0,O|M&&(He=(O^1)&1,f=c>y(0)&((f|0)!=0&O),Q=Re?Q:f?c:Q,pa(l,Q,k,m,Re?He:f?2:He,O&(M^1)&1,Q,k,0,3623,B)|0,Q=y(h[l+908>>2]),Q=y(Q+y(rn(l,2,c))),k=y(h[l+912>>2]),k=y(k+y(rn(l,0,c)))),pa(l,Q,k,m,1,1,Q,k,1,3635,B)|0,nr(l,et)|0&&!(Ai(l,et)|0)?(He=n[976+(et<<2)>>2]|0,at=y(h[s+908+(He<<2)>>2]),at=y(at-y(h[l+908+(He<<2)>>2])),at=y(at-y(hn(s,et))),at=y(at-y(te(l,et,c))),at=y(at-y(xu(l,et,Re?c:d))),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=at):Ze=21;do if((Ze|0)==21){if(!(Ai(l,et)|0)&&(n[s+8>>2]|0)==1){He=n[976+(et<<2)>>2]|0,at=y(h[s+908+(He<<2)>>2]),at=y(y(at-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=at;break}!(Ai(l,et)|0)&&(n[s+8>>2]|0)==2&&(He=n[976+(et<<2)>>2]|0,at=y(h[s+908+(He<<2)>>2]),at=y(at-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=at)}while(0);nr(l,Le)|0&&!(Ai(l,Le)|0)?(He=n[976+(Le<<2)>>2]|0,at=y(h[s+908+(He<<2)>>2]),at=y(at-y(h[l+908+(He<<2)>>2])),at=y(at-y(hn(s,Le))),at=y(at-y(te(l,Le,c))),at=y(at-y(xu(l,Le,Re?d:c))),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=at):Ze=30;do if((Ze|0)==30&&!(Ai(l,Le)|0)){if((ga(s,l)|0)==2){He=n[976+(Le<<2)>>2]|0,at=y(h[s+908+(He<<2)>>2]),at=y(y(at-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=at;break}He=(ga(s,l)|0)==3,He^(n[s+28>>2]|0)==2&&(He=n[976+(Le<<2)>>2]|0,at=y(h[s+908+(He<<2)>>2]),at=y(at-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=at)}while(0)}function Ip(s,l,c){s=s|0,l=l|0,c=c|0;var f=$e,d=0;d=n[976+(c<<2)>>2]|0,f=y(h[l+908+(d<<2)>>2]),f=y(y(h[s+908+(d<<2)>>2])-f),f=y(f-y(h[l+400+(n[1040+(c<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(c<<2)>>2]<<2)>>2]=f}function _A(s){return s=s|0,(s|1|0)==1|0}function hI(s){s=s|0;var l=$e;switch(n[s+56>>2]|0){case 0:case 3:{l=y(h[s+40>>2]),l>y(0)&((Ot(l)|0)^1)?s=o[(n[s+976>>2]|0)+2>>0]|0?1056:992:s=1056;break}default:s=s+52|0}return s|0}function gI(s,l){return s=s|0,l=l|0,(o[s+l>>0]|0)!=0|0}function nr(s,l){return s=s|0,l=l|0,s=s+132|0,Ae(l)|0&&(n[(Sn(s,5,948)|0)+4>>2]|0)!=0?s=1:s=(n[(Sn(s,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,s|0}function xu(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0;return s=s+132|0,Ae(l)|0&&(f=Sn(s,5,948)|0,(n[f+4>>2]|0)!=0)?d=4:(f=Sn(s,n[1e3+(l<<2)>>2]|0,948)|0,n[f+4>>2]|0?d=4:c=y(0)),(d|0)==4&&(c=y(Hr(f,c))),y(c)}function _m(s,l,c){return s=s|0,l=l|0,c=y(c),Ai(s,l)|0?c=y(Fr(s,l,c)):c=y(-y(xu(s,l,c))),y(c)}function bu(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function wp(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+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]|0,c|0,f|0)|0,n[m>>2]=(n[m>>2]|0)+(f>>>2<<2)),B=n[s>>2]|0,n[s>>2]=n[Q>>2],n[Q>>2]=B,B=n[d>>2]|0,n[d>>2]=n[m>>2],n[m>>2]=B,B=s+8|0,c=l+12|0,s=n[B>>2]|0,n[B>>2]=n[c>>2],n[c>>2]=s,n[l>>2]=n[Q>>2],k|0}function dI(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;if(B=n[l>>2]|0,m=n[c>>2]|0,(B|0)!=(m|0)){d=s+8|0,c=((m+-4-B|0)>>>2)+1|0,s=B,f=n[d>>2]|0;do n[f>>2]=n[s>>2],f=(n[d>>2]|0)+4|0,n[d>>2]=f,s=s+4|0;while((s|0)!=(m|0));n[l>>2]=B+(c<<2)}}function Hm(){Cc()}function da(){var s=0;return s=Gt(4)|0,jA(s),s|0}function jA(s){s=s|0,n[s>>2]=$i()|0}function kc(s){s=s|0,s|0&&(wg(s),pt(s))}function wg(s){s=s|0,mi(n[s>>2]|0)}function qm(s,l,c){s=s|0,l=l|0,c=c|0,Va(n[s>>2]|0,l,c)}function uo(s,l){s=s|0,l=y(l),ha(n[s>>2]|0,l)}function Tv(s,l){return s=s|0,l=l|0,gI(n[s>>2]|0,l)|0}function mI(){var s=0;return s=Gt(8)|0,Nv(s,0),s|0}function Nv(s,l){s=s|0,l=l|0,l?l=di(n[l>>2]|0)|0:l=oo()|0,n[s>>2]=l,n[s+4>>2]=0,_r(l,s)}function aF(s){s=s|0;var l=0;return l=Gt(8)|0,Nv(l,s),l|0}function Lv(s){s=s|0,s|0&&(Qu(s),pt(s))}function Qu(s){s=s|0;var l=0;oa(n[s>>2]|0),l=s+4|0,s=n[l>>2]|0,n[l>>2]=0,s|0&&(GA(s),pt(s))}function GA(s){s=s|0,WA(s)}function WA(s){s=s|0,s=n[s>>2]|0,s|0&&QA(s|0)}function yI(s){return s=s|0,ei(s)|0}function jm(s){s=s|0;var l=0,c=0;c=s+4|0,l=n[c>>2]|0,n[c>>2]=0,l|0&&(GA(l),pt(l)),ao(n[s>>2]|0)}function lF(s,l){s=s|0,l=l|0,tr(n[s>>2]|0,n[l>>2]|0)}function cF(s,l){s=s|0,l=l|0,ua(n[s>>2]|0,l)}function Ov(s,l,c){s=s|0,l=l|0,c=+c,wu(n[s>>2]|0,l,y(c))}function Mv(s,l,c){s=s|0,l=l|0,c=+c,ms(n[s>>2]|0,l,y(c))}function EI(s,l){s=s|0,l=l|0,yi(n[s>>2]|0,l)}function ku(s,l){s=s|0,l=l|0,Ga(n[s>>2]|0,l)}function uF(s,l){s=s|0,l=l|0,RA(n[s>>2]|0,l)}function AF(s,l){s=s|0,l=l|0,Ti(n[s>>2]|0,l)}function Bp(s,l){s=s|0,l=l|0,wc(n[s>>2]|0,l)}function fF(s,l){s=s|0,l=l|0,ja(n[s>>2]|0,l)}function Uv(s,l,c){s=s|0,l=l|0,c=+c,vc(n[s>>2]|0,l,y(c))}function YA(s,l,c){s=s|0,l=l|0,c=+c,G(n[s>>2]|0,l,y(c))}function pF(s,l){s=s|0,l=l|0,Dl(n[s>>2]|0,l)}function hF(s,l){s=s|0,l=l|0,ig(n[s>>2]|0,l)}function _v(s,l){s=s|0,l=l|0,fp(n[s>>2]|0,l)}function CI(s,l){s=s|0,l=+l,TA(n[s>>2]|0,y(l))}function II(s,l){s=s|0,l=+l,Wa(n[s>>2]|0,y(l))}function gF(s,l){s=s|0,l=+l,ji(n[s>>2]|0,y(l))}function dF(s,l){s=s|0,l=+l,Os(n[s>>2]|0,y(l))}function bl(s,l){s=s|0,l=+l,Iu(n[s>>2]|0,y(l))}function wI(s,l){s=s|0,l=+l,cI(n[s>>2]|0,y(l))}function mF(s,l){s=s|0,l=+l,NA(n[s>>2]|0,y(l))}function KA(s){s=s|0,pp(n[s>>2]|0)}function Gm(s,l){s=s|0,l=+l,ys(n[s>>2]|0,y(l))}function Fu(s,l){s=s|0,l=+l,ag(n[s>>2]|0,y(l))}function BI(s){s=s|0,lg(n[s>>2]|0)}function vI(s,l){s=s|0,l=+l,hp(n[s>>2]|0,y(l))}function yF(s,l){s=s|0,l=+l,Sc(n[s>>2]|0,y(l))}function Hv(s,l){s=s|0,l=+l,Qm(n[s>>2]|0,y(l))}function VA(s,l){s=s|0,l=+l,ug(n[s>>2]|0,y(l))}function qv(s,l){s=s|0,l=+l,vu(n[s>>2]|0,y(l))}function Wm(s,l){s=s|0,l=+l,km(n[s>>2]|0,y(l))}function jv(s,l){s=s|0,l=+l,Du(n[s>>2]|0,y(l))}function Gv(s,l){s=s|0,l=+l,uI(n[s>>2]|0,y(l))}function Ym(s,l){s=s|0,l=+l,fa(n[s>>2]|0,y(l))}function Wv(s,l,c){s=s|0,l=l|0,c=+c,Bu(n[s>>2]|0,l,y(c))}function EF(s,l,c){s=s|0,l=l|0,c=+c,Si(n[s>>2]|0,l,y(c))}function S(s,l,c){s=s|0,l=l|0,c=+c,Dc(n[s>>2]|0,l,y(c))}function D(s){return s=s|0,ng(n[s>>2]|0)|0}function T(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=E,E=E+16|0,d=f,Bc(d,n[l>>2]|0,c),q(s,d),E=f}function q(s,l){s=s|0,l=l|0,W(s,n[l+4>>2]|0,+y(h[l>>2]))}function W(s,l,c){s=s|0,l=l|0,c=+c,n[s>>2]=l,C[s+8>>3]=c}function ce(s){return s=s|0,ca(n[s>>2]|0)|0}function Se(s){return s=s|0,lo(n[s>>2]|0)|0}function It(s){return s=s|0,Ic(n[s>>2]|0)|0}function Et(s){return s=s|0,Kn(n[s>>2]|0)|0}function bt(s){return s=s|0,bm(n[s>>2]|0)|0}function Nr(s){return s=s|0,la(n[s>>2]|0)|0}function is(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=E,E=E+16|0,d=f,Dt(d,n[l>>2]|0,c),q(s,d),E=f}function fi(s){return s=s|0,Vn(n[s>>2]|0)|0}function Ao(s){return s=s|0,sg(n[s>>2]|0)|0}function JA(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,Aa(f,n[l>>2]|0),q(s,f),E=c}function qo(s){return s=s|0,+ +y(Zr(n[s>>2]|0))}function rt(s){return s=s|0,+ +y(Tn(n[s>>2]|0))}function Je(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,yr(f,n[l>>2]|0),q(s,f),E=c}function ft(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,cg(f,n[l>>2]|0),q(s,f),E=c}function jt(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,mt(f,n[l>>2]|0),q(s,f),E=c}function Er(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,Ag(f,n[l>>2]|0),q(s,f),E=c}function In(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,fg(f,n[l>>2]|0),q(s,f),E=c}function Sr(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,Fm(f,n[l>>2]|0),q(s,f),E=c}function wn(s){return s=s|0,+ +y(Pc(n[s>>2]|0))}function ni(s,l){return s=s|0,l=l|0,+ +y(og(n[s>>2]|0,l))}function Xr(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=E,E=E+16|0,d=f,lt(d,n[l>>2]|0,c),q(s,d),E=f}function fo(s,l,c){s=s|0,l=l|0,c=c|0,aa(n[s>>2]|0,n[l>>2]|0,c)}function CF(s,l){s=s|0,l=l|0,Ls(n[s>>2]|0,n[l>>2]|0)}function Dve(s){return s=s|0,Zi(n[s>>2]|0)|0}function Sve(s){return s=s|0,s=xe(n[s>>2]|0)|0,s?s=yI(s)|0:s=0,s|0}function Pve(s,l){return s=s|0,l=l|0,s=Ts(n[s>>2]|0,l)|0,s?s=yI(s)|0:s=0,s|0}function xve(s,l){s=s|0,l=l|0;var c=0,f=0;f=Gt(4)|0,VG(f,l),c=s+4|0,l=n[c>>2]|0,n[c>>2]=f,l|0&&(GA(l),pt(l)),qa(n[s>>2]|0,1)}function VG(s,l){s=s|0,l=l|0,_ve(s,l)}function bve(s,l,c,f,d,m){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=m|0;var B=0,Q=0;B=E,E=E+16|0,Q=B,Qve(Q,ei(l)|0,+c,f,+d,m),h[s>>2]=y(+C[Q>>3]),h[s+4>>2]=y(+C[Q+8>>3]),E=B}function Qve(s,l,c,f,d,m){s=s|0,l=l|0,c=+c,f=f|0,d=+d,m=m|0;var B=0,Q=0,k=0,M=0,O=0;B=E,E=E+32|0,O=B+8|0,M=B+20|0,k=B,Q=B+16|0,C[O>>3]=c,n[M>>2]=f,C[k>>3]=d,n[Q>>2]=m,kve(s,n[l+4>>2]|0,O,M,k,Q),E=B}function kve(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0;B=E,E=E+16|0,Q=B,Xa(Q),l=ma(l)|0,Fve(s,l,+C[c>>3],n[f>>2]|0,+C[d>>3],n[m>>2]|0),Za(Q),E=B}function ma(s){return s=s|0,n[s>>2]|0}function Fve(s,l,c,f,d,m){s=s|0,l=l|0,c=+c,f=f|0,d=+d,m=m|0;var B=0;B=Ql(Rve()|0)|0,c=+zA(c),f=IF(f)|0,d=+zA(d),Tve(s,ui(0,B|0,l|0,+c,f|0,+d,IF(m)|0)|0)}function Rve(){var s=0;return o[7608]|0||(Mve(9120),s=7608,n[s>>2]=1,n[s+4>>2]=0),9120}function Ql(s){return s=s|0,n[s+8>>2]|0}function zA(s){return s=+s,+ +wF(s)}function IF(s){return s=s|0,zG(s)|0}function Tve(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=E,E=E+32|0,c=d,f=l,f&1?(Nve(c,0),$n(f|0,c|0)|0,Lve(s,c),Ove(c)):(n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2]),E=d}function Nve(s,l){s=s|0,l=l|0,JG(s,l),n[s+8>>2]=0,o[s+24>>0]=0}function Lve(s,l){s=s|0,l=l|0,l=l+8|0,n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2]}function Ove(s){s=s|0,o[s+24>>0]=0}function JG(s,l){s=s|0,l=l|0,n[s>>2]=l}function zG(s){return s=s|0,s|0}function wF(s){return s=+s,+s}function Mve(s){s=s|0,kl(s,Uve()|0,4)}function Uve(){return 1064}function kl(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=Ap(l|0,c+1|0)|0}function _ve(s,l){s=s|0,l=l|0,l=n[l>>2]|0,n[s>>2]=l,Il(l|0)}function Hve(s){s=s|0;var l=0,c=0;c=s+4|0,l=n[c>>2]|0,n[c>>2]=0,l|0&&(GA(l),pt(l)),qa(n[s>>2]|0,0)}function qve(s){s=s|0,Ve(n[s>>2]|0)}function jve(s){return s=s|0,vt(n[s>>2]|0)|0}function Gve(s,l,c,f){s=s|0,l=+l,c=+c,f=f|0,xc(n[s>>2]|0,y(l),y(c),f)}function Wve(s){return s=s|0,+ +y(Sl(n[s>>2]|0))}function Yve(s){return s=s|0,+ +y(pg(n[s>>2]|0))}function Kve(s){return s=s|0,+ +y(Su(n[s>>2]|0))}function Vve(s){return s=s|0,+ +y(LA(n[s>>2]|0))}function Jve(s){return s=s|0,+ +y(gp(n[s>>2]|0))}function zve(s){return s=s|0,+ +y(Ya(n[s>>2]|0))}function Xve(s,l){s=s|0,l=l|0,C[s>>3]=+y(Sl(n[l>>2]|0)),C[s+8>>3]=+y(pg(n[l>>2]|0)),C[s+16>>3]=+y(Su(n[l>>2]|0)),C[s+24>>3]=+y(LA(n[l>>2]|0)),C[s+32>>3]=+y(gp(n[l>>2]|0)),C[s+40>>3]=+y(Ya(n[l>>2]|0))}function Zve(s,l){return s=s|0,l=l|0,+ +y(hg(n[s>>2]|0,l))}function $ve(s,l){return s=s|0,l=l|0,+ +y(dp(n[s>>2]|0,l))}function eDe(s,l){return s=s|0,l=l|0,+ +y(_o(n[s>>2]|0,l))}function tDe(){return qn()|0}function rDe(){nDe(),iDe(),sDe(),oDe(),aDe(),lDe()}function nDe(){aLe(11713,4938,1)}function iDe(){SNe(10448)}function sDe(){aNe(10408)}function oDe(){QTe(10324)}function aDe(){MFe(10096)}function lDe(){cDe(9132)}function cDe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0,Ye=0,Le=0,Re=0,et=0,Ze=0,at=0,He=0,Ge=0,Tt=0,Rr=0,ir=0,Jt=0,Ir=0,Qr=0,rr=0,Bn=0,po=0,ho=0,go=0,Ea=0,Fp=0,Rp=0,Fl=0,Tp=0,Lu=0,Ou=0,Np=0,Lp=0,Op=0,Jr=0,Rl=0,Mp=0,Rc=0,Up=0,_p=0,Mu=0,Uu=0,Tc=0,Us=0,el=0,jo=0,Tl=0,sf=0,of=0,_u=0,af=0,lf=0,_s=0,ws=0,Nl=0,Pn=0,cf=0,mo=0,Nc=0,yo=0,Lc=0,uf=0,Af=0,Oc=0,Hs=0,Ll=0,ff=0,pf=0,hf=0,vr=0,jn=0,Bs=0,Eo=0,qs=0,Pr=0,lr=0,Ol=0;l=E,E=E+672|0,c=l+656|0,Ol=l+648|0,lr=l+640|0,Pr=l+632|0,qs=l+624|0,Eo=l+616|0,Bs=l+608|0,jn=l+600|0,vr=l+592|0,hf=l+584|0,pf=l+576|0,ff=l+568|0,Ll=l+560|0,Hs=l+552|0,Oc=l+544|0,Af=l+536|0,uf=l+528|0,Lc=l+520|0,yo=l+512|0,Nc=l+504|0,mo=l+496|0,cf=l+488|0,Pn=l+480|0,Nl=l+472|0,ws=l+464|0,_s=l+456|0,lf=l+448|0,af=l+440|0,_u=l+432|0,of=l+424|0,sf=l+416|0,Tl=l+408|0,jo=l+400|0,el=l+392|0,Us=l+384|0,Tc=l+376|0,Uu=l+368|0,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+4>>2],ZA(s,4701,c)|0,n[k>>2]=8,n[k+4>>2]=0,n[c>>2]=n[k>>2],n[c+4>>2]=n[k+4>>2],ZA(s,4719,c)|0,n[Q>>2]=9,n[Q+4>>2]=0,n[c>>2]=n[Q>>2],n[c+4>>2]=n[Q+4>>2],ZA(s,4736,c)|0,n[B>>2]=21,n[B+4>>2]=0,n[c>>2]=n[B>>2],n[c+4>>2]=n[B+4>>2],BDe(s,4754,c)|0,n[m>>2]=2,n[m+4>>2]=0,n[c>>2]=n[m>>2],n[c+4>>2]=n[m+4>>2],Yv(s,4772,c)|0,n[d>>2]=3,n[d+4>>2]=0,n[c>>2]=n[d>>2],n[c+4>>2]=n[d+4>>2],Yv(s,4790,c)|0,n[f>>2]=4,n[f+4>>2]=0,n[c>>2]=n[f>>2],n[c+4>>2]=n[f+4>>2],Yv(s,4808,c)|0,E=l}function uDe(s,l){s=s|0,l=l|0;var c=0;c=bFe()|0,n[s>>2]=c,QFe(c,l),bp(n[s>>2]|0)}function ADe(s,l,c){return s=s|0,l=l|0,c=c|0,gFe(s,cn(l)|0,c,0),s|0}function fDe(s,l,c){return s=s|0,l=l|0,c=c|0,$ke(s,cn(l)|0,c,0),s|0}function pDe(s,l,c){return s=s|0,l=l|0,c=c|0,Uke(s,cn(l)|0,c,0),s|0}function DI(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Bke(s,l,d),E=f,s|0}function hDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ike(s,l,d),E=f,s|0}function Ru(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],qQe(s,l,d),E=f,s|0}function Bg(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],SQe(s,l,d),E=f,s|0}function Cs(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uQe(s,l,d),E=f,s|0}function XA(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Vbe(s,l,d),E=f,s|0}function BF(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Fbe(s,l,d),E=f,s|0}function vg(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ibe(s,l,d),E=f,s|0}function ZA(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],qxe(s,l,d),E=f,s|0}function Yv(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Sxe(s,l,d),E=f,s|0}function gDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uxe(s,l,d),E=f,s|0}function dDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],VPe(s,l,d),E=f,s|0}function mDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RPe(s,l,d),E=f,s|0}function yDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],yPe(s,l,d),E=f,s|0}function EDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tPe(s,l,d),E=f,s|0}function CDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],MSe(s,l,d),E=f,s|0}function IDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wSe(s,l,d),E=f,s|0}function wDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],iSe(s,l,d),E=f,s|0}function BDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vDe(s,l,d),E=f,s|0}function vDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],DDe(s,c,d,1),E=f}function cn(s){return s=s|0,s|0}function DDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=vF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=SDe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,PDe(m,f)|0,f),E=d}function vF(){var s=0,l=0;if(o[7616]|0||($G(9136),Zt(24,9136,_|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(br(9136)|0)){s=9136,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));$G(9136)}return 9136}function SDe(s){return s=s|0,0}function PDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=vF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],ZG(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(QDe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function un(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,j=0,se=0,Ye=0;B=E,E=E+32|0,se=B+24|0,j=B+20|0,k=B+16|0,O=B+12|0,M=B+8|0,Q=B+4|0,Ye=B,n[j>>2]=l,n[k>>2]=c,n[O>>2]=f,n[M>>2]=d,n[Q>>2]=m,m=s+28|0,n[Ye>>2]=n[m>>2],n[se>>2]=n[Ye>>2],xDe(s+24|0,se,j,O,M,k,Q)|0,n[m>>2]=n[n[m>>2]>>2],E=B}function xDe(s,l,c,f,d,m,B){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,s=bDe(l)|0,l=Gt(24)|0,XG(l+4|0,n[c>>2]|0,n[f>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[s>>2],n[s>>2]=l,l|0}function bDe(s){return s=s|0,n[s>>2]|0}function XG(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=f,n[s+12>>2]=d,n[s+16>>2]=m}function Ar(s,l){return s=s|0,l=l|0,l|s|0}function ZG(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function QDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=kDe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,FDe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],ZG(m,f,c),n[k>>2]=(n[k>>2]|0)+12,RDe(s,Q),TDe(Q),E=M;return}}function kDe(s){return s=s|0,357913941}function FDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function RDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function TDe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function $G(s){s=s|0,ODe(s)}function NDe(s){s=s|0,LDe(s+24|0)}function br(s){return s=s|0,n[s>>2]|0}function LDe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function ODe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,3,l,MDe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Gr(){return 9228}function MDe(){return 1140}function UDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=_De(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=HDe(l,f)|0,E=c,l|0}function Wr(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=f,n[s+12>>2]=d,n[s+16>>2]=m}function _De(s){return s=s|0,(n[(vF()|0)+24>>2]|0)+(s*12|0)|0}function HDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;return d=E,E=E+48|0,f=d,c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),nf[c&31](f,s),f=qDe(f)|0,E=d,f|0}function qDe(s){s=s|0;var l=0,c=0,f=0,d=0;return d=E,E=E+32|0,l=d+12|0,c=d,f=DF(e9()|0)|0,f?(SF(l,f),PF(c,l),jDe(s,c),s=xF(l)|0):s=GDe(s)|0,E=d,s|0}function e9(){var s=0;return o[7632]|0||(eSe(9184),Zt(25,9184,_|0)|0,s=7632,n[s>>2]=1,n[s+4>>2]=0),9184}function DF(s){return s=s|0,n[s+36>>2]|0}function SF(s,l){s=s|0,l=l|0,n[s>>2]=l,n[s+4>>2]=s,n[s+8>>2]=0}function PF(s,l){s=s|0,l=l|0,n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=0}function jDe(s,l){s=s|0,l=l|0,VDe(l,s,s+8|0,s+16|0,s+24|0,s+32|0,s+40|0)|0}function xF(s){return s=s|0,n[(n[s+4>>2]|0)+8>>2]|0}function GDe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0;k=E,E=E+16|0,c=k+4|0,f=k,d=za(8)|0,m=d,B=Gt(48)|0,Q=B,l=Q+48|0;do n[Q>>2]=n[s>>2],Q=Q+4|0,s=s+4|0;while((Q|0)<(l|0));return l=m+4|0,n[l>>2]=B,Q=Gt(8)|0,B=n[l>>2]|0,n[f>>2]=0,n[c>>2]=n[f>>2],t9(Q,B,c),n[d>>2]=Q,E=k,m|0}function t9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Gt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1092,n[c+12>>2]=l,n[s+4>>2]=c}function WDe(s){s=s|0,Zm(s),pt(s)}function YDe(s){s=s|0,s=n[s+12>>2]|0,s|0&&pt(s)}function KDe(s){s=s|0,pt(s)}function VDe(s,l,c,f,d,m,B){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,m=JDe(n[s>>2]|0,l,c,f,d,m,B)|0,B=s+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function JDe(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0;var Q=0,k=0;return Q=E,E=E+16|0,k=Q,Xa(k),s=ma(s)|0,B=zDe(s,+C[l>>3],+C[c>>3],+C[f>>3],+C[d>>3],+C[m>>3],+C[B>>3])|0,Za(k),E=Q,B|0}function zDe(s,l,c,f,d,m,B){s=s|0,l=+l,c=+c,f=+f,d=+d,m=+m,B=+B;var Q=0;return Q=Ql(XDe()|0)|0,l=+zA(l),c=+zA(c),f=+zA(f),d=+zA(d),m=+zA(m),Fs(0,Q|0,s|0,+l,+c,+f,+d,+m,+ +zA(B))|0}function XDe(){var s=0;return o[7624]|0||(ZDe(9172),s=7624,n[s>>2]=1,n[s+4>>2]=0),9172}function ZDe(s){s=s|0,kl(s,$De()|0,6)}function $De(){return 1112}function eSe(s){s=s|0,vp(s)}function tSe(s){s=s|0,r9(s+24|0),n9(s+16|0)}function r9(s){s=s|0,nSe(s)}function n9(s){s=s|0,rSe(s)}function rSe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,pt(c);while((l|0)!=0);n[s>>2]=0}function nSe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,pt(c);while((l|0)!=0);n[s>>2]=0}function vp(s){s=s|0;var l=0;n[s+16>>2]=0,n[s+20>>2]=0,l=s+24|0,n[l>>2]=0,n[s+28>>2]=l,n[s+36>>2]=0,o[s+40>>0]=0,o[s+41>>0]=0}function iSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],sSe(s,c,d,0),E=f}function sSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=bF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=oSe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,aSe(m,f)|0,f),E=d}function bF(){var s=0,l=0;if(o[7640]|0||(s9(9232),Zt(26,9232,_|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(br(9232)|0)){s=9232,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));s9(9232)}return 9232}function oSe(s){return s=s|0,0}function aSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=bF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],i9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(lSe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function i9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function lSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=cSe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,uSe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],i9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,ASe(s,Q),fSe(Q),E=M;return}}function cSe(s){return s=s|0,357913941}function uSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function ASe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function fSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function s9(s){s=s|0,gSe(s)}function pSe(s){s=s|0,hSe(s+24|0)}function hSe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function gSe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,1,l,dSe()|0,3),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function dSe(){return 1144}function mSe(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0;var m=0,B=0,Q=0,k=0;m=E,E=E+16|0,B=m+8|0,Q=m,k=ySe(s)|0,s=n[k+4>>2]|0,n[Q>>2]=n[k>>2],n[Q+4>>2]=s,n[B>>2]=n[Q>>2],n[B+4>>2]=n[Q+4>>2],ESe(l,B,c,f,d),E=m}function ySe(s){return s=s|0,(n[(bF()|0)+24>>2]|0)+(s*12|0)|0}function ESe(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0;var m=0,B=0,Q=0,k=0,M=0;M=E,E=E+16|0,B=M+2|0,Q=M+1|0,k=M,m=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(m=n[(n[s>>2]|0)+m>>2]|0),Tu(B,c),c=+Nu(B,c),Tu(Q,f),f=+Nu(Q,f),$A(k,d),k=ef(k,d)|0,C7[m&1](s,c,f,k),E=M}function Tu(s,l){s=s|0,l=+l}function Nu(s,l){return s=s|0,l=+l,+ +ISe(l)}function $A(s,l){s=s|0,l=l|0}function ef(s,l){return s=s|0,l=l|0,CSe(l)|0}function CSe(s){return s=s|0,s|0}function ISe(s){return s=+s,+s}function wSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],BSe(s,c,d,1),E=f}function BSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=QF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=vSe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,DSe(m,f)|0,f),E=d}function QF(){var s=0,l=0;if(o[7648]|0||(a9(9268),Zt(27,9268,_|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(br(9268)|0)){s=9268,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));a9(9268)}return 9268}function vSe(s){return s=s|0,0}function DSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=QF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],o9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(SSe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function o9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function SSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=PSe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,xSe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],o9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,bSe(s,Q),QSe(Q),E=M;return}}function PSe(s){return s=s|0,357913941}function xSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function bSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function QSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function a9(s){s=s|0,RSe(s)}function kSe(s){s=s|0,FSe(s+24|0)}function FSe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function RSe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,4,l,TSe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function TSe(){return 1160}function NSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=LSe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=OSe(l,f)|0,E=c,l|0}function LSe(s){return s=s|0,(n[(QF()|0)+24>>2]|0)+(s*12|0)|0}function OSe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),l9(Rg[c&31](s)|0)|0}function l9(s){return s=s|0,s&1|0}function MSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],USe(s,c,d,0),E=f}function USe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=kF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=_Se(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,HSe(m,f)|0,f),E=d}function kF(){var s=0,l=0;if(o[7656]|0||(u9(9304),Zt(28,9304,_|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(br(9304)|0)){s=9304,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));u9(9304)}return 9304}function _Se(s){return s=s|0,0}function HSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=kF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],c9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(qSe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function c9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function qSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=jSe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,GSe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],c9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,WSe(s,Q),YSe(Q),E=M;return}}function jSe(s){return s=s|0,357913941}function GSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function WSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function YSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function u9(s){s=s|0,JSe(s)}function KSe(s){s=s|0,VSe(s+24|0)}function VSe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function JSe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,5,l,zSe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function zSe(){return 1164}function XSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=ZSe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],$Se(l,d,c),E=f}function ZSe(s){return s=s|0,(n[(kF()|0)+24>>2]|0)+(s*12|0)|0}function $Se(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Dp(d,c),c=Sp(d,c)|0,nf[f&31](s,c),Pp(d),E=m}function Dp(s,l){s=s|0,l=l|0,ePe(s,l)}function Sp(s,l){return s=s|0,l=l|0,s|0}function Pp(s){s=s|0,GA(s)}function ePe(s,l){s=s|0,l=l|0,FF(s,l)}function FF(s,l){s=s|0,l=l|0,n[s>>2]=l}function tPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],rPe(s,c,d,0),E=f}function rPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=RF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=nPe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,iPe(m,f)|0,f),E=d}function RF(){var s=0,l=0;if(o[7664]|0||(f9(9340),Zt(29,9340,_|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(br(9340)|0)){s=9340,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));f9(9340)}return 9340}function nPe(s){return s=s|0,0}function iPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=RF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],A9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(sPe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function A9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function sPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=oPe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,aPe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],A9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,lPe(s,Q),cPe(Q),E=M;return}}function oPe(s){return s=s|0,357913941}function aPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function lPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function cPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function f9(s){s=s|0,fPe(s)}function uPe(s){s=s|0,APe(s+24|0)}function APe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function fPe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,4,l,pPe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function pPe(){return 1180}function hPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=gPe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=dPe(l,d,c)|0,E=f,c|0}function gPe(s){return s=s|0,(n[(RF()|0)+24>>2]|0)+(s*12|0)|0}function dPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Dg(d,c),d=Sg(d,c)|0,d=Kv(bR[f&15](s,d)|0)|0,E=m,d|0}function Dg(s,l){s=s|0,l=l|0}function Sg(s,l){return s=s|0,l=l|0,mPe(l)|0}function Kv(s){return s=s|0,s|0}function mPe(s){return s=s|0,s|0}function yPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],EPe(s,c,d,0),E=f}function EPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=TF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=CPe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,IPe(m,f)|0,f),E=d}function TF(){var s=0,l=0;if(o[7672]|0||(h9(9376),Zt(30,9376,_|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(br(9376)|0)){s=9376,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));h9(9376)}return 9376}function CPe(s){return s=s|0,0}function IPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=TF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],p9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(wPe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function p9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function wPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=BPe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,vPe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],p9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,DPe(s,Q),SPe(Q),E=M;return}}function BPe(s){return s=s|0,357913941}function vPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function DPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function SPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function h9(s){s=s|0,bPe(s)}function PPe(s){s=s|0,xPe(s+24|0)}function xPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function bPe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,5,l,g9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function g9(){return 1196}function QPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=kPe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=FPe(l,f)|0,E=c,l|0}function kPe(s){return s=s|0,(n[(TF()|0)+24>>2]|0)+(s*12|0)|0}function FPe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),Kv(Rg[c&31](s)|0)|0}function RPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TPe(s,c,d,1),E=f}function TPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=NF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=NPe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,LPe(m,f)|0,f),E=d}function NF(){var s=0,l=0;if(o[7680]|0||(m9(9412),Zt(31,9412,_|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(br(9412)|0)){s=9412,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));m9(9412)}return 9412}function NPe(s){return s=s|0,0}function LPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=NF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],d9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(OPe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function d9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function OPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=MPe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,UPe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],d9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,_Pe(s,Q),HPe(Q),E=M;return}}function MPe(s){return s=s|0,357913941}function UPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function _Pe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function HPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function m9(s){s=s|0,GPe(s)}function qPe(s){s=s|0,jPe(s+24|0)}function jPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function GPe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,6,l,y9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function y9(){return 1200}function WPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=YPe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=KPe(l,f)|0,E=c,l|0}function YPe(s){return s=s|0,(n[(NF()|0)+24>>2]|0)+(s*12|0)|0}function KPe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),Vv(Rg[c&31](s)|0)|0}function Vv(s){return s=s|0,s|0}function VPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JPe(s,c,d,0),E=f}function JPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=LF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=zPe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,XPe(m,f)|0,f),E=d}function LF(){var s=0,l=0;if(o[7688]|0||(C9(9448),Zt(32,9448,_|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(br(9448)|0)){s=9448,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));C9(9448)}return 9448}function zPe(s){return s=s|0,0}function XPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=LF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],E9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(ZPe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function E9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function ZPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=$Pe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,exe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],E9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,txe(s,Q),rxe(Q),E=M;return}}function $Pe(s){return s=s|0,357913941}function exe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function txe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function rxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function C9(s){s=s|0,sxe(s)}function nxe(s){s=s|0,ixe(s+24|0)}function ixe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function sxe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,6,l,I9()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function I9(){return 1204}function oxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=axe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lxe(l,d,c),E=f}function axe(s){return s=s|0,(n[(LF()|0)+24>>2]|0)+(s*12|0)|0}function lxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),OF(d,c),d=MF(d,c)|0,nf[f&31](s,d),E=m}function OF(s,l){s=s|0,l=l|0}function MF(s,l){return s=s|0,l=l|0,cxe(l)|0}function cxe(s){return s=s|0,s|0}function uxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Axe(s,c,d,0),E=f}function Axe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=UF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=fxe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,pxe(m,f)|0,f),E=d}function UF(){var s=0,l=0;if(o[7696]|0||(B9(9484),Zt(33,9484,_|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(br(9484)|0)){s=9484,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));B9(9484)}return 9484}function fxe(s){return s=s|0,0}function pxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=UF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],w9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(hxe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function w9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function hxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=gxe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,dxe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],w9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,mxe(s,Q),yxe(Q),E=M;return}}function gxe(s){return s=s|0,357913941}function dxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function mxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function yxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function B9(s){s=s|0,Ixe(s)}function Exe(s){s=s|0,Cxe(s+24|0)}function Cxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function Ixe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,1,l,wxe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function wxe(){return 1212}function Bxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,m=d+8|0,B=d,Q=vxe(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],Dxe(l,m,c,f),E=d}function vxe(s){return s=s|0,(n[(UF()|0)+24>>2]|0)+(s*12|0)|0}function Dxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;Q=E,E=E+16|0,m=Q+1|0,B=Q,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),OF(m,c),m=MF(m,c)|0,Dg(B,f),B=Sg(B,f)|0,FI[d&15](s,m,B),E=Q}function Sxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Pxe(s,c,d,1),E=f}function Pxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=_F()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=xxe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,bxe(m,f)|0,f),E=d}function _F(){var s=0,l=0;if(o[7704]|0||(D9(9520),Zt(34,9520,_|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(br(9520)|0)){s=9520,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));D9(9520)}return 9520}function xxe(s){return s=s|0,0}function bxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=_F()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],v9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Qxe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function v9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Qxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=kxe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,Fxe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],v9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Rxe(s,Q),Txe(Q),E=M;return}}function kxe(s){return s=s|0,357913941}function Fxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Rxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Txe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function D9(s){s=s|0,Oxe(s)}function Nxe(s){s=s|0,Lxe(s+24|0)}function Lxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function Oxe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,1,l,Mxe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Mxe(){return 1224}function Uxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;return d=E,E=E+16|0,m=d+8|0,B=d,Q=_xe(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],f=+Hxe(l,m,c),E=d,+f}function _xe(s){return s=s|0,(n[(_F()|0)+24>>2]|0)+(s*12|0)|0}function Hxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),$A(d,c),d=ef(d,c)|0,B=+wF(+w7[f&7](s,d)),E=m,+B}function qxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],jxe(s,c,d,1),E=f}function jxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=HF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Gxe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,Wxe(m,f)|0,f),E=d}function HF(){var s=0,l=0;if(o[7712]|0||(P9(9556),Zt(35,9556,_|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(br(9556)|0)){s=9556,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));P9(9556)}return 9556}function Gxe(s){return s=s|0,0}function Wxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=HF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],S9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Yxe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function S9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Yxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Kxe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,Vxe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],S9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Jxe(s,Q),zxe(Q),E=M;return}}function Kxe(s){return s=s|0,357913941}function Vxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Jxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function zxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function P9(s){s=s|0,$xe(s)}function Xxe(s){s=s|0,Zxe(s+24|0)}function Zxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function $xe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,5,l,ebe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function ebe(){return 1232}function tbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=rbe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=+nbe(l,d),E=f,+c}function rbe(s){return s=s|0,(n[(HF()|0)+24>>2]|0)+(s*12|0)|0}function nbe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),+ +wF(+I7[c&15](s))}function ibe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],sbe(s,c,d,1),E=f}function sbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=qF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=obe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,abe(m,f)|0,f),E=d}function qF(){var s=0,l=0;if(o[7720]|0||(b9(9592),Zt(36,9592,_|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(br(9592)|0)){s=9592,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));b9(9592)}return 9592}function obe(s){return s=s|0,0}function abe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=qF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],x9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(lbe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function x9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function lbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=cbe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,ube(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],x9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Abe(s,Q),fbe(Q),E=M;return}}function cbe(s){return s=s|0,357913941}function ube(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Abe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function fbe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function b9(s){s=s|0,gbe(s)}function pbe(s){s=s|0,hbe(s+24|0)}function hbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function gbe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,7,l,dbe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function dbe(){return 1276}function mbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=ybe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=Ebe(l,f)|0,E=c,l|0}function ybe(s){return s=s|0,(n[(qF()|0)+24>>2]|0)+(s*12|0)|0}function Ebe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;return d=E,E=E+16|0,f=d,c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),nf[c&31](f,s),f=Q9(f)|0,E=d,f|0}function Q9(s){s=s|0;var l=0,c=0,f=0,d=0;return d=E,E=E+32|0,l=d+12|0,c=d,f=DF(k9()|0)|0,f?(SF(l,f),PF(c,l),Cbe(s,c),s=xF(l)|0):s=Ibe(s)|0,E=d,s|0}function k9(){var s=0;return o[7736]|0||(kbe(9640),Zt(25,9640,_|0)|0,s=7736,n[s>>2]=1,n[s+4>>2]=0),9640}function Cbe(s,l){s=s|0,l=l|0,Dbe(l,s,s+8|0)|0}function Ibe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;return c=E,E=E+16|0,d=c+4|0,B=c,f=za(8)|0,l=f,Q=Gt(16)|0,n[Q>>2]=n[s>>2],n[Q+4>>2]=n[s+4>>2],n[Q+8>>2]=n[s+8>>2],n[Q+12>>2]=n[s+12>>2],m=l+4|0,n[m>>2]=Q,s=Gt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],jF(s,m,d),n[f>>2]=s,E=c,l|0}function jF(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Gt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1244,n[c+12>>2]=l,n[s+4>>2]=c}function wbe(s){s=s|0,Zm(s),pt(s)}function Bbe(s){s=s|0,s=n[s+12>>2]|0,s|0&&pt(s)}function vbe(s){s=s|0,pt(s)}function Dbe(s,l,c){return s=s|0,l=l|0,c=c|0,l=Sbe(n[s>>2]|0,l,c)|0,c=s+4|0,n[(n[c>>2]|0)+8>>2]=l,n[(n[c>>2]|0)+8>>2]|0}function Sbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;return f=E,E=E+16|0,d=f,Xa(d),s=ma(s)|0,c=Pbe(s,n[l>>2]|0,+C[c>>3])|0,Za(d),E=f,c|0}function Pbe(s,l,c){s=s|0,l=l|0,c=+c;var f=0;return f=Ql(xbe()|0)|0,l=IF(l)|0,Cl(0,f|0,s|0,l|0,+ +zA(c))|0}function xbe(){var s=0;return o[7728]|0||(bbe(9628),s=7728,n[s>>2]=1,n[s+4>>2]=0),9628}function bbe(s){s=s|0,kl(s,Qbe()|0,2)}function Qbe(){return 1264}function kbe(s){s=s|0,vp(s)}function Fbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Rbe(s,c,d,1),E=f}function Rbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=GF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Tbe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,Nbe(m,f)|0,f),E=d}function GF(){var s=0,l=0;if(o[7744]|0||(R9(9684),Zt(37,9684,_|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(br(9684)|0)){s=9684,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));R9(9684)}return 9684}function Tbe(s){return s=s|0,0}function Nbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=GF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],F9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Lbe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function F9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Lbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Obe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,Mbe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],F9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Ube(s,Q),_be(Q),E=M;return}}function Obe(s){return s=s|0,357913941}function Mbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Ube(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function _be(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function R9(s){s=s|0,jbe(s)}function Hbe(s){s=s|0,qbe(s+24|0)}function qbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function jbe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,5,l,Gbe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Gbe(){return 1280}function Wbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=Ybe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=Kbe(l,d,c)|0,E=f,c|0}function Ybe(s){return s=s|0,(n[(GF()|0)+24>>2]|0)+(s*12|0)|0}function Kbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return B=E,E=E+32|0,d=B,m=B+16|0,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),$A(m,c),m=ef(m,c)|0,FI[f&15](d,s,m),m=Q9(d)|0,E=B,m|0}function Vbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Jbe(s,c,d,1),E=f}function Jbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=WF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=zbe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,Xbe(m,f)|0,f),E=d}function WF(){var s=0,l=0;if(o[7752]|0||(N9(9720),Zt(38,9720,_|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(br(9720)|0)){s=9720,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));N9(9720)}return 9720}function zbe(s){return s=s|0,0}function Xbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=WF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],T9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Zbe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function T9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Zbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=$be(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,eQe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],T9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,tQe(s,Q),rQe(Q),E=M;return}}function $be(s){return s=s|0,357913941}function eQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function tQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function rQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function N9(s){s=s|0,sQe(s)}function nQe(s){s=s|0,iQe(s+24|0)}function iQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function sQe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,8,l,oQe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function oQe(){return 1288}function aQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=lQe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=cQe(l,f)|0,E=c,l|0}function lQe(s){return s=s|0,(n[(WF()|0)+24>>2]|0)+(s*12|0)|0}function cQe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),zG(Rg[c&31](s)|0)|0}function uQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],AQe(s,c,d,0),E=f}function AQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=YF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=fQe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,pQe(m,f)|0,f),E=d}function YF(){var s=0,l=0;if(o[7760]|0||(O9(9756),Zt(39,9756,_|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(br(9756)|0)){s=9756,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));O9(9756)}return 9756}function fQe(s){return s=s|0,0}function pQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=YF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],L9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(hQe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function L9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function hQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=gQe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,dQe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],L9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,mQe(s,Q),yQe(Q),E=M;return}}function gQe(s){return s=s|0,357913941}function dQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function mQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function yQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function O9(s){s=s|0,IQe(s)}function EQe(s){s=s|0,CQe(s+24|0)}function CQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function IQe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,8,l,wQe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function wQe(){return 1292}function BQe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=vQe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],DQe(l,d,c),E=f}function vQe(s){return s=s|0,(n[(YF()|0)+24>>2]|0)+(s*12|0)|0}function DQe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Tu(d,c),c=+Nu(d,c),y7[f&31](s,c),E=m}function SQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],PQe(s,c,d,0),E=f}function PQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=KF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=xQe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,bQe(m,f)|0,f),E=d}function KF(){var s=0,l=0;if(o[7768]|0||(U9(9792),Zt(40,9792,_|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(br(9792)|0)){s=9792,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));U9(9792)}return 9792}function xQe(s){return s=s|0,0}function bQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=KF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],M9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(QQe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function M9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function QQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=kQe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,FQe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],M9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,RQe(s,Q),TQe(Q),E=M;return}}function kQe(s){return s=s|0,357913941}function FQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function RQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function TQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function U9(s){s=s|0,OQe(s)}function NQe(s){s=s|0,LQe(s+24|0)}function LQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function OQe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,1,l,MQe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function MQe(){return 1300}function UQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,m=d+8|0,B=d,Q=_Qe(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],HQe(l,m,c,f),E=d}function _Qe(s){return s=s|0,(n[(KF()|0)+24>>2]|0)+(s*12|0)|0}function HQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f;var d=0,m=0,B=0,Q=0;Q=E,E=E+16|0,m=Q+1|0,B=Q,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),$A(m,c),m=ef(m,c)|0,Tu(B,f),f=+Nu(B,f),S7[d&15](s,m,f),E=Q}function qQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],jQe(s,c,d,0),E=f}function jQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=VF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=GQe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,WQe(m,f)|0,f),E=d}function VF(){var s=0,l=0;if(o[7776]|0||(H9(9828),Zt(41,9828,_|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(br(9828)|0)){s=9828,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));H9(9828)}return 9828}function GQe(s){return s=s|0,0}function WQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=VF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],_9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(YQe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function _9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function YQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=KQe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,VQe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],_9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,JQe(s,Q),zQe(Q),E=M;return}}function KQe(s){return s=s|0,357913941}function VQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function JQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function zQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function H9(s){s=s|0,$Qe(s)}function XQe(s){s=s|0,ZQe(s+24|0)}function ZQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function $Qe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,7,l,eke()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function eke(){return 1312}function tke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=rke(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],nke(l,d,c),E=f}function rke(s){return s=s|0,(n[(VF()|0)+24>>2]|0)+(s*12|0)|0}function nke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),$A(d,c),d=ef(d,c)|0,nf[f&31](s,d),E=m}function ike(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ske(s,c,d,0),E=f}function ske(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=JF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=oke(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,ake(m,f)|0,f),E=d}function JF(){var s=0,l=0;if(o[7784]|0||(j9(9864),Zt(42,9864,_|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(br(9864)|0)){s=9864,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));j9(9864)}return 9864}function oke(s){return s=s|0,0}function ake(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=JF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],q9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(lke(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function q9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function lke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=cke(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,uke(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],q9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Ake(s,Q),fke(Q),E=M;return}}function cke(s){return s=s|0,357913941}function uke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Ake(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function fke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function j9(s){s=s|0,gke(s)}function pke(s){s=s|0,hke(s+24|0)}function hke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function gke(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,8,l,dke()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function dke(){return 1320}function mke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=yke(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Eke(l,d,c),E=f}function yke(s){return s=s|0,(n[(JF()|0)+24>>2]|0)+(s*12|0)|0}function Eke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Cke(d,c),d=Ike(d,c)|0,nf[f&31](s,d),E=m}function Cke(s,l){s=s|0,l=l|0}function Ike(s,l){return s=s|0,l=l|0,wke(l)|0}function wke(s){return s=s|0,s|0}function Bke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vke(s,c,d,0),E=f}function vke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=zF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Dke(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,Ske(m,f)|0,f),E=d}function zF(){var s=0,l=0;if(o[7792]|0||(W9(9900),Zt(43,9900,_|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(br(9900)|0)){s=9900,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));W9(9900)}return 9900}function Dke(s){return s=s|0,0}function Ske(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=zF()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],G9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Pke(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function G9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Pke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=xke(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,bke(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],G9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Qke(s,Q),kke(Q),E=M;return}}function xke(s){return s=s|0,357913941}function bke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Qke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function kke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function W9(s){s=s|0,Tke(s)}function Fke(s){s=s|0,Rke(s+24|0)}function Rke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function Tke(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,22,l,Nke()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Nke(){return 1344}function Lke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;c=E,E=E+16|0,f=c+8|0,d=c,m=Oke(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],Mke(l,f),E=c}function Oke(s){return s=s|0,(n[(zF()|0)+24>>2]|0)+(s*12|0)|0}function Mke(s,l){s=s|0,l=l|0;var c=0;c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),rf[c&127](s)}function Uke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=XF()|0,s=_ke(c)|0,un(m,l,d,s,Hke(c,f)|0,f)}function XF(){var s=0,l=0;if(o[7800]|0||(K9(9936),Zt(44,9936,_|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(br(9936)|0)){s=9936,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));K9(9936)}return 9936}function _ke(s){return s=s|0,s|0}function Hke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=XF()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(Y9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(qke(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function Y9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function qke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=jke(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,Gke(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,Y9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Wke(s,d),Yke(d),E=Q;return}}function jke(s){return s=s|0,536870911}function Gke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function Wke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Yke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function K9(s){s=s|0,Jke(s)}function Kke(s){s=s|0,Vke(s+24|0)}function Vke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function Jke(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,23,l,I9()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function zke(s,l){s=s|0,l=l|0,Zke(n[(Xke(s)|0)>>2]|0,l)}function Xke(s){return s=s|0,(n[(XF()|0)+24>>2]|0)+(s<<3)|0}function Zke(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,OF(f,l),l=MF(f,l)|0,rf[s&127](l),E=c}function $ke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=ZF()|0,s=eFe(c)|0,un(m,l,d,s,tFe(c,f)|0,f)}function ZF(){var s=0,l=0;if(o[7808]|0||(J9(9972),Zt(45,9972,_|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(br(9972)|0)){s=9972,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));J9(9972)}return 9972}function eFe(s){return s=s|0,s|0}function tFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=ZF()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(V9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(rFe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function V9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function rFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=nFe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,iFe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,V9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,sFe(s,d),oFe(d),E=Q;return}}function nFe(s){return s=s|0,536870911}function iFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function sFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function oFe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function J9(s){s=s|0,cFe(s)}function aFe(s){s=s|0,lFe(s+24|0)}function lFe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function cFe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,9,l,uFe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function uFe(){return 1348}function AFe(s,l){return s=s|0,l=l|0,pFe(n[(fFe(s)|0)>>2]|0,l)|0}function fFe(s){return s=s|0,(n[(ZF()|0)+24>>2]|0)+(s<<3)|0}function pFe(s,l){s=s|0,l=l|0;var c=0,f=0;return c=E,E=E+16|0,f=c,z9(f,l),l=X9(f,l)|0,l=Kv(Rg[s&31](l)|0)|0,E=c,l|0}function z9(s,l){s=s|0,l=l|0}function X9(s,l){return s=s|0,l=l|0,hFe(l)|0}function hFe(s){return s=s|0,s|0}function gFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=$F()|0,s=dFe(c)|0,un(m,l,d,s,mFe(c,f)|0,f)}function $F(){var s=0,l=0;if(o[7816]|0||($9(10008),Zt(46,10008,_|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(br(10008)|0)){s=10008,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));$9(10008)}return 10008}function dFe(s){return s=s|0,s|0}function mFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=$F()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(Z9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(yFe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function Z9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function yFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=EFe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,CFe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,Z9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,IFe(s,d),wFe(d),E=Q;return}}function EFe(s){return s=s|0,536870911}function CFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function IFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function wFe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function $9(s){s=s|0,DFe(s)}function BFe(s){s=s|0,vFe(s+24|0)}function vFe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function DFe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,15,l,g9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function SFe(s){return s=s|0,xFe(n[(PFe(s)|0)>>2]|0)|0}function PFe(s){return s=s|0,(n[($F()|0)+24>>2]|0)+(s<<3)|0}function xFe(s){return s=s|0,Kv(lD[s&7]()|0)|0}function bFe(){var s=0;return o[7832]|0||(OFe(10052),Zt(25,10052,_|0)|0,s=7832,n[s>>2]=1,n[s+4>>2]=0),10052}function QFe(s,l){s=s|0,l=l|0,n[s>>2]=kFe()|0,n[s+4>>2]=FFe()|0,n[s+12>>2]=l,n[s+8>>2]=RFe()|0,n[s+32>>2]=2}function kFe(){return 11709}function FFe(){return 1188}function RFe(){return Jv()|0}function TFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(NFe(c),pt(c)):l|0&&(Qu(l),pt(l))}function xp(s,l){return s=s|0,l=l|0,l&s|0}function NFe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function Jv(){var s=0;return o[7824]|0||(n[2511]=LFe()|0,n[2512]=0,s=7824,n[s>>2]=1,n[s+4>>2]=0),10044}function LFe(){return 0}function OFe(s){s=s|0,vp(s)}function MFe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0;l=E,E=E+32|0,c=l+24|0,m=l+16|0,d=l+8|0,f=l,UFe(s,4827),_Fe(s,4834,3)|0,HFe(s,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[c>>2]=n[m>>2],n[c+4>>2]=n[m+4>>2],qFe(s,4841,c)|0,n[d>>2]=1,n[d+4>>2]=0,n[c>>2]=n[d>>2],n[c+4>>2]=n[d+4>>2],jFe(s,4871,c)|0,n[f>>2]=10,n[f+4>>2]=0,n[c>>2]=n[f>>2],n[c+4>>2]=n[f+4>>2],GFe(s,4891,c)|0,E=l}function UFe(s,l){s=s|0,l=l|0;var c=0;c=wTe()|0,n[s>>2]=c,BTe(c,l),bp(n[s>>2]|0)}function _Fe(s,l,c){return s=s|0,l=l|0,c=c|0,oTe(s,cn(l)|0,c,0),s|0}function HFe(s,l,c){return s=s|0,l=l|0,c=c|0,WRe(s,cn(l)|0,c,0),s|0}function qFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],SRe(s,l,d),E=f,s|0}function jFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],aRe(s,l,d),E=f,s|0}function GFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],WFe(s,l,d),E=f,s|0}function WFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],YFe(s,c,d,1),E=f}function YFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=eR()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=KFe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,VFe(m,f)|0,f),E=d}function eR(){var s=0,l=0;if(o[7840]|0||(t5(10100),Zt(48,10100,_|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(br(10100)|0)){s=10100,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));t5(10100)}return 10100}function KFe(s){return s=s|0,0}function VFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=eR()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],e5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(JFe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function e5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function JFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=zFe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,XFe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],e5(m,f,c),n[k>>2]=(n[k>>2]|0)+12,ZFe(s,Q),$Fe(Q),E=M;return}}function zFe(s){return s=s|0,357913941}function XFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function ZFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function $Fe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function t5(s){s=s|0,rRe(s)}function eRe(s){s=s|0,tRe(s+24|0)}function tRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function rRe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,6,l,nRe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function nRe(){return 1364}function iRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=sRe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=oRe(l,d,c)|0,E=f,c|0}function sRe(s){return s=s|0,(n[(eR()|0)+24>>2]|0)+(s*12|0)|0}function oRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),$A(d,c),d=ef(d,c)|0,d=l9(bR[f&15](s,d)|0)|0,E=m,d|0}function aRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lRe(s,c,d,0),E=f}function lRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=tR()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=cRe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,uRe(m,f)|0,f),E=d}function tR(){var s=0,l=0;if(o[7848]|0||(n5(10136),Zt(49,10136,_|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(br(10136)|0)){s=10136,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));n5(10136)}return 10136}function cRe(s){return s=s|0,0}function uRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=tR()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],r5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(ARe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function r5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function ARe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=fRe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,pRe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],r5(m,f,c),n[k>>2]=(n[k>>2]|0)+12,hRe(s,Q),gRe(Q),E=M;return}}function fRe(s){return s=s|0,357913941}function pRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function hRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function gRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function n5(s){s=s|0,yRe(s)}function dRe(s){s=s|0,mRe(s+24|0)}function mRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function yRe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,9,l,ERe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function ERe(){return 1372}function CRe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=IRe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wRe(l,d,c),E=f}function IRe(s){return s=s|0,(n[(tR()|0)+24>>2]|0)+(s*12|0)|0}function wRe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=$e;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),BRe(d,c),B=y(vRe(d,c)),m7[f&1](s,B),E=m}function BRe(s,l){s=s|0,l=+l}function vRe(s,l){return s=s|0,l=+l,y(DRe(l))}function DRe(s){return s=+s,y(s)}function SRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=cn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],PRe(s,c,d,0),E=f}function PRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=rR()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=xRe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],un(B,l,s,c,bRe(m,f)|0,f),E=d}function rR(){var s=0,l=0;if(o[7856]|0||(s5(10172),Zt(50,10172,_|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(br(10172)|0)){s=10172,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));s5(10172)}return 10172}function xRe(s){return s=s|0,0}function bRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,j=rR()|0,M=j+24|0,s=Ar(l,4)|0,n[k>>2]=s,l=j+28|0,c=n[l>>2]|0,c>>>0<(n[j+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],i5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(QRe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function i5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function QRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=kRe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,j=se<<1,FRe(Q,se>>>0<m>>>1>>>0?j>>>0<d>>>0?d:j:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],i5(m,f,c),n[k>>2]=(n[k>>2]|0)+12,RRe(s,Q),TRe(Q),E=M;return}}function kRe(s){return s=s|0,357913941}function FRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Gt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function RRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function TRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&pt(s)}function s5(s){s=s|0,ORe(s)}function NRe(s){s=s|0,LRe(s+24|0)}function LRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),pt(c))}function ORe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,2,3,l,MRe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function MRe(){return 1380}function URe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,m=d+8|0,B=d,Q=_Re(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],HRe(l,m,c,f),E=d}function _Re(s){return s=s|0,(n[(rR()|0)+24>>2]|0)+(s*12|0)|0}function HRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;Q=E,E=E+16|0,m=Q+1|0,B=Q,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),$A(m,c),m=ef(m,c)|0,qRe(B,f),B=jRe(B,f)|0,FI[d&15](s,m,B),E=Q}function qRe(s,l){s=s|0,l=l|0}function jRe(s,l){return s=s|0,l=l|0,GRe(l)|0}function GRe(s){return s=s|0,(s|0)!=0|0}function WRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=nR()|0,s=YRe(c)|0,un(m,l,d,s,KRe(c,f)|0,f)}function nR(){var s=0,l=0;if(o[7864]|0||(a5(10208),Zt(51,10208,_|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(br(10208)|0)){s=10208,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));a5(10208)}return 10208}function YRe(s){return s=s|0,s|0}function KRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=nR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(o5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(VRe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function o5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function VRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=JRe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,zRe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,o5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,XRe(s,d),ZRe(d),E=Q;return}}function JRe(s){return s=s|0,536870911}function zRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function XRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function ZRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function a5(s){s=s|0,tTe(s)}function $Re(s){s=s|0,eTe(s+24|0)}function eTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function tTe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,24,l,rTe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function rTe(){return 1392}function nTe(s,l){s=s|0,l=l|0,sTe(n[(iTe(s)|0)>>2]|0,l)}function iTe(s){return s=s|0,(n[(nR()|0)+24>>2]|0)+(s<<3)|0}function sTe(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,z9(f,l),l=X9(f,l)|0,rf[s&127](l),E=c}function oTe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=iR()|0,s=aTe(c)|0,un(m,l,d,s,lTe(c,f)|0,f)}function iR(){var s=0,l=0;if(o[7872]|0||(c5(10244),Zt(52,10244,_|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(br(10244)|0)){s=10244,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));c5(10244)}return 10244}function aTe(s){return s=s|0,s|0}function lTe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=iR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(l5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(cTe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function l5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function cTe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=uTe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,ATe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,l5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,fTe(s,d),pTe(d),E=Q;return}}function uTe(s){return s=s|0,536870911}function ATe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function fTe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function pTe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function c5(s){s=s|0,dTe(s)}function hTe(s){s=s|0,gTe(s+24|0)}function gTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function dTe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,16,l,mTe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function mTe(){return 1400}function yTe(s){return s=s|0,CTe(n[(ETe(s)|0)>>2]|0)|0}function ETe(s){return s=s|0,(n[(iR()|0)+24>>2]|0)+(s<<3)|0}function CTe(s){return s=s|0,ITe(lD[s&7]()|0)|0}function ITe(s){return s=s|0,s|0}function wTe(){var s=0;return o[7880]|0||(bTe(10280),Zt(25,10280,_|0)|0,s=7880,n[s>>2]=1,n[s+4>>2]=0),10280}function BTe(s,l){s=s|0,l=l|0,n[s>>2]=vTe()|0,n[s+4>>2]=DTe()|0,n[s+12>>2]=l,n[s+8>>2]=STe()|0,n[s+32>>2]=4}function vTe(){return 11711}function DTe(){return 1356}function STe(){return Jv()|0}function PTe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(xTe(c),pt(c)):l|0&&(wg(l),pt(l))}function xTe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function bTe(s){s=s|0,vp(s)}function QTe(s){s=s|0,kTe(s,4920),FTe(s)|0,RTe(s)|0}function kTe(s,l){s=s|0,l=l|0;var c=0;c=k9()|0,n[s>>2]=c,eNe(c,l),bp(n[s>>2]|0)}function FTe(s){s=s|0;var l=0;return l=n[s>>2]|0,Pg(l,GTe()|0),s|0}function RTe(s){s=s|0;var l=0;return l=n[s>>2]|0,Pg(l,TTe()|0),s|0}function TTe(){var s=0;return o[7888]|0||(u5(10328),Zt(53,10328,_|0)|0,s=7888,n[s>>2]=1,n[s+4>>2]=0),br(10328)|0||u5(10328),10328}function Pg(s,l){s=s|0,l=l|0,un(s,0,l,0,0,0)}function u5(s){s=s|0,OTe(s),xg(s,10)}function NTe(s){s=s|0,LTe(s+24|0)}function LTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function OTe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,5,1,l,HTe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function MTe(s,l,c){s=s|0,l=l|0,c=+c,UTe(s,l,c)}function xg(s,l){s=s|0,l=l|0,n[s+20>>2]=l}function UTe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,m=f+8|0,Q=f+13|0,d=f,B=f+12|0,$A(Q,l),n[m>>2]=ef(Q,l)|0,Tu(B,c),C[d>>3]=+Nu(B,c),_Te(s,m,d),E=f}function _Te(s,l,c){s=s|0,l=l|0,c=c|0,W(s+8|0,n[l>>2]|0,+C[c>>3]),o[s+24>>0]=1}function HTe(){return 1404}function qTe(s,l){return s=s|0,l=+l,jTe(s,l)|0}function jTe(s,l){s=s|0,l=+l;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return f=E,E=E+16|0,m=f+4|0,B=f+8|0,Q=f,d=za(8)|0,c=d,k=Gt(16)|0,$A(m,s),s=ef(m,s)|0,Tu(B,l),W(k,s,+Nu(B,l)),B=c+4|0,n[B>>2]=k,s=Gt(8)|0,B=n[B>>2]|0,n[Q>>2]=0,n[m>>2]=n[Q>>2],jF(s,B,m),n[d>>2]=s,E=f,c|0}function GTe(){var s=0;return o[7896]|0||(A5(10364),Zt(54,10364,_|0)|0,s=7896,n[s>>2]=1,n[s+4>>2]=0),br(10364)|0||A5(10364),10364}function A5(s){s=s|0,KTe(s),xg(s,55)}function WTe(s){s=s|0,YTe(s+24|0)}function YTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function KTe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,5,4,l,XTe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function VTe(s){s=s|0,JTe(s)}function JTe(s){s=s|0,zTe(s)}function zTe(s){s=s|0,f5(s+8|0),o[s+24>>0]=1}function f5(s){s=s|0,n[s>>2]=0,C[s+8>>3]=0}function XTe(){return 1424}function ZTe(){return $Te()|0}function $Te(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=E,E=E+16|0,d=l+4|0,B=l,c=za(8)|0,s=c,f=Gt(16)|0,f5(f),m=s+4|0,n[m>>2]=f,f=Gt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],jF(f,m,d),n[c>>2]=f,E=l,s|0}function eNe(s,l){s=s|0,l=l|0,n[s>>2]=tNe()|0,n[s+4>>2]=rNe()|0,n[s+12>>2]=l,n[s+8>>2]=nNe()|0,n[s+32>>2]=5}function tNe(){return 11710}function rNe(){return 1416}function nNe(){return zv()|0}function iNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(sNe(c),pt(c)):l|0&&pt(l)}function sNe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function zv(){var s=0;return o[7904]|0||(n[2600]=oNe()|0,n[2601]=0,s=7904,n[s>>2]=1,n[s+4>>2]=0),10400}function oNe(){return n[357]|0}function aNe(s){s=s|0,lNe(s,4926),cNe(s)|0}function lNe(s,l){s=s|0,l=l|0;var c=0;c=e9()|0,n[s>>2]=c,CNe(c,l),bp(n[s>>2]|0)}function cNe(s){s=s|0;var l=0;return l=n[s>>2]|0,Pg(l,uNe()|0),s|0}function uNe(){var s=0;return o[7912]|0||(p5(10412),Zt(56,10412,_|0)|0,s=7912,n[s>>2]=1,n[s+4>>2]=0),br(10412)|0||p5(10412),10412}function p5(s){s=s|0,pNe(s),xg(s,57)}function ANe(s){s=s|0,fNe(s+24|0)}function fNe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function pNe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,5,5,l,mNe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function hNe(s){s=s|0,gNe(s)}function gNe(s){s=s|0,dNe(s)}function dNe(s){s=s|0;var l=0,c=0;l=s+8|0,c=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(c|0));o[s+56>>0]=1}function mNe(){return 1432}function yNe(){return ENe()|0}function ENe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0,Q=0;B=E,E=E+16|0,s=B+4|0,l=B,c=za(8)|0,f=c,d=Gt(48)|0,m=d,Q=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(Q|0));return m=f+4|0,n[m>>2]=d,Q=Gt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[s>>2]=n[l>>2],t9(Q,m,s),n[c>>2]=Q,E=B,f|0}function CNe(s,l){s=s|0,l=l|0,n[s>>2]=INe()|0,n[s+4>>2]=wNe()|0,n[s+12>>2]=l,n[s+8>>2]=BNe()|0,n[s+32>>2]=6}function INe(){return 11704}function wNe(){return 1436}function BNe(){return zv()|0}function vNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(DNe(c),pt(c)):l|0&&pt(l)}function DNe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function SNe(s){s=s|0,PNe(s,4933),xNe(s)|0,bNe(s)|0}function PNe(s,l){s=s|0,l=l|0;var c=0;c=$Ne()|0,n[s>>2]=c,eLe(c,l),bp(n[s>>2]|0)}function xNe(s){s=s|0;var l=0;return l=n[s>>2]|0,Pg(l,jNe()|0),s|0}function bNe(s){s=s|0;var l=0;return l=n[s>>2]|0,Pg(l,QNe()|0),s|0}function QNe(){var s=0;return o[7920]|0||(h5(10452),Zt(58,10452,_|0)|0,s=7920,n[s>>2]=1,n[s+4>>2]=0),br(10452)|0||h5(10452),10452}function h5(s){s=s|0,RNe(s),xg(s,1)}function kNe(s){s=s|0,FNe(s+24|0)}function FNe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function RNe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,5,1,l,ONe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function TNe(s,l,c){s=s|0,l=+l,c=+c,NNe(s,l,c)}function NNe(s,l,c){s=s|0,l=+l,c=+c;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+32|0,m=f+8|0,Q=f+17|0,d=f,B=f+16|0,Tu(Q,l),C[m>>3]=+Nu(Q,l),Tu(B,c),C[d>>3]=+Nu(B,c),LNe(s,m,d),E=f}function LNe(s,l,c){s=s|0,l=l|0,c=c|0,g5(s+8|0,+C[l>>3],+C[c>>3]),o[s+24>>0]=1}function g5(s,l,c){s=s|0,l=+l,c=+c,C[s>>3]=l,C[s+8>>3]=c}function ONe(){return 1472}function MNe(s,l){return s=+s,l=+l,UNe(s,l)|0}function UNe(s,l){s=+s,l=+l;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return f=E,E=E+16|0,B=f+4|0,Q=f+8|0,k=f,d=za(8)|0,c=d,m=Gt(16)|0,Tu(B,s),s=+Nu(B,s),Tu(Q,l),g5(m,s,+Nu(Q,l)),Q=c+4|0,n[Q>>2]=m,m=Gt(8)|0,Q=n[Q>>2]|0,n[k>>2]=0,n[B>>2]=n[k>>2],d5(m,Q,B),n[d>>2]=m,E=f,c|0}function d5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Gt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1452,n[c+12>>2]=l,n[s+4>>2]=c}function _Ne(s){s=s|0,Zm(s),pt(s)}function HNe(s){s=s|0,s=n[s+12>>2]|0,s|0&&pt(s)}function qNe(s){s=s|0,pt(s)}function jNe(){var s=0;return o[7928]|0||(m5(10488),Zt(59,10488,_|0)|0,s=7928,n[s>>2]=1,n[s+4>>2]=0),br(10488)|0||m5(10488),10488}function m5(s){s=s|0,YNe(s),xg(s,60)}function GNe(s){s=s|0,WNe(s+24|0)}function WNe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function YNe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,5,6,l,zNe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function KNe(s){s=s|0,VNe(s)}function VNe(s){s=s|0,JNe(s)}function JNe(s){s=s|0,y5(s+8|0),o[s+24>>0]=1}function y5(s){s=s|0,n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,n[s+12>>2]=0}function zNe(){return 1492}function XNe(){return ZNe()|0}function ZNe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=E,E=E+16|0,d=l+4|0,B=l,c=za(8)|0,s=c,f=Gt(16)|0,y5(f),m=s+4|0,n[m>>2]=f,f=Gt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],d5(f,m,d),n[c>>2]=f,E=l,s|0}function $Ne(){var s=0;return o[7936]|0||(oLe(10524),Zt(25,10524,_|0)|0,s=7936,n[s>>2]=1,n[s+4>>2]=0),10524}function eLe(s,l){s=s|0,l=l|0,n[s>>2]=tLe()|0,n[s+4>>2]=rLe()|0,n[s+12>>2]=l,n[s+8>>2]=nLe()|0,n[s+32>>2]=7}function tLe(){return 11700}function rLe(){return 1484}function nLe(){return zv()|0}function iLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(sLe(c),pt(c)):l|0&&pt(l)}function sLe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function oLe(s){s=s|0,vp(s)}function aLe(s,l,c){s=s|0,l=l|0,c=c|0,s=cn(l)|0,l=lLe(c)|0,c=cLe(c,0)|0,ULe(s,l,c,sR()|0,0)}function lLe(s){return s=s|0,s|0}function cLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=sR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(C5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(dLe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function sR(){var s=0,l=0;if(o[7944]|0||(E5(10568),Zt(61,10568,_|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(br(10568)|0)){s=10568,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));E5(10568)}return 10568}function E5(s){s=s|0,fLe(s)}function uLe(s){s=s|0,ALe(s+24|0)}function ALe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function fLe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,17,l,y9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function pLe(s){return s=s|0,gLe(n[(hLe(s)|0)>>2]|0)|0}function hLe(s){return s=s|0,(n[(sR()|0)+24>>2]|0)+(s<<3)|0}function gLe(s){return s=s|0,Vv(lD[s&7]()|0)|0}function C5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function dLe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=mLe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,yLe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,C5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,ELe(s,d),CLe(d),E=Q;return}}function mLe(s){return s=s|0,536870911}function yLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function ELe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function CLe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function ILe(){wLe()}function wLe(){BLe(10604)}function BLe(s){s=s|0,vLe(s,4955)}function vLe(s,l){s=s|0,l=l|0;var c=0;c=DLe()|0,n[s>>2]=c,SLe(c,l),bp(n[s>>2]|0)}function DLe(){var s=0;return o[7952]|0||(NLe(10612),Zt(25,10612,_|0)|0,s=7952,n[s>>2]=1,n[s+4>>2]=0),10612}function SLe(s,l){s=s|0,l=l|0,n[s>>2]=QLe()|0,n[s+4>>2]=kLe()|0,n[s+12>>2]=l,n[s+8>>2]=FLe()|0,n[s+32>>2]=8}function bp(s){s=s|0;var l=0,c=0;l=E,E=E+16|0,c=l,Km()|0,n[c>>2]=s,PLe(10608,c),E=l}function Km(){return o[11714]|0||(n[2652]=0,Zt(62,10608,_|0)|0,o[11714]=1),10608}function PLe(s,l){s=s|0,l=l|0;var c=0;c=Gt(8)|0,n[c+4>>2]=n[l>>2],n[c>>2]=n[s>>2],n[s>>2]=c}function xLe(s){s=s|0,bLe(s)}function bLe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,pt(c);while((l|0)!=0);n[s>>2]=0}function QLe(){return 11715}function kLe(){return 1496}function FLe(){return Jv()|0}function RLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(TLe(c),pt(c)):l|0&&pt(l)}function TLe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function NLe(s){s=s|0,vp(s)}function LLe(s,l){s=s|0,l=l|0;var c=0,f=0;Km()|0,c=n[2652]|0;e:do if(c|0){for(;f=n[c+4>>2]|0,!(f|0&&(t7(oR(f)|0,s)|0)==0);)if(c=n[c>>2]|0,!c)break e;OLe(f,l)}while(0)}function oR(s){return s=s|0,n[s+12>>2]|0}function OLe(s,l){s=s|0,l=l|0;var c=0;s=s+36|0,c=n[s>>2]|0,c|0&&(GA(c),pt(c)),c=Gt(4)|0,VG(c,l),n[s>>2]=c}function aR(){return o[11716]|0||(n[2664]=0,Zt(63,10656,_|0)|0,o[11716]=1),10656}function I5(){var s=0;return o[11717]|0?s=n[2665]|0:(MLe(),n[2665]=1504,o[11717]=1,s=1504),s|0}function MLe(){o[11740]|0||(o[11718]=Ar(Ar(8,0)|0,0)|0,o[11719]=Ar(Ar(0,0)|0,0)|0,o[11720]=Ar(Ar(0,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>>0?(n[m>>2]=n[Re>>2],n[Ye>>2]=(n[Ye>>2]|0)+4):cR(Le,Re),f;)d=d+4|0;f=xI(Q)|0,n[Re>>2]=0,n[M>>2]=0,n[O>>2]=0;e:do if(n[f>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?qLe(Re,f):(n[d>>2]=n[f>>2],n[M>>2]=(n[M>>2]|0)+4),f=f+4|0,!(n[f>>2]|0))break e;d=n[M>>2]|0,m=n[j>>2]|0}while(0);n[et>>2]=Xv(B)|0,n[Ze>>2]=br(Q)|0,jLe(c,s,et,Ze,Le,Re),uR(Re),tf(Le)}l=n[l>>2]|0}while((l|0)!=0)}E=at}function lR(s){return s=s|0,n[s+12>>2]|0}function SI(s){return s=s|0,n[s+12>>2]|0}function PI(s){return s=s|0,n[s+16>>2]|0}function HLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=E,E=E+32|0,c=d,f=n[s>>2]|0,(n[s+8>>2]|0)-f>>2>>>0<l>>>0&&(k5(c,l,(n[s+4>>2]|0)-f>>2,s+8|0),F5(s,c),R5(c)),E=d}function cR(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;if(B=E,E=E+32|0,c=B,f=s+4|0,d=((n[f>>2]|0)-(n[s>>2]|0)>>2)+1|0,m=Q5(s)|0,m>>>0<d>>>0)Vr(s);else{Q=n[s>>2]|0,M=(n[s+8>>2]|0)-Q|0,k=M>>1,k5(c,M>>2>>>0<m>>>1>>>0?k>>>0<d>>>0?d:k:m,(n[f>>2]|0)-Q>>2,s+8|0),m=c+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,F5(s,c),R5(c),E=B;return}}function xI(s){return s=s|0,n[s+8>>2]|0}function qLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;if(B=E,E=E+32|0,c=B,f=s+4|0,d=((n[f>>2]|0)-(n[s>>2]|0)>>2)+1|0,m=b5(s)|0,m>>>0<d>>>0)Vr(s);else{Q=n[s>>2]|0,M=(n[s+8>>2]|0)-Q|0,k=M>>1,lOe(c,M>>2>>>0<m>>>1>>>0?k>>>0<d>>>0?d:k:m,(n[f>>2]|0)-Q>>2,s+8|0),m=c+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,cOe(s,c),uOe(c),E=B;return}}function Xv(s){return s=s|0,n[s>>2]|0}function jLe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,GLe(s,l,c,f,d,m)}function uR(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),pt(c))}function tf(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),pt(c))}function GLe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,j=0;B=E,E=E+48|0,O=B+40|0,Q=B+32|0,j=B+24|0,k=B+12|0,M=B,Xa(Q),s=ma(s)|0,n[j>>2]=n[l>>2],c=n[c>>2]|0,f=n[f>>2]|0,AR(k,d),WLe(M,m),n[O>>2]=n[j>>2],YLe(s,O,c,f,k,M),uR(M),tf(k),Za(Q),E=B}function AR(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(oOe(s,f),aOe(s,n[l>>2]|0,n[c>>2]|0,f))}function WLe(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(iOe(s,f),sOe(s,n[l>>2]|0,n[c>>2]|0,f))}function YLe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,j=0;B=E,E=E+32|0,O=B+28|0,j=B+24|0,Q=B+12|0,k=B,M=Ql(KLe()|0)|0,n[j>>2]=n[l>>2],n[O>>2]=n[j>>2],l=bg(O)|0,c=v5(c)|0,f=fR(f)|0,n[Q>>2]=n[d>>2],O=d+4|0,n[Q+4>>2]=n[O>>2],j=d+8|0,n[Q+8>>2]=n[j>>2],n[j>>2]=0,n[O>>2]=0,n[d>>2]=0,d=pR(Q)|0,n[k>>2]=n[m>>2],O=m+4|0,n[k+4>>2]=n[O>>2],j=m+8|0,n[k+8>>2]=n[j>>2],n[j>>2]=0,n[O>>2]=0,n[m>>2]=0,io(0,M|0,s|0,l|0,c|0,f|0,d|0,VLe(k)|0)|0,uR(k),tf(Q),E=B}function KLe(){var s=0;return o[7968]|0||(rOe(10708),s=7968,n[s>>2]=1,n[s+4>>2]=0),10708}function bg(s){return s=s|0,S5(s)|0}function v5(s){return s=s|0,D5(s)|0}function fR(s){return s=s|0,Vv(s)|0}function pR(s){return s=s|0,zLe(s)|0}function VLe(s){return s=s|0,JLe(s)|0}function JLe(s){s=s|0;var l=0,c=0,f=0;if(f=(n[s+4>>2]|0)-(n[s>>2]|0)|0,c=f>>2,f=za(f+4|0)|0,n[f>>2]=c,c|0){l=0;do n[f+4+(l<<2)>>2]=D5(n[(n[s>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(c|0))}return f|0}function D5(s){return s=s|0,s|0}function zLe(s){s=s|0;var l=0,c=0,f=0;if(f=(n[s+4>>2]|0)-(n[s>>2]|0)|0,c=f>>2,f=za(f+4|0)|0,n[f>>2]=c,c|0){l=0;do n[f+4+(l<<2)>>2]=S5((n[s>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(c|0))}return f|0}function S5(s){s=s|0;var l=0,c=0,f=0,d=0;return d=E,E=E+32|0,l=d+12|0,c=d,f=DF(P5()|0)|0,f?(SF(l,f),PF(c,l),FUe(s,c),s=xF(l)|0):s=XLe(s)|0,E=d,s|0}function P5(){var s=0;return o[7960]|0||(tOe(10664),Zt(25,10664,_|0)|0,s=7960,n[s>>2]=1,n[s+4>>2]=0),10664}function XLe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;return c=E,E=E+16|0,d=c+4|0,B=c,f=za(8)|0,l=f,Q=Gt(4)|0,n[Q>>2]=n[s>>2],m=l+4|0,n[m>>2]=Q,s=Gt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],x5(s,m,d),n[f>>2]=s,E=c,l|0}function x5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Gt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1656,n[c+12>>2]=l,n[s+4>>2]=c}function ZLe(s){s=s|0,Zm(s),pt(s)}function $Le(s){s=s|0,s=n[s+12>>2]|0,s|0&&pt(s)}function eOe(s){s=s|0,pt(s)}function tOe(s){s=s|0,vp(s)}function rOe(s){s=s|0,kl(s,nOe()|0,5)}function nOe(){return 1676}function iOe(s,l){s=s|0,l=l|0;var c=0;if((b5(s)|0)>>>0<l>>>0&&Vr(s),l>>>0>1073741823)Rt();else{c=Gt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function sOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(Cr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function b5(s){return s=s|0,1073741823}function oOe(s,l){s=s|0,l=l|0;var c=0;if((Q5(s)|0)>>>0<l>>>0&&Vr(s),l>>>0>1073741823)Rt();else{c=Gt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function aOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(Cr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function Q5(s){return s=s|0,1073741823}function lOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Gt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<2)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<2)}function cOe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function uOe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-4-l|0)>>>2)<<2)),s=n[s>>2]|0,s|0&&pt(s)}function k5(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Gt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<2)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<2)}function F5(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s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)|0)>>2]|0),gOe(se,T5(k)|0),B=n[se>>2]|0,B|0){n[O>>2]=0,n[s>>2]=0,n[l>>2]=0;do Fc(Ye,n[(Vm(n[B+4>>2]|0)|0)>>2]|0),Q=n[s>>2]|0,Q>>>0<(n[c>>2]|0)>>>0?(n[Q>>2]=n[Ye>>2],n[s>>2]=(n[s>>2]|0)+4):cR(O,Ye),B=n[B>>2]|0;while((B|0)!=0);dOe(f,j,O),tf(O)}n[Le>>2]=n[j>>2],M=N5(k)|0,n[O>>2]=n[Le>>2],B5(O,M,d),n9(se),m=n[m>>2]|0}while((m|0)!=0)}E=Re}function fOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,xOe(s,l,c,f)}function pOe(s,l,c){s=s|0,l=l|0,c=c|0,POe(s,l,c)}function Vm(s){return s=s|0,s|0}function hOe(s,l,c){s=s|0,l=l|0,c=c|0,BOe(s,l,c)}function T5(s){return s=s|0,s+16|0}function gOe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;if(m=E,E=E+16|0,d=m+8|0,c=m,n[s>>2]=0,f=n[l>>2]|0,n[d>>2]=f,n[c>>2]=s,c=wOe(c)|0,f|0){if(f=Gt(12)|0,B=(L5(d)|0)+4|0,s=n[B+4>>2]|0,l=f+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=s,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)s=f;else for(l=f;s=Gt(12)|0,k=(L5(d)|0)+4|0,Q=n[k+4>>2]|0,B=s+4|0,n[B>>2]=n[k>>2],n[B+4>>2]=Q,n[l>>2]=s,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=s;n[s>>2]=n[c>>2],n[c>>2]=f}E=m}function dOe(s,l,c){s=s|0,l=l|0,c=c|0,mOe(s,l,c)}function N5(s){return s=s|0,s+24|0}function mOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+32|0,B=f+24|0,d=f+16|0,Q=f+12|0,m=f,Xa(d),s=ma(s)|0,n[Q>>2]=n[l>>2],AR(m,c),n[B>>2]=n[Q>>2],yOe(s,B,m),tf(m),Za(d),E=f}function yOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+32|0,B=f+16|0,Q=f+12|0,d=f,m=Ql(EOe()|0)|0,n[Q>>2]=n[l>>2],n[B>>2]=n[Q>>2],l=bg(B)|0,n[d>>2]=n[c>>2],B=c+4|0,n[d+4>>2]=n[B>>2],Q=c+8|0,n[d+8>>2]=n[Q>>2],n[Q>>2]=0,n[B>>2]=0,n[c>>2]=0,no(0,m|0,s|0,l|0,pR(d)|0)|0,tf(d),E=f}function EOe(){var s=0;return o[7976]|0||(COe(10720),s=7976,n[s>>2]=1,n[s+4>>2]=0),10720}function COe(s){s=s|0,kl(s,IOe()|0,2)}function IOe(){return 1732}function wOe(s){return s=s|0,n[s>>2]|0}function L5(s){return s=s|0,n[s>>2]|0}function BOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+32|0,m=f+16|0,d=f+8|0,B=f,Xa(d),s=ma(s)|0,n[B>>2]=n[l>>2],c=n[c>>2]|0,n[m>>2]=n[B>>2],O5(s,m,c),Za(d),E=f}function O5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,m=f+4|0,B=f,d=Ql(vOe()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=bg(m)|0,no(0,d|0,s|0,l|0,v5(c)|0)|0,E=f}function vOe(){var s=0;return o[7984]|0||(DOe(10732),s=7984,n[s>>2]=1,n[s+4>>2]=0),10732}function DOe(s){s=s|0,kl(s,SOe()|0,2)}function SOe(){return 1744}function POe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+32|0,m=f+16|0,d=f+8|0,B=f,Xa(d),s=ma(s)|0,n[B>>2]=n[l>>2],c=n[c>>2]|0,n[m>>2]=n[B>>2],O5(s,m,c),Za(d),E=f}function xOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+32|0,B=d+16|0,m=d+8|0,Q=d,Xa(m),s=ma(s)|0,n[Q>>2]=n[l>>2],c=o[c>>0]|0,f=o[f>>0]|0,n[B>>2]=n[Q>>2],bOe(s,B,c,f),Za(m),E=d}function bOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,B=d+4|0,Q=d,m=Ql(QOe()|0)|0,n[Q>>2]=n[l>>2],n[B>>2]=n[Q>>2],l=bg(B)|0,c=Jm(c)|0,yc(0,m|0,s|0,l|0,c|0,Jm(f)|0)|0,E=d}function QOe(){var s=0;return o[7992]|0||(FOe(10744),s=7992,n[s>>2]=1,n[s+4>>2]=0),10744}function Jm(s){return s=s|0,kOe(s)|0}function kOe(s){return s=s|0,s&255|0}function FOe(s){s=s|0,kl(s,ROe()|0,3)}function ROe(){return 1756}function TOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;switch(se=E,E=E+32|0,Q=se+8|0,k=se+4|0,M=se+20|0,O=se,FF(s,0),f=kUe(l)|0,n[Q>>2]=0,j=Q+4|0,n[j>>2]=0,n[Q+8>>2]=0,f<<24>>24){case 0:{o[M>>0]=0,NOe(k,c,M),Zv(s,k)|0,WA(k);break}case 8:{j=ER(l)|0,o[M>>0]=8,Fc(O,n[j+4>>2]|0),LOe(k,c,M,O,j+8|0),Zv(s,k)|0,WA(k);break}case 9:{if(m=ER(l)|0,l=n[m+4>>2]|0,l|0)for(B=Q+8|0,d=m+12|0;l=l+-1|0,Fc(k,n[d>>2]|0),f=n[j>>2]|0,f>>>0<(n[B>>2]|0)>>>0?(n[f>>2]=n[k>>2],n[j>>2]=(n[j>>2]|0)+4):cR(Q,k),l;)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q>>2],$v(s,no(0,B|0,l|0,c|0,bg(m)|0)|0),E=d}function _Oe(){var s=0;return o[8e3]|0||(HOe(10756),s=8e3,n[s>>2]=1,n[s+4>>2]=0),10756}function $v(s,l){s=s|0,l=l|0,FF(s,l)}function HOe(s){s=s|0,kl(s,qOe()|0,2)}function qOe(){return 1772}function jOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,Q=0,k=0,M=0;m=E,E=E+32|0,k=m+16|0,M=m+12|0,B=m,Q=Ql(GOe()|0)|0,c=Jm(c)|0,n[M>>2]=n[f>>2],n[k>>2]=n[M>>2],f=bg(k)|0,n[B>>2]=n[d>>2],k=d+4|0,n[B+4>>2]=n[k>>2],M=d+8|0,n[B+8>>2]=n[M>>2],n[M>>2]=0,n[k>>2]=0,n[d>>2]=0,$v(s,yc(0,Q|0,l|0,c|0,f|0,pR(B)|0)|0),tf(B),E=m}function GOe(){var s=0;return o[8008]|0||(WOe(10768),s=8008,n[s>>2]=1,n[s+4>>2]=0),10768}function WOe(s){s=s|0,kl(s,YOe()|0,3)}function YOe(){return 1784}function KOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,Q=0,k=0;m=E,E=E+16|0,Q=m+4|0,k=m,B=Ql(VOe()|0)|0,c=Jm(c)|0,n[k>>2]=n[f>>2],n[Q>>2]=n[k>>2],f=bg(Q)|0,$v(s,yc(0,B|0,l|0,c|0,f|0,fR(d)|0)|0),E=m}function VOe(){var s=0;return o[8016]|0||(JOe(10780),s=8016,n[s>>2]=1,n[s+4>>2]=0),10780}function JOe(s){s=s|0,kl(s,zOe()|0,3)}function zOe(){return 1800}function XOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=Ql(ZOe()|0)|0,$v(s,Dn(0,f|0,l|0,Jm(c)|0)|0)}function ZOe(){var s=0;return o[8024]|0||($Oe(10792),s=8024,n[s>>2]=1,n[s+4>>2]=0),10792}function $Oe(s){s=s|0,kl(s,eMe()|0,1)}function eMe(){return 1816}function tMe(){rMe(),nMe(),iMe()}function rMe(){n[2702]=A7(65536)|0}function nMe(){vMe(10856)}function iMe(){sMe(10816)}function sMe(s){s=s|0,oMe(s,5044),aMe(s)|0}function oMe(s,l){s=s|0,l=l|0;var c=0;c=P5()|0,n[s>>2]=c,yMe(c,l),bp(n[s>>2]|0)}function aMe(s){s=s|0;var l=0;return l=n[s>>2]|0,Pg(l,lMe()|0),s|0}function lMe(){var s=0;return o[8032]|0||(M5(10820),Zt(64,10820,_|0)|0,s=8032,n[s>>2]=1,n[s+4>>2]=0),br(10820)|0||M5(10820),10820}function M5(s){s=s|0,AMe(s),xg(s,25)}function cMe(s){s=s|0,uMe(s+24|0)}function uMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function AMe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,5,18,l,gMe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function fMe(s,l){s=s|0,l=l|0,pMe(s,l)}function pMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;c=E,E=E+16|0,f=c,d=c+4|0,Dg(d,l),n[f>>2]=Sg(d,l)|0,hMe(s,f),E=c}function hMe(s,l){s=s|0,l=l|0,U5(s+4|0,n[l>>2]|0),o[s+8>>0]=1}function U5(s,l){s=s|0,l=l|0,n[s>>2]=l}function gMe(){return 1824}function dMe(s){return s=s|0,mMe(s)|0}function mMe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;return c=E,E=E+16|0,d=c+4|0,B=c,f=za(8)|0,l=f,Q=Gt(4)|0,Dg(d,s),U5(Q,Sg(d,s)|0),m=l+4|0,n[m>>2]=Q,s=Gt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],x5(s,m,d),n[f>>2]=s,E=c,l|0}function za(s){s=s|0;var l=0,c=0;return s=s+7&-8,s>>>0<=32768&&(l=n[2701]|0,s>>>0<=(65536-l|0)>>>0)?(c=(n[2702]|0)+l|0,n[2701]=l+s,s=c):(s=A7(s+8|0)|0,n[s>>2]=n[2703],n[2703]=s,s=s+8|0),s|0}function yMe(s,l){s=s|0,l=l|0,n[s>>2]=EMe()|0,n[s+4>>2]=CMe()|0,n[s+12>>2]=l,n[s+8>>2]=IMe()|0,n[s+32>>2]=9}function EMe(){return 11744}function CMe(){return 1832}function IMe(){return zv()|0}function wMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(BMe(c),pt(c)):l|0&&pt(l)}function BMe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function vMe(s){s=s|0,DMe(s,5052),SMe(s)|0,PMe(s,5058,26)|0,xMe(s,5069,1)|0,bMe(s,5077,10)|0,QMe(s,5087,19)|0,kMe(s,5094,27)|0}function DMe(s,l){s=s|0,l=l|0;var c=0;c=BUe()|0,n[s>>2]=c,vUe(c,l),bp(n[s>>2]|0)}function SMe(s){s=s|0;var l=0;return l=n[s>>2]|0,Pg(l,cUe()|0),s|0}function PMe(s,l,c){return s=s|0,l=l|0,c=c|0,W4e(s,cn(l)|0,c,0),s|0}function xMe(s,l,c){return s=s|0,l=l|0,c=c|0,Q4e(s,cn(l)|0,c,0),s|0}function bMe(s,l,c){return s=s|0,l=l|0,c=c|0,l4e(s,cn(l)|0,c,0),s|0}function QMe(s,l,c){return s=s|0,l=l|0,c=c|0,KMe(s,cn(l)|0,c,0),s|0}function _5(s,l){s=s|0,l=l|0;var c=0,f=0;e:for(;;){for(c=n[2703]|0;;){if((c|0)==(l|0))break e;if(f=n[c>>2]|0,n[2703]=f,!c)c=f;else break}pt(c)}n[2701]=s}function kMe(s,l,c){return s=s|0,l=l|0,c=c|0,FMe(s,cn(l)|0,c,0),s|0}function FMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=hR()|0,s=RMe(c)|0,un(m,l,d,s,TMe(c,f)|0,f)}function hR(){var s=0,l=0;if(o[8040]|0||(q5(10860),Zt(65,10860,_|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(br(10860)|0)){s=10860,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));q5(10860)}return 10860}function RMe(s){return s=s|0,s|0}function TMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=hR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(H5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(NMe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function H5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function NMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=LMe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,OMe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,H5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,MMe(s,d),UMe(d),E=Q;return}}function LMe(s){return s=s|0,536870911}function OMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function MMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function UMe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function q5(s){s=s|0,qMe(s)}function _Me(s){s=s|0,HMe(s+24|0)}function HMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function qMe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,11,l,jMe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function jMe(){return 1840}function GMe(s,l,c){s=s|0,l=l|0,c=c|0,YMe(n[(WMe(s)|0)>>2]|0,l,c)}function WMe(s){return s=s|0,(n[(hR()|0)+24>>2]|0)+(s<<3)|0}function YMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;f=E,E=E+16|0,m=f+1|0,d=f,Dg(m,l),l=Sg(m,l)|0,Dg(d,c),c=Sg(d,c)|0,nf[s&31](l,c),E=f}function KMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=gR()|0,s=VMe(c)|0,un(m,l,d,s,JMe(c,f)|0,f)}function gR(){var s=0,l=0;if(o[8048]|0||(G5(10896),Zt(66,10896,_|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(br(10896)|0)){s=10896,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));G5(10896)}return 10896}function VMe(s){return s=s|0,s|0}function JMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=gR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(j5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(zMe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function j5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function zMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=XMe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,ZMe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,j5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,$Me(s,d),e4e(d),E=Q;return}}function XMe(s){return s=s|0,536870911}function ZMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function $Me(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function e4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function G5(s){s=s|0,n4e(s)}function t4e(s){s=s|0,r4e(s+24|0)}function r4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function n4e(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,11,l,i4e()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function i4e(){return 1852}function s4e(s,l){return s=s|0,l=l|0,a4e(n[(o4e(s)|0)>>2]|0,l)|0}function o4e(s){return s=s|0,(n[(gR()|0)+24>>2]|0)+(s<<3)|0}function a4e(s,l){s=s|0,l=l|0;var c=0,f=0;return c=E,E=E+16|0,f=c,Dg(f,l),l=Sg(f,l)|0,l=Vv(Rg[s&31](l)|0)|0,E=c,l|0}function l4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=dR()|0,s=c4e(c)|0,un(m,l,d,s,u4e(c,f)|0,f)}function dR(){var s=0,l=0;if(o[8056]|0||(Y5(10932),Zt(67,10932,_|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(br(10932)|0)){s=10932,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));Y5(10932)}return 10932}function c4e(s){return s=s|0,s|0}function u4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=dR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(W5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(A4e(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function W5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function A4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=f4e(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,p4e(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,W5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,h4e(s,d),g4e(d),E=Q;return}}function f4e(s){return s=s|0,536870911}function p4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function h4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function g4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function Y5(s){s=s|0,y4e(s)}function d4e(s){s=s|0,m4e(s+24|0)}function m4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function y4e(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,7,l,E4e()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function E4e(){return 1860}function C4e(s,l,c){return s=s|0,l=l|0,c=c|0,w4e(n[(I4e(s)|0)>>2]|0,l,c)|0}function I4e(s){return s=s|0,(n[(dR()|0)+24>>2]|0)+(s<<3)|0}function w4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0;return f=E,E=E+32|0,B=f+12|0,m=f+8|0,Q=f,k=f+16|0,d=f+4|0,B4e(k,l),v4e(Q,k,l),Dp(d,c),c=Sp(d,c)|0,n[B>>2]=n[Q>>2],FI[s&15](m,B,c),c=D4e(m)|0,WA(m),Pp(d),E=f,c|0}function B4e(s,l){s=s|0,l=l|0}function v4e(s,l,c){s=s|0,l=l|0,c=c|0,S4e(s,c)}function D4e(s){return s=s|0,ma(s)|0}function S4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=E,E=E+16|0,c=d,f=l,f&1?(P4e(c,0),$n(f|0,c|0)|0,x4e(s,c),b4e(c)):n[s>>2]=n[l>>2],E=d}function P4e(s,l){s=s|0,l=l|0,JG(s,l),n[s+4>>2]=0,o[s+8>>0]=0}function x4e(s,l){s=s|0,l=l|0,n[s>>2]=n[l+4>>2]}function b4e(s){s=s|0,o[s+8>>0]=0}function Q4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=mR()|0,s=k4e(c)|0,un(m,l,d,s,F4e(c,f)|0,f)}function mR(){var s=0,l=0;if(o[8064]|0||(V5(10968),Zt(68,10968,_|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(br(10968)|0)){s=10968,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));V5(10968)}return 10968}function k4e(s){return s=s|0,s|0}function F4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=mR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(K5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(R4e(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function K5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function R4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=T4e(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,N4e(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,K5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,L4e(s,d),O4e(d),E=Q;return}}function T4e(s){return s=s|0,536870911}function N4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function L4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function O4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function V5(s){s=s|0,_4e(s)}function M4e(s){s=s|0,U4e(s+24|0)}function U4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function _4e(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,1,l,H4e()|0,5),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function H4e(){return 1872}function q4e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,G4e(n[(j4e(s)|0)>>2]|0,l,c,f,d,m)}function j4e(s){return s=s|0,(n[(mR()|0)+24>>2]|0)+(s<<3)|0}function G4e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,j=0;B=E,E=E+32|0,Q=B+16|0,k=B+12|0,M=B+8|0,O=B+4|0,j=B,Dp(Q,l),l=Sp(Q,l)|0,Dp(k,c),c=Sp(k,c)|0,Dp(M,f),f=Sp(M,f)|0,Dp(O,d),d=Sp(O,d)|0,Dp(j,m),m=Sp(j,m)|0,d7[s&1](l,c,f,d,m),Pp(j),Pp(O),Pp(M),Pp(k),Pp(Q),E=B}function W4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=yR()|0,s=Y4e(c)|0,un(m,l,d,s,K4e(c,f)|0,f)}function yR(){var s=0,l=0;if(o[8072]|0||(z5(11004),Zt(69,11004,_|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(br(11004)|0)){s=11004,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));z5(11004)}return 11004}function Y4e(s){return s=s|0,s|0}function K4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=yR()|0,B=k+24|0,l=Ar(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(J5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(V4e(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function J5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function V4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=J4e(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,z4e(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,J5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,X4e(s,d),Z4e(d),E=Q;return}}function J4e(s){return s=s|0,536870911}function z4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Gt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function X4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Cr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Z4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&pt(s)}function z5(s){s=s|0,tUe(s)}function $4e(s){s=s|0,eUe(s+24|0)}function eUe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function tUe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,1,12,l,rUe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function rUe(){return 1896}function nUe(s,l,c){s=s|0,l=l|0,c=c|0,sUe(n[(iUe(s)|0)>>2]|0,l,c)}function iUe(s){return s=s|0,(n[(yR()|0)+24>>2]|0)+(s<<3)|0}function sUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;f=E,E=E+16|0,m=f+4|0,d=f,oUe(m,l),l=aUe(m,l)|0,Dp(d,c),c=Sp(d,c)|0,nf[s&31](l,c),Pp(d),E=f}function oUe(s,l){s=s|0,l=l|0}function aUe(s,l){return s=s|0,l=l|0,lUe(l)|0}function lUe(s){return s=s|0,s|0}function cUe(){var s=0;return o[8080]|0||(X5(11040),Zt(70,11040,_|0)|0,s=8080,n[s>>2]=1,n[s+4>>2]=0),br(11040)|0||X5(11040),11040}function X5(s){s=s|0,fUe(s),xg(s,71)}function uUe(s){s=s|0,AUe(s+24|0)}function AUe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),pt(c))}function fUe(s){s=s|0;var l=0;l=Gr()|0,Wr(s,5,7,l,dUe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function pUe(s){s=s|0,hUe(s)}function hUe(s){s=s|0,gUe(s)}function gUe(s){s=s|0,o[s+8>>0]=1}function dUe(){return 1936}function mUe(){return yUe()|0}function yUe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=E,E=E+16|0,d=l+4|0,B=l,c=za(8)|0,s=c,m=s+4|0,n[m>>2]=Gt(1)|0,f=Gt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],EUe(f,m,d),n[c>>2]=f,E=l,s|0}function EUe(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Gt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1916,n[c+12>>2]=l,n[s+4>>2]=c}function CUe(s){s=s|0,Zm(s),pt(s)}function IUe(s){s=s|0,s=n[s+12>>2]|0,s|0&&pt(s)}function wUe(s){s=s|0,pt(s)}function BUe(){var s=0;return o[8088]|0||(QUe(11076),Zt(25,11076,_|0)|0,s=8088,n[s>>2]=1,n[s+4>>2]=0),11076}function vUe(s,l){s=s|0,l=l|0,n[s>>2]=DUe()|0,n[s+4>>2]=SUe()|0,n[s+12>>2]=l,n[s+8>>2]=PUe()|0,n[s+32>>2]=10}function DUe(){return 11745}function SUe(){return 1940}function PUe(){return Jv()|0}function xUe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(bUe(c),pt(c)):l|0&&pt(l)}function bUe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function QUe(s){s=s|0,vp(s)}function Fc(s,l){s=s|0,l=l|0,n[s>>2]=l}function ER(s){return s=s|0,n[s>>2]|0}function kUe(s){return s=s|0,o[n[s>>2]>>0]|0}function FUe(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,n[f>>2]=n[s>>2],RUe(l,f)|0,E=c}function RUe(s,l){s=s|0,l=l|0;var c=0;return c=TUe(n[s>>2]|0,l)|0,l=s+4|0,n[(n[l>>2]|0)+8>>2]=c,n[(n[l>>2]|0)+8>>2]|0}function TUe(s,l){s=s|0,l=l|0;var c=0,f=0;return c=E,E=E+16|0,f=c,Xa(f),s=ma(s)|0,l=NUe(s,n[l>>2]|0)|0,Za(f),E=c,l|0}function Xa(s){s=s|0,n[s>>2]=n[2701],n[s+4>>2]=n[2703]}function NUe(s,l){s=s|0,l=l|0;var c=0;return c=Ql(LUe()|0)|0,Dn(0,c|0,s|0,fR(l)|0)|0}function Za(s){s=s|0,_5(n[s>>2]|0,n[s+4>>2]|0)}function LUe(){var s=0;return o[8096]|0||(OUe(11120),s=8096,n[s>>2]=1,n[s+4>>2]=0),11120}function OUe(s){s=s|0,kl(s,MUe()|0,1)}function MUe(){return 1948}function UUe(){_Ue()}function _Ue(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0,Ye=0,Le=0,Re=0;if(Le=E,E=E+16|0,O=Le+4|0,j=Le,Fi(65536,10804,n[2702]|0,10812),c=I5()|0,l=n[c>>2]|0,s=n[l>>2]|0,s|0)for(f=n[c+8>>2]|0,c=n[c+4>>2]|0;gc(s|0,u[c>>0]|0|0,o[f>>0]|0),l=l+4|0,s=n[l>>2]|0,s;)f=f+1|0,c=c+1|0;if(s=w5()|0,l=n[s>>2]|0,l|0)do du(l|0,n[s+4>>2]|0),s=s+8|0,l=n[s>>2]|0;while((l|0)!=0);du(HUe()|0,5167),M=Km()|0,s=n[M>>2]|0;e:do if(s|0){do qUe(n[s+4>>2]|0),s=n[s>>2]|0;while((s|0)!=0);if(s=n[M>>2]|0,s|0){k=M;do{for(;d=s,s=n[s>>2]|0,d=n[d+4>>2]|0,!!(jUe(d)|0);)if(n[j>>2]=k,n[O>>2]=n[j>>2],GUe(M,O)|0,!s)break e;if(WUe(d),k=n[k>>2]|0,l=Z5(d)|0,m=_i()|0,B=E,E=E+((1*(l<<2)|0)+15&-16)|0,Q=E,E=E+((1*(l<<2)|0)+15&-16)|0,l=n[(T5(d)|0)>>2]|0,l|0)for(c=B,f=Q;n[c>>2]=n[(Vm(n[l+4>>2]|0)|0)>>2],n[f>>2]=n[l+8>>2],l=n[l>>2]|0,l;)c=c+4|0,f=f+4|0;Re=Vm(d)|0,l=YUe(d)|0,c=Z5(d)|0,f=KUe(d)|0,mu(Re|0,l|0,B|0,Q|0,c|0,f|0,oR(d)|0),Ui(m|0)}while((s|0)!=0)}}while(0);if(s=n[(aR()|0)>>2]|0,s|0)do Re=s+4|0,M=lR(Re)|0,d=xI(M)|0,m=SI(M)|0,B=(PI(M)|0)+1|0,Q=eD(M)|0,k=$5(Re)|0,M=br(M)|0,O=Xv(Re)|0,j=CR(Re)|0,wl(0,d|0,m|0,B|0,Q|0,k|0,M|0,O|0,j|0,IR(Re)|0),s=n[s>>2]|0;while((s|0)!=0);s=n[(Km()|0)>>2]|0;e:do if(s|0){t:for(;;){if(l=n[s+4>>2]|0,l|0&&(se=n[(Vm(l)|0)>>2]|0,Ye=n[(N5(l)|0)>>2]|0,Ye|0)){c=Ye;do{l=c+4|0,f=lR(l)|0;r:do if(f|0)switch(br(f)|0){case 0:break t;case 4:case 3:case 2:{Q=xI(f)|0,k=SI(f)|0,M=(PI(f)|0)+1|0,O=eD(f)|0,j=br(f)|0,Re=Xv(l)|0,wl(se|0,Q|0,k|0,M|0,O|0,0,j|0,Re|0,CR(l)|0,IR(l)|0);break r}case 1:{B=xI(f)|0,Q=SI(f)|0,k=(PI(f)|0)+1|0,M=eD(f)|0,O=$5(l)|0,j=br(f)|0,Re=Xv(l)|0,wl(se|0,B|0,Q|0,k|0,M|0,O|0,j|0,Re|0,CR(l)|0,IR(l)|0);break r}case 5:{M=xI(f)|0,O=SI(f)|0,j=(PI(f)|0)+1|0,Re=eD(f)|0,wl(se|0,M|0,O|0,j|0,Re|0,VUe(f)|0,br(f)|0,0,0,0);break r}default:break r}while(0);c=n[c>>2]|0}while((c|0)!=0)}if(s=n[s>>2]|0,!s)break e}Rt()}while(0);Ce(),E=Le}function HUe(){return 11703}function qUe(s){s=s|0,o[s+40>>0]=0}function jUe(s){return s=s|0,(o[s+40>>0]|0)!=0|0}function GUe(s,l){return s=s|0,l=l|0,l=JUe(l)|0,s=n[l>>2]|0,n[l>>2]=n[s>>2],pt(s),n[l>>2]|0}function WUe(s){s=s|0,o[s+40>>0]=1}function Z5(s){return s=s|0,n[s+20>>2]|0}function YUe(s){return s=s|0,n[s+8>>2]|0}function KUe(s){return s=s|0,n[s+32>>2]|0}function eD(s){return s=s|0,n[s+4>>2]|0}function $5(s){return s=s|0,n[s+4>>2]|0}function CR(s){return s=s|0,n[s+8>>2]|0}function IR(s){return s=s|0,n[s+16>>2]|0}function VUe(s){return s=s|0,n[s+20>>2]|0}function JUe(s){return s=s|0,n[s>>2]|0}function tD(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0,Ye=0,Le=0,Re=0,et=0,Ze=0,at=0,He=0,Ge=0,Tt=0;Tt=E,E=E+16|0,se=Tt;do if(s>>>0<245){if(M=s>>>0<11?16:s+11&-8,s=M>>>3,j=n[2783]|0,c=j>>>s,c&3|0)return l=(c&1^1)+s|0,s=11172+(l<<1<<2)|0,c=s+8|0,f=n[c>>2]|0,d=f+8|0,m=n[d>>2]|0,(s|0)==(m|0)?n[2783]=j&~(1<<l):(n[m+12>>2]=s,n[c>>2]=m),Ge=l<<3,n[f+4>>2]=Ge|3,Ge=f+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1,Ge=d,E=Tt,Ge|0;if(O=n[2785]|0,M>>>0>O>>>0){if(c|0)return l=2<<s,l=c<<s&(l|0-l),l=(l&0-l)+-1|0,B=l>>>12&16,l=l>>>B,c=l>>>5&8,l=l>>>c,d=l>>>2&4,l=l>>>d,s=l>>>1&2,l=l>>>s,f=l>>>1&1,f=(c|B|d|s|f)+(l>>>f)|0,l=11172+(f<<1<<2)|0,s=l+8|0,d=n[s>>2]|0,B=d+8|0,c=n[B>>2]|0,(l|0)==(c|0)?(s=j&~(1<<f),n[2783]=s):(n[c+12>>2]=l,n[s>>2]=c,s=j),m=(f<<3)-M|0,n[d+4>>2]=M|3,f=d+M|0,n[f+4>>2]=m|1,n[f+m>>2]=m,O|0&&(d=n[2788]|0,l=O>>>3,c=11172+(l<<1<<2)|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=c),n[2785]=m,n[2788]=f,Ge=B,E=Tt,Ge|0;if(Q=n[2784]|0,Q){if(c=(Q&0-Q)+-1|0,B=c>>>12&16,c=c>>>B,m=c>>>5&8,c=c>>>m,k=c>>>2&4,c=c>>>k,f=c>>>1&2,c=c>>>f,s=c>>>1&1,s=n[11436+((m|B|k|f|s)+(c>>>s)<<2)>>2]|0,c=(n[s+4>>2]&-8)-M|0,f=n[s+16+(((n[s+16>>2]|0)==0&1)<<2)>>2]|0,!f)k=s,m=c;else{do B=(n[f+4>>2]&-8)-M|0,k=B>>>0<c>>>0,c=k?B:c,s=k?f:s,f=n[f+16+(((n[f+16>>2]|0)==0&1)<<2)>>2]|0;while((f|0)!=0);k=s,m=c}if(B=k+M|0,k>>>0<B>>>0){d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(s=k+20|0,l=n[s>>2]|0,!l&&(s=k+16|0,l=n[s>>2]|0,!l)){c=0;break}for(;;){if(c=l+20|0,f=n[c>>2]|0,f|0){l=f,s=c;continue}if(c=l+16|0,f=n[c>>2]|0,f)l=f,s=c;else break}n[s>>2]=0,c=l}else c=n[k+8>>2]|0,n[c+12>>2]=l,n[l+8>>2]=c,c=l;while(0);do if(d|0){if(l=n[k+28>>2]|0,s=11436+(l<<2)|0,(k|0)==(n[s>>2]|0)){if(n[s>>2]=c,!c){n[2784]=Q&~(1<<l);break}}else if(n[d+16+(((n[d+16>>2]|0)!=(k|0)&1)<<2)>>2]=c,!c)break;n[c+24>>2]=d,l=n[k+16>>2]|0,l|0&&(n[c+16>>2]=l,n[l+24>>2]=c),l=n[k+20>>2]|0,l|0&&(n[c+20>>2]=l,n[l+24>>2]=c)}while(0);return m>>>0<16?(Ge=m+M|0,n[k+4>>2]=Ge|3,Ge=k+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1):(n[k+4>>2]=M|3,n[B+4>>2]=m|1,n[B+m>>2]=m,O|0&&(f=n[2788]|0,l=O>>>3,c=11172+(l<<1<<2)|0,l=1<<l,j&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=j|l,l=c,s=c+8|0),n[s>>2]=f,n[l+12>>2]=f,n[f+8>>2]=l,n[f+12>>2]=c),n[2785]=m,n[2788]=B),Ge=k+8|0,E=Tt,Ge|0}else j=M}else j=M}else j=M}else if(s>>>0<=4294967231)if(s=s+11|0,M=s&-8,k=n[2784]|0,k){f=0-M|0,s=s>>>8,s?M>>>0>16777215?Q=31:(j=(s+1048320|0)>>>16&8,He=s<<j,O=(He+520192|0)>>>16&4,He=He<<O,Q=(He+245760|0)>>>16&2,Q=14-(O|j|Q)+(He<<Q>>>15)|0,Q=M>>>(Q+7|0)&1|Q<<1):Q=0,c=n[11436+(Q<<2)>>2]|0;e:do if(!c)c=0,s=0,He=57;else for(s=0,B=M<<((Q|0)==31?0:25-(Q>>>1)|0),m=0;;){if(d=(n[c+4>>2]&-8)-M|0,d>>>0<f>>>0)if(d)s=c,f=d;else{s=c,f=0,d=c,He=61;break e}if(d=n[c+20>>2]|0,c=n[c+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(c|0)?m:d,d=(c|0)==0,d){c=m,He=57;break}else B=B<<((d^1)&1)}while(0);if((He|0)==57){if((c|0)==0&(s|0)==0){if(s=2<<Q,s=k&(s|0-s),!s){j=M;break}j=(s&0-s)+-1|0,B=j>>>12&16,j=j>>>B,m=j>>>5&8,j=j>>>m,Q=j>>>2&4,j=j>>>Q,O=j>>>1&2,j=j>>>O,c=j>>>1&1,s=0,c=n[11436+((m|B|Q|O|c)+(j>>>c)<<2)>>2]|0}c?(d=c,He=61):(Q=s,B=f)}if((He|0)==61)for(;;)if(He=0,c=(n[d+4>>2]&-8)-M|0,j=c>>>0<f>>>0,c=j?c:f,s=j?d:s,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)f=c,He=61;else{Q=s,B=c;break}if((Q|0)!=0&&B>>>0<((n[2785]|0)-M|0)>>>0){if(m=Q+M|0,Q>>>0>=m>>>0)return Ge=0,E=Tt,Ge|0;d=n[Q+24>>2]|0,l=n[Q+12>>2]|0;do if((l|0)==(Q|0)){if(s=Q+20|0,l=n[s>>2]|0,!l&&(s=Q+16|0,l=n[s>>2]|0,!l)){l=0;break}for(;;){if(c=l+20|0,f=n[c>>2]|0,f|0){l=f,s=c;continue}if(c=l+16|0,f=n[c>>2]|0,f)l=f,s=c;else break}n[s>>2]=0}else Ge=n[Q+8>>2]|0,n[Ge+12>>2]=l,n[l+8>>2]=Ge;while(0);do if(d){if(s=n[Q+28>>2]|0,c=11436+(s<<2)|0,(Q|0)==(n[c>>2]|0)){if(n[c>>2]=l,!l){f=k&~(1<<s),n[2784]=f;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(Q|0)&1)<<2)>>2]=l,!l){f=k;break}n[l+24>>2]=d,s=n[Q+16>>2]|0,s|0&&(n[l+16>>2]=s,n[s+24>>2]=l),s=n[Q+20>>2]|0,s&&(n[l+20>>2]=s,n[s+24>>2]=l),f=k}else f=k;while(0);do if(B>>>0>=16){if(n[Q+4>>2]=M|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=c;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(He=(l+1048320|0)>>>16&8,Ge=l<<He,at=(Ge+520192|0)>>>16&4,Ge=Ge<<at,l=(Ge+245760|0)>>>16&2,l=14-(at|He|l)+(Ge<<l>>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,c=11436+(l<<2)|0,n[m+28>>2]=l,s=m+16|0,n[s+4>>2]=0,n[s>>2]=0,s=1<<l,!(f&s)){n[2784]=f|s,n[c>>2]=m,n[m+24>>2]=c,n[m+12>>2]=m,n[m+8>>2]=m;break}for(s=B<<((l|0)==31?0:25-(l>>>1)|0),c=n[c>>2]|0;;){if((n[c+4>>2]&-8|0)==(B|0)){He=97;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{He=96;break}}if((He|0)==96){n[f>>2]=m,n[m+24>>2]=c,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((He|0)==97){He=c+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=m,n[He>>2]=m,n[m+8>>2]=Ge,n[m+12>>2]=c,n[m+24>>2]=0;break}}else Ge=B+M|0,n[Q+4>>2]=Ge|3,Ge=Q+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1;while(0);return Ge=Q+8|0,E=Tt,Ge|0}else j=M}else j=M;else j=-1;while(0);if(c=n[2785]|0,c>>>0>=j>>>0)return l=c-j|0,s=n[2788]|0,l>>>0>15?(Ge=s+j|0,n[2788]=Ge,n[2785]=l,n[Ge+4>>2]=l|1,n[Ge+l>>2]=l,n[s+4>>2]=j|3):(n[2785]=0,n[2788]=0,n[s+4>>2]=c|3,Ge=s+c+4|0,n[Ge>>2]=n[Ge>>2]|1),Ge=s+8|0,E=Tt,Ge|0;if(B=n[2786]|0,B>>>0>j>>>0)return at=B-j|0,n[2786]=at,Ge=n[2789]|0,He=Ge+j|0,n[2789]=He,n[He+4>>2]=at|1,n[Ge+4>>2]=j|3,Ge=Ge+8|0,E=Tt,Ge|0;if(n[2901]|0?s=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,s=se&-16^1431655768,n[se>>2]=s,n[2901]=s,s=4096),Q=j+48|0,k=j+47|0,m=s+k|0,d=0-s|0,M=m&d,M>>>0<=j>>>0||(s=n[2893]|0,s|0&&(O=n[2891]|0,se=O+M|0,se>>>0<=O>>>0|se>>>0>s>>>0)))return Ge=0,E=Tt,Ge|0;e:do if(n[2894]&4)l=0,He=133;else{c=n[2789]|0;t:do if(c){for(f=11580;s=n[f>>2]|0,!(s>>>0<=c>>>0&&(Re=f+4|0,(s+(n[Re>>2]|0)|0)>>>0>c>>>0));)if(s=n[f+8>>2]|0,s)f=s;else{He=118;break t}if(l=m-B&d,l>>>0<2147483647)if(s=kp(l|0)|0,(s|0)==((n[f>>2]|0)+(n[Re>>2]|0)|0)){if((s|0)!=-1){B=l,m=s,He=135;break e}}else f=s,He=126;else l=0}else He=118;while(0);do if((He|0)==118)if(c=kp(0)|0,(c|0)!=-1&&(l=c,Ye=n[2902]|0,Le=Ye+-1|0,l=((Le&l|0)==0?0:(Le+l&0-Ye)-l|0)+M|0,Ye=n[2891]|0,Le=l+Ye|0,l>>>0>j>>>0&l>>>0<2147483647)){if(Re=n[2893]|0,Re|0&&Le>>>0<=Ye>>>0|Le>>>0>Re>>>0){l=0;break}if(s=kp(l|0)|0,(s|0)==(c|0)){B=l,m=c,He=135;break e}else f=s,He=126}else l=0;while(0);do if((He|0)==126){if(c=0-l|0,!(Q>>>0>l>>>0&(l>>>0<2147483647&(f|0)!=-1)))if((f|0)==-1){l=0;break}else{B=l,m=f,He=135;break e}if(s=n[2903]|0,s=k-l+s&0-s,s>>>0>=2147483647){B=l,m=f,He=135;break e}if((kp(s|0)|0)==-1){kp(c|0)|0,l=0;break}else{B=s+l|0,m=f,He=135;break e}}while(0);n[2894]=n[2894]|4,He=133}while(0);if((He|0)==133&&M>>>0<2147483647&&(at=kp(M|0)|0,Re=kp(0)|0,et=Re-at|0,Ze=et>>>0>(j+40|0)>>>0,!((at|0)==-1|Ze^1|at>>>0<Re>>>0&((at|0)!=-1&(Re|0)!=-1)^1))&&(B=Ze?et:l,m=at,He=135),(He|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),k=n[2789]|0;do if(k){for(l=11580;;){if(s=n[l>>2]|0,c=l+4|0,f=n[c>>2]|0,(m|0)==(s+f|0)){He=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((He|0)==145&&(n[l+12>>2]&8|0)==0&&k>>>0<m>>>0&k>>>0>=s>>>0){n[c>>2]=f+B,Ge=k+8|0,Ge=(Ge&7|0)==0?0:0-Ge&7,He=k+Ge|0,Ge=(n[2786]|0)+(B-Ge)|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),c=m+B|0,l=11580;;){if((n[l>>2]|0)==(c|0)){He=153;break}if(s=n[l+8>>2]|0,s)l=s;else break}if((He|0)==153&&(n[l+12>>2]&8|0)==0){n[l>>2]=m,O=l+4|0,n[O>>2]=(n[O>>2]|0)+B,O=m+8|0,O=m+((O&7|0)==0?0:0-O&7)|0,l=c+8|0,l=c+((l&7|0)==0?0:0-l&7)|0,M=O+j|0,Q=l-O-j|0,n[O+4>>2]=j|3;do if((l|0)!=(k|0)){if((l|0)==(n[2788]|0)){Ge=(n[2785]|0)+Q|0,n[2785]=Ge,n[2788]=M,n[M+4>>2]=Ge|1,n[M+Ge>>2]=Ge;break}if(s=n[l+4>>2]|0,(s&3|0)==1){B=s&-8,f=s>>>3;e:do if(s>>>0<256)if(s=n[l+8>>2]|0,c=n[l+12>>2]|0,(c|0)==(s|0)){n[2783]=n[2783]&~(1<<f);break}else{n[s+12>>2]=c,n[c+8>>2]=s;break}else{m=n[l+24>>2]|0,s=n[l+12>>2]|0;do if((s|0)==(l|0)){if(f=l+16|0,c=f+4|0,s=n[c>>2]|0,!s)if(s=n[f>>2]|0,s)c=f;else{s=0;break}for(;;){if(f=s+20|0,d=n[f>>2]|0,d|0){s=d,c=f;continue}if(f=s+16|0,d=n[f>>2]|0,d)s=d,c=f;else break}n[c>>2]=0}else Ge=n[l+8>>2]|0,n[Ge+12>>2]=s,n[s+8>>2]=Ge;while(0);if(!m)break;c=n[l+28>>2]|0,f=11436+(c<<2)|0;do if((l|0)!=(n[f>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=s,!s)break e}else{if(n[f>>2]=s,s|0)break;n[2784]=n[2784]&~(1<<c);break e}while(0);if(n[s+24>>2]=m,c=l+16|0,f=n[c>>2]|0,f|0&&(n[s+16>>2]=f,n[f+24>>2]=s),c=n[c+4>>2]|0,!c)break;n[s+20>>2]=c,n[c+24>>2]=s}while(0);l=l+B|0,d=B+Q|0}else d=Q;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[M+4>>2]=d|1,n[M+d>>2]=d,l=d>>>3,d>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=M,n[l+12>>2]=M,n[M+8>>2]=l,n[M+12>>2]=c;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}He=(l+1048320|0)>>>16&8,Ge=l<<He,at=(Ge+520192|0)>>>16&4,Ge=Ge<<at,l=(Ge+245760|0)>>>16&2,l=14-(at|He|l)+(Ge<<l>>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(0);if(f=11436+(l<<2)|0,n[M+28>>2]=l,s=M+16|0,n[s+4>>2]=0,n[s>>2]=0,s=n[2784]|0,c=1<<l,!(s&c)){n[2784]=s|c,n[f>>2]=M,n[M+24>>2]=f,n[M+12>>2]=M,n[M+8>>2]=M;break}for(s=d<<((l|0)==31?0:25-(l>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(d|0)){He=194;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{He=193;break}}if((He|0)==193){n[f>>2]=M,n[M+24>>2]=c,n[M+12>>2]=M,n[M+8>>2]=M;break}else if((He|0)==194){He=c+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=M,n[He>>2]=M,n[M+8>>2]=Ge,n[M+12>>2]=c,n[M+24>>2]=0;break}}else Ge=(n[2786]|0)+Q|0,n[2786]=Ge,n[2789]=M,n[M+4>>2]=Ge|1;while(0);return Ge=O+8|0,E=Tt,Ge|0}for(l=11580;s=n[l>>2]|0,!(s>>>0<=k>>>0&&(Ge=s+(n[l+4>>2]|0)|0,Ge>>>0>k>>>0));)l=n[l+8>>2]|0;d=Ge+-47|0,s=d+8|0,s=d+((s&7|0)==0?0:0-s&7)|0,d=k+16|0,s=s>>>0<d>>>0?k:s,l=s+8|0,c=m+8|0,c=(c&7|0)==0?0:0-c&7,He=m+c|0,c=B+-40-c|0,n[2789]=He,n[2786]=c,n[He+4>>2]=c|1,n[He+c+4>>2]=40,n[2790]=n[2905],c=s+4|0,n[c>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=s+24|0;do He=l,l=l+4|0,n[l>>2]=7;while((He+8|0)>>>0<Ge>>>0);if((s|0)!=(k|0)){if(m=s-k|0,n[c>>2]=n[c>>2]&-2,n[k+4>>2]=m|1,n[s>>2]=m,l=m>>>3,m>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=k,n[l+12>>2]=k,n[k+8>>2]=l,n[k+12>>2]=c;break}if(l=m>>>8,l?m>>>0>16777215?c=31:(He=(l+1048320|0)>>>16&8,Ge=l<<He,at=(Ge+520192|0)>>>16&4,Ge=Ge<<at,c=(Ge+245760|0)>>>16&2,c=14-(at|He|c)+(Ge<<c>>>15)|0,c=m>>>(c+7|0)&1|c<<1):c=0,f=11436+(c<<2)|0,n[k+28>>2]=c,n[k+20>>2]=0,n[d>>2]=0,l=n[2784]|0,s=1<<c,!(l&s)){n[2784]=l|s,n[f>>2]=k,n[k+24>>2]=f,n[k+12>>2]=k,n[k+8>>2]=k;break}for(s=m<<((c|0)==31?0:25-(c>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(m|0)){He=216;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{He=215;break}}if((He|0)==215){n[f>>2]=k,n[k+24>>2]=c,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((He|0)==216){He=c+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=k,n[He>>2]=k,n[k+8>>2]=Ge,n[k+12>>2]=c,n[k+24>>2]=0;break}}}else{Ge=n[2787]|0,(Ge|0)==0|m>>>0<Ge>>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do Ge=11172+(l<<1<<2)|0,n[Ge+12>>2]=Ge,n[Ge+8>>2]=Ge,l=l+1|0;while((l|0)!=32);Ge=m+8|0,Ge=(Ge&7|0)==0?0:0-Ge&7,He=m+Ge|0,Ge=B+-40-Ge|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905]}while(0);if(l=n[2786]|0,l>>>0>j>>>0)return at=l-j|0,n[2786]=at,Ge=n[2789]|0,He=Ge+j|0,n[2789]=He,n[He+4>>2]=at|1,n[Ge+4>>2]=j|3,Ge=Ge+8|0,E=Tt,Ge|0}return n[(zm()|0)>>2]=12,Ge=0,E=Tt,Ge|0}function rD(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0;if(!!s){c=s+-8|0,d=n[2787]|0,s=n[s+-4>>2]|0,l=s&-8,k=c+l|0;do if(s&1)Q=c,B=c;else{if(f=n[c>>2]|0,!(s&3)||(B=c+(0-f)|0,m=f+l|0,B>>>0<d>>>0))return;if((B|0)==(n[2788]|0)){if(s=k+4|0,l=n[s>>2]|0,(l&3|0)!=3){Q=B,l=m;break}n[2785]=m,n[s>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(c=f>>>3,f>>>0<256)if(s=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(s|0)){n[2783]=n[2783]&~(1<<c),Q=B,l=m;break}else{n[s+12>>2]=l,n[l+8>>2]=s,Q=B,l=m;break}d=n[B+24>>2]|0,s=n[B+12>>2]|0;do if((s|0)==(B|0)){if(c=B+16|0,l=c+4|0,s=n[l>>2]|0,!s)if(s=n[c>>2]|0,s)l=c;else{s=0;break}for(;;){if(c=s+20|0,f=n[c>>2]|0,f|0){s=f,l=c;continue}if(c=s+16|0,f=n[c>>2]|0,f)s=f,l=c;else break}n[l>>2]=0}else Q=n[B+8>>2]|0,n[Q+12>>2]=s,n[s+8>>2]=Q;while(0);if(d){if(l=n[B+28>>2]|0,c=11436+(l<<2)|0,(B|0)==(n[c>>2]|0)){if(n[c>>2]=s,!s){n[2784]=n[2784]&~(1<<l),Q=B,l=m;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(B|0)&1)<<2)>>2]=s,!s){Q=B,l=m;break}n[s+24>>2]=d,l=B+16|0,c=n[l>>2]|0,c|0&&(n[s+16>>2]=c,n[c+24>>2]=s),l=n[l+4>>2]|0,l?(n[s+20>>2]=l,n[l+24>>2]=s,Q=B,l=m):(Q=B,l=m)}else Q=B,l=m}while(0);if(!(B>>>0>=k>>>0)&&(s=k+4|0,f=n[s>>2]|0,!!(f&1))){if(f&2)n[s>>2]=f&-2,n[Q+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(s=n[2788]|0,(k|0)==(n[2789]|0)){if(k=(n[2786]|0)+l|0,n[2786]=k,n[2789]=Q,n[Q+4>>2]=k|1,(Q|0)!=(s|0))return;n[2788]=0,n[2785]=0;return}if((k|0)==(s|0)){k=(n[2785]|0)+l|0,n[2785]=k,n[2788]=B,n[Q+4>>2]=k|1,n[B+k>>2]=k;return}d=(f&-8)+l|0,c=f>>>3;do if(f>>>0<256)if(l=n[k+8>>2]|0,s=n[k+12>>2]|0,(s|0)==(l|0)){n[2783]=n[2783]&~(1<<c);break}else{n[l+12>>2]=s,n[s+8>>2]=l;break}else{m=n[k+24>>2]|0,s=n[k+12>>2]|0;do if((s|0)==(k|0)){if(c=k+16|0,l=c+4|0,s=n[l>>2]|0,!s)if(s=n[c>>2]|0,s)l=c;else{c=0;break}for(;;){if(c=s+20|0,f=n[c>>2]|0,f|0){s=f,l=c;continue}if(c=s+16|0,f=n[c>>2]|0,f)s=f,l=c;else break}n[l>>2]=0,c=s}else c=n[k+8>>2]|0,n[c+12>>2]=s,n[s+8>>2]=c,c=s;while(0);if(m|0){if(s=n[k+28>>2]|0,l=11436+(s<<2)|0,(k|0)==(n[l>>2]|0)){if(n[l>>2]=c,!c){n[2784]=n[2784]&~(1<<s);break}}else if(n[m+16+(((n[m+16>>2]|0)!=(k|0)&1)<<2)>>2]=c,!c)break;n[c+24>>2]=m,s=k+16|0,l=n[s>>2]|0,l|0&&(n[c+16>>2]=l,n[l+24>>2]=c),s=n[s+4>>2]|0,s|0&&(n[c+20>>2]=s,n[s+24>>2]=c)}}while(0);if(n[Q+4>>2]=d|1,n[B+d>>2]=d,(Q|0)==(n[2788]|0)){n[2785]=d;return}}if(s=d>>>3,d>>>0<256){c=11172+(s<<1<<2)|0,l=n[2783]|0,s=1<<s,l&s?(l=c+8|0,s=n[l>>2]|0):(n[2783]=l|s,s=c,l=c+8|0),n[l>>2]=Q,n[s+12>>2]=Q,n[Q+8>>2]=s,n[Q+12>>2]=c;return}s=d>>>8,s?d>>>0>16777215?s=31:(B=(s+1048320|0)>>>16&8,k=s<<B,m=(k+520192|0)>>>16&4,k=k<<m,s=(k+245760|0)>>>16&2,s=14-(m|B|s)+(k<<s>>>15)|0,s=d>>>(s+7|0)&1|s<<1):s=0,f=11436+(s<<2)|0,n[Q+28>>2]=s,n[Q+20>>2]=0,n[Q+16>>2]=0,l=n[2784]|0,c=1<<s;do if(l&c){for(l=d<<((s|0)==31?0:25-(s>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(d|0)){s=73;break}if(f=c+16+(l>>>31<<2)|0,s=n[f>>2]|0,s)l=l<<1,c=s;else{s=72;break}}if((s|0)==72){n[f>>2]=Q,n[Q+24>>2]=c,n[Q+12>>2]=Q,n[Q+8>>2]=Q;break}else if((s|0)==73){B=c+8|0,k=n[B>>2]|0,n[k+12>>2]=Q,n[B>>2]=Q,n[Q+8>>2]=k,n[Q+12>>2]=c,n[Q+24>>2]=0;break}}else n[2784]=l|c,n[f>>2]=Q,n[Q+24>>2]=f,n[Q+12>>2]=Q,n[Q+8>>2]=Q;while(0);if(k=(n[2791]|0)+-1|0,n[2791]=k,!k)s=11588;else return;for(;s=n[s>>2]|0,s;)s=s+8|0;n[2791]=-1}}}function zUe(){return 11628}function XUe(s){s=s|0;var l=0,c=0;return l=E,E=E+16|0,c=l,n[c>>2]=e3e(n[s+60>>2]|0)|0,s=nD(Ec(6,c|0)|0)|0,E=l,s|0}function e7(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0,Ye=0;j=E,E=E+48|0,M=j+16|0,m=j,d=j+32|0,Q=s+28|0,f=n[Q>>2]|0,n[d>>2]=f,k=s+20|0,f=(n[k>>2]|0)-f|0,n[d+4>>2]=f,n[d+8>>2]=l,n[d+12>>2]=c,f=f+c|0,B=s+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=nD(Hi(146,m|0)|0)|0;e:do if((f|0)!=(m|0)){for(l=2;!((m|0)<0);)if(f=f-m|0,Ye=n[d+4>>2]|0,se=m>>>0>Ye>>>0,d=se?d+8|0:d,l=(se<<31>>31)+l|0,Ye=m-(se?Ye:0)|0,n[d>>2]=(n[d>>2]|0)+Ye,se=d+4|0,n[se>>2]=(n[se>>2]|0)-Ye,n[M>>2]=n[B>>2],n[M+4>>2]=d,n[M+8>>2]=l,m=nD(Hi(146,M|0)|0)|0,(f|0)==(m|0)){O=3;break e}n[s+16>>2]=0,n[Q>>2]=0,n[k>>2]=0,n[s>>2]=n[s>>2]|32,(l|0)==2?c=0:c=c-(n[d+4>>2]|0)|0}else O=3;while(0);return(O|0)==3&&(Ye=n[s+44>>2]|0,n[s+16>>2]=Ye+(n[s+48>>2]|0),n[Q>>2]=Ye,n[k>>2]=Ye),E=j,c|0}function ZUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return d=E,E=E+32|0,m=d,f=d+20|0,n[m>>2]=n[s+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=f,n[m+16>>2]=c,(nD(na(140,m|0)|0)|0)<0?(n[f>>2]=-1,s=-1):s=n[f>>2]|0,E=d,s|0}function nD(s){return s=s|0,s>>>0>4294963200&&(n[(zm()|0)>>2]=0-s,s=-1),s|0}function zm(){return($Ue()|0)+64|0}function $Ue(){return wR()|0}function wR(){return 2084}function e3e(s){return s=s|0,s|0}function t3e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;return d=E,E=E+32|0,f=d,n[s+36>>2]=1,(n[s>>2]&64|0)==0&&(n[f>>2]=n[s+60>>2],n[f+4>>2]=21523,n[f+8>>2]=d+16,yu(54,f|0)|0)&&(o[s+75>>0]=-1),f=e7(s,l,c)|0,E=d,f|0}function t7(s,l){s=s|0,l=l|0;var c=0,f=0;if(c=o[s>>0]|0,f=o[l>>0]|0,c<<24>>24==0||c<<24>>24!=f<<24>>24)s=f;else{do s=s+1|0,l=l+1|0,c=o[s>>0]|0,f=o[l>>0]|0;while(!(c<<24>>24==0||c<<24>>24!=f<<24>>24));s=f}return(c&255)-(s&255)|0}function r3e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;e:do if(!c)s=0;else{for(;f=o[s>>0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if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(zm()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(0);if(B=o[l>>0]|0,B<<24>>24)Q=l;else{Ze=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=Q,Ze=9;break t}case 0:{B=Q;break t}default:}et=Q+1|0,n[ir>>2]=et,B=o[et>>0]|0,Q=et}t:do if((Ze|0)==9)for(;;){if(Ze=0,(o[Q+1>>0]|0)!=37)break t;if(B=B+1|0,Q=Q+2|0,n[ir>>2]=Q,(o[Q>>0]|0)==37)Ze=9;else break}while(0);if(B=B-l|0,at&&ss(s,l,B),B|0){l=Q;continue}k=Q+1|0,B=(o[k>>0]|0)+-48|0,B>>>0<10?(et=(o[Q+2>>0]|0)==36,Re=et?B:-1,O=et?1:O,k=et?Q+3|0:k):Re=-1,n[ir>>2]=k,B=o[k>>0]|0,Q=(B<<24>>24)+-32|0;t:do if(Q>>>0<32)for(M=0,j=B;;){if(B=1<<Q,!(B&75913)){B=j;break t}if(M=B|M,k=k+1|0,n[ir>>2]=k,B=o[k>>0]|0,Q=(B<<24>>24)+-32|0,Q>>>0>=32)break;j=B}else M=0;while(0);if(B<<24>>24==42){if(Q=k+1|0,B=(o[Q>>0]|0)+-48|0,B>>>0<10&&(o[k+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[f+((o[Q>>0]|0)+-48<<3)>>2]|0,O=1,k=k+3|0;else{if(O|0){m=-1;break}at?(O=(n[c>>2]|0)+(4-1)&~(4-1),B=n[O>>2]|0,n[c>>2]=O+4,O=0,k=Q):(B=0,O=0,k=Q)}n[ir>>2]=k,et=(B|0)<0,B=et?0-B|0:B,M=et?M|8192:M}else{if(B=n7(ir)|0,(B|0)<0){m=-1;break}k=n[ir>>2]|0}do if((o[k>>0]|0)==46){if((o[k+1>>0]|0)!=42){n[ir>>2]=k+1,Q=n7(ir)|0,k=n[ir>>2]|0;break}if(j=k+2|0,Q=(o[j>>0]|0)+-48|0,Q>>>0<10&&(o[k+3>>0]|0)==36){n[d+(Q<<2)>>2]=10,Q=n[f+((o[j>>0]|0)+-48<<3)>>2]|0,k=k+4|0,n[ir>>2]=k;break}if(O|0){m=-1;break e}at?(et=(n[c>>2]|0)+(4-1)&~(4-1),Q=n[et>>2]|0,n[c>>2]=et+4):Q=0,n[ir>>2]=j,k=j}else Q=-1;while(0);for(Le=0;;){if(((o[k>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(et=k+1|0,n[ir>>2]=et,j=o[(o[k>>0]|0)+-65+(5178+(Le*58|0))>>0]|0,se=j&255,(se+-1|0)>>>0<8)Le=se,k=et;else break}if(!(j<<24>>24)){m=-1;break}Ye=(Re|0)>-1;do if(j<<24>>24==19)if(Ye){m=-1;break e}else Ze=49;else{if(Ye){n[d+(Re<<2)>>2]=se,Ye=f+(Re<<3)|0,Re=n[Ye+4>>2]|0,Ze=Jt,n[Ze>>2]=n[Ye>>2],n[Ze+4>>2]=Re,Ze=49;break}if(!at){m=0;break e}i7(Jt,se,c)}while(0);if((Ze|0)==49&&(Ze=0,!at)){B=0,l=et;continue}k=o[k>>0]|0,k=(Le|0)!=0&(k&15|0)==3?k&-33:k,Ye=M&-65537,Re=(M&8192|0)==0?M:Ye;t:do switch(k|0){case 110:switch((Le&255)<<24>>24){case 0:{n[n[Jt>>2]>>2]=m,B=0,l=et;continue e}case 1:{n[n[Jt>>2]>>2]=m,B=0,l=et;continue e}case 2:{B=n[Jt>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=et;continue e}case 3:{a[n[Jt>>2]>>1]=m,B=0,l=et;continue e}case 4:{o[n[Jt>>2]>>0]=m,B=0,l=et;continue e}case 6:{n[n[Jt>>2]>>2]=m,B=0,l=et;continue e}case 7:{B=n[Jt>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=et;continue e}default:{B=0,l=et;continue e}}case 112:{k=120,Q=Q>>>0>8?Q:8,l=Re|8,Ze=61;break}case 88:case 120:{l=Re,Ze=61;break}case 111:{k=Jt,l=n[k>>2]|0,k=n[k+4>>2]|0,se=o3e(l,k,He)|0,Ye=Ge-se|0,M=0,j=5642,Q=(Re&8|0)==0|(Q|0)>(Ye|0)?Q:Ye+1|0,Ye=Re,Ze=67;break}case 105:case 100:if(k=Jt,l=n[k>>2]|0,k=n[k+4>>2]|0,(k|0)<0){l=iD(0,0,l|0,k|0)|0,k=Ee,M=Jt,n[M>>2]=l,n[M+4>>2]=k,M=1,j=5642,Ze=66;break t}else{M=(Re&2049|0)!=0&1,j=(Re&2048|0)==0?(Re&1|0)==0?5642:5644:5643,Ze=66;break t}case 117:{k=Jt,M=0,j=5642,l=n[k>>2]|0,k=n[k+4>>2]|0,Ze=66;break}case 99:{o[Tt>>0]=n[Jt>>2],l=Tt,M=0,j=5642,se=He,k=1,Q=Ye;break}case 109:{k=a3e(n[(zm()|0)>>2]|0)|0,Ze=71;break}case 115:{k=n[Jt>>2]|0,k=k|0?k:5652,Ze=71;break}case 67:{n[Ir>>2]=n[Jt>>2],n[Rr>>2]=0,n[Jt>>2]=Ir,se=-1,k=Ir,Ze=75;break}case 83:{l=n[Jt>>2]|0,Q?(se=Q,k=l,Ze=75):(Is(s,32,B,0,Re),l=0,Ze=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=c3e(s,+C[Jt>>3],B,Q,Re,k)|0,l=et;continue e}default:M=0,j=5642,se=He,k=Q,Q=Re}while(0);t:do if((Ze|0)==61)Re=Jt,Le=n[Re>>2]|0,Re=n[Re+4>>2]|0,se=s3e(Le,Re,He,k&32)|0,j=(l&8|0)==0|(Le|0)==0&(Re|0)==0,M=j?0:2,j=j?5642:5642+(k>>4)|0,Ye=l,l=Le,k=Re,Ze=67;else if((Ze|0)==66)se=Xm(l,k,He)|0,Ye=Re,Ze=67;else if((Ze|0)==71)Ze=0,Re=l3e(k,0,Q)|0,Le=(Re|0)==0,l=k,M=0,j=5642,se=Le?k+Q|0:Re,k=Le?Q:Re-k|0,Q=Ye;else if((Ze|0)==75){for(Ze=0,j=k,l=0,Q=0;M=n[j>>2]|0,!(!M||(Q=s7(Qr,M)|0,(Q|0)<0|Q>>>0>(se-l|0)>>>0));)if(l=Q+l|0,se>>>0>l>>>0)j=j+4|0;else break;if((Q|0)<0){m=-1;break e}if(Is(s,32,B,l,Re),!l)l=0,Ze=84;else for(M=0;;){if(Q=n[k>>2]|0,!Q){Ze=84;break t}if(Q=s7(Qr,Q)|0,M=Q+M|0,(M|0)>(l|0)){Ze=84;break t}if(ss(s,Qr,Q),M>>>0>=l>>>0){Ze=84;break}else k=k+4|0}}while(0);if((Ze|0)==67)Ze=0,k=(l|0)!=0|(k|0)!=0,Re=(Q|0)!=0|k,k=((k^1)&1)+(Ge-se)|0,l=Re?se:He,se=He,k=Re?(Q|0)>(k|0)?Q:k:Q,Q=(Q|0)>-1?Ye&-65537:Ye;else if((Ze|0)==84){Ze=0,Is(s,32,B,l,Re^8192),B=(B|0)>(l|0)?B:l,l=et;continue}Le=se-l|0,Ye=(k|0)<(Le|0)?Le:k,Re=Ye+M|0,B=(B|0)<(Re|0)?Re:B,Is(s,32,B,Re,Q),ss(s,j,M),Is(s,48,B,Re,Q^65536),Is(s,48,Ye,Le,0),ss(s,l,Le),Is(s,32,B,Re,Q^8192),l=et}e:do if((Ze|0)==87&&!s)if(!O)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(i7(f+(m<<3)|0,l,c),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(0);return E=rr,m|0}function n3e(s){return s=s|0,0}function i3e(s){s=s|0}function ss(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]&32||y3e(l,c,s)|0}function n7(s){s=s|0;var l=0,c=0,f=0;if(c=n[s>>2]|0,f=(o[c>>0]|0)+-48|0,f>>>0<10){l=0;do l=f+(l*10|0)|0,c=c+1|0,n[s>>2]=c,f=(o[c>>0]|0)+-48|0;while(f>>>0<10)}else l=0;return l|0}function i7(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,n[s>>2]=l;break e}case 10:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,f=s,n[f>>2]=l,n[f+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,f=s,n[f>>2]=l,n[f+4>>2]=0;break e}case 12:{f=(n[c>>2]|0)+(8-1)&~(8-1),l=f,d=n[l>>2]|0,l=n[l+4>>2]|0,n[c>>2]=f+8,f=s,n[f>>2]=d,n[f+4>>2]=l;break e}case 13:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,f=(f&65535)<<16>>16,d=s,n[d>>2]=f,n[d+4>>2]=((f|0)<0)<<31>>31;break e}case 14:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,d=s,n[d>>2]=f&65535,n[d+4>>2]=0;break e}case 15:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,f=(f&255)<<24>>24,d=s,n[d>>2]=f,n[d+4>>2]=((f|0)<0)<<31>>31;break e}case 16:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,d=s,n[d>>2]=f&255,n[d+4>>2]=0;break e}case 17:{d=(n[c>>2]|0)+(8-1)&~(8-1),m=+C[d>>3],n[c>>2]=d+8,C[s>>3]=m;break e}case 18:{d=(n[c>>2]|0)+(8-1)&~(8-1),m=+C[d>>3],n[c>>2]=d+8,C[s>>3]=m;break e}default:break e}while(0);while(0)}function s3e(s,l,c,f){if(s=s|0,l=l|0,c=c|0,f=f|0,!((s|0)==0&(l|0)==0))do c=c+-1|0,o[c>>0]=u[5694+(s&15)>>0]|0|f,s=sD(s|0,l|0,4)|0,l=Ee;while(!((s|0)==0&(l|0)==0));return c|0}function o3e(s,l,c){if(s=s|0,l=l|0,c=c|0,!((s|0)==0&(l|0)==0))do c=c+-1|0,o[c>>0]=s&7|48,s=sD(s|0,l|0,3)|0,l=Ee;while(!((s|0)==0&(l|0)==0));return c|0}function Xm(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;if(l>>>0>0|(l|0)==0&s>>>0>4294967295){for(;f=PR(s|0,l|0,10,0)|0,c=c+-1|0,o[c>>0]=f&255|48,f=s,s=SR(s|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&f>>>0>4294967295;)l=Ee;l=s}else l=s;if(l)for(;c=c+-1|0,o[c>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return c|0}function a3e(s){return s=s|0,h3e(s,n[(p3e()|0)+188>>2]|0)|0}function l3e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;m=l&255,f=(c|0)!=0;e:do if(f&(s&3|0)!=0)for(d=l&255;;){if((o[s>>0]|0)==d<<24>>24){B=6;break e}if(s=s+1|0,c=c+-1|0,f=(c|0)!=0,!(f&(s&3|0)!=0)){B=5;break}}else B=5;while(0);(B|0)==5&&(f?B=6:c=0);e:do if((B|0)==6&&(d=l&255,(o[s>>0]|0)!=d<<24>>24)){f=Oe(m,16843009)|0;t:do if(c>>>0>3){for(;m=n[s>>2]^f,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(s=s+4|0,c=c+-4|0,c>>>0<=3){B=11;break t}}else B=11;while(0);if((B|0)==11&&!c){c=0;break}for(;;){if((o[s>>0]|0)==d<<24>>24)break e;if(s=s+1|0,c=c+-1|0,!c){c=0;break}}}while(0);return(c|0?s:0)|0}function Is(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0;if(B=E,E=E+256|0,m=B,(c|0)>(f|0)&(d&73728|0)==0){if(d=c-f|0,$m(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=c-f|0;do ss(s,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}ss(s,m,d)}E=B}function s7(s,l){return s=s|0,l=l|0,s?s=A3e(s,l,0)|0:s=0,s|0}function c3e(s,l,c,f,d,m){s=s|0,l=+l,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,j=0,se=0,Ye=0,Le=0,Re=0,et=0,Ze=0,at=0,He=0,Ge=0,Tt=0,Rr=0,ir=0,Jt=0,Ir=0,Qr=0,rr=0,Bn=0;Bn=E,E=E+560|0,k=Bn+8|0,et=Bn,rr=Bn+524|0,Qr=rr,M=Bn+512|0,n[et>>2]=0,Ir=M+12|0,o7(l)|0,(Ee|0)<0?(l=-l,ir=1,Rr=5659):(ir=(d&2049|0)!=0&1,Rr=(d&2048|0)==0?(d&1|0)==0?5660:5665:5662),o7(l)|0,Jt=Ee&2146435072;do if(Jt>>>0<2146435072|(Jt|0)==2146435072&0<0){if(Ye=+u3e(l,et)*2,B=Ye!=0,B&&(n[et>>2]=(n[et>>2]|0)+-1),at=m|32,(at|0)==97){Le=m&32,se=(Le|0)==0?Rr:Rr+9|0,j=ir|2,B=12-f|0;do if(f>>>0>11|(B|0)==0)l=Ye;else{l=8;do B=B+-1|0,l=l*16;while((B|0)!=0);if((o[se>>0]|0)==45){l=-(l+(-Ye-l));break}else{l=Ye+l-l;break}}while(0);Q=n[et>>2]|0,B=(Q|0)<0?0-Q|0:Q,B=Xm(B,((B|0)<0)<<31>>31,Ir)|0,(B|0)==(Ir|0)&&(B=M+11|0,o[B>>0]=48),o[B+-1>>0]=(Q>>31&2)+43,O=B+-2|0,o[O>>0]=m+15,M=(f|0)<1,k=(d&8|0)==0,B=rr;do Jt=~~l,Q=B+1|0,o[B>>0]=u[5694+Jt>>0]|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0:M,B=k;k=Re?Jt:M,k=(B-k>>2|0)>(f|0)?k+(f<<2)|0:B,B=(n[et>>2]|0)+Le|0,n[et>>2]=B}while((B|0)<0);B=M,f=k}else B=M,f=k;if(Ge=Jt,B>>>0<f>>>0){if(k=(Ge-B>>2)*9|0,O=n[B>>2]|0,O>>>0>=10){M=10;do M=M*10|0,k=k+1|0;while(O>>>0>=M>>>0)}}else k=0;if(Re=(at|0)==103,Ze=(Q|0)!=0,M=Q-((at|0)!=102?k:0)+((Ze&Re)<<31>>31)|0,(M|0)<(((f-Ge>>2)*9|0)+-9|0)){if(M=M+9216|0,Le=Jt+4+(((M|0)/9|0)+-1024<<2)|0,M=((M|0)%9|0)+1|0,(M|0)<9){O=10;do O=O*10|0,M=M+1|0;while((M|0)!=9)}else O=10;if(j=n[Le>>2]|0,se=(j>>>0)%(O>>>0)|0,M=(Le+4|0)==(f|0),M&(se|0)==0)M=Le;else if(Ye=(((j>>>0)/(O>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,He=(O|0)/2|0,l=se>>>0<He>>>0?.5:M&(se|0)==(He|0)?1:1.5,ir&&(He=(o[Rr>>0]|0)==45,l=He?-l:l,Ye=He?-Ye:Ye),M=j-se|0,n[Le>>2]=M,Ye+l!=Ye){if(He=M+O|0,n[Le>>2]=He,He>>>0>999999999)for(k=Le;M=k+-4|0,n[k>>2]=0,M>>>0<B>>>0&&(B=B+-4|0,n[B>>2]=0),He=(n[M>>2]|0)+1|0,n[M>>2]=He,He>>>0>999999999;)k=M;else M=Le;if(k=(Ge-B>>2)*9|0,j=n[B>>2]|0,j>>>0>=10){O=10;do O=O*10|0,k=k+1|0;while(j>>>0>=O>>>0)}}else M=Le;M=M+4|0,M=f>>>0>M>>>0?M:f,He=B}else M=f,He=B;for(at=M;;){if(at>>>0<=He>>>0){et=0;break}if(B=at+-4|0,!(n[B>>2]|0))at=B;else{et=1;break}}f=0-k|0;do if(Re)if(B=((Ze^1)&1)+Q|0,(B|0)>(k|0)&(k|0)>-5?(O=m+-1|0,Q=B+-1-k|0):(O=m+-2|0,Q=B+-1|0),B=d&8,B)Le=B;else{if(et&&(Tt=n[at+-4>>2]|0,(Tt|0)!=0))if((Tt>>>0)%10|0)M=0;else{M=0,B=10;do B=B*10|0,M=M+1|0;while(!((Tt>>>0)%(B>>>0)|0|0))}else M=9;if(B=((at-Ge>>2)*9|0)+-9|0,(O|32|0)==102){Le=B-M|0,Le=(Le|0)>0?Le:0,Q=(Q|0)<(Le|0)?Q:Le,Le=0;break}else{Le=B+k-M|0,Le=(Le|0)>0?Le:0,Q=(Q|0)<(Le|0)?Q:Le,Le=0;break}}else O=m,Le=d&8;while(0);if(Re=Q|Le,j=(Re|0)!=0&1,se=(O|32|0)==102,se)Ze=0,B=(k|0)>0?k:0;else{if(B=(k|0)<0?f:k,B=Xm(B,((B|0)<0)<<31>>31,Ir)|0,M=Ir,(M-B|0)<2)do B=B+-1|0,o[B>>0]=48;while((M-B|0)<2);o[B+-1>>0]=(k>>31&2)+43,B=B+-2|0,o[B>>0]=O,Ze=B,B=M-B|0}if(B=ir+1+Q+j+B|0,Is(s,32,c,B,d),ss(s,Rr,ir),Is(s,48,c,B,d^65536),se){O=He>>>0>Jt>>>0?Jt:He,Le=rr+9|0,j=Le,se=rr+8|0,M=O;do{if(k=Xm(n[M>>2]|0,0,Le)|0,(M|0)==(O|0))(k|0)==(Le|0)&&(o[se>>0]=48,k=se);else if(k>>>0>rr>>>0){$m(rr|0,48,k-Qr|0)|0;do k=k+-1|0;while(k>>>0>rr>>>0)}ss(s,k,j-k|0),M=M+4|0}while(M>>>0<=Jt>>>0);if(Re|0&&ss(s,5710,1),M>>>0<at>>>0&(Q|0)>0)for(;;){if(k=Xm(n[M>>2]|0,0,Le)|0,k>>>0>rr>>>0){$m(rr|0,48,k-Qr|0)|0;do k=k+-1|0;while(k>>>0>rr>>>0)}if(ss(s,k,(Q|0)<9?Q:9),M=M+4|0,k=Q+-9|0,M>>>0<at>>>0&(Q|0)>9)Q=k;else{Q=k;break}}Is(s,48,Q+9|0,9,0)}else{if(Re=et?at:He+4|0,(Q|0)>-1){et=rr+9|0,Le=(Le|0)==0,f=et,j=0-Qr|0,se=rr+8|0,O=He;do{k=Xm(n[O>>2]|0,0,et)|0,(k|0)==(et|0)&&(o[se>>0]=48,k=se);do if((O|0)==(He|0)){if(M=k+1|0,ss(s,k,1),Le&(Q|0)<1){k=M;break}ss(s,5710,1),k=M}else{if(k>>>0<=rr>>>0)break;$m(rr|0,48,k+j|0)|0;do k=k+-1|0;while(k>>>0>rr>>>0)}while(0);Qr=f-k|0,ss(s,k,(Q|0)>(Qr|0)?Qr:Q),Q=Q-Qr|0,O=O+4|0}while(O>>>0<Re>>>0&(Q|0)>-1)}Is(s,48,Q+18|0,18,0),ss(s,Ze,Ir-Ze|0)}Is(s,32,c,B,d^8192)}else rr=(m&32|0)!=0,B=ir+3|0,Is(s,32,c,B,d&-65537),ss(s,Rr,ir),ss(s,l!=l|!1?rr?5686:5690:rr?5678:5682,3),Is(s,32,c,B,d^8192);while(0);return E=Bn,((B|0)<(c|0)?c:B)|0}function o7(s){s=+s;var l=0;return C[v>>3]=s,l=n[v>>2]|0,Ee=n[v+4>>2]|0,l|0}function u3e(s,l){return s=+s,l=l|0,+ +a7(s,l)}function a7(s,l){s=+s,l=l|0;var c=0,f=0,d=0;switch(C[v>>3]=s,c=n[v>>2]|0,f=n[v+4>>2]|0,d=sD(c|0,f|0,52)|0,d&2047){case 0:{s!=0?(s=+a7(s*18446744073709552e3,l),c=(n[l>>2]|0)+-64|0):c=0,n[l>>2]=c;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[v>>2]=c,n[v+4>>2]=f&-2146435073|1071644672,s=+C[v>>3]}return+s}function A3e(s,l,c){s=s|0,l=l|0,c=c|0;do if(s){if(l>>>0<128){o[s>>0]=l,s=1;break}if(!(n[n[(f3e()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){o[s>>0]=l,s=1;break}else{n[(zm()|0)>>2]=84,s=-1;break}if(l>>>0<2048){o[s>>0]=l>>>6|192,o[s+1>>0]=l&63|128,s=2;break}if(l>>>0<55296|(l&-8192|0)==57344){o[s>>0]=l>>>12|224,o[s+1>>0]=l>>>6&63|128,o[s+2>>0]=l&63|128,s=3;break}if((l+-65536|0)>>>0<1048576){o[s>>0]=l>>>18|240,o[s+1>>0]=l>>>12&63|128,o[s+2>>0]=l>>>6&63|128,o[s+3>>0]=l&63|128,s=4;break}else{n[(zm()|0)>>2]=84,s=-1;break}}else s=1;while(0);return s|0}function f3e(){return wR()|0}function p3e(){return wR()|0}function h3e(s,l){s=s|0,l=l|0;var c=0,f=0;for(f=0;;){if((u[5712+f>>0]|0)==(s|0)){s=2;break}if(c=f+1|0,(c|0)==87){c=5800,f=87,s=5;break}else f=c}if((s|0)==2&&(f?(c=5800,s=5):c=5800),(s|0)==5)for(;;){do s=c,c=c+1|0;while((o[s>>0]|0)!=0);if(f=f+-1|0,f)s=5;else break}return g3e(c,n[l+20>>2]|0)|0}function g3e(s,l){return s=s|0,l=l|0,d3e(s,l)|0}function d3e(s,l){return s=s|0,l=l|0,l?l=m3e(n[l>>2]|0,n[l+4>>2]|0,s)|0:l=0,(l|0?l:s)|0}function m3e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,j=0,se=0;se=(n[s>>2]|0)+1794895138|0,m=Qg(n[s+8>>2]|0,se)|0,f=Qg(n[s+12>>2]|0,se)|0,d=Qg(n[s+16>>2]|0,se)|0;e:do if(m>>>0<l>>>2>>>0&&(j=l-(m<<2)|0,f>>>0<j>>>0&d>>>0<j>>>0)&&((d|f)&3|0)==0){for(j=f>>>2,O=d>>>2,M=0;;){if(Q=m>>>1,k=M+Q|0,B=k<<1,d=B+j|0,f=Qg(n[s+(d<<2)>>2]|0,se)|0,d=Qg(n[s+(d+1<<2)>>2]|0,se)|0,!(d>>>0<l>>>0&f>>>0<(l-d|0)>>>0)){f=0;break e}if(o[s+(d+f)>>0]|0){f=0;break e}if(f=t7(c,s+d|0)|0,!f)break;if(f=(f|0)<0,(m|0)==1){f=0;break e}else M=f?M:k,m=f?Q:m-Q|0}f=B+O|0,d=Qg(n[s+(f<<2)>>2]|0,se)|0,f=Qg(n[s+(f+1<<2)>>2]|0,se)|0,f>>>0<l>>>0&d>>>0<(l-f|0)>>>0?f=(o[s+(f+d)>>0]|0)==0?s+f|0:0:f=0}else f=0;while(0);return f|0}function Qg(s,l){s=s|0,l=l|0;var c=0;return c=g7(s|0)|0,((l|0)==0?s:c)|0}function y3e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=c+16|0,d=n[f>>2]|0,d?m=5:E3e(c)|0?f=0:(d=n[f>>2]|0,m=5);e:do if((m|0)==5){if(Q=c+20|0,B=n[Q>>2]|0,f=B,(d-B|0)>>>0<l>>>0){f=aD[n[c+36>>2]&7](c,s,l)|0;break}t:do if((o[c+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=s;break t}if(d=B+-1|0,(o[s+d>>0]|0)==10)break;B=d}if(f=aD[n[c+36>>2]&7](c,s,B)|0,f>>>0<B>>>0)break e;m=B,d=s+B|0,l=l-B|0,f=n[Q>>2]|0}else m=0,d=s;while(0);Cr(f|0,d|0,l|0)|0,n[Q>>2]=(n[Q>>2]|0)+l,f=m+l|0}while(0);return f|0}function E3e(s){s=s|0;var l=0,c=0;return l=s+74|0,c=o[l>>0]|0,o[l>>0]=c+255|c,l=n[s>>2]|0,l&8?(n[s>>2]=l|32,s=-1):(n[s+8>>2]=0,n[s+4>>2]=0,c=n[s+44>>2]|0,n[s+28>>2]=c,n[s+20>>2]=c,n[s+16>>2]=c+(n[s+48>>2]|0),s=0),s|0}function Nn(s,l){s=y(s),l=y(l);var c=0,f=0;c=l7(s)|0;do if((c&2147483647)>>>0<=2139095040){if(f=l7(l)|0,(f&2147483647)>>>0<=2139095040)if((f^c|0)<0){s=(c|0)<0?l:s;break}else{s=s<l?l:s;break}}else s=l;while(0);return y(s)}function l7(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function kg(s,l){s=y(s),l=y(l);var c=0,f=0;c=c7(s)|0;do if((c&2147483647)>>>0<=2139095040){if(f=c7(l)|0,(f&2147483647)>>>0<=2139095040)if((f^c|0)<0){s=(c|0)<0?s:l;break}else{s=s<l?s:l;break}}else s=l;while(0);return y(s)}function c7(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function vR(s,l){s=y(s),l=y(l);var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;m=(h[v>>2]=s,n[v>>2]|0),Q=(h[v>>2]=l,n[v>>2]|0),c=m>>>23&255,B=Q>>>23&255,k=m&-2147483648,d=Q<<1;e:do if((d|0)!=0&&!((c|0)==255|((C3e(l)|0)&2147483647)>>>0>2139095040)){if(f=m<<1,f>>>0<=d>>>0)return l=y(s*y(0)),y((f|0)==(d|0)?l:s);if(c)f=m&8388607|8388608;else{if(c=m<<9,(c|0)>-1){f=c,c=0;do c=c+-1|0,f=f<<1;while((f|0)>-1)}else c=0;f=m<<1-c}if(B)Q=Q&8388607|8388608;else{if(m=Q<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,Q=Q<<1-d}d=f-Q|0,m=(d|0)>-1;t:do if((c|0)>(B|0)){for(;;){if(m)if(d)f=d;else break;if(f=f<<1,c=c+-1|0,d=f-Q|0,m=(d|0)>-1,(c|0)<=(B|0))break t}l=y(s*y(0));break e}while(0);if(m)if(d)f=d;else{l=y(s*y(0));break}if(f>>>0<8388608)do f=f<<1,c=c+-1|0;while(f>>>0<8388608);(c|0)>0?c=f+-8388608|c<<23:c=f>>>(1-c|0),l=(n[v>>2]=c|k,y(h[v>>2]))}else M=3;while(0);return(M|0)==3&&(l=y(s*l),l=y(l/l)),y(l)}function C3e(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function I3e(s,l){return s=s|0,l=l|0,r7(n[582]|0,s,l)|0}function Vr(s){s=s|0,Rt()}function Zm(s){s=s|0}function w3e(s,l){return s=s|0,l=l|0,0}function B3e(s){return s=s|0,(u7(s+4|0)|0)==-1?(rf[n[(n[s>>2]|0)+8>>2]&127](s),s=1):s=0,s|0}function u7(s){s=s|0;var l=0;return l=n[s>>2]|0,n[s>>2]=l+-1,l+-1|0}function Qp(s){s=s|0,B3e(s)|0&&v3e(s)}function v3e(s){s=s|0;var l=0;l=s+8|0,(n[l>>2]|0)!=0&&(u7(l)|0)!=-1||rf[n[(n[s>>2]|0)+16>>2]&127](s)}function Gt(s){s=s|0;var l=0;for(l=(s|0)==0?1:s;s=tD(l)|0,!(s|0);){if(s=S3e()|0,!s){s=0;break}D7[s&0]()}return s|0}function A7(s){return s=s|0,Gt(s)|0}function pt(s){s=s|0,rD(s)}function D3e(s){s=s|0,(o[s+11>>0]|0)<0&&pt(n[s>>2]|0)}function S3e(){var s=0;return s=n[2923]|0,n[2923]=s+0,s|0}function P3e(){}function iD(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,f=l-f-(c>>>0>s>>>0|0)>>>0,Ee=f,s-c>>>0|0|0}function DR(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,c=s+c>>>0,Ee=l+f+(c>>>0<s>>>0|0)>>>0,c|0|0}function $m(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;if(m=s+c|0,l=l&255,(c|0)>=67){for(;s&3;)o[s>>0]=l,s=s+1|0;for(f=m&-4|0,d=f-64|0,B=l|l<<8|l<<16|l<<24;(s|0)<=(d|0);)n[s>>2]=B,n[s+4>>2]=B,n[s+8>>2]=B,n[s+12>>2]=B,n[s+16>>2]=B,n[s+20>>2]=B,n[s+24>>2]=B,n[s+28>>2]=B,n[s+32>>2]=B,n[s+36>>2]=B,n[s+40>>2]=B,n[s+44>>2]=B,n[s+48>>2]=B,n[s+52>>2]=B,n[s+56>>2]=B,n[s+60>>2]=B,s=s+64|0;for(;(s|0)<(f|0);)n[s>>2]=B,s=s+4|0}for(;(s|0)<(m|0);)o[s>>0]=l,s=s+1|0;return m-c|0}function f7(s,l,c){return s=s|0,l=l|0,c=c|0,(c|0)<32?(Ee=l<<c|(s&(1<<c)-1<<32-c)>>>32-c,s<<c):(Ee=s<<c-32,0)}function sD(s,l,c){return s=s|0,l=l|0,c=c|0,(c|0)<32?(Ee=l>>>c,s>>>c|(l&(1<<c)-1)<<32-c):(Ee=0,l>>>c-32|0)}function Cr(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;if((c|0)>=8192)return dc(s|0,l|0,c|0)|0;if(m=s|0,d=s+c|0,(s&3)==(l&3)){for(;s&3;){if(!c)return m|0;o[s>>0]=o[l>>0]|0,s=s+1|0,l=l+1|0,c=c-1|0}for(c=d&-4|0,f=c-64|0;(s|0)<=(f|0);)n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2],n[s+16>>2]=n[l+16>>2],n[s+20>>2]=n[l+20>>2],n[s+24>>2]=n[l+24>>2],n[s+28>>2]=n[l+28>>2],n[s+32>>2]=n[l+32>>2],n[s+36>>2]=n[l+36>>2],n[s+40>>2]=n[l+40>>2],n[s+44>>2]=n[l+44>>2],n[s+48>>2]=n[l+48>>2],n[s+52>>2]=n[l+52>>2],n[s+56>>2]=n[l+56>>2],n[s+60>>2]=n[l+60>>2],s=s+64|0,l=l+64|0;for(;(s|0)<(c|0);)n[s>>2]=n[l>>2],s=s+4|0,l=l+4|0}else for(c=d-4|0;(s|0)<(c|0);)o[s>>0]=o[l>>0]|0,o[s+1>>0]=o[l+1>>0]|0,o[s+2>>0]=o[l+2>>0]|0,o[s+3>>0]=o[l+3>>0]|0,s=s+4|0,l=l+4|0;for(;(s|0)<(d|0);)o[s>>0]=o[l>>0]|0,s=s+1|0,l=l+1|0;return m|0}function p7(s){s=s|0;var l=0;return l=o[L+(s&255)>>0]|0,(l|0)<8?l|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0;var f=0;if((l|0)<(s|0)&(s|0)<(l+c|0)){for(f=s,l=l+c|0,s=s+c|0;(c|0)>0;)s=s-1|0,l=l-1|0,c=c-1|0,o[s>>0]=o[l>>0]|0;s=f}else Cr(s,l,c)|0;return s|0}function PR(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;return m=E,E=E+16|0,d=m|0,h7(s,l,c,f,d)|0,E=m,Ee=n[d+4>>2]|0,n[d>>2]|0|0}function g7(s){return s=s|0,(s&255)<<24|(s>>8&255)<<16|(s>>16&255)<<8|s>>>24|0}function x3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,d7[s&1](l|0,c|0,f|0,d|0,m|0)}function b3e(s,l,c){s=s|0,l=l|0,c=y(c),m7[s&1](l|0,y(c))}function Q3e(s,l,c){s=s|0,l=l|0,c=+c,y7[s&31](l|0,+c)}function k3e(s,l,c,f){return s=s|0,l=l|0,c=y(c),f=y(f),y(E7[s&0](l|0,y(c),y(f)))}function F3e(s,l){s=s|0,l=l|0,rf[s&127](l|0)}function R3e(s,l,c){s=s|0,l=l|0,c=c|0,nf[s&31](l|0,c|0)}function T3e(s,l){return s=s|0,l=l|0,Rg[s&31](l|0)|0}function N3e(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0,C7[s&1](l|0,+c,+f,d|0)}function L3e(s,l,c,f){s=s|0,l=l|0,c=+c,f=+f,d_e[s&1](l|0,+c,+f)}function O3e(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,aD[s&7](l|0,c|0,f|0)|0}function M3e(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,+m_e[s&1](l|0,c|0,f|0)}function U3e(s,l){return s=s|0,l=l|0,+I7[s&15](l|0)}function _3e(s,l,c){return s=s|0,l=l|0,c=+c,y_e[s&1](l|0,+c)|0}function H3e(s,l,c){return s=s|0,l=l|0,c=c|0,bR[s&15](l|0,c|0)|0}function q3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=+f,d=+d,m=m|0,E_e[s&1](l|0,c|0,+f,+d,m|0)}function j3e(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,C_e[s&1](l|0,c|0,f|0,d|0,m|0,B|0)}function G3e(s,l,c){return s=s|0,l=l|0,c=c|0,+w7[s&7](l|0,c|0)}function W3e(s){return s=s|0,lD[s&7]()|0}function Y3e(s,l,c,f,d,m){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B7[s&1](l|0,c|0,f|0,d|0,m|0)|0}function K3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=+d,I_e[s&1](l|0,c|0,f|0,+d)}function V3e(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=y(f),d=d|0,m=y(m),B=B|0,v7[s&1](l|0,c|0,y(f),d|0,y(m),B|0)}function J3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,FI[s&15](l|0,c|0,f|0)}function z3e(s){s=s|0,D7[s&0]()}function X3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f,S7[s&15](l|0,c|0,+f)}function Z3e(s,l,c){return s=s|0,l=+l,c=+c,w_e[s&1](+l,+c)|0}function $3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,QR[s&15](l|0,c|0,f|0,d|0)}function e_e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,F(0)}function t_e(s,l){s=s|0,l=y(l),F(1)}function ya(s,l){s=s|0,l=+l,F(2)}function r_e(s,l,c){return s=s|0,l=y(l),c=y(c),F(3),$e}function hr(s){s=s|0,F(4)}function QI(s,l){s=s|0,l=l|0,F(5)}function $a(s){return s=s|0,F(6),0}function n_e(s,l,c,f){s=s|0,l=+l,c=+c,f=f|0,F(7)}function i_e(s,l,c){s=s|0,l=+l,c=+c,F(8)}function s_e(s,l,c){return s=s|0,l=l|0,c=c|0,F(9),0}function o_e(s,l,c){return s=s|0,l=l|0,c=c|0,F(10),0}function Fg(s){return s=s|0,F(11),0}function a_e(s,l){return s=s|0,l=+l,F(12),0}function kI(s,l){return s=s|0,l=l|0,F(13),0}function l_e(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0,F(14)}function c_e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,F(15)}function xR(s,l){return s=s|0,l=l|0,F(16),0}function u_e(){return F(17),0}function A_e(s,l,c,f,d){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,F(18),0}function f_e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f,F(19)}function p_e(s,l,c,f,d,m){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=m|0,F(20)}function oD(s,l,c){s=s|0,l=l|0,c=c|0,F(21)}function h_e(){F(22)}function ey(s,l,c){s=s|0,l=l|0,c=+c,F(23)}function g_e(s,l){return s=+s,l=+l,F(24),0}function ty(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,F(25)}var d7=[e_e,AOe],m7=[t_e,uo],y7=[ya,CI,II,gF,dF,bl,wI,mF,Gm,Fu,vI,yF,Hv,VA,qv,Wm,jv,Gv,Ym,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya],E7=[r_e],rf=[hr,Zm,WDe,YDe,KDe,wbe,Bbe,vbe,_Ne,HNe,qNe,ZLe,$Le,eOe,CUe,IUe,wUe,ds,Lv,jm,KA,BI,Hve,qve,NDe,tSe,pSe,kSe,KSe,uPe,PPe,qPe,nxe,Exe,Nxe,Xxe,pbe,Hbe,nQe,EQe,NQe,XQe,pke,Fke,Kke,aFe,BFe,kc,eRe,dRe,NRe,$Re,hTe,NTe,WTe,VTe,ANe,hNe,kNe,GNe,KNe,uLe,xLe,r9,cMe,_Me,t4e,d4e,M4e,$4e,uUe,pUe,hr,hr,hr,hr,hr,hr,hr,hr,hr,hr,hr,hr,hr,h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:q3e,dynCall_diii:M3e,dynCall_iii:H3e,_memset:$m,_sbrk:kp,_memcpy:Cr,__GLOBAL__sub_I_Yoga_cpp:Hm,dynCall_vii:R3e,___uremdi3:PR,dynCall_vid:Q3e,stackAlloc:so,_nbind_init:UUe,getTempRet0:Ha,dynCall_di:U3e,dynCall_iid:_3e,setTempRet0:FA,_i64Add:DR,dynCall_fiff:k3e,dynCall_iiii:O3e,_emscripten_get_global_libc:zUe,dynCall_viid:X3e,dynCall_viiid:K3e,dynCall_viififi:V3e,dynCall_ii:T3e,__GLOBAL__sub_I_Binding_cc:tMe,dynCall_viiii:$3e,dynCall_iiiiii:Y3e,stackSave:vl,dynCall_viiiii:x3e,__GLOBAL__sub_I_nbind_cc:rDe,dynCall_vidd:L3e,_free:rD,runPostSets:P3e,dynCall_viiiiii:j3e,establishStackSpace:qi,_memmove:bI,stackRestore:Eu,_malloc:tD,__GLOBAL__sub_I_common_cc:ILe,dynCall_viddi:N3e,dynCall_dii:G3e,dynCall_v:z3e}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function t(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=t)},Module.callMain=Module.callMain=function t(e){e=e||[],ensureInitRuntime();var r=e.length+1;function o(){for(var p=0;p<4-1;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];o();for(var n=0;n<r-1;n=n+1)a.push(allocate(intArrayFromString(e[n]),"i8",ALLOC_NORMAL)),o();a.push(0),a=allocate(a,"i32",ALLOC_NORMAL);try{var u=Module._main(r,a,0);exit(u,!0)}catch(p){if(p instanceof ExitStatus)return;if(p=="SimulateInfiniteLoop"){Module.noExitRuntime=!0;return}else{var A=p;p&&typeof p=="object"&&p.stack&&(A=[p,p.stack]),Module.printErr("exception thrown: "+A),Module.quit(1,p)}}finally{calledMain=!0}};function run(t){if(t=t||Module.arguments,preloadStartTime===null&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun)return;function e(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(t),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),e()},1)):e()}Module.run=Module.run=run;function exit(t,e){e&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=t,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(t)),ENVIRONMENT_IS_NODE&&process.exit(t),Module.quit(t,new ExitStatus(t)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(t){Module.onAbort&&Module.onAbort(t),t!==void 0?(Module.print(t),Module.printErr(t),t=JSON.stringify(t)):t="",ABORT=!0,EXITSTATUS=1;var e=`
286If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(o){r=o(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var um=U((QYt,iCe)=>{"use strict";var uyt=rCe(),Ayt=nCe(),Q6=!1,k6=null;Ayt({},function(t,e){if(!Q6){if(Q6=!0,t)throw t;k6=e}});if(!Q6)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");iCe.exports=uyt(k6.bind,k6.lib)});var R6=U((kYt,F6)=>{"use strict";var sCe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);F6.exports=sCe;F6.exports.default=sCe});var aCe=U((FYt,oCe)=>{"use strict";oCe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\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DE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var qQ=U((RYt,T6)=>{"use strict";var fyt=xS(),pyt=R6(),hyt=aCe(),lCe=t=>{if(typeof t!="string"||t.length===0||(t=fyt(t),t.length===0))return 0;t=t.replace(hyt()," ");let e=0;for(let r=0;r<t.length;r++){let o=t.codePointAt(r);o<=31||o>=127&&o<=159||o>=768&&o<=879||(o>65535&&r++,e+=pyt(o)?2:1)}return e};T6.exports=lCe;T6.exports.default=lCe});var L6=U((TYt,N6)=>{"use strict";var gyt=qQ(),cCe=t=>{let e=0;for(let r of t.split(`
287`))e=Math.max(e,gyt(r));return e};N6.exports=cCe;N6.exports.default=cCe});var uCe=U(X2=>{"use strict";var dyt=X2&&X2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(X2,"__esModule",{value:!0});var myt=dyt(L6()),O6={};X2.default=t=>{if(t.length===0)return{width:0,height:0};if(O6[t])return O6[t];let e=myt.default(t),r=t.split(`
288`).length;return O6[t]={width:e,height:r},{width:e,height:r}}});var ACe=U(Z2=>{"use strict";var yyt=Z2&&Z2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Z2,"__esModule",{value:!0});var fn=yyt(um()),Eyt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?fn.default.POSITION_TYPE_ABSOLUTE:fn.default.POSITION_TYPE_RELATIVE)},Cyt=(t,e)=>{"marginLeft"in e&&t.setMargin(fn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(fn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(fn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(fn.default.EDGE_BOTTOM,e.marginBottom||0)},Iyt=(t,e)=>{"paddingLeft"in e&&t.setPadding(fn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(fn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(fn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(fn.default.EDGE_BOTTOM,e.paddingBottom||0)},wyt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(fn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(fn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(fn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(fn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(fn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(fn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(fn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(fn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(fn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(fn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(fn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(fn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(fn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(fn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(fn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(fn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(fn.default.JUSTIFY_SPACE_AROUND))},Byt=(t,e)=>{var r,o;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((o=e.minHeight)!==null&&o!==void 0?o:0))},vyt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?fn.default.DISPLAY_FLEX:fn.default.DISPLAY_NONE)},Dyt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(fn.default.EDGE_TOP,r),t.setBorder(fn.default.EDGE_BOTTOM,r),t.setBorder(fn.default.EDGE_LEFT,r),t.setBorder(fn.default.EDGE_RIGHT,r)}};Z2.default=(t,e={})=>{Eyt(t,e),Cyt(t,e),Iyt(t,e),wyt(t,e),Byt(t,e),vyt(t,e),Dyt(t,e)}});var hCe=U((OYt,pCe)=>{"use strict";var $2=qQ(),Syt=xS(),Pyt=dw(),U6=new Set(["\x1B","\x9B"]),xyt=39,fCe=t=>`${U6.values().next().value}[${t}m`,byt=t=>t.split(" ").map(e=>$2(e)),M6=(t,e,r)=>{let o=[...e],a=!1,n=$2(Syt(t[t.length-1]));for(let[u,A]of o.entries()){let p=$2(A);if(n+p<=r?t[t.length-1]+=A:(t.push(A),n=0),U6.has(A))a=!0;else if(a&&A==="m"){a=!1;continue}a||(n+=p,n===r&&u<o.length-1&&(t.push(""),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Qyt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!($2(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},kyt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let o="",a="",n,u=byt(t),A=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(A[A.length-1]=A[A.length-1].trimLeft());let C=$2(A[A.length-1]);if(p!==0&&(C>=e&&(r.wordWrap===!1||r.trim===!1)&&(A.push(""),C=0),(C>0||r.trim===!1)&&(A[A.length-1]+=" ",C++)),r.hard&&u[p]>e){let w=e-C,v=1+Math.floor((u[p]-w-1)/e);Math.floor((u[p]-1)/e)<v&&A.push(""),M6(A,h,e);continue}if(C+u[p]>e&&C>0&&u[p]>0){if(r.wordWrap===!1&&C<e){M6(A,h,e);continue}A.push("")}if(C+u[p]>e&&r.wordWrap===!1){M6(A,h,e);continue}A[A.length-1]+=h}r.trim!==!1&&(A=A.map(Qyt)),o=A.join(`
289`);for(let[p,h]of[...o].entries()){if(a+=h,U6.has(h)){let w=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=w===xyt?null:w}let C=Pyt.codes.get(Number(n));n&&C&&(o[p+1]===`
290`?a+=fCe(C):h===`
291`&&(a+=fCe(n)))}return a};pCe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
292`).split(`
293`).map(o=>kyt(o,e,r)).join(`
294`)});var mCe=U((MYt,dCe)=>{"use strict";var gCe="[\uD800-\uDBFF][\uDC00-\uDFFF]",Fyt=t=>t&&t.exact?new RegExp(`^${gCe}$`):new RegExp(gCe,"g");dCe.exports=Fyt});var _6=U((UYt,ICe)=>{"use strict";var Ryt=R6(),Tyt=mCe(),yCe=dw(),CCe=["\x1B","\x9B"],jQ=t=>`${CCe[0]}[${t}m`,ECe=(t,e,r)=>{let o=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=yCe.codes.get(parseInt(a,10));if(u){let A=t.indexOf(u.toString());A>=0?t.splice(A,1):o.push(jQ(e?u:n))}else if(e){o.push(jQ(0));break}else o.push(jQ(n))}if(e&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=jQ(yCe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};ICe.exports=(t,e,r)=>{let o=[...t.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,C]of o.entries()){let w=!1;if(CCe.includes(C)){let v=/\d[^m]*/.exec(t.slice(h,h+18));u=v&&v.length>0?v[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&C==="m"&&(n=!1,w=!0);if(!n&&!w&&++A,!Tyt({exact:!0}).test(C)&&Ryt(C.codePointAt())&&++A,A>e&&A<=r)p+=C;else if(A===e&&!n&&u!==void 0)p=ECe(a);else if(A>=r){p+=ECe(a,!0,u);break}}return p}});var BCe=U((_Yt,wCe)=>{"use strict";var mh=_6(),Nyt=qQ();function GQ(t,e,r){if(t.charAt(e)===" ")return e;for(let o=1;o<=3;o++)if(r){if(t.charAt(e+o)===" ")return e+o}else if(t.charAt(e-o)===" ")return e-o;return e}wCe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return u;let p=Nyt(t);if(p<=e)return t;if(o==="start"){if(n){let h=GQ(t,p-e+1,!0);return u+mh(t,h,p).trim()}return a===!0&&(u+=" ",A=2),u+mh(t,p-e+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(e/2);if(n){let C=GQ(t,h),w=GQ(t,p-(e-h)+1,!0);return mh(t,0,C)+u+mh(t,w,p).trim()}return mh(t,0,h)+u+mh(t,p-(e-h)+A,p)}if(o==="end"){if(n){let h=GQ(t,e-1);return mh(t,0,h)+u}return a===!0&&(u=" "+u,A=2),mh(t,0,e-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var q6=U(eB=>{"use strict";var vCe=eB&&eB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(eB,"__esModule",{value:!0});var Lyt=vCe(hCe()),Oyt=vCe(BCe()),H6={};eB.default=(t,e,r)=>{let o=t+String(e)+String(r);if(H6[o])return H6[o];let a=t;if(r==="wrap"&&(a=Lyt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=Oyt.default(t,e,{position:n})}return H6[o]=a,a}});var G6=U(j6=>{"use strict";Object.defineProperty(j6,"__esModule",{value:!0});var DCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=DCe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),e+=o}return e};j6.default=DCe});var W6=U(ci=>{"use strict";var tB=ci&&ci.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ci,"__esModule",{value:!0});ci.setTextNodeValue=ci.createTextNode=ci.setStyle=ci.setAttribute=ci.removeChildNode=ci.insertBeforeNode=ci.appendChildNode=ci.createNode=ci.TEXT_NAME=void 0;var Myt=tB(um()),SCe=tB(uCe()),Uyt=tB(ACe()),_yt=tB(q6()),Hyt=tB(G6());ci.TEXT_NAME="#text";ci.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:Myt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(qyt.bind(null,r))),r};ci.appendChildNode=(t,e)=>{var r;e.parentNode&&ci.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&WQ(t)};ci.insertBeforeNode=(t,e,r)=>{var o,a;e.parentNode&&ci.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((o=t.yogaNode)===null||o===void 0||o.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&WQ(t)};ci.removeChildNode=(t,e)=>{var r,o;e.yogaNode&&((o=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||o===void 0||o.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&WQ(t)};ci.setAttribute=(t,e,r)=>{t.attributes[e]=r};ci.setStyle=(t,e)=>{t.style=e,t.yogaNode&&Uyt.default(t.yogaNode,e)};ci.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaNode:void 0,parentNode:null,style:{}};return ci.setTextNodeValue(e,t),e};var qyt=function(t,e){var r,o;let a=t.nodeName==="#text"?t.nodeValue:Hyt.default(t),n=SCe.default(a);if(n.width<=e||n.width>=1&&e>0&&e<1)return n;let u=(o=(r=t.style)===null||r===void 0?void 0:r.textWrap)!==null&&o!==void 0?o:"wrap",A=_yt.default(a,e,u);return SCe.default(A)},PCe=t=>{var e;if(!(!t||!t.parentNode))return(e=t.yogaNode)!==null&&e!==void 0?e:PCe(t.parentNode)},WQ=t=>{let e=PCe(t);e==null||e.markDirty()};ci.setTextNodeValue=(t,e)=>{typeof e!="string"&&(e=String(e)),t.nodeValue=e,WQ(t)}});var FCe=U(rB=>{"use strict";var kCe=rB&&rB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rB,"__esModule",{value:!0});var xCe=P6(),jyt=kCe(zEe()),bCe=kCe(um()),To=W6(),QCe=t=>{t==null||t.unsetMeasureFunc(),t==null||t.freeRecursive()};rB.default=jyt.default({schedulePassiveEffects:xCe.unstable_scheduleCallback,cancelPassiveEffects:xCe.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:t=>{if(t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender=="function"&&t.onImmediateRender();return}typeof t.onRender=="function"&&t.onRender()},getChildHostContext:(t,e)=>{let r=t.isInsideText,o=e==="ink-text"||e==="ink-virtual-text";return r===o?t:{isInsideText:o}},shouldSetTextContent:()=>!1,createInstance:(t,e,r,o)=>{if(o.isInsideText&&t==="ink-box")throw new Error("<Box> can\u2019t be nested inside <Text> component");let a=t==="ink-text"&&o.isInsideText?"ink-virtual-text":t,n=To.createNode(a);for(let[u,A]of Object.entries(e))u!=="children"&&(u==="style"?To.setStyle(n,A):u==="internal_transform"?n.internal_transform=A:u==="internal_static"?n.internal_static=!0:To.setAttribute(n,u,A));return n},createTextInstance:(t,e,r)=>{if(!r.isInsideText)throw new Error(`Text string "${t}" must be rendered inside <Text> component`);return To.createTextNode(t)},resetTextContent:()=>{},hideTextInstance:t=>{To.setTextNodeValue(t,"")},unhideTextInstance:(t,e)=>{To.setTextNodeValue(t,e)},getPublicInstance:t=>t,hideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(bCe.default.DISPLAY_NONE)},unhideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(bCe.default.DISPLAY_FLEX)},appendInitialChild:To.appendChildNode,appendChild:To.appendChildNode,insertBefore:To.insertBeforeNode,finalizeInitialChildren:(t,e,r,o)=>(t.internal_static&&(o.isStaticDirty=!0,o.staticNode=t),!1),supportsMutation:!0,appendChildToContainer:To.appendChildNode,insertInContainerBefore:To.insertBeforeNode,removeChildFromContainer:(t,e)=>{To.removeChildNode(t,e),QCe(e.yogaNode)},prepareUpdate:(t,e,r,o,a)=>{t.internal_static&&(a.isStaticDirty=!0);let n={},u=Object.keys(o);for(let A of u)if(o[A]!==r[A]){if(A==="style"&&typeof o.style=="object"&&typeof r.style=="object"){let h=o.style,C=r.style,w=Object.keys(h);for(let v of w){if(v==="borderStyle"||v==="borderColor"){if(typeof n.style!="object"){let b={};n.style=b}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[v]!==C[v]){if(typeof n.style!="object"){let b={};n.style=b}n.style[v]=h[v]}}continue}n[A]=o[A]}return n},commitUpdate:(t,e)=>{for(let[r,o]of Object.entries(e))r!=="children"&&(r==="style"?To.setStyle(t,o):r==="internal_transform"?t.internal_transform=o:r==="internal_static"?t.internal_static=!0:To.setAttribute(t,r,o))},commitTextUpdate:(t,e,r)=>{To.setTextNodeValue(t,r)},removeChild:(t,e)=>{To.removeChildNode(t,e),QCe(e.yogaNode)}})});var TCe=U((WYt,RCe)=>{"use strict";RCe.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let o=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(o,r.indent.repeat(e))}});var NCe=U(nB=>{"use strict";var Gyt=nB&&nB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nB,"__esModule",{value:!0});var YQ=Gyt(um());nB.default=t=>t.getComputedWidth()-t.getComputedPadding(YQ.default.EDGE_LEFT)-t.getComputedPadding(YQ.default.EDGE_RIGHT)-t.getComputedBorder(YQ.default.EDGE_LEFT)-t.getComputedBorder(YQ.default.EDGE_RIGHT)});var LCe=U((KYt,Wyt)=>{Wyt.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var MCe=U((VYt,Y6)=>{"use strict";var OCe=LCe();Y6.exports=OCe;Y6.exports.default=OCe});var _Ce=U((JYt,UCe)=>{"use strict";var Yyt=(t,e,r)=>{let o=t.indexOf(e);if(o===-1)return t;let a=e.length,n=0,u="";do u+=t.substr(n,o-n)+e+r,n=o+a,o=t.indexOf(e,n);while(o!==-1);return u+=t.substr(n),u},Kyt=(t,e,r,o)=>{let a=0,n="";do{let u=t[o-1]==="\r";n+=t.substr(a,(u?o-1:o)-a)+e+(u?`\r
295`:`
296`)+r,a=o+1,o=t.indexOf(`
297`,a)}while(o!==-1);return n+=t.substr(a),n};UCe.exports={stringReplaceAll:Yyt,stringEncaseCRLFWithFirstIndex:Kyt}});var WCe=U((zYt,GCe)=>{"use strict";var Vyt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,HCe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Jyt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,zyt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Xyt=new Map([["n",`
298`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function jCe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):Xyt.get(t)||t}function Zyt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(Jyt))r.push(a[2].replace(zyt,(A,p,h)=>p?jCe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function $yt(t){HCe.lastIndex=0;let e=[],r;for(;(r=HCe.exec(t))!==null;){let o=r[1];if(r[2]){let a=Zyt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function qCe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}GCe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(Vyt,(n,u,A,p,h,C)=>{if(u)a.push(jCe(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:qCe(t,r)(w)),r.push({inverse:A,styles:$yt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(qCe(t,r)(a.join(""))),a=[],r.pop()}else a.push(C)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var XQ=U((XYt,XCe)=>{"use strict";var iB=dw(),{stdout:V6,stderr:J6}=fN(),{stringReplaceAll:eEt,stringEncaseCRLFWithFirstIndex:tEt}=_Ce(),{isArray:KQ}=Array,KCe=["ansi","ansi","ansi256","ansi16m"],NC=Object.create(null),rEt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=V6?V6.level:0;t.level=e.level===void 0?r:e.level},z6=class{constructor(e){return VCe(e)}},VCe=t=>{let e={};return rEt(e,t),e.template=(...r)=>zCe(e.template,...r),Object.setPrototypeOf(e,VQ.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=z6,e.template};function VQ(t){return VCe(t)}for(let[t,e]of Object.entries(iB))NC[t]={get(){let r=JQ(this,X6(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};NC.visible={get(){let t=JQ(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var JCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of JCe)NC[t]={get(){let{level:e}=this;return function(...r){let o=X6(iB.color[KCe[e]][t](...r),iB.color.close,this._styler);return JQ(this,o,this._isEmpty)}}};for(let t of JCe){let e="bg"+t[0].toUpperCase()+t.slice(1);NC[e]={get(){let{level:r}=this;return function(...o){let a=X6(iB.bgColor[KCe[r]][t](...o),iB.bgColor.close,this._styler);return JQ(this,a,this._isEmpty)}}}}var nEt=Object.defineProperties(()=>{},{...NC,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),X6=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},JQ=(t,e,r)=>{let o=(...a)=>KQ(a[0])&&KQ(a[0].raw)?YCe(o,zCe(o,...a)):YCe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,nEt),o._generator=t,o._styler=e,o._isEmpty=r,o},YCe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=eEt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
299`);return n!==-1&&(e=tEt(e,a,o,n)),o+e+a},K6,zCe=(t,...e)=>{let[r]=e;if(!KQ(r)||!KQ(r.raw))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return K6===void 0&&(K6=WCe()),K6(t,a.join(""))};Object.defineProperties(VQ.prototype,NC);var zQ=VQ();zQ.supportsColor=V6;zQ.stderr=VQ({level:J6?J6.level:0});zQ.stderr.supportsColor=J6;XCe.exports=zQ});var Z6=U(oB=>{"use strict";var iEt=oB&&oB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oB,"__esModule",{value:!0});var sB=iEt(XQ()),sEt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,oEt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,ZQ=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);oB.default=(t,e,r)=>{if(!e)return t;if(e in sB.default){let a=ZQ(e,r);return sB.default[a](t)}if(e.startsWith("#")){let a=ZQ("hex",r);return sB.default[a](e)(t)}if(e.startsWith("ansi")){let a=oEt.exec(e);if(!a)return t;let n=ZQ(a[1],r),u=Number(a[2]);return sB.default[n](u)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=sEt.exec(e);if(!a)return t;let n=ZQ(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return sB.default[n](u,A,p)(t)}return t}});var $Ce=U(aB=>{"use strict";var ZCe=aB&&aB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(aB,"__esModule",{value:!0});var aEt=ZCe(MCe()),$6=ZCe(Z6());aB.default=(t,e,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=aEt.default[r.style.borderStyle],p=$6.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=($6.default(A.vertical,u,"foreground")+`
300`).repeat(n-2),C=$6.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(t,e,p,{transformers:[]}),o.write(t,e+1,h,{transformers:[]}),o.write(t+a-1,e+1,h,{transformers:[]}),o.write(t,e+n-1,C,{transformers:[]})}}});var tIe=U(lB=>{"use strict";var Am=lB&&lB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lB,"__esModule",{value:!0});var lEt=Am(um()),cEt=Am(L6()),uEt=Am(TCe()),AEt=Am(q6()),fEt=Am(NCe()),pEt=Am(G6()),hEt=Am($Ce()),gEt=(t,e)=>{var r;let o=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();e=`
301`.repeat(n)+uEt.default(e,a)}return e},eIe=(t,e,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===lEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),C=n+p.getComputedTop(),w=u;if(typeof t.internal_transform=="function"&&(w=[t.internal_transform,...u]),t.nodeName==="ink-text"){let v=pEt.default(t);if(v.length>0){let b=cEt.default(v),E=fEt.default(p);if(b>E){let R=(o=t.style.textWrap)!==null&&o!==void 0?o:"wrap";v=AEt.default(v,E,R)}v=gEt(t,v),e.write(h,C,v,{transformers:w})}return}if(t.nodeName==="ink-box"&&hEt.default(h,C,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let v of t.childNodes)eIe(v,e,{offsetX:h,offsetY:C,transformers:w,skipStaticElements:A})}};lB.default=eIe});var nIe=U((tKt,rIe)=>{"use strict";rIe.exports=t=>{t=Object.assign({onlyFirst:!1},t);let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}});var sIe=U((rKt,eq)=>{"use strict";var dEt=nIe(),iIe=t=>typeof t=="string"?t.replace(dEt(),""):t;eq.exports=iIe;eq.exports.default=iIe});var lIe=U((nKt,aIe)=>{"use strict";var oIe="[\uD800-\uDBFF][\uDC00-\uDFFF]";aIe.exports=t=>t&&t.exact?new RegExp(`^${oIe}$`):new RegExp(oIe,"g")});var uIe=U((iKt,tq)=>{"use strict";var mEt=sIe(),yEt=lIe(),cIe=t=>mEt(t).replace(yEt()," ").length;tq.exports=cIe;tq.exports.default=cIe});var pIe=U(cB=>{"use strict";var fIe=cB&&cB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cB,"__esModule",{value:!0});var AIe=fIe(_6()),EEt=fIe(uIe()),rq=class{constructor(e){this.writes=[];let{width:r,height:o}=e;this.width=r,this.height=o}write(e,r,o,a){let{transformers:n}=a;!o||this.writes.push({x:e,y:r,text:o,transformers:n})}get(){let e=[];for(let o=0;o<this.height;o++)e.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
302`),h=0;for(let C of p){let w=e[n+h];if(!w)continue;let v=EEt.default(C);for(let b of A)C=b(C);e[n+h]=AIe.default(w,0,a)+C+AIe.default(w,a+v),h++}}return{output:e.map(o=>o.trimRight()).join(`
303`),height:e.length}}};cB.default=rq});var dIe=U(uB=>{"use strict";var nq=uB&&uB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uB,"__esModule",{value:!0});var CEt=nq(um()),hIe=nq(tIe()),gIe=nq(pIe());uB.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,CEt.default.DIRECTION_LTR);let o=new gIe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});hIe.default(t,o,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new gIe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),hIe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
304`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var CIe=U((aKt,EIe)=>{"use strict";var mIe=Ie("stream"),yIe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],iq={},IEt=t=>{let e=new mIe.PassThrough,r=new mIe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let o=new console.Console(e,r);for(let a of yIe)iq[a]=console[a],console[a]=o[a];return()=>{for(let a of yIe)console[a]=iq[a];iq={}}};EIe.exports=IEt});var oq=U(sq=>{"use strict";Object.defineProperty(sq,"__esModule",{value:!0});sq.default=new WeakMap});var lq=U(aq=>{"use strict";Object.defineProperty(aq,"__esModule",{value:!0});var wEt=en(),IIe=wEt.createContext({exit:()=>{}});IIe.displayName="InternalAppContext";aq.default=IIe});var uq=U(cq=>{"use strict";Object.defineProperty(cq,"__esModule",{value:!0});var BEt=en(),wIe=BEt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});wIe.displayName="InternalStdinContext";cq.default=wIe});var fq=U(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});var vEt=en(),BIe=vEt.createContext({stdout:void 0,write:()=>{}});BIe.displayName="InternalStdoutContext";Aq.default=BIe});var hq=U(pq=>{"use strict";Object.defineProperty(pq,"__esModule",{value:!0});var DEt=en(),vIe=DEt.createContext({stderr:void 0,write:()=>{}});vIe.displayName="InternalStderrContext";pq.default=vIe});var $Q=U(gq=>{"use strict";Object.defineProperty(gq,"__esModule",{value:!0});var SEt=en(),DIe=SEt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});DIe.displayName="InternalFocusContext";gq.default=DIe});var PIe=U((hKt,SIe)=>{"use strict";var PEt=/[|\\{}()[\]^$+*?.-]/g;SIe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(PEt,"\\$&")}});var kIe=U((gKt,QIe)=>{"use strict";var xEt=PIe(),bEt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",bIe=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));bIe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var AB=class{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=AB.nodeInternals()),"cwd"in e||(e.cwd=bEt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,QEt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...bIe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
305`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let o=!1,a=null,n=[];return e.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
306`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:o}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};xIe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(e){let r=e&&e.match(kEt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],C=r[8],w=r[9],v=r[10]==="native",b=r[11]===")",E,R={};if(C&&(R.line=Number(C)),w&&(R.column=Number(w)),b&&h){let L=0;for(let _=h.length-1;_>0;_--)if(h.charAt(_)===")")L++;else if(h.charAt(_)==="("&&h.charAt(_-1)===" "&&(L--,L===-1&&h.charAt(_-1)===" ")){let V=h.slice(0,_-1);h=h.slice(_+1),a+=` (${V}`;break}}if(a){let L=a.match(FEt);L&&(a=L[1],E=L[2])}return xIe(R,h,this._cwd),o&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=A,R.evalColumn=p,R.evalFile=u&&u.replace(/\\/g,"/")),v&&(R.native=!0),a&&(R.function=a),E&&a!==E&&(R.method=E),R}};function xIe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function QEt(t){if(t.length===0)return[];let e=t.map(r=>xEt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var kEt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),FEt=/^(.*?) \[as (.*?)\]$/;QIe.exports=AB});var RIe=U((dKt,FIe)=>{"use strict";FIe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var NIe=U((mKt,TIe)=>{"use strict";var REt=RIe(),TEt=(t,e)=>{let r=[],o=t-e,a=t+e;for(let n=o;n<=a;n++)r.push(n);return r};TIe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=REt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},TEt(e,r.around).filter(o=>t[o-1]!==void 0).map(o=>({line:o,value:t[o-1]}))}});var ek=U(au=>{"use strict";var NEt=au&&au.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),LEt=au&&au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),OEt=au&&au.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&NEt(e,t,r);return LEt(e,t),e},MEt=au&&au.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(t);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(r[o[a]]=t[o[a]]);return r};Object.defineProperty(au,"__esModule",{value:!0});var LIe=OEt(en()),dq=LIe.forwardRef((t,e)=>{var{children:r}=t,o=MEt(t,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||o.padding||0,paddingBottom:o.paddingBottom||o.paddingY||o.padding||0});return LIe.default.createElement("ink-box",{ref:e,style:a},r)});dq.displayName="Box";dq.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};au.default=dq});var Eq=U(fB=>{"use strict";var mq=fB&&fB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fB,"__esModule",{value:!0});var UEt=mq(en()),LC=mq(XQ()),OIe=mq(Z6()),yq=({color:t,backgroundColor:e,dimColor:r,bold:o,italic:a,underline:n,strikethrough:u,inverse:A,wrap:p,children:h})=>{if(h==null)return null;let C=w=>(r&&(w=LC.default.dim(w)),t&&(w=OIe.default(w,t,"foreground")),e&&(w=OIe.default(w,e,"background")),o&&(w=LC.default.bold(w)),a&&(w=LC.default.italic(w)),n&&(w=LC.default.underline(w)),u&&(w=LC.default.strikethrough(w)),A&&(w=LC.default.inverse(w)),w);return UEt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:p},internal_transform:C},h)};yq.displayName="Text";yq.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};fB.default=yq});var HIe=U(lu=>{"use strict";var _Et=lu&&lu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),HEt=lu&&lu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qEt=lu&&lu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&_Et(e,t,r);return HEt(e,t),e},pB=lu&&lu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lu,"__esModule",{value:!0});var MIe=qEt(Ie("fs")),hs=pB(en()),UIe=pB(kIe()),jEt=pB(NIe()),$f=pB(ek()),dA=pB(Eq()),_Ie=new UIe.default({cwd:process.cwd(),internals:UIe.default.nodeInternals()}),GEt=({error:t})=>{let e=t.stack?t.stack.split(`
307`).slice(1):void 0,r=e?_Ie.parseLine(e[0]):void 0,o,a=0;if((r==null?void 0:r.file)&&(r==null?void 0:r.line)&&MIe.existsSync(r.file)){let n=MIe.readFileSync(r.file,"utf8");if(o=jEt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return hs.default.createElement($f.default,{flexDirection:"column",padding:1},hs.default.createElement($f.default,null,hs.default.createElement(dA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),hs.default.createElement(dA.default,null," ",t.message)),r&&hs.default.createElement($f.default,{marginTop:1},hs.default.createElement(dA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&hs.default.createElement($f.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>hs.default.createElement($f.default,{key:n},hs.default.createElement($f.default,{width:a+1},hs.default.createElement(dA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),hs.default.createElement(dA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),t.stack&&hs.default.createElement($f.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
308`).slice(1).map(n=>{let u=_Ie.parseLine(n);return u?hs.default.createElement($f.default,{key:n},hs.default.createElement(dA.default,{dimColor:!0},"- "),hs.default.createElement(dA.default,{dimColor:!0,bold:!0},u.function),hs.default.createElement(dA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):hs.default.createElement($f.default,{key:n},hs.default.createElement(dA.default,{dimColor:!0},"- "),hs.default.createElement(dA.default,{dimColor:!0,bold:!0},n))})))};lu.default=GEt});var jIe=U(cu=>{"use strict";var WEt=cu&&cu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),YEt=cu&&cu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KEt=cu&&cu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&WEt(e,t,r);return YEt(e,t),e},pm=cu&&cu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cu,"__esModule",{value:!0});var fm=KEt(en()),qIe=pm(d6()),VEt=pm(lq()),JEt=pm(uq()),zEt=pm(fq()),XEt=pm(hq()),ZEt=pm($Q()),$Et=pm(HIe()),eCt=" ",tCt="\x1B[Z",rCt="\x1B",tk=class extends fm.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
309Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
310Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===rCt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===eCt&&this.focusNext(),e===tCt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(e=>{let r=e.focusables[0].id;return{activeFocusId:this.findNextFocusable(e)||r}})},this.focusPrevious=()=>{this.setState(e=>{let r=e.focusables[e.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(e)||r}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...o.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r+1;o<e.focusables.length;o++)if(e.focusables[o].isActive)return e.focusables[o].id},this.findPreviousFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r-1;o>=0;o--)if(e.focusables[o].isActive)return e.focusables[o].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return fm.default.createElement(VEt.default.Provider,{value:{exit:this.handleExit}},fm.default.createElement(JEt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},fm.default.createElement(zEt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},fm.default.createElement(XEt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},fm.default.createElement(ZEt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?fm.default.createElement($Et.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){qIe.default.hide(this.props.stdout)}componentWillUnmount(){qIe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};cu.default=tk;tk.displayName="InternalApp"});var YIe=U(uu=>{"use strict";var nCt=uu&&uu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),iCt=uu&&uu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sCt=uu&&uu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&nCt(e,t,r);return iCt(e,t),e},Au=uu&&uu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uu,"__esModule",{value:!0});var oCt=Au(en()),GIe=EM(),aCt=Au(kEe()),lCt=Au(A6()),cCt=Au(OEe()),uCt=Au(UEe()),Cq=Au(FCe()),ACt=Au(dIe()),fCt=Au(g6()),pCt=Au(CIe()),hCt=sCt(W6()),gCt=Au(oq()),dCt=Au(jIe()),OC=process.env.CI==="false"?!1:cCt.default,WIe=()=>{},Iq=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:o,staticOutput:a}=ACt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`
311`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(OC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(lCt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},uCt.default(this),this.options=e,this.rootNode=hCt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:GIe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=aCt.default.create(e.stdout),this.throttledLog=e.debug?this.log:GIe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=Cq.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=fCt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),OC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=oCt.default.createElement(dCt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);Cq.default.updateContainer(r,this.container,null,WIe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(OC){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(OC){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),OC?this.options.stdout.write(this.lastOutput+`
312`):this.options.debug||this.log.done(),this.isUnmounted=!0,Cq.default.updateContainer(null,this.container,null,WIe),gCt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!OC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=pCt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};uu.default=Iq});var VIe=U(hB=>{"use strict";var KIe=hB&&hB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hB,"__esModule",{value:!0});var mCt=KIe(YIe()),rk=KIe(oq()),yCt=Ie("stream"),ECt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},CCt(e)),o=ICt(r.stdout,()=>new mCt.default(r));return o.render(t),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>rk.default.delete(r.stdout),clear:o.clear}};hB.default=ECt;var CCt=(t={})=>t instanceof yCt.Stream?{stdout:t,stdin:process.stdin}:t,ICt=(t,e)=>{let r;return rk.default.has(t)?r=rk.default.get(t):(r=e(),rk.default.set(t,r)),r}});var zIe=U(ep=>{"use strict";var wCt=ep&&ep.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),BCt=ep&&ep.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vCt=ep&&ep.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&wCt(e,t,r);return BCt(e,t),e};Object.defineProperty(ep,"__esModule",{value:!0});var gB=vCt(en()),JIe=t=>{let{items:e,children:r,style:o}=t,[a,n]=gB.useState(0),u=gB.useMemo(()=>e.slice(a),[e,a]);gB.useLayoutEffect(()=>{n(e.length)},[e.length]);let A=u.map((h,C)=>r(h,a+C)),p=gB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return gB.default.createElement("ink-box",{internal_static:!0,style:p},A)};JIe.displayName="Static";ep.default=JIe});var ZIe=U(dB=>{"use strict";var DCt=dB&&dB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dB,"__esModule",{value:!0});var SCt=DCt(en()),XIe=({children:t,transform:e})=>t==null?null:SCt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);XIe.displayName="Transform";dB.default=XIe});var ewe=U(mB=>{"use strict";var PCt=mB&&mB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mB,"__esModule",{value:!0});var xCt=PCt(en()),$Ie=({count:t=1})=>xCt.default.createElement("ink-text",null,`
313`.repeat(t));$Ie.displayName="Newline";mB.default=$Ie});var nwe=U(yB=>{"use strict";var twe=yB&&yB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yB,"__esModule",{value:!0});var bCt=twe(en()),QCt=twe(ek()),rwe=()=>bCt.default.createElement(QCt.default,{flexGrow:1});rwe.displayName="Spacer";yB.default=rwe});var nk=U(EB=>{"use strict";var kCt=EB&&EB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(EB,"__esModule",{value:!0});var FCt=en(),RCt=kCt(uq()),TCt=()=>FCt.useContext(RCt.default);EB.default=TCt});var swe=U(CB=>{"use strict";var NCt=CB&&CB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CB,"__esModule",{value:!0});var iwe=en(),LCt=NCt(nk()),OCt=(t,e={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=LCt.default();iwe.useEffect(()=>{if(e.isActive!==!1)return o(!0),()=>{o(!1)}},[e.isActive,o]),iwe.useEffect(()=>{if(e.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",C=A>="\u0410"&&A<="\u042F";A.length===1&&(h||C)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&t(A,p)};return r==null||r.on("data",n),()=>{r==null||r.off("data",n)}},[e.isActive,r,a,t])};CB.default=OCt});var owe=U(IB=>{"use strict";var MCt=IB&&IB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(IB,"__esModule",{value:!0});var UCt=en(),_Ct=MCt(lq()),HCt=()=>UCt.useContext(_Ct.default);IB.default=HCt});var awe=U(wB=>{"use strict";var qCt=wB&&wB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wB,"__esModule",{value:!0});var jCt=en(),GCt=qCt(fq()),WCt=()=>jCt.useContext(GCt.default);wB.default=WCt});var lwe=U(BB=>{"use strict";var YCt=BB&&BB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BB,"__esModule",{value:!0});var KCt=en(),VCt=YCt(hq()),JCt=()=>KCt.useContext(VCt.default);BB.default=JCt});var uwe=U(DB=>{"use strict";var cwe=DB&&DB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DB,"__esModule",{value:!0});var vB=en(),zCt=cwe($Q()),XCt=cwe(nk()),ZCt=({isActive:t=!0,autoFocus:e=!1}={})=>{let{isRawModeSupported:r,setRawMode:o}=XCt.default(),{activeId:a,add:n,remove:u,activate:A,deactivate:p}=vB.useContext(zCt.default),h=vB.useMemo(()=>Math.random().toString().slice(2,7),[]);return vB.useEffect(()=>(n(h,{autoFocus:e}),()=>{u(h)}),[h,e]),vB.useEffect(()=>{t?A(h):p(h)},[t,h]),vB.useEffect(()=>{if(!(!r||!t))return o(!0),()=>{o(!1)}},[t]),{isFocused:Boolean(h)&&a===h}};DB.default=ZCt});var Awe=U(SB=>{"use strict";var $Ct=SB&&SB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(SB,"__esModule",{value:!0});var eIt=en(),tIt=$Ct($Q()),rIt=()=>{let t=eIt.useContext(tIt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious}};SB.default=rIt});var fwe=U(wq=>{"use strict";Object.defineProperty(wq,"__esModule",{value:!0});wq.default=t=>{var e,r,o,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=t.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var uc=U($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var nIt=VIe();Object.defineProperty($s,"render",{enumerable:!0,get:function(){return nIt.default}});var iIt=ek();Object.defineProperty($s,"Box",{enumerable:!0,get:function(){return iIt.default}});var sIt=Eq();Object.defineProperty($s,"Text",{enumerable:!0,get:function(){return sIt.default}});var oIt=zIe();Object.defineProperty($s,"Static",{enumerable:!0,get:function(){return oIt.default}});var aIt=ZIe();Object.defineProperty($s,"Transform",{enumerable:!0,get:function(){return aIt.default}});var lIt=ewe();Object.defineProperty($s,"Newline",{enumerable:!0,get:function(){return lIt.default}});var cIt=nwe();Object.defineProperty($s,"Spacer",{enumerable:!0,get:function(){return cIt.default}});var uIt=swe();Object.defineProperty($s,"useInput",{enumerable:!0,get:function(){return uIt.default}});var AIt=owe();Object.defineProperty($s,"useApp",{enumerable:!0,get:function(){return AIt.default}});var fIt=nk();Object.defineProperty($s,"useStdin",{enumerable:!0,get:function(){return fIt.default}});var pIt=awe();Object.defineProperty($s,"useStdout",{enumerable:!0,get:function(){return pIt.default}});var hIt=lwe();Object.defineProperty($s,"useStderr",{enumerable:!0,get:function(){return hIt.default}});var gIt=uwe();Object.defineProperty($s,"useFocus",{enumerable:!0,get:function(){return gIt.default}});var dIt=Awe();Object.defineProperty($s,"useFocusManager",{enumerable:!0,get:function(){return dIt.default}});var mIt=fwe();Object.defineProperty($s,"measureElement",{enumerable:!0,get:function(){return mIt.default}})});var vq={};Yt(vq,{Gem:()=>Bq});var pwe,hm,Bq,ik=dt(()=>{pwe=tt(uc()),hm=tt(en()),Bq=(0,hm.memo)(({active:t})=>{let e=(0,hm.useMemo)(()=>t?"\u25C9":"\u25EF",[t]),r=(0,hm.useMemo)(()=>t?"green":"yellow",[t]);return hm.default.createElement(pwe.Text,{color:r},e)})});var gwe={};Yt(gwe,{useKeypress:()=>gm});function gm({active:t},e,r){let{stdin:o}=(0,hwe.useStdin)(),a=(0,sk.useCallback)((n,u)=>e(n,u),r);(0,sk.useEffect)(()=>{if(!(!t||!o))return o.on("keypress",a),()=>{o.off("keypress",a)}},[t,a,o])}var hwe,sk,PB=dt(()=>{hwe=tt(uc()),sk=tt(en())});var mwe={};Yt(mwe,{FocusRequest:()=>dwe,useFocusRequest:()=>Dq});var dwe,Dq,Sq=dt(()=>{PB();dwe=(r=>(r.BEFORE="before",r.AFTER="after",r))(dwe||{}),Dq=function({active:t},e,r){gm({active:t},(o,a)=>{a.name==="tab"&&(a.shift?e("before"):e("after"))},r)}});var ywe={};Yt(ywe,{useListInput:()=>xB});var xB,ok=dt(()=>{PB();xB=function(t,e,{active:r,minus:o,plus:a,set:n,loop:u=!0}){gm({active:r},(A,p)=>{let h=e.indexOf(t);switch(p.name){case o:{let C=h-1;if(u){n(e[(e.length+C)%e.length]);return}if(C<0)return;n(e[C])}break;case a:{let C=h+1;if(u){n(e[C%e.length]);return}if(C>=e.length)return;n(e[C])}break}},[e,t,a,n,u])}});var ak={};Yt(ak,{ScrollableItems:()=>yIt});var yh,Oa,yIt,lk=dt(()=>{yh=tt(uc()),Oa=tt(en());Sq();ok();yIt=({active:t=!0,children:e=[],radius:r=10,size:o=1,loop:a=!0,onFocusRequest:n,willReachEnd:u})=>{let A=L=>{if(L.key===null)throw new Error("Expected all children to have a key");return L.key},p=Oa.default.Children.map(e,L=>A(L)),h=p[0],[C,w]=(0,Oa.useState)(h),v=p.indexOf(C);(0,Oa.useEffect)(()=>{p.includes(C)||w(h)},[e]),(0,Oa.useEffect)(()=>{u&&v>=p.length-2&&u()},[v]),Dq({active:t&&!!n},L=>{n==null||n(L)},[n]),xB(C,p,{active:t,minus:"up",plus:"down",set:w,loop:a});let b=v-r,E=v+r;E>p.length&&(b-=E-p.length,E=p.length),b<0&&(E+=-b,b=0),E>=p.length&&(E=p.length-1);let R=[];for(let L=b;L<=E;++L){let _=p[L],V=t&&_===C;R.push(Oa.default.createElement(yh.Box,{key:_,height:o},Oa.default.createElement(yh.Box,{marginLeft:1,marginRight:1},Oa.default.createElement(yh.Text,null,V?Oa.default.createElement(yh.Text,{color:"cyan",bold:!0},">"):" ")),Oa.default.createElement(yh.Box,null,Oa.default.cloneElement(e[L],{active:V}))))}return Oa.default.createElement(yh.Box,{flexDirection:"column",width:"100%"},R)}});var Ewe,tp,Cwe,Pq,Iwe,xq=dt(()=>{Ewe=tt(uc()),tp=tt(en()),Cwe=Ie("readline"),Pq=tp.default.createContext(null),Iwe=({children:t})=>{let{stdin:e,setRawMode:r}=(0,Ewe.useStdin)();(0,tp.useEffect)(()=>{r&&r(!0),e&&(0,Cwe.emitKeypressEvents)(e)},[e,r]);let[o,a]=(0,tp.useState)(new Map),n=(0,tp.useMemo)(()=>({getAll:()=>o,get:u=>o.get(u),set:(u,A)=>a(new Map([...o,[u,A]]))}),[o,a]);return tp.default.createElement(Pq.Provider,{value:n,children:t})}});var bq={};Yt(bq,{useMinistore:()=>EIt});function EIt(t,e){let r=(0,ck.useContext)(Pq);if(r===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof t>"u")return r.getAll();let o=(0,ck.useCallback)(n=>{r.set(t,n)},[t,r.set]),a=r.get(t);return typeof a>"u"&&(a=e),[a,o]}var ck,Qq=dt(()=>{ck=tt(en());xq()});var Ak={};Yt(Ak,{renderForm:()=>CIt});async function CIt(t,e,{stdin:r,stdout:o,stderr:a}){let n,u=p=>{let{exit:h}=(0,uk.useApp)();gm({active:!0},(C,w)=>{w.name==="return"&&(n=p,h())},[h,p])},{waitUntilExit:A}=(0,uk.render)(kq.default.createElement(Iwe,null,kq.default.createElement(t,{...e,useSubmit:u})),{stdin:r,stdout:o,stderr:a});return await A(),n}var uk,kq,fk=dt(()=>{uk=tt(uc()),kq=tt(en());xq();PB()});var Dwe=U(bB=>{"use strict";Object.defineProperty(bB,"__esModule",{value:!0});bB.UncontrolledTextInput=void 0;var Bwe=en(),Fq=en(),wwe=uc(),dm=XQ(),vwe=({value:t,placeholder:e="",focus:r=!0,mask:o,highlightPastedText:a=!1,showCursor:n=!0,onChange:u,onSubmit:A})=>{let[{cursorOffset:p,cursorWidth:h},C]=Fq.useState({cursorOffset:(t||"").length,cursorWidth:0});Fq.useEffect(()=>{C(R=>{if(!r||!n)return R;let L=t||"";return R.cursorOffset>L.length-1?{cursorOffset:L.length,cursorWidth:0}:R})},[t,r,n]);let w=a?h:0,v=o?o.repeat(t.length):t,b=v,E=e?dm.grey(e):void 0;if(n&&r){E=e.length>0?dm.inverse(e[0])+dm.grey(e.slice(1)):dm.inverse(" "),b=v.length>0?"":dm.inverse(" ");let R=0;for(let L of v)R>=p-w&&R<=p?b+=dm.inverse(L):b+=L,R++;v.length>0&&p===v.length&&(b+=dm.inverse(" "))}return wwe.useInput((R,L)=>{if(L.upArrow||L.downArrow||L.ctrl&&R==="c"||L.tab||L.shift&&L.tab)return;if(L.return){A&&A(t);return}let _=p,V=t,re=0;L.leftArrow?n&&_--:L.rightArrow?n&&_++:L.backspace||L.delete?p>0&&(V=t.slice(0,p-1)+t.slice(p,t.length),_--):(V=t.slice(0,p)+R+t.slice(p,t.length),_+=R.length,R.length>1&&(re=R.length)),p<0&&(_=0),p>t.length&&(_=t.length),C({cursorOffset:_,cursorWidth:re}),V!==t&&u(V)},{isActive:r}),Bwe.createElement(wwe.Text,null,e?v.length>0?b:E:b)};bB.default=vwe;bB.UncontrolledTextInput=t=>{let[e,r]=Fq.useState("");return Bwe.createElement(vwe,Object.assign({},t,{value:e,onChange:r}))}});var xwe={};Yt(xwe,{Pad:()=>Rq});var Swe,Pwe,Rq,Tq=dt(()=>{Swe=tt(uc()),Pwe=tt(en()),Rq=({length:t,active:e})=>{if(t===0)return null;let r=t>1?` ${"-".repeat(t-1)}`:" ";return Pwe.default.createElement(Swe.Text,{dimColor:!e},r)}});var bwe={};Yt(bwe,{ItemOptions:()=>IIt});var kB,Ch,IIt,Qwe=dt(()=>{kB=tt(uc()),Ch=tt(en());ok();ik();Tq();IIt=function({active:t,skewer:e,options:r,value:o,onChange:a,sizes:n=[]}){let u=r.filter(({label:p})=>!!p).map(({value:p})=>p),A=r.findIndex(p=>p.value===o&&p.label!="");return xB(o,u,{active:t,minus:"left",plus:"right",set:a}),Ch.default.createElement(Ch.default.Fragment,null,r.map(({label:p},h)=>{let C=h===A,w=n[h]-1||0,v=p.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),b=Math.max(0,w-v.length-2);return p?Ch.default.createElement(kB.Box,{key:p,width:w,marginLeft:1},Ch.default.createElement(kB.Text,{wrap:"truncate"},Ch.default.createElement(Bq,{active:C})," ",p),e?Ch.default.createElement(Rq,{active:t,length:b}):null):Ch.default.createElement(kB.Box,{key:`spacer-${h}`,width:w,marginLeft:1})}))}});var Ywe=U((sJt,Wwe)=>{var jq;Wwe.exports=()=>(typeof jq>"u"&&(jq=Ie("zlib").brotliDecompressSync(Buffer.from("W6abVjHd5indCaqldL7F3/eAMmSYwqb3Ose0DoWBu/qV74KybUeF0nPb04YlUmTIUNW0pDLG9qMbPyCoVVUeRdWAkERDd4REs50hxMCh8DrGXAJlieoPk2lOql7LazghL5zbaUF0M2kuVAxTi48HN1lFfBq+FpRCWub+3vbzNZL50ZDFfW49DiMWBKaK/7t8C6DH5o5SQQilXTSDnMfkbXuHh/hhQ/9banW2L6dnWjMNCnx7QtZM3hhOwhag1NrGoSSrE2KhsplhD0GV/B1P1tydj/BkpTnxT/w2QRTANlP1788rQtoK8kgAapxPGep4rfliB0hFSuiJs6Uu+urXUv3TGdlOGDGkXBk9Nr+UmroCFdyESxebqrl7mZRufauOUiES9ONMATyA1EdOQUrb2p+/Vv378/XKPXypecYZe8+4F4L0rSxhTooKN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NOx9j/fiEGf4FVoPRc5Tg4od2Ww6bKtnhrhQ4MnxoNjR4zv4UEdHACu4fBBT4emjssBTcmWzsXtlSdJLtrRASTqK7hzWTxb8eadPaBAfHPEAU=","base64")).toString()),jq)});var p1e=U((QJt,f1e)=>{var Zq=Symbol("arg flag"),Ma=class extends Error{constructor(e,r){super(e),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,Ma.prototype)}};function KB(t,{argv:e=process.argv.slice(2),permissive:r=!1,stopAtPositional:o=!1}={}){if(!t)throw new Ma("argument specification object is required","ARG_CONFIG_NO_SPEC");let a={_:[]},n={},u={};for(let A of Object.keys(t)){if(!A)throw new Ma("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(A[0]!=="-")throw new Ma(`argument key must start with '-' but found: '${A}'`,"ARG_CONFIG_NONOPT_KEY");if(A.length===1)throw new Ma(`argument key must have a name; singular '-' keys are not allowed: ${A}`,"ARG_CONFIG_NONAME_KEY");if(typeof t[A]=="string"){n[A]=t[A];continue}let p=t[A],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]=="function"){let[C]=p;p=(w,v,b=[])=>(b.push(C(w,v,b[b.length-1])),b),h=C===Boolean||C[Zq]===!0}else if(typeof p=="function")h=p===Boolean||p[Zq]===!0;else throw new Ma(`type missing or not a function or valid array type: ${A}`,"ARG_CONFIG_VAD_TYPE");if(A[1]!=="-"&&A.length>2)throw new Ma(`short argument keys (with a single hyphen) must have only one character: ${A}`,"ARG_CONFIG_SHORTOPT_TOOLONG");u[A]=[p,h]}for(let A=0,p=e.length;A<p;A++){let h=e[A];if(o&&a._.length>0){a._=a._.concat(e.slice(A));break}if(h==="--"){a._=a._.concat(e.slice(A+1));break}if(h.length>1&&h[0]==="-"){let C=h[1]==="-"||h.length===2?[h]:h.slice(1).split("").map(w=>`-${w}`);for(let w=0;w<C.length;w++){let v=C[w],[b,E]=v[1]==="-"?v.split(/=(.*)/,2):[v,void 0],R=b;for(;R in n;)R=n[R];if(!(R in u))if(r){a._.push(v);continue}else throw new Ma(`unknown or unexpected option: ${b}`,"ARG_UNKNOWN_OPTION");let[L,_]=u[R];if(!_&&w+1<C.length)throw new Ma(`option requires argument (but was followed by another short argument): ${b}`,"ARG_MISSING_REQUIRED_SHORTARG");if(_)a[R]=L(!0,R,a[R]);else if(E===void 0){if(e.length<A+2||e[A+1].length>1&&e[A+1][0]==="-"&&!(e[A+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(L===Number||typeof BigInt<"u"&&L===BigInt))){let V=b===R?"":` (alias for ${R})`;throw new Ma(`option requires argument: ${b}${V}`,"ARG_MISSING_REQUIRED_LONGARG")}a[R]=L(e[A+1],R,a[R]),++A}else a[R]=L(E,R,a[R])}}else a._.push(h)}return a}KB.flag=t=>(t[Zq]=!0,t);KB.COUNT=KB.flag((t,e,r)=>(r||0)+1);KB.ArgError=Ma;f1e.exports=KB});var w1e=U((ozt,I1e)=>{var rj;I1e.exports=()=>(typeof rj>"u"&&(rj=Ie("zlib").brotliDecompressSync(Buffer.from("W/IUIYpg40Bgg97dUVHR2hzAcsA2hmP1Q4sTw9pOXDhxN1aRT/NWfuwvjUXkDGybzXPipX75s+yfn6+346T29ckhg3PAIU6pDhaJtW60QhU24HL7vqq5c5n+KTwdQStAvJrPj+l1EhzjSqmgKWrnL7T6mjYXcf6/zfX72eyILYIlOD3HS34pHc/wgpoR6zufsIpYr23fp6kWtZJ3lS345GKIzdcWzDlTNvag4pLmZUqOQU31zFR19zJxiwud3J4+bG1ukPm2kICADy8l3e/fN80USYBcrCAzUbCG5pyNlW6QbZChq25VDfq3WaLRwAJkE+MgeVDWvKp6/6O70cNtgJwjYDhrjc1iGylUGIFcm8Vr1d5eCREhIlhU2IEbEe32m3aIobgBud5JivedMlJxJ0IMKHsnZcKscxqNisqIi5Sy49n+2KfP9s5+r+02hRDCV0AJ0W4bvvZN2jTe5nu3tUEIIUAImdjuPvNl+fac4h4QTI9dpJGFgznGkHwQ8RAB3n7H8u3F9oJZp1d34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Jh2yssKhHKaBXZJDDsofM3U4lDJ0GDJWL5FNatZBuUNDpWqQA73IzsDH2gXLsoZhRHv1dATDYBd0UIWt+AFXnk28IK8gtSxlV+zOgquhnru8Zf46ocl/NA7W6saAD4vslq20pnJEhb0LXe51Q9EaH6jtqs8HUQ/+Fjltq3jmaYU6bYVfySzrd7JaNYTKJKdyTIyPyRmLU/Cb11dHtXha8AvDDeLkCsjdnODdSu5qaznUdmSD+pTZuoTB1SOdc4MBCyorNgOlX+Pfyh/s7F/QsfVw/0M9ggIcLEAgFjSY2GwZttbNmg5ERXPmfhQ8butTefSNlRTYWla25g/OZo5d4AhM5Z1zmajlAv/6GNmRTBe2UiRvsQ2wMsHw4NB5DJHuLUakofxqB3Z1wmrMtYuvYej757bI1G1HB/M2/qunhs9r3D69fHvbc1jHvYCV1atQzad8D+vka8B3NLTN8ueAUh3wDts8A1fdPJWHxzSPcZrp3LjmxcNQHFRSD5QrqGPFCpNw4E8uQEpRgDohQhg1oHssn2w4fP9gnK+nR6Rjc0nv9ovY73pphDj3NUAkGgg1Mt5AW8ZTHzj9x1Obk+Y1V5ueTg7A/wFDbYr/s/31rjFUuGcj9/JuEyvwqxNou//8nwmY8VgP6mYDcaFy31FtgbI6NpctYEcHwcYf9yVnebDA8GIfe1P9mknHoGv2j9G6CvXOh00ddIaAkpzjErDnsxcimgB","base64")).toString()),rj)});var b1e=U((lj,cj)=>{(function(t){lj&&typeof lj=="object"&&typeof cj<"u"?cj.exports=t():typeof define=="function"&&define.amd?define([],t):typeof window<"u"?window.isWindows=t():typeof global<"u"?global.isWindows=t():typeof self<"u"?self.isWindows=t():this.isWindows=t()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var R1e=U((iXt,F1e)=>{"use strict";uj.ifExists=Ewt;var UC=Ie("util"),Ac=Ie("path"),Q1e=b1e(),dwt=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,mwt={createPwshFile:!0,createCmdFile:Q1e(),fs:Ie("fs")},ywt=new Map([[".js","node"],[".cjs","node"],[".mjs","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function k1e(t){let e={...mwt,...t},r=e.fs;return e.fs_={chmod:r.chmod?UC.promisify(r.chmod):async()=>{},mkdir:UC.promisify(r.mkdir),readFile:UC.promisify(r.readFile),stat:UC.promisify(r.stat),unlink:UC.promisify(r.unlink),writeFile:UC.promisify(r.writeFile)},e}async function uj(t,e,r){let o=k1e(r);await o.fs_.stat(t),await Iwt(t,e,o)}function Ewt(t,e,r){return uj(t,e,r).catch(()=>{})}function Cwt(t,e){return e.fs_.unlink(t).catch(()=>{})}async function Iwt(t,e,r){let o=await Swt(t,r);return await wwt(e,r),Bwt(t,e,o,r)}function wwt(t,e){return e.fs_.mkdir(Ac.dirname(t),{recursive:!0})}function Bwt(t,e,r,o){let a=k1e(o),n=[{generator:bwt,extension:""}];return a.createCmdFile&&n.push({generator:xwt,extension:".cmd"}),a.createPwshFile&&n.push({generator:Qwt,extension:".ps1"}),Promise.all(n.map(u=>Pwt(t,e+u.extension,r,u.generator,a)))}function vwt(t,e){return Cwt(t,e)}function Dwt(t,e){return kwt(t,e)}async function Swt(t,e){let a=(await e.fs_.readFile(t,"utf8")).trim().split(/\r*\n/)[0].match(dwt);if(!a){let n=Ac.extname(t).toLowerCase();return{program:ywt.get(n)||null,additionalArgs:""}}return{program:a[1],additionalArgs:a[2]}}async function Pwt(t,e,r,o,a){let n=a.preserveSymlinks?"--preserve-symlinks":"",u=[r.additionalArgs,n].filter(A=>A).join(" ");return a=Object.assign({},a,{prog:r.program,args:u}),await vwt(e,a),await a.fs_.writeFile(e,o(t,e,a),"utf8"),Dwt(e,a)}function xwt(t,e,r){let a=Ac.relative(Ac.dirname(e),t).split("/").join("\\"),n=Ac.isAbsolute(a)?`"${a}"`:`"%~dp0\\${a}"`,u,A=r.prog,p=r.args||"",h=Aj(r.nodePath).win32;A?(u=`"%~dp0\\${A}.exe"`,a=n):(A=n,p="",a="");let C=r.progArgs?`${r.progArgs.join(" ")} `:"",w=h?`@SET NODE_PATH=${h}\r
314`:"";return u?w+=`@IF EXIST ${u} (\r
315 ${u} ${p} ${a} ${C}%*\r
316) ELSE (\r
317 @SETLOCAL\r
318 @SET PATHEXT=%PATHEXT:;.JS;=;%\r
319 ${A} ${p} ${a} ${C}%*\r
320)\r
321`:w+=`@${A} ${p} ${a} ${C}%*\r
322`,w}function bwt(t,e,r){let o=Ac.relative(Ac.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=Ac.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=Aj(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",C=`#!/bin/sh
323basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
324
325case \`uname\` in
326 *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
327esac
328
329`,w=r.nodePath?`export NODE_PATH="${p}"
330`:"";return n?C+=`${w}if [ -x ${n} ]; then
331 exec ${n} ${A} ${o} ${h}"$@"
332else
333 exec ${a} ${A} ${o} ${h}"$@"
334fi
335`:C+=`${w}${a} ${A} ${o} ${h}"$@"
336exit $?
337`,C}function Qwt(t,e,r){let o=Ac.relative(Ac.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=Ac.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=Aj(r.nodePath),C=h.win32,w=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let v=r.progArgs?`${r.progArgs.join(" ")} `:"",b=`#!/usr/bin/env pwsh
338$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
339
340$exe=""
341${r.nodePath?`$env_node_path=$env:NODE_PATH
342$env:NODE_PATH="${C}"
343`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
344 # Fix case when both the Windows and Linux builds of Node
345 # are installed in the same directory
346 $exe=".exe"
347}`;return r.nodePath&&(b+=` else {
348 $env:NODE_PATH="${w}"
349}`),u?b+=`
350$ret=0
351if (Test-Path ${u}) {
352 # Support pipeline input
353 if ($MyInvocation.ExpectingInput) {
354 $input | & ${u} ${p} ${o} ${v}$args
355 } else {
356 & ${u} ${p} ${o} ${v}$args
357 }
358 $ret=$LASTEXITCODE
359} else {
360 # Support pipeline input
361 if ($MyInvocation.ExpectingInput) {
362 $input | & ${n} ${p} ${o} ${v}$args
363 } else {
364 & ${n} ${p} ${o} ${v}$args
365 }
366 $ret=$LASTEXITCODE
367}
368${r.nodePath?`$env:NODE_PATH=$env_node_path
369`:""}exit $ret
370`:b+=`
371# Support pipeline input
372if ($MyInvocation.ExpectingInput) {
373 $input | & ${n} ${p} ${o} ${v}$args
374} else {
375 & ${n} ${p} ${o} ${v}$args
376}
377${r.nodePath?`$env:NODE_PATH=$env_node_path
378`:""}exit $LASTEXITCODE
379`,b}function kwt(t,e){return e.fs_.chmod(t,493)}function Aj(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Ac.delimiter):Array.from(t),r={};for(let o=0;o<e.length;o++){let a=e[o].split("/").join("\\"),n=Q1e()?e[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):e[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}F1e.exports=uj});var vj=U((CZt,$1e)=>{$1e.exports=Ie("stream")});var n2e=U((IZt,r2e)=>{"use strict";function e2e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Xwt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?e2e(Object(r),!0).forEach(function(o){Zwt(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e2e(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Zwt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $wt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t2e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function e1t(t,e,r){return e&&t2e(t.prototype,e),r&&t2e(t,r),t}var t1t=Ie("buffer"),vk=t1t.Buffer,r1t=Ie("util"),Dj=r1t.inspect,n1t=Dj&&Dj.custom||"inspect";function i1t(t,e,r){vk.prototype.copy.call(t,e,r)}r2e.exports=function(){function t(){$wt(this,t),this.head=null,this.tail=null,this.length=0}return e1t(t,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return vk.alloc(0);for(var o=vk.allocUnsafe(r>>>0),a=this.head,n=0;a;)i1t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=vk.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:n1t,value:function(r,o){return Dj(this,Xwt({},o,{depth:0,customInspect:!1}))}}]),t}()});var Pj=U((wZt,s2e)=>{"use strict";function s1t(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Sj,this,t)):process.nextTick(Sj,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(Dk,r):(r._writableState.errorEmitted=!0,process.nextTick(i2e,r,n)):process.nextTick(i2e,r,n):e?(process.nextTick(Dk,r),e(n)):process.nextTick(Dk,r)}),this)}function i2e(t,e){Sj(t,e),Dk(t)}function Dk(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function o1t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Sj(t,e){t.emit("error",e)}function a1t(t,e){var r=t._readableState,o=t._writableState;r&&r.autoDestroy||o&&o.autoDestroy?t.destroy(e):t.emit("error",e)}s2e.exports={destroy:s1t,undestroy:o1t,errorOrDestroy:a1t}});var bh=U((BZt,l2e)=>{"use strict";var a2e={};function fc(t,e,r){r||(r=Error);function o(n,u,A){return typeof e=="string"?e:e(n,u,A)}class a extends r{constructor(u,A,p){super(o(u,A,p))}}a.prototype.name=r.name,a.prototype.code=t,a2e[t]=a}function o2e(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(o=>String(o)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function l1t(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function c1t(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function u1t(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}fc("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);fc("ERR_INVALID_ARG_TYPE",function(t,e,r){let o;typeof e=="string"&&l1t(e,"not ")?(o="must not be",e=e.replace(/^not /,"")):o="must be";let a;if(c1t(t," argument"))a=`The ${t} ${o} ${o2e(e,"type")}`;else{let n=u1t(t,".")?"property":"argument";a=`The "${t}" ${n} ${o} ${o2e(e,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);fc("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");fc("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});fc("ERR_STREAM_PREMATURE_CLOSE","Premature close");fc("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});fc("ERR_MULTIPLE_CALLBACK","Callback called multiple times");fc("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");fc("ERR_STREAM_WRITE_AFTER_END","write after end");fc("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);fc("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);fc("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");l2e.exports.codes=a2e});var xj=U((vZt,c2e)=>{"use strict";var A1t=bh().codes.ERR_INVALID_OPT_VALUE;function f1t(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function p1t(t,e,r,o){var a=f1t(e,o,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=o?r:"highWaterMark";throw new A1t(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}c2e.exports={getHighWaterMark:p1t}});var u2e=U((DZt,bj)=>{typeof Object.create=="function"?bj.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:bj.exports=function(e,r){if(r){e.super_=r;var o=function(){};o.prototype=r.prototype,e.prototype=new o,e.prototype.constructor=e}}});var Qh=U((SZt,kj)=>{try{if(Qj=Ie("util"),typeof Qj.inherits!="function")throw"";kj.exports=Qj.inherits}catch{kj.exports=u2e()}var Qj});var f2e=U((PZt,A2e)=>{A2e.exports=Ie("util").deprecate});var Tj=U((xZt,y2e)=>{"use strict";y2e.exports=Qi;function h2e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){_1t(e,t)}}var qC;Qi.WritableState=sv;var h1t={deprecate:f2e()},g2e=vj(),Pk=Ie("buffer").Buffer,g1t=global.Uint8Array||function(){};function d1t(t){return Pk.from(t)}function m1t(t){return Pk.isBuffer(t)||t instanceof g1t}var Rj=Pj(),y1t=xj(),E1t=y1t.getHighWaterMark,kh=bh().codes,C1t=kh.ERR_INVALID_ARG_TYPE,I1t=kh.ERR_METHOD_NOT_IMPLEMENTED,w1t=kh.ERR_MULTIPLE_CALLBACK,B1t=kh.ERR_STREAM_CANNOT_PIPE,v1t=kh.ERR_STREAM_DESTROYED,D1t=kh.ERR_STREAM_NULL_VALUES,S1t=kh.ERR_STREAM_WRITE_AFTER_END,P1t=kh.ERR_UNKNOWN_ENCODING,jC=Rj.errorOrDestroy;Qh()(Qi,g2e);function x1t(){}function sv(t,e,r){qC=qC||Im(),t=t||{},typeof r!="boolean"&&(r=e instanceof qC),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=E1t(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){N1t(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new h2e(this)}sv.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(sv.prototype,"buffer",{get:h1t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Sk;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Sk=Function.prototype[Symbol.hasInstance],Object.defineProperty(Qi,Symbol.hasInstance,{value:function(e){return Sk.call(this,e)?!0:this!==Qi?!1:e&&e._writableState instanceof sv}})):Sk=function(e){return e instanceof this};function Qi(t){qC=qC||Im();var e=this instanceof qC;if(!e&&!Sk.call(Qi,this))return new Qi(t);this._writableState=new sv(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),g2e.call(this)}Qi.prototype.pipe=function(){jC(this,new B1t)};function b1t(t,e){var r=new S1t;jC(t,r),process.nextTick(e,r)}function Q1t(t,e,r,o){var a;return r===null?a=new D1t:typeof r!="string"&&!e.objectMode&&(a=new C1t("chunk",["string","Buffer"],r)),a?(jC(t,a),process.nextTick(o,a),!1):!0}Qi.prototype.write=function(t,e,r){var o=this._writableState,a=!1,n=!o.objectMode&&m1t(t);return n&&!Pk.isBuffer(t)&&(t=d1t(t)),typeof e=="function"&&(r=e,e=null),n?e="buffer":e||(e=o.defaultEncoding),typeof r!="function"&&(r=x1t),o.ending?b1t(this,r):(n||Q1t(this,o,t,r))&&(o.pendingcb++,a=F1t(this,o,n,t,e,r)),a};Qi.prototype.cork=function(){this._writableState.corked++};Qi.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&d2e(this,t))};Qi.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new P1t(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Qi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function k1t(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Pk.from(e,r)),e}Object.defineProperty(Qi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F1t(t,e,r,o,a,n){if(!r){var u=k1t(e,o,a);o!==u&&(r=!0,a="buffer",o=u)}var A=e.objectMode?1:o.length;e.length+=A;var p=e.length<e.highWaterMark;if(p||(e.needDrain=!0),e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:o,encoding:a,isBuf:r,callback:n,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Fj(t,e,!1,A,o,a,n);return p}function Fj(t,e,r,o,a,n,u){e.writelen=o,e.writecb=u,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new v1t("write")):r?t._writev(a,e.onwrite):t._write(a,n,e.onwrite),e.sync=!1}function R1t(t,e,r,o,a){--e.pendingcb,r?(process.nextTick(a,o),process.nextTick(iv,t,e),t._writableState.errorEmitted=!0,jC(t,o)):(a(o),t._writableState.errorEmitted=!0,jC(t,o),iv(t,e))}function T1t(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function N1t(t,e){var r=t._writableState,o=r.sync,a=r.writecb;if(typeof a!="function")throw new w1t;if(T1t(r),e)R1t(t,r,o,e,a);else{var n=m2e(r)||t.destroyed;!n&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&d2e(t,r),o?process.nextTick(p2e,t,r,n,a):p2e(t,r,n,a)}}function p2e(t,e,r,o){r||L1t(t,e),e.pendingcb--,o(),iv(t,e)}function L1t(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function d2e(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var o=e.bufferedRequestCount,a=new Array(o),n=e.corkedRequestsFree;n.entry=r;for(var u=0,A=!0;r;)a[u]=r,r.isBuf||(A=!1),r=r.next,u+=1;a.allBuffers=A,Fj(t,e,!0,e.length,a,"",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new h2e(e),e.bufferedRequestCount=0}else{for(;r;){var p=r.chunk,h=r.encoding,C=r.callback,w=e.objectMode?1:p.length;if(Fj(t,e,!1,w,p,h,C),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Qi.prototype._write=function(t,e,r){r(new I1t("_write()"))};Qi.prototype._writev=null;Qi.prototype.end=function(t,e,r){var o=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),o.corked&&(o.corked=1,this.uncork()),o.ending||U1t(this,o,r),this};Object.defineProperty(Qi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function m2e(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function O1t(t,e){t._final(function(r){e.pendingcb--,r&&jC(t,r),e.prefinished=!0,t.emit("prefinish"),iv(t,e)})}function M1t(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(O1t,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function iv(t,e){var r=m2e(e);if(r&&(M1t(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var o=t._readableState;(!o||o.autoDestroy&&o.endEmitted)&&t.destroy()}return r}function U1t(t,e,r){e.ending=!0,iv(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function _1t(t,e,r){var o=t.entry;for(t.entry=null;o;){var a=o.callback;e.pendingcb--,a(r),o=o.next}e.corkedRequestsFree.next=t}Object.defineProperty(Qi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){!this._writableState||(this._writableState.destroyed=e)}});Qi.prototype.destroy=Rj.destroy;Qi.prototype._undestroy=Rj.undestroy;Qi.prototype._destroy=function(t,e){e(t)}});var Im=U((bZt,C2e)=>{"use strict";var H1t=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};C2e.exports=wA;var E2e=Oj(),Lj=Tj();Qh()(wA,E2e);for(Nj=H1t(Lj.prototype),xk=0;xk<Nj.length;xk++)bk=Nj[xk],wA.prototype[bk]||(wA.prototype[bk]=Lj.prototype[bk]);var Nj,bk,xk;function wA(t){if(!(this instanceof wA))return new wA(t);E2e.call(this,t),Lj.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",q1t)))}Object.defineProperty(wA.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(wA.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(wA.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function q1t(){this._writableState.ended||process.nextTick(j1t,this)}function j1t(t){t.end()}Object.defineProperty(wA.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var B2e=U((Mj,w2e)=>{var Qk=Ie("buffer"),op=Qk.Buffer;function I2e(t,e){for(var r in t)e[r]=t[r]}op.from&&op.alloc&&op.allocUnsafe&&op.allocUnsafeSlow?w2e.exports=Qk:(I2e(Qk,Mj),Mj.Buffer=GC);function GC(t,e,r){return op(t,e,r)}I2e(op,GC);GC.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return op(t,e,r)};GC.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var o=op(t);return e!==void 0?typeof r=="string"?o.fill(e,r):o.fill(e):o.fill(0),o};GC.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return op(t)};GC.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qk.SlowBuffer(t)}});var Hj=U(D2e=>{"use strict";var _j=B2e().Buffer,v2e=_j.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function G1t(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function W1t(t){var e=G1t(t);if(typeof e!="string"&&(_j.isEncoding===v2e||!v2e(t)))throw new Error("Unknown encoding: "+t);return e||t}D2e.StringDecoder=ov;function ov(t){this.encoding=W1t(t);var e;switch(this.encoding){case"utf16le":this.text=X1t,this.end=Z1t,e=4;break;case"utf8":this.fillLast=V1t,e=4;break;case"base64":this.text=$1t,this.end=e2t,e=3;break;default:this.write=t2t,this.end=r2t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_j.allocUnsafe(e)}ov.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};ov.prototype.end=z1t;ov.prototype.text=J1t;ov.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Uj(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Y1t(t,e,r){var o=e.length-1;if(o<r)return 0;var a=Uj(e[o]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--o<r||a===-2?0:(a=Uj(e[o]),a>=0?(a>0&&(t.lastNeed=a-2),a):--o<r||a===-2?0:(a=Uj(e[o]),a>=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function K1t(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function V1t(t){var e=this.lastTotal-this.lastNeed,r=K1t(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function J1t(t,e){var r=Y1t(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var o=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,o),t.toString("utf8",e,o)}function z1t(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function X1t(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var o=r.charCodeAt(r.length-1);if(o>=55296&&o<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Z1t(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function $1t(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function e2t(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function t2t(t){return t.toString(this.encoding)}function r2t(t){return t&&t.length?this.write(t):""}});var kk=U((kZt,x2e)=>{"use strict";var S2e=bh().codes.ERR_STREAM_PREMATURE_CLOSE;function n2t(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];t.apply(this,o)}}}function i2t(){}function s2t(t){return t.setHeader&&typeof t.abort=="function"}function P2e(t,e,r){if(typeof e=="function")return P2e(t,null,e);e||(e={}),r=n2t(r||i2t);var o=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,n=function(){t.writable||A()},u=t._writableState&&t._writableState.finished,A=function(){a=!1,u=!0,o||r.call(t)},p=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,p=!0,a||r.call(t)},C=function(E){r.call(t,E)},w=function(){var E;if(o&&!p)return(!t._readableState||!t._readableState.ended)&&(E=new S2e),r.call(t,E);if(a&&!u)return(!t._writableState||!t._writableState.ended)&&(E=new S2e),r.call(t,E)},v=function(){t.req.on("finish",A)};return s2t(t)?(t.on("complete",A),t.on("abort",w),t.req?v():t.on("request",v)):a&&!t._writableState&&(t.on("end",n),t.on("close",n)),t.on("end",h),t.on("finish",A),e.error!==!1&&t.on("error",C),t.on("close",w),function(){t.removeListener("complete",A),t.removeListener("abort",w),t.removeListener("request",v),t.req&&t.req.removeListener("finish",A),t.removeListener("end",n),t.removeListener("close",n),t.removeListener("finish",A),t.removeListener("end",h),t.removeListener("error",C),t.removeListener("close",w)}}x2e.exports=P2e});var Q2e=U((FZt,b2e)=>{"use strict";var Fk;function Fh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o2t=kk(),Rh=Symbol("lastResolve"),wm=Symbol("lastReject"),av=Symbol("error"),Rk=Symbol("ended"),Bm=Symbol("lastPromise"),qj=Symbol("handlePromise"),vm=Symbol("stream");function Th(t,e){return{value:t,done:e}}function a2t(t){var e=t[Rh];if(e!==null){var r=t[vm].read();r!==null&&(t[Bm]=null,t[Rh]=null,t[wm]=null,e(Th(r,!1)))}}function l2t(t){process.nextTick(a2t,t)}function c2t(t,e){return function(r,o){t.then(function(){if(e[Rk]){r(Th(void 0,!0));return}e[qj](r,o)},o)}}var u2t=Object.getPrototypeOf(function(){}),A2t=Object.setPrototypeOf((Fk={get stream(){return this[vm]},next:function(){var e=this,r=this[av];if(r!==null)return Promise.reject(r);if(this[Rk])return Promise.resolve(Th(void 0,!0));if(this[vm].destroyed)return new Promise(function(u,A){process.nextTick(function(){e[av]?A(e[av]):u(Th(void 0,!0))})});var o=this[Bm],a;if(o)a=new Promise(c2t(o,this));else{var n=this[vm].read();if(n!==null)return Promise.resolve(Th(n,!1));a=new Promise(this[qj])}return this[Bm]=a,a}},Fh(Fk,Symbol.asyncIterator,function(){return this}),Fh(Fk,"return",function(){var e=this;return new Promise(function(r,o){e[vm].destroy(null,function(a){if(a){o(a);return}r(Th(void 0,!0))})})}),Fk),u2t),f2t=function(e){var r,o=Object.create(A2t,(r={},Fh(r,vm,{value:e,writable:!0}),Fh(r,Rh,{value:null,writable:!0}),Fh(r,wm,{value:null,writable:!0}),Fh(r,av,{value:null,writable:!0}),Fh(r,Rk,{value:e._readableState.endEmitted,writable:!0}),Fh(r,qj,{value:function(n,u){var A=o[vm].read();A?(o[Bm]=null,o[Rh]=null,o[wm]=null,n(Th(A,!1))):(o[Rh]=n,o[wm]=u)},writable:!0}),r));return o[Bm]=null,o2t(e,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=o[wm];n!==null&&(o[Bm]=null,o[Rh]=null,o[wm]=null,n(a)),o[av]=a;return}var u=o[Rh];u!==null&&(o[Bm]=null,o[Rh]=null,o[wm]=null,u(Th(void 0,!0))),o[Rk]=!0}),e.on("readable",l2t.bind(null,o)),o};b2e.exports=f2t});var T2e=U((RZt,R2e)=>{"use strict";function k2e(t,e,r,o,a,n,u){try{var A=t[n](u),p=A.value}catch(h){r(h);return}A.done?e(p):Promise.resolve(p).then(o,a)}function p2t(t){return function(){var e=this,r=arguments;return new Promise(function(o,a){var n=t.apply(e,r);function u(p){k2e(n,o,a,u,A,"next",p)}function A(p){k2e(n,o,a,u,A,"throw",p)}u(void 0)})}}function F2e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function h2t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?F2e(Object(r),!0).forEach(function(o){g2t(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F2e(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function g2t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d2t=bh().codes.ERR_INVALID_ARG_TYPE;function m2t(t,e,r){var o;if(e&&typeof e.next=="function")o=e;else if(e&&e[Symbol.asyncIterator])o=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])o=e[Symbol.iterator]();else throw new d2t("iterable",["Iterable"],e);var a=new t(h2t({objectMode:!0},r)),n=!1;a._read=function(){n||(n=!0,u())};function u(){return A.apply(this,arguments)}function A(){return A=p2t(function*(){try{var p=yield o.next(),h=p.value,C=p.done;C?a.push(null):a.push(yield h)?u():n=!1}catch(w){a.destroy(w)}}),A.apply(this,arguments)}return a}R2e.exports=m2t});var Oj=U((NZt,G2e)=>{"use strict";G2e.exports=pn;var WC;pn.ReadableState=M2e;var TZt=Ie("events").EventEmitter,O2e=function(e,r){return e.listeners(r).length},cv=vj(),Tk=Ie("buffer").Buffer,y2t=global.Uint8Array||function(){};function E2t(t){return Tk.from(t)}function C2t(t){return Tk.isBuffer(t)||t instanceof y2t}var jj=Ie("util"),zr;jj&&jj.debuglog?zr=jj.debuglog("stream"):zr=function(){};var I2t=n2e(),zj=Pj(),w2t=xj(),B2t=w2t.getHighWaterMark,Nk=bh().codes,v2t=Nk.ERR_INVALID_ARG_TYPE,D2t=Nk.ERR_STREAM_PUSH_AFTER_EOF,S2t=Nk.ERR_METHOD_NOT_IMPLEMENTED,P2t=Nk.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,YC,Gj,Wj;Qh()(pn,cv);var lv=zj.errorOrDestroy,Yj=["error","close","destroy","pause","resume"];function x2t(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function M2e(t,e,r){WC=WC||Im(),t=t||{},typeof r!="boolean"&&(r=e instanceof WC),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=B2t(this,t,"readableHighWaterMark",r),this.buffer=new I2t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(YC||(YC=Hj().StringDecoder),this.decoder=new YC(t.encoding),this.encoding=t.encoding)}function pn(t){if(WC=WC||Im(),!(this instanceof pn))return new pn(t);var e=this instanceof WC;this._readableState=new M2e(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),cv.call(this)}Object.defineProperty(pn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});pn.prototype.destroy=zj.destroy;pn.prototype._undestroy=zj.undestroy;pn.prototype._destroy=function(t,e){e(t)};pn.prototype.push=function(t,e){var r=this._readableState,o;return r.objectMode?o=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Tk.from(t,e),e=""),o=!0),U2e(this,t,e,!1,o)};pn.prototype.unshift=function(t){return U2e(this,t,null,!0,!1)};function U2e(t,e,r,o,a){zr("readableAddChunk",e);var n=t._readableState;if(e===null)n.reading=!1,k2t(t,n);else{var u;if(a||(u=b2t(n,e)),u)lv(t,u);else if(n.objectMode||e&&e.length>0)if(typeof e!="string"&&!n.objectMode&&Object.getPrototypeOf(e)!==Tk.prototype&&(e=E2t(e)),o)n.endEmitted?lv(t,new P2t):Kj(t,n,e,!0);else if(n.ended)lv(t,new D2t);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?Kj(t,n,e,!1):Jj(t,n)):Kj(t,n,e,!1)}else o||(n.reading=!1,Jj(t,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function Kj(t,e,r,o){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,o?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Lk(t)),Jj(t,e)}function b2t(t,e){var r;return!C2t(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new v2t("chunk",["string","Buffer","Uint8Array"],e)),r}pn.prototype.isPaused=function(){return this._readableState.flowing===!1};pn.prototype.setEncoding=function(t){YC||(YC=Hj().StringDecoder);var e=new YC(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,o="";r!==null;)o+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),o!==""&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var N2e=1073741824;function Q2t(t){return t>=N2e?t=N2e:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function L2e(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Q2t(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}pn.prototype.read=function(t){zr("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return zr("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Vj(this):Lk(this),null;if(t=L2e(t,e),t===0&&e.ended)return e.length===0&&Vj(this),null;var o=e.needReadable;zr("need readable",o),(e.length===0||e.length-t<e.highWaterMark)&&(o=!0,zr("length less than watermark",o)),e.ended||e.reading?(o=!1,zr("reading or ended",o)):o&&(zr("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=L2e(r,e)));var a;return t>0?a=q2e(t,e):a=null,a===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Vj(this)),a!==null&&this.emit("data",a),a};function k2t(t,e){if(zr("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Lk(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,_2e(t)))}}function Lk(t){var e=t._readableState;zr("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(zr("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(_2e,t))}function _2e(t){var e=t._readableState;zr("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Xj(t)}function Jj(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(F2t,t,e))}function F2t(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(zr("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}pn.prototype._read=function(t){lv(this,new S2t("_read()"))};pn.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t);break}o.pipesCount+=1,zr("pipe count=%d opts=%j",o.pipesCount,e);var a=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,n=a?A:R;o.endEmitted?process.nextTick(n):r.once("end",n),t.on("unpipe",u);function u(L,_){zr("onunpipe"),L===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,C())}function A(){zr("onend"),t.end()}var p=R2t(r);t.on("drain",p);var h=!1;function C(){zr("cleanup"),t.removeListener("close",b),t.removeListener("finish",E),t.removeListener("drain",p),t.removeListener("error",v),t.removeListener("unpipe",u),r.removeListener("end",A),r.removeListener("end",R),r.removeListener("data",w),h=!0,o.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&p()}r.on("data",w);function w(L){zr("ondata");var _=t.write(L);zr("dest.write",_),_===!1&&((o.pipesCount===1&&o.pipes===t||o.pipesCount>1&&j2e(o.pipes,t)!==-1)&&!h&&(zr("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function v(L){zr("onerror",L),R(),t.removeListener("error",v),O2e(t,"error")===0&&lv(t,L)}x2t(t,"error",v);function b(){t.removeListener("finish",E),R()}t.once("close",b);function E(){zr("onfinish"),t.removeListener("close",b),R()}t.once("finish",E);function R(){zr("unpipe"),r.unpipe(t)}return t.emit("pipe",r),o.flowing||(zr("pipe resume"),r.resume()),t};function R2t(t){return function(){var r=t._readableState;zr("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&O2e(t,"data")&&(r.flowing=!0,Xj(t))}}pn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var o=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<a;n++)o[n].emit("unpipe",this,{hasUnpiped:!1});return this}var u=j2e(e.pipes,t);return u===-1?this:(e.pipes.splice(u,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};pn.prototype.on=function(t,e){var r=cv.prototype.on.call(this,t,e),o=this._readableState;return t==="data"?(o.readableListening=this.listenerCount("readable")>0,o.flowing!==!1&&this.resume()):t==="readable"&&!o.endEmitted&&!o.readableListening&&(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,zr("on readable",o.length,o.reading),o.length?Lk(this):o.reading||process.nextTick(T2t,this)),r};pn.prototype.addListener=pn.prototype.on;pn.prototype.removeListener=function(t,e){var r=cv.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(H2e,this),r};pn.prototype.removeAllListeners=function(t){var e=cv.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(H2e,this),e};function H2e(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function T2t(t){zr("readable nexttick read 0"),t.read(0)}pn.prototype.resume=function(){var t=this._readableState;return t.flowing||(zr("resume"),t.flowing=!t.readableListening,N2t(this,t)),t.paused=!1,this};function N2t(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(L2t,t,e))}function L2t(t,e){zr("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Xj(t),e.flowing&&!e.reading&&t.read(0)}pn.prototype.pause=function(){return zr("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(zr("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Xj(t){var e=t._readableState;for(zr("flow",e.flowing);e.flowing&&t.read()!==null;);}pn.prototype.wrap=function(t){var e=this,r=this._readableState,o=!1;t.on("end",function(){if(zr("wrapped end"),r.decoder&&!r.ended){var u=r.decoder.end();u&&u.length&&e.push(u)}e.push(null)}),t.on("data",function(u){if(zr("wrapped data"),r.decoder&&(u=r.decoder.write(u)),!(r.objectMode&&u==null)&&!(!r.objectMode&&(!u||!u.length))){var A=e.push(u);A||(o=!0,t.pause())}});for(var a in t)this[a]===void 0&&typeof t[a]=="function"&&(this[a]=function(A){return function(){return t[A].apply(t,arguments)}}(a));for(var n=0;n<Yj.length;n++)t.on(Yj[n],this.emit.bind(this,Yj[n]));return this._read=function(u){zr("wrapped _read",u),o&&(o=!1,t.resume())},this};typeof Symbol=="function"&&(pn.prototype[Symbol.asyncIterator]=function(){return Gj===void 0&&(Gj=Q2e()),Gj(this)});Object.defineProperty(pn.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(pn.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(pn.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});pn._fromList=q2e;Object.defineProperty(pn.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q2e(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Vj(t){var e=t._readableState;zr("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(O2t,e,t))}function O2t(t,e){if(zr("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(pn.from=function(t,e){return Wj===void 0&&(Wj=T2e()),Wj(pn,t,e)});function j2e(t,e){for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}});var Zj=U((LZt,Y2e)=>{"use strict";Y2e.exports=ap;var Ok=bh().codes,M2t=Ok.ERR_METHOD_NOT_IMPLEMENTED,U2t=Ok.ERR_MULTIPLE_CALLBACK,_2t=Ok.ERR_TRANSFORM_ALREADY_TRANSFORMING,H2t=Ok.ERR_TRANSFORM_WITH_LENGTH_0,Mk=Im();Qh()(ap,Mk);function q2t(t,e){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new U2t);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),o(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function ap(t){if(!(this instanceof ap))return new ap(t);Mk.call(this,t),this._transformState={afterTransform:q2t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",j2t)}function j2t(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){W2e(t,e,r)}):W2e(this,null,null)}ap.prototype.push=function(t,e){return this._transformState.needTransform=!1,Mk.prototype.push.call(this,t,e)};ap.prototype._transform=function(t,e,r){r(new M2t("_transform()"))};ap.prototype._write=function(t,e,r){var o=this._transformState;if(o.writecb=r,o.writechunk=t,o.writeencoding=e,!o.transforming){var a=this._readableState;(o.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};ap.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};ap.prototype._destroy=function(t,e){Mk.prototype._destroy.call(this,t,function(r){e(r)})};function W2e(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new H2t;if(t._transformState.transforming)throw new _2t;return t.push(null)}});var J2e=U((OZt,V2e)=>{"use strict";V2e.exports=uv;var K2e=Zj();Qh()(uv,K2e);function uv(t){if(!(this instanceof uv))return new uv(t);K2e.call(this,t)}uv.prototype._transform=function(t,e,r){r(null,t)}});var eBe=U((MZt,$2e)=>{"use strict";var $j;function G2t(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Z2e=bh().codes,W2t=Z2e.ERR_MISSING_ARGS,Y2t=Z2e.ERR_STREAM_DESTROYED;function z2e(t){if(t)throw t}function K2t(t){return t.setHeader&&typeof t.abort=="function"}function V2t(t,e,r,o){o=G2t(o);var a=!1;t.on("close",function(){a=!0}),$j===void 0&&($j=kk()),$j(t,{readable:e,writable:r},function(u){if(u)return o(u);a=!0,o()});var n=!1;return function(u){if(!a&&!n){if(n=!0,K2t(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();o(u||new Y2t("pipe"))}}}function X2e(t){t()}function J2t(t,e){return t.pipe(e)}function z2t(t){return!t.length||typeof t[t.length-1]!="function"?z2e:t.pop()}function X2t(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var o=z2t(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new W2t("streams");var a,n=e.map(function(u,A){var p=A<e.length-1,h=A>0;return V2t(u,p,h,function(C){a||(a=C),C&&n.forEach(X2e),!p&&(n.forEach(X2e),o(a))})});return e.reduce(J2t)}$2e.exports=X2t});var KC=U((pc,fv)=>{var Av=Ie("stream");process.env.READABLE_STREAM==="disable"&&Av?(fv.exports=Av.Readable,Object.assign(fv.exports,Av),fv.exports.Stream=Av):(pc=fv.exports=Oj(),pc.Stream=Av||pc,pc.Readable=pc,pc.Writable=Tj(),pc.Duplex=Im(),pc.Transform=Zj(),pc.PassThrough=J2e(),pc.finished=kk(),pc.pipeline=eBe())});var nBe=U((UZt,rBe)=>{"use strict";var{Buffer:hu}=Ie("buffer"),tBe=Symbol.for("BufferList");function Zn(t){if(!(this instanceof Zn))return new Zn(t);Zn._init.call(this,t)}Zn._init=function(e){Object.defineProperty(this,tBe,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};Zn.prototype._new=function(e){return new Zn(e)};Zn.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let o=0;o<this._bufs.length;o++){let a=r+this._bufs[o].length;if(e<a||o===this._bufs.length-1)return[o,e-r];r=a}};Zn.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let o=0;o<e;o++)r+=this._bufs[o].length;return r};Zn.prototype.get=function(e){if(e>this.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};Zn.prototype.slice=function(e,r){return typeof e=="number"&&e<0&&(e+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};Zn.prototype.copy=function(e,r,o,a){if((typeof o!="number"||o<0)&&(o=0),(typeof a!="number"||a>this.length)&&(a=this.length),o>=this.length||a<=0)return e||hu.alloc(0);let n=!!e,u=this._offset(o),A=a-o,p=A,h=n&&r||0,C=u[1];if(o===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:hu.concat(this._bufs,this.length);for(let w=0;w<this._bufs.length;w++)this._bufs[w].copy(e,h),h+=this._bufs[w].length;return e}if(p<=this._bufs[u[0]].length-C)return n?this._bufs[u[0]].copy(e,r,C,C+p):this._bufs[u[0]].slice(C,C+p);n||(e=hu.allocUnsafe(A));for(let w=u[0];w<this._bufs.length;w++){let v=this._bufs[w].length-C;if(p>v)this._bufs[w].copy(e,h,C),h+=v;else{this._bufs[w].copy(e,h,C,C+p),h+=v;break}p-=v,C&&(C=0)}return e.length>h?e.slice(0,h):e};Zn.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!="number"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let o=this._offset(e),a=this._offset(r),n=this._bufs.slice(o[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),o[1]!==0&&(n[0]=n[0].slice(o[1])),this._new(n)};Zn.prototype.toString=function(e,r,o){return this.slice(r,o).toString(e)};Zn.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};Zn.prototype.duplicate=function(){let e=this._new();for(let r=0;r<this._bufs.length;r++)e.append(this._bufs[r]);return e};Zn.prototype.append=function(e){if(e==null)return this;if(e.buffer)this._appendBuffer(hu.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let r=0;r<e.length;r++)this.append(e[r]);else if(this._isBufferList(e))for(let r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else typeof e=="number"&&(e=e.toString()),this._appendBuffer(hu.from(e));return this};Zn.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length};Zn.prototype.indexOf=function(t,e,r){if(r===void 0&&typeof e=="string"&&(r=e,e=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=hu.from([t]):typeof t=="string"?t=hu.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=hu.from(t.buffer,t.byteOffset,t.byteLength):hu.isBuffer(t)||(t=hu.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let o=this._offset(e),a=o[0],n=o[1];for(;a<this._bufs.length;a++){let u=this._bufs[a];for(;n<u.length;)if(u.length-n>=t.length){let p=u.indexOf(t,n);if(p!==-1)return this._reverseOffset([a,p]);n=u.length-t.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,t))return p;n++}n=0}return-1};Zn.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0};(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(r){t[r]===null?Zn.prototype[r]=function(o,a){return this.slice(o,o+a)[r](0,a)}:Zn.prototype[r]=function(o=0){return this.slice(o,o+t[r])[r](0)}})(e)})();Zn.prototype._isBufferList=function(e){return e instanceof Zn||Zn.isBufferList(e)};Zn.isBufferList=function(e){return e!=null&&e[tBe]};rBe.exports=Zn});var iBe=U((_Zt,Uk)=>{"use strict";var eG=KC().Duplex,Z2t=Qh(),pv=nBe();function Oo(t){if(!(this instanceof Oo))return new Oo(t);if(typeof t=="function"){this._callback=t;let e=function(o){this._callback&&(this._callback(o),this._callback=null)}.bind(this);this.on("pipe",function(o){o.on("error",e)}),this.on("unpipe",function(o){o.removeListener("error",e)}),t=null}pv._init.call(this,t),eG.call(this)}Z2t(Oo,eG);Object.assign(Oo.prototype,pv.prototype);Oo.prototype._new=function(e){return new Oo(e)};Oo.prototype._write=function(e,r,o){this._appendBuffer(e),typeof o=="function"&&o()};Oo.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};Oo.prototype.end=function(e){eG.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};Oo.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};Oo.prototype._isBufferList=function(e){return e instanceof Oo||e instanceof pv||Oo.isBufferList(e)};Oo.isBufferList=pv.isBufferList;Uk.exports=Oo;Uk.exports.BufferListStream=Oo;Uk.exports.BufferList=pv});var nG=U(JC=>{var $2t=Buffer.alloc,eBt="0000000000000000000",tBt="7777777777777777777",sBe="0".charCodeAt(0),oBe=Buffer.from("ustar\0","binary"),rBt=Buffer.from("00","binary"),nBt=Buffer.from("ustar ","binary"),iBt=Buffer.from(" \0","binary"),sBt=parseInt("7777",8),hv=257,rG=263,oBt=function(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},aBt=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},lBt=function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},aBe=function(t,e,r,o){for(;r<o;r++)if(t[r]===e)return r;return o},lBe=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var o=156;o<512;o++)e+=t[o];return e},Nh=function(t,e){return t=t.toString(8),t.length>e?tBt.slice(0,e)+" ":eBt.slice(0,e-t.length)+t+" "};function cBt(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],o=t.length-1;o>0;o--){var a=t[o];e?r.push(a):r.push(255-a)}var n=0,u=r.length;for(o=0;o<u;o++)n+=r[o]*Math.pow(256,o);return e?n:-1*n}var Lh=function(t,e,r){if(t=t.slice(e,e+r),e=0,t[e]&128)return cBt(t);for(;e<t.length&&t[e]===32;)e++;for(var o=oBt(aBe(t,32,e,t.length),t.length,t.length);e<o&&t[e]===0;)e++;return o===e?0:parseInt(t.slice(e,o).toString(),8)},VC=function(t,e,r,o){return t.slice(e,aBe(t,0,e,e+r)).toString(o)},tG=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};JC.decodeLongPath=function(t,e){return VC(t,0,t.length,e)};JC.encodePax=function(t){var e="";t.name&&(e+=tG(" path="+t.name+`
380`)),t.linkname&&(e+=tG(" linkpath="+t.linkname+`
381`));var r=t.pax;if(r)for(var o in r)e+=tG(" "+o+"="+r[o]+`
382`);return Buffer.from(e)};JC.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var o=parseInt(t.slice(0,r).toString(),10);if(!o)return e;var a=t.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(o)}return e};JC.encode=function(t){var e=$2t(512),r=t.name,o="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(Nh(t.mode&sBt,6),100),e.write(Nh(t.uid,6),108),e.write(Nh(t.gid,6),116),e.write(Nh(t.size,11),124),e.write(Nh(t.mtime.getTime()/1e3|0,11),136),e[156]=sBe+lBt(t.type),t.linkname&&e.write(t.linkname,157),oBe.copy(e,hv),rBt.copy(e,rG),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(Nh(t.devmajor||0,6),329),e.write(Nh(t.devminor||0,6),337),o&&e.write(o,345),e.write(Nh(lBe(e),6),148),e)};JC.decode=function(t,e,r){var o=t[156]===0?0:t[156]-sBe,a=VC(t,0,100,e),n=Lh(t,100,8),u=Lh(t,108,8),A=Lh(t,116,8),p=Lh(t,124,12),h=Lh(t,136,12),C=aBt(o),w=t[157]===0?null:VC(t,157,100,e),v=VC(t,265,32),b=VC(t,297,32),E=Lh(t,329,8),R=Lh(t,337,8),L=lBe(t);if(L===8*32)return null;if(L!==Lh(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(oBe.compare(t,hv,hv+6)===0)t[345]&&(a=VC(t,345,155,e)+"/"+a);else if(!(nBt.compare(t,hv,hv+6)===0&&iBt.compare(t,rG,rG+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:C,linkname:w,uname:v,gname:b,devmajor:E,devminor:R}}});var gBe=U((qZt,hBe)=>{var uBe=Ie("util"),uBt=iBe(),gv=nG(),ABe=KC().Writable,fBe=KC().PassThrough,pBe=function(){},cBe=function(t){return t&=511,t&&512-t},ABt=function(t,e){var r=new _k(t,e);return r.end(),r},fBt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},_k=function(t,e){this._parent=t,this.offset=e,fBe.call(this,{autoDestroy:!1})};uBe.inherits(_k,fBe);_k.prototype.destroy=function(t){this._parent.destroy(t)};var lp=function(t){if(!(this instanceof lp))return new lp(t);ABe.call(this,t),t=t||{},this._offset=0,this._buffer=uBt(),this._missing=0,this._partial=!1,this._onparse=pBe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,o=function(){e._continue()},a=function(v){if(e._locked=!1,v)return e.destroy(v);e._stream||o()},n=function(){e._stream=null;var v=cBe(e._header.size);v?e._parse(v,u):e._parse(512,w),e._locked||o()},u=function(){e._buffer.consume(cBe(e._header.size)),e._parse(512,w),o()},A=function(){var v=e._header.size;e._paxGlobal=gv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=e._header.size;e._pax=gv.decodePax(r.slice(0,v)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(v),n()},h=function(){var v=e._header.size;this._gnuLongPath=gv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},C=function(){var v=e._header.size;this._gnuLongLinkPath=gv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},w=function(){var v=e._offset,b;try{b=e._header=gv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(E){e.emit("error",E)}if(r.consume(512),!b){e._parse(512,w),o();return}if(b.type==="gnu-long-path"){e._parse(b.size,h),o();return}if(b.type==="gnu-long-link-path"){e._parse(b.size,C),o();return}if(b.type==="pax-global-header"){e._parse(b.size,A),o();return}if(b.type==="pax-header"){e._parse(b.size,p),o();return}if(e._gnuLongPath&&(b.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(b.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=b=fBt(b,e._pax),e._pax=null),e._locked=!0,!b.size||b.type==="directory"){e._parse(512,w),e.emit("entry",b,ABt(e,v),a);return}e._stream=new _k(e,v),e.emit("entry",b,e._stream,a),e._parse(b.size,n),o()};this._onheader=w,this._parse(512,w)};uBe.inherits(lp,ABe);lp.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};lp.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};lp.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=pBe,this._overflow?this._write(this._overflow,void 0,t):t()}};lp.prototype._write=function(t,e,r){if(!this._destroyed){var o=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.length<n)return this._missing-=t.length,this._overflow=null,o?o.write(t,r):(a.append(t),r());this._cb=r,this._missing=0;var u=null;t.length>n&&(u=t.slice(n),t=t.slice(0,n)),o?o.end(t):a.append(t),this._overflow=u,this._onparse()}};lp.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()};hBe.exports=lp});var mBe=U((jZt,dBe)=>{dBe.exports=Ie("fs").constants||Ie("constants")});var wBe=U((GZt,IBe)=>{var zC=mBe(),yBe=KM(),qk=Qh(),pBt=Buffer.alloc,EBe=KC().Readable,XC=KC().Writable,hBt=Ie("string_decoder").StringDecoder,Hk=nG(),gBt=parseInt("755",8),dBt=parseInt("644",8),CBe=pBt(1024),sG=function(){},iG=function(t,e){e&=511,e&&t.push(CBe.slice(0,512-e))};function mBt(t){switch(t&zC.S_IFMT){case zC.S_IFBLK:return"block-device";case zC.S_IFCHR:return"character-device";case zC.S_IFDIR:return"directory";case zC.S_IFIFO:return"fifo";case zC.S_IFLNK:return"symlink"}return"file"}var jk=function(t){XC.call(this),this.written=0,this._to=t,this._destroyed=!1};qk(jk,XC);jk.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};jk.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Gk=function(){XC.call(this),this.linkname="",this._decoder=new hBt("utf-8"),this._destroyed=!1};qk(Gk,XC);Gk.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};Gk.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var dv=function(){XC.call(this),this._destroyed=!1};qk(dv,XC);dv.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))};dv.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var BA=function(t){if(!(this instanceof BA))return new BA(t);EBe.call(this,t),this._drain=sG,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};qk(BA,EBe);BA.prototype.entry=function(t,e,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof e=="function"&&(r=e,e=null),r||(r=sG);var o=this;if((!t.size||t.type==="symlink")&&(t.size=0),t.type||(t.type=mBt(t.mode)),t.mode||(t.mode=t.type==="directory"?gBt:dBt),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e=="string"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var a=this.push(e);return iG(o,t.size),a?process.nextTick(r):this._drain=r,new dv}if(t.type==="symlink"&&!t.linkname){var n=new Gk;return yBe(n,function(A){if(A)return o.destroy(),r(A);t.linkname=n.linkname,o._encode(t),r()}),n}if(this._encode(t),t.type!=="file"&&t.type!=="contiguous-file")return process.nextTick(r),new dv;var u=new jk(this);return this._stream=u,yBe(u,function(A){if(o._stream=null,A)return o.destroy(),r(A);if(u.written!==t.size)return o.destroy(),r(new Error("size mismatch"));iG(o,t.size),o._finalizing&&o.finalize(),r()}),u}};BA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(CBe),this.push(null))};BA.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};BA.prototype._encode=function(t){if(!t.pax){var e=Hk.encode(t);if(e){this.push(e);return}}this._encodePax(t)};BA.prototype._encodePax=function(t){var e=Hk.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(Hk.encode(r)),this.push(e),iG(this,e.length),r.size=t.size,r.type=t.type,this.push(Hk.encode(r))};BA.prototype._read=function(t){var e=this._drain;this._drain=sG,e()};IBe.exports=BA});var BBe=U(oG=>{oG.extract=gBe();oG.pack=wBe()});var NBe=U((A$t,TBe)=>{"use strict";var Dm=class{constructor(e,r,o){this.__specs=e||{},Object.keys(this.__specs).forEach(a=>{if(typeof this.__specs[a]=="string"){let n=this.__specs[a],u=this.__specs[n];if(u){let A=u.aliases||[];A.push(a,n),u.aliases=[...new Set(A)],this.__specs[a]=u}else throw new Error(`Alias refers to invalid key: ${n} -> ${a}`)}}),this.__opts=r||{},this.__providers=FBe(o.filter(a=>a!=null&&typeof a=="object")),this.__isFiggyPudding=!0}get(e){return fG(this,e,!0)}get[Symbol.toStringTag](){return"FiggyPudding"}forEach(e,r=this){for(let[o,a]of this.entries())e.call(r,a,o,this)}toJSON(){let e={};return this.forEach((r,o)=>{e[o]=r}),e}*entries(e){for(let o of Object.keys(this.__specs))yield[o,this.get(o)];let r=e||this.__opts.other;if(r){let o=new Set;for(let a of this.__providers){let n=a.entries?a.entries(r):FBt(a);for(let[u,A]of n)r(u)&&!o.has(u)&&(o.add(u),yield[u,A])}}}*[Symbol.iterator](){for(let[e,r]of this.entries())yield[e,r]}*keys(){for(let[e]of this.entries())yield e}*values(){for(let[,e]of this.entries())yield e}concat(...e){return new Proxy(new Dm(this.__specs,this.__opts,FBe(this.__providers).concat(e)),RBe)}};try{let t=Ie("util");Dm.prototype[t.inspect.custom]=function(e,r){return this[Symbol.toStringTag]+" "+t.inspect(this.toJSON(),r)}}catch{}function QBt(t){throw Object.assign(new Error(`invalid config key requested: ${t}`),{code:"EBADKEY"})}function fG(t,e,r){let o=t.__specs[e];if(r&&!o&&(!t.__opts.other||!t.__opts.other(e)))QBt(e);else{o||(o={});let a;for(let n of t.__providers){if(a=kBe(e,n),a===void 0&&o.aliases&&o.aliases.length){for(let u of o.aliases)if(u!==e&&(a=kBe(u,n),a!==void 0))break}if(a!==void 0)break}return a===void 0&&o.default!==void 0?typeof o.default=="function"?o.default(t):o.default:a}}function kBe(t,e){let r;return e.__isFiggyPudding?r=fG(e,t,!1):typeof e.get=="function"?r=e.get(t):r=e[t],r}var RBe={has(t,e){return e in t.__specs&&fG(t,e,!1)!==void 0},ownKeys(t){return Object.keys(t.__specs)},get(t,e){return typeof e=="symbol"||e.slice(0,2)==="__"||e in Dm.prototype?t[e]:t.get(e)},set(t,e,r){if(typeof e=="symbol"||e.slice(0,2)==="__")return t[e]=r,!0;throw new Error("figgyPudding options cannot be modified. Use .concat() instead.")},deleteProperty(){throw new Error("figgyPudding options cannot be deleted. Use .concat() and shadow them instead.")}};TBe.exports=kBt;function kBt(t,e){function r(...o){return new Proxy(new Dm(t,e,o),RBe)}return r}function FBe(t){let e=[];return t.forEach(r=>e.unshift(r)),e}function FBt(t){return Object.keys(t).map(e=>[e,t[e]])}});var MBe=U((f$t,SA)=>{"use strict";var yv=Ie("crypto"),RBt=NBe(),TBt=Ie("stream").Transform,LBe=["sha256","sha384","sha512"],NBt=/^[a-z0-9+/]+(?:=?=?)$/i,LBt=/^([^-]+)-([^?]+)([?\S*]*)$/,OBt=/^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/,MBt=/^[\x21-\x7E]+$/,ra=RBt({algorithms:{default:["sha512"]},error:{default:!1},integrity:{},options:{default:[]},pickAlgorithm:{default:()=>YBt},Promise:{default:()=>Promise},sep:{default:" "},single:{default:!1},size:{},strict:{default:!1}}),Mh=class{get isHash(){return!0}constructor(e,r){r=ra(r);let o=!!r.strict;this.source=e.trim();let a=this.source.match(o?OBt:LBt);if(!a||o&&!LBe.some(u=>u===a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];this.options=n?n.slice(1).split("?"):[]}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(e){if(e=ra(e),e.strict&&!(LBe.some(o=>o===this.algorithm)&&this.digest.match(NBt)&&(this.options||[]).every(o=>o.match(MBt))))return"";let r=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${r}`}},Sm=class{get isIntegrity(){return!0}toJSON(){return this.toString()}toString(e){e=ra(e);let r=e.sep||" ";return e.strict&&(r=r.replace(/\S+/g," ")),Object.keys(this).map(o=>this[o].map(a=>Mh.prototype.toString.call(a,e)).filter(a=>a.length).join(r)).filter(o=>o.length).join(r)}concat(e,r){r=ra(r);let o=typeof e=="string"?e:mv(e,r);return DA(`${this.toString(r)} ${o}`,r)}hexDigest(){return DA(this,{single:!0}).hexDigest()}match(e,r){r=ra(r);let o=DA(e,r),a=o.pickAlgorithm(r);return this[a]&&o[a]&&this[a].find(n=>o[a].find(u=>n.digest===u.digest))||!1}pickAlgorithm(e){e=ra(e);let r=e.pickAlgorithm,o=Object.keys(this);if(!o.length)throw new Error(`No algorithms available for ${JSON.stringify(this.toString())}`);return o.reduce((a,n)=>r(a,n)||a)}};SA.exports.parse=DA;function DA(t,e){if(e=ra(e),typeof t=="string")return pG(t,e);if(t.algorithm&&t.digest){let r=new Sm;return r[t.algorithm]=[t],pG(mv(r,e),e)}else return pG(mv(t,e),e)}function pG(t,e){return e.single?new Mh(t,e):t.trim().split(/\s+/).reduce((r,o)=>{let a=new Mh(o,e);if(a.algorithm&&a.digest){let n=a.algorithm;r[n]||(r[n]=[]),r[n].push(a)}return r},new Sm)}SA.exports.stringify=mv;function mv(t,e){return e=ra(e),t.algorithm&&t.digest?Mh.prototype.toString.call(t,e):typeof t=="string"?mv(DA(t,e),e):Sm.prototype.toString.call(t,e)}SA.exports.fromHex=UBt;function UBt(t,e,r){r=ra(r);let o=r.options&&r.options.length?`?${r.options.join("?")}`:"";return DA(`${e}-${Buffer.from(t,"hex").toString("base64")}${o}`,r)}SA.exports.fromData=_Bt;function _Bt(t,e){e=ra(e);let r=e.algorithms,o=e.options&&e.options.length?`?${e.options.join("?")}`:"";return r.reduce((a,n)=>{let u=yv.createHash(n).update(t).digest("base64"),A=new Mh(`${n}-${u}${o}`,e);if(A.algorithm&&A.digest){let p=A.algorithm;a[p]||(a[p]=[]),a[p].push(A)}return a},new Sm)}SA.exports.fromStream=HBt;function HBt(t,e){e=ra(e);let r=e.Promise||Promise,o=hG(e);return new r((a,n)=>{t.pipe(o),t.on("error",n),o.on("error",n);let u;o.on("integrity",A=>{u=A}),o.on("end",()=>a(u)),o.on("data",()=>{})})}SA.exports.checkData=qBt;function qBt(t,e,r){if(r=ra(r),e=DA(e,r),!Object.keys(e).length){if(r.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let o=e.pickAlgorithm(r),a=yv.createHash(o).update(t).digest("base64"),n=DA({algorithm:o,digest:a}),u=n.match(e,r);if(u||!r.error)return u;if(typeof r.size=="number"&&t.length!==r.size){let A=new Error(`data size mismatch when checking ${e}.
383 Wanted: ${r.size}
384 Found: ${t.length}`);throw A.code="EBADSIZE",A.found=t.length,A.expected=r.size,A.sri=e,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=e,A.algorithm=o,A.sri=e,A}}SA.exports.checkStream=jBt;function jBt(t,e,r){r=ra(r);let o=r.Promise||Promise,a=hG(r.concat({integrity:e}));return new o((n,u)=>{t.pipe(a),t.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}SA.exports.integrityStream=hG;function hG(t){t=ra(t);let e=t.integrity&&DA(t.integrity,t),r=e&&Object.keys(e).length,o=r&&e.pickAlgorithm(t),a=r&&e[o],n=Array.from(new Set(t.algorithms.concat(o?[o]:[]))),u=n.map(yv.createHash),A=0,p=new TBt({transform(h,C,w){A+=h.length,u.forEach(v=>v.update(h,C)),w(null,h,C)}}).on("end",()=>{let h=t.options&&t.options.length?`?${t.options.join("?")}`:"",C=DA(u.map((v,b)=>`${n[b]}-${v.digest("base64")}${h}`).join(" "),t),w=r&&C.match(e,t);if(typeof t.size=="number"&&A!==t.size){let v=new Error(`stream size mismatch when checking ${e}.
385 Wanted: ${t.size}
386 Found: ${A}`);v.code="EBADSIZE",v.found=A,v.expected=t.size,v.sri=e,p.emit("error",v)}else if(t.integrity&&!w){let v=new Error(`${e} integrity checksum failed when using ${o}: wanted ${a} but got ${C}. (${A} bytes)`);v.code="EINTEGRITY",v.found=C,v.expected=a,v.algorithm=o,v.sri=e,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",C),w&&p.emit("verified",w)});return p}SA.exports.create=GBt;function GBt(t){t=ra(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(yv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return e.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new Mh(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let C=h.algorithm;u[C]||(u[C]=[]),u[C].push(h)}return u},new Sm)}}}var WBt=new Set(yv.getHashes()),OBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>WBt.has(t));function YBt(t,e){return OBe.indexOf(t.toLowerCase())>=OBe.indexOf(e.toLowerCase())?t:e}});var yve=U((pnr,mve)=>{var Vvt=iL();function Jvt(t){return Vvt(t)?void 0:t}mve.exports=Jvt});var Cve=U((hnr,Eve)=>{var zvt=Tx(),Xvt=b8(),Zvt=R8(),$vt=Yd(),eDt=dd(),tDt=yve(),rDt=B_(),nDt=x8(),iDt=1,sDt=2,oDt=4,aDt=rDt(function(t,e){var r={};if(t==null)return r;var o=!1;e=zvt(e,function(n){return n=$vt(n,t),o||(o=n.length>1),n}),eDt(t,nDt(t),r),o&&(r=Xvt(r,iDt|sDt|oDt,tDt));for(var a=e.length;a--;)Zvt(r,e[a]);return r});Eve.exports=aDt});Ke();Ke();St();var Q_=Ie("child_process"),I0e=tt(Zg());_t();var k_=Ie("fs");var lC=new Map([]);function tAt(t){let e=ue.fromPortablePath(t);process.on("SIGINT",()=>{}),e?(0,Q_.execFileSync)(process.execPath,[e,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,Q_.execFileSync)(e,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}async function Xb({binaryVersion:t,pluginConfiguration:e}){async function r(){let a=new vo({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:t});try{await o(a)}catch(n){process.stdout.write(a.error(n)),process.exitCode=1}}async function o(a){var R,L,_,V;let n=process.versions.node,u=">=14.15.0";if(!We.parseOptionalBoolean(process.env.YARN_IGNORE_NODE)&&!Tr.satisfiesWithPrereleases(n,u))throw new ot(`This tool requires a Node version compatible with ${u} (got ${n}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);let p=await Xe.find(ue.toPortablePath(process.cwd()),e,{usePath:!0,strict:!1}),h=p.get("yarnPath"),C=p.get("ignorePath"),w=p.get("ignoreCwd"),v=ue.toPortablePath(ue.resolve(process.argv[1])),b=re=>oe.readFilePromise(re).catch(()=>Buffer.of());if(!C&&!w&&await(async()=>h&&(h===v||Buffer.compare(...await Promise.all([b(h),b(v)]))===0))()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",await o(a);return}else if(h!==null&&!C)if(!oe.existsSync(h))process.stdout.write(a.error(new Error(`The "yarn-path" option has been set (in ${p.sources.get("yarnPath")}), but the specified location doesn't exist (${h}).`))),process.exitCode=1;else try{tAt(h)}catch(re){process.exitCode=re.code||1}else{C&&delete process.env.YARN_IGNORE_PATH,p.get("enableTelemetry")&&!I0e.isCI&&process.stdout.isTTY&&(Xe.telemetry=new aC(p,"puba9cdc10ec5790a2cf4969dd413a47270")),(R=Xe.telemetry)==null||R.reportVersion(t);for(let[De,ge]of p.plugins.entries()){lC.has(((L=De.match(/^@yarnpkg\/plugin-(.*)$/))==null?void 0:L[1])??"")&&((_=Xe.telemetry)==null||_.reportPluginName(De));for(let le of ge.commands||[])a.register(le)}let ae={cwd:ue.toPortablePath(process.cwd()),plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},he=a.process(process.argv.slice(2),ae);he.help||(V=Xe.telemetry)==null||V.reportCommandName(he.path.join(" "));let pe=he.cwd;if(typeof pe<"u"&&!w){let De=(0,k_.realpathSync)(process.cwd()),ge=(0,k_.realpathSync)(pe);if(De!==ge){process.chdir(pe),await r();return}}await a.runExit(he,ae)}}return r().catch(a=>{process.stdout.write(a.stack||a.message),process.exitCode=1}).finally(()=>oe.rmtempPromise())}var K1={};Yt(K1,{BaseCommand:()=>ct,WorkspaceRequiredError:()=>er,getDynamicLibs:()=>w0e,getPluginConfiguration:()=>Zb,main:()=>Xb,openWorkspace:()=>cC,pluginCommands:()=>lC});_t();var ct=class extends it{constructor(){super(...arguments);this.cwd=fe.String("--cwd",{hidden:!0})}};Ke();St();_t();var er=class extends ot{constructor(e,r){let o=J.relative(e,r),a=J.join(e,Nt.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};Ke();St();Hc();Hl();I1();_t();var rAt=tt(si());rl();var w0e=()=>new Map([["@yarnpkg/cli",K1],["@yarnpkg/core",Y1],["@yarnpkg/fslib",UI],["@yarnpkg/libzip",HI],["@yarnpkg/parsers",JI],["@yarnpkg/shell",D1],["clipanion",iw],["semver",rAt],["typanion",Yo]]);Ke();async function cC(t,e){let{project:r,workspace:o}=await Pt.find(t,e);if(!o)throw new er(r.cwd,e);return o}Ke();St();Hc();Hl();I1();_t();var dDt=tt(si());rl();var eH={};Yt(eH,{AddCommand:()=>x0,BinCommand:()=>b0,CacheCleanCommand:()=>Q0,ClipanionCommand:()=>zd,ConfigCommand:()=>T0,ConfigGetCommand:()=>k0,ConfigSetCommand:()=>F0,ConfigUnsetCommand:()=>R0,DedupeCommand:()=>N0,EntryCommand:()=>pC,ExecCommand:()=>L0,ExplainCommand:()=>U0,ExplainPeerRequirementsCommand:()=>O0,HelpCommand:()=>Xd,InfoCommand:()=>_0,LinkCommand:()=>q0,NodeCommand:()=>j0,PluginCheckCommand:()=>G0,PluginImportCommand:()=>K0,PluginImportSourcesCommand:()=>V0,PluginListCommand:()=>W0,PluginRemoveCommand:()=>J0,PluginRuntimeCommand:()=>z0,RebuildCommand:()=>X0,RemoveCommand:()=>Z0,RunCommand:()=>$0,RunIndexCommand:()=>em,SetResolutionCommand:()=>eh,SetVersionCommand:()=>M0,SetVersionSourcesCommand:()=>Y0,UnlinkCommand:()=>th,UpCommand:()=>zf,VersionCommand:()=>Zd,WhyCommand:()=>rh,WorkspaceCommand:()=>sh,WorkspacesListCommand:()=>ih,YarnCommand:()=>H0,dedupeUtils:()=>aQ,default:()=>Yht,suggestUtils:()=>tu});var eme=tt(Zg());Ke();Ke();Ke();_t();var cge=tt(Z1());rl();var tu={};Yt(tu,{Modifier:()=>B8,Strategy:()=>sQ,Target:()=>$1,WorkspaceModifier:()=>ige,applyModifier:()=>wft,extractDescriptorFromPath:()=>v8,extractRangeModifier:()=>sge,fetchDescriptorFrom:()=>D8,findProjectDescriptors:()=>lge,getModifier:()=>e2,getSuggestedDescriptors:()=>t2,makeWorkspaceDescriptor:()=>age,toWorkspaceModifier:()=>oge});Ke();Ke();St();var w8=tt(si()),Cft="workspace:",$1=(o=>(o.REGULAR="dependencies",o.DEVELOPMENT="devDependencies",o.PEER="peerDependencies",o))($1||{}),B8=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="",o))(B8||{}),ige=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="*",o))(ige||{}),sQ=(n=>(n.KEEP="keep",n.REUSE="reuse",n.PROJECT="project",n.LATEST="latest",n.CACHE="cache",n))(sQ||{});function e2(t,e){return t.exact?"":t.caret?"^":t.tilde?"~":e.configuration.get("defaultSemverRangePrefix")}var Ift=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function sge(t,{project:e}){let r=t.match(Ift);return r?r[1]:e.configuration.get("defaultSemverRangePrefix")}function wft(t,e){let{protocol:r,source:o,params:a,selector:n}=Y.parseRange(t.range);return w8.default.valid(n)&&(n=`${e}${t.range}`),Y.makeDescriptor(t,Y.makeRange({protocol:r,source:o,params:a,selector:n}))}function oge(t){switch(t){case"^":return"^";case"~":return"~";case"":return"*";default:throw new Error(`Assertion failed: Unknown modifier: "${t}"`)}}function age(t,e){return Y.makeDescriptor(t.anchoredDescriptor,`${Cft}${oge(e)}`)}async function lge(t,{project:e,target:r}){let o=new Map,a=n=>{let u=o.get(n.descriptorHash);return u||o.set(n.descriptorHash,u={descriptor:n,locators:[]}),u};for(let n of e.workspaces)if(r==="peerDependencies"){let u=n.manifest.peerDependencies.get(t.identHash);u!==void 0&&a(u).locators.push(n.anchoredLocator)}else{let u=n.manifest.dependencies.get(t.identHash),A=n.manifest.devDependencies.get(t.identHash);r==="devDependencies"?A!==void 0?a(A).locators.push(n.anchoredLocator):u!==void 0&&a(u).locators.push(n.anchoredLocator):u!==void 0?a(u).locators.push(n.anchoredLocator):A!==void 0&&a(A).locators.push(n.anchoredLocator)}return o}async function v8(t,{cwd:e,workspace:r}){return await Bft(async o=>{J.isAbsolute(t)||(t=J.relative(r.cwd,J.resolve(e,t)),t.match(/^\.{0,2}\//)||(t=`./${t}`));let{project:a}=r,n=await D8(Y.makeIdent(null,"archive"),t,{project:r.project,cache:o,workspace:r});if(!n)throw new Error("Assertion failed: The descriptor should have been found");let u=new xi,A=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:o,fetcher:p,report:u,resolver:A},C=A.bindDescriptor(n,r.anchoredLocator,h),w=Y.convertDescriptorToLocator(C),v=await p.fetch(w,h),b=await Nt.find(v.prefixPath,{baseFs:v.packageFs});if(!b.name)throw new Error("Target path doesn't have a name");return Y.makeDescriptor(b.name,t)})}async function t2(t,{project:e,workspace:r,cache:o,target:a,fixed:n,modifier:u,strategies:A,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let[h,C]=t.range!=="unknown"?n||Tr.validRange(t.range)||!t.range.match(/^[a-z0-9._-]+$/i)?[t.range,"latest"]:["unknown",t.range]:["unknown","latest"];if(h!=="unknown")return{suggestions:[{descriptor:t,name:`Use ${Y.prettyDescriptor(e.configuration,t)}`,reason:"(unambiguous explicit request)"}],rejections:[]};let w=typeof r<"u"&&r!==null&&r.manifest[a].get(t.identHash)||null,v=[],b=[],E=async R=>{try{await R()}catch(L){b.push(L)}};for(let R of A){if(v.length>=p)break;switch(R){case"keep":await E(async()=>{w&&v.push({descriptor:w,name:`Keep ${Y.prettyDescriptor(e.configuration,w)}`,reason:"(no changes)"})});break;case"reuse":await E(async()=>{for(let{descriptor:L,locators:_}of(await lge(t,{project:e,target:a})).values()){if(_.length===1&&_[0].locatorHash===r.anchoredLocator.locatorHash&&A.includes("keep"))continue;let V=`(originally used by ${Y.prettyLocator(e.configuration,_[0])}`;V+=_.length>1?` and ${_.length-1} other${_.length>2?"s":""})`:")",v.push({descriptor:L,name:`Reuse ${Y.prettyDescriptor(e.configuration,L)}`,reason:V})}});break;case"cache":await E(async()=>{for(let L of e.storedDescriptors.values())L.identHash===t.identHash&&v.push({descriptor:L,name:`Reuse ${Y.prettyDescriptor(e.configuration,L)}`,reason:"(already used somewhere in the lockfile)"})});break;case"project":await E(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let L=e.tryWorkspaceByIdent(t);if(L===null)return;let _=age(L,u);v.push({descriptor:_,name:`Attach ${Y.prettyDescriptor(e.configuration,_)}`,reason:`(local workspace at ${ye.pretty(e.configuration,L.relativeCwd,ye.Type.PATH)})`})});break;case"latest":await E(async()=>{if(a==="peerDependencies")v.push({descriptor:Y.makeDescriptor(t,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(!e.configuration.get("enableNetwork"))v.push({descriptor:null,name:"Resolve from latest",reason:ye.pretty(e.configuration,"(unavailable because enableNetwork is toggled off)","grey")});else{let L=await D8(t,C,{project:e,cache:o,workspace:r,modifier:u});L&&v.push({descriptor:L,name:`Use ${Y.prettyDescriptor(e.configuration,L)}`,reason:"(resolved from latest)"})}});break}}return{suggestions:v.slice(0,p),rejections:b.slice(0,p)}}async function D8(t,e,{project:r,cache:o,workspace:a,preserveModifier:n=!0,modifier:u}){let A=r.configuration.normalizeDependency(Y.makeDescriptor(t,e)),p=new xi,h=r.configuration.makeFetcher(),C=r.configuration.makeResolver(),w={project:r,fetcher:h,cache:o,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},v={...w,resolver:C,fetchOptions:w},b=C.bindDescriptor(A,a.anchoredLocator,v),E=await C.getCandidates(b,{},v);if(E.length===0)return null;let R=E[0],{protocol:L,source:_,params:V,selector:re}=Y.parseRange(Y.convertToManifestRange(R.reference));if(L===r.configuration.get("defaultProtocol")&&(L=null),w8.default.valid(re)){let ae=re;if(typeof u<"u")re=u+re;else if(n!==!1){let De=typeof n=="string"?n:A.range;re=sge(De,{project:r})+re}let he=Y.makeDescriptor(R,Y.makeRange({protocol:L,source:_,params:V,selector:re}));(await C.getCandidates(r.configuration.normalizeDependency(he),{},v)).length!==1&&(re=ae)}return Y.makeDescriptor(R,Y.makeRange({protocol:L,source:_,params:V,selector:re}))}async function Bft(t){return await oe.mktempPromise(async e=>{let r=Xe.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Ur(e,{configuration:r,check:!1,immutable:!1}))})}var x0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.fixed=fe.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=fe.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=fe.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=fe.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.dev=fe.Boolean("-D,--dev",!1,{description:"Add a package as a dev dependency"});this.peer=fe.Boolean("-P,--peer",!1,{description:"Add a package as a peer dependency"});this.optional=fe.Boolean("-O,--optional",!1,{description:"Add / upgrade a package to an optional regular / peer dependency"});this.preferDev=fe.Boolean("--prefer-dev",!1,{description:"Add / upgrade a package to a dev dependency"});this.interactive=fe.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"});this.cached=fe.Boolean("--cached",!1,{description:"Reuse the highest version already used somewhere within the project"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(dl)});this.silent=fe.Boolean("--silent",{hidden:!0});this.packages=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=A||r.get("preferReuse"),h=e2(this,o),C=[p?"reuse":void 0,"project",this.cached?"cache":void 0,"latest"].filter(V=>typeof V<"u"),w=A?1/0:1,v=await Promise.all(this.packages.map(async V=>{let re=V.match(/^\.{0,2}\//)?await v8(V,{cwd:this.context.cwd,workspace:a}):Y.tryParseDescriptor(V),ae=V.match(/^(https?:|git@github)/);if(ae)throw new ot(`It seems you are trying to add a package using a ${ye.pretty(r,`${ae[0]}...`,ye.Type.RANGE)} url; we now require package names to be explicitly specified.
387Try running the command again with the package name prefixed: ${ye.pretty(r,"yarn add",ye.Type.CODE)} ${ye.pretty(r,Y.makeDescriptor(Y.makeIdent(null,"my-package"),`${ae[0]}...`),ye.Type.DESCRIPTOR)}`);if(!re)throw new ot(`The ${ye.pretty(r,V,ye.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let he=vft(a,re,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(he.map(async De=>{let ge=await t2(re,{project:o,workspace:a,cache:n,fixed:u,target:De,modifier:h,strategies:C,maxResults:w});return{request:re,suggestedDescriptors:ge,target:De}}))})).then(V=>V.flat()),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async V=>{for(let{request:re,suggestedDescriptors:{suggestions:ae,rejections:he}}of v)if(ae.filter(De=>De.descriptor!==null).length===0){let[De]=he;if(typeof De>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?V.reportError(27,`${Y.prettyDescriptor(r,re)} can't be resolved to a satisfying range`):V.reportError(27,`${Y.prettyDescriptor(r,re)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),V.reportSeparator(),V.reportExceptionOnce(De)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[],L=[];for(let{suggestedDescriptors:{suggestions:V},target:re}of v){let ae,he=V.filter(le=>le.descriptor!==null),pe=he[0].descriptor,De=he.every(le=>Y.areDescriptorsEqual(le.descriptor,pe));he.length===1||De?ae=pe:(E=!0,{answer:ae}=await(0,cge.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:V.map(({descriptor:le,name:Pe,reason:g})=>le?{name:Pe,hint:g,descriptor:le}:{name:Pe,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(le){return this.find(le,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ge=a.manifest[re].get(ae.identHash);(typeof ge>"u"||ge.descriptorHash!==ae.descriptorHash)&&(a.manifest[re].set(ae.identHash,ae),this.optional&&(re==="dependencies"?a.manifest.ensureDependencyMeta({...ae,range:"unknown"}).optional=!0:re==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...ae,range:"unknown"}).optional=!0)),typeof ge>"u"?R.push([a,re,ae,C]):L.push([a,re,ge,ae]))}return await r.triggerMultipleHooks(V=>V.afterWorkspaceDependencyAddition,R),await r.triggerMultipleHooks(V=>V.afterWorkspaceDependencyReplacement,L),E&&this.context.stdout.write(`
388`),(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async V=>{await o.install({cache:n,report:V,mode:this.mode})})).exitCode()}};x0.paths=[["add"]],x0.usage=it.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]});function vft(t,e,{dev:r,peer:o,preferDev:a,optional:n}){let u=t.manifest["dependencies"].has(e.identHash),A=t.manifest["devDependencies"].has(e.identHash),p=t.manifest["peerDependencies"].has(e.identHash);if((r||o)&&u)throw new ot(`Package "${Y.prettyIdent(t.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!o&&p)throw new ot(`Package "${Y.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&A)throw new ot(`Package "${Y.prettyIdent(t.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!o&&p)throw new ot(`Package "${Y.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new ot(`Package "${Y.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return o&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:A?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ke();Ke();_t();var b0=class extends ct{constructor(){super(...arguments);this.verbose=fe.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=fe.String({required:!1})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await Pt.find(r,this.context.cwd);if(await o.restoreInstallState(),this.name){let A=(await sn.getPackageAccessibleBinaries(a,{project:o})).get(this.name);if(!A)throw new ot(`Couldn't find a binary named "${this.name}" for package "${Y.prettyLocator(r,a)}"`);let[,p]=A;return this.context.stdout.write(`${p}
389`),0}return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await sn.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((C,w)=>Math.max(C,w.length),0);for(let[C,[w,v]]of A)u.reportJson({name:C,source:Y.stringifyIdent(w),path:v});if(this.verbose)for(let[C,[w]]of A)u.reportInfo(null,`${C.padEnd(h," ")} ${Y.prettyLocator(r,w)}`);else for(let C of A.keys())u.reportInfo(null,C)})).exitCode()}};b0.paths=[["bin"]],b0.usage=it.Usage({description:"get the path to a binary script",details:`
390 When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
391
392 When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
393 `,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});Ke();St();_t();var Q0=class extends ct{constructor(){super(...arguments);this.mirror=fe.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=fe.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=await Ur.find(r);return(await Ct.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await oe.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await oe.removePromise(o.cwd)})).exitCode()}};Q0.paths=[["cache","clean"],["cache","clear"]],Q0.usage=it.Usage({description:"remove the shared cache files",details:`
394 This command will remove all the files from the cache.
395 `,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});Ke();_t();var Age=tt(r2()),S8=Ie("util"),k0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=fe.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new ot(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=We.convertMapsToIndexableObjects(u),p=a?(0,Age.default)(A,a):A,h=await Ct.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async C=>{C.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
396`),h.exitCode();S8.inspect.styles.name="cyan",this.context.stdout.write(`${(0,S8.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
397`)}return h.exitCode()}};k0.paths=[["config","get"]],k0.usage=it.Usage({description:"read a configuration settings",details:`
398 This command will print a configuration setting.
399
400 Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
401 `,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]});Ke();_t();var tde=tt(Q8()),rde=tt(r2()),nde=tt(k8()),F8=Ie("util"),F0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=fe.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=fe.String();this.value=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new ot("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new ot(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new ot("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?E=>Xe.updateHomeConfiguration(E):E=>Xe.updateConfiguration(o(),E))(E=>{if(n){let R=(0,tde.default)(E);return(0,nde.default)(R,this.name,A),R}else return{...E,[a]:A}});let C=(await Xe.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),w=We.convertMapsToIndexableObjects(C),v=n?(0,rde.default)(w,n):w;return(await Ct.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async E=>{F8.inspect.styles.name="cyan",E.reportInfo(0,`Successfully set ${this.name} to ${(0,F8.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};F0.paths=[["config","set"]],F0.usage=it.Usage({description:"change a configuration settings",details:`
402 This command will set a configuration setting.
403
404 When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
405
406 When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
407 `,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});Ke();_t();var hde=tt(Q8()),gde=tt(ade()),dde=tt(T8()),R0=class extends ct{constructor(){super(...arguments);this.home=fe.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new ot("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new ot(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Xe.updateHomeConfiguration(h):h=>Xe.updateConfiguration(o(),h);return(await Ct.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let C=!1;await A(w=>{if(!(0,gde.default)(w,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),C=!0,w;let v=n?(0,hde.default)(w):{...w};return(0,dde.default)(v,this.name),v}),C||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};R0.paths=[["config","unset"]],R0.usage=it.Usage({description:"unset a configuration setting",details:`
408 This command will unset a configuration setting.
409 `,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]});Ke();Ke();_t();var N8=Ie("util"),T0=class extends ct{constructor(){super(...arguments);this.verbose=fe.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=fe.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{if(r.invalid.size>0&&!this.json){for(let[n,u]of r.invalid)a.reportError(34,`Invalid configuration key "${n}" in ${u}`);a.reportSeparator()}if(this.json){let n=We.sortMap(r.settings.keys(),u=>u);for(let u of n){let A=r.settings.get(u),p=r.getSpecial(u,{hideSecrets:!0,getNativePaths:!0}),h=r.sources.get(u);this.verbose?a.reportJson({key:u,effective:p,source:h}):a.reportJson({key:u,effective:p,source:h,...A})}}else{let n=We.sortMap(r.settings.keys(),p=>p),u=n.reduce((p,h)=>Math.max(p,h.length),0),A={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let p=n.map(C=>{let w=r.settings.get(C);if(!w)throw new Error(`Assertion failed: This settings ("${C}") should have been registered`);let v=this.why?r.sources.get(C)||"<default>":w.description;return[C,v]}),h=p.reduce((C,[,w])=>Math.max(C,w.length),0);for(let[C,w]of p)a.reportInfo(null,`${C.padEnd(u," ")} ${w.padEnd(h," ")} ${(0,N8.inspect)(r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),A)}`)}else for(let p of n)a.reportInfo(null,`${p.padEnd(u," ")} ${(0,N8.inspect)(r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),A)}`)}})).exitCode()}};T0.paths=[["config"]],T0.usage=it.Usage({description:"display the current configuration",details:`
410 This command prints the current active configuration settings.
411 `,examples:[["Print the active configuration settings","$0 config"]]});Ke();_t();rl();var aQ={};Yt(aQ,{Strategy:()=>n2,acceptedStrategies:()=>oht,dedupe:()=>L8});Ke();Ke();var mde=tt(zo()),n2=(e=>(e.HIGHEST="highest",e))(n2||{}),oht=new Set(Object.values(n2)),aht={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let C=t.storedDescriptors.get(p);if(typeof C>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);We.getSetWithDefault(u,C.identHash).add(h)}let A=new Map(We.mapAndFilter(t.storedDescriptors.values(),p=>Y.isVirtualDescriptor(p)?We.mapAndFilter.skip:[p.descriptorHash,We.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let C=t.storedResolutions.get(p.descriptorHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let w=t.originalPackages.get(C);if(typeof w>"u")throw new Error(`Assertion failed: The package (${C}) should have been registered`);Promise.resolve().then(async()=>{var re;let v=r.getResolutionDependencies(p,a),b=Object.fromEntries(await We.allSettledSafe(Object.entries(v).map(async([ae,he])=>{let pe=A.get(he.descriptorHash);if(typeof pe>"u")throw new Error(`Assertion failed: The descriptor (${he.descriptorHash}) should have been registered`);let De=await pe.promise;if(!De)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[ae,De.updatedPackage]})));if(e.length&&!mde.default.isMatch(Y.stringifyIdent(p),e)||!r.shouldPersistResolution(w,a))return w;let E=u.get(p.identHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(E.size===1)return w;let R=[...E].map(ae=>{let he=t.originalPackages.get(ae);if(typeof he>"u")throw new Error(`Assertion failed: The package (${ae}) should have been registered`);return he}),L=await r.getSatisfying(p,b,R,a),_=(re=L.locators)==null?void 0:re[0];if(typeof _>"u"||!L.sorted)return w;let V=t.originalPackages.get(_.locatorHash);if(typeof V>"u")throw new Error(`Assertion failed: The package (${_.locatorHash}) should have been registered`);return V}).then(async v=>{let b=await t.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:w,updatedPackage:v,resolvedPackage:b})}).catch(v=>{h.reject(v)})}return[...A.values()].map(p=>p.promise)}};async function L8(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,u=new xi,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:t.storedChecksums,fetcher:p,project:t,report:u,cacheOptions:{skipIntegrityCheck:!0}},C={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let w=aht[e],v=await w(t,r,{resolver:A,resolveOptions:C,fetcher:p,fetchOptions:h}),b=Js.progressViaCounter(v.length);await a.reportProgress(b);let E=0;await Promise.all(v.map(_=>_.then(V=>{if(V===null||V.currentPackage.locatorHash===V.updatedPackage.locatorHash)return;E++;let{descriptor:re,currentPackage:ae,updatedPackage:he}=V;a.reportInfo(0,`${Y.prettyDescriptor(n,re)} can be deduped from ${Y.prettyLocator(n,ae)} to ${Y.prettyLocator(n,he)}`),a.reportJson({descriptor:Y.stringifyDescriptor(re),currentResolution:Y.stringifyLocator(ae),updatedResolution:Y.stringifyLocator(he)}),t.storedResolutions.set(re.descriptorHash,he.locatorHash)}).finally(()=>b.tick())));let R;switch(E){case 0:R="No packages";break;case 1:R="One package";break;default:R=`${E} packages`}let L=ye.pretty(n,e,ye.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${L} strategy`),E})}var N0=class extends ct{constructor(){super(...arguments);this.strategy=fe.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Gs(n2)});this.check=fe.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(dl)});this.patterns=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=await Ur.find(r);await o.restoreInstallState({restoreResolutions:!1});let n=0,u=await Ct.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async A=>{n=await L8(o,{strategy:this.strategy,patterns:this.patterns,cache:a,report:A})});return u.hasErrors()?u.exitCode():this.check?n?1:0:(await Ct.start({configuration:r,stdout:this.context.stdout,json:this.json},async p=>{await o.install({cache:a,report:p,mode:this.mode})})).exitCode()}};N0.paths=[["dedupe"]],N0.usage=it.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]});Ke();_t();var zd=class extends ct{async execute(){let{plugins:e}=await Xe.find(this.context.cwd,this.context.plugins),r=[];for(let u of e){let{commands:A}=u[1];if(A){let h=vo.from(A).definitions();r.push([u[0],h])}}let o=this.cli.definitions(),a=(u,A)=>u.split(" ").slice(1).join()===A.split(" ").slice(1).join(),n=yde()["@yarnpkg/builder"].bundles.standard;for(let u of r){let A=u[1];for(let p of A)o.find(h=>a(h.path,p.path)).plugin={name:u[0],isDefault:n.includes(u[0])}}this.context.stdout.write(`${JSON.stringify(o,null,2)}
412`)}};zd.paths=[["--clipanion=definitions"]];var Xd=class extends ct{async execute(){this.context.stdout.write(this.cli.usage(null))}};Xd.paths=[["help"],["--help"],["-h"]];Ke();St();_t();var pC=class extends ct{constructor(){super(...arguments);this.leadingArgument=fe.String();this.args=fe.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!Y.tryParseIdent(this.leadingArgument)){let r=J.resolve(this.context.cwd,ue.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ke();var Zd=class extends ct{async execute(){this.context.stdout.write(`${On||"<unknown>"}
413`)}};Zd.paths=[["-v"],["--version"]];Ke();Ke();_t();var L0=class extends ct{constructor(){super(...arguments);this.commandName=fe.String();this.args=fe.Proxy()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await Pt.find(r,this.context.cwd);return await o.restoreInstallState(),await sn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};L0.paths=[["exec"]],L0.usage=it.Usage({description:"execute a shell script",details:`
414 This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
415
416 It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
417 `,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});Ke();_t();rl();var O0=class extends ct{constructor(){super(...arguments);this.hash=fe.String({required:!1,validator:td($I(),[ew(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await cht(this.hash,o,{stdout:this.context.stdout}):(await Ct.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=[([,A])=>Y.stringifyLocator(o.storedPackages.get(A.subject)),([,A])=>Y.stringifyIdent(A.requested)];for(let[A,p]of We.sortMap(o.peerRequirements,u)){let h=o.storedPackages.get(p.subject);if(typeof h>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let C=o.storedPackages.get(p.rootRequester);if(typeof C>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let w=h.dependencies.get(p.requested.identHash)??null,v=ye.pretty(r,A,ye.Type.CODE),b=Y.prettyLocator(r,h),E=Y.prettyIdent(r,p.requested),R=Y.prettyIdent(r,C),L=p.allRequesters.length-1,_=`descendant${L===1?"":"s"}`,V=L>0?` and ${L} ${_}`:"",re=w!==null?"provides":"doesn't provide";n.reportInfo(null,`${v} \u2192 ${b} ${re} ${E} to ${R}${V}`)}})).exitCode()}};O0.paths=[["explain","peer-requirements"]],O0.usage=it.Usage({description:"explain a set of peer requirements",details:`
418 A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.
419
420 When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.
421
422 When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.
423
424 **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
425 `,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});async function cht(t,e,r){let{configuration:o}=e,a=e.peerRequirements.get(t);if(typeof a>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Ct.start({configuration:o,stdout:r.stdout,includeFooter:!1},async u=>{let A=e.storedPackages.get(a.subject);if(typeof A>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let p=e.storedPackages.get(a.rootRequester);if(typeof p>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let h=A.dependencies.get(a.requested.identHash)??null,C=h!==null?e.storedResolutions.get(h.descriptorHash):null;if(typeof C>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let w=C!==null?e.storedPackages.get(C):null;if(typeof w>"u")throw new Error("Assertion failed: Expected the provided package to have been registered");let v=[...a.allRequesters.values()].map(_=>{let V=e.storedPackages.get(_);if(typeof V>"u")throw new Error("Assertion failed: Expected the package to be registered");let re=Y.devirtualizeLocator(V),ae=e.storedPackages.get(re.locatorHash);if(typeof ae>"u")throw new Error("Assertion failed: Expected the package to be registered");let he=ae.peerDependencies.get(a.requested.identHash);if(typeof he>"u")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:V,peerDependency:he}});if(w!==null){let _=v.every(({peerDependency:V})=>Tr.satisfiesWithPrereleases(w.version,V.range));u.reportInfo(0,`${Y.prettyLocator(o,A)} provides ${Y.prettyLocator(o,w)} with version ${Y.prettyReference(o,w.version??"<missing>")}, which ${_?"satisfies":"doesn't satisfy"} the following requirements:`)}else u.reportInfo(0,`${Y.prettyLocator(o,A)} doesn't provide ${Y.prettyIdent(o,a.requested)}, breaking the following requirements:`);u.reportSeparator();let b=ye.mark(o),E=[];for(let{pkg:_,peerDependency:V}of We.sortMap(v,re=>Y.stringifyLocator(re.pkg))){let ae=(w!==null?Tr.satisfiesWithPrereleases(w.version,V.range):!1)?b.Check:b.Cross;E.push({stringifiedLocator:Y.stringifyLocator(_),prettyLocator:Y.prettyLocator(o,_),prettyRange:Y.prettyRange(o,V.range),mark:ae})}let R=Math.max(...E.map(({stringifiedLocator:_})=>_.length)),L=Math.max(...E.map(({prettyRange:_})=>_.length));for(let{stringifiedLocator:_,prettyLocator:V,prettyRange:re,mark:ae}of We.sortMap(E,({stringifiedLocator:he})=>he))u.reportInfo(null,`${V.padEnd(R+(V.length-_.length)," ")} \u2192 ${re.padEnd(L," ")} ${ae}`);E.length>1&&(u.reportSeparator(),u.reportInfo(0,`Note: these requirements start with ${Y.prettyLocator(e.configuration,p)}`))})).exitCode()}Ke();_t();rl();Ke();Ke();St();_t();var Ede=tt(si()),M0=class extends ct{constructor(){super(...arguments);this.useYarnPath=fe.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=fe.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let A=r.sources.get("yarnPath");if(!A)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(J.contains(p,A))return 0}let o=()=>{if(typeof On>"u")throw new ot("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(A,p)=>({version:p,url:A.replace(/\{\}/g,p)});if(this.version==="self")a={url:o(),version:On??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await i2(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await i2(r,"canary"));else if(this.version==="classic")a={url:"https://classic.yarnpkg.com/latest.js",version:"classic"};else if(this.version.match(/^https?:/))a={url:this.version,version:"remote"};else if(this.version.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.version))a={url:`file://${J.resolve(ue.toPortablePath(this.version))}`,version:"file"};else if(Tr.satisfiesWithPrereleases(this.version,">=2.0.0"))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",this.version);else if(Tr.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))a=n("https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js",this.version);else if(Tr.validRange(this.version))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await uht(r,this.version));else throw new ot(`Invalid version descriptor "${this.version}"`);return(await Ct.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async A=>{let p=async()=>{let h="file://";return a.url.startsWith(h)?(A.reportInfo(0,`Retrieving ${ye.pretty(r,a.url,ye.Type.PATH)}`),await oe.readFilePromise(a.url.slice(h.length))):(A.reportInfo(0,`Downloading ${ye.pretty(r,a.url,ye.Type.URL)}`),await ln.get(a.url,{configuration:r}))};await O8(r,a.version,p,{report:A,useYarnPath:this.useYarnPath})})).exitCode()}};M0.paths=[["set","version"]],M0.usage=it.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\n\n A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\n\n The version specifier can be:\n\n - a tag:\n - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\n - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\n - `classic` -> the most recent classic (`^0.x || ^1.x`) release\n\n - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\n\n - a semver version (e.g. `2.4.1`, `1.22.1`)\n\n - a local file referenced through either a relative or absolute path\n\n - `self` -> the version used to invoke the command\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest canary release from the Yarn repository","$0 set version canary"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download the most recent Yarn 3 build","$0 set version 3.x"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"],["Use a release from the local filesystem","$0 set version ./yarn.cjs"],["Use a release from a URL","$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js"],["Download the version used to invoke the command","$0 set version self"]]});async function uht(t,e){let o=(await ln.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0})).tags.filter(a=>Tr.satisfiesWithPrereleases(a,e));if(o.length===0)throw new ot(`No matching release found for range ${ye.pretty(t,e,ye.Type.RANGE)}.`);return o[0]}async function i2(t,e){let r=await ln.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new ot(`Tag ${ye.pretty(t,e,ye.Type.RANGE)} not found`);return r.latest[e]}async function O8(t,e,r,{report:o,useYarnPath:a}){let n,u=async()=>(typeof n>"u"&&(n=await r()),n);if(e===null){let re=await u();await oe.mktempPromise(async ae=>{let he=J.join(ae,"yarn.cjs");await oe.writeFilePromise(he,re);let{stdout:pe}=await Mr.execvp(process.execPath,[ue.fromPortablePath(he),"--version"],{cwd:ae,env:{...process.env,YARN_IGNORE_PATH:"1"}});if(e=pe.trim(),!Ede.default.valid(e))throw new Error(`Invalid semver version. ${ye.pretty(t,"yarn --version",ye.Type.CODE)} returned:
426${e}`)})}let A=t.projectCwd??t.startingCwd,p=J.resolve(A,".yarn/releases"),h=J.resolve(p,`yarn-${e}.cjs`),C=J.relative(t.startingCwd,h),w=We.isTaggedYarnVersion(e),v=t.get("yarnPath"),b=!w,E=b||!!v||!!a;if(a===!1){if(b)throw new Vt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");E=!1}else!E&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${ye.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${ye.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),E=!0);if(E){let re=await u();o.reportInfo(0,`Saving the new release in ${ye.pretty(t,C,"magenta")}`),await oe.removePromise(J.dirname(h)),await oe.mkdirPromise(J.dirname(h),{recursive:!0}),await oe.writeFilePromise(h,re,{mode:493}),await Xe.updateConfiguration(A,{yarnPath:J.relative(A,h)})}else await oe.removePromise(J.dirname(h)),await Xe.updateConfiguration(A,{yarnPath:Xe.deleteProperty});let R=await Nt.tryFind(A)||new Nt;R.packageManager=`yarn@${w?e:await i2(t,"stable")}`;let L={};R.exportTo(L);let _=J.join(A,Nt.fileName),V=`${JSON.stringify(L,null,R.indent)}
427`;return await oe.changeFilePromise(_,V,{automaticNewlines:!0}),{bundleVersion:e}}function Cde(t){return dr[tS(t)]}var Aht=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function fht(t){let r=`https://repo.yarnpkg.com/${We.isTaggedYarnVersion(On)?On:await i2(t,"canary")}/packages/gatsby/content/advanced/error-codes.md`,o=await ln.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(Aht),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Cde(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var U0=class extends ct{constructor(){super(...arguments);this.code=fe.String({required:!1,validator:td($I(),[ew(/^YN[0-9]{4}$/)])});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=Cde(this.code),a=ye.pretty(r,o,ye.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await fht(r)).get(this.code),p=typeof A<"u"?ye.jsonOrPretty(this.json,r,ye.tuple(ye.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
428
429You can help us by editing this page on GitHub \u{1F642}:
430${ye.jsonOrPretty(this.json,r,ye.tuple(ye.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))}
431`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
432`):this.context.stdout.write(`${n}
433
434${p}
435`)}else{let o={children:We.mapAndFilter(Object.entries(dr),([a,n])=>Number.isNaN(Number(a))?We.mapAndFilter.skip:{label:Vu(Number(a)),value:ye.tuple(ye.Type.CODE,n)})};$o.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};U0.paths=[["explain"]],U0.usage=it.Usage({description:"explain an error code",details:`
436 When the code argument is specified, this command prints its name and its details.
437
438 When used without arguments, this command lists all error codes and their names.
439 `,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});Ke();St();_t();var Ide=tt(zo()),_0=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=fe.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=fe.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=fe.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=fe.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=fe.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=fe.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a&&!this.all)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(ae,{recursive:he})=>{let pe=ae.anchoredLocator.locatorHash,De=new Map,ge=[pe];for(;ge.length>0;){let le=ge.shift();if(De.has(le))continue;let Pe=o.storedPackages.get(le);if(typeof Pe>"u")throw new Error("Assertion failed: Expected the package to be registered");if(De.set(le,Pe),Y.isVirtualLocator(Pe)&&ge.push(Y.devirtualizeLocator(Pe).locatorHash),!(!he&&le!==pe))for(let g of Pe.dependencies.values()){let ve=o.storedResolutions.get(g.descriptorHash);if(typeof ve>"u")throw new Error("Assertion failed: Expected the resolution to be registered");ge.push(ve)}}return De.values()},p=({recursive:ae})=>{let he=new Map;for(let pe of o.workspaces)for(let De of A(pe,{recursive:ae}))he.set(De.locatorHash,De);return he.values()},h=({all:ae,recursive:he})=>ae&&he?o.storedPackages.values():ae?p({recursive:he}):A(a,{recursive:he}),C=({all:ae,recursive:he})=>{let pe=h({all:ae,recursive:he}),De=this.patterns.map(Pe=>{let g=Y.parseLocator(Pe),ve=Ide.default.makeRe(Y.stringifyIdent(g)),Ee=Y.isVirtualLocator(g),de=Ee?Y.devirtualizeLocator(g):g;return ne=>{let Z=Y.stringifyIdent(ne);if(!ve.test(Z))return!1;if(g.reference==="unknown")return!0;let me=Y.isVirtualLocator(ne),be=me?Y.devirtualizeLocator(ne):ne;return!(Ee&&me&&g.reference!==ne.reference||de.reference!==be.reference)}}),ge=We.sortMap([...pe],Pe=>Y.stringifyLocator(Pe));return{selection:ge.filter(Pe=>De.length===0||De.some(g=>g(Pe))),sortedLookup:ge}},{selection:w,sortedLookup:v}=C({all:this.all,recursive:this.recursive});if(w.length===0)throw new ot("No package matched your request");let b=new Map;if(this.dependents)for(let ae of v)for(let he of ae.dependencies.values()){let pe=o.storedResolutions.get(he.descriptorHash);if(typeof pe>"u")throw new Error("Assertion failed: Expected the resolution to be registered");We.getArrayWithDefault(b,pe).push(ae)}let E=new Map;for(let ae of v){if(!Y.isVirtualLocator(ae))continue;let he=Y.devirtualizeLocator(ae);We.getArrayWithDefault(E,he.locatorHash).push(ae)}let R={},L={children:R},_=r.makeFetcher(),V={project:o,fetcher:_,cache:n,checksums:o.storedChecksums,report:new xi,cacheOptions:{skipIntegrityCheck:!0}},re=[async(ae,he,pe)=>{var le;if(!he.has("manifest"))return;let De=await _.fetch(ae,V),ge;try{ge=await Nt.find(De.prefixPath,{baseFs:De.packageFs})}finally{(le=De.releaseFs)==null||le.call(De)}pe("Manifest",{License:ye.tuple(ye.Type.NO_HINT,ge.license),Homepage:ye.tuple(ye.Type.URL,ge.raw.homepage??null)})},async(ae,he,pe)=>{if(!he.has("cache"))return;let De={mockedPackages:o.disabledLocators,unstablePackages:o.conditionalLocators},ge=o.storedChecksums.get(ae.locatorHash)??null,le=n.getLocatorPath(ae,ge,De),Pe;if(le!==null)try{Pe=oe.statSync(le)}catch{}let g=typeof Pe<"u"?[Pe.size,ye.Type.SIZE]:void 0;pe("Cache",{Checksum:ye.tuple(ye.Type.NO_HINT,ge),Path:ye.tuple(ye.Type.PATH,le),Size:g})}];for(let ae of w){let he=Y.isVirtualLocator(ae);if(!this.virtuals&&he)continue;let pe={},De={value:[ae,ye.Type.LOCATOR],children:pe};if(R[Y.stringifyLocator(ae)]=De,this.nameOnly){delete De.children;continue}let ge=E.get(ae.locatorHash);typeof ge<"u"&&(pe.Instances={label:"Instances",value:ye.tuple(ye.Type.NUMBER,ge.length)}),pe.Version={label:"Version",value:ye.tuple(ye.Type.NO_HINT,ae.version)};let le=(g,ve)=>{let Ee={};if(pe[g]=Ee,Array.isArray(ve))Ee.children=ve.map(de=>({value:de}));else{let de={};Ee.children=de;for(let[ne,Z]of Object.entries(ve))typeof Z>"u"||(de[ne]={label:ne,value:Z})}};if(!he){for(let g of re)await g(ae,u,le);await r.triggerHook(g=>g.fetchPackageInfo,ae,u,le)}ae.bin.size>0&&!he&&le("Exported Binaries",[...ae.bin.keys()].map(g=>ye.tuple(ye.Type.PATH,g)));let Pe=b.get(ae.locatorHash);typeof Pe<"u"&&Pe.length>0&&le("Dependents",Pe.map(g=>ye.tuple(ye.Type.LOCATOR,g))),ae.dependencies.size>0&&!he&&le("Dependencies",[...ae.dependencies.values()].map(g=>{let ve=o.storedResolutions.get(g.descriptorHash),Ee=typeof ve<"u"?o.storedPackages.get(ve)??null:null;return ye.tuple(ye.Type.RESOLUTION,{descriptor:g,locator:Ee})})),ae.peerDependencies.size>0&&he&&le("Peer dependencies",[...ae.peerDependencies.values()].map(g=>{let ve=ae.dependencies.get(g.identHash),Ee=typeof ve<"u"?o.storedResolutions.get(ve.descriptorHash)??null:null,de=Ee!==null?o.storedPackages.get(Ee)??null:null;return ye.tuple(ye.Type.RESOLUTION,{descriptor:g,locator:de})}))}$o.emitTree(L,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};_0.paths=[["info"]],_0.usage=it.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]});Ke();St();Hl();var lQ=tt(Zg());_t();rl();var H0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.immutable=fe.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"});this.immutableCache=fe.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"});this.refreshLockfile=fe.Boolean("--refresh-lockfile",{description:"Refresh the package metadata stored in the lockfile"});this.checkCache=fe.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"});this.checkResolutions=fe.Boolean("--check-resolutions",{description:"Validates that the package resolutions are coherent"});this.inlineBuilds=fe.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(dl)});this.cacheFolder=fe.String("--cache-folder",{hidden:!0});this.frozenLockfile=fe.Boolean("--frozen-lockfile",{hidden:!0});this.ignoreEngines=fe.Boolean("--ignore-engines",{hidden:!0});this.nonInteractive=fe.Boolean("--non-interactive",{hidden:!0});this.preferOffline=fe.Boolean("--prefer-offline",{hidden:!0});this.production=fe.Boolean("--production",{hidden:!0});this.registry=fe.String("--registry",{hidden:!0});this.silent=fe.Boolean("--silent",{hidden:!0});this.networkTimeout=fe.String("--network-timeout",{hidden:!0})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<"u"&&r.useWithSource("<cli>",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let o=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=async(E,{error:R})=>{let L=await Ct.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async _=>{R?_.reportError(50,E):_.reportWarning(50,E)});return L.hasErrors()?L.exitCode():null};if(typeof this.ignoreEngines<"u"){let E=await a("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!lQ.default.VERCEL});if(E!==null)return E}if(typeof this.registry<"u"){let E=await a("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(E!==null)return E}if(typeof this.preferOffline<"u"){let E=await a("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!lQ.default.VERCEL});if(E!==null)return E}if(typeof this.production<"u"){let E=await a("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(E!==null)return E}if(typeof this.nonInteractive<"u"){let E=await a("The --non-interactive option is deprecated",{error:!o});if(E!==null)return E}if(typeof this.frozenLockfile<"u"&&(await a("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!1}),this.immutable=this.frozenLockfile),typeof this.cacheFolder<"u"){let E=await a("The cache-folder option has been deprecated; use rc settings instead",{error:!lQ.default.NETLIFY});if(E!==null)return E}let n=this.mode==="update-lockfile";if(n&&(this.immutable||this.immutableCache))throw new ot(`${ye.pretty(r,"--immutable",ye.Type.CODE)} and ${ye.pretty(r,"--immutable-cache",ye.Type.CODE)} cannot be used with ${ye.pretty(r,"--mode=update-lockfile",ye.Type.CODE)}`);let u=(this.immutable??r.get("enableImmutableInstalls"))&&!n,A=this.immutableCache&&!n;if(r.projectCwd!==null){let E=await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{let L=!1;await ght(r,u)&&(R.reportInfo(48,"Automatically removed core plugins that are now builtins \u{1F44D}"),L=!0),await hht(r,u)&&(R.reportInfo(48,"Automatically fixed merge conflicts \u{1F44D}"),L=!0),L&&R.reportSeparator()});if(E.hasErrors())return E.exitCode()}if(r.projectCwd!==null&&typeof r.sources.get("nodeLinker")>"u"){let E=r.projectCwd,R;try{R=await oe.readFilePromise(J.join(E,Lr.lockfile),"utf8")}catch{}if(R!=null&&R.includes("yarn lockfile v1")){let L=await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async _=>{_.reportInfo(70,"Migrating from Yarn 1; automatically enabling the compatibility node-modules linker \u{1F44D}"),_.reportSeparator(),r.use("<compat>",{nodeLinker:"node-modules"},E,{overwrite:!0}),await Xe.updateConfiguration(E,{nodeLinker:"node-modules"})});if(L.hasErrors())return L.exitCode()}}if(r.projectCwd!==null){let E=await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{var L;(L=Xe.telemetry)!=null&&L.isNew&&(R.reportInfo(65,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),R.reportInfo(65,`Run ${ye.pretty(r,"yarn config set --home enableTelemetry 0",ye.Type.CODE)} to disable`),R.reportSeparator())});if(E.hasErrors())return E.exitCode()}let{project:p,workspace:h}=await Pt.find(r,this.context.cwd),C=await Ur.find(r,{immutable:A,check:this.checkCache});if(!h)throw new er(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let w=r.get("enableHardenedMode");(this.refreshLockfile??w)&&(p.lockfileNeedsRefresh=!0);let v=this.checkResolutions??w;return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout,includeLogs:!0},async E=>{await p.install({cache:C,report:E,immutable:u,checkResolutions:v,mode:this.mode})})).exitCode()}};H0.paths=[["install"],it.Default],H0.usage=it.Usage({description:"install the project dependencies",details:"\n This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the .pnp.cjs file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.cjs file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]});var pht="<<<<<<<";async function hht(t,e){if(!t.projectCwd)return!1;let r=J.join(t.projectCwd,t.get("lockfileFilename"));if(!await oe.existsPromise(r)||!(await oe.readFilePromise(r,"utf8")).includes(pht))return!1;if(e)throw new Vt(47,"Cannot autofix a lockfile when running an immutable install");let a=await Mr.execvp("git",["rev-parse","MERGE_HEAD","HEAD"],{cwd:t.projectCwd});if(a.code!==0&&(a=await Mr.execvp("git",["rev-parse","REBASE_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0&&(a=await Mr.execvp("git",["rev-parse","CHERRY_PICK_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0)throw new Vt(83,"Git returned an error when trying to find the commits pertaining to the conflict");let n=await Promise.all(a.stdout.trim().split(/\n/).map(async A=>{let p=await Mr.execvp("git",["show",`${A}:./${Lr.lockfile}`],{cwd:t.projectCwd});if(p.code!==0)throw new Vt(83,`Git returned an error when trying to access the lockfile content in ${A}`);try{return Yi(p.stdout)}catch{throw new Vt(46,"A variant of the conflicting lockfile failed to parse")}}));n=n.filter(A=>!!A.__metadata);for(let A of n)if(A.__metadata.version<7)for(let p of Object.keys(A)){if(p==="__metadata")continue;let h=Y.parseDescriptor(p,!0),C=t.normalizeDependency(h),w=Y.stringifyDescriptor(C);w!==p&&(A[w]=A[p],delete A[p])}let u=Object.assign({},...n);u.__metadata.version=Math.min(0,...n.map(A=>A.__metadata.version??1/0)),u.__metadata.cacheKey=Math.min(0,...n.map(A=>A.__metadata.cacheKey??0));for(let[A,p]of Object.entries(u))typeof p=="string"&&delete u[A];return await oe.changeFilePromise(r,Ba(u),{automaticNewlines:!0}),!0}async function ght(t,e){if(!t.projectCwd)return!1;let r=[],o=J.join(t.projectCwd,".yarn/plugins/@yarnpkg");return await Xe.updateConfiguration(t.projectCwd,n=>{if(!Array.isArray(n.plugins))return n;let u=n.plugins.filter(A=>{if(!A.path)return!0;let p=J.resolve(t.projectCwd,A.path),h=m1.has(A.spec)&&J.contains(o,p);return h&&r.push(p),!h});return n.plugins.length===u.length?n:{...n,plugins:u}},{immutable:e})?(await Promise.all(r.map(async n=>{await oe.removePromise(n)})),!0):!1}Ke();St();_t();var q0=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=fe.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=fe.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=o.topLevelWorkspace,A=[];for(let h of this.destinations){let C=J.resolve(this.context.cwd,ue.toPortablePath(h)),w=await Xe.find(C,this.context.plugins,{useRc:!1,strict:!1}),{project:v,workspace:b}=await Pt.find(w,C);if(o.cwd===v.cwd)throw new ot(`Invalid destination '${h}'; Can't link the project to itself`);if(!b)throw new er(v.cwd,C);if(this.all){let E=!1;for(let R of v.workspaces)R.manifest.name&&(!R.manifest.private||this.private)&&(A.push(R),E=!0);if(!E)throw new ot(`No workspace found to be linked in the target project: ${h}`)}else{if(!b.manifest.name)throw new ot(`The target workspace at '${h}' doesn't have a name and thus cannot be linked`);if(b.manifest.private&&!this.private)throw new ot(`The target workspace at '${h}' is marked private - use the --private flag to link it anyway`);A.push(b)}}for(let h of A){let C=Y.stringifyIdent(h.locator),w=this.relative?J.relative(o.cwd,h.cwd):h.cwd;u.manifest.resolutions.push({pattern:{descriptor:{fullName:C}},reference:`portal:${w}`})}return(await Ct.start({configuration:r,stdout:this.context.stdout},async h=>{await o.install({cache:n,report:h})})).exitCode()}};q0.paths=[["link"]],q0.usage=it.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});_t();var j0=class extends ct{constructor(){super(...arguments);this.args=fe.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};j0.paths=[["node"]],j0.usage=it.Usage({description:"run node with the hook already setup",details:`
440 This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
441
442 The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
443 `,examples:[["Run a Node script","$0 node ./my-script.js"]]});Ke();_t();var G0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=await Xe.findRcFiles(this.context.cwd);return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{var u;for(let A of o)if(!!((u=A.data)!=null&&u.plugins))for(let p of A.data.plugins){if(!p.checksum||!p.spec.match(/^https?:/))continue;let h=await ln.get(p.spec,{configuration:r}),C=bn.makeHash(h);if(p.checksum===C)continue;let w=ye.pretty(r,p.path,ye.Type.PATH),v=ye.pretty(r,p.spec,ye.Type.URL),b=`${w} is different from the file provided by ${v}`;n.reportJson({...p,newChecksum:C}),n.reportError(0,b)}})).exitCode()}};G0.paths=[["plugin","check"]],G0.usage=it.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
444 Check only the plugins from https.
445
446 If this command detects any plugin differences in the CI environment, it will throw an error.
447 `,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]});Ke();Ke();St();_t();var Pde=Ie("os");Ke();St();_t();var wde=Ie("os");Ke();Hl();_t();var dht="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function $d(t,e){let r=await ln.get(dht,{configuration:t}),o=Yi(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Tr.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var W0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await $d(r,On);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};W0.paths=[["plugin","list"]],W0.usage=it.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var mht=/^[0-9]+$/;function Bde(t){return mht.test(t)?`pull/${t}/head`:t}var yht=({repository:t,branch:e},r)=>[["git","init",ue.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",Bde(e)],["git","reset","--hard","FETCH_HEAD"]],Eht=({branch:t})=>[["git","fetch","origin","--depth=1",Bde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],Cht=({plugins:t,noMinify:e},r)=>[["yarn","build:cli",...new Array().concat(...t.map(o=>["--plugin",J.resolve(r,o)])),...e?["--no-minify"]:[],"|"]],Y0=class extends ct{constructor(){super(...arguments);this.installPath=fe.String("--path",{description:"The path where the repository should be cloned to"});this.repository=fe.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=fe.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=fe.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=fe.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=fe.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=fe.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=typeof this.installPath<"u"?J.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):J.resolve(ue.toPortablePath((0,wde.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Ct.start({configuration:r,stdout:this.context.stdout},async u=>{await M8(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator(),await s2(Cht(this,a),{configuration:r,context:this.context,target:a}),u.reportSeparator();let A=J.resolve(a,"packages/yarnpkg-cli/bundles/yarn.js"),p=await oe.readFilePromise(A),{bundleVersion:h}=await O8(r,null,async()=>p,{report:u});this.skipPlugins||await Iht(this,h,{project:o,report:u,target:a})})).exitCode()}};Y0.paths=[["set","version","from","sources"]],Y0.usage=it.Usage({description:"build Yarn from master",details:`
448 This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
449
450 By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
451 `,examples:[["Build Yarn from master","$0 set version from sources"]]});async function s2(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Mr.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${ye.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")}
452`);try{await Mr.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function M8(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&oe.existsSync(J.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await s2(Eht(t),{configuration:e,context:t.context,target:o}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await oe.removePromise(o),await oe.mkdirPromise(o,{recursive:!0}),await s2(yht(t,o),{configuration:e,context:t.context,target:o}))}async function Iht(t,e,{project:r,report:o,target:a}){let n=await $d(r.configuration,e),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())!u.has(A)||await U8(A,t,{project:r,report:o,target:a})}Ke();Ke();St();_t();var vde=tt(si()),Dde=Ie("url"),Sde=Ie("vm");var K0=class extends ct{constructor(){super(...arguments);this.name=fe.String();this.checksum=fe.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);return(await Ct.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Pt.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.name)){let p=J.resolve(this.context.cwd,ue.toPortablePath(this.name));a.reportInfo(0,`Reading ${ye.pretty(r,p,ye.Type.PATH)}`),u=J.relative(n.cwd,p),A=await oe.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new Dde.URL(this.name)}catch{throw new Vt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=Y.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!vde.default.valid(h.reference))throw new Vt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let C=Y.stringifyIdent(h),w=await $d(r,On);if(!Object.prototype.hasOwnProperty.call(w,C)){let v=`Couldn't find a plugin named ${Y.prettyIdent(r,h)} on the remote registry.
453`;throw r.plugins.has(C)?v+=`A plugin named ${Y.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:v+=`Note that only the plugins referenced on our website (${ye.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",ye.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${ye.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",ye.Type.URL)}).`,new Vt(51,v)}u=C,p=w[C].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${C}/${h.reference}/`):On!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${On}/`))}a.reportInfo(0,`Downloading ${ye.pretty(r,p,"green")}`),A=await ln.get(p,{configuration:r})}await _8(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};K0.paths=[["plugin","import"]],K0.usage=it.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
454 This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
455
456 Three types of plugin references are accepted:
457
458 - If the plugin is stored within the Yarn repository, it can be referenced by name.
459 - Third-party plugins can be referenced directly through their public urls.
460 - Local plugins can be referenced by their path on the disk.
461
462 If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
463
464 Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
465 `,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]});async function _8(t,e,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,Sde.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,C=J.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${ye.pretty(n,h,"magenta")}`),await oe.mkdirPromise(J.dirname(C),{recursive:!0}),await oe.writeFilePromise(C,e);let w={path:h,spec:t};r&&(w.checksum=bn.makeHash(e)),await Xe.addPlugin(o.cwd,[w])}var wht=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],V0=class extends ct{constructor(){super(...arguments);this.installPath=fe.String("--path",{description:"The path where the repository should be cloned to"});this.repository=fe.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=fe.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=fe.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=fe.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?J.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):J.resolve(ue.toPortablePath((0,Pde.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Ct.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await Pt.find(r,this.context.cwd),A=Y.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=Y.stringifyIdent(A),h=await $d(r,On);if(!Object.prototype.hasOwnProperty.call(h,p))throw new Vt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let C=p;await M8(this,{configuration:r,report:n,target:o}),await U8(C,this,{project:u,report:n,target:o})})).exitCode()}};V0.paths=[["plugin","import","from","sources"]],V0.usage=it.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
466 This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
467
468 The plugins can be referenced by their short name if sourced from the official Yarn repository.
469 `,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]});async function U8(t,{context:e,noMinify:r},{project:o,report:a,target:n}){let u=t.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await s2(wht({pluginName:u,noMinify:r},n),{configuration:A,context:e,target:n}),a.reportSeparator();let p=J.resolve(n,`packages/${u}/bundles/${t}.js`),h=await oe.readFilePromise(p);await _8(t,h,{project:o,report:a})}Ke();St();_t();var J0=class extends ct{constructor(){super(...arguments);this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return(await Ct.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=Y.parseIdent(u);if(!r.plugins.has(u))throw new ot(`${Y.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=J.resolve(o.cwd,p);oe.existsSync(h)&&(n.reportInfo(0,`Removing ${ye.pretty(r,p,ye.Type.PATH)}...`),await oe.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Xe.updateConfiguration(o.cwd,C=>{if(!Array.isArray(C.plugins))return C;let w=C.plugins.filter(v=>v.path!==p);return C.plugins.length===w.length?C:{...C,plugins:w}})})).exitCode()}};J0.paths=[["plugin","remove"]],J0.usage=it.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
470 This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
471
472 **Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
473 `,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]});Ke();_t();var z0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};z0.paths=[["plugin","runtime"]],z0.usage=it.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
474 This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
475 `,examples:[["List the currently active plugins","$0 plugin runtime"]]});Ke();Ke();_t();var X0=class extends ct{constructor(){super(...arguments);this.idents=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);let u=new Set;for(let p of this.idents)u.add(Y.parseIdent(p).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new xi}),u.size>0)for(let p of o.storedPackages.values())u.has(p.identHash)&&o.storedBuildState.delete(p.locatorHash);else o.storedBuildState.clear();return(await Ct.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async p=>{await o.install({cache:n,report:p})})).exitCode()}};X0.paths=[["rebuild"]],X0.usage=it.Usage({description:"rebuild the project's native packages",details:`
476 This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
477
478 Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
479
480 By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
481 `,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});Ke();Ke();Ke();_t();var H8=tt(zo());rl();var Z0=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(dl)});this.patterns=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,C=[];for(let E of this.patterns){let R=!1,L=Y.parseIdent(E);for(let _ of u){let V=[..._.manifest.peerDependenciesMeta.keys()];for(let re of(0,H8.default)(V,E))_.manifest.peerDependenciesMeta.delete(re),h=!0,R=!0;for(let re of A){let ae=_.manifest.getForScope(re),he=[...ae.values()].map(pe=>Y.stringifyIdent(pe));for(let pe of(0,H8.default)(he,Y.stringifyIdent(L))){let{identHash:De}=Y.parseIdent(pe),ge=ae.get(De);if(typeof ge>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");_.manifest[re].delete(De),C.push([_,re,ge]),h=!0,R=!0}}}R||p.push(E)}let w=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",b=this.all?"any":"this";if(p.length>0)throw new ot(`${w} ${ye.prettyList(r,p,ye.Type.CODE)} ${v} match any packages referenced by ${b} workspace`);return h?(await r.triggerMultipleHooks(R=>R.afterWorkspaceDependencyRemoval,C),(await Ct.start({configuration:r,stdout:this.context.stdout},async R=>{await o.install({cache:n,report:R,mode:this.mode})})).exitCode()):0}};Z0.paths=[["remove"]],Z0.usage=it.Usage({description:"remove dependencies from the project",details:`
482 This command will remove the packages matching the specified patterns from the current workspace.
483
484 If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
485
486 - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
487
488 - \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
489
490 This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
491 `,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});Ke();Ke();var xde=Ie("util"),em=class extends ct{async execute(){let e=await Xe.find(this.context.cwd,this.context.plugins),{project:r,workspace:o}=await Pt.find(e,this.context.cwd);if(!o)throw new er(r.cwd,this.context.cwd);return(await Ct.start({configuration:e,stdout:this.context.stdout},async n=>{let u=o.manifest.scripts,A=We.sortMap(u.keys(),C=>C),p={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},h=A.reduce((C,w)=>Math.max(C,w.length),0);for(let[C,w]of u.entries())n.reportInfo(null,`${C.padEnd(h," ")} ${(0,xde.inspect)(w,p)}`)})).exitCode()}};em.paths=[["run"]];Ke();Ke();_t();var $0=class extends ct{constructor(){super(...arguments);this.inspect=fe.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=fe.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=fe.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=fe.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=fe.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=fe.Boolean("--silent",{hidden:!0});this.scriptName=fe.String();this.args=fe.Proxy()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await Pt.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await sn.hasPackageScript(u,this.scriptName,{project:o}))return await sn.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await sn.getPackageAccessibleBinaries(u,{project:o});if(A.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await sn.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let C=(await Promise.all(o.workspaces.map(async w=>w.manifest.scripts.has(this.scriptName)?w:null))).filter(w=>w!==null);if(C.length===1)return await sn.executeWorkspaceScript(C[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new ot(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${Y.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new ot(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${Y.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new ot("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[C,w]of lC)for(let v of w)if(h.length>=v.length&&JSON.stringify(h.slice(0,v.length))===JSON.stringify(v))throw new ot(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${C} plugin. You can install it with "yarn plugin import ${C}".`);throw new ot(`Couldn't find a script named "${this.scriptName}".`)}}};$0.paths=[["run"]],$0.usage=it.Usage({description:"run a script defined in the package.json",details:`
492 This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
493
494 - If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
495
496 - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.
497
498 - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
499
500 Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
501 `,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});Ke();Ke();_t();var eh=class extends ct{constructor(){super(...arguments);this.save=fe.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=fe.String();this.resolution=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new er(o.cwd,this.context.cwd);let u=Y.parseDescriptor(this.descriptor,!0),A=Y.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),(await Ct.start({configuration:r,stdout:this.context.stdout},async h=>{await o.install({cache:n,report:h})})).exitCode()}};eh.paths=[["set","resolution"]],eh.usage=it.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});Ke();St();_t();var bde=tt(zo()),th=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:h,reference:C}of u.manifest.resolutions)C.startsWith("portal:")&&A.add(h.descriptor.fullName);if(this.leadingArguments.length>0)for(let h of this.leadingArguments){let C=J.resolve(this.context.cwd,ue.toPortablePath(h));if(We.isPathLike(h)){let w=await Xe.find(C,this.context.plugins,{useRc:!1,strict:!1}),{project:v,workspace:b}=await Pt.find(w,C);if(!b)throw new er(v.cwd,C);if(this.all){for(let E of v.workspaces)E.manifest.name&&A.add(Y.stringifyIdent(E.locator));if(A.size===0)throw new ot("No workspace found to be unlinked in the target project")}else{if(!b.manifest.name)throw new ot("The target workspace doesn't have a name and thus cannot be unlinked");A.add(Y.stringifyIdent(b.locator))}}else{let w=[...u.manifest.resolutions.map(({pattern:v})=>v.descriptor.fullName)];for(let v of(0,bde.default)(w,h))A.add(v)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:h})=>!A.has(h.descriptor.fullName)),(await Ct.start({configuration:r,stdout:this.context.stdout},async h=>{await o.install({cache:n,report:h})})).exitCode()}};th.paths=[["unlink"]],th.usage=it.Usage({description:"disconnect the local project from another one",details:`
502 This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
503 `,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]});Ke();Ke();Ke();_t();var Qde=tt(Z1()),q8=tt(zo());rl();var zf=class extends ct{constructor(){super(...arguments);this.interactive=fe.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=fe.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=fe.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=fe.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=fe.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(dl)});this.patterns=fe.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(w=>Y.stringifyIdent(w)),p=new Set;for(let w of this.patterns){if(Y.parseDescriptor(w).range!=="unknown")throw new ot("Ranges aren't allowed when using --recursive");for(let v of(0,q8.default)(A,w)){let b=Y.parseIdent(v);p.add(b.identHash)}}let h=u.filter(w=>p.has(w.identHash));for(let w of h)o.storedDescriptors.delete(w.descriptorHash),o.storedResolutions.delete(w.descriptorHash);return(await Ct.start({configuration:r,stdout:this.context.stdout},async w=>{await o.install({cache:n,report:w})})).exitCode()}async executeUpClassic(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=e2(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],C=[],w=[];for(let _ of this.patterns){let V=!1,re=Y.parseDescriptor(_),ae=Y.stringifyIdent(re);for(let he of o.workspaces)for(let pe of["dependencies","devDependencies"]){let ge=[...he.manifest.getForScope(pe).values()].map(Pe=>Y.stringifyIdent(Pe)),le=ae==="*"?ge:(0,q8.default)(ge,ae);for(let Pe of le){let g=Y.parseIdent(Pe),ve=he.manifest[pe].get(g.identHash);if(typeof ve>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let Ee=Y.makeDescriptor(g,re.range);C.push(Promise.resolve().then(async()=>[he,pe,ve,await t2(Ee,{project:o,workspace:he,cache:n,target:pe,fixed:u,modifier:p,strategies:h})])),V=!0}}V||w.push(_)}if(w.length>1)throw new ot(`Patterns ${ye.prettyList(r,w,ye.Type.CODE)} don't match any packages referenced by any workspace`);if(w.length>0)throw new ot(`Pattern ${ye.prettyList(r,w,ye.Type.CODE)} doesn't match any packages referenced by any workspace`);let v=await Promise.all(C),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async _=>{for(let[,,V,{suggestions:re,rejections:ae}]of v){let he=re.filter(pe=>pe.descriptor!==null);if(he.length===0){let[pe]=ae;if(typeof pe>"u")throw new Error("Assertion failed: Expected an error to have been set");let De=this.cli.error(pe);o.configuration.get("enableNetwork")?_.reportError(27,`${Y.prettyDescriptor(r,V)} can't be resolved to a satisfying range
504
505${De}`):_.reportError(27,`${Y.prettyDescriptor(r,V)} can't be resolved to a satisfying range (note: network resolution has been disabled)
506
507${De}`)}else he.length>1&&!A&&_.reportError(27,`${Y.prettyDescriptor(r,V)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[];for(let[_,V,,{suggestions:re}]of v){let ae,he=re.filter(le=>le.descriptor!==null),pe=he[0].descriptor,De=he.every(le=>Y.areDescriptorsEqual(le.descriptor,pe));he.length===1||De?ae=pe:(E=!0,{answer:ae}=await(0,Qde.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${Y.prettyWorkspace(r,_)} \u276F ${V}?`,choices:re.map(({descriptor:le,name:Pe,reason:g})=>le?{name:Pe,hint:g,descriptor:le}:{name:Pe,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(le){return this.find(le,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ge=_.manifest[V].get(ae.identHash);if(typeof ge>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(ge.descriptorHash!==ae.descriptorHash)_.manifest[V].set(ae.identHash,ae),R.push([_,V,ge,ae]);else{let le=r.makeResolver(),Pe={project:o,resolver:le},g=r.normalizeDependency(ge),ve=le.bindDescriptor(g,_.anchoredLocator,Pe);o.forgetResolution(ve)}}return await r.triggerMultipleHooks(_=>_.afterWorkspaceDependencyReplacement,R),E&&this.context.stdout.write(`
508`),(await Ct.start({configuration:r,stdout:this.context.stdout},async _=>{await o.install({cache:n,report:_,mode:this.mode})})).exitCode()}};zf.paths=[["up"]],zf.usage=it.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),zf.schema=[HT("recursive",$g.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];Ke();Ke();Ke();_t();var rh=class extends ct{constructor(){super(...arguments);this.recursive=fe.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=fe.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let n=Y.parseIdent(this.package).identHash,u=this.recursive?vht(o,n,{configuration:r,peers:this.peers}):Bht(o,n,{configuration:r,peers:this.peers});$o.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};rh.paths=[["why"]],rh.usage=it.Usage({description:"display the reason why a package is needed",details:`
509 This command prints the exact reasons why a package appears in the dependency tree.
510
511 If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
512 `,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});function Bht(t,e,{configuration:r,peers:o}){let a=We.sortMap(t.storedPackages.values(),A=>Y.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let C of A.dependencies.values()){if(!o&&A.peerDependencies.has(C.identHash))continue;let w=t.storedResolutions.get(C.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let v=t.storedPackages.get(w);if(!v)throw new Error("Assertion failed: The package should have been registered");if(v.identHash!==e)continue;{let E=Y.stringifyLocator(A);n[E]={value:[A,ye.Type.LOCATOR],children:p}}let b=Y.stringifyLocator(v);p[b]={value:[{descriptor:C,locator:v},ye.Type.DEPENDENT]}}}return u}function vht(t,e,{configuration:r,peers:o}){let a=We.sortMap(t.workspaces,v=>Y.stringifyLocator(v.anchoredLocator)),n=new Set,u=new Set,A=v=>{if(n.has(v.locatorHash))return u.has(v.locatorHash);if(n.add(v.locatorHash),v.identHash===e)return u.add(v.locatorHash),!0;let b=!1;v.identHash===e&&(b=!0);for(let E of v.dependencies.values()){if(!o&&v.peerDependencies.has(E.identHash))continue;let R=t.storedResolutions.get(E.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let L=t.storedPackages.get(R);if(!L)throw new Error("Assertion failed: The package should have been registered");A(L)&&(b=!0)}return b&&u.add(v.locatorHash),b};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},C={children:h},w=(v,b,E)=>{if(!u.has(v.locatorHash))return;let R=E!==null?ye.tuple(ye.Type.DEPENDENT,{locator:v,descriptor:E}):ye.tuple(ye.Type.LOCATOR,v),L={},_={value:R,children:L},V=Y.stringifyLocator(v);if(b[V]=_,!p.has(v.locatorHash)&&(p.add(v.locatorHash),!(E!==null&&t.tryWorkspaceByLocator(v))))for(let re of v.dependencies.values()){if(!o&&v.peerDependencies.has(re.identHash))continue;let ae=t.storedResolutions.get(re.descriptorHash);if(!ae)throw new Error("Assertion failed: The resolution should have been registered");let he=t.storedPackages.get(ae);if(!he)throw new Error("Assertion failed: The package should have been registered");w(he,L,re)}};for(let v of a)w(v.anchoredPackage,h,null);return C}Ke();var $8={};Yt($8,{GitFetcher:()=>a2,GitResolver:()=>l2,default:()=>Ght,gitUtils:()=>ea});Ke();St();var ea={};Yt(ea,{TreeishProtocols:()=>o2,clone:()=>Z8,fetchBase:()=>Zde,fetchChangedFiles:()=>$de,fetchChangedWorkspaces:()=>qht,fetchRoot:()=>Xde,isGitUrl:()=>gC,lsRemote:()=>zde,normalizeLocator:()=>J8,normalizeRepoUrl:()=>cQ,resolveUrl:()=>X8,splitRepoUrl:()=>nh,validateRepoUrl:()=>z8});Ke();St();_t();var Kde=tt(Gde()),Vde=tt(wU()),hC=tt(Ie("querystring")),K8=tt(si());function Y8(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function Wde(t){try{return new URL(t)}catch{return}}function _ht(t){let e=Y8(t,"@","#"),r=Y8(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),Y8(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function Yde(t){return Wde(t)||Wde(_ht(t))}function Jde(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Hht=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],o2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(o2||{});function gC(t){return t?Hht.some(e=>!!t.match(e)):!1}function nh(t){t=cQ(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),o=t.slice(e+1);if(o.match(/^[a-z]+=/)){let a=hC.default.parse(o);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(o2).find(p=>Object.prototype.hasOwnProperty.call(a,p)),[u,A]=typeof n<"u"?[n,a[n]]:["head","HEAD"];for(let p of Object.values(o2))delete a[p];return{repo:r,treeish:{protocol:u,request:A},extra:a}}else{let a=o.indexOf(":"),[n,u]=a===-1?[null,o]:[o.slice(0,a),o.slice(a+1)];return{repo:r,treeish:{protocol:n,request:u},extra:{}}}}function cQ(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=Yde(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function J8(t){return Y.makeLocator(t,cQ(t.reference))}function z8(t,{configuration:e}){let r=cQ(t,{git:!0});if(!ln.getNetworkSettings(`https://${(0,Kde.default)(r).resource}`,{configuration:e}).enableNetwork)throw new Vt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function zde(t,e){let r=z8(t,{configuration:e}),o=await V8("listing refs",["ls-remote",r],{cwd:e.startingCwd,env:Jde()},{configuration:e,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\t([^\n]+)/gm,u;for(;(u=n.exec(o.stdout))!==null;)a.set(u[2],u[1]);return a}async function X8(t,e){let{repo:r,treeish:{protocol:o,request:a},extra:n}=nh(t),u=await zde(r,e),A=(h,C)=>{switch(h){case"commit":{if(!C.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return hC.default.stringify({...n,commit:C})}case"head":{let w=u.get(C==="HEAD"?C:`refs/heads/${C}`);if(typeof w>"u")throw new Error(`Unknown head ("${C}")`);return hC.default.stringify({...n,commit:w})}case"tag":{let w=u.get(`refs/tags/${C}`);if(typeof w>"u")throw new Error(`Unknown tag ("${C}")`);return hC.default.stringify({...n,commit:w})}case"semver":{let w=Tr.validRange(C);if(!w)throw new Error(`Invalid range ("${C}")`);let v=new Map([...u.entries()].filter(([E])=>E.startsWith("refs/tags/")).map(([E,R])=>[K8.default.parse(E.slice(10)),R]).filter(E=>E[0]!==null)),b=K8.default.maxSatisfying([...v.keys()],w);if(b===null)throw new Error(`No matching range ("${C}")`);return hC.default.stringify({...n,commit:v.get(b)})}case null:{let w;if((w=p("commit",C))!==null||(w=p("tag",C))!==null||(w=p("head",C))!==null)return w;throw C.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${C}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${C}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${h}")`)}},p=(h,C)=>{try{return A(h,C)}catch{return null}};return`${r}#${A(o,a)}`}async function Z8(t,e){return await e.getLimit("cloneConcurrency")(async()=>{let{repo:r,treeish:{protocol:o,request:a}}=nh(t);if(o!=="commit")throw new Error("Invalid treeish protocol when cloning");let n=z8(r,{configuration:e}),u=await oe.mktempPromise(),A={cwd:u,env:Jde()};return await V8("cloning the repository",["clone","-c core.autocrlf=false",n,ue.fromPortablePath(u)],A,{configuration:e,normalizedRepoUrl:n}),await V8("switching branch",["checkout",`${a}`],A,{configuration:e,normalizedRepoUrl:n}),u})}async function Xde(t){let e,r=t;do{if(e=r,await oe.existsPromise(J.join(e,".git")))return e;r=J.dirname(e)}while(r!==e);return null}async function Zde(t,{baseRefs:e}){if(e.length===0)throw new ot("Can't run this command with zero base refs specified.");let r=[];for(let A of e){let{code:p}=await Mr.execvp("git",["merge-base",A,"HEAD"],{cwd:t});p===0&&r.push(A)}if(r.length===0)throw new ot(`No ancestor could be found between any of HEAD and ${e.join(", ")}`);let{stdout:o}=await Mr.execvp("git",["merge-base","HEAD",...r],{cwd:t,strict:!0}),a=o.trim(),{stdout:n}=await Mr.execvp("git",["show","--quiet","--pretty=format:%s",a],{cwd:t,strict:!0}),u=n.trim();return{hash:a,title:u}}async function $de(t,{base:e,project:r}){let o=We.buildIgnorePattern(r.configuration.get("changesetIgnorePatterns")),{stdout:a}=await Mr.execvp("git",["diff","--name-only",`${e}`],{cwd:t,strict:!0}),n=a.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>J.resolve(t,ue.toPortablePath(h))),{stdout:u}=await Mr.execvp("git",["ls-files","--others","--exclude-standard"],{cwd:t,strict:!0}),A=u.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>J.resolve(t,ue.toPortablePath(h))),p=[...new Set([...n,...A].sort())];return o?p.filter(h=>!J.relative(r.cwd,h).match(o)):p}async function qht({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new ot("This command can only be run from within a Yarn project");let r=[J.resolve(e.cwd,e.configuration.get("cacheFolder")),J.resolve(e.cwd,e.configuration.get("installStatePath")),J.resolve(e.cwd,e.configuration.get("lockfileFilename")),J.resolve(e.cwd,e.configuration.get("virtualFolder"))];await e.configuration.triggerHook(u=>u.populateYarnPaths,e,u=>{u!=null&&r.push(u)});let o=await Xde(e.configuration.projectCwd);if(o==null)throw new ot("This command can only be run on Git repositories");let a=await Zde(o,{baseRefs:typeof t=="string"?[t]:e.configuration.get("changesetBaseRefs")}),n=await $de(o,{base:a.hash,project:e});return new Set(We.mapAndFilter(n,u=>{let A=e.tryWorkspaceByFilePath(u);return A===null?We.mapAndFilter.skip:r.some(p=>u.startsWith(p))?We.mapAndFilter.skip:A}))}async function V8(t,e,r,{configuration:o,normalizedRepoUrl:a}){try{return await Mr.execvp("git",e,{...r,strict:!0})}catch(n){if(!(n instanceof Mr.ExecError))throw n;let u=n.reportExtra,A=n.stderr.toString();throw new Vt(1,`Failed ${t}`,p=>{p.reportError(1,` ${ye.prettyField(o,{label:"Repository URL",value:ye.tuple(ye.Type.URL,a)})}`);for(let h of A.matchAll(/^(.+?): (.*)$/gm)){let[,C,w]=h;C=C.toLowerCase();let v=C==="error"?"Error":`${(0,Vde.default)(C)} Error`;p.reportError(1,` ${ye.prettyField(o,{label:v,value:ye.tuple(ye.Type.NO_HINT,w)})}`)}u==null||u(p)})}}var a2=class{supports(e,r){return gC(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,a=J8(e),n=new Map(r.checksums);n.set(a.locatorHash,o);let u={...r,checksums:n},A=await this.downloadHosted(a,u);if(A!==null)return A;let[p,h,C]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(a,u),...r.cacheOptions});return{packageFs:p,releaseFs:h,prefixPath:Y.getIdentVendorPath(e),checksum:C}}async downloadHosted(e,r){return r.project.configuration.reduceHook(o=>o.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let o=await Z8(e.reference,r.project.configuration),a=nh(e.reference),n=J.join(o,"package.tgz");await sn.prepareExternalProject(o,n,{configuration:r.project.configuration,report:r.report,workspace:a.extra.workspace,locator:e});let u=await oe.readFilePromise(n);return await We.releaseAfterUseAsync(async()=>await Ji.convertToZip(u,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1}))}};Ke();Ke();var l2=class{supportsDescriptor(e,r){return gC(e.range)}supportsLocator(e,r){return gC(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=await X8(e.range,o.project.configuration);return[Y.makeLocator(e,a)]}async getSatisfying(e,r,o,a){let n=nh(e.range);return{locators:o.filter(A=>{if(A.identHash!==e.identHash)return!1;let p=nh(A.reference);return!(n.repo!==p.repo||n.treeish.protocol==="commit"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await We.releaseAfterUseAsync(async()=>await Nt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var jht={configuration:{changesetBaseRefs:{description:"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.",type:"STRING",isArray:!0,isNullable:!1,default:["master","origin/master","upstream/master","main","origin/main","upstream/main"]},changesetIgnorePatterns:{description:"Array of glob patterns; files matching them will be ignored when fetching the changed files",type:"STRING",default:[],isArray:!0},cloneConcurrency:{description:"Maximal number of concurrent clones",type:"NUMBER",default:2}},fetchers:[a2],resolvers:[l2]};var Ght=jht;_t();var ih=class extends ct{constructor(){super(...arguments);this.since=fe.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.noPrivate=fe.Boolean("--no-private",{description:"Exclude workspaces that have the private field set to true"});this.verbose=fe.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let u=this.since?await ea.fetchChangedWorkspaces({ref:this.since,project:o}):o.workspaces,A=new Set(u);if(this.recursive)for(let p of[...u].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)A.add(h);for(let p of A){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let C;if(this.verbose){let w=new Set,v=new Set;for(let b of Nt.hardDependencies)for(let[E,R]of h.getForScope(b)){let L=o.tryWorkspaceByDescriptor(R);L===null?o.workspacesByIdent.has(E)&&v.add(R):w.add(L)}C={workspaceDependencies:Array.from(w).map(b=>b.relativeCwd),mismatchedWorkspaceDependencies:Array.from(v).map(b=>Y.stringifyDescriptor(b))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?Y.stringifyIdent(h.name):null,...C})}})).exitCode()}};ih.paths=[["workspaces","list"]],ih.usage=it.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project.\n\n - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\n\n - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "});Ke();Ke();_t();var sh=class extends ct{constructor(){super(...arguments);this.workspaceName=fe.String();this.commandName=fe.String();this.args=fe.Proxy()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);let n=o.workspaces,u=new Map(n.map(p=>[Y.stringifyIdent(p.locator),p])),A=u.get(this.workspaceName);if(A===void 0){let p=Array.from(u.keys()).sort();throw new ot(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:
513 - ${p.join(`
514 - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};sh.paths=[["workspace"]],sh.usage=it.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
515 This command will run a given sub-command on a single workspace.
516 `,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var Wht={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:eme.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[Q0,k0,F0,R0,eh,Y0,M0,ih,zd,Xd,pC,Zd,x0,b0,T0,N0,L0,O0,U0,_0,H0,q0,th,j0,G0,V0,K0,J0,W0,z0,X0,Z0,em,$0,zf,rh,sh]},Yht=Wht;var sH={};Yt(sH,{default:()=>Vht});Ke();var Qt={optional:!0},tH=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Qt}}],["got@<11",{dependencies:{["@types/responselike"]:"^1.0.0",["@types/keyv"]:"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{["@types/keyv"]:"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{["vscode-jsonrpc"]:"^5.0.1",["vscode-languageserver-protocol"]:"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{["postcss-html"]:Qt,["postcss-jsx"]:Qt,["postcss-less"]:Qt,["postcss-markdown"]:Qt,["postcss-scss"]:Qt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{["tiny-warning"]:"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Qt}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Qt,"utf-8-validate":Qt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{["cross-spawn"]:"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{["prop-types"]:"^15.7.2"}}],["@rebass/forms@*",{dependencies:{["@styled-system/should-forward-prop"]:"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt,"vuetify-loader":Qt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{dependencies:{"babel-loader":"^8.1.0"}}],["@vue/cli-plugin-typescript@<=5.0.0-beta.0",{dependencies:{"@babel/core":"^7.12.16"},peerDependencies:{"vue-template-compiler":"^2.0.0"},peerDependenciesMeta:{"vue-template-compiler":Qt}}],["cordova-ios@<=6.3.0",{dependencies:{underscore:"^1.9.2"}}],["cordova-lib@<=10.0.1",{dependencies:{underscore:"^1.9.2"}}],["git-node-fs@*",{peerDependencies:{"js-git":"^0.7.8"},peerDependenciesMeta:{"js-git":Qt}}],["consolidate@<0.16.0",{peerDependencies:{mustache:"^3.0.0"},peerDependenciesMeta:{mustache:Qt}}],["consolidate@<=0.16.0",{peerDependencies:{velocityjs:"^2.0.1",tinyliquid:"^0.2.34","liquid-node":"^3.0.1",jade:"^1.11.0","then-jade":"*",dust:"^0.3.0","dustjs-helpers":"^1.7.4","dustjs-linkedin":"^2.7.5",swig:"^1.4.2","swig-templates":"^2.0.3","razor-tmpl":"^1.3.1",atpl:">=0.7.6",liquor:"^0.0.5",twig:"^1.15.2",ejs:"^3.1.5",eco:"^1.1.0-rc-3",jazz:"^0.0.18",jqtpl:"~1.1.0",hamljs:"^0.6.2",hamlet:"^0.3.3",whiskers:"^0.4.0","haml-coffee":"^1.14.1","hogan.js":"^3.0.2",templayed:">=0.2.3",handlebars:"^4.7.6",underscore:"^1.11.0",lodash:"^4.17.20",pug:"^3.0.0","then-pug":"*",qejs:"^3.0.5",walrus:"^0.10.1",mustache:"^4.0.1",just:"^0.1.8",ect:"^0.5.9",mote:"^0.2.0",toffee:"^0.3.6",dot:"^1.1.3","bracket-template":"^1.1.5",ractive:"^1.3.12",nunjucks:"^3.2.2",htmling:"^0.0.8","babel-core":"^6.26.3",plates:"~0.4.11","react-dom":"^16.13.1",react:"^16.13.1","arc-templates":"^0.5.3",vash:"^0.13.0",slm:"^2.0.0",marko:"^3.14.4",teacup:"^2.0.0","coffee-script":"^1.12.7",squirrelly:"^5.1.0",twing:"^5.0.2"},peerDependenciesMeta:{velocityjs:Qt,tinyliquid:Qt,"liquid-node":Qt,jade:Qt,"then-jade":Qt,dust:Qt,"dustjs-helpers":Qt,"dustjs-linkedin":Qt,swig:Qt,"swig-templates":Qt,"razor-tmpl":Qt,atpl:Qt,liquor:Qt,twig:Qt,ejs:Qt,eco:Qt,jazz:Qt,jqtpl:Qt,hamljs:Qt,hamlet:Qt,whiskers:Qt,"haml-coffee":Qt,"hogan.js":Qt,templayed:Qt,handlebars:Qt,underscore:Qt,lodash:Qt,pug:Qt,"then-pug":Qt,qejs:Qt,walrus:Qt,mustache:Qt,just:Qt,ect:Qt,mote:Qt,toffee:Qt,dot:Qt,"bracket-template":Qt,ractive:Qt,nunjucks:Qt,htmling:Qt,"babel-core":Qt,plates:Qt,"react-dom":Qt,react:Qt,"arc-templates":Qt,vash:Qt,slm:Qt,marko:Qt,teacup:Qt,"coffee-script":Qt,squirrelly:Qt,twing:Qt}}],["vue-loader@<=16.3.3",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",webpack:"^4.1.0 || ^5.0.0-0"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt}}],["vue-loader@^16.7.0",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",vue:"^3.2.13"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt,vue:Qt}}],["scss-parser@<=1.0.5",{dependencies:{lodash:"^4.17.21"}}],["query-ast@<1.0.5",{dependencies:{lodash:"^4.17.21"}}],["redux-thunk@<=2.3.0",{peerDependencies:{redux:"^4.0.0"}}],["skypack@<=0.3.2",{dependencies:{tar:"^6.1.0"}}],["@npmcli/metavuln-calculator@<2.0.0",{dependencies:{"json-parse-even-better-errors":"^2.3.1"}}],["bin-links@<2.3.0",{dependencies:{"mkdirp-infer-owner":"^1.0.2"}}],["rollup-plugin-polyfill-node@<=0.8.0",{peerDependencies:{rollup:"^1.20.0 || ^2.0.0"}}],["snowpack@<3.8.6",{dependencies:{"magic-string":"^0.25.7"}}],["elm-webpack-loader@*",{dependencies:{temp:"^0.9.4"}}],["winston-transport@<=4.4.0",{dependencies:{logform:"^2.2.0"}}],["jest-vue-preprocessor@*",{dependencies:{"@babel/core":"7.8.7","@babel/template":"7.8.6"},peerDependencies:{pug:"^2.0.4"},peerDependenciesMeta:{pug:Qt}}],["redux-persist@*",{peerDependencies:{react:">=16"},peerDependenciesMeta:{react:Qt}}],["sodium@>=3",{dependencies:{"node-gyp":"^3.8.0"}}],["babel-plugin-graphql-tag@<=3.1.0",{peerDependencies:{graphql:"^14.0.0 || ^15.0.0"}}],["@playwright/test@<=1.14.1",{dependencies:{"jest-matcher-utils":"^26.4.2"}}],...["babel-plugin-remove-graphql-queries@<3.14.0-next.1","babel-preset-gatsby-package@<1.14.0-next.1","create-gatsby@<1.14.0-next.1","gatsby-admin@<0.24.0-next.1","gatsby-cli@<3.14.0-next.1","gatsby-core-utils@<2.14.0-next.1","gatsby-design-tokens@<3.14.0-next.1","gatsby-legacy-polyfills@<1.14.0-next.1","gatsby-plugin-benchmark-reporting@<1.14.0-next.1","gatsby-plugin-graphql-config@<0.23.0-next.1","gatsby-plugin-image@<1.14.0-next.1","gatsby-plugin-mdx@<2.14.0-next.1","gatsby-plugin-netlify-cms@<5.14.0-next.1","gatsby-plugin-no-sourcemaps@<3.14.0-next.1","gatsby-plugin-page-creator@<3.14.0-next.1","gatsby-plugin-preact@<5.14.0-next.1","gatsby-plugin-preload-fonts@<2.14.0-next.1","gatsby-plugin-schema-snapshot@<2.14.0-next.1","gatsby-plugin-styletron@<6.14.0-next.1","gatsby-plugin-subfont@<3.14.0-next.1","gatsby-plugin-utils@<1.14.0-next.1","gatsby-recipes@<0.25.0-next.1","gatsby-source-shopify@<5.6.0-next.1","gatsby-source-wikipedia@<3.14.0-next.1","gatsby-transformer-screenshot@<3.14.0-next.1","gatsby-worker@<0.5.0-next.1"].map(t=>[t,{dependencies:{"@babel/runtime":"^7.14.8"}}]),["gatsby-core-utils@<2.14.0-next.1",{dependencies:{got:"8.3.2"}}],["gatsby-plugin-gatsby-cloud@<=3.1.0-next.0",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["gatsby-plugin-gatsby-cloud@<=3.2.0-next.1",{peerDependencies:{webpack:"*"}}],["babel-plugin-remove-graphql-queries@<=3.14.0-next.1",{dependencies:{"gatsby-core-utils":"^2.8.0-next.1"}}],["gatsby-plugin-netlify@3.13.0-next.1",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["clipanion-v3-codemod@<=0.2.0",{peerDependencies:{jscodeshift:"^0.11.0"}}],["react-live@*",{peerDependencies:{"react-dom":"*",react:"*"}}],["webpack@<4.44.1",{peerDependenciesMeta:{"webpack-cli":Qt,"webpack-command":Qt}}],["webpack@<5.0.0-beta.23",{peerDependenciesMeta:{"webpack-cli":Qt}}],["webpack-dev-server@<3.10.2",{peerDependenciesMeta:{"webpack-cli":Qt}}],["@docusaurus/responsive-loader@<1.5.0",{peerDependenciesMeta:{sharp:Qt,jimp:Qt}}],["eslint-module-utils@*",{peerDependenciesMeta:{"eslint-import-resolver-node":Qt,"eslint-import-resolver-typescript":Qt,"eslint-import-resolver-webpack":Qt,"@typescript-eslint/parser":Qt}}],["eslint-plugin-import@*",{peerDependenciesMeta:{"@typescript-eslint/parser":Qt}}],["critters-webpack-plugin@<3.0.2",{peerDependenciesMeta:{"html-webpack-plugin":Qt}}],["terser@<=5.10.0",{dependencies:{acorn:"^8.5.0"}}],["babel-preset-react-app@10.0.x",{dependencies:{"@babel/plugin-proposal-private-property-in-object":"^7.16.0"}}],["eslint-config-react-app@*",{peerDependenciesMeta:{typescript:Qt}}],["@vue/eslint-config-typescript@<11.0.0",{peerDependenciesMeta:{typescript:Qt}}],["unplugin-vue2-script-setup@<0.9.1",{peerDependencies:{"@vue/composition-api":"^1.4.3","@vue/runtime-dom":"^3.2.26"}}],["@cypress/snapshot@*",{dependencies:{debug:"^3.2.7"}}],["auto-relay@<=0.14.0",{peerDependencies:{"reflect-metadata":"^0.1.13"}}],["vue-template-babel-compiler@<1.2.0",{peerDependencies:{["vue-template-compiler"]:"^2.6.0"}}],["@parcel/transformer-image@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["@parcel/transformer-js@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["parcel@*",{peerDependenciesMeta:{["@parcel/core"]:Qt}}],["react-scripts@*",{peerDependencies:{eslint:"*"}}],["focus-trap-react@^8.0.0",{dependencies:{tabbable:"^5.3.2"}}],["react-rnd@<10.3.7",{peerDependencies:{react:">=16.3.0","react-dom":">=16.3.0"}}],["connect-mongo@*",{peerDependencies:{"express-session":"^1.17.1"}}],["vue-i18n@<9",{peerDependencies:{vue:"^2"}}],["vue-router@<4",{peerDependencies:{vue:"^2"}}],["unified@<10",{dependencies:{"@types/unist":"^2.0.0"}}],["react-github-btn@<=1.3.0",{peerDependencies:{react:">=16.3.0"}}],["react-dev-utils@*",{peerDependencies:{typescript:">=2.7",webpack:">=4"},peerDependenciesMeta:{typescript:Qt}}],["@asyncapi/react-component@<=1.0.0-next.39",{peerDependencies:{react:">=16.8.0","react-dom":">=16.8.0"}}],["xo@*",{peerDependencies:{webpack:">=1.11.0"},peerDependenciesMeta:{webpack:Qt}}],["babel-plugin-remove-graphql-queries@<=4.20.0-next.0",{dependencies:{"@babel/types":"^7.15.4"}}],["gatsby-plugin-page-creator@<=4.20.0-next.1",{dependencies:{"fs-extra":"^10.1.0"}}],["gatsby-plugin-utils@<=3.14.0-next.1",{dependencies:{fastq:"^1.13.0"},peerDependencies:{graphql:"^15.0.0"}}],["gatsby-plugin-mdx@<3.1.0-next.1",{dependencies:{mkdirp:"^1.0.4"}}],["gatsby-plugin-mdx@^2",{peerDependencies:{gatsby:"^3.0.0-next"}}],["fdir@<=5.2.0",{peerDependencies:{picomatch:"2.x"},peerDependenciesMeta:{picomatch:Qt}}],["babel-plugin-transform-typescript-metadata@<=0.3.2",{peerDependencies:{"@babel/core":"^7","@babel/traverse":"^7"},peerDependenciesMeta:{"@babel/traverse":Qt}}],["graphql-compose@>=9.0.10",{peerDependencies:{graphql:"^14.2.0 || ^15.0.0 || ^16.0.0"}}]];var rH;function tme(){return typeof rH>"u"&&(rH=Ie("zlib").brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),rH}var nH;function rme(){return typeof nH>"u"&&(nH=Ie("zlib").brotliDecompressSync(Buffer.from("G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bc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U1XuRtlgszq6pTNlQ/3MzNOEgCWPyTct22V2mEi2krizn5VDo9B19/X2DB3hCGRMM7ONbtnAcIx/OWB1u5uPbW1gsH8irXxT/IzG0PoXWYjhbMsH3KTuoOl5o17PulcgvsfTSnKFM354GWI8luqZnrswWjiXy3G+Vbyo1KMopFmmvBwNELgaS8z8dNZchx/Cl/xjddxhMcyqtzFyONb2Zdu90NkI8pAeufe7YlXrp53v8Dj/l8vWeVspRKBGXScBBPI/HinSTGmLDOGGOCIyH0JFdOZx0gWsacNlQLJMIrBhqRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=","base64")).toString()),nH}var iH;function nme(){return typeof iH>"u"&&(iH=Ie("zlib").brotliDecompressSync(Buffer.from("m0GfMYNtw09vVo0O/Ie+mYxbeJ1jE3+9JGBV7+2FaBzeM1axc7SOS4Xs9a8TUE8F9BDLU+ybBIGTQnygcGwNKnfFE/66AgER8Sdzw3tAyyK1rC6VddHdrMBXhxfZ52Iq27BWHYsPHv2xQ6/GUyd0r+PE5/wtwJTr7QAYQloGHaYsZCMH8fLqL63eqd+7qe5npI8kD3bucqwy4ngIDxxvdk+xV1pAgF62tP75vNrKJYOdRuBczPQQ73nOnWREC8kefOGy5KVqifwyZ/09l9OLl7qzndZ+IOuThtALmLhkJ+7JaIDkASI0zyP0Wi5nN/HNCQtN2QmzWwASEvVK/7pWlX1f8iHoadG2jUZObOdQET3n+EtY918Ovr5q52wFhTfJQqgcrr7ffAjqp7Gv2utEkMNCsLaoU4rFniy4cD8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+e+2Tf5zafz376P8XDynrfdapdn/hDiNSZPnBT7vR35Qf0d2l6n1f31NsZ5f0DfPljfky226VnXrp9yGVl1tB6HefI2wGAABkuobh6Vm6aybYLBBTOnOAc7N6vo0EhbB7N4MBANMKAVtFVl5oF9PqRiwuGLq3lXmNwUuNqtenCKWoyp0ZgzS4i0lIo7FBRBASWiZGqs60cIsC17RI4BYFl70gqas88ySvraPV4UkHK1Z7xcijvMe7/EjY0my58ee17pjUJlB60t4UEHhp3naEACA4Q0GVfRjp8OQi6z8f5F499E0PF1qBbJqKGy90NWiOD91AbEs3I0NQXfOHm4awjaaehSJI9BXxG+2lT0dWZp0RA/52p7BLKzxYbA0OALAs9UI3MFdt3quzCa/mwKnRq6/pRWVpo0jc00YzAOAW5yZq5/aoe2RkN8d7161/XXNgmlXoXQUErI7pGZy7d6Q1cFSj7wLxwA4fcYU+eMrGSx9q5bKNB81+fXecWhvfB8N4uLiHPDJkNdaB/QXZUQD6q2LBkSAW+yHDEaAAw4MipvgexaNrS45S77I2j6p7cQ7pq+rqY1QVitCx+Px5cs/2P/9j6+HgX+EqRivZyIWkR4qfrr+Ssi1Lxf/X46U+pHcc0HlH5kvuuUYLh8g5wWYD0mlFd6TMd3hKdMuPSDq76AKl+Dx38cdh8MC6QLjMdabbB4TmwJhJPb58KwJQ10oYhQcReGRu4SIuKNAYyQSFmHs5kAG2Vdg4Nqi6pfy8rVcfb15lDz/7bgUGzyOAeQxgbiHkglmfW1xs0uP1eClowJHBqSruzGORtLi6SQBwC6fKRwVefT5UMbzPg3t6Bj+fffWT430LfUfj7WDTrmdR8WZAnmnOAiDSBW4uDAAIfCU3DQ==","base64")).toString()),iH}var ime=new Map([[Y.makeIdent(null,"fsevents").identHash,tme],[Y.makeIdent(null,"resolve").identHash,rme],[Y.makeIdent(null,"typescript").identHash,nme]]),Kht={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,o]of tH)e(Y.parseDescriptor(r,!0),o)},getBuiltinPatch:async(t,e)=>{var n;let r="compat/";if(!e.startsWith(r))return;let o=Y.parseIdent(e.slice(r.length)),a=(n=ime.get(o.identHash))==null?void 0:n();return typeof a<"u"?a:null},reduceDependency:async(t,e,r,o)=>typeof ime.get(t.identHash)>"u"?t:Y.makeDescriptor(t,Y.makeRange({protocol:"patch:",source:Y.stringifyDescriptor(t),selector:`optional!builtin<compat/${Y.stringifyIdent(t)}>`,params:null}))}},Vht=Kht;var wH={};Yt(wH,{ConstraintsCheckCommand:()=>fh,ConstraintsQueryCommand:()=>uh,ConstraintsSourceCommand:()=>Ah,default:()=>Igt});Ke();Ke();A2();var dC=class{constructor(e){this.project=e}createEnvironment(){let e=new c2(["cwd","ident"]),r=new c2(["type","ident"]),o={manifestUpdates:new Map,reportedErrors:new Map};for(let a of this.project.workspaces){let n=Y.stringifyIdent(a.anchoredLocator),u=a.manifest.exportTo({}),A=(w,v,{caller:b=As.getCaller()}={})=>{let E=u2(w),R=We.getMapWithDefault(o.manifestUpdates,a.cwd),L=We.getMapWithDefault(R,E),_=We.getSetWithDefault(L,v);b!==null&&_.add(b)},p=w=>A(w,void 0,{caller:As.getCaller()}),h=w=>{We.getArrayWithDefault(o.reportedErrors,a.cwd).push(w)},C=e.insert({cwd:a.cwd,ident:n,manifest:u,set:A,unset:p,error:h});for(let w of Nt.allDependencies)for(let v of a.manifest[w].values()){let b=Y.stringifyIdent(v),E=()=>{A([w,b],void 0,{caller:As.getCaller()})},R=L=>{A([w,b],L,{caller:As.getCaller()})};r.insert({workspace:C,ident:b,range:v.range,type:w,update:R,delete:E,error:h})}}return{workspaces:e,dependencies:r,result:o}}async process(){let e=this.createEnvironment(),r={Yarn:{workspace:a=>e.workspaces.find(a)[0]??null,workspaces:a=>e.workspaces.find(a),dependencies:a=>e.dependencies.find(a)}},o=await this.project.loadUserConfig();return o!=null&&o.constraints?(await o.constraints(r),e.result):null}};Ke();Ke();_t();var uh=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.query=fe.String()}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(d2(),g2)),o=await Xe.find(this.context.cwd,this.context.plugins),{project:a}=await Pt.find(o,this.context.cwd),n=await r.find(a),u=this.query;return u.endsWith(".")||(u=`${u}.`),(await Ct.start({configuration:o,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(u)){let C=Array.from(Object.entries(h)),w=C.length,v=C.reduce((b,[E])=>Math.max(b,E.length),0);for(let b=0;b<w;b++){let[E,R]=C[b];p.reportInfo(null,`${Egt(b,w)}${E.padEnd(v," ")} = ${ygt(R)}`)}p.reportJson(h)}})).exitCode()}};uh.paths=[["constraints","query"]],uh.usage=it.Usage({category:"Constraints-related commands",description:"query the constraints fact database",details:`
517 This command will output all matches to the given prolog query.
518 `,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]});function ygt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function Egt(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Ke();_t();var Ah=class extends ct{constructor(){super(...arguments);this.verbose=fe.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(d2(),g2)),o=await Xe.find(this.context.cwd,this.context.plugins),{project:a}=await Pt.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ah.paths=[["constraints","source"]],Ah.usage=it.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]});Ke();Ke();_t();A2();var fh=class extends ct{constructor(){super(...arguments);this.fix=fe.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=await o.loadUserConfig(),n;if(a!=null&&a.constraints)n=new dC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(d2(),g2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let C=await n.process();if(!C)break;let{changedWorkspaces:w,remainingErrors:v}=uQ(o,C,{fix:this.fix}),b=[];for(let[E,R]of w){let L=E.manifest.indent;E.manifest=new Nt,E.manifest.indent=L,E.manifest.load(R),b.push(E.persistManifest())}if(!(w.size>0&&h>1)){u=Ame(v,{configuration:r}),A=!1,p=!0;for(let[,E]of v)for(let R of E)R.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${ye.pretty(r,"yarn constraints --fix",ye.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${ye.pretty(r,"yarn constraints --fix",ye.Type.CODE)}`;await Ct.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async C=>{C.reportInfo(0,h),C.reportSeparator()})}return u.children=We.sortMap(u.children,h=>h.value[1]),$o.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};fh.paths=[["constraints"]],fh.usage=it.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
519 This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
520
521 If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
522
523 For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
524 `,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});A2();var Cgt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[uh,Ah,fh],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r!=null&&r.constraints)o=new dC(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(d2(),g2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=uQ(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[u,A]of n)for(let p of A)e(84,`${ye.pretty(t.configuration,u.locator,ye.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${ye.pretty(t.configuration,"yarn constraints",ye.Type.CODE)} for more details`)}}},Igt=Cgt;var BH={};Yt(BH,{CreateCommand:()=>im,DlxCommand:()=>ph,default:()=>Bgt});Ke();_t();var im=class extends ct{constructor(){super(...arguments);this.pkg=fe.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=fe.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=fe.String();this.args=fe.Proxy()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=Y.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?Y.makeIdent(a.scope,`create-${a.name}`):Y.makeIdent(null,`create-${a.name}`),u=Y.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};im.paths=[["create"]];Ke();Ke();St();_t();var ph=class extends ct{constructor(){super(...arguments);this.packages=fe.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=fe.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=fe.String();this.args=fe.Proxy()}async execute(){return Xe.telemetry=null,await oe.mktempPromise(async r=>{let o=J.join(r,`dlx-${process.pid}`);await oe.mkdirPromise(o),await oe.writeFilePromise(J.join(o,"package.json"),`{}
525`),await oe.writeFilePromise(J.join(o,"yarn.lock"),"");let a=J.join(o,".yarnrc.yml"),n=await Xe.findProjectCwd(this.context.cwd,Lr.lockfile),A={enableGlobalCache:!(await Xe.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Vu(68),level:ye.LogLevel.Discard}]},p=n!==null?J.join(n,".yarnrc.yml"):null;p!==null&&oe.existsSync(p)?(await oe.copyFilePromise(p,a),await Xe.updateConfiguration(o,L=>{let _=We.toMerged(L,A);return Array.isArray(L.plugins)&&(_.plugins=L.plugins.map(V=>{let re=typeof V=="string"?V:V.path,ae=ue.isAbsolute(re)?re:ue.resolve(ue.fromPortablePath(n),re);return typeof V=="string"?ae:{path:ae,spec:V.spec}})),_})):await oe.writeJsonPromise(a,A);let h=this.packages??[this.command],C=Y.parseDescriptor(this.command).name,w=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(w!==0)return w;this.quiet||this.context.stdout.write(`
526`);let v=await Xe.find(o,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,o);if(E===null)throw new er(b.cwd,o);await b.restoreInstallState();let R=await sn.getWorkspaceAccessibleBinaries(E);return R.has(C)===!1&&R.size===1&&typeof this.packages>"u"&&(C=Array.from(R)[0][0]),await sn.executeWorkspaceAccessibleBinary(E,C,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};ph.paths=[["dlx"]],ph.usage=it.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var wgt={commands:[im,ph]},Bgt=wgt;var SH={};Yt(SH,{ExecFetcher:()=>y2,ExecResolver:()=>E2,default:()=>Sgt,execUtils:()=>hQ});Ke();Ke();St();var hA="exec:";var hQ={};Yt(hQ,{loadGeneratorFile:()=>m2,makeLocator:()=>DH,makeSpec:()=>Ome,parseSpec:()=>vH});Ke();St();function vH(t){let{params:e,selector:r}=Y.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?Y.parseLocator(e.locator):null,path:o}}function Ome({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:Y.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return Y.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function DH(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return Y.makeLocator(t,Ome({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function m2(t,e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(t,{protocol:e}),n=J.isAbsolute(a)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new An(wt.root),prefixPath:J.relative(wt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var y2=class{supports(e,r){return!!e.reference.startsWith(hA)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:hA});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await m2(e.reference,hA,r);return oe.mktempPromise(async a=>{let n=J.join(a,"generator.js");return await oe.writeFilePromise(n,o),oe.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!oe.existsSync(J.join(u,"build")))throw new Error("The script should have generated a build directory");return await Ji.makeArchiveFromDirectory(J.join(u,"build"),{prefixPath:Y.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await oe.mktempPromise(async n=>{let u=await sn.makeScriptEnv({project:a.project,binFolder:n}),A=J.join(e,"runtime.js");return await oe.mktempPromise(async p=>{let h=J.join(p,"buildfile.log"),C=J.join(e,"generator"),w=J.join(e,"build");await oe.mkdirPromise(C),await oe.mkdirPromise(w);let v={tempDir:ue.fromPortablePath(C),buildDir:ue.fromPortablePath(w),locator:Y.stringifyLocator(r)};await oe.writeFilePromise(A,`
527 // Expose 'Module' as a global variable
528 Object.defineProperty(global, 'Module', {
529 get: () => require('module'),
530 configurable: true,
531 enumerable: false,
532 });
533
534 // Expose non-hidden built-in modules as global variables
535 for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {
536 Object.defineProperty(global, name, {
537 get: () => require(name),
538 configurable: true,
539 enumerable: false,
540 });
541 }
542
543 // Expose the 'execEnv' global variable
544 Object.defineProperty(global, 'execEnv', {
545 value: {
546 ...${JSON.stringify(v)},
547 },
548 enumerable: true,
549 });
550 `);let b=u.NODE_OPTIONS||"",E=/\s*--require\s+\S*\.pnp\.c?js\s*/g;b=b.replace(E," ").trim(),u.NODE_OPTIONS=b;let{stdout:R,stderr:L}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${Y.stringifyLocator(r)})
551`,prefix:Y.prettyLocator(a.project.configuration,r),report:a.report}),{code:_}=await Mr.pipevp(process.execPath,["--require",ue.fromPortablePath(A),ue.fromPortablePath(o),Y.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:R,stderr:L});if(_!==0)throw oe.detachTemp(p),new Error(`Package generation failed (exit code ${_}, logs can be found here: ${ye.pretty(a.project.configuration,h,ye.Type.PATH)})`)})})}};Ke();Ke();var vgt=2,E2=class{supportsDescriptor(e,r){return!!e.range.startsWith(hA)}supportsLocator(e,r){return!!e.reference.startsWith(hA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=vH(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await m2(Y.makeRange({protocol:hA,source:a,selector:a,params:{locator:Y.stringifyLocator(n)}}),hA,o.fetchOptions),A=bn.makeHash(`${vgt}`,u).slice(0,6);return[DH(e,{parentLocator:n,path:a,generatorHash:A,protocol:hA})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await We.releaseAfterUseAsync(async()=>await Nt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Dgt={fetchers:[y2],resolvers:[E2]},Sgt=Dgt;var xH={};Yt(xH,{FileFetcher:()=>B2,FileResolver:()=>v2,TarballFileFetcher:()=>D2,TarballFileResolver:()=>S2,default:()=>bgt,fileUtils:()=>sm});Ke();St();var CC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,C2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Mi="file:";var sm={};Yt(sm,{fetchArchiveFromLocator:()=>w2,makeArchiveFromLocator:()=>gQ,makeBufferFromLocator:()=>PH,makeLocator:()=>IC,makeSpec:()=>Mme,parseSpec:()=>I2});Ke();St();function I2(t){let{params:e,selector:r}=Y.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?Y.parseLocator(e.locator):null,path:o}}function Mme({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:Y.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return Y.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function IC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return Y.makeLocator(t,Mme({parentLocator:e,path:r,hash:o,protocol:a}))}async function w2(t,e){let{parentLocator:r,path:o}=Y.parseFileStyleRange(t.reference,{protocol:Mi}),a=J.isAbsolute(o)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new An(wt.root),prefixPath:J.relative(wt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=J.join(n.prefixPath,o);return await We.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function gQ(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=Y.parseFileStyleRange(t.reference,{protocol:e}),u=J.isAbsolute(n)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new An(wt.root),prefixPath:J.relative(wt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=J.join(A.prefixPath,n);return await We.releaseAfterUseAsync(async()=>await Ji.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:Y.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function PH(t,{protocol:e,fetchOptions:r}){return(await gQ(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var B2=class{supports(e,r){return!!e.reference.startsWith(Mi)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:Mi});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){return gQ(e,{protocol:Mi,fetchOptions:r})}};Ke();Ke();var Pgt=2,v2=class{supportsDescriptor(e,r){return e.range.match(CC)?!0:!!e.range.startsWith(Mi)}supportsLocator(e,r){return!!e.reference.startsWith(Mi)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return CC.test(e.range)&&(e=Y.makeDescriptor(e,`${Mi}${e.range}`)),Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=I2(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await PH(Y.makeLocator(e,Y.makeRange({protocol:Mi,source:a,selector:a,params:{locator:Y.stringifyLocator(n)}})),{protocol:Mi,fetchOptions:o.fetchOptions}),A=bn.makeHash(`${Pgt}`,u).slice(0,6);return[IC(e,{parentLocator:n,path:a,hash:A,protocol:Mi})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await We.releaseAfterUseAsync(async()=>await Nt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ke();var D2=class{supports(e,r){return C2.test(e.reference)?!!e.reference.startsWith(Mi):!1}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),checksum:u}}async fetchFromDisk(e,r){let o=await w2(e,r);return await Ji.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1})}};Ke();Ke();Ke();var S2=class{supportsDescriptor(e,r){return C2.test(e.range)?!!(e.range.startsWith(Mi)||CC.test(e.range)):!1}supportsLocator(e,r){return C2.test(e.reference)?!!e.reference.startsWith(Mi):!1}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return CC.test(e.range)&&(e=Y.makeDescriptor(e,`${Mi}${e.range}`)),Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=I2(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=IC(e,{parentLocator:n,path:a,hash:"",protocol:Mi}),A=await w2(u,o.fetchOptions),p=bn.makeHash(A).slice(0,6);return[IC(e,{parentLocator:n,path:a,hash:p,protocol:Mi})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await We.releaseAfterUseAsync(async()=>await Nt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var xgt={fetchers:[D2,B2],resolvers:[S2,v2]},bgt=xgt;var kH={};Yt(kH,{GithubFetcher:()=>P2,default:()=>kgt,githubUtils:()=>dQ});Ke();St();var dQ={};Yt(dQ,{invalidGithubUrlMessage:()=>Hme,isGithubUrl:()=>bH,parseGithubUrl:()=>QH});var Ume=tt(Ie("querystring")),_me=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];function bH(t){return t?_me.some(e=>!!t.match(e)):!1}function QH(t){let e;for(let A of _me)if(e=t.match(A),e)break;if(!e)throw new Error(Hme(t));let[,r,o,a,n="master"]=e,{commit:u}=Ume.default.parse(n);return n=u||n.replace(/[^:]*:/,""),{auth:r,username:o,reponame:a,treeish:n}}function Hme(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var P2=class{supports(e,r){return!!bH(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o=await ln.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await oe.mktempPromise(async a=>{let n=new An(a);await Ji.extractArchiveTo(o,n,{stripComponents:1});let u=ea.splitRepoUrl(e.reference),A=J.join(a,"package.tgz");await sn.prepareExternalProject(a,A,{configuration:r.project.configuration,report:r.report,workspace:u.extra.workspace,locator:e});let p=await oe.readFilePromise(A);return await Ji.convertToZip(p,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:o,username:a,reponame:n,treeish:u}=QH(e.reference);return`https://${o?`${o}@`:""}github.com/${a}/${n}/archive/${u}.tar.gz`}};var Qgt={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let o=new P2;if(!o.supports(e,r))return null;try{return await o.fetch(e,r)}catch{return null}}}},kgt=Qgt;var FH={};Yt(FH,{TarballHttpFetcher:()=>Q2,TarballHttpResolver:()=>k2,default:()=>Rgt});Ke();var x2=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,b2=/^https?:/;var Q2=class{supports(e,r){return x2.test(e.reference)?!!b2.test(e.reference):!1}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o=await ln.get(e.reference,{configuration:r.project.configuration});return await Ji.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1})}};Ke();Ke();var k2=class{supportsDescriptor(e,r){return x2.test(e.range)?!!b2.test(e.range):!1}supportsLocator(e,r){return x2.test(e.reference)?!!b2.test(e.reference):!1}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){return[Y.convertDescriptorToLocator(e)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await We.releaseAfterUseAsync(async()=>await Nt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Fgt={fetchers:[Q2],resolvers:[k2]},Rgt=Fgt;var RH={};Yt(RH,{InitCommand:()=>hh,default:()=>Ngt});Ke();Ke();St();_t();var hh=class extends ct{constructor(){super(...arguments);this.private=fe.Boolean("-p,--private",!1,{description:"Initialize a private package"});this.workspace=fe.Boolean("-w,--workspace",!1,{description:"Initialize a workspace root with a `packages/` directory"});this.install=fe.String("-i,--install",!1,{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"});this.name=fe.String("-n,--name",{description:"Initialize a package with the given name"});this.usev2=fe.Boolean("-2",!1,{hidden:!0});this.yes=fe.Boolean("-y,--yes",{hidden:!0})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=typeof this.install=="string"?this.install:this.usev2||this.install===!0?"latest":null;return o!==null?await this.executeProxy(r,o):await this.executeRegular(r)}async executeProxy(r,o){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new ot("Cannot use the --install flag from within a project subdirectory");oe.existsSync(this.context.cwd)||await oe.mkdirPromise(this.context.cwd,{recursive:!0});let a=J.join(this.context.cwd,r.get("lockfileFilename"));oe.existsSync(a)||await oe.writeFilePromise(a,"");let n=await this.cli.run(["set","version",o],{quiet:!0});if(n!==0)return n;let u=[];return this.private&&u.push("-p"),this.workspace&&u.push("-w"),this.name&&u.push(`-n=${this.name}`),this.yes&&u.push("-y"),await oe.mktempPromise(async A=>{let{code:p}=await Mr.pipevp("yarn",["init",...u],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await sn.makeScriptEnv({binFolder:A})});return p})}async executeRegular(r){let o=null;try{o=(await Pt.find(r,this.context.cwd)).project}catch{o=null}oe.existsSync(this.context.cwd)||await oe.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Nt.tryFind(this.context.cwd),n=a??new Nt,u=Object.fromEntries(r.get("initFields").entries());n.load(u),n.name=n.name??Y.makeIdent(r.get("initScope"),this.name??J.basename(this.context.cwd)),n.packageManager=On&&We.isTaggedYarnVersion(On)?`yarn@${On}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await oe.mkdirPromise(J.join(this.context.cwd,"packages"),{recursive:!0}),n.workspaceDefinitions=[{pattern:"packages/*"}]);let A={};n.exportTo(A);let p=J.join(this.context.cwd,Nt.fileName);await oe.changeFilePromise(p,`${JSON.stringify(A,null,2)}
552`,{automaticNewlines:!0});let h=[p],C=J.join(this.context.cwd,"README.md");if(oe.existsSync(C)||(await oe.writeFilePromise(C,`# ${Y.stringifyIdent(n.name)}
553`),h.push(C)),!o||o.cwd===this.context.cwd){let w=J.join(this.context.cwd,Lr.lockfile);oe.existsSync(w)||(await oe.writeFilePromise(w,""),h.push(w));let b=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/zero-installs","","#!.yarn/cache",".pnp.*"].map(he=>`${he}
554`).join(""),E=J.join(this.context.cwd,".gitignore");oe.existsSync(E)||(await oe.writeFilePromise(E,b),h.push(E));let L=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(he=>`${he}
555`).join(""),_=J.join(this.context.cwd,".gitattributes");oe.existsSync(_)||(await oe.writeFilePromise(_,L),h.push(_));let V={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};We.mergeIntoTarget(V,r.get("initEditorConfig"));let re=`root = true
556`;for(let[he,pe]of Object.entries(V)){re+=`
557[${he}]
558`;for(let[De,ge]of Object.entries(pe)){let le=De.replace(/[A-Z]/g,Pe=>`_${Pe.toLowerCase()}`);re+=`${le} = ${ge}
559`}}let ae=J.join(this.context.cwd,".editorconfig");oe.existsSync(ae)||(await oe.writeFilePromise(ae,re),h.push(ae)),await this.cli.run(["install"],{quiet:!0}),oe.existsSync(J.join(this.context.cwd,".git"))||(await Mr.execvp("git",["init"],{cwd:this.context.cwd}),await Mr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Mr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};hh.paths=[["init"]],hh.usage=it.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var Tgt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[hh]},Ngt=Tgt;var Nq={};Yt(Nq,{SearchCommand:()=>Eh,UpgradeInteractiveCommand:()=>Ih,default:()=>BIt});Ke();var qme=tt(Ie("os"));function wC({stdout:t}){if(qme.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}_t();var eEe=tt(XH()),ZH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Fmt=(0,eEe.default)(ZH.appId,ZH.apiKey).initIndex(ZH.indexName),$H=async(t,e=0)=>await Fmt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var QB=["regular","dev","peer"],Eh=class extends ct{async execute(){wC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(ik(),vq)),{ScrollableItems:r}=await Promise.resolve().then(()=>(lk(),ak)),{useKeypress:o}=await Promise.resolve().then(()=>(PB(),gwe)),{useMinistore:a}=await Promise.resolve().then(()=>(Qq(),bq)),{renderForm:n}=await Promise.resolve().then(()=>(fk(),Ak)),{default:u}=await Promise.resolve().then(()=>tt(Dwe())),{Box:A,Text:p}=await Promise.resolve().then(()=>tt(uc())),{default:h,useEffect:C,useState:w}=await Promise.resolve().then(()=>tt(en())),v=await Xe.find(this.context.cwd,this.context.plugins),b=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),E=()=>h.createElement(h.Fragment,null,h.createElement(A,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(A,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(A,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),R=()=>h.createElement(A,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),L=({hit:ge,active:le})=>{let[Pe,g]=a(ge.name,null);o({active:le},(de,ne)=>{if(ne.name!=="space")return;if(!Pe){g(QB[0]);return}let Z=QB.indexOf(Pe)+1;Z===QB.length?g(null):g(QB[Z])},[Pe,g]);let ve=Y.parseIdent(ge.name),Ee=Y.prettyIdent(v,ve);return h.createElement(A,null,h.createElement(A,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},Ee)),h.createElement(A,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},ge.owner.name)),h.createElement(A,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},ge.version)),h.createElement(A,{width:16,marginLeft:1},h.createElement(p,null,ge.humanDownloadsLast30Days)))},_=({name:ge,active:le})=>{let[Pe]=a(ge,null),g=Y.parseIdent(ge);return h.createElement(A,null,h.createElement(A,{width:47},h.createElement(p,{bold:!0}," - ",Y.prettyIdent(v,g))),QB.map(ve=>h.createElement(A,{key:ve,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(e,{active:Pe===ve})," ",h.createElement(p,{bold:!0},ve)))))},V=()=>h.createElement(A,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),ae=await n(({useSubmit:ge})=>{let le=a();ge(le);let Pe=Array.from(le.keys()).filter(H=>le.get(H)!==null),[g,ve]=w(""),[Ee,de]=w(0),[ne,Z]=w([]),me=H=>{H.match(/\t| /)||ve(H)},be=async()=>{de(0);let H=await $H(g);H.query===g&&Z(H.hits)},ut=async()=>{let H=await $H(g,Ee+1);H.query===g&&H.page-1===Ee&&(de(H.page),Z([...ne,...H.hits]))};return C(()=>{g?be():Z([])},[g]),h.createElement(A,{flexDirection:"column"},h.createElement(b,null),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(A,{width:41},h.createElement(u,{value:g,onChange:me,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(E,null)),ne.length?h.createElement(r,{radius:2,loop:!1,children:ne.map(H=>h.createElement(L,{key:H.name,hit:H,active:!1})),willReachEnd:ut}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(A,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(R,null)),Pe.length?Pe.map(H=>h.createElement(_,{key:H,name:H,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(V,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ae>"u")return 1;let he=Array.from(ae.keys()).filter(ge=>ae.get(ge)==="regular"),pe=Array.from(ae.keys()).filter(ge=>ae.get(ge)==="dev"),De=Array.from(ae.keys()).filter(ge=>ae.get(ge)==="peer");return he.length&&await this.cli.run(["add",...he]),pe.length&&await this.cli.run(["add","--dev",...pe]),De&&await this.cli.run(["add","--peer",...De]),0}};Eh.paths=[["search"]],Eh.usage=it.Usage({category:"Interactive commands",description:"open the search interface",details:`
560 This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
561 `,examples:[["Open the search window","yarn search"]]});Ke();_t();y_();var Fwe=tt(si()),kwe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,Rwe=(t,e)=>t.length>0?[t.slice(0,e)].concat(Rwe(t.slice(e),e)):[],Ih=class extends ct{async execute(){wC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(Qwe(),bwe)),{Pad:r}=await Promise.resolve().then(()=>(Tq(),xwe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(lk(),ak)),{useMinistore:a}=await Promise.resolve().then(()=>(Qq(),bq)),{renderForm:n}=await Promise.resolve().then(()=>(fk(),Ak)),{Box:u,Text:A}=await Promise.resolve().then(()=>tt(uc())),{default:p,useEffect:h,useRef:C,useState:w}=await Promise.resolve().then(()=>tt(en())),v=await Xe.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,this.context.cwd),R=await Ur.find(v);if(!E)throw new er(b.cwd,this.context.cwd);await b.restoreInstallState({restoreResolutions:!1});let L=this.context.stdout.rows-7,_=(Ee,de)=>{let ne=kpe(Ee,de),Z="";for(let me of ne)me.added?Z+=ye.pretty(v,me.value,"green"):me.removed||(Z+=me.value);return Z},V=(Ee,de)=>{if(Ee===de)return de;let ne=Y.parseRange(Ee),Z=Y.parseRange(de),me=ne.selector.match(kwe),be=Z.selector.match(kwe);if(!me||!be)return _(Ee,de);let ut=["gray","red","yellow","green","magenta"],H=null,yt="";for(let Me=1;Me<ut.length;++Me)H!==null||me[Me]!==be[Me]?(H===null&&(H=ut[Me-1]),yt+=ye.pretty(v,be[Me],H)):yt+=be[Me];return yt},re=async(Ee,de,ne)=>{let Z=await tu.fetchDescriptorFrom(Ee,ne,{project:b,cache:R,preserveModifier:de,workspace:E});return Z!==null?Z.range:Ee.range},ae=async Ee=>{let de=Fwe.default.valid(Ee.range)?`^${Ee.range}`:Ee.range,[ne,Z]=await Promise.all([re(Ee,Ee.range,de).catch(()=>null),re(Ee,Ee.range,"latest").catch(()=>null)]),me=[{value:null,label:Ee.range}];return ne&&ne!==Ee.range?me.push({value:ne,label:V(Ee.range,ne)}):me.push({value:null,label:""}),Z&&Z!==ne&&Z!==Ee.range?me.push({value:Z,label:V(Ee.range,Z)}):me.push({value:null,label:""}),me},he=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),pe=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),De=({active:Ee,descriptor:de,suggestions:ne})=>{let[Z,me]=a(de.descriptorHash,null),be=Y.stringifyIdent(de),ut=Math.max(0,45-be.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},Y.prettyIdent(v,de)),p.createElement(r,{active:Ee,length:ut})),p.createElement(e,{active:Ee,options:ne,value:Z,skewer:!0,onChange:me,sizes:[17,17,17]})))},ge=({dependencies:Ee})=>{let[de,ne]=w(Ee.map(()=>null)),Z=C(!0),me=async be=>{let ut=await ae(be);return ut.filter(H=>H.label!=="").length<=1?null:{descriptor:be,suggestions:ut}};return h(()=>()=>{Z.current=!1},[]),h(()=>{let be=Math.trunc(L*1.75),ut=Ee.slice(0,be),H=Ee.slice(be),yt=Rwe(H,L),Me=ut.map(me).reduce(async(Te,Qe)=>{await Te;let _e=await Qe;_e!==null&&(!Z.current||ne(qe=>{let At=qe.findIndex(x=>x===null),Oe=[...qe];return Oe[At]=_e,Oe}))},Promise.resolve());yt.reduce((Te,Qe)=>Promise.all(Qe.map(_e=>Promise.resolve().then(()=>me(_e)))).then(async _e=>{_e=_e.filter(qe=>qe!==null),await Te,Z.current&&ne(qe=>{let At=qe.findIndex(Oe=>Oe===null);return qe.slice(0,At).concat(_e).concat(qe.slice(At+_e.length))})}),Me).then(()=>{Z.current&&ne(Te=>Te.filter(Qe=>Qe!==null))})},[]),de.length?p.createElement(o,{radius:L>>1,children:de.map((be,ut)=>be!==null?p.createElement(De,{key:ut,active:!1,descriptor:be.descriptor,suggestions:be.suggestions}):p.createElement(A,{key:ut},"Loading..."))}):p.createElement(A,null,"No upgrades found")},Pe=await n(({useSubmit:Ee})=>{Ee(a());let de=new Map;for(let Z of b.workspaces)for(let me of["dependencies","devDependencies"])for(let be of Z.manifest[me].values())b.tryWorkspaceByDescriptor(be)===null&&(be.range.startsWith("link:")||de.set(be.descriptorHash,be));let ne=We.sortMap(de.values(),Z=>Y.stringifyDescriptor(Z));return p.createElement(u,{flexDirection:"column"},p.createElement(he,null),p.createElement(pe,null),p.createElement(ge,{dependencies:ne}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof Pe>"u")return 1;let g=!1;for(let Ee of b.workspaces)for(let de of["dependencies","devDependencies"]){let ne=Ee.manifest[de];for(let Z of ne.values()){let me=Pe.get(Z.descriptorHash);typeof me<"u"&&me!==null&&(ne.set(Z.identHash,Y.makeDescriptor(Z,me)),g=!0)}}return g?(await Ct.start({configuration:v,stdout:this.context.stdout,includeLogs:!this.context.quiet},async Ee=>{await b.install({cache:R,report:Ee})})).exitCode():0}};Ih.paths=[["upgrade-interactive"]],Ih.usage=it.Usage({category:"Interactive commands",description:"open the upgrade interface",details:`
562 This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
563 `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var wIt={commands:[Eh,Ih]},BIt=wIt;var Lq={};Yt(Lq,{LinkFetcher:()=>FB,LinkResolver:()=>RB,PortalFetcher:()=>TB,PortalResolver:()=>NB,default:()=>DIt});Ke();St();var rp="portal:",np="link:";var FB=class{supports(e,r){return!!e.reference.startsWith(np)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:np});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:np}),n=J.isAbsolute(a)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new An(wt.root),prefixPath:J.relative(wt.root,n.localPath),localPath:wt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new An(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new Gu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot,discardFromLookup:!0}}};Ke();St();var RB=class{supportsDescriptor(e,r){return!!e.range.startsWith(np)}supportsLocator(e,r){return!!e.reference.startsWith(np)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(np.length);return[Y.makeLocator(e,`${np}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ke();St();var TB=class{supports(e,r){return!!e.reference.startsWith(rp)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:rp});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:rp}),n=J.isAbsolute(a)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new An(wt.root),prefixPath:J.relative(wt.root,n.localPath),localPath:wt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new An(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot,localPath:p}:{packageFs:new Gu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot}}};Ke();Ke();St();var NB=class{supportsDescriptor(e,r){return!!e.range.startsWith(rp)}supportsLocator(e,r){return!!e.reference.startsWith(rp)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(rp.length);return[Y.makeLocator(e,`${rp}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await We.releaseAfterUseAsync(async()=>await Nt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var vIt={fetchers:[FB,TB],resolvers:[RB,NB]},DIt=vIt;var Ej={};Yt(Ej,{NodeModulesLinker:()=>XB,NodeModulesMode:()=>gj,PnpLooseLinker:()=>ZB,default:()=>qwt});St();Ke();St();St();var Mq=(t,e)=>`${t}@${e}`,Twe=(t,e)=>{let r=e.indexOf("#"),o=r>=0?e.substring(r+1):e;return Mq(t,o)};var Owe=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),o=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:o,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},u;n.debugLevel>=0&&(u=Date.now());let A=FIt(t,n),p=!1,h=0;do p=Uq(A,[A],new Set([A.locator]),new Map,n).anotherRoundNeeded,n.fastLookupPossible=!1,h++;while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-u}ms, rounds: ${h}`),n.debugLevel>=1){let C=LB(A);if(Uq(A,[A],new Set([A.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree:
564${C}, next tree:
565${LB(A)}`);let v=Mwe(A);if(v)throw new Error(`${v}, after hoisting finished:
566${LB(A)}`)}return n.debugLevel>=2&&console.log(LB(A)),RIt(A)},SIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(e),r},PIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let C;for(let w of t)C=w.dependencies.get(h.name),C&&r.set(C.name,C)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(e,a),r},Nwe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:C,isHoistBorder:w,hoistPriority:v,dependencyKind:b,hoistedFrom:E,hoistedTo:R}=e,L={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(C),decoupled:!0,isHoistBorder:w,hoistPriority:v,dependencyKind:b,hoistedFrom:new Map(E),hoistedTo:new Map(R)},_=L.dependencies.get(r);return _&&_.ident==L.ident&&L.dependencies.set(r,L),t.dependencies.set(L.name,L),L},xIt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let o=Array.from(e.keys());o.sort((a,n)=>{let u=e.get(a),A=e.get(n);return A.hoistPriority!==u.hoistPriority?A.hoistPriority-u.hoistPriority:A.peerDependents.size!==u.peerDependents.size?A.peerDependents.size-u.peerDependents.size:A.dependents.size-u.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!t.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},Oq=t=>{let e=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!t.peerNames.has(n)){let u=t.dependencies.get(n);u&&!e.has(u)&&r(u,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},Uq=(t,e,r,o,a,n=new Set)=>{let u=e[e.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=TIt(u),p=xIt(u,A),h=t==u?new Map:a.fastLookupPossible?SIt(e):PIt(e),C,w=!1,v=!1,b=new Map(Array.from(p.entries()).map(([R,L])=>[R,L[0]])),E=new Map;do{let R=kIt(t,e,r,h,b,p,o,E,a);R.isGraphChanged&&(v=!0),R.anotherRoundNeeded&&(w=!0),C=!1;for(let[L,_]of p)_.length>1&&!u.dependencies.has(L)&&(b.delete(L),_.shift(),b.set(L,_[0]),C=!0)}while(C);for(let R of u.dependencies.values())if(!u.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let L=Uq(t,[...e,R],r,E,a);L.isGraphChanged&&(v=!0),L.anotherRoundNeeded&&(w=!0),r.delete(R.locator)}return{anotherRoundNeeded:w,isGraphChanged:v}},bIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},QIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let C,w=null,v=new Set;p&&(C=`${Array.from(e).map(L=>eo(L)).join("\u2192")}`);let b=r[r.length-1],R=!(o.ident===b.ident);if(p&&!R&&(w="- self-reference"),R&&(R=o.dependencyKind!==1,p&&!R&&(w="- workspace")),R&&o.dependencyKind===2&&(R=!bIt(o),p&&!R&&(w="- external soft link with unhoisted dependencies")),R&&(R=b.dependencyKind!==1||b.hoistedFrom.has(o.name)||e.size===1,p&&!R&&(w=b.reasons.get(o.name))),R&&(R=!t.peerNames.has(o.name),p&&!R&&(w=`- cannot shadow peer: ${eo(t.originalDependencies.get(o.name).locator)} at ${C}`)),R){let L=!1,_=a.get(o.name);if(L=!_||_.ident===o.ident,p&&!L&&(w=`- filled by: ${eo(_.locator)} at ${C}`),L)for(let V=r.length-1;V>=1;V--){let ae=r[V].dependencies.get(o.name);if(ae&&ae.ident!==o.ident){L=!1;let he=A.get(b);he||(he=new Set,A.set(b,he)),he.add(o.name),p&&(w=`- filled by ${eo(ae.locator)} at ${r.slice(0,V).map(pe=>eo(pe.locator)).join("\u2192")}`);break}}R=L}if(R&&(R=n.get(o.name)===o.ident,p&&!R&&(w=`- filled by: ${eo(u.get(o.name)[0])} at ${C}`)),R){let L=!0,_=new Set(o.peerNames);for(let V=r.length-1;V>=1;V--){let re=r[V];for(let ae of _){if(re.peerNames.has(ae)&&re.originalDependencies.has(ae))continue;let he=re.dependencies.get(ae);he&&t.dependencies.get(ae)!==he&&(V===r.length-1?v.add(he):(v=null,L=!1,p&&(w=`- peer dependency ${eo(he.locator)} from parent ${eo(re.locator)} was not hoisted to ${C}`))),_.delete(ae)}if(!L)break}R=L}if(R&&!h)for(let L of o.hoistedDependencies.values()){let _=a.get(L.name)||t.dependencies.get(L.name);if(!_||L.ident!==_.ident){R=!1,p&&(w=`- previously hoisted dependency mismatch, needed: ${eo(L.locator)}, available: ${eo(_==null?void 0:_.locator)}`);break}}return v!==null&&v.size>0?{isHoistable:2,dependsOn:v,reason:w}:{isHoistable:R?0:1,reason:w}},pk=t=>`${t.name}@${t.locator}`,kIt=(t,e,r,o,a,n,u,A,p)=>{let h=e[e.length-1],C=new Set,w=!1,v=!1,b=(_,V,re,ae,he)=>{if(C.has(ae))return;let pe=[...V,pk(ae)],De=[...re,pk(ae)],ge=new Map,le=new Map;for(let de of Oq(ae)){let ne=QIt(h,r,[h,..._,ae],de,o,a,n,A,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(le.set(de,ne),ne.isHoistable===2)for(let Z of ne.dependsOn){let me=ge.get(Z.name)||new Set;me.add(de.name),ge.set(Z.name,me)}}let Pe=new Set,g=(de,ne,Z)=>{if(!Pe.has(de)){Pe.add(de),le.set(de,{isHoistable:1,reason:Z});for(let me of ge.get(de.name)||[])g(ae.dependencies.get(me),ne,p.debugLevel>=2?`- peer dependency ${eo(de.locator)} from parent ${eo(ae.locator)} was not hoisted`:"")}};for(let[de,ne]of le)ne.isHoistable===1&&g(de,ne,ne.reason);let ve=!1;for(let de of le.keys())if(!Pe.has(de)){v=!0;let ne=u.get(ae);ne&&ne.has(de.name)&&(w=!0),ve=!0,ae.dependencies.delete(de.name),ae.hoistedDependencies.set(de.name,de),ae.reasons.delete(de.name);let Z=h.dependencies.get(de.name);if(p.debugLevel>=2){let me=Array.from(V).concat([ae.locator]).map(ut=>eo(ut)).join("\u2192"),be=h.hoistedFrom.get(de.name);be||(be=[],h.hoistedFrom.set(de.name,be)),be.push(me),ae.hoistedTo.set(de.name,Array.from(e).map(ut=>eo(ut.locator)).join("\u2192"))}if(!Z)h.ident!==de.ident&&(h.dependencies.set(de.name,de),he.add(de));else for(let me of de.references)Z.references.add(me)}if(ae.dependencyKind===2&&ve&&(w=!0),p.check){let de=Mwe(t);if(de)throw new Error(`${de}, after hoisting dependencies of ${[h,..._,ae].map(ne=>eo(ne.locator)).join("\u2192")}:
567${LB(t)}`)}let Ee=Oq(ae);for(let de of Ee)if(Pe.has(de)){let ne=le.get(de);if((a.get(de.name)===de.ident||!ae.reasons.has(de.name))&&ne.isHoistable!==0&&ae.reasons.set(de.name,ne.reason),!de.isHoistBorder&&De.indexOf(pk(de))<0){C.add(ae);let me=Nwe(ae,de);b([..._,ae],pe,De,me,R),C.delete(ae)}}},E,R=new Set(Oq(h)),L=Array.from(e).map(_=>pk(_));do{E=R,R=new Set;for(let _ of E){if(_.locator===h.locator||_.isHoistBorder)continue;let V=Nwe(h,_);b([],Array.from(r),L,V,R)}}while(R.size>0);return{anotherRoundNeeded:w,isGraphChanged:v}},Mwe=t=>{let e=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let C=p.get(h.name),w=()=>`${Array.from(o).concat([n]).map(v=>eo(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==C||!v||v.ident!==h.ident)&&e.push(`${w()} - broken peer promise: expected ${h.ident} but found ${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),b=n.hoistedTo.get(h.name),E=`${v?` hoisted from ${v.join(", ")}`:""}`,R=`${b?` hoisted to ${b}`:""}`,L=`${w()}${E}`;C?C.ident!==h.ident&&e.push(`${L} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${C.ident}`):e.push(`${L} - broken require promise: no required dependency ${h.name}${R} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(t,t.dependencies,t),e.join(`
568`)},FIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:Mq(r,a),ident:Twe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},A=new Map([[t,u]]),p=(h,C)=>{let w=A.get(h),v=!!w;if(!w){let{name:b,identName:E,reference:R,peerNames:L,hoistPriority:_,dependencyKind:V}=h,re=e.hoistingLimits.get(C.locator);w={name:b,references:new Set([R]),locator:Mq(E,R),ident:Twe(E,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(L),reasons:new Map,decoupled:!0,isHoistBorder:re?re.has(b):!1,hoistPriority:_||0,dependencyKind:V||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,w)}if(C.dependencies.set(h.name,w),C.originalDependencies.set(h.name,w),v){let b=new Set,E=R=>{if(!b.has(R)){b.add(R),R.decoupled=!1;for(let L of R.dependencies.values())R.peerNames.has(L.name)||E(L)}};E(w)}else for(let b of h.dependencies)p(b,w)};for(let h of t.dependencies)p(h,u);return u},_q=t=>t.substring(0,t.indexOf("@",1)),RIt=t=>{let e={name:t.name,identName:_q(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:C,locator:w}=a;p={name:h,identName:_q(w),references:C,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},TIt=t=>{let e=new Map,r=new Set([t]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=e.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let C of A.dependencies.values()){let w=a(C);w.hoistPriority=Math.max(w.hoistPriority,C.hoistPriority),A.peerNames.has(C.name)?w.peerDependents.add(A.ident):n(A,C)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},eo=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=t.substring(e+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`},Lwe=5e4,LB=t=>{let e=0,r=(a,n,u="")=>{if(e>Lwe||n.has(a))return"";e++;let A=Array.from(a.dependencies.values()).sort((h,C)=>h.name===C.name?0:h.name>C.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let C=A[h];if(!a.peerNames.has(C.name)&&C!==a){let w=a.reasons.get(C.name),v=_q(C.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(C)?">":"")+(v!==C.name?`a:${C.name}:`:"")+eo(C.locator)+(w?` ${w}`:"")}
569`,p+=r(C,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(t,new Set)+(e>Lwe?`
570Tree is too large, part of the tree has been dunped
571`:"")};var OB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(OB||{}),Uwe="node_modules",mm="$wsroot$";var MB=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=LIt(t,e),u=null;if(a.length===0){let A=Owe(r,{hoistingLimits:o});u=MIt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},mA=t=>`${t.name}@${t.reference}`,qq=t=>{let e=new Map;for(let[r,o]of t.entries())if(!o.dirList){let a=e.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},e.set(o.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(J.delimiter).length,u=a.split(J.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},_we=(t,e)=>{let r=Y.isVirtualLocator(t)?Y.devirtualizeLocator(t):t,o=Y.isVirtualLocator(e)?Y.devirtualizeLocator(e):e;return Y.areLocatorsEqual(r,o)},Hq=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=ue.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return J.contains(o,a)===null},NIt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let o=ue.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,b)=>{let E=mA(v);if(p.has(E))return;p.add(E);let R=t.getPackageInformation(v);if(R){let L=b?mA(b):"";if(mA(v)!==L&&R.linkType==="SOFT"&&!Hq(R,v,t,o)){let _=Hwe(R,v,t);(!A.get(_)||v.reference.startsWith("workspace:"))&&A.set(_,v)}for(let[_,V]of R.packageDependencies)V!==null&&(R.packagePeers.has(_)||h(t.getLocator(_,V),v))}};for(let v of u)h(v,null);let C=o.split(J.sep);for(let v of A.values()){let b=t.getPackageInformation(v),R=ue.toPortablePath(b.packageLocation.slice(0,-1)).split(J.sep).slice(C.length),L=n;for(let _ of R){let V=L.children.get(_);V||(V={children:new Map},L.children.set(_,V)),L=V}L.workspaceLocator=v}let w=(v,b)=>{if(v.workspaceLocator){let E=mA(b),R=a.get(E);R||(R=new Set,a.set(E,R)),R.add(v.workspaceLocator)}for(let E of v.children.values())w(E,v.workspaceLocator||b)};for(let v of n.children.values())w(v,n.workspaceLocator);return a},LIt=(t,e)=>{let r=[],o=!1,a=new Map,n=NIt(t),u=t.getPackageInformation(t.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=t.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=ue.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},C=new Map,w=(b,E)=>`${mA(E)}:${b}`,v=(b,E,R,L,_,V,re,ae)=>{var de,ne;let he=w(b,R),pe=C.get(he),De=!!pe;!De&&R.name===A.name&&R.reference===A.reference&&(pe=h,C.set(he,h));let ge=Hq(E,R,t,p);if(!pe){let Z=0;ge?Z=2:E.linkType==="SOFT"&&R.name.endsWith(mm)&&(Z=1),pe={name:b,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:Z===1?new Set:E.packagePeers,dependencyKind:Z},C.set(he,pe)}let le;if(ge?le=2:_.linkType==="SOFT"?le=1:le=0,pe.hoistPriority=Math.max(pe.hoistPriority||0,le),ae&&!ge){let Z=mA({name:L.identName,reference:L.reference}),me=a.get(Z)||new Set;a.set(Z,me),me.add(pe.name)}let Pe=new Map(E.packageDependencies);if(e.project){let Z=e.project.workspacesByCwd.get(ue.toPortablePath(E.packageLocation.slice(0,-1)));if(Z){let me=new Set([...Array.from(Z.manifest.peerDependencies.values(),be=>Y.stringifyIdent(be)),...Array.from(Z.manifest.peerDependenciesMeta.keys())]);for(let be of me)Pe.has(be)||(Pe.set(be,V.get(be)||null),pe.peerNames.add(be))}}let g=mA({name:R.name.replace(mm,""),reference:R.reference}),ve=n.get(g);if(ve)for(let Z of ve)Pe.set(`${Z.name}${mm}`,Z.reference);(E!==_||E.linkType!=="SOFT"||!ge&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(re)))&&L.dependencies.add(pe);let Ee=R!==A&&E.linkType==="SOFT"&&!R.name.endsWith(mm)&&!ge;if(!De&&!Ee){let Z=new Map;for(let[me,be]of Pe)if(be!==null){let ut=t.getLocator(me,be),H=t.getLocator(me.replace(mm,""),be),yt=t.getPackageInformation(H);if(yt===null)throw new Error("Assertion failed: Expected the package to have been registered");let Me=Hq(yt,ut,t,p);if(e.validateExternalSoftLinks&&e.project&&Me){yt.packageDependencies.size>0&&(o=!0);for(let[At,Oe]of yt.packageDependencies)if(Oe!==null){let x=Y.parseLocator(Array.isArray(Oe)?`${Oe[0]}@${Oe[1]}`:`${At}@${Oe}`);if(mA(x)!==mA(ut)){let I=Pe.get(At);if(I){let P=Y.parseLocator(Array.isArray(I)?`${I[0]}@${I[1]}`:`${At}@${I}`);_we(P,x)||r.push({messageName:71,text:`Cannot link ${Y.prettyIdent(e.project.configuration,Y.parseIdent(ut.name))} into ${Y.prettyLocator(e.project.configuration,Y.parseLocator(`${R.name}@${R.reference}`))} dependency ${Y.prettyLocator(e.project.configuration,x)} conflicts with parent dependency ${Y.prettyLocator(e.project.configuration,P)}`})}else{let P=Z.get(At);if(P){let y=P.target,F=Y.parseLocator(Array.isArray(y)?`${y[0]}@${y[1]}`:`${At}@${y}`);_we(F,x)||r.push({messageName:71,text:`Cannot link ${Y.prettyIdent(e.project.configuration,Y.parseIdent(ut.name))} into ${Y.prettyLocator(e.project.configuration,Y.parseLocator(`${R.name}@${R.reference}`))} dependency ${Y.prettyLocator(e.project.configuration,x)} conflicts with dependency ${Y.prettyLocator(e.project.configuration,F)} from sibling portal ${Y.prettyIdent(e.project.configuration,Y.parseIdent(P.portal.name))}`})}else Z.set(At,{target:x.reference,portal:ut})}}}}let Te=(de=e.hoistingLimitsByCwd)==null?void 0:de.get(re),Qe=Me?re:J.relative(p,ue.toPortablePath(yt.packageLocation))||wt.dot,_e=(ne=e.hoistingLimitsByCwd)==null?void 0:ne.get(Qe);v(me,yt,ut,pe,E,Pe,Qe,Te==="dependencies"||_e==="dependencies"||_e==="workspaces")}}};return v(A.name,u,A,h,u,u.packageDependencies,wt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:o}};function Hwe(t,e,r){let o=r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation;return ue.toPortablePath(o||t.packageLocation)}function OIt(t,e,r){let o=e.getLocator(t.name.replace(mm,""),t.reference),a=e.getPackageInformation(o);if(a===null)throw new Error("Assertion failed: Expected the package to be registered");return r.pnpifyFs?{linkType:"SOFT",target:ue.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:Hwe(a,t,e)}}var MIt=(t,e,r)=>{let o=new Map,a=(C,w,v)=>{let{linkType:b,target:E}=OIt(C,t,r);return{locator:mA(C),nodePath:w,target:E,linkType:b,aliases:v}},n=C=>{let[w,v]=C.split("/");return v?{scope:Li(w),name:Li(v)}:{scope:null,name:Li(w)}},u=new Set,A=(C,w,v)=>{if(u.has(C))return;u.add(C);let b=Array.from(C.references).sort().join("#");for(let E of C.dependencies){let R=Array.from(E.references).sort().join("#");if(E.identName===C.identName&&R===b)continue;let L=Array.from(E.references).sort(),_={name:E.identName,reference:L[0]},{name:V,scope:re}=n(E.name),ae=re?[re,V]:[V],he=J.join(w,Uwe),pe=J.join(he,...ae),De=`${v}/${_.name}`,ge=a(_,v,L.slice(1)),le=!1;if(ge.linkType==="SOFT"&&r.project){let g=r.project.workspacesByCwd.get(ge.target.slice(0,-1));le=!!(g&&!g.manifest.name)}let Pe=ge.linkType==="SOFT"&&pe.startsWith(ge.target);if(!E.name.endsWith(mm)&&!le&&!Pe){let g=o.get(pe);if(g){if(g.dirList)throw new Error(`Assertion failed: ${pe} cannot merge dir node with leaf node`);{let de=Y.parseLocator(g.locator),ne=Y.parseLocator(ge.locator);if(g.linkType!==ge.linkType)throw new Error(`Assertion failed: ${pe} cannot merge nodes with different link types ${g.nodePath}/${Y.stringifyLocator(de)} and ${v}/${Y.stringifyLocator(ne)}`);if(de.identHash!==ne.identHash)throw new Error(`Assertion failed: ${pe} cannot merge nodes with different idents ${g.nodePath}/${Y.stringifyLocator(de)} and ${v}/s${Y.stringifyLocator(ne)}`);ge.aliases=[...ge.aliases,...g.aliases,Y.parseLocator(g.locator).reference]}}o.set(pe,ge);let ve=pe.split("/"),Ee=ve.indexOf(Uwe);for(let de=ve.length-1;Ee>=0&&de>Ee;de--){let ne=ue.toPortablePath(ve.slice(0,de).join(J.sep)),Z=Li(ve[de]),me=o.get(ne);if(!me)o.set(ne,{dirList:new Set([Z])});else if(me.dirList){if(me.dirList.has(Z))break;me.dirList.add(Z)}}}A(E,ge.linkType==="SOFT"?ge.target:pe,De)}},p=a({name:e.name,reference:Array.from(e.references)[0]},"",[]),h=p.target;return o.set(h,p),A(e,h,""),o};Ke();Ke();St();St();Hc();Hl();var aj={};Yt(aj,{PnpInstaller:()=>Cm,PnpLinker:()=>vh,UnplugCommand:()=>Sh,default:()=>gwt,getPnpPath:()=>Dh,jsInstallUtils:()=>CA,pnpUtils:()=>zB,quotePathIfNeeded:()=>x1e});St();var S1e=tt(si()),P1e=Ie("url");Ke();Ke();St();St();var qwe={["DEFAULT"]:{collapsed:!1,next:{["*"]:"DEFAULT"}},["TOP_LEVEL"]:{collapsed:!1,next:{fallbackExclusionList:"FALLBACK_EXCLUSION_LIST",packageRegistryData:"PACKAGE_REGISTRY_DATA",["*"]:"DEFAULT"}},["FALLBACK_EXCLUSION_LIST"]:{collapsed:!1,next:{["*"]:"FALLBACK_EXCLUSION_ENTRIES"}},["FALLBACK_EXCLUSION_ENTRIES"]:{collapsed:!0,next:{["*"]:"FALLBACK_EXCLUSION_DATA"}},["FALLBACK_EXCLUSION_DATA"]:{collapsed:!0,next:{["*"]:"DEFAULT"}},["PACKAGE_REGISTRY_DATA"]:{collapsed:!1,next:{["*"]:"PACKAGE_REGISTRY_ENTRIES"}},["PACKAGE_REGISTRY_ENTRIES"]:{collapsed:!0,next:{["*"]:"PACKAGE_STORE_DATA"}},["PACKAGE_STORE_DATA"]:{collapsed:!1,next:{["*"]:"PACKAGE_STORE_ENTRIES"}},["PACKAGE_STORE_ENTRIES"]:{collapsed:!0,next:{["*"]:"PACKAGE_INFORMATION_DATA"}},["PACKAGE_INFORMATION_DATA"]:{collapsed:!1,next:{packageDependencies:"PACKAGE_DEPENDENCIES",["*"]:"DEFAULT"}},["PACKAGE_DEPENDENCIES"]:{collapsed:!1,next:{["*"]:"PACKAGE_DEPENDENCY"}},["PACKAGE_DEPENDENCY"]:{collapsed:!0,next:{["*"]:"DEFAULT"}}};function UIt(t,e,r){let o="";o+="[";for(let a=0,n=t.length;a<n;++a)o+=hk(String(a),t[a],e,r).replace(/^ +/g,""),a+1<n&&(o+=", ");return o+="]",o}function _It(t,e,r){let o=`${r} `,a="";a+=r,a+=`[
572`;for(let n=0,u=t.length;n<u;++n)a+=o+hk(String(n),t[n],e,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
573`;return a+=r,a+="]",a}function HIt(t,e,r){let o=Object.keys(t),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=t[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=hk(p,h,e,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function qIt(t,e,r){let o=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{
574`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],C=t[h];typeof C>"u"||(u!==0&&(n+=",",n+=`
575`),n+=a,n+=JSON.stringify(h),n+=": ",n+=hk(h,C,e,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
576`),n+=r,n+="}",n}function hk(t,e,r,o){let{next:a}=qwe[r],n=a[t]||a["*"];return jwe(e,n,o)}function jwe(t,e,r){let{collapsed:o}=qwe[e];return Array.isArray(t)?o?UIt(t,e,r):_It(t,e,r):typeof t=="object"&&t!==null?o?HIt(t,e,r):qIt(t,e,r):JSON.stringify(t)}function Gwe(t){return jwe(t,"TOP_LEVEL","")}function UB(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function jIt(t){let e=new Map,r=UB(t.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=e.get(o);typeof n>"u"&&e.set(o,n=new Set),n.add(a)}return Array.from(e).map(([o,a])=>[o,Array.from(a)])}function GIt(t){return UB(t.fallbackPool||[],([e])=>e)}function WIt(t){let e=[];for(let[r,o]of UB(t.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];e.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:C}]of UB(o,([w])=>w===null?"0":`1${w}`)){let w=[];r!==null&&n!==null&&!A.has(r)&&w.push([r,n]);for(let[E,R]of UB(A.entries(),([L])=>L))w.push([E,R]);let v=p&&p.size>0?Array.from(p):void 0,b=C||void 0;a.push([n,{packageLocation:u,packageDependencies:w,packagePeers:v,linkType:h,discardFromLookup:b}])}}return e}function _B(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:jIt(t),fallbackPool:GIt(t),packageRegistryData:WIt(t)}}var Kwe=tt(Ywe());function Vwe(t,e){return[t?`${t}
577`:"",`/* eslint-disable */
578`,`"use strict";
579`,`
580`,e,`
581`,(0,Kwe.default)()].join("")}function YIt(t){return JSON.stringify(t,null,2)}function KIt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
582`)}'`}function VIt(t){return[`const RAW_RUNTIME_STATE =
583`,`${KIt(Gwe(t))};
584
585`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
586`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
587`,`}
588`].join("")}function JIt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
589`,` return hydrateRuntimeState(require(${JSON.stringify(`./${Lr.pnpData}`)}), {basePath: basePath || __dirname});
590`,`}
591`].join("")}function Jwe(t){let e=_B(t),r=VIt(e);return Vwe(t.shebang,r)}function zwe(t){let e=_B(t),r=JIt(),o=Vwe(t.shebang,r);return{dataFile:YIt(e),loaderFile:o}}St();function Gq(t,{basePath:e}){let r=ue.toPortablePath(e),o=J.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,u=new Map(t.packageRegistryData.map(([w,v])=>[w,new Map(v.map(([b,E])=>{if(w===null!=(b===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let R=E.discardFromLookup??!1,L={name:w,reference:b},_=n.get(E.packageLocation);_?(_.discardFromLookup=_.discardFromLookup&&R,R||(_.locator=L)):n.set(E.packageLocation,{locator:L,discardFromLookup:R});let V=null;return[b,{packageDependencies:new Map(E.packageDependencies),packagePeers:new Set(E.packagePeers),linkType:E.linkType,discardFromLookup:R,get packageLocation(){return V||(V=J.join(o,E.packageLocation))}}]}))])),A=new Map(t.fallbackExclusionList.map(([w,v])=>[w,new Set(v)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,C=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:C,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}St();St();var VB=Ie("module"),Em=Ie("url"),ej=Ie("util");var No=Ie("url");var e1e=tt(Ie("assert"));var Wq=Array.isArray,HB=JSON.stringify,qB=Object.getOwnPropertyNames,ym=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Yq=(t,e)=>RegExp.prototype.exec.call(t,e),Kq=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),wh=(t,...e)=>String.prototype.endsWith.apply(t,e),Vq=(t,...e)=>String.prototype.includes.apply(t,e),Jq=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),jB=(t,...e)=>String.prototype.indexOf.apply(t,e),Xwe=(t,...e)=>String.prototype.replace.apply(t,e),Bh=(t,...e)=>String.prototype.slice.apply(t,e),yA=(t,...e)=>String.prototype.startsWith.apply(t,e),Zwe=Map,$we=JSON.parse;function GB(t,e,r){return class extends r{constructor(...o){super(e(...o)),this.code=t,this.name=`${r.name} [${t}]`}}}var t1e=GB("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),zq=GB("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),r1e=GB("ERR_INVALID_PACKAGE_TARGET",(t,e,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!yA(r,"./");return e==="."?((0,e1e.default)(o===!1),`Invalid "exports" main target ${HB(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${HB(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),WB=GB("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),n1e=GB("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var dk=Ie("url");function i1e(t,e){let r=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o];ym(t,a)&&(r[a]=t[a])}return r}var gk=new Zwe;function zIt(t,e,r,o){let a=gk.get(t);if(a!==void 0)return a;let n=o(t);if(n===void 0){let b={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return gk.set(t,b),b}let u;try{u=$we(n)}catch(b){throw new WB(t,(r?`"${e}" from `:"")+(0,dk.fileURLToPath)(r||e),b.message)}let{imports:A,main:p,name:h,type:C}=i1e(u,["imports","main","name","type"]),w=ym(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),C!=="module"&&C!=="commonjs"&&(C="none");let v={pjsonPath:t,exists:!0,main:p,name:h,type:C,exports:w,imports:A};return gk.set(t,v),v}function s1e(t,e){let r=new URL("./package.json",t);for(;;){let n=r.pathname;if(wh(n,"node_modules/package.json"))break;let u=zIt((0,dk.fileURLToPath)(r),t,void 0,e);if(u.exists)return u;let A=r;if(r=new URL("../package.json",r),r.pathname===A.pathname)break}let o=(0,dk.fileURLToPath)(r),a={pjsonPath:o,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return gk.set(o,a),a}function XIt(t,e,r){throw new t1e(t,e&&(0,No.fileURLToPath)(new URL(".",e)),(0,No.fileURLToPath)(r))}function ZIt(t,e,r,o){let a=`request is not a valid subpath for the "${r?"imports":"exports"}" resolution of ${(0,No.fileURLToPath)(e)}`;throw new zq(t,a,o&&(0,No.fileURLToPath)(o))}function YB(t,e,r,o,a){throw typeof e=="object"&&e!==null?e=HB(e,null,""):e=`${e}`,new r1e((0,No.fileURLToPath)(new URL(".",r)),t,e,o,a&&(0,No.fileURLToPath)(a))}var o1e=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,a1e=/\*/g;function $It(t,e,r,o,a,n,u,A){if(e!==""&&!n&&t[t.length-1]!=="/"&&YB(r,t,o,u,a),!yA(t,"./")){if(u&&!yA(t,"../")&&!yA(t,"/")){let w=!1;try{new URL(t),w=!0}catch{}if(!w)return n?Kq(a1e,t,()=>e):t+e}YB(r,t,o,u,a)}Yq(o1e,Bh(t,2))!==null&&YB(r,t,o,u,a);let p=new URL(t,o),h=p.pathname,C=new URL(".",o).pathname;if(yA(h,C)||YB(r,t,o,u,a),e==="")return p;if(Yq(o1e,e)!==null){let w=n?Xwe(r,"*",()=>e):r+e;ZIt(w,o,u,a)}return n?new URL(Kq(a1e,p.href,()=>e)):new URL(e,p)}function ewt(t){let e=+t;return`${e}`!==t?!1:e>=0&&e<4294967295}function MC(t,e,r,o,a,n,u,A){if(typeof e=="string")return $It(e,r,o,t,a,n,u,A);if(Wq(e)){if(e.length===0)return null;let p;for(let h=0;h<e.length;h++){let C=e[h],w;try{w=MC(t,C,r,o,a,n,u,A)}catch(v){if(p=v,v.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw v}if(w!==void 0){if(w===null){p=null;continue}return w}}if(p==null)return p;throw p}else if(typeof e=="object"&&e!==null){let p=qB(e);for(let h=0;h<p.length;h++){let C=p[h];if(ewt(C))throw new WB((0,No.fileURLToPath)(t),a,'"exports" cannot contain numeric property keys.')}for(let h=0;h<p.length;h++){let C=p[h];if(C==="default"||A.has(C)){let w=e[C],v=MC(t,w,r,o,a,n,u,A);if(v===void 0)continue;return v}}return}else if(e===null)return null;YB(o,e,t,u,a)}function c1e(t,e){let r=jB(t,"*"),o=jB(e,"*"),a=r===-1?t.length:r+1,n=o===-1?e.length:o+1;return a>n?-1:n>a||r===-1?1:o===-1||t.length>e.length?-1:e.length>t.length?1:0}function twt(t,e,r){if(typeof t=="string"||Wq(t))return!0;if(typeof t!="object"||t===null)return!1;let o=qB(t),a=!1,n=0;for(let u=0;u<o.length;u++){let A=o[u],p=A===""||A[0]!==".";if(n++===0)a=p;else if(a!==p)throw new WB((0,No.fileURLToPath)(e),r,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return a}function Xq(t,e,r){throw new n1e((0,No.fileURLToPath)(new URL(".",e)),t,r&&(0,No.fileURLToPath)(r))}var l1e=new Set;function rwt(t,e,r){let o=(0,No.fileURLToPath)(e);l1e.has(o+"|"+t)||(l1e.add(o+"|"+t),process.emitWarning(`Use of deprecated trailing slash pattern mapping "${t}" in the "exports" field module resolution of the package at ${o}${r?` imported from ${(0,No.fileURLToPath)(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function u1e({packageJSONUrl:t,packageSubpath:e,exports:r,base:o,conditions:a}){if(twt(r,t,o)&&(r={".":r}),ym(r,e)&&!Vq(e,"*")&&!wh(e,"/")){let p=r[e],h=MC(t,p,"",e,o,!1,!1,a);return h==null&&Xq(e,t,o),h}let n="",u,A=qB(r);for(let p=0;p<A.length;p++){let h=A[p],C=jB(h,"*");if(C!==-1&&yA(e,Bh(h,0,C))){wh(e,"/")&&rwt(e,t,o);let w=Bh(h,C+1);e.length>=h.length&&wh(e,w)&&c1e(n,h)===1&&Jq(h,"*")===C&&(n=h,u=Bh(e,C,e.length-w.length))}}if(n){let p=r[n],h=MC(t,p,u,n,o,!0,!1,a);return h==null&&Xq(e,t,o),h}Xq(e,t,o)}function A1e({name:t,base:e,conditions:r,readFileSyncFn:o}){if(t==="#"||yA(t,"#/")||wh(t,"/")){let u="is not a valid internal imports specifier name";throw new zq(t,u,(0,No.fileURLToPath)(e))}let a,n=s1e(e,o);if(n.exists){a=(0,No.pathToFileURL)(n.pjsonPath);let u=n.imports;if(u)if(ym(u,t)&&!Vq(t,"*")){let A=MC(a,u[t],"",t,e,!1,!0,r);if(A!=null)return A}else{let A="",p,h=qB(u);for(let C=0;C<h.length;C++){let w=h[C],v=jB(w,"*");if(v!==-1&&yA(t,Bh(w,0,v))){let b=Bh(w,v+1);t.length>=w.length&&wh(t,b)&&c1e(A,w)===1&&Jq(w,"*")===v&&(A=w,p=Bh(t,v,t.length-b.length))}}if(A){let C=u[A],w=MC(a,C,p,A,e,!0,!0,r);if(w!=null)return w}}}XIt(t,a,e)}St();var nwt=new Set(["BUILTIN_NODE_RESOLUTION_FAILED","MISSING_DEPENDENCY","MISSING_PEER_DEPENDENCY","QUALIFIED_PATH_RESOLUTION_FAILED","UNDECLARED_DEPENDENCY"]);function Xi(t,e,r={},o){o??(o=nwt.has(t)?"MODULE_NOT_FOUND":t);let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:{...a,value:o},pnpCode:{...a,value:t},data:{...a,value:r}})}function fu(t){return ue.normalize(ue.fromPortablePath(t))}var g1e=tt(p1e());function d1e(t){return iwt(),$q[t]}var $q;function iwt(){$q||($q={"--conditions":[],...h1e(swt()),...h1e(process.execArgv)})}function h1e(t){return(0,g1e.default)({"--conditions":[String],"-C":"--conditions"},{argv:t,permissive:!0})}function swt(){let t=[],e=owt(process.env.NODE_OPTIONS||"",t);return t.length,e}function owt(t,e){let r=[],o=!1,a=!0;for(let n=0;n<t.length;++n){let u=t[n];if(u==="\\"&&o){if(n+1===t.length)return e.push(`invalid value for NODE_OPTIONS (invalid escape)
592`),r;u=t[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&e.push(`invalid value for NODE_OPTIONS (unterminated string)
593`),r}St();var y1e=Ie("module");var[Lo,EA]=process.versions.node.split(".").map(t=>parseInt(t,10)),FJt=Lo>16||Lo===16&&EA>=12,RJt=Lo>17||Lo===17&&EA>=5||Lo===16&&EA>=15,TJt=Lo>17||Lo===17&&EA>=1||Lo===16&&EA>14,m1e=Lo>19||Lo===19&&EA>=2||Lo===18&&EA>=13,NJt=Lo>19||Lo===19&&EA>=3,LJt=Lo>18||Lo===18&&EA>=1||Lo===16&&EA>=17;var awt=new Set(y1e.Module.builtinModules||Object.keys(process.binding("natives"))),mk=t=>t.startsWith("node:")||awt.has(t);function E1e(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>ue.fromPortablePath(pi.resolveVirtual(ue.toPortablePath(e)))),m1e)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function tj(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],C=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Me of["react-scripts","gatsby"]){let Te=t.packageRegistry.get(Me);if(Te)for(let Qe of Te.keys()){if(Qe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Me,reference:Qe})}}let{ignorePattern:w,packageRegistry:v,packageLocatorsByLocations:b}=t;function E(Me,Te){return{fn:Me,args:Te,error:null,result:null}}function R(Me){var At,Oe,x,I;let Te=((Oe=(At=process.stderr)==null?void 0:At.hasColors)==null?void 0:Oe.call(At))??process.stdout.isTTY,Qe=(P,y)=>`\x1B[${P}m${y}\x1B[0m`,_e=Me.error;console.error(_e?Qe("31;1",`\u2716 ${(x=Me.error)==null?void 0:x.message.replace(/\n.*/s,"")}`):Qe("33;1","\u203C Resolution")),Me.args.length>0&&console.error();for(let P of Me.args)console.error(` ${Qe("37;1","In \u2190")} ${(0,ej.inspect)(P,{colors:Te,compact:!0})}`);Me.result&&(console.error(),console.error(` ${Qe("37;1","Out \u2192")} ${(0,ej.inspect)(Me.result,{colors:Te,compact:!0})}`));let qe=((I=new Error().stack.match(/(?<=^ +)at.*/gm))==null?void 0:I.slice(2))??[];if(qe.length>0){console.error();for(let P of qe)console.error(` ${Qe("38;5;244",P)}`)}console.error()}function L(Me,Te){if(e.allowDebug===!1)return Te;if(Number.isFinite(o)){if(o>=2)return(...Qe)=>{let _e=E(Me,Qe);try{return _e.result=Te(...Qe)}catch(qe){throw _e.error=qe}finally{R(_e)}};if(o>=1)return(...Qe)=>{try{return Te(...Qe)}catch(_e){let qe=E(Me,Qe);throw qe.error=_e,R(qe),_e}}}return Te}function _(Me){let Te=g(Me);if(!Te)throw Xi("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Te}function V(Me){if(Me.name===null)return!0;for(let Te of t.dependencyTreeRoots)if(Te.name===Me.name&&Te.reference===Me.reference)return!0;return!1}let re=new Set(["node","require",...d1e("--conditions")]);function ae(Me,Te=re,Qe){let _e=de(J.join(Me,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(_e===null)throw Xi("INTERNAL",`The locator that owns the "${Me}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:qe}=_(_e),At=J.join(qe,Lr.manifest);if(!e.fakeFs.existsSync(At))return null;let Oe=JSON.parse(e.fakeFs.readFileSync(At,"utf8"));if(Oe.exports==null)return null;let x=J.contains(qe,Me);if(x===null)throw Xi("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!A.test(x)&&(x=`./${x}`);try{let I=u1e({packageJSONUrl:(0,Em.pathToFileURL)(ue.fromPortablePath(At)),packageSubpath:x,exports:Oe.exports,base:Qe?(0,Em.pathToFileURL)(ue.fromPortablePath(Qe)):null,conditions:Te});return ue.toPortablePath((0,Em.fileURLToPath)(I))}catch(I){throw Xi("EXPORTS_RESOLUTION_FAILED",I.message,{unqualifiedPath:fu(Me),locator:_e,pkgJson:Oe,subpath:fu(x),conditions:Te},I.code)}}function he(Me,Te,{extensions:Qe}){let _e;try{Te.push(Me),_e=e.fakeFs.statSync(Me)}catch{}if(_e&&!_e.isDirectory())return e.fakeFs.realpathSync(Me);if(_e&&_e.isDirectory()){let qe;try{qe=JSON.parse(e.fakeFs.readFileSync(J.join(Me,Lr.manifest),"utf8"))}catch{}let At;if(qe&&qe.main&&(At=J.resolve(Me,qe.main)),At&&At!==Me){let Oe=he(At,Te,{extensions:Qe});if(Oe!==null)return Oe}}for(let qe=0,At=Qe.length;qe<At;qe++){let Oe=`${Me}${Qe[qe]}`;if(Te.push(Oe),e.fakeFs.existsSync(Oe))return Oe}if(_e&&_e.isDirectory())for(let qe=0,At=Qe.length;qe<At;qe++){let Oe=J.format({dir:Me,name:"index",ext:Qe[qe]});if(Te.push(Oe),e.fakeFs.existsSync(Oe))return Oe}return null}function pe(Me){let Te=new VB.Module(Me,null);return Te.filename=Me,Te.paths=VB.Module._nodeModulePaths(Me),Te}function De(Me,Te){return Te.endsWith("/")&&(Te=J.join(Te,"internal.js")),VB.Module._resolveFilename(ue.fromPortablePath(Me),pe(ue.fromPortablePath(Te)),!1,{plugnplay:!1})}function ge(Me){if(w===null)return!1;let Te=J.contains(t.basePath,Me);return Te===null?!1:!!w.test(Te.replace(/\/$/,""))}let le={std:3,resolveVirtual:1,getAllLocators:1},Pe=p;function g({name:Me,reference:Te}){let Qe=v.get(Me);if(!Qe)return null;let _e=Qe.get(Te);return _e||null}function ve({name:Me,reference:Te}){let Qe=[];for(let[_e,qe]of v)if(_e!==null)for(let[At,Oe]of qe)At===null||Oe.packageDependencies.get(Me)!==Te||_e===Me&&At===Te||Qe.push({name:_e,reference:At});return Qe}function Ee(Me,Te){let Qe=new Map,_e=new Set,qe=Oe=>{let x=JSON.stringify(Oe.name);if(_e.has(x))return;_e.add(x);let I=ve(Oe);for(let P of I)if(_(P).packagePeers.has(Me))qe(P);else{let F=Qe.get(P.name);typeof F>"u"&&Qe.set(P.name,F=new Set),F.add(P.reference)}};qe(Te);let At=[];for(let Oe of[...Qe.keys()].sort())for(let x of[...Qe.get(Oe)].sort())At.push({name:Oe,reference:x});return At}function de(Me,{resolveIgnored:Te=!1,includeDiscardFromLookup:Qe=!1}={}){if(ge(Me)&&!Te)return null;let _e=J.relative(t.basePath,Me);_e.match(n)||(_e=`./${_e}`),_e.endsWith("/")||(_e=`${_e}/`);do{let qe=b.get(_e);if(typeof qe>"u"||qe.discardFromLookup&&!Qe){_e=_e.substring(0,_e.lastIndexOf("/",_e.length-2)+1);continue}return qe.locator}while(_e!=="");return null}function ne(Me){try{return e.fakeFs.readFileSync(ue.toPortablePath(Me),"utf8")}catch(Te){if(Te.code==="ENOENT")return;throw Te}}function Z(Me,Te,{considerBuiltins:Qe=!0}={}){if(Me.startsWith("#"))throw new Error("resolveToUnqualified can not handle private import mappings");if(Me==="pnpapi")return ue.toPortablePath(e.pnpapiResolution);if(Qe&&mk(Me))return null;let _e=fu(Me),qe=Te&&fu(Te);if(Te&&ge(Te)&&(!J.isAbsolute(Me)||de(Me)===null)){let x=De(Me,Te);if(x===!1)throw Xi("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp)
594
595Require request: "${_e}"
596Required by: ${qe}
597`,{request:_e,issuer:qe});return ue.toPortablePath(x)}let At,Oe=Me.match(a);if(Oe){if(!Te)throw Xi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:_e,issuer:qe});let[,x,I]=Oe,P=de(Te);if(!P){let Ne=De(Me,Te);if(Ne===!1)throw Xi("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
598
599Require path: "${_e}"
600Required by: ${qe}
601`,{request:_e,issuer:qe});return ue.toPortablePath(Ne)}let F=_(P).packageDependencies.get(x),z=null;if(F==null&&P.name!==null){let Ne=t.fallbackExclusionList.get(P.name);if(!Ne||!Ne.has(P.reference)){for(let ht=0,Ut=h.length;ht<Ut;++ht){let xt=_(h[ht]).packageDependencies.get(x);if(xt!=null){r?z=xt:F=xt;break}}if(t.enableTopLevelFallback&&F==null&&z===null){let ht=t.fallbackPool.get(x);ht!=null&&(z=ht)}}}let X=null;if(F===null)if(V(P))X=Xi("MISSING_PEER_DEPENDENCY",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
602
603Required package: ${x}${x!==_e?` (via "${_e}")`:""}
604Required by: ${qe}
605`,{request:_e,issuer:qe,dependencyName:x});else{let Ne=Ee(x,P);Ne.every(st=>V(st))?X=Xi("MISSING_PEER_DEPENDENCY",`${P.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
606
607Required package: ${x}${x!==_e?` (via "${_e}")`:""}
608Required by: ${P.name}@${P.reference} (via ${qe})
609${Ne.map(st=>`Ancestor breaking the chain: ${st.name}@${st.reference}
610`).join("")}
611`,{request:_e,issuer:qe,issuerLocator:Object.assign({},P),dependencyName:x,brokenAncestors:Ne}):X=Xi("MISSING_PEER_DEPENDENCY",`${P.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
612
613Required package: ${x}${x!==_e?` (via "${_e}")`:""}
614Required by: ${P.name}@${P.reference} (via ${qe})
615
616${Ne.map(st=>`Ancestor breaking the chain: ${st.name}@${st.reference}
617`).join("")}
618`,{request:_e,issuer:qe,issuerLocator:Object.assign({},P),dependencyName:x,brokenAncestors:Ne})}else F===void 0&&(!Qe&&mk(Me)?V(P)?X=Xi("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
619
620Required package: ${x}${x!==_e?` (via "${_e}")`:""}
621Required by: ${qe}
622`,{request:_e,issuer:qe,dependencyName:x}):X=Xi("UNDECLARED_DEPENDENCY",`${P.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${P.name}'s dependencies, this makes the require call ambiguous and unsound.
623
624Required package: ${x}${x!==_e?` (via "${_e}")`:""}
625Required by: ${qe}
626`,{request:_e,issuer:qe,issuerLocator:Object.assign({},P),dependencyName:x}):V(P)?X=Xi("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
627
628Required package: ${x}${x!==_e?` (via "${_e}")`:""}
629Required by: ${qe}
630`,{request:_e,issuer:qe,dependencyName:x}):X=Xi("UNDECLARED_DEPENDENCY",`${P.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
631
632Required package: ${x}${x!==_e?` (via "${_e}")`:""}
633Required by: ${P.name}@${P.reference} (via ${qe})
634`,{request:_e,issuer:qe,issuerLocator:Object.assign({},P),dependencyName:x}));if(F==null){if(z===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");F=z;let Ne=X.message.replace(/\n.*/g,"");X.message=Ne,!C.has(Ne)&&o!==0&&(C.add(Ne),process.emitWarning(X))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},ie=_($);if(!ie.packageLocation)throw Xi("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
635
636Required package: ${$.name}@${$.reference}${$.name!==_e?` (via "${_e}")`:""}
637Required by: ${P.name}@${P.reference} (via ${qe})
638`,{request:_e,issuer:qe,dependencyLocator:Object.assign({},$)});let ke=ie.packageLocation;I?At=J.join(ke,I):At=ke}else if(J.isAbsolute(Me))At=J.normalize(Me);else{if(!Te)throw Xi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:_e,issuer:qe});let x=J.resolve(Te);Te.match(u)?At=J.normalize(J.join(x,Me)):At=J.normalize(J.join(J.dirname(x),Me))}return J.normalize(At)}function me(Me,Te,Qe=re,_e){if(n.test(Me))return Te;let qe=ae(Te,Qe,_e);return qe?J.normalize(qe):Te}function be(Me,{extensions:Te=Object.keys(VB.Module._extensions)}={}){let Qe=[],_e=he(Me,Qe,{extensions:Te});if(_e)return J.normalize(_e);{E1e(Qe.map(Oe=>ue.fromPortablePath(Oe)));let qe=fu(Me),At=de(Me);if(At){let{packageLocation:Oe}=_(At),x=!0;try{e.fakeFs.accessSync(Oe)}catch(I){if((I==null?void 0:I.code)==="ENOENT")x=!1;else{let P=((I==null?void 0:I.message)??I??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${P}).
639
640Missing package: ${At.name}@${At.reference}
641Expected package location: ${fu(Oe)}
642`,{unqualifiedPath:qe,extensions:Te})}}if(!x){let I=Oe.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`${I}
643
644Missing package: ${At.name}@${At.reference}
645Expected package location: ${fu(Oe)}
646`,{unqualifiedPath:qe,extensions:Te})}}throw Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
647
648Source path: ${qe}
649${Qe.map(Oe=>`Not found: ${fu(Oe)}
650`).join("")}`,{unqualifiedPath:qe,extensions:Te})}}function ut(Me,Te,Qe){if(!Te)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let _e=A1e({name:Me,base:(0,Em.pathToFileURL)(ue.fromPortablePath(Te)),conditions:Qe.conditions??re,readFileSyncFn:ne});if(_e instanceof URL)return be(ue.toPortablePath((0,Em.fileURLToPath)(_e)),{extensions:Qe.extensions});if(_e.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return H(_e,Te,Qe)}function H(Me,Te,Qe={}){try{if(Me.startsWith("#"))return ut(Me,Te,Qe);let{considerBuiltins:_e,extensions:qe,conditions:At}=Qe,Oe=Z(Me,Te,{considerBuiltins:_e});if(Me==="pnpapi")return Oe;if(Oe===null)return null;let x=()=>Te!==null?ge(Te):!1,I=(!_e||!mk(Me))&&!x()?me(Me,Oe,At,Te):Oe;return be(I,{extensions:qe})}catch(_e){throw Object.prototype.hasOwnProperty.call(_e,"pnpCode")&&Object.assign(_e.data,{request:fu(Me),issuer:Te&&fu(Te)}),_e}}function yt(Me){let Te=J.normalize(Me),Qe=pi.resolveVirtual(Te);return Qe!==Te?Qe:null}return{VERSIONS:le,topLevel:Pe,getLocator:(Me,Te)=>Array.isArray(Te)?{name:Te[0],reference:Te[1]}:{name:Me,reference:Te},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Me=[];for(let[Te,Qe]of v)for(let _e of Qe.keys())Te!==null&&_e!==null&&Me.push({name:Te,reference:_e});return Me},getPackageInformation:Me=>{let Te=g(Me);if(Te===null)return null;let Qe=ue.fromPortablePath(Te.packageLocation);return{...Te,packageLocation:Qe}},findPackageLocator:Me=>de(ue.toPortablePath(Me)),resolveToUnqualified:L("resolveToUnqualified",(Me,Te,Qe)=>{let _e=Te!==null?ue.toPortablePath(Te):null,qe=Z(ue.toPortablePath(Me),_e,Qe);return qe===null?null:ue.fromPortablePath(qe)}),resolveUnqualified:L("resolveUnqualified",(Me,Te)=>ue.fromPortablePath(be(ue.toPortablePath(Me),Te))),resolveRequest:L("resolveRequest",(Me,Te,Qe)=>{let _e=Te!==null?ue.toPortablePath(Te):null,qe=H(ue.toPortablePath(Me),_e,Qe);return qe===null?null:ue.fromPortablePath(qe)}),resolveVirtual:L("resolveVirtual",Me=>{let Te=yt(ue.toPortablePath(Me));return Te!==null?ue.fromPortablePath(Te):null})}}St();var C1e=(t,e,r)=>{let o=_B(t),a=Gq(o,{basePath:e}),n=ue.join(e,Lr.pnpCjs);return tj(a,{fakeFs:r,pnpapiResolution:n})};var nj=tt(w1e());_t();var CA={};Yt(CA,{checkAndReportManifestCompatibility:()=>v1e,checkManifestCompatibility:()=>B1e,extractBuildScripts:()=>yk,getExtractHint:()=>ij,hasBindingGyp:()=>sj});Ke();St();function B1e(t){return Y.isPackageCompatible(t,As.getArchitectureSet())}function v1e(t,e,{configuration:r,report:o}){return B1e(t)?!0:(o==null||o.reportWarningOnce(76,`${Y.prettyLocator(r,t)} The ${As.getArchitectureName()} architecture is incompatible with this package, ${e} skipped.`),!1)}function yk(t,e,r,{configuration:o,report:a}){let n=[];for(let A of["preinstall","install","postinstall"])e.manifest.scripts.has(A)&&n.push([0,A]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&n.push([1,"node-gyp rebuild"]),n.length===0?[]:t.linkType!=="HARD"?(a==null||a.reportWarningOnce(6,`${Y.prettyLocator(o,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`),[]):r&&r.built===!1?(a==null||a.reportInfoOnce(5,`${Y.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!o.get("enableScripts")&&!r.built?(a==null||a.reportWarningOnce(4,`${Y.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`),[]):v1e(t,"build",{configuration:o,report:a})?n:[]}var cwt=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function ij(t){return t.packageFs.getExtractHint({relevantExtensions:cwt})}function sj(t){let e=J.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var zB={};Yt(zB,{getUnpluggedPath:()=>JB});Ke();St();function JB(t,{configuration:e}){return J.resolve(e.get("pnpUnpluggedFolder"),Y.slugifyLocator(t))}var uwt=new Set([Y.makeIdent(null,"open").identHash,Y.makeIdent(null,"opn").identHash]),vh=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let o=Dh(r.project).cjs;if(!oe.existsSync(o))throw new ot(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=We.getFactoryWithDefault(this.pnpCache,o,()=>We.dynamicRequire(o,{cachingStrategy:We.CachingStrategy.FsTime})),n={name:Y.stringifyIdent(e),reference:e.reference},u=a.getPackageInformation(n);if(!u)throw new ot(`Couldn't find ${Y.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return ue.toPortablePath(u.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=Dh(r.project).cjs;if(!oe.existsSync(o))return null;let n=We.getFactoryWithDefault(this.pnpCache,o,()=>We.dynamicRequire(o,{cachingStrategy:We.CachingStrategy.FsTime})).findPackageLocator(ue.fromPortablePath(e));return n?Y.makeLocator(Y.parseIdent(n.name),n.reference):null}makeInstaller(e){return new Cm(e)}isEnabled(e){return!(e.project.configuration.get("nodeLinker")!=="pnp"||e.project.configuration.get("pnpMode")!==this.mode)}},Cm=class{constructor(e){this.opts=e;this.mode="strict";this.asyncActions=new We.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}attachCustomData(e){this.customData=e}async installPackage(e,r,o){let a=Y.stringifyIdent(e),n=e.reference,u=!!this.opts.project.tryWorkspaceByLocator(e),A=Y.isVirtualLocator(e),p=e.peerDependencies.size>0&&!A,h=!p&&!u,C=!p&&e.linkType!=="SOFT",w,v;if(h||C){let re=A?Y.devirtualizeLocator(e):e;w=this.customData.store.get(re.locatorHash),typeof w>"u"&&(w=await Awt(r),e.linkType==="HARD"&&this.customData.store.set(re.locatorHash,w)),w.manifest.type==="module"&&(this.isESMLoaderRequired=!0),v=this.opts.project.getDependencyMeta(re,e.version)}let b=h?yk(e,w,v,{configuration:this.opts.project.configuration,report:this.opts.report}):[],E=C?await this.unplugPackageIfNeeded(e,w,r,v,o):r.packageFs;if(J.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=J.resolve(E.getRealPath(),r.prefixPath),L=oj(this.opts.project.cwd,R),_=new Map,V=new Set;if(A){for(let re of e.peerDependencies.values())_.set(Y.stringifyIdent(re),null),V.add(Y.stringifyIdent(re));if(!u){let re=Y.devirtualizeLocator(e);this.virtualTemplates.set(re.locatorHash,{location:oj(this.opts.project.cwd,pi.resolveVirtual(R)),locator:re})}}return We.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:L,packageDependencies:_,packagePeers:V,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildDirective:b.length>0?b:null}}async attachInternalDependencies(e,r){let o=this.getPackageInformation(e);for(let[a,n]of r){let u=Y.areIdentsEqual(a,n)?n.reference:[Y.stringifyIdent(n),n.reference];o.packageDependencies.set(Y.stringifyIdent(a),u)}}async attachExternalDependents(e,r){for(let o of r)this.getDiskInformation(o).packageDependencies.set(Y.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;let e=Dh(this.opts.project);if(this.isEsmEnabled()||await oe.removePromise(e.esmLoader),this.opts.project.configuration.get("nodeLinker")!=="pnp"){await oe.removePromise(e.cjs),await oe.removePromise(e.data),await oe.removePromise(e.esmLoader),await oe.removePromise(this.opts.project.configuration.get("pnpUnpluggedFolder"));return}for(let{locator:C,location:w}of this.virtualTemplates.values())We.getMapWithDefault(this.packageRegistry,Y.stringifyIdent(C)).set(C.reference,{packageLocation:w,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));let r=this.opts.project.configuration.get("pnpFallbackMode"),o=this.opts.project.workspaces.map(({anchoredLocator:C})=>({name:Y.stringifyIdent(C),reference:C.reference})),a=r!=="none",n=[],u=new Map,A=We.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),p=this.packageRegistry,h=this.opts.project.configuration.get("pnpShebang");if(r==="dependencies-only")for(let C of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(C)&&n.push({name:Y.stringifyIdent(C),reference:C.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:o,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:u,ignorePattern:A,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has("pnpEnableEsmLoader"))return this.opts.project.configuration.get("pnpEnableEsmLoader");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type==="module")return!0;return!1}async finalizeInstallWithPnp(e){let r=Dh(this.opts.project),o=await this.locateNodeModules(e.ignorePattern);if(o.length>0){this.opts.report.reportWarning(31,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(let n of o)await oe.removePromise(n)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get("pnpEnableInlining")){let n=Jwe(e);await oe.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await oe.removePromise(r.data)}else{let{dataFile:n,loaderFile:u}=zwe(e);await oe.changeFilePromise(r.cjs,u,{automaticNewlines:!0,mode:493}),await oe.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,"ESM support for PnP uses the experimental loader API and is therefore experimental"),await oe.changeFilePromise(r.esmLoader,(0,nj.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get("pnpUnpluggedFolder");if(this.unpluggedPaths.size===0)await oe.removePromise(a);else for(let n of await oe.readdirPromise(a)){let u=J.resolve(a,n);this.unpluggedPaths.has(u)||await oe.removePromise(u)}}async locateNodeModules(e){let r=[],o=e?new RegExp(e):null;for(let a of this.opts.project.workspaces){let n=J.join(a.cwd,"node_modules");if(o&&o.test(J.relative(this.opts.project.cwd,a.cwd))||!oe.existsSync(n))continue;let u=await oe.readdirPromise(n,{withFileTypes:!0}),A=u.filter(p=>!p.isDirectory()||p.name===".bin"||!p.name.startsWith("."));if(A.length===u.length)r.push(n);else for(let p of A)r.push(J.join(n,p.name))}return r}async unplugPackageIfNeeded(e,r,o,a,n){return this.shouldBeUnplugged(e,r,a)?this.unplugPackage(e,o,n):o.packageFs}shouldBeUnplugged(e,r,o){return typeof o.unplugged<"u"?o.unplugged:uwt.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(yk(e,r,o,{configuration:this.opts.project.configuration}).length>0||r.misc.extractHint)}async unplugPackage(e,r,o){let a=JB(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new ju(a,{baseFs:r.packageFs,pathUtils:J}):(this.unpluggedPaths.add(a),o.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let n=J.join(a,r.prefixPath,".ready");await oe.existsPromise(n)||(this.opts.project.storedBuildState.delete(e.locatorHash),await oe.mkdirPromise(a,{recursive:!0}),await oe.copyPromise(a,wt.dot,{baseFs:r.packageFs,overwrite:!1}),await oe.writeFilePromise(n,""))})),new An(a))}getPackageInformation(e){let r=Y.stringifyIdent(e),o=e.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${Y.prettyIdent(this.opts.project.configuration,e)})`);let n=a.get(o);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${Y.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){let r=We.getMapWithDefault(this.packageRegistry,"@@disk"),o=oj(this.opts.project.cwd,e);return We.getFactoryWithDefault(r,o,()=>({packageLocation:o,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1}))}};function oj(t,e){let r=J.relative(t,e);return r.match(/^\.{0,2}\//)||(r=`./${r}`),r.replace(/\/?$/,"/")}async function Awt(t){let e=await Nt.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Nt,r=new Set(["preinstall","install","postinstall"]);for(let o of e.scripts.keys())r.has(o)||e.scripts.delete(o);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:ij(t),hasBindingGyp:sj(t)}}}Ke();Ke();_t();var D1e=tt(zo());var Sh=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Unplug direct dependencies from the entire project"});this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Unplug both direct and transitive dependencies"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);if(r.get("nodeLinker")!=="pnp")throw new ot("This command can only be used if the `nodeLinker` option is set to `pnp`");await o.restoreInstallState();let u=new Set(this.patterns),A=this.patterns.map(b=>{let E=Y.parseDescriptor(b),R=E.range!=="unknown"?E:Y.makeDescriptor(E,"*");if(!Tr.validRange(R.range))throw new ot(`The range of the descriptor patterns must be a valid semver range (${Y.prettyDescriptor(r,R)})`);return L=>{let _=Y.stringifyIdent(L);return!D1e.default.isMatch(_,Y.stringifyIdent(R))||L.version&&!Tr.satisfiesWithPrereleases(L.version,R.range)?!1:(u.delete(b),!0)}}),p=()=>{let b=[];for(let E of o.storedPackages.values())!o.tryWorkspaceByLocator(E)&&!Y.isVirtualLocator(E)&&A.some(R=>R(E))&&b.push(E);return b},h=b=>{let E=new Set,R=[],L=(_,V)=>{if(!E.has(_.locatorHash)&&(E.add(_.locatorHash),!o.tryWorkspaceByLocator(_)&&A.some(re=>re(_))&&R.push(_),!(V>0&&!this.recursive)))for(let re of _.dependencies.values()){let ae=o.storedResolutions.get(re.descriptorHash);if(!ae)throw new Error("Assertion failed: The resolution should have been registered");let he=o.storedPackages.get(ae);if(!he)throw new Error("Assertion failed: The package should have been registered");L(he,V+1)}};for(let _ of b)L(_.anchoredPackage,0);return R},C,w;if(this.all&&this.recursive?(C=p(),w="the project"):this.all?(C=h(o.workspaces),w="any workspace"):(C=h([a]),w="this workspace"),u.size>1)throw new ot(`Patterns ${ye.prettyList(r,u,ye.Type.CODE)} don't match any packages referenced by ${w}`);if(u.size>0)throw new ot(`Pattern ${ye.prettyList(r,u,ye.Type.CODE)} doesn't match any packages referenced by ${w}`);return C=We.sortMap(C,b=>Y.stringifyLocator(b)),(await Ct.start({configuration:r,stdout:this.context.stdout,json:this.json},async b=>{for(let E of C){let R=E.version??"unknown",L=o.topLevelWorkspace.manifest.ensureDependencyMeta(Y.makeDescriptor(E,R));L.unplugged=!0,b.reportInfo(0,`Will unpack ${Y.prettyLocator(r,E)} to ${ye.pretty(r,JB(E,{configuration:r}),ye.Type.PATH)}`),b.reportJson({locator:Y.stringifyLocator(E),version:R})}await o.topLevelWorkspace.persistManifest(),b.reportSeparator(),await o.install({cache:n,report:b})})).exitCode()}};Sh.paths=[["unplug"]],Sh.usage=it.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]});var Dh=t=>({cjs:J.join(t.cwd,Lr.pnpCjs),data:J.join(t.cwd,Lr.pnpData),esmLoader:J.join(t.cwd,Lr.pnpEsmLoader)}),x1e=t=>/\s/.test(t)?JSON.stringify(t):t;async function fwt(t,e,r){let o=Dh(t),a=`--require ${x1e(ue.fromPortablePath(o.cjs))}`;if(oe.existsSync(o.esmLoader)&&(a=`${a} --experimental-loader ${(0,P1e.pathToFileURL)(ue.fromPortablePath(o.esmLoader)).href}`),o.cjs.includes(" ")&&S1e.default.lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(oe.existsSync(o.cjs)){let n=e.NODE_OPTIONS||"",u=/\s*--require\s+\S*\.pnp\.c?js\s*/g,A=/\s*--experimental-loader\s+\S*\.pnp\.loader\.mjs\s*/;n=n.replace(u," ").replace(A," ").trim(),n=n?`${a} ${n}`:a,e.NODE_OPTIONS=n}}async function pwt(t,e){let r=Dh(t);e(r.cjs),e(r.data),e(r.esmLoader),e(t.configuration.get("pnpUnpluggedFolder"))}var hwt={hooks:{populateYarnPaths:pwt,setupScriptEnvironment:fwt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:"STRING",default:"pnp"},winLinkType:{description:"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.",type:"STRING",values:["junctions","symlinks"],default:"junctions"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:"STRING",default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:"STRING",default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:"STRING",default:[],isArray:!0},pnpEnableEsmLoader:{description:"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.",type:"BOOLEAN",default:!1},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:"BOOLEAN",default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:"STRING",default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:"ABSOLUTE_PATH",default:"./.yarn/unplugged"}},linkers:[vh],commands:[Sh]},gwt=hwt;var L1e=tt(R1e());_t();var hj=tt(Ie("crypto")),O1e=tt(Ie("fs")),M1e=1,vi="node_modules",Ek=".bin",U1e=".yarn-state.yml",Fwt=1e3,gj=(o=>(o.CLASSIC="classic",o.HARDLINKS_LOCAL="hardlinks-local",o.HARDLINKS_GLOBAL="hardlinks-global",o))(gj||{}),XB=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:"NodeModulesLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the node-modules linker to be enabled");let o=r.project.tryWorkspaceByLocator(e);if(o)return o.cwd;let a=await We.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await pj(r.project,{unrollAliases:!0}));if(a===null)throw new ot("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");let n=a.locatorMap.get(Y.stringifyLocator(e));if(!n){let p=new ot(`Couldn't find ${Y.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw p.code="LOCATOR_NOT_INSTALLED",p}let u=n.locations.sort((p,h)=>p.split(J.sep).length-h.split(J.sep).length),A=J.join(r.project.configuration.startingCwd,vi);return u.find(p=>J.contains(A,p))||n.locations[0]}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=await We.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await pj(r.project,{unrollAliases:!0}));if(o===null)return null;let{locationRoot:a,segments:n}=Ck(J.resolve(e),{skipPrefix:r.project.cwd}),u=o.locationTree.get(a);if(!u)return null;let A=u.locator;for(let p of n){if(u=u.children.get(p),!u)break;A=u.locator||A}return Y.parseLocator(A)}makeInstaller(e){return new fj(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="node-modules"}},fj=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(e){this.customData=e}async installPackage(e,r){let o=J.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(e.locatorHash);if(typeof a>"u"&&(a=await Rwt(e,r),e.linkType==="HARD"&&this.customData.store.set(e.locatorHash,a)),!Y.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildDirective:null};let n=new Map,u=new Set;n.has(Y.stringifyIdent(e))||n.set(Y.stringifyIdent(e),e.reference);let A=e;if(Y.isVirtualLocator(e)){A=Y.devirtualizeLocator(e);for(let C of e.peerDependencies.values())n.set(Y.stringifyIdent(C),null),u.add(Y.stringifyIdent(C))}let p={packageLocation:`${ue.fromPortablePath(o)}/`,packageDependencies:n,packagePeers:u,linkType:e.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf("/")+1):null;return this.realLocatorChecksums.set(A.locatorHash,h),{packageLocation:o,buildDirective:null}}async attachInternalDependencies(e,r){let o=this.localStore.get(e.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected information object to have been registered");for(let[a,n]of r){let u=Y.areIdentsEqual(a,n)?n.reference:[Y.stringifyIdent(n),n.reference];o.pnpNode.packageDependencies.set(Y.stringifyIdent(a),u)}}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if(this.opts.project.configuration.get("nodeLinker")!=="node-modules")return;let e=new pi({baseFs:new _l({maxOpenFiles:80,readOnlyArchives:!0})}),r=await pj(this.opts.project),o=this.opts.project.configuration.get("nmMode");(r===null||o!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:o,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(v=>{var E;let b=this.opts.project.configuration.get("nmHoistingLimits");try{b=We.validateEnum(OB,((E=v.manifest.installConfig)==null?void 0:E.hoistingLimits)??b)}catch{let L=Y.prettyWorkspace(this.opts.project.configuration,v);this.opts.report.reportWarning(57,`${L}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(OB).join(", ")}, using default: "${b}"`)}return[v.relativeCwd,b]})),n=new Map(this.opts.project.workspaces.map(v=>{var E;let b=this.opts.project.configuration.get("nmSelfReferences");return b=((E=v.manifest.installConfig)==null?void 0:E.selfReferences)??b,[v.relativeCwd,b]})),u={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(v,b)=>Array.isArray(b)?{name:b[0],reference:b[1]}:{name:v,reference:b},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(v=>{let b=v.anchoredLocator;return{name:Y.stringifyIdent(v.locator),reference:b.reference}}),getPackageInformation:v=>{let b=v.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:Y.makeLocator(Y.parseIdent(v.name),v.reference),E=this.localStore.get(b.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: Expected the package reference to have been registered");return E.pnpNode},findPackageLocator:v=>{let b=this.opts.project.tryWorkspaceByCwd(ue.toPortablePath(v));if(b!==null){let E=b.anchoredLocator;return{name:Y.stringifyIdent(E),reference:E.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:v=>ue.fromPortablePath(pi.resolveVirtual(ue.toPortablePath(v)))},{tree:A,errors:p,preserveSymlinksRequired:h}=MB(u,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!A){for(let{messageName:v,text:b}of p)this.opts.report.reportError(v,b);return}let C=qq(A);await Uwt(r,C,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async v=>{let b=Y.parseLocator(v),E=this.localStore.get(b.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: Expected the slot to exist");return E.customPackageData.manifest}});let w=[];for(let[v,b]of C.entries()){if(j1e(v))continue;let E=Y.parseLocator(v),R=this.localStore.get(E.locatorHash);if(typeof R>"u")throw new Error("Assertion failed: Expected the slot to exist");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let L=CA.extractBuildScripts(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration,report:this.opts.report});L.length!==0&&w.push({buildLocations:b.locations,locatorHash:E.locatorHash,buildDirective:L})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${ye.pretty(this.opts.project.configuration,"--preserve-symlinks",ye.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:w}}};async function Rwt(t,e){let r=await Nt.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Nt,o=new Set(["preinstall","install","postinstall"]);for(let a of r.scripts.keys())o.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:CA.hasBindingGyp(e)}}}async function Twt(t,e,r,o,{installChangedByUser:a}){let n="";n+=`# Warning: This file is automatically generated. Removing it is fine, but will
651`,n+=`# cause your node_modules installation to become invalidated.
652`,n+=`
653`,n+=`__metadata:
654`,n+=` version: ${M1e}
655`,n+=` nmMode: ${o.value}
656`;let u=Array.from(e.keys()).sort(),A=Y.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let C of u){let w=e.get(C);n+=`
657`,n+=`${JSON.stringify(C)}:
658`,n+=` locations:
659`;for(let v of w.locations){let b=J.contains(t.cwd,v);if(b===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` - ${JSON.stringify(b)}
660`}if(w.aliases.length>0){n+=` aliases:
661`;for(let v of w.aliases)n+=` - ${JSON.stringify(v)}
662`}if(C===A&&r.size>0){n+=` bin:
663`;for(let[v,b]of r){let E=J.contains(t.cwd,v);if(E===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` ${JSON.stringify(E)}:
664`;for(let[R,L]of b){let _=J.relative(J.join(v,vi),L);n+=` ${JSON.stringify(R)}: ${JSON.stringify(_)}
665`}}}}let p=t.cwd,h=J.join(p,vi,U1e);a&&await oe.removePromise(h),await oe.changeFilePromise(h,n,{automaticNewlines:!0})}async function pj(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=J.join(r,vi,U1e),a;try{a=await oe.statPromise(o)}catch{}if(!a)return null;let n=Yi(await oe.readFilePromise(o,"utf8"));if(n.__metadata.version>M1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,C]of Object.entries(n)){let w=C.locations.map(b=>J.join(r,b)),v=C.bin;if(v)for(let[b,E]of Object.entries(v)){let R=J.join(r,ue.toPortablePath(b)),L=We.getMapWithDefault(p,R);for(let[_,V]of Object.entries(E))L.set(Li(_),ue.toPortablePath([R,vi,V].join(J.sep)))}if(A.set(h,{target:wt.dot,linkType:"HARD",locations:w,aliases:C.aliases||[]}),e&&C.aliases)for(let b of C.aliases){let{scope:E,name:R}=Y.parseLocator(h),L=Y.makeLocator(Y.makeIdent(E,R),b),_=Y.stringifyLocator(L);A.set(_,{target:wt.dot,linkType:"HARD",locations:w,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:_1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var _C=async(t,e)=>{if(t.split(J.sep).indexOf(vi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let o=e.allowSymlink?await oe.statPromise(t):await oe.lstatPromise(t);if(e.allowSymlink&&!o.isDirectory()||!e.allowSymlink&&o.isSymbolicLink()){await oe.unlinkPromise(t);return}}let r=await oe.readdirPromise(t,{withFileTypes:!0});for(let o of r){let a=J.join(t,Li(o.name));o.isDirectory()?(o.name!==vi||e&&e.innerLoop)&&await _C(a,{innerLoop:!0,contentsOnly:!1}):await oe.unlinkPromise(a)}e.contentsOnly||await oe.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},T1e=4,Ck=(t,{skipPrefix:e})=>{let r=J.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let o=r.split(J.sep).filter(p=>p!==""),a=o.indexOf(vi),n=o.slice(0,a).join(J.sep),u=J.join(e,n),A=o.slice(a);return{locationRoot:u,segments:A}},_1e=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&J.contains(e,n.target)!==null){let A=We.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=Ck(u,{skipPrefix:e}),h=We.getFactoryWithDefault(r,A,o);for(let C=0;C<p.length;++C){let w=p[C];if(w!=="."){let v=We.getFactoryWithDefault(h.children,w,o);h.children.set(w,v),h=v}C===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},dj=async(t,e,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await oe.lstatPromise(t)}catch{}if(!o||o.isDirectory()){await oe.symlinkPromise(t,e,"junction");return}}await oe.symlinkPromise(J.relative(J.dirname(e),t),e)};async function H1e(t,e,r){let o=J.join(t,Li(`${hj.default.randomBytes(16).toString("hex")}.tmp`));try{await oe.writeFilePromise(o,r);try{await oe.linkPromise(o,e)}catch{}}finally{await oe.unlinkPromise(o)}}async function Nwt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind===q1e.FILE){if(n.value==="hardlinks-global"&&o&&r.digest){let A=J.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await oe.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-Fwt))if(await bn.checksumFile(A,{baseFs:oe,algorithm:"sha1"})!==r.digest){let w=J.join(o,Li(`${hj.default.randomBytes(16).toString("hex")}.tmp`));await oe.renamePromise(A,w);let v=await a.readFilePromise(t);await oe.writeFilePromise(w,v);try{await oe.linkPromise(w,A),r.mtimeMs=new Date().getTime(),await oe.unlinkPromise(w)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await oe.linkPromise(A,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await H1e(o,A,h),r.mtimeMs=new Date().getTime();try{await oe.linkPromise(A,e)}catch(C){C&&C.code&&C.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let u=r.mode&511;u!==420&&await oe.chmodPromise(e,u)}}var q1e=(o=>(o.FILE="file",o.DIRECTORY="directory",o.SYMLINK="symlink",o))(q1e||{}),Lwt=async(t,e,{baseFs:r,globalHardlinksStore:o,nmMode:a,windowsLinkType:n,packageChecksum:u})=>{await oe.mkdirPromise(t,{recursive:!0});let A=async(C=wt.dot)=>{let w=J.join(e,C),v=await r.readdirPromise(w,{withFileTypes:!0}),b=new Map;for(let E of v){let R=J.join(C,E.name),L,_=J.join(w,E.name);if(E.isFile()){if(L={kind:"file",mode:(await r.lstatPromise(_)).mode},a.value==="hardlinks-global"){let V=await bn.checksumFile(_,{baseFs:r,algorithm:"sha1"});L.digest=V}}else if(E.isDirectory())L={kind:"directory"};else if(E.isSymbolicLink())L={kind:"symlink",symlinkTo:await r.readlinkPromise(_)};else throw new Error(`Unsupported file type (file: ${_}, mode: 0o${await r.statSync(_).mode.toString(8).padStart(6,"0")})`);if(b.set(R,L),E.isDirectory()&&R!==vi){let V=await A(R);for(let[re,ae]of V)b.set(re,ae)}}return b},p;if(a.value==="hardlinks-global"&&o&&u){let C=J.join(o,u.substring(0,2),`${u.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await oe.readFilePromise(C,"utf8"))))}catch{p=await A()}}else p=await A();let h=!1;for(let[C,w]of p){let v=J.join(e,C),b=J.join(t,C);if(w.kind==="directory")await oe.mkdirPromise(b,{recursive:!0});else if(w.kind==="file"){let E=w.mtimeMs;await Nwt({srcPath:v,dstPath:b,entry:w,nmMode:a,baseFs:r,globalHardlinksStore:o}),w.mtimeMs!==E&&(h=!0)}else w.kind==="symlink"&&await dj(J.resolve(J.dirname(b),w.symlinkTo),b,n)}if(a.value==="hardlinks-global"&&o&&h&&u){let C=J.join(o,u.substring(0,2),`${u.substring(2)}.json`);await oe.removePromise(C),await H1e(o,C,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function Owt(t,e,r,o){let a=new Map,n=new Map,u=new Map,A=!1,p=(h,C,w,v,b)=>{let E=!0,R=J.join(h,C),L=new Set;if(C===vi||C.startsWith("@")){let V;try{V=oe.statSync(R)}catch{}E=!!V,V?V.mtimeMs>r?(A=!0,L=new Set(oe.readdirSync(R))):L=new Set(w.children.get(C).children.keys()):A=!0;let re=e.get(h);if(re){let ae=J.join(h,vi,Ek),he;try{he=oe.statSync(ae)}catch{}if(!he)A=!0;else if(he.mtimeMs>r){A=!0;let pe=new Set(oe.readdirSync(ae)),De=new Map;n.set(h,De);for(let[ge,le]of re)pe.has(ge)&&De.set(ge,le)}else n.set(h,re)}}else E=b.has(C);let _=w.children.get(C);if(E){let{linkType:V,locator:re}=_,ae={children:new Map,linkType:V,locator:re};if(v.children.set(C,ae),re){let he=We.getSetWithDefault(u,re);he.add(R),u.set(re,he)}for(let he of _.children.keys())p(R,he,_,ae,L)}else _.locator&&o.storedBuildState.delete(Y.parseLocator(_.locator).locatorHash)};for(let[h,C]of t){let{linkType:w,locator:v}=C,b={children:new Map,linkType:w,locator:v};if(a.set(h,b),v){let E=We.getSetWithDefault(u,C.locator);E.add(h),u.set(C.locator,E)}C.children.has(vi)&&p(h,vi,C,b,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:u,installChangedByUser:A}}function j1e(t){let e=Y.parseDescriptor(t);return Y.isVirtualDescriptor(e)&&(e=Y.devirtualizeDescriptor(e)),e.range.startsWith("link:")}async function Mwt(t,e,r,{loadManifest:o}){let a=new Map;for(let[A,{locations:p}]of t){let h=j1e(A)?null:await o(A,p[0]),C=new Map;if(h)for(let[w,v]of h.bin){let b=J.join(p[0],v);v!==""&&oe.existsSync(b)&&C.set(w,v)}a.set(A,C)}let n=new Map,u=(A,p,h)=>{let C=new Map,w=J.contains(r,A);if(h.locator&&w!==null){let v=a.get(h.locator);for(let[b,E]of v){let R=J.join(A,ue.toPortablePath(E));C.set(Li(b),R)}for(let[b,E]of h.children){let R=J.join(A,b),L=u(R,R,E);L.size>0&&n.set(A,new Map([...n.get(A)||new Map,...L]))}}else for(let[v,b]of h.children){let E=u(J.join(A,v),p,b);for(let[R,L]of E)C.set(R,L)}return C};for(let[A,p]of e){let h=u(A,A,p);h.size>0&&n.set(A,new Map([...n.get(A)||new Map,...h]))}return n}var N1e=(t,e)=>{if(!t||!e)return t===e;let r=Y.parseLocator(t);Y.isVirtualLocator(r)&&(r=Y.devirtualizeLocator(r));let o=Y.parseLocator(e);return Y.isVirtualLocator(o)&&(o=Y.devirtualizeLocator(o)),Y.areLocatorsEqual(r,o)};function mj(t){return J.join(t.get("globalFolder"),"store")}async function Uwt(t,e,{baseFs:r,project:o,report:a,loadManifest:n,realLocatorChecksums:u}){let A=J.join(o.cwd,vi),{locationTree:p,binSymlinks:h,locatorLocations:C,installChangedByUser:w}=Owt(t.locationTree,t.binSymlinks,t.mtimeMs,o),v=_1e(e,{skipPrefix:o.cwd}),b=[],E=async({srcDir:le,dstDir:Pe,linkType:g,globalHardlinksStore:ve,nmMode:Ee,windowsLinkType:de,packageChecksum:ne})=>{let Z=(async()=>{try{g==="SOFT"?(await oe.mkdirPromise(J.dirname(Pe),{recursive:!0}),await dj(J.resolve(le),Pe,de)):await Lwt(Pe,le,{baseFs:r,globalHardlinksStore:ve,nmMode:Ee,windowsLinkType:de,packageChecksum:ne})}catch(me){throw me.message=`While persisting ${le} -> ${Pe} ${me.message}`,me}finally{ae.tick()}})().then(()=>b.splice(b.indexOf(Z),1));b.push(Z),b.length>T1e&&await Promise.race(b)},R=async(le,Pe,g)=>{let ve=(async()=>{let Ee=async(de,ne,Z)=>{try{Z.innerLoop||await oe.mkdirPromise(ne,{recursive:!0});let me=await oe.readdirPromise(de,{withFileTypes:!0});for(let be of me){if(!Z.innerLoop&&be.name===Ek)continue;let ut=J.join(de,be.name),H=J.join(ne,be.name);be.isDirectory()?(be.name!==vi||Z&&Z.innerLoop)&&(await oe.mkdirPromise(H,{recursive:!0}),await Ee(ut,H,{...Z,innerLoop:!0})):De.value==="hardlinks-local"||De.value==="hardlinks-global"?await oe.linkPromise(ut,H):await oe.copyFilePromise(ut,H,O1e.default.constants.COPYFILE_FICLONE)}}catch(me){throw Z.innerLoop||(me.message=`While cloning ${de} -> ${ne} ${me.message}`),me}finally{Z.innerLoop||ae.tick()}};await Ee(le,Pe,g)})().then(()=>b.splice(b.indexOf(ve),1));b.push(ve),b.length>T1e&&await Promise.race(b)},L=async(le,Pe,g)=>{if(g)for(let[ve,Ee]of Pe.children){let de=g.children.get(ve);await L(J.join(le,ve),Ee,de)}else{Pe.children.has(vi)&&await _C(J.join(le,vi),{contentsOnly:!1});let ve=J.basename(le)===vi&&v.has(J.join(J.dirname(le),J.sep));await _C(le,{contentsOnly:le===A,allowSymlink:ve})}};for(let[le,Pe]of p){let g=v.get(le);for(let[ve,Ee]of Pe.children){if(ve===".")continue;let de=g&&g.children.get(ve),ne=J.join(le,ve);await L(ne,Ee,de)}}let _=async(le,Pe,g)=>{if(g){N1e(Pe.locator,g.locator)||await _C(le,{contentsOnly:Pe.linkType==="HARD"});for(let[ve,Ee]of Pe.children){let de=g.children.get(ve);await _(J.join(le,ve),Ee,de)}}else{Pe.children.has(vi)&&await _C(J.join(le,vi),{contentsOnly:!0});let ve=J.basename(le)===vi&&v.has(J.join(J.dirname(le),J.sep));await _C(le,{contentsOnly:Pe.linkType==="HARD",allowSymlink:ve})}};for(let[le,Pe]of v){let g=p.get(le);for(let[ve,Ee]of Pe.children){if(ve===".")continue;let de=g&&g.children.get(ve);await _(J.join(le,ve),Ee,de)}}let V=new Map,re=[];for(let[le,Pe]of C)for(let g of Pe){let{locationRoot:ve,segments:Ee}=Ck(g,{skipPrefix:o.cwd}),de=v.get(ve),ne=ve;if(de){for(let Z of Ee)if(ne=J.join(ne,Z),de=de.children.get(Z),!de)break;if(de){let Z=N1e(de.locator,le),me=e.get(de.locator),be=me.target,ut=ne,H=me.linkType;if(Z)V.has(be)||V.set(be,ut);else if(be!==ut){let yt=Y.parseLocator(de.locator);Y.isVirtualLocator(yt)&&(yt=Y.devirtualizeLocator(yt)),re.push({srcDir:be,dstDir:ut,linkType:H,realLocatorHash:yt.locatorHash})}}}}for(let[le,{locations:Pe}]of e.entries())for(let g of Pe){let{locationRoot:ve,segments:Ee}=Ck(g,{skipPrefix:o.cwd}),de=p.get(ve),ne=v.get(ve),Z=ve,me=e.get(le),be=Y.parseLocator(le);Y.isVirtualLocator(be)&&(be=Y.devirtualizeLocator(be));let ut=be.locatorHash,H=me.target,yt=g;if(H===yt)continue;let Me=me.linkType;for(let Te of Ee)ne=ne.children.get(Te);if(!de)re.push({srcDir:H,dstDir:yt,linkType:Me,realLocatorHash:ut});else for(let Te of Ee)if(Z=J.join(Z,Te),de=de.children.get(Te),!de){re.push({srcDir:H,dstDir:yt,linkType:Me,realLocatorHash:ut});break}}let ae=Js.progressViaCounter(re.length),he=a.reportProgress(ae),pe=o.configuration.get("nmMode"),De={value:pe},ge=o.configuration.get("winLinkType");try{let le=De.value==="hardlinks-global"?`${mj(o.configuration)}/v1`:null;if(le&&!await oe.existsPromise(le)){await oe.mkdirpPromise(le);for(let g=0;g<256;g++)await oe.mkdirPromise(J.join(le,g.toString(16).padStart(2,"0")))}for(let g of re)(g.linkType==="SOFT"||!V.has(g.srcDir))&&(V.set(g.srcDir,g.dstDir),await E({...g,globalHardlinksStore:le,nmMode:De,windowsLinkType:ge,packageChecksum:u.get(g.realLocatorHash)||null}));await Promise.all(b),b.length=0;for(let g of re){let ve=V.get(g.srcDir);g.linkType!=="SOFT"&&g.dstDir!==ve&&await R(ve,g.dstDir,{nmMode:De})}await Promise.all(b),await oe.mkdirPromise(A,{recursive:!0});let Pe=await Mwt(e,v,o.cwd,{loadManifest:n});await _wt(h,Pe,o.cwd,ge),await Twt(o,e,Pe,De,{installChangedByUser:w}),pe=="hardlinks-global"&&De.value=="hardlinks-local"&&a.reportWarningOnce(74,"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices")}finally{he.stop()}}async function _wt(t,e,r,o){for(let a of t.keys()){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!e.has(a)){let n=J.join(a,vi,Ek);await oe.removePromise(n)}}for(let[a,n]of e){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let u=J.join(a,vi,Ek),A=t.get(a)||new Map;await oe.mkdirPromise(u,{recursive:!0});for(let p of A.keys())n.has(p)||(await oe.removePromise(J.join(u,p)),process.platform==="win32"&&await oe.removePromise(J.join(u,Li(`${p}.cmd`))));for(let[p,h]of n){let C=A.get(p),w=J.join(u,p);C!==h&&(process.platform==="win32"?await(0,L1e.default)(ue.fromPortablePath(h),ue.fromPortablePath(w),{createPwshFile:!1}):(await oe.removePromise(w),await dj(h,w,o),J.contains(r,await oe.realpathPromise(h))!==null&&await oe.chmodPromise(h,493)))}}}Ke();St();Hc();var ZB=class extends vh{constructor(){super(...arguments);this.mode="loose"}makeInstaller(r){return new yj(r)}},yj=class extends Cm{constructor(){super(...arguments);this.mode="loose"}async transformPnpSettings(r){let o=new pi({baseFs:new _l({maxOpenFiles:80,readOnlyArchives:!0})}),a=C1e(r,this.opts.project.cwd,o),{tree:n,errors:u}=MB(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:w,text:v}of u)this.opts.report.reportError(w,v);return}let A=new Map;r.fallbackPool=A;let p=(w,v)=>{let b=Y.parseLocator(v.locator),E=Y.stringifyIdent(b);E===w?A.set(w,b.reference):A.set(w,[E,b.reference])},h=J.join(this.opts.project.cwd,Lr.nodeModules),C=n.get(h);if(!(typeof C>"u")){if("target"in C)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(let w of C.dirList){let v=J.join(h,w),b=n.get(v);if(typeof b>"u")throw new Error("Assertion failed: Expected the child to have been registered");if("target"in b)p(w,b);else for(let E of b.dirList){let R=J.join(v,E),L=n.get(R);if(typeof L>"u")throw new Error("Assertion failed: Expected the subchild to have been registered");if("target"in L)p(`${w}/${E}`,L);else throw new Error("Assertion failed: Expected the leaf junction to be a package")}}}}};var Hwt={hooks:{cleanGlobalArtifacts:async t=>{let e=mj(t);await oe.removePromise(e)}},configuration:{nmHoistingLimits:{description:"Prevent packages to be hoisted past specific levels",type:"STRING",values:["workspaces","dependencies","none"],default:"none"},nmMode:{description:'If set to "hardlinks-local" Yarn will utilize hardlinks to reduce disk space consumption inside "node_modules" directories. With "hardlinks-global" Yarn will use global content addressable storage to reduce "node_modules" size across all the projects using this option.',type:"STRING",values:["classic","hardlinks-local","hardlinks-global"],default:"classic"},nmSelfReferences:{description:"If set to 'false' the workspace will not be allowed to require itself and corresponding self-referencing symlink will not be created",type:"BOOLEAN",default:!0}},linkers:[XB,ZB]},qwt=Hwt;var dG={};Yt(dG,{NpmHttpFetcher:()=>ev,NpmRemapResolver:()=>tv,NpmSemverFetcher:()=>El,NpmSemverResolver:()=>rv,NpmTagResolver:()=>nv,default:()=>zBt,npmConfigUtils:()=>Wn,npmHttpUtils:()=>an,npmPublishUtils:()=>ZC});Ke();var V1e=tt(si());var _n="npm:";var an={};Yt(an,{AuthType:()=>K1e,customPackageError:()=>sp,del:()=>Kwt,get:()=>pu,getIdentUrl:()=>xh,handleInvalidAuthenticationError:()=>Ph,post:()=>Wwt,put:()=>Ywt});Ke();Ke();var wj=tt(Z1()),Y1e=Ie("url");var Wn={};Yt(Wn,{RegistryType:()=>G1e,getAuditRegistry:()=>jwt,getAuthConfiguration:()=>Ij,getDefaultRegistry:()=>$B,getPublishRegistry:()=>Gwt,getRegistryConfiguration:()=>W1e,getScopeConfiguration:()=>Cj,getScopeRegistry:()=>ip,normalizeRegistry:()=>IA});var G1e=(o=>(o.AUDIT_REGISTRY="npmAuditRegistry",o.FETCH_REGISTRY="npmRegistryServer",o.PUBLISH_REGISTRY="npmPublishRegistry",o))(G1e||{});function IA(t){return t.replace(/\/$/,"")}function jwt({configuration:t}){return $B({configuration:t,type:"npmAuditRegistry"})}function Gwt(t,{configuration:e}){var r;return(r=t.publishConfig)!=null&&r.registry?IA(t.publishConfig.registry):t.name?ip(t.name.scope,{configuration:e,type:"npmPublishRegistry"}):$B({configuration:e,type:"npmPublishRegistry"})}function ip(t,{configuration:e,type:r="npmRegistryServer"}){let o=Cj(t,{configuration:e});if(o===null)return $B({configuration:e,type:r});let a=o.get(r);return a===null?$B({configuration:e,type:r}):IA(a)}function $B({configuration:t,type:e="npmRegistryServer"}){let r=t.get(e);return IA(r!==null?r:t.get("npmRegistryServer"))}function W1e(t,{configuration:e}){let r=e.get("npmRegistries"),o=IA(t),a=r.get(o);if(typeof a<"u")return a;let n=r.get(o.replace(/^[a-z]+:/,""));return typeof n<"u"?n:null}function Cj(t,{configuration:e}){if(t===null)return null;let o=e.get("npmScopes").get(t);return o||null}function Ij(t,{configuration:e,ident:r}){let o=r&&Cj(r.scope,{configuration:e});return(o==null?void 0:o.get("npmAuthIdent"))||(o==null?void 0:o.get("npmAuthToken"))?o:W1e(t,{configuration:e})||e}var K1e=(a=>(a[a.NO_AUTH=0]="NO_AUTH",a[a.BEST_EFFORT=1]="BEST_EFFORT",a[a.CONFIGURATION=2]="CONFIGURATION",a[a.ALWAYS_AUTH=3]="ALWAYS_AUTH",a))(K1e||{});async function Ph(t,{attemptedAs:e,registry:r,headers:o,configuration:a}){var n,u;if(wk(t))throw new Vt(41,"Invalid OTP token");if(((n=t.originalError)==null?void 0:n.name)==="HTTPError"&&((u=t.originalError)==null?void 0:u.response.statusCode)===401)throw new Vt(41,`Invalid authentication (${typeof e!="string"?`as ${await Jwt(r,o,{configuration:a})}`:`attempted as ${e}`})`)}function sp(t,e){var o;let r=(o=t.response)==null?void 0:o.statusCode;return r?r===404?"Package not found":r>=500&&r<600?`The registry appears to be down (using a ${ye.applyHyperlink(e,"local cache","https://yarnpkg.com/advanced/lexicon#local-cache")} might have protected you against such outages)`:null:null}function xh(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}async function pu(t,{configuration:e,headers:r,ident:o,authType:a,registry:n,...u}){if(o&&typeof n>"u"&&(n=ip(o.scope,{configuration:e})),o&&o.scope&&typeof a>"u"&&(a=1),typeof n!="string")throw new Error("Assertion failed: The registry should be a string");let A=await Ik(n,{authType:a,configuration:e,ident:o});A&&(r={...r,authorization:A});try{return await ln.get(t.charAt(0)==="/"?`${n}${t}`:t,{configuration:e,headers:r,...u})}catch(p){throw await Ph(p,{registry:n,configuration:e,headers:r}),p}}async function Wwt(t,e,{attemptedAs:r,configuration:o,headers:a,ident:n,authType:u=3,registry:A,otp:p,...h}){if(n&&typeof A>"u"&&(A=ip(n.scope,{configuration:o})),typeof A!="string")throw new Error("Assertion failed: The registry should be a string");let C=await Ik(A,{authType:u,configuration:o,ident:n});C&&(a={...a,authorization:C}),p&&(a={...a,...HC(p)});try{return await ln.post(A+t,e,{configuration:o,headers:a,...h})}catch(w){if(!wk(w)||p)throw await Ph(w,{attemptedAs:r,registry:A,configuration:o,headers:a}),w;p=await Bj(w,{configuration:o});let v={...a,...HC(p)};try{return await ln.post(`${A}${t}`,e,{configuration:o,headers:v,...h})}catch(b){throw await Ph(b,{attemptedAs:r,registry:A,configuration:o,headers:a}),b}}}async function Ywt(t,e,{attemptedAs:r,configuration:o,headers:a,ident:n,authType:u=3,registry:A,otp:p,...h}){if(n&&typeof A>"u"&&(A=ip(n.scope,{configuration:o})),typeof A!="string")throw new Error("Assertion failed: The registry should be a string");let C=await Ik(A,{authType:u,configuration:o,ident:n});C&&(a={...a,authorization:C}),p&&(a={...a,...HC(p)});try{return await ln.put(A+t,e,{configuration:o,headers:a,...h})}catch(w){if(!wk(w))throw await Ph(w,{attemptedAs:r,registry:A,configuration:o,headers:a}),w;p=await Bj(w,{configuration:o});let v={...a,...HC(p)};try{return await ln.put(`${A}${t}`,e,{configuration:o,headers:v,...h})}catch(b){throw await Ph(b,{attemptedAs:r,registry:A,configuration:o,headers:a}),b}}}async function Kwt(t,{attemptedAs:e,configuration:r,headers:o,ident:a,authType:n=3,registry:u,otp:A,...p}){if(a&&typeof u>"u"&&(u=ip(a.scope,{configuration:r})),typeof u!="string")throw new Error("Assertion failed: The registry should be a string");let h=await Ik(u,{authType:n,configuration:r,ident:a});h&&(o={...o,authorization:h}),A&&(o={...o,...HC(A)});try{return await ln.del(u+t,{configuration:r,headers:o,...p})}catch(C){if(!wk(C)||A)throw await Ph(C,{attemptedAs:e,registry:u,configuration:r,headers:o}),C;A=await Bj(C,{configuration:r});let w={...o,...HC(A)};try{return await ln.del(`${u}${t}`,{configuration:r,headers:w,...p})}catch(v){throw await Ph(v,{attemptedAs:e,registry:u,configuration:r,headers:o}),v}}}async function Ik(t,{authType:e=2,configuration:r,ident:o}){let a=Ij(t,{configuration:r,ident:o}),n=Vwt(a,e);if(!n)return null;let u=await r.reduceHook(A=>A.getNpmAuthenticationHeader,void 0,t,{configuration:r,ident:o});if(u)return u;if(a.get("npmAuthToken"))return`Bearer ${a.get("npmAuthToken")}`;if(a.get("npmAuthIdent")){let A=a.get("npmAuthIdent");return A.includes(":")?`Basic ${Buffer.from(A).toString("base64")}`:`Basic ${A}`}if(n&&e!==1)throw new Vt(33,"No authentication configured for request");return null}function Vwt(t,e){switch(e){case 2:return t.get("npmAlwaysAuth");case 1:case 3:return!0;case 0:return!1;default:throw new Error("Unreachable")}}async function Jwt(t,e,{configuration:r}){if(typeof e>"u"||typeof e.authorization>"u")return"an anonymous user";try{return(await ln.get(new Y1e.URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username??"an unknown user"}catch{return"an unknown user"}}async function Bj(t,{configuration:e}){var a;let r=(a=t.originalError)==null?void 0:a.response.headers["npm-notice"];if(r&&(await Ct.start({configuration:e,stdout:process.stdout,includeFooter:!1},async n=>{if(n.reportInfo(0,r.replace(/(https?:\/\/\S+)/g,ye.pretty(e,"$1",ye.Type.URL))),!process.env.YARN_IS_TEST_ENV){let u=r.match(/open (https?:\/\/\S+)/i);if(u&&As.openUrl){let{openNow:A}=await(0,wj.prompt)({type:"confirm",name:"openNow",message:"Do you want to try to open this url now?",required:!0,initial:!0,onCancel:()=>process.exit(130)});A&&(await As.openUrl(u[1])||(n.reportSeparator(),n.reportWarning(0,"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.")))}}}),process.stdout.write(`
666`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,wj.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
667`),o}function wk(t){var e,r;if(((e=t.originalError)==null?void 0:e.name)!=="HTTPError")return!1;try{return((r=t.originalError)==null?void 0:r.response.headers["www-authenticate"].split(/,\s*/).map(a=>a.toLowerCase())).includes("otp")}catch{return!1}}function HC(t){return{["npm-otp"]:t}}var ev=class{supports(e,r){if(!e.reference.startsWith(_n))return!1;let{selector:o,params:a}=Y.parseRange(e.reference);return!(!V1e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=Y.parseRange(e.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await pu(o.__archiveUrl,{customErrorMessage:sp,configuration:r.project.configuration,ident:e});return await Ji.convertToZip(a,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1})}};Ke();var tv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(_n)||!Y.tryParseDescriptor(e.range.slice(_n.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){let o=r.project.configuration.normalizeDependency(Y.parseDescriptor(e.range.slice(_n.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(Y.parseDescriptor(e.range.slice(_n.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(e,r,o,a){let n=a.project.configuration.normalizeDependency(Y.parseDescriptor(e.range.slice(_n.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};Ke();Ke();var J1e=tt(si()),z1e=Ie("url");var El=class{supports(e,r){if(!e.reference.startsWith(_n))return!1;let o=new z1e.URL(e.reference);return!(!J1e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await pu(El.getLocatorUrl(e),{customErrorMessage:sp,configuration:r.project.configuration,ident:e})}catch{o=await pu(El.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:sp,configuration:r.project.configuration,ident:e})}return await Ji.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=ip(e.scope,{configuration:o}),n=El.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Tr.clean(e.reference.slice(_n.length));if(r===null)throw new Vt(10,"The npm semver resolver got selected, but the version isn't semver");return`${xh(e)}/-/${e.name}-${r}.tgz`}};Ke();Ke();Ke();var X1e=tt(si());var Bk=Y.makeIdent(null,"node-gyp"),zwt=/\b(node-gyp|prebuild-install)\b/,rv=class{supportsDescriptor(e,r){return e.range.startsWith(_n)?!!Tr.validRange(e.range.slice(_n.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(_n))return!1;let{selector:o}=Y.parseRange(e.reference);return!!X1e.default.valid(o)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=Tr.validRange(e.range.slice(_n.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(_n.length)}`);let n=await pu(xh(e),{customErrorMessage:sp,configuration:o.project.configuration,ident:e,jsonResponse:!0}),u=We.mapAndFilter(Object.keys(n.versions),h=>{try{let C=new Tr.SemVer(h);if(a.test(C))return C}catch{}return We.mapAndFilter.skip}),A=u.filter(h=>!n.versions[h.raw].deprecated),p=A.length>0?A:u;return p.sort((h,C)=>-h.compare(C)),p.map(h=>{let C=Y.makeLocator(e,`${_n}${h.raw}`),w=n.versions[h.raw].dist.tarball;return El.isConventionalTarballUrl(C,w,{configuration:o.project.configuration})?C:Y.bindLocator(C,{__archiveUrl:w})})}async getSatisfying(e,r,o,a){let n=Tr.validRange(e.range.slice(_n.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(_n.length)}`);return{locators:We.mapAndFilter(o,p=>{if(p.identHash!==e.identHash)return We.mapAndFilter.skip;let h=Y.tryParseRange(p.reference,{requireProtocol:_n});if(!h)return We.mapAndFilter.skip;let C=new Tr.SemVer(h.selector);return n.test(C)?{locator:p,version:C}:We.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(e,r){let{selector:o}=Y.parseRange(e.reference),a=Tr.clean(o);if(a===null)throw new Vt(10,"The npm semver resolver got selected, but the version isn't semver");let n=await pu(xh(e),{customErrorMessage:sp,configuration:r.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"versions"))throw new Vt(15,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(n.versions,a))throw new Vt(16,`Registry failed to return reference "${a}"`);let u=new Nt;if(u.load(n.versions[a]),!u.dependencies.has(Bk.identHash)&&!u.peerDependencies.has(Bk.identHash)){for(let A of u.scripts.values())if(A.match(zwt)){u.dependencies.set(Bk.identHash,Y.makeDescriptor(Bk,"latest")),r.report.reportWarningOnce(32,`${Y.prettyLocator(r.project.configuration,e)}: Implicit dependencies on node-gyp are discouraged`);break}}if(typeof u.raw.deprecated=="string"&&u.raw.deprecated!==""){let A=Y.prettyLocator(r.project.configuration,e),p=u.raw.deprecated.match(/\S/)?`${A} is deprecated: ${u.raw.deprecated}`:`${A} is deprecated`;r.report.reportWarningOnce(61,p)}return{...e,version:a,languageName:"node",linkType:"HARD",conditions:u.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(u.dependencies),peerDependencies:u.peerDependencies,dependenciesMeta:u.dependenciesMeta,peerDependenciesMeta:u.peerDependenciesMeta,bin:u.bin}}};Ke();Ke();var Z1e=tt(si());var nv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(_n)||!QE.test(e.range.slice(_n.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(_n.length),n=await pu(xh(e),{configuration:o.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"dist-tags"))throw new Vt(15,'Registry returned invalid data - missing "dist-tags" field');let u=n["dist-tags"];if(!Object.prototype.hasOwnProperty.call(u,a))throw new Vt(16,`Registry failed to return tag "${a}"`);let A=u[a],p=Y.makeLocator(e,`${_n}${A}`),h=n.versions[A].dist.tarball;return El.isConventionalTarballUrl(p,h,{configuration:o.project.configuration})?[p]:[Y.bindLocator(p,{__archiveUrl:h})]}async getSatisfying(e,r,o,a){var u;let n=[];for(let A of o){if(A.identHash!==e.identHash)continue;let p=Y.tryParseRange(A.reference,{requireProtocol:_n});if(!(!p||!Z1e.default.valid(p.selector))){if((u=p.params)!=null&&u.__archiveUrl){let h=Y.makeRange({protocol:_n,selector:p.selector,source:null,params:null}),[C]=await this.getCandidates(Y.makeDescriptor(e,h),r,a);if(A.reference!==C.reference)continue}n.push(A)}}return{locators:n,sorted:!1}}async resolve(e,r){throw new Error("Unreachable")}};var ZC={};Yt(ZC,{getGitHead:()=>VBt,getPublishAccess:()=>qBe,getReadmeContent:()=>jBe,makePublishBody:()=>KBt});Ke();Ke();St();var AG={};Yt(AG,{PackCommand:()=>Oh,default:()=>bBt,packUtils:()=>vA});Ke();Ke();Ke();St();_t();var vA={};Yt(vA,{genPackList:()=>Yk,genPackStream:()=>uG,genPackageManifest:()=>bBe,hasPackScripts:()=>lG,prepareForPack:()=>cG});Ke();St();var aG=tt(zo()),PBe=tt(BBe()),xBe=Ie("zlib"),yBt=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],EBt=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function lG(t){return!!(sn.hasWorkspaceScript(t,"prepack")||sn.hasWorkspaceScript(t,"postpack"))}async function cG(t,{report:e},r){await sn.maybeExecuteWorkspaceLifecycleScript(t,"prepack",{report:e});try{let o=J.join(t.cwd,Nt.fileName);await oe.existsPromise(o)&&await t.manifest.loadFile(o,{baseFs:oe}),await r()}finally{await sn.maybeExecuteWorkspaceLifecycleScript(t,"postpack",{report:e})}}async function uG(t,e){var n;typeof e>"u"&&(e=await Yk(t));let r=new Set;for(let u of((n=t.manifest.publishConfig)==null?void 0:n.executableFiles)??new Set)r.add(J.normalize(u));for(let u of t.manifest.bin.values())r.add(J.normalize(u));let o=PBe.default.pack();process.nextTick(async()=>{for(let u of e){let A=J.normalize(u),p=J.resolve(t.cwd,A),h=J.join("package",A),C=await oe.lstatPromise(p),w={name:h,mtime:new Date(Ii.SAFE_TIME*1e3)},v=r.has(A)?493:420,b,E,R=new Promise((_,V)=>{b=_,E=V}),L=_=>{_?E(_):b()};if(C.isFile()){let _;A==="package.json"?_=Buffer.from(JSON.stringify(await bBe(t),null,2)):_=await oe.readFilePromise(p),o.entry({...w,mode:v,type:"file"},_,L)}else C.isSymbolicLink()?o.entry({...w,mode:v,type:"symlink",linkname:await oe.readlinkPromise(p)},L):L(new Error(`Unsupported file type ${C.mode} for ${ue.fromPortablePath(A)}`));await R}o.finalize()});let a=(0,xBe.createGzip)();return o.pipe(a),a}async function bBe(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function Yk(t){var w,v,b,E;let e=t.project,r=e.configuration,o={accept:[],reject:[]};for(let R of EBt)o.reject.push(R);for(let R of yBt)o.accept.push(R);o.reject.push(r.get("rcFilename"));let a=R=>{if(R===null||!R.startsWith(`${t.cwd}/`))return;let L=J.relative(t.cwd,R),_=J.resolve(wt.root,L);o.reject.push(_)};a(J.resolve(e.cwd,r.get("lockfileFilename"))),a(r.get("cacheFolder")),a(r.get("globalFolder")),a(r.get("installStatePath")),a(r.get("virtualFolder")),a(r.get("yarnPath")),await r.triggerHook(R=>R.populateYarnPaths,e,R=>{a(R)});for(let R of e.workspaces){let L=J.relative(t.cwd,R.cwd);L!==""&&!L.match(/^(\.\.)?\//)&&o.reject.push(`/${L}`)}let n={accept:[],reject:[]},u=((w=t.manifest.publishConfig)==null?void 0:w.main)??t.manifest.main,A=((v=t.manifest.publishConfig)==null?void 0:v.module)??t.manifest.module,p=((b=t.manifest.publishConfig)==null?void 0:b.browser)??t.manifest.browser,h=((E=t.manifest.publishConfig)==null?void 0:E.bin)??t.manifest.bin;u!=null&&n.accept.push(J.resolve(wt.root,u)),A!=null&&n.accept.push(J.resolve(wt.root,A)),typeof p=="string"&&n.accept.push(J.resolve(wt.root,p));for(let R of h.values())n.accept.push(J.resolve(wt.root,R));if(p instanceof Map)for(let[R,L]of p.entries())n.accept.push(J.resolve(wt.root,R)),typeof L=="string"&&n.accept.push(J.resolve(wt.root,L));let C=t.manifest.files!==null;if(C){n.reject.push("/*");for(let R of t.manifest.files)QBe(n.accept,R,{cwd:wt.root})}return await CBt(t.cwd,{hasExplicitFileList:C,globalList:o,ignoreList:n})}async function CBt(t,{hasExplicitFileList:e,globalList:r,ignoreList:o}){let a=[],n=new Gu(t),u=[[wt.root,[o]]];for(;u.length>0;){let[A,p]=u.pop(),h=await n.lstatPromise(A);if(!DBe(A,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let C=await n.readdirPromise(A),w=!1,v=!1;if(!e||A!==wt.root)for(let R of C)w=w||R===".gitignore",v=v||R===".npmignore";let b=v?await vBe(n,A,".npmignore"):w?await vBe(n,A,".gitignore"):null,E=b!==null?[b].concat(p):p;DBe(A,{globalList:r,ignoreLists:p})&&(E=[...p,{accept:[],reject:["**/*"]}]);for(let R of C)u.push([J.resolve(A,R),E])}else(h.isFile()||h.isSymbolicLink())&&a.push(J.relative(wt.root,A))}return a.sort()}async function vBe(t,e,r){let o={accept:[],reject:[]},a=await t.readFilePromise(J.join(e,r),"utf8");for(let n of a.split(/\n/g))QBe(o.reject,n,{cwd:e});return o}function IBt(t,{cwd:e}){let r=t[0]==="!";return r&&(t=t.slice(1)),t.match(/\.{0,1}\//)&&(t=J.resolve(e,t)),r&&(t=`!${t}`),t}function QBe(t,e,{cwd:r}){let o=e.trim();o===""||o[0]==="#"||t.push(IBt(o,{cwd:r}))}function DBe(t,{globalList:e,ignoreLists:r}){let o=Wk(t,e.accept);if(o!==0)return o===2;let a=Wk(t,e.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let u=Wk(t,n.accept);if(u!==0)return u===2;let A=Wk(t,n.reject);if(A!==0)return A===1}return!1}function Wk(t,e){let r=e,o=[];for(let a=0;a<e.length;++a)e[a][0]!=="!"?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),o.push(e[a].slice(1)));return SBe(t,o)?2:SBe(t,r)?1:0}function SBe(t,e){let r=e,o=[];for(let a=0;a<e.length;++a)e[a].includes("/")?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),o.push(e[a]));return!!(aG.default.isMatch(t,r,{dot:!0,nocase:!0})||aG.default.isMatch(t,o,{dot:!0,basename:!0,nocase:!0}))}var Oh=class extends ct{constructor(){super(...arguments);this.installIfNeeded=fe.Boolean("--install-if-needed",!1,{description:"Run a preliminary `yarn install` if the package contains build scripts"});this.dryRun=fe.Boolean("-n,--dry-run",!1,{description:"Print the file paths without actually generating the package archive"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.out=fe.String("-o,--out",{description:"Create the archive at the specified path"});this.filename=fe.String("--filename",{hidden:!0})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);await lG(a)&&(this.installIfNeeded?await o.install({cache:await Ur.find(r),report:new xi}):await o.restoreInstallState());let n=this.out??this.filename,u=typeof n<"u"?J.resolve(this.context.cwd,wBt(n,{workspace:a})):J.resolve(a.cwd,"package.tgz");return(await Ct.start({configuration:r,stdout:this.context.stdout,json:this.json},async p=>{await cG(a,{report:p},async()=>{p.reportJson({base:ue.fromPortablePath(a.cwd)});let h=await Yk(a);for(let C of h)p.reportInfo(null,ue.fromPortablePath(C)),p.reportJson({location:ue.fromPortablePath(C)});if(!this.dryRun){let C=await uG(a,h),w=oe.createWriteStream(u);C.pipe(w),await new Promise(v=>{w.on("finish",v)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${ye.pretty(r,u,ye.Type.PATH)}`),p.reportJson({output:ue.fromPortablePath(u)}))})).exitCode()}};Oh.paths=[["pack"]],Oh.usage=it.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]});function wBt(t,{workspace:e}){let r=t.replace("%s",BBt(e)).replace("%v",vBt(e));return ue.toPortablePath(r)}function BBt(t){return t.manifest.name!==null?Y.slugifyIdent(t.manifest.name):"package"}function vBt(t){return t.manifest.version!==null?t.manifest.version:"unknown"}var DBt=["dependencies","devDependencies","peerDependencies"],SBt="workspace:",PBt=(t,e)=>{e.publishConfig&&(e.publishConfig.type&&(e.type=e.publishConfig.type),e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.imports&&(e.imports=e.publishConfig.imports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let o of DBt)for(let a of t.manifest.getForScope(o).values()){let n=r.tryWorkspaceByDescriptor(a),u=Y.parseRange(a.range);if(u.protocol===SBt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new Vt(21,`${Y.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let A;Y.areDescriptorsEqual(a,n.anchoredDescriptor)||u.selector==="*"?A=n.manifest.version??"0.0.0":u.selector==="~"||u.selector==="^"?A=`${u.selector}${n.manifest.version??"0.0.0"}`:A=u.selector;let p=o==="dependencies"?Y.makeDescriptor(a,"unknown"):null,h=p!==null&&t.manifest.ensureDependencyMeta(p).optional?"optionalDependencies":o;e[h][Y.stringifyIdent(a)]=A}}},xBt={hooks:{beforeWorkspacePacking:PBt},commands:[Oh]},bBt=xBt;var UBe=Ie("crypto"),_Be=tt(MBe()),HBe=Ie("url");async function KBt(t,e,{access:r,tag:o,registry:a,gitHead:n}){let u=t.manifest.name,A=t.manifest.version,p=Y.stringifyIdent(u),h=(0,UBe.createHash)("sha1").update(e).digest("hex"),C=_Be.default.fromData(e).toString(),w=r??qBe(t,u),v=await jBe(t),b=await vA.genPackageManifest(t),E=`${p}-${A}.tgz`,R=new HBe.URL(`${IA(a)}/${p}/-/${E}`);return{_id:p,_attachments:{[E]:{content_type:"application/octet-stream",data:e.toString("base64"),length:e.length}},name:p,access:w,["dist-tags"]:{[o]:A},versions:{[A]:{...b,_id:`${p}@${A}`,name:p,version:A,gitHead:n,dist:{shasum:h,integrity:C,tarball:R.toString()}}},readme:v}}async function VBt(t){try{let{stdout:e}=await Mr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:t});return e.trim()===""?void 0:e.trim()}catch{return}}function qBe(t,e){let r=t.project.configuration;return t.manifest.publishConfig&&typeof t.manifest.publishConfig.access=="string"?t.manifest.publishConfig.access:r.get("npmPublishAccess")!==null?r.get("npmPublishAccess"):e.scope?"restricted":"public"}async function jBe(t){let e=ue.toPortablePath(`${t.cwd}/README.md`),r=t.manifest.name,a=`# ${Y.stringifyIdent(r)}
668`;try{a=await oe.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var gG={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},GBe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},JBt={configuration:{...gG,...GBe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...gG,...GBe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:IA,valueDefinition:{description:"",type:"SHAPE",properties:{...gG}}}},fetchers:[ev,El],resolvers:[tv,rv,nv]},zBt=JBt;var vG={};Yt(vG,{NpmAuditCommand:()=>Uh,NpmInfoCommand:()=>_h,NpmLoginCommand:()=>Hh,NpmLogoutCommand:()=>qh,NpmPublishCommand:()=>jh,NpmTagAddCommand:()=>Wh,NpmTagListCommand:()=>Gh,NpmTagRemoveCommand:()=>Yh,NpmWhoamiCommand:()=>Kh,default:()=>svt,npmAuditUtils:()=>Jk});Ke();_t();var Ev=tt(zo());rl();var Kk=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Kk||{}),Vk=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Vk||{});var Jk={};Yt(Jk,{allSeverities:()=>$C,getDependencies:()=>CG,getReportTree:()=>yG,getRequires:()=>EG,isError:()=>mG});Ke();var $C=["info","low","moderate","high","critical"];function YBe(t,e){let r=[],o=new Set,a=u=>{o.has(u)||(o.add(u),r.push(u))};for(let u of e)a(u);let n=new Set;for(;r.length>0;){let u=r.shift(),A=t.storedResolutions.get(u);if(typeof A>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let p=t.storedPackages.get(A);if(!!p){n.add(u);for(let h of p.dependencies.values())a(h.descriptorHash)}}return n}function XBt(t,e){return new Set([...t].filter(r=>!e.has(r)))}function ZBt(t,e,{all:r}){let o=r?t.workspaces:[e],a=o.map(v=>v.manifest),n=new Set(a.map(v=>[...v.dependencies].map(([b,E])=>b)).flat()),u=new Set(a.map(v=>[...v.devDependencies].map(([b,E])=>b)).flat()),A=o.map(v=>[...v.anchoredPackage.dependencies.values()]).flat(),p=A.filter(v=>n.has(v.identHash)).map(v=>v.descriptorHash),h=A.filter(v=>u.has(v.identHash)).map(v=>v.descriptorHash),C=YBe(t,p),w=YBe(t,h);return XBt(w,C)}function KBe(t){let e={};for(let r of t)e[Y.stringifyIdent(r)]=Y.parseRange(r.range).selector;return e}function VBe(t){if(typeof t>"u")return new Set($C);let e=$C.indexOf(t),r=$C.slice(e);return new Set(r)}function $Bt(t,e){let r=VBe(e),o={};for(let a of r)o[a]=t[a];return o}function mG(t,e){let r=$Bt(t,e);for(let o of Object.keys(r))if(r[o]??0>0)return!0;return!1}function yG(t,e){var n;let r={},o={children:r},a=Object.values(t.advisories);if(e!=null){let u=VBe(e);a=a.filter(A=>u.has(A.severity))}for(let u of We.sortMap(a,A=>A.module_name))r[u.module_name]={label:u.module_name,value:ye.tuple(ye.Type.RANGE,u.findings.map(A=>A.version).join(", ")),children:{ID:{label:"ID",value:ye.tuple(ye.Type.NUMBER,u.id)},Issue:{label:"Issue",value:ye.tuple(ye.Type.NO_HINT,u.title)},URL:{label:"URL",value:ye.tuple(ye.Type.URL,u.url)},Severity:{label:"Severity",value:ye.tuple(ye.Type.NO_HINT,u.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:ye.tuple(ye.Type.RANGE,u.vulnerable_versions)},["Patched Versions"]:{label:"Patched Versions",value:ye.tuple(ye.Type.RANGE,u.patched_versions)},Via:{label:"Via",value:ye.tuple(ye.Type.NO_HINT,Array.from(new Set(u.findings.map(A=>A.paths).flat().map(A=>A.split(">")[0]))).join(", "))},Recommendation:{label:"Recommendation",value:ye.tuple(ye.Type.NO_HINT,(n=u.recommendation)==null?void 0:n.replace(/\n/g," "))}}};return o}function EG(t,e,{all:r,environment:o}){let a=r?t.workspaces:[e],n=["all","production"].includes(o),u=[];if(n)for(let h of a)for(let C of h.manifest.dependencies.values())u.push(C);let A=["all","development"].includes(o),p=[];if(A)for(let h of a)for(let C of h.manifest.devDependencies.values())p.push(C);return KBe([...u,...p].filter(h=>Y.parseRange(h.range).protocol===null))}function CG(t,e,{all:r}){let o=ZBt(t,e,{all:r}),a={};for(let n of t.storedPackages.values())a[Y.stringifyIdent(n)]={version:n.version??"0.0.0",integrity:n.identHash,requires:KBe(n.dependencies.values()),dev:o.has(Y.convertLocatorToDescriptor(n).descriptorHash)};return a}var Uh=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=fe.String("--environment","all",{description:"Which environments to cover",validator:Gs(Kk)});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.severity=fe.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:Gs(Vk)});this.excludes=fe.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=fe.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let n=EG(o,a,{all:this.all,environment:this.environment}),u=CG(o,a,{all:this.all});if(!this.recursive)for(let E of Object.keys(u))Object.prototype.hasOwnProperty.call(n,E)?u[E].requires={}:delete u[E];let A=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes]));if(A){for(let E of Object.keys(n))Ev.default.isMatch(E,A)&&delete n[E];for(let E of Object.keys(u))Ev.default.isMatch(E,A)&&delete u[E];for(let E of Object.keys(u))for(let R of Object.keys(u[E].requires))Ev.default.isMatch(R,A)&&delete u[E].requires[R]}let p={requires:n,dependencies:u},h=Wn.getAuditRegistry({configuration:r}),C,w=await pA.start({configuration:r,stdout:this.context.stdout},async()=>{C=await an.post("/-/npm/v1/security/audits/quick",p,{authType:an.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h})});if(w.hasErrors())return w.exitCode();let v=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores]));if(v){for(let E of Object.keys(C.advisories))if(Ev.default.isMatch(E,v)){let R=C.advisories[E],L=0;R.findings.forEach(_=>L+=_.paths.length),C.metadata.vulnerabilities[R.severity]-=L,delete C.advisories[E]}}let b=mG(C.metadata.vulnerabilities,this.severity);return!this.json&&b?($o.emitTree(yG(C,this.severity),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ct.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(C),b||E.reportInfo(1,"No audit suggestions")}),b?1:0)}};Uh.paths=[["npm","audit"]],Uh.usage=it.Usage({description:"perform a vulnerability audit against the installed packages",details:`
669 This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
670
671 For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
672
673 Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${$C.map(r=>`\`${r}\``).join(", ")}.
674
675 If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
676
677 If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option.
678
679 If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
680
681 To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why <package>\` to get more information as to who depends on them.
682 `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]});Ke();Ke();St();_t();var IG=tt(si()),wG=Ie("util"),_h=class extends ct{constructor(){super(...arguments);this.fields=fe.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],u=!1,A=await Ct.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let C;if(h==="."){let ae=o.topLevelWorkspace;if(!ae.manifest.name)throw new ot(`Missing ${ye.pretty(r,"name",ye.Type.CODE)} field in ${ue.fromPortablePath(J.join(ae.cwd,Lr.manifest))}`);C=Y.makeDescriptor(ae.manifest.name,"unknown")}else C=Y.parseDescriptor(h);let w=an.getIdentUrl(C),v=BG(await an.get(w,{configuration:r,ident:C,jsonResponse:!0,customErrorMessage:an.customPackageError})),b=Object.keys(v.versions).sort(IG.default.compareLoose),R=v["dist-tags"].latest||b[b.length-1],L=Tr.validRange(C.range);if(L){let ae=IG.default.maxSatisfying(b,L);ae!==null?R=ae:(p.reportWarning(0,`Unmet range ${Y.prettyRange(r,C.range)}; falling back to the latest version`),u=!0)}else Object.prototype.hasOwnProperty.call(v["dist-tags"],C.range)?R=v["dist-tags"][C.range]:C.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${Y.prettyRange(r,C.range)}; falling back to the latest version`),u=!0);let _=v.versions[R],V={...v,..._,version:R,versions:b},re;if(a!==null){re={};for(let ae of a){let he=V[ae];if(typeof he<"u")re[ae]=he;else{p.reportWarning(1,`The ${ye.pretty(r,ae,ye.Type.CODE)} field doesn't exist inside ${Y.prettyIdent(r,C)}'s information`),u=!0;continue}}}else this.json||(delete V.dist,delete V.readme,delete V.users),re=V;p.reportJson(re),this.json||n.push(re)}});wG.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(`
683`),this.context.stdout.write(`${(0,wG.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
684`);return A.exitCode()}};_h.paths=[["npm","info"]],_h.usage=it.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});function BG(t){if(Array.isArray(t)){let e=[];for(let r of t)r=BG(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let o=BG(t[r]);o&&(e[r]=o)}return e}else return t||null}Ke();Ke();_t();var JBe=tt(Z1()),Hh=class extends ct{constructor(){super(...arguments);this.scope=fe.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=fe.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=fe.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=await zk({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ct.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await tvt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=`/-/user/org.couchdb.user:${encodeURIComponent(u.name)}`,p=await an.put(A,u,{attemptedAs:u.name,configuration:r,registry:o,jsonResponse:!0,authType:an.AuthType.NO_AUTH});return await evt(o,p.token,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};Hh.paths=[["npm","login"]],Hh.usage=it.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});async function zk({scope:t,publish:e,configuration:r,cwd:o}){return t&&e?Wn.getScopeRegistry(t,{configuration:r,type:Wn.RegistryType.PUBLISH_REGISTRY}):t?Wn.getScopeRegistry(t,{configuration:r}):e?Wn.getPublishRegistry((await cC(r,o)).manifest,{configuration:r}):Wn.getDefaultRegistry({configuration:r})}async function evt(t,e,{alwaysAuth:r,scope:o}){let a=u=>A=>{let p=We.isIndexableObject(A)?A:{},h=p[u],C=We.isIndexableObject(h)?h:{};return{...p,[u]:{...C,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=o?{npmScopes:a(o)}:{npmRegistries:a(t)};return await Xe.updateHomeConfiguration(n)}async function tvt({configuration:t,registry:e,report:r,stdin:o,stdout:a}){r.reportInfo(0,`Logging in to ${ye.pretty(t,e,ye.Type.URL)}`);let n=!1;if(e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),process.env.YARN_IS_TEST_ENV)return{name:process.env.YARN_INJECT_NPM_USER||"",password:process.env.YARN_INJECT_NPM_PASSWORD||""};let{username:u,password:A}=await(0,JBe.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a}]);return r.reportSeparator(),{name:u,password:A}}Ke();Ke();_t();var eI=new Set(["npmAuthIdent","npmAuthToken"]),qh=class extends ct{constructor(){super(...arguments);this.scope=fe.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=fe.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=fe.Boolean("-A,--all",!1,{description:"Logout of all registries"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=async()=>{let n=await zk({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),u=await Xe.find(this.context.cwd,this.context.plugins),A=Y.makeIdent(this.scope??null,"pkg");return!Wn.getAuthConfiguration(n,{configuration:u,ident:A}).get("npmAuthToken")};return(await Ct.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await nvt(),n.reportInfo(0,"Successfully logged out from everything")),this.scope){await zBe("npmScopes",this.scope),await o()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,"Scope authentication settings removed, but some other ones settings still apply to it");return}let u=await zk({configuration:r,cwd:this.context.cwd,publish:this.publish});await zBe("npmRegistries",u),await o()?n.reportInfo(0,`Successfully logged out from ${u}`):n.reportWarning(0,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}};qh.paths=[["npm","logout"]],qh.usage=it.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]});function rvt(t,e){let r=t[e];if(!We.isIndexableObject(r))return!1;let o=new Set(Object.keys(r));if([...eI].every(n=>!o.has(n)))return!1;for(let n of eI)o.delete(n);if(o.size===0)return t[e]=void 0,!0;let a={...r};for(let n of eI)delete a[n];return t[e]=a,!0}async function nvt(){let t=e=>{let r=!1,o=We.isIndexableObject(e)?{...e}:{};o.npmAuthToken&&(delete o.npmAuthToken,r=!0);for(let a of Object.keys(o))rvt(o,a)&&(r=!0);if(Object.keys(o).length!==0)return r?o:e};return await Xe.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function zBe(t,e){return await Xe.updateHomeConfiguration({[t]:r=>{let o=We.isIndexableObject(r)?r:{};if(!Object.prototype.hasOwnProperty.call(o,e))return r;let a=o[e],n=We.isIndexableObject(a)?a:{},u=new Set(Object.keys(n));if([...eI].every(p=>!u.has(p)))return r;for(let p of eI)u.delete(p);if(u.size===0)return Object.keys(o).length===1?void 0:{...o,[e]:void 0};let A={};for(let p of eI)A[p]=void 0;return{...o,[e]:{...n,...A}}}})}Ke();_t();var jh=class extends ct{constructor(){super(...arguments);this.access=fe.String("--access",{description:"The access for the published package (public or restricted)"});this.tag=fe.String("--tag","latest",{description:"The tag on the registry that the package should be attached to"});this.tolerateRepublish=fe.Boolean("--tolerate-republish",!1,{description:"Warn and exit when republishing an already existing version of a package"});this.otp=fe.String("--otp",{description:"The OTP token to use with the command"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);if(a.manifest.private)throw new ot("Private workspaces cannot be published");if(a.manifest.name===null||a.manifest.version===null)throw new ot("Workspaces must have valid names and versions to be published on an external registry");await o.restoreInstallState();let n=a.manifest.name,u=a.manifest.version,A=Wn.getPublishRegistry(a.manifest,{configuration:r});return(await Ct.start({configuration:r,stdout:this.context.stdout},async h=>{var C,w;if(this.tolerateRepublish)try{let v=await an.get(an.getIdentUrl(n),{configuration:r,registry:A,ident:n,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(v,"versions"))throw new Vt(15,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(v.versions,u)){h.reportWarning(0,`Registry already knows about version ${u}; skipping.`);return}}catch(v){if(((w=(C=v.originalError)==null?void 0:C.response)==null?void 0:w.statusCode)!==404)throw v}await sn.maybeExecuteWorkspaceLifecycleScript(a,"prepublish",{report:h}),await vA.prepareForPack(a,{report:h},async()=>{let v=await vA.genPackList(a);for(let _ of v)h.reportInfo(null,_);let b=await vA.genPackStream(a,v),E=await We.bufferStream(b),R=await ZC.getGitHead(a.cwd),L=await ZC.makePublishBody(a,E,{access:this.access,tag:this.tag,registry:A,gitHead:R});await an.put(an.getIdentUrl(n),L,{configuration:r,registry:A,ident:n,otp:this.otp,jsonResponse:!0})}),h.reportInfo(0,"Package archive published")})).exitCode()}};jh.paths=[["npm","publish"]],jh.usage=it.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]});Ke();_t();var XBe=tt(si());Ke();St();_t();var Gh=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=fe.String({required:!1})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=Y.parseIdent(this.package);else{if(!a)throw new er(o.cwd,this.context.cwd);if(!a.manifest.name)throw new ot(`Missing 'name' field in ${ue.fromPortablePath(J.join(a.cwd,Lr.manifest))}`);n=a.manifest.name}let u=await Cv(n,r),p={children:We.sortMap(Object.entries(u),([h])=>h).map(([h,C])=>({value:ye.tuple(ye.Type.RESOLUTION,{descriptor:Y.makeDescriptor(n,h),locator:Y.makeLocator(n,C)})}))};return $o.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};Gh.paths=[["npm","tag","list"]],Gh.usage=it.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:`
685 This command will list all tags of a package from the npm registry.
686
687 If the package is not specified, Yarn will default to the current workspace.
688 `,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function Cv(t,e){let r=`/-/package${an.getIdentUrl(t)}/dist-tags`;return an.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:an.customPackageError})}var Wh=class extends ct{constructor(){super(...arguments);this.package=fe.String();this.tag=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);let n=Y.parseDescriptor(this.package,!0),u=n.range;if(!XBe.default.valid(u))throw new ot(`The range ${ye.pretty(r,n.range,ye.Type.RANGE)} must be a valid semver version`);let A=Wn.getPublishRegistry(a.manifest,{configuration:r}),p=ye.pretty(r,n,ye.Type.IDENT),h=ye.pretty(r,u,ye.Type.RANGE),C=ye.pretty(r,this.tag,ye.Type.CODE);return(await Ct.start({configuration:r,stdout:this.context.stdout},async v=>{let b=await Cv(n,r);Object.prototype.hasOwnProperty.call(b,this.tag)&&b[this.tag]===u&&v.reportWarning(0,`Tag ${C} is already set to version ${h}`);let E=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.put(E,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag ${C} added to version ${h} of package ${p}`)})).exitCode()}};Wh.paths=[["npm","tag","add"]],Wh.usage=it.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
689 This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
690 `,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]});Ke();_t();var Yh=class extends ct{constructor(){super(...arguments);this.package=fe.String();this.tag=fe.String()}async execute(){if(this.tag==="latest")throw new ot("The 'latest' tag cannot be removed.");let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);let n=Y.parseIdent(this.package),u=Wn.getPublishRegistry(a.manifest,{configuration:r}),A=ye.pretty(r,this.tag,ye.Type.CODE),p=ye.pretty(r,n,ye.Type.IDENT),h=await Cv(n,r);if(!Object.prototype.hasOwnProperty.call(h,this.tag))throw new ot(`${A} is not a tag of package ${p}`);return(await Ct.start({configuration:r,stdout:this.context.stdout},async w=>{let v=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),w.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};Yh.paths=[["npm","tag","remove"]],Yh.usage=it.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
691 This command will remove a tag from a package from the npm registry.
692 `,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});Ke();Ke();_t();var Kh=class extends ct{constructor(){super(...arguments);this.scope=fe.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=fe.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=Wn.getScopeRegistry(this.scope,{configuration:r,type:Wn.RegistryType.PUBLISH_REGISTRY}):this.scope?o=Wn.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=Wn.getPublishRegistry((await cC(r,this.context.cwd)).manifest,{configuration:r}):o=Wn.getDefaultRegistry({configuration:r}),(await Ct.start({configuration:r,stdout:this.context.stdout},async n=>{var A,p;let u;try{u=await an.get("/-/whoami",{configuration:r,registry:o,authType:an.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?Y.makeIdent(this.scope,""):void 0})}catch(h){if(((A=h.response)==null?void 0:A.statusCode)===401||((p=h.response)==null?void 0:p.statusCode)===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw h}n.reportInfo(0,u.username)})).exitCode()}};Kh.paths=[["npm","whoami"]],Kh.usage=it.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var ivt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[Uh,_h,Hh,qh,jh,Wh,Gh,Yh,Kh]},svt=ivt;var kG={};Yt(kG,{PatchCommand:()=>zh,PatchCommitCommand:()=>Jh,PatchFetcher:()=>Dv,PatchResolver:()=>Sv,default:()=>Bvt,patchUtils:()=>Pm});Ke();Ke();St();Hc();var Pm={};Yt(Pm,{applyPatchFile:()=>Zk,diffFolders:()=>bG,ensureUnpatchedDescriptor:()=>DG,ensureUnpatchedLocator:()=>eF,extractPackageToDisk:()=>xG,extractPatchFlags:()=>ive,isParentRequired:()=>PG,isPatchDescriptor:()=>$k,isPatchLocator:()=>Vh,loadPatchFiles:()=>vv,makeDescriptor:()=>tF,makeLocator:()=>SG,makePatchHash:()=>QG,parseDescriptor:()=>wv,parseLocator:()=>Bv,parsePatchFile:()=>Iv,unpatchDescriptor:()=>Cvt,unpatchLocator:()=>Ivt});Ke();St();Ke();St();var ovt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function tI(t){return J.relative(wt.root,J.resolve(wt.root,ue.toPortablePath(t)))}function avt(t){let e=t.trim().match(ovt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var lvt=420,cvt=493;var ZBe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),uvt=t=>({header:avt(t),parts:[]}),Avt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function fvt(t){let e=[],r=ZBe(),o="parsing header",a=null,n=null;function u(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function A(){u(),e.push(r),r=ZBe()}for(let p=0;p<t.length;p++){let h=t[p];if(o==="parsing header")if(h.startsWith("@@"))o="parsing hunks",r.hunks=[],p-=1;else if(h.startsWith("diff --git ")){r&&r.diffLineFromPath&&A();let C=h.match(/^diff --git a\/(.*?) b\/(.*?)\s*$/);if(!C)throw new Error(`Bad diff line: ${h}`);r.diffLineFromPath=C[1],r.diffLineToPath=C[2]}else if(h.startsWith("old mode "))r.oldMode=h.slice(9).trim();else if(h.startsWith("new mode "))r.newMode=h.slice(9).trim();else if(h.startsWith("deleted file mode "))r.deletedFileMode=h.slice(18).trim();else if(h.startsWith("new file mode "))r.newFileMode=h.slice(14).trim();else if(h.startsWith("rename from "))r.renameFrom=h.slice(12).trim();else if(h.startsWith("rename to "))r.renameTo=h.slice(10).trim();else if(h.startsWith("index ")){let C=h.match(/(\w+)\.\.(\w+)/);if(!C)continue;r.beforeHash=C[1],r.afterHash=C[2]}else h.startsWith("semver exclusivity ")?r.semverExclusivity=h.slice(19).trim():h.startsWith("--- ")?r.fromPath=h.slice(6).trim():h.startsWith("+++ ")&&(r.toPath=h.slice(6).trim());else{let C=Avt[h[0]]||null;switch(C){case"header":u(),a=uvt(h);break;case null:o="parsing header",A(),p-=1;break;case"pragma":{if(!h.startsWith("\\ No newline at end of file"))throw new Error(`Unrecognized pragma in patch file: ${h}`);if(!n)throw new Error("Bad parser state: No newline at EOF pragma encountered without context");n.noNewlineAtEndOfFile=!0}break;case"context":case"deletion":case"insertion":{if(!a)throw new Error("Bad parser state: Hunk lines encountered before hunk header");n&&n.type!==C&&(a.parts.push(n),n=null),n||(n={type:C,lines:[],noNewlineAtEndOfFile:!1}),n.lines.push(h.slice(1))}break;default:We.assertNever(C);break}}}A();for(let{hunks:p}of e)if(p)for(let h of p)hvt(h);return e}function pvt(t){let e=[];for(let r of t){let{semverExclusivity:o,diffLineFromPath:a,diffLineToPath:n,oldMode:u,newMode:A,deletedFileMode:p,newFileMode:h,renameFrom:C,renameTo:w,beforeHash:v,afterHash:b,fromPath:E,toPath:R,hunks:L}=r,_=C?"rename":p?"file deletion":h?"file creation":L&&L.length>0?"patch":"mode change",V=null;switch(_){case"rename":{if(!C||!w)throw new Error("Bad parser state: rename from & to not given");e.push({type:"rename",semverExclusivity:o,fromPath:tI(C),toPath:tI(w)}),V=w}break;case"file deletion":{let re=a||E;if(!re)throw new Error("Bad parse state: no path given for file deletion");e.push({type:"file deletion",semverExclusivity:o,hunk:L&&L[0]||null,path:tI(re),mode:Xk(p),hash:v})}break;case"file creation":{let re=n||R;if(!re)throw new Error("Bad parse state: no path given for file creation");e.push({type:"file creation",semverExclusivity:o,hunk:L&&L[0]||null,path:tI(re),mode:Xk(h),hash:b})}break;case"patch":case"mode change":V=R||n;break;default:We.assertNever(_);break}V&&u&&A&&u!==A&&e.push({type:"mode change",semverExclusivity:o,path:tI(V),oldMode:Xk(u),newMode:Xk(A)}),V&&L&&L.length&&e.push({type:"patch",semverExclusivity:o,path:tI(V),hunks:L,beforeHash:v,afterHash:b})}if(e.length===0)throw new Error("Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string");return e}function Xk(t){let e=parseInt(t,8)&511;if(e!==lvt&&e!==cvt)throw new Error(`Unexpected file mode string: ${t}`);return e}function Iv(t){let e=t.split(/\n/g);return e[e.length-1]===""&&e.pop(),pvt(fvt(e))}function hvt(t){let e=0,r=0;for(let{type:o,lines:a}of t.parts)switch(o){case"context":r+=a.length,e+=a.length;break;case"deletion":e+=a.length;break;case"insertion":r+=a.length;break;default:We.assertNever(o);break}if(e!==t.header.original.length||r!==t.header.patched.length){let o=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${o(t.header.original.length)} ${o(t.header.patched.length)} @@, got @@ ${o(e)} ${o(r)} @@)`)}}Ke();St();var rI=class extends Error{constructor(r,o){super(`Cannot apply hunk #${r+1}`);this.hunk=o}};async function nI(t,e,r){let o=await t.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await t.lutimesPromise(e,o.atime,o.mtime)}async function Zk(t,{baseFs:e=new xn,dryRun:r=!1,version:o=null}={}){for(let a of t)if(!(a.semverExclusivity!==null&&o!==null&&!Tr.satisfiesWithPrereleases(o,a.semverExclusivity)))switch(a.type){case"file deletion":if(r){if(!e.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await nI(e,J.dirname(a.path),async()=>{await e.unlinkPromise(a.path)});break;case"rename":if(r){if(!e.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await nI(e,J.dirname(a.fromPath),async()=>{await nI(e,J.dirname(a.toPath),async()=>{await nI(e,a.fromPath,async()=>(await e.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case"file creation":if(r){if(e.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(`
693`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
694`):"";await e.mkdirpPromise(J.dirname(a.path),{chmod:493,utimes:[Ii.SAFE_TIME,Ii.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,Ii.SAFE_TIME,Ii.SAFE_TIME)}break;case"patch":await nI(e,a.path,async()=>{await mvt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if($Be(a.newMode)!==$Be(u))continue;await nI(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:We.assertNever(a);break}}function $Be(t){return(t&64)>0}function eve(t){return t.replace(/\s+$/,"")}function dvt(t,e){return eve(t)===eve(e)}async function mvt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,u=(await r.readFileSync(e,"utf8")).split(/\n/),A=[],p=0,h=0;for(let w of t){let v=Math.max(h,w.header.patched.start+p),b=Math.max(0,v-h),E=Math.max(0,u.length-v-w.header.original.length),R=Math.max(b,E),L=0,_=0,V=null;for(;L<=R;){if(L<=b&&(_=v-L,V=tve(w,u,_),V!==null)){L=-L;break}if(L<=E&&(_=v+L,V=tve(w,u,_),V!==null))break;L+=1}if(V===null)throw new rI(t.indexOf(w),w);A.push(V),p+=L,h=_+w.header.original.length}if(o)return;let C=0;for(let w of A)for(let v of w)switch(v.type){case"splice":{let b=v.index+C;u.splice(b,v.numToDelete,...v.linesToInsert),C+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:We.assertNever(v);break}await r.writeFilePromise(e,u.join(`
695`),{mode:a})}function tve(t,e,r){let o=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=e[r];if(u==null||!dvt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:We.assertNever(a.type);break}return o}var Evt=/^builtin<([^>]+)>$/;function iI(t,e){let{protocol:r,source:o,selector:a,params:n}=Y.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(C=>ue.toPortablePath(C)):[],A=n&&typeof n.locator=="string"?Y.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function $k(t){return t.range.startsWith("patch:")}function Vh(t){return t.reference.startsWith("patch:")}function wv(t){let{sourceItem:e,...r}=iI(t.range,Y.parseDescriptor);return{...r,sourceDescriptor:e}}function Bv(t){let{sourceItem:e,...r}=iI(t.reference,Y.parseLocator);return{...r,sourceLocator:e}}function Cvt(t){let{sourceItem:e}=iI(t.range,Y.parseDescriptor);return e}function Ivt(t){let{sourceItem:e}=iI(t.reference,Y.parseLocator);return e}function DG(t){if(!$k(t))return t;let{sourceItem:e}=iI(t.range,Y.parseDescriptor);return e}function eF(t){if(!Vh(t))return t;let{sourceItem:e}=iI(t.reference,Y.parseLocator);return e}function rve({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:Y.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return Y.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function tF(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return Y.makeDescriptor(t,rve({parentLocator:e,sourceItem:r,patchPaths:o},Y.stringifyDescriptor))}function SG(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return Y.makeLocator(t,rve({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},Y.stringifyLocator))}function nve({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(Evt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):J.isAbsolute(a)?t(a):e(a)}function ive(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function PG(t){return nve({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function vv(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new An(wt.root),prefixPath:J.relative(wt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await We.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=ive(u),p=await nve({onAbsolute:async h=>await oe.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(J.join(a.prefixPath,h),"utf8")},onProject:async h=>await oe.readFilePromise(J.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(C=>C.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
696`));return n}async function xG(t,{cache:e,project:r}){let o=r.storedPackages.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=eF(t),n=r.storedChecksums,u=new xi,A=await oe.mktempPromise(),p=J.join(A,"source"),h=J.join(A,"user"),C=J.join(A,".yarn-patch.json"),w=r.configuration.makeFetcher(),v=[];try{let b,E;if(t.locatorHash===a.locatorHash){let R=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u});v.push(()=>{var L;return(L=R.releaseFs)==null?void 0:L.call(R)}),b=R,E=R}else b=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),v.push(()=>{var R;return(R=b.releaseFs)==null?void 0:R.call(b)}),E=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),v.push(()=>{var R;return(R=E.releaseFs)==null?void 0:R.call(E)});await Promise.all([oe.copyPromise(p,b.prefixPath,{baseFs:b.packageFs}),oe.copyPromise(h,E.prefixPath,{baseFs:E.packageFs}),oe.writeJsonPromise(C,{locator:Y.stringifyLocator(t),version:o.version})])}finally{for(let b of v)b()}return oe.detachTemp(A),h}async function bG(t,e){let r=ue.fromPortablePath(t).replace(/\\/g,"/"),o=ue.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Mr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,o],{cwd:ue.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
697The following error was reported by 'git':
698${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${We.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${We.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(We.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(We.escapeRegExp(`${o}/`),"g"),"")}function QG(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=Iv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!Tr.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return bn.makeHash(`${3}`,...r).slice(0,6)}Ke();function sve(t,{configuration:e,report:r}){for(let o of t.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${ye.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${ye.pretty(e,a,ye.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${ye.pretty(e,a,ye.Type.ADDED)}`);break;default:We.assertNever(o.type)}}var Dv=class{supports(e,r){return!!Vh(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=Bv(e),A=await vv(o,u,r),p=await oe.mktempPromise(),h=J.join(p,"current.zip"),C=await r.fetcher.fetch(a,r),w=Y.getIdentVendorPath(e),v=new os(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await We.releaseAfterUseAsync(async()=>{await v.copyPromise(w,C.prefixPath,{baseFs:C.packageFs,stableSort:!0})},C.releaseFs),v.saveAndClose();for(let{source:b,optional:E}of A){if(b===null)continue;let R=new os(h,{level:r.project.configuration.get("compressionLevel")}),L=new An(J.resolve(wt.root,w),{baseFs:R});try{await Zk(Iv(b),{baseFs:L,version:n})}catch(_){if(!(_ instanceof rI))throw _;let V=r.project.configuration.get("enableInlineHunks"),re=!V&&!E?" (set enableInlineHunks for details)":"",ae=`${Y.prettyLocator(r.project.configuration,e)}: ${_.message}${re}`,he=pe=>{!V||sve(_.hunk,{configuration:r.project.configuration,report:pe})};if(R.discardAndClose(),E){r.report.reportWarningOnce(66,ae,{reportExtra:he});continue}else throw new Vt(66,ae,he)}R.saveAndClose()}return new os(h,{level:r.project.configuration.get("compressionLevel")})}};Ke();var Sv=class{supportsDescriptor(e,r){return!!$k(e)}supportsLocator(e,r){return!!Vh(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=wv(e);return a.every(n=>!PG(n))?e:Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=wv(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=wv(e),u=await vv(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=QG(u,A.version);return[SG(e,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=Bv(e);return{...await r.resolver.resolve(o,r),...e}}};Ke();St();_t();var Jh=class extends ct{constructor(){super(...arguments);this.save=fe.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let n=J.resolve(this.context.cwd,ue.toPortablePath(this.patchFolder)),u=J.join(n,"../source"),A=J.join(n,"../.yarn-patch.json");if(!oe.existsSync(u))throw new ot("The argument folder didn't get created by 'yarn patch'");let p=await bG(u,n),h=await oe.readJsonPromise(A),C=Y.parseLocator(h.locator,!0);if(!o.storedPackages.has(C.locatorHash))throw new ot("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(p);return}let w=r.get("patchFolder"),v=J.join(w,`${Y.slugifyLocator(C)}.patch`);await oe.mkdirPromise(w,{recursive:!0}),await oe.writeFilePromise(v,p);let b=[],E=new Map;for(let R of o.storedPackages.values()){if(Y.isVirtualLocator(R))continue;let L=R.dependencies.get(C.identHash);if(!L)continue;let _=Y.ensureDevirtualizedDescriptor(L),V=DG(_),re=o.storedResolutions.get(V.descriptorHash);if(!re)throw new Error("Assertion failed: Expected the resolution to have been registered");if(!o.storedPackages.get(re))throw new Error("Assertion failed: Expected the package to have been registered");let he=o.tryWorkspaceByLocator(R);if(he)b.push(he);else{let pe=o.originalPackages.get(R.locatorHash);if(!pe)throw new Error("Assertion failed: Expected the original package to have been registered");let De=pe.dependencies.get(L.identHash);if(!De)throw new Error("Assertion failed: Expected the original dependency to have been registered");E.set(De.descriptorHash,De)}}for(let R of b)for(let L of Nt.hardDependencies){let _=R.manifest[L].get(C.identHash);if(!_)continue;let V=tF(_,{parentLocator:null,sourceDescriptor:Y.convertLocatorToDescriptor(C),patchPaths:[J.join(Lr.home,J.relative(o.cwd,v))]});R.manifest[L].set(_.identHash,V)}for(let R of E.values()){let L=tF(R,{parentLocator:null,sourceDescriptor:Y.convertLocatorToDescriptor(C),patchPaths:[J.join(Lr.home,J.relative(o.cwd,v))]});o.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:Y.stringifyIdent(L),description:R.range}},reference:L.range})}await o.persist()}};Jh.paths=[["patch-commit"]],Jh.usage=it.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "});Ke();St();_t();var zh=class extends ct{constructor(){super(...arguments);this.update=fe.Boolean("-u,--update",!1,{description:"Reapply local patches that already apply to this packages"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let u=Y.parseLocator(this.package);if(u.reference==="unknown"){let A=We.mapAndFilter([...o.storedPackages.values()],p=>p.identHash!==u.identHash?We.mapAndFilter.skip:Y.isVirtualLocator(p)?We.mapAndFilter.skip:Vh(p)!==this.update?We.mapAndFilter.skip:p);if(A.length===0)throw new ot("No package found in the project for the given locator");if(A.length>1)throw new ot(`Multiple candidate packages found; explicitly choose one of them (use \`yarn why <package>\` to get more information as to who depends on them):
699${A.map(p=>`
700- ${Y.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new ot("No package found in the project for the given locator");await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=eF(u),h=await xG(u,{cache:n,project:o});A.reportJson({locator:Y.stringifyLocator(p),path:ue.fromPortablePath(h)});let C=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${Y.prettyLocator(r,p)} got extracted with success${C}!`),A.reportInfo(0,`You can now edit the following folder: ${ye.pretty(r,ue.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${ye.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${ue.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};zh.paths=[["patch"]],zh.usage=it.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s <path>` (with `<path>` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "});var wvt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[Jh,zh],fetchers:[Dv],resolvers:[Sv]},Bvt=wvt;var TG={};Yt(TG,{PnpmLinker:()=>Pv,default:()=>xvt});Ke();St();_t();var Pv=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new ot(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new ot(`Couldn't find ${Y.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new ot(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let u=e,A=e;do{A=u,u=J.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(e){return new FG(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},FG=class{constructor(e){this.opts=e;this.asyncActions=new We.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=hD(oe,{indexPath:J.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,o){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,o);case"HARD":return this.installPackageHard(e,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,o){let a=J.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?J.join(a,Lr.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildDirective:null}}async installPackageHard(e,r,o){let a=vvt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,Y.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),o.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await oe.mkdirPromise(n,{recursive:!0}),await oe.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let A=Y.isVirtualLocator(e)?Y.devirtualizeLocator(e):e,p={manifest:await Nt.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Nt,misc:{hasBindingGyp:CA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(A,e.version),C=CA.extractBuildScripts(e,p,h,{configuration:this.opts.project.configuration,report:this.opts.report});return{packageLocation:n,buildDirective:C}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!ove(e,{project:this.opts.project}))return;let o=this.customData.pathsByLocator.get(e.locatorHash);if(typeof o>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${Y.stringifyLocator(e)})`);let{dependenciesLocation:a}=o;!a||this.asyncActions.reduce(e.locatorHash,async n=>{await oe.mkdirPromise(a,{recursive:!0});let u=await Dvt(a),A=new Map(u),p=[n],h=(w,v)=>{let b=v;ove(v,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),b=Y.devirtualizeLocator(v));let E=this.customData.pathsByLocator.get(b.locatorHash);if(typeof E>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${Y.stringifyLocator(v)})`);let R=Y.stringifyIdent(w),L=J.join(a,R),_=J.relative(J.dirname(L),E.packageLocation),V=A.get(R);A.delete(R),p.push(Promise.resolve().then(async()=>{if(V){if(V.isSymbolicLink()&&await oe.readlinkPromise(L)===_)return;await oe.removePromise(L)}await oe.mkdirpPromise(J.dirname(L)),process.platform=="win32"&&this.opts.project.configuration.get("winLinkType")==="junctions"?await oe.symlinkPromise(E.packageLocation,L,"junction"):await oe.symlinkPromise(_,L)}))},C=!1;for(let[w,v]of r)w.identHash===e.identHash&&(C=!0),h(w,v);!C&&!this.opts.project.tryWorkspaceByLocator(e)&&h(Y.convertLocatorToDescriptor(e),e),p.push(Svt(a,A)),await Promise.all(p)})}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the pnpm linker")}async finalizeInstall(){let e=lve(this.opts.project);if(this.opts.project.configuration.get("nodeLinker")!=="pnpm")await oe.removePromise(e);else{let r;try{r=new Set(await oe.readdirPromise(e))}catch{r=new Set}for(let{dependenciesLocation:o}of this.customData.pathsByLocator.values()){if(!o)continue;let a=J.contains(e,o);if(a===null)continue;let[n]=a.split(J.sep);r.delete(n)}await Promise.all([...r].map(async o=>{await oe.removePromise(J.join(e,o))}))}return await this.asyncActions.wait(),await RG(e),this.opts.project.configuration.get("nodeLinker")!=="node-modules"&&await RG(ave(this.opts.project)),{customData:this.customData}}};function ave(t){return J.join(t.cwd,Lr.nodeModules)}function lve(t){return J.join(ave(t),".store")}function vvt(t,{project:e}){let r=Y.slugifyLocator(t),o=lve(e),a=J.join(o,r,"package"),n=J.join(o,r,Lr.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function ove(t,{project:e}){return!Y.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function Dvt(t){let e=new Map,r=[];try{r=await oe.readdirPromise(t,{withFileTypes:!0})}catch(o){if(o.code!=="ENOENT")throw o}try{for(let o of r)if(!o.name.startsWith("."))if(o.name.startsWith("@")){let a=await oe.readdirPromise(J.join(t,o.name),{withFileTypes:!0});if(a.length===0)e.set(o.name,o);else for(let n of a)e.set(`${o.name}/${n.name}`,n)}else e.set(o.name,o)}catch(o){if(o.code!=="ENOENT")throw o}return e}async function Svt(t,e){var a;let r=[],o=new Set;for(let n of e.keys()){r.push(oe.removePromise(J.join(t,n)));let u=(a=Y.tryParseIdent(n))==null?void 0:a.scope;u&&o.add(`@${u}`)}return Promise.all(r).then(()=>Promise.all([...o].map(n=>RG(J.join(t,n)))))}async function RG(t){try{await oe.rmdirPromise(t)}catch(e){if(e.code!=="ENOENT"&&e.code!=="ENOTEMPTY")throw e}}var Pvt={linkers:[Pv]},xvt=Pvt;var _G={};Yt(_G,{StageCommand:()=>Xh,default:()=>Uvt,stageUtils:()=>bv});Ke();St();_t();Ke();St();var bv={};Yt(bv,{ActionType:()=>NG,checkConsensus:()=>rF,expandDirectory:()=>OG,findConsensus:()=>MG,findVcsRoot:()=>xv,genCommitMessage:()=>UG,getCommitPrefix:()=>cve,isYarnFile:()=>LG});St();var NG=(n=>(n[n.CREATE=0]="CREATE",n[n.DELETE=1]="DELETE",n[n.ADD=2]="ADD",n[n.REMOVE=3]="REMOVE",n[n.MODIFY=4]="MODIFY",n))(NG||{});async function xv(t,{marker:e}){do if(!oe.existsSync(J.join(t,e)))t=J.dirname(t);else return t;while(t!=="/");return null}function LG(t,{roots:e,names:r}){if(r.has(J.basename(t)))return!0;do if(!e.has(t))t=J.dirname(t);else return!0;while(t!=="/");return!1}function OG(t){let e=[],r=[t];for(;r.length>0;){let o=r.pop(),a=oe.readdirSync(o);for(let n of a){let u=J.resolve(o,n);oe.lstatSync(u).isDirectory()?r.push(u):e.push(u)}}return e}function rF(t,e){let r=0,o=0;for(let a of t)a!=="wip"&&(e.test(a)?r+=1:o+=1);return r>=o}function MG(t){let e=rF(t,/^(\w\(\w+\):\s*)?\w+s/),r=rF(t,/^(\w\(\w+\):\s*)?[A-Z]/),o=rF(t,/^\w\(\w+\):/);return{useThirdPerson:e,useUpperCase:r,useComponent:o}}function cve(t){return t.useComponent?"chore(yarn): ":""}var bvt=new Map([[0,"create"],[1,"delete"],[2,"add"],[3,"remove"],[4,"update"]]);function UG(t,e){let r=cve(t),o=[],a=e.slice().sort((n,u)=>n[0]-u[0]);for(;a.length>0;){let[n,u]=a.shift(),A=bvt.get(n);t.useUpperCase&&o.length===0&&(A=`${A[0].toUpperCase()}${A.slice(1)}`),t.useThirdPerson&&(A+="s");let p=[u];for(;a.length>0&&a[0][0]===n;){let[,C]=a.shift();p.push(C)}p.sort();let h=p.shift();p.length===1?h+=" (and one other)":p.length>1&&(h+=` (and ${p.length} others)`),o.push(`${A} ${h}`)}return`${r}${o.join(", ")}`}var Qvt="Commit generated via `yarn stage`",kvt=11;async function uve(t){let{code:e,stdout:r}=await Mr.execvp("git",["log","-1","--pretty=format:%H"],{cwd:t});return e===0?r.trim():null}async function Fvt(t,e){let r=[],o=e.filter(h=>J.basename(h.path)==="package.json");for(let{action:h,path:C}of o){let w=J.relative(t,C);if(h===4){let v=await uve(t),{stdout:b}=await Mr.execvp("git",["show",`${v}:${w}`],{cwd:t,strict:!0}),E=await Nt.fromText(b),R=await Nt.fromFile(C),L=new Map([...R.dependencies,...R.devDependencies]),_=new Map([...E.dependencies,...E.devDependencies]);for(let[V,re]of _){let ae=Y.stringifyIdent(re),he=L.get(V);he?he.range!==re.range&&r.push([4,`${ae} to ${he.range}`]):r.push([3,ae])}for(let[V,re]of L)_.has(V)||r.push([2,Y.stringifyIdent(re)])}else if(h===0){let v=await Nt.fromFile(C);v.name?r.push([0,Y.stringifyIdent(v.name)]):r.push([0,"a package"])}else if(h===1){let v=await uve(t),{stdout:b}=await Mr.execvp("git",["show",`${v}:${w}`],{cwd:t,strict:!0}),E=await Nt.fromText(b);E.name?r.push([1,Y.stringifyIdent(E.name)]):r.push([1,"a package"])}else throw new Error("Assertion failed: Unsupported action type")}let{code:a,stdout:n}=await Mr.execvp("git",["log",`-${kvt}`,"--pretty=format:%s"],{cwd:t}),u=a===0?n.split(/\n/g).filter(h=>h!==""):[],A=MG(u);return UG(A,r)}var Rvt={[0]:[" A ","?? "],[4]:[" M "],[1]:[" D "]},Tvt={[0]:["A "],[4]:["M "],[1]:["D "]},Ave={async findRoot(t){return await xv(t,{marker:".git"})},async filterChanges(t,e,r,o){let{stdout:a}=await Mr.execvp("git",["status","-s"],{cwd:t,strict:!0}),n=a.toString().split(/\n/g),u=o!=null&&o.staged?Tvt:Rvt;return[].concat(...n.map(p=>{if(p==="")return[];let h=p.slice(0,3),C=J.resolve(t,p.slice(3));if(!(o!=null&&o.staged)&&h==="?? "&&p.endsWith("/"))return OG(C).map(w=>({action:0,path:w}));{let v=[0,4,1].find(b=>u[b].includes(h));return v!==void 0?[{action:v,path:C}]:[]}})).filter(p=>LG(p.path,{roots:e,names:r}))},async genCommitMessage(t,e){return await Fvt(t,e)},async makeStage(t,e){let r=e.map(o=>ue.fromPortablePath(o.path));await Mr.execvp("git",["add","--",...r],{cwd:t,strict:!0})},async makeCommit(t,e,r){let o=e.map(a=>ue.fromPortablePath(a.path));await Mr.execvp("git",["add","-N","--",...o],{cwd:t,strict:!0}),await Mr.execvp("git",["commit","-m",`${r}
701
702${Qvt}
703`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>ue.fromPortablePath(o.path));await Mr.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var fve={async findRoot(t){return await xv(t,{marker:".hg"})},async filterChanges(t,e,r){return[]},async genCommitMessage(t,e){return""},async makeStage(t,e){},async makeCommit(t,e,r){},async makeReset(t,e){},async makeUpdate(t,e){}};var Nvt=[Ave,fve],Xh=class extends ct{constructor(){super(...arguments);this.commit=fe.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=fe.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=fe.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=fe.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),{driver:a,root:n}=await Lvt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(w=>w.populateYarnPaths,o,w=>{u.push(w)});let A=new Set;for(let w of u)for(let v of Ovt(n,w))A.add(v);let p=new Set([r.get("rcFilename"),r.get("lockfileFilename"),"package.json"]),h=await a.filterChanges(n,A,p),C=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${C}
704`);else for(let w of h)this.context.stdout.write(`${ue.fromPortablePath(w.path)}
705`);else if(this.reset){let w=await a.filterChanges(n,A,p,{staged:!0});w.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,w)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,C):(await a.makeStage(n,h),this.context.stdout.write(C))}};Xh.paths=[["stage"]],Xh.usage=it.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]});async function Lvt(t){let e=null,r=null;for(let o of Nvt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new ot("No stage driver has been found for your current project");return{driver:e,root:r}}function Ovt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=oe.statSync(e)}catch{break}if(o.isSymbolicLink())e=J.resolve(J.dirname(e),oe.readlinkSync(e));else break}return r}var Mvt={commands:[Xh]},Uvt=Mvt;var HG={};Yt(HG,{default:()=>Kvt});Ke();Ke();St();var gve=tt(si());Ke();var pve=tt(XH()),_vt="e8e1bd300d860104bb8c58453ffa1eb4",Hvt="OFCNCOG2CU",hve=async(t,e)=>{var n;let r=Y.stringifyIdent(t),a=qvt(e).initIndex("npm-search");try{return((n=(await a.getObject(r,{attributesToRetrieve:["types"]})).types)==null?void 0:n.ts)==="definitely-typed"}catch{return!1}},qvt=t=>(0,pve.default)(Hvt,_vt,{requester:{async send(r){try{let o=await ln.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var dve=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,jvt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??oe.existsSync(J.join(a.cwd,"tsconfig.json"))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new xi};if(!await hve(r,n))return;let C=dve(r),w=Y.parseRange(r.range).selector;if(!Tr.validRange(w)){let L=n.normalizeDependency(r),_=await A.getCandidates(L,{},p);w=Y.parseRange(_[0].reference).selector}let v=gve.default.coerce(w);if(v===null)return;let b=`${tu.Modifier.CARET}${v.major}`,E=Y.makeDescriptor(Y.makeIdent("types",C),b),R=We.mapAndFind(a.workspaces,L=>{var ae,he;let _=(ae=L.manifest.dependencies.get(r.identHash))==null?void 0:ae.descriptorHash,V=(he=L.manifest.devDependencies.get(r.identHash))==null?void 0:he.descriptorHash;if(_!==r.descriptorHash&&V!==r.descriptorHash)return We.mapAndFind.skip;let re=[];for(let pe of Nt.allDependencies){let De=L.manifest[pe].get(E.identHash);typeof De>"u"||re.push([pe,De])}return re.length===0?We.mapAndFind.skip:re});if(typeof R<"u")for(let[L,_]of R)t.manifest[L].set(_.identHash,_);else{try{let L=n.normalizeDependency(E);if((await A.getCandidates(L,{},p)).length===0)return}catch{return}t.manifest[tu.Target.DEVELOPMENT].set(E.identHash,E)}},Gvt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??oe.existsSync(J.join(o.cwd,"tsconfig.json"))))return;let u=dve(r),A=Y.makeIdent("types",u);for(let p of Nt.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.identHash)},Wvt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},Yvt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:jvt,afterWorkspaceDependencyRemoval:Gvt,beforeWorkspacePacking:Wvt}},Kvt=Yvt;var YG={};Yt(YG,{VersionApplyCommand:()=>Zh,VersionCheckCommand:()=>$h,VersionCommand:()=>eg,default:()=>fDt,versionUtils:()=>lI});Ke();Ke();_t();var lI={};Yt(lI,{Decision:()=>oI,applyPrerelease:()=>wve,applyReleases:()=>WG,applyStrategy:()=>iF,clearVersionFiles:()=>qG,getUndecidedDependentWorkspaces:()=>kv,getUndecidedWorkspaces:()=>nF,openVersionFile:()=>aI,requireMoreDecisions:()=>cDt,resolveVersionFiles:()=>Qv,suggestStrategy:()=>GG,updateVersionFiles:()=>jG,validateReleaseDecision:()=>sI});Ke();St();Hl();_t();var Ive=tt(Cve()),PA=tt(si()),lDt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,oI=(u=>(u.UNDECIDED="undecided",u.DECLINE="decline",u.MAJOR="major",u.MINOR="minor",u.PATCH="patch",u.PRERELEASE="prerelease",u))(oI||{});function sI(t){let e=PA.default.valid(t);return e||We.validateEnum((0,Ive.default)(oI,"UNDECIDED"),t)}async function Qv(t,{prerelease:e=null}={}){let r=new Map,o=t.configuration.get("deferredVersionFolder");if(!oe.existsSync(o))return r;let a=await oe.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=J.join(o,n),A=await oe.readFilePromise(u,"utf8"),p=Yi(A);for(let[h,C]of Object.entries(p.releases||{})){if(C==="decline")continue;let w=Y.parseIdent(h),v=t.tryWorkspaceByIdent(w);if(v===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${J.basename(u)} references ${h})`);if(v.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${Y.prettyLocator(t.configuration,v.anchoredLocator)})`);let b=v.manifest.raw.stableVersion??v.manifest.version,E=r.get(v),R=iF(b,sI(C));if(R===null)throw new Error(`Assertion failed: Expected ${b} to support being bumped via strategy ${C}`);let L=typeof E<"u"?PA.default.gt(R,E)?R:E:R;r.set(v,L)}}return e&&(r=new Map([...r].map(([n,u])=>[n,wve(u,{current:n.manifest.version,prerelease:e})]))),r}async function qG(t){let e=t.configuration.get("deferredVersionFolder");!oe.existsSync(e)||await oe.removePromise(e)}async function jG(t,e){let r=new Set(e),o=t.configuration.get("deferredVersionFolder");if(!oe.existsSync(o))return;let a=await oe.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=J.join(o,n),A=await oe.readFilePromise(u,"utf8"),p=Yi(A),h=p==null?void 0:p.releases;if(!!h){for(let C of Object.keys(h)){let w=Y.parseIdent(C),v=t.tryWorkspaceByIdent(w);(v===null||r.has(v))&&delete p.releases[C]}Object.keys(p.releases).length>0?await oe.changeFilePromise(u,Ba(new Ba.PreserveOrdering(p))):await oe.unlinkPromise(u)}}}async function aI(t,{allowEmpty:e=!1}={}){let r=t.configuration;if(r.projectCwd===null)throw new ot("This command can only be run from within a Yarn project");let o=await ea.fetchRoot(r.projectCwd),a=o!==null?await ea.fetchBase(o,{baseRefs:r.get("changesetBaseRefs")}):null,n=o!==null?await ea.fetchChangedFiles(o,{base:a.hash,project:t}):[],u=r.get("deferredVersionFolder"),A=n.filter(b=>J.contains(u,b)!==null);if(A.length>1)throw new ot(`Your current branch contains multiple versioning files; this isn't supported:
706- ${A.map(b=>ue.fromPortablePath(b)).join(`
707- `)}`);let p=new Set(We.mapAndFilter(n,b=>{let E=t.tryWorkspaceByFilePath(b);return E===null?We.mapAndFilter.skip:E}));if(A.length===0&&p.size===0&&!e)return null;let h=A.length===1?A[0]:J.join(u,`${bn.makeHash(Math.random().toString()).slice(0,8)}.yml`),C=oe.existsSync(h)?await oe.readFilePromise(h,"utf8"):"{}",w=Yi(C),v=new Map;for(let b of w.declined||[]){let E=Y.parseIdent(b),R=t.getWorkspaceByIdent(E);v.set(R,"decline")}for(let[b,E]of Object.entries(w.releases||{})){let R=Y.parseIdent(b),L=t.getWorkspaceByIdent(R);v.set(L,sI(E))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(b=>b.manifest.version!==null)),releases:v,async saveAll(){let b={},E=[],R=[];for(let L of t.workspaces){if(L.manifest.version===null)continue;let _=Y.stringifyIdent(L.locator),V=v.get(L);V==="decline"?E.push(_):typeof V<"u"?b[_]=sI(V):p.has(L)&&R.push(_)}await oe.mkdirPromise(J.dirname(h),{recursive:!0}),await oe.changeFilePromise(h,Ba(new Ba.PreserveOrdering({releases:Object.keys(b).length>0?b:void 0,declined:E.length>0?E:void 0,undecided:R.length>0?R:void 0})))}}}function cDt(t){return nF(t).size>0||kv(t).length>0}function nF(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function kv(t,{include:e=new Set}={}){let r=[],o=new Map(We.mapAndFilter([...t.releases],([n,u])=>u==="decline"?We.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(We.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?We.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of Nt.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function GG(t,e){let r=PA.default.clean(e);for(let o of Object.values(oI))if(o!=="undecided"&&o!=="decline"&&PA.default.inc(t,o)===r)return o;return null}function iF(t,e){if(PA.default.valid(e))return e;if(t===null)throw new ot(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!PA.default.valid(t))throw new ot(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=PA.default.inc(t,e);if(r===null)throw new ot(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function WG(t,e,{report:r}){let o=new Map;for(let a of t.workspaces)for(let n of Nt.allDependencies)for(let u of a.manifest[n].values()){let A=t.tryWorkspaceByDescriptor(u);if(A===null||!e.has(A))continue;We.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of e){let u=a.manifest.version;a.manifest.version=n,PA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?Y.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${Y.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:ue.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,C,w]of p){let v=h.manifest[C].get(w);if(typeof v>"u")throw new Error("Assertion failed: The dependency should have existed");let b=v.range,E=!1;if(b.startsWith(Gn.protocol)&&(b=b.slice(Gn.protocol.length),E=!0,b===a.relativeCwd))continue;let R=b.match(lDt);if(!R){r.reportWarning(0,`Couldn't auto-upgrade range ${b} (in ${Y.prettyLocator(t.configuration,h.anchoredLocator)})`);continue}let L=`${R[1]}${n}`;E&&(L=`${Gn.protocol}${L}`);let _=Y.makeDescriptor(v,L);h.manifest[C].set(w,_)}}}var uDt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function wve(t,{current:e,prerelease:r}){let o=new PA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=uDt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():u=!1;else{let C=u?h.extract(a):null;C!==null&&typeof C[0]=="number"?(n.push(h.generate(C[0])),a=C[1]):(n.push(h.generate()),u=!1)}}return o.prerelease&&(o.prerelease=[]),`${t}-${n.join(".")}`}var Zh=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=fe.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=fe.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.recursive=fe.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await Qv(o,{prerelease:p}),C=new Map;if(this.all)C=h;else{let w=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let v of w){let b=h.get(v);typeof b<"u"&&C.set(v,b)}}if(C.size===0){let w=h.size>0?" Did you want to add --all?":"";A.reportWarning(0,`The current workspace doesn't seem to require a version bump.${w}`);return}WG(o,C,{report:A}),this.dryRun||(p||(this.all?await qG(o):await jG(o,[...C.keys()])),A.reportSeparator(),await o.install({cache:n,report:A}))})).exitCode()}};Zh.paths=[["version","apply"]],Zh.usage=it.Usage({category:"Release-related commands",description:"apply all the deferred version bumps at once",details:`
708 This command will apply the deferred version changes and remove their definitions from the repository.
709
710 Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%d\`) will be used on all new versions and the version definitions will be kept as-is.
711
712 By default only the current workspace will be bumped, but you can configure this behavior by using one of:
713
714 - \`--recursive\` to also apply the version bump on its dependencies
715 - \`--all\` to apply the version bump on all packages in the repository
716
717 Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
718 `,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});Ke();St();_t();var sF=tt(si());var $h=class extends ct{constructor(){super(...arguments);this.interactive=fe.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){wC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(ik(),vq)),{ScrollableItems:o}=await Promise.resolve().then(()=>(lk(),ak)),{FocusRequest:a}=await Promise.resolve().then(()=>(Sq(),mwe)),{useListInput:n}=await Promise.resolve().then(()=>(ok(),ywe)),{renderForm:u}=await Promise.resolve().then(()=>(fk(),Ak)),{Box:A,Text:p}=await Promise.resolve().then(()=>tt(uc())),{default:h,useCallback:C,useState:w}=await Promise.resolve().then(()=>tt(en())),v=await Xe.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,this.context.cwd);if(!E)throw new er(b.cwd,this.context.cwd);await b.restoreInstallState();let R=await aI(b);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new ot("This command can only be run on Git repositories");let L=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),_=({workspace:De,active:ge,decision:le,setDecision:Pe})=>{let g=De.manifest.raw.stableVersion??De.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${Y.prettyLocator(v,De.anchoredLocator)})`);if(sF.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let ve=["undecided","decline","patch","minor","major"];n(le,ve,{active:ge,minus:"left",plus:"right",set:Pe});let Ee=le==="undecided"?h.createElement(p,{color:"yellow"},g):le==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},sF.default.valid(le)?le:sF.default.inc(g,le)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,Y.prettyLocator(v,De.anchoredLocator)," - ",Ee)),h.createElement(A,null,ve.map(de=>h.createElement(A,{key:de,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:de===le})," ",de)))))},V=De=>{let ge=new Set(R.releaseRoots),le=new Map([...De].filter(([Pe])=>ge.has(Pe)));for(;;){let Pe=kv({project:R.project,releases:le}),g=!1;if(Pe.length>0){for(let[ve]of Pe)if(!ge.has(ve)){ge.add(ve),g=!0;let Ee=De.get(ve);typeof Ee<"u"&&le.set(ve,Ee)}}if(!g)break}return{relevantWorkspaces:ge,relevantReleases:le}},re=()=>{let[De,ge]=w(()=>new Map(R.releases)),le=C((Pe,g)=>{let ve=new Map(De);g!=="undecided"?ve.set(Pe,g):ve.delete(Pe);let{relevantReleases:Ee}=V(ve);ge(Ee)},[De,ge]);return[De,le]},ae=({workspaces:De,releases:ge})=>{let le=[];le.push(`${De.size} total`);let Pe=0,g=0;for(let ve of De){let Ee=ge.get(ve);typeof Ee>"u"?g+=1:Ee!=="decline"&&(Pe+=1)}return le.push(`${Pe} release${Pe===1?"":"s"}`),le.push(`${g} remaining`),h.createElement(p,{color:"yellow"},le.join(", "))},pe=await u(({useSubmit:De})=>{let[ge,le]=re();De(ge);let{relevantWorkspaces:Pe}=V(ge),g=new Set([...Pe].filter(ne=>!R.releaseRoots.has(ne))),[ve,Ee]=w(0),de=C(ne=>{switch(ne){case a.BEFORE:Ee(ve-1);break;case a.AFTER:Ee(ve+1);break}},[ve,Ee]);return h.createElement(A,{flexDirection:"column"},h.createElement(L,null),h.createElement(A,null,h.createElement(p,{wrap:"wrap"},"The following files have been modified in your local checkout.")),h.createElement(A,{flexDirection:"column",marginTop:1,paddingLeft:2},[...R.changedFiles].map(ne=>h.createElement(A,{key:ne},h.createElement(p,null,h.createElement(p,{color:"grey"},ue.fromPortablePath(R.root)),ue.sep,ue.relative(ue.fromPortablePath(R.root),ue.fromPortablePath(ne)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(A,{marginTop:1},h.createElement(p,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):")),g.size>3?h.createElement(A,{marginTop:1},h.createElement(ae,{workspaces:R.releaseRoots,releases:ge})):null,h.createElement(A,{marginTop:1,flexDirection:"column"},h.createElement(o,{active:ve%2===0,radius:1,size:2,onFocusRequest:de},[...R.releaseRoots].map(ne=>h.createElement(_,{key:ne.cwd,workspace:ne,decision:ge.get(ne)||"undecided",setDecision:Z=>le(ne,Z)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(A,{marginTop:1},h.createElement(p,{wrap:"wrap"},"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:")),h.createElement(A,null,h.createElement(p,null,"(Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<tab>")," to move the focus between the workspace groups.)")),g.size>5?h.createElement(A,{marginTop:1},h.createElement(ae,{workspaces:g,releases:ge})):null,h.createElement(A,{marginTop:1,flexDirection:"column"},h.createElement(o,{active:ve%2===1,radius:2,size:2,onFocusRequest:de},[...g].map(ne=>h.createElement(_,{key:ne.cwd,workspace:ne,decision:ge.get(ne)||"undecided",setDecision:Z=>le(ne,Z)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof pe>"u")return 1;R.releases.clear();for(let[De,ge]of pe)R.releases.set(De,ge);await R.saveAll()}async executeStandard(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);return await o.restoreInstallState(),(await Ct.start({configuration:r,stdout:this.context.stdout},async u=>{let A=await aI(o);if(A===null||A.releaseRoots.size===0)return;if(A.root===null)throw new ot("This command can only be run on Git repositories");if(u.reportInfo(0,`Your PR was started right after ${ye.pretty(r,A.baseHash.slice(0,7),"yellow")} ${ye.pretty(r,A.baseTitle,"magenta")}`),A.changedFiles.size>0){u.reportInfo(0,"You have changed the following files since then:"),u.reportSeparator();for(let v of A.changedFiles)u.reportInfo(null,`${ye.pretty(r,ue.fromPortablePath(A.root),"gray")}${ue.sep}${ue.relative(ue.fromPortablePath(A.root),ue.fromPortablePath(v))}`)}let p=!1,h=!1,C=nF(A);if(C.size>0){p||u.reportSeparator();for(let v of C)u.reportError(0,`${Y.prettyLocator(r,v.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let w=kv(A);for(let[v,b]of w)h||u.reportSeparator(),u.reportError(0,`${Y.prettyLocator(r,v.anchoredLocator)} doesn't have a release strategy attached, but depends on ${Y.prettyWorkspace(r,b)} which is planned for release.`),h=!0;(p||h)&&(u.reportSeparator(),u.reportInfo(0,"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed)."),u.reportInfo(0,"To correct these errors, run `yarn version check --interactive` then follow the instructions."))})).exitCode()}};$h.paths=[["version","check"]],$h.usage=it.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]});Ke();_t();var oF=tt(si());var eg=class extends ct{constructor(){super(...arguments);this.deferred=fe.Boolean("-d,--deferred",{description:"Prepare the version to be bumped during the next release cycle"});this.immediate=fe.Boolean("-i,--immediate",{description:"Bump the version immediately"});this.strategy=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);let n=r.get("preferDeferredVersions");this.deferred&&(n=!0),this.immediate&&(n=!1);let u=oF.default.valid(this.strategy),A=this.strategy==="decline",p;if(u)if(a.manifest.version!==null){let C=GG(a.manifest.version,this.strategy);C!==null?p=C:p=this.strategy}else p=this.strategy;else{let C=a.manifest.version;if(!A){if(C===null)throw new ot("Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.");if(typeof C!="string"||!oF.default.valid(C))throw new ot(`Can't bump the version (${C}) if it's not valid semver`)}p=sI(this.strategy)}if(!n){let w=(await Qv(o)).get(a);if(typeof w<"u"&&p!=="decline"){let v=iF(a.manifest.version,p);if(oF.default.lt(v,w))throw new ot(`Can't bump the version to one that would be lower than the current deferred one (${w})`)}}let h=await aI(o,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run(["version","apply"])}};eg.paths=[["version"]],eg.usage=it.Usage({category:"Release-related commands",description:"apply a new version to the current package",details:"\n This command will bump the version number for the given package, following the specified strategy:\n\n - If `major`, the first number from the semver range will be increased (`X.0.0`).\n - If `minor`, the second number from the semver range will be increased (`0.X.0`).\n - If `patch`, the third number from the semver range will be increased (`0.0.X`).\n - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\n - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\n - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\n - If a valid semver range, it will be used as new version.\n - If unspecified, Yarn will ask you for guidance.\n\n For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\n ",examples:[["Immediately bump the version to the next major","yarn version major"],["Prepare the version to be bumped to the next major","yarn version major --deferred"]]});var ADt={configuration:{deferredVersionFolder:{description:"Folder where are stored the versioning files",type:"ABSOLUTE_PATH",default:"./.yarn/versions"},preferDeferredVersions:{description:"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set",type:"BOOLEAN",default:!1}},commands:[Zh,$h,eg]},fDt=ADt;var KG={};Yt(KG,{WorkspacesFocusCommand:()=>tg,WorkspacesForeachCommand:()=>rg,default:()=>gDt});Ke();Ke();_t();var tg=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=fe.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=fe.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);await o.restoreInstallState({restoreResolutions:!1});let u;if(this.all)u=new Set(o.workspaces);else if(this.workspaces.length===0){if(!a)throw new er(o.cwd,this.context.cwd);u=new Set([a])}else u=new Set(this.workspaces.map(p=>o.getWorkspaceByIdent(Y.parseIdent(p))));for(let p of u)for(let h of this.production?["dependencies"]:Nt.hardDependencies)for(let C of p.manifest.getForScope(h).values()){let w=o.tryWorkspaceByDescriptor(C);w!==null&&u.add(w)}for(let p of o.workspaces)u.has(p)?this.production&&p.manifest.devDependencies.clear():(p.manifest.installConfig=p.manifest.installConfig||{},p.manifest.installConfig.selfReferences=!1,p.manifest.dependencies.clear(),p.manifest.devDependencies.clear(),p.manifest.peerDependencies.clear(),p.manifest.scripts.clear());return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout,includeLogs:!0},async p=>{await o.install({cache:n,report:p,persistProject:!1})})).exitCode()}};tg.paths=[["workspaces","focus"]],tg.usage=it.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});Ke();Ke();Ke();_t();var xm=tt(zo()),vve=tt(nd());rl();var rg=class extends ct{constructor(){super(...arguments);this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.from=fe.Array("--from",[],{description:"An array of glob pattern idents or paths from which to base any recursion"});this.all=fe.Boolean("-A,--all",!1,{description:"Run the command on all workspaces of a project"});this.verbose=fe.Boolean("-v,--verbose",{description:"Prefix each output line with the name of the originating workspace"});this.parallel=fe.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=fe.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=fe.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:MT([Gs(["unlimited"]),td(OT(),[_T(),UT(1)])])});this.topological=fe.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=fe.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=fe.Array("--include",[],{description:"An array of glob pattern idents or paths; only matching workspaces will be traversed"});this.exclude=fe.Array("--exclude",[],{description:"An array of glob pattern idents or paths; matching workspaces won't be traversed"});this.publicOnly=fe.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=fe.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.commandName=fe.String();this.args=fe.Proxy()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!this.all&&!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),u=n.path.length===1&&n.path[0]==="run"&&typeof n.scriptName<"u"?n.scriptName:null;if(n.path.length===0)throw new ot("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let A=this.all?o.topLevelWorkspace:a,p=this.since?Array.from(await ea.fetchChangedWorkspaces({ref:this.since,project:o})):[A,...this.from.length>0?A.getRecursiveWorkspaceChildren():[]],h=le=>xm.default.isMatch(Y.stringifyIdent(le.locator),this.from)||xm.default.isMatch(le.relativeCwd,this.from),C=this.from.length>0?p.filter(h):p,w=new Set([...C,...C.map(le=>[...this.recursive?this.since?le.getRecursiveWorkspaceDependents():le.getRecursiveWorkspaceDependencies():le.getRecursiveWorkspaceChildren()]).flat()]),v=[],b=!1;if(u!=null&&u.includes(":")){for(let le of o.workspaces)if(le.manifest.scripts.has(u)&&(b=!b,b===!1))break}for(let le of w)u&&!le.manifest.scripts.has(u)&&!b&&!(await sn.getWorkspaceAccessibleBinaries(le)).has(u)||u===process.env.npm_lifecycle_event&&le.cwd===a.cwd||this.include.length>0&&!xm.default.isMatch(Y.stringifyIdent(le.locator),this.include)&&!xm.default.isMatch(le.relativeCwd,this.include)||this.exclude.length>0&&(xm.default.isMatch(Y.stringifyIdent(le.locator),this.exclude)||xm.default.isMatch(le.relativeCwd,this.exclude))||this.publicOnly&&le.manifest.private===!0||v.push(le);let E=this.verbose??this.context.stdout.isTTY,R=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(As.availableParallelism()/2):1,L=R===1?!1:this.parallel,_=L?this.interlaced:!0,V=(0,vve.default)(R),re=new Map,ae=new Set,he=0,pe=null,De=!1,ge=await Ct.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async le=>{let Pe=async(g,{commandIndex:ve})=>{if(De)return-1;!L&&E&&ve>1&&le.reportSeparator();let Ee=pDt(g,{configuration:r,verbose:E,commandIndex:ve}),[de,ne]=Bve(le,{prefix:Ee,interlaced:_}),[Z,me]=Bve(le,{prefix:Ee,interlaced:_});try{E&&le.reportInfo(null,`${Ee} Process started`);let be=Date.now(),ut=await this.cli.run([this.commandName,...this.args],{cwd:g.cwd,stdout:de,stderr:Z})||0;de.end(),Z.end(),await ne,await me;let H=Date.now();if(E){let yt=r.get("enableTimers")?`, completed in ${ye.pretty(r,H-be,ye.Type.DURATION)}`:"";le.reportInfo(null,`${Ee} Process exited (exit code ${ut})${yt}`)}return ut===130&&(De=!0,pe=ut),ut}catch(be){throw de.end(),Z.end(),await ne,await me,be}};for(let g of v)re.set(g.anchoredLocator.locatorHash,g);for(;re.size>0&&!le.hasErrors();){let g=[];for(let[de,ne]of re){if(ae.has(ne.anchoredDescriptor.descriptorHash))continue;let Z=!0;if(this.topological||this.topologicalDev){let me=this.topologicalDev?new Map([...ne.manifest.dependencies,...ne.manifest.devDependencies]):ne.manifest.dependencies;for(let be of me.values()){let ut=o.tryWorkspaceByDescriptor(be);if(Z=ut===null||!re.has(ut.anchoredLocator.locatorHash),!Z)break}}if(!!Z&&(ae.add(ne.anchoredDescriptor.descriptorHash),g.push(V(async()=>{let me=await Pe(ne,{commandIndex:++he});return re.delete(de),ae.delete(ne.anchoredDescriptor.descriptorHash),me})),!L))break}if(g.length===0){let de=Array.from(re.values()).map(ne=>Y.prettyLocator(r,ne.anchoredLocator)).join(", ");le.reportError(3,`Dependency cycle detected (${de})`);return}let Ee=(await Promise.all(g)).find(de=>de!==0);pe===null&&(pe=typeof Ee<"u"?1:pe),(this.topological||this.topologicalDev)&&typeof Ee<"u"&&le.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return pe!==null?pe:ge.exitCode()}};rg.paths=[["workspaces","foreach"]],rg.usage=it.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project. By default yarn runs the command only on current and all its descendant workspaces.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n Adding the `-v,--verbose` flag (automatically enabled in interactive terminal environments) will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]});function Bve(t,{prefix:e,interlaced:r}){let o=t.createStreamReporter(e),a=new We.DefaultStream;a.pipe(o,{end:!1}),a.on("finish",()=>{o.end()});let n=new Promise(A=>{o.on("finish",()=>{A(a.active)})});if(r)return[a,n];let u=new We.BufferStream;return u.pipe(a,{end:!1}),u.on("finish",()=>{a.end()}),[u,n]}function pDt(t,{configuration:e,commandIndex:r,verbose:o}){if(!o)return null;let n=`[${Y.stringifyIdent(t.locator)}]:`,u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[r%u.length];return ye.pretty(e,n,A)}var hDt={commands:[tg,rg]},gDt=hDt;var Zb=()=>({modules:new Map([["@yarnpkg/cli",K1],["@yarnpkg/core",Y1],["@yarnpkg/fslib",UI],["@yarnpkg/libzip",HI],["@yarnpkg/parsers",JI],["@yarnpkg/shell",D1],["clipanion",iw],["semver",dDt],["typanion",Yo],["@yarnpkg/plugin-essentials",eH],["@yarnpkg/plugin-compat",sH],["@yarnpkg/plugin-constraints",wH],["@yarnpkg/plugin-dlx",BH],["@yarnpkg/plugin-exec",SH],["@yarnpkg/plugin-file",xH],["@yarnpkg/plugin-git",$8],["@yarnpkg/plugin-github",kH],["@yarnpkg/plugin-http",FH],["@yarnpkg/plugin-init",RH],["@yarnpkg/plugin-interactive-tools",Nq],["@yarnpkg/plugin-link",Lq],["@yarnpkg/plugin-nm",Ej],["@yarnpkg/plugin-npm",dG],["@yarnpkg/plugin-npm-cli",vG],["@yarnpkg/plugin-pack",AG],["@yarnpkg/plugin-patch",kG],["@yarnpkg/plugin-pnp",aj],["@yarnpkg/plugin-pnpm",TG],["@yarnpkg/plugin-stage",_G],["@yarnpkg/plugin-typescript",HG],["@yarnpkg/plugin-version",YG],["@yarnpkg/plugin-workspace-tools",KG]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"])});Xb({binaryVersion:On||"<unknown>",pluginConfiguration:Zb()});})();
719/*
720object-assign
721(c) Sindre Sorhus
722@license MIT
723*/
724/*!
725 * buildToken
726 * Builds OAuth token prefix (helper function)
727 *
728 * @name buildToken
729 * @function
730 * @param {GitUrl} obj The parsed Git url object.
731 * @return {String} token prefix
732 */
733/*!
734 * fill-range <https://github.com/jonschlinkert/fill-range>
735 *
736 * Copyright (c) 2014-present, Jon Schlinkert.
737 * Licensed under the MIT License.
738 */
739/*!
740 * is-extglob <https://github.com/jonschlinkert/is-extglob>
741 *
742 * Copyright (c) 2014-2016, Jon Schlinkert.
743 * Licensed under the MIT License.
744 */
745/*!
746 * is-glob <https://github.com/jonschlinkert/is-glob>
747 *
748 * Copyright (c) 2014-2017, Jon Schlinkert.
749 * Released under the MIT License.
750 */
751/*!
752 * is-number <https://github.com/jonschlinkert/is-number>
753 *
754 * Copyright (c) 2014-present, Jon Schlinkert.
755 * Released under the MIT License.
756 */
757/*!
758 * is-windows <https://github.com/jonschlinkert/is-windows>
759 *
760 * Copyright © 2015-2018, Jon Schlinkert.
761 * Released under the MIT License.
762 */
763/*!
764 * to-regex-range <https://github.com/micromatch/to-regex-range>
765 *
766 * Copyright (c) 2015-present, Jon Schlinkert.
767 * Released under the MIT License.
768 */
769/**
770 @license
771 Copyright (c) 2015, Rebecca Turner
772
773 Permission to use, copy, modify, and/or distribute this software for any
774 purpose with or without fee is hereby granted, provided that the above
775 copyright notice and this permission notice appear in all copies.
776
777 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
778 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
779 FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
780 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
781 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
782 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
783 PERFORMANCE OF THIS SOFTWARE.
784 */
785/**
786 @license
787 Copyright Joyent, Inc. and other Node contributors.
788
789 Permission is hereby granted, free of charge, to any person obtaining a
790 copy of this software and associated documentation files (the
791 "Software"), to deal in the Software without restriction, including
792 without limitation the rights to use, copy, modify, merge, publish,
793 distribute, sublicense, and/or sell copies of the Software, and to permit
794 persons to whom the Software is furnished to do so, subject to the
795 following conditions:
796
797 The above copyright notice and this permission notice shall be included
798 in all copies or substantial portions of the Software.
799
800 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
801 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
802 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
803 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
804 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
805 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
806 USE OR OTHER DEALINGS IN THE SOFTWARE.
807*/
808/**
809 @license
810 Copyright Node.js contributors. All rights reserved.
811
812 Permission is hereby granted, free of charge, to any person obtaining a copy
813 of this software and associated documentation files (the "Software"), to
814 deal in the Software without restriction, including without limitation the
815 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
816 sell copies of the Software, and to permit persons to whom the Software is
817 furnished to do so, subject to the following conditions:
818
819 The above copyright notice and this permission notice shall be included in
820 all copies or substantial portions of the Software.
821
822 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
823 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
824 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
825 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
826 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
827 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
828 IN THE SOFTWARE.
829*/
830/**
831 @license
832 The MIT License (MIT)
833
834 Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
835
836 Permission is hereby granted, free of charge, to any person obtaining a copy
837 of this software and associated documentation files (the "Software"), to deal
838 in the Software without restriction, including without limitation the rights
839 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
840 copies of the Software, and to permit persons to whom the Software is
841 furnished to do so, subject to the following conditions:
842
843 The above copyright notice and this permission notice shall be included in
844 all copies or substantial portions of the Software.
845
846 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
847 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
848 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
849 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
850 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
851 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
852 THE SOFTWARE.
853*/
854/** @license React v0.18.0
855 * scheduler.production.min.js
856 *
857 * Copyright (c) Facebook, Inc. and its affiliates.
858 *
859 * This source code is licensed under the MIT license found in the
860 * LICENSE file in the root directory of this source tree.
861 */
862/** @license React v0.24.0
863 * react-reconciler.production.min.js
864 *
865 * Copyright (c) Facebook, Inc. and its affiliates.
866 *
867 * This source code is licensed under the MIT license found in the
868 * LICENSE file in the root directory of this source tree.
869 */
870/** @license React v16.13.1
871 * react.production.min.js
872 *
873 * Copyright (c) Facebook, Inc. and its affiliates.
874 *
875 * This source code is licensed under the MIT license found in the
876 * LICENSE file in the root directory of this source tree.
877 */
diff --git a/.yarn/releases/yarn-4.0.0-rc.50.cjs b/.yarn/releases/yarn-4.0.0-rc.50.cjs
new file mode 100755
index 00000000..97c6fa21
--- /dev/null
+++ b/.yarn/releases/yarn-4.0.0-rc.50.cjs
@@ -0,0 +1,891 @@
1#!/usr/bin/env node
2/* eslint-disable */
3//prettier-ignore
4(()=>{var X3e=Object.create;var TR=Object.defineProperty;var Z3e=Object.getOwnPropertyDescriptor;var $3e=Object.getOwnPropertyNames;var e_e=Object.getPrototypeOf,t_e=Object.prototype.hasOwnProperty;var Ie=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var yt=(e,t)=>()=>(e&&(t=e(e=0)),t);var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jt=(e,t)=>{for(var r in t)TR(e,r,{get:t[r],enumerable:!0})},r_e=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $3e(t))!t_e.call(e,a)&&a!==r&&TR(e,a,{get:()=>t[a],enumerable:!(o=Z3e(t,a))||o.enumerable});return e};var $e=(e,t,r)=>(r=e!=null?X3e(e_e(e)):{},r_e(t||!e||!e.__esModule?TR(r,"default",{value:e,enumerable:!0}):r,e));var Bi={};Jt(Bi,{SAFE_TIME:()=>x7,S_IFDIR:()=>wD,S_IFLNK:()=>CD,S_IFMT:()=>Uu,S_IFREG:()=>_C});var Uu,wD,_C,CD,x7,b7=yt(()=>{Uu=61440,wD=16384,_C=32768,CD=40960,x7=456789e3});var or={};Jt(or,{EBADF:()=>Io,EBUSY:()=>n_e,EEXIST:()=>c_e,EINVAL:()=>s_e,EISDIR:()=>l_e,ENOENT:()=>o_e,ENOSYS:()=>i_e,ENOTDIR:()=>a_e,ENOTEMPTY:()=>A_e,EOPNOTSUPP:()=>f_e,EROFS:()=>u_e,ERR_DIR_CLOSED:()=>NR});function Rl(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function n_e(e){return Rl("EBUSY",e)}function i_e(e,t){return Rl("ENOSYS",`${e}, ${t}`)}function s_e(e){return Rl("EINVAL",`invalid argument, ${e}`)}function Io(e){return Rl("EBADF",`bad file descriptor, ${e}`)}function o_e(e){return Rl("ENOENT",`no such file or directory, ${e}`)}function a_e(e){return Rl("ENOTDIR",`not a directory, ${e}`)}function l_e(e){return Rl("EISDIR",`illegal operation on a directory, ${e}`)}function c_e(e){return Rl("EEXIST",`file already exists, ${e}`)}function u_e(e){return Rl("EROFS",`read-only filesystem, ${e}`)}function A_e(e){return Rl("ENOTEMPTY",`directory not empty, ${e}`)}function f_e(e){return Rl("EOPNOTSUPP",`operation not supported, ${e}`)}function NR(){return Rl("ERR_DIR_CLOSED","Directory handle was closed")}var ID=yt(()=>{});var Tl={};Jt(Tl,{BigIntStatsEntry:()=>ey,DEFAULT_MODE:()=>MR,DirEntry:()=>LR,StatEntry:()=>$m,areStatsEqual:()=>UR,clearStats:()=>BD,convertToBigIntStats:()=>h_e,makeDefaultStats:()=>Q7,makeEmptyStats:()=>p_e});function Q7(){return new $m}function p_e(){return BD(Q7())}function BD(e){for(let t in e)if(Object.hasOwn(e,t)){let r=e[t];typeof r=="number"?e[t]=0:typeof r=="bigint"?e[t]=BigInt(0):OR.types.isDate(r)&&(e[t]=new Date(0))}return e}function h_e(e){let t=new ey;for(let r in e)if(Object.hasOwn(e,r)){let o=e[r];typeof o=="number"?t[r]=BigInt(o):OR.types.isDate(o)&&(t[r]=new Date(o))}return t.atimeNs=t.atimeMs*BigInt(1e6),t.mtimeNs=t.mtimeMs*BigInt(1e6),t.ctimeNs=t.ctimeMs*BigInt(1e6),t.birthtimeNs=t.birthtimeMs*BigInt(1e6),t}function UR(e,t){if(e.atimeMs!==t.atimeMs||e.birthtimeMs!==t.birthtimeMs||e.blksize!==t.blksize||e.blocks!==t.blocks||e.ctimeMs!==t.ctimeMs||e.dev!==t.dev||e.gid!==t.gid||e.ino!==t.ino||e.isBlockDevice()!==t.isBlockDevice()||e.isCharacterDevice()!==t.isCharacterDevice()||e.isDirectory()!==t.isDirectory()||e.isFIFO()!==t.isFIFO()||e.isFile()!==t.isFile()||e.isSocket()!==t.isSocket()||e.isSymbolicLink()!==t.isSymbolicLink()||e.mode!==t.mode||e.mtimeMs!==t.mtimeMs||e.nlink!==t.nlink||e.rdev!==t.rdev||e.size!==t.size||e.uid!==t.uid)return!1;let r=e,o=t;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var OR,MR,LR,$m,ey,_R=yt(()=>{OR=$e(Ie("util")),MR=33188,LR=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},$m=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=MR;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},ey=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(MR);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function F7(e){if(process.platform!=="win32")return e;let t,r;if(t=e.match(m_e))e=t[1];else if(r=e.match(y_e))e=`\\\\${r[1]?".\\":""}${r[2]}`;else return e;return e.replace(/\//g,"\\")}function HR(e){if(process.platform!=="win32")return e;e=e.replace(/\\/g,"/");let t,r;return(t=e.match(g_e))?e=`/${t[1]}`:(r=e.match(d_e))&&(e=`/unc/${r[1]?".dot/":""}${r[2]}`),e}function vD(e,t){return e===Ae?F7(t):HR(t)}function bi(e){if(Ae.parse(e).dir!==""||J.parse(e).dir!=="")throw new Error(`Invalid filename: "${e}"`);return e}var HC,Bt,gr,Ae,J,k7,g_e,d_e,m_e,y_e,wa=yt(()=>{HC=$e(Ie("path")),Bt={root:"/",dot:".",parent:".."},gr={home:"~",nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",pnpData:".pnp.data.json",pnpEsmLoader:".pnp.loader.mjs",rc:".yarnrc.yml",env:".env"},Ae=Object.create(HC.default),J=Object.create(HC.default.posix);Ae.cwd=()=>process.cwd();J.cwd=()=>HR(process.cwd());J.resolve=(...e)=>e.length>0&&J.isAbsolute(e[0])?HC.default.posix.resolve(...e):HC.default.posix.resolve(J.cwd(),...e);k7=function(e,t,r){return t=e.normalize(t),r=e.normalize(r),t===r?".":(t.endsWith(e.sep)||(t=t+e.sep),r.startsWith(t)?r.slice(t.length):null)};Ae.fromPortablePath=F7;Ae.toPortablePath=HR;Ae.contains=(e,t)=>k7(Ae,e,t);J.contains=(e,t)=>k7(J,e,t);g_e=/^([a-zA-Z]:.*)$/,d_e=/^\/\/(\.\/)?(.*)$/,m_e=/^\/([a-zA-Z]:.*)$/,y_e=/^\/unc\/(\.dot\/)?(.*)$/});async function DD(e,t){let r="0123456789abcdef";await e.mkdirPromise(t.indexPath,{recursive:!0});let o=[];for(let a of r)for(let n of r)o.push(e.mkdirPromise(e.pathUtils.join(t.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(o),t.indexPath}async function R7(e,t,r,o,a){let n=e.pathUtils.normalize(t),u=r.pathUtils.normalize(o),A=[],p=[],{atime:h,mtime:w}=a.stableTime?{atime:Ng,mtime:Ng}:await r.lstatPromise(u);await e.mkdirpPromise(e.pathUtils.dirname(t),{utimes:[h,w]}),await jR(A,p,e,n,r,u,{...a,didParentExist:!0});for(let I of A)await I();await Promise.all(p.map(I=>I()))}async function jR(e,t,r,o,a,n,u){let A=u.didParentExist?await T7(r,o):null,p=await a.lstatPromise(n),{atime:h,mtime:w}=u.stableTime?{atime:Ng,mtime:Ng}:p,I;switch(!0){case p.isDirectory():I=await w_e(e,t,r,o,A,a,n,p,u);break;case p.isFile():I=await B_e(e,t,r,o,A,a,n,p,u);break;case p.isSymbolicLink():I=await v_e(e,t,r,o,A,a,n,p,u);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(u.linkStrategy?.type!=="HardlinkFromIndex"||!p.isFile())&&((I||A?.mtime?.getTime()!==w.getTime()||A?.atime?.getTime()!==h.getTime())&&(t.push(()=>r.lutimesPromise(o,h,w)),I=!0),(A===null||(A.mode&511)!==(p.mode&511))&&(t.push(()=>r.chmodPromise(o,p.mode&511)),I=!0)),I}async function T7(e,t){try{return await e.lstatPromise(t)}catch{return null}}async function w_e(e,t,r,o,a,n,u,A,p){if(a!==null&&!a.isDirectory())if(p.overwrite)e.push(async()=>r.removePromise(o)),a=null;else return!1;let h=!1;a===null&&(e.push(async()=>{try{await r.mkdirPromise(o,{mode:A.mode})}catch(v){if(v.code!=="EEXIST")throw v}}),h=!0);let w=await n.readdirPromise(u),I=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let v of w.sort())await jR(e,t,r,r.pathUtils.join(o,v),n,n.pathUtils.join(u,v),I)&&(h=!0);else(await Promise.all(w.map(async b=>{await jR(e,t,r,r.pathUtils.join(o,b),n,n.pathUtils.join(u,b),I)}))).some(b=>b)&&(h=!0);return h}async function C_e(e,t,r,o,a,n,u,A,p,h){let w=await n.checksumFilePromise(u,{algorithm:"sha1"}),I=r.pathUtils.join(h.indexPath,w.slice(0,2),`${w}.dat`),v;(ee=>(ee[ee.Lock=0]="Lock",ee[ee.Rename=1]="Rename"))(v||={});let b=1,E=await T7(r,I);if(a){let U=E&&a.dev===E.dev&&a.ino===E.ino,V=E?.mtimeMs!==E_e;if(U&&V&&h.autoRepair&&(b=0,E=null),!U)if(p.overwrite)e.push(async()=>r.removePromise(o)),a=null;else return!1}let R=!E&&b===1?`${I}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0")}`:null,N=!1;return e.push(async()=>{if(!E&&(b===0&&await r.lockPromise(I,async()=>{let U=await n.readFilePromise(u);await r.writeFilePromise(I,U)}),b===1&&R)){let U=await n.readFilePromise(u);await r.writeFilePromise(R,U);try{await r.linkPromise(R,I)}catch(V){if(V.code==="EEXIST")N=!0,await r.unlinkPromise(R);else throw V}}a||await r.linkPromise(I,o)}),t.push(async()=>{E||await r.lutimesPromise(I,Ng,Ng),R&&!N&&await r.unlinkPromise(R)}),!1}async function I_e(e,t,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)e.push(async()=>r.removePromise(o)),a=null;else return!1;return e.push(async()=>{let h=await n.readFilePromise(u);await r.writeFilePromise(o,h)}),!0}async function B_e(e,t,r,o,a,n,u,A,p){return p.linkStrategy?.type==="HardlinkFromIndex"?C_e(e,t,r,o,a,n,u,A,p,p.linkStrategy):I_e(e,t,r,o,a,n,u,A,p)}async function v_e(e,t,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)e.push(async()=>r.removePromise(o)),a=null;else return!1;return e.push(async()=>{await r.symlinkPromise(vD(r.pathUtils,await n.readlinkPromise(u)),o)}),!0}var Ng,E_e,qR=yt(()=>{wa();Ng=new Date(456789e3*1e3),E_e=Ng.getTime()});function SD(e,t,r,o){let a=()=>{let n=r.shift();return typeof n>"u"?null:Object.assign(e.statSync(e.pathUtils.join(t,n)),{name:n,path:void 0})};return new jC(t,a,o)}var jC,N7=yt(()=>{ID();jC=class{constructor(t,r,o={}){this.path=t;this.nextDirent=r;this.opts=o;this.closed=!1}throwIfClosed(){if(this.closed)throw NR()}async*[Symbol.asyncIterator](){try{let t;for(;(t=await this.read())!==null;)yield t}finally{await this.close()}}read(t){let r=this.readSync();return typeof t<"u"?t(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(t){return this.closeSync(),typeof t<"u"?t(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function L7(e,t){if(e!==t)throw new Error(`Invalid StatWatcher status: expected '${t}', got '${e}'`)}var O7,ty,M7=yt(()=>{O7=Ie("events");_R();ty=class extends O7.EventEmitter{constructor(r,o,{bigint:a=!1}={}){super();this.status="ready";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=o,this.bigint=a,this.lastStats=this.stat()}static create(r,o,a){let n=new ty(r,o,a);return n.start(),n}start(){L7(this.status,"ready"),this.status="running",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit("change",this.lastStats,this.lastStats)},3)}stop(){L7(this.status,"running"),this.status="stopped",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit("stop")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let o=this.bigint?new ey:new $m;return BD(o)}}makeInterval(r){let o=setInterval(()=>{let a=this.stat(),n=this.lastStats;UR(a,n)||(this.lastStats=a,this.emit("change",a,n))},r.interval);return r.persistent?o:o.unref()}registerChangeListener(r,o){this.addListener("change",r),this.changeListeners.set(r,this.makeInterval(o))}unregisterChangeListener(r){this.removeListener("change",r);let o=this.changeListeners.get(r);typeof o<"u"&&clearInterval(o),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function ry(e,t,r,o){let a,n,u,A;switch(typeof r){case"function":a=!1,n=!0,u=5007,A=r;break;default:({bigint:a=!1,persistent:n=!0,interval:u=5007}=r),A=o;break}let p=PD.get(e);typeof p>"u"&&PD.set(e,p=new Map);let h=p.get(t);return typeof h>"u"&&(h=ty.create(e,t,{bigint:a}),p.set(t,h)),h.registerChangeListener(A,{persistent:n,interval:u}),h}function Lg(e,t,r){let o=PD.get(e);if(typeof o>"u")return;let a=o.get(t);typeof a>"u"||(typeof r>"u"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),o.delete(t)))}function Og(e){let t=PD.get(e);if(!(typeof t>"u"))for(let r of t.keys())Lg(e,r)}var PD,GR=yt(()=>{M7();PD=new WeakMap});function D_e(e){let t=e.match(/\r?\n/g);if(t===null)return _7.EOL;let r=t.filter(a=>a===`\r
5`).length,o=t.length-r;return r>o?`\r
6`:`
7`}function Mg(e,t){return t.replace(/\r?\n/g,D_e(e))}var U7,_7,gf,_u,Ug=yt(()=>{U7=Ie("crypto"),_7=Ie("os");qR();wa();gf=class{constructor(t){this.pathUtils=t}async*genTraversePromise(t,{stableSort:r=!1}={}){let o=[t];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(t,{algorithm:r="sha512"}={}){let o=await this.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,U7.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(t,{recursive:r=!0,maxRetries:o=5}={}){let a;try{a=await this.lstatPromise(t)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(t);await Promise.all(n.map(u=>this.removePromise(this.pathUtils.resolve(t,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(t);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(t)}removeSync(t,{recursive:r=!0}={}){let o;try{o=this.lstatSync(t)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.isDirectory()){if(r)for(let a of this.readdirSync(t))this.removeSync(this.pathUtils.resolve(t,a));this.rmdirSync(t)}else this.unlinkSync(t)}async mkdirpPromise(t,{chmod:r,utimes:o}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(t,{chmod:r,utimes:o}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(t,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await R7(this,t,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(t,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(t);if(n.isDirectory()){this.mkdirpSync(t);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(t,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(t);let p=o.readFileSync(r);this.writeFileSync(t,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(t);let p=o.readlinkSync(r);this.symlinkSync(vD(this.pathUtils,p),t)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(t,A)}async changeFilePromise(t,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(t,r,o):this.changeFileTextPromise(t,r,o)}async changeFileBufferPromise(t,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(t)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(t,r,{mode:o})}async changeFileTextPromise(t,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(t,"utf8")}catch{}let u=o?Mg(n,r):r;n!==u&&await this.writeFilePromise(t,u,{mode:a})}changeFileSync(t,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(t,r,o):this.changeFileTextSync(t,r,o)}changeFileBufferSync(t,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(t)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(t,r,{mode:o})}changeFileTextSync(t,r,{automaticNewlines:o=!1,mode:a}={}){let n="";try{n=this.readFileSync(t,"utf8")}catch{}let u=o?Mg(n,r):r;n!==u&&this.writeFileSync(t,u,{mode:a})}async movePromise(t,r){try{await this.renamePromise(t,r)}catch(o){if(o.code==="EXDEV")await this.copyPromise(r,t),await this.removePromise(t);else throw o}}moveSync(t,r){try{this.renameSync(t,r)}catch(o){if(o.code==="EXDEV")this.copySync(r,t),this.removeSync(t);else throw o}}async lockPromise(t,r){let o=`${t}.flock`,a=1e3/60,n=Date.now(),u=null,A=async()=>{let p;try{[p]=await this.readJsonPromise(o)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;u===null;)try{u=await this.openPromise(o,"wx")}catch(p){if(p.code==="EEXIST"){if(!await A())try{await this.unlinkPromise(o);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${o})`)}else throw p}await this.writePromise(u,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(u),await this.unlinkPromise(o)}catch{}}}async readJsonPromise(t){let r=await this.readFilePromise(t,"utf8");try{return JSON.parse(r)}catch(o){throw o.message+=` (in ${t})`,o}}readJsonSync(t){let r=this.readFileSync(t,"utf8");try{return JSON.parse(r)}catch(o){throw o.message+=` (in ${t})`,o}}async writeJsonPromise(t,r,{compact:o=!1}={}){let a=o?0:2;return await this.writeFilePromise(t,`${JSON.stringify(r,null,a)}
8`)}writeJsonSync(t,r,{compact:o=!1}={}){let a=o?0:2;return this.writeFileSync(t,`${JSON.stringify(r,null,a)}
9`)}async preserveTimePromise(t,r){let o=await this.lstatPromise(t),a=await r();typeof a<"u"&&(t=a),await this.lutimesPromise(t,o.atime,o.mtime)}async preserveTimeSync(t,r){let o=this.lstatSync(t),a=r();typeof a<"u"&&(t=a),this.lutimesSync(t,o.atime,o.mtime)}},_u=class extends gf{constructor(){super(J)}}});var Ps,df=yt(()=>{Ug();Ps=class extends gf{getExtractHint(t){return this.baseFs.getExtractHint(t)}resolve(t){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(t)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(t,r,o){return this.baseFs.openPromise(this.mapToBase(t),r,o)}openSync(t,r,o){return this.baseFs.openSync(this.mapToBase(t),r,o)}async opendirPromise(t,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(t),r),{path:t})}opendirSync(t,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(t),r),{path:t})}async readPromise(t,r,o,a,n){return await this.baseFs.readPromise(t,r,o,a,n)}readSync(t,r,o,a,n){return this.baseFs.readSync(t,r,o,a,n)}async writePromise(t,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(t,r,o):await this.baseFs.writePromise(t,r,o,a,n)}writeSync(t,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(t,r,o):this.baseFs.writeSync(t,r,o,a,n)}async closePromise(t){return this.baseFs.closePromise(t)}closeSync(t){this.baseFs.closeSync(t)}createReadStream(t,r){return this.baseFs.createReadStream(t!==null?this.mapToBase(t):t,r)}createWriteStream(t,r){return this.baseFs.createWriteStream(t!==null?this.mapToBase(t):t,r)}async realpathPromise(t){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(t)))}realpathSync(t){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(t)))}async existsPromise(t){return this.baseFs.existsPromise(this.mapToBase(t))}existsSync(t){return this.baseFs.existsSync(this.mapToBase(t))}accessSync(t,r){return this.baseFs.accessSync(this.mapToBase(t),r)}async accessPromise(t,r){return this.baseFs.accessPromise(this.mapToBase(t),r)}async statPromise(t,r){return this.baseFs.statPromise(this.mapToBase(t),r)}statSync(t,r){return this.baseFs.statSync(this.mapToBase(t),r)}async fstatPromise(t,r){return this.baseFs.fstatPromise(t,r)}fstatSync(t,r){return this.baseFs.fstatSync(t,r)}lstatPromise(t,r){return this.baseFs.lstatPromise(this.mapToBase(t),r)}lstatSync(t,r){return this.baseFs.lstatSync(this.mapToBase(t),r)}async fchmodPromise(t,r){return this.baseFs.fchmodPromise(t,r)}fchmodSync(t,r){return this.baseFs.fchmodSync(t,r)}async chmodPromise(t,r){return this.baseFs.chmodPromise(this.mapToBase(t),r)}chmodSync(t,r){return this.baseFs.chmodSync(this.mapToBase(t),r)}async fchownPromise(t,r,o){return this.baseFs.fchownPromise(t,r,o)}fchownSync(t,r,o){return this.baseFs.fchownSync(t,r,o)}async chownPromise(t,r,o){return this.baseFs.chownPromise(this.mapToBase(t),r,o)}chownSync(t,r,o){return this.baseFs.chownSync(this.mapToBase(t),r,o)}async renamePromise(t,r){return this.baseFs.renamePromise(this.mapToBase(t),this.mapToBase(r))}renameSync(t,r){return this.baseFs.renameSync(this.mapToBase(t),this.mapToBase(r))}async copyFilePromise(t,r,o=0){return this.baseFs.copyFilePromise(this.mapToBase(t),this.mapToBase(r),o)}copyFileSync(t,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(t),this.mapToBase(r),o)}async appendFilePromise(t,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(t),r,o)}appendFileSync(t,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(t),r,o)}async writeFilePromise(t,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(t),r,o)}writeFileSync(t,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(t),r,o)}async unlinkPromise(t){return this.baseFs.unlinkPromise(this.mapToBase(t))}unlinkSync(t){return this.baseFs.unlinkSync(this.mapToBase(t))}async utimesPromise(t,r,o){return this.baseFs.utimesPromise(this.mapToBase(t),r,o)}utimesSync(t,r,o){return this.baseFs.utimesSync(this.mapToBase(t),r,o)}async lutimesPromise(t,r,o){return this.baseFs.lutimesPromise(this.mapToBase(t),r,o)}lutimesSync(t,r,o){return this.baseFs.lutimesSync(this.mapToBase(t),r,o)}async mkdirPromise(t,r){return this.baseFs.mkdirPromise(this.mapToBase(t),r)}mkdirSync(t,r){return this.baseFs.mkdirSync(this.mapToBase(t),r)}async rmdirPromise(t,r){return this.baseFs.rmdirPromise(this.mapToBase(t),r)}rmdirSync(t,r){return this.baseFs.rmdirSync(this.mapToBase(t),r)}async linkPromise(t,r){return this.baseFs.linkPromise(this.mapToBase(t),this.mapToBase(r))}linkSync(t,r){return this.baseFs.linkSync(this.mapToBase(t),this.mapToBase(r))}async symlinkPromise(t,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(t))return this.baseFs.symlinkPromise(this.mapToBase(t),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),t)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(u,a,o)}symlinkSync(t,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(t))return this.baseFs.symlinkSync(this.mapToBase(t),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),t)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(u,a,o)}async readFilePromise(t,r){return this.baseFs.readFilePromise(this.fsMapToBase(t),r)}readFileSync(t,r){return this.baseFs.readFileSync(this.fsMapToBase(t),r)}readdirPromise(t,r){return this.baseFs.readdirPromise(this.mapToBase(t),r)}readdirSync(t,r){return this.baseFs.readdirSync(this.mapToBase(t),r)}async readlinkPromise(t){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(t)))}readlinkSync(t){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(t)))}async truncatePromise(t,r){return this.baseFs.truncatePromise(this.mapToBase(t),r)}truncateSync(t,r){return this.baseFs.truncateSync(this.mapToBase(t),r)}async ftruncatePromise(t,r){return this.baseFs.ftruncatePromise(t,r)}ftruncateSync(t,r){return this.baseFs.ftruncateSync(t,r)}watch(t,r,o){return this.baseFs.watch(this.mapToBase(t),r,o)}watchFile(t,r,o){return this.baseFs.watchFile(this.mapToBase(t),r,o)}unwatchFile(t,r){return this.baseFs.unwatchFile(this.mapToBase(t),r)}fsMapToBase(t){return typeof t=="number"?t:this.mapToBase(t)}}});var Hu,H7=yt(()=>{df();Hu=class extends Ps{constructor(r,{baseFs:o,pathUtils:a}){super(a);this.target=r,this.baseFs=o}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(r){return r}mapToBase(r){return r}}});var j7,Rn,_g=yt(()=>{j7=$e(Ie("fs"));Ug();wa();Rn=class extends _u{constructor(r=j7.default){super();this.realFs=r}getExtractHint(){return!1}getRealPath(){return Bt.root}resolve(r){return J.resolve(r)}async openPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.open(Ae.fromPortablePath(r),o,a,this.makeCallback(n,u))})}openSync(r,o,a){return this.realFs.openSync(Ae.fromPortablePath(r),o,a)}async opendirPromise(r,o){return await new Promise((a,n)=>{typeof o<"u"?this.realFs.opendir(Ae.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.opendir(Ae.fromPortablePath(r),this.makeCallback(a,n))}).then(a=>Object.defineProperty(a,"path",{value:r,configurable:!0,writable:!0}))}opendirSync(r,o){let a=typeof o<"u"?this.realFs.opendirSync(Ae.fromPortablePath(r),o):this.realFs.opendirSync(Ae.fromPortablePath(r));return Object.defineProperty(a,"path",{value:r,configurable:!0,writable:!0})}async readPromise(r,o,a=0,n=0,u=-1){return await new Promise((A,p)=>{this.realFs.read(r,o,a,n,u,(h,w)=>{h?p(h):A(w)})})}readSync(r,o,a,n,u){return this.realFs.readSync(r,o,a,n,u)}async writePromise(r,o,a,n,u){return await new Promise((A,p)=>typeof o=="string"?this.realFs.write(r,o,a,this.makeCallback(A,p)):this.realFs.write(r,o,a,n,u,this.makeCallback(A,p)))}writeSync(r,o,a,n,u){return typeof o=="string"?this.realFs.writeSync(r,o,a):this.realFs.writeSync(r,o,a,n,u)}async closePromise(r){await new Promise((o,a)=>{this.realFs.close(r,this.makeCallback(o,a))})}closeSync(r){this.realFs.closeSync(r)}createReadStream(r,o){let a=r!==null?Ae.fromPortablePath(r):r;return this.realFs.createReadStream(a,o)}createWriteStream(r,o){let a=r!==null?Ae.fromPortablePath(r):r;return this.realFs.createWriteStream(a,o)}async realpathPromise(r){return await new Promise((o,a)=>{this.realFs.realpath(Ae.fromPortablePath(r),{},this.makeCallback(o,a))}).then(o=>Ae.toPortablePath(o))}realpathSync(r){return Ae.toPortablePath(this.realFs.realpathSync(Ae.fromPortablePath(r),{}))}async existsPromise(r){return await new Promise(o=>{this.realFs.exists(Ae.fromPortablePath(r),o)})}accessSync(r,o){return this.realFs.accessSync(Ae.fromPortablePath(r),o)}async accessPromise(r,o){return await new Promise((a,n)=>{this.realFs.access(Ae.fromPortablePath(r),o,this.makeCallback(a,n))})}existsSync(r){return this.realFs.existsSync(Ae.fromPortablePath(r))}async statPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.stat(Ae.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.stat(Ae.fromPortablePath(r),this.makeCallback(a,n))})}statSync(r,o){return o?this.realFs.statSync(Ae.fromPortablePath(r),o):this.realFs.statSync(Ae.fromPortablePath(r))}async fstatPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.fstat(r,o,this.makeCallback(a,n)):this.realFs.fstat(r,this.makeCallback(a,n))})}fstatSync(r,o){return o?this.realFs.fstatSync(r,o):this.realFs.fstatSync(r)}async lstatPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.lstat(Ae.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.lstat(Ae.fromPortablePath(r),this.makeCallback(a,n))})}lstatSync(r,o){return o?this.realFs.lstatSync(Ae.fromPortablePath(r),o):this.realFs.lstatSync(Ae.fromPortablePath(r))}async fchmodPromise(r,o){return await new Promise((a,n)=>{this.realFs.fchmod(r,o,this.makeCallback(a,n))})}fchmodSync(r,o){return this.realFs.fchmodSync(r,o)}async chmodPromise(r,o){return await new Promise((a,n)=>{this.realFs.chmod(Ae.fromPortablePath(r),o,this.makeCallback(a,n))})}chmodSync(r,o){return this.realFs.chmodSync(Ae.fromPortablePath(r),o)}async fchownPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.fchown(r,o,a,this.makeCallback(n,u))})}fchownSync(r,o,a){return this.realFs.fchownSync(r,o,a)}async chownPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.chown(Ae.fromPortablePath(r),o,a,this.makeCallback(n,u))})}chownSync(r,o,a){return this.realFs.chownSync(Ae.fromPortablePath(r),o,a)}async renamePromise(r,o){return await new Promise((a,n)=>{this.realFs.rename(Ae.fromPortablePath(r),Ae.fromPortablePath(o),this.makeCallback(a,n))})}renameSync(r,o){return this.realFs.renameSync(Ae.fromPortablePath(r),Ae.fromPortablePath(o))}async copyFilePromise(r,o,a=0){return await new Promise((n,u)=>{this.realFs.copyFile(Ae.fromPortablePath(r),Ae.fromPortablePath(o),a,this.makeCallback(n,u))})}copyFileSync(r,o,a=0){return this.realFs.copyFileSync(Ae.fromPortablePath(r),Ae.fromPortablePath(o),a)}async appendFilePromise(r,o,a){return await new Promise((n,u)=>{let A=typeof r=="string"?Ae.fromPortablePath(r):r;a?this.realFs.appendFile(A,o,a,this.makeCallback(n,u)):this.realFs.appendFile(A,o,this.makeCallback(n,u))})}appendFileSync(r,o,a){let n=typeof r=="string"?Ae.fromPortablePath(r):r;a?this.realFs.appendFileSync(n,o,a):this.realFs.appendFileSync(n,o)}async writeFilePromise(r,o,a){return await new Promise((n,u)=>{let A=typeof r=="string"?Ae.fromPortablePath(r):r;a?this.realFs.writeFile(A,o,a,this.makeCallback(n,u)):this.realFs.writeFile(A,o,this.makeCallback(n,u))})}writeFileSync(r,o,a){let n=typeof r=="string"?Ae.fromPortablePath(r):r;a?this.realFs.writeFileSync(n,o,a):this.realFs.writeFileSync(n,o)}async unlinkPromise(r){return await new Promise((o,a)=>{this.realFs.unlink(Ae.fromPortablePath(r),this.makeCallback(o,a))})}unlinkSync(r){return this.realFs.unlinkSync(Ae.fromPortablePath(r))}async utimesPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.utimes(Ae.fromPortablePath(r),o,a,this.makeCallback(n,u))})}utimesSync(r,o,a){this.realFs.utimesSync(Ae.fromPortablePath(r),o,a)}async lutimesPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.lutimes(Ae.fromPortablePath(r),o,a,this.makeCallback(n,u))})}lutimesSync(r,o,a){this.realFs.lutimesSync(Ae.fromPortablePath(r),o,a)}async mkdirPromise(r,o){return await new Promise((a,n)=>{this.realFs.mkdir(Ae.fromPortablePath(r),o,this.makeCallback(a,n))})}mkdirSync(r,o){return this.realFs.mkdirSync(Ae.fromPortablePath(r),o)}async rmdirPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.rmdir(Ae.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.rmdir(Ae.fromPortablePath(r),this.makeCallback(a,n))})}rmdirSync(r,o){return this.realFs.rmdirSync(Ae.fromPortablePath(r),o)}async linkPromise(r,o){return await new Promise((a,n)=>{this.realFs.link(Ae.fromPortablePath(r),Ae.fromPortablePath(o),this.makeCallback(a,n))})}linkSync(r,o){return this.realFs.linkSync(Ae.fromPortablePath(r),Ae.fromPortablePath(o))}async symlinkPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.symlink(Ae.fromPortablePath(r.replace(/\/+$/,"")),Ae.fromPortablePath(o),a,this.makeCallback(n,u))})}symlinkSync(r,o,a){return this.realFs.symlinkSync(Ae.fromPortablePath(r.replace(/\/+$/,"")),Ae.fromPortablePath(o),a)}async readFilePromise(r,o){return await new Promise((a,n)=>{let u=typeof r=="string"?Ae.fromPortablePath(r):r;this.realFs.readFile(u,o,this.makeCallback(a,n))})}readFileSync(r,o){let a=typeof r=="string"?Ae.fromPortablePath(r):r;return this.realFs.readFileSync(a,o)}async readdirPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.readdir(Ae.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.readdir(Ae.fromPortablePath(r),this.makeCallback(u=>a(u),n))})}readdirSync(r,o){return o?this.realFs.readdirSync(Ae.fromPortablePath(r),o):this.realFs.readdirSync(Ae.fromPortablePath(r))}async readlinkPromise(r){return await new Promise((o,a)=>{this.realFs.readlink(Ae.fromPortablePath(r),this.makeCallback(o,a))}).then(o=>Ae.toPortablePath(o))}readlinkSync(r){return Ae.toPortablePath(this.realFs.readlinkSync(Ae.fromPortablePath(r)))}async truncatePromise(r,o){return await new Promise((a,n)=>{this.realFs.truncate(Ae.fromPortablePath(r),o,this.makeCallback(a,n))})}truncateSync(r,o){return this.realFs.truncateSync(Ae.fromPortablePath(r),o)}async ftruncatePromise(r,o){return await new Promise((a,n)=>{this.realFs.ftruncate(r,o,this.makeCallback(a,n))})}ftruncateSync(r,o){return this.realFs.ftruncateSync(r,o)}watch(r,o,a){return this.realFs.watch(Ae.fromPortablePath(r),o,a)}watchFile(r,o,a){return this.realFs.watchFile(Ae.fromPortablePath(r),o,a)}unwatchFile(r,o){return this.realFs.unwatchFile(Ae.fromPortablePath(r),o)}makeCallback(r,o){return(a,n)=>{a?o(a):r(n)}}}});var hn,q7=yt(()=>{_g();df();wa();hn=class extends Ps{constructor(r,{baseFs:o=new Rn}={}){super(J);this.target=this.pathUtils.normalize(r),this.baseFs=o}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(r){return this.pathUtils.isAbsolute(r)?J.normalize(r):this.baseFs.resolve(J.join(this.target,r))}mapFromBase(r){return r}mapToBase(r){return this.pathUtils.isAbsolute(r)?r:this.pathUtils.join(this.target,r)}}});var G7,ju,Y7=yt(()=>{_g();df();wa();G7=Bt.root,ju=class extends Ps{constructor(r,{baseFs:o=new Rn}={}){super(J);this.target=this.pathUtils.resolve(Bt.root,r),this.baseFs=o}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(Bt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(r){let o=this.pathUtils.normalize(r);if(this.pathUtils.isAbsolute(r))return this.pathUtils.resolve(this.target,this.pathUtils.relative(G7,r));if(o.match(/^\.\.\/?/))throw new Error(`Resolving this path (${r}) would escape the jail`);return this.pathUtils.resolve(this.target,r)}mapFromBase(r){return this.pathUtils.resolve(G7,this.pathUtils.relative(this.target,r))}}});var ny,W7=yt(()=>{df();ny=class extends Ps{constructor(r,o){super(o);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var Hg,Ca,Up,K7=yt(()=>{Hg=Ie("fs");Ug();_g();GR();ID();wa();Ca=4278190080,Up=class extends _u{constructor({baseFs:r=new Rn,filter:o=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:u=!0,maxAge:A=5e3,typeCheck:p=Hg.constants.S_IFREG,getMountPoint:h,factoryPromise:w,factorySync:I}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error("The magic byte must be set to a round value between 1 and 127 included");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=u?new Map:null,this.factoryPromise=w,this.factorySync=I,this.filter=o,this.getMountPoint=h,this.magic=a<<24,this.maxAge=A,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(Og(this),this.mountInstances)for(let[r,{childFs:o}]of this.mountInstances.entries())o.saveAndClose?.(),this.mountInstances.delete(r)}discardAndClose(){if(Og(this),this.mountInstances)for(let[r,{childFs:o}]of this.mountInstances.entries())o.discardAndClose?.(),this.mountInstances.delete(r)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,o){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,o]),a}async openPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,o,a),async(n,{subPath:u})=>this.remapFd(n,await n.openPromise(u,o,a)))}openSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,o,a),(n,{subPath:u})=>this.remapFd(n,n.openSync(u,o,a)))}async opendirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,o),async(a,{subPath:n})=>await a.opendirPromise(n,o),{requireSubpath:!1})}opendirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,o),(a,{subPath:n})=>a.opendirSync(n,o),{requireSubpath:!1})}async readPromise(r,o,a,n,u){if((r&Ca)!==this.magic)return await this.baseFs.readPromise(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("read");let[p,h]=A;return await p.readPromise(h,o,a,n,u)}readSync(r,o,a,n,u){if((r&Ca)!==this.magic)return this.baseFs.readSync(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("readSync");let[p,h]=A;return p.readSync(h,o,a,n,u)}async writePromise(r,o,a,n,u){if((r&Ca)!==this.magic)return typeof o=="string"?await this.baseFs.writePromise(r,o,a):await this.baseFs.writePromise(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("write");let[p,h]=A;return typeof o=="string"?await p.writePromise(h,o,a):await p.writePromise(h,o,a,n,u)}writeSync(r,o,a,n,u){if((r&Ca)!==this.magic)return typeof o=="string"?this.baseFs.writeSync(r,o,a):this.baseFs.writeSync(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("writeSync");let[p,h]=A;return typeof o=="string"?p.writeSync(h,o,a):p.writeSync(h,o,a,n,u)}async closePromise(r){if((r&Ca)!==this.magic)return await this.baseFs.closePromise(r);let o=this.fdMap.get(r);if(typeof o>"u")throw Io("close");this.fdMap.delete(r);let[a,n]=o;return await a.closePromise(n)}closeSync(r){if((r&Ca)!==this.magic)return this.baseFs.closeSync(r);let o=this.fdMap.get(r);if(typeof o>"u")throw Io("closeSync");this.fdMap.delete(r);let[a,n]=o;return a.closeSync(n)}createReadStream(r,o){return r===null?this.baseFs.createReadStream(r,o):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,o),(a,{archivePath:n,subPath:u})=>{let A=a.createReadStream(u,o);return A.path=Ae.fromPortablePath(this.pathUtils.join(n,u)),A})}createWriteStream(r,o){return r===null?this.baseFs.createWriteStream(r,o):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,o),(a,{subPath:n})=>a.createWriteStream(n,o))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(o,{archivePath:a,subPath:n})=>{let u=this.realPaths.get(a);return typeof u>"u"&&(u=await this.baseFs.realpathPromise(a),this.realPaths.set(a,u)),this.pathUtils.join(u,this.pathUtils.relative(Bt.root,await o.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(o,{archivePath:a,subPath:n})=>{let u=this.realPaths.get(a);return typeof u>"u"&&(u=this.baseFs.realpathSync(a),this.realPaths.set(a,u)),this.pathUtils.join(u,this.pathUtils.relative(Bt.root,o.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(o,{subPath:a})=>await o.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(o,{subPath:a})=>o.existsSync(a))}async accessPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,o),async(a,{subPath:n})=>await a.accessPromise(n,o))}accessSync(r,o){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,o),(a,{subPath:n})=>a.accessSync(n,o))}async statPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,o),async(a,{subPath:n})=>await a.statPromise(n,o))}statSync(r,o){return this.makeCallSync(r,()=>this.baseFs.statSync(r,o),(a,{subPath:n})=>a.statSync(n,o))}async fstatPromise(r,o){if((r&Ca)!==this.magic)return this.baseFs.fstatPromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fstat");let[n,u]=a;return n.fstatPromise(u,o)}fstatSync(r,o){if((r&Ca)!==this.magic)return this.baseFs.fstatSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fstatSync");let[n,u]=a;return n.fstatSync(u,o)}async lstatPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,o),async(a,{subPath:n})=>await a.lstatPromise(n,o))}lstatSync(r,o){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,o),(a,{subPath:n})=>a.lstatSync(n,o))}async fchmodPromise(r,o){if((r&Ca)!==this.magic)return this.baseFs.fchmodPromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fchmod");let[n,u]=a;return n.fchmodPromise(u,o)}fchmodSync(r,o){if((r&Ca)!==this.magic)return this.baseFs.fchmodSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fchmodSync");let[n,u]=a;return n.fchmodSync(u,o)}async chmodPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,o),async(a,{subPath:n})=>await a.chmodPromise(n,o))}chmodSync(r,o){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,o),(a,{subPath:n})=>a.chmodSync(n,o))}async fchownPromise(r,o,a){if((r&Ca)!==this.magic)return this.baseFs.fchownPromise(r,o,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Io("fchown");let[u,A]=n;return u.fchownPromise(A,o,a)}fchownSync(r,o,a){if((r&Ca)!==this.magic)return this.baseFs.fchownSync(r,o,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Io("fchownSync");let[u,A]=n;return u.fchownSync(A,o,a)}async chownPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,o,a),async(n,{subPath:u})=>await n.chownPromise(u,o,a))}chownSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,o,a),(n,{subPath:u})=>n.chownSync(u,o,a))}async renamePromise(r,o){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(o,async()=>await this.baseFs.renamePromise(r,o),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(a,{subPath:n})=>await this.makeCallPromise(o,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(u,{subPath:A})=>{if(a!==u)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await a.renamePromise(n,A)}))}renameSync(r,o){return this.makeCallSync(r,()=>this.makeCallSync(o,()=>this.baseFs.renameSync(r,o),()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(a,{subPath:n})=>this.makeCallSync(o,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(u,{subPath:A})=>{if(a!==u)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return a.renameSync(n,A)}))}async copyFilePromise(r,o,a=0){let n=async(u,A,p,h)=>{if((a&Hg.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${A}' -> ${h}'`),{code:"EXDEV"});if(a&Hg.constants.COPYFILE_EXCL&&await this.existsPromise(A))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${A}' -> '${h}'`),{code:"EEXIST"});let w;try{w=await u.readFilePromise(A)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${A}' -> '${h}'`),{code:"EINVAL"})}await p.writeFilePromise(h,w)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(o,async()=>await this.baseFs.copyFilePromise(r,o,a),async(u,{subPath:A})=>await n(this.baseFs,r,u,A)),async(u,{subPath:A})=>await this.makeCallPromise(o,async()=>await n(u,A,this.baseFs,o),async(p,{subPath:h})=>u!==p?await n(u,A,p,h):await u.copyFilePromise(A,h,a)))}copyFileSync(r,o,a=0){let n=(u,A,p,h)=>{if((a&Hg.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${A}' -> ${h}'`),{code:"EXDEV"});if(a&Hg.constants.COPYFILE_EXCL&&this.existsSync(A))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${A}' -> '${h}'`),{code:"EEXIST"});let w;try{w=u.readFileSync(A)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${A}' -> '${h}'`),{code:"EINVAL"})}p.writeFileSync(h,w)};return this.makeCallSync(r,()=>this.makeCallSync(o,()=>this.baseFs.copyFileSync(r,o,a),(u,{subPath:A})=>n(this.baseFs,r,u,A)),(u,{subPath:A})=>this.makeCallSync(o,()=>n(u,A,this.baseFs,o),(p,{subPath:h})=>u!==p?n(u,A,p,h):u.copyFileSync(A,h,a)))}async appendFilePromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,o,a),async(n,{subPath:u})=>await n.appendFilePromise(u,o,a))}appendFileSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,o,a),(n,{subPath:u})=>n.appendFileSync(u,o,a))}async writeFilePromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,o,a),async(n,{subPath:u})=>await n.writeFilePromise(u,o,a))}writeFileSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,o,a),(n,{subPath:u})=>n.writeFileSync(u,o,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(o,{subPath:a})=>await o.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(o,{subPath:a})=>o.unlinkSync(a))}async utimesPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,o,a),async(n,{subPath:u})=>await n.utimesPromise(u,o,a))}utimesSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,o,a),(n,{subPath:u})=>n.utimesSync(u,o,a))}async lutimesPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,o,a),async(n,{subPath:u})=>await n.lutimesPromise(u,o,a))}lutimesSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,o,a),(n,{subPath:u})=>n.lutimesSync(u,o,a))}async mkdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,o),async(a,{subPath:n})=>await a.mkdirPromise(n,o))}mkdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,o),(a,{subPath:n})=>a.mkdirSync(n,o))}async rmdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,o),async(a,{subPath:n})=>await a.rmdirPromise(n,o))}rmdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,o),(a,{subPath:n})=>a.rmdirSync(n,o))}async linkPromise(r,o){return await this.makeCallPromise(o,async()=>await this.baseFs.linkPromise(r,o),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,o){return this.makeCallSync(o,()=>this.baseFs.linkSync(r,o),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,o,a){return await this.makeCallPromise(o,async()=>await this.baseFs.symlinkPromise(r,o,a),async(n,{subPath:u})=>await n.symlinkPromise(r,u))}symlinkSync(r,o,a){return this.makeCallSync(o,()=>this.baseFs.symlinkSync(r,o,a),(n,{subPath:u})=>n.symlinkSync(r,u))}async readFilePromise(r,o){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,o),async(a,{subPath:n})=>await a.readFilePromise(n,o))}readFileSync(r,o){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,o),(a,{subPath:n})=>a.readFileSync(n,o))}async readdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,o),async(a,{subPath:n})=>await a.readdirPromise(n,o),{requireSubpath:!1})}readdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,o),(a,{subPath:n})=>a.readdirSync(n,o),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(o,{subPath:a})=>await o.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(o,{subPath:a})=>o.readlinkSync(a))}async truncatePromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,o),async(a,{subPath:n})=>await a.truncatePromise(n,o))}truncateSync(r,o){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,o),(a,{subPath:n})=>a.truncateSync(n,o))}async ftruncatePromise(r,o){if((r&Ca)!==this.magic)return this.baseFs.ftruncatePromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("ftruncate");let[n,u]=a;return n.ftruncatePromise(u,o)}ftruncateSync(r,o){if((r&Ca)!==this.magic)return this.baseFs.ftruncateSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("ftruncateSync");let[n,u]=a;return n.ftruncateSync(u,o)}watch(r,o,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,o,a),(n,{subPath:u})=>n.watch(u,o,a))}watchFile(r,o,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,o,a),()=>ry(this,r,o,a))}unwatchFile(r,o){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,o),()=>Lg(this,r,o))}async makeCallPromise(r,o,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return await o();let u=this.resolve(r),A=this.findMount(u);return A?n&&A.subPath==="/"?await o():await this.getMountPromise(A.archivePath,async p=>await a(p,A)):await o()}makeCallSync(r,o,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return o();let u=this.resolve(r),A=this.findMount(u);return!A||n&&A.subPath==="/"?o():this.getMountSync(A.archivePath,p=>a(p,A))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let o="";for(;;){let a=r.substring(o.length),n=this.getMountPoint(a,o);if(!n)return null;if(o=this.pathUtils.join(o,n),!this.isMount.has(o)){if(this.notMount.has(o))continue;try{if(this.typeCheck!==null&&(this.baseFs.lstatSync(o).mode&Hg.constants.S_IFMT)!==this.typeCheck){this.notMount.add(o);continue}}catch{return null}this.isMount.add(o)}return{archivePath:o,subPath:this.pathUtils.join(Bt.root,r.substring(o.length))}}}limitOpenFiles(r){if(this.mountInstances===null)return;let o=Date.now(),a=o+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[u,{childFs:A,expiresAt:p,refCount:h}]of this.mountInstances.entries())if(!(h!==0||A.hasOpenFileHandles?.())){if(o>=p){A.saveAndClose?.(),this.mountInstances.delete(u),n-=1;continue}else if(r===null||n<=0){a=p;break}A.saveAndClose?.(),this.mountInstances.delete(u),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-o).unref())}async getMountPromise(r,o){if(this.mountInstances){let a=this.mountInstances.get(r);if(!a){let n=await this.factoryPromise(this.baseFs,r);a=this.mountInstances.get(r),a||(a={childFs:n(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,a.refCount+=1;try{return await o(a.childFs)}finally{a.refCount-=1}}else{let a=(await this.factoryPromise(this.baseFs,r))();try{return await o(a)}finally{a.saveAndClose?.()}}}getMountSync(r,o){if(this.mountInstances){let a=this.mountInstances.get(r);return a||(a={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,o(a.childFs)}else{let a=this.factorySync(this.baseFs,r);try{return o(a)}finally{a.saveAndClose?.()}}}}});var Zt,YR,qC,J7=yt(()=>{Ug();wa();Zt=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"}),YR=class extends gf{constructor(){super(J)}getExtractHint(){throw Zt()}getRealPath(){throw Zt()}resolve(){throw Zt()}async openPromise(){throw Zt()}openSync(){throw Zt()}async opendirPromise(){throw Zt()}opendirSync(){throw Zt()}async readPromise(){throw Zt()}readSync(){throw Zt()}async writePromise(){throw Zt()}writeSync(){throw Zt()}async closePromise(){throw Zt()}closeSync(){throw Zt()}createWriteStream(){throw Zt()}createReadStream(){throw Zt()}async realpathPromise(){throw Zt()}realpathSync(){throw Zt()}async readdirPromise(){throw Zt()}readdirSync(){throw Zt()}async existsPromise(t){throw Zt()}existsSync(t){throw Zt()}async accessPromise(){throw Zt()}accessSync(){throw Zt()}async statPromise(){throw Zt()}statSync(){throw Zt()}async fstatPromise(t){throw Zt()}fstatSync(t){throw Zt()}async lstatPromise(t){throw Zt()}lstatSync(t){throw Zt()}async fchmodPromise(){throw Zt()}fchmodSync(){throw Zt()}async chmodPromise(){throw Zt()}chmodSync(){throw Zt()}async fchownPromise(){throw Zt()}fchownSync(){throw Zt()}async chownPromise(){throw Zt()}chownSync(){throw Zt()}async mkdirPromise(){throw Zt()}mkdirSync(){throw Zt()}async rmdirPromise(){throw Zt()}rmdirSync(){throw Zt()}async linkPromise(){throw Zt()}linkSync(){throw Zt()}async symlinkPromise(){throw Zt()}symlinkSync(){throw Zt()}async renamePromise(){throw Zt()}renameSync(){throw Zt()}async copyFilePromise(){throw Zt()}copyFileSync(){throw Zt()}async appendFilePromise(){throw Zt()}appendFileSync(){throw Zt()}async writeFilePromise(){throw Zt()}writeFileSync(){throw Zt()}async unlinkPromise(){throw Zt()}unlinkSync(){throw Zt()}async utimesPromise(){throw Zt()}utimesSync(){throw Zt()}async lutimesPromise(){throw Zt()}lutimesSync(){throw Zt()}async readFilePromise(){throw Zt()}readFileSync(){throw Zt()}async readlinkPromise(){throw Zt()}readlinkSync(){throw Zt()}async truncatePromise(){throw Zt()}truncateSync(){throw Zt()}async ftruncatePromise(t,r){throw Zt()}ftruncateSync(t,r){throw Zt()}watch(){throw Zt()}watchFile(){throw Zt()}unwatchFile(){throw Zt()}},qC=YR;qC.instance=new YR});var _p,V7=yt(()=>{df();wa();_p=class extends Ps{constructor(r){super(Ae);this.baseFs=r}mapFromBase(r){return Ae.fromPortablePath(r)}mapToBase(r){return Ae.toPortablePath(r)}}});var S_e,WR,P_e,di,z7=yt(()=>{_g();df();wa();S_e=/^[0-9]+$/,WR=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,P_e=/^([^/]+-)?[a-f0-9]+$/,di=class extends Ps{constructor({baseFs:r=new Rn}={}){super(J);this.baseFs=r}static makeVirtualPath(r,o,a){if(J.basename(r)!=="__virtual__")throw new Error('Assertion failed: Virtual folders must be named "__virtual__"');if(!J.basename(o).match(P_e))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");let u=J.relative(J.dirname(r),a).split("/"),A=0;for(;A<u.length&&u[A]==="..";)A+=1;let p=u.slice(A);return J.join(r,o,String(A),...p)}static resolveVirtual(r){let o=r.match(WR);if(!o||!o[3]&&o[5])return r;let a=J.dirname(o[1]);if(!o[3]||!o[4])return a;if(!S_e.test(o[4]))return r;let u=Number(o[4]),A="../".repeat(u),p=o[5]||".";return di.resolveVirtual(J.join(a,A,p))}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}realpathSync(r){let o=r.match(WR);if(!o)return this.baseFs.realpathSync(r);if(!o[5])return r;let a=this.baseFs.realpathSync(this.mapToBase(r));return di.makeVirtualPath(o[1],o[3],a)}async realpathPromise(r){let o=r.match(WR);if(!o)return await this.baseFs.realpathPromise(r);if(!o[5])return r;let a=await this.baseFs.realpathPromise(this.mapToBase(r));return di.makeVirtualPath(o[1],o[3],a)}mapToBase(r){if(r==="")return r;if(this.pathUtils.isAbsolute(r))return di.resolveVirtual(r);let o=di.resolveVirtual(this.baseFs.resolve(Bt.dot)),a=di.resolveVirtual(this.baseFs.resolve(r));return J.relative(o,a)||Bt.dot}mapFromBase(r){return r}}});function x_e(e,t){return typeof KR.default.isUtf8<"u"?KR.default.isUtf8(e):Buffer.byteLength(t)===e.byteLength}var KR,bD,X7,xD,Z7=yt(()=>{KR=$e(Ie("buffer")),bD=Ie("url"),X7=Ie("util");df();wa();xD=class extends Ps{constructor(r){super(Ae);this.baseFs=r}mapFromBase(r){return r}mapToBase(r){if(typeof r=="string")return r;if(r instanceof bD.URL)return(0,bD.fileURLToPath)(r);if(Buffer.isBuffer(r)){let o=r.toString();if(!x_e(r,o))throw new Error("Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942");return o}throw new Error(`Unsupported path type: ${(0,X7.inspect)(r)}`)}}});var $7,Bo,mf,Hp,QD,kD,iy,Tc,Nc,b_e,Q_e,k_e,F_e,GC,eY=yt(()=>{$7=Ie("readline"),Bo=Symbol("kBaseFs"),mf=Symbol("kFd"),Hp=Symbol("kClosePromise"),QD=Symbol("kCloseResolve"),kD=Symbol("kCloseReject"),iy=Symbol("kRefs"),Tc=Symbol("kRef"),Nc=Symbol("kUnref"),GC=class{constructor(t,r){this[b_e]=1;this[Q_e]=void 0;this[k_e]=void 0;this[F_e]=void 0;this[Bo]=r,this[mf]=t}get fd(){return this[mf]}async appendFile(t,r){try{this[Tc](this.appendFile);let o=(typeof r=="string"?r:r?.encoding)??void 0;return await this[Bo].appendFilePromise(this.fd,t,o?{encoding:o}:void 0)}finally{this[Nc]()}}async chown(t,r){try{return this[Tc](this.chown),await this[Bo].fchownPromise(this.fd,t,r)}finally{this[Nc]()}}async chmod(t){try{return this[Tc](this.chmod),await this[Bo].fchmodPromise(this.fd,t)}finally{this[Nc]()}}createReadStream(t){return this[Bo].createReadStream(null,{...t,fd:this.fd})}createWriteStream(t){return this[Bo].createWriteStream(null,{...t,fd:this.fd})}datasync(){throw new Error("Method not implemented.")}sync(){throw new Error("Method not implemented.")}async read(t,r,o,a){try{this[Tc](this.read);let n;return Buffer.isBuffer(t)?n=t:(t??={},n=t.buffer??Buffer.alloc(16384),r=t.offset||0,o=t.length??n.byteLength,a=t.position??null),r??=0,o??=0,o===0?{bytesRead:o,buffer:n}:{bytesRead:await this[Bo].readPromise(this.fd,n,r,o,a),buffer:n}}finally{this[Nc]()}}async readFile(t){try{this[Tc](this.readFile);let r=(typeof t=="string"?t:t?.encoding)??void 0;return await this[Bo].readFilePromise(this.fd,r)}finally{this[Nc]()}}readLines(t){return(0,$7.createInterface)({input:this.createReadStream(t),crlfDelay:1/0})}async stat(t){try{return this[Tc](this.stat),await this[Bo].fstatPromise(this.fd,t)}finally{this[Nc]()}}async truncate(t){try{return this[Tc](this.truncate),await this[Bo].ftruncatePromise(this.fd,t)}finally{this[Nc]()}}utimes(t,r){throw new Error("Method not implemented.")}async writeFile(t,r){try{this[Tc](this.writeFile);let o=(typeof r=="string"?r:r?.encoding)??void 0;await this[Bo].writeFilePromise(this.fd,t,o)}finally{this[Nc]()}}async write(...t){try{if(this[Tc](this.write),ArrayBuffer.isView(t[0])){let[r,o,a,n]=t;return{bytesWritten:await this[Bo].writePromise(this.fd,r,o??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,o,a]=t;return{bytesWritten:await this[Bo].writePromise(this.fd,r,o,a),buffer:r}}}finally{this[Nc]()}}async writev(t,r){try{this[Tc](this.writev);let o=0;if(typeof r<"u")for(let a of t){let n=await this.write(a,void 0,void 0,r);o+=n.bytesWritten,r+=n.bytesWritten}else for(let a of t){let n=await this.write(a);o+=n.bytesWritten}return{buffers:t,bytesWritten:o}}finally{this[Nc]()}}readv(t,r){throw new Error("Method not implemented.")}close(){if(this[mf]===-1)return Promise.resolve();if(this[Hp])return this[Hp];if(this[iy]--,this[iy]===0){let t=this[mf];this[mf]=-1,this[Hp]=this[Bo].closePromise(t).finally(()=>{this[Hp]=void 0})}else this[Hp]=new Promise((t,r)=>{this[QD]=t,this[kD]=r}).finally(()=>{this[Hp]=void 0,this[kD]=void 0,this[QD]=void 0});return this[Hp]}[(Bo,mf,b_e=iy,Q_e=Hp,k_e=QD,F_e=kD,Tc)](t){if(this[mf]===-1){let r=new Error("file closed");throw r.code="EBADF",r.syscall=t.name,r}this[iy]++}[Nc](){if(this[iy]--,this[iy]===0){let t=this[mf];this[mf]=-1,this[Bo].closePromise(t).then(this[QD],this[kD])}}}});function YC(e,t){t=new xD(t);let r=(o,a,n)=>{let u=o[a];o[a]=n,typeof u?.[sy.promisify.custom]<"u"&&(n[sy.promisify.custom]=u[sy.promisify.custom])};{r(e,"exists",(o,...a)=>{let u=typeof a[a.length-1]=="function"?a.pop():()=>{};process.nextTick(()=>{t.existsPromise(o).then(A=>{u(A)},()=>{u(!1)})})}),r(e,"read",(...o)=>{let[a,n,u,A,p,h]=o;if(o.length<=3){let w={};o.length<3?h=o[1]:(w=o[1],h=o[2]),{buffer:n=Buffer.alloc(16384),offset:u=0,length:A=n.byteLength,position:p}=w}if(u==null&&(u=0),A|=0,A===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{t.readPromise(a,n,u,A,p).then(w=>{h(null,w,n)},w=>{h(w,0,n)})})});for(let o of tY){let a=o.replace(/Promise$/,"");if(typeof e[a]>"u")continue;let n=t[o];if(typeof n>"u")continue;r(e,a,(...A)=>{let h=typeof A[A.length-1]=="function"?A.pop():()=>{};process.nextTick(()=>{n.apply(t,A).then(w=>{h(null,w)},w=>{h(w)})})})}e.realpath.native=e.realpath}{r(e,"existsSync",o=>{try{return t.existsSync(o)}catch{return!1}}),r(e,"readSync",(...o)=>{let[a,n,u,A,p]=o;return o.length<=3&&({offset:u=0,length:A=n.byteLength,position:p}=o[2]||{}),u==null&&(u=0),A|=0,A===0?0:(p==null&&(p=-1),t.readSync(a,n,u,A,p))});for(let o of R_e){let a=o;if(typeof e[a]>"u")continue;let n=t[o];typeof n>"u"||r(e,a,n.bind(t))}e.realpathSync.native=e.realpathSync}{let o=e.promises;for(let a of tY){let n=a.replace(/Promise$/,"");if(typeof o[n]>"u")continue;let u=t[a];typeof u>"u"||a!=="open"&&r(o,n,(A,...p)=>A instanceof GC?A[n].apply(A,p):u.call(t,A,...p))}r(o,"open",async(...a)=>{let n=await t.openPromise(...a);return new GC(n,t)})}e.read[sy.promisify.custom]=async(o,a,...n)=>({bytesRead:await t.readPromise(o,a,...n),buffer:a}),e.write[sy.promisify.custom]=async(o,a,...n)=>({bytesWritten:await t.writePromise(o,a,...n),buffer:a})}function FD(e,t){let r=Object.create(e);return YC(r,t),r}var sy,R_e,tY,rY=yt(()=>{sy=Ie("util");Z7();eY();R_e=new Set(["accessSync","appendFileSync","createReadStream","createWriteStream","chmodSync","fchmodSync","chownSync","fchownSync","closeSync","copyFileSync","linkSync","lstatSync","fstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","ftruncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),tY=new Set(["accessPromise","appendFilePromise","fchmodPromise","chmodPromise","fchownPromise","chownPromise","closePromise","copyFilePromise","linkPromise","fstatPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","ftruncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"])});function nY(e){let t=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,"0");return`${e}${t}`}function iY(){if(JR)return JR;let e=Ae.toPortablePath(sY.default.tmpdir()),t=ae.realpathSync(e);return process.once("exit",()=>{ae.rmtempSync()}),JR={tmpdir:e,realTmpdir:t}}var sY,Lc,JR,ae,oY=yt(()=>{sY=$e(Ie("os"));_g();wa();Lc=new Set,JR=null;ae=Object.assign(new Rn,{detachTemp(e){Lc.delete(e)},mktempSync(e){let{tmpdir:t,realTmpdir:r}=iY();for(;;){let o=nY("xfs-");try{this.mkdirSync(J.join(t,o))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=J.join(r,o);if(Lc.add(a),typeof e>"u")return a;try{return e(a)}finally{if(Lc.has(a)){Lc.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(e){let{tmpdir:t,realTmpdir:r}=iY();for(;;){let o=nY("xfs-");try{await this.mkdirPromise(J.join(t,o))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=J.join(r,o);if(Lc.add(a),typeof e>"u")return a;try{return await e(a)}finally{if(Lc.has(a)){Lc.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(Lc.values()).map(async e=>{try{await ae.removePromise(e,{maxRetries:0}),Lc.delete(e)}catch{}}))},rmtempSync(){for(let e of Lc)try{ae.removeSync(e),Lc.delete(e)}catch{}}})});var WC={};Jt(WC,{AliasFS:()=>Hu,BasePortableFakeFS:()=>_u,CustomDir:()=>jC,CwdFS:()=>hn,FakeFS:()=>gf,Filename:()=>gr,JailFS:()=>ju,LazyFS:()=>ny,MountFS:()=>Up,NoFS:()=>qC,NodeFS:()=>Rn,PortablePath:()=>Bt,PosixFS:()=>_p,ProxiedFS:()=>Ps,VirtualFS:()=>di,constants:()=>Bi,errors:()=>or,extendFs:()=>FD,normalizeLineEndings:()=>Mg,npath:()=>Ae,opendir:()=>SD,patchFs:()=>YC,ppath:()=>J,setupCopyIndex:()=>DD,statUtils:()=>Tl,toFilename:()=>bi,unwatchAllFiles:()=>Og,unwatchFile:()=>Lg,watchFile:()=>ry,xfs:()=>ae});var St=yt(()=>{b7();ID();_R();qR();N7();GR();Ug();wa();wa();H7();Ug();q7();Y7();W7();K7();J7();_g();V7();df();z7();rY();oY()});var AY=_((MPt,uY)=>{uY.exports=cY;cY.sync=N_e;var aY=Ie("fs");function T_e(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var o=0;o<r.length;o++){var a=r[o].toLowerCase();if(a&&e.substr(-a.length).toLowerCase()===a)return!0}return!1}function lY(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:T_e(t,r)}function cY(e,t,r){aY.stat(e,function(o,a){r(o,o?!1:lY(a,e,t))})}function N_e(e,t){return lY(aY.statSync(e),e,t)}});var dY=_((UPt,gY)=>{gY.exports=pY;pY.sync=L_e;var fY=Ie("fs");function pY(e,t,r){fY.stat(e,function(o,a){r(o,o?!1:hY(a,t))})}function L_e(e,t){return hY(fY.statSync(e),t)}function hY(e,t){return e.isFile()&&O_e(e,t)}function O_e(e,t){var r=e.mode,o=e.uid,a=e.gid,n=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),u=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),A=parseInt("100",8),p=parseInt("010",8),h=parseInt("001",8),w=A|p,I=r&h||r&p&&a===u||r&A&&o===n||r&w&&n===0;return I}});var yY=_((HPt,mY)=>{var _Pt=Ie("fs"),RD;process.platform==="win32"||global.TESTING_WINDOWS?RD=AY():RD=dY();mY.exports=VR;VR.sync=M_e;function VR(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,a){VR(e,t||{},function(n,u){n?a(n):o(u)})})}RD(e,t||{},function(o,a){o&&(o.code==="EACCES"||t&&t.ignoreErrors)&&(o=null,a=!1),r(o,a)})}function M_e(e,t){try{return RD.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var DY=_((jPt,vY)=>{var oy=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",EY=Ie("path"),U_e=oy?";":":",wY=yY(),CY=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),IY=(e,t)=>{let r=t.colon||U_e,o=e.match(/\//)||oy&&e.match(/\\/)?[""]:[...oy?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],a=oy?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",n=oy?a.split(r):[""];return oy&&e.indexOf(".")!==-1&&n[0]!==""&&n.unshift(""),{pathEnv:o,pathExt:n,pathExtExe:a}},BY=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:o,pathExt:a,pathExtExe:n}=IY(e,t),u=[],A=h=>new Promise((w,I)=>{if(h===o.length)return t.all&&u.length?w(u):I(CY(e));let v=o[h],b=/^".*"$/.test(v)?v.slice(1,-1):v,E=EY.join(b,e),R=!b&&/^\.[\\\/]/.test(e)?e.slice(0,2)+E:E;w(p(R,h,0))}),p=(h,w,I)=>new Promise((v,b)=>{if(I===a.length)return v(A(w+1));let E=a[I];wY(h+E,{pathExt:n},(R,N)=>{if(!R&&N)if(t.all)u.push(h+E);else return v(h+E);return v(p(h,w,I+1))})});return r?A(0).then(h=>r(null,h),r):A(0)},__e=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:o,pathExtExe:a}=IY(e,t),n=[];for(let u=0;u<r.length;u++){let A=r[u],p=/^".*"$/.test(A)?A.slice(1,-1):A,h=EY.join(p,e),w=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;for(let I=0;I<o.length;I++){let v=w+o[I];try{if(wY.sync(v,{pathExt:a}))if(t.all)n.push(v);else return v}catch{}}}if(t.all&&n.length)return n;if(t.nothrow)return null;throw CY(e)};vY.exports=BY;BY.sync=__e});var PY=_((qPt,zR)=>{"use strict";var SY=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};zR.exports=SY;zR.exports.default=SY});var kY=_((GPt,QY)=>{"use strict";var xY=Ie("path"),H_e=DY(),j_e=PY();function bY(e,t){let r=e.options.env||process.env,o=process.cwd(),a=e.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(e.options.cwd)}catch{}let u;try{u=H_e.sync(e.command,{path:r[j_e({env:r})],pathExt:t?xY.delimiter:void 0})}catch{}finally{n&&process.chdir(o)}return u&&(u=xY.resolve(a?e.options.cwd:"",u)),u}function q_e(e){return bY(e)||bY(e,!0)}QY.exports=q_e});var FY=_((YPt,ZR)=>{"use strict";var XR=/([()\][%!^"`<>&|;, *?])/g;function G_e(e){return e=e.replace(XR,"^$1"),e}function Y_e(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(XR,"^$1"),t&&(e=e.replace(XR,"^$1")),e}ZR.exports.command=G_e;ZR.exports.argument=Y_e});var TY=_((WPt,RY)=>{"use strict";RY.exports=/^#!(.*)/});var LY=_((KPt,NY)=>{"use strict";var W_e=TY();NY.exports=(e="")=>{let t=e.match(W_e);if(!t)return null;let[r,o]=t[0].replace(/#! ?/,"").split(" "),a=r.split("/").pop();return a==="env"?o:o?`${a} ${o}`:a}});var MY=_((JPt,OY)=>{"use strict";var $R=Ie("fs"),K_e=LY();function J_e(e){let r=Buffer.alloc(150),o;try{o=$R.openSync(e,"r"),$R.readSync(o,r,0,150,0),$R.closeSync(o)}catch{}return K_e(r.toString())}OY.exports=J_e});var jY=_((VPt,HY)=>{"use strict";var V_e=Ie("path"),UY=kY(),_Y=FY(),z_e=MY(),X_e=process.platform==="win32",Z_e=/\.(?:com|exe)$/i,$_e=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function e8e(e){e.file=UY(e);let t=e.file&&z_e(e.file);return t?(e.args.unshift(e.file),e.command=t,UY(e)):e.file}function t8e(e){if(!X_e)return e;let t=e8e(e),r=!Z_e.test(t);if(e.options.forceShell||r){let o=$_e.test(t);e.command=V_e.normalize(e.command),e.command=_Y.command(e.command),e.args=e.args.map(n=>_Y.argument(n,o));let a=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${a}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function r8e(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let o={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?o:t8e(o)}HY.exports=r8e});var YY=_((zPt,GY)=>{"use strict";var eT=process.platform==="win32";function tT(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function n8e(e,t){if(!eT)return;let r=e.emit;e.emit=function(o,a){if(o==="exit"){let n=qY(a,t,"spawn");if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}}function qY(e,t){return eT&&e===1&&!t.file?tT(t.original,"spawn"):null}function i8e(e,t){return eT&&e===1&&!t.file?tT(t.original,"spawnSync"):null}GY.exports={hookChildProcess:n8e,verifyENOENT:qY,verifyENOENTSync:i8e,notFoundError:tT}});var iT=_((XPt,ay)=>{"use strict";var WY=Ie("child_process"),rT=jY(),nT=YY();function KY(e,t,r){let o=rT(e,t,r),a=WY.spawn(o.command,o.args,o.options);return nT.hookChildProcess(a,o),a}function s8e(e,t,r){let o=rT(e,t,r),a=WY.spawnSync(o.command,o.args,o.options);return a.error=a.error||nT.verifyENOENTSync(a.status,o),a}ay.exports=KY;ay.exports.spawn=KY;ay.exports.sync=s8e;ay.exports._parse=rT;ay.exports._enoent=nT});var VY=_((ZPt,JY)=>{"use strict";function o8e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function jg(e,t,r,o){this.message=e,this.expected=t,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,jg)}o8e(jg,Error);jg.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var w="",I;for(I=0;I<h.parts.length;I++)w+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+w+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function u(h){return r[h.type](h)}function A(h){var w=new Array(h.length),I,v;for(I=0;I<h.length;I++)w[I]=u(h[I]);if(w.sort(),w.length>0){for(I=1,v=1;I<w.length;I++)w[I-1]!==w[I]&&(w[v]=w[I],v++);w.length=v}switch(w.length){case 1:return w[0];case 2:return w[0]+" or "+w[1];default:return w.slice(0,-1).join(", ")+", or "+w[w.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(e)+" but "+p(t)+" found."};function a8e(e,t){t=t!==void 0?t:{};var r={},o={Start:fg},a=fg,n=function(L){return L||[]},u=function(L,K,re){return[{command:L,type:K}].concat(re||[])},A=function(L,K){return[{command:L,type:K||";"}]},p=function(L){return L},h=";",w=Ir(";",!1),I="&",v=Ir("&",!1),b=function(L,K){return K?{chain:L,then:K}:{chain:L}},E=function(L,K){return{type:L,line:K}},R="&&",N=Ir("&&",!1),U="||",V=Ir("||",!1),ee=function(L,K){return K?{...L,then:K}:L},le=function(L,K){return{type:L,chain:K}},fe="|&",de=Ir("|&",!1),ge="|",oe=Ir("|",!1),Be="=",be=Ir("=",!1),g=function(L,K){return{name:L,args:[K]}},we=function(L){return{name:L,args:[]}},Se="(",ce=Ir("(",!1),ne=")",te=Ir(")",!1),Ee=function(L,K){return{type:"subshell",subshell:L,args:K}},Re="{",dt=Ir("{",!1),H="}",at=Ir("}",!1),Te=function(L,K){return{type:"group",group:L,args:K}},Qe=function(L,K){return{type:"command",args:K,envs:L}},ke=function(L){return{type:"envs",envs:L}},He=function(L){return L},Ne=function(L){return L},Ve=/^[0-9]/,je=Cs([["0","9"]],!1,!1),x=function(L,K,re){return{type:"redirection",subtype:K,fd:L!==null?parseInt(L):null,args:[re]}},C=">>",P=Ir(">>",!1),y=">&",F=Ir(">&",!1),z=">",X=Ir(">",!1),Z="<<<",ie=Ir("<<<",!1),Pe="<&",Le=Ir("<&",!1),ot="<",gt=Ir("<",!1),jt=function(L){return{type:"argument",segments:[].concat(...L)}},$t=function(L){return L},xt="$'",on=Ir("$'",!1),br="'",dr=Ir("'",!1),Pr=function(L){return[{type:"text",text:L}]},Yr='""',Wn=Ir('""',!1),Os=function(){return{type:"text",text:""}},Ti='"',hs=Ir('"',!1),io=function(L){return L},Si=function(L){return{type:"arithmetic",arithmetic:L,quoted:!0}},Ms=function(L){return{type:"shell",shell:L,quoted:!0}},so=function(L){return{type:"variable",...L,quoted:!0}},cc=function(L){return{type:"text",text:L}},Au=function(L){return{type:"arithmetic",arithmetic:L,quoted:!1}},op=function(L){return{type:"shell",shell:L,quoted:!1}},ap=function(L){return{type:"variable",...L,quoted:!1}},Us=function(L){return{type:"glob",pattern:L}},vn=/^[^']/,oo=Cs(["'"],!0,!1),_s=function(L){return L.join("")},dl=/^[^$"]/,ml=Cs(["$",'"'],!0,!1),ao=`\\
10`,Kn=Ir(`\\
11`,!1),Ln=function(){return""},Ni="\\",On=Ir("\\",!1),Hi=/^[\\$"`]/,ve=Cs(["\\","$",'"',"`"],!1,!1),Li=function(L){return L},ni="\\a",Ma=Ir("\\a",!1),pr=function(){return"a"},uc="\\b",fu=Ir("\\b",!1),Ac=function(){return"\b"},yl=/^[Ee]/,DA=Cs(["E","e"],!1,!1),pu=function(){return"\x1B"},Ce="\\f",Rt=Ir("\\f",!1),fc=function(){return"\f"},ji="\\n",hu=Ir("\\n",!1),Yt=function(){return`
12`},El="\\r",SA=Ir("\\r",!1),lp=function(){return"\r"},pc="\\t",PA=Ir("\\t",!1),Qn=function(){return" "},pi="\\v",hc=Ir("\\v",!1),xA=function(){return"\v"},oa=/^[\\'"?]/,Oi=Cs(["\\","'",'"',"?"],!1,!1),_o=function(L){return String.fromCharCode(parseInt(L,16))},Ze="\\x",lo=Ir("\\x",!1),gc="\\u",gu=Ir("\\u",!1),qi="\\U",du=Ir("\\U",!1),bA=function(L){return String.fromCodePoint(parseInt(L,16))},Ua=/^[0-7]/,dc=Cs([["0","7"]],!1,!1),gs=/^[0-9a-fA-f]/,Ut=Cs([["0","9"],["a","f"],["A","f"]],!1,!1),kn=lg(),Ei="{}",aa=Ir("{}",!1),co=function(){return"{}"},Hs="-",la=Ir("-",!1),ca="+",Ho=Ir("+",!1),wi=".",ds=Ir(".",!1),ms=function(L,K,re){return{type:"number",value:(L==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},ys=function(L,K){return{type:"number",value:(L==="-"?-1:1)*parseInt(K.join(""))}},js=function(L){return{type:"variable",...L}},Mn=function(L){return{type:"variable",name:L}},Dn=function(L){return L},Es="*",We=Ir("*",!1),tt="/",It=Ir("/",!1),rr=function(L,K,re){return{type:K==="*"?"multiplication":"division",right:re}},$=function(L,K){return K.reduce((re,pe)=>({left:re,...pe}),L)},me=function(L,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},Oe="$((",ft=Ir("$((",!1),pt="))",Tt=Ir("))",!1),er=function(L){return L},Xr="$(",Gi=Ir("$(",!1),$i=function(L){return L},Pi="${",jo=Ir("${",!1),QA=":-",kA=Ir(":-",!1),cp=function(L,K){return{name:L,defaultValue:K}},rg=":-}",mu=Ir(":-}",!1),ng=function(L){return{name:L,defaultValue:[]}},yu=":+",uo=Ir(":+",!1),FA=function(L,K){return{name:L,alternativeValue:K}},mc=":+}",ua=Ir(":+}",!1),ig=function(L){return{name:L,alternativeValue:[]}},yc=function(L){return{name:L}},Sm="$",sg=Ir("$",!1),Xn=function(L){return t.isGlobPattern(L)},up=function(L){return L},og=/^[a-zA-Z0-9_]/,RA=Cs([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),qs=function(){return ag()},Eu=/^[$@*?#a-zA-Z0-9_\-]/,Ha=Cs(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),Yi=/^[()}<>$|&; \t"']/,Aa=Cs(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),wu=/^[<>&; \t"']/,ws=Cs(["<",">","&",";"," "," ",'"',"'"],!1,!1),Ec=/^[ \t]/,wc=Cs([" "," "],!1,!1),Y=0,Dt=0,wl=[{line:1,column:1}],xi=0,Cc=[],ct=0,Cu;if("startRule"in t){if(!(t.startRule in o))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=o[t.startRule]}function ag(){return e.substring(Dt,Y)}function dC(){return Ic(Dt,Y)}function TA(L,K){throw K=K!==void 0?K:Ic(Dt,Y),Ag([ug(L)],e.substring(Dt,Y),K)}function Ap(L,K){throw K=K!==void 0?K:Ic(Dt,Y),Pm(L,K)}function Ir(L,K){return{type:"literal",text:L,ignoreCase:K}}function Cs(L,K,re){return{type:"class",parts:L,inverted:K,ignoreCase:re}}function lg(){return{type:"any"}}function cg(){return{type:"end"}}function ug(L){return{type:"other",description:L}}function fp(L){var K=wl[L],re;if(K)return K;for(re=L-1;!wl[re];)re--;for(K=wl[re],K={line:K.line,column:K.column};re<L;)e.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return wl[L]=K,K}function Ic(L,K){var re=fp(L),pe=fp(K);return{start:{offset:L,line:re.line,column:re.column},end:{offset:K,line:pe.line,column:pe.column}}}function wt(L){Y<xi||(Y>xi&&(xi=Y,Cc=[]),Cc.push(L))}function Pm(L,K){return new jg(L,null,null,K)}function Ag(L,K,re){return new jg(jg.buildMessage(L,K),L,K,re)}function fg(){var L,K,re;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=Iu(),re===r&&(re=null),re!==r?(Dt=L,K=n(re),L=K):(Y=L,L=r)):(Y=L,L=r),L}function Iu(){var L,K,re,pe,ze;if(L=Y,K=Bu(),K!==r){for(re=[],pe=kt();pe!==r;)re.push(pe),pe=kt();re!==r?(pe=pg(),pe!==r?(ze=xm(),ze===r&&(ze=null),ze!==r?(Dt=L,K=u(K,pe,ze),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;if(L===r)if(L=Y,K=Bu(),K!==r){for(re=[],pe=kt();pe!==r;)re.push(pe),pe=kt();re!==r?(pe=pg(),pe===r&&(pe=null),pe!==r?(Dt=L,K=A(K,pe),L=K):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;return L}function xm(){var L,K,re,pe,ze;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=Iu(),re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();pe!==r?(Dt=L,K=p(re),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r;return L}function pg(){var L;return e.charCodeAt(Y)===59?(L=h,Y++):(L=r,ct===0&&wt(w)),L===r&&(e.charCodeAt(Y)===38?(L=I,Y++):(L=r,ct===0&&wt(v))),L}function Bu(){var L,K,re;return L=Y,K=fa(),K!==r?(re=mC(),re===r&&(re=null),re!==r?(Dt=L,K=b(K,re),L=K):(Y=L,L=r)):(Y=L,L=r),L}function mC(){var L,K,re,pe,ze,mt,Ar;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=bm(),re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();if(pe!==r)if(ze=Bu(),ze!==r){for(mt=[],Ar=kt();Ar!==r;)mt.push(Ar),Ar=kt();mt!==r?(Dt=L,K=E(re,ze),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;else Y=L,L=r;return L}function bm(){var L;return e.substr(Y,2)===R?(L=R,Y+=2):(L=r,ct===0&&wt(N)),L===r&&(e.substr(Y,2)===U?(L=U,Y+=2):(L=r,ct===0&&wt(V))),L}function fa(){var L,K,re;return L=Y,K=hg(),K!==r?(re=Bc(),re===r&&(re=null),re!==r?(Dt=L,K=ee(K,re),L=K):(Y=L,L=r)):(Y=L,L=r),L}function Bc(){var L,K,re,pe,ze,mt,Ar;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=Cl(),re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();if(pe!==r)if(ze=fa(),ze!==r){for(mt=[],Ar=kt();Ar!==r;)mt.push(Ar),Ar=kt();mt!==r?(Dt=L,K=le(re,ze),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;else Y=L,L=r;return L}function Cl(){var L;return e.substr(Y,2)===fe?(L=fe,Y+=2):(L=r,ct===0&&wt(de)),L===r&&(e.charCodeAt(Y)===124?(L=ge,Y++):(L=r,ct===0&&wt(oe))),L}function vu(){var L,K,re,pe,ze,mt;if(L=Y,K=yg(),K!==r)if(e.charCodeAt(Y)===61?(re=Be,Y++):(re=r,ct===0&&wt(be)),re!==r)if(pe=qo(),pe!==r){for(ze=[],mt=kt();mt!==r;)ze.push(mt),mt=kt();ze!==r?(Dt=L,K=g(K,pe),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r;else Y=L,L=r;if(L===r)if(L=Y,K=yg(),K!==r)if(e.charCodeAt(Y)===61?(re=Be,Y++):(re=r,ct===0&&wt(be)),re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();pe!==r?(Dt=L,K=we(K),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r;return L}function hg(){var L,K,re,pe,ze,mt,Ar,Er,mn,si,Mi;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(e.charCodeAt(Y)===40?(re=Se,Y++):(re=r,ct===0&&wt(ce)),re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();if(pe!==r)if(ze=Iu(),ze!==r){for(mt=[],Ar=kt();Ar!==r;)mt.push(Ar),Ar=kt();if(mt!==r)if(e.charCodeAt(Y)===41?(Ar=ne,Y++):(Ar=r,ct===0&&wt(te)),Ar!==r){for(Er=[],mn=kt();mn!==r;)Er.push(mn),mn=kt();if(Er!==r){for(mn=[],si=ja();si!==r;)mn.push(si),si=ja();if(mn!==r){for(si=[],Mi=kt();Mi!==r;)si.push(Mi),Mi=kt();si!==r?(Dt=L,K=Ee(ze,mn),L=K):(Y=L,L=r)}else Y=L,L=r}else Y=L,L=r}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;else Y=L,L=r;if(L===r){for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(e.charCodeAt(Y)===123?(re=Re,Y++):(re=r,ct===0&&wt(dt)),re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();if(pe!==r)if(ze=Iu(),ze!==r){for(mt=[],Ar=kt();Ar!==r;)mt.push(Ar),Ar=kt();if(mt!==r)if(e.charCodeAt(Y)===125?(Ar=H,Y++):(Ar=r,ct===0&&wt(at)),Ar!==r){for(Er=[],mn=kt();mn!==r;)Er.push(mn),mn=kt();if(Er!==r){for(mn=[],si=ja();si!==r;)mn.push(si),si=ja();if(mn!==r){for(si=[],Mi=kt();Mi!==r;)si.push(Mi),Mi=kt();si!==r?(Dt=L,K=Te(ze,mn),L=K):(Y=L,L=r)}else Y=L,L=r}else Y=L,L=r}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;else Y=L,L=r;if(L===r){for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){for(re=[],pe=vu();pe!==r;)re.push(pe),pe=vu();if(re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();if(pe!==r){if(ze=[],mt=pp(),mt!==r)for(;mt!==r;)ze.push(mt),mt=pp();else ze=r;if(ze!==r){for(mt=[],Ar=kt();Ar!==r;)mt.push(Ar),Ar=kt();mt!==r?(Dt=L,K=Qe(re,ze),L=K):(Y=L,L=r)}else Y=L,L=r}else Y=L,L=r}else Y=L,L=r}else Y=L,L=r;if(L===r){for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){if(re=[],pe=vu(),pe!==r)for(;pe!==r;)re.push(pe),pe=vu();else re=r;if(re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();pe!==r?(Dt=L,K=ke(re),L=K):(Y=L,L=r)}else Y=L,L=r}else Y=L,L=r}}}return L}function NA(){var L,K,re,pe,ze;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){if(re=[],pe=hp(),pe!==r)for(;pe!==r;)re.push(pe),pe=hp();else re=r;if(re!==r){for(pe=[],ze=kt();ze!==r;)pe.push(ze),ze=kt();pe!==r?(Dt=L,K=He(re),L=K):(Y=L,L=r)}else Y=L,L=r}else Y=L,L=r;return L}function pp(){var L,K,re;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r?(re=ja(),re!==r?(Dt=L,K=Ne(re),L=K):(Y=L,L=r)):(Y=L,L=r),L===r){for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();K!==r?(re=hp(),re!==r?(Dt=L,K=Ne(re),L=K):(Y=L,L=r)):(Y=L,L=r)}return L}function ja(){var L,K,re,pe,ze;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(Ve.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(je)),re===r&&(re=null),re!==r?(pe=gg(),pe!==r?(ze=hp(),ze!==r?(Dt=L,K=x(re,pe,ze),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L}function gg(){var L;return e.substr(Y,2)===C?(L=C,Y+=2):(L=r,ct===0&&wt(P)),L===r&&(e.substr(Y,2)===y?(L=y,Y+=2):(L=r,ct===0&&wt(F)),L===r&&(e.charCodeAt(Y)===62?(L=z,Y++):(L=r,ct===0&&wt(X)),L===r&&(e.substr(Y,3)===Z?(L=Z,Y+=3):(L=r,ct===0&&wt(ie)),L===r&&(e.substr(Y,2)===Pe?(L=Pe,Y+=2):(L=r,ct===0&&wt(Le)),L===r&&(e.charCodeAt(Y)===60?(L=ot,Y++):(L=r,ct===0&&wt(gt))))))),L}function hp(){var L,K,re;for(L=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=qo(),re!==r?(Dt=L,K=Ne(re),L=K):(Y=L,L=r)):(Y=L,L=r),L}function qo(){var L,K,re;if(L=Y,K=[],re=Is(),re!==r)for(;re!==r;)K.push(re),re=Is();else K=r;return K!==r&&(Dt=L,K=jt(K)),L=K,L}function Is(){var L,K;return L=Y,K=Ci(),K!==r&&(Dt=L,K=$t(K)),L=K,L===r&&(L=Y,K=Qm(),K!==r&&(Dt=L,K=$t(K)),L=K,L===r&&(L=Y,K=km(),K!==r&&(Dt=L,K=$t(K)),L=K,L===r&&(L=Y,K=Go(),K!==r&&(Dt=L,K=$t(K)),L=K))),L}function Ci(){var L,K,re,pe;return L=Y,e.substr(Y,2)===xt?(K=xt,Y+=2):(K=r,ct===0&&wt(on)),K!==r?(re=an(),re!==r?(e.charCodeAt(Y)===39?(pe=br,Y++):(pe=r,ct===0&&wt(dr)),pe!==r?(Dt=L,K=Pr(re),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L}function Qm(){var L,K,re,pe;return L=Y,e.charCodeAt(Y)===39?(K=br,Y++):(K=r,ct===0&&wt(dr)),K!==r?(re=dp(),re!==r?(e.charCodeAt(Y)===39?(pe=br,Y++):(pe=r,ct===0&&wt(dr)),pe!==r?(Dt=L,K=Pr(re),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L}function km(){var L,K,re,pe;if(L=Y,e.substr(Y,2)===Yr?(K=Yr,Y+=2):(K=r,ct===0&&wt(Wn)),K!==r&&(Dt=L,K=Os()),L=K,L===r)if(L=Y,e.charCodeAt(Y)===34?(K=Ti,Y++):(K=r,ct===0&&wt(hs)),K!==r){for(re=[],pe=LA();pe!==r;)re.push(pe),pe=LA();re!==r?(e.charCodeAt(Y)===34?(pe=Ti,Y++):(pe=r,ct===0&&wt(hs)),pe!==r?(Dt=L,K=io(re),L=K):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;return L}function Go(){var L,K,re;if(L=Y,K=[],re=gp(),re!==r)for(;re!==r;)K.push(re),re=gp();else K=r;return K!==r&&(Dt=L,K=io(K)),L=K,L}function LA(){var L,K;return L=Y,K=qr(),K!==r&&(Dt=L,K=Si(K)),L=K,L===r&&(L=Y,K=mp(),K!==r&&(Dt=L,K=Ms(K)),L=K,L===r&&(L=Y,K=Dc(),K!==r&&(Dt=L,K=so(K)),L=K,L===r&&(L=Y,K=dg(),K!==r&&(Dt=L,K=cc(K)),L=K))),L}function gp(){var L,K;return L=Y,K=qr(),K!==r&&(Dt=L,K=Au(K)),L=K,L===r&&(L=Y,K=mp(),K!==r&&(Dt=L,K=op(K)),L=K,L===r&&(L=Y,K=Dc(),K!==r&&(Dt=L,K=ap(K)),L=K,L===r&&(L=Y,K=yC(),K!==r&&(Dt=L,K=Us(K)),L=K,L===r&&(L=Y,K=ha(),K!==r&&(Dt=L,K=cc(K)),L=K)))),L}function dp(){var L,K,re;for(L=Y,K=[],vn.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(oo));re!==r;)K.push(re),vn.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(oo));return K!==r&&(Dt=L,K=_s(K)),L=K,L}function dg(){var L,K,re;if(L=Y,K=[],re=pa(),re===r&&(dl.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(ml))),re!==r)for(;re!==r;)K.push(re),re=pa(),re===r&&(dl.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(ml)));else K=r;return K!==r&&(Dt=L,K=_s(K)),L=K,L}function pa(){var L,K,re;return L=Y,e.substr(Y,2)===ao?(K=ao,Y+=2):(K=r,ct===0&&wt(Kn)),K!==r&&(Dt=L,K=Ln()),L=K,L===r&&(L=Y,e.charCodeAt(Y)===92?(K=Ni,Y++):(K=r,ct===0&&wt(On)),K!==r?(Hi.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(ve)),re!==r?(Dt=L,K=Li(re),L=K):(Y=L,L=r)):(Y=L,L=r)),L}function an(){var L,K,re;for(L=Y,K=[],re=Ao(),re===r&&(vn.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(oo)));re!==r;)K.push(re),re=Ao(),re===r&&(vn.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(oo)));return K!==r&&(Dt=L,K=_s(K)),L=K,L}function Ao(){var L,K,re;return L=Y,e.substr(Y,2)===ni?(K=ni,Y+=2):(K=r,ct===0&&wt(Ma)),K!==r&&(Dt=L,K=pr()),L=K,L===r&&(L=Y,e.substr(Y,2)===uc?(K=uc,Y+=2):(K=r,ct===0&&wt(fu)),K!==r&&(Dt=L,K=Ac()),L=K,L===r&&(L=Y,e.charCodeAt(Y)===92?(K=Ni,Y++):(K=r,ct===0&&wt(On)),K!==r?(yl.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(DA)),re!==r?(Dt=L,K=pu(),L=K):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===Ce?(K=Ce,Y+=2):(K=r,ct===0&&wt(Rt)),K!==r&&(Dt=L,K=fc()),L=K,L===r&&(L=Y,e.substr(Y,2)===ji?(K=ji,Y+=2):(K=r,ct===0&&wt(hu)),K!==r&&(Dt=L,K=Yt()),L=K,L===r&&(L=Y,e.substr(Y,2)===El?(K=El,Y+=2):(K=r,ct===0&&wt(SA)),K!==r&&(Dt=L,K=lp()),L=K,L===r&&(L=Y,e.substr(Y,2)===pc?(K=pc,Y+=2):(K=r,ct===0&&wt(PA)),K!==r&&(Dt=L,K=Qn()),L=K,L===r&&(L=Y,e.substr(Y,2)===pi?(K=pi,Y+=2):(K=r,ct===0&&wt(hc)),K!==r&&(Dt=L,K=xA()),L=K,L===r&&(L=Y,e.charCodeAt(Y)===92?(K=Ni,Y++):(K=r,ct===0&&wt(On)),K!==r?(oa.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(Oi)),re!==r?(Dt=L,K=Li(re),L=K):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=OA()))))))))),L}function OA(){var L,K,re,pe,ze,mt,Ar,Er,mn,si,Mi,wg;return L=Y,e.charCodeAt(Y)===92?(K=Ni,Y++):(K=r,ct===0&&wt(On)),K!==r?(re=qa(),re!==r?(Dt=L,K=_o(re),L=K):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===Ze?(K=Ze,Y+=2):(K=r,ct===0&&wt(lo)),K!==r?(re=Y,pe=Y,ze=qa(),ze!==r?(mt=ii(),mt!==r?(ze=[ze,mt],pe=ze):(Y=pe,pe=r)):(Y=pe,pe=r),pe===r&&(pe=qa()),pe!==r?re=e.substring(re,Y):re=pe,re!==r?(Dt=L,K=_o(re),L=K):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===gc?(K=gc,Y+=2):(K=r,ct===0&&wt(gu)),K!==r?(re=Y,pe=Y,ze=ii(),ze!==r?(mt=ii(),mt!==r?(Ar=ii(),Ar!==r?(Er=ii(),Er!==r?(ze=[ze,mt,Ar,Er],pe=ze):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r),pe!==r?re=e.substring(re,Y):re=pe,re!==r?(Dt=L,K=_o(re),L=K):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===qi?(K=qi,Y+=2):(K=r,ct===0&&wt(du)),K!==r?(re=Y,pe=Y,ze=ii(),ze!==r?(mt=ii(),mt!==r?(Ar=ii(),Ar!==r?(Er=ii(),Er!==r?(mn=ii(),mn!==r?(si=ii(),si!==r?(Mi=ii(),Mi!==r?(wg=ii(),wg!==r?(ze=[ze,mt,Ar,Er,mn,si,Mi,wg],pe=ze):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r)):(Y=pe,pe=r),pe!==r?re=e.substring(re,Y):re=pe,re!==r?(Dt=L,K=bA(re),L=K):(Y=L,L=r)):(Y=L,L=r)))),L}function qa(){var L;return Ua.test(e.charAt(Y))?(L=e.charAt(Y),Y++):(L=r,ct===0&&wt(dc)),L}function ii(){var L;return gs.test(e.charAt(Y))?(L=e.charAt(Y),Y++):(L=r,ct===0&&wt(Ut)),L}function ha(){var L,K,re,pe,ze;if(L=Y,K=[],re=Y,e.charCodeAt(Y)===92?(pe=Ni,Y++):(pe=r,ct===0&&wt(On)),pe!==r?(e.length>Y?(ze=e.charAt(Y),Y++):(ze=r,ct===0&&wt(kn)),ze!==r?(Dt=re,pe=Li(ze),re=pe):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,e.substr(Y,2)===Ei?(pe=Ei,Y+=2):(pe=r,ct===0&&wt(aa)),pe!==r&&(Dt=re,pe=co()),re=pe,re===r&&(re=Y,pe=Y,ct++,ze=Fm(),ct--,ze===r?pe=void 0:(Y=pe,pe=r),pe!==r?(e.length>Y?(ze=e.charAt(Y),Y++):(ze=r,ct===0&&wt(kn)),ze!==r?(Dt=re,pe=Li(ze),re=pe):(Y=re,re=r)):(Y=re,re=r))),re!==r)for(;re!==r;)K.push(re),re=Y,e.charCodeAt(Y)===92?(pe=Ni,Y++):(pe=r,ct===0&&wt(On)),pe!==r?(e.length>Y?(ze=e.charAt(Y),Y++):(ze=r,ct===0&&wt(kn)),ze!==r?(Dt=re,pe=Li(ze),re=pe):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,e.substr(Y,2)===Ei?(pe=Ei,Y+=2):(pe=r,ct===0&&wt(aa)),pe!==r&&(Dt=re,pe=co()),re=pe,re===r&&(re=Y,pe=Y,ct++,ze=Fm(),ct--,ze===r?pe=void 0:(Y=pe,pe=r),pe!==r?(e.length>Y?(ze=e.charAt(Y),Y++):(ze=r,ct===0&&wt(kn)),ze!==r?(Dt=re,pe=Li(ze),re=pe):(Y=re,re=r)):(Y=re,re=r)));else K=r;return K!==r&&(Dt=L,K=_s(K)),L=K,L}function vc(){var L,K,re,pe,ze,mt;if(L=Y,e.charCodeAt(Y)===45?(K=Hs,Y++):(K=r,ct===0&&wt(la)),K===r&&(e.charCodeAt(Y)===43?(K=ca,Y++):(K=r,ct===0&&wt(Ho))),K===r&&(K=null),K!==r){if(re=[],Ve.test(e.charAt(Y))?(pe=e.charAt(Y),Y++):(pe=r,ct===0&&wt(je)),pe!==r)for(;pe!==r;)re.push(pe),Ve.test(e.charAt(Y))?(pe=e.charAt(Y),Y++):(pe=r,ct===0&&wt(je));else re=r;if(re!==r)if(e.charCodeAt(Y)===46?(pe=wi,Y++):(pe=r,ct===0&&wt(ds)),pe!==r){if(ze=[],Ve.test(e.charAt(Y))?(mt=e.charAt(Y),Y++):(mt=r,ct===0&&wt(je)),mt!==r)for(;mt!==r;)ze.push(mt),Ve.test(e.charAt(Y))?(mt=e.charAt(Y),Y++):(mt=r,ct===0&&wt(je));else ze=r;ze!==r?(Dt=L,K=ms(K,re,ze),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;if(L===r){if(L=Y,e.charCodeAt(Y)===45?(K=Hs,Y++):(K=r,ct===0&&wt(la)),K===r&&(e.charCodeAt(Y)===43?(K=ca,Y++):(K=r,ct===0&&wt(Ho))),K===r&&(K=null),K!==r){if(re=[],Ve.test(e.charAt(Y))?(pe=e.charAt(Y),Y++):(pe=r,ct===0&&wt(je)),pe!==r)for(;pe!==r;)re.push(pe),Ve.test(e.charAt(Y))?(pe=e.charAt(Y),Y++):(pe=r,ct===0&&wt(je));else re=r;re!==r?(Dt=L,K=ys(K,re),L=K):(Y=L,L=r)}else Y=L,L=r;if(L===r&&(L=Y,K=Dc(),K!==r&&(Dt=L,K=js(K)),L=K,L===r&&(L=Y,K=Ga(),K!==r&&(Dt=L,K=Mn(K)),L=K,L===r)))if(L=Y,e.charCodeAt(Y)===40?(K=Se,Y++):(K=r,ct===0&&wt(ce)),K!==r){for(re=[],pe=kt();pe!==r;)re.push(pe),pe=kt();if(re!==r)if(pe=es(),pe!==r){for(ze=[],mt=kt();mt!==r;)ze.push(mt),mt=kt();ze!==r?(e.charCodeAt(Y)===41?(mt=ne,Y++):(mt=r,ct===0&&wt(te)),mt!==r?(Dt=L,K=Dn(pe),L=K):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r}return L}function Il(){var L,K,re,pe,ze,mt,Ar,Er;if(L=Y,K=vc(),K!==r){for(re=[],pe=Y,ze=[],mt=kt();mt!==r;)ze.push(mt),mt=kt();if(ze!==r)if(e.charCodeAt(Y)===42?(mt=Es,Y++):(mt=r,ct===0&&wt(We)),mt===r&&(e.charCodeAt(Y)===47?(mt=tt,Y++):(mt=r,ct===0&&wt(It))),mt!==r){for(Ar=[],Er=kt();Er!==r;)Ar.push(Er),Er=kt();Ar!==r?(Er=vc(),Er!==r?(Dt=pe,ze=rr(K,mt,Er),pe=ze):(Y=pe,pe=r)):(Y=pe,pe=r)}else Y=pe,pe=r;else Y=pe,pe=r;for(;pe!==r;){for(re.push(pe),pe=Y,ze=[],mt=kt();mt!==r;)ze.push(mt),mt=kt();if(ze!==r)if(e.charCodeAt(Y)===42?(mt=Es,Y++):(mt=r,ct===0&&wt(We)),mt===r&&(e.charCodeAt(Y)===47?(mt=tt,Y++):(mt=r,ct===0&&wt(It))),mt!==r){for(Ar=[],Er=kt();Er!==r;)Ar.push(Er),Er=kt();Ar!==r?(Er=vc(),Er!==r?(Dt=pe,ze=rr(K,mt,Er),pe=ze):(Y=pe,pe=r)):(Y=pe,pe=r)}else Y=pe,pe=r;else Y=pe,pe=r}re!==r?(Dt=L,K=$(K,re),L=K):(Y=L,L=r)}else Y=L,L=r;return L}function es(){var L,K,re,pe,ze,mt,Ar,Er;if(L=Y,K=Il(),K!==r){for(re=[],pe=Y,ze=[],mt=kt();mt!==r;)ze.push(mt),mt=kt();if(ze!==r)if(e.charCodeAt(Y)===43?(mt=ca,Y++):(mt=r,ct===0&&wt(Ho)),mt===r&&(e.charCodeAt(Y)===45?(mt=Hs,Y++):(mt=r,ct===0&&wt(la))),mt!==r){for(Ar=[],Er=kt();Er!==r;)Ar.push(Er),Er=kt();Ar!==r?(Er=Il(),Er!==r?(Dt=pe,ze=me(K,mt,Er),pe=ze):(Y=pe,pe=r)):(Y=pe,pe=r)}else Y=pe,pe=r;else Y=pe,pe=r;for(;pe!==r;){for(re.push(pe),pe=Y,ze=[],mt=kt();mt!==r;)ze.push(mt),mt=kt();if(ze!==r)if(e.charCodeAt(Y)===43?(mt=ca,Y++):(mt=r,ct===0&&wt(Ho)),mt===r&&(e.charCodeAt(Y)===45?(mt=Hs,Y++):(mt=r,ct===0&&wt(la))),mt!==r){for(Ar=[],Er=kt();Er!==r;)Ar.push(Er),Er=kt();Ar!==r?(Er=Il(),Er!==r?(Dt=pe,ze=me(K,mt,Er),pe=ze):(Y=pe,pe=r)):(Y=pe,pe=r)}else Y=pe,pe=r;else Y=pe,pe=r}re!==r?(Dt=L,K=$(K,re),L=K):(Y=L,L=r)}else Y=L,L=r;return L}function qr(){var L,K,re,pe,ze,mt;if(L=Y,e.substr(Y,3)===Oe?(K=Oe,Y+=3):(K=r,ct===0&&wt(ft)),K!==r){for(re=[],pe=kt();pe!==r;)re.push(pe),pe=kt();if(re!==r)if(pe=es(),pe!==r){for(ze=[],mt=kt();mt!==r;)ze.push(mt),mt=kt();ze!==r?(e.substr(Y,2)===pt?(mt=pt,Y+=2):(mt=r,ct===0&&wt(Tt)),mt!==r?(Dt=L,K=er(pe),L=K):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r}else Y=L,L=r;return L}function mp(){var L,K,re,pe;return L=Y,e.substr(Y,2)===Xr?(K=Xr,Y+=2):(K=r,ct===0&&wt(Gi)),K!==r?(re=Iu(),re!==r?(e.charCodeAt(Y)===41?(pe=ne,Y++):(pe=r,ct===0&&wt(te)),pe!==r?(Dt=L,K=$i(re),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L}function Dc(){var L,K,re,pe,ze,mt;return L=Y,e.substr(Y,2)===Pi?(K=Pi,Y+=2):(K=r,ct===0&&wt(jo)),K!==r?(re=Ga(),re!==r?(e.substr(Y,2)===QA?(pe=QA,Y+=2):(pe=r,ct===0&&wt(kA)),pe!==r?(ze=NA(),ze!==r?(e.charCodeAt(Y)===125?(mt=H,Y++):(mt=r,ct===0&&wt(at)),mt!==r?(Dt=L,K=cp(re,ze),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===Pi?(K=Pi,Y+=2):(K=r,ct===0&&wt(jo)),K!==r?(re=Ga(),re!==r?(e.substr(Y,3)===rg?(pe=rg,Y+=3):(pe=r,ct===0&&wt(mu)),pe!==r?(Dt=L,K=ng(re),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===Pi?(K=Pi,Y+=2):(K=r,ct===0&&wt(jo)),K!==r?(re=Ga(),re!==r?(e.substr(Y,2)===yu?(pe=yu,Y+=2):(pe=r,ct===0&&wt(uo)),pe!==r?(ze=NA(),ze!==r?(e.charCodeAt(Y)===125?(mt=H,Y++):(mt=r,ct===0&&wt(at)),mt!==r?(Dt=L,K=FA(re,ze),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===Pi?(K=Pi,Y+=2):(K=r,ct===0&&wt(jo)),K!==r?(re=Ga(),re!==r?(e.substr(Y,3)===mc?(pe=mc,Y+=3):(pe=r,ct===0&&wt(ua)),pe!==r?(Dt=L,K=ig(re),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.substr(Y,2)===Pi?(K=Pi,Y+=2):(K=r,ct===0&&wt(jo)),K!==r?(re=Ga(),re!==r?(e.charCodeAt(Y)===125?(pe=H,Y++):(pe=r,ct===0&&wt(at)),pe!==r?(Dt=L,K=yc(re),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r),L===r&&(L=Y,e.charCodeAt(Y)===36?(K=Sm,Y++):(K=r,ct===0&&wt(sg)),K!==r?(re=Ga(),re!==r?(Dt=L,K=yc(re),L=K):(Y=L,L=r)):(Y=L,L=r)))))),L}function yC(){var L,K,re;return L=Y,K=mg(),K!==r?(Dt=Y,re=Xn(K),re?re=void 0:re=r,re!==r?(Dt=L,K=up(K),L=K):(Y=L,L=r)):(Y=L,L=r),L}function mg(){var L,K,re,pe,ze;if(L=Y,K=[],re=Y,pe=Y,ct++,ze=Eg(),ct--,ze===r?pe=void 0:(Y=pe,pe=r),pe!==r?(e.length>Y?(ze=e.charAt(Y),Y++):(ze=r,ct===0&&wt(kn)),ze!==r?(Dt=re,pe=Li(ze),re=pe):(Y=re,re=r)):(Y=re,re=r),re!==r)for(;re!==r;)K.push(re),re=Y,pe=Y,ct++,ze=Eg(),ct--,ze===r?pe=void 0:(Y=pe,pe=r),pe!==r?(e.length>Y?(ze=e.charAt(Y),Y++):(ze=r,ct===0&&wt(kn)),ze!==r?(Dt=re,pe=Li(ze),re=pe):(Y=re,re=r)):(Y=re,re=r);else K=r;return K!==r&&(Dt=L,K=_s(K)),L=K,L}function yg(){var L,K,re;if(L=Y,K=[],og.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(RA)),re!==r)for(;re!==r;)K.push(re),og.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(RA));else K=r;return K!==r&&(Dt=L,K=qs()),L=K,L}function Ga(){var L,K,re;if(L=Y,K=[],Eu.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(Ha)),re!==r)for(;re!==r;)K.push(re),Eu.test(e.charAt(Y))?(re=e.charAt(Y),Y++):(re=r,ct===0&&wt(Ha));else K=r;return K!==r&&(Dt=L,K=qs()),L=K,L}function Fm(){var L;return Yi.test(e.charAt(Y))?(L=e.charAt(Y),Y++):(L=r,ct===0&&wt(Aa)),L}function Eg(){var L;return wu.test(e.charAt(Y))?(L=e.charAt(Y),Y++):(L=r,ct===0&&wt(ws)),L}function kt(){var L,K;if(L=[],Ec.test(e.charAt(Y))?(K=e.charAt(Y),Y++):(K=r,ct===0&&wt(wc)),K!==r)for(;K!==r;)L.push(K),Ec.test(e.charAt(Y))?(K=e.charAt(Y),Y++):(K=r,ct===0&&wt(wc));else L=r;return L}if(Cu=a(),Cu!==r&&Y===e.length)return Cu;throw Cu!==r&&Y<e.length&&wt(cg()),Ag(Cc,xi<e.length?e.charAt(xi):null,xi<e.length?Ic(xi,xi+1):Ic(xi,xi))}JY.exports={SyntaxError:jg,parse:a8e}});function ND(e,t={isGlobPattern:()=>!1}){try{return(0,zY.parse)(e,t)}catch(r){throw r.location&&(r.message=r.message.replace(/(\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function ly(e,{endSemicolon:t=!1}={}){return e.map(({command:r,type:o},a)=>`${LD(r)}${o===";"?a!==e.length-1||t?";":"":" &"}`).join(" ")}function LD(e){return`${cy(e.chain)}${e.then?` ${sT(e.then)}`:""}`}function sT(e){return`${e.type} ${LD(e.line)}`}function cy(e){return`${aT(e)}${e.then?` ${oT(e.then)}`:""}`}function oT(e){return`${e.type} ${cy(e.chain)}`}function aT(e){switch(e.type){case"command":return`${e.envs.length>0?`${e.envs.map(t=>TD(t)).join(" ")} `:""}${e.args.map(t=>lT(t)).join(" ")}`;case"subshell":return`(${ly(e.subshell)})${e.args.length>0?` ${e.args.map(t=>KC(t)).join(" ")}`:""}`;case"group":return`{ ${ly(e.group,{endSemicolon:!0})} }${e.args.length>0?` ${e.args.map(t=>KC(t)).join(" ")}`:""}`;case"envs":return e.envs.map(t=>TD(t)).join(" ");default:throw new Error(`Unsupported command type: "${e.type}"`)}}function TD(e){return`${e.name}=${e.args[0]?qg(e.args[0]):""}`}function lT(e){switch(e.type){case"redirection":return KC(e);case"argument":return qg(e);default:throw new Error(`Unsupported argument type: "${e.type}"`)}}function KC(e){return`${e.subtype} ${e.args.map(t=>qg(t)).join(" ")}`}function qg(e){return e.segments.map(t=>cT(t)).join("")}function cT(e){let t=(o,a)=>a?`"${o}"`:o,r=o=>o===""?"''":o.match(/[()}<>$|&;"'\n\t ]/)?o.match(/['\t\p{C}]/u)?o.match(/'/)?`"${o.replace(/["$\t\p{C}]/u,c8e)}"`:`$'${o.replace(/[\t\p{C}]/u,ZY)}'`:`'${o}'`:o;switch(e.type){case"text":return r(e.text);case"glob":return e.pattern;case"shell":return t(`\${${ly(e.shell)}}`,e.quoted);case"variable":return t(typeof e.defaultValue>"u"?typeof e.alternativeValue>"u"?`\${${e.name}}`:e.alternativeValue.length===0?`\${${e.name}:+}`:`\${${e.name}:+${e.alternativeValue.map(o=>qg(o)).join(" ")}}`:e.defaultValue.length===0?`\${${e.name}:-}`:`\${${e.name}:-${e.defaultValue.map(o=>qg(o)).join(" ")}}`,e.quoted);case"arithmetic":return`$(( ${OD(e.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${e.type}"`)}}function OD(e){let t=a=>{switch(a){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${a}"`)}},r=(a,n)=>n?`( ${a} )`:a,o=a=>r(OD(a),!["number","variable"].includes(a.type));switch(e.type){case"number":return String(e.value);case"variable":return e.name;default:return`${o(e.left)} ${t(e.type)} ${o(e.right)}`}}var zY,XY,l8e,ZY,c8e,$Y=yt(()=>{zY=$e(VY());XY=new Map([["\f","\\f"],[`
13`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),l8e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(XY,([e,t])=>[e,`"$'${t}'"`])]),ZY=e=>XY.get(e)??`\\x${e.charCodeAt(0).toString(16).padStart(2,"0")}`,c8e=e=>l8e.get(e)??`"$'${ZY(e)}'"`});var tW=_((fxt,eW)=>{"use strict";function u8e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function Gg(e,t,r,o){this.message=e,this.expected=t,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Gg)}u8e(Gg,Error);Gg.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var w="",I;for(I=0;I<h.parts.length;I++)w+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+w+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function u(h){return r[h.type](h)}function A(h){var w=new Array(h.length),I,v;for(I=0;I<h.length;I++)w[I]=u(h[I]);if(w.sort(),w.length>0){for(I=1,v=1;I<w.length;I++)w[I-1]!==w[I]&&(w[v]=w[I],v++);w.length=v}switch(w.length){case 1:return w[0];case 2:return w[0]+" or "+w[1];default:return w.slice(0,-1).join(", ")+", or "+w[w.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(e)+" but "+p(t)+" found."};function A8e(e,t){t=t!==void 0?t:{};var r={},o={resolution:Qe},a=Qe,n="/",u=Se("/",!1),A=function(je,x){return{from:je,descriptor:x}},p=function(je){return{descriptor:je}},h="@",w=Se("@",!1),I=function(je,x){return{fullName:je,description:x}},v=function(je){return{fullName:je}},b=function(){return Be()},E=/^[^\/@]/,R=ce(["/","@"],!0,!1),N=/^[^\/]/,U=ce(["/"],!0,!1),V=0,ee=0,le=[{line:1,column:1}],fe=0,de=[],ge=0,oe;if("startRule"in t){if(!(t.startRule in o))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=o[t.startRule]}function Be(){return e.substring(ee,V)}function be(){return dt(ee,V)}function g(je,x){throw x=x!==void 0?x:dt(ee,V),Te([Ee(je)],e.substring(ee,V),x)}function we(je,x){throw x=x!==void 0?x:dt(ee,V),at(je,x)}function Se(je,x){return{type:"literal",text:je,ignoreCase:x}}function ce(je,x,C){return{type:"class",parts:je,inverted:x,ignoreCase:C}}function ne(){return{type:"any"}}function te(){return{type:"end"}}function Ee(je){return{type:"other",description:je}}function Re(je){var x=le[je],C;if(x)return x;for(C=je-1;!le[C];)C--;for(x=le[C],x={line:x.line,column:x.column};C<je;)e.charCodeAt(C)===10?(x.line++,x.column=1):x.column++,C++;return le[je]=x,x}function dt(je,x){var C=Re(je),P=Re(x);return{start:{offset:je,line:C.line,column:C.column},end:{offset:x,line:P.line,column:P.column}}}function H(je){V<fe||(V>fe&&(fe=V,de=[]),de.push(je))}function at(je,x){return new Gg(je,null,null,x)}function Te(je,x,C){return new Gg(Gg.buildMessage(je,x),je,x,C)}function Qe(){var je,x,C,P;return je=V,x=ke(),x!==r?(e.charCodeAt(V)===47?(C=n,V++):(C=r,ge===0&&H(u)),C!==r?(P=ke(),P!==r?(ee=je,x=A(x,P),je=x):(V=je,je=r)):(V=je,je=r)):(V=je,je=r),je===r&&(je=V,x=ke(),x!==r&&(ee=je,x=p(x)),je=x),je}function ke(){var je,x,C,P;return je=V,x=He(),x!==r?(e.charCodeAt(V)===64?(C=h,V++):(C=r,ge===0&&H(w)),C!==r?(P=Ve(),P!==r?(ee=je,x=I(x,P),je=x):(V=je,je=r)):(V=je,je=r)):(V=je,je=r),je===r&&(je=V,x=He(),x!==r&&(ee=je,x=v(x)),je=x),je}function He(){var je,x,C,P,y;return je=V,e.charCodeAt(V)===64?(x=h,V++):(x=r,ge===0&&H(w)),x!==r?(C=Ne(),C!==r?(e.charCodeAt(V)===47?(P=n,V++):(P=r,ge===0&&H(u)),P!==r?(y=Ne(),y!==r?(ee=je,x=b(),je=x):(V=je,je=r)):(V=je,je=r)):(V=je,je=r)):(V=je,je=r),je===r&&(je=V,x=Ne(),x!==r&&(ee=je,x=b()),je=x),je}function Ne(){var je,x,C;if(je=V,x=[],E.test(e.charAt(V))?(C=e.charAt(V),V++):(C=r,ge===0&&H(R)),C!==r)for(;C!==r;)x.push(C),E.test(e.charAt(V))?(C=e.charAt(V),V++):(C=r,ge===0&&H(R));else x=r;return x!==r&&(ee=je,x=b()),je=x,je}function Ve(){var je,x,C;if(je=V,x=[],N.test(e.charAt(V))?(C=e.charAt(V),V++):(C=r,ge===0&&H(U)),C!==r)for(;C!==r;)x.push(C),N.test(e.charAt(V))?(C=e.charAt(V),V++):(C=r,ge===0&&H(U));else x=r;return x!==r&&(ee=je,x=b()),je=x,je}if(oe=a(),oe!==r&&V===e.length)return oe;throw oe!==r&&V<e.length&&H(te()),Te(de,fe<e.length?e.charAt(fe):null,fe<e.length?dt(fe,fe+1):dt(fe,fe))}eW.exports={SyntaxError:Gg,parse:A8e}});function MD(e){let t=e.match(/^\*{1,2}\/(.*)/);if(t)throw new Error(`The override for '${e}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${t[1]}' instead.`);try{return(0,rW.parse)(e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function UD(e){let t="";return e.from&&(t+=e.from.fullName,e.from.description&&(t+=`@${e.from.description}`),t+="/"),t+=e.descriptor.fullName,e.descriptor.description&&(t+=`@${e.descriptor.description}`),t}var rW,nW=yt(()=>{rW=$e(tW())});var Wg=_((hxt,Yg)=>{"use strict";function iW(e){return typeof e>"u"||e===null}function f8e(e){return typeof e=="object"&&e!==null}function p8e(e){return Array.isArray(e)?e:iW(e)?[]:[e]}function h8e(e,t){var r,o,a,n;if(t)for(n=Object.keys(t),r=0,o=n.length;r<o;r+=1)a=n[r],e[a]=t[a];return e}function g8e(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function d8e(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}Yg.exports.isNothing=iW;Yg.exports.isObject=f8e;Yg.exports.toArray=p8e;Yg.exports.repeat=g8e;Yg.exports.isNegativeZero=d8e;Yg.exports.extend=h8e});var uy=_((gxt,sW)=>{"use strict";function JC(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}JC.prototype=Object.create(Error.prototype);JC.prototype.constructor=JC;JC.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};sW.exports=JC});var lW=_((dxt,aW)=>{"use strict";var oW=Wg();function uT(e,t,r,o,a){this.name=e,this.buffer=t,this.position=r,this.line=o,this.column=a}uT.prototype.getSnippet=function(t,r){var o,a,n,u,A;if(!this.buffer)return null;for(t=t||4,r=r||75,o="",a=this.position;a>0&&`\0\r
14\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
15\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),oW.repeat(" ",t)+o+A+n+`
16`+oW.repeat(" ",t+this.position-a+o.length)+"^"};uT.prototype.toString=function(t){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(o+=`:
17`+r)),o};aW.exports=uT});var ss=_((mxt,uW)=>{"use strict";var cW=uy(),m8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],y8e=["scalar","sequence","mapping"];function E8e(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}function w8e(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(m8e.indexOf(r)===-1)throw new cW('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=E8e(t.styleAliases||null),y8e.indexOf(this.kind)===-1)throw new cW('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}uW.exports=w8e});var Kg=_((yxt,fW)=>{"use strict";var AW=Wg(),_D=uy(),C8e=ss();function AT(e,t,r){var o=[];return e.include.forEach(function(a){r=AT(a,t,r)}),e[t].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function I8e(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function o(a){e[a.kind][a.tag]=e.fallback[a.tag]=a}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(o);return e}function Ay(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new _D("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=AT(this,"implicit",[]),this.compiledExplicit=AT(this,"explicit",[]),this.compiledTypeMap=I8e(this.compiledImplicit,this.compiledExplicit)}Ay.DEFAULT=null;Ay.create=function(){var t,r;switch(arguments.length){case 1:t=Ay.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new _D("Wrong number of arguments for Schema.create function")}if(t=AW.toArray(t),r=AW.toArray(r),!t.every(function(o){return o instanceof Ay}))throw new _D("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof C8e}))throw new _D("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ay({include:t,explicit:r})};fW.exports=Ay});var hW=_((Ext,pW)=>{"use strict";var B8e=ss();pW.exports=new B8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var dW=_((wxt,gW)=>{"use strict";var v8e=ss();gW.exports=new v8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var yW=_((Cxt,mW)=>{"use strict";var D8e=ss();mW.exports=new D8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var HD=_((Ixt,EW)=>{"use strict";var S8e=Kg();EW.exports=new S8e({explicit:[hW(),dW(),yW()]})});var CW=_((Bxt,wW)=>{"use strict";var P8e=ss();function x8e(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function b8e(){return null}function Q8e(e){return e===null}wW.exports=new P8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:x8e,construct:b8e,predicate:Q8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var BW=_((vxt,IW)=>{"use strict";var k8e=ss();function F8e(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function R8e(e){return e==="true"||e==="True"||e==="TRUE"}function T8e(e){return Object.prototype.toString.call(e)==="[object Boolean]"}IW.exports=new k8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:F8e,construct:R8e,predicate:T8e,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var DW=_((Dxt,vW)=>{"use strict";var N8e=Wg(),L8e=ss();function O8e(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function M8e(e){return 48<=e&&e<=55}function U8e(e){return 48<=e&&e<=57}function _8e(e){if(e===null)return!1;var t=e.length,r=0,o=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;o=!0}return o&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!O8e(e.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}for(;r<t;r++)if(a=e[r],a!=="_"){if(!M8e(e.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(a===":")break;if(!U8e(e.charCodeAt(r)))return!1;o=!0}return!o||a==="_"?!1:a!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(r))}function H8e(e){var t=e,r=1,o,a,n=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),o=t[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),t=t.slice(1),o=t[0]),t==="0"?0:o==="0"?t[1]==="b"?r*parseInt(t.slice(2),2):t[1]==="x"?r*parseInt(t,16):r*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(u){n.unshift(parseInt(u,10))}),t=0,a=1,n.forEach(function(u){t+=u*a,a*=60}),r*t):r*parseInt(t,10)}function j8e(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!N8e.isNegativeZero(e)}vW.exports=new L8e("tag:yaml.org,2002:int",{kind:"scalar",resolve:_8e,construct:H8e,predicate:j8e,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var xW=_((Sxt,PW)=>{"use strict";var SW=Wg(),q8e=ss(),G8e=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Y8e(e){return!(e===null||!G8e.test(e)||e[e.length-1]==="_")}function W8e(e){var t,r,o,a;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,a=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(n){a.unshift(parseFloat(n,10))}),t=0,o=1,a.forEach(function(n){t+=n*o,o*=60}),r*t):r*parseFloat(t,10)}var K8e=/^[-+]?[0-9]+e/;function J8e(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(SW.isNegativeZero(e))return"-0.0";return r=e.toString(10),K8e.test(r)?r.replace("e",".e"):r}function V8e(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||SW.isNegativeZero(e))}PW.exports=new q8e("tag:yaml.org,2002:float",{kind:"scalar",resolve:Y8e,construct:W8e,predicate:V8e,represent:J8e,defaultStyle:"lowercase"})});var fT=_((Pxt,bW)=>{"use strict";var z8e=Kg();bW.exports=new z8e({include:[HD()],implicit:[CW(),BW(),DW(),xW()]})});var pT=_((xxt,QW)=>{"use strict";var X8e=Kg();QW.exports=new X8e({include:[fT()]})});var TW=_((bxt,RW)=>{"use strict";var Z8e=ss(),kW=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),FW=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function $8e(e){return e===null?!1:kW.exec(e)!==null||FW.exec(e)!==null}function eHe(e){var t,r,o,a,n,u,A,p=0,h=null,w,I,v;if(t=kW.exec(e),t===null&&(t=FW.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,o,a));if(n=+t[4],u=+t[5],A=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(w=+t[10],I=+(t[11]||0),h=(w*60+I)*6e4,t[9]==="-"&&(h=-h)),v=new Date(Date.UTC(r,o,a,n,u,A,p)),h&&v.setTime(v.getTime()-h),v}function tHe(e){return e.toISOString()}RW.exports=new Z8e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$8e,construct:eHe,instanceOf:Date,represent:tHe})});var LW=_((Qxt,NW)=>{"use strict";var rHe=ss();function nHe(e){return e==="<<"||e===null}NW.exports=new rHe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nHe})});var UW=_((kxt,MW)=>{"use strict";var Jg;try{OW=Ie,Jg=OW("buffer").Buffer}catch{}var OW,iHe=ss(),hT=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
18\r`;function sHe(e){if(e===null)return!1;var t,r,o=0,a=e.length,n=hT;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function oHe(e){var t,r,o=e.replace(/[\r\n=]/g,""),a=o.length,n=hT,u=0,A=[];for(t=0;t<a;t++)t%4===0&&t&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(t));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),Jg?Jg.from?Jg.from(A):new Jg(A):A}function aHe(e){var t="",r=0,o,a,n=e.length,u=hT;for(o=0;o<n;o++)o%3===0&&o&&(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[r&63]),r=(r<<8)+e[o];return a=n%3,a===0?(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[r&63]):a===2?(t+=u[r>>10&63],t+=u[r>>4&63],t+=u[r<<2&63],t+=u[64]):a===1&&(t+=u[r>>2&63],t+=u[r<<4&63],t+=u[64],t+=u[64]),t}function lHe(e){return Jg&&Jg.isBuffer(e)}MW.exports=new iHe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:sHe,construct:oHe,predicate:lHe,represent:aHe})});var HW=_((Rxt,_W)=>{"use strict";var cHe=ss(),uHe=Object.prototype.hasOwnProperty,AHe=Object.prototype.toString;function fHe(e){if(e===null)return!0;var t=[],r,o,a,n,u,A=e;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,AHe.call(a)!=="[object Object]")return!1;for(n in a)if(uHe.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}function pHe(e){return e!==null?e:[]}_W.exports=new cHe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:fHe,construct:pHe})});var qW=_((Txt,jW)=>{"use strict";var hHe=ss(),gHe=Object.prototype.toString;function dHe(e){if(e===null)return!0;var t,r,o,a,n,u=e;for(n=new Array(u.length),t=0,r=u.length;t<r;t+=1){if(o=u[t],gHe.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[t]=[a[0],o[a[0]]]}return!0}function mHe(e){if(e===null)return[];var t,r,o,a,n,u=e;for(n=new Array(u.length),t=0,r=u.length;t<r;t+=1)o=u[t],a=Object.keys(o),n[t]=[a[0],o[a[0]]];return n}jW.exports=new hHe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:dHe,construct:mHe})});var YW=_((Nxt,GW)=>{"use strict";var yHe=ss(),EHe=Object.prototype.hasOwnProperty;function wHe(e){if(e===null)return!0;var t,r=e;for(t in r)if(EHe.call(r,t)&&r[t]!==null)return!1;return!0}function CHe(e){return e!==null?e:{}}GW.exports=new yHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:wHe,construct:CHe})});var fy=_((Lxt,WW)=>{"use strict";var IHe=Kg();WW.exports=new IHe({include:[pT()],implicit:[TW(),LW()],explicit:[UW(),HW(),qW(),YW()]})});var JW=_((Oxt,KW)=>{"use strict";var BHe=ss();function vHe(){return!0}function DHe(){}function SHe(){return""}function PHe(e){return typeof e>"u"}KW.exports=new BHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:vHe,construct:DHe,predicate:PHe,represent:SHe})});var zW=_((Mxt,VW)=>{"use strict";var xHe=ss();function bHe(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),o="";return!(t[0]==="/"&&(r&&(o=r[1]),o.length>3||t[t.length-o.length-1]!=="/"))}function QHe(e){var t=e,r=/\/([gim]*)$/.exec(e),o="";return t[0]==="/"&&(r&&(o=r[1]),t=t.slice(1,t.length-o.length-1)),new RegExp(t,o)}function kHe(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function FHe(e){return Object.prototype.toString.call(e)==="[object RegExp]"}VW.exports=new xHe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:bHe,construct:QHe,predicate:FHe,represent:kHe})});var $W=_((Uxt,ZW)=>{"use strict";var jD;try{XW=Ie,jD=XW("esprima")}catch{typeof window<"u"&&(jD=window.esprima)}var XW,RHe=ss();function THe(e){if(e===null)return!1;try{var t="("+e+")",r=jD.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function NHe(e){var t="("+e+")",r=jD.parse(t,{range:!0}),o=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){o.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(o,t.slice(a[0]+1,a[1]-1)):new Function(o,"return "+t.slice(a[0],a[1]))}function LHe(e){return e.toString()}function OHe(e){return Object.prototype.toString.call(e)==="[object Function]"}ZW.exports=new RHe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:THe,construct:NHe,predicate:OHe,represent:LHe})});var VC=_((Hxt,tK)=>{"use strict";var eK=Kg();tK.exports=eK.DEFAULT=new eK({include:[fy()],explicit:[JW(),zW(),$W()]})});var wK=_((jxt,zC)=>{"use strict";var yf=Wg(),lK=uy(),MHe=lW(),cK=fy(),UHe=VC(),qp=Object.prototype.hasOwnProperty,qD=1,uK=2,AK=3,GD=4,gT=1,_He=2,rK=3,HHe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jHe=/[\x85\u2028\u2029]/,qHe=/[,\[\]\{\}]/,fK=/^(?:!|!!|![a-z\-]+!)$/i,pK=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function nK(e){return Object.prototype.toString.call(e)}function qu(e){return e===10||e===13}function zg(e){return e===9||e===32}function Ia(e){return e===9||e===32||e===10||e===13}function py(e){return e===44||e===91||e===93||e===123||e===125}function GHe(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function YHe(e){return e===120?2:e===117?4:e===85?8:0}function WHe(e){return 48<=e&&e<=57?e-48:-1}function iK(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
19`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function KHe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var hK=new Array(256),gK=new Array(256);for(Vg=0;Vg<256;Vg++)hK[Vg]=iK(Vg)?1:0,gK[Vg]=iK(Vg);var Vg;function JHe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||UHe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function dK(e,t){return new lK(t,new MHe(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Sr(e,t){throw dK(e,t)}function YD(e,t){e.onWarning&&e.onWarning.call(null,dK(e,t))}var sK={YAML:function(t,r,o){var a,n,u;t.version!==null&&Sr(t,"duplication of %YAML directive"),o.length!==1&&Sr(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&Sr(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&Sr(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=u<2,u!==1&&u!==2&&YD(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var a,n;o.length!==2&&Sr(t,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],fK.test(a)||Sr(t,"ill-formed tag handle (first argument) of the TAG directive"),qp.call(t.tagMap,a)&&Sr(t,'there is a previously declared suffix for "'+a+'" tag handle'),pK.test(n)||Sr(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[a]=n}};function jp(e,t,r,o){var a,n,u,A;if(t<r){if(A=e.input.slice(t,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||Sr(e,"expected valid JSON character");else HHe.test(A)&&Sr(e,"the stream contains non-printable characters");e.result+=A}}function oK(e,t,r,o){var a,n,u,A;for(yf.isObject(r)||Sr(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],qp.call(t,n)||(t[n]=r[n],o[n]=!0)}function hy(e,t,r,o,a,n,u,A){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Sr(e,"nested arrays are not supported inside keys"),typeof a=="object"&&nK(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&nK(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)oK(e,t,n[p],r);else oK(e,t,n,r);else!e.json&&!qp.call(r,a)&&qp.call(t,a)&&(e.line=u||e.line,e.position=A||e.position,Sr(e,"duplicated mapping key")),t[a]=n,delete r[a];return t}function dT(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Sr(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Ki(e,t,r){for(var o=0,a=e.input.charCodeAt(e.position);a!==0;){for(;zg(a);)a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(qu(a))for(dT(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&o!==0&&e.lineIndent<r&&YD(e,"deficient indentation"),o}function WD(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Ia(r)))}function mT(e,t){t===1?e.result+=" ":t>1&&(e.result+=yf.repeat(`
20`,t-1))}function VHe(e,t,r){var o,a,n,u,A,p,h,w,I=e.kind,v=e.result,b;if(b=e.input.charCodeAt(e.position),Ia(b)||py(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===45)&&(a=e.input.charCodeAt(e.position+1),Ia(a)||r&&py(a)))return!1;for(e.kind="scalar",e.result="",n=u=e.position,A=!1;b!==0;){if(b===58){if(a=e.input.charCodeAt(e.position+1),Ia(a)||r&&py(a))break}else if(b===35){if(o=e.input.charCodeAt(e.position-1),Ia(o))break}else{if(e.position===e.lineStart&&WD(e)||r&&py(b))break;if(qu(b))if(p=e.line,h=e.lineStart,w=e.lineIndent,Ki(e,!1,-1),e.lineIndent>=t){A=!0,b=e.input.charCodeAt(e.position);continue}else{e.position=u,e.line=p,e.lineStart=h,e.lineIndent=w;break}}A&&(jp(e,n,u,!1),mT(e,e.line-p),n=u=e.position,A=!1),zg(b)||(u=e.position+1),b=e.input.charCodeAt(++e.position)}return jp(e,n,u,!1),e.result?!0:(e.kind=I,e.result=v,!1)}function zHe(e,t){var r,o,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(jp(e,o,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)o=e.position,e.position++,a=e.position;else return!0;else qu(r)?(jp(e,o,a,!0),mT(e,Ki(e,!1,t)),o=a=e.position):e.position===e.lineStart&&WD(e)?Sr(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Sr(e,"unexpected end of the stream within a single quoted scalar")}function XHe(e,t){var r,o,a,n,u,A;if(A=e.input.charCodeAt(e.position),A!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(A=e.input.charCodeAt(e.position))!==0;){if(A===34)return jp(e,r,e.position,!0),e.position++,!0;if(A===92){if(jp(e,r,e.position,!0),A=e.input.charCodeAt(++e.position),qu(A))Ki(e,!1,t);else if(A<256&&hK[A])e.result+=gK[A],e.position++;else if((u=YHe(A))>0){for(a=u,n=0;a>0;a--)A=e.input.charCodeAt(++e.position),(u=GHe(A))>=0?n=(n<<4)+u:Sr(e,"expected hexadecimal character");e.result+=KHe(n),e.position++}else Sr(e,"unknown escape sequence");r=o=e.position}else qu(A)?(jp(e,r,o,!0),mT(e,Ki(e,!1,t)),r=o=e.position):e.position===e.lineStart&&WD(e)?Sr(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}Sr(e,"unexpected end of the stream within a double quoted scalar")}function ZHe(e,t){var r=!0,o,a=e.tag,n,u=e.anchor,A,p,h,w,I,v={},b,E,R,N;if(N=e.input.charCodeAt(e.position),N===91)p=93,I=!1,n=[];else if(N===123)p=125,I=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),N=e.input.charCodeAt(++e.position);N!==0;){if(Ki(e,!0,t),N=e.input.charCodeAt(e.position),N===p)return e.position++,e.tag=a,e.anchor=u,e.kind=I?"mapping":"sequence",e.result=n,!0;r||Sr(e,"missed comma between flow collection entries"),E=b=R=null,h=w=!1,N===63&&(A=e.input.charCodeAt(e.position+1),Ia(A)&&(h=w=!0,e.position++,Ki(e,!0,t))),o=e.line,gy(e,t,qD,!1,!0),E=e.tag,b=e.result,Ki(e,!0,t),N=e.input.charCodeAt(e.position),(w||e.line===o)&&N===58&&(h=!0,N=e.input.charCodeAt(++e.position),Ki(e,!0,t),gy(e,t,qD,!1,!0),R=e.result),I?hy(e,n,v,E,b,R):h?n.push(hy(e,null,v,E,b,R)):n.push(b),Ki(e,!0,t),N=e.input.charCodeAt(e.position),N===44?(r=!0,N=e.input.charCodeAt(++e.position)):r=!1}Sr(e,"unexpected end of the stream within a flow collection")}function $He(e,t){var r,o,a=gT,n=!1,u=!1,A=t,p=0,h=!1,w,I;if(I=e.input.charCodeAt(e.position),I===124)o=!1;else if(I===62)o=!0;else return!1;for(e.kind="scalar",e.result="";I!==0;)if(I=e.input.charCodeAt(++e.position),I===43||I===45)gT===a?a=I===43?rK:_He:Sr(e,"repeat of a chomping mode identifier");else if((w=WHe(I))>=0)w===0?Sr(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?Sr(e,"repeat of an indentation width identifier"):(A=t+w-1,u=!0);else break;if(zg(I)){do I=e.input.charCodeAt(++e.position);while(zg(I));if(I===35)do I=e.input.charCodeAt(++e.position);while(!qu(I)&&I!==0)}for(;I!==0;){for(dT(e),e.lineIndent=0,I=e.input.charCodeAt(e.position);(!u||e.lineIndent<A)&&I===32;)e.lineIndent++,I=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>A&&(A=e.lineIndent),qu(I)){p++;continue}if(e.lineIndent<A){a===rK?e.result+=yf.repeat(`
21`,n?1+p:p):a===gT&&n&&(e.result+=`
22`);break}for(o?zg(I)?(h=!0,e.result+=yf.repeat(`
23`,n?1+p:p)):h?(h=!1,e.result+=yf.repeat(`
24`,p+1)):p===0?n&&(e.result+=" "):e.result+=yf.repeat(`
25`,p):e.result+=yf.repeat(`
26`,n?1+p:p),n=!0,u=!0,p=0,r=e.position;!qu(I)&&I!==0;)I=e.input.charCodeAt(++e.position);jp(e,r,e.position,!1)}return!0}function aK(e,t){var r,o=e.tag,a=e.anchor,n=[],u,A=!1,p;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),p=e.input.charCodeAt(e.position);p!==0&&!(p!==45||(u=e.input.charCodeAt(e.position+1),!Ia(u)));){if(A=!0,e.position++,Ki(e,!0,-1)&&e.lineIndent<=t){n.push(null),p=e.input.charCodeAt(e.position);continue}if(r=e.line,gy(e,t,AK,!1,!0),n.push(e.result),Ki(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&p!==0)Sr(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return A?(e.tag=o,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}function e6e(e,t,r){var o,a,n,u,A=e.tag,p=e.anchor,h={},w={},I=null,v=null,b=null,E=!1,R=!1,N;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),N=e.input.charCodeAt(e.position);N!==0;){if(o=e.input.charCodeAt(e.position+1),n=e.line,u=e.position,(N===63||N===58)&&Ia(o))N===63?(E&&(hy(e,h,w,I,v,null),I=v=b=null),R=!0,E=!0,a=!0):E?(E=!1,a=!0):Sr(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,N=o;else if(gy(e,r,uK,!1,!0))if(e.line===n){for(N=e.input.charCodeAt(e.position);zg(N);)N=e.input.charCodeAt(++e.position);if(N===58)N=e.input.charCodeAt(++e.position),Ia(N)||Sr(e,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(hy(e,h,w,I,v,null),I=v=b=null),R=!0,E=!1,a=!1,I=e.tag,v=e.result;else if(R)Sr(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=A,e.anchor=p,!0}else if(R)Sr(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=A,e.anchor=p,!0;else break;if((e.line===n||e.lineIndent>t)&&(gy(e,t,GD,!0,a)&&(E?v=e.result:b=e.result),E||(hy(e,h,w,I,v,b,n,u),I=v=b=null),Ki(e,!0,-1),N=e.input.charCodeAt(e.position)),e.lineIndent>t&&N!==0)Sr(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return E&&hy(e,h,w,I,v,null),R&&(e.tag=A,e.anchor=p,e.kind="mapping",e.result=h),R}function t6e(e){var t,r=!1,o=!1,a,n,u;if(u=e.input.charCodeAt(e.position),u!==33)return!1;if(e.tag!==null&&Sr(e,"duplication of a tag property"),u=e.input.charCodeAt(++e.position),u===60?(r=!0,u=e.input.charCodeAt(++e.position)):u===33?(o=!0,a="!!",u=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do u=e.input.charCodeAt(++e.position);while(u!==0&&u!==62);e.position<e.length?(n=e.input.slice(t,e.position),u=e.input.charCodeAt(++e.position)):Sr(e,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Ia(u);)u===33&&(o?Sr(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),fK.test(a)||Sr(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),u=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),qHe.test(n)&&Sr(e,"tag suffix cannot contain flow indicator characters")}return n&&!pK.test(n)&&Sr(e,"tag name cannot contain such characters: "+n),r?e.tag=n:qp.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:Sr(e,'undeclared tag handle "'+a+'"'),!0}function r6e(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Sr(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ia(r)&&!py(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Sr(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function n6e(e){var t,r,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!Ia(o)&&!py(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&Sr(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),qp.call(e.anchorMap,r)||Sr(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ki(e,!0,-1),!0}function gy(e,t,r,o,a){var n,u,A,p=1,h=!1,w=!1,I,v,b,E,R;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=u=A=GD===r||AK===r,o&&Ki(e,!0,-1)&&(h=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;t6e(e)||r6e(e);)Ki(e,!0,-1)?(h=!0,A=n,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):A=!1;if(A&&(A=h||a),(p===1||GD===r)&&(qD===r||uK===r?E=t:E=t+1,R=e.position-e.lineStart,p===1?A&&(aK(e,R)||e6e(e,R,E))||ZHe(e,E)?w=!0:(u&&$He(e,E)||zHe(e,E)||XHe(e,E)?w=!0:n6e(e)?(w=!0,(e.tag!==null||e.anchor!==null)&&Sr(e,"alias node should not have any properties")):VHe(e,E,qD===r)&&(w=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(w=A&&aK(e,R))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Sr(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),I=0,v=e.implicitTypes.length;I<v;I+=1)if(b=e.implicitTypes[I],b.resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else qp.call(e.typeMap[e.kind||"fallback"],e.tag)?(b=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&b.kind!==e.kind&&Sr(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result)?(e.result=b.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Sr(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):Sr(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||w}function i6e(e){var t=e.position,r,o,a,n=!1,u;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(u=e.input.charCodeAt(e.position))!==0&&(Ki(e,!0,-1),u=e.input.charCodeAt(e.position),!(e.lineIndent>0||u!==37));){for(n=!0,u=e.input.charCodeAt(++e.position),r=e.position;u!==0&&!Ia(u);)u=e.input.charCodeAt(++e.position);for(o=e.input.slice(r,e.position),a=[],o.length<1&&Sr(e,"directive name must not be less than one character in length");u!==0;){for(;zg(u);)u=e.input.charCodeAt(++e.position);if(u===35){do u=e.input.charCodeAt(++e.position);while(u!==0&&!qu(u));break}if(qu(u))break;for(r=e.position;u!==0&&!Ia(u);)u=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}u!==0&&dT(e),qp.call(sK,o)?sK[o](e,o,a):YD(e,'unknown document directive "'+o+'"')}if(Ki(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ki(e,!0,-1)):n&&Sr(e,"directives end mark is expected"),gy(e,e.lineIndent-1,GD,!1,!0),Ki(e,!0,-1),e.checkLineBreaks&&jHe.test(e.input.slice(t,e.position))&&YD(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&WD(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ki(e,!0,-1));return}if(e.position<e.length-1)Sr(e,"end of the stream or a document separator is expected");else return}function mK(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
27`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new JHe(e,t),o=e.indexOf("\0");for(o!==-1&&(r.position=o,Sr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)i6e(r);return r.documents}function yK(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var o=mK(e,r);if(typeof t!="function")return o;for(var a=0,n=o.length;a<n;a+=1)t(o[a])}function EK(e,t){var r=mK(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new lK("expected a single document in the stream, but found more")}}function s6e(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),yK(e,t,yf.extend({schema:cK},r))}function o6e(e,t){return EK(e,yf.extend({schema:cK},t))}zC.exports.loadAll=yK;zC.exports.load=EK;zC.exports.safeLoadAll=s6e;zC.exports.safeLoad=o6e});var qK=_((qxt,CT)=>{"use strict";var ZC=Wg(),$C=uy(),a6e=VC(),l6e=fy(),xK=Object.prototype.toString,bK=Object.prototype.hasOwnProperty,c6e=9,XC=10,u6e=13,A6e=32,f6e=33,p6e=34,QK=35,h6e=37,g6e=38,d6e=39,m6e=42,kK=44,y6e=45,FK=58,E6e=61,w6e=62,C6e=63,I6e=64,RK=91,TK=93,B6e=96,NK=123,v6e=124,LK=125,vo={};vo[0]="\\0";vo[7]="\\a";vo[8]="\\b";vo[9]="\\t";vo[10]="\\n";vo[11]="\\v";vo[12]="\\f";vo[13]="\\r";vo[27]="\\e";vo[34]='\\"';vo[92]="\\\\";vo[133]="\\N";vo[160]="\\_";vo[8232]="\\L";vo[8233]="\\P";var D6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function S6e(e,t){var r,o,a,n,u,A,p;if(t===null)return{};for(r={},o=Object.keys(t),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(t[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=e.compiledTypeMap.fallback[u],p&&bK.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function CK(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else if(e<=4294967295)r="U",o=8;else throw new $C("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+ZC.repeat("0",o-t.length)+t}function P6e(e){this.schema=e.schema||a6e,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ZC.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=S6e(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function IK(e,t){for(var r=ZC.repeat(" ",t),o=0,a=-1,n="",u,A=e.length;o<A;)a=e.indexOf(`
28`,o),a===-1?(u=e.slice(o),o=A):(u=e.slice(o,a+1),o=a+1),u.length&&u!==`
29`&&(n+=r),n+=u;return n}function yT(e,t){return`
30`+ZC.repeat(" ",e.indent*t)}function x6e(e,t){var r,o,a;for(r=0,o=e.implicitTypes.length;r<o;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}function wT(e){return e===A6e||e===c6e}function dy(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function b6e(e){return dy(e)&&!wT(e)&&e!==65279&&e!==u6e&&e!==XC}function BK(e,t){return dy(e)&&e!==65279&&e!==kK&&e!==RK&&e!==TK&&e!==NK&&e!==LK&&e!==FK&&(e!==QK||t&&b6e(t))}function Q6e(e){return dy(e)&&e!==65279&&!wT(e)&&e!==y6e&&e!==C6e&&e!==FK&&e!==kK&&e!==RK&&e!==TK&&e!==NK&&e!==LK&&e!==QK&&e!==g6e&&e!==m6e&&e!==f6e&&e!==v6e&&e!==E6e&&e!==w6e&&e!==d6e&&e!==p6e&&e!==h6e&&e!==I6e&&e!==B6e}function OK(e){var t=/^\n* /;return t.test(e)}var MK=1,UK=2,_K=3,HK=4,KD=5;function k6e(e,t,r,o,a){var n,u,A,p=!1,h=!1,w=o!==-1,I=-1,v=Q6e(e.charCodeAt(0))&&!wT(e.charCodeAt(e.length-1));if(t)for(n=0;n<e.length;n++){if(u=e.charCodeAt(n),!dy(u))return KD;A=n>0?e.charCodeAt(n-1):null,v=v&&BK(u,A)}else{for(n=0;n<e.length;n++){if(u=e.charCodeAt(n),u===XC)p=!0,w&&(h=h||n-I-1>o&&e[I+1]!==" ",I=n);else if(!dy(u))return KD;A=n>0?e.charCodeAt(n-1):null,v=v&&BK(u,A)}h=h||w&&n-I-1>o&&e[I+1]!==" "}return!p&&!h?v&&!a(e)?MK:UK:r>9&&OK(e)?KD:h?HK:_K}function F6e(e,t,r,o){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&D6e.indexOf(t)!==-1)return"'"+t+"'";var a=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),u=o||e.flowLevel>-1&&r>=e.flowLevel;function A(p){return x6e(e,p)}switch(k6e(t,u,e.indent,n,A)){case MK:return t;case UK:return"'"+t.replace(/'/g,"''")+"'";case _K:return"|"+vK(t,e.indent)+DK(IK(t,a));case HK:return">"+vK(t,e.indent)+DK(IK(R6e(t,n),a));case KD:return'"'+T6e(t,n)+'"';default:throw new $C("impossible error: invalid scalar style")}}()}function vK(e,t){var r=OK(e)?String(t):"",o=e[e.length-1]===`
31`,a=o&&(e[e.length-2]===`
32`||e===`
33`),n=a?"+":o?"":"-";return r+n+`
34`}function DK(e){return e[e.length-1]===`
35`?e.slice(0,-1):e}function R6e(e,t){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=e.indexOf(`
36`);return h=h!==-1?h:e.length,r.lastIndex=h,SK(e.slice(0,h),t)}(),a=e[0]===`
37`||e[0]===" ",n,u;u=r.exec(e);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
38`:"")+SK(p,t),a=n}return o}function SK(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(e);)A=o.index,A-a>t&&(n=u>a?u:A,p+=`
39`+e.slice(a,n),a=n+1),u=A;return p+=`
40`,e.length-a>t&&u>a?p+=e.slice(a,u)+`
41`+e.slice(u+1):p+=e.slice(a),p.slice(1)}function T6e(e){for(var t="",r,o,a,n=0;n<e.length;n++){if(r=e.charCodeAt(n),r>=55296&&r<=56319&&(o=e.charCodeAt(n+1),o>=56320&&o<=57343)){t+=CK((r-55296)*1024+o-56320+65536),n++;continue}a=vo[r],t+=!a&&dy(r)?e[n]:a||CK(r)}return t}function N6e(e,t,r){var o="",a=e.tag,n,u;for(n=0,u=r.length;n<u;n+=1)Xg(e,t,r[n],!1,!1)&&(n!==0&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function L6e(e,t,r,o){var a="",n=e.tag,u,A;for(u=0,A=r.length;u<A;u+=1)Xg(e,t+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=yT(e,t)),e.dump&&XC===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}function O6e(e,t,r){var o="",a=e.tag,n=Object.keys(r),u,A,p,h,w;for(u=0,A=n.length;u<A;u+=1)w="",u!==0&&(w+=", "),e.condenseFlow&&(w+='"'),p=n[u],h=r[p],Xg(e,t,p,!1,!1)&&(e.dump.length>1024&&(w+="? "),w+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xg(e,t,h,!1,!1)&&(w+=e.dump,o+=w));e.tag=a,e.dump="{"+o+"}"}function M6e(e,t,r,o){var a="",n=e.tag,u=Object.keys(r),A,p,h,w,I,v;if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new $C("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)v="",(!o||A!==0)&&(v+=yT(e,t)),h=u[A],w=r[h],Xg(e,t+1,h,!0,!0,!0)&&(I=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,I&&(e.dump&&XC===e.dump.charCodeAt(0)?v+="?":v+="? "),v+=e.dump,I&&(v+=yT(e,t)),Xg(e,t+1,w,!0,I)&&(e.dump&&XC===e.dump.charCodeAt(0)?v+=":":v+=": ",v+=e.dump,a+=v));e.tag=n,e.dump=a||"{}"}function PK(e,t,r){var o,a,n,u,A,p;for(a=r?e.explicitTypes:e.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof t=="object"&&t instanceof A.instanceOf)&&(!A.predicate||A.predicate(t))){if(e.tag=r?A.tag:"?",A.represent){if(p=e.styleMap[A.tag]||A.defaultStyle,xK.call(A.represent)==="[object Function]")o=A.represent(t,p);else if(bK.call(A.represent,p))o=A.represent[p](t,p);else throw new $C("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');e.dump=o}return!0}return!1}function Xg(e,t,r,o,a,n){e.tag=null,e.dump=r,PK(e,r,!1)||PK(e,r,!0);var u=xK.call(e.dump);o&&(o=e.flowLevel<0||e.flowLevel>t);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=e.duplicates.indexOf(r),h=p!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(a=!1),h&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(A&&h&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(e.dump).length!==0?(M6e(e,t,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(O6e(e,t,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump));else if(u==="[object Array]"){var w=e.noArrayIndent&&t>0?t-1:t;o&&e.dump.length!==0?(L6e(e,w,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(N6e(e,w,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump))}else if(u==="[object String]")e.tag!=="?"&&F6e(e,e.dump,t,n);else{if(e.skipInvalid)return!1;throw new $C("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function U6e(e,t){var r=[],o=[],a,n;for(ET(e,r,o),a=0,n=o.length;a<n;a+=1)t.duplicates.push(r[o[a]]);t.usedDuplicates=new Array(n)}function ET(e,t,r){var o,a,n;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)ET(e[a],t,r);else for(o=Object.keys(e),a=0,n=o.length;a<n;a+=1)ET(e[o[a]],t,r)}function jK(e,t){t=t||{};var r=new P6e(t);return r.noRefs||U6e(e,r),Xg(r,0,e,!0,!0)?r.dump+`
42`:""}function _6e(e,t){return jK(e,ZC.extend({schema:l6e},t))}CT.exports.dump=jK;CT.exports.safeDump=_6e});var YK=_((Gxt,Qi)=>{"use strict";var JD=wK(),GK=qK();function VD(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Qi.exports.Type=ss();Qi.exports.Schema=Kg();Qi.exports.FAILSAFE_SCHEMA=HD();Qi.exports.JSON_SCHEMA=fT();Qi.exports.CORE_SCHEMA=pT();Qi.exports.DEFAULT_SAFE_SCHEMA=fy();Qi.exports.DEFAULT_FULL_SCHEMA=VC();Qi.exports.load=JD.load;Qi.exports.loadAll=JD.loadAll;Qi.exports.safeLoad=JD.safeLoad;Qi.exports.safeLoadAll=JD.safeLoadAll;Qi.exports.dump=GK.dump;Qi.exports.safeDump=GK.safeDump;Qi.exports.YAMLException=uy();Qi.exports.MINIMAL_SCHEMA=HD();Qi.exports.SAFE_SCHEMA=fy();Qi.exports.DEFAULT_SCHEMA=VC();Qi.exports.scan=VD("scan");Qi.exports.parse=VD("parse");Qi.exports.compose=VD("compose");Qi.exports.addConstructor=VD("addConstructor")});var KK=_((Yxt,WK)=>{"use strict";var H6e=YK();WK.exports=H6e});var VK=_((Wxt,JK)=>{"use strict";function j6e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function Zg(e,t,r,o){this.message=e,this.expected=t,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zg)}j6e(Zg,Error);Zg.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var w="",I;for(I=0;I<h.parts.length;I++)w+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+w+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function u(h){return r[h.type](h)}function A(h){var w=new Array(h.length),I,v;for(I=0;I<h.length;I++)w[I]=u(h[I]);if(w.sort(),w.length>0){for(I=1,v=1;I<w.length;I++)w[I-1]!==w[I]&&(w[v]=w[I],v++);w.length=v}switch(w.length){case 1:return w[0];case 2:return w[0]+" or "+w[1];default:return w.slice(0,-1).join(", ")+", or "+w[w.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(e)+" but "+p(t)+" found."};function q6e(e,t){t=t!==void 0?t:{};var r={},o={Start:gu},a=gu,n=function($){return[].concat(...$)},u="-",A=Qn("-",!1),p=function($){return $},h=function($){return Object.assign({},...$)},w="#",I=Qn("#",!1),v=hc(),b=function(){return{}},E=":",R=Qn(":",!1),N=function($,me){return{[$]:me}},U=",",V=Qn(",",!1),ee=function($,me){return me},le=function($,me,Oe){return Object.assign({},...[$].concat(me).map(ft=>({[ft]:Oe})))},fe=function($){return $},de=function($){return $},ge=oa("correct indentation"),oe=" ",Be=Qn(" ",!1),be=function($){return $.length===rr*It},g=function($){return $.length===(rr+1)*It},we=function(){return rr++,!0},Se=function(){return rr--,!0},ce=function(){return SA()},ne=oa("pseudostring"),te=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Ee=pi(["\r",`
43`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Re=/^[^\r\n\t ,\][{}:#"']/,dt=pi(["\r",`
44`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),H=function(){return SA().replace(/^ *| *$/g,"")},at="--",Te=Qn("--",!1),Qe=/^[a-zA-Z\/0-9]/,ke=pi([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),He=/^[^\r\n\t :,]/,Ne=pi(["\r",`
45`," "," ",":",","],!0,!1),Ve="null",je=Qn("null",!1),x=function(){return null},C="true",P=Qn("true",!1),y=function(){return!0},F="false",z=Qn("false",!1),X=function(){return!1},Z=oa("string"),ie='"',Pe=Qn('"',!1),Le=function(){return""},ot=function($){return $},gt=function($){return $.join("")},jt=/^[^"\\\0-\x1F\x7F]/,$t=pi(['"',"\\",["\0",""],"\x7F"],!0,!1),xt='\\"',on=Qn('\\"',!1),br=function(){return'"'},dr="\\\\",Pr=Qn("\\\\",!1),Yr=function(){return"\\"},Wn="\\/",Os=Qn("\\/",!1),Ti=function(){return"/"},hs="\\b",io=Qn("\\b",!1),Si=function(){return"\b"},Ms="\\f",so=Qn("\\f",!1),cc=function(){return"\f"},Au="\\n",op=Qn("\\n",!1),ap=function(){return`
46`},Us="\\r",vn=Qn("\\r",!1),oo=function(){return"\r"},_s="\\t",dl=Qn("\\t",!1),ml=function(){return" "},ao="\\u",Kn=Qn("\\u",!1),Ln=function($,me,Oe,ft){return String.fromCharCode(parseInt(`0x${$}${me}${Oe}${ft}`))},Ni=/^[0-9a-fA-F]/,On=pi([["0","9"],["a","f"],["A","F"]],!1,!1),Hi=oa("blank space"),ve=/^[ \t]/,Li=pi([" "," "],!1,!1),ni=oa("white space"),Ma=/^[ \t\n\r]/,pr=pi([" "," ",`
47`,"\r"],!1,!1),uc=`\r
48`,fu=Qn(`\r
49`,!1),Ac=`
50`,yl=Qn(`
51`,!1),DA="\r",pu=Qn("\r",!1),Ce=0,Rt=0,fc=[{line:1,column:1}],ji=0,hu=[],Yt=0,El;if("startRule"in t){if(!(t.startRule in o))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=o[t.startRule]}function SA(){return e.substring(Rt,Ce)}function lp(){return _o(Rt,Ce)}function pc($,me){throw me=me!==void 0?me:_o(Rt,Ce),gc([oa($)],e.substring(Rt,Ce),me)}function PA($,me){throw me=me!==void 0?me:_o(Rt,Ce),lo($,me)}function Qn($,me){return{type:"literal",text:$,ignoreCase:me}}function pi($,me,Oe){return{type:"class",parts:$,inverted:me,ignoreCase:Oe}}function hc(){return{type:"any"}}function xA(){return{type:"end"}}function oa($){return{type:"other",description:$}}function Oi($){var me=fc[$],Oe;if(me)return me;for(Oe=$-1;!fc[Oe];)Oe--;for(me=fc[Oe],me={line:me.line,column:me.column};Oe<$;)e.charCodeAt(Oe)===10?(me.line++,me.column=1):me.column++,Oe++;return fc[$]=me,me}function _o($,me){var Oe=Oi($),ft=Oi(me);return{start:{offset:$,line:Oe.line,column:Oe.column},end:{offset:me,line:ft.line,column:ft.column}}}function Ze($){Ce<ji||(Ce>ji&&(ji=Ce,hu=[]),hu.push($))}function lo($,me){return new Zg($,null,null,me)}function gc($,me,Oe){return new Zg(Zg.buildMessage($,me),$,me,Oe)}function gu(){var $;return $=bA(),$}function qi(){var $,me,Oe;for($=Ce,me=[],Oe=du();Oe!==r;)me.push(Oe),Oe=du();return me!==r&&(Rt=$,me=n(me)),$=me,$}function du(){var $,me,Oe,ft,pt;return $=Ce,me=gs(),me!==r?(e.charCodeAt(Ce)===45?(Oe=u,Ce++):(Oe=r,Yt===0&&Ze(A)),Oe!==r?(ft=Dn(),ft!==r?(pt=dc(),pt!==r?(Rt=$,me=p(pt),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$}function bA(){var $,me,Oe;for($=Ce,me=[],Oe=Ua();Oe!==r;)me.push(Oe),Oe=Ua();return me!==r&&(Rt=$,me=h(me)),$=me,$}function Ua(){var $,me,Oe,ft,pt,Tt,er,Xr,Gi;if($=Ce,me=Dn(),me===r&&(me=null),me!==r){if(Oe=Ce,e.charCodeAt(Ce)===35?(ft=w,Ce++):(ft=r,Yt===0&&Ze(I)),ft!==r){if(pt=[],Tt=Ce,er=Ce,Yt++,Xr=tt(),Yt--,Xr===r?er=void 0:(Ce=er,er=r),er!==r?(e.length>Ce?(Xr=e.charAt(Ce),Ce++):(Xr=r,Yt===0&&Ze(v)),Xr!==r?(er=[er,Xr],Tt=er):(Ce=Tt,Tt=r)):(Ce=Tt,Tt=r),Tt!==r)for(;Tt!==r;)pt.push(Tt),Tt=Ce,er=Ce,Yt++,Xr=tt(),Yt--,Xr===r?er=void 0:(Ce=er,er=r),er!==r?(e.length>Ce?(Xr=e.charAt(Ce),Ce++):(Xr=r,Yt===0&&Ze(v)),Xr!==r?(er=[er,Xr],Tt=er):(Ce=Tt,Tt=r)):(Ce=Tt,Tt=r);else pt=r;pt!==r?(ft=[ft,pt],Oe=ft):(Ce=Oe,Oe=r)}else Ce=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(ft=[],pt=We(),pt!==r)for(;pt!==r;)ft.push(pt),pt=We();else ft=r;ft!==r?(Rt=$,me=b(),$=me):(Ce=$,$=r)}else Ce=$,$=r}else Ce=$,$=r;if($===r&&($=Ce,me=gs(),me!==r?(Oe=aa(),Oe!==r?(ft=Dn(),ft===r&&(ft=null),ft!==r?(e.charCodeAt(Ce)===58?(pt=E,Ce++):(pt=r,Yt===0&&Ze(R)),pt!==r?(Tt=Dn(),Tt===r&&(Tt=null),Tt!==r?(er=dc(),er!==r?(Rt=$,me=N(Oe,er),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r&&($=Ce,me=gs(),me!==r?(Oe=co(),Oe!==r?(ft=Dn(),ft===r&&(ft=null),ft!==r?(e.charCodeAt(Ce)===58?(pt=E,Ce++):(pt=r,Yt===0&&Ze(R)),pt!==r?(Tt=Dn(),Tt===r&&(Tt=null),Tt!==r?(er=dc(),er!==r?(Rt=$,me=N(Oe,er),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r))){if($=Ce,me=gs(),me!==r)if(Oe=co(),Oe!==r)if(ft=Dn(),ft!==r)if(pt=la(),pt!==r){if(Tt=[],er=We(),er!==r)for(;er!==r;)Tt.push(er),er=We();else Tt=r;Tt!==r?(Rt=$,me=N(Oe,pt),$=me):(Ce=$,$=r)}else Ce=$,$=r;else Ce=$,$=r;else Ce=$,$=r;else Ce=$,$=r;if($===r)if($=Ce,me=gs(),me!==r)if(Oe=co(),Oe!==r){if(ft=[],pt=Ce,Tt=Dn(),Tt===r&&(Tt=null),Tt!==r?(e.charCodeAt(Ce)===44?(er=U,Ce++):(er=r,Yt===0&&Ze(V)),er!==r?(Xr=Dn(),Xr===r&&(Xr=null),Xr!==r?(Gi=co(),Gi!==r?(Rt=pt,Tt=ee(Oe,Gi),pt=Tt):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r),pt!==r)for(;pt!==r;)ft.push(pt),pt=Ce,Tt=Dn(),Tt===r&&(Tt=null),Tt!==r?(e.charCodeAt(Ce)===44?(er=U,Ce++):(er=r,Yt===0&&Ze(V)),er!==r?(Xr=Dn(),Xr===r&&(Xr=null),Xr!==r?(Gi=co(),Gi!==r?(Rt=pt,Tt=ee(Oe,Gi),pt=Tt):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r);else ft=r;ft!==r?(pt=Dn(),pt===r&&(pt=null),pt!==r?(e.charCodeAt(Ce)===58?(Tt=E,Ce++):(Tt=r,Yt===0&&Ze(R)),Tt!==r?(er=Dn(),er===r&&(er=null),er!==r?(Xr=dc(),Xr!==r?(Rt=$,me=le(Oe,ft,Xr),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)}else Ce=$,$=r;else Ce=$,$=r}return $}function dc(){var $,me,Oe,ft,pt,Tt,er;if($=Ce,me=Ce,Yt++,Oe=Ce,ft=tt(),ft!==r?(pt=Ut(),pt!==r?(e.charCodeAt(Ce)===45?(Tt=u,Ce++):(Tt=r,Yt===0&&Ze(A)),Tt!==r?(er=Dn(),er!==r?(ft=[ft,pt,Tt,er],Oe=ft):(Ce=Oe,Oe=r)):(Ce=Oe,Oe=r)):(Ce=Oe,Oe=r)):(Ce=Oe,Oe=r),Yt--,Oe!==r?(Ce=me,me=void 0):me=r,me!==r?(Oe=We(),Oe!==r?(ft=kn(),ft!==r?(pt=qi(),pt!==r?(Tt=Ei(),Tt!==r?(Rt=$,me=fe(pt),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r&&($=Ce,me=tt(),me!==r?(Oe=kn(),Oe!==r?(ft=bA(),ft!==r?(pt=Ei(),pt!==r?(Rt=$,me=fe(ft),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r))if($=Ce,me=Hs(),me!==r){if(Oe=[],ft=We(),ft!==r)for(;ft!==r;)Oe.push(ft),ft=We();else Oe=r;Oe!==r?(Rt=$,me=de(me),$=me):(Ce=$,$=r)}else Ce=$,$=r;return $}function gs(){var $,me,Oe;for(Yt++,$=Ce,me=[],e.charCodeAt(Ce)===32?(Oe=oe,Ce++):(Oe=r,Yt===0&&Ze(Be));Oe!==r;)me.push(Oe),e.charCodeAt(Ce)===32?(Oe=oe,Ce++):(Oe=r,Yt===0&&Ze(Be));return me!==r?(Rt=Ce,Oe=be(me),Oe?Oe=void 0:Oe=r,Oe!==r?(me=[me,Oe],$=me):(Ce=$,$=r)):(Ce=$,$=r),Yt--,$===r&&(me=r,Yt===0&&Ze(ge)),$}function Ut(){var $,me,Oe;for($=Ce,me=[],e.charCodeAt(Ce)===32?(Oe=oe,Ce++):(Oe=r,Yt===0&&Ze(Be));Oe!==r;)me.push(Oe),e.charCodeAt(Ce)===32?(Oe=oe,Ce++):(Oe=r,Yt===0&&Ze(Be));return me!==r?(Rt=Ce,Oe=g(me),Oe?Oe=void 0:Oe=r,Oe!==r?(me=[me,Oe],$=me):(Ce=$,$=r)):(Ce=$,$=r),$}function kn(){var $;return Rt=Ce,$=we(),$?$=void 0:$=r,$}function Ei(){var $;return Rt=Ce,$=Se(),$?$=void 0:$=r,$}function aa(){var $;return $=ms(),$===r&&($=ca()),$}function co(){var $,me,Oe;if($=ms(),$===r){if($=Ce,me=[],Oe=Ho(),Oe!==r)for(;Oe!==r;)me.push(Oe),Oe=Ho();else me=r;me!==r&&(Rt=$,me=ce()),$=me}return $}function Hs(){var $;return $=wi(),$===r&&($=ds(),$===r&&($=ms(),$===r&&($=ca()))),$}function la(){var $;return $=wi(),$===r&&($=ms(),$===r&&($=Ho())),$}function ca(){var $,me,Oe,ft,pt,Tt;if(Yt++,$=Ce,te.test(e.charAt(Ce))?(me=e.charAt(Ce),Ce++):(me=r,Yt===0&&Ze(Ee)),me!==r){for(Oe=[],ft=Ce,pt=Dn(),pt===r&&(pt=null),pt!==r?(Re.test(e.charAt(Ce))?(Tt=e.charAt(Ce),Ce++):(Tt=r,Yt===0&&Ze(dt)),Tt!==r?(pt=[pt,Tt],ft=pt):(Ce=ft,ft=r)):(Ce=ft,ft=r);ft!==r;)Oe.push(ft),ft=Ce,pt=Dn(),pt===r&&(pt=null),pt!==r?(Re.test(e.charAt(Ce))?(Tt=e.charAt(Ce),Ce++):(Tt=r,Yt===0&&Ze(dt)),Tt!==r?(pt=[pt,Tt],ft=pt):(Ce=ft,ft=r)):(Ce=ft,ft=r);Oe!==r?(Rt=$,me=H(),$=me):(Ce=$,$=r)}else Ce=$,$=r;return Yt--,$===r&&(me=r,Yt===0&&Ze(ne)),$}function Ho(){var $,me,Oe,ft,pt;if($=Ce,e.substr(Ce,2)===at?(me=at,Ce+=2):(me=r,Yt===0&&Ze(Te)),me===r&&(me=null),me!==r)if(Qe.test(e.charAt(Ce))?(Oe=e.charAt(Ce),Ce++):(Oe=r,Yt===0&&Ze(ke)),Oe!==r){for(ft=[],He.test(e.charAt(Ce))?(pt=e.charAt(Ce),Ce++):(pt=r,Yt===0&&Ze(Ne));pt!==r;)ft.push(pt),He.test(e.charAt(Ce))?(pt=e.charAt(Ce),Ce++):(pt=r,Yt===0&&Ze(Ne));ft!==r?(Rt=$,me=H(),$=me):(Ce=$,$=r)}else Ce=$,$=r;else Ce=$,$=r;return $}function wi(){var $,me;return $=Ce,e.substr(Ce,4)===Ve?(me=Ve,Ce+=4):(me=r,Yt===0&&Ze(je)),me!==r&&(Rt=$,me=x()),$=me,$}function ds(){var $,me;return $=Ce,e.substr(Ce,4)===C?(me=C,Ce+=4):(me=r,Yt===0&&Ze(P)),me!==r&&(Rt=$,me=y()),$=me,$===r&&($=Ce,e.substr(Ce,5)===F?(me=F,Ce+=5):(me=r,Yt===0&&Ze(z)),me!==r&&(Rt=$,me=X()),$=me),$}function ms(){var $,me,Oe,ft;return Yt++,$=Ce,e.charCodeAt(Ce)===34?(me=ie,Ce++):(me=r,Yt===0&&Ze(Pe)),me!==r?(e.charCodeAt(Ce)===34?(Oe=ie,Ce++):(Oe=r,Yt===0&&Ze(Pe)),Oe!==r?(Rt=$,me=Le(),$=me):(Ce=$,$=r)):(Ce=$,$=r),$===r&&($=Ce,e.charCodeAt(Ce)===34?(me=ie,Ce++):(me=r,Yt===0&&Ze(Pe)),me!==r?(Oe=ys(),Oe!==r?(e.charCodeAt(Ce)===34?(ft=ie,Ce++):(ft=r,Yt===0&&Ze(Pe)),ft!==r?(Rt=$,me=ot(Oe),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)),Yt--,$===r&&(me=r,Yt===0&&Ze(Z)),$}function ys(){var $,me,Oe;if($=Ce,me=[],Oe=js(),Oe!==r)for(;Oe!==r;)me.push(Oe),Oe=js();else me=r;return me!==r&&(Rt=$,me=gt(me)),$=me,$}function js(){var $,me,Oe,ft,pt,Tt;return jt.test(e.charAt(Ce))?($=e.charAt(Ce),Ce++):($=r,Yt===0&&Ze($t)),$===r&&($=Ce,e.substr(Ce,2)===xt?(me=xt,Ce+=2):(me=r,Yt===0&&Ze(on)),me!==r&&(Rt=$,me=br()),$=me,$===r&&($=Ce,e.substr(Ce,2)===dr?(me=dr,Ce+=2):(me=r,Yt===0&&Ze(Pr)),me!==r&&(Rt=$,me=Yr()),$=me,$===r&&($=Ce,e.substr(Ce,2)===Wn?(me=Wn,Ce+=2):(me=r,Yt===0&&Ze(Os)),me!==r&&(Rt=$,me=Ti()),$=me,$===r&&($=Ce,e.substr(Ce,2)===hs?(me=hs,Ce+=2):(me=r,Yt===0&&Ze(io)),me!==r&&(Rt=$,me=Si()),$=me,$===r&&($=Ce,e.substr(Ce,2)===Ms?(me=Ms,Ce+=2):(me=r,Yt===0&&Ze(so)),me!==r&&(Rt=$,me=cc()),$=me,$===r&&($=Ce,e.substr(Ce,2)===Au?(me=Au,Ce+=2):(me=r,Yt===0&&Ze(op)),me!==r&&(Rt=$,me=ap()),$=me,$===r&&($=Ce,e.substr(Ce,2)===Us?(me=Us,Ce+=2):(me=r,Yt===0&&Ze(vn)),me!==r&&(Rt=$,me=oo()),$=me,$===r&&($=Ce,e.substr(Ce,2)===_s?(me=_s,Ce+=2):(me=r,Yt===0&&Ze(dl)),me!==r&&(Rt=$,me=ml()),$=me,$===r&&($=Ce,e.substr(Ce,2)===ao?(me=ao,Ce+=2):(me=r,Yt===0&&Ze(Kn)),me!==r?(Oe=Mn(),Oe!==r?(ft=Mn(),ft!==r?(pt=Mn(),pt!==r?(Tt=Mn(),Tt!==r?(Rt=$,me=Ln(Oe,ft,pt,Tt),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)))))))))),$}function Mn(){var $;return Ni.test(e.charAt(Ce))?($=e.charAt(Ce),Ce++):($=r,Yt===0&&Ze(On)),$}function Dn(){var $,me;if(Yt++,$=[],ve.test(e.charAt(Ce))?(me=e.charAt(Ce),Ce++):(me=r,Yt===0&&Ze(Li)),me!==r)for(;me!==r;)$.push(me),ve.test(e.charAt(Ce))?(me=e.charAt(Ce),Ce++):(me=r,Yt===0&&Ze(Li));else $=r;return Yt--,$===r&&(me=r,Yt===0&&Ze(Hi)),$}function Es(){var $,me;if(Yt++,$=[],Ma.test(e.charAt(Ce))?(me=e.charAt(Ce),Ce++):(me=r,Yt===0&&Ze(pr)),me!==r)for(;me!==r;)$.push(me),Ma.test(e.charAt(Ce))?(me=e.charAt(Ce),Ce++):(me=r,Yt===0&&Ze(pr));else $=r;return Yt--,$===r&&(me=r,Yt===0&&Ze(ni)),$}function We(){var $,me,Oe,ft,pt,Tt;if($=Ce,me=tt(),me!==r){for(Oe=[],ft=Ce,pt=Dn(),pt===r&&(pt=null),pt!==r?(Tt=tt(),Tt!==r?(pt=[pt,Tt],ft=pt):(Ce=ft,ft=r)):(Ce=ft,ft=r);ft!==r;)Oe.push(ft),ft=Ce,pt=Dn(),pt===r&&(pt=null),pt!==r?(Tt=tt(),Tt!==r?(pt=[pt,Tt],ft=pt):(Ce=ft,ft=r)):(Ce=ft,ft=r);Oe!==r?(me=[me,Oe],$=me):(Ce=$,$=r)}else Ce=$,$=r;return $}function tt(){var $;return e.substr(Ce,2)===uc?($=uc,Ce+=2):($=r,Yt===0&&Ze(fu)),$===r&&(e.charCodeAt(Ce)===10?($=Ac,Ce++):($=r,Yt===0&&Ze(yl)),$===r&&(e.charCodeAt(Ce)===13?($=DA,Ce++):($=r,Yt===0&&Ze(pu)))),$}let It=2,rr=0;if(El=a(),El!==r&&Ce===e.length)return El;throw El!==r&&Ce<e.length&&Ze(xA()),gc(hu,ji<e.length?e.charAt(ji):null,ji<e.length?_o(ji,ji+1):_o(ji,ji))}JK.exports={SyntaxError:Zg,parse:q6e}});function XK(e){return e.match(G6e)?e:JSON.stringify(e)}function $K(e){return typeof e>"u"?!0:typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.keys(e).every(t=>$K(e[t])):!1}function IT(e,t,r){if(e===null)return`null
52`;if(typeof e=="number"||typeof e=="boolean")return`${e.toString()}
53`;if(typeof e=="string")return`${XK(e)}
54`;if(Array.isArray(e)){if(e.length===0)return`[]
55`;let o=" ".repeat(t);return`
56${e.map(n=>`${o}- ${IT(n,t+1,!1)}`).join("")}`}if(typeof e=="object"&&e){let[o,a]=e instanceof zD?[e.data,!1]:[e,!0],n=" ".repeat(t),u=Object.keys(o);a&&u.sort((p,h)=>{let w=zK.indexOf(p),I=zK.indexOf(h);return w===-1&&I===-1?p<h?-1:p>h?1:0:w!==-1&&I===-1?-1:w===-1&&I!==-1?1:w-I});let A=u.filter(p=>!$K(o[p])).map((p,h)=>{let w=o[p],I=XK(p),v=IT(w,t+1,!0),b=h>0||r?n:"",E=I.length>1024?`? ${I}
57${b}:`:`${I}:`,R=v.startsWith(`
58`)?v:` ${v}`;return`${b}${E}${R}`}).join(t===0?`
59`:"")||`
60`;return r?`
61${A}`:`${A}`}throw new Error(`Unsupported value type (${e})`)}function Ba(e){try{let t=IT(e,0,!1);return t!==`
62`?t:""}catch(t){throw t.location&&(t.message=t.message.replace(/(\.)?$/,` (line ${t.location.start.line}, column ${t.location.start.column})$1`)),t}}function Y6e(e){return e.endsWith(`
63`)||(e+=`
64`),(0,ZK.parse)(e)}function K6e(e){if(W6e.test(e))return Y6e(e);let t=(0,XD.safeLoad)(e,{schema:XD.FAILSAFE_SCHEMA,json:!0});if(t==null)return{};if(typeof t!="object")throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function Ji(e){return K6e(e)}var XD,ZK,G6e,zK,zD,W6e,eJ=yt(()=>{XD=$e(KK()),ZK=$e(VK()),G6e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,zK=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],zD=class{constructor(t){this.data=t}};Ba.PreserveOrdering=zD;W6e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var eI={};Jt(eI,{parseResolution:()=>MD,parseShell:()=>ND,parseSyml:()=>Ji,stringifyArgument:()=>lT,stringifyArgumentSegment:()=>cT,stringifyArithmeticExpression:()=>OD,stringifyCommand:()=>aT,stringifyCommandChain:()=>cy,stringifyCommandChainThen:()=>oT,stringifyCommandLine:()=>LD,stringifyCommandLineThen:()=>sT,stringifyEnvSegment:()=>TD,stringifyRedirectArgument:()=>KC,stringifyResolution:()=>UD,stringifyShell:()=>ly,stringifyShellLine:()=>ly,stringifySyml:()=>Ba,stringifyValueArgument:()=>qg});var Nl=yt(()=>{$Y();nW();eJ()});var rJ=_((Xxt,BT)=>{"use strict";var J6e=e=>{let t=!1,r=!1,o=!1;for(let a=0;a<e.length;a++){let n=e[a];t&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(e=e.slice(0,a)+"-"+e.slice(a),t=!1,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(e=e.slice(0,a-1)+"-"+e.slice(a-1),o=r,r=!1,t=!0):(t=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return e},tJ=(e,t)=>{if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);let r=a=>t.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(e)?e=e.map(a=>a.trim()).filter(a=>a.length).join("-"):e=e.trim(),e.length===0?"":e.length===1?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=J6e(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(e))};BT.exports=tJ;BT.exports.default=tJ});var nJ=_((Zxt,V6e)=>{V6e.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var $g=_(Xa=>{"use strict";var sJ=nJ(),Gu=process.env;Object.defineProperty(Xa,"_vendors",{value:sJ.map(function(e){return e.constant})});Xa.name=null;Xa.isPR=null;sJ.forEach(function(e){let r=(Array.isArray(e.env)?e.env:[e.env]).every(function(o){return iJ(o)});if(Xa[e.constant]=r,r)switch(Xa.name=e.name,typeof e.pr){case"string":Xa.isPR=!!Gu[e.pr];break;case"object":"env"in e.pr?Xa.isPR=e.pr.env in Gu&&Gu[e.pr.env]!==e.pr.ne:"any"in e.pr?Xa.isPR=e.pr.any.some(function(o){return!!Gu[o]}):Xa.isPR=iJ(e.pr);break;default:Xa.isPR=null}});Xa.isCI=!!(Gu.CI||Gu.CONTINUOUS_INTEGRATION||Gu.BUILD_NUMBER||Gu.RUN_ID||Xa.name);function iJ(e){return typeof e=="string"?!!Gu[e]:Object.keys(e).every(function(t){return Gu[t]===e[t]})}});var _n,ln,ed,vT,ZD,oJ,DT,ST,$D=yt(()=>{(function(e){e.StartOfInput="\0",e.EndOfInput="",e.EndOfPartialInput=""})(_n||(_n={}));(function(e){e[e.InitialNode=0]="InitialNode",e[e.SuccessNode=1]="SuccessNode",e[e.ErrorNode=2]="ErrorNode",e[e.CustomNode=3]="CustomNode"})(ln||(ln={}));ed=-1,vT=/^(-h|--help)(?:=([0-9]+))?$/,ZD=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,oJ=/^-[a-zA-Z]{2,}$/,DT=/^([^=]+)=([\s\S]*)$/,ST=process.env.DEBUG_CLI==="1"});var it,my,eS,PT,tS=yt(()=>{$D();it=class extends Error{constructor(t){super(t),this.clipanion={type:"usage"},this.name="UsageError"}},my=class extends Error{constructor(t,r){if(super(),this.input=t,this.candidates=r,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(o=>o.reason!==null&&o.reason===r[0].reason)){let[{reason:o}]=this.candidates;this.message=`${o}
65
66${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
67`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
68
69$ ${o}
70${PT(t)}`}else this.message=`Command not found; did you mean one of:
71
72${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
73`)}
74
75${PT(t)}`}},eS=class extends Error{constructor(t,r){super(),this.input=t,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
76
77${this.usages.map((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
78`)}
79
80${PT(t)}`}},PT=e=>`While running ${e.filter(t=>t!==_n.EndOfInput&&t!==_n.EndOfPartialInput).map(t=>{let r=JSON.stringify(t);return t.match(/\s/)||t.length===0||r!==`"${t}"`?r:t}).join(" ")}`});function z6e(e){let t=e.split(`
81`),r=t.filter(a=>a.match(/\S/)),o=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return t.map(a=>a.slice(o).trimRight()).join(`
82`)}function Do(e,{format:t,paragraphs:r}){return e=e.replace(/\r\n?/g,`
83`),e=z6e(e),e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
84
85`),e=e.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(e=e.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
86`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
87`)}).join(`
88
89`)),e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>t.code(a+n+a)),e=e.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>t.bold(a+n+a)),e?`${e}
90`:""}var xT,aJ,lJ,bT=yt(()=>{xT=Array(80).fill("\u2501");for(let e=0;e<=24;++e)xT[xT.length-e]=`\x1B[38;5;${232+e}m\u2501`;aJ={header:e=>`\x1B[1m\u2501\u2501\u2501 ${e}${e.length<80-5?` ${xT.slice(e.length+5).join("")}`:":"}\x1B[0m`,bold:e=>`\x1B[1m${e}\x1B[22m`,error:e=>`\x1B[31m\x1B[1m${e}\x1B[22m\x1B[39m`,code:e=>`\x1B[36m${e}\x1B[39m`},lJ={header:e=>e,bold:e=>e,error:e=>e,code:e=>e}});function Ko(e){return{...e,[tI]:!0}}function Yu(e,t){return typeof e>"u"?[e,t]:typeof e=="object"&&e!==null&&!Array.isArray(e)?[void 0,e]:[e,t]}function rS(e,{mergeName:t=!1}={}){let r=e.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,o,a]=r;return t&&(a=a[0].toLowerCase()+a.slice(1)),a=o!=="."||!t?`${o.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function rI(e,t){return t.length===1?new it(`${e}${rS(t[0],{mergeName:!0})}`):new it(`${e}:
91${t.map(r=>`
92- ${rS(r)}`).join("")}`)}function td(e,t,r){if(typeof r>"u")return t;let o=[],a=[],n=A=>{let p=t;return t=A,n.bind(null,p)};if(!r(t,{errors:o,coercions:a,coercion:n}))throw rI(`Invalid value for ${e}`,o);for(let[,A]of a)A();return t}var tI,Ef=yt(()=>{tS();tI=Symbol("clipanion/isOption")});var Jo={};Jt(Jo,{KeyRelationship:()=>Wu,TypeAssertionError:()=>Yp,applyCascade:()=>rd,as:()=>gje,assert:()=>fje,assertWithErrors:()=>pje,cascade:()=>hJ,fn:()=>dje,hasAtLeastOneKey:()=>LT,hasExactLength:()=>pJ,hasForbiddenKeys:()=>Nje,hasKeyRelationship:()=>oI,hasMaxLength:()=>yje,hasMinLength:()=>mje,hasMutuallyExclusiveKeys:()=>Lje,hasRequiredKeys:()=>Tje,hasUniqueItems:()=>Eje,isArray:()=>nS,isAtLeast:()=>TT,isAtMost:()=>Ije,isBase64:()=>Qje,isBoolean:()=>ije,isDate:()=>oje,isDict:()=>cje,isEnum:()=>Vs,isHexColor:()=>bje,isISO8601:()=>xje,isInExclusiveRange:()=>vje,isInInclusiveRange:()=>Bje,isInstanceOf:()=>Aje,isInteger:()=>NT,isJSON:()=>kje,isLiteral:()=>uJ,isLowerCase:()=>Dje,isMap:()=>lje,isNegative:()=>wje,isNullable:()=>Rje,isNumber:()=>FT,isObject:()=>AJ,isOneOf:()=>RT,isOptional:()=>Fje,isPartial:()=>uje,isPayload:()=>sje,isPositive:()=>Cje,isRecord:()=>sS,isSet:()=>aje,isString:()=>Ey,isTuple:()=>iS,isUUID4:()=>Pje,isUnknown:()=>kT,isUpperCase:()=>Sje,makeTrait:()=>fJ,makeValidator:()=>_r,matchesRegExp:()=>iI,softAssert:()=>hje});function Hn(e){return e===null?"null":e===void 0?"undefined":e===""?"an empty string":typeof e=="symbol"?`<${e.toString()}>`:Array.isArray(e)?"an array":JSON.stringify(e)}function yy(e,t){if(e.length===0)return"nothing";if(e.length===1)return Hn(e[0]);let r=e.slice(0,-1),o=e[e.length-1],a=e.length>2?`, ${t} `:` ${t} `;return`${r.map(n=>Hn(n)).join(", ")}${a}${Hn(o)}`}function Gp(e,t){var r,o,a;return typeof t=="number"?`${(r=e?.p)!==null&&r!==void 0?r:"."}[${t}]`:X6e.test(t)?`${(o=e?.p)!==null&&o!==void 0?o:""}.${t}`:`${(a=e?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(t)}]`}function QT(e,t,r){return e===1?t:r}function fr({errors:e,p:t}={},r){return e?.push(`${t??"."}: ${r}`),!1}function rje(e,t){return r=>{e[t]=r}}function Ku(e,t){return r=>{let o=e[t];return e[t]=r,Ku(e,t).bind(null,o)}}function nI(e,t,r){let o=()=>(e(r()),a),a=()=>(e(t),o);return o}function kT(){return _r({test:(e,t)=>!0})}function uJ(e){return _r({test:(t,r)=>t!==e?fr(r,`Expected ${Hn(e)} (got ${Hn(t)})`):!0})}function Ey(){return _r({test:(e,t)=>typeof e!="string"?fr(t,`Expected a string (got ${Hn(e)})`):!0})}function Vs(e){let t=Array.isArray(e)?e:Object.values(e),r=t.every(a=>typeof a=="string"||typeof a=="number"),o=new Set(t);return o.size===1?uJ([...o][0]):_r({test:(a,n)=>o.has(a)?!0:r?fr(n,`Expected one of ${yy(t,"or")} (got ${Hn(a)})`):fr(n,`Expected a valid enumeration value (got ${Hn(a)})`)})}function ije(){return _r({test:(e,t)=>{var r;if(typeof e!="boolean"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return fr(t,"Unbound coercion result");let o=nje.get(e);if(typeof o<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,o)]),!0}return fr(t,`Expected a boolean (got ${Hn(e)})`)}return!0}})}function FT(){return _r({test:(e,t)=>{var r;if(typeof e!="number"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return fr(t,"Unbound coercion result");let o;if(typeof e=="string"){let a;try{a=JSON.parse(e)}catch{}if(typeof a=="number")if(JSON.stringify(a)===e)o=a;else return fr(t,`Received a number that can't be safely represented by the runtime (${e})`)}if(typeof o<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,o)]),!0}return fr(t,`Expected a number (got ${Hn(e)})`)}return!0}})}function sje(e){return _r({test:(t,r)=>{var o;if(typeof r?.coercions>"u")return fr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return fr(r,"Unbound coercion result");if(typeof t!="string")return fr(r,`Expected a string (got ${Hn(t)})`);let a;try{a=JSON.parse(t)}catch{return fr(r,`Expected a JSON string (got ${Hn(t)})`)}let n={value:a};return e(a,Object.assign(Object.assign({},r),{coercion:Ku(n,"value")}))?(r.coercions.push([(o=r.p)!==null&&o!==void 0?o:".",r.coercion.bind(null,n.value)]),!0):!1}})}function oje(){return _r({test:(e,t)=>{var r;if(!(e instanceof Date)){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return fr(t,"Unbound coercion result");let o;if(typeof e=="string"&&cJ.test(e))o=new Date(e);else{let a;if(typeof e=="string"){let n;try{n=JSON.parse(e)}catch{}typeof n=="number"&&(a=n)}else typeof e=="number"&&(a=e);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))o=new Date(a*1e3);else return fr(t,`Received a timestamp that can't be safely represented by the runtime (${e})`)}if(typeof o<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,o)]),!0}return fr(t,`Expected a date (got ${Hn(e)})`)}return!0}})}function nS(e,{delimiter:t}={}){return _r({test:(r,o)=>{var a;let n=r;if(typeof r=="string"&&typeof t<"u"&&typeof o?.coercions<"u"){if(typeof o?.coercion>"u")return fr(o,"Unbound coercion result");r=r.split(t)}if(!Array.isArray(r))return fr(o,`Expected an array (got ${Hn(r)})`);let u=!0;for(let A=0,p=r.length;A<p&&(u=e(r[A],Object.assign(Object.assign({},o),{p:Gp(o,A),coercion:Ku(r,A)}))&&u,!(!u&&o?.errors==null));++A);return r!==n&&o.coercions.push([(a=o.p)!==null&&a!==void 0?a:".",o.coercion.bind(null,r)]),u}})}function aje(e,{delimiter:t}={}){let r=nS(e,{delimiter:t});return _r({test:(o,a)=>{var n,u;if(Object.getPrototypeOf(o).toString()==="[object Set]")if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return fr(a,"Unbound coercion result");let A=[...o],p=[...o];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((w,I)=>w!==A[I])?new Set(p):o;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",nI(a.coercion,o,h)]),!0}else{let A=!0;for(let p of o)if(A=e(p,Object.assign({},a))&&A,!A&&a?.errors==null)break;return A}if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return fr(a,"Unbound coercion result");let A={value:o};return r(o,Object.assign(Object.assign({},a),{coercion:Ku(A,"value")}))?(a.coercions.push([(u=a.p)!==null&&u!==void 0?u:".",nI(a.coercion,o,()=>new Set(A.value))]),!0):!1}return fr(a,`Expected a set (got ${Hn(o)})`)}})}function lje(e,t){let r=nS(iS([e,t])),o=sS(t,{keys:e});return _r({test:(a,n)=>{var u,A,p;if(Object.getPrototypeOf(a).toString()==="[object Map]")if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return fr(n,"Unbound coercion result");let h=[...a],w=[...a];if(!r(w,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let I=()=>w.some((v,b)=>v[0]!==h[b][0]||v[1]!==h[b][1])?new Map(w):a;return n.coercions.push([(u=n.p)!==null&&u!==void 0?u:".",nI(n.coercion,a,I)]),!0}else{let h=!0;for(let[w,I]of a)if(h=e(w,Object.assign({},n))&&h,!h&&n?.errors==null||(h=t(I,Object.assign(Object.assign({},n),{p:Gp(n,w)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return fr(n,"Unbound coercion result");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(A=n.p)!==null&&A!==void 0?A:".",nI(n.coercion,a,()=>new Map(h.value))]),!0):!1:o(a,Object.assign(Object.assign({},n),{coercion:Ku(h,"value")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:".",nI(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return fr(n,`Expected a map (got ${Hn(a)})`)}})}function iS(e,{delimiter:t}={}){let r=pJ(e.length);return _r({test:(o,a)=>{var n;if(typeof o=="string"&&typeof t<"u"&&typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return fr(a,"Unbound coercion result");o=o.split(t),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)])}if(!Array.isArray(o))return fr(a,`Expected a tuple (got ${Hn(o)})`);let u=r(o,Object.assign({},a));for(let A=0,p=o.length;A<p&&A<e.length&&(u=e[A](o[A],Object.assign(Object.assign({},a),{p:Gp(a,A),coercion:Ku(o,A)}))&&u,!(!u&&a?.errors==null));++A);return u}})}function sS(e,{keys:t=null}={}){let r=nS(iS([t??Ey(),e]));return _r({test:(o,a)=>{var n;if(Array.isArray(o)&&typeof a?.coercions<"u")return typeof a?.coercion>"u"?fr(a,"Unbound coercion result"):r(o,Object.assign(Object.assign({},a),{coercion:void 0}))?(o=Object.fromEntries(o),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)]),!0):!1;if(typeof o!="object"||o===null)return fr(a,`Expected an object (got ${Hn(o)})`);let u=Object.keys(o),A=!0;for(let p=0,h=u.length;p<h&&(A||a?.errors!=null);++p){let w=u[p],I=o[w];if(w==="__proto__"||w==="constructor"){A=fr(Object.assign(Object.assign({},a),{p:Gp(a,w)}),"Unsafe property name");continue}if(t!==null&&!t(w,a)){A=!1;continue}if(!e(I,Object.assign(Object.assign({},a),{p:Gp(a,w),coercion:Ku(o,w)}))){A=!1;continue}}return A}})}function cje(e,t={}){return sS(e,t)}function AJ(e,{extra:t=null}={}){let r=Object.keys(e),o=_r({test:(a,n)=>{if(typeof a!="object"||a===null)return fr(n,`Expected an object (got ${Hn(a)})`);let u=new Set([...r,...Object.keys(a)]),A={},p=!0;for(let h of u){if(h==="constructor"||h==="__proto__")p=fr(Object.assign(Object.assign({},n),{p:Gp(n,h)}),"Unsafe property name");else{let w=Object.prototype.hasOwnProperty.call(e,h)?e[h]:void 0,I=Object.prototype.hasOwnProperty.call(a,h)?a[h]:void 0;typeof w<"u"?p=w(I,Object.assign(Object.assign({},n),{p:Gp(n,h),coercion:Ku(a,h)}))&&p:t===null?p=fr(Object.assign(Object.assign({},n),{p:Gp(n,h)}),`Extraneous property (got ${Hn(I)})`):Object.defineProperty(A,h,{enumerable:!0,get:()=>I,set:rje(a,h)})}if(!p&&n?.errors==null)break}return t!==null&&(p||n?.errors!=null)&&(p=t(A,n)&&p),p}});return Object.assign(o,{properties:e})}function uje(e){return AJ(e,{extra:sS(kT())})}function fJ(e){return()=>e}function _r({test:e}){return fJ(e)()}function fje(e,t){if(!t(e))throw new Yp}function pje(e,t){let r=[];if(!t(e,{errors:r}))throw new Yp({errors:r})}function hje(e,t){}function gje(e,t,{coerce:r=!1,errors:o,throw:a}={}){let n=o?[]:void 0;if(!r){if(t(e,{errors:n}))return a?e:{value:e,errors:void 0};if(a)throw new Yp({errors:n});return{value:void 0,errors:n??!0}}let u={value:e},A=Ku(u,"value"),p=[];if(!t(e,{errors:n,coercion:A,coercions:p})){if(a)throw new Yp({errors:n});return{value:void 0,errors:n??!0}}for(let[,h]of p)h();return a?u.value:{value:u.value,errors:void 0}}function dje(e,t){let r=iS(e);return(...o)=>{if(!r(o))throw new Yp;return t(...o)}}function mje(e){return _r({test:(t,r)=>t.length>=e?!0:fr(r,`Expected to have a length of at least ${e} elements (got ${t.length})`)})}function yje(e){return _r({test:(t,r)=>t.length<=e?!0:fr(r,`Expected to have a length of at most ${e} elements (got ${t.length})`)})}function pJ(e){return _r({test:(t,r)=>t.length!==e?fr(r,`Expected to have a length of exactly ${e} elements (got ${t.length})`):!0})}function Eje({map:e}={}){return _r({test:(t,r)=>{let o=new Set,a=new Set;for(let n=0,u=t.length;n<u;++n){let A=t[n],p=typeof e<"u"?e(A):A;if(o.has(p)){if(a.has(p))continue;fr(r,`Expected to contain unique elements; got a duplicate with ${Hn(t)}`),a.add(p)}else o.add(p)}return a.size===0}})}function wje(){return _r({test:(e,t)=>e<=0?!0:fr(t,`Expected to be negative (got ${e})`)})}function Cje(){return _r({test:(e,t)=>e>=0?!0:fr(t,`Expected to be positive (got ${e})`)})}function TT(e){return _r({test:(t,r)=>t>=e?!0:fr(r,`Expected to be at least ${e} (got ${t})`)})}function Ije(e){return _r({test:(t,r)=>t<=e?!0:fr(r,`Expected to be at most ${e} (got ${t})`)})}function Bje(e,t){return _r({test:(r,o)=>r>=e&&r<=t?!0:fr(o,`Expected to be in the [${e}; ${t}] range (got ${r})`)})}function vje(e,t){return _r({test:(r,o)=>r>=e&&r<t?!0:fr(o,`Expected to be in the [${e}; ${t}[ range (got ${r})`)})}function NT({unsafe:e=!1}={}){return _r({test:(t,r)=>t!==Math.round(t)?fr(r,`Expected to be an integer (got ${t})`):!e&&!Number.isSafeInteger(t)?fr(r,`Expected to be a safe integer (got ${t})`):!0})}function iI(e){return _r({test:(t,r)=>e.test(t)?!0:fr(r,`Expected to match the pattern ${e.toString()} (got ${Hn(t)})`)})}function Dje(){return _r({test:(e,t)=>e!==e.toLowerCase()?fr(t,`Expected to be all-lowercase (got ${e})`):!0})}function Sje(){return _r({test:(e,t)=>e!==e.toUpperCase()?fr(t,`Expected to be all-uppercase (got ${e})`):!0})}function Pje(){return _r({test:(e,t)=>tje.test(e)?!0:fr(t,`Expected to be a valid UUID v4 (got ${Hn(e)})`)})}function xje(){return _r({test:(e,t)=>cJ.test(e)?!0:fr(t,`Expected to be a valid ISO 8601 date string (got ${Hn(e)})`)})}function bje({alpha:e=!1}){return _r({test:(t,r)=>(e?Z6e.test(t):$6e.test(t))?!0:fr(r,`Expected to be a valid hexadecimal color string (got ${Hn(t)})`)})}function Qje(){return _r({test:(e,t)=>eje.test(e)?!0:fr(t,`Expected to be a valid base 64 string (got ${Hn(e)})`)})}function kje(e=kT()){return _r({test:(t,r)=>{let o;try{o=JSON.parse(t)}catch{return fr(r,`Expected to be a valid JSON string (got ${Hn(t)})`)}return e(o,r)}})}function hJ(e,...t){let r=Array.isArray(t[0])?t[0]:t;return _r({test:(o,a)=>{var n,u;let A={value:o},p=typeof a?.coercions<"u"?Ku(A,"value"):void 0,h=typeof a?.coercions<"u"?[]:void 0;if(!e(o,Object.assign(Object.assign({},a),{coercion:p,coercions:h})))return!1;let w=[];if(typeof h<"u")for(let[,I]of h)w.push(I());try{if(typeof a?.coercions<"u"){if(A.value!==o){if(typeof a?.coercion>"u")return fr(a,"Unbound coercion result");a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,A.value)])}(u=a?.coercions)===null||u===void 0||u.push(...h)}return r.every(I=>I(A.value,a))}finally{for(let I of w)I()}}})}function rd(e,...t){let r=Array.isArray(t[0])?t[0]:t;return hJ(e,r)}function Fje(e){return _r({test:(t,r)=>typeof t>"u"?!0:e(t,r)})}function Rje(e){return _r({test:(t,r)=>t===null?!0:e(t,r)})}function Tje(e,t){var r;let o=new Set(e),a=sI[(r=t?.missingIf)!==null&&r!==void 0?r:"missing"];return _r({test:(n,u)=>{let A=new Set(Object.keys(n)),p=[];for(let h of o)a(A,h,n)||p.push(h);return p.length>0?fr(u,`Missing required ${QT(p.length,"property","properties")} ${yy(p,"and")}`):!0}})}function LT(e,t){var r;let o=new Set(e),a=sI[(r=t?.missingIf)!==null&&r!==void 0?r:"missing"];return _r({test:(n,u)=>Object.keys(n).some(h=>a(o,h,n))?!0:fr(u,`Missing at least one property from ${yy(Array.from(o),"or")}`)})}function Nje(e,t){var r;let o=new Set(e),a=sI[(r=t?.missingIf)!==null&&r!==void 0?r:"missing"];return _r({test:(n,u)=>{let A=new Set(Object.keys(n)),p=[];for(let h of o)a(A,h,n)&&p.push(h);return p.length>0?fr(u,`Forbidden ${QT(p.length,"property","properties")} ${yy(p,"and")}`):!0}})}function Lje(e,t){var r;let o=new Set(e),a=sI[(r=t?.missingIf)!==null&&r!==void 0?r:"missing"];return _r({test:(n,u)=>{let A=new Set(Object.keys(n)),p=[];for(let h of o)a(A,h,n)&&p.push(h);return p.length>1?fr(u,`Mutually exclusive properties ${yy(p,"and")}`):!0}})}function oI(e,t,r,o){var a,n;let u=new Set((a=o?.ignore)!==null&&a!==void 0?a:[]),A=sI[(n=o?.missingIf)!==null&&n!==void 0?n:"missing"],p=new Set(r),h=Oje[t],w=t===Wu.Forbids?"or":"and";return _r({test:(I,v)=>{let b=new Set(Object.keys(I));if(!A(b,e,I)||u.has(I[e]))return!0;let E=[];for(let R of p)(A(b,R,I)&&!u.has(I[R]))!==h.expect&&E.push(R);return E.length>=1?fr(v,`Property "${e}" ${h.message} ${QT(E.length,"property","properties")} ${yy(E,w)}`):!0}})}var X6e,Z6e,$6e,eje,tje,cJ,nje,Aje,RT,Yp,sI,Wu,Oje,Za=yt(()=>{X6e=/^[a-zA-Z_][a-zA-Z0-9_]*$/;Z6e=/^#[0-9a-f]{6}$/i,$6e=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,eje=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,tje=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,cJ=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/;nje=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]);Aje=e=>_r({test:(t,r)=>t instanceof e?!0:fr(r,`Expected an instance of ${e.name} (got ${Hn(t)})`)}),RT=(e,{exclusive:t=!1}={})=>_r({test:(r,o)=>{var a,n,u;let A=[],p=typeof o?.errors<"u"?[]:void 0;for(let h=0,w=e.length;h<w;++h){let I=typeof o?.errors<"u"?[]:void 0,v=typeof o?.coercions<"u"?[]:void 0;if(e[h](r,Object.assign(Object.assign({},o),{errors:I,coercions:v,p:`${(a=o?.p)!==null&&a!==void 0?a:"."}#${h+1}`}))){if(A.push([`#${h+1}`,v]),!t)break}else p?.push(I[0])}if(A.length===1){let[,h]=A[0];return typeof h<"u"&&((n=o?.coercions)===null||n===void 0||n.push(...h)),!0}return A.length>1?fr(o,`Expected to match exactly a single predicate (matched ${A.join(", ")})`):(u=o?.errors)===null||u===void 0||u.push(...p),!1}});Yp=class extends Error{constructor({errors:t}={}){let r="Type mismatch";if(t&&t.length>0){r+=`
93`;for(let o of t)r+=`
94- ${o}`}super(r)}};sI={missing:(e,t)=>e.has(t),undefined:(e,t,r)=>e.has(t)&&typeof r[t]<"u",nil:(e,t,r)=>e.has(t)&&r[t]!=null,falsy:(e,t,r)=>e.has(t)&&!!r[t]};(function(e){e.Forbids="Forbids",e.Requires="Requires"})(Wu||(Wu={}));Oje={[Wu.Forbids]:{expect:!1,message:"forbids using"},[Wu.Requires]:{expect:!0,message:"requires using"}}});var nt,Wp=yt(()=>{Ef();nt=class{constructor(){this.help=!1}static Usage(t){return t}async catch(t){throw t}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:u}=await Promise.resolve().then(()=>(Za(),Jo)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw rI("Invalid option schema",p);for(let[,I]of h)I()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};nt.isOption=tI;nt.Default=[]});function va(e){ST&&console.log(e)}function dJ(){let e={nodes:[]};for(let t=0;t<ln.CustomNode;++t)e.nodes.push($a());return e}function Mje(e){let t=dJ(),r=[],o=t.nodes.length;for(let a of e){r.push(o);for(let n=0;n<a.nodes.length;++n)yJ(n)||t.nodes.push(Wje(a.nodes[n],o));o+=a.nodes.length-ln.CustomNode+1}for(let a of r)wy(t,ln.InitialNode,a);return t}function Oc(e,t){return e.nodes.push(t),e.nodes.length-1}function Uje(e){let t=new Set,r=o=>{if(t.has(o))return;t.add(o);let a=e.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=e.nodes[u];for(let[p,h]of Object.entries(A.statics)){let w=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let I of h)w.some(({to:v})=>I.to===v)||w.push(I)}for(let[p,h]of A.dynamics)a.dynamics.some(([w,{to:I}])=>p===w&&h.to===I)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(ln.InitialNode)}function _je(e,{prefix:t=""}={}){if(ST){va(`${t}Nodes are:`);for(let r=0;r<e.nodes.length;++r)va(`${t} ${r}: ${JSON.stringify(e.nodes[r])}`)}}function Hje(e,t,r=!1){va(`Running a vm on ${JSON.stringify(t)}`);let o=[{node:ln.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];_je(e,{prefix:" "});let a=[_n.StartOfInput,...t];for(let n=0;n<a.length;++n){let u=a[n],A=u===_n.EndOfInput||u===_n.EndOfPartialInput,p=n-1;va(` Processing ${JSON.stringify(u)}`);let h=[];for(let{node:w,state:I}of o){va(` Current node is ${w}`);let v=e.nodes[w];if(w===ln.ErrorNode){h.push({node:w,state:I});continue}console.assert(v.shortcuts.length===0,"Shortcuts should have been eliminated by now");let b=Object.prototype.hasOwnProperty.call(v.statics,u);if(!r||n<a.length-1||b)if(b){let E=v.statics[u];for(let{to:R,reducer:N}of E)h.push({node:R,state:typeof N<"u"?oS(MT,N,I,u,p):I}),va(` Static transition to ${R} found`)}else va(" No static transition found");else{let E=!1;for(let R of Object.keys(v.statics))if(!!R.startsWith(u)){if(u===R)for(let{to:N,reducer:U}of v.statics[R])h.push({node:N,state:typeof U<"u"?oS(MT,U,I,u,p):I}),va(` Static transition to ${N} found`);else for(let{to:N}of v.statics[R])h.push({node:N,state:{...I,remainder:R.slice(u.length)}}),va(` Static transition to ${N} found (partial match)`);E=!0}E||va(" No partial static transition found")}if(!A)for(let[E,{to:R,reducer:N}]of v.dynamics)oS(Kje,E,I,u,p)&&(h.push({node:R,state:typeof N<"u"?oS(MT,N,I,u,p):I}),va(` Dynamic transition to ${R} found (via ${E})`))}if(h.length===0&&A&&t.length===1)return[{node:ln.InitialNode,state:gJ}];if(h.length===0)throw new my(t,o.filter(({node:w})=>w!==ln.ErrorNode).map(({state:w})=>({usage:w.candidateUsage,reason:null})));if(h.every(({node:w})=>w===ln.ErrorNode))throw new my(t,h.map(({state:w})=>({usage:w.candidateUsage,reason:w.errorMessage})));o=qje(h)}if(o.length>0){va(" Results:");for(let n of o)va(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else va(" No results");return o}function jje(e,t,{endToken:r=_n.EndOfInput}={}){let o=Hje(e,[...t,r]);return Gje(t,o.map(({state:a})=>a))}function qje(e){let t=0;for(let{state:r}of e)r.path.length>t&&(t=r.path.length);return e.filter(({state:r})=>r.path.length===t)}function Gje(e,t){let r=t.filter(v=>v.selectedIndex!==null),o=r.filter(v=>!v.partial);if(o.length>0&&(r=o),r.length===0)throw new Error;let a=r.filter(v=>v.selectedIndex===ed||v.requiredOptions.every(b=>b.some(E=>v.options.find(R=>R.name===E))));if(a.length===0)throw new my(e,r.map(v=>({usage:v.candidateUsage,reason:null})));let n=0;for(let v of a)v.path.length>n&&(n=v.path.length);let u=a.filter(v=>v.path.length===n),A=v=>v.positionals.filter(({extra:b})=>!b).length+v.options.length,p=u.map(v=>({state:v,positionalCount:A(v)})),h=0;for(let{positionalCount:v}of p)v>h&&(h=v);let w=p.filter(({positionalCount:v})=>v===h).map(({state:v})=>v),I=Yje(w);if(I.length>1)throw new eS(e,I.map(v=>v.candidateUsage));return I[0]}function Yje(e){let t=[],r=[];for(let o of e)o.selectedIndex===ed?r.push(o):t.push(o);return r.length>0&&t.push({...gJ,path:mJ(...r.map(o=>o.path)),options:r.reduce((o,a)=>o.concat(a.options),[])}),t}function mJ(e,t,...r){return t===void 0?Array.from(e):mJ(e.filter((o,a)=>o===t[a]),...r)}function $a(){return{dynamics:[],shortcuts:[],statics:{}}}function yJ(e){return e===ln.SuccessNode||e===ln.ErrorNode}function OT(e,t=0){return{to:yJ(e.to)?e.to:e.to>=ln.CustomNode?e.to+t-ln.CustomNode+1:e.to+t,reducer:e.reducer}}function Wje(e,t=0){let r=$a();for(let[o,a]of e.dynamics)r.dynamics.push([o,OT(a,t)]);for(let o of e.shortcuts)r.shortcuts.push(OT(o,t));for(let[o,a]of Object.entries(e.statics))r.statics[o]=a.map(n=>OT(n,t));return r}function xs(e,t,r,o,a){e.nodes[t].dynamics.push([r,{to:o,reducer:a}])}function wy(e,t,r,o){e.nodes[t].shortcuts.push({to:r,reducer:o})}function Vo(e,t,r,o,a){(Object.prototype.hasOwnProperty.call(e.nodes[t].statics,r)?e.nodes[t].statics[r]:e.nodes[t].statics[r]=[]).push({to:o,reducer:a})}function oS(e,t,r,o,a){if(Array.isArray(t)){let[n,...u]=t;return e[n](r,o,a,...u)}else return e[t](r,o,a)}var gJ,Kje,MT,el,UT,Cy,aS=yt(()=>{$D();tS();gJ={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:ed,partial:!1,tokens:[]};Kje={always:()=>!0,isOptionLike:(e,t)=>!e.ignoreOptions&&t!=="-"&&t.startsWith("-"),isNotOptionLike:(e,t)=>e.ignoreOptions||t==="-"||!t.startsWith("-"),isOption:(e,t,r,o)=>!e.ignoreOptions&&t===o,isBatchOption:(e,t,r,o)=>!e.ignoreOptions&&oJ.test(t)&&[...t.slice(1)].every(a=>o.has(`-${a}`)),isBoundOption:(e,t,r,o,a)=>{let n=t.match(DT);return!e.ignoreOptions&&!!n&&ZD.test(n[1])&&o.has(n[1])&&a.filter(u=>u.nameSet.includes(n[1])).every(u=>u.allowBinding)},isNegatedOption:(e,t,r,o)=>!e.ignoreOptions&&t===`--no-${o.slice(2)}`,isHelp:(e,t)=>!e.ignoreOptions&&vT.test(t),isUnsupportedOption:(e,t,r,o)=>!e.ignoreOptions&&t.startsWith("-")&&ZD.test(t)&&!o.has(t),isInvalidOption:(e,t)=>!e.ignoreOptions&&t.startsWith("-")&&!ZD.test(t)},MT={setCandidateState:(e,t,r,o)=>({...e,...o}),setSelectedIndex:(e,t,r,o)=>({...e,selectedIndex:o}),setPartialIndex:(e,t,r,o)=>({...e,selectedIndex:o,partial:!0}),pushBatch:(e,t,r,o)=>{let a=e.options.slice(),n=e.tokens.slice();for(let u=1;u<t.length;++u){let A=o.get(`-${t[u]}`),p=u===1?[0,2]:[u,u+1];a.push({name:A,value:!0}),n.push({segmentIndex:r,type:"option",option:A,slice:p})}return{...e,options:a,tokens:n}},pushBound:(e,t,r)=>{let[,o,a]=t.match(DT),n=e.options.concat({name:o,value:a}),u=e.tokens.concat([{segmentIndex:r,type:"option",slice:[0,o.length],option:o},{segmentIndex:r,type:"assign",slice:[o.length,o.length+1]},{segmentIndex:r,type:"value",slice:[o.length+1,o.length+a.length+1]}]);return{...e,options:n,tokens:u}},pushPath:(e,t,r)=>{let o=e.path.concat(t),a=e.tokens.concat({segmentIndex:r,type:"path"});return{...e,path:o,tokens:a}},pushPositional:(e,t,r)=>{let o=e.positionals.concat({value:t,extra:!1}),a=e.tokens.concat({segmentIndex:r,type:"positional"});return{...e,positionals:o,tokens:a}},pushExtra:(e,t,r)=>{let o=e.positionals.concat({value:t,extra:!0}),a=e.tokens.concat({segmentIndex:r,type:"positional"});return{...e,positionals:o,tokens:a}},pushExtraNoLimits:(e,t,r)=>{let o=e.positionals.concat({value:t,extra:el}),a=e.tokens.concat({segmentIndex:r,type:"positional"});return{...e,positionals:o,tokens:a}},pushTrue:(e,t,r,o)=>{let a=e.options.concat({name:o,value:!0}),n=e.tokens.concat({segmentIndex:r,type:"option",option:o});return{...e,options:a,tokens:n}},pushFalse:(e,t,r,o)=>{let a=e.options.concat({name:o,value:!1}),n=e.tokens.concat({segmentIndex:r,type:"option",option:o});return{...e,options:a,tokens:n}},pushUndefined:(e,t,r,o)=>{let a=e.options.concat({name:t,value:void 0}),n=e.tokens.concat({segmentIndex:r,type:"option",option:t});return{...e,options:a,tokens:n}},pushStringValue:(e,t,r)=>{var o;let a=e.options[e.options.length-1],n=e.options.slice(),u=e.tokens.concat({segmentIndex:r,type:"value"});return a.value=((o=a.value)!==null&&o!==void 0?o:[]).concat([t]),{...e,options:n,tokens:u}},setStringValue:(e,t,r)=>{let o=e.options[e.options.length-1],a=e.options.slice(),n=e.tokens.concat({segmentIndex:r,type:"value"});return o.value=t,{...e,options:a,tokens:n}},inhibateOptions:e=>({...e,ignoreOptions:!0}),useHelp:(e,t,r,o)=>{let[,,a]=t.match(vT);return typeof a<"u"?{...e,options:[{name:"-c",value:String(o)},{name:"-i",value:a}]}:{...e,options:[{name:"-c",value:String(o)}]}},setError:(e,t,r,o)=>t===_n.EndOfInput||t===_n.EndOfPartialInput?{...e,errorMessage:`${o}.`}:{...e,errorMessage:`${o} ("${t}").`},setOptionArityError:(e,t)=>{let r=e.options[e.options.length-1];return{...e,errorMessage:`Not enough arguments to option ${r.name}.`}}},el=Symbol(),UT=class{constructor(t,r){this.allOptionNames=new Map,this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=t,this.cliOpts=r}addPath(t){this.paths.push(t)}setArity({leading:t=this.arity.leading,trailing:r=this.arity.trailing,extra:o=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:t,trailing:r,extra:o,proxy:a})}addPositional({name:t="arg",required:r=!0}={}){if(!r&&this.arity.extra===el)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!r&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!r&&this.arity.extra!==el?this.arity.extra.push(t):this.arity.extra!==el&&this.arity.extra.length===0?this.arity.leading.push(t):this.arity.trailing.push(t)}addRest({name:t="arg",required:r=0}={}){if(this.arity.extra===el)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let o=0;o<r;++o)this.addPositional({name:t});this.arity.extra=el}addProxy({required:t=0}={}){this.addRest({required:t}),this.arity.proxy=!0}addOption({names:t,description:r,arity:o=0,hidden:a=!1,required:n=!1,allowBinding:u=!0}){if(!u&&o>1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(o))throw new Error(`The arity must be an integer, got ${o}`);if(o<0)throw new Error(`The arity must be positive, got ${o}`);let A=t.reduce((p,h)=>h.length>p.length?h:p,"");for(let p of t)this.allOptionNames.set(p,A);this.options.push({preferredName:A,nameSet:t,description:r,arity:o,hidden:a,required:n,allowBinding:u})}setContext(t){this.context=t}usage({detailed:t=!0,inlineOptions:r=!0}={}){let o=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&o.push(...this.paths[0]),t){for(let{preferredName:u,nameSet:A,arity:p,hidden:h,description:w,required:I}of this.options){if(h)continue;let v=[];for(let E=0;E<p;++E)v.push(` #${E}`);let b=`${A.join(",")}${v.join("")}`;!r&&w?a.push({preferredName:u,nameSet:A,definition:b,description:w,required:I}):o.push(I?`<${b}>`:`[${b}]`)}o.push(...this.arity.leading.map(u=>`<${u}>`)),this.arity.extra===el?o.push("..."):o.push(...this.arity.extra.map(u=>`[${u}]`)),o.push(...this.arity.trailing.map(u=>`<${u}>`))}return{usage:o.join(" "),options:a}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let t=dJ(),r=ln.InitialNode,o=this.usage().usage,a=this.options.filter(A=>A.required).map(A=>A.nameSet);r=Oc(t,$a()),Vo(t,ln.InitialNode,_n.StartOfInput,r,["setCandidateState",{candidateUsage:o,requiredOptions:a}]);let n=this.arity.proxy?"always":"isNotOptionLike",u=this.paths.length>0?this.paths:[[]];for(let A of u){let p=r;if(A.length>0){let v=Oc(t,$a());wy(t,p,v),this.registerOptions(t,v),p=v}for(let v=0;v<A.length;++v){let b=Oc(t,$a());Vo(t,p,A[v],b,"pushPath"),p=b}if(this.arity.leading.length>0||!this.arity.proxy){let v=Oc(t,$a());xs(t,p,"isHelp",v,["useHelp",this.cliIndex]),xs(t,v,"always",v,"pushExtra"),Vo(t,v,_n.EndOfInput,ln.SuccessNode,["setSelectedIndex",ed]),this.registerOptions(t,p)}this.arity.leading.length>0&&(Vo(t,p,_n.EndOfInput,ln.ErrorNode,["setError","Not enough positional arguments"]),Vo(t,p,_n.EndOfPartialInput,ln.SuccessNode,["setPartialIndex",this.cliIndex]));let h=p;for(let v=0;v<this.arity.leading.length;++v){let b=Oc(t,$a());(!this.arity.proxy||v+1!==this.arity.leading.length)&&this.registerOptions(t,b),(this.arity.trailing.length>0||v+1!==this.arity.leading.length)&&(Vo(t,b,_n.EndOfInput,ln.ErrorNode,["setError","Not enough positional arguments"]),Vo(t,b,_n.EndOfPartialInput,ln.SuccessNode,["setPartialIndex",this.cliIndex])),xs(t,h,"isNotOptionLike",b,"pushPositional"),h=b}let w=h;if(this.arity.extra===el||this.arity.extra.length>0){let v=Oc(t,$a());if(wy(t,h,v),this.arity.extra===el){let b=Oc(t,$a());this.arity.proxy||this.registerOptions(t,b),xs(t,h,n,b,"pushExtraNoLimits"),xs(t,b,n,b,"pushExtraNoLimits"),wy(t,b,v)}else for(let b=0;b<this.arity.extra.length;++b){let E=Oc(t,$a());(!this.arity.proxy||b>0)&&this.registerOptions(t,E),xs(t,w,n,E,"pushExtra"),wy(t,E,v),w=E}w=v}this.arity.trailing.length>0&&(Vo(t,w,_n.EndOfInput,ln.ErrorNode,["setError","Not enough positional arguments"]),Vo(t,w,_n.EndOfPartialInput,ln.SuccessNode,["setPartialIndex",this.cliIndex]));let I=w;for(let v=0;v<this.arity.trailing.length;++v){let b=Oc(t,$a());this.arity.proxy||this.registerOptions(t,b),v+1<this.arity.trailing.length&&(Vo(t,b,_n.EndOfInput,ln.ErrorNode,["setError","Not enough positional arguments"]),Vo(t,b,_n.EndOfPartialInput,ln.SuccessNode,["setPartialIndex",this.cliIndex])),xs(t,I,"isNotOptionLike",b,"pushPositional"),I=b}xs(t,I,n,ln.ErrorNode,["setError","Extraneous positional argument"]),Vo(t,I,_n.EndOfInput,ln.SuccessNode,["setSelectedIndex",this.cliIndex]),Vo(t,I,_n.EndOfPartialInput,ln.SuccessNode,["setSelectedIndex",this.cliIndex])}return{machine:t,context:this.context}}registerOptions(t,r){xs(t,r,["isOption","--"],r,"inhibateOptions"),xs(t,r,["isBatchOption",this.allOptionNames],r,["pushBatch",this.allOptionNames]),xs(t,r,["isBoundOption",this.allOptionNames,this.options],r,"pushBound"),xs(t,r,["isUnsupportedOption",this.allOptionNames],ln.ErrorNode,["setError","Unsupported option name"]),xs(t,r,["isInvalidOption"],ln.ErrorNode,["setError","Invalid option name"]);for(let o of this.options)if(o.arity===0)for(let a of o.nameSet)xs(t,r,["isOption",a],r,["pushTrue",o.preferredName]),a.startsWith("--")&&!a.startsWith("--no-")&&xs(t,r,["isNegatedOption",a],r,["pushFalse",o.preferredName]);else{let a=Oc(t,$a());for(let n of o.nameSet)xs(t,r,["isOption",n],a,["pushUndefined",o.preferredName]);for(let n=0;n<o.arity;++n){let u=Oc(t,$a());Vo(t,a,_n.EndOfInput,ln.ErrorNode,"setOptionArityError"),Vo(t,a,_n.EndOfPartialInput,ln.ErrorNode,"setOptionArityError"),xs(t,a,"isOptionLike",ln.ErrorNode,"setOptionArityError");let A=o.arity===1?"setStringValue":"pushStringValue";xs(t,a,"isNotOptionLike",u,A),a=u}wy(t,a,r)}}},Cy=class{constructor({binaryName:t="..."}={}){this.builders=[],this.opts={binaryName:t}}static build(t,r={}){return new Cy(r).commands(t).compile()}getBuilderByIndex(t){if(!(t>=0&&t<this.builders.length))throw new Error(`Assertion failed: Out-of-bound command index (${t})`);return this.builders[t]}commands(t){for(let r of t)r(this.command());return this}command(){let t=new UT(this.builders.length,this.opts);return this.builders.push(t),t}compile(){let t=[],r=[];for(let a of this.builders){let{machine:n,context:u}=a.compile();t.push(n),r.push(u)}let o=Mje(t);return Uje(o),{machine:o,contexts:r,process:(a,{partial:n}={})=>{let u=n?_n.EndOfPartialInput:_n.EndOfInput;return jje(o,a,{endToken:u})}}}}});function wJ(){return lS.default&&"getColorDepth"in lS.default.WriteStream.prototype?lS.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}function CJ(e){let t=EJ;if(typeof t>"u"){if(e.stdout===process.stdout&&e.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=Ie("async_hooks");t=EJ=new r;let o=process.stdout._write;process.stdout._write=function(n,u,A){let p=t.getStore();return typeof p>"u"?o.call(this,n,u,A):p.stdout.write(n,u,A)};let a=process.stderr._write;process.stderr._write=function(n,u,A){let p=t.getStore();return typeof p>"u"?a.call(this,n,u,A):p.stderr.write(n,u,A)}}return r=>t.run(e,r)}var lS,EJ,IJ=yt(()=>{lS=$e(Ie("tty"),1)});var Iy,BJ=yt(()=>{Wp();Iy=class extends nt{constructor(t){super(),this.contexts=t,this.commands=[]}static from(t,r){let o=new Iy(r);o.path=t.path;for(let a of t.options)switch(a.name){case"-c":o.commands.push(Number(a.value));break;case"-i":o.index=Number(a.value);break}return o}async execute(){let t=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index<t.length&&(t=[t[this.index]]),t.length===0)this.context.stdout.write(this.cli.usage());else if(t.length===1)this.context.stdout.write(this.cli.usage(this.contexts[t[0]].commandClass,{detailed:!0}));else if(t.length>1){this.context.stdout.write(`Multiple commands match your selection:
95`),this.context.stdout.write(`
96`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
97`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
98`)}}}});async function SJ(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=xJ(e);return os.from(r,t).runExit(o,a)}async function PJ(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=xJ(e);return os.from(r,t).run(o,a)}function xJ(e){let t,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),e.length){case 1:r=e[0];break;case 2:e[0]&&e[0].prototype instanceof nt||Array.isArray(e[0])?(r=e[0],Array.isArray(e[1])?o=e[1]:a=e[1]):(t=e[0],r=e[1]);break;case 3:Array.isArray(e[2])?(t=e[0],r=e[1],o=e[2]):e[0]&&e[0].prototype instanceof nt||Array.isArray(e[0])?(r=e[0],o=e[1],a=e[2]):(t=e[0],r=e[1],a=e[2]);break;default:t=e[0],r=e[1],o=e[2],a=e[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function DJ(e){return e()}var vJ,os,bJ=yt(()=>{$D();aS();bT();IJ();Wp();BJ();vJ=Symbol("clipanion/errorCommand");os=class{constructor({binaryLabel:t,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Cy({binaryName:r}),this.binaryLabel=t,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(t,r={}){let o=new os(r),a=Array.isArray(t)?t:[t];for(let n of a)o.register(n);return o}register(t){var r;let o=new Map,a=new t;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[nt.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=t.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(t,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:t})}process(t,r){let{input:o,context:a,partial:n}=typeof t=="object"&&Array.isArray(t)?{input:t,context:r}:t,{contexts:u,process:A}=this.builder.compile(),p=A(o,{partial:n}),h={...os.defaultContext,...a};switch(p.selectedIndex){case ed:{let w=Iy.from(p,u);return w.context=h,w.tokens=p.tokens,w}default:{let{commandClass:w}=u[p.selectedIndex],I=this.registrations.get(w);if(typeof I>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let v=new w;v.context=h,v.tokens=p.tokens,v.path=p.path;try{for(let[b,{transformer:E}]of I.specs.entries())v[b]=E(I.builder,b,p,h);return v}catch(b){throw b[vJ]=v,b}}break}}async run(t,r){var o,a;let n,u={...os.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(t))n=t;else try{n=this.process(t,u)}catch(w){return u.stdout.write(this.error(w,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:w=>this.definition(w),error:(w,I)=>this.error(w,I),format:w=>this.format(w),process:(w,I)=>this.process(w,{...u,...I}),run:(w,I)=>this.run(w,{...u,...I}),usage:(w,I)=>this.usage(w,I)};let p=this.enableCapture&&(a=CJ(u))!==null&&a!==void 0?a:DJ,h;try{h=await p(()=>n.validateAndExecute().catch(w=>n.catch(w).then(()=>0)))}catch(w){return u.stdout.write(this.error(w,{colored:A,command:n})),1}return h}async runExit(t,r){process.exitCode=await this.run(t,r)}definition(t,{colored:r=!1}={}){if(!t.usage)return null;let{usage:o}=this.getUsageByRegistration(t,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(t,{detailed:!0,inlineOptions:!1}),u=typeof t.usage.category<"u"?Do(t.usage.category,{format:this.format(r),paragraphs:!1}):void 0,A=typeof t.usage.description<"u"?Do(t.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof t.usage.details<"u"?Do(t.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof t.usage.examples<"u"?t.usage.examples.map(([w,I])=>[Do(w,{format:this.format(r),paragraphs:!1}),I.replace(/\$0/g,this.binaryName)]):void 0;return{path:o,usage:a,category:u,description:A,details:p,examples:h,options:n}}definitions({colored:t=!1}={}){let r=[];for(let o of this.registrations.keys()){let a=this.definition(o,{colored:t});!a||r.push(a)}return r}usage(t=null,{colored:r,detailed:o=!1,prefix:a="$ "}={}){var n;if(t===null){for(let p of this.registrations.keys()){let h=p.paths,w=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(b=>b.length===0))!==null&&n!==void 0?n:!1))if(t){t=null;break}else t=p;else if(w){t=null;continue}}t&&(o=!0)}let u=t!==null&&t instanceof nt?t.constructor:t,A="";if(u)if(o){let{description:p="",details:h="",examples:w=[]}=u.usage||{};p!==""&&(A+=Do(p,{format:this.format(r),paragraphs:!1}).replace(/^./,b=>b.toUpperCase()),A+=`
99`),(h!==""||w.length>0)&&(A+=`${this.format(r).header("Usage")}
100`,A+=`
101`);let{usage:I,options:v}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${I}
102`,v.length>0){A+=`
103`,A+=`${this.format(r).header("Options")}
104`;let b=v.reduce((E,R)=>Math.max(E,R.definition.length),0);A+=`
105`;for(let{definition:E,description:R}of v)A+=` ${this.format(r).bold(E.padEnd(b))} ${Do(R,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(A+=`
106`,A+=`${this.format(r).header("Details")}
107`,A+=`
108`,A+=Do(h,{format:this.format(r),paragraphs:!0})),w.length>0){A+=`
109`,A+=`${this.format(r).header("Examples")}
110`;for(let[b,E]of w)A+=`
111`,A+=Do(b,{format:this.format(r),paragraphs:!1}),A+=`${E.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
112`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
113`}else{let p=new Map;for(let[v,{index:b}]of this.registrations.entries()){if(typeof v.usage>"u")continue;let E=typeof v.usage.category<"u"?Do(v.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(E);typeof R>"u"&&p.set(E,R=[]);let{usage:N}=this.getUsageByIndex(b);R.push({commandClass:v,usage:N})}let h=Array.from(p.keys()).sort((v,b)=>v===null?-1:b===null?1:v.localeCompare(b,"en",{usage:"sort",caseFirst:"upper"})),w=typeof this.binaryLabel<"u",I=typeof this.binaryVersion<"u";w||I?(w&&I?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
114
115`:w?A+=`${this.format(r).header(`${this.binaryLabel}`)}
116`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
117`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
118`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
119`;for(let v of h){let b=p.get(v).slice().sort((R,N)=>R.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),E=v!==null?v.trim():"General commands";A+=`
120`,A+=`${this.format(r).header(`${E}`)}
121`;for(let{commandClass:R,usage:N}of b){let U=R.usage.description||"undocumented";A+=`
122`,A+=` ${this.format(r).bold(N)}
123`,A+=` ${Do(U,{format:this.format(r),paragraphs:!1})}`}}A+=`
124`,A+=Do("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return A}error(t,r){var o,{colored:a,command:n=(o=t[vJ])!==null&&o!==void 0?o:null}=r===void 0?{}:r;(!t||typeof t!="object"||!("stack"in t))&&(t=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(t)})`));let u="",A=t.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${t.message}
125`;let p=t.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
126`,u+=this.usage(n)):t.stack&&(u+=`${t.stack.replace(/^.*\n/,"")}
127`),u}format(t){var r;return((r=t??this.enableColors)!==null&&r!==void 0?r:os.defaultContext.colorDepth>1)?aJ:lJ}getUsageByRegistration(t,r){let o=this.registrations.get(t);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(t,r){return this.builder.getBuilderByIndex(t).usage(r)}};os.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:wJ()}});var aI,QJ=yt(()=>{Wp();aI=class extends nt{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
128`)}};aI.paths=[["--clipanion=definitions"]]});var lI,kJ=yt(()=>{Wp();lI=class extends nt{async execute(){this.context.stdout.write(this.cli.usage())}};lI.paths=[["-h"],["--help"]]});function cS(e={}){return Ko({definition(t,r){var o;t.addProxy({name:(o=e.name)!==null&&o!==void 0?o:r,required:e.required})},transformer(t,r,o){return o.positionals.map(({value:a})=>a)}})}var _T=yt(()=>{Ef()});var cI,FJ=yt(()=>{Wp();_T();cI=class extends nt{constructor(){super(...arguments),this.args=cS()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
129`)}};cI.paths=[["--clipanion=tokens"]]});var uI,RJ=yt(()=>{Wp();uI=class extends nt{async execute(){var t;this.context.stdout.write(`${(t=this.cli.binaryVersion)!==null&&t!==void 0?t:"<unknown>"}
130`)}};uI.paths=[["-v"],["--version"]]});var HT={};Jt(HT,{DefinitionsCommand:()=>aI,HelpCommand:()=>lI,TokensCommand:()=>cI,VersionCommand:()=>uI});var TJ=yt(()=>{QJ();kJ();FJ();RJ()});function NJ(e,t,r){let[o,a]=Yu(t,r??{}),{arity:n=1}=a,u=e.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,w){let I,v=typeof o<"u"?[...o]:void 0;for(let{name:b,value:E}of w.options)!A.has(b)||(I=b,v=v??[],v.push(E));return typeof v<"u"?td(I??h,v,a.validator):v}})}var LJ=yt(()=>{Ef()});function OJ(e,t,r){let[o,a]=Yu(t,r??{}),n=e.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let w=o;for(let{name:I,value:v}of h.options)!u.has(I)||(w=v);return w}})}var MJ=yt(()=>{Ef()});function UJ(e,t,r){let[o,a]=Yu(t,r??{}),n=e.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let w=o;for(let{name:I,value:v}of h.options)!u.has(I)||(w??(w=0),v?w+=1:w=0);return w}})}var _J=yt(()=>{Ef()});function HJ(e={}){return Ko({definition(t,r){var o;t.addRest({name:(o=e.name)!==null&&o!==void 0?o:r,required:e.required})},transformer(t,r,o){let a=u=>{let A=o.positionals[u];return A.extra===el||A.extra===!1&&u<t.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var jJ=yt(()=>{aS();Ef()});function Jje(e,t,r){let[o,a]=Yu(t,r??{}),{arity:n=1}=a,u=e.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,w,I){let v,b=o;typeof a.env<"u"&&I.env[a.env]&&(v=a.env,b=I.env[a.env]);for(let{name:E,value:R}of w.options)!A.has(E)||(v=E,b=R);return typeof b=="string"?td(v??h,b,a.validator):b}})}function Vje(e={}){let{required:t=!0}=e;return Ko({definition(r,o){var a;r.addPositional({name:(a=e.name)!==null&&a!==void 0?a:o,required:e.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===el||t&&a.positionals[u].extra===!0||!t&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return td((n=e.name)!==null&&n!==void 0?n:o,A.value,e.validator)}}})}function qJ(e,...t){return typeof e=="string"?Jje(e,...t):Vje(e)}var GJ=yt(()=>{aS();Ef()});var he={};Jt(he,{Array:()=>NJ,Boolean:()=>OJ,Counter:()=>UJ,Proxy:()=>cS,Rest:()=>HJ,String:()=>qJ,applyValidator:()=>td,cleanValidationError:()=>rS,formatError:()=>rI,isOptionSymbol:()=>tI,makeCommandOption:()=>Ko,rerouteArguments:()=>Yu});var YJ=yt(()=>{Ef();_T();LJ();MJ();_J();jJ();GJ()});var AI={};Jt(AI,{Builtins:()=>HT,Cli:()=>os,Command:()=>nt,Option:()=>he,UsageError:()=>it,formatMarkdownish:()=>Do,run:()=>PJ,runExit:()=>SJ});var qt=yt(()=>{tS();bT();Wp();bJ();TJ();YJ()});var WJ=_((sQt,zje)=>{zje.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var zJ=_((oQt,wf)=>{var KJ=Ie("fs"),qT=Ie("path"),Xje=Ie("os"),Zje=Ie("crypto"),$je=WJ(),GT=$je.version,eqe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function tqe(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
131`);let o;for(;(o=eqe.exec(r))!=null;){let a=o[1],n=o[2]||"";n=n.trim();let u=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),u==='"'&&(n=n.replace(/\\n/g,`
132`),n=n.replace(/\\r/g,"\r")),t[a]=n}return t}function rqe(e){let t=VJ(e),r=bs.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let o=JJ(e).split(","),a=o.length,n;for(let u=0;u<a;u++)try{let A=o[u].trim(),p=sqe(r,A);n=bs.decrypt(p.ciphertext,p.key);break}catch(A){if(u+1>=a)throw A}return bs.parse(n)}function nqe(e){console.log(`[dotenv@${GT}][INFO] ${e}`)}function iqe(e){console.log(`[dotenv@${GT}][WARN] ${e}`)}function jT(e){console.log(`[dotenv@${GT}][DEBUG] ${e}`)}function JJ(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function sqe(e,t){let r;try{r=new URL(t)}catch(A){throw A.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):A}let o=r.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,u=e.parsed[n];if(!u)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:u,key:o}}function VJ(e){let t=qT.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function oqe(e){return e[0]==="~"?qT.join(Xje.homedir(),e.slice(1)):e}function aqe(e){nqe("Loading env from encrypted .env.vault");let t=bs._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),bs.populate(r,t,e),{parsed:t}}function lqe(e){let t=qT.resolve(process.cwd(),".env"),r="utf8",o=Boolean(e&&e.debug);e&&(e.path!=null&&(t=oqe(e.path)),e.encoding!=null&&(r=e.encoding));try{let a=bs.parse(KJ.readFileSync(t,{encoding:r})),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),bs.populate(n,a,e),{parsed:a}}catch(a){return o&&jT(`Failed to load ${t} ${a.message}`),{error:a}}}function cqe(e){let t=VJ(e);return JJ(e).length===0?bs.configDotenv(e):KJ.existsSync(t)?bs._configVault(e):(iqe(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),bs.configDotenv(e))}function uqe(e,t){let r=Buffer.from(t.slice(-64),"hex"),o=Buffer.from(e,"base64"),a=o.slice(0,12),n=o.slice(-16);o=o.slice(12,-16);try{let u=Zje.createDecipheriv("aes-256-gcm",r,a);return u.setAuthTag(n),`${u.update(o)}${u.final()}`}catch(u){let A=u instanceof RangeError,p=u.message==="Invalid key length",h=u.message==="Unsupported state or unable to authenticate data";if(A||p){let w="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(w)}else if(h){let w="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(w)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function Aqe(e,t,r={}){let o=Boolean(r&&r.debug),a=Boolean(r&&r.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(a===!0&&(e[n]=t[n]),o&&jT(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}var bs={configDotenv:lqe,_configVault:aqe,_parseVault:rqe,config:cqe,decrypt:uqe,parse:tqe,populate:Aqe};wf.exports.configDotenv=bs.configDotenv;wf.exports._configVault=bs._configVault;wf.exports._parseVault=bs._parseVault;wf.exports.config=bs.config;wf.exports.decrypt=bs.decrypt;wf.exports.parse=bs.parse;wf.exports.populate=bs.populate;wf.exports=bs});var ZJ=_((aQt,XJ)=>{"use strict";XJ.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var nd=_((lQt,YT)=>{"use strict";var fqe=ZJ(),$J=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,o=()=>{r--,t.length>0&&t.shift()()},a=(A,p,...h)=>{r++;let w=fqe(A,...h);p(w),w.then(o,o)},n=(A,p,...h)=>{r<e?a(A,p,...h):t.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>n(A,h,...p));return Object.defineProperties(u,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length}}),u};YT.exports=$J;YT.exports.default=$J});function Ju(e){return`YN${e.toString(10).padStart(4,"0")}`}function uS(e){let t=Number(e.slice(2));if(typeof wr[t]>"u")throw new Error(`Unknown message name: "${e}"`);return t}var wr,AS=yt(()=>{wr=(ve=>(ve[ve.UNNAMED=0]="UNNAMED",ve[ve.EXCEPTION=1]="EXCEPTION",ve[ve.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",ve[ve.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",ve[ve.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",ve[ve.BUILD_DISABLED=5]="BUILD_DISABLED",ve[ve.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",ve[ve.MUST_BUILD=7]="MUST_BUILD",ve[ve.MUST_REBUILD=8]="MUST_REBUILD",ve[ve.BUILD_FAILED=9]="BUILD_FAILED",ve[ve.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",ve[ve.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",ve[ve.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",ve[ve.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",ve[ve.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",ve[ve.REMOTE_INVALID=15]="REMOTE_INVALID",ve[ve.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",ve[ve.RESOLUTION_PACK=17]="RESOLUTION_PACK",ve[ve.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",ve[ve.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",ve[ve.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",ve[ve.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",ve[ve.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",ve[ve.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",ve[ve.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",ve[ve.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",ve[ve.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",ve[ve.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",ve[ve.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",ve[ve.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",ve[ve.FETCH_FAILED=30]="FETCH_FAILED",ve[ve.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",ve[ve.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",ve[ve.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",ve[ve.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",ve[ve.NETWORK_ERROR=35]="NETWORK_ERROR",ve[ve.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",ve[ve.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",ve[ve.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",ve[ve.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",ve[ve.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",ve[ve.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",ve[ve.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",ve[ve.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",ve[ve.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",ve[ve.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",ve[ve.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",ve[ve.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",ve[ve.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",ve[ve.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",ve[ve.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",ve[ve.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",ve[ve.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",ve[ve.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",ve[ve.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",ve[ve.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",ve[ve.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",ve[ve.INVALID_MANIFEST=57]="INVALID_MANIFEST",ve[ve.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",ve[ve.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",ve[ve.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",ve[ve.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",ve[ve.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",ve[ve.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",ve[ve.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",ve[ve.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",ve[ve.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",ve[ve.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",ve[ve.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",ve[ve.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION",ve[ve.AUTO_NM_SUCCESS=70]="AUTO_NM_SUCCESS",ve[ve.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]="NM_CANT_INSTALL_EXTERNAL_SOFT_LINK",ve[ve.NM_PRESERVE_SYMLINKS_REQUIRED=72]="NM_PRESERVE_SYMLINKS_REQUIRED",ve[ve.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]="UPDATE_LOCKFILE_ONLY_SKIP_LINK",ve[ve.NM_HARDLINKS_MODE_DOWNGRADED=74]="NM_HARDLINKS_MODE_DOWNGRADED",ve[ve.PROLOG_INSTANTIATION_ERROR=75]="PROLOG_INSTANTIATION_ERROR",ve[ve.INCOMPATIBLE_ARCHITECTURE=76]="INCOMPATIBLE_ARCHITECTURE",ve[ve.GHOST_ARCHITECTURE=77]="GHOST_ARCHITECTURE",ve[ve.RESOLUTION_MISMATCH=78]="RESOLUTION_MISMATCH",ve[ve.PROLOG_LIMIT_EXCEEDED=79]="PROLOG_LIMIT_EXCEEDED",ve[ve.NETWORK_DISABLED=80]="NETWORK_DISABLED",ve[ve.NETWORK_UNSAFE_HTTP=81]="NETWORK_UNSAFE_HTTP",ve[ve.RESOLUTION_FAILED=82]="RESOLUTION_FAILED",ve[ve.AUTOMERGE_GIT_ERROR=83]="AUTOMERGE_GIT_ERROR",ve[ve.CONSTRAINTS_CHECK_FAILED=84]="CONSTRAINTS_CHECK_FAILED",ve[ve.UPDATED_RESOLUTION_RECORD=85]="UPDATED_RESOLUTION_RECORD",ve[ve.EXPLAIN_PEER_DEPENDENCIES_CTA=86]="EXPLAIN_PEER_DEPENDENCIES_CTA",ve[ve.MIGRATION_SUCCESS=87]="MIGRATION_SUCCESS",ve[ve.VERSION_NOTICE=88]="VERSION_NOTICE",ve[ve.TIPS_NOTICE=89]="TIPS_NOTICE",ve))(wr||{})});var fI=_((uQt,eV)=>{var pqe="2.0.0",hqe=Number.MAX_SAFE_INTEGER||9007199254740991,gqe=16,dqe=256-6,mqe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];eV.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:gqe,MAX_SAFE_BUILD_LENGTH:dqe,MAX_SAFE_INTEGER:hqe,RELEASE_TYPES:mqe,SEMVER_SPEC_VERSION:pqe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var pI=_((AQt,tV)=>{var yqe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};tV.exports=yqe});var By=_((Cf,rV)=>{var{MAX_SAFE_COMPONENT_LENGTH:WT,MAX_SAFE_BUILD_LENGTH:Eqe,MAX_LENGTH:wqe}=fI(),Cqe=pI();Cf=rV.exports={};var Iqe=Cf.re=[],Bqe=Cf.safeRe=[],ar=Cf.src=[],lr=Cf.t={},vqe=0,KT="[a-zA-Z0-9-]",Dqe=[["\\s",1],["\\d",wqe],[KT,Eqe]],Sqe=e=>{for(let[t,r]of Dqe)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},Jr=(e,t,r)=>{let o=Sqe(t),a=vqe++;Cqe(e,a,t),lr[e]=a,ar[a]=t,Iqe[a]=new RegExp(t,r?"g":void 0),Bqe[a]=new RegExp(o,r?"g":void 0)};Jr("NUMERICIDENTIFIER","0|[1-9]\\d*");Jr("NUMERICIDENTIFIERLOOSE","\\d+");Jr("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${KT}*`);Jr("MAINVERSION",`(${ar[lr.NUMERICIDENTIFIER]})\\.(${ar[lr.NUMERICIDENTIFIER]})\\.(${ar[lr.NUMERICIDENTIFIER]})`);Jr("MAINVERSIONLOOSE",`(${ar[lr.NUMERICIDENTIFIERLOOSE]})\\.(${ar[lr.NUMERICIDENTIFIERLOOSE]})\\.(${ar[lr.NUMERICIDENTIFIERLOOSE]})`);Jr("PRERELEASEIDENTIFIER",`(?:${ar[lr.NUMERICIDENTIFIER]}|${ar[lr.NONNUMERICIDENTIFIER]})`);Jr("PRERELEASEIDENTIFIERLOOSE",`(?:${ar[lr.NUMERICIDENTIFIERLOOSE]}|${ar[lr.NONNUMERICIDENTIFIER]})`);Jr("PRERELEASE",`(?:-(${ar[lr.PRERELEASEIDENTIFIER]}(?:\\.${ar[lr.PRERELEASEIDENTIFIER]})*))`);Jr("PRERELEASELOOSE",`(?:-?(${ar[lr.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ar[lr.PRERELEASEIDENTIFIERLOOSE]})*))`);Jr("BUILDIDENTIFIER",`${KT}+`);Jr("BUILD",`(?:\\+(${ar[lr.BUILDIDENTIFIER]}(?:\\.${ar[lr.BUILDIDENTIFIER]})*))`);Jr("FULLPLAIN",`v?${ar[lr.MAINVERSION]}${ar[lr.PRERELEASE]}?${ar[lr.BUILD]}?`);Jr("FULL",`^${ar[lr.FULLPLAIN]}$`);Jr("LOOSEPLAIN",`[v=\\s]*${ar[lr.MAINVERSIONLOOSE]}${ar[lr.PRERELEASELOOSE]}?${ar[lr.BUILD]}?`);Jr("LOOSE",`^${ar[lr.LOOSEPLAIN]}$`);Jr("GTLT","((?:<|>)?=?)");Jr("XRANGEIDENTIFIERLOOSE",`${ar[lr.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Jr("XRANGEIDENTIFIER",`${ar[lr.NUMERICIDENTIFIER]}|x|X|\\*`);Jr("XRANGEPLAIN",`[v=\\s]*(${ar[lr.XRANGEIDENTIFIER]})(?:\\.(${ar[lr.XRANGEIDENTIFIER]})(?:\\.(${ar[lr.XRANGEIDENTIFIER]})(?:${ar[lr.PRERELEASE]})?${ar[lr.BUILD]}?)?)?`);Jr("XRANGEPLAINLOOSE",`[v=\\s]*(${ar[lr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ar[lr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ar[lr.XRANGEIDENTIFIERLOOSE]})(?:${ar[lr.PRERELEASELOOSE]})?${ar[lr.BUILD]}?)?)?`);Jr("XRANGE",`^${ar[lr.GTLT]}\\s*${ar[lr.XRANGEPLAIN]}$`);Jr("XRANGELOOSE",`^${ar[lr.GTLT]}\\s*${ar[lr.XRANGEPLAINLOOSE]}$`);Jr("COERCE",`(^|[^\\d])(\\d{1,${WT}})(?:\\.(\\d{1,${WT}}))?(?:\\.(\\d{1,${WT}}))?(?:$|[^\\d])`);Jr("COERCERTL",ar[lr.COERCE],!0);Jr("LONETILDE","(?:~>?)");Jr("TILDETRIM",`(\\s*)${ar[lr.LONETILDE]}\\s+`,!0);Cf.tildeTrimReplace="$1~";Jr("TILDE",`^${ar[lr.LONETILDE]}${ar[lr.XRANGEPLAIN]}$`);Jr("TILDELOOSE",`^${ar[lr.LONETILDE]}${ar[lr.XRANGEPLAINLOOSE]}$`);Jr("LONECARET","(?:\\^)");Jr("CARETTRIM",`(\\s*)${ar[lr.LONECARET]}\\s+`,!0);Cf.caretTrimReplace="$1^";Jr("CARET",`^${ar[lr.LONECARET]}${ar[lr.XRANGEPLAIN]}$`);Jr("CARETLOOSE",`^${ar[lr.LONECARET]}${ar[lr.XRANGEPLAINLOOSE]}$`);Jr("COMPARATORLOOSE",`^${ar[lr.GTLT]}\\s*(${ar[lr.LOOSEPLAIN]})$|^$`);Jr("COMPARATOR",`^${ar[lr.GTLT]}\\s*(${ar[lr.FULLPLAIN]})$|^$`);Jr("COMPARATORTRIM",`(\\s*)${ar[lr.GTLT]}\\s*(${ar[lr.LOOSEPLAIN]}|${ar[lr.XRANGEPLAIN]})`,!0);Cf.comparatorTrimReplace="$1$2$3";Jr("HYPHENRANGE",`^\\s*(${ar[lr.XRANGEPLAIN]})\\s+-\\s+(${ar[lr.XRANGEPLAIN]})\\s*$`);Jr("HYPHENRANGELOOSE",`^\\s*(${ar[lr.XRANGEPLAINLOOSE]})\\s+-\\s+(${ar[lr.XRANGEPLAINLOOSE]})\\s*$`);Jr("STAR","(<|>)?=?\\s*\\*");Jr("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Jr("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var fS=_((fQt,nV)=>{var Pqe=Object.freeze({loose:!0}),xqe=Object.freeze({}),bqe=e=>e?typeof e!="object"?Pqe:e:xqe;nV.exports=bqe});var JT=_((pQt,oV)=>{var iV=/^[0-9]+$/,sV=(e,t)=>{let r=iV.test(e),o=iV.test(t);return r&&o&&(e=+e,t=+t),e===t?0:r&&!o?-1:o&&!r?1:e<t?-1:1},Qqe=(e,t)=>sV(t,e);oV.exports={compareIdentifiers:sV,rcompareIdentifiers:Qqe}});var So=_((hQt,uV)=>{var pS=pI(),{MAX_LENGTH:aV,MAX_SAFE_INTEGER:hS}=fI(),{safeRe:lV,t:cV}=By(),kqe=fS(),{compareIdentifiers:vy}=JT(),tl=class{constructor(t,r){if(r=kqe(r),t instanceof tl){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>aV)throw new TypeError(`version is longer than ${aV} characters`);pS("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let o=t.trim().match(r.loose?lV[cV.LOOSE]:lV[cV.FULL]);if(!o)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>hS||this.major<0)throw new TypeError("Invalid major version");if(this.minor>hS||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>hS||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n<hS)return n}return a}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(pS("SemVer.compare",this.version,this.options,t),!(t instanceof tl)){if(typeof t=="string"&&t===this.version)return 0;t=new tl(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof tl||(t=new tl(t,this.options)),vy(this.major,t.major)||vy(this.minor,t.minor)||vy(this.patch,t.patch)}comparePre(t){if(t instanceof tl||(t=new tl(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let o=this.prerelease[r],a=t.prerelease[r];if(pS("prerelease compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return vy(o,a)}while(++r)}compareBuild(t){t instanceof tl||(t=new tl(t,this.options));let r=0;do{let o=this.build[r],a=t.build[r];if(pS("prerelease compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return vy(o,a)}while(++r)}inc(t,r,o){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,o),this.inc("pre",r,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,o),this.inc("pre",r,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(o)?1:0;if(!r&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(r){let n=[r,a];o===!1&&(n=[r]),vy(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};uV.exports=tl});var id=_((gQt,fV)=>{var AV=So(),Fqe=(e,t,r=!1)=>{if(e instanceof AV)return e;try{return new AV(e,t)}catch(o){if(!r)return null;throw o}};fV.exports=Fqe});var hV=_((dQt,pV)=>{var Rqe=id(),Tqe=(e,t)=>{let r=Rqe(e,t);return r?r.version:null};pV.exports=Tqe});var dV=_((mQt,gV)=>{var Nqe=id(),Lqe=(e,t)=>{let r=Nqe(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};gV.exports=Lqe});var EV=_((yQt,yV)=>{var mV=So(),Oqe=(e,t,r,o,a)=>{typeof r=="string"&&(a=o,o=r,r=void 0);try{return new mV(e instanceof mV?e.version:e,r).inc(t,o,a).version}catch{return null}};yV.exports=Oqe});var IV=_((EQt,CV)=>{var wV=id(),Mqe=(e,t)=>{let r=wV(e,null,!0),o=wV(t,null,!0),a=r.compare(o);if(a===0)return null;let n=a>0,u=n?r:o,A=n?o:r,p=!!u.prerelease.length;if(!!A.prerelease.length&&!p)return!A.patch&&!A.minor?"major":u.patch?"patch":u.minor?"minor":"major";let w=p?"pre":"";return r.major!==o.major?w+"major":r.minor!==o.minor?w+"minor":r.patch!==o.patch?w+"patch":"prerelease"};CV.exports=Mqe});var vV=_((wQt,BV)=>{var Uqe=So(),_qe=(e,t)=>new Uqe(e,t).major;BV.exports=_qe});var SV=_((CQt,DV)=>{var Hqe=So(),jqe=(e,t)=>new Hqe(e,t).minor;DV.exports=jqe});var xV=_((IQt,PV)=>{var qqe=So(),Gqe=(e,t)=>new qqe(e,t).patch;PV.exports=Gqe});var QV=_((BQt,bV)=>{var Yqe=id(),Wqe=(e,t)=>{let r=Yqe(e,t);return r&&r.prerelease.length?r.prerelease:null};bV.exports=Wqe});var Ll=_((vQt,FV)=>{var kV=So(),Kqe=(e,t,r)=>new kV(e,r).compare(new kV(t,r));FV.exports=Kqe});var TV=_((DQt,RV)=>{var Jqe=Ll(),Vqe=(e,t,r)=>Jqe(t,e,r);RV.exports=Vqe});var LV=_((SQt,NV)=>{var zqe=Ll(),Xqe=(e,t)=>zqe(e,t,!0);NV.exports=Xqe});var gS=_((PQt,MV)=>{var OV=So(),Zqe=(e,t,r)=>{let o=new OV(e,r),a=new OV(t,r);return o.compare(a)||o.compareBuild(a)};MV.exports=Zqe});var _V=_((xQt,UV)=>{var $qe=gS(),eGe=(e,t)=>e.sort((r,o)=>$qe(r,o,t));UV.exports=eGe});var jV=_((bQt,HV)=>{var tGe=gS(),rGe=(e,t)=>e.sort((r,o)=>tGe(o,r,t));HV.exports=rGe});var hI=_((QQt,qV)=>{var nGe=Ll(),iGe=(e,t,r)=>nGe(e,t,r)>0;qV.exports=iGe});var dS=_((kQt,GV)=>{var sGe=Ll(),oGe=(e,t,r)=>sGe(e,t,r)<0;GV.exports=oGe});var VT=_((FQt,YV)=>{var aGe=Ll(),lGe=(e,t,r)=>aGe(e,t,r)===0;YV.exports=lGe});var zT=_((RQt,WV)=>{var cGe=Ll(),uGe=(e,t,r)=>cGe(e,t,r)!==0;WV.exports=uGe});var mS=_((TQt,KV)=>{var AGe=Ll(),fGe=(e,t,r)=>AGe(e,t,r)>=0;KV.exports=fGe});var yS=_((NQt,JV)=>{var pGe=Ll(),hGe=(e,t,r)=>pGe(e,t,r)<=0;JV.exports=hGe});var XT=_((LQt,VV)=>{var gGe=VT(),dGe=zT(),mGe=hI(),yGe=mS(),EGe=dS(),wGe=yS(),CGe=(e,t,r,o)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return gGe(e,r,o);case"!=":return dGe(e,r,o);case">":return mGe(e,r,o);case">=":return yGe(e,r,o);case"<":return EGe(e,r,o);case"<=":return wGe(e,r,o);default:throw new TypeError(`Invalid operator: ${t}`)}};VV.exports=CGe});var XV=_((OQt,zV)=>{var IGe=So(),BGe=id(),{safeRe:ES,t:wS}=By(),vGe=(e,t)=>{if(e instanceof IGe)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(ES[wS.COERCE]);else{let o;for(;(o=ES[wS.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||o.index+o[0].length!==r.index+r[0].length)&&(r=o),ES[wS.COERCERTL].lastIndex=o.index+o[1].length+o[2].length;ES[wS.COERCERTL].lastIndex=-1}return r===null?null:BGe(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};zV.exports=vGe});var $V=_((MQt,ZV)=>{"use strict";ZV.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}});var CS=_((UQt,ez)=>{"use strict";ez.exports=En;En.Node=sd;En.create=En;function En(e){var t=this;if(t instanceof En||(t=new En),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(a){t.push(a)});else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}En.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t};En.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};En.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};En.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)SGe(this,arguments[e]);return this.length};En.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)PGe(this,arguments[e]);return this.length};En.prototype.pop=function(){if(!!this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};En.prototype.shift=function(){if(!!this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};En.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,o=0;r!==null;o++)e.call(t,r.value,o,this),r=r.next};En.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,o=this.length-1;r!==null;o--)e.call(t,r.value,o,this),r=r.prev};En.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++)r=r.next;if(t===e&&r!==null)return r.value};En.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++)r=r.prev;if(t===e&&r!==null)return r.value};En.prototype.map=function(e,t){t=t||this;for(var r=new En,o=this.head;o!==null;)r.push(e.call(t,o.value,this)),o=o.next;return r};En.prototype.mapReverse=function(e,t){t=t||this;for(var r=new En,o=this.tail;o!==null;)r.push(e.call(t,o.value,this)),o=o.prev;return r};En.prototype.reduce=function(e,t){var r,o=this.head;if(arguments.length>1)r=t;else if(this.head)o=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;o!==null;a++)r=e(r,o.value,a),o=o.next;return r};En.prototype.reduceReverse=function(e,t){var r,o=this.tail;if(arguments.length>1)r=t;else if(this.tail)o=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;o!==null;a--)r=e(r,o.value,a),o=o.prev;return r};En.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};En.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};En.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new En;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,a=this.head;a!==null&&o<e;o++)a=a.next;for(;a!==null&&o<t;o++,a=a.next)r.push(a.value);return r};En.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new En;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,a=this.tail;a!==null&&o>t;o--)a=a.prev;for(;a!==null&&o>e;o--,a=a.prev)r.push(a.value);return r};En.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var o=0,a=this.head;a!==null&&o<e;o++)a=a.next;for(var n=[],o=0;a&&o<t;o++)n.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var o=0;o<r.length;o++)a=DGe(this,a,r[o]);return n};En.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;r!==null;r=r.prev){var o=r.prev;r.prev=r.next,r.next=o}return this.head=t,this.tail=e,this};function DGe(e,t,r){var o=t===e.head?new sd(r,null,t,e):new sd(r,t,t.next,e);return o.next===null&&(e.tail=o),o.prev===null&&(e.head=o),e.length++,o}function SGe(e,t){e.tail=new sd(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function PGe(e,t){e.head=new sd(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function sd(e,t,r,o){if(!(this instanceof sd))return new sd(e,t,r,o);this.list=o,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{$V()(En)}catch{}});var sz=_((_Qt,iz)=>{"use strict";var xGe=CS(),od=Symbol("max"),Bf=Symbol("length"),Dy=Symbol("lengthCalculator"),dI=Symbol("allowStale"),ad=Symbol("maxAge"),If=Symbol("dispose"),tz=Symbol("noDisposeOnSet"),Qs=Symbol("lruList"),Mc=Symbol("cache"),nz=Symbol("updateAgeOnGet"),ZT=()=>1,eN=class{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");let r=this[od]=t.max||1/0,o=t.length||ZT;if(this[Dy]=typeof o!="function"?ZT:o,this[dI]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[ad]=t.maxAge||0,this[If]=t.dispose,this[tz]=t.noDisposeOnSet||!1,this[nz]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[od]=t||1/0,gI(this)}get max(){return this[od]}set allowStale(t){this[dI]=!!t}get allowStale(){return this[dI]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[ad]=t,gI(this)}get maxAge(){return this[ad]}set lengthCalculator(t){typeof t!="function"&&(t=ZT),t!==this[Dy]&&(this[Dy]=t,this[Bf]=0,this[Qs].forEach(r=>{r.length=this[Dy](r.value,r.key),this[Bf]+=r.length})),gI(this)}get lengthCalculator(){return this[Dy]}get length(){return this[Bf]}get itemCount(){return this[Qs].length}rforEach(t,r){r=r||this;for(let o=this[Qs].tail;o!==null;){let a=o.prev;rz(this,t,o,r),o=a}}forEach(t,r){r=r||this;for(let o=this[Qs].head;o!==null;){let a=o.next;rz(this,t,o,r),o=a}}keys(){return this[Qs].toArray().map(t=>t.key)}values(){return this[Qs].toArray().map(t=>t.value)}reset(){this[If]&&this[Qs]&&this[Qs].length&&this[Qs].forEach(t=>this[If](t.key,t.value)),this[Mc]=new Map,this[Qs]=new xGe,this[Bf]=0}dump(){return this[Qs].map(t=>IS(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[Qs]}set(t,r,o){if(o=o||this[ad],o&&typeof o!="number")throw new TypeError("maxAge must be a number");let a=o?Date.now():0,n=this[Dy](r,t);if(this[Mc].has(t)){if(n>this[od])return Sy(this,this[Mc].get(t)),!1;let p=this[Mc].get(t).value;return this[If]&&(this[tz]||this[If](t,p.value)),p.now=a,p.maxAge=o,p.value=r,this[Bf]+=n-p.length,p.length=n,this.get(t),gI(this),!0}let u=new tN(t,r,n,a,o);return u.length>this[od]?(this[If]&&this[If](t,r),!1):(this[Bf]+=u.length,this[Qs].unshift(u),this[Mc].set(t,this[Qs].head),gI(this),!0)}has(t){if(!this[Mc].has(t))return!1;let r=this[Mc].get(t).value;return!IS(this,r)}get(t){return $T(this,t,!0)}peek(t){return $T(this,t,!1)}pop(){let t=this[Qs].tail;return t?(Sy(this,t),t.value):null}del(t){Sy(this,this[Mc].get(t))}load(t){this.reset();let r=Date.now();for(let o=t.length-1;o>=0;o--){let a=t[o],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let u=n-r;u>0&&this.set(a.k,a.v,u)}}}prune(){this[Mc].forEach((t,r)=>$T(this,r,!1))}},$T=(e,t,r)=>{let o=e[Mc].get(t);if(o){let a=o.value;if(IS(e,a)){if(Sy(e,o),!e[dI])return}else r&&(e[nz]&&(o.value.now=Date.now()),e[Qs].unshiftNode(o));return a.value}},IS=(e,t)=>{if(!t||!t.maxAge&&!e[ad])return!1;let r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[ad]&&r>e[ad]},gI=e=>{if(e[Bf]>e[od])for(let t=e[Qs].tail;e[Bf]>e[od]&&t!==null;){let r=t.prev;Sy(e,t),t=r}},Sy=(e,t)=>{if(t){let r=t.value;e[If]&&e[If](r.key,r.value),e[Bf]-=r.length,e[Mc].delete(r.key),e[Qs].removeNode(t)}},tN=class{constructor(t,r,o,a,n){this.key=t,this.value=r,this.length=o,this.now=a,this.maxAge=n||0}},rz=(e,t,r,o)=>{let a=r.value;IS(e,a)&&(Sy(e,r),e[dI]||(a=void 0)),a&&t.call(o,a.value,a.key,e)};iz.exports=eN});var Ol=_((HQt,cz)=>{var ld=class{constructor(t,r){if(r=QGe(r),t instanceof ld)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new ld(t.raw,r);if(t instanceof rN)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(a=>!az(a[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&OGe(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let o=((this.options.includePrerelease&&NGe)|(this.options.loose&&LGe))+":"+t,a=oz.get(o);if(a)return a;let n=this.options.loose,u=n?Da[zo.HYPHENRANGELOOSE]:Da[zo.HYPHENRANGE];t=t.replace(u,KGe(this.options.includePrerelease)),li("hyphen replace",t),t=t.replace(Da[zo.COMPARATORTRIM],FGe),li("comparator trim",t),t=t.replace(Da[zo.TILDETRIM],RGe),li("tilde trim",t),t=t.replace(Da[zo.CARETTRIM],TGe),li("caret trim",t);let A=t.split(" ").map(I=>MGe(I,this.options)).join(" ").split(/\s+/).map(I=>WGe(I,this.options));n&&(A=A.filter(I=>(li("loose invalid filter",I,this.options),!!I.match(Da[zo.COMPARATORLOOSE])))),li("range list",A);let p=new Map,h=A.map(I=>new rN(I,this.options));for(let I of h){if(az(I))return[I];p.set(I.value,I)}p.size>1&&p.has("")&&p.delete("");let w=[...p.values()];return oz.set(o,w),w}intersects(t,r){if(!(t instanceof ld))throw new TypeError("a Range is required");return this.set.some(o=>lz(o,r)&&t.set.some(a=>lz(a,r)&&o.every(n=>a.every(u=>n.intersects(u,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new kGe(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(JGe(this.set[r],t,this.options))return!0;return!1}};cz.exports=ld;var bGe=sz(),oz=new bGe({max:1e3}),QGe=fS(),rN=mI(),li=pI(),kGe=So(),{safeRe:Da,t:zo,comparatorTrimReplace:FGe,tildeTrimReplace:RGe,caretTrimReplace:TGe}=By(),{FLAG_INCLUDE_PRERELEASE:NGe,FLAG_LOOSE:LGe}=fI(),az=e=>e.value==="<0.0.0-0",OGe=e=>e.value==="",lz=(e,t)=>{let r=!0,o=e.slice(),a=o.pop();for(;r&&o.length;)r=o.every(n=>a.intersects(n,t)),a=o.pop();return r},MGe=(e,t)=>(li("comp",e,t),e=HGe(e,t),li("caret",e),e=UGe(e,t),li("tildes",e),e=qGe(e,t),li("xrange",e),e=YGe(e,t),li("stars",e),e),Xo=e=>!e||e.toLowerCase()==="x"||e==="*",UGe=(e,t)=>e.trim().split(/\s+/).map(r=>_Ge(r,t)).join(" "),_Ge=(e,t)=>{let r=t.loose?Da[zo.TILDELOOSE]:Da[zo.TILDE];return e.replace(r,(o,a,n,u,A)=>{li("tilde",e,o,a,n,u,A);let p;return Xo(a)?p="":Xo(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:Xo(u)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:A?(li("replaceTilde pr",A),p=`>=${a}.${n}.${u}-${A} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${u} <${a}.${+n+1}.0-0`,li("tilde return",p),p})},HGe=(e,t)=>e.trim().split(/\s+/).map(r=>jGe(r,t)).join(" "),jGe=(e,t)=>{li("caret",e,t);let r=t.loose?Da[zo.CARETLOOSE]:Da[zo.CARET],o=t.includePrerelease?"-0":"";return e.replace(r,(a,n,u,A,p)=>{li("caret",e,a,n,u,A,p);let h;return Xo(n)?h="":Xo(u)?h=`>=${n}.0.0${o} <${+n+1}.0.0-0`:Xo(A)?n==="0"?h=`>=${n}.${u}.0${o} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.0${o} <${+n+1}.0.0-0`:p?(li("replaceCaret pr",p),n==="0"?u==="0"?h=`>=${n}.${u}.${A}-${p} <${n}.${u}.${+A+1}-0`:h=`>=${n}.${u}.${A}-${p} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.${A}-${p} <${+n+1}.0.0-0`):(li("no pr"),n==="0"?u==="0"?h=`>=${n}.${u}.${A}${o} <${n}.${u}.${+A+1}-0`:h=`>=${n}.${u}.${A}${o} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.${A} <${+n+1}.0.0-0`),li("caret return",h),h})},qGe=(e,t)=>(li("replaceXRanges",e,t),e.split(/\s+/).map(r=>GGe(r,t)).join(" ")),GGe=(e,t)=>{e=e.trim();let r=t.loose?Da[zo.XRANGELOOSE]:Da[zo.XRANGE];return e.replace(r,(o,a,n,u,A,p)=>{li("xRange",e,o,a,n,u,A,p);let h=Xo(n),w=h||Xo(u),I=w||Xo(A),v=I;return a==="="&&v&&(a=""),p=t.includePrerelease?"-0":"",h?a===">"||a==="<"?o="<0.0.0-0":o="*":a&&v?(w&&(u=0),A=0,a===">"?(a=">=",w?(n=+n+1,u=0,A=0):(u=+u+1,A=0)):a==="<="&&(a="<",w?n=+n+1:u=+u+1),a==="<"&&(p="-0"),o=`${a+n}.${u}.${A}${p}`):w?o=`>=${n}.0.0${p} <${+n+1}.0.0-0`:I&&(o=`>=${n}.${u}.0${p} <${n}.${+u+1}.0-0`),li("xRange return",o),o})},YGe=(e,t)=>(li("replaceStars",e,t),e.trim().replace(Da[zo.STAR],"")),WGe=(e,t)=>(li("replaceGTE0",e,t),e.trim().replace(Da[t.includePrerelease?zo.GTE0PRE:zo.GTE0],"")),KGe=e=>(t,r,o,a,n,u,A,p,h,w,I,v,b)=>(Xo(o)?r="":Xo(a)?r=`>=${o}.0.0${e?"-0":""}`:Xo(n)?r=`>=${o}.${a}.0${e?"-0":""}`:u?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,Xo(h)?p="":Xo(w)?p=`<${+h+1}.0.0-0`:Xo(I)?p=`<${h}.${+w+1}.0-0`:v?p=`<=${h}.${w}.${I}-${v}`:e?p=`<${h}.${w}.${+I+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),JGe=(e,t,r)=>{for(let o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let o=0;o<e.length;o++)if(li(e[o].semver),e[o].semver!==rN.ANY&&e[o].semver.prerelease.length>0){let a=e[o].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}});var mI=_((jQt,gz)=>{var yI=Symbol("SemVer ANY"),Py=class{static get ANY(){return yI}constructor(t,r){if(r=uz(r),t instanceof Py){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),iN("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===yI?this.value="":this.value=this.operator+this.semver.version,iN("comp",this)}parse(t){let r=this.options.loose?Az[fz.COMPARATORLOOSE]:Az[fz.COMPARATOR],o=t.match(r);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new pz(o[2],this.options.loose):this.semver=yI}toString(){return this.value}test(t){if(iN("Comparator.test",t,this.options.loose),this.semver===yI||t===yI)return!0;if(typeof t=="string")try{t=new pz(t,this.options)}catch{return!1}return nN(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Py))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new hz(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new hz(this.value,r).test(t.semver):(r=uz(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||nN(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||nN(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};gz.exports=Py;var uz=fS(),{safeRe:Az,t:fz}=By(),nN=XT(),iN=pI(),pz=So(),hz=Ol()});var EI=_((qQt,dz)=>{var VGe=Ol(),zGe=(e,t,r)=>{try{t=new VGe(t,r)}catch{return!1}return t.test(e)};dz.exports=zGe});var yz=_((GQt,mz)=>{var XGe=Ol(),ZGe=(e,t)=>new XGe(e,t).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));mz.exports=ZGe});var wz=_((YQt,Ez)=>{var $Ge=So(),e9e=Ol(),t9e=(e,t,r)=>{let o=null,a=null,n=null;try{n=new e9e(t,r)}catch{return null}return e.forEach(u=>{n.test(u)&&(!o||a.compare(u)===-1)&&(o=u,a=new $Ge(o,r))}),o};Ez.exports=t9e});var Iz=_((WQt,Cz)=>{var r9e=So(),n9e=Ol(),i9e=(e,t,r)=>{let o=null,a=null,n=null;try{n=new n9e(t,r)}catch{return null}return e.forEach(u=>{n.test(u)&&(!o||a.compare(u)===1)&&(o=u,a=new r9e(o,r))}),o};Cz.exports=i9e});var Dz=_((KQt,vz)=>{var sN=So(),s9e=Ol(),Bz=hI(),o9e=(e,t)=>{e=new s9e(e,t);let r=new sN("0.0.0");if(e.test(r)||(r=new sN("0.0.0-0"),e.test(r)))return r;r=null;for(let o=0;o<e.set.length;++o){let a=e.set[o],n=null;a.forEach(u=>{let A=new sN(u.semver.version);switch(u.operator){case">":A.prerelease.length===0?A.patch++:A.prerelease.push(0),A.raw=A.format();case"":case">=":(!n||Bz(A,n))&&(n=A);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),n&&(!r||Bz(r,n))&&(r=n)}return r&&e.test(r)?r:null};vz.exports=o9e});var Pz=_((JQt,Sz)=>{var a9e=Ol(),l9e=(e,t)=>{try{return new a9e(e,t).range||"*"}catch{return null}};Sz.exports=l9e});var BS=_((VQt,kz)=>{var c9e=So(),Qz=mI(),{ANY:u9e}=Qz,A9e=Ol(),f9e=EI(),xz=hI(),bz=dS(),p9e=yS(),h9e=mS(),g9e=(e,t,r,o)=>{e=new c9e(e,o),t=new A9e(t,o);let a,n,u,A,p;switch(r){case">":a=xz,n=p9e,u=bz,A=">",p=">=";break;case"<":a=bz,n=h9e,u=xz,A="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(f9e(e,t,o))return!1;for(let h=0;h<t.set.length;++h){let w=t.set[h],I=null,v=null;if(w.forEach(b=>{b.semver===u9e&&(b=new Qz(">=0.0.0")),I=I||b,v=v||b,a(b.semver,I.semver,o)?I=b:u(b.semver,v.semver,o)&&(v=b)}),I.operator===A||I.operator===p||(!v.operator||v.operator===A)&&n(e,v.semver))return!1;if(v.operator===p&&u(e,v.semver))return!1}return!0};kz.exports=g9e});var Rz=_((zQt,Fz)=>{var d9e=BS(),m9e=(e,t,r)=>d9e(e,t,">",r);Fz.exports=m9e});var Nz=_((XQt,Tz)=>{var y9e=BS(),E9e=(e,t,r)=>y9e(e,t,"<",r);Tz.exports=E9e});var Mz=_((ZQt,Oz)=>{var Lz=Ol(),w9e=(e,t,r)=>(e=new Lz(e,r),t=new Lz(t,r),e.intersects(t,r));Oz.exports=w9e});var _z=_(($Qt,Uz)=>{var C9e=EI(),I9e=Ll();Uz.exports=(e,t,r)=>{let o=[],a=null,n=null,u=e.sort((w,I)=>I9e(w,I,r));for(let w of u)C9e(w,t,r)?(n=w,a||(a=w)):(n&&o.push([a,n]),n=null,a=null);a&&o.push([a,null]);let A=[];for(let[w,I]of o)w===I?A.push(w):!I&&w===u[0]?A.push("*"):I?w===u[0]?A.push(`<=${I}`):A.push(`${w} - ${I}`):A.push(`>=${w}`);let p=A.join(" || "),h=typeof t.raw=="string"?t.raw:String(t);return p.length<h.length?p:t}});var Wz=_((ekt,Yz)=>{var Hz=Ol(),aN=mI(),{ANY:oN}=aN,wI=EI(),lN=Ll(),B9e=(e,t,r={})=>{if(e===t)return!0;e=new Hz(e,r),t=new Hz(t,r);let o=!1;e:for(let a of e.set){for(let n of t.set){let u=D9e(a,n,r);if(o=o||u!==null,u)continue e}if(o)return!1}return!0},v9e=[new aN(">=0.0.0-0")],jz=[new aN(">=0.0.0")],D9e=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===oN){if(t.length===1&&t[0].semver===oN)return!0;r.includePrerelease?e=v9e:e=jz}if(t.length===1&&t[0].semver===oN){if(r.includePrerelease)return!0;t=jz}let o=new Set,a,n;for(let b of e)b.operator===">"||b.operator===">="?a=qz(a,b,r):b.operator==="<"||b.operator==="<="?n=Gz(n,b,r):o.add(b.semver);if(o.size>1)return null;let u;if(a&&n){if(u=lN(a.semver,n.semver,r),u>0)return null;if(u===0&&(a.operator!==">="||n.operator!=="<="))return null}for(let b of o){if(a&&!wI(b,String(a),r)||n&&!wI(b,String(n),r))return null;for(let E of t)if(!wI(b,String(E),r))return!1;return!0}let A,p,h,w,I=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,v=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;I&&I.prerelease.length===1&&n.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let b of t){if(w=w||b.operator===">"||b.operator===">=",h=h||b.operator==="<"||b.operator==="<=",a){if(v&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===v.major&&b.semver.minor===v.minor&&b.semver.patch===v.patch&&(v=!1),b.operator===">"||b.operator===">="){if(A=qz(a,b,r),A===b&&A!==a)return!1}else if(a.operator===">="&&!wI(a.semver,String(b),r))return!1}if(n){if(I&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===I.major&&b.semver.minor===I.minor&&b.semver.patch===I.patch&&(I=!1),b.operator==="<"||b.operator==="<="){if(p=Gz(n,b,r),p===b&&p!==n)return!1}else if(n.operator==="<="&&!wI(n.semver,String(b),r))return!1}if(!b.operator&&(n||a)&&u!==0)return!1}return!(a&&h&&!n&&u!==0||n&&w&&!a&&u!==0||v||I)},qz=(e,t,r)=>{if(!e)return t;let o=lN(e.semver,t.semver,r);return o>0?e:o<0||t.operator===">"&&e.operator===">="?t:e},Gz=(e,t,r)=>{if(!e)return t;let o=lN(e.semver,t.semver,r);return o<0?e:o>0||t.operator==="<"&&e.operator==="<="?t:e};Yz.exports=B9e});var Zn=_((tkt,Vz)=>{var cN=By(),Kz=fI(),S9e=So(),Jz=JT(),P9e=id(),x9e=hV(),b9e=dV(),Q9e=EV(),k9e=IV(),F9e=vV(),R9e=SV(),T9e=xV(),N9e=QV(),L9e=Ll(),O9e=TV(),M9e=LV(),U9e=gS(),_9e=_V(),H9e=jV(),j9e=hI(),q9e=dS(),G9e=VT(),Y9e=zT(),W9e=mS(),K9e=yS(),J9e=XT(),V9e=XV(),z9e=mI(),X9e=Ol(),Z9e=EI(),$9e=yz(),e5e=wz(),t5e=Iz(),r5e=Dz(),n5e=Pz(),i5e=BS(),s5e=Rz(),o5e=Nz(),a5e=Mz(),l5e=_z(),c5e=Wz();Vz.exports={parse:P9e,valid:x9e,clean:b9e,inc:Q9e,diff:k9e,major:F9e,minor:R9e,patch:T9e,prerelease:N9e,compare:L9e,rcompare:O9e,compareLoose:M9e,compareBuild:U9e,sort:_9e,rsort:H9e,gt:j9e,lt:q9e,eq:G9e,neq:Y9e,gte:W9e,lte:K9e,cmp:J9e,coerce:V9e,Comparator:z9e,Range:X9e,satisfies:Z9e,toComparators:$9e,maxSatisfying:e5e,minSatisfying:t5e,minVersion:r5e,validRange:n5e,outside:i5e,gtr:s5e,ltr:o5e,intersects:a5e,simplifyRange:l5e,subset:c5e,SemVer:S9e,re:cN.re,src:cN.src,tokens:cN.t,SEMVER_SPEC_VERSION:Kz.SEMVER_SPEC_VERSION,RELEASE_TYPES:Kz.RELEASE_TYPES,compareIdentifiers:Jz.compareIdentifiers,rcompareIdentifiers:Jz.rcompareIdentifiers}});var Xz=_((rkt,zz)=>{"use strict";function u5e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function cd(e,t,r,o){this.message=e,this.expected=t,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,cd)}u5e(cd,Error);cd.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var w="",I;for(I=0;I<h.parts.length;I++)w+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+w+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(w){return"\\x0"+o(w)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(w){return"\\x"+o(w)})}function u(h){return r[h.type](h)}function A(h){var w=new Array(h.length),I,v;for(I=0;I<h.length;I++)w[I]=u(h[I]);if(w.sort(),w.length>0){for(I=1,v=1;I<w.length;I++)w[I-1]!==w[I]&&(w[v]=w[I],v++);w.length=v}switch(w.length){case 1:return w[0];case 2:return w[0]+" or "+w[1];default:return w.slice(0,-1).join(", ")+", or "+w[w.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(e)+" but "+p(t)+" found."};function A5e(e,t){t=t!==void 0?t:{};var r={},o={Expression:y},a=y,n="|",u=Te("|",!1),A="&",p=Te("&",!1),h="^",w=Te("^",!1),I=function(Z,ie){return!!ie.reduce((Pe,Le)=>{switch(Le[1]){case"|":return Pe|Le[3];case"&":return Pe&Le[3];case"^":return Pe^Le[3]}},Z)},v="!",b=Te("!",!1),E=function(Z){return!Z},R="(",N=Te("(",!1),U=")",V=Te(")",!1),ee=function(Z){return Z},le=/^[^ \t\n\r()!|&\^]/,fe=Qe([" "," ",`
133`,"\r","(",")","!","|","&","^"],!0,!1),de=function(Z){return t.queryPattern.test(Z)},ge=function(Z){return t.checkFn(Z)},oe=Ne("whitespace"),Be=/^[ \t\n\r]/,be=Qe([" "," ",`
134`,"\r"],!1,!1),g=0,we=0,Se=[{line:1,column:1}],ce=0,ne=[],te=0,Ee;if("startRule"in t){if(!(t.startRule in o))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=o[t.startRule]}function Re(){return e.substring(we,g)}function dt(){return je(we,g)}function H(Z,ie){throw ie=ie!==void 0?ie:je(we,g),P([Ne(Z)],e.substring(we,g),ie)}function at(Z,ie){throw ie=ie!==void 0?ie:je(we,g),C(Z,ie)}function Te(Z,ie){return{type:"literal",text:Z,ignoreCase:ie}}function Qe(Z,ie,Pe){return{type:"class",parts:Z,inverted:ie,ignoreCase:Pe}}function ke(){return{type:"any"}}function He(){return{type:"end"}}function Ne(Z){return{type:"other",description:Z}}function Ve(Z){var ie=Se[Z],Pe;if(ie)return ie;for(Pe=Z-1;!Se[Pe];)Pe--;for(ie=Se[Pe],ie={line:ie.line,column:ie.column};Pe<Z;)e.charCodeAt(Pe)===10?(ie.line++,ie.column=1):ie.column++,Pe++;return Se[Z]=ie,ie}function je(Z,ie){var Pe=Ve(Z),Le=Ve(ie);return{start:{offset:Z,line:Pe.line,column:Pe.column},end:{offset:ie,line:Le.line,column:Le.column}}}function x(Z){g<ce||(g>ce&&(ce=g,ne=[]),ne.push(Z))}function C(Z,ie){return new cd(Z,null,null,ie)}function P(Z,ie,Pe){return new cd(cd.buildMessage(Z,ie),Z,ie,Pe)}function y(){var Z,ie,Pe,Le,ot,gt,jt,$t;if(Z=g,ie=F(),ie!==r){for(Pe=[],Le=g,ot=X(),ot!==r?(e.charCodeAt(g)===124?(gt=n,g++):(gt=r,te===0&&x(u)),gt===r&&(e.charCodeAt(g)===38?(gt=A,g++):(gt=r,te===0&&x(p)),gt===r&&(e.charCodeAt(g)===94?(gt=h,g++):(gt=r,te===0&&x(w)))),gt!==r?(jt=X(),jt!==r?($t=F(),$t!==r?(ot=[ot,gt,jt,$t],Le=ot):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);Le!==r;)Pe.push(Le),Le=g,ot=X(),ot!==r?(e.charCodeAt(g)===124?(gt=n,g++):(gt=r,te===0&&x(u)),gt===r&&(e.charCodeAt(g)===38?(gt=A,g++):(gt=r,te===0&&x(p)),gt===r&&(e.charCodeAt(g)===94?(gt=h,g++):(gt=r,te===0&&x(w)))),gt!==r?(jt=X(),jt!==r?($t=F(),$t!==r?(ot=[ot,gt,jt,$t],Le=ot):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);Pe!==r?(we=Z,ie=I(ie,Pe),Z=ie):(g=Z,Z=r)}else g=Z,Z=r;return Z}function F(){var Z,ie,Pe,Le,ot,gt;return Z=g,e.charCodeAt(g)===33?(ie=v,g++):(ie=r,te===0&&x(b)),ie!==r?(Pe=F(),Pe!==r?(we=Z,ie=E(Pe),Z=ie):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=g,e.charCodeAt(g)===40?(ie=R,g++):(ie=r,te===0&&x(N)),ie!==r?(Pe=X(),Pe!==r?(Le=y(),Le!==r?(ot=X(),ot!==r?(e.charCodeAt(g)===41?(gt=U,g++):(gt=r,te===0&&x(V)),gt!==r?(we=Z,ie=ee(Le),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=z())),Z}function z(){var Z,ie,Pe,Le,ot;if(Z=g,ie=X(),ie!==r){if(Pe=g,Le=[],le.test(e.charAt(g))?(ot=e.charAt(g),g++):(ot=r,te===0&&x(fe)),ot!==r)for(;ot!==r;)Le.push(ot),le.test(e.charAt(g))?(ot=e.charAt(g),g++):(ot=r,te===0&&x(fe));else Le=r;Le!==r?Pe=e.substring(Pe,g):Pe=Le,Pe!==r?(we=g,Le=de(Pe),Le?Le=void 0:Le=r,Le!==r?(we=Z,ie=ge(Pe),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)}else g=Z,Z=r;return Z}function X(){var Z,ie;for(te++,Z=[],Be.test(e.charAt(g))?(ie=e.charAt(g),g++):(ie=r,te===0&&x(be));ie!==r;)Z.push(ie),Be.test(e.charAt(g))?(ie=e.charAt(g),g++):(ie=r,te===0&&x(be));return te--,Z===r&&(ie=r,te===0&&x(oe)),Z}if(Ee=a(),Ee!==r&&g===e.length)return Ee;throw Ee!==r&&g<e.length&&x(He()),P(ne,ce<e.length?e.charAt(ce):null,ce<e.length?je(ce,ce+1):je(ce,ce))}zz.exports={SyntaxError:cd,parse:A5e}});var Zz=_(vS=>{var{parse:f5e}=Xz();vS.makeParser=(e=/[a-z]+/)=>(t,r)=>f5e(t,{queryPattern:e,checkFn:r});vS.parse=vS.makeParser()});var eX=_((ikt,$z)=>{"use strict";$z.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var uN=_((skt,rX)=>{var CI=eX(),tX={};for(let e of Object.keys(CI))tX[CI[e]]=e;var ur={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};rX.exports=ur;for(let e of Object.keys(ur)){if(!("channels"in ur[e]))throw new Error("missing channels property: "+e);if(!("labels"in ur[e]))throw new Error("missing channel labels property: "+e);if(ur[e].labels.length!==ur[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=ur[e];delete ur[e].channels,delete ur[e].labels,Object.defineProperty(ur[e],"channels",{value:t}),Object.defineProperty(ur[e],"labels",{value:r})}ur.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,o=e[2]/255,a=Math.min(t,r,o),n=Math.max(t,r,o),u=n-a,A,p;n===a?A=0:t===n?A=(r-o)/u:r===n?A=2+(o-t)/u:o===n&&(A=4+(t-r)/u),A=Math.min(A*60,360),A<0&&(A+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=u/(n+a):p=u/(2-n-a),[A,p*100,h*100]};ur.rgb.hsv=function(e){let t,r,o,a,n,u=e[0]/255,A=e[1]/255,p=e[2]/255,h=Math.max(u,A,p),w=h-Math.min(u,A,p),I=function(v){return(h-v)/6/w+1/2};return w===0?(a=0,n=0):(n=w/h,t=I(u),r=I(A),o=I(p),u===h?a=o-r:A===h?a=1/3+t-o:p===h&&(a=2/3+r-t),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};ur.rgb.hwb=function(e){let t=e[0],r=e[1],o=e[2],a=ur.rgb.hsl(e)[0],n=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[a,n*100,o*100]};ur.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,o=e[2]/255,a=Math.min(1-t,1-r,1-o),n=(1-t-a)/(1-a)||0,u=(1-r-a)/(1-a)||0,A=(1-o-a)/(1-a)||0;return[n*100,u*100,A*100,a*100]};function p5e(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ur.rgb.keyword=function(e){let t=tX[e];if(t)return t;let r=1/0,o;for(let a of Object.keys(CI)){let n=CI[a],u=p5e(e,n);u<r&&(r=u,o=a)}return o};ur.keyword.rgb=function(e){return CI[e]};ur.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,o=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;let a=t*.4124+r*.3576+o*.1805,n=t*.2126+r*.7152+o*.0722,u=t*.0193+r*.1192+o*.9505;return[a*100,n*100,u*100]};ur.rgb.lab=function(e){let t=ur.rgb.xyz(e),r=t[0],o=t[1],a=t[2];r/=95.047,o/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*o-16,u=500*(r-o),A=200*(o-a);return[n,u,A]};ur.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,o=e[2]/100,a,n,u;if(r===0)return u=o*255,[u,u,u];o<.5?a=o*(1+r):a=o+r-o*r;let A=2*o-a,p=[0,0,0];for(let h=0;h<3;h++)n=t+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?u=A+(a-A)*6*n:2*n<1?u=a:3*n<2?u=A+(a-A)*(2/3-n)*6:u=A,p[h]=u*255;return p};ur.hsl.hsv=function(e){let t=e[0],r=e[1]/100,o=e[2]/100,a=r,n=Math.max(o,.01);o*=2,r*=o<=1?o:2-o,a*=n<=1?n:2-n;let u=(o+r)/2,A=o===0?2*a/(n+a):2*r/(o+r);return[t,A*100,u*100]};ur.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,o=e[2]/100,a=Math.floor(t)%6,n=t-Math.floor(t),u=255*o*(1-r),A=255*o*(1-r*n),p=255*o*(1-r*(1-n));switch(o*=255,a){case 0:return[o,p,u];case 1:return[A,o,u];case 2:return[u,o,p];case 3:return[u,A,o];case 4:return[p,u,o];case 5:return[o,u,A]}};ur.hsv.hsl=function(e){let t=e[0],r=e[1]/100,o=e[2]/100,a=Math.max(o,.01),n,u;u=(2-r)*o;let A=(2-r)*a;return n=r*a,n/=A<=1?A:2-A,n=n||0,u/=2,[t,n*100,u*100]};ur.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,o=e[2]/100,a=r+o,n;a>1&&(r/=a,o/=a);let u=Math.floor(6*t),A=1-o;n=6*t-u,(u&1)!==0&&(n=1-n);let p=r+n*(A-r),h,w,I;switch(u){default:case 6:case 0:h=A,w=p,I=r;break;case 1:h=p,w=A,I=r;break;case 2:h=r,w=A,I=p;break;case 3:h=r,w=p,I=A;break;case 4:h=p,w=r,I=A;break;case 5:h=A,w=r,I=p;break}return[h*255,w*255,I*255]};ur.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,o=e[2]/100,a=e[3]/100,n=1-Math.min(1,t*(1-a)+a),u=1-Math.min(1,r*(1-a)+a),A=1-Math.min(1,o*(1-a)+a);return[n*255,u*255,A*255]};ur.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,o=e[2]/100,a,n,u;return a=t*3.2406+r*-1.5372+o*-.4986,n=t*-.9689+r*1.8758+o*.0415,u=t*.0557+r*-.204+o*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),u=Math.min(Math.max(0,u),1),[a*255,n*255,u*255]};ur.xyz.lab=function(e){let t=e[0],r=e[1],o=e[2];t/=95.047,r/=100,o/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let a=116*r-16,n=500*(t-r),u=200*(r-o);return[a,n,u]};ur.lab.xyz=function(e){let t=e[0],r=e[1],o=e[2],a,n,u;n=(t+16)/116,a=r/500+n,u=n-o/200;let A=n**3,p=a**3,h=u**3;return n=A>.008856?A:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,u=h>.008856?h:(u-16/116)/7.787,a*=95.047,n*=100,u*=108.883,[a,n,u]};ur.lab.lch=function(e){let t=e[0],r=e[1],o=e[2],a;a=Math.atan2(o,r)*360/2/Math.PI,a<0&&(a+=360);let u=Math.sqrt(r*r+o*o);return[t,u,a]};ur.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,n=r*Math.cos(a),u=r*Math.sin(a);return[t,n,u]};ur.rgb.ansi16=function(e,t=null){let[r,o,a]=e,n=t===null?ur.rgb.hsv(e)[2]:t;if(n=Math.round(n/50),n===0)return 30;let u=30+(Math.round(a/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return n===2&&(u+=60),u};ur.hsv.ansi16=function(e){return ur.rgb.ansi16(ur.hsv.rgb(e),e[2])};ur.rgb.ansi256=function(e){let t=e[0],r=e[1],o=e[2];return t===r&&r===o?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)};ur.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,o=(t&1)*r*255,a=(t>>1&1)*r*255,n=(t>>2&1)*r*255;return[o,a,n]};ur.ansi256.rgb=function(e){if(e>=232){let n=(e-232)*10+8;return[n,n,n]}e-=16;let t,r=Math.floor(e/36)/5*255,o=Math.floor((t=e%36)/6)/5*255,a=t%6/5*255;return[r,o,a]};ur.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};ur.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(A=>A+A).join(""));let o=parseInt(r,16),a=o>>16&255,n=o>>8&255,u=o&255;return[a,n,u]};ur.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,o=e[2]/255,a=Math.max(Math.max(t,r),o),n=Math.min(Math.min(t,r),o),u=a-n,A,p;return u<1?A=n/(1-u):A=0,u<=0?p=0:a===t?p=(r-o)/u%6:a===r?p=2+(o-t)/u:p=4+(t-r)/u,p/=6,p%=1,[p*360,u*100,A*100]};ur.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,o=r<.5?2*t*r:2*t*(1-r),a=0;return o<1&&(a=(r-.5*o)/(1-o)),[e[0],o*100,a*100]};ur.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,o=t*r,a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};ur.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,o=e[2]/100;if(r===0)return[o*255,o*255,o*255];let a=[0,0,0],n=t%1*6,u=n%1,A=1-u,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=u,a[2]=0;break;case 1:a[0]=A,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=u;break;case 3:a[0]=0,a[1]=A,a[2]=1;break;case 4:a[0]=u,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=A}return p=(1-r)*o,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};ur.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,o=t+r*(1-t),a=0;return o>0&&(a=t/o),[e[0],a*100,o*100]};ur.hcg.hsl=function(e){let t=e[1]/100,o=e[2]/100*(1-t)+.5*t,a=0;return o>0&&o<.5?a=t/(2*o):o>=.5&&o<1&&(a=t/(2*(1-o))),[e[0],a*100,o*100]};ur.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,o=t+r*(1-t);return[e[0],(o-t)*100,(1-o)*100]};ur.hwb.hcg=function(e){let t=e[1]/100,o=1-e[2]/100,a=o-t,n=0;return a<1&&(n=(o-a)/(1-a)),[e[0],a*100,n*100]};ur.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ur.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ur.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};ur.gray.hsl=function(e){return[0,0,e[0]]};ur.gray.hsv=ur.gray.hsl;ur.gray.hwb=function(e){return[0,100,e[0]]};ur.gray.cmyk=function(e){return[0,0,0,e[0]]};ur.gray.lab=function(e){return[e[0],0,0]};ur.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,o=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(o.length)+o};ur.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var iX=_((okt,nX)=>{var DS=uN();function h5e(){let e={},t=Object.keys(DS);for(let r=t.length,o=0;o<r;o++)e[t[o]]={distance:-1,parent:null};return e}function g5e(e){let t=h5e(),r=[e];for(t[e].distance=0;r.length;){let o=r.pop(),a=Object.keys(DS[o]);for(let n=a.length,u=0;u<n;u++){let A=a[u],p=t[A];p.distance===-1&&(p.distance=t[o].distance+1,p.parent=o,r.unshift(A))}}return t}function d5e(e,t){return function(r){return t(e(r))}}function m5e(e,t){let r=[t[e].parent,e],o=DS[t[e].parent][e],a=t[e].parent;for(;t[a].parent;)r.unshift(t[a].parent),o=d5e(DS[t[a].parent][a],o),a=t[a].parent;return o.conversion=r,o}nX.exports=function(e){let t=g5e(e),r={},o=Object.keys(t);for(let a=o.length,n=0;n<a;n++){let u=o[n];t[u].parent!==null&&(r[u]=m5e(u,t))}return r}});var oX=_((akt,sX)=>{var AN=uN(),y5e=iX(),xy={},E5e=Object.keys(AN);function w5e(e){let t=function(...r){let o=r[0];return o==null?o:(o.length>1&&(r=o),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function C5e(e){let t=function(...r){let o=r[0];if(o==null)return o;o.length>1&&(r=o);let a=e(r);if(typeof a=="object")for(let n=a.length,u=0;u<n;u++)a[u]=Math.round(a[u]);return a};return"conversion"in e&&(t.conversion=e.conversion),t}E5e.forEach(e=>{xy[e]={},Object.defineProperty(xy[e],"channels",{value:AN[e].channels}),Object.defineProperty(xy[e],"labels",{value:AN[e].labels});let t=y5e(e);Object.keys(t).forEach(o=>{let a=t[o];xy[e][o]=C5e(a),xy[e][o].raw=w5e(a)})});sX.exports=xy});var II=_((lkt,AX)=>{"use strict";var aX=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,lX=(e,t)=>(...r)=>{let o=e(...r);return`\x1B[${38+t};5;${o}m`},cX=(e,t)=>(...r)=>{let o=e(...r);return`\x1B[${38+t};2;${o[0]};${o[1]};${o[2]}m`},SS=e=>e,uX=(e,t,r)=>[e,t,r],by=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let o=r();return Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0}),o},enumerable:!0,configurable:!0})},fN,Qy=(e,t,r,o)=>{fN===void 0&&(fN=oX());let a=o?10:0,n={};for(let[u,A]of Object.entries(fN)){let p=u==="ansi16"?"ansi":u;u===t?n[p]=e(r,a):typeof A=="object"&&(n[p]=e(A[t],a))}return n};function I5e(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,o]of Object.entries(t)){for(let[a,n]of Object.entries(o))t[a]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},o[a]=t[a],e.set(n[0],n[1]);Object.defineProperty(t,r,{value:o,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",by(t.color,"ansi",()=>Qy(aX,"ansi16",SS,!1)),by(t.color,"ansi256",()=>Qy(lX,"ansi256",SS,!1)),by(t.color,"ansi16m",()=>Qy(cX,"rgb",uX,!1)),by(t.bgColor,"ansi",()=>Qy(aX,"ansi16",SS,!0)),by(t.bgColor,"ansi256",()=>Qy(lX,"ansi256",SS,!0)),by(t.bgColor,"ansi16m",()=>Qy(cX,"rgb",uX,!0)),t}Object.defineProperty(AX,"exports",{enumerable:!0,get:I5e})});var pX=_((ckt,fX)=>{"use strict";fX.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),a=t.indexOf("--");return o!==-1&&(a===-1||o<a)}});var gN=_((ukt,gX)=>{"use strict";var B5e=Ie("os"),hX=Ie("tty"),Ml=pX(),{env:as}=process,Kp;Ml("no-color")||Ml("no-colors")||Ml("color=false")||Ml("color=never")?Kp=0:(Ml("color")||Ml("colors")||Ml("color=true")||Ml("color=always"))&&(Kp=1);"FORCE_COLOR"in as&&(as.FORCE_COLOR==="true"?Kp=1:as.FORCE_COLOR==="false"?Kp=0:Kp=as.FORCE_COLOR.length===0?1:Math.min(parseInt(as.FORCE_COLOR,10),3));function pN(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function hN(e,t){if(Kp===0)return 0;if(Ml("color=16m")||Ml("color=full")||Ml("color=truecolor"))return 3;if(Ml("color=256"))return 2;if(e&&!t&&Kp===void 0)return 0;let r=Kp||0;if(as.TERM==="dumb")return r;if(process.platform==="win32"){let o=B5e.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in as)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(o=>o in as)||as.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in as)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(as.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in as)return 1;if(as.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in as){let o=parseInt((as.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(as.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(as.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(as.TERM)||"COLORTERM"in as?1:r}function v5e(e){let t=hN(e,e&&e.isTTY);return pN(t)}gX.exports={supportsColor:v5e,stdout:pN(hN(!0,hX.isatty(1))),stderr:pN(hN(!0,hX.isatty(2)))}});var mX=_((Akt,dX)=>{"use strict";var D5e=(e,t,r)=>{let o=e.indexOf(t);if(o===-1)return e;let a=t.length,n=0,u="";do u+=e.substr(n,o-n)+t+r,n=o+a,o=e.indexOf(t,n);while(o!==-1);return u+=e.substr(n),u},S5e=(e,t,r,o)=>{let a=0,n="";do{let u=e[o-1]==="\r";n+=e.substr(a,(u?o-1:o)-a)+t+(u?`\r
135`:`
136`)+r,a=o+1,o=e.indexOf(`
137`,a)}while(o!==-1);return n+=e.substr(a),n};dX.exports={stringReplaceAll:D5e,stringEncaseCRLFWithFirstIndex:S5e}});var IX=_((fkt,CX)=>{"use strict";var P5e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,yX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,x5e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,b5e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,Q5e=new Map([["n",`
138`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function wX(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):Q5e.get(e)||e}function k5e(e,t){let r=[],o=t.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(x5e))r.push(a[2].replace(b5e,(A,p,h)=>p?wX(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${e}')`)}return r}function F5e(e){yX.lastIndex=0;let t=[],r;for(;(r=yX.exec(e))!==null;){let o=r[1];if(r[2]){let a=k5e(o,r[2]);t.push([o].concat(a))}else t.push([o])}return t}function EX(e,t){let r={};for(let a of t)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=e;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}CX.exports=(e,t)=>{let r=[],o=[],a=[];if(t.replace(P5e,(n,u,A,p,h,w)=>{if(u)a.push(wX(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:EX(e,r)(I)),r.push({inverse:A,styles:F5e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(EX(e,r)(a.join(""))),a=[],r.pop()}else a.push(w)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var CN=_((pkt,SX)=>{"use strict";var BI=II(),{stdout:mN,stderr:yN}=gN(),{stringReplaceAll:R5e,stringEncaseCRLFWithFirstIndex:T5e}=mX(),BX=["ansi","ansi","ansi256","ansi16m"],ky=Object.create(null),N5e=(e,t={})=>{if(t.level>3||t.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=mN?mN.level:0;e.level=t.level===void 0?r:t.level},EN=class{constructor(t){return vX(t)}},vX=e=>{let t={};return N5e(t,e),t.template=(...r)=>M5e(t.template,...r),Object.setPrototypeOf(t,PS.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=EN,t.template};function PS(e){return vX(e)}for(let[e,t]of Object.entries(BI))ky[e]={get(){let r=xS(this,wN(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};ky.visible={get(){let e=xS(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var DX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of DX)ky[e]={get(){let{level:t}=this;return function(...r){let o=wN(BI.color[BX[t]][e](...r),BI.color.close,this._styler);return xS(this,o,this._isEmpty)}}};for(let e of DX){let t="bg"+e[0].toUpperCase()+e.slice(1);ky[t]={get(){let{level:r}=this;return function(...o){let a=wN(BI.bgColor[BX[r]][e](...o),BI.bgColor.close,this._styler);return xS(this,a,this._isEmpty)}}}}var L5e=Object.defineProperties(()=>{},{...ky,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),wN=(e,t,r)=>{let o,a;return r===void 0?(o=e,a=t):(o=r.openAll+e,a=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:a,parent:r}},xS=(e,t,r)=>{let o=(...a)=>O5e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=L5e,o._generator=e,o._styler=t,o._isEmpty=r,o},O5e=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:o,closeAll:a}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=R5e(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
139`);return n!==-1&&(t=T5e(t,a,o,n)),o+t+a},dN,M5e=(e,...t)=>{let[r]=t;if(!Array.isArray(r))return t.join(" ");let o=t.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return dN===void 0&&(dN=IX()),dN(e,a.join(""))};Object.defineProperties(PS.prototype,ky);var vI=PS();vI.supportsColor=mN;vI.stderr=PS({level:yN?yN.level:0});vI.stderr.supportsColor=yN;vI.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};SX.exports=vI});var bS=_(Ul=>{"use strict";Ul.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Ul.find=(e,t)=>e.nodes.find(r=>r.type===t);Ul.exceedsLimit=(e,t,r=1,o)=>o===!1||!Ul.isInteger(e)||!Ul.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=o;Ul.escapeNode=(e,t=0,r)=>{let o=e.nodes[t];!o||(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};Ul.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;Ul.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Ul.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Ul.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Ul.flatten=(...e)=>{let t=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,t):n!==void 0&&t.push(n)}return t};return r(e),t}});var QS=_((gkt,xX)=>{"use strict";var PX=bS();xX.exports=(e,t={})=>{let r=(o,a={})=>{let n=t.escapeInvalid&&PX.isInvalidBrace(a),u=o.invalid===!0&&t.escapeInvalid===!0,A="";if(o.value)return(n||u)&&PX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(e)}});var QX=_((dkt,bX)=>{"use strict";bX.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var UX=_((mkt,MX)=>{"use strict";var kX=QX(),ud=(e,t,r)=>{if(kX(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(kX(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=e+":"+t+"="+a+n+u+A;if(ud.cache.hasOwnProperty(p))return ud.cache[p].result;let h=Math.min(e,t),w=Math.max(e,t);if(Math.abs(h-w)===1){let R=e+"|"+t;return o.capture?`(${R})`:o.wrap===!1?R:`(?:${R})`}let I=OX(e)||OX(t),v={min:e,max:t,a:h,b:w},b=[],E=[];if(I&&(v.isPadded=I,v.maxLen=String(v.max).length),h<0){let R=w<0?Math.abs(w):1;E=FX(R,Math.abs(h),v,o),h=v.a=0}return w>=0&&(b=FX(h,w,v,o)),v.negatives=E,v.positives=b,v.result=U5e(E,b,o),o.capture===!0?v.result=`(${v.result})`:o.wrap!==!1&&b.length+E.length>1&&(v.result=`(?:${v.result})`),ud.cache[p]=v,v.result};function U5e(e,t,r){let o=IN(e,t,"-",!1,r)||[],a=IN(t,e,"",!1,r)||[],n=IN(e,t,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function _5e(e,t){let r=1,o=1,a=TX(e,r),n=new Set([t]);for(;e<=a&&a<=t;)n.add(a),r+=1,a=TX(e,r);for(a=NX(t+1,o)-1;e<a&&a<=t;)n.add(a),o+=1,a=NX(t+1,o)-1;return n=[...n],n.sort(q5e),n}function H5e(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let o=j5e(e,t),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=G5e(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function FX(e,t,r,o){let a=_5e(e,t),n=[],u=e,A;for(let p=0;p<a.length;p++){let h=a[p],w=H5e(String(u),String(h),o),I="";if(!r.isPadded&&A&&A.pattern===w.pattern){A.count.length>1&&A.count.pop(),A.count.push(w.count[0]),A.string=A.pattern+LX(A.count),u=h+1;continue}r.isPadded&&(I=Y5e(h,r,o)),w.string=I+w.pattern+LX(w.count),n.push(w),u=h+1,A=w}return n}function IN(e,t,r,o,a){let n=[];for(let u of e){let{string:A}=u;!o&&!RX(t,"string",A)&&n.push(r+A),o&&RX(t,"string",A)&&n.push(r+A)}return n}function j5e(e,t){let r=[];for(let o=0;o<e.length;o++)r.push([e[o],t[o]]);return r}function q5e(e,t){return e>t?1:t>e?-1:0}function RX(e,t,r){return e.some(o=>o[t]===r)}function TX(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function NX(e,t){return e-e%Math.pow(10,t)}function LX(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function G5e(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function OX(e){return/^-?(0+)\d/.test(e)}function Y5e(e,t,r){if(!t.isPadded)return e;let o=Math.abs(t.maxLen-String(e).length),a=r.relaxZeros!==!1;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${o}}`:`0{${o}}`}}ud.cache={};ud.clearCache=()=>ud.cache={};MX.exports=ud});var DN=_((ykt,KX)=>{"use strict";var W5e=Ie("util"),jX=UX(),_X=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),K5e=e=>t=>e===!0?Number(t):String(t),BN=e=>typeof e=="number"||typeof e=="string"&&e!=="",DI=e=>Number.isInteger(+e),vN=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},J5e=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,V5e=(e,t,r)=>{if(t>0){let o=e[0]==="-"?"-":"";o&&(e=e.slice(1)),e=o+e.padStart(o?t-1:t,"0")}return r===!1?String(e):e},HX=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},z5e=(e,t)=>{e.negatives.sort((u,A)=>u<A?-1:u>A?1:0),e.positives.sort((u,A)=>u<A?-1:u>A?1:0);let r=t.capture?"":"?:",o="",a="",n;return e.positives.length&&(o=e.positives.join("|")),e.negatives.length&&(a=`-(${r}${e.negatives.join("|")})`),o&&a?n=`${o}|${a}`:n=o||a,t.wrap?`(${r}${n})`:n},qX=(e,t,r,o)=>{if(r)return jX(e,t,{wrap:!1,...o});let a=String.fromCharCode(e);if(e===t)return a;let n=String.fromCharCode(t);return`[${a}-${n}]`},GX=(e,t,r)=>{if(Array.isArray(e)){let o=r.wrap===!0,a=r.capture?"":"?:";return o?`(${a}${e.join("|")})`:e.join("|")}return jX(e,t,r)},YX=(...e)=>new RangeError("Invalid range arguments: "+W5e.inspect(...e)),WX=(e,t,r)=>{if(r.strictRanges===!0)throw YX([e,t]);return[]},X5e=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Z5e=(e,t,r=1,o={})=>{let a=Number(e),n=Number(t);if(!Number.isInteger(a)||!Number.isInteger(n)){if(o.strictRanges===!0)throw YX([e,t]);return[]}a===0&&(a=0),n===0&&(n=0);let u=a>n,A=String(e),p=String(t),h=String(r);r=Math.max(Math.abs(r),1);let w=vN(A)||vN(p)||vN(h),I=w?Math.max(A.length,p.length,h.length):0,v=w===!1&&J5e(e,t,o)===!1,b=o.transform||K5e(v);if(o.toRegex&&r===1)return qX(HX(e,I),HX(t,I),!0,o);let E={negatives:[],positives:[]},R=V=>E[V<0?"negatives":"positives"].push(Math.abs(V)),N=[],U=0;for(;u?a>=n:a<=n;)o.toRegex===!0&&r>1?R(a):N.push(V5e(b(a,U),I,v)),a=u?a-r:a+r,U++;return o.toRegex===!0?r>1?z5e(E,o):GX(N,null,{wrap:!1,...o}):N},$5e=(e,t,r=1,o={})=>{if(!DI(e)&&e.length>1||!DI(t)&&t.length>1)return WX(e,t,o);let a=o.transform||(v=>String.fromCharCode(v)),n=`${e}`.charCodeAt(0),u=`${t}`.charCodeAt(0),A=n>u,p=Math.min(n,u),h=Math.max(n,u);if(o.toRegex&&r===1)return qX(p,h,!1,o);let w=[],I=0;for(;A?n>=u:n<=u;)w.push(a(n,I)),n=A?n-r:n+r,I++;return o.toRegex===!0?GX(w,null,{wrap:!1,options:o}):w},kS=(e,t,r,o={})=>{if(t==null&&BN(e))return[e];if(!BN(e)||!BN(t))return WX(e,t,o);if(typeof r=="function")return kS(e,t,1,{transform:r});if(_X(r))return kS(e,t,0,r);let a={...o};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,DI(r)?DI(e)&&DI(t)?Z5e(e,t,r,a):$5e(e,t,Math.max(Math.abs(r),1),a):r!=null&&!_X(r)?X5e(r,a):kS(e,t,1,r)};KX.exports=kS});var zX=_((Ekt,VX)=>{"use strict";var e7e=DN(),JX=bS(),t7e=(e,t={})=>{let r=(o,a={})=>{let n=JX.isInvalidBrace(a),u=o.invalid===!0&&t.escapeInvalid===!0,A=n===!0||u===!0,p=t.escapeInvalid===!0?"\\":"",h="";if(o.isOpen===!0||o.isClose===!0)return p+o.value;if(o.type==="open")return A?p+o.value:"(";if(o.type==="close")return A?p+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":A?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){let w=JX.reduce(o.nodes),I=e7e(...w,{...t,wrap:!1,toRegex:!0});if(I.length!==0)return w.length>1&&I.length>1?`(${I})`:I}if(o.nodes)for(let w of o.nodes)h+=r(w,o);return h};return r(e)};VX.exports=t7e});var $X=_((wkt,ZX)=>{"use strict";var r7e=DN(),XX=QS(),Fy=bS(),Ad=(e="",t="",r=!1)=>{let o=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?Fy.flatten(t).map(a=>`{${a}}`):t;for(let a of e)if(Array.isArray(a))for(let n of a)o.push(Ad(n,t,r));else for(let n of t)r===!0&&typeof n=="string"&&(n=`{${n}}`),o.push(Array.isArray(n)?Ad(a,n,r):a+n);return Fy.flatten(o)},n7e=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,o=(a,n={})=>{a.queue=[];let u=n,A=n.queue;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,A=u.queue;if(a.invalid||a.dollar){A.push(Ad(A.pop(),XX(a,t)));return}if(a.type==="brace"&&a.invalid!==!0&&a.nodes.length===2){A.push(Ad(A.pop(),["{}"]));return}if(a.nodes&&a.ranges>0){let I=Fy.reduce(a.nodes);if(Fy.exceedsLimit(...I,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let v=r7e(...I,t);v.length===0&&(v=XX(a,t)),A.push(Ad(A.pop(),v)),a.nodes=[];return}let p=Fy.encloseBrace(a),h=a.queue,w=a;for(;w.type!=="brace"&&w.type!=="root"&&w.parent;)w=w.parent,h=w.queue;for(let I=0;I<a.nodes.length;I++){let v=a.nodes[I];if(v.type==="comma"&&a.type==="brace"){I===1&&h.push(""),h.push("");continue}if(v.type==="close"){A.push(Ad(A.pop(),h,p));continue}if(v.value&&v.type!=="open"){h.push(Ad(h.pop(),v.value));continue}v.nodes&&o(v,a)}return h};return Fy.flatten(o(e))};ZX.exports=n7e});var tZ=_((Ckt,eZ)=>{"use strict";eZ.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
140`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var oZ=_((Ikt,sZ)=>{"use strict";var i7e=QS(),{MAX_LENGTH:rZ,CHAR_BACKSLASH:SN,CHAR_BACKTICK:s7e,CHAR_COMMA:o7e,CHAR_DOT:a7e,CHAR_LEFT_PARENTHESES:l7e,CHAR_RIGHT_PARENTHESES:c7e,CHAR_LEFT_CURLY_BRACE:u7e,CHAR_RIGHT_CURLY_BRACE:A7e,CHAR_LEFT_SQUARE_BRACKET:nZ,CHAR_RIGHT_SQUARE_BRACKET:iZ,CHAR_DOUBLE_QUOTE:f7e,CHAR_SINGLE_QUOTE:p7e,CHAR_NO_BREAK_SPACE:h7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g7e}=tZ(),d7e=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},o=typeof r.maxLength=="number"?Math.min(rZ,r.maxLength):rZ;if(e.length>o)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${o})`);let a={type:"root",input:e,nodes:[]},n=[a],u=a,A=a,p=0,h=e.length,w=0,I=0,v,b={},E=()=>e[w++],R=N=>{if(N.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&N.type==="text"){A.value+=N.value;return}return u.nodes.push(N),N.parent=u,N.prev=A,A=N,N};for(R({type:"bos"});w<h;)if(u=n[n.length-1],v=E(),!(v===g7e||v===h7e)){if(v===SN){R({type:"text",value:(t.keepEscaping?v:"")+E()});continue}if(v===iZ){R({type:"text",value:"\\"+v});continue}if(v===nZ){p++;let N=!0,U;for(;w<h&&(U=E());){if(v+=U,U===nZ){p++;continue}if(U===SN){v+=E();continue}if(U===iZ&&(p--,p===0))break}R({type:"text",value:v});continue}if(v===l7e){u=R({type:"paren",nodes:[]}),n.push(u),R({type:"text",value:v});continue}if(v===c7e){if(u.type!=="paren"){R({type:"text",value:v});continue}u=n.pop(),R({type:"text",value:v}),u=n[n.length-1];continue}if(v===f7e||v===p7e||v===s7e){let N=v,U;for(t.keepQuotes!==!0&&(v="");w<h&&(U=E());){if(U===SN){v+=U+E();continue}if(U===N){t.keepQuotes===!0&&(v+=U);break}v+=U}R({type:"text",value:v});continue}if(v===u7e){I++;let U={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:I,commas:0,ranges:0,nodes:[]};u=R(U),n.push(u),R({type:"open",value:v});continue}if(v===A7e){if(u.type!=="brace"){R({type:"text",value:v});continue}let N="close";u=n.pop(),u.close=!0,R({type:N,value:v}),I--,u=n[n.length-1];continue}if(v===o7e&&I>0){if(u.ranges>0){u.ranges=0;let N=u.nodes.shift();u.nodes=[N,{type:"text",value:i7e(u)}]}R({type:"comma",value:v}),u.commas++;continue}if(v===a7e&&I>0&&u.commas===0){let N=u.nodes;if(I===0||N.length===0){R({type:"text",value:v});continue}if(A.type==="dot"){if(u.range=[],A.value+=v,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){N.pop();let U=N[N.length-1];U.value+=A.value+v,A=U,u.ranges--;continue}R({type:"dot",value:v});continue}R({type:"text",value:v})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(V=>{V.nodes||(V.type==="open"&&(V.isOpen=!0),V.type==="close"&&(V.isClose=!0),V.nodes||(V.type="text"),V.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(u);N.nodes.splice(U,1,...u.nodes)}while(n.length>0);return R({type:"eos"}),a};sZ.exports=d7e});var cZ=_((Bkt,lZ)=>{"use strict";var aZ=QS(),m7e=zX(),y7e=$X(),E7e=oZ(),rl=(e,t={})=>{let r=[];if(Array.isArray(e))for(let o of e){let a=rl.create(o,t);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(rl.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};rl.parse=(e,t={})=>E7e(e,t);rl.stringify=(e,t={})=>aZ(typeof e=="string"?rl.parse(e,t):e,t);rl.compile=(e,t={})=>(typeof e=="string"&&(e=rl.parse(e,t)),m7e(e,t));rl.expand=(e,t={})=>{typeof e=="string"&&(e=rl.parse(e,t));let r=y7e(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};rl.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?rl.compile(e,t):rl.expand(e,t);lZ.exports=rl});var SI=_((vkt,hZ)=>{"use strict";var w7e=Ie("path"),Vu="\\\\/",uZ=`[^${Vu}]`,vf="\\.",C7e="\\+",I7e="\\?",RS="\\/",B7e="(?=.)",AZ="[^/]",PN=`(?:${RS}|$)`,fZ=`(?:^|${RS})`,xN=`${vf}{1,2}${PN}`,v7e=`(?!${vf})`,D7e=`(?!${fZ}${xN})`,S7e=`(?!${vf}{0,1}${PN})`,P7e=`(?!${xN})`,x7e=`[^.${RS}]`,b7e=`${AZ}*?`,pZ={DOT_LITERAL:vf,PLUS_LITERAL:C7e,QMARK_LITERAL:I7e,SLASH_LITERAL:RS,ONE_CHAR:B7e,QMARK:AZ,END_ANCHOR:PN,DOTS_SLASH:xN,NO_DOT:v7e,NO_DOTS:D7e,NO_DOT_SLASH:S7e,NO_DOTS_SLASH:P7e,QMARK_NO_DOT:x7e,STAR:b7e,START_ANCHOR:fZ},Q7e={...pZ,SLASH_LITERAL:`[${Vu}]`,QMARK:uZ,STAR:`${uZ}*?`,DOTS_SLASH:`${vf}{1,2}(?:[${Vu}]|$)`,NO_DOT:`(?!${vf})`,NO_DOTS:`(?!(?:^|[${Vu}])${vf}{1,2}(?:[${Vu}]|$))`,NO_DOT_SLASH:`(?!${vf}{0,1}(?:[${Vu}]|$))`,NO_DOTS_SLASH:`(?!${vf}{1,2}(?:[${Vu}]|$))`,QMARK_NO_DOT:`[^.${Vu}]`,START_ANCHOR:`(?:^|[${Vu}])`,END_ANCHOR:`(?:[${Vu}]|$)`},k7e={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};hZ.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:k7e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:w7e.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?Q7e:pZ}}});var PI=_(Sa=>{"use strict";var F7e=Ie("path"),R7e=process.platform==="win32",{REGEX_BACKSLASH:T7e,REGEX_REMOVE_BACKSLASH:N7e,REGEX_SPECIAL_CHARS:L7e,REGEX_SPECIAL_CHARS_GLOBAL:O7e}=SI();Sa.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Sa.hasRegexChars=e=>L7e.test(e);Sa.isRegexChar=e=>e.length===1&&Sa.hasRegexChars(e);Sa.escapeRegex=e=>e.replace(O7e,"\\$1");Sa.toPosixSlashes=e=>e.replace(T7e,"/");Sa.removeBackslashes=e=>e.replace(N7e,t=>t==="\\"?"":t);Sa.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Sa.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:R7e===!0||F7e.sep==="\\";Sa.escapeLast=(e,t,r)=>{let o=e.lastIndexOf(t,r);return o===-1?e:e[o-1]==="\\"?Sa.escapeLast(e,t,o-1):`${e.slice(0,o)}\\${e.slice(o)}`};Sa.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Sa.wrapOutput=(e,t={},r={})=>{let o=r.contains?"":"^",a=r.contains?"":"$",n=`${o}(?:${e})${a}`;return t.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var IZ=_((Skt,CZ)=>{"use strict";var gZ=PI(),{CHAR_ASTERISK:bN,CHAR_AT:M7e,CHAR_BACKWARD_SLASH:xI,CHAR_COMMA:U7e,CHAR_DOT:QN,CHAR_EXCLAMATION_MARK:kN,CHAR_FORWARD_SLASH:wZ,CHAR_LEFT_CURLY_BRACE:FN,CHAR_LEFT_PARENTHESES:RN,CHAR_LEFT_SQUARE_BRACKET:_7e,CHAR_PLUS:H7e,CHAR_QUESTION_MARK:dZ,CHAR_RIGHT_CURLY_BRACE:j7e,CHAR_RIGHT_PARENTHESES:mZ,CHAR_RIGHT_SQUARE_BRACKET:q7e}=SI(),yZ=e=>e===wZ||e===xI,EZ=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},G7e=(e,t)=>{let r=t||{},o=e.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],u=[],A=[],p=e,h=-1,w=0,I=0,v=!1,b=!1,E=!1,R=!1,N=!1,U=!1,V=!1,ee=!1,le=!1,fe=!1,de=0,ge,oe,Be={value:"",depth:0,isGlob:!1},be=()=>h>=o,g=()=>p.charCodeAt(h+1),we=()=>(ge=oe,p.charCodeAt(++h));for(;h<o;){oe=we();let Ee;if(oe===xI){V=Be.backslashes=!0,oe=we(),oe===FN&&(U=!0);continue}if(U===!0||oe===FN){for(de++;be()!==!0&&(oe=we());){if(oe===xI){V=Be.backslashes=!0,we();continue}if(oe===FN){de++;continue}if(U!==!0&&oe===QN&&(oe=we())===QN){if(v=Be.isBrace=!0,E=Be.isGlob=!0,fe=!0,a===!0)continue;break}if(U!==!0&&oe===U7e){if(v=Be.isBrace=!0,E=Be.isGlob=!0,fe=!0,a===!0)continue;break}if(oe===j7e&&(de--,de===0)){U=!1,v=Be.isBrace=!0,fe=!0;break}}if(a===!0)continue;break}if(oe===wZ){if(n.push(h),u.push(Be),Be={value:"",depth:0,isGlob:!1},fe===!0)continue;if(ge===QN&&h===w+1){w+=2;continue}I=h+1;continue}if(r.noext!==!0&&(oe===H7e||oe===M7e||oe===bN||oe===dZ||oe===kN)===!0&&g()===RN){if(E=Be.isGlob=!0,R=Be.isExtglob=!0,fe=!0,oe===kN&&h===w&&(le=!0),a===!0){for(;be()!==!0&&(oe=we());){if(oe===xI){V=Be.backslashes=!0,oe=we();continue}if(oe===mZ){E=Be.isGlob=!0,fe=!0;break}}continue}break}if(oe===bN){if(ge===bN&&(N=Be.isGlobstar=!0),E=Be.isGlob=!0,fe=!0,a===!0)continue;break}if(oe===dZ){if(E=Be.isGlob=!0,fe=!0,a===!0)continue;break}if(oe===_7e){for(;be()!==!0&&(Ee=we());){if(Ee===xI){V=Be.backslashes=!0,we();continue}if(Ee===q7e){b=Be.isBracket=!0,E=Be.isGlob=!0,fe=!0;break}}if(a===!0)continue;break}if(r.nonegate!==!0&&oe===kN&&h===w){ee=Be.negated=!0,w++;continue}if(r.noparen!==!0&&oe===RN){if(E=Be.isGlob=!0,a===!0){for(;be()!==!0&&(oe=we());){if(oe===RN){V=Be.backslashes=!0,oe=we();continue}if(oe===mZ){fe=!0;break}}continue}break}if(E===!0){if(fe=!0,a===!0)continue;break}}r.noext===!0&&(R=!1,E=!1);let Se=p,ce="",ne="";w>0&&(ce=p.slice(0,w),p=p.slice(w),I-=w),Se&&E===!0&&I>0?(Se=p.slice(0,I),ne=p.slice(I)):E===!0?(Se="",ne=p):Se=p,Se&&Se!==""&&Se!=="/"&&Se!==p&&yZ(Se.charCodeAt(Se.length-1))&&(Se=Se.slice(0,-1)),r.unescape===!0&&(ne&&(ne=gZ.removeBackslashes(ne)),Se&&V===!0&&(Se=gZ.removeBackslashes(Se)));let te={prefix:ce,input:e,start:w,base:Se,glob:ne,isBrace:v,isBracket:b,isGlob:E,isExtglob:R,isGlobstar:N,negated:ee,negatedExtglob:le};if(r.tokens===!0&&(te.maxDepth=0,yZ(oe)||u.push(Be),te.tokens=u),r.parts===!0||r.tokens===!0){let Ee;for(let Re=0;Re<n.length;Re++){let dt=Ee?Ee+1:w,H=n[Re],at=e.slice(dt,H);r.tokens&&(Re===0&&w!==0?(u[Re].isPrefix=!0,u[Re].value=ce):u[Re].value=at,EZ(u[Re]),te.maxDepth+=u[Re].depth),(Re!==0||at!=="")&&A.push(at),Ee=H}if(Ee&&Ee+1<e.length){let Re=e.slice(Ee+1);A.push(Re),r.tokens&&(u[u.length-1].value=Re,EZ(u[u.length-1]),te.maxDepth+=u[u.length-1].depth)}te.slashes=n,te.parts=A}return te};CZ.exports=G7e});var DZ=_((Pkt,vZ)=>{"use strict";var TS=SI(),nl=PI(),{MAX_LENGTH:NS,POSIX_REGEX_SOURCE:Y7e,REGEX_NON_SPECIAL_CHARS:W7e,REGEX_SPECIAL_CHARS_BACKREF:K7e,REPLACEMENTS:BZ}=TS,J7e=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(a=>nl.escapeRegex(a)).join("..")}return r},Ry=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,TN=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=BZ[e]||e;let r={...t},o=typeof r.maxLength=="number"?Math.min(NS,r.maxLength):NS,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);let n={type:"bos",value:"",output:r.prepend||""},u=[n],A=r.capture?"":"?:",p=nl.isWindows(t),h=TS.globChars(p),w=TS.extglobChars(h),{DOT_LITERAL:I,PLUS_LITERAL:v,SLASH_LITERAL:b,ONE_CHAR:E,DOTS_SLASH:R,NO_DOT:N,NO_DOT_SLASH:U,NO_DOTS_SLASH:V,QMARK:ee,QMARK_NO_DOT:le,STAR:fe,START_ANCHOR:de}=h,ge=x=>`(${A}(?:(?!${de}${x.dot?R:I}).)*?)`,oe=r.dot?"":N,Be=r.dot?ee:le,be=r.bash===!0?ge(r):fe;r.capture&&(be=`(${be})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:u};e=nl.removePrefix(e,g),a=e.length;let we=[],Se=[],ce=[],ne=n,te,Ee=()=>g.index===a-1,Re=g.peek=(x=1)=>e[g.index+x],dt=g.advance=()=>e[++g.index]||"",H=()=>e.slice(g.index+1),at=(x="",C=0)=>{g.consumed+=x,g.index+=C},Te=x=>{g.output+=x.output!=null?x.output:x.value,at(x.value)},Qe=()=>{let x=1;for(;Re()==="!"&&(Re(2)!=="("||Re(3)==="?");)dt(),g.start++,x++;return x%2===0?!1:(g.negated=!0,g.start++,!0)},ke=x=>{g[x]++,ce.push(x)},He=x=>{g[x]--,ce.pop()},Ne=x=>{if(ne.type==="globstar"){let C=g.braces>0&&(x.type==="comma"||x.type==="brace"),P=x.extglob===!0||we.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!C&&!P&&(g.output=g.output.slice(0,-ne.output.length),ne.type="star",ne.value="*",ne.output=be,g.output+=ne.output)}if(we.length&&x.type!=="paren"&&(we[we.length-1].inner+=x.value),(x.value||x.output)&&Te(x),ne&&ne.type==="text"&&x.type==="text"){ne.value+=x.value,ne.output=(ne.output||"")+x.value;return}x.prev=ne,u.push(x),ne=x},Ve=(x,C)=>{let P={...w[C],conditions:1,inner:""};P.prev=ne,P.parens=g.parens,P.output=g.output;let y=(r.capture?"(":"")+P.open;ke("parens"),Ne({type:x,value:C,output:g.output?"":E}),Ne({type:"paren",extglob:!0,value:dt(),output:y}),we.push(P)},je=x=>{let C=x.close+(r.capture?")":""),P;if(x.type==="negate"){let y=be;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(y=ge(r)),(y!==be||Ee()||/^\)+$/.test(H()))&&(C=x.close=`)$))${y}`),x.inner.includes("*")&&(P=H())&&/^\.[^\\/.]+$/.test(P)){let F=TN(P,{...t,fastpaths:!1}).output;C=x.close=`)${F})${y})`}x.prev.type==="bos"&&(g.negatedExtglob=!0)}Ne({type:"paren",extglob:!0,value:te,output:C}),He("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let x=!1,C=e.replace(K7e,(P,y,F,z,X,Z)=>z==="\\"?(x=!0,P):z==="?"?y?y+z+(X?ee.repeat(X.length):""):Z===0?Be+(X?ee.repeat(X.length):""):ee.repeat(F.length):z==="."?I.repeat(F.length):z==="*"?y?y+z+(X?be:""):be:y?P:`\\${P}`);return x===!0&&(r.unescape===!0?C=C.replace(/\\/g,""):C=C.replace(/\\+/g,P=>P.length%2===0?"\\\\":P?"\\":"")),C===e&&r.contains===!0?(g.output=e,g):(g.output=nl.wrapOutput(C,g,t),g)}for(;!Ee();){if(te=dt(),te==="\0")continue;if(te==="\\"){let P=Re();if(P==="/"&&r.bash!==!0||P==="."||P===";")continue;if(!P){te+="\\",Ne({type:"text",value:te});continue}let y=/^\\+/.exec(H()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(te+="\\")),r.unescape===!0?te=dt():te+=dt(),g.brackets===0){Ne({type:"text",value:te});continue}}if(g.brackets>0&&(te!=="]"||ne.value==="["||ne.value==="[^")){if(r.posix!==!1&&te===":"){let P=ne.value.slice(1);if(P.includes("[")&&(ne.posix=!0,P.includes(":"))){let y=ne.value.lastIndexOf("["),F=ne.value.slice(0,y),z=ne.value.slice(y+2),X=Y7e[z];if(X){ne.value=F+X,g.backtrack=!0,dt(),!n.output&&u.indexOf(ne)===1&&(n.output=E);continue}}}(te==="["&&Re()!==":"||te==="-"&&Re()==="]")&&(te=`\\${te}`),te==="]"&&(ne.value==="["||ne.value==="[^")&&(te=`\\${te}`),r.posix===!0&&te==="!"&&ne.value==="["&&(te="^"),ne.value+=te,Te({value:te});continue}if(g.quotes===1&&te!=='"'){te=nl.escapeRegex(te),ne.value+=te,Te({value:te});continue}if(te==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&Ne({type:"text",value:te});continue}if(te==="("){ke("parens"),Ne({type:"paren",value:te});continue}if(te===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ry("opening","("));let P=we[we.length-1];if(P&&g.parens===P.parens+1){je(we.pop());continue}Ne({type:"paren",value:te,output:g.parens?")":"\\)"}),He("parens");continue}if(te==="["){if(r.nobracket===!0||!H().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ry("closing","]"));te=`\\${te}`}else ke("brackets");Ne({type:"bracket",value:te});continue}if(te==="]"){if(r.nobracket===!0||ne&&ne.type==="bracket"&&ne.value.length===1){Ne({type:"text",value:te,output:`\\${te}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ry("opening","["));Ne({type:"text",value:te,output:`\\${te}`});continue}He("brackets");let P=ne.value.slice(1);if(ne.posix!==!0&&P[0]==="^"&&!P.includes("/")&&(te=`/${te}`),ne.value+=te,Te({value:te}),r.literalBrackets===!1||nl.hasRegexChars(P))continue;let y=nl.escapeRegex(ne.value);if(g.output=g.output.slice(0,-ne.value.length),r.literalBrackets===!0){g.output+=y,ne.value=y;continue}ne.value=`(${A}${y}|${ne.value})`,g.output+=ne.value;continue}if(te==="{"&&r.nobrace!==!0){ke("braces");let P={type:"brace",value:te,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};Se.push(P),Ne(P);continue}if(te==="}"){let P=Se[Se.length-1];if(r.nobrace===!0||!P){Ne({type:"text",value:te,output:te});continue}let y=")";if(P.dots===!0){let F=u.slice(),z=[];for(let X=F.length-1;X>=0&&(u.pop(),F[X].type!=="brace");X--)F[X].type!=="dots"&&z.unshift(F[X].value);y=J7e(z,r),g.backtrack=!0}if(P.comma!==!0&&P.dots!==!0){let F=g.output.slice(0,P.outputIndex),z=g.tokens.slice(P.tokensIndex);P.value=P.output="\\{",te=y="\\}",g.output=F;for(let X of z)g.output+=X.output||X.value}Ne({type:"brace",value:te,output:y}),He("braces"),Se.pop();continue}if(te==="|"){we.length>0&&we[we.length-1].conditions++,Ne({type:"text",value:te});continue}if(te===","){let P=te,y=Se[Se.length-1];y&&ce[ce.length-1]==="braces"&&(y.comma=!0,P="|"),Ne({type:"comma",value:te,output:P});continue}if(te==="/"){if(ne.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",u.pop(),ne=n;continue}Ne({type:"slash",value:te,output:b});continue}if(te==="."){if(g.braces>0&&ne.type==="dot"){ne.value==="."&&(ne.output=I);let P=Se[Se.length-1];ne.type="dots",ne.output+=te,ne.value+=te,P.dots=!0;continue}if(g.braces+g.parens===0&&ne.type!=="bos"&&ne.type!=="slash"){Ne({type:"text",value:te,output:I});continue}Ne({type:"dot",value:te,output:I});continue}if(te==="?"){if(!(ne&&ne.value==="(")&&r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){Ve("qmark",te);continue}if(ne&&ne.type==="paren"){let y=Re(),F=te;if(y==="<"&&!nl.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(ne.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(H()))&&(F=`\\${te}`),Ne({type:"text",value:te,output:F});continue}if(r.dot!==!0&&(ne.type==="slash"||ne.type==="bos")){Ne({type:"qmark",value:te,output:le});continue}Ne({type:"qmark",value:te,output:ee});continue}if(te==="!"){if(r.noextglob!==!0&&Re()==="("&&(Re(2)!=="?"||!/[!=<:]/.test(Re(3)))){Ve("negate",te);continue}if(r.nonegate!==!0&&g.index===0){Qe();continue}}if(te==="+"){if(r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){Ve("plus",te);continue}if(ne&&ne.value==="("||r.regex===!1){Ne({type:"plus",value:te,output:v});continue}if(ne&&(ne.type==="bracket"||ne.type==="paren"||ne.type==="brace")||g.parens>0){Ne({type:"plus",value:te});continue}Ne({type:"plus",value:v});continue}if(te==="@"){if(r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){Ne({type:"at",extglob:!0,value:te,output:""});continue}Ne({type:"text",value:te});continue}if(te!=="*"){(te==="$"||te==="^")&&(te=`\\${te}`);let P=W7e.exec(H());P&&(te+=P[0],g.index+=P[0].length),Ne({type:"text",value:te});continue}if(ne&&(ne.type==="globstar"||ne.star===!0)){ne.type="star",ne.star=!0,ne.value+=te,ne.output=be,g.backtrack=!0,g.globstar=!0,at(te);continue}let x=H();if(r.noextglob!==!0&&/^\([^?]/.test(x)){Ve("star",te);continue}if(ne.type==="star"){if(r.noglobstar===!0){at(te);continue}let P=ne.prev,y=P.prev,F=P.type==="slash"||P.type==="bos",z=y&&(y.type==="star"||y.type==="globstar");if(r.bash===!0&&(!F||x[0]&&x[0]!=="/")){Ne({type:"star",value:te,output:""});continue}let X=g.braces>0&&(P.type==="comma"||P.type==="brace"),Z=we.length&&(P.type==="pipe"||P.type==="paren");if(!F&&P.type!=="paren"&&!X&&!Z){Ne({type:"star",value:te,output:""});continue}for(;x.slice(0,3)==="/**";){let ie=e[g.index+4];if(ie&&ie!=="/")break;x=x.slice(3),at("/**",3)}if(P.type==="bos"&&Ee()){ne.type="globstar",ne.value+=te,ne.output=ge(r),g.output=ne.output,g.globstar=!0,at(te);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&!z&&Ee()){g.output=g.output.slice(0,-(P.output+ne.output).length),P.output=`(?:${P.output}`,ne.type="globstar",ne.output=ge(r)+(r.strictSlashes?")":"|$)"),ne.value+=te,g.globstar=!0,g.output+=P.output+ne.output,at(te);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&x[0]==="/"){let ie=x[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(P.output+ne.output).length),P.output=`(?:${P.output}`,ne.type="globstar",ne.output=`${ge(r)}${b}|${b}${ie})`,ne.value+=te,g.output+=P.output+ne.output,g.globstar=!0,at(te+dt()),Ne({type:"slash",value:"/",output:""});continue}if(P.type==="bos"&&x[0]==="/"){ne.type="globstar",ne.value+=te,ne.output=`(?:^|${b}|${ge(r)}${b})`,g.output=ne.output,g.globstar=!0,at(te+dt()),Ne({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-ne.output.length),ne.type="globstar",ne.output=ge(r),ne.value+=te,g.output+=ne.output,g.globstar=!0,at(te);continue}let C={type:"star",value:te,output:be};if(r.bash===!0){C.output=".*?",(ne.type==="bos"||ne.type==="slash")&&(C.output=oe+C.output),Ne(C);continue}if(ne&&(ne.type==="bracket"||ne.type==="paren")&&r.regex===!0){C.output=te,Ne(C);continue}(g.index===g.start||ne.type==="slash"||ne.type==="dot")&&(ne.type==="dot"?(g.output+=U,ne.output+=U):r.dot===!0?(g.output+=V,ne.output+=V):(g.output+=oe,ne.output+=oe),Re()!=="*"&&(g.output+=E,ne.output+=E)),Ne(C)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ry("closing","]"));g.output=nl.escapeLast(g.output,"["),He("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ry("closing",")"));g.output=nl.escapeLast(g.output,"("),He("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ry("closing","}"));g.output=nl.escapeLast(g.output,"{"),He("braces")}if(r.strictSlashes!==!0&&(ne.type==="star"||ne.type==="bracket")&&Ne({type:"maybe_slash",value:"",output:`${b}?`}),g.backtrack===!0){g.output="";for(let x of g.tokens)g.output+=x.output!=null?x.output:x.value,x.suffix&&(g.output+=x.suffix)}return g};TN.fastpaths=(e,t)=>{let r={...t},o=typeof r.maxLength=="number"?Math.min(NS,r.maxLength):NS,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=BZ[e]||e;let n=nl.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:A,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:w,NO_DOTS:I,NO_DOTS_SLASH:v,STAR:b,START_ANCHOR:E}=TS.globChars(n),R=r.dot?I:w,N=r.dot?v:w,U=r.capture?"":"?:",V={negated:!1,prefix:""},ee=r.bash===!0?".*?":b;r.capture&&(ee=`(${ee})`);let le=oe=>oe.noglobstar===!0?ee:`(${U}(?:(?!${E}${oe.dot?h:u}).)*?)`,fe=oe=>{switch(oe){case"*":return`${R}${p}${ee}`;case".*":return`${u}${p}${ee}`;case"*.*":return`${R}${ee}${u}${p}${ee}`;case"*/*":return`${R}${ee}${A}${p}${N}${ee}`;case"**":return R+le(r);case"**/*":return`(?:${R}${le(r)}${A})?${N}${p}${ee}`;case"**/*.*":return`(?:${R}${le(r)}${A})?${N}${ee}${u}${p}${ee}`;case"**/.*":return`(?:${R}${le(r)}${A})?${u}${p}${ee}`;default:{let Be=/^(.*?)\.(\w+)$/.exec(oe);if(!Be)return;let be=fe(Be[1]);return be?be+u+Be[2]:void 0}}},de=nl.removePrefix(e,V),ge=fe(de);return ge&&r.strictSlashes!==!0&&(ge+=`${A}?`),ge};vZ.exports=TN});var PZ=_((xkt,SZ)=>{"use strict";var V7e=Ie("path"),z7e=IZ(),NN=DZ(),LN=PI(),X7e=SI(),Z7e=e=>e&&typeof e=="object"&&!Array.isArray(e),Ui=(e,t,r=!1)=>{if(Array.isArray(e)){let w=e.map(v=>Ui(v,t,r));return v=>{for(let b of w){let E=b(v);if(E)return E}return!1}}let o=Z7e(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!o)throw new TypeError("Expected pattern to be a non-empty string");let a=t||{},n=LN.isWindows(t),u=o?Ui.compileRe(e,t):Ui.makeRe(e,t,!1,!0),A=u.state;delete u.state;let p=()=>!1;if(a.ignore){let w={...t,ignore:null,onMatch:null,onResult:null};p=Ui(a.ignore,w,r)}let h=(w,I=!1)=>{let{isMatch:v,match:b,output:E}=Ui.test(w,u,t,{glob:e,posix:n}),R={glob:e,state:A,regex:u,posix:n,input:w,output:E,match:b,isMatch:v};return typeof a.onResult=="function"&&a.onResult(R),v===!1?(R.isMatch=!1,I?R:!1):p(w)?(typeof a.onIgnore=="function"&&a.onIgnore(R),R.isMatch=!1,I?R:!1):(typeof a.onMatch=="function"&&a.onMatch(R),I?R:!0)};return r&&(h.state=A),h};Ui.test=(e,t,r,{glob:o,posix:a}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let n=r||{},u=n.format||(a?LN.toPosixSlashes:null),A=e===o,p=A&&u?u(e):e;return A===!1&&(p=u?u(e):e,A=p===o),(A===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?A=Ui.matchBase(e,t,r,a):A=t.exec(p)),{isMatch:Boolean(A),match:A,output:p}};Ui.matchBase=(e,t,r,o=LN.isWindows(r))=>(t instanceof RegExp?t:Ui.makeRe(t,r)).test(V7e.basename(e));Ui.isMatch=(e,t,r)=>Ui(t,r)(e);Ui.parse=(e,t)=>Array.isArray(e)?e.map(r=>Ui.parse(r,t)):NN(e,{...t,fastpaths:!1});Ui.scan=(e,t)=>z7e(e,t);Ui.compileRe=(e,t,r=!1,o=!1)=>{if(r===!0)return e.output;let a=t||{},n=a.contains?"":"^",u=a.contains?"":"$",A=`${n}(?:${e.output})${u}`;e&&e.negated===!0&&(A=`^(?!${A}).*$`);let p=Ui.toRegex(A,t);return o===!0&&(p.state=e),p};Ui.makeRe=(e,t={},r=!1,o=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(a.output=NN.fastpaths(e,t)),a.output||(a=NN(e,t)),Ui.compileRe(a,t,r,o)};Ui.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};Ui.constants=X7e;SZ.exports=Ui});var bZ=_((bkt,xZ)=>{"use strict";xZ.exports=PZ()});var Zo=_((Qkt,RZ)=>{"use strict";var kZ=Ie("util"),FZ=cZ(),zu=bZ(),ON=PI(),QZ=e=>e===""||e==="./",mi=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let o=new Set,a=new Set,n=new Set,u=0,A=w=>{n.add(w.output),r&&r.onResult&&r.onResult(w)};for(let w=0;w<t.length;w++){let I=zu(String(t[w]),{...r,onResult:A},!0),v=I.state.negated||I.state.negatedExtglob;v&&u++;for(let b of e){let E=I(b,!0);!(v?!E.isMatch:E.isMatch)||(v?o.add(E.output):(o.delete(E.output),a.add(E.output)))}}let h=(u===t.length?[...n]:[...a]).filter(w=>!o.has(w));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(w=>w.replace(/\\/g,"")):t}return h};mi.match=mi;mi.matcher=(e,t)=>zu(e,t);mi.isMatch=(e,t,r)=>zu(t,r)(e);mi.any=mi.isMatch;mi.not=(e,t,r={})=>{t=[].concat(t).map(String);let o=new Set,a=[],n=A=>{r.onResult&&r.onResult(A),a.push(A.output)},u=new Set(mi(e,t,{...r,onResult:n}));for(let A of a)u.has(A)||o.add(A);return[...o]};mi.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${kZ.inspect(e)}"`);if(Array.isArray(t))return t.some(o=>mi.contains(e,o,r));if(typeof t=="string"){if(QZ(e)||QZ(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return mi.isMatch(e,t,{...r,contains:!0})};mi.matchKeys=(e,t,r)=>{if(!ON.isObject(e))throw new TypeError("Expected the first argument to be an object");let o=mi(Object.keys(e),t,r),a={};for(let n of o)a[n]=e[n];return a};mi.some=(e,t,r)=>{let o=[].concat(e);for(let a of[].concat(t)){let n=zu(String(a),r);if(o.some(u=>n(u)))return!0}return!1};mi.every=(e,t,r)=>{let o=[].concat(e);for(let a of[].concat(t)){let n=zu(String(a),r);if(!o.every(u=>n(u)))return!1}return!0};mi.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${kZ.inspect(e)}"`);return[].concat(t).every(o=>zu(o,r)(e))};mi.capture=(e,t,r)=>{let o=ON.isWindows(r),n=zu.makeRe(String(e),{...r,capture:!0}).exec(o?ON.toPosixSlashes(t):t);if(n)return n.slice(1).map(u=>u===void 0?"":u)};mi.makeRe=(...e)=>zu.makeRe(...e);mi.scan=(...e)=>zu.scan(...e);mi.parse=(e,t)=>{let r=[];for(let o of[].concat(e||[]))for(let a of FZ(String(o),t))r.push(zu.parse(a,t));return r};mi.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:FZ(e,t)};mi.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return mi.braces(e,{...t,expand:!0})};RZ.exports=mi});var NZ=_((kkt,TZ)=>{"use strict";TZ.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var LS=_((Fkt,LZ)=>{"use strict";var $7e=NZ();LZ.exports=e=>typeof e=="string"?e.replace($7e(),""):e});var MZ=_((Rkt,OZ)=>{function eYe(){this.__data__=[],this.size=0}OZ.exports=eYe});var Ty=_((Tkt,UZ)=>{function tYe(e,t){return e===t||e!==e&&t!==t}UZ.exports=tYe});var bI=_((Nkt,_Z)=>{var rYe=Ty();function nYe(e,t){for(var r=e.length;r--;)if(rYe(e[r][0],t))return r;return-1}_Z.exports=nYe});var jZ=_((Lkt,HZ)=>{var iYe=bI(),sYe=Array.prototype,oYe=sYe.splice;function aYe(e){var t=this.__data__,r=iYe(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():oYe.call(t,r,1),--this.size,!0}HZ.exports=aYe});var GZ=_((Okt,qZ)=>{var lYe=bI();function cYe(e){var t=this.__data__,r=lYe(t,e);return r<0?void 0:t[r][1]}qZ.exports=cYe});var WZ=_((Mkt,YZ)=>{var uYe=bI();function AYe(e){return uYe(this.__data__,e)>-1}YZ.exports=AYe});var JZ=_((Ukt,KZ)=>{var fYe=bI();function pYe(e,t){var r=this.__data__,o=fYe(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}KZ.exports=pYe});var QI=_((_kt,VZ)=>{var hYe=MZ(),gYe=jZ(),dYe=GZ(),mYe=WZ(),yYe=JZ();function Ny(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}Ny.prototype.clear=hYe;Ny.prototype.delete=gYe;Ny.prototype.get=dYe;Ny.prototype.has=mYe;Ny.prototype.set=yYe;VZ.exports=Ny});var XZ=_((Hkt,zZ)=>{var EYe=QI();function wYe(){this.__data__=new EYe,this.size=0}zZ.exports=wYe});var $Z=_((jkt,ZZ)=>{function CYe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}ZZ.exports=CYe});var t$=_((qkt,e$)=>{function IYe(e){return this.__data__.get(e)}e$.exports=IYe});var n$=_((Gkt,r$)=>{function BYe(e){return this.__data__.has(e)}r$.exports=BYe});var MN=_((Ykt,i$)=>{var vYe=typeof global=="object"&&global&&global.Object===Object&&global;i$.exports=vYe});var _l=_((Wkt,s$)=>{var DYe=MN(),SYe=typeof self=="object"&&self&&self.Object===Object&&self,PYe=DYe||SYe||Function("return this")();s$.exports=PYe});var fd=_((Kkt,o$)=>{var xYe=_l(),bYe=xYe.Symbol;o$.exports=bYe});var u$=_((Jkt,c$)=>{var a$=fd(),l$=Object.prototype,QYe=l$.hasOwnProperty,kYe=l$.toString,kI=a$?a$.toStringTag:void 0;function FYe(e){var t=QYe.call(e,kI),r=e[kI];try{e[kI]=void 0;var o=!0}catch{}var a=kYe.call(e);return o&&(t?e[kI]=r:delete e[kI]),a}c$.exports=FYe});var f$=_((Vkt,A$)=>{var RYe=Object.prototype,TYe=RYe.toString;function NYe(e){return TYe.call(e)}A$.exports=NYe});var pd=_((zkt,g$)=>{var p$=fd(),LYe=u$(),OYe=f$(),MYe="[object Null]",UYe="[object Undefined]",h$=p$?p$.toStringTag:void 0;function _Ye(e){return e==null?e===void 0?UYe:MYe:h$&&h$ in Object(e)?LYe(e):OYe(e)}g$.exports=_Ye});var il=_((Xkt,d$)=>{function HYe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}d$.exports=HYe});var OS=_((Zkt,m$)=>{var jYe=pd(),qYe=il(),GYe="[object AsyncFunction]",YYe="[object Function]",WYe="[object GeneratorFunction]",KYe="[object Proxy]";function JYe(e){if(!qYe(e))return!1;var t=jYe(e);return t==YYe||t==WYe||t==GYe||t==KYe}m$.exports=JYe});var E$=_(($kt,y$)=>{var VYe=_l(),zYe=VYe["__core-js_shared__"];y$.exports=zYe});var I$=_((eFt,C$)=>{var UN=E$(),w$=function(){var e=/[^.]+$/.exec(UN&&UN.keys&&UN.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function XYe(e){return!!w$&&w$ in e}C$.exports=XYe});var _N=_((tFt,B$)=>{var ZYe=Function.prototype,$Ye=ZYe.toString;function eWe(e){if(e!=null){try{return $Ye.call(e)}catch{}try{return e+""}catch{}}return""}B$.exports=eWe});var D$=_((rFt,v$)=>{var tWe=OS(),rWe=I$(),nWe=il(),iWe=_N(),sWe=/[\\^$.*+?()[\]{}|]/g,oWe=/^\[object .+?Constructor\]$/,aWe=Function.prototype,lWe=Object.prototype,cWe=aWe.toString,uWe=lWe.hasOwnProperty,AWe=RegExp("^"+cWe.call(uWe).replace(sWe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fWe(e){if(!nWe(e)||rWe(e))return!1;var t=tWe(e)?AWe:oWe;return t.test(iWe(e))}v$.exports=fWe});var P$=_((nFt,S$)=>{function pWe(e,t){return e?.[t]}S$.exports=pWe});var Jp=_((iFt,x$)=>{var hWe=D$(),gWe=P$();function dWe(e,t){var r=gWe(e,t);return hWe(r)?r:void 0}x$.exports=dWe});var MS=_((sFt,b$)=>{var mWe=Jp(),yWe=_l(),EWe=mWe(yWe,"Map");b$.exports=EWe});var FI=_((oFt,Q$)=>{var wWe=Jp(),CWe=wWe(Object,"create");Q$.exports=CWe});var R$=_((aFt,F$)=>{var k$=FI();function IWe(){this.__data__=k$?k$(null):{},this.size=0}F$.exports=IWe});var N$=_((lFt,T$)=>{function BWe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}T$.exports=BWe});var O$=_((cFt,L$)=>{var vWe=FI(),DWe="__lodash_hash_undefined__",SWe=Object.prototype,PWe=SWe.hasOwnProperty;function xWe(e){var t=this.__data__;if(vWe){var r=t[e];return r===DWe?void 0:r}return PWe.call(t,e)?t[e]:void 0}L$.exports=xWe});var U$=_((uFt,M$)=>{var bWe=FI(),QWe=Object.prototype,kWe=QWe.hasOwnProperty;function FWe(e){var t=this.__data__;return bWe?t[e]!==void 0:kWe.call(t,e)}M$.exports=FWe});var H$=_((AFt,_$)=>{var RWe=FI(),TWe="__lodash_hash_undefined__";function NWe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=RWe&&t===void 0?TWe:t,this}_$.exports=NWe});var q$=_((fFt,j$)=>{var LWe=R$(),OWe=N$(),MWe=O$(),UWe=U$(),_We=H$();function Ly(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}Ly.prototype.clear=LWe;Ly.prototype.delete=OWe;Ly.prototype.get=MWe;Ly.prototype.has=UWe;Ly.prototype.set=_We;j$.exports=Ly});var W$=_((pFt,Y$)=>{var G$=q$(),HWe=QI(),jWe=MS();function qWe(){this.size=0,this.__data__={hash:new G$,map:new(jWe||HWe),string:new G$}}Y$.exports=qWe});var J$=_((hFt,K$)=>{function GWe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}K$.exports=GWe});var RI=_((gFt,V$)=>{var YWe=J$();function WWe(e,t){var r=e.__data__;return YWe(t)?r[typeof t=="string"?"string":"hash"]:r.map}V$.exports=WWe});var X$=_((dFt,z$)=>{var KWe=RI();function JWe(e){var t=KWe(this,e).delete(e);return this.size-=t?1:0,t}z$.exports=JWe});var $$=_((mFt,Z$)=>{var VWe=RI();function zWe(e){return VWe(this,e).get(e)}Z$.exports=zWe});var tee=_((yFt,eee)=>{var XWe=RI();function ZWe(e){return XWe(this,e).has(e)}eee.exports=ZWe});var nee=_((EFt,ree)=>{var $We=RI();function eKe(e,t){var r=$We(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}ree.exports=eKe});var US=_((wFt,iee)=>{var tKe=W$(),rKe=X$(),nKe=$$(),iKe=tee(),sKe=nee();function Oy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}Oy.prototype.clear=tKe;Oy.prototype.delete=rKe;Oy.prototype.get=nKe;Oy.prototype.has=iKe;Oy.prototype.set=sKe;iee.exports=Oy});var oee=_((CFt,see)=>{var oKe=QI(),aKe=MS(),lKe=US(),cKe=200;function uKe(e,t){var r=this.__data__;if(r instanceof oKe){var o=r.__data__;if(!aKe||o.length<cKe-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new lKe(o)}return r.set(e,t),this.size=r.size,this}see.exports=uKe});var _S=_((IFt,aee)=>{var AKe=QI(),fKe=XZ(),pKe=$Z(),hKe=t$(),gKe=n$(),dKe=oee();function My(e){var t=this.__data__=new AKe(e);this.size=t.size}My.prototype.clear=fKe;My.prototype.delete=pKe;My.prototype.get=hKe;My.prototype.has=gKe;My.prototype.set=dKe;aee.exports=My});var cee=_((BFt,lee)=>{var mKe="__lodash_hash_undefined__";function yKe(e){return this.__data__.set(e,mKe),this}lee.exports=yKe});var Aee=_((vFt,uee)=>{function EKe(e){return this.__data__.has(e)}uee.exports=EKe});var pee=_((DFt,fee)=>{var wKe=US(),CKe=cee(),IKe=Aee();function HS(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new wKe;++t<r;)this.add(e[t])}HS.prototype.add=HS.prototype.push=CKe;HS.prototype.has=IKe;fee.exports=HS});var gee=_((SFt,hee)=>{function BKe(e,t){for(var r=-1,o=e==null?0:e.length;++r<o;)if(t(e[r],r,e))return!0;return!1}hee.exports=BKe});var mee=_((PFt,dee)=>{function vKe(e,t){return e.has(t)}dee.exports=vKe});var HN=_((xFt,yee)=>{var DKe=pee(),SKe=gee(),PKe=mee(),xKe=1,bKe=2;function QKe(e,t,r,o,a,n){var u=r&xKe,A=e.length,p=t.length;if(A!=p&&!(u&&p>A))return!1;var h=n.get(e),w=n.get(t);if(h&&w)return h==t&&w==e;var I=-1,v=!0,b=r&bKe?new DKe:void 0;for(n.set(e,t),n.set(t,e);++I<A;){var E=e[I],R=t[I];if(o)var N=u?o(R,E,I,t,e,n):o(E,R,I,e,t,n);if(N!==void 0){if(N)continue;v=!1;break}if(b){if(!SKe(t,function(U,V){if(!PKe(b,V)&&(E===U||a(E,U,r,o,n)))return b.push(V)})){v=!1;break}}else if(!(E===R||a(E,R,r,o,n))){v=!1;break}}return n.delete(e),n.delete(t),v}yee.exports=QKe});var jN=_((bFt,Eee)=>{var kKe=_l(),FKe=kKe.Uint8Array;Eee.exports=FKe});var Cee=_((QFt,wee)=>{function RKe(e){var t=-1,r=Array(e.size);return e.forEach(function(o,a){r[++t]=[a,o]}),r}wee.exports=RKe});var Bee=_((kFt,Iee)=>{function TKe(e){var t=-1,r=Array(e.size);return e.forEach(function(o){r[++t]=o}),r}Iee.exports=TKe});var xee=_((FFt,Pee)=>{var vee=fd(),Dee=jN(),NKe=Ty(),LKe=HN(),OKe=Cee(),MKe=Bee(),UKe=1,_Ke=2,HKe="[object Boolean]",jKe="[object Date]",qKe="[object Error]",GKe="[object Map]",YKe="[object Number]",WKe="[object RegExp]",KKe="[object Set]",JKe="[object String]",VKe="[object Symbol]",zKe="[object ArrayBuffer]",XKe="[object DataView]",See=vee?vee.prototype:void 0,qN=See?See.valueOf:void 0;function ZKe(e,t,r,o,a,n,u){switch(r){case XKe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zKe:return!(e.byteLength!=t.byteLength||!n(new Dee(e),new Dee(t)));case HKe:case jKe:case YKe:return NKe(+e,+t);case qKe:return e.name==t.name&&e.message==t.message;case WKe:case JKe:return e==t+"";case GKe:var A=OKe;case KKe:var p=o&UKe;if(A||(A=MKe),e.size!=t.size&&!p)return!1;var h=u.get(e);if(h)return h==t;o|=_Ke,u.set(e,t);var w=LKe(A(e),A(t),o,a,n,u);return u.delete(e),w;case VKe:if(qN)return qN.call(e)==qN.call(t)}return!1}Pee.exports=ZKe});var jS=_((RFt,bee)=>{function $Ke(e,t){for(var r=-1,o=t.length,a=e.length;++r<o;)e[a+r]=t[r];return e}bee.exports=$Ke});var Hl=_((TFt,Qee)=>{var eJe=Array.isArray;Qee.exports=eJe});var GN=_((NFt,kee)=>{var tJe=jS(),rJe=Hl();function nJe(e,t,r){var o=t(e);return rJe(e)?o:tJe(o,r(e))}kee.exports=nJe});var Ree=_((LFt,Fee)=>{function iJe(e,t){for(var r=-1,o=e==null?0:e.length,a=0,n=[];++r<o;){var u=e[r];t(u,r,e)&&(n[a++]=u)}return n}Fee.exports=iJe});var YN=_((OFt,Tee)=>{function sJe(){return[]}Tee.exports=sJe});var qS=_((MFt,Lee)=>{var oJe=Ree(),aJe=YN(),lJe=Object.prototype,cJe=lJe.propertyIsEnumerable,Nee=Object.getOwnPropertySymbols,uJe=Nee?function(e){return e==null?[]:(e=Object(e),oJe(Nee(e),function(t){return cJe.call(e,t)}))}:aJe;Lee.exports=uJe});var Mee=_((UFt,Oee)=>{function AJe(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}Oee.exports=AJe});var Xu=_((_Ft,Uee)=>{function fJe(e){return e!=null&&typeof e=="object"}Uee.exports=fJe});var Hee=_((HFt,_ee)=>{var pJe=pd(),hJe=Xu(),gJe="[object Arguments]";function dJe(e){return hJe(e)&&pJe(e)==gJe}_ee.exports=dJe});var TI=_((jFt,Gee)=>{var jee=Hee(),mJe=Xu(),qee=Object.prototype,yJe=qee.hasOwnProperty,EJe=qee.propertyIsEnumerable,wJe=jee(function(){return arguments}())?jee:function(e){return mJe(e)&&yJe.call(e,"callee")&&!EJe.call(e,"callee")};Gee.exports=wJe});var Wee=_((qFt,Yee)=>{function CJe(){return!1}Yee.exports=CJe});var LI=_((NI,Uy)=>{var IJe=_l(),BJe=Wee(),Vee=typeof NI=="object"&&NI&&!NI.nodeType&&NI,Kee=Vee&&typeof Uy=="object"&&Uy&&!Uy.nodeType&&Uy,vJe=Kee&&Kee.exports===Vee,Jee=vJe?IJe.Buffer:void 0,DJe=Jee?Jee.isBuffer:void 0,SJe=DJe||BJe;Uy.exports=SJe});var OI=_((GFt,zee)=>{var PJe=9007199254740991,xJe=/^(?:0|[1-9]\d*)$/;function bJe(e,t){var r=typeof e;return t=t??PJe,!!t&&(r=="number"||r!="symbol"&&xJe.test(e))&&e>-1&&e%1==0&&e<t}zee.exports=bJe});var GS=_((YFt,Xee)=>{var QJe=9007199254740991;function kJe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=QJe}Xee.exports=kJe});var $ee=_((WFt,Zee)=>{var FJe=pd(),RJe=GS(),TJe=Xu(),NJe="[object Arguments]",LJe="[object Array]",OJe="[object Boolean]",MJe="[object Date]",UJe="[object Error]",_Je="[object Function]",HJe="[object Map]",jJe="[object Number]",qJe="[object Object]",GJe="[object RegExp]",YJe="[object Set]",WJe="[object String]",KJe="[object WeakMap]",JJe="[object ArrayBuffer]",VJe="[object DataView]",zJe="[object Float32Array]",XJe="[object Float64Array]",ZJe="[object Int8Array]",$Je="[object Int16Array]",eVe="[object Int32Array]",tVe="[object Uint8Array]",rVe="[object Uint8ClampedArray]",nVe="[object Uint16Array]",iVe="[object Uint32Array]",ci={};ci[zJe]=ci[XJe]=ci[ZJe]=ci[$Je]=ci[eVe]=ci[tVe]=ci[rVe]=ci[nVe]=ci[iVe]=!0;ci[NJe]=ci[LJe]=ci[JJe]=ci[OJe]=ci[VJe]=ci[MJe]=ci[UJe]=ci[_Je]=ci[HJe]=ci[jJe]=ci[qJe]=ci[GJe]=ci[YJe]=ci[WJe]=ci[KJe]=!1;function sVe(e){return TJe(e)&&RJe(e.length)&&!!ci[FJe(e)]}Zee.exports=sVe});var YS=_((KFt,ete)=>{function oVe(e){return function(t){return e(t)}}ete.exports=oVe});var WS=_((MI,_y)=>{var aVe=MN(),tte=typeof MI=="object"&&MI&&!MI.nodeType&&MI,UI=tte&&typeof _y=="object"&&_y&&!_y.nodeType&&_y,lVe=UI&&UI.exports===tte,WN=lVe&&aVe.process,cVe=function(){try{var e=UI&&UI.require&&UI.require("util").types;return e||WN&&WN.binding&&WN.binding("util")}catch{}}();_y.exports=cVe});var KS=_((JFt,ite)=>{var uVe=$ee(),AVe=YS(),rte=WS(),nte=rte&&rte.isTypedArray,fVe=nte?AVe(nte):uVe;ite.exports=fVe});var KN=_((VFt,ste)=>{var pVe=Mee(),hVe=TI(),gVe=Hl(),dVe=LI(),mVe=OI(),yVe=KS(),EVe=Object.prototype,wVe=EVe.hasOwnProperty;function CVe(e,t){var r=gVe(e),o=!r&&hVe(e),a=!r&&!o&&dVe(e),n=!r&&!o&&!a&&yVe(e),u=r||o||a||n,A=u?pVe(e.length,String):[],p=A.length;for(var h in e)(t||wVe.call(e,h))&&!(u&&(h=="length"||a&&(h=="offset"||h=="parent")||n&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||mVe(h,p)))&&A.push(h);return A}ste.exports=CVe});var JS=_((zFt,ote)=>{var IVe=Object.prototype;function BVe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||IVe;return e===r}ote.exports=BVe});var JN=_((XFt,ate)=>{function vVe(e,t){return function(r){return e(t(r))}}ate.exports=vVe});var cte=_((ZFt,lte)=>{var DVe=JN(),SVe=DVe(Object.keys,Object);lte.exports=SVe});var Ate=_(($Ft,ute)=>{var PVe=JS(),xVe=cte(),bVe=Object.prototype,QVe=bVe.hasOwnProperty;function kVe(e){if(!PVe(e))return xVe(e);var t=[];for(var r in Object(e))QVe.call(e,r)&&r!="constructor"&&t.push(r);return t}ute.exports=kVe});var _I=_((eRt,fte)=>{var FVe=OS(),RVe=GS();function TVe(e){return e!=null&&RVe(e.length)&&!FVe(e)}fte.exports=TVe});var VS=_((tRt,pte)=>{var NVe=KN(),LVe=Ate(),OVe=_I();function MVe(e){return OVe(e)?NVe(e):LVe(e)}pte.exports=MVe});var VN=_((rRt,hte)=>{var UVe=GN(),_Ve=qS(),HVe=VS();function jVe(e){return UVe(e,HVe,_Ve)}hte.exports=jVe});var mte=_((nRt,dte)=>{var gte=VN(),qVe=1,GVe=Object.prototype,YVe=GVe.hasOwnProperty;function WVe(e,t,r,o,a,n){var u=r&qVe,A=gte(e),p=A.length,h=gte(t),w=h.length;if(p!=w&&!u)return!1;for(var I=p;I--;){var v=A[I];if(!(u?v in t:YVe.call(t,v)))return!1}var b=n.get(e),E=n.get(t);if(b&&E)return b==t&&E==e;var R=!0;n.set(e,t),n.set(t,e);for(var N=u;++I<p;){v=A[I];var U=e[v],V=t[v];if(o)var ee=u?o(V,U,v,t,e,n):o(U,V,v,e,t,n);if(!(ee===void 0?U===V||a(U,V,r,o,n):ee)){R=!1;break}N||(N=v=="constructor")}if(R&&!N){var le=e.constructor,fe=t.constructor;le!=fe&&"constructor"in e&&"constructor"in t&&!(typeof le=="function"&&le instanceof le&&typeof fe=="function"&&fe instanceof fe)&&(R=!1)}return n.delete(e),n.delete(t),R}dte.exports=WVe});var Ete=_((iRt,yte)=>{var KVe=Jp(),JVe=_l(),VVe=KVe(JVe,"DataView");yte.exports=VVe});var Cte=_((sRt,wte)=>{var zVe=Jp(),XVe=_l(),ZVe=zVe(XVe,"Promise");wte.exports=ZVe});var Bte=_((oRt,Ite)=>{var $Ve=Jp(),eze=_l(),tze=$Ve(eze,"Set");Ite.exports=tze});var Dte=_((aRt,vte)=>{var rze=Jp(),nze=_l(),ize=rze(nze,"WeakMap");vte.exports=ize});var HI=_((lRt,Fte)=>{var zN=Ete(),XN=MS(),ZN=Cte(),$N=Bte(),eL=Dte(),kte=pd(),Hy=_N(),Ste="[object Map]",sze="[object Object]",Pte="[object Promise]",xte="[object Set]",bte="[object WeakMap]",Qte="[object DataView]",oze=Hy(zN),aze=Hy(XN),lze=Hy(ZN),cze=Hy($N),uze=Hy(eL),hd=kte;(zN&&hd(new zN(new ArrayBuffer(1)))!=Qte||XN&&hd(new XN)!=Ste||ZN&&hd(ZN.resolve())!=Pte||$N&&hd(new $N)!=xte||eL&&hd(new eL)!=bte)&&(hd=function(e){var t=kte(e),r=t==sze?e.constructor:void 0,o=r?Hy(r):"";if(o)switch(o){case oze:return Qte;case aze:return Ste;case lze:return Pte;case cze:return xte;case uze:return bte}return t});Fte.exports=hd});var _te=_((cRt,Ute)=>{var tL=_S(),Aze=HN(),fze=xee(),pze=mte(),Rte=HI(),Tte=Hl(),Nte=LI(),hze=KS(),gze=1,Lte="[object Arguments]",Ote="[object Array]",zS="[object Object]",dze=Object.prototype,Mte=dze.hasOwnProperty;function mze(e,t,r,o,a,n){var u=Tte(e),A=Tte(t),p=u?Ote:Rte(e),h=A?Ote:Rte(t);p=p==Lte?zS:p,h=h==Lte?zS:h;var w=p==zS,I=h==zS,v=p==h;if(v&&Nte(e)){if(!Nte(t))return!1;u=!0,w=!1}if(v&&!w)return n||(n=new tL),u||hze(e)?Aze(e,t,r,o,a,n):fze(e,t,p,r,o,a,n);if(!(r&gze)){var b=w&&Mte.call(e,"__wrapped__"),E=I&&Mte.call(t,"__wrapped__");if(b||E){var R=b?e.value():e,N=E?t.value():t;return n||(n=new tL),a(R,N,r,o,n)}}return v?(n||(n=new tL),pze(e,t,r,o,a,n)):!1}Ute.exports=mze});var Gte=_((uRt,qte)=>{var yze=_te(),Hte=Xu();function jte(e,t,r,o,a){return e===t?!0:e==null||t==null||!Hte(e)&&!Hte(t)?e!==e&&t!==t:yze(e,t,r,o,jte,a)}qte.exports=jte});var Wte=_((ARt,Yte)=>{var Eze=Gte();function wze(e,t){return Eze(e,t)}Yte.exports=wze});var rL=_((fRt,Kte)=>{var Cze=Jp(),Ize=function(){try{var e=Cze(Object,"defineProperty");return e({},"",{}),e}catch{}}();Kte.exports=Ize});var XS=_((pRt,Vte)=>{var Jte=rL();function Bze(e,t,r){t=="__proto__"&&Jte?Jte(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Vte.exports=Bze});var nL=_((hRt,zte)=>{var vze=XS(),Dze=Ty();function Sze(e,t,r){(r!==void 0&&!Dze(e[t],r)||r===void 0&&!(t in e))&&vze(e,t,r)}zte.exports=Sze});var Zte=_((gRt,Xte)=>{function Pze(e){return function(t,r,o){for(var a=-1,n=Object(t),u=o(t),A=u.length;A--;){var p=u[e?A:++a];if(r(n[p],p,n)===!1)break}return t}}Xte.exports=Pze});var ere=_((dRt,$te)=>{var xze=Zte(),bze=xze();$te.exports=bze});var iL=_((jI,jy)=>{var Qze=_l(),ire=typeof jI=="object"&&jI&&!jI.nodeType&&jI,tre=ire&&typeof jy=="object"&&jy&&!jy.nodeType&&jy,kze=tre&&tre.exports===ire,rre=kze?Qze.Buffer:void 0,nre=rre?rre.allocUnsafe:void 0;function Fze(e,t){if(t)return e.slice();var r=e.length,o=nre?nre(r):new e.constructor(r);return e.copy(o),o}jy.exports=Fze});var ZS=_((mRt,ore)=>{var sre=jN();function Rze(e){var t=new e.constructor(e.byteLength);return new sre(t).set(new sre(e)),t}ore.exports=Rze});var sL=_((yRt,are)=>{var Tze=ZS();function Nze(e,t){var r=t?Tze(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}are.exports=Nze});var $S=_((ERt,lre)=>{function Lze(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}lre.exports=Lze});var Are=_((wRt,ure)=>{var Oze=il(),cre=Object.create,Mze=function(){function e(){}return function(t){if(!Oze(t))return{};if(cre)return cre(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();ure.exports=Mze});var eP=_((CRt,fre)=>{var Uze=JN(),_ze=Uze(Object.getPrototypeOf,Object);fre.exports=_ze});var oL=_((IRt,pre)=>{var Hze=Are(),jze=eP(),qze=JS();function Gze(e){return typeof e.constructor=="function"&&!qze(e)?Hze(jze(e)):{}}pre.exports=Gze});var gre=_((BRt,hre)=>{var Yze=_I(),Wze=Xu();function Kze(e){return Wze(e)&&Yze(e)}hre.exports=Kze});var aL=_((vRt,mre)=>{var Jze=pd(),Vze=eP(),zze=Xu(),Xze="[object Object]",Zze=Function.prototype,$ze=Object.prototype,dre=Zze.toString,eXe=$ze.hasOwnProperty,tXe=dre.call(Object);function rXe(e){if(!zze(e)||Jze(e)!=Xze)return!1;var t=Vze(e);if(t===null)return!0;var r=eXe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&dre.call(r)==tXe}mre.exports=rXe});var lL=_((DRt,yre)=>{function nXe(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}yre.exports=nXe});var tP=_((SRt,Ere)=>{var iXe=XS(),sXe=Ty(),oXe=Object.prototype,aXe=oXe.hasOwnProperty;function lXe(e,t,r){var o=e[t];(!(aXe.call(e,t)&&sXe(o,r))||r===void 0&&!(t in e))&&iXe(e,t,r)}Ere.exports=lXe});var gd=_((PRt,wre)=>{var cXe=tP(),uXe=XS();function AXe(e,t,r,o){var a=!r;r||(r={});for(var n=-1,u=t.length;++n<u;){var A=t[n],p=o?o(r[A],e[A],A,r,e):void 0;p===void 0&&(p=e[A]),a?uXe(r,A,p):cXe(r,A,p)}return r}wre.exports=AXe});var Ire=_((xRt,Cre)=>{function fXe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}Cre.exports=fXe});var vre=_((bRt,Bre)=>{var pXe=il(),hXe=JS(),gXe=Ire(),dXe=Object.prototype,mXe=dXe.hasOwnProperty;function yXe(e){if(!pXe(e))return gXe(e);var t=hXe(e),r=[];for(var o in e)o=="constructor"&&(t||!mXe.call(e,o))||r.push(o);return r}Bre.exports=yXe});var qy=_((QRt,Dre)=>{var EXe=KN(),wXe=vre(),CXe=_I();function IXe(e){return CXe(e)?EXe(e,!0):wXe(e)}Dre.exports=IXe});var Pre=_((kRt,Sre)=>{var BXe=gd(),vXe=qy();function DXe(e){return BXe(e,vXe(e))}Sre.exports=DXe});var Rre=_((FRt,Fre)=>{var xre=nL(),SXe=iL(),PXe=sL(),xXe=$S(),bXe=oL(),bre=TI(),Qre=Hl(),QXe=gre(),kXe=LI(),FXe=OS(),RXe=il(),TXe=aL(),NXe=KS(),kre=lL(),LXe=Pre();function OXe(e,t,r,o,a,n,u){var A=kre(e,r),p=kre(t,r),h=u.get(p);if(h){xre(e,r,h);return}var w=n?n(A,p,r+"",e,t,u):void 0,I=w===void 0;if(I){var v=Qre(p),b=!v&&kXe(p),E=!v&&!b&&NXe(p);w=p,v||b||E?Qre(A)?w=A:QXe(A)?w=xXe(A):b?(I=!1,w=SXe(p,!0)):E?(I=!1,w=PXe(p,!0)):w=[]:TXe(p)||bre(p)?(w=A,bre(A)?w=LXe(A):(!RXe(A)||FXe(A))&&(w=bXe(p))):I=!1}I&&(u.set(p,w),a(w,p,o,n,u),u.delete(p)),xre(e,r,w)}Fre.exports=OXe});var Lre=_((RRt,Nre)=>{var MXe=_S(),UXe=nL(),_Xe=ere(),HXe=Rre(),jXe=il(),qXe=qy(),GXe=lL();function Tre(e,t,r,o,a){e!==t&&_Xe(t,function(n,u){if(a||(a=new MXe),jXe(n))HXe(e,t,u,r,Tre,o,a);else{var A=o?o(GXe(e,u),n,u+"",e,t,a):void 0;A===void 0&&(A=n),UXe(e,u,A)}},qXe)}Nre.exports=Tre});var cL=_((TRt,Ore)=>{function YXe(e){return e}Ore.exports=YXe});var Ure=_((NRt,Mre)=>{function WXe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}Mre.exports=WXe});var uL=_((LRt,Hre)=>{var KXe=Ure(),_re=Math.max;function JXe(e,t,r){return t=_re(t===void 0?e.length-1:t,0),function(){for(var o=arguments,a=-1,n=_re(o.length-t,0),u=Array(n);++a<n;)u[a]=o[t+a];a=-1;for(var A=Array(t+1);++a<t;)A[a]=o[a];return A[t]=r(u),KXe(e,this,A)}}Hre.exports=JXe});var qre=_((ORt,jre)=>{function VXe(e){return function(){return e}}jre.exports=VXe});var Wre=_((MRt,Yre)=>{var zXe=qre(),Gre=rL(),XXe=cL(),ZXe=Gre?function(e,t){return Gre(e,"toString",{configurable:!0,enumerable:!1,value:zXe(t),writable:!0})}:XXe;Yre.exports=ZXe});var Jre=_((URt,Kre)=>{var $Xe=800,eZe=16,tZe=Date.now;function rZe(e){var t=0,r=0;return function(){var o=tZe(),a=eZe-(o-r);if(r=o,a>0){if(++t>=$Xe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}Kre.exports=rZe});var AL=_((_Rt,Vre)=>{var nZe=Wre(),iZe=Jre(),sZe=iZe(nZe);Vre.exports=sZe});var Xre=_((HRt,zre)=>{var oZe=cL(),aZe=uL(),lZe=AL();function cZe(e,t){return lZe(aZe(e,t,oZe),e+"")}zre.exports=cZe});var $re=_((jRt,Zre)=>{var uZe=Ty(),AZe=_I(),fZe=OI(),pZe=il();function hZe(e,t,r){if(!pZe(r))return!1;var o=typeof t;return(o=="number"?AZe(r)&&fZe(t,r.length):o=="string"&&t in r)?uZe(r[t],e):!1}Zre.exports=hZe});var tne=_((qRt,ene)=>{var gZe=Xre(),dZe=$re();function mZe(e){return gZe(function(t,r){var o=-1,a=r.length,n=a>1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(n=e.length>3&&typeof n=="function"?(a--,n):void 0,u&&dZe(r[0],r[1],u)&&(n=a<3?void 0:n,a=1),t=Object(t);++o<a;){var A=r[o];A&&e(t,A,o,n)}return t})}ene.exports=mZe});var nne=_((GRt,rne)=>{var yZe=Lre(),EZe=tne(),wZe=EZe(function(e,t,r,o){yZe(e,t,r,o)});rne.exports=wZe});var _e={};Jt(_e,{AsyncActions:()=>hL,BufferStream:()=>pL,CachingStrategy:()=>gne,DefaultStream:()=>gL,allSettledSafe:()=>Uc,assertNever:()=>mL,bufferStream:()=>Ky,buildIgnorePattern:()=>PZe,convertMapsToIndexableObjects:()=>nP,dynamicRequire:()=>Vp,escapeRegExp:()=>IZe,getArrayWithDefault:()=>Gy,getFactoryWithDefault:()=>_c,getMapWithDefault:()=>Yy,getSetWithDefault:()=>dd,groupBy:()=>wL,isIndexableObject:()=>fL,isPathLike:()=>xZe,isTaggedYarnVersion:()=>CZe,makeDeferred:()=>fne,mapAndFilter:()=>sl,mapAndFind:()=>GI,mergeIntoTarget:()=>mne,overrideType:()=>BZe,parseBoolean:()=>YI,parseInt:()=>Jy,parseOptionalBoolean:()=>dne,plural:()=>rP,prettifyAsyncErrors:()=>Wy,prettifySyncErrors:()=>yL,releaseAfterUseAsync:()=>DZe,replaceEnvVariables:()=>iP,sortMap:()=>ks,toMerged:()=>bZe,tryParseOptionalBoolean:()=>EL,validateEnum:()=>vZe});function CZe(e){return!!(cne.default.valid(e)&&e.match(/^[^-]+(-rc\.[0-9]+)?$/))}function rP(e,{one:t,more:r,zero:o=r}){return e===0?o:e===1?t:r}function IZe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function BZe(e){}function mL(e){throw new Error(`Assertion failed: Unexpected object '${e}'`)}function vZe(e,t){let r=Object.values(e);if(!r.includes(t))throw new it(`Invalid value for enumeration: ${JSON.stringify(t)} (expected one of ${r.map(o=>JSON.stringify(o)).join(", ")})`);return t}function sl(e,t){let r=[];for(let o of e){let a=t(o);a!==une&&r.push(a)}return r}function GI(e,t){for(let r of e){let o=t(r);if(o!==Ane)return o}}function fL(e){return typeof e=="object"&&e!==null}async function Uc(e){let t=await Promise.allSettled(e),r=[];for(let o of t){if(o.status==="rejected")throw o.reason;r.push(o.value)}return r}function nP(e){if(e instanceof Map&&(e=Object.fromEntries(e)),fL(e))for(let t of Object.keys(e)){let r=e[t];fL(r)&&(e[t]=nP(r))}return e}function _c(e,t,r){let o=e.get(t);return typeof o>"u"&&e.set(t,o=r()),o}function Gy(e,t){let r=e.get(t);return typeof r>"u"&&e.set(t,r=[]),r}function dd(e,t){let r=e.get(t);return typeof r>"u"&&e.set(t,r=new Set),r}function Yy(e,t){let r=e.get(t);return typeof r>"u"&&e.set(t,r=new Map),r}async function DZe(e,t){if(t==null)return await e();try{return await e()}finally{await t()}}async function Wy(e,t){try{return await e()}catch(r){throw r.message=t(r.message),r}}function yL(e,t){try{return e()}catch(r){throw r.message=t(r.message),r}}async function Ky(e){return await new Promise((t,r)=>{let o=[];e.on("error",a=>{r(a)}),e.on("data",a=>{o.push(a)}),e.on("end",()=>{t(Buffer.concat(o))})})}function fne(){let e,t;return{promise:new Promise((o,a)=>{e=o,t=a}),resolve:e,reject:t}}function pne(e){return qI(Ae.fromPortablePath(e))}function hne(path){let physicalPath=Ae.fromPortablePath(path),currentCacheEntry=qI.cache[physicalPath];delete qI.cache[physicalPath];let result;try{result=pne(physicalPath);let freshCacheEntry=qI.cache[physicalPath],dynamicModule=eval("module"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{qI.cache[physicalPath]=currentCacheEntry}return result}function SZe(e){let t=ine.get(e),r=ae.statSync(e);if(t?.mtime===r.mtimeMs)return t.instance;let o=hne(e);return ine.set(e,{mtime:r.mtimeMs,instance:o}),o}function Vp(e,{cachingStrategy:t=2}={}){switch(t){case 0:return hne(e);case 1:return SZe(e);case 2:return pne(e);default:throw new Error("Unsupported caching strategy")}}function ks(e,t){let r=Array.from(e);Array.isArray(t)||(t=[t]);let o=[];for(let n of t)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function PZe(e){return e.length===0?null:e.map(t=>`(${ane.default.makeRe(t,{windows:!1,dot:!0}).source})`).join("|")}function iP(e,{env:t}){let r=/\${(?<variableName>[\d\w_]+)(?<colon>:)?(?:-(?<fallback>[^}]*))?}/g;return e.replace(r,(...o)=>{let{variableName:a,colon:n,fallback:u}=o[o.length-1],A=Object.hasOwn(t,a),p=t[a];if(p||A&&!n)return p;if(u!=null)return u;throw new it(`Environment variable not found (${a})`)})}function YI(e){switch(e){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${e}" as a boolean`)}}function dne(e){return typeof e>"u"?e:YI(e)}function EL(e){try{return dne(e)}catch{return null}}function xZe(e){return!!(Ae.isAbsolute(e)||e.match(/^(\.{1,2}|~)\//))}function mne(e,...t){let r=u=>({value:u}),o=r(e),a=t.map(u=>r(u)),{value:n}=(0,one.default)(o,...a,(u,A)=>{if(Array.isArray(u)&&Array.isArray(A)){for(let p of A)u.find(h=>(0,sne.default)(h,p))||u.push(p);return u}});return n}function bZe(...e){return mne({},...e)}function wL(e,t){let r=Object.create(null);for(let o of e){let a=o[t];r[a]??=[],r[a].push(o)}return r}function Jy(e){return typeof e=="string"?Number.parseInt(e,10):e}var sne,one,ane,lne,cne,dL,une,Ane,pL,hL,gL,qI,ine,gne,jl=yt(()=>{St();qt();sne=$e(Wte()),one=$e(nne()),ane=$e(Zo()),lne=$e(nd()),cne=$e(Zn()),dL=Ie("stream");une=Symbol();sl.skip=une;Ane=Symbol();GI.skip=Ane;pL=class extends dL.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,o,a){if(o!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};hL=class{constructor(t){this.deferred=new Map;this.promises=new Map;this.limit=(0,lne.default)(t)}set(t,r){let o=this.deferred.get(t);typeof o>"u"&&this.deferred.set(t,o=fne());let a=this.limit(()=>r());return this.promises.set(t,a),a.then(()=>{this.promises.get(t)===a&&o.resolve()},n=>{this.promises.get(t)===a&&o.reject(n)}),o.promise}reduce(t,r){let o=this.promises.get(t)??Promise.resolve();this.set(t,()=>r(o))}async wait(){await Promise.all(this.promises.values())}},gL=class extends dL.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,o,a){if(o!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},qI=eval("require");ine=new Map;gne=(o=>(o[o.NoCache=0]="NoCache",o[o.FsTime=1]="FsTime",o[o.Node=2]="Node",o))(gne||{})});var Vy,CL,IL,yne=yt(()=>{Vy=(r=>(r.HARD="HARD",r.SOFT="SOFT",r))(Vy||{}),CL=(o=>(o.Dependency="Dependency",o.PeerDependency="PeerDependency",o.PeerDependencyMeta="PeerDependencyMeta",o))(CL||{}),IL=(o=>(o.Inactive="inactive",o.Redundant="redundant",o.Active="active",o))(IL||{})});var ye={};Jt(ye,{LogLevel:()=>cP,Style:()=>oP,Type:()=>Et,addLogFilterSupport:()=>JI,applyColor:()=>zs,applyHyperlink:()=>Xy,applyStyle:()=>md,json:()=>yd,jsonOrPretty:()=>FZe,mark:()=>PL,pretty:()=>_t,prettyField:()=>Zu,prettyList:()=>SL,prettyTruncatedLocatorList:()=>lP,stripAnsi:()=>zy.default,supportsColor:()=>aP,supportsHyperlinks:()=>DL,tuple:()=>Hc});function Ene(e){let t=["KiB","MiB","GiB","TiB"],r=t.length;for(;r>1&&e<1024**r;)r-=1;let o=1024**r;return`${Math.floor(e*100/o)/100} ${t[r-1]}`}function Hc(e,t){return[t,e]}function md(e,t,r){return e.get("enableColors")&&r&2&&(t=KI.default.bold(t)),t}function zs(e,t,r){if(!e.get("enableColors"))return t;let o=QZe.get(r);if(o===null)return t;let a=typeof o>"u"?r:vL.level>=3?o[0]:o[1],n=typeof a=="number"?BL.ansi256(a):a.startsWith("#")?BL.hex(a):BL[a];if(typeof n!="function")throw new Error(`Invalid format type ${a}`);return n(t)}function Xy(e,t,r){return e.get("enableHyperlinks")?kZe?`\x1B]8;;${r}\x1B\\${t}\x1B]8;;\x1B\\`:`\x1B]8;;${r}\x07${t}\x1B]8;;\x07`:t}function _t(e,t,r){if(t===null)return zs(e,"null",Et.NULL);if(Object.hasOwn(sP,r))return sP[r].pretty(e,t);if(typeof t!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return zs(e,t,r)}function SL(e,t,r,{separator:o=", "}={}){return[...t].map(a=>_t(e,a,r)).join(o)}function yd(e,t){if(e===null)return null;if(Object.hasOwn(sP,t))return sP[t].json(e);if(typeof e!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return e}function FZe(e,t,[r,o]){return e?yd(r,o):_t(t,r,o)}function PL(e){return{Check:zs(e,"\u2713","green"),Cross:zs(e,"\u2718","red"),Question:zs(e,"?","cyan")}}function Zu(e,{label:t,value:[r,o]}){return`${_t(e,t,Et.CODE)}: ${_t(e,r,o)}`}function lP(e,t,r){let o=[],a=[...t],n=r;for(;a.length>0;){let h=a[0],w=`${jr(e,h)}, `,I=xL(h).length+2;if(o.length>0&&n<I)break;o.push([w,I]),n-=I,a.shift()}if(a.length===0)return o.map(([h])=>h).join("").slice(0,-2);let u="X".repeat(a.length.toString().length),A=`and ${u} more`,p=a.length;for(;o.length>1&&n<A.length;)n+=o[o.length-1][1],p+=1,o.pop();return[o.map(([h])=>h).join(""),A.replace(u,_t(e,p,Et.NUMBER))].join("")}function JI(e,{configuration:t}){let r=t.get("logFilters"),o=new Map,a=new Map,n=[];for(let I of r){let v=I.get("level");if(typeof v>"u")continue;let b=I.get("code");typeof b<"u"&&o.set(b,v);let E=I.get("text");typeof E<"u"&&a.set(E,v);let R=I.get("pattern");typeof R<"u"&&n.push([wne.default.matcher(R,{contains:!0}),v])}n.reverse();let u=(I,v,b)=>{if(I===null||I===0)return b;let E=a.size>0||n.length>0?(0,zy.default)(v):v;if(a.size>0){let R=a.get(E);if(typeof R<"u")return R??b}if(n.length>0){for(let[R,N]of n)if(R(E))return N??b}if(o.size>0){let R=o.get(Ju(I));if(typeof R<"u")return R??b}return b},A=e.reportInfo,p=e.reportWarning,h=e.reportError,w=function(I,v,b,E){switch(u(v,b,E)){case"info":A.call(I,v,b);break;case"warning":p.call(I,v??0,b);break;case"error":h.call(I,v??0,b);break}};e.reportInfo=function(...I){return w(this,...I,"info")},e.reportWarning=function(...I){return w(this,...I,"warning")},e.reportError=function(...I){return w(this,...I,"error")}}var KI,WI,wne,zy,Cne,Et,oP,vL,aP,DL,BL,QZe,Po,sP,kZe,cP,ql=yt(()=>{St();KI=$e(CN()),WI=$e($g());qt();wne=$e(Zo()),zy=$e(LS()),Cne=Ie("util");AS();xo();Et={NO_HINT:"NO_HINT",ID:"ID",NULL:"NULL",SCOPE:"SCOPE",NAME:"NAME",RANGE:"RANGE",REFERENCE:"REFERENCE",NUMBER:"NUMBER",PATH:"PATH",URL:"URL",ADDED:"ADDED",REMOVED:"REMOVED",CODE:"CODE",INSPECT:"INSPECT",DURATION:"DURATION",SIZE:"SIZE",SIZE_DIFF:"SIZE_DIFF",IDENT:"IDENT",DESCRIPTOR:"DESCRIPTOR",LOCATOR:"LOCATOR",RESOLUTION:"RESOLUTION",DEPENDENT:"DEPENDENT",PACKAGE_EXTENSION:"PACKAGE_EXTENSION",SETTING:"SETTING",MARKDOWN:"MARKDOWN",MARKDOWN_INLINE:"MARKDOWN_INLINE"},oP=(t=>(t[t.BOLD=2]="BOLD",t))(oP||{}),vL=WI.default.GITHUB_ACTIONS?{level:2}:KI.default.supportsColor?{level:KI.default.supportsColor.level}:{level:0},aP=vL.level!==0,DL=aP&&!WI.default.GITHUB_ACTIONS&&!WI.default.CIRCLE&&!WI.default.GITLAB,BL=new KI.default.Instance(vL),QZe=new Map([[Et.NO_HINT,null],[Et.NULL,["#a853b5",129]],[Et.SCOPE,["#d75f00",166]],[Et.NAME,["#d7875f",173]],[Et.RANGE,["#00afaf",37]],[Et.REFERENCE,["#87afff",111]],[Et.NUMBER,["#ffd700",220]],[Et.PATH,["#d75fd7",170]],[Et.URL,["#d75fd7",170]],[Et.ADDED,["#5faf00",70]],[Et.REMOVED,["#ff3131",160]],[Et.CODE,["#87afff",111]],[Et.SIZE,["#ffd700",220]]]),Po=e=>e;sP={[Et.ID]:Po({pretty:(e,t)=>typeof t=="number"?zs(e,`${t}`,Et.NUMBER):zs(e,t,Et.CODE),json:e=>e}),[Et.INSPECT]:Po({pretty:(e,t)=>(0,Cne.inspect)(t,{depth:1/0,colors:e.get("enableColors"),compact:!0,breakLength:1/0}),json:e=>e}),[Et.NUMBER]:Po({pretty:(e,t)=>zs(e,`${t}`,Et.NUMBER),json:e=>e}),[Et.IDENT]:Po({pretty:(e,t)=>ls(e,t),json:e=>An(e)}),[Et.LOCATOR]:Po({pretty:(e,t)=>jr(e,t),json:e=>xa(e)}),[Et.DESCRIPTOR]:Po({pretty:(e,t)=>jn(e,t),json:e=>Pa(e)}),[Et.RESOLUTION]:Po({pretty:(e,{descriptor:t,locator:r})=>VI(e,t,r),json:({descriptor:e,locator:t})=>({descriptor:Pa(e),locator:t!==null?xa(t):null})}),[Et.DEPENDENT]:Po({pretty:(e,{locator:t,descriptor:r})=>bL(e,t,r),json:({locator:e,descriptor:t})=>({locator:xa(e),descriptor:Pa(t)})}),[Et.PACKAGE_EXTENSION]:Po({pretty:(e,t)=>{switch(t.type){case"Dependency":return`${ls(e,t.parentDescriptor)} \u27A4 ${zs(e,"dependencies",Et.CODE)} \u27A4 ${ls(e,t.descriptor)}`;case"PeerDependency":return`${ls(e,t.parentDescriptor)} \u27A4 ${zs(e,"peerDependencies",Et.CODE)} \u27A4 ${ls(e,t.descriptor)}`;case"PeerDependencyMeta":return`${ls(e,t.parentDescriptor)} \u27A4 ${zs(e,"peerDependenciesMeta",Et.CODE)} \u27A4 ${ls(e,Xs(t.selector))} \u27A4 ${zs(e,t.key,Et.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}},json:e=>{switch(e.type){case"Dependency":return`${An(e.parentDescriptor)} > ${An(e.descriptor)}`;case"PeerDependency":return`${An(e.parentDescriptor)} >> ${An(e.descriptor)}`;case"PeerDependencyMeta":return`${An(e.parentDescriptor)} >> ${e.selector} / ${e.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}}}),[Et.SETTING]:Po({pretty:(e,t)=>(e.get(t),Xy(e,zs(e,t,Et.CODE),`https://yarnpkg.com/configuration/yarnrc#${t}`)),json:e=>e}),[Et.DURATION]:Po({pretty:(e,t)=>{if(t>1e3*60){let r=Math.floor(t/1e3/60),o=Math.ceil((t-r*60*1e3)/1e3);return o===0?`${r}m`:`${r}m ${o}s`}else{let r=Math.floor(t/1e3),o=t-r*1e3;return o===0?`${r}s`:`${r}s ${o}ms`}},json:e=>e}),[Et.SIZE]:Po({pretty:(e,t)=>zs(e,Ene(t),Et.NUMBER),json:e=>e}),[Et.SIZE_DIFF]:Po({pretty:(e,t)=>{let r=t>=0?"+":"-",o=r==="+"?Et.REMOVED:Et.ADDED;return zs(e,`${r} ${Ene(Math.max(Math.abs(t),1))}`,o)},json:e=>e}),[Et.PATH]:Po({pretty:(e,t)=>zs(e,Ae.fromPortablePath(t),Et.PATH),json:e=>Ae.fromPortablePath(e)}),[Et.MARKDOWN]:Po({pretty:(e,{text:t,format:r,paragraphs:o})=>Do(t,{format:r,paragraphs:o}),json:({text:e})=>e}),[Et.MARKDOWN_INLINE]:Po({pretty:(e,t)=>(t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(r,o,a)=>_t(e,o+a+o,Et.CODE)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(r,o,a)=>md(e,a,2)),t),json:e=>e})};kZe=!!process.env.KONSOLE_VERSION;cP=(a=>(a.Error="error",a.Warning="warning",a.Info="info",a.Discard="discard",a))(cP||{})});var Ine=_(Zy=>{"use strict";Object.defineProperty(Zy,"__esModule",{value:!0});Zy.splitWhen=Zy.flatten=void 0;function RZe(e){return e.reduce((t,r)=>[].concat(t,r),[])}Zy.flatten=RZe;function TZe(e,t){let r=[[]],o=0;for(let a of e)t(a)?(o++,r[o]=[]):r[o].push(a);return r}Zy.splitWhen=TZe});var Bne=_(uP=>{"use strict";Object.defineProperty(uP,"__esModule",{value:!0});uP.isEnoentCodeError=void 0;function NZe(e){return e.code==="ENOENT"}uP.isEnoentCodeError=NZe});var vne=_(AP=>{"use strict";Object.defineProperty(AP,"__esModule",{value:!0});AP.createDirentFromStats=void 0;var QL=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function LZe(e,t){return new QL(e,t)}AP.createDirentFromStats=LZe});var Dne=_($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.removeLeadingDotSegment=$u.escape=$u.makeAbsolute=$u.unixify=void 0;var OZe=Ie("path"),MZe=2,UZe=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function _Ze(e){return e.replace(/\\/g,"/")}$u.unixify=_Ze;function HZe(e,t){return OZe.resolve(e,t)}$u.makeAbsolute=HZe;function jZe(e){return e.replace(UZe,"\\$2")}$u.escape=jZe;function qZe(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(MZe)}return e}$u.removeLeadingDotSegment=qZe});var Pne=_((sTt,Sne)=>{Sne.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var Qne=_((oTt,bne)=>{var GZe=Pne(),xne={"{":"}","(":")","[":"]"},YZe=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,o=-2,a=-2,n=-2,u=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||o!==-1&&e[t]==="["&&e[t+1]!=="]"&&(o<t&&(o=e.indexOf("]",t)),o>t&&(u===-1||u>o||(u=e.indexOf("\\",t),u===-1||u>o)))||a!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(a=e.indexOf("}",t),a>t&&(u=e.indexOf("\\",t),u===-1||u>a))||n!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(n=e.indexOf(")",t),n>t&&(u=e.indexOf("\\",t),u===-1||u>n))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(n=e.indexOf(")",r),n>r&&(u=e.indexOf("\\",r),u===-1||u>n))))return!0;if(e[t]==="\\"){var A=e[t+1];t+=2;var p=xne[A];if(p){var h=e.indexOf(p,t);h!==-1&&(t=h+1)}if(e[t]==="!")return!0}else t++}return!1},WZe=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var o=xne[r];if(o){var a=e.indexOf(o,t);a!==-1&&(t=a+1)}if(e[t]==="!")return!0}else t++}return!1};bne.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(GZe(t))return!0;var o=YZe;return r&&r.strict===!1&&(o=WZe),o(t)}});var Fne=_((aTt,kne)=>{"use strict";var KZe=Qne(),JZe=Ie("path").posix.dirname,VZe=Ie("os").platform()==="win32",kL="/",zZe=/\\/g,XZe=/[\{\[].*[\}\]]$/,ZZe=/(^|[^\\])([\{\[]|\([^\)]+$)/,$Ze=/\\([\!\*\?\|\[\]\(\)\{\}])/g;kne.exports=function(t,r){var o=Object.assign({flipBackslashes:!0},r);o.flipBackslashes&&VZe&&t.indexOf(kL)<0&&(t=t.replace(zZe,kL)),XZe.test(t)&&(t+=kL),t+="a";do t=JZe(t);while(KZe(t)||ZZe.test(t));return t.replace($Ze,"$1")}});var _ne=_(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.matchAny=Hr.convertPatternsToRe=Hr.makeRe=Hr.getPatternParts=Hr.expandBraceExpansion=Hr.expandPatternsWithBraceExpansion=Hr.isAffectDepthOfReadingPattern=Hr.endsWithSlashGlobStar=Hr.hasGlobStar=Hr.getBaseDirectory=Hr.isPatternRelatedToParentDirectory=Hr.getPatternsOutsideCurrentDirectory=Hr.getPatternsInsideCurrentDirectory=Hr.getPositivePatterns=Hr.getNegativePatterns=Hr.isPositivePattern=Hr.isNegativePattern=Hr.convertToNegativePattern=Hr.convertToPositivePattern=Hr.isDynamicPattern=Hr.isStaticPattern=void 0;var e$e=Ie("path"),t$e=Fne(),FL=Zo(),Rne="**",r$e="\\",n$e=/[*?]|^!/,i$e=/\[[^[]*]/,s$e=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o$e=/[!*+?@]\([^(]*\)/,a$e=/,|\.\./;function Tne(e,t={}){return!Nne(e,t)}Hr.isStaticPattern=Tne;function Nne(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(r$e)||n$e.test(e)||i$e.test(e)||s$e.test(e)||t.extglob!==!1&&o$e.test(e)||t.braceExpansion!==!1&&l$e(e))}Hr.isDynamicPattern=Nne;function l$e(e){let t=e.indexOf("{");if(t===-1)return!1;let r=e.indexOf("}",t+1);if(r===-1)return!1;let o=e.slice(t,r);return a$e.test(o)}function c$e(e){return fP(e)?e.slice(1):e}Hr.convertToPositivePattern=c$e;function u$e(e){return"!"+e}Hr.convertToNegativePattern=u$e;function fP(e){return e.startsWith("!")&&e[1]!=="("}Hr.isNegativePattern=fP;function Lne(e){return!fP(e)}Hr.isPositivePattern=Lne;function A$e(e){return e.filter(fP)}Hr.getNegativePatterns=A$e;function f$e(e){return e.filter(Lne)}Hr.getPositivePatterns=f$e;function p$e(e){return e.filter(t=>!RL(t))}Hr.getPatternsInsideCurrentDirectory=p$e;function h$e(e){return e.filter(RL)}Hr.getPatternsOutsideCurrentDirectory=h$e;function RL(e){return e.startsWith("..")||e.startsWith("./..")}Hr.isPatternRelatedToParentDirectory=RL;function g$e(e){return t$e(e,{flipBackslashes:!1})}Hr.getBaseDirectory=g$e;function d$e(e){return e.includes(Rne)}Hr.hasGlobStar=d$e;function One(e){return e.endsWith("/"+Rne)}Hr.endsWithSlashGlobStar=One;function m$e(e){let t=e$e.basename(e);return One(e)||Tne(t)}Hr.isAffectDepthOfReadingPattern=m$e;function y$e(e){return e.reduce((t,r)=>t.concat(Mne(r)),[])}Hr.expandPatternsWithBraceExpansion=y$e;function Mne(e){return FL.braces(e,{expand:!0,nodupes:!0})}Hr.expandBraceExpansion=Mne;function E$e(e,t){let{parts:r}=FL.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return r.length===0&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}Hr.getPatternParts=E$e;function Une(e,t){return FL.makeRe(e,t)}Hr.makeRe=Une;function w$e(e,t){return e.map(r=>Une(r,t))}Hr.convertPatternsToRe=w$e;function C$e(e,t){return t.some(r=>r.test(e))}Hr.matchAny=C$e});var Gne=_((cTt,qne)=>{"use strict";var I$e=Ie("stream"),Hne=I$e.PassThrough,B$e=Array.prototype.slice;qne.exports=v$e;function v$e(){let e=[],t=B$e.call(arguments),r=!1,o=t[t.length-1];o&&!Array.isArray(o)&&o.pipe==null?t.pop():o={};let a=o.end!==!1,n=o.pipeError===!0;o.objectMode==null&&(o.objectMode=!0),o.highWaterMark==null&&(o.highWaterMark=64*1024);let u=Hne(o);function A(){for(let w=0,I=arguments.length;w<I;w++)e.push(jne(arguments[w],o));return p(),this}function p(){if(r)return;r=!0;let w=e.shift();if(!w){process.nextTick(h);return}Array.isArray(w)||(w=[w]);let I=w.length+1;function v(){--I>0||(r=!1,p())}function b(E){function R(){E.removeListener("merge2UnpipeEnd",R),E.removeListener("end",R),n&&E.removeListener("error",N),v()}function N(U){u.emit("error",U)}if(E._readableState.endEmitted)return v();E.on("merge2UnpipeEnd",R),E.on("end",R),n&&E.on("error",N),E.pipe(u,{end:!1}),E.resume()}for(let E=0;E<w.length;E++)b(w[E]);v()}function h(){r=!1,u.emit("queueDrain"),a&&u.end()}return u.setMaxListeners(0),u.add=A,u.on("unpipe",function(w){w.emit("merge2UnpipeEnd")}),t.length&&A.apply(null,t),u}function jne(e,t){if(Array.isArray(e))for(let r=0,o=e.length;r<o;r++)e[r]=jne(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(Hne(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var Wne=_(pP=>{"use strict";Object.defineProperty(pP,"__esModule",{value:!0});pP.merge=void 0;var D$e=Gne();function S$e(e){let t=D$e(e);return e.forEach(r=>{r.once("error",o=>t.emit("error",o))}),t.once("close",()=>Yne(e)),t.once("end",()=>Yne(e)),t}pP.merge=S$e;function Yne(e){e.forEach(t=>t.emit("close"))}});var Kne=_($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.isEmpty=$y.isString=void 0;function P$e(e){return typeof e=="string"}$y.isString=P$e;function x$e(e){return e===""}$y.isEmpty=x$e});var Df=_(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.string=bo.stream=bo.pattern=bo.path=bo.fs=bo.errno=bo.array=void 0;var b$e=Ine();bo.array=b$e;var Q$e=Bne();bo.errno=Q$e;var k$e=vne();bo.fs=k$e;var F$e=Dne();bo.path=F$e;var R$e=_ne();bo.pattern=R$e;var T$e=Wne();bo.stream=T$e;var N$e=Kne();bo.string=N$e});var zne=_(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.convertPatternGroupToTask=Qo.convertPatternGroupsToTasks=Qo.groupPatternsByBaseDirectory=Qo.getNegativePatternsAsPositive=Qo.getPositivePatterns=Qo.convertPatternsToTasks=Qo.generate=void 0;var Sf=Df();function L$e(e,t){let r=Jne(e),o=Vne(e,t.ignore),a=r.filter(p=>Sf.pattern.isStaticPattern(p,t)),n=r.filter(p=>Sf.pattern.isDynamicPattern(p,t)),u=TL(a,o,!1),A=TL(n,o,!0);return u.concat(A)}Qo.generate=L$e;function TL(e,t,r){let o=[],a=Sf.pattern.getPatternsOutsideCurrentDirectory(e),n=Sf.pattern.getPatternsInsideCurrentDirectory(e),u=NL(a),A=NL(n);return o.push(...LL(u,t,r)),"."in A?o.push(OL(".",n,t,r)):o.push(...LL(A,t,r)),o}Qo.convertPatternsToTasks=TL;function Jne(e){return Sf.pattern.getPositivePatterns(e)}Qo.getPositivePatterns=Jne;function Vne(e,t){return Sf.pattern.getNegativePatterns(e).concat(t).map(Sf.pattern.convertToPositivePattern)}Qo.getNegativePatternsAsPositive=Vne;function NL(e){let t={};return e.reduce((r,o)=>{let a=Sf.pattern.getBaseDirectory(o);return a in r?r[a].push(o):r[a]=[o],r},t)}Qo.groupPatternsByBaseDirectory=NL;function LL(e,t,r){return Object.keys(e).map(o=>OL(o,e[o],t,r))}Qo.convertPatternGroupsToTasks=LL;function OL(e,t,r,o){return{dynamic:o,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(Sf.pattern.convertToNegativePattern))}}Qo.convertPatternGroupToTask=OL});var Zne=_(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.removeDuplicateSlashes=eE.transform=void 0;var O$e=/(?!^)\/{2,}/g;function M$e(e){return e.map(t=>Xne(t))}eE.transform=M$e;function Xne(e){return e.replace(O$e,"/")}eE.removeDuplicateSlashes=Xne});var eie=_(hP=>{"use strict";Object.defineProperty(hP,"__esModule",{value:!0});hP.read=void 0;function U$e(e,t,r){t.fs.lstat(e,(o,a)=>{if(o!==null){$ne(r,o);return}if(!a.isSymbolicLink()||!t.followSymbolicLink){ML(r,a);return}t.fs.stat(e,(n,u)=>{if(n!==null){if(t.throwErrorOnBrokenSymbolicLink){$ne(r,n);return}ML(r,a);return}t.markSymbolicLink&&(u.isSymbolicLink=()=>!0),ML(r,u)})})}hP.read=U$e;function $ne(e,t){e(t)}function ML(e,t){e(null,t)}});var tie=_(gP=>{"use strict";Object.defineProperty(gP,"__esModule",{value:!0});gP.read=void 0;function _$e(e,t){let r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{let o=t.fs.statSync(e);return t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),o}catch(o){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw o}}gP.read=_$e});var rie=_(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});zp.createFileSystemAdapter=zp.FILE_SYSTEM_ADAPTER=void 0;var dP=Ie("fs");zp.FILE_SYSTEM_ADAPTER={lstat:dP.lstat,stat:dP.stat,lstatSync:dP.lstatSync,statSync:dP.statSync};function H$e(e){return e===void 0?zp.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},zp.FILE_SYSTEM_ADAPTER),e)}zp.createFileSystemAdapter=H$e});var nie=_(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var j$e=rie(),UL=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=j$e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,r){return t??r}};_L.default=UL});var Ed=_(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});Xp.statSync=Xp.stat=Xp.Settings=void 0;var iie=eie(),q$e=tie(),HL=nie();Xp.Settings=HL.default;function G$e(e,t,r){if(typeof t=="function"){iie.read(e,jL(),t);return}iie.read(e,jL(t),r)}Xp.stat=G$e;function Y$e(e,t){let r=jL(t);return q$e.read(e,r)}Xp.statSync=Y$e;function jL(e={}){return e instanceof HL.default?e:new HL.default(e)}});var oie=_((wTt,sie)=>{sie.exports=W$e;function W$e(e,t){var r,o,a,n=!0;Array.isArray(e)?(r=[],o=e.length):(a=Object.keys(e),r={},o=a.length);function u(p){function h(){t&&t(p,r),t=null}n?process.nextTick(h):h()}function A(p,h,w){r[p]=w,(--o===0||h)&&u(h)}o?a?a.forEach(function(p){e[p](function(h,w){A(p,h,w)})}):e.forEach(function(p,h){p(function(w,I){A(h,w,I)})}):u(null),n=!1}});var qL=_(yP=>{"use strict";Object.defineProperty(yP,"__esModule",{value:!0});yP.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var mP=process.versions.node.split(".");if(mP[0]===void 0||mP[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var aie=Number.parseInt(mP[0],10),K$e=Number.parseInt(mP[1],10),lie=10,J$e=10,V$e=aie>lie,z$e=aie===lie&&K$e>=J$e;yP.IS_SUPPORT_READDIR_WITH_FILE_TYPES=V$e||z$e});var cie=_(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0});EP.createDirentFromStats=void 0;var YL=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function X$e(e,t){return new YL(e,t)}EP.createDirentFromStats=X$e});var WL=_(wP=>{"use strict";Object.defineProperty(wP,"__esModule",{value:!0});wP.fs=void 0;var Z$e=cie();wP.fs=Z$e});var KL=_(CP=>{"use strict";Object.defineProperty(CP,"__esModule",{value:!0});CP.joinPathSegments=void 0;function $$e(e,t,r){return e.endsWith(r)?e+t:e+r+t}CP.joinPathSegments=$$e});var gie=_(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.readdir=Zp.readdirWithFileTypes=Zp.read=void 0;var eet=Ed(),uie=oie(),tet=qL(),Aie=WL(),fie=KL();function ret(e,t,r){if(!t.stats&&tet.IS_SUPPORT_READDIR_WITH_FILE_TYPES){pie(e,t,r);return}hie(e,t,r)}Zp.read=ret;function pie(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(o,a)=>{if(o!==null){IP(r,o);return}let n=a.map(A=>({dirent:A,name:A.name,path:fie.joinPathSegments(e,A.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){JL(r,n);return}let u=n.map(A=>net(A,t));uie(u,(A,p)=>{if(A!==null){IP(r,A);return}JL(r,p)})})}Zp.readdirWithFileTypes=pie;function net(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,(o,a)=>{if(o!==null){if(t.throwErrorOnBrokenSymbolicLink){r(o);return}r(null,e);return}e.dirent=Aie.fs.createDirentFromStats(e.name,a),r(null,e)})}}function hie(e,t,r){t.fs.readdir(e,(o,a)=>{if(o!==null){IP(r,o);return}let n=a.map(u=>{let A=fie.joinPathSegments(e,u,t.pathSegmentSeparator);return p=>{eet.stat(A,t.fsStatSettings,(h,w)=>{if(h!==null){p(h);return}let I={name:u,path:A,dirent:Aie.fs.createDirentFromStats(u,w)};t.stats&&(I.stats=w),p(null,I)})}});uie(n,(u,A)=>{if(u!==null){IP(r,u);return}JL(r,A)})})}Zp.readdir=hie;function IP(e,t){e(t)}function JL(e,t){e(null,t)}});var wie=_($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.readdir=$p.readdirWithFileTypes=$p.read=void 0;var iet=Ed(),set=qL(),die=WL(),mie=KL();function oet(e,t){return!t.stats&&set.IS_SUPPORT_READDIR_WITH_FILE_TYPES?yie(e,t):Eie(e,t)}$p.read=oet;function yie(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{let a={dirent:o,name:o.name,path:mie.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let n=t.fs.statSync(a.path);a.dirent=die.fs.createDirentFromStats(a.name,n)}catch(n){if(t.throwErrorOnBrokenSymbolicLink)throw n}return a})}$p.readdirWithFileTypes=yie;function Eie(e,t){return t.fs.readdirSync(e).map(o=>{let a=mie.joinPathSegments(e,o,t.pathSegmentSeparator),n=iet.statSync(a,t.fsStatSettings),u={name:o,path:a,dirent:die.fs.createDirentFromStats(o,n)};return t.stats&&(u.stats=n),u})}$p.readdir=Eie});var Cie=_(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});eh.createFileSystemAdapter=eh.FILE_SYSTEM_ADAPTER=void 0;var tE=Ie("fs");eh.FILE_SYSTEM_ADAPTER={lstat:tE.lstat,stat:tE.stat,lstatSync:tE.lstatSync,statSync:tE.statSync,readdir:tE.readdir,readdirSync:tE.readdirSync};function aet(e){return e===void 0?eh.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},eh.FILE_SYSTEM_ADAPTER),e)}eh.createFileSystemAdapter=aet});var Iie=_(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});var cet=Ie("path"),uet=Ed(),Aet=Cie(),VL=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Aet.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,cet.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new uet.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};zL.default=VL});var BP=_(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});th.Settings=th.scandirSync=th.scandir=void 0;var Bie=gie(),fet=wie(),XL=Iie();th.Settings=XL.default;function pet(e,t,r){if(typeof t=="function"){Bie.read(e,ZL(),t);return}Bie.read(e,ZL(t),r)}th.scandir=pet;function het(e,t){let r=ZL(t);return fet.read(e,r)}th.scandirSync=het;function ZL(e={}){return e instanceof XL.default?e:new XL.default(e)}});var Die=_((QTt,vie)=>{"use strict";function get(e){var t=new e,r=t;function o(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n}function a(n){r.next=n,r=n}return{get:o,release:a}}vie.exports=get});var Pie=_((kTt,$L)=>{"use strict";var det=Die();function Sie(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var o=det(met),a=null,n=null,u=0,A=null,p={push:R,drain:Gl,saturated:Gl,pause:w,paused:!1,concurrency:r,running:h,resume:b,idle:E,length:I,getQueue:v,unshift:N,empty:Gl,kill:V,killAndDrain:ee,error:le};return p;function h(){return u}function w(){p.paused=!0}function I(){for(var fe=a,de=0;fe;)fe=fe.next,de++;return de}function v(){for(var fe=a,de=[];fe;)de.push(fe.value),fe=fe.next;return de}function b(){if(!!p.paused){p.paused=!1;for(var fe=0;fe<p.concurrency;fe++)u++,U()}}function E(){return u===0&&p.length()===0}function R(fe,de){var ge=o.get();ge.context=e,ge.release=U,ge.value=fe,ge.callback=de||Gl,ge.errorHandler=A,u===p.concurrency||p.paused?n?(n.next=ge,n=ge):(a=ge,n=ge,p.saturated()):(u++,t.call(e,ge.value,ge.worked))}function N(fe,de){var ge=o.get();ge.context=e,ge.release=U,ge.value=fe,ge.callback=de||Gl,u===p.concurrency||p.paused?a?(ge.next=a,a=ge):(a=ge,n=ge,p.saturated()):(u++,t.call(e,ge.value,ge.worked))}function U(fe){fe&&o.release(fe);var de=a;de?p.paused?u--:(n===a&&(n=null),a=de.next,de.next=null,t.call(e,de.value,de.worked),n===null&&p.empty()):--u===0&&p.drain()}function V(){a=null,n=null,p.drain=Gl}function ee(){a=null,n=null,p.drain(),p.drain=Gl}function le(fe){A=fe}}function Gl(){}function met(){this.value=null,this.callback=Gl,this.next=null,this.release=Gl,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,o){var a=e.callback,n=e.errorHandler,u=e.value;e.value=null,e.callback=Gl,e.errorHandler&&n(r,u),a.call(e.context,r,o),e.release(e)}}function yet(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function o(w,I){t.call(this,w).then(function(v){I(null,v)},I)}var a=Sie(e,o,r),n=a.push,u=a.unshift;return a.push=A,a.unshift=p,a.drained=h,a;function A(w){var I=new Promise(function(v,b){n(w,function(E,R){if(E){b(E);return}v(R)})});return I.catch(Gl),I}function p(w){var I=new Promise(function(v,b){u(w,function(E,R){if(E){b(E);return}v(R)})});return I.catch(Gl),I}function h(){var w=a.drain,I=new Promise(function(v){a.drain=function(){w(),v()}});return I}}$L.exports=Sie;$L.exports.promise=yet});var vP=_(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.joinPathSegments=eA.replacePathSegmentSeparator=eA.isAppliedFilter=eA.isFatalError=void 0;function Eet(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}eA.isFatalError=Eet;function wet(e,t){return e===null||e(t)}eA.isAppliedFilter=wet;function Cet(e,t){return e.split(/[/\\]/).join(t)}eA.replacePathSegmentSeparator=Cet;function Iet(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}eA.joinPathSegments=Iet});var rO=_(tO=>{"use strict";Object.defineProperty(tO,"__esModule",{value:!0});var Bet=vP(),eO=class{constructor(t,r){this._root=t,this._settings=r,this._root=Bet.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};tO.default=eO});var sO=_(iO=>{"use strict";Object.defineProperty(iO,"__esModule",{value:!0});var vet=Ie("events"),Det=BP(),Pet=Pie(),DP=vP(),xet=rO(),nO=class extends xet.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=Det.scandir,this._emitter=new vet.EventEmitter,this._queue=Pet(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){let o={directory:t,base:r};this._queue.push(o,a=>{a!==null&&this._handleError(a)})}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,(o,a)=>{if(o!==null){r(o,void 0);return}for(let n of a)this._handleEntry(n,t.base);r(null,void 0)})}_handleError(t){this._isDestroyed||!DP.isFatalError(this._settings,t)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError)return;let o=t.path;r!==void 0&&(t.path=DP.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),DP.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&DP.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(o,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};iO.default=nO});var xie=_(aO=>{"use strict";Object.defineProperty(aO,"__esModule",{value:!0});var bet=sO(),oO=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new bet.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{Qet(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{ket(t,this._storage)}),this._reader.read()}};aO.default=oO;function Qet(e,t){e(t)}function ket(e,t){e(null,t)}});var bie=_(cO=>{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});var Fet=Ie("stream"),Ret=sO(),lO=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Ret.default(this._root,this._settings),this._stream=new Fet.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};cO.default=lO});var Qie=_(AO=>{"use strict";Object.defineProperty(AO,"__esModule",{value:!0});var Tet=BP(),SP=vP(),Net=rO(),uO=class extends Net.default{constructor(){super(...arguments),this._scandir=Tet.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(let t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,r){try{let o=this._scandir(t,this._settings.fsScandirSettings);for(let a of o)this._handleEntry(a,r)}catch(o){this._handleError(o)}}_handleError(t){if(!!SP.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let o=t.path;r!==void 0&&(t.path=SP.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),SP.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&SP.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(o,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};AO.default=uO});var kie=_(pO=>{"use strict";Object.defineProperty(pO,"__esModule",{value:!0});var Let=Qie(),fO=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Let.default(this._root,this._settings)}read(){return this._reader.read()}};pO.default=fO});var Fie=_(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});var Oet=Ie("path"),Met=BP(),hO=class{constructor(t={}){this._options=t,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Oet.sep),this.fsScandirSettings=new Met.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};gO.default=hO});var xP=_(tA=>{"use strict";Object.defineProperty(tA,"__esModule",{value:!0});tA.Settings=tA.walkStream=tA.walkSync=tA.walk=void 0;var Rie=xie(),Uet=bie(),_et=kie(),dO=Fie();tA.Settings=dO.default;function Het(e,t,r){if(typeof t=="function"){new Rie.default(e,PP()).read(t);return}new Rie.default(e,PP(t)).read(r)}tA.walk=Het;function jet(e,t){let r=PP(t);return new _et.default(e,r).read()}tA.walkSync=jet;function qet(e,t){let r=PP(t);return new Uet.default(e,r).read()}tA.walkStream=qet;function PP(e={}){return e instanceof dO.default?e:new dO.default(e)}});var bP=_(yO=>{"use strict";Object.defineProperty(yO,"__esModule",{value:!0});var Get=Ie("path"),Yet=Ed(),Tie=Df(),mO=class{constructor(t){this._settings=t,this._fsStatSettings=new Yet.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return Get.resolve(this._settings.cwd,t)}_makeEntry(t,r){let o={name:r,path:r,dirent:Tie.fs.createDirentFromStats(r,t)};return this._settings.stats&&(o.stats=t),o}_isFatalError(t){return!Tie.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};yO.default=mO});var CO=_(wO=>{"use strict";Object.defineProperty(wO,"__esModule",{value:!0});var Wet=Ie("stream"),Ket=Ed(),Jet=xP(),Vet=bP(),EO=class extends Vet.default{constructor(){super(...arguments),this._walkStream=Jet.walkStream,this._stat=Ket.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let o=t.map(this._getFullEntryPath,this),a=new Wet.PassThrough({objectMode:!0});a._write=(n,u,A)=>this._getEntry(o[n],t[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===o.length-1&&a.end(),A()}).catch(A);for(let n=0;n<o.length;n++)a.write(n);return a}_getEntry(t,r,o){return this._getStat(t).then(a=>this._makeEntry(a,r)).catch(a=>{if(o.errorFilter(a))return null;throw a})}_getStat(t){return new Promise((r,o)=>{this._stat(t,this._fsStatSettings,(a,n)=>a===null?r(n):o(a))})}};wO.default=EO});var Nie=_(BO=>{"use strict";Object.defineProperty(BO,"__esModule",{value:!0});var zet=xP(),Xet=bP(),Zet=CO(),IO=class extends Xet.default{constructor(){super(...arguments),this._walkAsync=zet.walk,this._readerStream=new Zet.default(this._settings)}dynamic(t,r){return new Promise((o,a)=>{this._walkAsync(t,r,(n,u)=>{n===null?o(u):a(n)})})}async static(t,r){let o=[],a=this._readerStream.static(t,r);return new Promise((n,u)=>{a.once("error",u),a.on("data",A=>o.push(A)),a.once("end",()=>n(o))})}};BO.default=IO});var Lie=_(DO=>{"use strict";Object.defineProperty(DO,"__esModule",{value:!0});var rE=Df(),vO=class{constructor(t,r,o){this._patterns=t,this._settings=r,this._micromatchOptions=o,this._storage=[],this._fillStorage()}_fillStorage(){let t=rE.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of t){let o=this._getPatternSegments(r),a=this._splitSegmentsIntoSections(o);this._storage.push({complete:a.length<=1,pattern:r,segments:o,sections:a})}}_getPatternSegments(t){return rE.pattern.getPatternParts(t,this._micromatchOptions).map(o=>rE.pattern.isDynamicPattern(o,this._settings)?{dynamic:!0,pattern:o,patternRe:rE.pattern.makeRe(o,this._micromatchOptions)}:{dynamic:!1,pattern:o})}_splitSegmentsIntoSections(t){return rE.array.splitWhen(t,r=>r.dynamic&&rE.pattern.hasGlobStar(r.pattern))}};DO.default=vO});var Oie=_(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});var $et=Lie(),SO=class extends $et.default{match(t){let r=t.split("/"),o=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>o);for(let n of a){let u=n.sections[0];if(!n.complete&&o>u.length||r.every((p,h)=>{let w=n.segments[h];return!!(w.dynamic&&w.patternRe.test(p)||!w.dynamic&&w.pattern===p)}))return!0}return!1}};PO.default=SO});var Mie=_(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});var QP=Df(),ett=Oie(),xO=class{constructor(t,r){this._settings=t,this._micromatchOptions=r}getFilter(t,r,o){let a=this._getMatcher(r),n=this._getNegativePatternsRe(o);return u=>this._filter(t,u,a,n)}_getMatcher(t){return new ett.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(QP.pattern.isAffectDepthOfReadingPattern);return QP.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,o,a){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=QP.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,o)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(t,r){return this._settings.deep===1/0?!1:this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){let o=r.split("/").length;if(t==="")return o;let a=t.split("/").length;return o-a}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!QP.pattern.matchAny(t,r)}};bO.default=xO});var Uie=_(kO=>{"use strict";Object.defineProperty(kO,"__esModule",{value:!0});var wd=Df(),QO=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let o=wd.pattern.convertPatternsToRe(t,this._micromatchOptions),a=wd.pattern.convertPatternsToRe(r,this._micromatchOptions);return n=>this._filter(n,o,a)}_filter(t,r,o){if(this._settings.unique&&this._isDuplicateEntry(t)||this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)||this._isSkippedByAbsoluteNegativePatterns(t.path,o))return!1;let a=this._settings.baseNameMatch?t.name:t.path,n=t.dirent.isDirectory(),u=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(t.path,o,n);return this._settings.unique&&u&&this._createIndexRecord(t),u}_isDuplicateEntry(t){return this.index.has(t.path)}_createIndexRecord(t){this.index.set(t.path,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,r){if(!this._settings.absolute)return!1;let o=wd.path.makeAbsolute(this._settings.cwd,t);return wd.pattern.matchAny(o,r)}_isMatchToPatterns(t,r,o){let a=wd.path.removeLeadingDotSegment(t),n=wd.pattern.matchAny(a,r);return!n&&o?wd.pattern.matchAny(a+"/",r):n}};kO.default=QO});var _ie=_(RO=>{"use strict";Object.defineProperty(RO,"__esModule",{value:!0});var ttt=Df(),FO=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return ttt.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};RO.default=FO});var jie=_(NO=>{"use strict";Object.defineProperty(NO,"__esModule",{value:!0});var Hie=Df(),TO=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=Hie.path.makeAbsolute(this._settings.cwd,r),r=Hie.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};NO.default=TO});var kP=_(OO=>{"use strict";Object.defineProperty(OO,"__esModule",{value:!0});var rtt=Ie("path"),ntt=Mie(),itt=Uie(),stt=_ie(),ott=jie(),LO=class{constructor(t){this._settings=t,this.errorFilter=new stt.default(this._settings),this.entryFilter=new itt.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new ntt.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new ott.default(this._settings)}_getRootDirectory(t){return rtt.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){let r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};OO.default=LO});var qie=_(UO=>{"use strict";Object.defineProperty(UO,"__esModule",{value:!0});var att=Nie(),ltt=kP(),MO=class extends ltt.default{constructor(){super(...arguments),this._reader=new att.default(this._settings)}async read(t){let r=this._getRootDirectory(t),o=this._getReaderOptions(t);return(await this.api(r,t,o)).map(n=>o.transform(n))}api(t,r,o){return r.dynamic?this._reader.dynamic(t,o):this._reader.static(r.patterns,o)}};UO.default=MO});var Gie=_(HO=>{"use strict";Object.defineProperty(HO,"__esModule",{value:!0});var ctt=Ie("stream"),utt=CO(),Att=kP(),_O=class extends Att.default{constructor(){super(...arguments),this._reader=new utt.default(this._settings)}read(t){let r=this._getRootDirectory(t),o=this._getReaderOptions(t),a=this.api(r,t,o),n=new ctt.Readable({objectMode:!0,read:()=>{}});return a.once("error",u=>n.emit("error",u)).on("data",u=>n.emit("data",o.transform(u))).once("end",()=>n.emit("end")),n.once("close",()=>a.destroy()),n}api(t,r,o){return r.dynamic?this._reader.dynamic(t,o):this._reader.static(r.patterns,o)}};HO.default=_O});var Yie=_(qO=>{"use strict";Object.defineProperty(qO,"__esModule",{value:!0});var ftt=Ed(),ptt=xP(),htt=bP(),jO=class extends htt.default{constructor(){super(...arguments),this._walkSync=ptt.walkSync,this._statSync=ftt.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){let o=[];for(let a of t){let n=this._getFullEntryPath(a),u=this._getEntry(n,a,r);u===null||!r.entryFilter(u)||o.push(u)}return o}_getEntry(t,r,o){try{let a=this._getStat(t);return this._makeEntry(a,r)}catch(a){if(o.errorFilter(a))return null;throw a}}_getStat(t){return this._statSync(t,this._fsStatSettings)}};qO.default=jO});var Wie=_(YO=>{"use strict";Object.defineProperty(YO,"__esModule",{value:!0});var gtt=Yie(),dtt=kP(),GO=class extends dtt.default{constructor(){super(...arguments),this._reader=new gtt.default(this._settings)}read(t){let r=this._getRootDirectory(t),o=this._getReaderOptions(t);return this.api(r,t,o).map(o.transform)}api(t,r,o){return r.dynamic?this._reader.dynamic(t,o):this._reader.static(r.patterns,o)}};YO.default=GO});var Kie=_(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var nE=Ie("fs"),mtt=Ie("os"),ytt=Math.max(mtt.cpus().length,1);iE.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:nE.lstat,lstatSync:nE.lstatSync,stat:nE.stat,statSync:nE.statSync,readdir:nE.readdir,readdirSync:nE.readdirSync};var WO=class{constructor(t={}){this._options=t,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,ytt),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(t,r){return t===void 0?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},iE.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};iE.default=WO});var FP=_((rNt,zie)=>{"use strict";var Jie=zne(),Vie=Zne(),Ett=qie(),wtt=Gie(),Ctt=Wie(),KO=Kie(),Cd=Df();async function JO(e,t){sE(e);let r=VO(e,Ett.default,t),o=await Promise.all(r);return Cd.array.flatten(o)}(function(e){function t(u,A){sE(u);let p=VO(u,Ctt.default,A);return Cd.array.flatten(p)}e.sync=t;function r(u,A){sE(u);let p=VO(u,wtt.default,A);return Cd.stream.merge(p)}e.stream=r;function o(u,A){sE(u);let p=Vie.transform([].concat(u)),h=new KO.default(A);return Jie.generate(p,h)}e.generateTasks=o;function a(u,A){sE(u);let p=new KO.default(A);return Cd.pattern.isDynamicPattern(u,p)}e.isDynamicPattern=a;function n(u){return sE(u),Cd.path.escape(u)}e.escapePath=n})(JO||(JO={}));function VO(e,t,r){let o=Vie.transform([].concat(e)),a=new KO.default(r),n=Jie.generate(o,a),u=new t(a);return n.map(u.read,u)}function sE(e){if(![].concat(e).every(o=>Cd.string.isString(o)&&!Cd.string.isEmpty(o)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}zie.exports=JO});var wn={};Jt(wn,{checksumFile:()=>TP,checksumPattern:()=>NP,makeHash:()=>Fs});function Fs(...e){let t=(0,RP.createHash)("sha512"),r="";for(let o of e)typeof o=="string"?r+=o:o&&(r&&(t.update(r),r=""),t.update(o));return r&&t.update(r),t.digest("hex")}async function TP(e,{baseFs:t,algorithm:r}={baseFs:ae,algorithm:"sha512"}){let o=await t.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,RP.createHash)(r),A=0;for(;(A=await t.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await t.closePromise(o)}}async function NP(e,{cwd:t}){let o=(await(0,zO.default)(e,{cwd:Ae.fromPortablePath(t),onlyDirectories:!0})).map(A=>`${A}/**/*`),a=await(0,zO.default)([e,...o],{cwd:Ae.fromPortablePath(t),onlyFiles:!1});a.sort();let n=await Promise.all(a.map(async A=>{let p=[Buffer.from(A)],h=Ae.toPortablePath(A),w=await ae.lstatPromise(h);return w.isSymbolicLink()?p.push(Buffer.from(await ae.readlinkPromise(h))):w.isFile()&&p.push(await ae.readFilePromise(h)),p.join("\0")})),u=(0,RP.createHash)("sha512");for(let A of n)u.update(A);return u.digest("hex")}var RP,zO,rh=yt(()=>{St();RP=Ie("crypto"),zO=$e(FP())});var G={};Jt(G,{areDescriptorsEqual:()=>tse,areIdentsEqual:()=>e1,areLocatorsEqual:()=>t1,areVirtualPackagesEquivalent:()=>Qtt,bindDescriptor:()=>xtt,bindLocator:()=>btt,convertDescriptorToLocator:()=>LP,convertLocatorToDescriptor:()=>ZO,convertPackageToLocator:()=>Dtt,convertToIdent:()=>vtt,convertToManifestRange:()=>Ttt,copyPackage:()=>XI,devirtualizeDescriptor:()=>ZI,devirtualizeLocator:()=>$I,ensureDevirtualizedDescriptor:()=>Stt,ensureDevirtualizedLocator:()=>Ptt,getIdentVendorPath:()=>rM,isPackageCompatible:()=>_P,isVirtualDescriptor:()=>Pf,isVirtualLocator:()=>jc,makeDescriptor:()=>Cn,makeIdent:()=>rA,makeLocator:()=>Rs,makeRange:()=>MP,parseDescriptor:()=>nh,parseFileStyleRange:()=>Ftt,parseIdent:()=>Xs,parseLocator:()=>xf,parseRange:()=>Id,prettyDependent:()=>bL,prettyDescriptor:()=>jn,prettyIdent:()=>ls,prettyLocator:()=>jr,prettyLocatorNoColors:()=>xL,prettyRange:()=>lE,prettyReference:()=>n1,prettyResolution:()=>VI,prettyWorkspace:()=>i1,renamePackage:()=>$O,slugifyIdent:()=>XO,slugifyLocator:()=>aE,sortDescriptors:()=>cE,stringifyDescriptor:()=>Pa,stringifyIdent:()=>An,stringifyLocator:()=>xa,tryParseDescriptor:()=>r1,tryParseIdent:()=>rse,tryParseLocator:()=>OP,tryParseRange:()=>ktt,virtualizeDescriptor:()=>eM,virtualizePackage:()=>tM});function rA(e,t){if(e?.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:Fs(e,t),scope:e,name:t}}function Cn(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:Fs(e.identHash,t),range:t}}function Rs(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:Fs(e.identHash,t),reference:t}}function vtt(e){return{identHash:e.identHash,scope:e.scope,name:e.name}}function LP(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.descriptorHash,reference:e.range}}function ZO(e){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:e.locatorHash,range:e.reference}}function Dtt(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference}}function $O(e,t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference,version:e.version,languageName:e.languageName,linkType:e.linkType,conditions:e.conditions,dependencies:new Map(e.dependencies),peerDependencies:new Map(e.peerDependencies),dependenciesMeta:new Map(e.dependenciesMeta),peerDependenciesMeta:new Map(e.peerDependenciesMeta),bin:new Map(e.bin)}}function XI(e){return $O(e,e)}function eM(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return Cn(e,`virtual:${t}#${e.range}`)}function tM(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return $O(e,Rs(e,`virtual:${t}#${e.reference}`))}function Pf(e){return e.range.startsWith(zI)}function jc(e){return e.reference.startsWith(zI)}function ZI(e){if(!Pf(e))throw new Error("Not a virtual descriptor");return Cn(e,e.range.replace(/^[^#]*#/,""))}function $I(e){if(!jc(e))throw new Error("Not a virtual descriptor");return Rs(e,e.reference.replace(/^[^#]*#/,""))}function Stt(e){return Pf(e)?Cn(e,e.range.replace(/^[^#]*#/,"")):e}function Ptt(e){return jc(e)?Rs(e,e.reference.replace(/^[^#]*#/,"")):e}function xtt(e,t){return e.range.includes("::")?e:Cn(e,`${e.range}::${oE.default.stringify(t)}`)}function btt(e,t){return e.reference.includes("::")?e:Rs(e,`${e.reference}::${oE.default.stringify(t)}`)}function e1(e,t){return e.identHash===t.identHash}function tse(e,t){return e.descriptorHash===t.descriptorHash}function t1(e,t){return e.locatorHash===t.locatorHash}function Qtt(e,t){if(!jc(e))throw new Error("Invalid package type");if(!jc(t))throw new Error("Invalid package type");if(!e1(e,t)||e.dependencies.size!==t.dependencies.size)return!1;for(let r of e.dependencies.values()){let o=t.dependencies.get(r.identHash);if(!o||!tse(r,o))return!1}return!0}function Xs(e){let t=rse(e);if(!t)throw new Error(`Invalid ident (${e})`);return t}function rse(e){let t=e.match(/^(?:@([^/]+?)\/)?([^@/]+)$/);if(!t)return null;let[,r,o]=t;return rA(typeof r<"u"?r:null,o)}function nh(e,t=!1){let r=r1(e,t);if(!r)throw new Error(`Invalid descriptor (${e})`);return r}function r1(e,t=!1){let r=t?e.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/);if(!r)return null;let[,o,a,n]=r;if(n==="unknown")throw new Error(`Invalid range (${e})`);let u=typeof o<"u"?o:null,A=typeof n<"u"?n:"unknown";return Cn(rA(u,a),A)}function xf(e,t=!1){let r=OP(e,t);if(!r)throw new Error(`Invalid locator (${e})`);return r}function OP(e,t=!1){let r=t?e.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/);if(!r)return null;let[,o,a,n]=r;if(n==="unknown")throw new Error(`Invalid reference (${e})`);let u=typeof o<"u"?o:null,A=typeof n<"u"?n:"unknown";return Rs(rA(u,a),A)}function Id(e,t){let r=e.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(r===null)throw new Error(`Invalid range (${e})`);let o=typeof r[1]<"u"?r[1]:null;if(typeof t?.requireProtocol=="string"&&o!==t.requireProtocol)throw new Error(`Invalid protocol (${o})`);if(t?.requireProtocol&&o===null)throw new Error(`Missing protocol (${o})`);let a=typeof r[3]<"u"?decodeURIComponent(r[2]):null;if(t?.requireSource&&a===null)throw new Error(`Missing source (${e})`);let n=typeof r[3]<"u"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),u=t?.parseSelector?oE.default.parse(n):n,A=typeof r[4]<"u"?oE.default.parse(r[4]):null;return{protocol:o,source:a,selector:u,params:A}}function ktt(e,t){try{return Id(e,t)}catch{return null}}function Ftt(e,{protocol:t}){let{selector:r,params:o}=Id(e,{requireProtocol:t,requireBindings:!0});if(typeof o.locator!="string")throw new Error(`Assertion failed: Invalid bindings for ${e}`);return{parentLocator:xf(o.locator,!0),path:r}}function Xie(e){return e=e.replace(/%/g,"%25"),e=e.replace(/:/g,"%3A"),e=e.replace(/#/g,"%23"),e}function Rtt(e){return e===null?!1:Object.entries(e).length>0}function MP({protocol:e,source:t,selector:r,params:o}){let a="";return e!==null&&(a+=`${e}`),t!==null&&(a+=`${Xie(t)}#`),a+=Xie(r),Rtt(o)&&(a+=`::${oE.default.stringify(o)}`),a}function Ttt(e){let{params:t,protocol:r,source:o,selector:a}=Id(e);for(let n in t)n.startsWith("__")&&delete t[n];return MP({protocol:r,source:o,params:t,selector:a})}function An(e){return e.scope?`@${e.scope}/${e.name}`:`${e.name}`}function Pa(e){return e.scope?`@${e.scope}/${e.name}@${e.range}`:`${e.name}@${e.range}`}function xa(e){return e.scope?`@${e.scope}/${e.name}@${e.reference}`:`${e.name}@${e.reference}`}function XO(e){return e.scope!==null?`@${e.scope}-${e.name}`:e.name}function aE(e){let{protocol:t,selector:r}=Id(e.reference),o=t!==null?t.replace(/:$/,""):"exotic",a=Zie.default.valid(r),n=a!==null?`${o}-${a}`:`${o}`,u=10,A=e.scope?`${XO(e)}-${n}-${e.locatorHash.slice(0,u)}`:`${XO(e)}-${n}-${e.locatorHash.slice(0,u)}`;return bi(A)}function ls(e,t){return t.scope?`${_t(e,`@${t.scope}/`,Et.SCOPE)}${_t(e,t.name,Et.NAME)}`:`${_t(e,t.name,Et.NAME)}`}function UP(e){if(e.startsWith(zI)){let t=UP(e.substring(e.indexOf("#")+1)),r=e.substring(zI.length,zI.length+Itt);return`${t} [${r}]`}else return e.replace(/\?.*/,"?[...]")}function lE(e,t){return`${_t(e,UP(t),Et.RANGE)}`}function jn(e,t){return`${ls(e,t)}${_t(e,"@",Et.RANGE)}${lE(e,t.range)}`}function n1(e,t){return`${_t(e,UP(t),Et.REFERENCE)}`}function jr(e,t){return`${ls(e,t)}${_t(e,"@",Et.REFERENCE)}${n1(e,t.reference)}`}function xL(e){return`${An(e)}@${UP(e.reference)}`}function cE(e){return ks(e,[t=>An(t),t=>t.range])}function i1(e,t){return ls(e,t.anchoredLocator)}function VI(e,t,r){let o=Pf(t)?ZI(t):t;return r===null?`${jn(e,o)} \u2192 ${PL(e).Cross}`:o.identHash===r.identHash?`${jn(e,o)} \u2192 ${n1(e,r.reference)}`:`${jn(e,o)} \u2192 ${jr(e,r)}`}function bL(e,t,r){return r===null?`${jr(e,t)}`:`${jr(e,t)} (via ${lE(e,r.range)})`}function rM(e){return`node_modules/${An(e)}`}function _P(e,t){return e.conditions?Btt(e.conditions,r=>{let[,o,a]=r.match(ese),n=t[o];return n?n.includes(a):!0}):!0}var oE,Zie,$ie,zI,Itt,ese,Btt,xo=yt(()=>{St();oE=$e(Ie("querystring")),Zie=$e(Zn()),$ie=$e(Zz());ql();rh();jl();xo();zI="virtual:",Itt=5,ese=/(os|cpu|libc)=([a-z0-9_-]+)/,Btt=(0,$ie.makeParser)(ese)});var nse,ise=yt(()=>{xo();nse={hooks:{reduceDependency:(e,t,r,o,{resolver:a,resolveOptions:n})=>{for(let{pattern:u,reference:A}of t.topLevelWorkspace.manifest.resolutions){if(u.from&&(u.from.fullName!==An(r)||t.configuration.normalizeLocator(Rs(Xs(u.from.fullName),u.from.description??r.reference)).locatorHash!==r.locatorHash)||u.descriptor.fullName!==An(e)||t.configuration.normalizeDependency(Cn(xf(u.descriptor.fullName),u.descriptor.description??e.range)).descriptorHash!==e.descriptorHash)continue;return a.bindDescriptor(t.configuration.normalizeDependency(Cn(e,A)),t.topLevelWorkspace.anchoredLocator,n)}return e},validateProject:async(e,t)=>{for(let r of e.workspaces){let o=i1(e.configuration,r);await e.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>t.reportWarning(a,`${o}: ${n}`),reportError:(a,n)=>t.reportError(a,`${o}: ${n}`)})}},validateWorkspace:async(e,t)=>{let{manifest:r}=e;r.resolutions.length&&e.cwd!==e.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(let o of r.errors)t.reportWarning(57,o.message)}}}});var s1,Vn,Bd=yt(()=>{s1=class{supportsDescriptor(t,r){return!!(t.range.startsWith(s1.protocol)||r.project.tryWorkspaceByDescriptor(t)!==null)}supportsLocator(t,r){return!!t.reference.startsWith(s1.protocol)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){return[o.project.getWorkspaceByDescriptor(t).anchoredLocator]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let o=r.project.getWorkspaceByCwd(t.reference.slice(s1.protocol.length));return{...t,version:o.manifest.version||"0.0.0",languageName:"unknown",linkType:"SOFT",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...o.manifest.dependencies,...o.manifest.devDependencies])),peerDependencies:new Map([...o.manifest.peerDependencies]),dependenciesMeta:o.manifest.dependenciesMeta,peerDependenciesMeta:o.manifest.peerDependenciesMeta,bin:o.manifest.bin}}},Vn=s1;Vn.protocol="workspace:"});var Qr={};Jt(Qr,{SemVer:()=>cse.SemVer,clean:()=>Ltt,getComparator:()=>ase,mergeComparators:()=>nM,satisfiesWithPrereleases:()=>bf,simplifyRanges:()=>iM,stringifyComparator:()=>lse,validRange:()=>ba});function bf(e,t,r=!1){if(!e)return!1;let o=`${t}${r}`,a=sse.get(o);if(typeof a>"u")try{a=new ih.default.Range(t,{includePrerelease:!0,loose:r})}catch{return!1}finally{sse.set(o,a||null)}else if(a===null)return!1;let n;try{n=new ih.default.SemVer(e,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(u=>{for(let A of u)A.semver.prerelease&&(A.semver.prerelease=[]);return u.every(A=>A.test(n))}))}function ba(e){if(e.indexOf(":")!==-1)return null;let t=ose.get(e);if(typeof t<"u")return t;try{t=new ih.default.Range(e)}catch{t=null}return ose.set(e,t),t}function Ltt(e){let t=Ntt.exec(e);return t?t[1]:null}function ase(e){if(e.semver===ih.default.Comparator.ANY)return{gt:null,lt:null};switch(e.operator){case"":return{gt:[">=",e.semver],lt:["<=",e.semver]};case">":case">=":return{gt:[e.operator,e.semver],lt:null};case"<":case"<=":return{gt:null,lt:[e.operator,e.semver]};default:throw new Error(`Assertion failed: Unexpected comparator operator (${e.operator})`)}}function nM(e){if(e.length===0)return null;let t=null,r=null;for(let o of e){if(o.gt){let a=t!==null?ih.default.compare(o.gt[1],t[1]):null;(a===null||a>0||a===0&&o.gt[0]===">")&&(t=o.gt)}if(o.lt){let a=r!==null?ih.default.compare(o.lt[1],r[1]):null;(a===null||a<0||a===0&&o.lt[0]==="<")&&(r=o.lt)}}if(t&&r){let o=ih.default.compare(t[1],r[1]);if(o===0&&(t[0]===">"||r[0]==="<")||o>0)return null}return{gt:t,lt:r}}function lse(e){if(e.gt&&e.lt){if(e.gt[0]===">="&&e.lt[0]==="<="&&e.gt[1].version===e.lt[1].version)return e.gt[1].version;if(e.gt[0]===">="&&e.lt[0]==="<"){if(e.lt[1].version===`${e.gt[1].major+1}.0.0-0`)return`^${e.gt[1].version}`;if(e.lt[1].version===`${e.gt[1].major}.${e.gt[1].minor+1}.0-0`)return`~${e.gt[1].version}`}}let t=[];return e.gt&&t.push(e.gt[0]+e.gt[1].version),e.lt&&t.push(e.lt[0]+e.lt[1].version),t.length?t.join(" "):"*"}function iM(e){let t=e.map(o=>ba(o).set.map(a=>a.map(n=>ase(n)))),r=t.shift().map(o=>nM(o)).filter(o=>o!==null);for(let o of t){let a=[];for(let n of r)for(let u of o){let A=nM([n,...u]);A!==null&&a.push(A)}r=a}return r.length===0?null:r.map(o=>lse(o)).join(" || ")}var ih,cse,sse,ose,Ntt,Qf=yt(()=>{ih=$e(Zn()),cse=$e(Zn()),sse=new Map;ose=new Map;Ntt=/^(?:[\sv=]*?)((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\s*)$/});function use(e){let t=e.match(/^[ \t]+/m);return t?t[0]:" "}function Ase(e){return e.charCodeAt(0)===65279?e.slice(1):e}function $o(e){return e.replace(/\\/g,"/")}function HP(e,{yamlCompatibilityMode:t}){return t?EL(e):typeof e>"u"||typeof e=="boolean"?e:null}function fse(e,t){let r=t.search(/[^!]/);if(r===-1)return"invalid";let o=r%2===0?"":"!",a=t.slice(r);return`${o}${e}=${a}`}function sM(e,t){return t.length===1?fse(e,t[0]):`(${t.map(r=>fse(e,r)).join(" | ")})`}var pse,uE,Ot,AE=yt(()=>{St();Nl();pse=$e(Zn());Bd();jl();Qf();xo();uE=class{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static async tryFind(t,{baseFs:r=new Rn}={}){let o=J.join(t,"package.json");try{return await uE.fromFile(o,{baseFs:r})}catch(a){if(a.code==="ENOENT")return null;throw a}}static async find(t,{baseFs:r}={}){let o=await uE.tryFind(t,{baseFs:r});if(o===null)throw new Error("Manifest not found");return o}static async fromFile(t,{baseFs:r=new Rn}={}){let o=new uE;return await o.loadFile(t,{baseFs:r}),o}static fromText(t){let r=new uE;return r.loadFromText(t),r}loadFromText(t){let r;try{r=JSON.parse(Ase(t)||"{}")}catch(o){throw o.message+=` (when parsing ${t})`,o}this.load(r),this.indent=use(t)}async loadFile(t,{baseFs:r=new Rn}){let o=await r.readFilePromise(t,"utf8"),a;try{a=JSON.parse(Ase(o)||"{}")}catch(n){throw n.message+=` (when parsing ${t})`,n}this.load(a),this.indent=use(o)}load(t,{yamlCompatibilityMode:r=!1}={}){if(typeof t!="object"||t===null)throw new Error(`Utterly invalid manifest data (${t})`);this.raw=t;let o=[];if(this.name=null,typeof t.name=="string")try{this.name=Xs(t.name)}catch{o.push(new Error("Parsing failed for the 'name' field"))}if(typeof t.version=="string"?this.version=t.version:this.version=null,Array.isArray(t.os)){let n=[];this.os=n;for(let u of t.os)typeof u!="string"?o.push(new Error("Parsing failed for the 'os' field")):n.push(u)}else this.os=null;if(Array.isArray(t.cpu)){let n=[];this.cpu=n;for(let u of t.cpu)typeof u!="string"?o.push(new Error("Parsing failed for the 'cpu' field")):n.push(u)}else this.cpu=null;if(Array.isArray(t.libc)){let n=[];this.libc=n;for(let u of t.libc)typeof u!="string"?o.push(new Error("Parsing failed for the 'libc' field")):n.push(u)}else this.libc=null;if(typeof t.type=="string"?this.type=t.type:this.type=null,typeof t.packageManager=="string"?this.packageManager=t.packageManager:this.packageManager=null,typeof t.private=="boolean"?this.private=t.private:this.private=!1,typeof t.license=="string"?this.license=t.license:this.license=null,typeof t.languageName=="string"?this.languageName=t.languageName:this.languageName=null,typeof t.main=="string"?this.main=$o(t.main):this.main=null,typeof t.module=="string"?this.module=$o(t.module):this.module=null,t.browser!=null)if(typeof t.browser=="string")this.browser=$o(t.browser);else{this.browser=new Map;for(let[n,u]of Object.entries(t.browser))this.browser.set($o(n),typeof u=="string"?$o(u):u)}else this.browser=null;if(this.bin=new Map,typeof t.bin=="string")this.name!==null?this.bin.set(this.name.name,$o(t.bin)):o.push(new Error("String bin field, but no attached package name"));else if(typeof t.bin=="object"&&t.bin!==null)for(let[n,u]of Object.entries(t.bin)){if(typeof u!="string"){o.push(new Error(`Invalid bin definition for '${n}'`));continue}let A=Xs(n);this.bin.set(A.name,$o(u))}if(this.scripts=new Map,typeof t.scripts=="object"&&t.scripts!==null)for(let[n,u]of Object.entries(t.scripts)){if(typeof u!="string"){o.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,u)}if(this.dependencies=new Map,typeof t.dependencies=="object"&&t.dependencies!==null)for(let[n,u]of Object.entries(t.dependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Xs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=Cn(A,u);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof t.devDependencies=="object"&&t.devDependencies!==null)for(let[n,u]of Object.entries(t.devDependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Xs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=Cn(A,u);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof t.peerDependencies=="object"&&t.peerDependencies!==null)for(let[n,u]of Object.entries(t.peerDependencies)){let A;try{A=Xs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof u!="string"||!u.startsWith(Vn.protocol)&&!ba(u))&&(o.push(new Error(`Invalid dependency range for '${n}'`)),u="*");let p=Cn(A,u);this.peerDependencies.set(p.identHash,p)}typeof t.workspaces=="object"&&t.workspaces!==null&&t.workspaces.nohoist&&o.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));let a=Array.isArray(t.workspaces)?t.workspaces:typeof t.workspaces=="object"&&t.workspaces!==null&&Array.isArray(t.workspaces.packages)?t.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!="string"){o.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof t.dependenciesMeta=="object"&&t.dependenciesMeta!==null)for(let[n,u]of Object.entries(t.dependenciesMeta)){if(typeof u!="object"||u===null){o.push(new Error(`Invalid meta field for '${n}`));continue}let A=nh(n),p=this.ensureDependencyMeta(A),h=HP(u.built,{yamlCompatibilityMode:r});if(h===null){o.push(new Error(`Invalid built meta field for '${n}'`));continue}let w=HP(u.optional,{yamlCompatibilityMode:r});if(w===null){o.push(new Error(`Invalid optional meta field for '${n}'`));continue}let I=HP(u.unplugged,{yamlCompatibilityMode:r});if(I===null){o.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:w,unplugged:I})}if(this.peerDependenciesMeta=new Map,typeof t.peerDependenciesMeta=="object"&&t.peerDependenciesMeta!==null)for(let[n,u]of Object.entries(t.peerDependenciesMeta)){if(typeof u!="object"||u===null){o.push(new Error(`Invalid meta field for '${n}'`));continue}let A=nh(n),p=this.ensurePeerDependencyMeta(A),h=HP(u.optional,{yamlCompatibilityMode:r});if(h===null){o.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof t.resolutions=="object"&&t.resolutions!==null)for(let[n,u]of Object.entries(t.resolutions)){if(typeof u!="string"){o.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:MD(n),reference:u})}catch(A){o.push(A);continue}}if(Array.isArray(t.files)){this.files=new Set;for(let n of t.files){if(typeof n!="string"){o.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof t.publishConfig=="object"&&t.publishConfig!==null){if(this.publishConfig={},typeof t.publishConfig.access=="string"&&(this.publishConfig.access=t.publishConfig.access),typeof t.publishConfig.main=="string"&&(this.publishConfig.main=$o(t.publishConfig.main)),typeof t.publishConfig.module=="string"&&(this.publishConfig.module=$o(t.publishConfig.module)),t.publishConfig.browser!=null)if(typeof t.publishConfig.browser=="string")this.publishConfig.browser=$o(t.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,u]of Object.entries(t.publishConfig.browser))this.publishConfig.browser.set($o(n),typeof u=="string"?$o(u):u)}if(typeof t.publishConfig.registry=="string"&&(this.publishConfig.registry=t.publishConfig.registry),typeof t.publishConfig.bin=="string")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,$o(t.publishConfig.bin)]]):o.push(new Error("String bin field, but no attached package name"));else if(typeof t.publishConfig.bin=="object"&&t.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,u]of Object.entries(t.publishConfig.bin)){if(typeof u!="string"){o.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,$o(u))}}if(Array.isArray(t.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of t.publishConfig.executableFiles){if(typeof n!="string"){o.push(new Error("Invalid executable file definition"));continue}this.publishConfig.executableFiles.add($o(n))}}}else this.publishConfig=null;if(typeof t.installConfig=="object"&&t.installConfig!==null){this.installConfig={};for(let n of Object.keys(t.installConfig))n==="hoistingLimits"?typeof t.installConfig.hoistingLimits=="string"?this.installConfig.hoistingLimits=t.installConfig.hoistingLimits:o.push(new Error("Invalid hoisting limits definition")):n=="selfReferences"?typeof t.installConfig.selfReferences=="boolean"?this.installConfig.selfReferences=t.installConfig.selfReferences:o.push(new Error("Invalid selfReferences definition, must be a boolean value")):o.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof t.optionalDependencies=="object"&&t.optionalDependencies!==null)for(let[n,u]of Object.entries(t.optionalDependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Xs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=Cn(A,u);this.dependencies.set(p.identHash,p);let h=Cn(A,"unknown"),w=this.ensureDependencyMeta(h);Object.assign(w,{optional:!0})}typeof t.preferUnplugged=="boolean"?this.preferUnplugged=t.preferUnplugged:this.preferUnplugged=null,this.errors=o}getForScope(t){switch(t){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${t}")`)}}hasConsumerDependency(t){return!!(this.dependencies.has(t.identHash)||this.peerDependencies.has(t.identHash))}hasHardDependency(t){return!!(this.dependencies.has(t.identHash)||this.devDependencies.has(t.identHash))}hasSoftDependency(t){return!!this.peerDependencies.has(t.identHash)}hasDependency(t){return!!(this.hasHardDependency(t)||this.hasSoftDependency(t))}getConditions(){let t=[];return this.os&&this.os.length>0&&t.push(sM("os",this.os)),this.cpu&&this.cpu.length>0&&t.push(sM("cpu",this.cpu)),this.libc&&this.libc.length>0&&t.push(sM("libc",this.libc)),t.length>0?t.join(" & "):null}ensureDependencyMeta(t){if(t.range!=="unknown"&&!pse.default.valid(t.range))throw new Error(`Invalid meta field range for '${Pa(t)}'`);let r=An(t),o=t.range!=="unknown"?t.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(o);return n||a.set(o,n={}),n}ensurePeerDependencyMeta(t){if(t.range!=="unknown")throw new Error(`Invalid meta field range for '${Pa(t)}'`);let r=An(t),o=this.peerDependenciesMeta.get(r);return o||this.peerDependenciesMeta.set(r,o={}),o}setRawField(t,r,{after:o=[]}={}){let a=new Set(o.filter(n=>Object.hasOwn(this.raw,n)));if(a.size===0||Object.hasOwn(this.raw,t))this.raw[t]=r;else{let n=this.raw,u=this.raw={},A=!1;for(let p of Object.keys(n))u[p]=n[p],A||(a.delete(p),a.size===0&&(u[t]=r,A=!0))}}exportTo(t,{compatibilityMode:r=!0}={}){if(Object.assign(t,this.raw),this.name!==null?t.name=An(this.name):delete t.name,this.version!==null?t.version=this.version:delete t.version,this.os!==null?t.os=this.os:delete t.os,this.cpu!==null?t.cpu=this.cpu:delete t.cpu,this.type!==null?t.type=this.type:delete t.type,this.packageManager!==null?t.packageManager=this.packageManager:delete t.packageManager,this.private?t.private=!0:delete t.private,this.license!==null?t.license=this.license:delete t.license,this.languageName!==null?t.languageName=this.languageName:delete t.languageName,this.main!==null?t.main=this.main:delete t.main,this.module!==null?t.module=this.module:delete t.module,this.browser!==null){let n=this.browser;typeof n=="string"?t.browser=n:n instanceof Map&&(t.browser=Object.assign({},...Array.from(n.keys()).sort().map(u=>({[u]:n.get(u)}))))}else delete t.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?t.bin=this.bin.get(this.name.name):this.bin.size>0?t.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete t.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?t.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:t.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?t.workspaces=this.raw.workspaces:delete t.workspaces;let o=[],a=[];for(let n of this.dependencies.values()){let u=this.dependenciesMeta.get(An(n)),A=!1;if(r&&u){let p=u.get(null);p&&p.optional&&(A=!0)}A?a.push(n):o.push(n)}o.length>0?t.dependencies=Object.assign({},...cE(o).map(n=>({[An(n)]:n.range}))):delete t.dependencies,a.length>0?t.optionalDependencies=Object.assign({},...cE(a).map(n=>({[An(n)]:n.range}))):delete t.optionalDependencies,this.devDependencies.size>0?t.devDependencies=Object.assign({},...cE(this.devDependencies.values()).map(n=>({[An(n)]:n.range}))):delete t.devDependencies,this.peerDependencies.size>0?t.peerDependencies=Object.assign({},...cE(this.peerDependencies.values()).map(n=>({[An(n)]:n.range}))):delete t.peerDependencies,t.dependenciesMeta={};for(let[n,u]of ks(this.dependenciesMeta.entries(),([A,p])=>A))for(let[A,p]of ks(u.entries(),([h,w])=>h!==null?`0${h}`:"1")){let h=A!==null?Pa(Cn(Xs(n),A)):n,w={...p};r&&A===null&&delete w.optional,Object.keys(w).length!==0&&(t.dependenciesMeta[h]=w)}if(Object.keys(t.dependenciesMeta).length===0&&delete t.dependenciesMeta,this.peerDependenciesMeta.size>0?t.peerDependenciesMeta=Object.assign({},...ks(this.peerDependenciesMeta.entries(),([n,u])=>n).map(([n,u])=>({[n]:u}))):delete t.peerDependenciesMeta,this.resolutions.length>0?t.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:u})=>({[UD(n)]:u}))):delete t.resolutions,this.files!==null?t.files=Array.from(this.files):delete t.files,this.preferUnplugged!==null?t.preferUnplugged=this.preferUnplugged:delete t.preferUnplugged,this.scripts!==null&&this.scripts.size>0){t.scripts??={};for(let n of Object.keys(t.scripts))this.scripts.has(n)||delete t.scripts[n];for(let[n,u]of this.scripts.entries())t.scripts[n]=u}else delete t.scripts;return t}},Ot=uE;Ot.fileName="package.json",Ot.allDependencies=["dependencies","devDependencies","peerDependencies"],Ot.hardDependencies=["dependencies","devDependencies"]});var gse=_((ENt,hse)=>{var Ott=_l(),Mtt=function(){return Ott.Date.now()};hse.exports=Mtt});var mse=_((wNt,dse)=>{var Utt=/\s/;function _tt(e){for(var t=e.length;t--&&Utt.test(e.charAt(t)););return t}dse.exports=_tt});var Ese=_((CNt,yse)=>{var Htt=mse(),jtt=/^\s+/;function qtt(e){return e&&e.slice(0,Htt(e)+1).replace(jtt,"")}yse.exports=qtt});var fE=_((INt,wse)=>{var Gtt=pd(),Ytt=Xu(),Wtt="[object Symbol]";function Ktt(e){return typeof e=="symbol"||Ytt(e)&&Gtt(e)==Wtt}wse.exports=Ktt});var vse=_((BNt,Bse)=>{var Jtt=Ese(),Cse=il(),Vtt=fE(),Ise=0/0,ztt=/^[-+]0x[0-9a-f]+$/i,Xtt=/^0b[01]+$/i,Ztt=/^0o[0-7]+$/i,$tt=parseInt;function ert(e){if(typeof e=="number")return e;if(Vtt(e))return Ise;if(Cse(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cse(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Jtt(e);var r=Xtt.test(e);return r||Ztt.test(e)?$tt(e.slice(2),r?2:8):ztt.test(e)?Ise:+e}Bse.exports=ert});var Pse=_((vNt,Sse)=>{var trt=il(),oM=gse(),Dse=vse(),rrt="Expected a function",nrt=Math.max,irt=Math.min;function srt(e,t,r){var o,a,n,u,A,p,h=0,w=!1,I=!1,v=!0;if(typeof e!="function")throw new TypeError(rrt);t=Dse(t)||0,trt(r)&&(w=!!r.leading,I="maxWait"in r,n=I?nrt(Dse(r.maxWait)||0,t):n,v="trailing"in r?!!r.trailing:v);function b(de){var ge=o,oe=a;return o=a=void 0,h=de,u=e.apply(oe,ge),u}function E(de){return h=de,A=setTimeout(U,t),w?b(de):u}function R(de){var ge=de-p,oe=de-h,Be=t-ge;return I?irt(Be,n-oe):Be}function N(de){var ge=de-p,oe=de-h;return p===void 0||ge>=t||ge<0||I&&oe>=n}function U(){var de=oM();if(N(de))return V(de);A=setTimeout(U,R(de))}function V(de){return A=void 0,v&&o?b(de):(o=a=void 0,u)}function ee(){A!==void 0&&clearTimeout(A),h=0,o=p=a=A=void 0}function le(){return A===void 0?u:V(oM())}function fe(){var de=oM(),ge=N(de);if(o=arguments,a=this,p=de,ge){if(A===void 0)return E(p);if(I)return clearTimeout(A),A=setTimeout(U,t),b(p)}return A===void 0&&(A=setTimeout(U,t)),u}return fe.cancel=ee,fe.flush=le,fe}Sse.exports=srt});var aM=_((DNt,xse)=>{var ort=Pse(),art=il(),lrt="Expected a function";function crt(e,t,r){var o=!0,a=!0;if(typeof e!="function")throw new TypeError(lrt);return art(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),ort(e,t,{leading:o,maxWait:t,trailing:a})}xse.exports=crt});function Art(e){return typeof e.reportCode<"u"}var bse,Qse,kse,urt,zt,Zs,Yl=yt(()=>{bse=$e(aM()),Qse=Ie("stream"),kse=Ie("string_decoder"),urt=15,zt=class extends Error{constructor(r,o,a){super(o);this.reportExtra=a;this.reportCode=r}};Zs=class{constructor(){this.cacheHits=new Set;this.cacheMisses=new Set;this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}getRecommendedLength(){return 180}reportCacheHit(t){this.cacheHits.add(t.locatorHash)}reportCacheMiss(t,r){this.cacheMisses.add(t.locatorHash)}static progressViaCounter(t){let r=0,o,a=new Promise(p=>{o=p}),n=p=>{let h=o;a=new Promise(w=>{o=w}),r=p,h()},u=(p=0)=>{n(r+1)},A=async function*(){for(;r<t;)await a,yield{progress:r/t}}();return{[Symbol.asyncIterator](){return A},hasProgress:!0,hasTitle:!1,set:n,tick:u}}static progressViaTitle(){let t,r,o=new Promise(u=>{r=u}),a=(0,bse.default)(u=>{let A=r;o=new Promise(p=>{r=p}),t=u,A()},1e3/urt),n=async function*(){for(;;)await o,yield{title:t}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(t,r){let o=this.reportProgress(t);try{return await r(t)}finally{o.stop()}}startProgressSync(t,r){let o=this.reportProgress(t);try{return r(t)}finally{o.stop()}}reportInfoOnce(t,r,o){let a=o&&o.key?o.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(t,r),o?.reportExtra?.(this))}reportWarningOnce(t,r,o){let a=o&&o.key?o.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(t,r),o?.reportExtra?.(this))}reportErrorOnce(t,r,o){let a=o&&o.key?o.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(t,r),o?.reportExtra?.(this))}reportExceptionOnce(t){Art(t)?this.reportErrorOnce(t.reportCode,t.message,{key:t,reportExtra:t.reportExtra}):this.reportErrorOnce(1,t.stack||t.message,{key:t})}createStreamReporter(t=null){let r=new Qse.PassThrough,o=new kse.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
141`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t!==null?this.reportInfo(null,`${t} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(t!==null?this.reportInfo(null,`${t} ${n}`):this.reportInfo(null,n))}),r}}});var pE,lM=yt(()=>{Yl();xo();pE=class{constructor(t){this.fetchers=t}supports(t,r){return!!this.tryFetcher(t,r)}getLocalPath(t,r){return this.getFetcher(t,r).getLocalPath(t,r)}async fetch(t,r){return await this.getFetcher(t,r).fetch(t,r)}tryFetcher(t,r){let o=this.fetchers.find(a=>a.supports(t,r));return o||null}getFetcher(t,r){let o=this.fetchers.find(a=>a.supports(t,r));if(!o)throw new zt(11,`${jr(r.project.configuration,t)} isn't supported by any available fetcher`);return o}}});var vd,cM=yt(()=>{xo();vd=class{constructor(t){this.resolvers=t.filter(r=>r)}supportsDescriptor(t,r){return!!this.tryResolverByDescriptor(t,r)}supportsLocator(t,r){return!!this.tryResolverByLocator(t,r)}shouldPersistResolution(t,r){return this.getResolverByLocator(t,r).shouldPersistResolution(t,r)}bindDescriptor(t,r,o){return this.getResolverByDescriptor(t,o).bindDescriptor(t,r,o)}getResolutionDependencies(t,r){return this.getResolverByDescriptor(t,r).getResolutionDependencies(t,r)}async getCandidates(t,r,o){return await this.getResolverByDescriptor(t,o).getCandidates(t,r,o)}async getSatisfying(t,r,o,a){return this.getResolverByDescriptor(t,a).getSatisfying(t,r,o,a)}async resolve(t,r){return await this.getResolverByLocator(t,r).resolve(t,r)}tryResolverByDescriptor(t,r){let o=this.resolvers.find(a=>a.supportsDescriptor(t,r));return o||null}getResolverByDescriptor(t,r){let o=this.resolvers.find(a=>a.supportsDescriptor(t,r));if(!o)throw new Error(`${jn(r.project.configuration,t)} isn't supported by any available resolver`);return o}tryResolverByLocator(t,r){let o=this.resolvers.find(a=>a.supportsLocator(t,r));return o||null}getResolverByLocator(t,r){let o=this.resolvers.find(a=>a.supportsLocator(t,r));if(!o)throw new Error(`${jr(r.project.configuration,t)} isn't supported by any available resolver`);return o}}});var hE,uM=yt(()=>{St();xo();hE=class{supports(t){return!!t.reference.startsWith("virtual:")}getLocalPath(t,r){let o=t.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(o+1),n=Rs(t,a);return r.fetcher.getLocalPath(n,r)}async fetch(t,r){let o=t.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(o+1),n=Rs(t,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(t,u,r)}getLocatorFilename(t){return aE(t)}async ensureVirtualLink(t,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(t),A=di.makeVirtualPath(n,u,a),p=new Hu(A,{baseFs:r.packageFs,pathUtils:J});return{...r,packageFs:p}}}});var gE,o1,Fse=yt(()=>{gE=class{static isVirtualDescriptor(t){return!!t.range.startsWith(gE.protocol)}static isVirtualLocator(t){return!!t.reference.startsWith(gE.protocol)}supportsDescriptor(t,r){return gE.isVirtualDescriptor(t)}supportsLocator(t,r){return gE.isVirtualLocator(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(t,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(t,r,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(t,r,o,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(t,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}},o1=gE;o1.protocol="virtual:"});var dE,AM=yt(()=>{St();Bd();dE=class{supports(t){return!!t.reference.startsWith(Vn.protocol)}getLocalPath(t,r){return this.getWorkspace(t,r).cwd}async fetch(t,r){let o=this.getWorkspace(t,r).cwd;return{packageFs:new hn(o),prefixPath:Bt.dot,localPath:o}}getWorkspace(t,r){return r.project.getWorkspaceByCwd(t.reference.slice(Vn.protocol.length))}}});function a1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Rse(e){return typeof e>"u"?3:a1(e)?0:Array.isArray(e)?1:2}function hM(e,t){return Object.hasOwn(e,t)}function prt(e){return a1(e)&&hM(e,"onConflict")&&typeof e.onConflict=="string"}function hrt(e){if(typeof e>"u")return{onConflict:"default",value:e};if(!prt(e))return{onConflict:"default",value:e};if(hM(e,"value"))return e;let{onConflict:t,...r}=e;return{onConflict:t,value:r}}function Tse(e,t){let r=a1(e)&&hM(e,t)?e[t]:void 0;return hrt(r)}function mE(e,t){return[e,t,Nse]}function gM(e){return Array.isArray(e)?e[2]===Nse:!1}function fM(e,t){if(a1(e)){let r={};for(let o of Object.keys(e))r[o]=fM(e[o],t);return mE(t,r)}return Array.isArray(e)?mE(t,e.map(r=>fM(r,t))):mE(t,e)}function pM(e,t,r,o,a){let n,u=[],A=a,p=0;for(let w=a-1;w>=o;--w){let[I,v]=e[w],{onConflict:b,value:E}=Tse(v,r),R=Rse(E);if(R!==3){if(n??=R,R!==n||b==="hardReset"){p=A;break}if(R===2)return mE(I,E);if(u.unshift([I,E]),b==="reset"){p=w;break}b==="extend"&&w===o&&(o=0),A=w}}if(typeof n>"u")return null;let h=u.map(([w])=>w).join(", ");switch(n){case 1:return mE(h,new Array().concat(...u.map(([w,I])=>I.map(v=>fM(v,w)))));case 0:{let w=Object.assign({},...u.map(([,R])=>R)),I=Object.keys(w),v={},b=e.map(([R,N])=>[R,Tse(N,r).value]),E=frt(b,([R,N])=>{let U=Rse(N);return U!==0&&U!==3});if(E!==-1){let R=b.slice(E+1);for(let N of I)v[N]=pM(R,t,N,0,R.length)}else for(let R of I)v[R]=pM(b,t,R,p,b.length);return mE(h,v)}default:throw new Error("Assertion failed: Non-extendable value type")}}function Lse(e){return pM(e.map(([t,r])=>[t,{["."]:r}]),[],".",0,e.length)}function l1(e){return gM(e)?e[1]:e}function jP(e){let t=gM(e)?e[1]:e;if(Array.isArray(t))return t.map(r=>jP(r));if(a1(t)){let r={};for(let[o,a]of Object.entries(t))r[o]=jP(a);return r}return t}function dM(e){return gM(e)?e[0]:null}var frt,Nse,Ose=yt(()=>{frt=(e,t,r)=>{let o=[...e];return o.reverse(),o.findIndex(t,r)};Nse=Symbol()});var qP={};Jt(qP,{getDefaultGlobalFolder:()=>yM,getHomeFolder:()=>yE,isFolderInside:()=>EM});function yM(){if(process.platform==="win32"){let e=Ae.toPortablePath(process.env.LOCALAPPDATA||Ae.join((0,mM.homedir)(),"AppData","Local"));return J.resolve(e,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let e=Ae.toPortablePath(process.env.XDG_DATA_HOME);return J.resolve(e,"yarn/berry")}return J.resolve(yE(),".yarn/berry")}function yE(){return Ae.toPortablePath((0,mM.homedir)()||"/usr/local/share")}function EM(e,t){let r=J.relative(t,e);return r&&!r.startsWith("..")&&!J.isAbsolute(r)}var mM,GP=yt(()=>{St();mM=Ie("os")});var Hse=_(EE=>{"use strict";var MNt=Ie("net"),drt=Ie("tls"),wM=Ie("http"),Mse=Ie("https"),mrt=Ie("events"),UNt=Ie("assert"),yrt=Ie("util");EE.httpOverHttp=Ert;EE.httpsOverHttp=wrt;EE.httpOverHttps=Crt;EE.httpsOverHttps=Irt;function Ert(e){var t=new kf(e);return t.request=wM.request,t}function wrt(e){var t=new kf(e);return t.request=wM.request,t.createSocket=Use,t.defaultPort=443,t}function Crt(e){var t=new kf(e);return t.request=Mse.request,t}function Irt(e){var t=new kf(e);return t.request=Mse.request,t.createSocket=Use,t.defaultPort=443,t}function kf(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||wM.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(o,a,n,u){for(var A=_se(a,n,u),p=0,h=t.requests.length;p<h;++p){var w=t.requests[p];if(w.host===A.host&&w.port===A.port){t.requests.splice(p,1),w.request.onSocket(o);return}}o.destroy(),t.removeSocket(o)})}yrt.inherits(kf,mrt.EventEmitter);kf.prototype.addRequest=function(t,r,o,a){var n=this,u=CM({request:t},n.options,_se(r,o,a));if(n.sockets.length>=this.maxSockets){n.requests.push(u);return}n.createSocket(u,function(A){A.on("free",p),A.on("close",h),A.on("agentRemove",h),t.onSocket(A);function p(){n.emit("free",A,u)}function h(w){n.removeSocket(A),A.removeListener("free",p),A.removeListener("close",h),A.removeListener("agentRemove",h)}})};kf.prototype.createSocket=function(t,r){var o=this,a={};o.sockets.push(a);var n=CM({},o.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:!1,headers:{host:t.host+":"+t.port}});t.localAddress&&(n.localAddress=t.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")),sh("making CONNECT request");var u=o.request(n);u.useChunkedEncodingByDefault=!1,u.once("response",A),u.once("upgrade",p),u.once("connect",h),u.once("error",w),u.end();function A(I){I.upgrade=!0}function p(I,v,b){process.nextTick(function(){h(I,v,b)})}function h(I,v,b){if(u.removeAllListeners(),v.removeAllListeners(),I.statusCode!==200){sh("tunneling socket could not be established, statusCode=%d",I.statusCode),v.destroy();var E=new Error("tunneling socket could not be established, statusCode="+I.statusCode);E.code="ECONNRESET",t.request.emit("error",E),o.removeSocket(a);return}if(b.length>0){sh("got illegal response body from proxy"),v.destroy();var E=new Error("got illegal response body from proxy");E.code="ECONNRESET",t.request.emit("error",E),o.removeSocket(a);return}return sh("tunneling connection has established"),o.sockets[o.sockets.indexOf(a)]=v,r(v)}function w(I){u.removeAllListeners(),sh(`tunneling socket could not be established, cause=%s
142`,I.message,I.stack);var v=new Error("tunneling socket could not be established, cause="+I.message);v.code="ECONNRESET",t.request.emit("error",v),o.removeSocket(a)}};kf.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function Use(e,t){var r=this;kf.prototype.createSocket.call(r,e,function(o){var a=e.request.getHeader("host"),n=CM({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):e.host}),u=drt.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,t(u)})}function _se(e,t,r){return typeof e=="string"?{host:e,port:t,localAddress:r}:e}function CM(e){for(var t=1,r=arguments.length;t<r;++t){var o=arguments[t];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(e[A]=o[A])}}return e}var sh;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?sh=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:sh=function(){};EE.debug=sh});var qse=_((HNt,jse)=>{jse.exports=Hse()});var Rf=_((Ff,YP)=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var Gse=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Brt(e){return Gse.includes(e)}var vrt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...Gse];function Drt(e){return vrt.includes(e)}var Srt=["null","undefined","string","number","bigint","boolean","symbol"];function Prt(e){return Srt.includes(e)}function wE(e){return t=>typeof t===e}var{toString:Yse}=Object.prototype,c1=e=>{let t=Yse.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&xe.domElement(e))return"HTMLElement";if(Drt(t))return t},$n=e=>t=>c1(t)===e;function xe(e){if(e===null)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(xe.observable(e))return"Observable";if(xe.array(e))return"Array";if(xe.buffer(e))return"Buffer";let t=c1(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}xe.undefined=wE("undefined");xe.string=wE("string");var xrt=wE("number");xe.number=e=>xrt(e)&&!xe.nan(e);xe.bigint=wE("bigint");xe.function_=wE("function");xe.null_=e=>e===null;xe.class_=e=>xe.function_(e)&&e.toString().startsWith("class ");xe.boolean=e=>e===!0||e===!1;xe.symbol=wE("symbol");xe.numericString=e=>xe.string(e)&&!xe.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e));xe.array=(e,t)=>Array.isArray(e)?xe.function_(t)?e.every(t):!0:!1;xe.buffer=e=>{var t,r,o,a;return(a=(o=(r=(t=e)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,e))!==null&&a!==void 0?a:!1};xe.nullOrUndefined=e=>xe.null_(e)||xe.undefined(e);xe.object=e=>!xe.null_(e)&&(typeof e=="object"||xe.function_(e));xe.iterable=e=>{var t;return xe.function_((t=e)===null||t===void 0?void 0:t[Symbol.iterator])};xe.asyncIterable=e=>{var t;return xe.function_((t=e)===null||t===void 0?void 0:t[Symbol.asyncIterator])};xe.generator=e=>xe.iterable(e)&&xe.function_(e.next)&&xe.function_(e.throw);xe.asyncGenerator=e=>xe.asyncIterable(e)&&xe.function_(e.next)&&xe.function_(e.throw);xe.nativePromise=e=>$n("Promise")(e);var brt=e=>{var t,r;return xe.function_((t=e)===null||t===void 0?void 0:t.then)&&xe.function_((r=e)===null||r===void 0?void 0:r.catch)};xe.promise=e=>xe.nativePromise(e)||brt(e);xe.generatorFunction=$n("GeneratorFunction");xe.asyncGeneratorFunction=e=>c1(e)==="AsyncGeneratorFunction";xe.asyncFunction=e=>c1(e)==="AsyncFunction";xe.boundFunction=e=>xe.function_(e)&&!e.hasOwnProperty("prototype");xe.regExp=$n("RegExp");xe.date=$n("Date");xe.error=$n("Error");xe.map=e=>$n("Map")(e);xe.set=e=>$n("Set")(e);xe.weakMap=e=>$n("WeakMap")(e);xe.weakSet=e=>$n("WeakSet")(e);xe.int8Array=$n("Int8Array");xe.uint8Array=$n("Uint8Array");xe.uint8ClampedArray=$n("Uint8ClampedArray");xe.int16Array=$n("Int16Array");xe.uint16Array=$n("Uint16Array");xe.int32Array=$n("Int32Array");xe.uint32Array=$n("Uint32Array");xe.float32Array=$n("Float32Array");xe.float64Array=$n("Float64Array");xe.bigInt64Array=$n("BigInt64Array");xe.bigUint64Array=$n("BigUint64Array");xe.arrayBuffer=$n("ArrayBuffer");xe.sharedArrayBuffer=$n("SharedArrayBuffer");xe.dataView=$n("DataView");xe.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype;xe.urlInstance=e=>$n("URL")(e);xe.urlString=e=>{if(!xe.string(e))return!1;try{return new URL(e),!0}catch{return!1}};xe.truthy=e=>Boolean(e);xe.falsy=e=>!e;xe.nan=e=>Number.isNaN(e);xe.primitive=e=>xe.null_(e)||Prt(typeof e);xe.integer=e=>Number.isInteger(e);xe.safeInteger=e=>Number.isSafeInteger(e);xe.plainObject=e=>{if(Yse.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};xe.typedArray=e=>Brt(c1(e));var Qrt=e=>xe.safeInteger(e)&&e>=0;xe.arrayLike=e=>!xe.nullOrUndefined(e)&&!xe.function_(e)&&Qrt(e.length);xe.inRange=(e,t)=>{if(xe.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(xe.array(t)&&t.length===2)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};var krt=1,Frt=["innerHTML","ownerDocument","style","attributes","nodeValue"];xe.domElement=e=>xe.object(e)&&e.nodeType===krt&&xe.string(e.nodeName)&&!xe.plainObject(e)&&Frt.every(t=>t in e);xe.observable=e=>{var t,r,o,a;return e?e===((r=(t=e)[Symbol.observable])===null||r===void 0?void 0:r.call(t))||e===((a=(o=e)["@@observable"])===null||a===void 0?void 0:a.call(o)):!1};xe.nodeStream=e=>xe.object(e)&&xe.function_(e.pipe)&&!xe.observable(e);xe.infinite=e=>e===1/0||e===-1/0;var Wse=e=>t=>xe.integer(t)&&Math.abs(t%2)===e;xe.evenInteger=Wse(0);xe.oddInteger=Wse(1);xe.emptyArray=e=>xe.array(e)&&e.length===0;xe.nonEmptyArray=e=>xe.array(e)&&e.length>0;xe.emptyString=e=>xe.string(e)&&e.length===0;xe.nonEmptyString=e=>xe.string(e)&&e.length>0;var Rrt=e=>xe.string(e)&&!/\S/.test(e);xe.emptyStringOrWhitespace=e=>xe.emptyString(e)||Rrt(e);xe.emptyObject=e=>xe.object(e)&&!xe.map(e)&&!xe.set(e)&&Object.keys(e).length===0;xe.nonEmptyObject=e=>xe.object(e)&&!xe.map(e)&&!xe.set(e)&&Object.keys(e).length>0;xe.emptySet=e=>xe.set(e)&&e.size===0;xe.nonEmptySet=e=>xe.set(e)&&e.size>0;xe.emptyMap=e=>xe.map(e)&&e.size===0;xe.nonEmptyMap=e=>xe.map(e)&&e.size>0;xe.propertyKey=e=>xe.any([xe.string,xe.number,xe.symbol],e);xe.formData=e=>$n("FormData")(e);xe.urlSearchParams=e=>$n("URLSearchParams")(e);var Kse=(e,t,r)=>{if(!xe.function_(t))throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(r.length===0)throw new TypeError("Invalid number of values");return e.call(r,t)};xe.any=(e,...t)=>(xe.array(e)?e:[e]).some(o=>Kse(Array.prototype.some,o,t));xe.all=(e,...t)=>Kse(Array.prototype.every,e,t);var Ht=(e,t,r,o={})=>{if(!e){let{multipleValues:a}=o,n=a?`received values of types ${[...new Set(r.map(u=>`\`${xe(u)}\``))].join(", ")}`:`received value of type \`${xe(r)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${n}.`)}};Ff.assert={undefined:e=>Ht(xe.undefined(e),"undefined",e),string:e=>Ht(xe.string(e),"string",e),number:e=>Ht(xe.number(e),"number",e),bigint:e=>Ht(xe.bigint(e),"bigint",e),function_:e=>Ht(xe.function_(e),"Function",e),null_:e=>Ht(xe.null_(e),"null",e),class_:e=>Ht(xe.class_(e),"Class",e),boolean:e=>Ht(xe.boolean(e),"boolean",e),symbol:e=>Ht(xe.symbol(e),"symbol",e),numericString:e=>Ht(xe.numericString(e),"string with a number",e),array:(e,t)=>{Ht(xe.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>Ht(xe.buffer(e),"Buffer",e),nullOrUndefined:e=>Ht(xe.nullOrUndefined(e),"null or undefined",e),object:e=>Ht(xe.object(e),"Object",e),iterable:e=>Ht(xe.iterable(e),"Iterable",e),asyncIterable:e=>Ht(xe.asyncIterable(e),"AsyncIterable",e),generator:e=>Ht(xe.generator(e),"Generator",e),asyncGenerator:e=>Ht(xe.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>Ht(xe.nativePromise(e),"native Promise",e),promise:e=>Ht(xe.promise(e),"Promise",e),generatorFunction:e=>Ht(xe.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>Ht(xe.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>Ht(xe.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>Ht(xe.boundFunction(e),"Function",e),regExp:e=>Ht(xe.regExp(e),"RegExp",e),date:e=>Ht(xe.date(e),"Date",e),error:e=>Ht(xe.error(e),"Error",e),map:e=>Ht(xe.map(e),"Map",e),set:e=>Ht(xe.set(e),"Set",e),weakMap:e=>Ht(xe.weakMap(e),"WeakMap",e),weakSet:e=>Ht(xe.weakSet(e),"WeakSet",e),int8Array:e=>Ht(xe.int8Array(e),"Int8Array",e),uint8Array:e=>Ht(xe.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>Ht(xe.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>Ht(xe.int16Array(e),"Int16Array",e),uint16Array:e=>Ht(xe.uint16Array(e),"Uint16Array",e),int32Array:e=>Ht(xe.int32Array(e),"Int32Array",e),uint32Array:e=>Ht(xe.uint32Array(e),"Uint32Array",e),float32Array:e=>Ht(xe.float32Array(e),"Float32Array",e),float64Array:e=>Ht(xe.float64Array(e),"Float64Array",e),bigInt64Array:e=>Ht(xe.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>Ht(xe.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>Ht(xe.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>Ht(xe.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>Ht(xe.dataView(e),"DataView",e),urlInstance:e=>Ht(xe.urlInstance(e),"URL",e),urlString:e=>Ht(xe.urlString(e),"string with a URL",e),truthy:e=>Ht(xe.truthy(e),"truthy",e),falsy:e=>Ht(xe.falsy(e),"falsy",e),nan:e=>Ht(xe.nan(e),"NaN",e),primitive:e=>Ht(xe.primitive(e),"primitive",e),integer:e=>Ht(xe.integer(e),"integer",e),safeInteger:e=>Ht(xe.safeInteger(e),"integer",e),plainObject:e=>Ht(xe.plainObject(e),"plain object",e),typedArray:e=>Ht(xe.typedArray(e),"TypedArray",e),arrayLike:e=>Ht(xe.arrayLike(e),"array-like",e),domElement:e=>Ht(xe.domElement(e),"HTMLElement",e),observable:e=>Ht(xe.observable(e),"Observable",e),nodeStream:e=>Ht(xe.nodeStream(e),"Node.js Stream",e),infinite:e=>Ht(xe.infinite(e),"infinite number",e),emptyArray:e=>Ht(xe.emptyArray(e),"empty array",e),nonEmptyArray:e=>Ht(xe.nonEmptyArray(e),"non-empty array",e),emptyString:e=>Ht(xe.emptyString(e),"empty string",e),nonEmptyString:e=>Ht(xe.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>Ht(xe.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>Ht(xe.emptyObject(e),"empty object",e),nonEmptyObject:e=>Ht(xe.nonEmptyObject(e),"non-empty object",e),emptySet:e=>Ht(xe.emptySet(e),"empty set",e),nonEmptySet:e=>Ht(xe.nonEmptySet(e),"non-empty set",e),emptyMap:e=>Ht(xe.emptyMap(e),"empty map",e),nonEmptyMap:e=>Ht(xe.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>Ht(xe.propertyKey(e),"PropertyKey",e),formData:e=>Ht(xe.formData(e),"FormData",e),urlSearchParams:e=>Ht(xe.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>Ht(xe.evenInteger(e),"even integer",e),oddInteger:e=>Ht(xe.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>Ht(xe.directInstanceOf(e,t),"T",e),inRange:(e,t)=>Ht(xe.inRange(e,t),"in range",e),any:(e,...t)=>Ht(xe.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0}),all:(e,...t)=>Ht(xe.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})};Object.defineProperties(xe,{class:{value:xe.class_},function:{value:xe.function_},null:{value:xe.null_}});Object.defineProperties(Ff.assert,{class:{value:Ff.assert.class_},function:{value:Ff.assert.function_},null:{value:Ff.assert.null_}});Ff.default=xe;YP.exports=xe;YP.exports.default=xe;YP.exports.assert=Ff.assert});var Jse=_((jNt,IM)=>{"use strict";var WP=class extends Error{constructor(t){super(t||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},CE=class{static fn(t){return(...r)=>new CE((o,a,n)=>{r.push(n),t(...r).then(o,a)})}constructor(t){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,o)=>{this._reject=o;let a=A=>{this._isPending=!1,r(A)},n=A=>{this._isPending=!1,o(A)},u=A=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(A)};return Object.defineProperties(u,{shouldReject:{get:()=>this._rejectOnCancel,set:A=>{this._rejectOnCancel=A}}}),t(a,n,u)})}then(t,r){return this._promise.then(t,r)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(t){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new WP(t))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(CE.prototype,Promise.prototype);IM.exports=CE;IM.exports.CancelError=WP});var Vse=_((vM,DM)=>{"use strict";Object.defineProperty(vM,"__esModule",{value:!0});var Trt=Ie("tls"),BM=(e,t)=>{let r;typeof t=="function"?r={connect:t}:r=t;let o=typeof r.connect=="function",a=typeof r.secureConnect=="function",n=typeof r.close=="function",u=()=>{o&&r.connect(),e instanceof Trt.TLSSocket&&a&&(e.authorized?r.secureConnect():e.authorizationError||e.once("secureConnect",r.secureConnect)),n&&e.once("close",r.close)};e.writable&&!e.connecting?u():e.connecting?e.once("connect",u):e.destroyed&&n&&r.close(e._hadError)};vM.default=BM;DM.exports=BM;DM.exports.default=BM});var zse=_((PM,xM)=>{"use strict";Object.defineProperty(PM,"__esModule",{value:!0});var Nrt=Vse(),Lrt=Number(process.versions.node.split(".")[0]),SM=e=>{let t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;let r=u=>{let A=u.emit.bind(u);u.emit=(p,...h)=>(p==="error"&&(t.error=Date.now(),t.phases.total=t.error-t.start,u.emit=A),A(p,...h))};r(e),e.prependOnceListener("abort",()=>{t.abort=Date.now(),(!t.response||Lrt>=13)&&(t.phases.total=Date.now()-t.start)});let o=u=>{t.socket=Date.now(),t.phases.wait=t.socket-t.start;let A=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};u.prependOnceListener("lookup",A),Nrt.default(u,{connect:()=>{t.connect=Date.now(),t.lookup===void 0&&(u.removeListener("lookup",A),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?o(e.socket):e.prependOnceListener("socket",o);let a=()=>{var u;t.upload=Date.now(),t.phases.request=t.upload-(u=t.secureConnect,u??t.connect)};return(()=>typeof e.writableFinished=="boolean"?e.writableFinished:e.finished&&e.outputSize===0&&(!e.socket||e.socket.writableLength===0))()?a():e.prependOnceListener("finish",a),e.prependOnceListener("response",u=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,u.timings=t,r(u),u.prependOnceListener("end",()=>{t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start})}),t};PM.default=SM;xM.exports=SM;xM.exports.default=SM});var noe=_((qNt,kM)=>{"use strict";var{V4MAPPED:Ort,ADDRCONFIG:Mrt,ALL:roe,promises:{Resolver:Xse},lookup:Urt}=Ie("dns"),{promisify:bM}=Ie("util"),_rt=Ie("os"),IE=Symbol("cacheableLookupCreateConnection"),QM=Symbol("cacheableLookupInstance"),Zse=Symbol("expires"),Hrt=typeof roe=="number",$se=e=>{if(!(e&&typeof e.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},jrt=e=>{for(let t of e)t.family!==6&&(t.address=`::ffff:${t.address}`,t.family=6)},eoe=()=>{let e=!1,t=!1;for(let r of Object.values(_rt.networkInterfaces()))for(let o of r)if(!o.internal&&(o.family==="IPv6"?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},qrt=e=>Symbol.iterator in e,toe={ttl:!0},Grt={all:!0},KP=class{constructor({cache:t=new Map,maxTtl:r=1/0,fallbackDuration:o=3600,errorTtl:a=.15,resolver:n=new Xse,lookup:u=Urt}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=t,this._resolver=n,this._dnsLookup=bM(u),this._resolver instanceof Xse?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=bM(this._resolver.resolve4.bind(this._resolver)),this._resolve6=bM(this._resolver.resolve6.bind(this._resolver))),this._iface=eoe(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,o<1)this._fallback=!1;else{this._fallback=!0;let A=setInterval(()=>{this._hostnamesToFallback.clear()},o*1e3);A.unref&&A.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(t){this.clear(),this._resolver.setServers(t)}get servers(){return this._resolver.getServers()}lookup(t,r,o){if(typeof r=="function"?(o=r,r={}):typeof r=="number"&&(r={family:r}),!o)throw new Error("Callback must be a function.");this.lookupAsync(t,r).then(a=>{r.all?o(null,a):o(null,a.address,a.family,a.expires,a.ttl)},o)}async lookupAsync(t,r={}){typeof r=="number"&&(r={family:r});let o=await this.query(t);if(r.family===6){let a=o.filter(n=>n.family===6);r.hints&Ort&&(Hrt&&r.hints&roe||a.length===0)?jrt(o):o=a}else r.family===4&&(o=o.filter(a=>a.family===4));if(r.hints&Mrt){let{_iface:a}=this;o=o.filter(n=>n.family===6?a.has6:a.has4)}if(o.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${t}`);throw a.code="ENOTFOUND",a.hostname=t,a}return r.all?o:o[0]}async query(t){let r=await this._cache.get(t);if(!r){let o=this._pending[t];if(o)r=await o;else{let a=this.queryAndCache(t);this._pending[t]=a,r=await a}}return r=r.map(o=>({...o})),r}async _resolve(t){let r=async h=>{try{return await h}catch(w){if(w.code==="ENODATA"||w.code==="ENOTFOUND")return[];throw w}},[o,a]=await Promise.all([this._resolve4(t,toe),this._resolve6(t,toe)].map(h=>r(h))),n=0,u=0,A=0,p=Date.now();for(let h of o)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,u=Math.max(u,h.ttl);return o.length>0?a.length>0?A=Math.min(n,u):A=n:A=u,{entries:[...o,...a],cacheTtl:A}}async _lookup(t){try{return{entries:await this._dnsLookup(t,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(t,r,o){if(this.maxTtl>0&&o>0){o=Math.min(o,this.maxTtl)*1e3,r[Zse]=Date.now()+o;try{await this._cache.set(t,r,o)}catch(a){this.lookupAsync=async()=>{let n=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw n.cause=a,n}}qrt(this._cache)&&this._tick(o)}}async queryAndCache(t){if(this._hostnamesToFallback.has(t))return this._dnsLookup(t,Grt);try{let r=await this._resolve(t);r.entries.length===0&&this._fallback&&(r=await this._lookup(t),r.entries.length!==0&&this._hostnamesToFallback.add(t));let o=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(t,r.entries,o),delete this._pending[t],r.entries}catch(r){throw delete this._pending[t],r}}_tick(t){let r=this._nextRemovalTime;(!r||t<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=t,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let o=1/0,a=Date.now();for(let[n,u]of this._cache){let A=u[Zse];a>=A?this._cache.delete(n):A<o&&(o=A)}o!==1/0&&this._tick(o-a)},t),this._removalTimeout.unref&&this._removalTimeout.unref())}install(t){if($se(t),IE in t)throw new Error("CacheableLookup has been already installed");t[IE]=t.createConnection,t[QM]=this,t.createConnection=(r,o)=>("lookup"in r||(r.lookup=this.lookup),t[IE](r,o))}uninstall(t){if($se(t),t[IE]){if(t[QM]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");t.createConnection=t[IE],delete t[IE],delete t[QM]}}updateInterfaceInfo(){let{_iface:t}=this;this._iface=eoe(),(t.has4&&!this._iface.has4||t.has6&&!this._iface.has6)&&this._cache.clear()}clear(t){if(t){this._cache.delete(t);return}this._cache.clear()}};kM.exports=KP;kM.exports.default=KP});var ooe=_((GNt,FM)=>{"use strict";var Yrt=typeof URL>"u"?Ie("url").URL:URL,Wrt="text/plain",Krt="us-ascii",ioe=(e,t)=>t.some(r=>r instanceof RegExp?r.test(e):r===e),Jrt=(e,{stripHash:t})=>{let r=e.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${e}`);let o=r[1].split(";"),a=r[2],n=t?"":r[3],u=!1;o[o.length-1]==="base64"&&(o.pop(),u=!0);let A=(o.shift()||"").toLowerCase(),h=[...o.map(w=>{let[I,v=""]=w.split("=").map(b=>b.trim());return I==="charset"&&(v=v.toLowerCase(),v===Krt)?"":`${I}${v?`=${v}`:""}`}).filter(Boolean)];return u&&h.push("base64"),(h.length!==0||A&&A!==Wrt)&&h.unshift(A),`data:${h.join(";")},${u?a.trim():a}${n?`#${n}`:""}`},soe=(e,t)=>{if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...t},Reflect.has(t,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(t,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(t,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(e=e.trim(),/^data:/i.test(e))return Jrt(e,t);let r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let a=new Yrt(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),t.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),t.stripAuthentication&&(a.username="",a.password=""),t.stripHash&&(a.hash=""),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\/{2,}/g,(n,u)=>/^(?!\/)/g.test(u)?`${u}/`:"/")),a.pathname&&(a.pathname=decodeURI(a.pathname)),t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let n=a.pathname.split("/"),u=n[n.length-1];ioe(u,t.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(let n of[...a.searchParams.keys()])ioe(n,t.removeQueryParameters)&&a.searchParams.delete(n);return t.sortQueryParameters&&a.searchParams.sort(),t.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,"")),e=a.toString(),(t.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e};FM.exports=soe;FM.exports.default=soe});var coe=_((YNt,loe)=>{loe.exports=aoe;function aoe(e,t){if(e&&t)return aoe(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(o){r[o]=e[o]}),r;function r(){for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];var n=e.apply(this,o),u=o[o.length-1];return typeof n=="function"&&n!==u&&Object.keys(u).forEach(function(A){n[A]=u[A]}),n}}});var TM=_((WNt,RM)=>{var uoe=coe();RM.exports=uoe(JP);RM.exports.strict=uoe(Aoe);JP.proto=JP(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return JP(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Aoe(this)},configurable:!0})});function JP(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Aoe(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var NM=_((KNt,poe)=>{var Vrt=TM(),zrt=function(){},Xrt=function(e){return e.setHeader&&typeof e.abort=="function"},Zrt=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},foe=function(e,t,r){if(typeof t=="function")return foe(e,null,t);t||(t={}),r=Vrt(r||zrt);var o=e._writableState,a=e._readableState,n=t.readable||t.readable!==!1&&e.readable,u=t.writable||t.writable!==!1&&e.writable,A=function(){e.writable||p()},p=function(){u=!1,n||r.call(e)},h=function(){n=!1,u||r.call(e)},w=function(E){r.call(e,E?new Error("exited with error code: "+E):null)},I=function(E){r.call(e,E)},v=function(){if(n&&!(a&&a.ended))return r.call(e,new Error("premature close"));if(u&&!(o&&o.ended))return r.call(e,new Error("premature close"))},b=function(){e.req.on("finish",p)};return Xrt(e)?(e.on("complete",p),e.on("abort",v),e.req?b():e.on("request",b)):u&&!o&&(e.on("end",A),e.on("close",A)),Zrt(e)&&e.on("exit",w),e.on("end",h),e.on("finish",p),t.error!==!1&&e.on("error",I),e.on("close",v),function(){e.removeListener("complete",p),e.removeListener("abort",v),e.removeListener("request",b),e.req&&e.req.removeListener("finish",p),e.removeListener("end",A),e.removeListener("close",A),e.removeListener("finish",p),e.removeListener("exit",w),e.removeListener("end",h),e.removeListener("error",I),e.removeListener("close",v)}};poe.exports=foe});var doe=_((JNt,goe)=>{var $rt=TM(),ent=NM(),LM=Ie("fs"),u1=function(){},tnt=/^v?\.0/.test(process.version),VP=function(e){return typeof e=="function"},rnt=function(e){return!tnt||!LM?!1:(e instanceof(LM.ReadStream||u1)||e instanceof(LM.WriteStream||u1))&&VP(e.close)},nnt=function(e){return e.setHeader&&VP(e.abort)},int=function(e,t,r,o){o=$rt(o);var a=!1;e.on("close",function(){a=!0}),ent(e,{readable:t,writable:r},function(u){if(u)return o(u);a=!0,o()});var n=!1;return function(u){if(!a&&!n){if(n=!0,rnt(e))return e.close(u1);if(nnt(e))return e.abort();if(VP(e.destroy))return e.destroy();o(u||new Error("stream was destroyed"))}}},hoe=function(e){e()},snt=function(e,t){return e.pipe(t)},ont=function(){var e=Array.prototype.slice.call(arguments),t=VP(e[e.length-1]||u1)&&e.pop()||u1;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(a,n){var u=n<e.length-1,A=n>0;return int(a,u,A,function(p){r||(r=p),p&&o.forEach(hoe),!u&&(o.forEach(hoe),t(r))})});return e.reduce(snt)};goe.exports=ont});var yoe=_((VNt,moe)=>{"use strict";var{PassThrough:ant}=Ie("stream");moe.exports=e=>{e={...e};let{array:t}=e,{encoding:r}=e,o=r==="buffer",a=!1;t?a=!(r||o):r=r||"utf8",o&&(r=null);let n=new ant({objectMode:a});r&&n.setEncoding(r);let u=0,A=[];return n.on("data",p=>{A.push(p),a?u=A.length:u+=p.length}),n.getBufferedValue=()=>t?A:o?Buffer.concat(A,u):A.join(""),n.getBufferedLength=()=>u,n}});var Eoe=_((zNt,BE)=>{"use strict";var lnt=doe(),cnt=yoe(),zP=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function XP(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,o;return await new Promise((a,n)=>{let u=A=>{A&&(A.bufferedData=o.getBufferedValue()),n(A)};o=lnt(e,cnt(t),A=>{if(A){u(A);return}a()}),o.on("data",()=>{o.getBufferedLength()>r&&u(new zP)})}),o.getBufferedValue()}BE.exports=XP;BE.exports.default=XP;BE.exports.buffer=(e,t)=>XP(e,{...t,encoding:"buffer"});BE.exports.array=(e,t)=>XP(e,{...t,array:!0});BE.exports.MaxBufferError=zP});var Coe=_((ZNt,woe)=>{"use strict";var unt=new Set([200,203,204,206,300,301,404,405,410,414,501]),Ant=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),fnt=new Set([500,502,503,504]),pnt={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},hnt={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Dd(e){let t=parseInt(e,10);return isFinite(t)?t:0}function gnt(e){return e?fnt.has(e.status):!0}function OM(e){let t={};if(!e)return t;let r=e.trim().split(/\s*,\s*/);for(let o of r){let[a,n]=o.split(/\s*=\s*/,2);t[a]=n===void 0?!0:n.replace(/^"|"$/g,"")}return t}function dnt(e){let t=[];for(let r in e){let o=e[r];t.push(o===!0?r:r+"="+o)}if(!!t.length)return t.join(", ")}woe.exports=class{constructor(t,r,{shared:o,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:u,_fromObject:A}={}){if(A){this._fromObject(A);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(t),this._responseTime=this.now(),this._isShared=o!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=OM(r.headers["cache-control"]),this._method="method"in t?t.method:"GET",this._url=t.url,this._host=t.headers.host,this._noAuthorization=!t.headers.authorization,this._reqHeaders=r.headers.vary?t.headers:null,this._reqcc=OM(t.headers["cache-control"]),u&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":dnt(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&Ant.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||unt.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(t){if(!t||!t.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(t){this._assertRequestHasHeaders(t);let r=OM(t.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(t.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(t,!1)}_requestMatches(t,r){return(!this._url||this._url===t.url)&&this._host===t.headers.host&&(!t.method||this._method===t.method||r&&t.method==="HEAD")&&this._varyMatches(t)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(t){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let o of r)if(t.headers[o]!==this._reqHeaders[o])return!1;return!0}_copyWithoutHopByHopHeaders(t){let r={};for(let o in t)pnt[o]||(r[o]=t[o]);if(t.connection){let o=t.connection.trim().split(/\s*,\s*/);for(let a of o)delete r[a]}if(r.warning){let o=r.warning.split(/,/).filter(a=>!/^\s*1[0-9][0-9]/.test(a));o.length?r.warning=o.join(",").trim():delete r.warning}return r}responseHeaders(){let t=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(t.warning=(t.warning?`${t.warning}, `:"")+'113 - "rfc7234 5.5.4"'),t.age=`${Math.round(r)}`,t.date=new Date(this.now()).toUTCString(),t}date(){let t=Date.parse(this._resHeaders.date);return isFinite(t)?t:this._responseTime}age(){let t=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return t+r}_ageValue(){return Dd(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return Dd(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Dd(this._rescc["max-age"]);let t=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let o=Date.parse(this._resHeaders.expires);return Number.isNaN(o)||o<r?0:Math.max(t,(o-r)/1e3)}if(this._resHeaders["last-modified"]){let o=Date.parse(this._resHeaders["last-modified"]);if(isFinite(o)&&r>o)return Math.max(t,(r-o)/1e3*this._cacheHeuristic)}return t}timeToLive(){let t=this.maxAge()-this.age(),r=t+Dd(this._rescc["stale-if-error"]),o=t+Dd(this._rescc["stale-while-revalidate"]);return Math.max(0,t,r,o)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Dd(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Dd(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(t){return new this(void 0,void 0,{_fromObject:t})}_fromObject(t){if(this._responseTime)throw Error("Reinitialized");if(!t||t.v!==1)throw Error("Invalid serialization");this._responseTime=t.t,this._isShared=t.sh,this._cacheHeuristic=t.ch,this._immutableMinTtl=t.imm!==void 0?t.imm:24*3600*1e3,this._status=t.st,this._resHeaders=t.resh,this._rescc=t.rescc,this._method=t.m,this._url=t.u,this._host=t.h,this._noAuthorization=t.a,this._reqHeaders=t.reqh,this._reqcc=t.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(t){this._assertRequestHasHeaders(t);let r=this._copyWithoutHopByHopHeaders(t.headers);if(delete r["if-range"],!this._requestMatches(t,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let a=r["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));a.length?r["if-none-match"]=a.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(t,r){if(this._assertRequestHasHeaders(t),this._useStaleIfError()&&gnt(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let o=!1;if(r.status!==void 0&&r.status!=304?o=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?o=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?o=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?o=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(o=!0),!o)return{policy:new this.constructor(t,r),modified:r.status!=304,matches:!1};let a={};for(let u in this._resHeaders)a[u]=u in r.headers&&!hnt[u]?r.headers[u]:this._resHeaders[u];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(t,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var ZP=_(($Nt,Ioe)=>{"use strict";Ioe.exports=e=>{let t={};for(let[r,o]of Object.entries(e))t[r.toLowerCase()]=o;return t}});var voe=_((eLt,Boe)=>{"use strict";var mnt=Ie("stream").Readable,ynt=ZP(),MM=class extends mnt{constructor(t,r,o,a){if(typeof t!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(o instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof a!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=t,this.headers=ynt(r),this.body=o,this.url=a}_read(){this.push(this.body),this.push(null)}};Boe.exports=MM});var Soe=_((tLt,Doe)=>{"use strict";var Ent=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];Doe.exports=(e,t)=>{let r=new Set(Object.keys(e).concat(Ent));for(let o of r)o in t||(t[o]=typeof e[o]=="function"?e[o].bind(e):e[o])}});var xoe=_((rLt,Poe)=>{"use strict";var wnt=Ie("stream").PassThrough,Cnt=Soe(),Int=e=>{if(!(e&&e.pipe))throw new TypeError("Parameter `response` must be a response stream.");let t=new wnt;return Cnt(e,t),e.pipe(t)};Poe.exports=Int});var boe=_(UM=>{UM.stringify=function e(t){if(typeof t>"u")return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&typeof t=="object"){var r="",o=Array.isArray(t);r=o?"[":"{";var a=!0;for(var n in t){var u=typeof t[n]=="function"||!o&&typeof t[n]>"u";Object.hasOwnProperty.call(t,n)&&!u&&(a||(r+=","),a=!1,o?t[n]==null?r+="null":r+=e(t[n]):t[n]!==void 0&&(r+=e(n)+":"+e(t[n])))}return r+=o?"]":"}",r}else return typeof t=="string"?JSON.stringify(/^:/.test(t)?":"+t:t):typeof t>"u"?"null":JSON.stringify(t)};UM.parse=function(e){return JSON.parse(e,function(t,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var Foe=_((iLt,koe)=>{"use strict";var Bnt=Ie("events"),Qoe=boe(),vnt=e=>{let t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){let r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(Ie(t[r]))(e)}return new Map},_M=class extends Bnt{constructor(t,r){if(super(),this.opts=Object.assign({namespace:"keyv",serialize:Qoe.stringify,deserialize:Qoe.parse},typeof t=="string"?{uri:t}:t,r),!this.opts.store){let o=Object.assign({},this.opts);this.opts.store=vnt(o)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",o=>this.emit("error",o)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(t){return`${this.opts.namespace}:${t}`}get(t,r){t=this._getKeyPrefix(t);let{store:o}=this.opts;return Promise.resolve().then(()=>o.get(t)).then(a=>typeof a=="string"?this.opts.deserialize(a):a).then(a=>{if(a!==void 0){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(t);return}return r&&r.raw?a:a.value}})}set(t,r,o){t=this._getKeyPrefix(t),typeof o>"u"&&(o=this.opts.ttl),o===0&&(o=void 0);let{store:a}=this.opts;return Promise.resolve().then(()=>{let n=typeof o=="number"?Date.now()+o:null;return r={value:r,expires:n},this.opts.serialize(r)}).then(n=>a.set(t,n,o)).then(()=>!0)}delete(t){t=this._getKeyPrefix(t);let{store:r}=this.opts;return Promise.resolve().then(()=>r.delete(t))}clear(){let{store:t}=this.opts;return Promise.resolve().then(()=>t.clear())}};koe.exports=_M});var Noe=_((oLt,Toe)=>{"use strict";var Dnt=Ie("events"),$P=Ie("url"),Snt=ooe(),Pnt=Eoe(),HM=Coe(),Roe=voe(),xnt=ZP(),bnt=xoe(),Qnt=Foe(),qc=class{constructor(t,r){if(typeof t!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new Qnt({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(t)}createCacheableRequest(t){return(r,o)=>{let a;if(typeof r=="string")a=jM($P.parse(r)),r={};else if(r instanceof $P.URL)a=jM($P.parse(r.toString())),r={};else{let[I,...v]=(r.path||"").split("?"),b=v.length>0?`?${v.join("?")}`:"";a=jM({...r,pathname:I,search:b})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...knt(a)},r.headers=xnt(r.headers);let n=new Dnt,u=Snt($P.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),A=`${r.method}:${u}`,p=!1,h=!1,w=I=>{h=!0;let v=!1,b,E=new Promise(N=>{b=()=>{v||(v=!0,N())}}),R=N=>{if(p&&!I.forceRefresh){N.status=N.statusCode;let V=HM.fromObject(p.cachePolicy).revalidatedPolicy(I,N);if(!V.modified){let ee=V.policy.responseHeaders();N=new Roe(p.statusCode,ee,p.body,p.url),N.cachePolicy=V.policy,N.fromCache=!0}}N.fromCache||(N.cachePolicy=new HM(I,N,I),N.fromCache=!1);let U;I.cache&&N.cachePolicy.storable()?(U=bnt(N),(async()=>{try{let V=Pnt.buffer(N);if(await Promise.race([E,new Promise(de=>N.once("end",de))]),v)return;let ee=await V,le={cachePolicy:N.cachePolicy.toObject(),url:N.url,statusCode:N.fromCache?p.statusCode:N.statusCode,body:ee},fe=I.strictTtl?N.cachePolicy.timeToLive():void 0;I.maxTtl&&(fe=fe?Math.min(fe,I.maxTtl):I.maxTtl),await this.cache.set(A,le,fe)}catch(V){n.emit("error",new qc.CacheError(V))}})()):I.cache&&p&&(async()=>{try{await this.cache.delete(A)}catch(V){n.emit("error",new qc.CacheError(V))}})(),n.emit("response",U||N),typeof o=="function"&&o(U||N)};try{let N=t(I,R);N.once("error",b),N.once("abort",b),n.emit("request",N)}catch(N){n.emit("error",new qc.RequestError(N))}};return(async()=>{let I=async b=>{await Promise.resolve();let E=b.cache?await this.cache.get(A):void 0;if(typeof E>"u")return w(b);let R=HM.fromObject(E.cachePolicy);if(R.satisfiesWithoutRevalidation(b)&&!b.forceRefresh){let N=R.responseHeaders(),U=new Roe(E.statusCode,N,E.body,E.url);U.cachePolicy=R,U.fromCache=!0,n.emit("response",U),typeof o=="function"&&o(U)}else p=E,b.headers=R.revalidationHeaders(b),w(b)},v=b=>n.emit("error",new qc.CacheError(b));this.cache.once("error",v),n.on("response",()=>this.cache.removeListener("error",v));try{await I(r)}catch(b){r.automaticFailover&&!h&&w(r),n.emit("error",new qc.CacheError(b))}})(),n}}};function knt(e){let t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function jM(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}qc.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}};qc.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}};Toe.exports=qc});var Ooe=_((cLt,Loe)=>{"use strict";var Fnt=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];Loe.exports=(e,t)=>{if(t._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(e).concat(Fnt)),o={};for(let a of r)a in t||(o[a]={get(){let n=e[a];return typeof n=="function"?n.bind(e):n},set(n){e[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(t,o),e.once("aborted",()=>{t.destroy(),t.emit("aborted")}),e.once("close",()=>{e.complete&&t.readable?t.once("end",()=>{t.emit("close")}):t.emit("close")}),t}});var Uoe=_((uLt,Moe)=>{"use strict";var{Transform:Rnt,PassThrough:Tnt}=Ie("stream"),qM=Ie("zlib"),Nnt=Ooe();Moe.exports=e=>{let t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t))return e;let r=t==="br";if(r&&typeof qM.createBrotliDecompress!="function")return e.destroy(new Error("Brotli is not supported on Node.js < 12")),e;let o=!0,a=new Rnt({transform(A,p,h){o=!1,h(null,A)},flush(A){A()}}),n=new Tnt({autoDestroy:!1,destroy(A,p){e.destroy(),p(A)}}),u=r?qM.createBrotliDecompress():qM.createUnzip();return u.once("error",A=>{if(o&&!e.readable){n.end();return}n.destroy(A)}),Nnt(e,n),e.pipe(a).pipe(u).pipe(n),n}});var YM=_((ALt,_oe)=>{"use strict";var GM=class{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,r){if(this.cache.set(t,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[o,a]of this.oldCache.entries())this.onEviction(o,a);this.oldCache=this.cache,this.cache=new Map}}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){let r=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,r),r}}set(t,r){return this.cache.has(t)?this.cache.set(t,r):this._set(t,r),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){let r=this.cache.delete(t);return r&&this._size--,this.oldCache.delete(t)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[t]of this)yield t}*values(){for(let[,t]of this)yield t}*[Symbol.iterator](){for(let t of this.cache)yield t;for(let t of this.oldCache){let[r]=t;this.cache.has(r)||(yield t)}}get size(){let t=0;for(let r of this.oldCache.keys())this.cache.has(r)||t++;return Math.min(this._size+t,this.maxSize)}};_oe.exports=GM});var KM=_((fLt,Goe)=>{"use strict";var Lnt=Ie("events"),Ont=Ie("tls"),Mnt=Ie("http2"),Unt=YM(),ea=Symbol("currentStreamsCount"),Hoe=Symbol("request"),Wl=Symbol("cachedOriginSet"),vE=Symbol("gracefullyClosing"),_nt=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],Hnt=(e,t,r)=>{let o=0,a=e.length;for(;o<a;){let n=o+a>>>1;r(e[n],t)?o=n+1:a=n}return o},jnt=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,WM=(e,t)=>{for(let r of e)r[Wl].length<t[Wl].length&&r[Wl].every(o=>t[Wl].includes(o))&&r[ea]+t[ea]<=t.remoteSettings.maxConcurrentStreams&&qoe(r)},qnt=(e,t)=>{for(let r of e)t[Wl].length<r[Wl].length&&t[Wl].every(o=>r[Wl].includes(o))&&t[ea]+r[ea]<=r.remoteSettings.maxConcurrentStreams&&qoe(t)},joe=({agent:e,isFree:t})=>{let r={};for(let o in e.sessions){let n=e.sessions[o].filter(u=>{let A=u[nA.kCurrentStreamsCount]<u.remoteSettings.maxConcurrentStreams;return t?A:!A});n.length!==0&&(r[o]=n)}return r},qoe=e=>{e[vE]=!0,e[ea]===0&&e.close()},nA=class extends Lnt{constructor({timeout:t=6e4,maxSessions:r=1/0,maxFreeSessions:o=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=t,this.maxSessions=r,this.maxFreeSessions=o,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Unt({maxSize:a})}static normalizeOrigin(t,r){return typeof t=="string"&&(t=new URL(t)),r&&t.hostname!==r&&(t.hostname=r),t.origin}normalizeOptions(t){let r="";if(t)for(let o of _nt)t[o]&&(r+=`:${t[o]}`);return r}_tryToCreateNewSession(t,r){if(!(t in this.queue)||!(r in this.queue[t]))return;let o=this.queue[t][r];this._sessionsCount<this.maxSessions&&!o.completed&&(o.completed=!0,o())}getSession(t,r,o){return new Promise((a,n)=>{Array.isArray(o)?(o=[...o],a()):o=[{resolve:a,reject:n}];let u=this.normalizeOptions(r),A=nA.normalizeOrigin(t,r&&r.servername);if(A===void 0){for(let{reject:w}of o)w(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(u in this.sessions){let w=this.sessions[u],I=-1,v=-1,b;for(let E of w){let R=E.remoteSettings.maxConcurrentStreams;if(R<I)break;if(E[Wl].includes(A)){let N=E[ea];if(N>=R||E[vE]||E.destroyed)continue;b||(I=R),N>v&&(b=E,v=N)}}if(b){if(o.length!==1){for(let{reject:E}of o){let R=new Error(`Expected the length of listeners to be 1, got ${o.length}.
143Please report this to https://github.com/szmarczak/http2-wrapper/`);E(R)}return}o[0].resolve(b);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let w=`${A}:${u}`,I=!1;try{let v=Mnt.connect(t,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(w),...r});v[ea]=0,v[vE]=!1;let b=()=>v[ea]<v.remoteSettings.maxConcurrentStreams,E=!0;v.socket.once("session",N=>{this.tlsSessionCache.set(w,N)}),v.once("error",N=>{for(let{reject:U}of o)U(N);this.tlsSessionCache.delete(w)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(I){E&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[u];N.splice(N.indexOf(v),1),N.length===0&&delete this.sessions[u]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of o)U(N);p()}this._tryToCreateNewSession(u,A)});let R=()=>{if(!(!(u in this.queue)||!b())){for(let N of v[Wl])if(N in this.queue[u]){let{listeners:U}=this.queue[u][N];for(;U.length!==0&&b();)U.shift().resolve(v);let V=this.queue[u];if(V[N].listeners.length===0&&(delete V[N],Object.keys(V).length===0)){delete this.queue[u];break}if(!b())break}}};v.on("origin",()=>{v[Wl]=v.originSet,b()&&(R(),WM(this.sessions[u],v))}),v.once("remoteSettings",()=>{if(v.ref(),v.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of o)U.reject(N);v.destroy();return}v[Wl]=v.originSet;{let N=this.sessions;if(u in N){let U=N[u];U.splice(Hnt(U,v,jnt),0,v)}else N[u]=[v]}this._freeSessionsCount+=1,I=!0,this.emit("session",v),R(),p(),v[ea]===0&&this._freeSessionsCount>this.maxFreeSessions&&v.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),v.on("remoteSettings",()=>{R(),WM(this.sessions[u],v)})}),v[Hoe]=v.request,v.request=(N,U)=>{if(v[vE])throw new Error("The session is gracefully closing. No new streams are allowed.");let V=v[Hoe](N,U);return v.ref(),++v[ea],v[ea]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,V.once("close",()=>{if(E=b(),--v[ea],!v.destroyed&&!v.closed&&(qnt(this.sessions[u],v),b()&&!v.closed)){E||(this._freeSessionsCount++,E=!0);let ee=v[ea]===0;ee&&v.unref(),ee&&(this._freeSessionsCount>this.maxFreeSessions||v[vE])?v.close():(WM(this.sessions[u],v),R())}}),V}}catch(v){for(let b of o)b.reject(v);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(t,r,o,a){return new Promise((n,u)=>{this.getSession(t,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(t,r){return nA.connect(t,r)}static connect(t,r){r.ALPNProtocols=["h2"];let o=t.port||443,a=t.hostname||t.host;return typeof r.servername>"u"&&(r.servername=a),Ont.connect(o,a,r)}closeFreeSessions(){for(let t of Object.values(this.sessions))for(let r of t)r[ea]===0&&r.close()}destroy(t){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(t);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return joe({agent:this,isFree:!0})}get busySessions(){return joe({agent:this,isFree:!1})}};nA.kCurrentStreamsCount=ea;nA.kGracefullyClosing=vE;Goe.exports={Agent:nA,globalAgent:new nA}});var VM=_((pLt,Yoe)=>{"use strict";var{Readable:Gnt}=Ie("stream"),JM=class extends Gnt{constructor(t,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=t,this.connection=t,this._dumped=!1}_destroy(t){this.req._request.destroy(t)}setTimeout(t,r){return this.req.setTimeout(t,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Yoe.exports=JM});var zM=_((hLt,Woe)=>{"use strict";Woe.exports=e=>{let t={protocol:e.protocol,hostname:typeof e.hostname=="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return typeof e.port=="string"&&e.port.length!==0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}});var Joe=_((gLt,Koe)=>{"use strict";Koe.exports=(e,t,r)=>{for(let o of r)e.on(o,(...a)=>t.emit(o,...a))}});var zoe=_((dLt,Voe)=>{"use strict";Voe.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var Zoe=_((yLt,Xoe)=>{"use strict";var DE=(e,t,r)=>{Xoe.exports[t]=class extends e{constructor(...a){super(typeof r=="string"?r:r(a)),this.name=`${super.name} [${t}]`,this.code=t}}};DE(TypeError,"ERR_INVALID_ARG_TYPE",e=>{let t=e[0].includes(".")?"property":"argument",r=e[1],o=Array.isArray(r);return o&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${e[0]}" ${t} must be ${o?"one of":"of"} type ${r}. Received ${typeof e[2]}`});DE(TypeError,"ERR_INVALID_PROTOCOL",e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`);DE(Error,"ERR_HTTP_HEADERS_SENT",e=>`Cannot ${e[0]} headers after they are sent to the client`);DE(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>`${e[0]} must be a valid HTTP token [${e[1]}]`);DE(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>`Invalid value "${e[0]} for header "${e[1]}"`);DE(TypeError,"ERR_INVALID_CHAR",e=>`Invalid character in ${e[0]} [${e[1]}]`)});var t4=_((ELt,sae)=>{"use strict";var Ynt=Ie("http2"),{Writable:Wnt}=Ie("stream"),{Agent:$oe,globalAgent:Knt}=KM(),Jnt=VM(),Vnt=zM(),znt=Joe(),Xnt=zoe(),{ERR_INVALID_ARG_TYPE:XM,ERR_INVALID_PROTOCOL:Znt,ERR_HTTP_HEADERS_SENT:eae,ERR_INVALID_HTTP_TOKEN:$nt,ERR_HTTP_INVALID_HEADER_VALUE:eit,ERR_INVALID_CHAR:tit}=Zoe(),{HTTP2_HEADER_STATUS:tae,HTTP2_HEADER_METHOD:rae,HTTP2_HEADER_PATH:nae,HTTP2_METHOD_CONNECT:rit}=Ynt.constants,ko=Symbol("headers"),ZM=Symbol("origin"),$M=Symbol("session"),iae=Symbol("options"),ex=Symbol("flushedHeaders"),A1=Symbol("jobs"),nit=/^[\^`\-\w!#$%&*+.|~]+$/,iit=/[^\t\u0020-\u007E\u0080-\u00FF]/,e4=class extends Wnt{constructor(t,r,o){super({autoDestroy:!1});let a=typeof t=="string"||t instanceof URL;if(a&&(t=Vnt(t instanceof URL?t:new URL(t))),typeof r=="function"||r===void 0?(o=r,r=a?t:{...t}):r={...t,...r},r.h2session)this[$M]=r.h2session;else if(r.agent===!1)this.agent=new $oe({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new $oe({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=Knt;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new XM("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new Znt(r.protocol,"https:");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,u=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:A}=r;if(r.timeout=void 0,this[ko]=Object.create(null),this[A1]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!("authorization"in this[ko])&&(this[ko].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[iae]=r,n===443?(this[ZM]=`https://${u}`,":authority"in this[ko]||(this[ko][":authority"]=u)):(this[ZM]=`https://${u}:${n}`,":authority"in this[ko]||(this[ko][":authority"]=`${u}:${n}`)),A&&this.setTimeout(A),o&&this.once("response",o),this[ex]=!1}get method(){return this[ko][rae]}set method(t){t&&(this[ko][rae]=t.toUpperCase())}get path(){return this[ko][nae]}set path(t){t&&(this[ko][nae]=t)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(t,r,o){if(this._mustNotHaveABody){o(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let a=()=>this._request.write(t,r,o);this._request?a():this[A1].push(a)}_final(t){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){t();return}this._request.end(t)};this._request?r():this[A1].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(t,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(t)}async flushHeaders(){if(this[ex]||this.destroyed)return;this[ex]=!0;let t=this.method===rit,r=o=>{if(this._request=o,this.destroyed){o.destroy();return}t||znt(o,this,["timeout","continue","close","error"]);let a=u=>(...A)=>{!this.writable&&!this.destroyed?u(...A):this.once("finish",()=>{u(...A)})};o.once("response",a((u,A,p)=>{let h=new Jnt(this.socket,o.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=u[tae],h.headers=u,h.rawHeaders=p,h.once("end",()=>{this.aborted?(h.aborted=!0,h.emit("aborted")):(h.complete=!0,h.socket=null,h.connection=null)}),t?(h.upgrade=!0,this.emit("connect",h,o,Buffer.alloc(0))?this.emit("close"):o.destroy()):(o.on("data",w=>{!h._dumped&&!h.push(w)&&o.pause()}),o.once("end",()=>{h.push(null)}),this.emit("response",h)||h._dump())})),o.once("headers",a(u=>this.emit("information",{statusCode:u[tae]}))),o.once("trailers",a((u,A,p)=>{let{res:h}=this;h.trailers=u,h.rawTrailers=p}));let{socket:n}=o.session;this.socket=n,this.connection=n;for(let u of this[A1])u();this.emit("socket",this.socket)};if(this[$M])try{r(this[$M].request(this[ko]))}catch(o){this.emit("error",o)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[ZM],this[iae],this[ko]))}catch(o){this.emit("error",o)}}}getHeader(t){if(typeof t!="string")throw new XM("name","string",t);return this[ko][t.toLowerCase()]}get headersSent(){return this[ex]}removeHeader(t){if(typeof t!="string")throw new XM("name","string",t);if(this.headersSent)throw new eae("remove");delete this[ko][t.toLowerCase()]}setHeader(t,r){if(this.headersSent)throw new eae("set");if(typeof t!="string"||!nit.test(t)&&!Xnt(t))throw new $nt("Header name",t);if(typeof r>"u")throw new eit(r,t);if(iit.test(r))throw new tit("header content",t);this[ko][t.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(t,r){let o=()=>this._request.setTimeout(t,r);return this._request?o():this[A1].push(o),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(t){}};sae.exports=e4});var aae=_((wLt,oae)=>{"use strict";var sit=Ie("tls");oae.exports=(e={})=>new Promise((t,r)=>{let o=sit.connect(e,()=>{e.resolveSocket?(o.off("error",r),t({alpnProtocol:o.alpnProtocol,socket:o})):(o.destroy(),t({alpnProtocol:o.alpnProtocol}))});o.on("error",r)})});var cae=_((CLt,lae)=>{"use strict";var oit=Ie("net");lae.exports=e=>{let t=e.host,r=e.headers&&e.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?t=r:t=r.slice(1,-1):t=r.split(":",1)[0]),oit.isIP(t)?"":t}});var fae=_((ILt,n4)=>{"use strict";var uae=Ie("http"),r4=Ie("https"),ait=aae(),lit=YM(),cit=t4(),uit=cae(),Ait=zM(),tx=new lit({maxSize:100}),f1=new Map,Aae=(e,t,r)=>{t._httpMessage={shouldKeepAlive:!0};let o=()=>{e.emit("free",t,r)};t.on("free",o);let a=()=>{e.removeSocket(t,r)};t.on("close",a);let n=()=>{e.removeSocket(t,r),t.off("close",a),t.off("free",o),t.off("agentRemove",n)};t.on("agentRemove",n),e.emit("free",t,r)},fit=async e=>{let t=`${e.host}:${e.port}:${e.ALPNProtocols.sort()}`;if(!tx.has(t)){if(f1.has(t))return(await f1.get(t)).alpnProtocol;let{path:r,agent:o}=e;e.path=e.socketPath;let a=ait(e);f1.set(t,a);try{let{socket:n,alpnProtocol:u}=await a;if(tx.set(t,u),e.path=r,u==="h2")n.destroy();else{let{globalAgent:A}=r4,p=r4.Agent.prototype.createConnection;o?o.createConnection===p?Aae(o,n,e):n.destroy():A.createConnection===p?Aae(A,n,e):n.destroy()}return f1.delete(t),u}catch(n){throw f1.delete(t),n}}return tx.get(t)};n4.exports=async(e,t,r)=>{if((typeof e=="string"||e instanceof URL)&&(e=Ait(new URL(e))),typeof t=="function"&&(r=t,t=void 0),t={ALPNProtocols:["h2","http/1.1"],...e,...t,resolveSocket:!0},!Array.isArray(t.ALPNProtocols)||t.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");t.protocol=t.protocol||"https:";let o=t.protocol==="https:";t.host=t.hostname||t.host||"localhost",t.session=t.tlsSession,t.servername=t.servername||uit(t),t.port=t.port||(o?443:80),t._defaultAgent=o?r4.globalAgent:uae.globalAgent;let a=t.agent;if(a){if(a.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");t.agent=a[o?"https":"http"]}return o&&await fit(t)==="h2"?(a&&(t.agent=a.http2),new cit(t,r)):uae.request(t,r)};n4.exports.protocolCache=tx});var hae=_((BLt,pae)=>{"use strict";var pit=Ie("http2"),hit=KM(),i4=t4(),git=VM(),dit=fae(),mit=(e,t,r)=>new i4(e,t,r),yit=(e,t,r)=>{let o=new i4(e,t,r);return o.end(),o};pae.exports={...pit,ClientRequest:i4,IncomingMessage:git,...hit,request:mit,get:yit,auto:dit}});var o4=_(s4=>{"use strict";Object.defineProperty(s4,"__esModule",{value:!0});var gae=Rf();s4.default=e=>gae.default.nodeStream(e)&&gae.default.function_(e.getBoundary)});var Eae=_(a4=>{"use strict";Object.defineProperty(a4,"__esModule",{value:!0});var mae=Ie("fs"),yae=Ie("util"),dae=Rf(),Eit=o4(),wit=yae.promisify(mae.stat);a4.default=async(e,t)=>{if(t&&"content-length"in t)return Number(t["content-length"]);if(!e)return 0;if(dae.default.string(e))return Buffer.byteLength(e);if(dae.default.buffer(e))return e.length;if(Eit.default(e))return yae.promisify(e.getLength.bind(e))();if(e instanceof mae.ReadStream){let{size:r}=await wit(e.path);return r===0?void 0:r}}});var c4=_(l4=>{"use strict";Object.defineProperty(l4,"__esModule",{value:!0});function Cit(e,t,r){let o={};for(let a of r)o[a]=(...n)=>{t.emit(a,...n)},e.on(a,o[a]);return()=>{for(let a of r)e.off(a,o[a])}}l4.default=Cit});var wae=_(u4=>{"use strict";Object.defineProperty(u4,"__esModule",{value:!0});u4.default=()=>{let e=[];return{once(t,r,o){t.once(r,o),e.push({origin:t,event:r,fn:o})},unhandleAll(){for(let t of e){let{origin:r,event:o,fn:a}=t;r.removeListener(o,a)}e.length=0}}}});var Iae=_(p1=>{"use strict";Object.defineProperty(p1,"__esModule",{value:!0});p1.TimeoutError=void 0;var Iit=Ie("net"),Bit=wae(),Cae=Symbol("reentry"),vit=()=>{},rx=class extends Error{constructor(t,r){super(`Timeout awaiting '${r}' for ${t}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};p1.TimeoutError=rx;p1.default=(e,t,r)=>{if(Cae in e)return vit;e[Cae]=!0;let o=[],{once:a,unhandleAll:n}=Bit.default(),u=(I,v,b)=>{var E;let R=setTimeout(v,I,I,b);(E=R.unref)===null||E===void 0||E.call(R);let N=()=>{clearTimeout(R)};return o.push(N),N},{host:A,hostname:p}=r,h=(I,v)=>{e.destroy(new rx(I,v))},w=()=>{for(let I of o)I();n()};if(e.once("error",I=>{if(w(),e.listenerCount("error")===0)throw I}),e.once("close",w),a(e,"response",I=>{a(I,"end",w)}),typeof t.request<"u"&&u(t.request,h,"request"),typeof t.socket<"u"){let I=()=>{h(t.socket,"socket")};e.setTimeout(t.socket,I),o.push(()=>{e.removeListener("timeout",I)})}return a(e,"socket",I=>{var v;let{socketPath:b}=e;if(I.connecting){let E=Boolean(b??Iit.isIP((v=p??A)!==null&&v!==void 0?v:"")!==0);if(typeof t.lookup<"u"&&!E&&typeof I.address().address>"u"){let R=u(t.lookup,h,"lookup");a(I,"lookup",R)}if(typeof t.connect<"u"){let R=()=>u(t.connect,h,"connect");E?a(I,"connect",R()):a(I,"lookup",N=>{N===null&&a(I,"connect",R())})}typeof t.secureConnect<"u"&&r.protocol==="https:"&&a(I,"connect",()=>{let R=u(t.secureConnect,h,"secureConnect");a(I,"secureConnect",R)})}if(typeof t.send<"u"){let E=()=>u(t.send,h,"send");I.connecting?a(I,"connect",()=>{a(e,"upload-complete",E())}):a(e,"upload-complete",E())}}),typeof t.response<"u"&&a(e,"upload-complete",()=>{let I=u(t.response,h,"response");a(e,"response",I)}),w}});var vae=_(A4=>{"use strict";Object.defineProperty(A4,"__esModule",{value:!0});var Bae=Rf();A4.default=e=>{e=e;let t={protocol:e.protocol,hostname:Bae.default.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return Bae.default.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}});var Dae=_(f4=>{"use strict";Object.defineProperty(f4,"__esModule",{value:!0});var Dit=Ie("url"),Sit=["protocol","host","hostname","port","pathname","search"];f4.default=(e,t)=>{var r,o;if(t.path){if(t.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(t.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(t.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(t.search&&t.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!e){if(!t.protocol)throw new TypeError("No URL protocol specified");e=`${t.protocol}//${(o=(r=t.hostname)!==null&&r!==void 0?r:t.host)!==null&&o!==void 0?o:""}`}let a=new Dit.URL(e);if(t.path){let n=t.path.indexOf("?");n===-1?t.pathname=t.path:(t.pathname=t.path.slice(0,n),t.search=t.path.slice(n+1)),delete t.path}for(let n of Sit)t[n]&&(a[n]=t[n].toString());return a}});var Sae=_(h4=>{"use strict";Object.defineProperty(h4,"__esModule",{value:!0});var p4=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(t,r){typeof t=="object"?this.weakMap.set(t,r):this.map.set(t,r)}get(t){return typeof t=="object"?this.weakMap.get(t):this.map.get(t)}has(t){return typeof t=="object"?this.weakMap.has(t):this.map.has(t)}};h4.default=p4});var d4=_(g4=>{"use strict";Object.defineProperty(g4,"__esModule",{value:!0});var Pit=async e=>{let t=[],r=0;for await(let o of e)t.push(o),r+=Buffer.byteLength(o);return Buffer.isBuffer(t[0])?Buffer.concat(t,r):Buffer.from(t.join(""))};g4.default=Pit});var xae=_(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.dnsLookupIpVersionToFamily=Sd.isDnsLookupIpVersion=void 0;var Pae={auto:0,ipv4:4,ipv6:6};Sd.isDnsLookupIpVersion=e=>e in Pae;Sd.dnsLookupIpVersionToFamily=e=>{if(Sd.isDnsLookupIpVersion(e))return Pae[e];throw new Error("Invalid DNS lookup IP version")}});var m4=_(nx=>{"use strict";Object.defineProperty(nx,"__esModule",{value:!0});nx.isResponseOk=void 0;nx.isResponseOk=e=>{let{statusCode:t}=e,r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||t===304}});var Qae=_(y4=>{"use strict";Object.defineProperty(y4,"__esModule",{value:!0});var bae=new Set;y4.default=e=>{bae.has(e)||(bae.add(e),process.emitWarning(`Got: ${e}`,{type:"DeprecationWarning"}))}});var kae=_(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});var ui=Rf(),xit=(e,t)=>{if(ui.default.null_(e.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");ui.assert.any([ui.default.string,ui.default.undefined],e.encoding),ui.assert.any([ui.default.boolean,ui.default.undefined],e.resolveBodyOnly),ui.assert.any([ui.default.boolean,ui.default.undefined],e.methodRewriting),ui.assert.any([ui.default.boolean,ui.default.undefined],e.isStream),ui.assert.any([ui.default.string,ui.default.undefined],e.responseType),e.responseType===void 0&&(e.responseType="text");let{retry:r}=e;if(t?e.retry={...t.retry}:e.retry={calculateDelay:o=>o.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},ui.default.object(r)?(e.retry={...e.retry,...r},e.retry.methods=[...new Set(e.retry.methods.map(o=>o.toUpperCase()))],e.retry.statusCodes=[...new Set(e.retry.statusCodes)],e.retry.errorCodes=[...new Set(e.retry.errorCodes)]):ui.default.number(r)&&(e.retry.limit=r),ui.default.undefined(e.retry.maxRetryAfter)&&(e.retry.maxRetryAfter=Math.min(...[e.timeout.request,e.timeout.connect].filter(ui.default.number))),ui.default.object(e.pagination)){t&&(e.pagination={...t.pagination,...e.pagination});let{pagination:o}=e;if(!ui.default.function_(o.transform))throw new Error("`options.pagination.transform` must be implemented");if(!ui.default.function_(o.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!ui.default.function_(o.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!ui.default.function_(o.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return e.responseType==="json"&&e.headers.accept===void 0&&(e.headers.accept="application/json"),e};E4.default=xit});var Fae=_(h1=>{"use strict";Object.defineProperty(h1,"__esModule",{value:!0});h1.retryAfterStatusCodes=void 0;h1.retryAfterStatusCodes=new Set([413,429,503]);var bit=({attemptCount:e,retryOptions:t,error:r,retryAfter:o})=>{if(e>t.limit)return 0;let a=t.methods.includes(r.options.method),n=t.errorCodes.includes(r.code),u=r.response&&t.statusCodes.includes(r.response.statusCode);if(!a||!n&&!u)return 0;if(r.response){if(o)return t.maxRetryAfter===void 0||o>t.maxRetryAfter?0:o;if(r.response.statusCode===413)return 0}let A=Math.random()*100;return 2**(e-1)*1e3+A};h1.default=bit});var m1=_(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.UnsupportedProtocolError=In.ReadError=In.TimeoutError=In.UploadError=In.CacheError=In.HTTPError=In.MaxRedirectsError=In.RequestError=In.setNonEnumerableProperties=In.knownHookEvents=In.withoutBody=In.kIsNormalizedAlready=void 0;var Rae=Ie("util"),Tae=Ie("stream"),Qit=Ie("fs"),oh=Ie("url"),Nae=Ie("http"),w4=Ie("http"),kit=Ie("https"),Fit=zse(),Rit=noe(),Lae=Noe(),Tit=Uoe(),Nit=hae(),Lit=ZP(),st=Rf(),Oit=Eae(),Oae=o4(),Mit=c4(),Mae=Iae(),Uit=vae(),Uae=Dae(),_it=Sae(),Hit=d4(),_ae=xae(),jit=m4(),ah=Qae(),qit=kae(),Git=Fae(),C4,$s=Symbol("request"),ox=Symbol("response"),SE=Symbol("responseSize"),PE=Symbol("downloadedSize"),xE=Symbol("bodySize"),bE=Symbol("uploadedSize"),ix=Symbol("serverResponsesPiped"),Hae=Symbol("unproxyEvents"),jae=Symbol("isFromCache"),I4=Symbol("cancelTimeouts"),qae=Symbol("startedReading"),QE=Symbol("stopReading"),sx=Symbol("triggerRead"),lh=Symbol("body"),g1=Symbol("jobs"),Gae=Symbol("originalResponse"),Yae=Symbol("retryTimeout");In.kIsNormalizedAlready=Symbol("isNormalizedAlready");var Yit=st.default.string(process.versions.brotli);In.withoutBody=new Set(["GET","HEAD"]);In.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function Wit(e){for(let t in e){let r=e[t];if(!st.default.string(r)&&!st.default.number(r)&&!st.default.boolean(r)&&!st.default.null_(r)&&!st.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function Kit(e){return st.default.object(e)&&!("statusCode"in e)}var B4=new _it.default,Jit=async e=>new Promise((t,r)=>{let o=a=>{r(a)};e.pending||t(),e.once("error",o),e.once("ready",()=>{e.off("error",o),t()})}),Vit=new Set([300,301,302,303,304,307,308]),zit=["context","body","json","form"];In.setNonEnumerableProperties=(e,t)=>{let r={};for(let o of e)if(!!o)for(let a of zit)a in o&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:o[a]});Object.defineProperties(t,r)};var Vi=class extends Error{constructor(t,r,o){var a;if(super(t),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code,o instanceof px?(Object.defineProperty(this,"request",{enumerable:!1,value:o}),Object.defineProperty(this,"response",{enumerable:!1,value:o[ox]}),Object.defineProperty(this,"options",{enumerable:!1,value:o.options})):Object.defineProperty(this,"options",{enumerable:!1,value:o}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,st.default.string(r.stack)&&st.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,u=this.stack.slice(n).split(`
144`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
145`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
146`)}${A.reverse().join(`
147`)}`}}};In.RequestError=Vi;var ax=class extends Vi{constructor(t){super(`Redirected ${t.options.maxRedirects} times. Aborting.`,{},t),this.name="MaxRedirectsError"}};In.MaxRedirectsError=ax;var lx=class extends Vi{constructor(t){super(`Response code ${t.statusCode} (${t.statusMessage})`,{},t.request),this.name="HTTPError"}};In.HTTPError=lx;var cx=class extends Vi{constructor(t,r){super(t.message,t,r),this.name="CacheError"}};In.CacheError=cx;var ux=class extends Vi{constructor(t,r){super(t.message,t,r),this.name="UploadError"}};In.UploadError=ux;var Ax=class extends Vi{constructor(t,r,o){super(t.message,t,o),this.name="TimeoutError",this.event=t.event,this.timings=r}};In.TimeoutError=Ax;var d1=class extends Vi{constructor(t,r){super(t.message,t,r),this.name="ReadError"}};In.ReadError=d1;var fx=class extends Vi{constructor(t){super(`Unsupported protocol "${t.url.protocol}"`,{},t),this.name="UnsupportedProtocolError"}};In.UnsupportedProtocolError=fx;var Xit=["socket","connect","continue","information","upgrade","timeout"],px=class extends Tae.Duplex{constructor(t,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[PE]=0,this[bE]=0,this.requestInitialized=!1,this[ix]=new Set,this.redirects=[],this[QE]=!1,this[sx]=!1,this[g1]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof w4.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),In.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(t,r,o)}catch(h){st.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Qit.ReadStream&&await Jit(this.options.body);let{url:w}=this.options;if(!w)throw new TypeError("Missing `url` property");if(this.requestUrl=w.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[$s])===null||h===void 0||h.destroy();return}for(let I of this[g1])I();this[g1].length=0,this.requestInitialized=!0}catch(w){if(w instanceof Vi){this._beforeError(w);return}this.destroyed||this.destroy(w)}})()}static normalizeArguments(t,r,o){var a,n,u,A,p;let h=r;if(st.default.object(t)&&!st.default.urlInstance(t))r={...o,...t,...r};else{if(t&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},t!==void 0&&(r.url=t),st.default.urlInstance(r.url)&&(r.url=new oh.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),st.assert.any([st.default.string,st.default.undefined],r.method),st.assert.any([st.default.object,st.default.undefined],r.headers),st.assert.any([st.default.string,st.default.urlInstance,st.default.undefined],r.prefixUrl),st.assert.any([st.default.object,st.default.undefined],r.cookieJar),st.assert.any([st.default.object,st.default.string,st.default.undefined],r.searchParams),st.assert.any([st.default.object,st.default.string,st.default.undefined],r.cache),st.assert.any([st.default.object,st.default.number,st.default.undefined],r.timeout),st.assert.any([st.default.object,st.default.undefined],r.context),st.assert.any([st.default.object,st.default.undefined],r.hooks),st.assert.any([st.default.boolean,st.default.undefined],r.decompress),st.assert.any([st.default.boolean,st.default.undefined],r.ignoreInvalidCookies),st.assert.any([st.default.boolean,st.default.undefined],r.followRedirect),st.assert.any([st.default.number,st.default.undefined],r.maxRedirects),st.assert.any([st.default.boolean,st.default.undefined],r.throwHttpErrors),st.assert.any([st.default.boolean,st.default.undefined],r.http2),st.assert.any([st.default.boolean,st.default.undefined],r.allowGetBody),st.assert.any([st.default.string,st.default.undefined],r.localAddress),st.assert.any([_ae.isDnsLookupIpVersion,st.default.undefined],r.dnsLookupIpVersion),st.assert.any([st.default.object,st.default.undefined],r.https),st.assert.any([st.default.boolean,st.default.undefined],r.rejectUnauthorized),r.https&&(st.assert.any([st.default.boolean,st.default.undefined],r.https.rejectUnauthorized),st.assert.any([st.default.function_,st.default.undefined],r.https.checkServerIdentity),st.assert.any([st.default.string,st.default.object,st.default.array,st.default.undefined],r.https.certificateAuthority),st.assert.any([st.default.string,st.default.object,st.default.array,st.default.undefined],r.https.key),st.assert.any([st.default.string,st.default.object,st.default.array,st.default.undefined],r.https.certificate),st.assert.any([st.default.string,st.default.undefined],r.https.passphrase),st.assert.any([st.default.string,st.default.buffer,st.default.array,st.default.undefined],r.https.pfx)),st.assert.any([st.default.object,st.default.undefined],r.cacheOptions),st.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===o?.headers?r.headers={...r.headers}:r.headers=Lit({...o?.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==o?.searchParams){let b;if(st.default.string(r.searchParams)||r.searchParams instanceof oh.URLSearchParams)b=new oh.URLSearchParams(r.searchParams);else{Wit(r.searchParams),b=new oh.URLSearchParams;for(let E in r.searchParams){let R=r.searchParams[E];R===null?b.append(E,""):R!==void 0&&b.append(E,R)}}(a=o?.searchParams)===null||a===void 0||a.forEach((E,R)=>{b.has(R)||b.append(R,E)}),r.searchParams=b}if(r.username=(n=r.username)!==null&&n!==void 0?n:"",r.password=(u=r.password)!==null&&u!==void 0?u:"",st.default.undefined(r.prefixUrl)?r.prefixUrl=(A=o?.prefixUrl)!==null&&A!==void 0?A:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),st.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=Uae.default(r.prefixUrl+r.url,r)}else(st.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=Uae.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:b}=r;Object.defineProperty(r,"prefixUrl",{set:R=>{let N=r.url;if(!N.href.startsWith(R))throw new Error(`Cannot change \`prefixUrl\` from ${b} to ${R}: ${N.href}`);r.url=new oh.URL(R+N.href.slice(b.length)),b=R},get:()=>b});let{protocol:E}=r.url;if(E==="unix:"&&(E="http:",r.url=new oh.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),E!=="http:"&&E!=="https:")throw new fx(r);r.username===""?r.username=r.url.username:r.url.username=r.username,r.password===""?r.password=r.url.password:r.url.password=r.password}let{cookieJar:w}=r;if(w){let{setCookie:b,getCookieString:E}=w;st.assert.function_(b),st.assert.function_(E),b.length===4&&E.length===0&&(b=Rae.promisify(b.bind(r.cookieJar)),E=Rae.promisify(E.bind(r.cookieJar)),r.cookieJar={setCookie:b,getCookieString:E})}let{cache:I}=r;if(I&&(B4.has(I)||B4.set(I,new Lae((b,E)=>{let R=b[$s](b,E);return st.default.promise(R)&&(R.once=(N,U)=>{if(N==="error")R.catch(U);else if(N==="abort")(async()=>{try{(await R).once("abort",U)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${N}`);return R}),R},I))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)C4||(C4=new Rit.default),r.dnsCache=C4;else if(!st.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${st.default(r.dnsCache)}`);st.default.number(r.timeout)?r.timeout={request:r.timeout}:o&&r.timeout!==o.timeout?r.timeout={...o.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let v=r.hooks===o?.hooks;r.hooks={...r.hooks};for(let b of In.knownHookEvents)if(b in r.hooks)if(st.default.array(r.hooks[b]))r.hooks[b]=[...r.hooks[b]];else throw new TypeError(`Parameter \`${b}\` must be an Array, got ${st.default(r.hooks[b])}`);else r.hooks[b]=[];if(o&&!v)for(let b of In.knownHookEvents)o.hooks[b].length>0&&(r.hooks[b]=[...o.hooks[b],...r.hooks[b]]);if("family"in r&&ah.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),o?.https&&(r.https={...o.https,...r.https}),"rejectUnauthorized"in r&&ah.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&ah.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&ah.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&ah.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&ah.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&ah.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&ah.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent){for(let b in r.agent)if(b!=="http"&&b!=="https"&&b!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${b}\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,In.setNonEnumerableProperties([o,h],r),qit.default(r,o)}_lockWrite(){let t=()=>{throw new TypeError("The payload has been already provided")};this.write=t,this.end=t}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:t}=this,{headers:r}=t,o=!st.default.undefined(t.form),a=!st.default.undefined(t.json),n=!st.default.undefined(t.body),u=o||a||n,A=In.withoutBody.has(t.method)&&!(t.method==="GET"&&t.allowGetBody);if(this._cannotHaveBody=A,u){if(A)throw new TypeError(`The \`${t.method}\` method cannot be used with a body`);if([n,o,a].filter(p=>p).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(n&&!(t.body instanceof Tae.Readable)&&!st.default.string(t.body)&&!st.default.buffer(t.body)&&!Oae.default(t.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(o&&!st.default.object(t.form))throw new TypeError("The `form` option must be an Object");{let p=!st.default.string(r["content-type"]);n?(Oae.default(t.body)&&p&&(r["content-type"]=`multipart/form-data; boundary=${t.body.getBoundary()}`),this[lh]=t.body):o?(p&&(r["content-type"]="application/x-www-form-urlencoded"),this[lh]=new oh.URLSearchParams(t.form).toString()):(p&&(r["content-type"]="application/json"),this[lh]=t.stringifyJson(t.json));let h=await Oit.default(this[lh],t.headers);st.default.undefined(r["content-length"])&&st.default.undefined(r["transfer-encoding"])&&!A&&!st.default.undefined(h)&&(r["content-length"]=String(h))}}else A?this._lockWrite():this._unlockWrite();this[xE]=Number(r["content-length"])||void 0}async _onResponseBase(t){let{options:r}=this,{url:o}=r;this[Gae]=t,r.decompress&&(t=Tit(t));let a=t.statusCode,n=t;n.statusMessage=n.statusMessage?n.statusMessage:Nae.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=t.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[jae]=n.isFromCache,this[SE]=Number(t.headers["content-length"])||void 0,this[ox]=t,t.once("end",()=>{this[SE]=this[PE],this.emit("downloadProgress",this.downloadProgress)}),t.once("error",A=>{t.destroy(),this._beforeError(new d1(A,this))}),t.once("aborted",()=>{this._beforeError(new d1({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let u=t.headers["set-cookie"];if(st.default.object(r.cookieJar)&&u){let A=u.map(async p=>r.cookieJar.setCookie(p,o.toString()));r.ignoreInvalidCookies&&(A=A.map(async p=>p.catch(()=>{})));try{await Promise.all(A)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&t.headers.location&&Vit.has(a)){if(t.resume(),this[$s]&&(this[I4](),delete this[$s],this[Hae]()),(a===303&&r.method!=="GET"&&r.method!=="HEAD"||!r.methodRewriting)&&(r.method="GET","body"in r&&delete r.body,"json"in r&&delete r.json,"form"in r&&delete r.form,this[lh]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new ax(this));return}try{let p=Buffer.from(t.headers.location,"binary").toString(),h=new oh.URL(p,o),w=h.toString();decodeURI(w),h.hostname!==o.hostname||h.port!==o.port?("host"in r.headers&&delete r.headers.host,"cookie"in r.headers&&delete r.headers.cookie,"authorization"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username="",r.password="")):(h.username=r.username,h.password=r.password),this.redirects.push(w),r.url=h;for(let I of r.hooks.beforeRedirect)await I(r,n);this.emit("redirect",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!jit.isResponseOk(n)){this._beforeError(new lx(n));return}t.on("readable",()=>{this[sx]&&this._read()}),this.on("resume",()=>{t.resume()}),this.on("pause",()=>{t.pause()}),t.once("end",()=>{this.push(null)}),this.emit("response",t);for(let A of this[ix])if(!A.headersSent){for(let p in t.headers){let h=r.decompress?p!=="content-encoding":!0,w=t.headers[p];h&&A.setHeader(p,w)}A.statusCode=a}}async _onResponse(t){try{await this._onResponseBase(t)}catch(r){this._beforeError(r)}}_onRequest(t){let{options:r}=this,{timeout:o,url:a}=r;Fit.default(t),this[I4]=Mae.default(t,o,a);let n=r.cache?"cacheableResponse":"response";t.once(n,p=>{this._onResponse(p)}),t.once("error",p=>{var h;t.destroy(),(h=t.res)===null||h===void 0||h.removeAllListeners("end"),p=p instanceof Mae.TimeoutError?new Ax(p,this.timings,this):new Vi(p.message,p,this),this._beforeError(p)}),this[Hae]=Mit.default(t,this,Xit),this[$s]=t,this.emit("uploadProgress",this.uploadProgress);let u=this[lh],A=this.redirects.length===0?this:t;st.default.nodeStream(u)?(u.pipe(A),u.once("error",p=>{this._beforeError(new ux(p,this))})):(this._unlockWrite(),st.default.undefined(u)?(this._cannotHaveBody||this._noPipe)&&(A.end(),this._lockWrite()):(this._writeRequest(u,void 0,()=>{}),A.end(),this._lockWrite())),this.emit("request",t)}async _createCacheableRequest(t,r){return new Promise((o,a)=>{Object.assign(r,Uit.default(t)),delete r.url;let n,u=B4.get(r.cache)(r,async A=>{A._readableState.autoDestroy=!1,n&&(await n).emit("cacheableResponse",A),o(A)});r.url=t,u.once("error",a),u.once("request",async A=>{n=A,o(n)})})}async _makeRequest(){var t,r,o,a,n;let{options:u}=this,{headers:A}=u;for(let U in A)if(st.default.undefined(A[U]))delete A[U];else if(st.default.null_(A[U]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${U}\` header`);if(u.decompress&&st.default.undefined(A["accept-encoding"])&&(A["accept-encoding"]=Yit?"gzip, deflate, br":"gzip, deflate"),u.cookieJar){let U=await u.cookieJar.getCookieString(u.url.toString());st.default.nonEmptyString(U)&&(u.headers.cookie=U)}for(let U of u.hooks.beforeRequest){let V=await U(u);if(!st.default.undefined(V)){u.request=()=>V;break}}u.body&&this[lh]!==u.body&&(this[lh]=u.body);let{agent:p,request:h,timeout:w,url:I}=u;if(u.dnsCache&&!("lookup"in u)&&(u.lookup=u.dnsCache.lookup),I.hostname==="unix"){let U=/(?<socketPath>.+?):(?<path>.+)/.exec(`${I.pathname}${I.search}`);if(U?.groups){let{socketPath:V,path:ee}=U.groups;Object.assign(u,{socketPath:V,path:ee,host:""})}}let v=I.protocol==="https:",b;u.http2?b=Nit.auto:b=v?kit.request:Nae.request;let E=(t=u.request)!==null&&t!==void 0?t:b,R=u.cache?this._createCacheableRequest:E;p&&!u.http2&&(u.agent=p[v?"https":"http"]),u[$s]=E,delete u.request,delete u.timeout;let N=u;if(N.shared=(r=u.cacheOptions)===null||r===void 0?void 0:r.shared,N.cacheHeuristic=(o=u.cacheOptions)===null||o===void 0?void 0:o.cacheHeuristic,N.immutableMinTimeToLive=(a=u.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,N.ignoreCargoCult=(n=u.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,u.dnsLookupIpVersion!==void 0)try{N.family=_ae.dnsLookupIpVersionToFamily(u.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}u.https&&("rejectUnauthorized"in u.https&&(N.rejectUnauthorized=u.https.rejectUnauthorized),u.https.checkServerIdentity&&(N.checkServerIdentity=u.https.checkServerIdentity),u.https.certificateAuthority&&(N.ca=u.https.certificateAuthority),u.https.certificate&&(N.cert=u.https.certificate),u.https.key&&(N.key=u.https.key),u.https.passphrase&&(N.passphrase=u.https.passphrase),u.https.pfx&&(N.pfx=u.https.pfx));try{let U=await R(I,N);st.default.undefined(U)&&(U=b(I,N)),u.request=h,u.timeout=w,u.agent=p,u.https&&("rejectUnauthorized"in u.https&&delete N.rejectUnauthorized,u.https.checkServerIdentity&&delete N.checkServerIdentity,u.https.certificateAuthority&&delete N.ca,u.https.certificate&&delete N.cert,u.https.key&&delete N.key,u.https.passphrase&&delete N.passphrase,u.https.pfx&&delete N.pfx),Kit(U)?this._onRequest(U):this.writable?(this.once("finish",()=>{this._onResponse(U)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(U)}catch(U){throw U instanceof Lae.CacheError?new cx(U,this):new Vi(U.message,U,this)}}async _error(t){try{for(let r of this.options.hooks.beforeError)t=await r(t)}catch(r){t=new Vi(r.message,r,this)}this.destroy(t)}_beforeError(t){if(this[QE])return;let{options:r}=this,o=this.retryCount+1;this[QE]=!0,t instanceof Vi||(t=new Vi(t.message,t,this));let a=t,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await Hit.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let u;try{let A;n&&"retry-after"in n.headers&&(A=Number(n.headers["retry-after"]),Number.isNaN(A)?(A=Date.parse(n.headers["retry-after"])-Date.now(),A<=0&&(A=1)):A*=1e3),u=await r.retry.calculateDelay({attemptCount:o,retryOptions:r.retry,error:a,retryAfter:A,computedValue:Git.default({attemptCount:o,retryOptions:r.retry,error:a,retryAfter:A,computedValue:0})})}catch(A){this._error(new Vi(A.message,A,this));return}if(u){let A=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,o)}catch(p){this._error(new Vi(p.message,t,this));return}this.destroyed||(this.destroy(),this.emit("retry",o,t))};this[Yae]=setTimeout(A,u);return}}this._error(a)})()}_read(){this[sx]=!0;let t=this[ox];if(t&&!this[QE]){t.readableLength&&(this[sx]=!1);let r;for(;(r=t.read())!==null;){this[PE]+=r.length,this[qae]=!0;let o=this.downloadProgress;o.percent<1&&this.emit("downloadProgress",o),this.push(r)}}}_write(t,r,o){let a=()=>{this._writeRequest(t,r,o)};this.requestInitialized?a():this[g1].push(a)}_writeRequest(t,r,o){this[$s].destroyed||(this._progressCallbacks.push(()=>{this[bE]+=Buffer.byteLength(t,r);let a=this.uploadProgress;a.percent<1&&this.emit("uploadProgress",a)}),this[$s].write(t,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),o(a)}))}_final(t){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!($s in this)){t();return}if(this[$s].destroyed){t();return}this[$s].end(o=>{o||(this[xE]=this[bE],this.emit("uploadProgress",this.uploadProgress),this[$s].emit("upload-complete")),t(o)})};this.requestInitialized?r():this[g1].push(r)}_destroy(t,r){var o;this[QE]=!0,clearTimeout(this[Yae]),$s in this&&(this[I4](),!((o=this[ox])===null||o===void 0)&&o.complete||this[$s].destroy()),t!==null&&!st.default.undefined(t)&&!(t instanceof Vi)&&(t=new Vi(t.message,t,this)),r(t)}get _isAboutToError(){return this[QE]}get ip(){var t;return(t=this.socket)===null||t===void 0?void 0:t.remoteAddress}get aborted(){var t,r,o;return((r=(t=this[$s])===null||t===void 0?void 0:t.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((o=this[Gae])===null||o===void 0)&&o.complete)}get socket(){var t,r;return(r=(t=this[$s])===null||t===void 0?void 0:t.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let t;return this[SE]?t=this[PE]/this[SE]:this[SE]===this[PE]?t=1:t=0,{percent:t,transferred:this[PE],total:this[SE]}}get uploadProgress(){let t;return this[xE]?t=this[bE]/this[xE]:this[xE]===this[bE]?t=1:t=0,{percent:t,transferred:this[bE],total:this[xE]}}get timings(){var t;return(t=this[$s])===null||t===void 0?void 0:t.timings}get isFromCache(){return this[jae]}pipe(t,r){if(this[qae])throw new Error("Failed to pipe. The response has been emitted already.");return t instanceof w4.ServerResponse&&this[ix].add(t),super.pipe(t,r)}unpipe(t){return t instanceof w4.ServerResponse&&this[ix].delete(t),super.unpipe(t),this}};In.default=px});var y1=_(Gc=>{"use strict";var Zit=Gc&&Gc.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),$it=Gc&&Gc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Zit(t,e,r)};Object.defineProperty(Gc,"__esModule",{value:!0});Gc.CancelError=Gc.ParseError=void 0;var Wae=m1(),v4=class extends Wae.RequestError{constructor(t,r){let{options:o}=r.request;super(`${t.message} in "${o.url.toString()}"`,t,r.request),this.name="ParseError"}};Gc.ParseError=v4;var D4=class extends Wae.RequestError{constructor(t){super("Promise was canceled",{},t),this.name="CancelError"}get isCanceled(){return!0}};Gc.CancelError=D4;$it(m1(),Gc)});var Jae=_(S4=>{"use strict";Object.defineProperty(S4,"__esModule",{value:!0});var Kae=y1(),est=(e,t,r,o)=>{let{rawBody:a}=e;try{if(t==="text")return a.toString(o);if(t==="json")return a.length===0?"":r(a.toString());if(t==="buffer")return a;throw new Kae.ParseError({message:`Unknown body type '${t}'`,name:"Error"},e)}catch(n){throw new Kae.ParseError(n,e)}};S4.default=est});var P4=_(ch=>{"use strict";var tst=ch&&ch.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),rst=ch&&ch.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&tst(t,e,r)};Object.defineProperty(ch,"__esModule",{value:!0});var nst=Ie("events"),ist=Rf(),sst=Jse(),hx=y1(),Vae=Jae(),zae=m1(),ost=c4(),ast=d4(),Xae=m4(),lst=["request","response","redirect","uploadProgress","downloadProgress"];function Zae(e){let t,r,o=new nst.EventEmitter,a=new sst((u,A,p)=>{let h=w=>{let I=new zae.default(void 0,e);I.retryCount=w,I._noPipe=!0,p(()=>I.destroy()),p.shouldReject=!1,p(()=>A(new hx.CancelError(I))),t=I,I.once("response",async E=>{var R;if(E.retryCount=w,E.request.aborted)return;let N;try{N=await ast.default(I),E.rawBody=N}catch{return}if(I._isAboutToError)return;let U=((R=E.headers["content-encoding"])!==null&&R!==void 0?R:"").toLowerCase(),V=["gzip","deflate","br"].includes(U),{options:ee}=I;if(V&&!ee.decompress)E.body=N;else try{E.body=Vae.default(E,ee.responseType,ee.parseJson,ee.encoding)}catch(le){if(E.body=N.toString(),Xae.isResponseOk(E)){I._beforeError(le);return}}try{for(let[le,fe]of ee.hooks.afterResponse.entries())E=await fe(E,async de=>{let ge=zae.default.normalizeArguments(void 0,{...de,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},ee);ge.hooks.afterResponse=ge.hooks.afterResponse.slice(0,le);for(let Be of ge.hooks.beforeRetry)await Be(ge);let oe=Zae(ge);return p(()=>{oe.catch(()=>{}),oe.cancel()}),oe})}catch(le){I._beforeError(new hx.RequestError(le.message,le,I));return}if(!Xae.isResponseOk(E)){I._beforeError(new hx.HTTPError(E));return}r=E,u(I.options.resolveBodyOnly?E.body:E)});let v=E=>{if(a.isCanceled)return;let{options:R}=I;if(E instanceof hx.HTTPError&&!R.throwHttpErrors){let{response:N}=E;u(I.options.resolveBodyOnly?N.body:N);return}A(E)};I.once("error",v);let b=I.options.body;I.once("retry",(E,R)=>{var N,U;if(b===((N=R.request)===null||N===void 0?void 0:N.options.body)&&ist.default.nodeStream((U=R.request)===null||U===void 0?void 0:U.options.body)){v(R);return}h(E)}),ost.default(I,o,lst)};h(0)});a.on=(u,A)=>(o.on(u,A),a);let n=u=>{let A=(async()=>{await a;let{options:p}=r.request;return Vae.default(r,u,p.parseJson,p.encoding)})();return Object.defineProperties(A,Object.getOwnPropertyDescriptors(a)),A};return a.json=()=>{let{headers:u}=t.options;return!t.writableFinished&&u.accept===void 0&&(u.accept="application/json"),n("json")},a.buffer=()=>n("buffer"),a.text=()=>n("text"),a}ch.default=Zae;rst(y1(),ch)});var $ae=_(x4=>{"use strict";Object.defineProperty(x4,"__esModule",{value:!0});var cst=y1();function ust(e,...t){let r=(async()=>{if(e instanceof cst.RequestError)try{for(let a of t)if(a)for(let n of a)e=await n(e)}catch(a){e=a}throw e})(),o=()=>r;return r.json=o,r.text=o,r.buffer=o,r.on=o,r}x4.default=ust});var rle=_(b4=>{"use strict";Object.defineProperty(b4,"__esModule",{value:!0});var ele=Rf();function tle(e){for(let t of Object.values(e))(ele.default.plainObject(t)||ele.default.array(t))&&tle(t);return Object.freeze(e)}b4.default=tle});var ile=_(nle=>{"use strict";Object.defineProperty(nle,"__esModule",{value:!0})});var Q4=_(Jl=>{"use strict";var Ast=Jl&&Jl.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),fst=Jl&&Jl.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ast(t,e,r)};Object.defineProperty(Jl,"__esModule",{value:!0});Jl.defaultHandler=void 0;var sle=Rf(),Kl=P4(),pst=$ae(),dx=m1(),hst=rle(),gst={RequestError:Kl.RequestError,CacheError:Kl.CacheError,ReadError:Kl.ReadError,HTTPError:Kl.HTTPError,MaxRedirectsError:Kl.MaxRedirectsError,TimeoutError:Kl.TimeoutError,ParseError:Kl.ParseError,CancelError:Kl.CancelError,UnsupportedProtocolError:Kl.UnsupportedProtocolError,UploadError:Kl.UploadError},dst=async e=>new Promise(t=>{setTimeout(t,e)}),{normalizeArguments:gx}=dx.default,ole=(...e)=>{let t;for(let r of e)t=gx(void 0,r,t);return t},mst=e=>e.isStream?new dx.default(void 0,e):Kl.default(e),yst=e=>"defaults"in e&&"options"in e.defaults,Est=["get","post","put","patch","head","delete"];Jl.defaultHandler=(e,t)=>t(e);var ale=(e,t)=>{if(e)for(let r of e)r(t)},lle=e=>{e._rawHandlers=e.handlers,e.handlers=e.handlers.map(o=>(a,n)=>{let u,A=o(a,p=>(u=n(p),u));if(A!==u&&!a.isStream&&u){let p=A,{then:h,catch:w,finally:I}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(u)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(u)),p.then=h,p.catch=w,p.finally=I}return A});let t=(o,a={},n)=>{var u,A;let p=0,h=w=>e.handlers[p++](w,p===e.handlers.length?mst:h);if(sle.default.plainObject(o)){let w={...o,...a};dx.setNonEnumerableProperties([o,a],w),a=w,o=void 0}try{let w;try{ale(e.options.hooks.init,a),ale((u=a.hooks)===null||u===void 0?void 0:u.init,a)}catch(v){w=v}let I=gx(o,a,n??e.options);if(I[dx.kIsNormalizedAlready]=!0,w)throw new Kl.RequestError(w.message,w,I);return h(I)}catch(w){if(a.isStream)throw w;return pst.default(w,e.options.hooks.beforeError,(A=a.hooks)===null||A===void 0?void 0:A.beforeError)}};t.extend=(...o)=>{let a=[e.options],n=[...e._rawHandlers],u;for(let A of o)yst(A)?(a.push(A.defaults.options),n.push(...A.defaults._rawHandlers),u=A.defaults.mutableDefaults):(a.push(A),"handlers"in A&&n.push(...A.handlers),u=A.mutableDefaults);return n=n.filter(A=>A!==Jl.defaultHandler),n.length===0&&n.push(Jl.defaultHandler),lle({options:ole(...a),handlers:n,mutableDefaults:Boolean(u)})};let r=async function*(o,a){let n=gx(o,a,e.options);n.resolveBodyOnly=!1;let u=n.pagination;if(!sle.default.object(u))throw new TypeError("`options.pagination` must be implemented");let A=[],{countLimit:p}=u,h=0;for(;h<u.requestLimit;){h!==0&&await dst(u.backoff);let w=await t(void 0,void 0,n),I=await u.transform(w),v=[];for(let E of I)if(u.filter(E,A,v)&&(!u.shouldContinue(E,A,v)||(yield E,u.stackAllItems&&A.push(E),v.push(E),--p<=0)))return;let b=u.paginate(w,A,v);if(b===!1)return;b===w.request.options?n=w.request.options:b!==void 0&&(n=gx(void 0,b,n)),h++}};t.paginate=r,t.paginate.all=async(o,a)=>{let n=[];for await(let u of r(o,a))n.push(u);return n},t.paginate.each=r,t.stream=(o,a)=>t(o,{...a,isStream:!0});for(let o of Est)t[o]=(a,n)=>t(a,{...n,method:o}),t.stream[o]=(a,n)=>t(a,{...n,method:o,isStream:!0});return Object.assign(t,gst),Object.defineProperty(t,"defaults",{value:e.mutableDefaults?e:hst.default(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:!0}),t.mergeOptions=ole,t};Jl.default=lle;fst(ile(),Jl)});var Ale=_((Tf,mx)=>{"use strict";var wst=Tf&&Tf.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),cle=Tf&&Tf.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&wst(t,e,r)};Object.defineProperty(Tf,"__esModule",{value:!0});var Cst=Ie("url"),ule=Q4(),Ist={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:e=>e.request.options.responseType==="json"?e.body:JSON.parse(e.body),paginate:e=>{if(!Reflect.has(e.headers,"link"))return!1;let t=e.headers.link.split(","),r;for(let o of t){let a=o.split(";");if(a[1].includes("next")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new Cst.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:e=>JSON.parse(e),stringifyJson:e=>JSON.stringify(e),cacheOptions:{}},handlers:[ule.defaultHandler],mutableDefaults:!1},k4=ule.default(Ist);Tf.default=k4;mx.exports=k4;mx.exports.default=k4;mx.exports.__esModule=!0;cle(Q4(),Tf);cle(P4(),Tf)});var tn={};Jt(tn,{Method:()=>yle,del:()=>Pst,get:()=>N4,getNetworkSettings:()=>mle,post:()=>L4,put:()=>Sst,request:()=>E1});function hle(e){let t=new yx.URL(e),r={host:t.hostname,headers:{}};return t.port&&(r.port=Number(t.port)),t.username&&t.password&&(r.proxyAuth=`${t.username}:${t.password}`),{proxy:r}}async function F4(e){return _c(ple,e,()=>ae.readFilePromise(e).then(t=>(ple.set(e,t),t)))}function Dst({statusCode:e,statusMessage:t},r){let o=_t(r,e,Et.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${e}`;return Xy(r,`${o}${t?` (${t})`:""}`,a)}async function Ex(e,{configuration:t,customErrorMessage:r}){try{return await e}catch(o){if(o.name!=="HTTPError")throw o;let a=r?.(o,t)??o.response.body?.error;a==null&&(o.message.startsWith("Response code")?a="The remote server failed to provide the requested resource":a=o.message),o.code==="ETIMEDOUT"&&o.event==="socket"&&(a+=`(can be increased via ${_t(t,"httpTimeout",Et.SETTING)})`);let n=new zt(35,a,u=>{o.response&&u.reportError(35,` ${Zu(t,{label:"Response Code",value:Hc(Et.NO_HINT,Dst(o.response,t))})}`),o.request&&(u.reportError(35,` ${Zu(t,{label:"Request Method",value:Hc(Et.NO_HINT,o.request.options.method)})}`),u.reportError(35,` ${Zu(t,{label:"Request URL",value:Hc(Et.URL,o.request.requestUrl)})}`)),o.request.redirects.length>0&&u.reportError(35,` ${Zu(t,{label:"Request Redirects",value:Hc(Et.NO_HINT,SL(t,o.request.redirects,Et.URL))})}`),o.request.retryCount===o.request.options.retry.limit&&u.reportError(35,` ${Zu(t,{label:"Request Retry Count",value:Hc(Et.NO_HINT,`${_t(t,o.request.retryCount,Et.NUMBER)} (can be increased via ${_t(t,"httpRetry",Et.SETTING)})`)})}`)});throw n.originalError=o,n}}function mle(e,t){let r=[...t.configuration.get("networkSettings")].sort(([u],[A])=>A.length-u.length),o={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(o),n=typeof e=="string"?new yx.URL(e):e;for(let[u,A]of r)if(T4.default.isMatch(n.hostname,u))for(let p of a){let h=A.get(p);h!==null&&typeof o[p]>"u"&&(o[p]=h)}for(let u of a)typeof o[u]>"u"&&(o[u]=t.configuration.get(u));return o}async function E1(e,t,{configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u="GET",wrapNetworkRequest:A}){let p={target:e,body:t,configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u},h=async()=>await xst(e,t,p),w=typeof A<"u"?await A(h,p):h;return await(await r.reduceHook(v=>v.wrapNetworkRequest,w,p))()}async function N4(e,{configuration:t,jsonResponse:r,customErrorMessage:o,wrapNetworkRequest:a,...n}){let u=()=>Ex(E1(e,null,{configuration:t,wrapNetworkRequest:a,...n}),{configuration:t,customErrorMessage:o}).then(p=>p.body),A=await(typeof a<"u"?u():_c(fle,e,()=>u().then(p=>(fle.set(e,p),p))));return r?JSON.parse(A.toString()):A}async function Sst(e,t,{customErrorMessage:r,...o}){return(await Ex(E1(e,t,{...o,method:"PUT"}),{customErrorMessage:r,configuration:o.configuration})).body}async function L4(e,t,{customErrorMessage:r,...o}){return(await Ex(E1(e,t,{...o,method:"POST"}),{customErrorMessage:r,configuration:o.configuration})).body}async function Pst(e,{customErrorMessage:t,...r}){return(await Ex(E1(e,null,{...r,method:"DELETE"}),{customErrorMessage:t,configuration:r.configuration})).body}async function xst(e,t,{configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u="GET"}){let A=typeof e=="string"?new yx.URL(e):e,p=mle(A,{configuration:r});if(p.enableNetwork===!1)throw new zt(80,`Request to '${A.href}' has been blocked because of your configuration settings`);if(A.protocol==="http:"&&!T4.default.isMatch(A.hostname,r.get("unsafeHttpWhitelist")))throw new zt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${A.hostname})`);let w={agent:{http:p.httpProxy?R4.default.httpOverHttp(hle(p.httpProxy)):Bst,https:p.httpsProxy?R4.default.httpsOverHttp(hle(p.httpsProxy)):vst},headers:o,method:u};w.responseType=n?"json":"buffer",t!==null&&(Buffer.isBuffer(t)||!a&&typeof t=="string"?w.body=t:w.json=t);let I=r.get("httpTimeout"),v=r.get("httpRetry"),b=r.get("enableStrictSsl"),E=p.httpsCaFilePath,R=p.httpsCertFilePath,N=p.httpsKeyFilePath,{default:U}=await Promise.resolve().then(()=>$e(Ale())),V=E?await F4(E):void 0,ee=R?await F4(R):void 0,le=N?await F4(N):void 0,fe=U.extend({timeout:{socket:I},retry:v,https:{rejectUnauthorized:b,certificateAuthority:V,certificate:ee,key:le},...w});return r.getLimit("networkConcurrency")(()=>fe(A))}var gle,dle,T4,R4,yx,fle,ple,Bst,vst,yle,wx=yt(()=>{St();gle=Ie("https"),dle=Ie("http"),T4=$e(Zo()),R4=$e(qse()),yx=Ie("url");Yl();ql();jl();fle=new Map,ple=new Map,Bst=new dle.Agent({keepAlive:!0}),vst=new gle.Agent({keepAlive:!0});yle=(a=>(a.GET="GET",a.PUT="PUT",a.POST="POST",a.DELETE="DELETE",a))(yle||{})});var cs={};Jt(cs,{availableParallelism:()=>U4,builtinModules:()=>O4,getArchitecture:()=>w1,getArchitectureName:()=>kst,getArchitectureSet:()=>M4,getCaller:()=>Nst,openUrl:()=>bst});function O4(){return new Set(Ile.default.builtinModules||Object.keys(process.binding("natives")))}function Qst(){if(process.platform==="win32")return null;let t=(process.report?.getReport()??{}).sharedObjects??[],r=/\/(?:(ld-linux-|[^/]+-linux-gnu\/)|(libc.musl-|ld-musl-))/;return GI(t,o=>{let a=o.match(r);if(!a)return GI.skip;if(a[1])return"glibc";if(a[2])return"musl";throw new Error("Assertion failed: Expected the libc variant to have been detected")})??null}function w1(){return wle=wle??{os:process.platform,cpu:process.arch,libc:Qst()}}function kst(e=w1()){return e.libc?`${e.os}-${e.cpu}-${e.libc}`:`${e.os}-${e.cpu}`}function M4(){let e=w1();return Cle=Cle??{os:[e.os],cpu:[e.cpu],libc:e.libc?[e.libc]:[]}}function Tst(e){let t=Fst.exec(e);if(!t)return null;let r=t[2]&&t[2].indexOf("native")===0,o=t[2]&&t[2].indexOf("eval")===0,a=Rst.exec(t[2]);return o&&a!=null&&(t[2]=a[1],t[3]=a[2],t[4]=a[3]),{file:r?null:t[2],methodName:t[1]||"<unknown>",arguments:r?[t[2]]:[],line:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}function Nst(){let t=new Error().stack.split(`
148`)[3];return Tst(t)}function U4(){return typeof Cx.default.availableParallelism<"u"?Cx.default.availableParallelism():Math.max(1,Cx.default.cpus().length)}var Ile,Cx,Ele,bst,wle,Cle,Fst,Rst,C1=yt(()=>{St();Ile=$e(Ie("module")),Cx=$e(Ie("os"));Ix();jl();Ele=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),bst=typeof Ele<"u"?async e=>{try{return await _4(Ele,[e],{cwd:J.cwd()}),!0}catch{return!1}}:void 0;Fst=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Rst=/\((\S*)(?::(\d+))(?::(\d+))\)/});function G4(e,t,r,o,a){let n=l1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>H4(e,`${t}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>H4(e,t,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return H4(e,t,r,o,a)}function H4(e,t,r,o,a){let n=l1(r);switch(o.type){case"ANY":return jP(n);case"SHAPE":return Ust(e,t,r,o,a);case"MAP":return _st(e,t,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(o.values?.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return YI(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${t}" to be a string, got ${typeof n}`);let p=iP(n,{env:e.env});switch(o.type){case"ABSOLUTE_PATH":{let h=a,w=dM(r);return w&&(h=J.resolve(w,"..")),J.resolve(h,Ae.toPortablePath(p))}case"LOCATOR_LOOSE":return xf(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return xf(p);case"BOOLEAN":return YI(p);default:return p}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function Ust(e,t,r,o,a){let n=l1(r);if(typeof n!="object"||Array.isArray(n))throw new it(`Object configuration settings "${t}" must be an object`);let u=Y4(e,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${t}.${A}`;if(!o.properties[A])throw new it(`Unrecognized configuration settings found: ${t}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,G4(e,h,p,o.properties[A],a))}return u}function _st(e,t,r,o,a){let n=l1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new it(`Map configuration settings "${t}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,w=`${t}['${h}']`,I=o.valueDefinition;u.set(h,G4(e,w,p,I,a))}return u}function Y4(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case"SHAPE":{if(t.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(t.properties))o.set(a,Y4(e,n));return o}break;case"MAP":return t.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return t.default===null?null:e.projectCwd===null?Array.isArray(t.default)?t.default.map(o=>J.normalize(o)):J.isAbsolute(t.default)?J.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(o=>J.resolve(e.projectCwd,o)):J.resolve(e.projectCwd,t.default);default:return t.default}}function vx(e,t,r){if(t.type==="SECRET"&&typeof e=="string"&&r.hideSecrets)return Mst;if(t.type==="ABSOLUTE_PATH"&&typeof e=="string"&&r.getNativePaths)return Ae.fromPortablePath(e);if(t.isArray&&Array.isArray(e)){let o=[];for(let a of e)o.push(vx(a,t,r));return o}if(t.type==="MAP"&&e instanceof Map){let o=new Map;for(let[a,n]of e.entries())o.set(a,vx(n,t.valueDefinition,r));return o}if(t.type==="SHAPE"&&e instanceof Map){let o=new Map;for(let[a,n]of e.entries()){let u=t.properties[a];o.set(a,vx(n,u,r))}return o}return e}function Hst(){let e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith(Sx)&&(t=(0,Ble.default)(t.slice(Sx.length)),e[t]=r);return e}function Dx(){let e=`${Sx}rc_filename`;for(let[t,r]of Object.entries(process.env))if(t.toLowerCase()===e&&typeof r=="string")return r;return q4}async function jst({configuration:e,selfPath:t}){let r=e.get("yarnPath"),o=e.get("ignorePath"),a=u=>ae.readFilePromise(u).catch(()=>Buffer.of());return!o&&await(async()=>r&&(r===t||Buffer.compare(...await Promise.all([a(r),a(t)]))===0))()?null:r!==null&&!o?r:null}var Ble,Nf,vle,Dle,j4,Lst,I1,Ost,kE,Sx,q4,Mst,B1,Sle,Px,Bx,W4,Yc,Ke,v1=yt(()=>{St();Nl();Ble=$e(rJ()),Nf=$e($g());qt();vle=$e(zJ()),Dle=$e(nd()),j4=Ie("stream");ise();AE();lM();cM();uM();Fse();AM();Bd();Ose();GP();ql();rh();wx();jl();C1();Qf();xo();Lst=Nf.GITHUB_ACTIONS&&process.env.GITHUB_EVENT_PATH?!(ae.readJsonSync(Ae.toPortablePath(process.env.GITHUB_EVENT_PATH)).repository?.private??!0):!1,I1=new Set(["@yarnpkg/plugin-constraints","@yarnpkg/plugin-exec","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]),Ost=new Set(["isTestEnv","injectNpmUser","injectNpmPassword","injectNpm2FaToken","cacheCheckpointOverride","cacheVersionOverride","lockfileVersionOverride","binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir","registry","ignoreCwd"]),kE=/^(?!v)[a-z0-9._-]+$/i,Sx="yarn_",q4=".yarnrc.yml",Mst="********",B1=(w=>(w.ANY="ANY",w.BOOLEAN="BOOLEAN",w.ABSOLUTE_PATH="ABSOLUTE_PATH",w.LOCATOR="LOCATOR",w.LOCATOR_LOOSE="LOCATOR_LOOSE",w.NUMBER="NUMBER",w.STRING="STRING",w.SECRET="SECRET",w.SHAPE="SHAPE",w.MAP="MAP",w))(B1||{}),Sle=Et,Px=(r=>(r.JUNCTIONS="junctions",r.SYMLINKS="symlinks",r))(Px||{}),Bx={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:"STRING",default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:"ABSOLUTE_PATH",default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:"BOOLEAN",default:!1},globalFolder:{description:"Folder where all system-global files are stored",type:"ABSOLUTE_PATH",default:yM()},cacheFolder:{description:"Folder where the cache files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:"NUMBER",values:["mixed",0,1,2,3,4,5,6,7,8,9],default:0},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)",type:"ABSOLUTE_PATH",default:"./.yarn/__virtual__"},installStatePath:{description:"Path of the file where the install state will be persisted",type:"ABSOLUTE_PATH",default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:"STRING",default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:"STRING",default:Dx()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:"BOOLEAN",default:!0},cacheMigrationMode:{description:"Defines the conditions under which Yarn upgrades should cause the cache archives to be regenerated.",type:"STRING",values:["always","match-spec","required-only"],default:"always"},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:"BOOLEAN",default:aP,defaultText:"<dynamic>"},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:"BOOLEAN",default:DL,defaultText:"<dynamic>"},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:"BOOLEAN",default:Nf.isCI,defaultText:"<dynamic>"},enableMessageNames:{description:"If true, the CLI will prefix most messages with codes suitable for search engines",type:"BOOLEAN",default:!0},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:"BOOLEAN",default:!Nf.isCI,defaultText:"<dynamic>"},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:"BOOLEAN",default:!0},enableTips:{description:"If true, installs will print a helpful message every day of the week",type:"BOOLEAN",default:!Nf.isCI,defaultText:"<dynamic>"},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:"BOOLEAN",default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:"BOOLEAN",default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:"STRING",default:void 0,defaultText:"<dynamic>"},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:"STRING",default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:"STRING",default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:"BOOLEAN",default:!0},supportedArchitectures:{description:"Architectures that Yarn will fetch and inject into the resolver",type:"SHAPE",properties:{os:{description:"Array of supported process.platform strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},cpu:{description:"Array of supported process.arch strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},libc:{description:"Array of supported libc libraries, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]}}},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:"BOOLEAN",default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:"BOOLEAN",default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:"STRING",default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:"NUMBER",default:6e4},httpRetry:{description:"Retry times on http failure",type:"NUMBER",default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:"NUMBER",default:50},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{httpsCaFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:"BOOLEAN",default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null}}}},httpsCaFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:"BOOLEAN",default:!0},logFilters:{description:"Overrides for log levels",type:"SHAPE",isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:"STRING",default:void 0},text:{description:"Code of the texts covered by this override",type:"STRING",default:void 0},pattern:{description:"Code of the patterns covered by this override",type:"STRING",default:void 0},level:{description:"Log level override, set to null to remove override",type:"STRING",values:Object.values(cP),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:"BOOLEAN",default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:"NUMBER",default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:"STRING",default:null},enableHardenedMode:{description:"If true, automatically enable --check-resolutions --refresh-lockfile on installs",type:"BOOLEAN",default:Nf.isPR&&Lst,defaultText:"<true on public PRs>"},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:"BOOLEAN",default:!0},enableStrictSettings:{description:"If true, unknown settings will cause Yarn to abort",type:"BOOLEAN",default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:"BOOLEAN",default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:"STRING",default:"throw"},injectEnvironmentFiles:{description:"List of all the environment files that Yarn should inject inside the process when it starts",type:"ABSOLUTE_PATH",default:[".env.yarn?"],isArray:!0},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:"MAP",valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:"SHAPE",properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:"MAP",valueDefinition:{description:"A range",type:"STRING"}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:"MAP",valueDefinition:{description:"A semver range",type:"STRING"}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:"MAP",valueDefinition:{description:"The peerDependency meta",type:"SHAPE",properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:"BOOLEAN",default:!1}}}}}}}};W4=(o=>(o[o.LOCKFILE=0]="LOCKFILE",o[o.MANIFEST=1]="MANIFEST",o[o.NONE=2]="NONE",o))(W4||{}),Yc=class{constructor(t){this.isCI=Nf.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.env={};this.packageExtensions=new Map;this.limits=new Map;this.startingCwd=t}static create(t,r,o){let a=new Yc(t);typeof r<"u"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(Bx);let n=typeof o<"u"?o:r instanceof Map?r:new Map;for(let[u,A]of n)a.activatePlugin(u,A);return a}static async find(t,r,{lookup:o=0,strict:a=!0,usePathCheck:n=null,useRc:u=!0}={}){let A=Hst();delete A.rcFilename;let p=await Yc.findRcFiles(t),h=await Yc.findHomeRcFile();h&&(p.find(oe=>oe.path===h.path)||p.unshift(h));let w=Lse(p.map(ge=>[ge.path,ge.data])),I=".",v=new Set(Object.keys(Bx)),b=({yarnPath:ge,ignorePath:oe,injectEnvironmentFiles:Be})=>({yarnPath:ge,ignorePath:oe,injectEnvironmentFiles:Be}),E=({yarnPath:ge,ignorePath:oe,injectEnvironmentFiles:Be,...be})=>{let g={};for(let[we,Se]of Object.entries(be))v.has(we)&&(g[we]=Se);return g},R=({yarnPath:ge,ignorePath:oe,...Be})=>{let be={};for(let[g,we]of Object.entries(Be))v.has(g)||(be[g]=we);return be},N=new Yc(t);if(N.importSettings(b(Bx)),N.useWithSource("<environment>",b(A),t,{strict:!1}),w){let[ge,oe]=w;N.useWithSource(ge,b(oe),I,{strict:!1})}if(n){if(await jst({configuration:N,selfPath:n})!==null)return N;N.useWithSource("<override>",{ignorePath:!0},t,{strict:!1,overwrite:!0})}let U;switch(o){case 0:U=await Yc.findProjectCwd(t,gr.lockfile);break;case 1:U=await Yc.findProjectCwd(t,null);break;case 2:ae.existsSync(J.join(t,"package.json"))?U=J.resolve(t):U=null;break}N.startingCwd=t,N.projectCwd=U;let V=Object.assign(Object.create(null),process.env);N.env=V;let ee=await Promise.all(N.get("injectEnvironmentFiles").map(async ge=>{let oe=ge.endsWith("?")?await ae.readFilePromise(ge.slice(0,-1),"utf8").catch(()=>""):await ae.readFilePromise(ge,"utf8");return(0,vle.parse)(oe)}));for(let ge of ee)for(let[oe,Be]of Object.entries(ge))N.env[oe]=iP(Be,{env:V});if(N.importSettings(E(Bx)),N.useWithSource("<environment>",E(A),t,{strict:a}),w){let[ge,oe]=w;N.useWithSource(ge,E(oe),I,{strict:a})}let le=ge=>"default"in ge?ge.default:ge,fe=new Map([["@@core",nse]]);if(r!==null)for(let ge of r.plugins.keys())fe.set(ge,le(r.modules.get(ge)));for(let[ge,oe]of fe)N.activatePlugin(ge,oe);let de=new Map([]);if(r!==null){let ge=new Map;for(let be of O4())ge.set(be,()=>Vp(be));for(let[be,g]of r.modules)ge.set(be,()=>g);let oe=new Set,Be=async(be,g)=>{let{factory:we,name:Se}=Vp(be);if(!we||oe.has(Se))return;let ce=new Map(ge),ne=Ee=>{if(ce.has(Ee))return ce.get(Ee)();throw new it(`This plugin cannot access the package referenced via ${Ee} which is neither a builtin, nor an exposed entry`)},te=await Wy(async()=>le(await we(ne)),Ee=>`${Ee} (when initializing ${Se}, defined in ${g})`);ge.set(Se,()=>te),oe.add(Se),de.set(Se,te)};if(A.plugins)for(let be of A.plugins.split(";")){let g=J.resolve(t,Ae.toPortablePath(be));await Be(g,"<environment>")}for(let{path:be,cwd:g,data:we}of p)if(!!u&&!!Array.isArray(we.plugins))for(let Se of we.plugins){let ce=typeof Se!="string"?Se.path:Se,ne=Se?.spec??"",te=Se?.checksum??"";if(I1.has(ne))continue;let Ee=J.resolve(g,Ae.toPortablePath(ce));if(!await ae.existsPromise(Ee)){if(!ne){let H=_t(N,J.basename(Ee,".cjs"),Et.NAME),at=_t(N,".gitignore",Et.NAME),Te=_t(N,N.values.get("rcFilename"),Et.NAME),Qe=_t(N,"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored",Et.URL);throw new it(`Missing source for the ${H} plugin - please try to remove the plugin from ${Te} then reinstall it manually. This error usually occurs because ${at} is incorrect, check ${Qe} to make sure your plugin folder isn't gitignored.`)}if(!ne.match(/^https?:/)){let H=_t(N,J.basename(Ee,".cjs"),Et.NAME),at=_t(N,N.values.get("rcFilename"),Et.NAME);throw new it(`Failed to recognize the source for the ${H} plugin - please try to delete the plugin from ${at} then reinstall it manually.`)}let Re=await N4(ne,{configuration:N}),dt=Fs(Re);if(te&&te!==dt){let H=_t(N,J.basename(Ee,".cjs"),Et.NAME),at=_t(N,N.values.get("rcFilename"),Et.NAME),Te=_t(N,`yarn plugin import ${ne}`,Et.CODE);throw new it(`Failed to fetch the ${H} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${at} then run ${Te} to reimport it.`)}await ae.mkdirPromise(J.dirname(Ee),{recursive:!0}),await ae.writeFilePromise(Ee,Re)}await Be(Ee,be)}}for(let[ge,oe]of de)N.activatePlugin(ge,oe);if(N.useWithSource("<environment>",R(A),t,{strict:a}),w){let[ge,oe]=w;N.useWithSource(ge,R(oe),I,{strict:a})}return N.get("enableGlobalCache")&&(N.values.set("cacheFolder",`${N.get("globalFolder")}/cache`),N.sources.set("cacheFolder","<internal>")),await N.refreshPackageExtensions(),N}static async findRcFiles(t){let r=Dx(),o=[],a=t,n=null;for(;a!==n;){n=a;let u=J.join(n,r);if(ae.existsSync(u)){let A=await ae.readFilePromise(u,"utf8"),p;try{p=Ji(A)}catch{let w="";throw A.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(w=" (in particular, make sure you list the colons after each key name)"),new it(`Parse error when loading ${u}; please check it's proper Yaml${w}`)}o.unshift({path:u,cwd:n,data:p})}a=J.dirname(n)}return o}static async findHomeRcFile(){let t=Dx(),r=yE(),o=J.join(r,t);if(ae.existsSync(o)){let a=await ae.readFilePromise(o,"utf8"),n=Ji(a);return{path:o,cwd:r,data:n}}return null}static async findProjectCwd(t,r){let o=null,a=t,n=null;for(;a!==n;){if(n=a,ae.existsSync(J.join(n,"package.json"))&&(o=n),r!==null){if(ae.existsSync(J.join(n,r))){o=n;break}}else if(o!==null)break;a=J.dirname(n)}return o}static async updateConfiguration(t,r,o={}){let a=Dx(),n=J.join(t,a),u=ae.existsSync(n)?Ji(await ae.readFilePromise(n,"utf8")):{},A=!1,p;if(typeof r=="function"){try{p=r(u)}catch{p=r({})}if(p===u)return!1}else{p=u;for(let h of Object.keys(r)){let w=u[h],I=r[h],v;if(typeof I=="function")try{v=I(w)}catch{v=I(void 0)}else v=I;w!==v&&(v===Yc.deleteProperty?delete p[h]:p[h]=v,A=!0)}if(!A)return!1}return await ae.changeFilePromise(n,Ba(p),{automaticNewlines:!0}),!0}static async addPlugin(t,r){r.length!==0&&await Yc.updateConfiguration(t,o=>{let a=o.plugins??[];if(a.length===0)return{...o,plugins:r};let n=[],u=[...r];for(let A of a){let p=typeof A!="string"?A.path:A,h=u.find(w=>w.path===p);h?(n.push(h),u=u.filter(w=>w!==h)):n.push(A)}return n.push(...u),{...o,plugins:n}})}static async updateHomeConfiguration(t){let r=yE();return await Yc.updateConfiguration(r,t)}activatePlugin(t,r){this.plugins.set(t,r),typeof r.configuration<"u"&&this.importSettings(r.configuration)}importSettings(t){for(let[r,o]of Object.entries(t))if(o!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings "${r}"`);this.settings.set(r,o),this.values.set(r,Y4(this,o))}}useWithSource(t,r,o,a){try{this.use(t,r,o,a)}catch(n){throw n.message+=` (in ${_t(this,t,Et.PATH)})`,n}}use(t,r,o,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get("enableStrictSettings");for(let u of["enableStrictSettings",...Object.keys(r)]){let A=r[u],p=dM(A);if(p&&(t=p),typeof A>"u"||u==="plugins"||t==="<environment>"&&Ost.has(u))continue;if(u==="rcFilename")throw new it(`The rcFilename settings can only be set via ${`${Sx}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(u);if(!h){let I=yE(),v=J.resolve(t,"..");if(a&&!(I===v))throw new it(`Unrecognized or legacy configuration settings found: ${u} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(u,t);continue}if(this.sources.has(u)&&!(n||h.type==="MAP"||h.isArray&&h.concatenateValues))continue;let w;try{w=G4(this,u,A,h,o)}catch(I){throw I.message+=` in ${_t(this,t,Et.PATH)}`,I}if(u==="enableStrictSettings"&&t!=="<environment>"){a=w;continue}if(h.type==="MAP"){let I=this.values.get(u);this.values.set(u,new Map(n?[...I,...w]:[...w,...I])),this.sources.set(u,`${this.sources.get(u)}, ${t}`)}else if(h.isArray&&h.concatenateValues){let I=this.values.get(u);this.values.set(u,n?[...I,...w]:[...w,...I]),this.sources.set(u,`${this.sources.get(u)}, ${t}`)}else this.values.set(u,w),this.sources.set(u,t)}}get(t){if(!this.values.has(t))throw new Error(`Invalid configuration key "${t}"`);return this.values.get(t)}getSpecial(t,{hideSecrets:r=!1,getNativePaths:o=!1}){let a=this.get(t),n=this.settings.get(t);if(typeof n>"u")throw new it(`Couldn't find a configuration settings named "${t}"`);return vx(a,n,{hideSecrets:r,getNativePaths:o})}getSubprocessStreams(t,{header:r,prefix:o,report:a}){let n,u,A=ae.createWriteStream(t);if(this.get("enableInlineBuilds")){let p=a.createStreamReporter(`${o} ${_t(this,"STDOUT","green")}`),h=a.createStreamReporter(`${o} ${_t(this,"STDERR","red")}`);n=new j4.PassThrough,n.pipe(p),n.pipe(A),u=new j4.PassThrough,u.pipe(h),u.pipe(A)}else n=A,u=A,typeof r<"u"&&n.write(`${r}
149`);return{stdout:n,stderr:u}}makeResolver(){let t=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])t.push(new o);return new vd([new o1,new Vn,...t])}makeFetcher(){let t=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])t.push(new o);return new pE([new hE,new dE,...t])}getLinkers(){let t=[];for(let r of this.plugins.values())for(let o of r.linkers||[])t.push(new o);return t}getSupportedArchitectures(){let t=w1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?t.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?t.cpu:u));let n=r.get("libc");return n!==null&&(n=sl(n,u=>u==="current"?t.libc??sl.skip:u)),{os:o,cpu:a,libc:n}}async refreshPackageExtensions(){this.packageExtensions=new Map;let t=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!ba(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new Ot;u.load(a,{yamlCompatibilityMode:!0});let A=Gy(t,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let w of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:w});for(let w of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:w});for(let[w,I]of u.peerDependenciesMeta)for(let[v,b]of Object.entries(I))p.push({...h,type:"PeerDependencyMeta",selector:w,key:v,value:b})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(nh(o,!0),nP(a),{userProvided:!0})}normalizeLocator(t){return ba(t.reference)?Rs(t,`${this.get("defaultProtocol")}${t.reference}`):kE.test(t.reference)?Rs(t,`${this.get("defaultProtocol")}${t.reference}`):t}normalizeDependency(t){return ba(t.range)?Cn(t,`${this.get("defaultProtocol")}${t.range}`):kE.test(t.range)?Cn(t,`${this.get("defaultProtocol")}${t.range}`):t}normalizeDependencyMap(t){return new Map([...t].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(t){let r=XI(t);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let o=this.packageExtensions.get(t.identHash);if(typeof o<"u"){let n=t.version;if(n!==null){for(let[u,A]of o)if(!!bf(n,u))for(let p of A)switch(p.status==="inactive"&&(p.status="redundant"),p.type){case"Dependency":typeof r.dependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.dependencies.set(p.descriptor.identHash,this.normalizeDependency(p.descriptor)));break;case"PeerDependency":typeof r.peerDependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.peerDependencies.set(p.descriptor.identHash,p.descriptor));break;case"PeerDependencyMeta":{let h=r.peerDependenciesMeta.get(p.selector);(typeof h>"u"||!Object.hasOwn(h,p.key)||h[p.key]!==p.value)&&(p.status="active",_c(r.peerDependenciesMeta,p.selector,()=>({}))[p.key]=p.value)}break;default:mL(p);break}}}let a=n=>n.scope?`${n.scope}__${n.name}`:`${n.name}`;for(let n of r.peerDependenciesMeta.keys()){let u=Xs(n);r.peerDependencies.has(u.identHash)||r.peerDependencies.set(u.identHash,Cn(u,"*"))}for(let n of r.peerDependencies.values()){if(n.scope==="types")continue;let u=a(n),A=rA("types",u),p=An(A);r.peerDependencies.has(A.identHash)||r.peerDependenciesMeta.has(p)||(r.peerDependencies.set(A.identHash,Cn(A,"*")),r.peerDependenciesMeta.set(p,{optional:!0}))}return r.dependencies=new Map(ks(r.dependencies,([,n])=>Pa(n))),r.peerDependencies=new Map(ks(r.peerDependencies,([,n])=>Pa(n))),r}getLimit(t){return _c(this.limits,t,()=>(0,Dle.default)(this.get(t)))}async triggerHook(t,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=t(a);!n||await n(...r)}}async triggerMultipleHooks(t,r){for(let o of r)await this.triggerHook(t,...o)}async reduceHook(t,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=t(u);!A||(a=await A(a,...o))}return a}async firstHook(t,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=t(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}},Ke=Yc;Ke.deleteProperty=Symbol(),Ke.telemetry=null});var Mr={};Jt(Mr,{EndStrategy:()=>z4,ExecError:()=>xx,PipeError:()=>D1,execvp:()=>_4,pipevp:()=>Wc});function Pd(e){return e!==null&&typeof e.fd=="number"}function K4(){}function J4(){for(let e of xd)e.kill()}async function Wc(e,t,{cwd:r,env:o=process.env,strict:a=!1,stdin:n=null,stdout:u,stderr:A,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":Pd(n)&&(h[0]=n),Pd(u)&&(h[1]=u),Pd(A)&&(h[2]=A);let w=(0,V4.default)(e,t,{cwd:Ae.fromPortablePath(r),env:{...o,PWD:Ae.fromPortablePath(r)},stdio:h});xd.add(w),xd.size===1&&(process.on("SIGINT",K4),process.on("SIGTERM",J4)),!Pd(n)&&n!==null&&n.pipe(w.stdin),Pd(u)||w.stdout.pipe(u,{end:!1}),Pd(A)||w.stderr.pipe(A,{end:!1});let I=()=>{for(let v of new Set([u,A]))Pd(v)||v.end()};return new Promise((v,b)=>{w.on("error",E=>{xd.delete(w),xd.size===0&&(process.off("SIGINT",K4),process.off("SIGTERM",J4)),(p===2||p===1)&&I(),b(E)}),w.on("close",(E,R)=>{xd.delete(w),xd.size===0&&(process.off("SIGINT",K4),process.off("SIGTERM",J4)),(p===2||p===1&&E!==0)&&I(),E===0||!a?v({code:X4(E,R)}):b(new D1({fileName:e,code:E,signal:R}))})})}async function _4(e,t,{cwd:r,env:o=process.env,encoding:a="utf8",strict:n=!1}){let u=["ignore","pipe","pipe"],A=[],p=[],h=Ae.fromPortablePath(r);typeof o.PWD<"u"&&(o={...o,PWD:h});let w=(0,V4.default)(e,t,{cwd:h,env:o,stdio:u});return w.stdout.on("data",I=>{A.push(I)}),w.stderr.on("data",I=>{p.push(I)}),await new Promise((I,v)=>{w.on("error",b=>{let E=Ke.create(r),R=_t(E,e,Et.PATH);v(new zt(1,`Process ${R} failed to spawn`,N=>{N.reportError(1,` ${Zu(E,{label:"Thrown Error",value:Hc(Et.NO_HINT,b.message)})}`)}))}),w.on("close",(b,E)=>{let R=a==="buffer"?Buffer.concat(A):Buffer.concat(A).toString(a),N=a==="buffer"?Buffer.concat(p):Buffer.concat(p).toString(a);b===0||!n?I({code:X4(b,E),stdout:R,stderr:N}):v(new xx({fileName:e,code:b,signal:E,stdout:R,stderr:N}))})})}function X4(e,t){let r=qst.get(t);return typeof r<"u"?128+r:e??1}function Gst(e,t,{configuration:r,report:o}){o.reportError(1,` ${Zu(r,e!==null?{label:"Exit Code",value:Hc(Et.NUMBER,e)}:{label:"Exit Signal",value:Hc(Et.CODE,t)})}`)}var V4,z4,D1,xx,xd,qst,Ix=yt(()=>{St();V4=$e(iT());v1();Yl();ql();z4=(o=>(o[o.Never=0]="Never",o[o.ErrorCode=1]="ErrorCode",o[o.Always=2]="Always",o))(z4||{}),D1=class extends zt{constructor({fileName:r,code:o,signal:a}){let n=Ke.create(J.cwd()),u=_t(n,r,Et.PATH);super(1,`Child ${u} reported an error`,A=>{Gst(o,a,{configuration:n,report:A})});this.code=X4(o,a)}},xx=class extends D1{constructor({fileName:r,code:o,signal:a,stdout:n,stderr:u}){super({fileName:r,code:o,signal:a});this.stdout=n,this.stderr=u}};xd=new Set;qst=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]])});function xle(e){Ple=e}function S1(){return typeof Z4>"u"&&(Z4=Ple()),Z4}var Z4,Ple,$4=yt(()=>{Ple=()=>{throw new Error("Assertion failed: No libzip instance is available, and no factory was configured")}});var ble=_((bx,tU)=>{var Yst=Object.assign({},Ie("fs")),eU=function(){var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(e=e||__filename),function(t){t=t||{};var r=typeof t<"u"?t:{},o,a;r.ready=new Promise(function(We,tt){o=We,a=tt});var n={},u;for(u in r)r.hasOwnProperty(u)&&(n[u]=r[u]);var A=[],p="./this.program",h=function(We,tt){throw tt},w=!1,I=!0,v="";function b(We){return r.locateFile?r.locateFile(We,v):v+We}var E,R,N,U;I&&(w?v=Ie("path").dirname(v)+"/":v=__dirname+"/",E=function(tt,It){var rr=ni(tt);return rr?It?rr:rr.toString():(N||(N=Yst),U||(U=Ie("path")),tt=U.normalize(tt),N.readFileSync(tt,It?null:"utf8"))},R=function(tt){var It=E(tt,!0);return It.buffer||(It=new Uint8Array(It)),we(It.buffer),It},process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),A=process.argv.slice(2),h=function(We){process.exit(We)},r.inspect=function(){return"[Emscripten Module object]"});var V=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(u in n)n.hasOwnProperty(u)&&(r[u]=n[u]);n=null,r.arguments&&(A=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var le=0,fe=function(We){le=We},de;r.wasmBinary&&(de=r.wasmBinary);var ge=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Ti("no native wasm support detected");function oe(We,tt,It){switch(tt=tt||"i8",tt.charAt(tt.length-1)==="*"&&(tt="i32"),tt){case"i1":return He[We>>0];case"i8":return He[We>>0];case"i16":return ap((We>>1)*2);case"i32":return Us((We>>2)*4);case"i64":return Us((We>>2)*4);case"float":return Au((We>>2)*4);case"double":return op((We>>3)*8);default:Ti("invalid type for getValue: "+tt)}return null}var Be,be=!1,g;function we(We,tt){We||Ti("Assertion failed: "+tt)}function Se(We){var tt=r["_"+We];return we(tt,"Cannot call unknown function "+We+", make sure it is exported"),tt}function ce(We,tt,It,rr,$){var me={string:function($i){var Pi=0;if($i!=null&&$i!==0){var jo=($i.length<<2)+1;Pi=Mn(jo),dt($i,Pi,jo)}return Pi},array:function($i){var Pi=Mn($i.length);return Te($i,Pi),Pi}};function Oe($i){return tt==="string"?Ee($i):tt==="boolean"?Boolean($i):$i}var ft=Se(We),pt=[],Tt=0;if(rr)for(var er=0;er<rr.length;er++){var Xr=me[It[er]];Xr?(Tt===0&&(Tt=ys()),pt[er]=Xr(rr[er])):pt[er]=rr[er]}var Gi=ft.apply(null,pt);return Gi=Oe(Gi),Tt!==0&&js(Tt),Gi}function ne(We,tt,It,rr){It=It||[];var $=It.every(function(Oe){return Oe==="number"}),me=tt!=="string";return me&&$&&!rr?Se(We):function(){return ce(We,tt,It,arguments,rr)}}var te=new TextDecoder("utf8");function Ee(We,tt){if(!We)return"";for(var It=We+tt,rr=We;!(rr>=It)&&Ne[rr];)++rr;return te.decode(Ne.subarray(We,rr))}function Re(We,tt,It,rr){if(!(rr>0))return 0;for(var $=It,me=It+rr-1,Oe=0;Oe<We.length;++Oe){var ft=We.charCodeAt(Oe);if(ft>=55296&&ft<=57343){var pt=We.charCodeAt(++Oe);ft=65536+((ft&1023)<<10)|pt&1023}if(ft<=127){if(It>=me)break;tt[It++]=ft}else if(ft<=2047){if(It+1>=me)break;tt[It++]=192|ft>>6,tt[It++]=128|ft&63}else if(ft<=65535){if(It+2>=me)break;tt[It++]=224|ft>>12,tt[It++]=128|ft>>6&63,tt[It++]=128|ft&63}else{if(It+3>=me)break;tt[It++]=240|ft>>18,tt[It++]=128|ft>>12&63,tt[It++]=128|ft>>6&63,tt[It++]=128|ft&63}}return tt[It]=0,It-$}function dt(We,tt,It){return Re(We,Ne,tt,It)}function H(We){for(var tt=0,It=0;It<We.length;++It){var rr=We.charCodeAt(It);rr>=55296&&rr<=57343&&(rr=65536+((rr&1023)<<10)|We.charCodeAt(++It)&1023),rr<=127?++tt:rr<=2047?tt+=2:rr<=65535?tt+=3:tt+=4}return tt}function at(We){var tt=H(We)+1,It=Oi(tt);return It&&Re(We,He,It,tt),It}function Te(We,tt){He.set(We,tt)}function Qe(We,tt){return We%tt>0&&(We+=tt-We%tt),We}var ke,He,Ne,Ve,je,x,C,P,y,F;function z(We){ke=We,r.HEAP_DATA_VIEW=F=new DataView(We),r.HEAP8=He=new Int8Array(We),r.HEAP16=Ve=new Int16Array(We),r.HEAP32=x=new Int32Array(We),r.HEAPU8=Ne=new Uint8Array(We),r.HEAPU16=je=new Uint16Array(We),r.HEAPU32=C=new Uint32Array(We),r.HEAPF32=P=new Float32Array(We),r.HEAPF64=y=new Float64Array(We)}var X=r.INITIAL_MEMORY||16777216,Z,ie=[],Pe=[],Le=[],ot=!1;function gt(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)xt(r.preRun.shift());oo(ie)}function jt(){ot=!0,oo(Pe)}function $t(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)br(r.postRun.shift());oo(Le)}function xt(We){ie.unshift(We)}function on(We){Pe.unshift(We)}function br(We){Le.unshift(We)}var dr=0,Pr=null,Yr=null;function Wn(We){dr++,r.monitorRunDependencies&&r.monitorRunDependencies(dr)}function Os(We){if(dr--,r.monitorRunDependencies&&r.monitorRunDependencies(dr),dr==0&&(Pr!==null&&(clearInterval(Pr),Pr=null),Yr)){var tt=Yr;Yr=null,tt()}}r.preloadedImages={},r.preloadedAudios={};function Ti(We){r.onAbort&&r.onAbort(We),We+="",ee(We),be=!0,g=1,We="abort("+We+"). Build with -s ASSERTIONS=1 for more info.";var tt=new WebAssembly.RuntimeError(We);throw a(tt),tt}var hs="data:application/octet-stream;base64,";function io(We){return We.startsWith(hs)}var Si="data:application/octet-stream;base64,AGFzbQEAAAAB/wEkYAN/f38Bf2ABfwF/YAJ/fwF/YAF/AGAEf39/fwF/YAN/f38AYAV/f39/fwF/YAJ/fwBgBH9/f38AYAABf2AFf39/fn8BfmAEf35/fwF/YAR/f35/AX5gAn9+AX9gA398fwBgA39/fgF/YAF/AX5gBn9/f39/fwF/YAN/fn8Bf2AEf39/fwF+YAV/f35/fwF/YAR/f35/AX9gA39/fgF+YAJ/fgBg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ARIAZB//8DcUEKSRsLIgYgBi8BACAFajsBAEEAIQYCfyAERQRAQQMhCkGKAQwBC0EDQQQgBCAIRiIFGyEKQQZBByAFGwshDSAIIQkLIAwgDkcNAAsLIAAgAEGAF2oQUSAAIAAoAvgtAn9BEiAAQYoWai8BAA0AGkERIABB0hVqLwEADQAaQRAgAEGGFmovAQANABpBDyAAQdYVai8BAA0AGkEOIABBghZqLwEADQAaQQ0gAEHaFWovAQANABpBDCAAQf4Vai8BAA0AGkELIABB3hVqLwEADQAaQQogAEH6FWovAQANABpBCSAAQeIVai8BAA0AGkEIIABB9hVqLwEADQAaQQcgAEHmFWovAQANABpBBiAAQfIVai8BAA0AGkEFIABB6hVqLwEADQAaQQQgAEHuFWovAQANABpBA0ECIABBzhVqLwEAGwsiBkEDbGoiBEERajYC+C0gACgC/C1BCmpBA3YiByAEQRtqQQN2IgRNBEAgByEEDAELIAAoAowBQQRHDQAgByEECyAEIAJBBGpPQQAgARsNASAEIAdHDQQLIANBAmqtIRIgACkDmC4hFCAAKAKgLiIBQQNqIgdBP0sNASASIAGthiAUhCESDAILIAAgASACIAMQOQwDCyABQcAARgRAIAAoAgQgACgCEGogFDcAACAAIAAoAhBBCGo2AhBBAyEHDAELIAAoAgQgACgCEGogEiABrYYgFIQ3AAAgACAAKAIQQQhqNgIQIAFBPWshByASQcAAIAFrrYghEgsgACASNwOYLiAAIAc2AqAuIABBgMEAQYDKABCHAQwBCyADQQRqrSESIAApA5guIRQCQCAAKAKgLiIBQQNqIgRBP00EQCASIAGthiAUhCESDAELIAFBwABGBEAgACgCBCAAKAIQaiAUNwAAIAAgACgCEEEIajYCEEEDIQQMAQsgACgCBCAAKAIQaiASIAGthiAUhDcAACAAIAAoAhBBCGo2AhAgAUE9ayEEIBJBwAAgAWutiCESCyAAIBI3A5guIAAgBDYCoC4gAEHsFmooAgAiC6xCgAJ9IRMgAEH4FmooAgAhCQJAAkACfwJ+AkACfwJ/IARBOk0EQCATIASthiAShCETIARBBWoMAQs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ABIAMQZUEASAR/IAQtAAEEQCAEKAIEEAYLIAQQBkEABSAECwubAgEDfyAALQAAQSBxRQRAAkAgASEDAkAgAiAAIgEoAhAiAAR/IAAFAn8gASABLQBKIgBBAWsgAHI6AEogASgCACIAQQhxBEAgASAAQSByNgIAQX8MAQsgAUIANwIEIAEgASgCLCIANgIcIAEgADYCFCABIAAgASgCMGo2AhBBAAsNASABKAIQCyABKAIUIgVrSwRAIAEgAyACIAEoAiQRAAAaDAILAn8gASwAS0F/SgRAIAIhAANAIAIgACIERQ0CGiADIARBAWsiAGotAABBCkcNAAsgASADIAQgASgCJBEAACAESQ0CIAMgBGohAyABKAIUIQUgAiAEawwBCyACCyEAIAUgAyAAEAcaIAEgASgCFCAAajYCFAsLCwvNBQEGfyAAKAIwIgNBhgJrIQYgACgCPCECIAMhAQNAIAAoAkQgAiAAKAJoIgRqayECIAEgBmogBE0EQCAAKAJIIgEgASADaiADEAcaAkAgAyAAKAJsIgFNBEAgACABIANrNgJsDAELIABCADcCbAsgACAAKAJoIANrIgE2AmggACAAKAJYIANrNgJYIAEgACgChC5JBEAgACABNgKELgsgAEH8gAEoAgARAwAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJoaiAFaiEFIAEgBCACazYCBAJAAkACQAJAIAEoAhwiBCgCFEEBaw4CAQACCyAEQaABaiAFIAEoAgAgAkHcgAEoAgARCAAMAgsgASABKAIwIAUgASgCACACQcSAASgCABEEADYCMAwBCyAFIAEoAgAgAhAHGgsgASABKAIAIAJqNgIAIAEgASgCCCACajYCCCAAKAI8BSAFCyACaiICNgI8AkAgACgChC4iASACakEDSQ0AIAAoAmggAWshAQJAIAAoAnRBgQhPBEAgACAAIAAoAkggAWoiAi0AACACLQABIAAoAnwRAAA2AlQMAQsgAUUNACAAIAFBAWsgACgChAERAgAaCyAAKAKELiAAKAI8IgJBAUZrIgRFDQAgACABIAQgACgCgAERBQAgACAAKAKELiA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AIgQgAS0AACIFRgRAIAFBAWohASAAQQFqIQAgAkEBayICDQEMAgsLIAQgBWshAwsgAwsUACAAEEAgACgCABAgIAAoAgQQIAutBAIBfgV/IwBBEGsiBCQAIAAgAWshBgJAAkAgAUEBRgRAIAAgBi0AACACEBkMAQsgAUEJTwRAIAAgBikAADcAACAAIAJBAWtBB3FBAWoiBWohACACIAVrIgFFDQIgBSAGaiECA0AgACACKQAANwAAIAJBCGohAiAAQQhqIQAgAUEIayIBDQALDAILAkACQAJAAkAgAUEEaw4FAAICAgECCyAEIAYoAAAiATYCBCAEIAE2AgAMAgsgBCAGKQAANwMADAELQQghByAEQQhqIQgDQCAIIAYgByABIAEgB0sbIgUQByAFaiEIIAcgBWsiBw0ACyAEIAQpAwg3AwALAkAgBQ0AIAJBEEkNACAEKQMAIQMgAkEQayIGQQR2QQFqQQdxIgEEQANAIAAgAzcACCAAIAM3AAAgAkEQayECIABBEGohACABQQFrIgENAAsLIAZB8ABJDQADQCAAIAM3AHggACADNwBwIAAgAzcAaCAAIAM3AGAgACADNwBYIAAgAzcAUCAAIAM3AEggACADNwBAIAAgAzcAOCAAIAM3ADAgACADNwAoIAAgAzcAICAAIAM3ABggACADNwAQIAAgAzcACCAAIAM3AAAgAEGAAWohACACQYABayICQQ9LDQALCyACQQhPBEBBCCAFayEBA0AgACAEKQMANwAAIAAgAWohACACIAFrIgJBB0sNAAsLIAJFDQEgACAEIAIQBxoLIAAgAmohAAsgBEEQaiQAIAALXwECfyAAKAIIIgEEQCABEAsgAEEANgIICwJAIAAoAgQiAUUNACABKAIAIgJBAXFFDQAgASgCEEF+Rw0AIAEgAkF+cSICNgIAIAINACABECAgAEEANgIECyAAQQA6AAwL1wICBH8BfgJAAkAgACgCQCABp0EEdGooAgAiA0UEQCACBEAgAkEANgIEIAJBFDYCAAsMAQsgACgCACADKQNIIgdBABAUIQMgACgCACEAIANBf0wEQCACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAQtCACEBIwBBEGsiBi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UEgaiEBIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAEgAikAADcAACABIAIpABg3ABggASACKQAQNwAQIAEgAikACDcACCABIAIpADg3ADggASACKQAwNwAwIAEgAikAKDcAKCABIAIpACA3ACAgASACKQBYNwBYIAEgAikAUDcAUCABIAIpAEg3AEggASACKQBANwBAIAEgAikAYDcAYCABIAIpAGg3AGggASACKQBwNwBwIAEgAikAeDcAeCACQYABaiECIAFBgAFqIQEgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAEgAikAADcAACABIAIpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCABIAIpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCABIAIoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCABIAIvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCABIAItAAA6AAAgAkEBaiECIAFBAWohAQsgHEIAUg0ACwsgDiEGIAwhAwsgBSAGSwRAAkACQCABIANNIAEgDyABa6wiGiAGrSIbIBogG1QbIhqnIglqIgIgA0txDQAgAyAJaiABSyABIANPcQ0AIAEgAyAJEAcaDAELIAEgAyADIAFrIgEgAUEfdSIBaiABcyIBEAcgAWohAiAaIAGtIh59IhxQDQAgASADaiEBA0ACQCAcIB4gHCAeVBsiG0IgVARAIBshGgwBCyAbIhpCIH0iIEIFiEIBfEIDgyIfUEUEQANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCAaQiB9IRogAUEgaiEBIAJBIGohAiAfQgF9Ih9CAFINAAsLICBC4ABUDQADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggAiABKQA4NwA4IAIgASkAMDcAMCACIAEpACg3ACggAiABKQAgNwAgIAIgASkAWDcAWCACIAEpAFA3AFAgAiABKQBINwBIIAIgASkAQDcAQCACIAEpAGA3AGAgAiABKQBoNwBoIAIgASkAcDcAcCACIAEpAHg3AHggAUGAAWohASACQYABaiECIBpCgAF9IhpCH1YNAAsLIBpCEFoEQCACIAEpAAA3AAAgAiABKQAINwAIIBpCEH0hGiACQRBqIQIgAUEQaiEBCyAaQghaBEAgAiABKQAANwAAIBpCCH0hGiACQQhqIQIgAUEIaiEBCyAaQgRaBEAgAiABKAAANgAAIBpCBH0hGiACQQRqIQIgAUEEaiEBCyAaQgJaBEAgAiABLwAAOwAAIBpCAn0hGiACQQJqIQIgAUECaiEBCyAcIBt9IRwgGlBFBEAgAiABLQAAOgAAIAJBAWohAiABQQFqIQELIBxCAFINAAsLIAUgBmshAUEAIARrIQUCQCAEQQdLBEAgBCEDDAELIAEgBE0EQCAEIQMMAQsgAiAEayEFA0ACQCACIAUpAAA3AAAgBEEBdCEDIAEgBGshASACIARqIQIgBEEDSw0AIAMhBCABIANLDQELC0EAIANrIQULIAIgBWohBAJAIAUgDyACa6wiGiABrSIbIBogG1QbIhqnIgFIIAVBf0pxDQAgBUEBSCABIARqIAJLcQ0AIAIgBCABEAcgAWohAgwDCyACIAQgAyADQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANAiABIARqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAILAkAgASADTSABIA8gAWusIhogBa0iGyAaIBtUGyIapyIEaiICIANLcQ0AIAMgBGogAUsgASADT3ENACABIAMgBBAHGgwCCyABIAMgAyABayIBIAFBH3UiAWogAXMiARAHIAFqIQIgGiABrSIefSIcUA0BIAEgA2ohAQNAAkAgHCAeIBwgHlQbIhtCIFQEQCAbIRoMAQsgGyIaQiB9IiBCBYhCAXxCA4MiH1BFBEADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggGkIgfSEaIAFBIGohASACQSBqIQIgH0IBfSIfQgBSDQALCyAgQuAAVA0AA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIAIgASkAODcAOCACIAEpADA3ADAgAiABKQAoNwAoIAIgASkAIDcAICACIAEpAFg3AFggAiABKQBQNwBQIAIgASkASDcASCACIAEpAEA3AEAgAiABKQBgNwBgIAIgASkAaDcAaCACIAEpAHA3AHAgAiABKQB4NwB4IAFBgAFqIQEgAkGAAWohAiAaQoABfSIaQh9WDQALCyAaQhBaBEAgAiABKQAANwAAIAIgASkACDcACCAaQhB9IRogAkEQaiECIAFBEGohAQsgGkIIWgRAIAIgASkAADcAACAaQgh9IRogAkEIaiECIAFBCGohAQsgGkIEWgRAIAIgASgAADYAACAaQgR9IRogAkEEaiECIAFBBGohAQsgGkICWgRAIAIgAS8AADsAACAaQgJ9IRogAkECaiECIAFBAmohAQsgHCAbfSEcIBpQRQRAIAIgAS0AADoAACACQQFqIQIgAUEBaiEBCyAcUEUNAAsMAQsCQAJAIBYEQAJAIAQgBUkEQCAHKAKYRyAESw0BCyABIARrIQMCQEEAIARrIgVBf0ogDyABa6wiGiAbIBogG1QbIhqnIgIgBUpxDQAgBUEBSCACIANqIAFLcQ0AIAEgAyACEAcgAmohAgwFCyABIAMgBCAEQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANBCABIANqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAQLIBAgAWsiCUEBaiIGIAUgBSAGSxshAyABIARrIQIgAUEHcUUNAiADRQ0CIAEgAi0AADoAACACQQFqIQIgAUEBaiIGQQdxQQAgA0EBayIFGw0BIAYhASAFIQMgCSEGDAILAkAgBCAFSQRAIAcoAphHIARLDQELIAEgASAEayIGKQAANwAAIAEgBUEBa0EHc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qQQAgBCABEQYAIQEgBhALIAFFDQILAkAgDUUEQCABIQMMAQsgACABIAUvAWgQgQEhAyABEAsgA0UNAQsCQCAJRSAMckUEQCADIQEMAQsgACADQQEQgAEhASADEAsgAUUNAQsgASEDDAELQQAhAwsgBUHwAGokACADC4UBAQF/IAFFBEAgAEEIaiIABEAgAEEANgIEIABBEjYCAAtBAA8LQTgQCSIDRQRAIABBCGoiAARAIABBADYCBCAAQQ42AgALQQAPCyADQQA2AhAgA0IANwIIIANCADcDKCADQQA2AgQgAyACNgIAIANCADcDGCADQQA2AjAgACABQTsgAxBCCw8AIAAgASACQQBBABCCAQusAgECfyABRQRAIABBCGoiAARAIABBADYCBCAAQRI2AgALQQAPCwJAIAJBfUsNACACQf//A3FBCEYNACAAQQhqIgAEQCAAQQA2AgQgAEEQNgIAC0EADwsCQEGwwAAQCSIFBEAgBUEANgIIIAVCADcCACAFQYiBAUGogQEgAxs2AqhAIAUgAjYCFCAFIAM6ABAgBUEAOgAPIAVBADsBDCAFIAMgAkF9SyIGcToADiAFQQggAiAGG0H//wNxIAQgBUGIgQFBqIEBIAMbKAIAEQAAIgI2AqxAIAINASAFEDEgBRAGCyAAQQhqIgAEQCAAQQA2AgQgAEEONgIAC0EADwsgACABQTogBRBCIgAEfyAABSAFKAKsQCAFKAKoQCgCBBEDACAFEDEgBRAGQQALC6ABAQF/IAIgACgCBCIDIAIgA0kbIgIEQCAAIAMgAms2AgQCQAJAAkACQCAAKAIcIgMoAhRBAWsOAgEAAgsgA0GgAWogASAAKAIAIAJB3IABKAIAEQgADAILIAAgACgCMCABIAAoAgAgAkHEgAEoAgARBAA2AjAMAQsgASAAKAIAIAIQBxoLIAAgACgCACACajYCACAAIAAoAgggAmo2AggLC7cCAQR/QX4hAgJAIABFDQAgACgCIEUNACAAKAIkIgRFDQAgACgCHCIBRQ0AIAEoAgAgAEcNAAJAAkAgASgCICIDQTlrDjkBAgICAgICAgICAgIBAgICAQICAgICAgICAgICAgICAgICAQICAgICAgIC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BUsbNgKELiAAKAIAIQQLIAAoAkggBWogBCgCACACayACEAcaIAAgACgCaCACaiIDNgJoIAAgACgCMCAAKAKELiIEayIFIAIgAiAFSxsgBGo2AoQuCyAAIAM2AlgLIAAgAyAAKAJAIgIgAiADSRs2AkBBAyECAkAgBkUNACAAKAIAIgUoAgQhAgJAAkAgAUF7cUUNACACDQBBASECIAMgACgCWEYNAiAAKAJEIANrIQRBACECDAELIAIgACgCRCADayIETQ0AIAAoAlgiByAAKAIwIgZIDQAgACADIAZrIgM2AmggACAHIAZrNgJYIAAoAkgiAiACIAZqIAMQBxogACgCgC4iA0EBTQRAIAAgA0EBajYCgC4LIAAgACgCaCIDIAAoAoQuIgIgAiADSxs2AoQuIAAoAjAgBGohBCAAKAIAIgUoAgQhAgsCQCACIAQgAiAESRsiAkUEQCAAKAIwIQUMAQsgBSAAKAJIIANqIAIQgwEgACAAKAJoIAJqIgM2AmggACAAKAIwIgUgACgChC4iBGsiBiACIAIgBksbIARqNgKELgsgACADIAAoAkAiAiACIANJGzYCQCADIAAoAlgiBmsiAyAFIAAoAgwgACgCoC5BKmpBA3VrIgJB//8DIAJB//8DSRsiBCAEIAVLG0kEQEEAIQIgAUEERiADQQBHckUNASABRQ0BIAAoAgAoAgQNASADIARLDQELQQAhAiABQQRGBEAgACgCACgCBEUgAyAETXEhAgsgACAAKAJIIAZqIAQgAyADIARLGyIBIAIQOSAAIAAoAlggAWo2AlggACgCABAKQQJBACACGw8LIAIL/woCCn8DfiAAKQOYLiENIAAoAqAuIQQgAkEATgRAQQRBAyABLwECIggbIQlBB0GKASAIGyEFQX8hCgNAIAghByABIAsiDEEBaiILQQJ0ai8BAiEIAkACQCAGQQFqIgMgBU4NACAHIAhHDQAgAyEGDAELAkAgAyAJSARAIAAgB0ECdGoiBkHOFWohCSAGQcwVaiEKA0AgCjMBACEPAn8gBCAJLwEAIgZqIgVBP00EQCAPIASthiANhCENIAUMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIA03AAAgACA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qIgNBP00EQCALIASthiAMhCELDAELIARBwABGBEAgACgCBCAAKAIQaiAMNwAAIAAgACgCEEEIajYCECAFIQMMAQsgACgCBCAAKAIQaiALIASthiAMhDcAACAAIAAoAhBBCGo2AhAgA0FAaiEDIAtBwAAgBGutiCELCyAAIAs3A5guIAAgAzYCoC4gCSAAKALwLUkNAAsLIAFBgAhqMwEAIQwCQCADIAFBgghqLwEAIgJqIgFBP00EQCAMIAOthiALhCEMDAELIANBwABGBEAgACgCBCAAKAIQaiALNwAAIAAgACgCEEEIajYCECACIQEMAQsgACgCBCAAKAIQaiAMIAOthiALhDcAACAAIAAoAhBBCGo2AhAgAUFAaiEBIAxBwAAgA2utiCEMCyAAIAw3A5guIAAgATYCoC4L8AQBA38gAEHkAWohAgNAIAIgAUECdCIDakEAOwEAIAIgA0EEcmpBADsBACABQQJqIgFBngJHDQALIABBADsBzBUgAEEAOwHYEyAAQZQWakEAOwEAIABBkBZqQQA7AQAgAEGMFmpBADsBACAAQYgWakEAOwEAIABBhBZqQQA7AQAgAEGAFmpBADsBACAAQfwVakEAOwEAIABB+BVqQQA7AQAgAEH0FWpBADsBACAAQfAVakEAOwEAIABB7BVqQQA7AQAgAEHoFWpBADsBACAAQeQVakEAOwEAIABB4BVqQQA7AQAgAEHcFWpBADsBACAAQdgVakEAOwEAIABB1BVqQQA7AQAgAEHQFWpBADsBACAAQcwUakEAOwEAIABByBRqQQA7AQAgAEHEFGpBADsBACAAQcAUakEAOwEAIABBvBRqQQA7AQAgAEG4FGpBADsBACAAQbQUakEAOwEAIABBsBRqQQA7AQAgAEGsFGpBADsBACAAQagUakEAOwEAIABBpBRqQQA7AQAgAEGgFGpBADsBACAAQZwUakEAOwEAIABBmBRqQQA7AQAgAEGUFGpBADsBACAAQZAUakEAOwEAIABBjBRqQQA7AQAgAEGIFGpBADsBACAAQYQUakEAOwEAIABBgBRqQQA7AQAgAEH8E2pBADsBACAAQfgTakEAOwEAIABB9BNqQQA7AQAgAEHwE2pBADsBAC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Y6/wtoU7IERsmvKbSBLiaaGzA39HJ9ONroYFAQAAJ0HAAAsCQAAhgUAAEgFAACnBQAAAAQAADIFAAC8BQAALAkAQYDBAAv3CQwACACMAAgATAAIAMwACAAsAAgArAAIAGwACADsAAgAHAAIAJwACABcAAgA3AAIADwACAC8AAgAfAAIAPwACAACAAgAggAIAEIACADCAAgAIgAIAKIACABiAAgA4gAIABIACACSAAgAUgAIANIACAAyAAgAsgAIAHIACADyAAgACgAIAIoACABKAAgAygAIACoACACqAAgAagAIAOoACAAaAAgAmgAIAFoACADaAAgAOgAIALoACAB6AAgA+gAIAAYACACGAAgARgAIAMYACAAmAAgApgAIAGYACADmAAgAFgAIAJYACABWAAgA1gAIADYACAC2AAgAdgAIAPYACAAOAAgAjgAIAE4ACADOAAgALgAIAK4ACABuAAgA7gAIAB4ACACeAAgAXgAIAN4ACAA+AAgAvgAIAH4ACAD+AAgAAQAIAIEACABBAAgAwQAIACEACAChAAgAYQAIAOEACAARAAgAkQAIAFEACADRAAgAMQAIALEACABxAAgA8QAIAAkACACJAAgASQAIAMkACAApAAgAqQAIAGkACADpAAgAGQAIAJkACABZAAgA2QAIADkACAC5AAgAeQAIAPkACAAFAAgAhQAIAEUACADFAAgAJQAIAKUACABlAAgA5QAIABUACACVAAgAVQAIANUACAA1AAgAtQAIAHUACAD1AAgADQAIAI0ACABNAAgAzQAIAC0ACACtAAgAbQAIAO0ACAAdAAgAnQAIAF0ACADdAAgAPQAIAL0ACAB9AAgA/QAIABMACQATAQkAkwAJAJMBCQBTAAkAUwEJANMACQDTAQkAMwAJADMBCQCzAAkAswEJAHMACQBzAQkA8wAJAPMBCQALAAkACwEJAIsACQCLAQkASwAJAEsBCQDLAAkAywEJACsACQArAQkAqwAJAKsBCQBrAAkAawEJAOsACQDrAQkAGwAJABsBCQCbAAkAmwEJAFsACQBbAQkA2wAJANsBCQA7AAkAOwEJALsACQC7AQkAewAJAHsBCQD7AAkA+wEJAAcACQAHAQkAhwAJAIcBCQBHAA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0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AQcCAAQuFARMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAgERQADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAQfSCAQsCXEQAQbCDAQsQ/////////////////////w==";io(Si)||(Si=b(Si));function Ms(We){try{if(We==Si&&de)return new Uint8Array(de);var tt=ni(We);if(tt)return tt;if(R)return R(We);throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(It){Ti(It)}}function so(We,tt){var It,rr,$;try{$=Ms(We),rr=new WebAssembly.Module($),It=new WebAssembly.Instance(rr,tt)}catch(Oe){var me=Oe.toString();throw ee("failed to compile wasm module: "+me),(me.includes("imported Memory")||me.includes("memory import"))&&ee("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),Oe}return[It,rr]}function cc(){var We={a:Ma};function tt($,me){var Oe=$.exports;r.asm=Oe,Be=r.asm.g,z(Be.buffer),Z=r.asm.W,on(r.asm.h),Os("wasm-instantiate")}if(Wn("wasm-instantiate"),r.instantiateWasm)try{var It=r.instantiateWasm(We,tt);return It}catch($){return ee("Module.instantiateWasm callback failed with error: "+$),!1}var rr=so(Si,We);return tt(rr[0]),r.asm}function Au(We){return F.getFloat32(We,!0)}function op(We){return F.getFloat64(We,!0)}function ap(We){return F.getInt16(We,!0)}function Us(We){return F.getInt32(We,!0)}function vn(We,tt){F.setInt32(We,tt,!0)}function oo(We){for(;We.length>0;){var tt=We.shift();if(typeof tt=="function"){tt(r);continue}var It=tt.func;typeof It=="number"?tt.arg===void 0?Z.get(It)():Z.get(It)(tt.arg):It(tt.arg===void 0?null:tt.arg)}}function _s(We,tt){var It=new Date(Us((We>>2)*4)*1e3);vn((tt>>2)*4,It.getUTCSeconds()),vn((tt+4>>2)*4,It.getUTCMinutes()),vn((tt+8>>2)*4,It.getUTCHours()),vn((tt+12>>2)*4,It.getUTCDate()),vn((tt+16>>2)*4,It.getUTCMonth()),vn((tt+20>>2)*4,It.getUTCFullYear()-1900),vn((tt+24>>2)*4,It.getUTCDay()),vn((tt+36>>2)*4,0),vn((tt+32>>2)*4,0);var rr=Date.UTC(It.getUTCFullYear(),0,1,0,0,0,0),$=(It.getTime()-rr)/(1e3*60*60*24)|0;return vn((tt+28>>2)*4,$),_s.GMTString||(_s.GMTString=at("GMT")),vn((tt+40>>2)*4,_s.GMTString),tt}function dl(We,tt){return _s(We,tt)}function ml(We,tt,It){Ne.copyWithin(We,tt,tt+It)}function ao(We){try{return Be.grow(We-ke.byteLength+65535>>>16),z(Be.buffer),1}catch{}}function Kn(We){var tt=Ne.length;We=We>>>0;var It=2147483648;if(We>It)return!1;for(var rr=1;rr<=4;rr*=2){var $=tt*(1+.2/rr);$=Math.min($,We+100663296);var me=Math.min(It,Qe(Math.max(We,$),65536)),Oe=ao(me);if(Oe)return!0}return!1}function Ln(We){fe(We)}function Ni(We){var tt=Date.now()/1e3|0;return We&&vn((We>>2)*4,tt),tt}function On(){if(On.called)return;On.called=!0;var We=new Date().getFullYear(),tt=new Date(We,0,1),It=new Date(We,6,1),rr=tt.getTimezoneOffset(),$=It.getTimezoneOffset(),me=Math.max(rr,$);vn((ms()>>2)*4,me*60),vn((ds()>>2)*4,Number(rr!=$));function Oe(Xr){var Gi=Xr.toTimeString().match(/\(([A-Za-z ]+)\)$/);return Gi?Gi[1]:"GMT"}var ft=Oe(tt),pt=Oe(It),Tt=at(ft),er=at(pt);$<rr?(vn((wi()>>2)*4,Tt),vn((wi()+4>>2)*4,er)):(vn((wi()>>2)*4,er),vn((wi()+4>>2)*4,Tt))}function Hi(We){On();var tt=Date.UTC(Us((We+20>>2)*4)+1900,Us((We+16>>2)*4),Us((We+12>>2)*4),Us((We+8>>2)*4),Us((We+4>>2)*4),Us((We>>2)*4),0),It=new Date(tt);vn((We+24>>2)*4,It.getUTCDay());var rr=Date.UTC(It.getUTCFullYear(),0,1,0,0,0,0),$=(It.getTime()-rr)/(1e3*60*60*24)|0;return vn((We+28>>2)*4,$),It.getTime()/1e3|0}var ve=typeof atob=="function"?atob:function(We){var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",It="",rr,$,me,Oe,ft,pt,Tt,er=0;We=We.replace(/[^A-Za-z0-9\+\/\=]/g,"");do Oe=tt.indexOf(We.charAt(er++)),ft=tt.indexOf(We.charAt(er++)),pt=tt.indexOf(We.charAt(er++)),Tt=tt.indexOf(We.charAt(er++)),rr=Oe<<2|ft>>4,$=(ft&15)<<4|pt>>2,me=(pt&3)<<6|Tt,It=It+String.fromCharCode(rr),pt!==64&&(It=It+String.fromCharCode($)),Tt!==64&&(It=It+String.fromCharCode(me));while(er<We.length);return It};function Li(We){if(typeof I=="boolean"&&I){var tt;try{tt=Buffer.from(We,"base64")}catch{tt=new Buffer(We,"base64")}return new Uint8Array(tt.buffer,tt.byteOffset,tt.byteLength)}try{for(var It=ve(We),rr=new Uint8Array(It.length),$=0;$<It.length;++$)rr[$]=It.charCodeAt($);return rr}catch{throw new Error("Converting base64 string to bytes failed.")}}function ni(We){if(!!io(We))return Li(We.slice(hs.length))}var Ma={e:dl,c:ml,d:Kn,a:Ln,b:Ni,f:Hi},pr=cc(),uc=r.___wasm_call_ctors=pr.h,fu=r._zip_ext_count_symlinks=pr.i,Ac=r._zip_file_get_external_attributes=pr.j,yl=r._zipstruct_statS=pr.k,DA=r._zipstruct_stat_size=pr.l,pu=r._zipstruct_stat_mtime=pr.m,Ce=r._zipstruct_stat_crc=pr.n,Rt=r._zipstruct_errorS=pr.o,fc=r._zipstruct_error_code_zip=pr.p,ji=r._zipstruct_stat_comp_size=pr.q,hu=r._zipstruct_stat_comp_method=pr.r,Yt=r._zip_close=pr.s,El=r._zip_delete=pr.t,SA=r._zip_dir_add=pr.u,lp=r._zip_discard=pr.v,pc=r._zip_error_init_with_code=pr.w,PA=r._zip_get_error=pr.x,Qn=r._zip_file_get_error=pr.y,pi=r._zip_error_strerror=pr.z,hc=r._zip_fclose=pr.A,xA=r._zip_file_add=pr.B,oa=r._free=pr.C,Oi=r._malloc=pr.D,_o=r._zip_source_error=pr.E,Ze=r._zip_source_seek=pr.F,lo=r._zip_file_set_external_attributes=pr.G,gc=r._zip_file_set_mtime=pr.H,gu=r._zip_fopen_index=pr.I,qi=r._zip_fread=pr.J,du=r._zip_get_name=pr.K,bA=r._zip_get_num_entries=pr.L,Ua=r._zip_source_read=pr.M,dc=r._zip_name_locate=pr.N,gs=r._zip_open_from_source=pr.O,Ut=r._zip_set_file_compression=pr.P,kn=r._zip_source_buffer=pr.Q,Ei=r._zip_source_buffer_create=pr.R,aa=r._zip_source_close=pr.S,co=r._zip_source_free=pr.T,Hs=r._zip_source_keep=pr.U,la=r._zip_source_open=pr.V,ca=r._zip_source_tell=pr.X,Ho=r._zip_stat_index=pr.Y,wi=r.__get_tzname=pr.Z,ds=r.__get_daylight=pr._,ms=r.__get_timezone=pr.$,ys=r.stackSave=pr.aa,js=r.stackRestore=pr.ba,Mn=r.stackAlloc=pr.ca;r.cwrap=ne,r.getValue=oe;var Dn;Yr=function We(){Dn||Es(),Dn||(Yr=We)};function Es(We){if(We=We||A,dr>0||(gt(),dr>0))return;function tt(){Dn||(Dn=!0,r.calledRun=!0,!be&&(jt(),o(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),$t()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),tt()},1)):tt()}if(r.run=Es,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Es(),t}}();typeof bx=="object"&&typeof tU=="object"?tU.exports=eU:typeof define=="function"&&define.amd?define([],function(){return eU}):typeof bx=="object"&&(bx.createModule=eU)});var Lf,Qle,kle,Fle=yt(()=>{Lf=["number","number"],Qle=(te=>(te[te.ZIP_ER_OK=0]="ZIP_ER_OK",te[te.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",te[te.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",te[te.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",te[te.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",te[te.ZIP_ER_READ=5]="ZIP_ER_READ",te[te.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",te[te.ZIP_ER_CRC=7]="ZIP_ER_CRC",te[te.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",te[te.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",te[te.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",te[te.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",te[te.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",te[te.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",te[te.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",te[te.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",te[te.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",te[te.ZIP_ER_EOF=17]="ZIP_ER_EOF",te[te.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",te[te.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",te[te.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",te[te.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",te[te.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",te[te.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",te[te.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",te[te.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",te[te.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",te[te.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",te[te.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",te[te.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",te[te.ZIP_ER_TELL=30]="ZIP_ER_TELL",te[te.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA",te))(Qle||{}),kle=e=>({get HEAPU8(){return e.HEAPU8},errors:Qle,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_EXCL:2,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:e._malloc(1),uint32S:e._malloc(4),malloc:e._malloc,free:e._free,getValue:e.getValue,openFromSource:e.cwrap("zip_open_from_source","number",["number","number","number"]),close:e.cwrap("zip_close","number",["number"]),discard:e.cwrap("zip_discard",null,["number"]),getError:e.cwrap("zip_get_error","number",["number"]),getName:e.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:e.cwrap("zip_get_num_entries","number",["number","number"]),delete:e.cwrap("zip_delete","number",["number","number"]),statIndex:e.cwrap("zip_stat_index","number",["number",...Lf,"number","number"]),fopenIndex:e.cwrap("zip_fopen_index","number",["number",...Lf,"number"]),fread:e.cwrap("zip_fread","number",["number","number","number","number"]),fclose:e.cwrap("zip_fclose","number",["number"]),dir:{add:e.cwrap("zip_dir_add","number",["number","string"])},file:{add:e.cwrap("zip_file_add","number",["number","string","number","number"]),getError:e.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:e.cwrap("zip_file_get_external_attributes","number",["number",...Lf,"number","number","number"]),setExternalAttributes:e.cwrap("zip_file_set_external_attributes","number",["number",...Lf,"number","number","number"]),setMtime:e.cwrap("zip_file_set_mtime","number",["number",...Lf,"number","number"]),setCompression:e.cwrap("zip_set_file_compression","number",["number",...Lf,"number","number"])},ext:{countSymlinks:e.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:e.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:e.cwrap("zip_error_strerror","string",["number"])},name:{locate:e.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:e.cwrap("zip_source_buffer_create","number",["number",...Lf,"number","number"]),fromBuffer:e.cwrap("zip_source_buffer","number",["number","number",...Lf,"number"]),free:e.cwrap("zip_source_free",null,["number"]),keep:e.cwrap("zip_source_keep",null,["number"]),open:e.cwrap("zip_source_open","number",["number"]),close:e.cwrap("zip_source_close","number",["number"]),seek:e.cwrap("zip_source_seek","number",["number",...Lf,"number"]),tell:e.cwrap("zip_source_tell","number",["number"]),read:e.cwrap("zip_source_read","number",["number","number","number"]),error:e.cwrap("zip_source_error","number",["number"])},struct:{statS:e.cwrap("zipstruct_statS","number",[]),statSize:e.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:e.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:e.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:e.cwrap("zipstruct_stat_mtime","number",["number"]),statCrc:e.cwrap("zipstruct_stat_crc","number",["number"]),errorS:e.cwrap("zipstruct_errorS","number",[]),errorCodeZip:e.cwrap("zipstruct_error_code_zip","number",["number"])}})});function rU(e,t){let r=e.indexOf(t);if(r<=0)return null;let o=r;for(;r>=0&&(o=r+t.length,e[o]!==J.sep);){if(e[r-1]===J.sep)return null;r=e.indexOf(t,o)}return e.length>o&&e[o]!==J.sep?null:e.slice(0,o)}var Vl,Rle=yt(()=>{St();St();iA();Vl=class extends Up{static async openPromise(t,r){let o=new Vl(r);try{return await t(o)}finally{o.saveAndClose()}}constructor(t={}){let r=t.fileExtensions,o=t.readOnlyArchives,a=typeof r>"u"?A=>rU(A,".zip"):A=>{for(let p of r){let h=rU(A,p);if(h)return h}return null},n=(A,p)=>new us(p,{baseFs:A,readOnly:o,stats:A.statSync(p)}),u=async(A,p)=>{let h={baseFs:A,readOnly:o,stats:await A.statPromise(p)};return()=>new us(p,h)};super({...t,factorySync:n,factoryPromise:u,getMountPoint:a})}}});function Wst(e){if(typeof e=="string"&&String(+e)===e)return+e;if(typeof e=="number"&&Number.isFinite(e))return e<0?Date.now()/1e3:e;if(Tle.types.isDate(e))return e.getTime()/1e3;throw new Error("Invalid time")}function Qx(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var ta,nU,Tle,iU,Nle,kx,us,sU=yt(()=>{St();St();St();St();St();St();ta=Ie("fs"),nU=Ie("stream"),Tle=Ie("util"),iU=$e(Ie("zlib"));$4();Nle="mixed";kx=class extends Error{constructor(r,o){super(r);this.name="Libzip Error",this.code=o}},us=class extends _u{constructor(r,o={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;let a=o;if(this.level=typeof a.level<"u"?a.level:Nle,r??=Qx(),typeof r=="string"){let{baseFs:A=new Rn}=a;this.baseFs=A,this.path=r}else this.path=null,this.baseFs=null;if(o.stats)this.stats=o.stats;else if(typeof r=="string")try{this.stats=this.baseFs.statSync(r)}catch(A){if(A.code==="ENOENT"&&a.create)this.stats=Tl.makeDefaultStats();else throw A}else this.stats=Tl.makeDefaultStats();this.libzip=S1();let n=this.libzip.malloc(4);try{let A=0;o.readOnly&&(A|=this.libzip.ZIP_RDONLY,this.readOnly=!0),typeof r=="string"&&(r=a.create?Qx():this.baseFs.readFileSync(r));let p=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(p,A,n),this.lzSource=p}catch(h){throw this.libzip.source.free(p),h}if(this.zip===0){let h=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(h,this.libzip.getValue(n,"i32")),this.makeLibzipError(h)}}finally{this.libzip.free(n)}this.listings.set(Bt.root,new Set);let u=this.libzip.getNumEntries(this.zip,0);for(let A=0;A<u;++A){let p=this.libzip.getName(this.zip,A,0);if(J.isAbsolute(p))continue;let h=J.resolve(Bt.root,p);this.registerEntry(h,A),p.endsWith("/")&&this.registerListing(h)}if(this.symlinkCount=this.libzip.ext.countSymlinks(this.zip),this.symlinkCount===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.ready=!0}makeLibzipError(r){let o=this.libzip.struct.errorCodeZip(r),a=this.libzip.error.strerror(r),n=new kx(a,this.libzip.errors[o]);if(o===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${n.message}`);return n}getExtractHint(r){for(let o of this.entries.keys()){let a=this.pathUtils.extname(o);if(r.relevantExtensions.has(a))return!0}return!1}getAllFiles(){return Array.from(this.entries.keys())}getRealPath(){if(!this.path)throw new Error("ZipFS don't have real paths when loaded from a buffer");return this.path}prepareClose(){if(!this.ready)throw or.EBUSY("archive closed, close");Og(this)}getBufferAndClose(){if(this.prepareClose(),this.entries.size===0)return this.discardAndClose(),Qx();try{if(this.libzip.source.keep(this.lzSource),this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let r=this.libzip.source.tell(this.lzSource);if(r===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let o=this.libzip.malloc(r);if(!o)throw new Error("Couldn't allocate enough memory");try{let a=this.libzip.source.read(this.lzSource,o,r);if(a===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(a<r)throw new Error("Incomplete read");if(a>r)throw new Error("Overread");let n=this.libzip.HEAPU8.subarray(o,o+r);return Buffer.from(n)}finally{this.libzip.free(o)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.readOnly){this.discardAndClose();return}let r=this.baseFs.existsSync(this.path)||this.stats.mode===Tl.DEFAULT_MODE?void 0:this.stats.mode;this.baseFs.writeFileSync(this.path,this.getBufferAndClose(),{mode:r}),this.ready=!1}resolve(r){return J.resolve(Bt.root,r)}async openPromise(r,o,a){return this.openSync(r,o,a)}openSync(r,o,a){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:r}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(r,o){return this.opendirSync(r,o)}opendirSync(r,o={}){let a=this.resolveFilename(`opendir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`opendir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`opendir '${r}'`);let u=[...n],A=this.openSync(a,"r");return SD(this,a,u,{onClose:()=>{this.closeSync(A)}})}async readPromise(r,o,a,n,u){return this.readSync(r,o,a,n,u)}readSync(r,o,a=0,n=o.byteLength,u=-1){let A=this.fds.get(r);if(typeof A>"u")throw or.EBADF("read");let p=u===-1||u===null?A.cursor:u,h=this.readFileSync(A.p);h.copy(o,a,p,p+n);let w=Math.max(0,Math.min(h.length-p,n));return(u===-1||u===null)&&(A.cursor+=w),w}async writePromise(r,o,a,n,u){return typeof o=="string"?this.writeSync(r,o,u):this.writeSync(r,o,a,n,u)}writeSync(r,o,a,n,u){throw typeof this.fds.get(r)>"u"?or.EBADF("read"):new Error("Unimplemented")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>"u")throw or.EBADF("read");this.fds.delete(r)}createReadStream(r,{encoding:o}={}){if(r===null)throw new Error("Unimplemented");let a=this.openSync(r,"r"),n=Object.assign(new nU.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(A,p)=>{clearImmediate(u),this.closeSync(a),p(A)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),u=setImmediate(async()=>{try{let A=await this.readFilePromise(r,o);n.bytesRead=A.length,n.end(A)}catch(A){n.destroy(A)}});return n}createWriteStream(r,{encoding:o}={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);if(r===null)throw new Error("Unimplemented");let a=[],n=this.openSync(r,"w"),u=Object.assign(new nU.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(A,p)=>{try{A?p(A):(this.writeFileSync(r,Buffer.concat(a),o),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){u.destroy()},bytesWritten:0,path:r,pending:!1});return u.on("data",A=>{let p=Buffer.from(A);u.bytesWritten+=p.length,a.push(p)}),u}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let o=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(o)&&!this.listings.has(o))throw or.ENOENT(`lstat '${r}'`);return o}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw or.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=J.resolve(Bt.root,r);return this.entries.has(a)||this.listings.has(a)}let o;try{o=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return o===void 0?!1:this.entries.has(o)||this.listings.has(o)}async accessPromise(r,o){return this.accessSync(r,o)}accessSync(r,o=ta.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`access '${r}'`);if(this.readOnly&&o&ta.constants.W_OK)throw or.EROFS(`access '${r}'`)}async statPromise(r,o={bigint:!1}){return o.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,o={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,o.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(o.throwIfNoEntry===!1)return;throw or.ENOENT(`stat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,o)}}async fstatPromise(r,o){return this.fstatSync(r,o)}fstatSync(r,o){let a=this.fds.get(r);if(typeof a>"u")throw or.EBADF("fstatSync");let{p:n}=a,u=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(u)&&!this.listings.has(u))throw or.ENOENT(`stat '${n}'`);if(n[n.length-1]==="/"&&!this.listings.has(u))throw or.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,u,o)}async lstatPromise(r,o={bigint:!1}){return o.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,o={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,o.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(o.throwIfNoEntry===!1)return;throw or.ENOENT(`lstat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,o)}}statImpl(r,o,a={}){let n=this.entries.get(o);if(typeof n<"u"){let u=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,n,0,0,u)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let p=this.stats.uid,h=this.stats.gid,w=this.libzip.struct.statSize(u)>>>0,I=512,v=Math.ceil(w/I),b=(this.libzip.struct.statMtime(u)>>>0)*1e3,E=b,R=b,N=b,U=new Date(E),V=new Date(R),ee=new Date(N),le=new Date(b),fe=this.listings.has(o)?ta.constants.S_IFDIR:this.isSymbolicLink(n)?ta.constants.S_IFLNK:ta.constants.S_IFREG,de=fe===ta.constants.S_IFDIR?493:420,ge=fe|this.getUnixMode(n,de)&511,oe=this.libzip.struct.statCrc(u),Be=Object.assign(new Tl.StatEntry,{uid:p,gid:h,size:w,blksize:I,blocks:v,atime:U,birthtime:V,ctime:ee,mtime:le,atimeMs:E,birthtimeMs:R,ctimeMs:N,mtimeMs:b,mode:ge,crc:oe});return a.bigint===!0?Tl.convertToBigIntStats(Be):Be}if(this.listings.has(o)){let u=this.stats.uid,A=this.stats.gid,p=0,h=512,w=0,I=this.stats.mtimeMs,v=this.stats.mtimeMs,b=this.stats.mtimeMs,E=this.stats.mtimeMs,R=new Date(I),N=new Date(v),U=new Date(b),V=new Date(E),ee=ta.constants.S_IFDIR|493,le=0,fe=Object.assign(new Tl.StatEntry,{uid:u,gid:A,size:p,blksize:h,blocks:w,atime:R,birthtime:N,ctime:U,mtime:V,atimeMs:I,birthtimeMs:v,ctimeMs:b,mtimeMs:E,mode:ee,crc:le});return a.bigint===!0?Tl.convertToBigIntStats(fe):fe}throw new Error("Unreachable")}getUnixMode(r,o){if(this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?o:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(r){let o=this.listings.get(r);if(o)return o;this.registerListing(J.dirname(r)).add(J.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,o){this.registerListing(J.dirname(r)).add(J.basename(r)),this.entries.set(r,o)}unregisterListing(r){this.listings.delete(r),this.listings.get(J.dirname(r))?.delete(J.basename(r))}unregisterEntry(r){this.unregisterListing(r);let o=this.entries.get(r);this.entries.delete(r),!(typeof o>"u")&&(this.fileSources.delete(o),this.isSymbolicLink(o)&&this.symlinkCount--)}deleteEntry(r,o){if(this.unregisterEntry(r),this.libzip.delete(this.zip,o)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(r,o,a=!0,n=!0){if(!this.ready)throw or.EBUSY(`archive closed, ${r}`);let u=J.resolve(Bt.root,o);if(u==="/")return Bt.root;let A=this.entries.get(u);if(a&&A!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(A)){let p=this.getFileSource(A).toString();return this.resolveFilename(r,J.resolve(J.dirname(u),p),!0,n)}else return u;for(;;){let p=this.resolveFilename(r,J.dirname(u),!0,n);if(p===void 0)return p;let h=this.listings.has(p),w=this.entries.has(p);if(!h&&!w){if(n===!1)return;throw or.ENOENT(r)}if(!h)throw or.ENOTDIR(r);if(u=J.resolve(p,J.basename(u)),!a||this.symlinkCount===0)break;let I=this.libzip.name.locate(this.zip,u.slice(1),0);if(I===-1)break;if(this.isSymbolicLink(I)){let v=this.getFileSource(I).toString();u=J.resolve(J.dirname(u),v)}else break}return u}allocateBuffer(r){Buffer.isBuffer(r)||(r=Buffer.from(r));let o=this.libzip.malloc(r.byteLength);if(!o)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,o,r.byteLength).set(r),{buffer:o,byteLength:r.byteLength}}allocateUnattachedSource(r){let o=this.libzip.struct.errorS(),{buffer:a,byteLength:n}=this.allocateBuffer(r),u=this.libzip.source.fromUnattachedBuffer(a,n,0,1,o);if(u===0)throw this.libzip.free(o),this.makeLibzipError(o);return u}allocateSource(r){let{buffer:o,byteLength:a}=this.allocateBuffer(r),n=this.libzip.source.fromBuffer(this.zip,o,a,0,1);if(n===0)throw this.libzip.free(o),this.makeLibzipError(this.libzip.getError(this.zip));return n}setFileSource(r,o){let a=Buffer.isBuffer(o)?o:Buffer.from(o),n=J.relative(Bt.root,r),u=this.allocateSource(o);try{let A=this.libzip.file.add(this.zip,n,u,this.libzip.ZIP_FL_OVERWRITE);if(A===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.level!=="mixed"){let p=this.level===0?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(this.libzip.file.setCompression(this.zip,A,0,p,this.level)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(A,a),A}catch(A){throw this.libzip.source.free(u),A}}isSymbolicLink(r){if(this.symlinkCount===0)return!1;if(this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?!1:(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&ta.constants.S_IFMT)===ta.constants.S_IFLNK}getFileSource(r,o={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<"u")return a;let n=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,r,0,0,n)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let A=this.libzip.struct.statCompSize(n),p=this.libzip.struct.statCompMethod(n),h=this.libzip.malloc(A);try{let w=this.libzip.fopenIndex(this.zip,r,0,this.libzip.ZIP_FL_COMPRESSED);if(w===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let I=this.libzip.fread(w,h,A,0);if(I===-1)throw this.makeLibzipError(this.libzip.file.getError(w));if(I<A)throw new Error("Incomplete read");if(I>A)throw new Error("Overread");let v=this.libzip.HEAPU8.subarray(h,h+A),b=Buffer.from(v);if(p===0)return this.fileSources.set(r,b),b;if(o.asyncDecompress)return new Promise((E,R)=>{iU.default.inflateRaw(b,(N,U)=>{N?R(N):(this.fileSources.set(r,U),E(U))})});{let E=iU.default.inflateRawSync(b);return this.fileSources.set(r,E),E}}finally{this.libzip.fclose(w)}}finally{this.libzip.free(h)}}async fchmodPromise(r,o){return this.chmodPromise(this.fdToPath(r,"fchmod"),o)}fchmodSync(r,o){return this.chmodSync(this.fdToPath(r,"fchmodSync"),o)}async chmodPromise(r,o){return this.chmodSync(r,o)}chmodSync(r,o){if(this.readOnly)throw or.EROFS(`chmod '${r}'`);o&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>"u")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let A=this.getUnixMode(n,ta.constants.S_IFREG|0)&-512|o;if(this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,A<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async fchownPromise(r,o,a){return this.chownPromise(this.fdToPath(r,"fchown"),o,a)}fchownSync(r,o,a){return this.chownSync(this.fdToPath(r,"fchownSync"),o,a)}async chownPromise(r,o,a){return this.chownSync(r,o,a)}chownSync(r,o,a){throw new Error("Unimplemented")}async renamePromise(r,o){return this.renameSync(r,o)}renameSync(r,o){throw new Error("Unimplemented")}async copyFilePromise(r,o,a){let{indexSource:n,indexDest:u,resolvedDestP:A}=this.prepareCopyFile(r,o,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(A,p);h!==u&&this.registerEntry(A,h)}copyFileSync(r,o,a=0){let{indexSource:n,indexDest:u,resolvedDestP:A}=this.prepareCopyFile(r,o,a),p=this.getFileSource(n),h=this.setFileSource(A,p);h!==u&&this.registerEntry(A,h)}prepareCopyFile(r,o,a=0){if(this.readOnly)throw or.EROFS(`copyfile '${r} -> '${o}'`);if((a&ta.constants.COPYFILE_FICLONE_FORCE)!==0)throw or.ENOSYS("unsupported clone operation",`copyfile '${r}' -> ${o}'`);let n=this.resolveFilename(`copyfile '${r} -> ${o}'`,r),u=this.entries.get(n);if(typeof u>"u")throw or.EINVAL(`copyfile '${r}' -> '${o}'`);let A=this.resolveFilename(`copyfile '${r}' -> ${o}'`,o),p=this.entries.get(A);if((a&(ta.constants.COPYFILE_EXCL|ta.constants.COPYFILE_FICLONE_FORCE))!==0&&typeof p<"u")throw or.EEXIST(`copyfile '${r}' -> '${o}'`);return{indexSource:u,resolvedDestP:A,indexDest:p}}async appendFilePromise(r,o,a){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFilePromise(r,o,a)}appendFileSync(r,o,a={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFileSync(r,o,a)}fdToPath(r,o){let a=this.fds.get(r)?.p;if(typeof a>"u")throw or.EBADF(o);return a}async writeFilePromise(r,o,a){let{encoding:n,mode:u,index:A,resolvedP:p}=this.prepareWriteFile(r,a);A!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(o=Buffer.concat([await this.getFileSource(A,{asyncDecompress:!0}),Buffer.from(o)])),n!==null&&(o=o.toString(n));let h=this.setFileSource(p,o);h!==A&&this.registerEntry(p,h),u!==null&&await this.chmodPromise(p,u)}writeFileSync(r,o,a){let{encoding:n,mode:u,index:A,resolvedP:p}=this.prepareWriteFile(r,a);A!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(o=Buffer.concat([this.getFileSource(A),Buffer.from(o)])),n!==null&&(o=o.toString(n));let h=this.setFileSource(p,o);h!==A&&this.registerEntry(p,h),u!==null&&this.chmodSync(p,u)}prepareWriteFile(r,o){if(typeof r=="number"&&(r=this.fdToPath(r,"read")),this.readOnly)throw or.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw or.EISDIR(`open '${r}'`);let n=null,u=null;typeof o=="string"?n=o:typeof o=="object"&&({encoding:n=null,mode:u=null}=o);let A=this.entries.get(a);return{encoding:n,mode:u,resolvedP:a,index:A}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw or.EROFS(`unlink '${r}'`);let o=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(o))throw or.EISDIR(`unlink '${r}'`);let a=this.entries.get(o);if(typeof a>"u")throw or.EINVAL(`unlink '${r}'`);this.deleteEntry(o,a)}async utimesPromise(r,o,a){return this.utimesSync(r,o,a)}utimesSync(r,o,a){if(this.readOnly)throw or.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,o,a){return this.lutimesSync(r,o,a)}lutimesSync(r,o,a){if(this.readOnly)throw or.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,o){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error("Unreachable");if(this.libzip.file.setMtime(this.zip,a,0,Wst(o),0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(r,o){return this.mkdirSync(r,o)}mkdirSync(r,{mode:o=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:o});if(this.readOnly)throw or.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw or.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,o)}async rmdirPromise(r,o){return this.rmdirSync(r,o)}rmdirSync(r,{recursive:o=!1}={}){if(this.readOnly)throw or.EROFS(`rmdir '${r}'`);if(o){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rmdir '${r}'`);let u=this.entries.get(a);if(typeof u>"u")throw or.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,u)}hydrateDirectory(r){let o=this.libzip.dir.add(this.zip,J.relative(Bt.root,r));if(o===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(r),this.registerEntry(r,o),o}async linkPromise(r,o){return this.linkSync(r,o)}linkSync(r,o){throw or.EOPNOTSUPP(`link '${r}' -> '${o}'`)}async symlinkPromise(r,o){return this.symlinkSync(r,o)}symlinkSync(r,o){if(this.readOnly)throw or.EROFS(`symlink '${r}' -> '${o}'`);let a=this.resolveFilename(`symlink '${r}' -> '${o}'`,o);if(this.listings.has(a))throw or.EISDIR(`symlink '${r}' -> '${o}'`);if(this.entries.has(a))throw or.EEXIST(`symlink '${r}' -> '${o}'`);let n=this.setFileSource(a,r);if(this.registerEntry(a,n),this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,(ta.constants.S_IFLNK|511)<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(r,o){typeof o=="object"&&(o=o?o.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return o?a.toString(o):a}readFileSync(r,o){typeof o=="object"&&(o=o?o.encoding:void 0);let a=this.readFileBuffer(r);return o?a.toString(o):a}readFileBuffer(r,o={asyncDecompress:!1}){typeof r=="number"&&(r=this.fdToPath(r,"read"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`open '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw or.EISDIR("read");let n=this.entries.get(a);if(n===void 0)throw new Error("Unreachable");return this.getFileSource(n,o)}async readdirPromise(r,o){return this.readdirSync(r,o)}readdirSync(r,o){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`scandir '${r}'`);if(o?.recursive)if(o?.withFileTypes){let u=Array.from(n,A=>Object.assign(this.statImpl("lstat",J.join(r,A)),{name:A,path:Bt.dot}));for(let A of u){if(!A.isDirectory())continue;let p=J.join(A.path,A.name),h=this.listings.get(J.join(a,p));for(let w of h)u.push(Object.assign(this.statImpl("lstat",J.join(r,p,w)),{name:w,path:p}))}return u}else{let u=[...n];for(let A of u){let p=this.listings.get(J.join(a,A));if(!(typeof p>"u"))for(let h of p)u.push(J.join(A,h))}return u}else return o?.withFileTypes?Array.from(n,u=>Object.assign(this.statImpl("lstat",J.join(r,u)),{name:u,path:void 0})):[...n]}async readlinkPromise(r){let o=this.prepareReadlink(r);return(await this.getFileSource(o,{asyncDecompress:!0})).toString()}readlinkSync(r){let o=this.prepareReadlink(r);return this.getFileSource(o).toString()}prepareReadlink(r){let o=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(o)&&!this.listings.has(o))throw or.ENOENT(`readlink '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(o))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(o))throw or.EINVAL(`readlink '${r}'`);let a=this.entries.get(o);if(a===void 0)throw new Error("Unreachable");if(!this.isSymbolicLink(a))throw or.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,o=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw or.EINVAL(`open '${r}'`);let u=await this.getFileSource(n,{asyncDecompress:!0}),A=Buffer.alloc(o,0);return u.copy(A),await this.writeFilePromise(r,A)}truncateSync(r,o=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw or.EINVAL(`open '${r}'`);let u=this.getFileSource(n),A=Buffer.alloc(o,0);return u.copy(A),this.writeFileSync(r,A)}async ftruncatePromise(r,o){return this.truncatePromise(this.fdToPath(r,"ftruncate"),o)}ftruncateSync(r,o){return this.truncateSync(this.fdToPath(r,"ftruncateSync"),o)}watch(r,o,a){let n;switch(typeof o){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=o);break}if(!n)return{on:()=>{},close:()=>{}};let u=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(u)}}}watchFile(r,o,a){let n=J.resolve(Bt.root,r);return ry(this,n,o,a)}unwatchFile(r,o){let a=J.resolve(Bt.root,r);return Lg(this,a,o)}}});function Ole(e,t,r=Buffer.alloc(0),o){let a=new us(r),n=I=>I===t||I.startsWith(`${t}/`)?I.slice(0,t.length):null,u=async(I,v)=>()=>a,A=(I,v)=>a,p={...e},h=new Rn(p),w=new Up({baseFs:h,getMountPoint:n,factoryPromise:u,factorySync:A,magicByte:21,maxAge:1/0,typeCheck:o?.typeCheck});return YC(Lle.default,new _p(w)),a}var Lle,Mle=yt(()=>{St();Lle=$e(Ie("fs"));sU()});var Ule=yt(()=>{Rle();sU();Mle()});var P1={};Jt(P1,{DEFAULT_COMPRESSION_LEVEL:()=>Nle,LibzipError:()=>kx,ZipFS:()=>us,ZipOpenFS:()=>Vl,getArchivePart:()=>rU,getLibzipPromise:()=>Jst,getLibzipSync:()=>Kst,makeEmptyArchive:()=>Qx,mountMemoryDrive:()=>Ole});function Kst(){return S1()}async function Jst(){return S1()}var _le,iA=yt(()=>{$4();_le=$e(ble());Fle();Ule();xle(()=>{let e=(0,_le.default)();return kle(e)})});var FE,Hle=yt(()=>{St();qt();x1();FE=class extends nt{constructor(){super(...arguments);this.cwd=he.String("--cwd",process.cwd(),{description:"The directory to run the command in"});this.commandName=he.String();this.args=he.Proxy()}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await RE(r,[],{cwd:Ae.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}};FE.usage={description:"run a command using yarn's portable shell",details:`
150 This command will run a command using Yarn's portable shell.
151
152 Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
153
154 Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.
155
156 Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
157
158 For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
159 `,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}});var ol,jle=yt(()=>{ol=class extends Error{constructor(t){super(t),this.name="ShellError"}}});var Tx={};Jt(Tx,{fastGlobOptions:()=>Yle,isBraceExpansion:()=>oU,isGlobPattern:()=>Vst,match:()=>zst,micromatchOptions:()=>Rx});function Vst(e){if(!Fx.default.scan(e,Rx).isGlob)return!1;try{Fx.default.parse(e,Rx)}catch{return!1}return!0}function zst(e,{cwd:t,baseFs:r}){return(0,qle.default)(e,{...Yle,cwd:Ae.fromPortablePath(t),fs:FD(Gle.default,new _p(r))})}function oU(e){return Fx.default.scan(e,Rx).isBrace}var qle,Gle,Fx,Rx,Yle,Wle=yt(()=>{St();qle=$e(FP()),Gle=$e(Ie("fs")),Fx=$e(Zo()),Rx={strictBrackets:!0},Yle={onlyDirectories:!1,onlyFiles:!1}});function aU(){}function lU(){for(let e of bd)e.kill()}function zle(e,t,r,o){return a=>{let n=a[0]instanceof sA.Transform?"pipe":a[0],u=a[1]instanceof sA.Transform?"pipe":a[1],A=a[2]instanceof sA.Transform?"pipe":a[2],p=(0,Jle.default)(e,t,{...o,stdio:[n,u,A]});return bd.add(p),bd.size===1&&(process.on("SIGINT",aU),process.on("SIGTERM",lU)),a[0]instanceof sA.Transform&&a[0].pipe(p.stdin),a[1]instanceof sA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof sA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",w=>{switch(bd.delete(p),bd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),w.code){case"ENOENT":a[2].write(`command not found: ${e}
160`),h(127);break;case"EACCES":a[2].write(`permission denied: ${e}
161`),h(128);break;default:a[2].write(`uncaught error: ${w.message}
162`),h(1);break}}),p.on("close",w=>{bd.delete(p),bd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),h(w!==null?w:129)})})}}}function Xle(e){return t=>{let r=t[0]==="pipe"?new sA.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}function Nx(e,t){return TE.start(e,t)}function Kle(e,t=null){let r=new sA.PassThrough,o=new Vle.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
163`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e(t!==null?`${t} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&e(t!==null?`${t} ${n}`:n)}),r}function Zle(e,{prefix:t}){return{stdout:Kle(r=>e.stdout.write(`${r}
164`),e.stdout.isTTY?t:null),stderr:Kle(r=>e.stderr.write(`${r}
165`),e.stderr.isTTY?t:null)}}var Jle,sA,Vle,bd,zl,cU,TE,uU=yt(()=>{Jle=$e(iT()),sA=Ie("stream"),Vle=Ie("string_decoder"),bd=new Set;zl=class{constructor(t){this.stream=t}close(){}get(){return this.stream}},cU=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(t){this.stream=t}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},TE=class{constructor(t,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=t,this.implementation=r}static start(t,{stdin:r,stdout:o,stderr:a}){let n=new TE(null,t);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(t,r=1){let o=new TE(this,t),a=new cU;return o.pipe=a,o.stdout=this.stdout,o.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),o}async exec(){let t=["ignore","ignore","ignore"];if(this.pipe)t[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");t[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,t[1]=r.get();let o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,t[2]=o.get();let a=this.implementation(t);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let t=[];for(let o=this;o;o=o.ancestor)t.push(o.exec());return(await Promise.all(t))[0]}}});var F1={};Jt(F1,{EntryCommand:()=>FE,ShellError:()=>ol,execute:()=>RE,globUtils:()=>Tx});function $le(e,t,r){let o=new al.PassThrough({autoDestroy:!0});switch(e){case 0:(t&1)===1&&r.stdin.pipe(o,{end:!1}),(t&2)===2&&r.stdin instanceof al.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(t&1)===1&&r.stdout.pipe(o,{end:!1}),(t&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(t&1)===1&&r.stderr.pipe(o,{end:!1}),(t&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new ol(`Bad file descriptor: "${e}"`)}return o}function Ox(e,t={}){let r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}async function Zst(e,t,r){let o=[],a=new al.PassThrough;return a.on("data",n=>o.push(n)),await Mx(e,t,Ox(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function ece(e,t,r){let o=e.map(async n=>{let u=await Qd(n.args,t,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function Lx(e){return e.match(/[^ \r\n\t]+/g)||[]}async function oce(e,t,r,o,a=o){switch(e.name){case"$":o(String(process.pid));break;case"#":o(String(t.args.length));break;case"@":if(e.quoted)for(let n of t.args)a(n);else for(let n of t.args){let u=Lx(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=t.args.join(" ");if(e.quoted)o(n);else for(let u of Lx(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(e.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<t.args.length&&(u=t.args[n]):Object.hasOwn(r.variables,e.name)?u=r.variables[e.name]:Object.hasOwn(r.environment,e.name)&&(u=r.environment[e.name]),typeof u<"u"&&e.alternativeValue?u=(await Qd(e.alternativeValue,t,r)).join(" "):typeof u>"u"&&(e.defaultValue?u=(await Qd(e.defaultValue,t,r)).join(" "):e.alternativeValue&&(u="")),typeof u>"u")throw A?new ol(`Unbound argument #${n}`):new ol(`Unbound variable "${e.name}"`);if(e.quoted)o(u);else{let p=Lx(u);for(let w=0;w<p.length-1;++w)a(p[w]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function b1(e,t,r){if(e.type==="number"){if(Number.isInteger(e.value))return e.value;throw new Error(`Invalid number: "${e.value}", only integers are allowed`)}else if(e.type==="variable"){let o=[];await oce({...e,quoted:!0},t,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?b1({type:"variable",name:o.join(" ")},t,r):b1({type:"number",value:a},t,r)}else return $st[e.type](await b1(e.left,t,r),await b1(e.right,t,r))}async function Qd(e,t,r){let o=new Map,a=[],n=[],u=w=>{n.push(w)},A=()=>{n.length>0&&a.push(n.join("")),n=[]},p=w=>{u(w),A()},h=(w,I,v)=>{let b=JSON.stringify({type:w,fd:I}),E=o.get(b);typeof E>"u"&&o.set(b,E=[]),E.push(v)};for(let w of e){let I=!1;switch(w.type){case"redirection":{let v=await Qd(w.args,t,r);for(let b of v)h(w.subtype,w.fd,b)}break;case"argument":for(let v of w.segments)switch(v.type){case"text":u(v.text);break;case"glob":u(v.pattern),I=!0;break;case"shell":{let b=await Zst(v.shell,t,r);if(v.quoted)u(b);else{let E=Lx(b);for(let R=0;R<E.length-1;++R)p(E[R]);u(E[E.length-1])}}break;case"variable":await oce(v,t,r,u,p);break;case"arithmetic":u(String(await b1(v.arithmetic,t,r)));break}break}if(A(),I){let v=a.pop();if(typeof v>"u")throw new Error("Assertion failed: Expected a glob pattern to have been set");let b=await t.glob.match(v,{cwd:r.cwd,baseFs:t.baseFs});if(b.length===0){let E=oU(v)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22":"";throw new ol(`No matches found: "${v}"${E}`)}for(let E of b.sort())p(E)}}if(o.size>0){let w=[];for(let[I,v]of o.entries())w.splice(w.length,0,I,String(v.length),...v);a.splice(0,0,"__ysh_set_redirects",...w,"--")}return a}function Q1(e,t,r){t.builtins.has(e[0])||(e=["command",...e]);let o=Ae.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<"u"&&(a={...a,PWD:o});let[n,...u]=e;if(n==="command")return zle(u[0],u.slice(1),t,{cwd:o,env:a});let A=t.builtins.get(n);if(typeof A>"u")throw new Error(`Assertion failed: A builtin should exist for "${n}"`);return Xle(async({stdin:p,stdout:h,stderr:w})=>{let{stdin:I,stdout:v,stderr:b}=r;r.stdin=p,r.stdout=h,r.stderr=w;try{return await A(u,t,r)}finally{r.stdin=I,r.stdout=v,r.stderr=b}})}function eot(e,t,r){return o=>{let a=new al.PassThrough,n=Mx(e,t,Ox(r,{stdin:a}));return{stdin:a,promise:n}}}function tot(e,t,r){return o=>{let a=new al.PassThrough,n=Mx(e,t,r);return{stdin:a,promise:n}}}function tce(e,t,r,o){if(t.length===0)return e;{let a;do a=String(Math.random());while(Object.hasOwn(o.procedures,a));return o.procedures={...o.procedures},o.procedures[a]=e,Q1([...t,"__ysh_run_procedure",a],r,o)}}async function rce(e,t,r){let o=e,a=null,n=null;for(;o;){let u=o.then?{...r}:r,A;switch(o.type){case"command":{let p=await Qd(o.args,t,r),h=await ece(o.envs,t,r);A=o.envs.length?Q1(p,t,Ox(u,{environment:h})):Q1(p,t,u)}break;case"subshell":{let p=await Qd(o.args,t,r),h=eot(o.subshell,t,u);A=tce(h,p,t,u)}break;case"group":{let p=await Qd(o.args,t,r),h=tot(o.group,t,u);A=tce(h,p,t,u)}break;case"envs":{let p=await ece(o.envs,t,r);u.environment={...u.environment,...p},A=Q1(["true"],t,u)}break}if(typeof A>"u")throw new Error("Assertion failed: An action should have been generated");if(a===null)n=Nx(A,{stdin:new zl(u.stdin),stdout:new zl(u.stdout),stderr:new zl(u.stderr)});else{if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(a){case"|":n=n.pipeTo(A,1);break;case"|&":n=n.pipeTo(A,3);break}}o.then?(a=o.then.type,o=o.then.chain):o=null}if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");return await n.run()}async function rot(e,t,r,{background:o=!1}={}){function a(n){let u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[n%u.length];return nce.default.hex(A)}if(o){let n=r.nextBackgroundJobIndex++,u=a(n),A=`[${n}]`,p=u(A),{stdout:h,stderr:w}=Zle(r,{prefix:p});return r.backgroundJobs.push(rce(e,t,Ox(r,{stdout:h,stderr:w})).catch(I=>w.write(`${I.message}
166`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(cy(e))}' has ended
167`)})),0}return await rce(e,t,r)}async function not(e,t,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await rot(A.chain,t,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof ol))throw p;return r.stderr.write(`${p.message}
168`),1}};for(n(await u(e));e.then;){if(r.exitCode!==null)return r.exitCode;switch(e.then.type){case"&&":a===0&&n(await u(e.then.line));break;case"||":a!==0&&n(await u(e.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return a}async function Mx(e,t,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of e){if(a=await not(n,t,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function ace(e){switch(e.type){case"variable":return e.name==="@"||e.name==="#"||e.name==="*"||Number.isFinite(parseInt(e.name,10))||"defaultValue"in e&&!!e.defaultValue&&e.defaultValue.some(t=>k1(t))||"alternativeValue"in e&&!!e.alternativeValue&&e.alternativeValue.some(t=>k1(t));case"arithmetic":return AU(e.arithmetic);case"shell":return fU(e.shell);default:return!1}}function k1(e){switch(e.type){case"redirection":return e.args.some(t=>k1(t));case"argument":return e.segments.some(t=>ace(t));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function AU(e){switch(e.type){case"variable":return ace(e);case"number":return!1;default:return AU(e.left)||AU(e.right)}}function fU(e){return e.some(({command:t})=>{for(;t;){let r=t.chain;for(;r;){let o;switch(r.type){case"subshell":o=fU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>k1(n)))||r.args.some(a=>k1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!t.then)break;t=t.then.line}return!1})}async function RE(e,t=[],{baseFs:r=new Rn,builtins:o={},cwd:a=Ae.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:w=Tx}={}){let I={};for(let[E,R]of Object.entries(n))typeof R<"u"&&(I[E]=R);let v=new Map(Xst);for(let[E,R]of Object.entries(o))v.set(E,R);u===null&&(u=new al.PassThrough,u.end());let b=ND(e,w);if(!fU(b)&&b.length>0&&t.length>0){let{command:E}=b[b.length-1];for(;E.then;)E=E.then.line;let R=E.chain;for(;R.then;)R=R.then.chain;R.type==="command"&&(R.args=R.args.concat(t.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await Mx(b,{args:t,baseFs:r,builtins:v,initialStdin:u,initialStdout:A,initialStderr:p,glob:w},{cwd:a,environment:I,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var nce,ice,al,sce,Xst,$st,x1=yt(()=>{St();Nl();nce=$e(CN()),ice=Ie("os"),al=Ie("stream"),sce=Ie("timers/promises");Hle();jle();Wle();uU();uU();Xst=new Map([["cd",async([e=(0,ice.homedir)(),...t],r,o)=>{let a=J.resolve(o.cwd,Ae.toPortablePath(e));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new ol(`cd: no such file or directory: ${e}`):u})).isDirectory())throw new ol(`cd: not a directory: ${e}`);return o.cwd=a,0}],["pwd",async(e,t,r)=>(r.stdout.write(`${Ae.fromPortablePath(r.cwd)}
169`),0)],[":",async(e,t,r)=>0],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,o)=>o.exitCode=parseInt(e??o.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(`${e.join(" ")}
170`),0)],["sleep",async([e],t,r)=>{if(typeof e>"u")throw new ol("sleep: missing operand");let o=Number(e);if(Number.isNaN(o))throw new ol(`sleep: invalid time interval '${e}'`);return await(0,sce.setTimeout)(1e3*o,0)}],["__ysh_run_procedure",async(e,t,r)=>{let o=r.procedures[e[0]];return await Nx(o,{stdin:new zl(r.stdin),stdout:new zl(r.stdout),stderr:new zl(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;e[h]!=="--";){let I=e[h++],{type:v,fd:b}=JSON.parse(I),E=V=>{switch(b){case null:case 0:u.push(V);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},R=V=>{switch(b){case null:case 1:A.push(V);break;case 2:p.push(V);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},N=Number(e[h++]),U=h+N;for(let V=h;V<U;++h,++V)switch(v){case"<":E(()=>t.baseFs.createReadStream(J.resolve(r.cwd,Ae.toPortablePath(e[V]))));break;case"<<<":E(()=>{let ee=new al.PassThrough;return process.nextTick(()=>{ee.write(`${e[V]}
171`),ee.end()}),ee});break;case"<&":E(()=>$le(Number(e[V]),1,r));break;case">":case">>":{let ee=J.resolve(r.cwd,Ae.toPortablePath(e[V]));R(ee==="/dev/null"?new al.Writable({autoDestroy:!0,emitClose:!0,write(le,fe,de){setImmediate(de)}}):t.baseFs.createWriteStream(ee,v===">>"?{flags:"a"}:void 0))}break;case">&":R($le(Number(e[V]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${v}"`)}}if(u.length>0){let I=new al.PassThrough;o=I;let v=b=>{if(b===u.length)I.end();else{let E=u[b]();E.pipe(I,{end:!1}),E.on("end",()=>{v(b+1)})}};v(0)}if(A.length>0){let I=new al.PassThrough;a=I;for(let v of A)I.pipe(v)}if(p.length>0){let I=new al.PassThrough;n=I;for(let v of p)I.pipe(v)}let w=await Nx(Q1(e.slice(h+1),t,r),{stdin:new zl(o),stdout:new zl(a),stderr:new zl(n)}).run();return await Promise.all(A.map(I=>new Promise((v,b)=>{I.on("error",E=>{b(E)}),I.on("close",()=>{v()}),I.end()}))),await Promise.all(p.map(I=>new Promise((v,b)=>{I.on("error",E=>{b(E)}),I.on("close",()=>{v()}),I.end()}))),w}]]);$st={addition:(e,t)=>e+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)}});var Ux=_((LMt,lce)=>{function iot(e,t){for(var r=-1,o=e==null?0:e.length,a=Array(o);++r<o;)a[r]=t(e[r],r,e);return a}lce.exports=iot});var hce=_((OMt,pce)=>{var cce=fd(),sot=Ux(),oot=Hl(),aot=fE(),lot=1/0,uce=cce?cce.prototype:void 0,Ace=uce?uce.toString:void 0;function fce(e){if(typeof e=="string")return e;if(oot(e))return sot(e,fce)+"";if(aot(e))return Ace?Ace.call(e):"";var t=e+"";return t=="0"&&1/e==-lot?"-0":t}pce.exports=fce});var R1=_((MMt,gce)=>{var cot=hce();function uot(e){return e==null?"":cot(e)}gce.exports=uot});var pU=_((UMt,dce)=>{function Aot(e,t,r){var o=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(a);++o<a;)n[o]=e[o+t];return n}dce.exports=Aot});var yce=_((_Mt,mce)=>{var fot=pU();function pot(e,t,r){var o=e.length;return r=r===void 0?o:r,!t&&r>=o?e:fot(e,t,r)}mce.exports=pot});var hU=_((HMt,Ece)=>{var hot="\\ud800-\\udfff",got="\\u0300-\\u036f",dot="\\ufe20-\\ufe2f",mot="\\u20d0-\\u20ff",yot=got+dot+mot,Eot="\\ufe0e\\ufe0f",wot="\\u200d",Cot=RegExp("["+wot+hot+yot+Eot+"]");function Iot(e){return Cot.test(e)}Ece.exports=Iot});var Cce=_((jMt,wce)=>{function Bot(e){return e.split("")}wce.exports=Bot});var bce=_((qMt,xce)=>{var Ice="\\ud800-\\udfff",vot="\\u0300-\\u036f",Dot="\\ufe20-\\ufe2f",Sot="\\u20d0-\\u20ff",Pot=vot+Dot+Sot,xot="\\ufe0e\\ufe0f",bot="["+Ice+"]",gU="["+Pot+"]",dU="\\ud83c[\\udffb-\\udfff]",Qot="(?:"+gU+"|"+dU+")",Bce="[^"+Ice+"]",vce="(?:\\ud83c[\\udde6-\\uddff]){2}",Dce="[\\ud800-\\udbff][\\udc00-\\udfff]",kot="\\u200d",Sce=Qot+"?",Pce="["+xot+"]?",Fot="(?:"+kot+"(?:"+[Bce,vce,Dce].join("|")+")"+Pce+Sce+")*",Rot=Pce+Sce+Fot,Tot="(?:"+[Bce+gU+"?",gU,vce,Dce,bot].join("|")+")",Not=RegExp(dU+"(?="+dU+")|"+Tot+Rot,"g");function Lot(e){return e.match(Not)||[]}xce.exports=Lot});var kce=_((GMt,Qce)=>{var Oot=Cce(),Mot=hU(),Uot=bce();function _ot(e){return Mot(e)?Uot(e):Oot(e)}Qce.exports=_ot});var Rce=_((YMt,Fce)=>{var Hot=yce(),jot=hU(),qot=kce(),Got=R1();function Yot(e){return function(t){t=Got(t);var r=jot(t)?qot(t):void 0,o=r?r[0]:t.charAt(0),a=r?Hot(r,1).join(""):t.slice(1);return o[e]()+a}}Fce.exports=Yot});var Nce=_((WMt,Tce)=>{var Wot=Rce(),Kot=Wot("toUpperCase");Tce.exports=Kot});var mU=_((KMt,Lce)=>{var Jot=R1(),Vot=Nce();function zot(e){return Vot(Jot(e).toLowerCase())}Lce.exports=zot});var Oce=_((JMt,_x)=>{function Xot(){var e=0,t=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,w=10,I=11,v=12,b=13,E=14,R=15,N=16,U=17,V=0,ee=1,le=2,fe=3,de=4;function ge(g,we){return 55296<=g.charCodeAt(we)&&g.charCodeAt(we)<=56319&&56320<=g.charCodeAt(we+1)&&g.charCodeAt(we+1)<=57343}function oe(g,we){we===void 0&&(we=0);var Se=g.charCodeAt(we);if(55296<=Se&&Se<=56319&&we<g.length-1){var ce=Se,ne=g.charCodeAt(we+1);return 56320<=ne&&ne<=57343?(ce-55296)*1024+(ne-56320)+65536:ce}if(56320<=Se&&Se<=57343&&we>=1){var ce=g.charCodeAt(we-1),ne=Se;return 55296<=ce&&ce<=56319?(ce-55296)*1024+(ne-56320)+65536:ne}return Se}function Be(g,we,Se){var ce=[g].concat(we).concat([Se]),ne=ce[ce.length-2],te=Se,Ee=ce.lastIndexOf(E);if(Ee>1&&ce.slice(1,Ee).every(function(H){return H==o})&&[o,b,U].indexOf(g)==-1)return le;var Re=ce.lastIndexOf(a);if(Re>0&&ce.slice(1,Re).every(function(H){return H==a})&&[v,a].indexOf(ne)==-1)return ce.filter(function(H){return H==a}).length%2==1?fe:de;if(ne==e&&te==t)return V;if(ne==r||ne==e||ne==t)return te==E&&we.every(function(H){return H==o})?le:ee;if(te==r||te==e||te==t)return ee;if(ne==u&&(te==u||te==A||te==h||te==w))return V;if((ne==h||ne==A)&&(te==A||te==p))return V;if((ne==w||ne==p)&&te==p)return V;if(te==o||te==R)return V;if(te==n)return V;if(ne==v)return V;var dt=ce.indexOf(o)!=-1?ce.lastIndexOf(o)-1:ce.length-2;return[b,U].indexOf(ce[dt])!=-1&&ce.slice(dt+1,-1).every(function(H){return H==o})&&te==E||ne==R&&[N,U].indexOf(te)!=-1?V:we.indexOf(a)!=-1?le:ne==a&&te==a?V:ee}this.nextBreak=function(g,we){if(we===void 0&&(we=0),we<0)return 0;if(we>=g.length-1)return g.length;for(var Se=be(oe(g,we)),ce=[],ne=we+1;ne<g.length;ne++)if(!ge(g,ne-1)){var te=be(oe(g,ne));if(Be(Se,ce,te))return ne;ce.push(te)}return g.length},this.splitGraphemes=function(g){for(var we=[],Se=0,ce;(ce=this.nextBreak(g,Se))<g.length;)we.push(g.slice(Se,ce)),Se=ce;return Se<g.length&&we.push(g.slice(Se)),we},this.iterateGraphemes=function(g){var we=0,Se={next:function(){var ce,ne;return(ne=this.nextBreak(g,we))<g.length?(ce=g.slice(we,ne),we=ne,{value:ce,done:!1}):we<g.length?(ce=g.slice(we),we=g.length,{value:ce,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Se[Symbol.iterator]=function(){return Se}),Se},this.countGraphemes=function(g){for(var we=0,Se=0,ce;(ce=this.nextBreak(g,Se))<g.length;)Se=ce,we++;return Se<g.length&&we++,we};function be(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?v:g==13?e:g==10?t:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?r:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?o:127462<=g&&g<=127487?a:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?n:4352<=g&&g<=4447||43360<=g&&g<=43388?u:4448<=g&&g<=4519||55216<=g&&g<=55238?A:4520<=g&&g<=4607||55243<=g&&g<=55291?p:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?h:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?w:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?b:127995<=g&&g<=127999?E:g==8205?R:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?N:128102<=g&&g<=128105?U:I}return this}typeof _x<"u"&&_x.exports&&(_x.exports=Xot)});var Uce=_((VMt,Mce)=>{var Zot=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,Hx;function $ot(){if(Hx)return Hx;if(typeof Intl.Segmenter<"u"){let e=new Intl.Segmenter("en",{granularity:"grapheme"});return Hx=t=>Array.from(e.segment(t),({segment:r})=>r)}else{let e=Oce(),t=new e;return Hx=r=>t.splitGraphemes(r)}}Mce.exports=(e,t=0,r=e.length)=>{if(t<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");let o=r-t,a="",n=0,u=0;for(;e.length>0;){let A=e.match(Zot)||[e,e,void 0],p=$ot()(A[1]),h=Math.min(t-n,p.length);p=p.slice(h);let w=Math.min(o-u,p.length);a+=p.slice(0,w).join(""),n+=h,u+=w,typeof A[2]<"u"&&(a+=A[2]),e=e.slice(A[0].length)}return a}});var en,T1=yt(()=>{en=process.env.YARN_IS_TEST_ENV?"0.0.0":"4.0.0-rc.50"});function Yce(e,{configuration:t,json:r}){if(!t.get("enableMessageNames"))return"";let a=Ju(e===null?0:e);return!r&&e===null?_t(t,a,"grey"):a}function yU(e,{configuration:t,json:r}){let o=Yce(e,{configuration:t,json:r});if(!o||e===null||e===0)return o;let a=wr[e],n=`https://yarnpkg.com/advanced/error-codes#${o}---${a}`.toLowerCase();return Xy(t,o,n)}var qce,jx,eat,_ce,Hce,uh,Gce,jce,tat,rat,qx,nat,Nt,N1=yt(()=>{qce=$e(Uce()),jx=$e($g());AS();Yl();T1();ql();eat="\xB7",_ce=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],Hce=80,uh=jx.default.GITHUB_ACTIONS?{start:e=>`::group::${e}
172`,end:e=>`::endgroup::
173`}:jx.default.TRAVIS?{start:e=>`travis_fold:start:${e}
174`,end:e=>`travis_fold:end:${e}
175`}:jx.default.GITLAB?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${e}
176`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,Gce=uh!==null,jce=new Date,tat=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,rat=e=>e,qx=rat({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),nat=tat&&Object.keys(qx).find(e=>{let t=qx[e];return!(t.date&&(t.date[0]!==jce.getDate()||t.date[1]!==jce.getMonth()+1))})||"default";Nt=class extends Zs{constructor({configuration:r,stdout:o,json:a=!1,forceSectionAlignment:n=!1,includeNames:u=!0,includePrefix:A=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:w=h,includeWarnings:I=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(JI(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=u,this.includePrefix=A,this.includeFooter=p,this.includeInfos=w,this.includeWarnings=I,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let v=r.get("progressBarStyle")||nat;if(!Object.hasOwn(qx,v))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=qx[v];let b=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*b/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,md(r.configuration,`Yarn ${en}`,2));try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let o=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,o-10-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,uh!==null&&!this.json&&this.includeInfos&&this.stdout.write(uh.start(r))},reportFooter:A=>{if(this.indent-=1,uh!==null&&!this.json&&this.includeInfos){this.stdout.write(uh.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${_t(this.configuration,A,Et.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(u)}reportWarning(r,o){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${o}`)}reportError(r,o){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,o)),this.reportErrorImpl(r,o)}reportErrorImpl(r,o){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"redBright")}${o}`,{truncate:!1})}reportFold(r,o){if(!uh)return;let a=`${uh.start(r)}${o}${uh.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error("Unimplemented: Progress bars can't have both progress and titles.");let o=!1,a=Promise.resolve().then(async()=>{let u={progress:r.hasProgress?0:void 0,title:r.hasTitle?"":void 0};this.progress.set(r,{definition:u,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:A,title:p}of r)o||u.progress===A&&u.title===p||(u.progress=A,u.title=p,this.refreshProgress());n()}),n=()=>{o||(o=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLine(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r="";this.errorCount>0?r="Failed with errors":this.warningCount>0?r="Done with warnings":r="Done";let o=_t(this.configuration,Date.now()-this.startTime,Et.DURATION),a=this.configuration.get("enableTimers")?`${r} in ${o}`:r;this.errorCount>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:o}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:o})}
177`),this.writeProgress()}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
178`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Hce&&(this.progressFrame=(this.progressFrame+1)%_ce.length,this.progressTime=r);let o=_ce[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),w=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${w}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${_t(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
179`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Hce)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,qce.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Yce(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${_t(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?yU(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${eat} `}}});var cn={};Jt(cn,{PackageManager:()=>Jce,detectPackageManager:()=>Vce,executePackageAccessibleBinary:()=>eue,executePackageScript:()=>Gx,executePackageShellcode:()=>EU,executeWorkspaceAccessibleBinary:()=>uat,executeWorkspaceLifecycleScript:()=>Zce,executeWorkspaceScript:()=>Xce,getPackageAccessibleBinaries:()=>Yx,getWorkspaceAccessibleBinaries:()=>$ce,hasPackageScript:()=>aat,hasWorkspaceScript:()=>wU,isNodeScript:()=>CU,makeScriptEnv:()=>L1,maybeExecuteWorkspaceLifecycleScript:()=>cat,prepareExternalProject:()=>oat});async function Ah(e,t,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await ae.writeFilePromise(J.format({dir:e,name:t,ext:".cmd"}),a)}await ae.writeFilePromise(J.join(e,t),`#!/bin/sh
180exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
181`,{mode:493})}async function Vce(e){let t=await Ot.tryFind(e);if(t?.packageManager){let o=OP(t.packageManager);if(o?.name){let a=`found ${JSON.stringify({packageManager:t.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await ae.readFilePromise(J.join(e,gr.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:ae.existsSync(J.join(e,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:ae.existsSync(J.join(e,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function L1({project:e,locator:t,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=e?.configuration.env??process.env}){let u={};for(let[w,I]of Object.entries(n))typeof I<"u"&&(u[w.toLowerCase()!=="path"?w:"PATH"]=I);let A=Ae.fromPortablePath(r);u.BERRY_BIN_FOLDER=Ae.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?Ae.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([Ah(r,"node",process.execPath),...en!==null?[Ah(r,"run",process.execPath,[p,"run"]),Ah(r,"yarn",process.execPath,[p]),Ah(r,"yarnpkg",process.execPath,[p]),Ah(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),e&&(u.INIT_CWD=Ae.cwd(),u.PROJECT_CWD=Ae.fromPortablePath(e.cwd)),u.PATH=u.PATH?`${A}${Ae.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${Ae.sep}yarn`,u.npm_node_execpath=`${A}${Ae.sep}node`,t){if(!e)throw new Error("Assertion failed: Missing project");let w=e.tryWorkspaceByLocator(t),I=w?w.manifest.version??"":e.storedPackages.get(t.locatorHash).version??"";u.npm_package_name=An(t),u.npm_package_version=I;let v;if(w)v=w.cwd;else{let b=e.storedPackages.get(t.locatorHash);if(!b)throw new Error(`Package for ${jr(e.configuration,t)} not found in the project`);let E=e.configuration.getLinkers(),R={project:e,report:new Nt({stdout:new fh.PassThrough,configuration:e.configuration})},N=E.find(U=>U.supportsPackage(b,R));if(!N)throw new Error(`The package ${jr(e.configuration,b)} isn't supported by any of the available linkers`);v=await N.findPackageLocation(b,R)}u.npm_package_json=Ae.fromPortablePath(J.join(v,gr.manifest))}let h=en!==null?`yarn/${en}`:`yarn/${Vp("@yarnpkg/core").version}-core`;return u.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(u.npm_lifecycle_event=a),e&&await e.configuration.triggerHook(w=>w.setupScriptEnvironment,e,u,async(w,I,v)=>await Ah(r,bi(w),I,v)),u}async function oat(e,t,{configuration:r,report:o,workspace:a=null,locator:n=null}){await sat(async()=>{await ae.mktempPromise(async u=>{let A=J.join(u,"pack.log"),p=null,{stdout:h,stderr:w}=r.getSubprocessStreams(A,{prefix:Ae.fromPortablePath(e),report:o}),I=n&&jc(n)?$I(n):n,v=I?xa(I):"an external project";h.write(`Packing ${v} from sources
182`);let b=await Vce(e),E;b!==null?(h.write(`Using ${b.packageManager} for bootstrap. Reason: ${b.reason}
183
184`),E=b.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
185
186`),E="Yarn");let R=E==="Yarn"&&!b?.packageManagerField;await ae.mktempPromise(async N=>{let U=await L1({binFolder:N,ignoreCorepack:R}),ee=new Map([["Yarn Classic",async()=>{let fe=a!==null?["workspace",a]:[],de=J.join(e,gr.manifest),ge=await ae.readFilePromise(de),oe=await Wc(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:e,env:U,stdin:p,stdout:h,stderr:w,end:1});if(oe.code!==0)return oe.code;await ae.writeFilePromise(de,ge),await ae.appendFilePromise(J.join(e,".npmignore"),`/.yarn
187`),h.write(`
188`),delete U.NODE_ENV;let Be=await Wc("yarn",["install"],{cwd:e,env:U,stdin:p,stdout:h,stderr:w,end:1});if(Be.code!==0)return Be.code;h.write(`
189`);let be=await Wc("yarn",[...fe,"pack","--filename",Ae.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:w});return be.code!==0?be.code:0}],["Yarn",async()=>{let fe=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let de=J.join(e,gr.lockfile);await ae.existsPromise(de)||await ae.writeFilePromise(de,"");let ge=await Wc("yarn",[...fe,"pack","--install-if-needed","--filename",Ae.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:w});return ge.code!==0?ge.code:0}],["npm",async()=>{if(a!==null){let we=new fh.PassThrough,Se=Ky(we);we.pipe(h,{end:!1});let ce=await Wc("npm",["--version"],{cwd:e,env:U,stdin:p,stdout:we,stderr:w,end:0});if(we.end(),ce.code!==0)return h.end(),w.end(),ce.code;let ne=(await Se).toString().trim();if(!bf(ne,">=7.x")){let te=rA(null,"npm"),Ee=Cn(te,ne),Re=Cn(te,">=7.x");throw new Error(`Workspaces aren't supported by ${jn(r,Ee)}; please upgrade to ${jn(r,Re)} (npm has been detected as the primary package manager for ${_t(r,e,Et.PATH)})`)}}let fe=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let de=await Wc("npm",["install","--legacy-peer-deps"],{cwd:e,env:U,stdin:p,stdout:h,stderr:w,end:1});if(de.code!==0)return de.code;let ge=new fh.PassThrough,oe=Ky(ge);ge.pipe(h);let Be=await Wc("npm",["pack","--silent",...fe],{cwd:e,env:U,stdin:p,stdout:ge,stderr:w});if(Be.code!==0)return Be.code;let be=(await oe).toString().trim().replace(/^.*\n/s,""),g=J.resolve(e,Ae.toPortablePath(be));return await ae.renamePromise(g,t),0}]]).get(E);if(typeof ee>"u")throw new Error("Assertion failed: Unsupported workflow");let le=await ee();if(!(le===0||typeof le>"u"))throw ae.detachTemp(u),new zt(58,`Packing the package failed (exit code ${le}, logs can be found here: ${_t(r,A,Et.PATH)})`)})})})}async function aat(e,t,{project:r}){let o=r.tryWorkspaceByLocator(e);if(o!==null)return wU(o,t);let a=r.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${jr(r.configuration,e)} not found in the project`);return await Vl.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Nt({stdout:new fh.PassThrough,configuration:u})},h=A.find(b=>b.supportsPackage(a,p));if(!h)throw new Error(`The package ${jr(r.configuration,a)} isn't supported by any of the available linkers`);let w=await h.findPackageLocation(a,p),I=new hn(w,{baseFs:n});return(await Ot.find(Bt.dot,{baseFs:I})).scripts.has(t)})}async function Gx(e,t,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{manifest:h,env:w,cwd:I}=await zce(e,{project:a,binFolder:p,cwd:o,lifecycleScript:t}),v=h.scripts.get(t);if(typeof v>"u")return 1;let b=async()=>await RE(v,r,{cwd:I,env:w,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,b,a,e,t,{script:v,args:r,cwd:I,env:w,stdin:n,stdout:u,stderr:A}))()})}async function EU(e,t,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{env:h,cwd:w}=await zce(e,{project:a,binFolder:p,cwd:o});return await RE(t,r,{cwd:w,env:h,stdin:n,stdout:u,stderr:A})})}async function lat(e,{binFolder:t,cwd:r,lifecycleScript:o}){let a=await L1({project:e.project,locator:e.anchoredLocator,binFolder:t,lifecycleScript:o});return await IU(t,await $ce(e)),typeof r>"u"&&(r=J.dirname(await ae.realpathPromise(J.join(e.cwd,"package.json")))),{manifest:e.manifest,binFolder:t,env:a,cwd:r}}async function zce(e,{project:t,binFolder:r,cwd:o,lifecycleScript:a}){let n=t.tryWorkspaceByLocator(e);if(n!==null)return lat(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=t.storedPackages.get(e.locatorHash);if(!u)throw new Error(`Package for ${jr(t.configuration,e)} not found in the project`);return await Vl.openPromise(async A=>{let p=t.configuration,h=t.configuration.getLinkers(),w={project:t,report:new Nt({stdout:new fh.PassThrough,configuration:p})},I=h.find(N=>N.supportsPackage(u,w));if(!I)throw new Error(`The package ${jr(t.configuration,u)} isn't supported by any of the available linkers`);let v=await L1({project:t,locator:e,binFolder:r,lifecycleScript:a});await IU(r,await Yx(e,{project:t}));let b=await I.findPackageLocation(u,w),E=new hn(b,{baseFs:A}),R=await Ot.find(Bt.dot,{baseFs:E});return typeof o>"u"&&(o=b),{manifest:R,binFolder:r,env:v,cwd:o}})}async function Xce(e,t,r,{cwd:o,stdin:a,stdout:n,stderr:u}){return await Gx(e.anchoredLocator,t,r,{cwd:o,project:e.project,stdin:a,stdout:n,stderr:u})}function wU(e,t){return e.manifest.scripts.has(t)}async function Zce(e,t,{cwd:r,report:o}){let{configuration:a}=e.project,n=null;await ae.mktempPromise(async u=>{let A=J.join(u,`${t}.log`),p=`# This file contains the result of Yarn calling the "${t}" lifecycle script inside a workspace ("${Ae.fromPortablePath(e.cwd)}")
190`,{stdout:h,stderr:w}=a.getSubprocessStreams(A,{report:o,prefix:jr(a,e.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${t}" lifecycle script`);let I=await Xce(e,t,[],{cwd:r,stdin:n,stdout:h,stderr:w});if(h.end(),w.end(),I!==0)throw ae.detachTemp(u),new zt(36,`${(0,Wce.default)(t)} script failed (exit code ${_t(a,I,Et.NUMBER)}, logs can be found here: ${_t(a,A,Et.PATH)}); run ${_t(a,`yarn ${t}`,Et.CODE)} to investigate`)})}async function cat(e,t,r){wU(e,t)&&await Zce(e,t,r)}function CU(e){let t=J.extname(e);if(t.match(/\.[cm]?[jt]sx?$/))return!0;if(t===".exe"||t===".bin")return!1;let r=Buffer.alloc(4),o;try{o=ae.openSync(e,"r")}catch{return!0}try{ae.readSync(o,r,0,r.length,0)}finally{ae.closeSync(o)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function Yx(e,{project:t}){let r=t.configuration,o=new Map,a=t.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${jr(r,e)} not found in the project`);let n=new fh.Writable,u=r.getLinkers(),A={project:t,report:new Nt({configuration:r,stdout:n})},p=new Set([e.locatorHash]);for(let w of a.dependencies.values()){let I=t.storedResolutions.get(w.descriptorHash);if(!I)throw new Error(`Assertion failed: The resolution (${jn(r,w)}) should have been registered`);p.add(I)}let h=await Promise.all(Array.from(p,async w=>{let I=t.storedPackages.get(w);if(!I)throw new Error(`Assertion failed: The package (${w}) should have been registered`);if(I.bin.size===0)return sl.skip;let v=u.find(E=>E.supportsPackage(I,A));if(!v)return sl.skip;let b=null;try{b=await v.findPackageLocation(I,A)}catch(E){if(E.code==="LOCATOR_NOT_INSTALLED")return sl.skip;throw E}return{dependency:I,packageLocation:b}}));for(let w of h){if(w===sl.skip)continue;let{dependency:I,packageLocation:v}=w;for(let[b,E]of I.bin){let R=J.resolve(v,E);o.set(b,[I,Ae.fromPortablePath(R),CU(R)])}}return o}async function $ce(e){return await Yx(e.anchoredLocator,{project:e.project})}async function IU(e,t){await Promise.all(Array.from(t,([r,[,o,a]])=>a?Ah(e,bi(r),process.execPath,[o]):Ah(e,bi(r),o,[])))}async function eue(e,t,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await Yx(e,{project:a});let w=h.get(t);if(!w)throw new Error(`Binary not found (${t}) for ${jr(a.configuration,e)}`);return await ae.mktempPromise(async I=>{let[,v]=w,b=await L1({project:a,locator:e,binFolder:I});await IU(b.BERRY_BIN_FOLDER,h);let E=CU(Ae.toPortablePath(v))?Wc(process.execPath,[...p,v,...r],{cwd:o,env:b,stdin:n,stdout:u,stderr:A}):Wc(v,r,{cwd:o,env:b,stdin:n,stdout:u,stderr:A}),R;try{R=await E}finally{await ae.removePromise(b.BERRY_BIN_FOLDER)}return R.code})}async function uat(e,t,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await eue(e.anchoredLocator,t,r,{project:e.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var Wce,Kce,fh,Jce,iat,sat,BU=yt(()=>{St();St();iA();x1();Wce=$e(mU()),Kce=$e(nd()),fh=Ie("stream");AE();Yl();N1();T1();Ix();ql();jl();Qf();xo();Jce=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Jce||{});iat=2,sat=(0,Kce.default)(iat)});var NE=_((d4t,rue)=>{"use strict";var tue=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);rue.exports=e=>e?Object.keys(e).map(t=>[tue.has(t)?tue.get(t):t,e[t]]).reduce((t,r)=>(t[r[0]]=r[1],t),Object.create(null)):{}});var OE=_((m4t,Aue)=>{"use strict";var nue=typeof process=="object"&&process?process:{stdout:null,stderr:null},Aat=Ie("events"),iue=Ie("stream"),sue=Ie("string_decoder").StringDecoder,Of=Symbol("EOF"),Mf=Symbol("maybeEmitEnd"),ph=Symbol("emittedEnd"),Wx=Symbol("emittingEnd"),O1=Symbol("emittedError"),Kx=Symbol("closed"),oue=Symbol("read"),Jx=Symbol("flush"),aue=Symbol("flushChunk"),Qa=Symbol("encoding"),Uf=Symbol("decoder"),Vx=Symbol("flowing"),M1=Symbol("paused"),LE=Symbol("resume"),Ts=Symbol("bufferLength"),vU=Symbol("bufferPush"),DU=Symbol("bufferShift"),Fo=Symbol("objectMode"),Ro=Symbol("destroyed"),SU=Symbol("emitData"),lue=Symbol("emitEnd"),PU=Symbol("emitEnd2"),_f=Symbol("async"),U1=e=>Promise.resolve().then(e),cue=global._MP_NO_ITERATOR_SYMBOLS_!=="1",fat=cue&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),pat=cue&&Symbol.iterator||Symbol("iterator not implemented"),hat=e=>e==="end"||e==="finish"||e==="prefinish",gat=e=>e instanceof ArrayBuffer||typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,dat=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),zx=class{constructor(t,r,o){this.src=t,this.dest=r,this.opts=o,this.ondrain=()=>t[LE](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},xU=class extends zx{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,r,o){super(t,r,o),this.proxyErrors=a=>r.emit("error",a),t.on("error",this.proxyErrors)}};Aue.exports=class uue extends iue{constructor(t){super(),this[Vx]=!1,this[M1]=!1,this.pipes=[],this.buffer=[],this[Fo]=t&&t.objectMode||!1,this[Fo]?this[Qa]=null:this[Qa]=t&&t.encoding||null,this[Qa]==="buffer"&&(this[Qa]=null),this[_f]=t&&!!t.async||!1,this[Uf]=this[Qa]?new sue(this[Qa]):null,this[Of]=!1,this[ph]=!1,this[Wx]=!1,this[Kx]=!1,this[O1]=null,this.writable=!0,this.readable=!0,this[Ts]=0,this[Ro]=!1}get bufferLength(){return this[Ts]}get encoding(){return this[Qa]}set encoding(t){if(this[Fo])throw new Error("cannot set encoding in objectMode");if(this[Qa]&&t!==this[Qa]&&(this[Uf]&&this[Uf].lastNeed||this[Ts]))throw new Error("cannot change encoding");this[Qa]!==t&&(this[Uf]=t?new sue(t):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Uf].write(r)))),this[Qa]=t}setEncoding(t){this.encoding=t}get objectMode(){return this[Fo]}set objectMode(t){this[Fo]=this[Fo]||!!t}get async(){return this[_f]}set async(t){this[_f]=this[_f]||!!t}write(t,r,o){if(this[Of])throw new Error("write after end");if(this[Ro])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(o=r,r="utf8"),r||(r="utf8");let a=this[_f]?U1:n=>n();return!this[Fo]&&!Buffer.isBuffer(t)&&(dat(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):gat(t)?t=Buffer.from(t):typeof t!="string"&&(this.objectMode=!0)),this[Fo]?(this.flowing&&this[Ts]!==0&&this[Jx](!0),this.flowing?this.emit("data",t):this[vU](t),this[Ts]!==0&&this.emit("readable"),o&&a(o),this.flowing):t.length?(typeof t=="string"&&!(r===this[Qa]&&!this[Uf].lastNeed)&&(t=Buffer.from(t,r)),Buffer.isBuffer(t)&&this[Qa]&&(t=this[Uf].write(t)),this.flowing&&this[Ts]!==0&&this[Jx](!0),this.flowing?this.emit("data",t):this[vU](t),this[Ts]!==0&&this.emit("readable"),o&&a(o),this.flowing):(this[Ts]!==0&&this.emit("readable"),o&&a(o),this.flowing)}read(t){if(this[Ro])return null;if(this[Ts]===0||t===0||t>this[Ts])return this[Mf](),null;this[Fo]&&(t=null),this.buffer.length>1&&!this[Fo]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Ts])]);let r=this[oue](t||null,this.buffer[0]);return this[Mf](),r}[oue](t,r){return t===r.length||t===null?this[DU]():(this.buffer[0]=r.slice(t),r=r.slice(0,t),this[Ts]-=t),this.emit("data",r),!this.buffer.length&&!this[Of]&&this.emit("drain"),r}end(t,r,o){return typeof t=="function"&&(o=t,t=null),typeof r=="function"&&(o=r,r="utf8"),t&&this.write(t,r),o&&this.once("end",o),this[Of]=!0,this.writable=!1,(this.flowing||!this[M1])&&this[Mf](),this}[LE](){this[Ro]||(this[M1]=!1,this[Vx]=!0,this.emit("resume"),this.buffer.length?this[Jx]():this[Of]?this[Mf]():this.emit("drain"))}resume(){return this[LE]()}pause(){this[Vx]=!1,this[M1]=!0}get destroyed(){return this[Ro]}get flowing(){return this[Vx]}get paused(){return this[M1]}[vU](t){this[Fo]?this[Ts]+=1:this[Ts]+=t.length,this.buffer.push(t)}[DU](){return this.buffer.length&&(this[Fo]?this[Ts]-=1:this[Ts]-=this.buffer[0].length),this.buffer.shift()}[Jx](t){do;while(this[aue](this[DU]()));!t&&!this.buffer.length&&!this[Of]&&this.emit("drain")}[aue](t){return t?(this.emit("data",t),this.flowing):!1}pipe(t,r){if(this[Ro])return;let o=this[ph];return r=r||{},t===nue.stdout||t===nue.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,o?r.end&&t.end():(this.pipes.push(r.proxyErrors?new xU(this,t,r):new zx(this,t,r)),this[_f]?U1(()=>this[LE]()):this[LE]()),t}unpipe(t){let r=this.pipes.find(o=>o.dest===t);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(t,r){return this.on(t,r)}on(t,r){let o=super.on(t,r);return t==="data"&&!this.pipes.length&&!this.flowing?this[LE]():t==="readable"&&this[Ts]!==0?super.emit("readable"):hat(t)&&this[ph]?(super.emit(t),this.removeAllListeners(t)):t==="error"&&this[O1]&&(this[_f]?U1(()=>r.call(this,this[O1])):r.call(this,this[O1])),o}get emittedEnd(){return this[ph]}[Mf](){!this[Wx]&&!this[ph]&&!this[Ro]&&this.buffer.length===0&&this[Of]&&(this[Wx]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Kx]&&this.emit("close"),this[Wx]=!1)}emit(t,r,...o){if(t!=="error"&&t!=="close"&&t!==Ro&&this[Ro])return;if(t==="data")return r?this[_f]?U1(()=>this[SU](r)):this[SU](r):!1;if(t==="end")return this[lue]();if(t==="close"){if(this[Kx]=!0,!this[ph]&&!this[Ro])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(t==="error"){this[O1]=r;let n=super.emit("error",r);return this[Mf](),n}else if(t==="resume"){let n=super.emit("resume");return this[Mf](),n}else if(t==="finish"||t==="prefinish"){let n=super.emit(t);return this.removeAllListeners(t),n}let a=super.emit(t,r,...o);return this[Mf](),a}[SU](t){for(let o of this.pipes)o.dest.write(t)===!1&&this.pause();let r=super.emit("data",t);return this[Mf](),r}[lue](){this[ph]||(this[ph]=!0,this.readable=!1,this[_f]?U1(()=>this[PU]()):this[PU]())}[PU](){if(this[Uf]){let r=this[Uf].end();if(r){for(let o of this.pipes)o.dest.write(r);super.emit("data",r)}}for(let r of this.pipes)r.end();let t=super.emit("end");return this.removeAllListeners("end"),t}collect(){let t=[];this[Fo]||(t.dataLength=0);let r=this.promise();return this.on("data",o=>{t.push(o),this[Fo]||(t.dataLength+=o.length)}),r.then(()=>t)}concat(){return this[Fo]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(t=>this[Fo]?Promise.reject(new Error("cannot concat in objectMode")):this[Qa]?t.join(""):Buffer.concat(t,t.dataLength))}promise(){return new Promise((t,r)=>{this.on(Ro,()=>r(new Error("stream destroyed"))),this.on("error",o=>r(o)),this.on("end",()=>t())})}[fat](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Of])return Promise.resolve({done:!0});let o=null,a=null,n=h=>{this.removeListener("data",u),this.removeListener("end",A),a(h)},u=h=>{this.removeListener("error",n),this.removeListener("end",A),this.pause(),o({value:h,done:!!this[Of]})},A=()=>{this.removeListener("error",n),this.removeListener("data",u),o({done:!0})},p=()=>n(new Error("stream destroyed"));return new Promise((h,w)=>{a=w,o=h,this.once(Ro,p),this.once("error",n),this.once("end",A),this.once("data",u)})}}}[pat](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(t){return this[Ro]?(t?this.emit("error",t):this.emit(Ro),this):(this[Ro]=!0,this.buffer.length=0,this[Ts]=0,typeof this.close=="function"&&!this[Kx]&&this.close(),t?this.emit("error",t):this.emit(Ro),this)}static isStream(t){return!!t&&(t instanceof uue||t instanceof iue||t instanceof Aat&&(typeof t.pipe=="function"||typeof t.write=="function"&&typeof t.end=="function"))}}});var pue=_((y4t,fue)=>{var mat=Ie("zlib").constants||{ZLIB_VERNUM:4736};fue.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},mat))});var GU=_(ll=>{"use strict";var RU=Ie("assert"),hh=Ie("buffer").Buffer,due=Ie("zlib"),kd=ll.constants=pue(),yat=OE(),hue=hh.concat,Fd=Symbol("_superWrite"),UE=class extends Error{constructor(t){super("zlib: "+t.message),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},Eat=Symbol("opts"),_1=Symbol("flushFlag"),gue=Symbol("finishFlushFlag"),qU=Symbol("fullFlushFlag"),ei=Symbol("handle"),Xx=Symbol("onError"),ME=Symbol("sawError"),bU=Symbol("level"),QU=Symbol("strategy"),kU=Symbol("ended"),E4t=Symbol("_defaultFullFlush"),Zx=class extends yat{constructor(t,r){if(!t||typeof t!="object")throw new TypeError("invalid options for ZlibBase constructor");super(t),this[ME]=!1,this[kU]=!1,this[Eat]=t,this[_1]=t.flush,this[gue]=t.finishFlush;try{this[ei]=new due[r](t)}catch(o){throw new UE(o)}this[Xx]=o=>{this[ME]||(this[ME]=!0,this.close(),this.emit("error",o))},this[ei].on("error",o=>this[Xx](new UE(o))),this.once("end",()=>this.close)}close(){this[ei]&&(this[ei].close(),this[ei]=null,this.emit("close"))}reset(){if(!this[ME])return RU(this[ei],"zlib binding closed"),this[ei].reset()}flush(t){this.ended||(typeof t!="number"&&(t=this[qU]),this.write(Object.assign(hh.alloc(0),{[_1]:t})))}end(t,r,o){return t&&this.write(t,r),this.flush(this[gue]),this[kU]=!0,super.end(null,null,o)}get ended(){return this[kU]}write(t,r,o){if(typeof r=="function"&&(o=r,r="utf8"),typeof t=="string"&&(t=hh.from(t,r)),this[ME])return;RU(this[ei],"zlib binding closed");let a=this[ei]._handle,n=a.close;a.close=()=>{};let u=this[ei].close;this[ei].close=()=>{},hh.concat=h=>h;let A;try{let h=typeof t[_1]=="number"?t[_1]:this[_1];A=this[ei]._processChunk(t,h),hh.concat=hue}catch(h){hh.concat=hue,this[Xx](new UE(h))}finally{this[ei]&&(this[ei]._handle=a,a.close=n,this[ei].close=u,this[ei].removeAllListeners("error"))}this[ei]&&this[ei].on("error",h=>this[Xx](new UE(h)));let p;if(A)if(Array.isArray(A)&&A.length>0){p=this[Fd](hh.from(A[0]));for(let h=1;h<A.length;h++)p=this[Fd](A[h])}else p=this[Fd](hh.from(A));return o&&o(),p}[Fd](t){return super.write(t)}},Hf=class extends Zx{constructor(t,r){t=t||{},t.flush=t.flush||kd.Z_NO_FLUSH,t.finishFlush=t.finishFlush||kd.Z_FINISH,super(t,r),this[qU]=kd.Z_FULL_FLUSH,this[bU]=t.level,this[QU]=t.strategy}params(t,r){if(!this[ME]){if(!this[ei])throw new Error("cannot switch params when binding is closed");if(!this[ei].params)throw new Error("not supported in this implementation");if(this[bU]!==t||this[QU]!==r){this.flush(kd.Z_SYNC_FLUSH),RU(this[ei],"zlib binding closed");let o=this[ei].flush;this[ei].flush=(a,n)=>{this.flush(a),n()};try{this[ei].params(t,r)}finally{this[ei].flush=o}this[ei]&&(this[bU]=t,this[QU]=r)}}}},TU=class extends Hf{constructor(t){super(t,"Deflate")}},NU=class extends Hf{constructor(t){super(t,"Inflate")}},FU=Symbol("_portable"),LU=class extends Hf{constructor(t){super(t,"Gzip"),this[FU]=t&&!!t.portable}[Fd](t){return this[FU]?(this[FU]=!1,t[9]=255,super[Fd](t)):super[Fd](t)}},OU=class extends Hf{constructor(t){super(t,"Gunzip")}},MU=class extends Hf{constructor(t){super(t,"DeflateRaw")}},UU=class extends Hf{constructor(t){super(t,"InflateRaw")}},_U=class extends Hf{constructor(t){super(t,"Unzip")}},$x=class extends Zx{constructor(t,r){t=t||{},t.flush=t.flush||kd.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||kd.BROTLI_OPERATION_FINISH,super(t,r),this[qU]=kd.BROTLI_OPERATION_FLUSH}},HU=class extends $x{constructor(t){super(t,"BrotliCompress")}},jU=class extends $x{constructor(t){super(t,"BrotliDecompress")}};ll.Deflate=TU;ll.Inflate=NU;ll.Gzip=LU;ll.Gunzip=OU;ll.DeflateRaw=MU;ll.InflateRaw=UU;ll.Unzip=_U;typeof due.BrotliCompress=="function"?(ll.BrotliCompress=HU,ll.BrotliDecompress=jU):ll.BrotliCompress=ll.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var _E=_((I4t,mue)=>{var wat=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;mue.exports=wat!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")});var eb=_((v4t,yue)=>{"use strict";var Cat=OE(),YU=_E(),WU=Symbol("slurp");yue.exports=class extends Cat{constructor(t,r,o){switch(super(),this.pause(),this.extended=r,this.globalExtended=o,this.header=t,this.startBlockSize=512*Math.ceil(t.size/512),this.blockRemain=this.startBlockSize,this.remain=t.size,this.type=t.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=YU(t.path),this.mode=t.mode,this.mode&&(this.mode=this.mode&4095),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=t.size,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=YU(t.linkpath),this.uname=t.uname,this.gname=t.gname,r&&this[WU](r),o&&this[WU](o,!0)}write(t){let r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let o=this.remain,a=this.blockRemain;return this.remain=Math.max(0,o-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:o>=r?super.write(t):super.write(t.slice(0,o))}[WU](t,r){for(let o in t)t[o]!==null&&t[o]!==void 0&&!(r&&o==="path")&&(this[o]=o==="path"||o==="linkpath"?YU(t[o]):t[o])}}});var KU=_(tb=>{"use strict";tb.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);tb.code=new Map(Array.from(tb.name).map(e=>[e[1],e[0]]))});var Iue=_((S4t,Cue)=>{"use strict";var Iat=(e,t)=>{if(Number.isSafeInteger(e))e<0?vat(e,t):Bat(e,t);else throw Error("cannot encode number outside of javascript safe integer range");return t},Bat=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--)t[r-1]=e&255,e=Math.floor(e/256)},vat=(e,t)=>{t[0]=255;var r=!1;e=e*-1;for(var o=t.length;o>1;o--){var a=e&255;e=Math.floor(e/256),r?t[o-1]=Eue(a):a===0?t[o-1]=0:(r=!0,t[o-1]=wue(a))}},Dat=e=>{let t=e[0],r=t===128?Pat(e.slice(1,e.length)):t===255?Sat(e):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},Sat=e=>{for(var t=e.length,r=0,o=!1,a=t-1;a>-1;a--){var n=e[a],u;o?u=Eue(n):n===0?u=n:(o=!0,u=wue(n)),u!==0&&(r-=u*Math.pow(256,t-a-1))}return r},Pat=e=>{for(var t=e.length,r=0,o=t-1;o>-1;o--){var a=e[o];a!==0&&(r+=a*Math.pow(256,t-o-1))}return r},Eue=e=>(255^e)&255,wue=e=>(255^e)+1&255;Cue.exports={encode:Iat,parse:Dat}});var jE=_((P4t,vue)=>{"use strict";var JU=KU(),HE=Ie("path").posix,Bue=Iue(),VU=Symbol("slurp"),cl=Symbol("type"),ZU=class{constructor(t,r,o,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[cl]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(t)?this.decode(t,r||0,o,a):t&&this.set(t)}decode(t,r,o,a){if(r||(r=0),!t||!(t.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=Rd(t,r,100),this.mode=gh(t,r+100,8),this.uid=gh(t,r+108,8),this.gid=gh(t,r+116,8),this.size=gh(t,r+124,12),this.mtime=zU(t,r+136,12),this.cksum=gh(t,r+148,12),this[VU](o),this[VU](a,!0),this[cl]=Rd(t,r+156,1),this[cl]===""&&(this[cl]="0"),this[cl]==="0"&&this.path.substr(-1)==="/"&&(this[cl]="5"),this[cl]==="5"&&(this.size=0),this.linkpath=Rd(t,r+157,100),t.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=Rd(t,r+265,32),this.gname=Rd(t,r+297,32),this.devmaj=gh(t,r+329,8),this.devmin=gh(t,r+337,8),t[r+475]!==0){let u=Rd(t,r+345,155);this.path=u+"/"+this.path}else{let u=Rd(t,r+345,130);u&&(this.path=u+"/"+this.path),this.atime=zU(t,r+476,12),this.ctime=zU(t,r+488,12)}let n=8*32;for(let u=r;u<r+148;u++)n+=t[u];for(let u=r+156;u<r+512;u++)n+=t[u];this.cksumValid=n===this.cksum,this.cksum===null&&n===8*32&&(this.nullBlock=!0)}[VU](t,r){for(let o in t)t[o]!==null&&t[o]!==void 0&&!(r&&o==="path")&&(this[o]=t[o])}encode(t,r){if(t||(t=this.block=Buffer.alloc(512),r=0),r||(r=0),!(t.length>=r+512))throw new Error("need 512 bytes for header");let o=this.ctime||this.atime?130:155,a=xat(this.path||"",o),n=a[0],u=a[1];this.needPax=a[2],this.needPax=Td(t,r,100,n)||this.needPax,this.needPax=dh(t,r+100,8,this.mode)||this.needPax,this.needPax=dh(t,r+108,8,this.uid)||this.needPax,this.needPax=dh(t,r+116,8,this.gid)||this.needPax,this.needPax=dh(t,r+124,12,this.size)||this.needPax,this.needPax=XU(t,r+136,12,this.mtime)||this.needPax,t[r+156]=this[cl].charCodeAt(0),this.needPax=Td(t,r+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",r+257,8),this.needPax=Td(t,r+265,32,this.uname)||this.needPax,this.needPax=Td(t,r+297,32,this.gname)||this.needPax,this.needPax=dh(t,r+329,8,this.devmaj)||this.needPax,this.needPax=dh(t,r+337,8,this.devmin)||this.needPax,this.needPax=Td(t,r+345,o,u)||this.needPax,t[r+475]!==0?this.needPax=Td(t,r+345,155,u)||this.needPax:(this.needPax=Td(t,r+345,130,u)||this.needPax,this.needPax=XU(t,r+476,12,this.atime)||this.needPax,this.needPax=XU(t,r+488,12,this.ctime)||this.needPax);let A=8*32;for(let p=r;p<r+148;p++)A+=t[p];for(let p=r+156;p<r+512;p++)A+=t[p];return this.cksum=A,dh(t,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(t){for(let r in t)t[r]!==null&&t[r]!==void 0&&(this[r]=t[r])}get type(){return JU.name.get(this[cl])||this[cl]}get typeKey(){return this[cl]}set type(t){JU.code.has(t)?this[cl]=JU.code.get(t):this[cl]=t}},xat=(e,t)=>{let o=e,a="",n,u=HE.parse(e).root||".";if(Buffer.byteLength(o)<100)n=[o,a,!1];else{a=HE.dirname(o),o=HE.basename(o);do Buffer.byteLength(o)<=100&&Buffer.byteLength(a)<=t?n=[o,a,!1]:Buffer.byteLength(o)>100&&Buffer.byteLength(a)<=t?n=[o.substr(0,100-1),a,!0]:(o=HE.join(HE.basename(a),o),a=HE.dirname(a));while(a!==u&&!n);n||(n=[e.substr(0,100-1),"",!0])}return n},Rd=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,""),zU=(e,t,r)=>bat(gh(e,t,r)),bat=e=>e===null?null:new Date(e*1e3),gh=(e,t,r)=>e[t]&128?Bue.parse(e.slice(t,t+r)):kat(e,t,r),Qat=e=>isNaN(e)?null:e,kat=(e,t,r)=>Qat(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),Fat={12:8589934591,8:2097151},dh=(e,t,r,o)=>o===null?!1:o>Fat[r]||o<0?(Bue.encode(o,e.slice(t,t+r)),!0):(Rat(e,t,r,o),!1),Rat=(e,t,r,o)=>e.write(Tat(o,r),t,r,"ascii"),Tat=(e,t)=>Nat(Math.floor(e).toString(8),t),Nat=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0",XU=(e,t,r,o)=>o===null?!1:dh(e,t,r,o.getTime()/1e3),Lat=new Array(156).join("\0"),Td=(e,t,r,o)=>o===null?!1:(e.write(o+Lat,t,r,"utf8"),o.length!==Buffer.byteLength(o)||o.length>r);vue.exports=ZU});var rb=_((x4t,Due)=>{"use strict";var Oat=jE(),Mat=Ie("path"),H1=class{constructor(t,r){this.atime=t.atime||null,this.charset=t.charset||null,this.comment=t.comment||null,this.ctime=t.ctime||null,this.gid=t.gid||null,this.gname=t.gname||null,this.linkpath=t.linkpath||null,this.mtime=t.mtime||null,this.path=t.path||null,this.size=t.size||null,this.uid=t.uid||null,this.uname=t.uname||null,this.dev=t.dev||null,this.ino=t.ino||null,this.nlink=t.nlink||null,this.global=r||!1}encode(){let t=this.encodeBody();if(t==="")return null;let r=Buffer.byteLength(t),o=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(o);for(let n=0;n<512;n++)a[n]=0;new Oat({path:("PaxHeader/"+Mat.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(t,512,r,"utf8");for(let n=r+512;n<a.length;n++)a[n]=0;return a}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(this[t]===null||this[t]===void 0)return"";let r=this[t]instanceof Date?this[t].getTime()/1e3:this[t],o=" "+(t==="dev"||t==="ino"||t==="nlink"?"SCHILY.":"")+t+"="+r+`
191`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};H1.parse=(e,t,r)=>new H1(Uat(_at(e),t),r);var Uat=(e,t)=>t?Object.keys(e).reduce((r,o)=>(r[o]=e[o],r),t):e,_at=e=>e.replace(/\n$/,"").split(`
192`).reduce(Hat,Object.create(null)),Hat=(e,t)=>{let r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1)return e;t=t.substr((r+" ").length);let o=t.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return e;let n=o.join("=");return e[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,e};Due.exports=H1});var qE=_((b4t,Sue)=>{Sue.exports=e=>{let t=e.length-1,r=-1;for(;t>-1&&e.charAt(t)==="/";)r=t,t--;return r===-1?e:e.slice(0,r)}});var nb=_((Q4t,Pue)=>{"use strict";Pue.exports=e=>class extends e{warn(t,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||t,o.tarCode=t,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${t}: ${r}`),o))}}});var e3=_((F4t,xue)=>{"use strict";var ib=["|","<",">","?",":"],$U=ib.map(e=>String.fromCharCode(61440+e.charCodeAt(0))),jat=new Map(ib.map((e,t)=>[e,$U[t]])),qat=new Map($U.map((e,t)=>[e,ib[t]]));xue.exports={encode:e=>ib.reduce((t,r)=>t.split(r).join(jat.get(r)),e),decode:e=>$U.reduce((t,r)=>t.split(r).join(qat.get(r)),e)}});var t3=_((R4t,Que)=>{var{isAbsolute:Gat,parse:bue}=Ie("path").win32;Que.exports=e=>{let t="",r=bue(e);for(;Gat(e)||r.root;){let o=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":r.root;e=e.substr(o.length),t+=o,r=bue(e)}return[t,e]}});var Fue=_((T4t,kue)=>{"use strict";kue.exports=(e,t,r)=>(e&=4095,r&&(e=(e|384)&-19),t&&(e&256&&(e|=64),e&32&&(e|=8),e&4&&(e|=1)),e)});var A3=_((O4t,Wue)=>{"use strict";var Uue=OE(),_ue=rb(),Hue=jE(),aA=Ie("fs"),Rue=Ie("path"),oA=_E(),Yat=qE(),jue=(e,t)=>t?(e=oA(e).replace(/^\.(\/|$)/,""),Yat(t)+"/"+e):oA(e),Wat=16*1024*1024,Tue=Symbol("process"),Nue=Symbol("file"),Lue=Symbol("directory"),n3=Symbol("symlink"),Oue=Symbol("hardlink"),j1=Symbol("header"),sb=Symbol("read"),i3=Symbol("lstat"),ob=Symbol("onlstat"),s3=Symbol("onread"),o3=Symbol("onreadlink"),a3=Symbol("openfile"),l3=Symbol("onopenfile"),mh=Symbol("close"),ab=Symbol("mode"),c3=Symbol("awaitDrain"),r3=Symbol("ondrain"),lA=Symbol("prefix"),Mue=Symbol("hadError"),que=nb(),Kat=e3(),Gue=t3(),Yue=Fue(),lb=que(class extends Uue{constructor(t,r){if(r=r||{},super(r),typeof t!="string")throw new TypeError("path is required");this.path=oA(t),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||Wat,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=oA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?oA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=Gue(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Kat.decode(this.path.replace(/\\/g,"/")),t=t.replace(/\\/g,"/")),this.absolute=oA(r.absolute||Rue.resolve(this.cwd,t)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[ob](this.statCache.get(this.absolute)):this[i3]()}emit(t,...r){return t==="error"&&(this[Mue]=!0),super.emit(t,...r)}[i3](){aA.lstat(this.absolute,(t,r)=>{if(t)return this.emit("error",t);this[ob](r)})}[ob](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=Vat(t),this.emit("stat",t),this[Tue]()}[Tue](){switch(this.type){case"File":return this[Nue]();case"Directory":return this[Lue]();case"SymbolicLink":return this[n3]();default:return this.end()}}[ab](t){return Yue(t,this.type==="Directory",this.portable)}[lA](t){return jue(t,this.prefix)}[j1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new Hue({path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,mode:this[ab](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new _ue({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Lue](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[j1](),this.end()}[n3](){aA.readlink(this.absolute,(t,r)=>{if(t)return this.emit("error",t);this[o3](r)})}[o3](t){this.linkpath=oA(t),this[j1](),this.end()}[Oue](t){this.type="Link",this.linkpath=oA(Rue.relative(this.cwd,t)),this.stat.size=0,this[j1](),this.end()}[Nue](){if(this.stat.nlink>1){let t=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(t)){let r=this.linkCache.get(t);if(r.indexOf(this.cwd)===0)return this[Oue](r)}this.linkCache.set(t,this.absolute)}if(this[j1](),this.stat.size===0)return this.end();this[a3]()}[a3](){aA.open(this.absolute,"r",(t,r)=>{if(t)return this.emit("error",t);this[l3](r)})}[l3](t){if(this.fd=t,this[Mue])return this[mh]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[sb]()}[sb](){let{fd:t,buf:r,offset:o,length:a,pos:n}=this;aA.read(t,r,o,a,n,(u,A)=>{if(u)return this[mh](()=>this.emit("error",u));this[s3](A)})}[mh](t){aA.close(this.fd,t)}[s3](t){if(t<=0&&this.remain>0){let a=new Error("encountered unexpected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[mh](()=>this.emit("error",a))}if(t>this.remain){let a=new Error("did not encounter expected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[mh](()=>this.emit("error",a))}if(t===this.remain)for(let a=t;a<this.length&&t<this.blockRemain;a++)this.buf[a+this.offset]=0,t++,this.remain++;let r=this.offset===0&&t===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+t);this.write(r)?this[r3]():this[c3](()=>this[r3]())}[c3](t){this.once("drain",t)}write(t){if(this.blockRemain<t.length){let r=new Error("writing more data than expected");return r.path=this.absolute,this.emit("error",r)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t)}[r3](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[mh](t=>t?this.emit("error",t):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[sb]()}}),u3=class extends lb{[i3](){this[ob](aA.lstatSync(this.absolute))}[n3](){this[o3](aA.readlinkSync(this.absolute))}[a3](){this[l3](aA.openSync(this.absolute,"r"))}[sb](){let t=!0;try{let{fd:r,buf:o,offset:a,length:n,pos:u}=this,A=aA.readSync(r,o,a,n,u);this[s3](A),t=!1}finally{if(t)try{this[mh](()=>{})}catch{}}}[c3](t){t()}[mh](t){aA.closeSync(this.fd),t()}},Jat=que(class extends Uue{constructor(t,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=t,this.type=t.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=oA(t.path),this.mode=this[ab](t.mode),this.uid=this.portable?null:t.uid,this.gid=this.portable?null:t.gid,this.uname=this.portable?null:t.uname,this.gname=this.portable?null:t.gname,this.size=t.size,this.mtime=this.noMtime?null:r.mtime||t.mtime,this.atime=this.portable?null:t.atime,this.ctime=this.portable?null:t.ctime,this.linkpath=oA(t.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=Gue(this.path);a&&(this.path=n,o=a)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.header=new Hue({path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.header.encode()&&!this.noPax&&super.write(new _ue({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),t.pipe(this)}[lA](t){return jue(t,this.prefix)}[ab](t){return Yue(t,this.type==="Directory",this.portable)}write(t){let r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});lb.Sync=u3;lb.Tar=Jat;var Vat=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";Wue.exports=lb});var yb=_((U4t,$ue)=>{"use strict";var db=class{constructor(t,r){this.path=t||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},zat=OE(),Xat=GU(),Zat=eb(),w3=A3(),$at=w3.Sync,elt=w3.Tar,tlt=CS(),Kue=Buffer.alloc(1024),fb=Symbol("onStat"),ub=Symbol("ended"),cA=Symbol("queue"),GE=Symbol("current"),Nd=Symbol("process"),Ab=Symbol("processing"),Jue=Symbol("processJob"),uA=Symbol("jobs"),f3=Symbol("jobDone"),pb=Symbol("addFSEntry"),Vue=Symbol("addTarEntry"),d3=Symbol("stat"),m3=Symbol("readdir"),hb=Symbol("onreaddir"),gb=Symbol("pipe"),zue=Symbol("entry"),p3=Symbol("entryOpt"),y3=Symbol("writeEntryClass"),Zue=Symbol("write"),h3=Symbol("ondrain"),mb=Ie("fs"),Xue=Ie("path"),rlt=nb(),g3=_E(),C3=rlt(class extends zat{constructor(t){super(t),t=t||Object.create(null),this.opt=t,this.file=t.file||"",this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=g3(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this[y3]=w3,typeof t.onwarn=="function"&&this.on("warn",t.onwarn),this.portable=!!t.portable,this.zip=null,t.gzip?(typeof t.gzip!="object"&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new Xat.Gzip(t.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[h3]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[h3]),this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,this.filter=typeof t.filter=="function"?t.filter:r=>!0,this[cA]=new tlt,this[uA]=0,this.jobs=+t.jobs||4,this[Ab]=!1,this[ub]=!1}[Zue](t){return super.write(t)}add(t){return this.write(t),this}end(t){return t&&this.write(t),this[ub]=!0,this[Nd](),this}write(t){if(this[ub])throw new Error("write after end");return t instanceof Zat?this[Vue](t):this[pb](t),this.flowing}[Vue](t){let r=g3(Xue.resolve(this.cwd,t.path));if(!this.filter(t.path,t))t.resume();else{let o=new db(t.path,r,!1);o.entry=new elt(t,this[p3](o)),o.entry.on("end",a=>this[f3](o)),this[uA]+=1,this[cA].push(o)}this[Nd]()}[pb](t){let r=g3(Xue.resolve(this.cwd,t));this[cA].push(new db(t,r)),this[Nd]()}[d3](t){t.pending=!0,this[uA]+=1;let r=this.follow?"stat":"lstat";mb[r](t.absolute,(o,a)=>{t.pending=!1,this[uA]-=1,o?this.emit("error",o):this[fb](t,a)})}[fb](t,r){this.statCache.set(t.absolute,r),t.stat=r,this.filter(t.path,r)||(t.ignore=!0),this[Nd]()}[m3](t){t.pending=!0,this[uA]+=1,mb.readdir(t.absolute,(r,o)=>{if(t.pending=!1,this[uA]-=1,r)return this.emit("error",r);this[hb](t,o)})}[hb](t,r){this.readdirCache.set(t.absolute,r),t.readdir=r,this[Nd]()}[Nd](){if(!this[Ab]){this[Ab]=!0;for(let t=this[cA].head;t!==null&&this[uA]<this.jobs;t=t.next)if(this[Jue](t.value),t.value.ignore){let r=t.next;this[cA].removeNode(t),t.next=r}this[Ab]=!1,this[ub]&&!this[cA].length&&this[uA]===0&&(this.zip?this.zip.end(Kue):(super.write(Kue),super.end()))}}get[GE](){return this[cA]&&this[cA].head&&this[cA].head.value}[f3](t){this[cA].shift(),this[uA]-=1,this[Nd]()}[Jue](t){if(!t.pending){if(t.entry){t===this[GE]&&!t.piped&&this[gb](t);return}if(t.stat||(this.statCache.has(t.absolute)?this[fb](t,this.statCache.get(t.absolute)):this[d3](t)),!!t.stat&&!t.ignore&&!(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir&&(this.readdirCache.has(t.absolute)?this[hb](t,this.readdirCache.get(t.absolute)):this[m3](t),!t.readdir))){if(t.entry=this[zue](t),!t.entry){t.ignore=!0;return}t===this[GE]&&!t.piped&&this[gb](t)}}}[p3](t){return{onwarn:(r,o,a)=>this.warn(r,o,a),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[zue](t){this[uA]+=1;try{return new this[y3](t.path,this[p3](t)).on("end",()=>this[f3](t)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[h3](){this[GE]&&this[GE].entry&&this[GE].entry.resume()}[gb](t){t.piped=!0,t.readdir&&t.readdir.forEach(a=>{let n=t.path,u=n==="./"?"":n.replace(/\/*$/,"/");this[pb](u+a)});let r=t.entry,o=this.zip;o?r.on("data",a=>{o.write(a)||r.pause()}):r.on("data",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),E3=class extends C3{constructor(t){super(t),this[y3]=$at}pause(){}resume(){}[d3](t){let r=this.follow?"statSync":"lstatSync";this[fb](t,mb[r](t.absolute))}[m3](t,r){this[hb](t,mb.readdirSync(t.absolute))}[gb](t){let r=t.entry,o=this.zip;t.readdir&&t.readdir.forEach(a=>{let n=t.path,u=n==="./"?"":n.replace(/\/*$/,"/");this[pb](u+a)}),o?r.on("data",a=>{o.write(a)}):r.on("data",a=>{super[Zue](a)})}};C3.Sync=E3;$ue.exports=C3});var ZE=_(G1=>{"use strict";var nlt=OE(),ilt=Ie("events").EventEmitter,ka=Ie("fs"),v3=ka.writev;if(!v3){let e=process.binding("fs"),t=e.FSReqWrap||e.FSReqCallback;v3=(r,o,a,n)=>{let u=(p,h)=>n(p,h,o),A=new t;A.oncomplete=u,e.writeBuffers(r,o,a,A)}}var zE=Symbol("_autoClose"),Kc=Symbol("_close"),q1=Symbol("_ended"),qn=Symbol("_fd"),eAe=Symbol("_finished"),Eh=Symbol("_flags"),I3=Symbol("_flush"),D3=Symbol("_handleChunk"),S3=Symbol("_makeBuf"),Bb=Symbol("_mode"),Eb=Symbol("_needDrain"),JE=Symbol("_onerror"),XE=Symbol("_onopen"),B3=Symbol("_onread"),WE=Symbol("_onwrite"),wh=Symbol("_open"),jf=Symbol("_path"),Ld=Symbol("_pos"),AA=Symbol("_queue"),KE=Symbol("_read"),tAe=Symbol("_readSize"),yh=Symbol("_reading"),wb=Symbol("_remain"),rAe=Symbol("_size"),Cb=Symbol("_write"),YE=Symbol("_writing"),Ib=Symbol("_defaultFlag"),VE=Symbol("_errored"),vb=class extends nlt{constructor(t,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof t!="string")throw new TypeError("path must be a string");this[VE]=!1,this[qn]=typeof r.fd=="number"?r.fd:null,this[jf]=t,this[tAe]=r.readSize||16*1024*1024,this[yh]=!1,this[rAe]=typeof r.size=="number"?r.size:1/0,this[wb]=this[rAe],this[zE]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[qn]=="number"?this[KE]():this[wh]()}get fd(){return this[qn]}get path(){return this[jf]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[wh](){ka.open(this[jf],"r",(t,r)=>this[XE](t,r))}[XE](t,r){t?this[JE](t):(this[qn]=r,this.emit("open",r),this[KE]())}[S3](){return Buffer.allocUnsafe(Math.min(this[tAe],this[wb]))}[KE](){if(!this[yh]){this[yh]=!0;let t=this[S3]();if(t.length===0)return process.nextTick(()=>this[B3](null,0,t));ka.read(this[qn],t,0,t.length,null,(r,o,a)=>this[B3](r,o,a))}}[B3](t,r,o){this[yh]=!1,t?this[JE](t):this[D3](r,o)&&this[KE]()}[Kc](){if(this[zE]&&typeof this[qn]=="number"){let t=this[qn];this[qn]=null,ka.close(t,r=>r?this.emit("error",r):this.emit("close"))}}[JE](t){this[yh]=!0,this[Kc](),this.emit("error",t)}[D3](t,r){let o=!1;return this[wb]-=t,t>0&&(o=super.write(t<r.length?r.slice(0,t):r)),(t===0||this[wb]<=0)&&(o=!1,this[Kc](),super.end()),o}emit(t,r){switch(t){case"prefinish":case"finish":break;case"drain":typeof this[qn]=="number"&&this[KE]();break;case"error":return this[VE]?void 0:(this[VE]=!0,super.emit(t,r));default:return super.emit(t,r)}}},P3=class extends vb{[wh](){let t=!0;try{this[XE](null,ka.openSync(this[jf],"r")),t=!1}finally{t&&this[Kc]()}}[KE](){let t=!0;try{if(!this[yh]){this[yh]=!0;do{let r=this[S3](),o=r.length===0?0:ka.readSync(this[qn],r,0,r.length,null);if(!this[D3](o,r))break}while(!0);this[yh]=!1}t=!1}finally{t&&this[Kc]()}}[Kc](){if(this[zE]&&typeof this[qn]=="number"){let t=this[qn];this[qn]=null,ka.closeSync(t),this.emit("close")}}},Db=class extends ilt{constructor(t,r){r=r||{},super(r),this.readable=!1,this.writable=!0,this[VE]=!1,this[YE]=!1,this[q1]=!1,this[Eb]=!1,this[AA]=[],this[jf]=t,this[qn]=typeof r.fd=="number"?r.fd:null,this[Bb]=r.mode===void 0?438:r.mode,this[Ld]=typeof r.start=="number"?r.start:null,this[zE]=typeof r.autoClose=="boolean"?r.autoClose:!0;let o=this[Ld]!==null?"r+":"w";this[Ib]=r.flags===void 0,this[Eh]=this[Ib]?o:r.flags,this[qn]===null&&this[wh]()}emit(t,r){if(t==="error"){if(this[VE])return;this[VE]=!0}return super.emit(t,r)}get fd(){return this[qn]}get path(){return this[jf]}[JE](t){this[Kc](),this[YE]=!0,this.emit("error",t)}[wh](){ka.open(this[jf],this[Eh],this[Bb],(t,r)=>this[XE](t,r))}[XE](t,r){this[Ib]&&this[Eh]==="r+"&&t&&t.code==="ENOENT"?(this[Eh]="w",this[wh]()):t?this[JE](t):(this[qn]=r,this.emit("open",r),this[I3]())}end(t,r){return t&&this.write(t,r),this[q1]=!0,!this[YE]&&!this[AA].length&&typeof this[qn]=="number"&&this[WE](null,0),this}write(t,r){return typeof t=="string"&&(t=Buffer.from(t,r)),this[q1]?(this.emit("error",new Error("write() after end()")),!1):this[qn]===null||this[YE]||this[AA].length?(this[AA].push(t),this[Eb]=!0,!1):(this[YE]=!0,this[Cb](t),!0)}[Cb](t){ka.write(this[qn],t,0,t.length,this[Ld],(r,o)=>this[WE](r,o))}[WE](t,r){t?this[JE](t):(this[Ld]!==null&&(this[Ld]+=r),this[AA].length?this[I3]():(this[YE]=!1,this[q1]&&!this[eAe]?(this[eAe]=!0,this[Kc](),this.emit("finish")):this[Eb]&&(this[Eb]=!1,this.emit("drain"))))}[I3](){if(this[AA].length===0)this[q1]&&this[WE](null,0);else if(this[AA].length===1)this[Cb](this[AA].pop());else{let t=this[AA];this[AA]=[],v3(this[qn],t,this[Ld],(r,o)=>this[WE](r,o))}}[Kc](){if(this[zE]&&typeof this[qn]=="number"){let t=this[qn];this[qn]=null,ka.close(t,r=>r?this.emit("error",r):this.emit("close"))}}},x3=class extends Db{[wh](){let t;if(this[Ib]&&this[Eh]==="r+")try{t=ka.openSync(this[jf],this[Eh],this[Bb])}catch(r){if(r.code==="ENOENT")return this[Eh]="w",this[wh]();throw r}else t=ka.openSync(this[jf],this[Eh],this[Bb]);this[XE](null,t)}[Kc](){if(this[zE]&&typeof this[qn]=="number"){let t=this[qn];this[qn]=null,ka.closeSync(t),this.emit("close")}}[Cb](t){let r=!0;try{this[WE](null,ka.writeSync(this[qn],t,0,t.length,this[Ld])),r=!1}finally{if(r)try{this[Kc]()}catch{}}}};G1.ReadStream=vb;G1.ReadStreamSync=P3;G1.WriteStream=Db;G1.WriteStreamSync=x3});var Fb=_((j4t,cAe)=>{"use strict";var slt=nb(),olt=jE(),alt=Ie("events"),llt=CS(),clt=1024*1024,ult=eb(),nAe=rb(),Alt=GU(),b3=Buffer.from([31,139]),Xl=Symbol("state"),Od=Symbol("writeEntry"),qf=Symbol("readEntry"),Q3=Symbol("nextEntry"),iAe=Symbol("processEntry"),Zl=Symbol("extendedHeader"),Y1=Symbol("globalExtendedHeader"),Ch=Symbol("meta"),sAe=Symbol("emitMeta"),Ai=Symbol("buffer"),Gf=Symbol("queue"),Md=Symbol("ended"),oAe=Symbol("emittedEnd"),Ud=Symbol("emit"),Fa=Symbol("unzip"),Sb=Symbol("consumeChunk"),Pb=Symbol("consumeChunkSub"),k3=Symbol("consumeBody"),aAe=Symbol("consumeMeta"),lAe=Symbol("consumeHeader"),xb=Symbol("consuming"),F3=Symbol("bufferConcat"),R3=Symbol("maybeEnd"),W1=Symbol("writing"),Ih=Symbol("aborted"),bb=Symbol("onDone"),_d=Symbol("sawValidEntry"),Qb=Symbol("sawNullBlock"),kb=Symbol("sawEOF"),flt=e=>!0;cAe.exports=slt(class extends alt{constructor(t){t=t||{},super(t),this.file=t.file||"",this[_d]=null,this.on(bb,r=>{(this[Xl]==="begin"||this[_d]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),t.ondone?this.on(bb,t.ondone):this.on(bb,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||clt,this.filter=typeof t.filter=="function"?t.filter:flt,this.writable=!0,this.readable=!1,this[Gf]=new llt,this[Ai]=null,this[qf]=null,this[Od]=null,this[Xl]="begin",this[Ch]="",this[Zl]=null,this[Y1]=null,this[Md]=!1,this[Fa]=null,this[Ih]=!1,this[Qb]=!1,this[kb]=!1,typeof t.onwarn=="function"&&this.on("warn",t.onwarn),typeof t.onentry=="function"&&this.on("entry",t.onentry)}[lAe](t,r){this[_d]===null&&(this[_d]=!1);let o;try{o=new olt(t,r,this[Zl],this[Y1])}catch(a){return this.warn("TAR_ENTRY_INVALID",a)}if(o.nullBlock)this[Qb]?(this[kb]=!0,this[Xl]==="begin"&&(this[Xl]="header"),this[Ud]("eof")):(this[Qb]=!0,this[Ud]("nullBlock"));else if(this[Qb]=!1,!o.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:o});else if(!o.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:o});else{let a=o.type;if(/^(Symbolic)?Link$/.test(a)&&!o.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:o});else if(!/^(Symbolic)?Link$/.test(a)&&o.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:o});else{let n=this[Od]=new ult(o,this[Zl],this[Y1]);if(!this[_d])if(n.remain){let u=()=>{n.invalid||(this[_d]=!0)};n.on("end",u)}else this[_d]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Ud]("ignoredEntry",n),this[Xl]="ignore",n.resume()):n.size>0&&(this[Ch]="",n.on("data",u=>this[Ch]+=u),this[Xl]="meta"):(this[Zl]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Ud]("ignoredEntry",n),this[Xl]=n.remain?"ignore":"header",n.resume()):(n.remain?this[Xl]="body":(this[Xl]="header",n.end()),this[qf]?this[Gf].push(n):(this[Gf].push(n),this[Q3]())))}}}[iAe](t){let r=!0;return t?Array.isArray(t)?this.emit.apply(this,t):(this[qf]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",o=>this[Q3]()),r=!1)):(this[qf]=null,r=!1),r}[Q3](){do;while(this[iAe](this[Gf].shift()));if(!this[Gf].length){let t=this[qf];!t||t.flowing||t.size===t.remain?this[W1]||this.emit("drain"):t.once("drain",o=>this.emit("drain"))}}[k3](t,r){let o=this[Od],a=o.blockRemain,n=a>=t.length&&r===0?t:t.slice(r,r+a);return o.write(n),o.blockRemain||(this[Xl]="header",this[Od]=null,o.end()),n.length}[aAe](t,r){let o=this[Od],a=this[k3](t,r);return this[Od]||this[sAe](o),a}[Ud](t,r,o){!this[Gf].length&&!this[qf]?this.emit(t,r,o):this[Gf].push([t,r,o])}[sAe](t){switch(this[Ud]("meta",this[Ch]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[Zl]=nAe.parse(this[Ch],this[Zl],!1);break;case"GlobalExtendedHeader":this[Y1]=nAe.parse(this[Ch],this[Y1],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[Zl]=this[Zl]||Object.create(null),this[Zl].path=this[Ch].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[Zl]=this[Zl]||Object.create(null),this[Zl].linkpath=this[Ch].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+t.type)}}abort(t){this[Ih]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t){if(this[Ih])return;if(this[Fa]===null&&t){if(this[Ai]&&(t=Buffer.concat([this[Ai],t]),this[Ai]=null),t.length<b3.length)return this[Ai]=t,!0;for(let o=0;this[Fa]===null&&o<b3.length;o++)t[o]!==b3[o]&&(this[Fa]=!1);if(this[Fa]===null){let o=this[Md];this[Md]=!1,this[Fa]=new Alt.Unzip,this[Fa].on("data",n=>this[Sb](n)),this[Fa].on("error",n=>this.abort(n)),this[Fa].on("end",n=>{this[Md]=!0,this[Sb]()}),this[W1]=!0;let a=this[Fa][o?"end":"write"](t);return this[W1]=!1,a}}this[W1]=!0,this[Fa]?this[Fa].write(t):this[Sb](t),this[W1]=!1;let r=this[Gf].length?!1:this[qf]?this[qf].flowing:!0;return!r&&!this[Gf].length&&this[qf].once("drain",o=>this.emit("drain")),r}[F3](t){t&&!this[Ih]&&(this[Ai]=this[Ai]?Buffer.concat([this[Ai],t]):t)}[R3](){if(this[Md]&&!this[oAe]&&!this[Ih]&&!this[xb]){this[oAe]=!0;let t=this[Od];if(t&&t.blockRemain){let r=this[Ai]?this[Ai].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${r} available)`,{entry:t}),this[Ai]&&t.write(this[Ai]),t.end()}this[Ud](bb)}}[Sb](t){if(this[xb])this[F3](t);else if(!t&&!this[Ai])this[R3]();else{if(this[xb]=!0,this[Ai]){this[F3](t);let r=this[Ai];this[Ai]=null,this[Pb](r)}else this[Pb](t);for(;this[Ai]&&this[Ai].length>=512&&!this[Ih]&&!this[kb];){let r=this[Ai];this[Ai]=null,this[Pb](r)}this[xb]=!1}(!this[Ai]||this[Md])&&this[R3]()}[Pb](t){let r=0,o=t.length;for(;r+512<=o&&!this[Ih]&&!this[kb];)switch(this[Xl]){case"begin":case"header":this[lAe](t,r),r+=512;break;case"ignore":case"body":r+=this[k3](t,r);break;case"meta":r+=this[aAe](t,r);break;default:throw new Error("invalid state: "+this[Xl])}r<o&&(this[Ai]?this[Ai]=Buffer.concat([t.slice(r),this[Ai]]):this[Ai]=t.slice(r))}end(t){this[Ih]||(this[Fa]?this[Fa].end(t):(this[Md]=!0,this.write(t)))}})});var Rb=_((q4t,pAe)=>{"use strict";var plt=NE(),AAe=Fb(),$E=Ie("fs"),hlt=ZE(),uAe=Ie("path"),T3=qE();pAe.exports=(e,t,r)=>{typeof e=="function"?(r=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),typeof t=="function"&&(r=t,t=null),t?t=Array.from(t):t=[];let o=plt(e);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return t.length&&dlt(o,t),o.noResume||glt(o),o.file&&o.sync?mlt(o):o.file?ylt(o,r):fAe(o)};var glt=e=>{let t=e.onentry;e.onentry=t?r=>{t(r),r.resume()}:r=>r.resume()},dlt=(e,t)=>{let r=new Map(t.map(n=>[T3(n),!0])),o=e.filter,a=(n,u)=>{let A=u||uAe.parse(n).root||".",p=n===A?!1:r.has(n)?r.get(n):a(uAe.dirname(n),A);return r.set(n,p),p};e.filter=o?(n,u)=>o(n,u)&&a(T3(n)):n=>a(T3(n))},mlt=e=>{let t=fAe(e),r=e.file,o=!0,a;try{let n=$E.statSync(r),u=e.maxReadSize||16*1024*1024;if(n.size<u)t.end($E.readFileSync(r));else{let A=0,p=Buffer.allocUnsafe(u);for(a=$E.openSync(r,"r");A<n.size;){let h=$E.readSync(a,p,0,u,A);A+=h,t.write(p.slice(0,h))}t.end()}o=!1}finally{if(o&&a)try{$E.closeSync(a)}catch{}}},ylt=(e,t)=>{let r=new AAe(e),o=e.maxReadSize||16*1024*1024,a=e.file,n=new Promise((u,A)=>{r.on("error",A),r.on("end",u),$E.stat(a,(p,h)=>{if(p)A(p);else{let w=new hlt.ReadStream(a,{readSize:o,size:h.size});w.on("error",A),w.pipe(r)}})});return t?n.then(t,t):n},fAe=e=>new AAe(e)});var EAe=_((G4t,yAe)=>{"use strict";var Elt=NE(),Tb=yb(),hAe=ZE(),gAe=Rb(),dAe=Ie("path");yAe.exports=(e,t,r)=>{if(typeof t=="function"&&(r=t),Array.isArray(e)&&(t=e,e={}),!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);let o=Elt(e);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return o.file&&o.sync?wlt(o,t):o.file?Clt(o,t,r):o.sync?Ilt(o,t):Blt(o,t)};var wlt=(e,t)=>{let r=new Tb.Sync(e),o=new hAe.WriteStreamSync(e.file,{mode:e.mode||438});r.pipe(o),mAe(r,t)},Clt=(e,t,r)=>{let o=new Tb(e),a=new hAe.WriteStream(e.file,{mode:e.mode||438});o.pipe(a);let n=new Promise((u,A)=>{a.on("error",A),a.on("close",u),o.on("error",A)});return N3(o,t),r?n.then(r,r):n},mAe=(e,t)=>{t.forEach(r=>{r.charAt(0)==="@"?gAe({file:dAe.resolve(e.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:o=>e.add(o)}):e.add(r)}),e.end()},N3=(e,t)=>{for(;t.length;){let r=t.shift();if(r.charAt(0)==="@")return gAe({file:dAe.resolve(e.cwd,r.substr(1)),noResume:!0,onentry:o=>e.add(o)}).then(o=>N3(e,t));e.add(r)}e.end()},Ilt=(e,t)=>{let r=new Tb.Sync(e);return mAe(r,t),r},Blt=(e,t)=>{let r=new Tb(e);return N3(r,t),r}});var L3=_((Y4t,SAe)=>{"use strict";var vlt=NE(),wAe=yb(),ul=Ie("fs"),CAe=ZE(),IAe=Rb(),BAe=Ie("path"),vAe=jE();SAe.exports=(e,t,r)=>{let o=vlt(e);if(!o.file)throw new TypeError("file is required");if(o.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),o.sync?Dlt(o,t):Plt(o,t,r)};var Dlt=(e,t)=>{let r=new wAe.Sync(e),o=!0,a,n;try{try{a=ul.openSync(e.file,"r+")}catch(p){if(p.code==="ENOENT")a=ul.openSync(e.file,"w+");else throw p}let u=ul.fstatSync(a),A=Buffer.alloc(512);e:for(n=0;n<u.size;n+=512){for(let w=0,I=0;w<512;w+=I){if(I=ul.readSync(a,A,w,A.length-w,n+w),n===0&&A[0]===31&&A[1]===139)throw new Error("cannot append to compressed archives");if(!I)break e}let p=new vAe(A);if(!p.cksumValid)break;let h=512*Math.ceil(p.size/512);if(n+h+512>u.size)break;n+=h,e.mtimeCache&&e.mtimeCache.set(p.path,p.mtime)}o=!1,Slt(e,r,n,a,t)}finally{if(o)try{ul.closeSync(a)}catch{}}},Slt=(e,t,r,o,a)=>{let n=new CAe.WriteStreamSync(e.file,{fd:o,start:r});t.pipe(n),xlt(t,a)},Plt=(e,t,r)=>{t=Array.from(t);let o=new wAe(e),a=(u,A,p)=>{let h=(E,R)=>{E?ul.close(u,N=>p(E)):p(null,R)},w=0;if(A===0)return h(null,0);let I=0,v=Buffer.alloc(512),b=(E,R)=>{if(E)return h(E);if(I+=R,I<512&&R)return ul.read(u,v,I,v.length-I,w+I,b);if(w===0&&v[0]===31&&v[1]===139)return h(new Error("cannot append to compressed archives"));if(I<512)return h(null,w);let N=new vAe(v);if(!N.cksumValid)return h(null,w);let U=512*Math.ceil(N.size/512);if(w+U+512>A||(w+=U+512,w>=A))return h(null,w);e.mtimeCache&&e.mtimeCache.set(N.path,N.mtime),I=0,ul.read(u,v,0,512,w,b)};ul.read(u,v,0,512,w,b)},n=new Promise((u,A)=>{o.on("error",A);let p="r+",h=(w,I)=>{if(w&&w.code==="ENOENT"&&p==="r+")return p="w+",ul.open(e.file,p,h);if(w)return A(w);ul.fstat(I,(v,b)=>{if(v)return ul.close(I,()=>A(v));a(I,b.size,(E,R)=>{if(E)return A(E);let N=new CAe.WriteStream(e.file,{fd:I,start:R});o.pipe(N),N.on("error",A),N.on("close",u),DAe(o,t)})})};ul.open(e.file,p,h)});return r?n.then(r,r):n},xlt=(e,t)=>{t.forEach(r=>{r.charAt(0)==="@"?IAe({file:BAe.resolve(e.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:o=>e.add(o)}):e.add(r)}),e.end()},DAe=(e,t)=>{for(;t.length;){let r=t.shift();if(r.charAt(0)==="@")return IAe({file:BAe.resolve(e.cwd,r.substr(1)),noResume:!0,onentry:o=>e.add(o)}).then(o=>DAe(e,t));e.add(r)}e.end()}});var xAe=_((W4t,PAe)=>{"use strict";var blt=NE(),Qlt=L3();PAe.exports=(e,t,r)=>{let o=blt(e);if(!o.file)throw new TypeError("file is required");if(o.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),klt(o),Qlt(o,t,r)};var klt=e=>{let t=e.filter;e.mtimeCache||(e.mtimeCache=new Map),e.filter=t?(r,o)=>t(r,o)&&!(e.mtimeCache.get(r)>o.mtime):(r,o)=>!(e.mtimeCache.get(r)>o.mtime)}});var kAe=_((K4t,QAe)=>{var{promisify:bAe}=Ie("util"),Bh=Ie("fs"),Flt=e=>{if(!e)e={mode:511,fs:Bh};else if(typeof e=="object")e={mode:511,fs:Bh,...e};else if(typeof e=="number")e={mode:e,fs:Bh};else if(typeof e=="string")e={mode:parseInt(e,8),fs:Bh};else throw new TypeError("invalid options argument");return e.mkdir=e.mkdir||e.fs.mkdir||Bh.mkdir,e.mkdirAsync=bAe(e.mkdir),e.stat=e.stat||e.fs.stat||Bh.stat,e.statAsync=bAe(e.stat),e.statSync=e.statSync||e.fs.statSync||Bh.statSync,e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||Bh.mkdirSync,e};QAe.exports=Flt});var RAe=_((J4t,FAe)=>{var Rlt=process.platform,{resolve:Tlt,parse:Nlt}=Ie("path"),Llt=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=Tlt(e),Rlt==="win32"){let t=/[*|"<>?:]/,{root:r}=Nlt(e);if(t.test(e.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e};FAe.exports=Llt});var MAe=_((V4t,OAe)=>{var{dirname:TAe}=Ie("path"),NAe=(e,t,r=void 0)=>r===t?Promise.resolve():e.statAsync(t).then(o=>o.isDirectory()?r:void 0,o=>o.code==="ENOENT"?NAe(e,TAe(t),t):void 0),LAe=(e,t,r=void 0)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(o){return o.code==="ENOENT"?LAe(e,TAe(t),t):void 0}};OAe.exports={findMade:NAe,findMadeSync:LAe}});var U3=_((z4t,_Ae)=>{var{dirname:UAe}=Ie("path"),O3=(e,t,r)=>{t.recursive=!1;let o=UAe(e);return o===e?t.mkdirAsync(e,t).catch(a=>{if(a.code!=="EISDIR")throw a}):t.mkdirAsync(e,t).then(()=>r||e,a=>{if(a.code==="ENOENT")return O3(o,t).then(n=>O3(e,t,n));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;return t.statAsync(e).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},M3=(e,t,r)=>{let o=UAe(e);if(t.recursive=!1,o===e)try{return t.mkdirSync(e,t)}catch(a){if(a.code!=="EISDIR")throw a;return}try{return t.mkdirSync(e,t),r||e}catch(a){if(a.code==="ENOENT")return M3(e,t,M3(o,t,r));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;try{if(!t.statSync(e).isDirectory())throw a}catch{throw a}}};_Ae.exports={mkdirpManual:O3,mkdirpManualSync:M3}});var qAe=_((X4t,jAe)=>{var{dirname:HAe}=Ie("path"),{findMade:Olt,findMadeSync:Mlt}=MAe(),{mkdirpManual:Ult,mkdirpManualSync:_lt}=U3(),Hlt=(e,t)=>(t.recursive=!0,HAe(e)===e?t.mkdirAsync(e,t):Olt(t,e).then(o=>t.mkdirAsync(e,t).then(()=>o).catch(a=>{if(a.code==="ENOENT")return Ult(e,t);throw a}))),jlt=(e,t)=>{if(t.recursive=!0,HAe(e)===e)return t.mkdirSync(e,t);let o=Mlt(t,e);try{return t.mkdirSync(e,t),o}catch(a){if(a.code==="ENOENT")return _lt(e,t);throw a}};jAe.exports={mkdirpNative:Hlt,mkdirpNativeSync:jlt}});var KAe=_((Z4t,WAe)=>{var GAe=Ie("fs"),qlt=process.version,_3=qlt.replace(/^v/,"").split("."),YAe=+_3[0]>10||+_3[0]==10&&+_3[1]>=12,Glt=YAe?e=>e.mkdir===GAe.mkdir:()=>!1,Ylt=YAe?e=>e.mkdirSync===GAe.mkdirSync:()=>!1;WAe.exports={useNative:Glt,useNativeSync:Ylt}});var $Ae=_(($4t,ZAe)=>{var ew=kAe(),tw=RAe(),{mkdirpNative:JAe,mkdirpNativeSync:VAe}=qAe(),{mkdirpManual:zAe,mkdirpManualSync:XAe}=U3(),{useNative:Wlt,useNativeSync:Klt}=KAe(),rw=(e,t)=>(e=tw(e),t=ew(t),Wlt(t)?JAe(e,t):zAe(e,t)),Jlt=(e,t)=>(e=tw(e),t=ew(t),Klt(t)?VAe(e,t):XAe(e,t));rw.sync=Jlt;rw.native=(e,t)=>JAe(tw(e),ew(t));rw.manual=(e,t)=>zAe(tw(e),ew(t));rw.nativeSync=(e,t)=>VAe(tw(e),ew(t));rw.manualSync=(e,t)=>XAe(tw(e),ew(t));ZAe.exports=rw});var ofe=_((eUt,sfe)=>{"use strict";var $l=Ie("fs"),Hd=Ie("path"),Vlt=$l.lchown?"lchown":"chown",zlt=$l.lchownSync?"lchownSync":"chownSync",tfe=$l.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),efe=(e,t,r)=>{try{return $l[zlt](e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Xlt=(e,t,r)=>{try{return $l.chownSync(e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Zlt=tfe?(e,t,r,o)=>a=>{!a||a.code!=="EISDIR"?o(a):$l.chown(e,t,r,o)}:(e,t,r,o)=>o,H3=tfe?(e,t,r)=>{try{return efe(e,t,r)}catch(o){if(o.code!=="EISDIR")throw o;Xlt(e,t,r)}}:(e,t,r)=>efe(e,t,r),$lt=process.version,rfe=(e,t,r)=>$l.readdir(e,t,r),ect=(e,t)=>$l.readdirSync(e,t);/^v4\./.test($lt)&&(rfe=(e,t,r)=>$l.readdir(e,r));var Nb=(e,t,r,o)=>{$l[Vlt](e,t,r,Zlt(e,t,r,a=>{o(a&&a.code!=="ENOENT"?a:null)}))},nfe=(e,t,r,o,a)=>{if(typeof t=="string")return $l.lstat(Hd.resolve(e,t),(n,u)=>{if(n)return a(n.code!=="ENOENT"?n:null);u.name=t,nfe(e,u,r,o,a)});if(t.isDirectory())j3(Hd.resolve(e,t.name),r,o,n=>{if(n)return a(n);let u=Hd.resolve(e,t.name);Nb(u,r,o,a)});else{let n=Hd.resolve(e,t.name);Nb(n,r,o,a)}},j3=(e,t,r,o)=>{rfe(e,{withFileTypes:!0},(a,n)=>{if(a){if(a.code==="ENOENT")return o();if(a.code!=="ENOTDIR"&&a.code!=="ENOTSUP")return o(a)}if(a||!n.length)return Nb(e,t,r,o);let u=n.length,A=null,p=h=>{if(!A){if(h)return o(A=h);if(--u===0)return Nb(e,t,r,o)}};n.forEach(h=>nfe(e,h,t,r,p))})},tct=(e,t,r,o)=>{if(typeof t=="string")try{let a=$l.lstatSync(Hd.resolve(e,t));a.name=t,t=a}catch(a){if(a.code==="ENOENT")return;throw a}t.isDirectory()&&ife(Hd.resolve(e,t.name),r,o),H3(Hd.resolve(e,t.name),r,o)},ife=(e,t,r)=>{let o;try{o=ect(e,{withFileTypes:!0})}catch(a){if(a.code==="ENOENT")return;if(a.code==="ENOTDIR"||a.code==="ENOTSUP")return H3(e,t,r);throw a}return o&&o.length&&o.forEach(a=>tct(e,a,t,r)),H3(e,t,r)};sfe.exports=j3;j3.sync=ife});var ufe=_((tUt,q3)=>{"use strict";var afe=$Ae(),ec=Ie("fs"),Lb=Ie("path"),lfe=ofe(),Jc=_E(),Ob=class extends Error{constructor(t,r){super("Cannot extract through symbolic link"),this.path=r,this.symlink=t}get name(){return"SylinkError"}},Mb=class extends Error{constructor(t,r){super(r+": Cannot cd into '"+t+"'"),this.path=t,this.code=r}get name(){return"CwdError"}},Ub=(e,t)=>e.get(Jc(t)),K1=(e,t,r)=>e.set(Jc(t),r),rct=(e,t)=>{ec.stat(e,(r,o)=>{(r||!o.isDirectory())&&(r=new Mb(e,r&&r.code||"ENOTDIR")),t(r)})};q3.exports=(e,t,r)=>{e=Jc(e);let o=t.umask,a=t.mode|448,n=(a&o)!==0,u=t.uid,A=t.gid,p=typeof u=="number"&&typeof A=="number"&&(u!==t.processUid||A!==t.processGid),h=t.preserve,w=t.unlink,I=t.cache,v=Jc(t.cwd),b=(N,U)=>{N?r(N):(K1(I,e,!0),U&&p?lfe(U,u,A,V=>b(V)):n?ec.chmod(e,a,r):r())};if(I&&Ub(I,e)===!0)return b();if(e===v)return rct(e,b);if(h)return afe(e,{mode:a}).then(N=>b(null,N),b);let R=Jc(Lb.relative(v,e)).split("/");_b(v,R,a,I,w,v,null,b)};var _b=(e,t,r,o,a,n,u,A)=>{if(!t.length)return A(null,u);let p=t.shift(),h=Jc(Lb.resolve(e+"/"+p));if(Ub(o,h))return _b(h,t,r,o,a,n,u,A);ec.mkdir(h,r,cfe(h,t,r,o,a,n,u,A))},cfe=(e,t,r,o,a,n,u,A)=>p=>{p?ec.lstat(e,(h,w)=>{if(h)h.path=h.path&&Jc(h.path),A(h);else if(w.isDirectory())_b(e,t,r,o,a,n,u,A);else if(a)ec.unlink(e,I=>{if(I)return A(I);ec.mkdir(e,r,cfe(e,t,r,o,a,n,u,A))});else{if(w.isSymbolicLink())return A(new Ob(e,e+"/"+t.join("/")));A(p)}}):(u=u||e,_b(e,t,r,o,a,n,u,A))},nct=e=>{let t=!1,r="ENOTDIR";try{t=ec.statSync(e).isDirectory()}catch(o){r=o.code}finally{if(!t)throw new Mb(e,r)}};q3.exports.sync=(e,t)=>{e=Jc(e);let r=t.umask,o=t.mode|448,a=(o&r)!==0,n=t.uid,u=t.gid,A=typeof n=="number"&&typeof u=="number"&&(n!==t.processUid||u!==t.processGid),p=t.preserve,h=t.unlink,w=t.cache,I=Jc(t.cwd),v=N=>{K1(w,e,!0),N&&A&&lfe.sync(N,n,u),a&&ec.chmodSync(e,o)};if(w&&Ub(w,e)===!0)return v();if(e===I)return nct(I),v();if(p)return v(afe.sync(e,o));let E=Jc(Lb.relative(I,e)).split("/"),R=null;for(let N=E.shift(),U=I;N&&(U+="/"+N);N=E.shift())if(U=Jc(Lb.resolve(U)),!Ub(w,U))try{ec.mkdirSync(U,o),R=R||U,K1(w,U,!0)}catch{let ee=ec.lstatSync(U);if(ee.isDirectory()){K1(w,U,!0);continue}else if(h){ec.unlinkSync(U),ec.mkdirSync(U,o),R=R||U,K1(w,U,!0);continue}else if(ee.isSymbolicLink())return new Ob(U,U+"/"+E.join("/"))}return v(R)}});var Y3=_((rUt,Afe)=>{var G3=Object.create(null),{hasOwnProperty:ict}=Object.prototype;Afe.exports=e=>(ict.call(G3,e)||(G3[e]=e.normalize("NFKD")),G3[e])});var gfe=_((nUt,hfe)=>{var ffe=Ie("assert"),sct=Y3(),oct=qE(),{join:pfe}=Ie("path"),act=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,lct=act==="win32";hfe.exports=()=>{let e=new Map,t=new Map,r=h=>h.split("/").slice(0,-1).reduce((I,v)=>(I.length&&(v=pfe(I[I.length-1],v)),I.push(v||"/"),I),[]),o=new Set,a=h=>{let w=t.get(h);if(!w)throw new Error("function does not have any path reservations");return{paths:w.paths.map(I=>e.get(I)),dirs:[...w.dirs].map(I=>e.get(I))}},n=h=>{let{paths:w,dirs:I}=a(h);return w.every(v=>v[0]===h)&&I.every(v=>v[0]instanceof Set&&v[0].has(h))},u=h=>o.has(h)||!n(h)?!1:(o.add(h),h(()=>A(h)),!0),A=h=>{if(!o.has(h))return!1;let{paths:w,dirs:I}=t.get(h),v=new Set;return w.forEach(b=>{let E=e.get(b);ffe.equal(E[0],h),E.length===1?e.delete(b):(E.shift(),typeof E[0]=="function"?v.add(E[0]):E[0].forEach(R=>v.add(R)))}),I.forEach(b=>{let E=e.get(b);ffe(E[0]instanceof Set),E[0].size===1&&E.length===1?e.delete(b):E[0].size===1?(E.shift(),v.add(E[0])):E[0].delete(h)}),o.delete(h),v.forEach(b=>u(b)),!0};return{check:n,reserve:(h,w)=>{h=lct?["win32 parallelization disabled"]:h.map(v=>sct(oct(pfe(v))).toLowerCase());let I=new Set(h.map(v=>r(v)).reduce((v,b)=>v.concat(b)));return t.set(w,{dirs:I,paths:h}),h.forEach(v=>{let b=e.get(v);b?b.push(w):e.set(v,[w])}),I.forEach(v=>{let b=e.get(v);b?b[b.length-1]instanceof Set?b[b.length-1].add(w):b.push(new Set([w])):e.set(v,[new Set([w])])}),u(w)}}}});var yfe=_((iUt,mfe)=>{var cct=process.platform,uct=cct==="win32",Act=global.__FAKE_TESTING_FS__||Ie("fs"),{O_CREAT:fct,O_TRUNC:pct,O_WRONLY:hct,UV_FS_O_FILEMAP:dfe=0}=Act.constants,gct=uct&&!!dfe,dct=512*1024,mct=dfe|pct|fct|hct;mfe.exports=gct?e=>e<dct?mct:"w":()=>"w"});var e_=_((sUt,Ffe)=>{"use strict";var yct=Ie("assert"),Ect=Fb(),Bn=Ie("fs"),wct=ZE(),Yf=Ie("path"),bfe=ufe(),Efe=e3(),Cct=gfe(),Ict=t3(),Al=_E(),Bct=qE(),vct=Y3(),wfe=Symbol("onEntry"),J3=Symbol("checkFs"),Cfe=Symbol("checkFs2"),qb=Symbol("pruneCache"),V3=Symbol("isReusable"),tc=Symbol("makeFs"),z3=Symbol("file"),X3=Symbol("directory"),Gb=Symbol("link"),Ife=Symbol("symlink"),Bfe=Symbol("hardlink"),vfe=Symbol("unsupported"),Dfe=Symbol("checkPath"),vh=Symbol("mkdir"),To=Symbol("onError"),Hb=Symbol("pending"),Sfe=Symbol("pend"),nw=Symbol("unpend"),W3=Symbol("ended"),K3=Symbol("maybeClose"),Z3=Symbol("skip"),J1=Symbol("doChown"),V1=Symbol("uid"),z1=Symbol("gid"),X1=Symbol("checkedCwd"),Qfe=Ie("crypto"),kfe=yfe(),Dct=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Z1=Dct==="win32",Sct=(e,t)=>{if(!Z1)return Bn.unlink(e,t);let r=e+".DELETE."+Qfe.randomBytes(16).toString("hex");Bn.rename(e,r,o=>{if(o)return t(o);Bn.unlink(r,t)})},Pct=e=>{if(!Z1)return Bn.unlinkSync(e);let t=e+".DELETE."+Qfe.randomBytes(16).toString("hex");Bn.renameSync(e,t),Bn.unlinkSync(t)},Pfe=(e,t,r)=>e===e>>>0?e:t===t>>>0?t:r,xfe=e=>vct(Bct(Al(e))).toLowerCase(),xct=(e,t)=>{t=xfe(t);for(let r of e.keys()){let o=xfe(r);(o===t||o.indexOf(t+"/")===0)&&e.delete(r)}},bct=e=>{for(let t of e.keys())e.delete(t)},$1=class extends Ect{constructor(t){if(t||(t={}),t.ondone=r=>{this[W3]=!0,this[K3]()},super(t),this[X1]=!1,this.reservations=Cct(),this.transform=typeof t.transform=="function"?t.transform:null,this.writable=!0,this.readable=!1,this[Hb]=0,this[W3]=!1,this.dirCache=t.dirCache||new Map,typeof t.uid=="number"||typeof t.gid=="number"){if(typeof t.uid!="number"||typeof t.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;t.preserveOwner===void 0&&typeof t.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=t.forceChown===!0,this.win32=!!t.win32||Z1,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=Al(Yf.resolve(t.cwd||process.cwd())),this.strip=+t.strip||0,this.processUmask=t.noChmod?0:process.umask(),this.umask=typeof t.umask=="number"?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",r=>this[wfe](r))}warn(t,r,o={}){return(t==="TAR_BAD_ARCHIVE"||t==="TAR_ABORT")&&(o.recoverable=!1),super.warn(t,r,o)}[K3](){this[W3]&&this[Hb]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[Dfe](t){if(this.strip){let r=Al(t.path).split("/");if(r.length<this.strip)return!1;if(t.path=r.slice(this.strip).join("/"),t.type==="Link"){let o=Al(t.linkpath).split("/");if(o.length>=this.strip)t.linkpath=o.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=Al(t.path),o=r.split("/");if(o.includes("..")||Z1&&/^[a-z]:\.\.$/i.test(o[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:t,path:r}),!1;let[a,n]=Ict(r);a&&(t.path=n,this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:t,path:r}))}if(Yf.isAbsolute(t.path)?t.absolute=Al(Yf.resolve(t.path)):t.absolute=Al(Yf.resolve(this.cwd,t.path)),!this.preservePaths&&t.absolute.indexOf(this.cwd+"/")!==0&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:Al(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&t.type!=="Directory"&&t.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=Yf.win32.parse(t.absolute);t.absolute=r+Efe.encode(t.absolute.substr(r.length));let{root:o}=Yf.win32.parse(t.path);t.path=o+Efe.encode(t.path.substr(o.length))}return!0}[wfe](t){if(!this[Dfe](t))return t.resume();switch(yct.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=t.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[J3](t);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[vfe](t)}}[To](t,r){t.name==="CwdError"?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:r}),this[nw](),r.resume())}[vh](t,r,o){bfe(Al(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},o)}[J1](t){return this.forceChown||this.preserveOwner&&(typeof t.uid=="number"&&t.uid!==this.processUid||typeof t.gid=="number"&&t.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[V1](t){return Pfe(this.uid,t.uid,this.processUid)}[z1](t){return Pfe(this.gid,t.gid,this.processGid)}[z3](t,r){let o=t.mode&4095||this.fmode,a=new wct.WriteStream(t.absolute,{flags:kfe(t.size),mode:o,autoClose:!1});a.on("error",p=>{a.fd&&Bn.close(a.fd,()=>{}),a.write=()=>!0,this[To](p,t),r()});let n=1,u=p=>{if(p){a.fd&&Bn.close(a.fd,()=>{}),this[To](p,t),r();return}--n===0&&Bn.close(a.fd,h=>{h?this[To](h,t):this[nw](),r()})};a.on("finish",p=>{let h=t.absolute,w=a.fd;if(t.mtime&&!this.noMtime){n++;let I=t.atime||new Date,v=t.mtime;Bn.futimes(w,I,v,b=>b?Bn.utimes(h,I,v,E=>u(E&&b)):u())}if(this[J1](t)){n++;let I=this[V1](t),v=this[z1](t);Bn.fchown(w,I,v,b=>b?Bn.chown(h,I,v,E=>u(E&&b)):u())}u()});let A=this.transform&&this.transform(t)||t;A!==t&&(A.on("error",p=>{this[To](p,t),r()}),t.pipe(A)),A.pipe(a)}[X3](t,r){let o=t.mode&4095||this.dmode;this[vh](t.absolute,o,a=>{if(a){this[To](a,t),r();return}let n=1,u=A=>{--n===0&&(r(),this[nw](),t.resume())};t.mtime&&!this.noMtime&&(n++,Bn.utimes(t.absolute,t.atime||new Date,t.mtime,u)),this[J1](t)&&(n++,Bn.chown(t.absolute,this[V1](t),this[z1](t),u)),u()})}[vfe](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[Ife](t,r){this[Gb](t,t.linkpath,"symlink",r)}[Bfe](t,r){let o=Al(Yf.resolve(this.cwd,t.linkpath));this[Gb](t,o,"link",r)}[Sfe](){this[Hb]++}[nw](){this[Hb]--,this[K3]()}[Z3](t){this[nw](),t.resume()}[V3](t,r){return t.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Z1}[J3](t){this[Sfe]();let r=[t.path];t.linkpath&&r.push(t.linkpath),this.reservations.reserve(r,o=>this[Cfe](t,o))}[qb](t){t.type==="SymbolicLink"?bct(this.dirCache):t.type!=="Directory"&&xct(this.dirCache,t.absolute)}[Cfe](t,r){this[qb](t);let o=A=>{this[qb](t),r(A)},a=()=>{this[vh](this.cwd,this.dmode,A=>{if(A){this[To](A,t),o();return}this[X1]=!0,n()})},n=()=>{if(t.absolute!==this.cwd){let A=Al(Yf.dirname(t.absolute));if(A!==this.cwd)return this[vh](A,this.dmode,p=>{if(p){this[To](p,t),o();return}u()})}u()},u=()=>{Bn.lstat(t.absolute,(A,p)=>{if(p&&(this.keep||this.newer&&p.mtime>t.mtime)){this[Z3](t),o();return}if(A||this[V3](t,p))return this[tc](null,t,o);if(p.isDirectory()){if(t.type==="Directory"){let h=!this.noChmod&&t.mode&&(p.mode&4095)!==t.mode,w=I=>this[tc](I,t,o);return h?Bn.chmod(t.absolute,t.mode,w):w()}if(t.absolute!==this.cwd)return Bn.rmdir(t.absolute,h=>this[tc](h,t,o))}if(t.absolute===this.cwd)return this[tc](null,t,o);Sct(t.absolute,h=>this[tc](h,t,o))})};this[X1]?n():a()}[tc](t,r,o){if(t){this[To](t,r),o();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[z3](r,o);case"Link":return this[Bfe](r,o);case"SymbolicLink":return this[Ife](r,o);case"Directory":case"GNUDumpDir":return this[X3](r,o)}}[Gb](t,r,o,a){Bn[o](r,t.absolute,n=>{n?this[To](n,t):(this[nw](),t.resume()),a()})}},jb=e=>{try{return[null,e()]}catch(t){return[t,null]}},$3=class extends $1{[tc](t,r){return super[tc](t,r,()=>{})}[J3](t){if(this[qb](t),!this[X1]){let n=this[vh](this.cwd,this.dmode);if(n)return this[To](n,t);this[X1]=!0}if(t.absolute!==this.cwd){let n=Al(Yf.dirname(t.absolute));if(n!==this.cwd){let u=this[vh](n,this.dmode);if(u)return this[To](u,t)}}let[r,o]=jb(()=>Bn.lstatSync(t.absolute));if(o&&(this.keep||this.newer&&o.mtime>t.mtime))return this[Z3](t);if(r||this[V3](t,o))return this[tc](null,t);if(o.isDirectory()){if(t.type==="Directory"){let u=!this.noChmod&&t.mode&&(o.mode&4095)!==t.mode,[A]=u?jb(()=>{Bn.chmodSync(t.absolute,t.mode)}):[];return this[tc](A,t)}let[n]=jb(()=>Bn.rmdirSync(t.absolute));this[tc](n,t)}let[a]=t.absolute===this.cwd?[]:jb(()=>Pct(t.absolute));this[tc](a,t)}[z3](t,r){let o=t.mode&4095||this.fmode,a=A=>{let p;try{Bn.closeSync(n)}catch(h){p=h}(A||p)&&this[To](A||p,t),r()},n;try{n=Bn.openSync(t.absolute,kfe(t.size),o)}catch(A){return a(A)}let u=this.transform&&this.transform(t)||t;u!==t&&(u.on("error",A=>this[To](A,t)),t.pipe(u)),u.on("data",A=>{try{Bn.writeSync(n,A,0,A.length)}catch(p){a(p)}}),u.on("end",A=>{let p=null;if(t.mtime&&!this.noMtime){let h=t.atime||new Date,w=t.mtime;try{Bn.futimesSync(n,h,w)}catch(I){try{Bn.utimesSync(t.absolute,h,w)}catch{p=I}}}if(this[J1](t)){let h=this[V1](t),w=this[z1](t);try{Bn.fchownSync(n,h,w)}catch(I){try{Bn.chownSync(t.absolute,h,w)}catch{p=p||I}}}a(p)})}[X3](t,r){let o=t.mode&4095||this.dmode,a=this[vh](t.absolute,o);if(a){this[To](a,t),r();return}if(t.mtime&&!this.noMtime)try{Bn.utimesSync(t.absolute,t.atime||new Date,t.mtime)}catch{}if(this[J1](t))try{Bn.chownSync(t.absolute,this[V1](t),this[z1](t))}catch{}r(),t.resume()}[vh](t,r){try{return bfe.sync(Al(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(o){return o}}[Gb](t,r,o,a){try{Bn[o+"Sync"](r,t.absolute),a(),t.resume()}catch(n){return this[To](n,t)}}};$1.Sync=$3;Ffe.exports=$1});var Ofe=_((oUt,Lfe)=>{"use strict";var Qct=NE(),Yb=e_(),Tfe=Ie("fs"),Nfe=ZE(),Rfe=Ie("path"),t_=qE();Lfe.exports=(e,t,r)=>{typeof e=="function"?(r=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),typeof t=="function"&&(r=t,t=null),t?t=Array.from(t):t=[];let o=Qct(e);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return t.length&&kct(o,t),o.file&&o.sync?Fct(o):o.file?Rct(o,r):o.sync?Tct(o):Nct(o)};var kct=(e,t)=>{let r=new Map(t.map(n=>[t_(n),!0])),o=e.filter,a=(n,u)=>{let A=u||Rfe.parse(n).root||".",p=n===A?!1:r.has(n)?r.get(n):a(Rfe.dirname(n),A);return r.set(n,p),p};e.filter=o?(n,u)=>o(n,u)&&a(t_(n)):n=>a(t_(n))},Fct=e=>{let t=new Yb.Sync(e),r=e.file,o=Tfe.statSync(r),a=e.maxReadSize||16*1024*1024;new Nfe.ReadStreamSync(r,{readSize:a,size:o.size}).pipe(t)},Rct=(e,t)=>{let r=new Yb(e),o=e.maxReadSize||16*1024*1024,a=e.file,n=new Promise((u,A)=>{r.on("error",A),r.on("close",u),Tfe.stat(a,(p,h)=>{if(p)A(p);else{let w=new Nfe.ReadStream(a,{readSize:o,size:h.size});w.on("error",A),w.pipe(r)}})});return t?n.then(t,t):n},Tct=e=>new Yb.Sync(e),Nct=e=>new Yb(e)});var Mfe=_(As=>{"use strict";As.c=As.create=EAe();As.r=As.replace=L3();As.t=As.list=Rb();As.u=As.update=xAe();As.x=As.extract=Ofe();As.Pack=yb();As.Unpack=e_();As.Parse=Fb();As.ReadEntry=eb();As.WriteEntry=A3();As.Header=jE();As.Pax=rb();As.types=KU()});var Ufe,_fe,Dh,Wb,Hfe=yt(()=>{Ufe=$e(nd()),_fe=Ie("worker_threads");C1();Dh=Symbol("kTaskInfo"),Wb=class{constructor(t){this.source=t;this.workers=[];this.limit=(0,Ufe.default)(U4());this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let r=this.workers.pop();r?r.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let t=new _fe.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return t.on("message",r=>{if(!t[Dh])throw new Error("Assertion failed: Worker sent a result without having a task assigned");t[Dh].resolve(r),t[Dh]=null,t.unref(),this.workers.push(t)}),t.on("error",r=>{t[Dh]?.reject(r),t[Dh]=null}),t.on("exit",r=>{r!==0&&t[Dh]?.reject(new Error(`Worker exited with code ${r}`)),t[Dh]=null}),t}run(t){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((o,a)=>{r[Dh]={resolve:o,reject:a},r.postMessage(t)})})}}});var qfe=_((cUt,jfe)=>{var r_;jfe.exports.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+i8UNCjU3RaPLn8RZ9Ixl7o/5Y3uin9pZ+vx3wV/cwWj7fGRYa8dlw3KWvIouIbGXl1MByPzIvsS/XHxI08f36UoQkrPKR2Fe/qhniFfJ/aFB3P2C2Rl0PhkERfTxBsuHo4ZzHUcJ0GzWiuB6xAfg5jFnr9guJEeMzGOj+QjrsH30cBZTH1b2tGCvhNQr1ir9+86OlFhwh6q93Gg4UZWzQ1P+ery76zpHx+KcLxP5wxWJSXuDyszjml9HecPYSuh8wFtn4zfPddS6OxGH88CBefr6+ue+e7llRXtPBSN/5JVfPoR11PQT3Yiq7O7LNYjD6DgIfEcf4tT3Z/nqfI1uYVyg8+Bc=","base64")).toString()),r_)});var zi={};Jt(zi,{convertToZip:()=>Oct,extractArchiveTo:()=>Uct,makeArchiveFromDirectory:()=>Lct});async function Lct(e,{baseFs:t=new Rn,prefixPath:r=Bt.root,compressionLevel:o,inMemory:a=!1}={}){let n;if(a)n=new us(null,{level:o});else{let A=await ae.mktempPromise(),p=J.join(A,"archive.zip");n=new us(p,{create:!0,level:o})}let u=J.resolve(Bt.root,r);return await n.copyPromise(u,e,{baseFs:t,stableTime:!0,stableSort:!0}),n}async function Oct(e,t){let r=await ae.mktempPromise(),o=J.join(r,"archive.zip");return Gfe||=new Wb((0,Kfe.getContent)()),await Gfe.run({tmpFile:o,tgz:e,opts:t}),new us(o,{level:t.compressionLevel})}async function*Mct(e){let t=new Wfe.default.Parse,r=new Yfe.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});t.on("entry",o=>{r.write(o)}),t.on("error",o=>{r.destroy(o)}),t.on("close",()=>{r.destroyed||r.end()}),t.end(e);for await(let o of r){let a=o;yield a,a.resume()}}async function Uct(e,t,{stripComponents:r=0,prefixPath:o=Bt.dot}={}){function a(n){if(n.path[0]==="/")return!0;let u=n.path.split(/\//g);return!!(u.some(A=>A==="..")||u.length<=r)}for await(let n of Mct(e)){if(a(n))continue;let u=J.normalize(Ae.toPortablePath(n.path)).replace(/\/$/,"").split(/\//g);if(u.length<=r)continue;let A=u.slice(r).join("/"),p=J.join(o,A),h=420;switch((n.type==="Directory"||((n.mode??0)&73)!==0)&&(h|=73),n.type){case"Directory":t.mkdirpSync(J.dirname(p),{chmod:493,utimes:[Bi.SAFE_TIME,Bi.SAFE_TIME]}),t.mkdirSync(p,{mode:h}),t.utimesSync(p,Bi.SAFE_TIME,Bi.SAFE_TIME);break;case"OldFile":case"File":t.mkdirpSync(J.dirname(p),{chmod:493,utimes:[Bi.SAFE_TIME,Bi.SAFE_TIME]}),t.writeFileSync(p,await Ky(n),{mode:h}),t.utimesSync(p,Bi.SAFE_TIME,Bi.SAFE_TIME);break;case"SymbolicLink":t.mkdirpSync(J.dirname(p),{chmod:493,utimes:[Bi.SAFE_TIME,Bi.SAFE_TIME]}),t.symlinkSync(n.linkpath,p),t.lutimesSync(p,Bi.SAFE_TIME,Bi.SAFE_TIME);break}}return t}var Yfe,Wfe,Kfe,Gfe,Jfe=yt(()=>{St();iA();Yfe=Ie("stream"),Wfe=$e(Mfe());Hfe();jl();Kfe=$e(qfe())});var zfe=_((n_,Vfe)=>{(function(e,t){typeof n_=="object"?Vfe.exports=t():typeof define=="function"&&define.amd?define(t):e.treeify=t()})(n_,function(){function e(a,n){var u=n?"\u2514":"\u251C";return a?u+="\u2500 ":u+="\u2500\u2500\u2510",u}function t(a,n){var u=[];for(var A in a)!a.hasOwnProperty(A)||n&&typeof a[A]=="function"||u.push(A);return u}function r(a,n,u,A,p,h,w){var I="",v=0,b,E,R=A.slice(0);if(R.push([n,u])&&A.length>0&&(A.forEach(function(U,V){V>0&&(I+=(U[1]?" ":"\u2502")+" "),!E&&U[0]===n&&(E=!0)}),I+=e(a,u)+a,p&&(typeof n!="object"||n instanceof Date)&&(I+=": "+n),E&&(I+=" (circular ref.)"),w(I)),!E&&typeof n=="object"){var N=t(n,h);N.forEach(function(U){b=++v===N.length,r(U,n[U],b,R,p,h,w)})}}var o={};return o.asLines=function(a,n,u,A){var p=typeof u!="function"?u:!1;r(".",a,!1,[],n,p,A||u)},o.asTree=function(a,n,u){var A="";return r(".",a,!1,[],n,u,function(p){A+=p+`
193`}),A},o})});var ra={};Jt(ra,{emitList:()=>_ct,emitTree:()=>epe,treeNodeToJson:()=>$fe,treeNodeToTreeify:()=>Zfe});function Zfe(e,{configuration:t}){let r={},o=0,a=(n,u)=>{let A=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of A){if(!h)continue;let{label:w,value:I,children:v}=h,b=[];typeof w<"u"&&b.push(md(t,w,2)),typeof I<"u"&&b.push(_t(t,I[0],I[1])),b.length===0&&b.push(md(t,`${p}`,2));let E=b.join(": "),R=`\0${o++}\0`,N=u[`${R}${E}`]={};typeof v<"u"&&a(v,N)}};if(typeof e.children>"u")throw new Error("The root node must only contain children");return a(e.children,r),r}function $fe(e){let t=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return yd(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)u&&(a[Hct(n)]=t(u));return typeof r.value>"u"?a:{value:yd(r.value[0],r.value[1]),children:a}};return t(e)}function _ct(e,{configuration:t,stdout:r,json:o}){let a=e.map(n=>({value:n}));epe({children:a},{configuration:t,stdout:r,json:o})}function epe(e,{configuration:t,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(e.children)?e.children.values():Object.values(e.children??{});for(let A of u)A&&r.write(`${JSON.stringify($fe(A))}
194`);return}let n=(0,Xfe.asTree)(Zfe(e,{configuration:t}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
195$1`).replace(/^│\n/,"")),a>=2)for(let u=0;u<2;++u)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
196$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function Hct(e){return typeof e=="string"?e.replace(/^\0[0-9]+\0/,""):e}var Xfe,tpe=yt(()=>{Xfe=$e(zfe());ql()});function e2(e){let t=e.match(jct);if(!t?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=t.groups.cacheVersion?parseInt(t.groups.cacheVersion):null;return{cacheKey:t.groups.cacheKey??null,cacheVersion:r,cacheSpec:t.groups.cacheSpec??null,hash:t.groups.hash}}var rpe,i_,s_,Kb,Nr,jct,o_=yt(()=>{St();St();iA();rpe=Ie("crypto"),i_=$e(Ie("fs"));Yl();rh();jl();xo();s_=Jy(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),Kb=Jy(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Nr=class{constructor(t,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,rpe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=t,this.immutable=o,this.check=a;let{cacheSpec:n,cacheKey:u}=Nr.getCacheKey(r);this.cacheSpec=n,this.cacheKey=u}static async find(t,{immutable:r,check:o}={}){let a=new Nr(t.get("cacheFolder"),{configuration:t,immutable:r,check:o});return await a.setup(),a}static getCacheKey(t){let r=t.get("compressionLevel"),o=r!=="mixed"?`c${r}`:"";return{cacheKey:[Kb,o].join(""),cacheSpec:o}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let t=`${this.configuration.get("globalFolder")}/cache`;return t!==this.cwd?t:null}getVersionFilename(t){return`${aE(t)}-${this.cacheKey}.zip`}getChecksumFilename(t,r){let a=e2(r).hash.slice(0,10);return`${aE(t)}-${a}.zip`}getLocatorPath(t,r,o={}){if(this.mirrorCwd===null||o.unstablePackages?.has(t.locatorHash))return J.resolve(this.cwd,this.getVersionFilename(t));if(r===null)return null;let{cacheVersion:a,cacheSpec:n}=e2(r);if(a===null||a<s_)return null;let u=this.configuration.get("cacheMigrationMode");return a<Kb&&u==="always"||n!==this.cacheSpec&&u!=="required-only"?null:J.resolve(this.cwd,this.getChecksumFilename(t,r))}getLocatorMirrorPath(t){let r=this.mirrorCwd;return r!==null?J.resolve(r,this.getVersionFilename(t)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await ae.existsPromise(this.cwd))throw new zt(56,"Cache path does not exist.")}else{await ae.mkdirPromise(this.cwd,{recursive:!0});let t=J.resolve(this.cwd,".gitignore");await ae.changeFilePromise(t,`/.gitignore
197*.flock
198*.tmp
199`)}(this.mirrorCwd||!this.immutable)&&await ae.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(t,r,{onHit:o,onMiss:a,loader:n,...u}){let A=this.getLocatorMirrorPath(t),p=new Rn,h=()=>{let oe=new us,Be=J.join(Bt.root,rM(t));return oe.mkdirSync(Be,{recursive:!0}),oe.writeJsonSync(J.join(Be,gr.manifest),{name:An(t),mocked:!0}),oe},w=async(oe,{isColdHit:Be,controlPath:be=null})=>{if(be===null&&u.unstablePackages?.has(t.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?e2(r).cacheKey:this.cacheKey,we=!u.skipIntegrityCheck||!r?`${g}/${await TP(oe)}`:r;if(be!==null){let ce=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await TP(be)}`:r;if(we!==ce)throw new zt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let Se=null;switch(r!==null&&we!==r&&(this.check?Se="throw":e2(r).cacheKey!==e2(we).cacheKey?Se="update":Se=this.configuration.get("checksumBehavior")),Se){case null:case"update":return{isValid:!0,hash:we};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new zt(18,"The remote archive doesn't match the expected checksum")}},I=async oe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${jr(this.configuration,t)}`);let Be=await n(),be=Be.getRealPath();Be.saveAndClose(),await ae.chmodPromise(be,420);let g=await w(oe,{controlPath:be,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},v=async()=>{if(A===null||!await ae.existsPromise(A)){let oe=await n(),Be=oe.getRealPath();return oe.saveAndClose(),{source:"loader",path:Be}}return{source:"mirror",path:A}},b=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${jr(this.configuration,t)}`);if(this.immutable)throw new zt(56,`Cache entry required but missing for ${jr(this.configuration,t)}`);let{path:oe,source:Be}=await v(),be=(await w(oe,{isColdHit:!0})).hash,g=this.getLocatorPath(t,be,u);if(!g)throw new Error("Assertion failed: Expected the cache path to be available");let we=[];Be!=="mirror"&&A!==null&&we.push(async()=>{let ce=`${A}${this.cacheId}`;await ae.copyFilePromise(oe,ce,i_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(ce,420),await ae.renamePromise(ce,A)}),(!u.mirrorWriteOnly||A===null)&&we.push(async()=>{let ce=`${g}${this.cacheId}`;await ae.copyFilePromise(oe,ce,i_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(ce,420),await ae.renamePromise(ce,g)});let Se=u.mirrorWriteOnly?A??g:g;return await Promise.all(we.map(ce=>ce())),[!1,Se,be]},E=async()=>{let Be=(async()=>{let be=this.getLocatorPath(t,r,u),g=be!==null?this.markedFiles.has(be)||await p.existsPromise(be):!1,we=!!u.mockedPackages?.has(t.locatorHash)&&(!this.check||!g),Se=we||g,ce=Se?o:a;if(ce&&ce(),Se){let ne=null,te=be;if(!we)if(this.check)ne=await I(te);else{let Ee=await w(te,{isColdHit:!1});if(Ee.isValid)ne=Ee.hash;else return b()}return[we,te,ne]}else return b()})();this.mutexes.set(t.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(t.locatorHash)}};for(let oe;oe=this.mutexes.get(t.locatorHash);)await oe;let[R,N,U]=await E();R||this.markedFiles.add(N);let V,ee=R?()=>h():()=>new us(N,{baseFs:p,readOnly:!0}),le=new ny(()=>yL(()=>V=ee(),oe=>`Failed to open the cache entry for ${jr(this.configuration,t)}: ${oe}`),J),fe=new Hu(N,{baseFs:le,pathUtils:J}),de=()=>{V?.discardAndClose()},ge=u.unstablePackages?.has(t.locatorHash)?null:U;return[fe,de,ge]}},jct=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var Jb,npe=yt(()=>{Jb=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(Jb||{})});var qct,iw,a_=yt(()=>{St();Nl();Qf();xo();qct=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(e,t,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>`npm:${e}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,e=>`npm:${e}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,e=>`npm:${e}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(e,t)=>MP({protocol:"npm:",source:null,selector:e,params:{__archiveUrl:t}})],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>`npm:${e}`]],iw=class{constructor(t){this.resolver=t;this.resolutions=null}async setup(t,{report:r}){let o=J.join(t.cwd,gr.lockfile);if(!ae.existsSync(o))return;let a=await ae.readFilePromise(o,"utf8"),n=Ji(a);if(Object.hasOwn(n,"__metadata"))return;let u=this.resolutions=new Map;for(let A of Object.keys(n)){let p=r1(A);if(!p){r.reportWarning(14,`Failed to parse the string "${A}" into a proper descriptor`);continue}let h=ba(p.range)?Cn(p,`npm:${p.range}`):p,{version:w,resolved:I}=n[A];if(!I)continue;let v;for(let[E,R]of qct){let N=I.match(E);if(N){v=R(w,...N);break}}if(!v){r.reportWarning(14,`${jn(t.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not "${I}")`);continue}let b=h;try{let E=Id(h.range),R=r1(E.selector,!0);R&&(b=R)}catch{}u.set(h.descriptorHash,Rs(b,v))}}supportsDescriptor(t,r){return this.resolutions?this.resolutions.has(t.descriptorHash):!1}supportsLocator(t,r){return!1}shouldPersistResolution(t,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let a=this.resolutions.get(t.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");let n=ZO(a),u=o.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(u,r,o)}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}});var fA,ipe=yt(()=>{Yl();N1();ql();fA=class extends Zs{constructor({configuration:r,stdout:o,suggestInstall:a=!0}){super();this.errorCount=0;JI(this,{configuration:r}),this.configuration=r,this.stdout=o,this.suggestInstall=a}static async start(r,o){let a=new this(r);try{await o(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,o){return o()}async startSectionPromise(r,o){return await o()}startTimerSync(r,o,a){return(typeof o=="function"?o:a)()}async startTimerPromise(r,o,a){return await(typeof o=="function"?o:a)()}reportSeparator(){}reportInfo(r,o){}reportWarning(r,o){}reportError(r,o){this.errorCount+=1,this.stdout.write(`${_t(this.configuration,"\u27A4","redBright")} ${this.formatNameWithHyperlink(r)}: ${o}
200`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,o){}async finalize(){this.errorCount>0&&(this.stdout.write(`
201`),this.stdout.write(`${_t(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
202`),this.suggestInstall&&this.stdout.write(`${_t(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
203`))}formatNameWithHyperlink(r){return yU(r,{configuration:this.configuration,json:!1})}}});var sw,l_=yt(()=>{xo();sw=class{constructor(t){this.resolver=t}supportsDescriptor(t,r){return!!(r.project.storedResolutions.get(t.descriptorHash)||r.project.originalPackages.has(LP(t).locatorHash))}supportsLocator(t,r){return!!(r.project.originalPackages.has(t.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(t,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){return this.resolver.getResolutionDependencies(t,r)}async getCandidates(t,r,o){let a=o.project.storedResolutions.get(t.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(LP(t).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let o=r.project.originalPackages.get(t.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Wf(){}function Gct(e,t,r,o,a){for(var n=0,u=t.length,A=0,p=0;n<u;n++){var h=t[n];if(h.removed){if(h.value=e.join(o.slice(p,p+h.count)),p+=h.count,n&&t[n-1].added){var I=t[n-1];t[n-1]=t[n],t[n]=I}}else{if(!h.added&&a){var w=r.slice(A,A+h.count);w=w.map(function(b,E){var R=o[p+E];return R.length>b.length?R:b}),h.value=e.join(w)}else h.value=e.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var v=t[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[u-2].value+=v.value,t.pop()),t}function Yct(e){return{newPos:e.newPos,components:e.components.slice(0)}}function Wct(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function ape(e,t,r){return r=Wct(r,{ignoreWhitespace:!0}),p_.diff(e,t,r)}function Kct(e,t,r){return h_.diff(e,t,r)}function Vb(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vb=function(t){return typeof t}:Vb=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vb(e)}function c_(e){return zct(e)||Xct(e)||Zct(e)||$ct()}function zct(e){if(Array.isArray(e))return u_(e)}function Xct(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Zct(e,t){if(!!e){if(typeof e=="string")return u_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u_(e,t)}}function u_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function $ct(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
204In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A_(e,t,r,o,a){t=t||[],r=r||[],o&&(e=o(a,e));var n;for(n=0;n<t.length;n+=1)if(t[n]===e)return r[n];var u;if(eut.call(e)==="[object Array]"){for(t.push(e),u=new Array(e.length),r.push(u),n=0;n<e.length;n+=1)u[n]=A_(e[n],t,r,o,a);return t.pop(),r.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),Vb(e)==="object"&&e!==null){t.push(e),u={},r.push(u);var A=[],p;for(p in e)e.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=A_(e[p],t,r,o,p);t.pop(),r.pop()}else u=e;return u}function lpe(e,t,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=Kct(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(U){return U.map(function(V){return" "+V})}for(var h=[],w=0,I=0,v=[],b=1,E=1,R=function(V){var ee=A[V],le=ee.lines||ee.value.replace(/\n$/,"").split(`
205`);if(ee.lines=le,ee.added||ee.removed){var fe;if(!w){var de=A[V-1];w=b,I=E,de&&(v=u.context>0?p(de.lines.slice(-u.context)):[],w-=v.length,I-=v.length)}(fe=v).push.apply(fe,c_(le.map(function(ce){return(ee.added?"+":"-")+ce}))),ee.added?E+=le.length:b+=le.length}else{if(w)if(le.length<=u.context*2&&V<A.length-2){var ge;(ge=v).push.apply(ge,c_(p(le)))}else{var oe,Be=Math.min(le.length,u.context);(oe=v).push.apply(oe,c_(p(le.slice(0,Be))));var be={oldStart:w,oldLines:b-w+Be,newStart:I,newLines:E-I+Be,lines:v};if(V>=A.length-2&&le.length<=u.context){var g=/\n$/.test(r),we=/\n$/.test(o),Se=le.length==0&&v.length>be.oldLines;!g&&Se&&r.length>0&&v.splice(be.oldLines,0,"\\ No newline at end of file"),(!g&&!Se||!we)&&v.push("\\ No newline at end of file")}h.push(be),w=0,I=0,v=[]}b+=le.length,E+=le.length}},N=0;N<A.length;N++)R(N);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:n,hunks:h}}var RUt,spe,ope,p_,h_,Jct,Vct,eut,t2,f_,g_=yt(()=>{Wf.prototype={diff:function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=t.length,h=1,w=A+p;o.maxEditLength&&(w=Math.min(w,o.maxEditLength));var I=[{newPos:-1,components:[]}],v=this.extractCommon(I[0],r,t,0);if(I[0].newPos+1>=A&&v+1>=p)return u([{value:this.join(r),count:r.length}]);function b(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=I[R-1],V=I[R+1],ee=(V?V.newPos:0)-R;U&&(I[R-1]=void 0);var le=U&&U.newPos+1<A,fe=V&&0<=ee&&ee<p;if(!le&&!fe){I[R]=void 0;continue}if(!le||fe&&U.newPos<V.newPos?(N=Yct(V),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),ee=n.extractCommon(N,r,t,R),N.newPos+1>=A&&ee+1>=p)return u(Gct(n,N.components,r,t,n.useLongestToken));I[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>w)return a();b()||R()},0)})();else for(;h<=w;){var E=b();if(E)return E}},pushComponent:function(t,r,o){var a=t[t.length-1];a&&a.added===r&&a.removed===o?t[t.length-1]={count:a.count+1,added:r,removed:o}:t.push({count:1,added:r,removed:o})},extractCommon:function(t,r,o,a){for(var n=r.length,u=o.length,A=t.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&t.components.push({count:h}),t.newPos=A,p},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};RUt=new Wf;spe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,ope=/\S/,p_=new Wf;p_.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!ope.test(e)&&!ope.test(t)};p_.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&spe.test(t[r])&&spe.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};h_=new Wf;h_.tokenize=function(e){var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?t[t.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),t.push(a))}return t};Jct=new Wf;Jct.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};Vct=new Wf;Vct.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};eut=Object.prototype.toString,t2=new Wf;t2.useLongestToken=!0;t2.tokenize=h_.tokenize;t2.castInput=function(e){var t=this.options,r=t.undefinedReplacement,o=t.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof e=="string"?e:JSON.stringify(A_(e,null,null,a),a," ")};t2.equals=function(e,t){return Wf.prototype.equals.call(t2,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};f_=new Wf;f_.tokenize=function(e){return e.slice()};f_.join=f_.removeEmpty=function(e){return e}});var upe=_((NUt,cpe)=>{var tut=Hl(),rut=fE(),nut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iut=/^\w*$/;function sut(e,t){if(tut(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||rut(e)?!0:iut.test(e)||!nut.test(e)||t!=null&&e in Object(t)}cpe.exports=sut});var ppe=_((LUt,fpe)=>{var Ape=US(),out="Expected a function";function d_(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(out);var r=function(){var o=arguments,a=t?t.apply(this,o):o[0],n=r.cache;if(n.has(a))return n.get(a);var u=e.apply(this,o);return r.cache=n.set(a,u)||n,u};return r.cache=new(d_.Cache||Ape),r}d_.Cache=Ape;fpe.exports=d_});var gpe=_((OUt,hpe)=>{var aut=ppe(),lut=500;function cut(e){var t=aut(e,function(o){return r.size===lut&&r.clear(),o}),r=t.cache;return t}hpe.exports=cut});var m_=_((MUt,dpe)=>{var uut=gpe(),Aut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fut=/\\(\\)?/g,put=uut(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Aut,function(r,o,a,n){t.push(a?n.replace(fut,"$1"):o||r)}),t});dpe.exports=put});var jd=_((UUt,mpe)=>{var hut=Hl(),gut=upe(),dut=m_(),mut=R1();function yut(e,t){return hut(e)?e:gut(e,t)?[e]:dut(mut(e))}mpe.exports=yut});var ow=_((_Ut,ype)=>{var Eut=fE(),wut=1/0;function Cut(e){if(typeof e=="string"||Eut(e))return e;var t=e+"";return t=="0"&&1/e==-wut?"-0":t}ype.exports=Cut});var zb=_((HUt,Epe)=>{var Iut=jd(),But=ow();function vut(e,t){t=Iut(t,e);for(var r=0,o=t.length;e!=null&&r<o;)e=e[But(t[r++])];return r&&r==o?e:void 0}Epe.exports=vut});var y_=_((jUt,Cpe)=>{var Dut=tP(),Sut=jd(),Put=OI(),wpe=il(),xut=ow();function but(e,t,r,o){if(!wpe(e))return e;t=Sut(t,e);for(var a=-1,n=t.length,u=n-1,A=e;A!=null&&++a<n;){var p=xut(t[a]),h=r;if(p==="__proto__"||p==="constructor"||p==="prototype")return e;if(a!=u){var w=A[p];h=o?o(w,p,A):void 0,h===void 0&&(h=wpe(w)?w:Put(t[a+1])?[]:{})}Dut(A,p,h),A=A[p]}return e}Cpe.exports=but});var Bpe=_((qUt,Ipe)=>{var Qut=zb(),kut=y_(),Fut=jd();function Rut(e,t,r){for(var o=-1,a=t.length,n={};++o<a;){var u=t[o],A=Qut(e,u);r(A,u)&&kut(n,Fut(u,e),A)}return n}Ipe.exports=Rut});var Dpe=_((GUt,vpe)=>{function Tut(e,t){return e!=null&&t in Object(e)}vpe.exports=Tut});var E_=_((YUt,Spe)=>{var Nut=jd(),Lut=TI(),Out=Hl(),Mut=OI(),Uut=GS(),_ut=ow();function Hut(e,t,r){t=Nut(t,e);for(var o=-1,a=t.length,n=!1;++o<a;){var u=_ut(t[o]);if(!(n=e!=null&&r(e,u)))break;e=e[u]}return n||++o!=a?n:(a=e==null?0:e.length,!!a&&Uut(a)&&Mut(u,a)&&(Out(e)||Lut(e)))}Spe.exports=Hut});var xpe=_((WUt,Ppe)=>{var jut=Dpe(),qut=E_();function Gut(e,t){return e!=null&&qut(e,t,jut)}Ppe.exports=Gut});var Qpe=_((KUt,bpe)=>{var Yut=Bpe(),Wut=xpe();function Kut(e,t){return Yut(e,t,function(r,o){return Wut(e,o)})}bpe.exports=Kut});var Tpe=_((JUt,Rpe)=>{var kpe=fd(),Jut=TI(),Vut=Hl(),Fpe=kpe?kpe.isConcatSpreadable:void 0;function zut(e){return Vut(e)||Jut(e)||!!(Fpe&&e&&e[Fpe])}Rpe.exports=zut});var Ope=_((VUt,Lpe)=>{var Xut=jS(),Zut=Tpe();function Npe(e,t,r,o,a){var n=-1,u=e.length;for(r||(r=Zut),a||(a=[]);++n<u;){var A=e[n];t>0&&r(A)?t>1?Npe(A,t-1,r,o,a):Xut(a,A):o||(a[a.length]=A)}return a}Lpe.exports=Npe});var Upe=_((zUt,Mpe)=>{var $ut=Ope();function eAt(e){var t=e==null?0:e.length;return t?$ut(e,1):[]}Mpe.exports=eAt});var w_=_((XUt,_pe)=>{var tAt=Upe(),rAt=uL(),nAt=AL();function iAt(e){return nAt(rAt(e,void 0,tAt),e+"")}_pe.exports=iAt});var C_=_((ZUt,Hpe)=>{var sAt=Qpe(),oAt=w_(),aAt=oAt(function(e,t){return e==null?{}:sAt(e,t)});Hpe.exports=aAt});var Xb,jpe=yt(()=>{Yl();Xb=class{constructor(t){this.resolver=t}supportsDescriptor(t,r){return this.resolver.supportsDescriptor(t,r)}supportsLocator(t,r){return this.resolver.supportsLocator(t,r)}shouldPersistResolution(t,r){return this.resolver.shouldPersistResolution(t,r)}bindDescriptor(t,r,o){return this.resolver.bindDescriptor(t,r,o)}getResolutionDependencies(t,r){return this.resolver.getResolutionDependencies(t,r)}async getCandidates(t,r,o){throw new zt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(t,r,o,a){throw new zt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(t,r){throw new zt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}}});var ki,I_=yt(()=>{Yl();ki=class extends Zs{reportCacheHit(t){}reportCacheMiss(t){}startSectionSync(t,r){return r()}async startSectionPromise(t,r){return await r()}startTimerSync(t,r,o){return(typeof r=="function"?r:o)()}async startTimerPromise(t,r,o){return await(typeof r=="function"?r:o)()}reportSeparator(){}reportInfo(t,r){}reportWarning(t,r){}reportError(t,r){}reportProgress(t){return{...Promise.resolve().then(async()=>{for await(let{}of t);}),stop:()=>{}}}reportJson(t){}reportFold(t,r){}async finalize(){}}});var qpe,aw,B_=yt(()=>{St();qpe=$e(FP());AE();Bd();ql();rh();Qf();xo();aw=class{constructor(t,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=t}async setup(){this.manifest=await Ot.tryFind(this.cwd)??new Ot,this.relativeCwd=J.relative(this.project.cwd,this.cwd)||Bt.dot;let t=this.manifest.name?this.manifest.name:rA(null,`${this.computeCandidateName()}-${Fs(this.relativeCwd).substring(0,6)}`);this.anchoredDescriptor=Cn(t,`${Vn.protocol}${this.relativeCwd}`),this.anchoredLocator=Rs(t,`${Vn.protocol}${this.relativeCwd}`);let r=this.manifest.workspaceDefinitions.map(({pattern:a})=>a);if(r.length===0)return;let o=await(0,qpe.default)(r,{cwd:Ae.fromPortablePath(this.cwd),onlyDirectories:!0,ignore:["**/node_modules","**/.git","**/.yarn"]});o.sort(),await o.reduce(async(a,n)=>{let u=J.resolve(this.cwd,Ae.toPortablePath(n)),A=await ae.existsPromise(J.join(u,"package.json"));await a,A&&this.workspacesCwds.add(u)},Promise.resolve())}get anchoredPackage(){let t=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!t)throw new Error(`Assertion failed: Expected workspace ${i1(this.project.configuration,this)} (${_t(this.project.configuration,J.join(this.cwd,gr.manifest),Et.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);return t}accepts(t){let r=t.indexOf(":"),o=r!==-1?t.slice(0,r+1):null,a=r!==-1?t.slice(r+1):t;if(o===Vn.protocol&&J.normalize(a)===this.relativeCwd||o===Vn.protocol&&(a==="*"||a==="^"||a==="~"))return!0;let n=ba(a);return n?o===Vn.protocol?n.test(this.manifest.version??"0.0.0"):this.project.configuration.get("enableTransparentWorkspaces")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":`${J.basename(this.cwd)}`||"unnamed-workspace"}getRecursiveWorkspaceDependencies({dependencies:t=Ot.hardDependencies}={}){let r=new Set,o=a=>{for(let n of t)for(let u of a.manifest[n].values()){let A=this.project.tryWorkspaceByDescriptor(u);A===null||r.has(A)||(r.add(A),o(A))}};return o(this),r}getRecursiveWorkspaceDependents({dependencies:t=Ot.hardDependencies}={}){let r=new Set,o=a=>{for(let n of this.project.workspaces)t.some(A=>[...n.manifest[A].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&t1(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),o(n))};return o(this),r}getRecursiveWorkspaceChildren(){let t=[];for(let r of this.workspacesCwds){let o=this.project.workspacesByCwd.get(r);o&&t.push(o,...o.getRecursiveWorkspaceChildren())}return t}async persistManifest(){let t={};this.manifest.exportTo(t);let r=J.join(this.cwd,Ot.fileName),o=`${JSON.stringify(t,null,this.manifest.indent)}
206`;await ae.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=t}}});function pAt({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],volatileDescriptors:p=new Set}){let h=new Map,w=[],I=new Map,v=new Map,b=new Map,E=new Map,R=new Map,N=new Map(e.workspaces.map(de=>{let ge=de.anchoredLocator.locatorHash,oe=o.get(ge);if(typeof oe>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[ge,XI(oe)]})),U=()=>{let de=ae.mktempSync(),ge=J.join(de,"stacktrace.log"),oe=String(w.length+1).length,Be=w.map((be,g)=>`${`${g+1}.`.padStart(oe," ")} ${xa(be)}
207`).join("");throw ae.writeFileSync(ge,Be),ae.detachTemp(de),new zt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${Ae.fromPortablePath(ge)}`)},V=de=>{let ge=r.get(de.descriptorHash);if(typeof ge>"u")throw new Error("Assertion failed: The resolution should have been registered");let oe=o.get(ge);if(!oe)throw new Error("Assertion failed: The package could not be found");return oe},ee=(de,ge,oe,{top:Be,optional:be})=>{w.length>1e3&&U(),w.push(ge);let g=le(de,ge,oe,{top:Be,optional:be});return w.pop(),g},le=(de,ge,oe,{top:Be,optional:be})=>{if(a.has(ge.locatorHash))return;a.add(ge.locatorHash),be||n.delete(ge.locatorHash);let g=o.get(ge.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${jr(e.configuration,ge)}) should have been registered`);let we=[],Se=[],ce=[],ne=[],te=[];for(let Re of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Re.identHash)&&g.locatorHash!==Be)continue;if(Pf(Re))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");p.delete(Re.descriptorHash);let dt=be;if(!dt){let Ne=g.dependenciesMeta.get(An(Re));if(typeof Ne<"u"){let Ve=Ne.get(null);typeof Ve<"u"&&Ve.optional&&(dt=!0)}}let H=r.get(Re.descriptorHash);if(!H)throw new Error(`Assertion failed: The resolution (${jn(e.configuration,Re)}) should have been registered`);let at=N.get(H)||o.get(H);if(!at)throw new Error(`Assertion failed: The package (${H}, resolved from ${jn(e.configuration,Re)}) should have been registered`);if(at.peerDependencies.size===0){ee(Re,at,new Map,{top:Be,optional:dt});continue}let Te,Qe,ke=new Set,He;Se.push(()=>{Te=eM(Re,ge.locatorHash),Qe=tM(at,ge.locatorHash),g.dependencies.delete(Re.identHash),g.dependencies.set(Te.identHash,Te),r.set(Te.descriptorHash,Qe.locatorHash),t.set(Te.descriptorHash,Te),o.set(Qe.locatorHash,Qe),we.push([at,Te,Qe])}),ce.push(()=>{He=new Map;for(let Ne of Qe.peerDependencies.values()){let Ve=g.dependencies.get(Ne.identHash);if(!Ve&&e1(ge,Ne)&&(de.identHash===ge.identHash?Ve=de:(Ve=Cn(ge,de.range),t.set(Ve.descriptorHash,Ve),r.set(Ve.descriptorHash,ge.locatorHash),p.delete(Ve.descriptorHash))),(!Ve||Ve.range==="missing:")&&Qe.dependencies.has(Ne.identHash)){Qe.peerDependencies.delete(Ne.identHash);continue}Ve||(Ve=Cn(Ne,"missing:")),Qe.dependencies.set(Ve.identHash,Ve),Pf(Ve)&&dd(b,Ve.descriptorHash).add(Qe.locatorHash),I.set(Ve.identHash,Ve),Ve.range==="missing:"&&ke.add(Ve.identHash),He.set(Ne.identHash,oe.get(Ne.identHash)??Qe.locatorHash)}Qe.dependencies=new Map(ks(Qe.dependencies,([Ne,Ve])=>An(Ve)))}),ne.push(()=>{if(!o.has(Qe.locatorHash))return;let Ne=h.get(at.locatorHash);typeof Ne=="number"&&Ne>=2&&U();let Ve=h.get(at.locatorHash),je=typeof Ve<"u"?Ve+1:1;h.set(at.locatorHash,je),ee(Te,Qe,He,{top:Be,optional:dt}),h.set(at.locatorHash,je-1)}),te.push(()=>{let Ne=g.dependencies.get(Re.identHash);if(typeof Ne>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let Ve=r.get(Ne.descriptorHash);if(typeof Ve>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(dd(R,Ve).add(ge.locatorHash),!!o.has(Qe.locatorHash)){for(let je of Qe.peerDependencies.values()){let x=He.get(je.identHash);if(typeof x>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Gy(Yy(E,x),An(je)).push(Qe.locatorHash)}for(let je of ke)Qe.dependencies.delete(je)}})}for(let Re of[...Se,...ce])Re();let Ee;do{Ee=!0;for(let[Re,dt,H]of we){let at=Yy(v,Re.locatorHash),Te=Fs(...[...H.dependencies.values()].map(Ne=>{let Ve=Ne.range!=="missing:"?r.get(Ne.descriptorHash):"missing:";if(typeof Ve>"u")throw new Error(`Assertion failed: Expected the resolution for ${jn(e.configuration,Ne)} to have been registered`);return Ve===Be?`${Ve} (top)`:Ve}),dt.identHash),Qe=at.get(Te);if(typeof Qe>"u"){at.set(Te,dt);continue}if(Qe===dt)continue;o.delete(H.locatorHash),t.delete(dt.descriptorHash),r.delete(dt.descriptorHash),a.delete(H.locatorHash);let ke=b.get(dt.descriptorHash)||[],He=[g.locatorHash,...ke];b.delete(dt.descriptorHash);for(let Ne of He){let Ve=o.get(Ne);typeof Ve>"u"||(Ve.dependencies.get(dt.identHash).descriptorHash!==Qe.descriptorHash&&(Ee=!1),Ve.dependencies.set(dt.identHash,Qe))}}}while(!Ee);for(let Re of[...ne,...te])Re()};for(let de of e.workspaces){let ge=de.anchoredLocator;p.delete(de.anchoredDescriptor.descriptorHash),ee(de.anchoredDescriptor,ge,new Map,{top:ge.locatorHash,optional:!1})}let fe=new Map;for(let[de,ge]of R){let oe=o.get(de);if(typeof oe>"u")throw new Error("Assertion failed: Expected the root to be registered");let Be=E.get(de);if(!(typeof Be>"u"))for(let be of ge){let g=o.get(be);if(!(typeof g>"u")&&!!e.tryWorkspaceByLocator(g))for(let[we,Se]of Be){let ce=Xs(we);if(g.peerDependencies.has(ce.identHash))continue;let ne=`p${Fs(be,we,de).slice(0,5)}`;u.set(ne,{subject:be,requested:ce,rootRequester:de,allRequesters:Se});let te=oe.dependencies.get(ce.identHash);if(typeof te<"u"){let Ee=V(te),Re=Ee.version??"0.0.0",dt=new Set;for(let at of Se){let Te=o.get(at);if(typeof Te>"u")throw new Error("Assertion failed: Expected the link to be registered");let Qe=Te.peerDependencies.get(ce.identHash);if(typeof Qe>"u")throw new Error("Assertion failed: Expected the ident to be registered");dt.add(Qe.range)}if(![...dt].every(at=>{if(at.startsWith(Vn.protocol)){if(!e.tryWorkspaceByLocator(Ee))return!1;at=at.slice(Vn.protocol.length),(at==="^"||at==="~")&&(at="*")}return bf(Re,at)})){let at=_c(fe,Ee.locatorHash,()=>({type:2,requested:ce,subject:Ee,dependents:new Map,requesters:new Map,links:new Map,version:Re,hash:`p${Fs(we).slice(0,5)}`}));at.dependents.set(g.locatorHash,g),at.requesters.set(oe.locatorHash,oe);for(let Te of Se)at.links.set(Te,o.get(Te));A.push({type:1,subject:g,requested:ce,requester:oe,version:Re,hash:ne,requirementCount:Se.length})}}else oe.peerDependenciesMeta.get(we)?.optional||A.push({type:0,subject:g,requested:ce,requester:oe,hash:ne})}}}A.push(...fe.values())}function hAt(e,t){let r=wL(e.peerWarnings,"type"),o=r[2]?.map(n=>{let u=Array.from(n.links.values(),w=>{let I=e.storedPackages.get(w.locatorHash);if(typeof I>"u")throw new Error("Assertion failed: Expected the package to be registered");let v=I.peerDependencies.get(n.requested.identHash);if(typeof v>"u")throw new Error("Assertion failed: Expected the ident to be registered");return v.range}),A=n.dependents.size>1?"and other dependencies request":"requests",p=iM(u),h=p?lE(e.configuration,p):_t(e.configuration,"but they have non-overlapping ranges!","redBright");return`${ls(e.configuration,n.requested)} is listed by your project with version ${n1(e.configuration,n.version)}, which doesn't satisfy what ${ls(e.configuration,n.requesters.values().next().value)} ${A} (${h}).`})??[],a=r[0]?.map(n=>`${jr(e.configuration,n.subject)} doesn't provide ${ls(e.configuration,n.requested)} (${_t(e.configuration,n.hash,Et.CODE)}), requested by ${ls(e.configuration,n.requester)}`)??[];t.startSectionSync({reportFooter:()=>{t.reportWarning(86,`Some peer dependencies are incorrectly met; run ${_t(e.configuration,"yarn explain peer-requirements <hash>",Et.CODE)} for details, where ${_t(e.configuration,"<hash>",Et.CODE)} is the six-letter p-prefixed code.`)},skipIfEmpty:!0},()=>{for(let n of ks(o,u=>zy.default(u)))t.reportWarning(60,n);for(let n of ks(a,u=>zy.default(u)))t.reportWarning(2,n)})}var Zb,$b,eQ,Wpe,S_,D_,P_,tQ,lAt,cAt,Gpe,uAt,AAt,fAt,fl,v_,Ype,Pt,Kpe=yt(()=>{St();St();Nl();qt();Zb=Ie("crypto");g_();$b=$e(C_()),eQ=$e(nd()),Wpe=$e(Zn()),S_=Ie("util"),D_=$e(Ie("v8")),P_=$e(Ie("zlib"));o_();v1();a_();l_();AE();cM();Yl();jpe();N1();I_();Bd();B_();GP();ql();rh();jl();C1();BU();Qf();xo();tQ=Jy(process.env.YARN_LOCKFILE_VERSION_OVERRIDE??8),lAt=3,cAt=/ *, */g,Gpe=/\/$/,uAt=32,AAt=(0,S_.promisify)(P_.default.gzip),fAt=(0,S_.promisify)(P_.default.gunzip),fl=(r=>(r.UpdateLockfile="update-lockfile",r.SkipBuild="skip-build",r))(fl||{}),v_={restoreLinkersCustomData:["linkersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["skippedBuilds","storedBuildState"]},Ype=e=>Fs(`${lAt}`,e),Pt=class{constructor(t,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.skippedBuilds=new Set;this.lockfileLastVersion=null;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.peerWarnings=[];this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=t}static async find(t,r){if(!t.projectCwd)throw new it(`No project found in ${r}`);let o=t.projectCwd,a=r,n=null;for(;n!==t.projectCwd;){if(n=a,ae.existsSync(J.join(n,gr.manifest))){o=n;break}a=J.dirname(n)}let u=new Pt(t.projectCwd,{configuration:t});Ke.telemetry?.reportProject(u.cwd),await u.setupResolutions(),await u.setupWorkspaces(),Ke.telemetry?.reportWorkspaceCount(u.workspaces.length),Ke.telemetry?.reportDependencyCount(u.workspaces.reduce((E,R)=>E+R.manifest.dependencies.size+R.manifest.devDependencies.size,0));let A=u.tryWorkspaceByCwd(o);if(A)return{project:u,workspace:A,locator:A.anchoredLocator};let p=await u.findLocatorForLocation(`${o}/`,{strict:!0});if(p)return{project:u,locator:p,workspace:null};let h=_t(t,u.cwd,Et.PATH),w=_t(t,J.relative(u.cwd,o),Et.PATH),I=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,v=`- If ${h} is intended to be a project, it might be that you forgot to list ${w} in its workspace configuration.`,b=`- Finally, if ${h} is fine and you intend ${w} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new it(`The nearest package directory (${_t(t,o,Et.PATH)}) doesn't seem to be part of the project declared in ${_t(t,u.cwd,Et.PATH)}.
208
209${[I,v,b].join(`
210`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let t=J.join(this.cwd,gr.lockfile),r=this.configuration.get("defaultLanguageName");if(ae.existsSync(t)){let o=await ae.readFilePromise(t,"utf8");this.lockFileChecksum=Ype(o);let a=Ji(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<tQ;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=xf(p.resolution,!0),w=new Ot;w.load(p,{yamlCompatibilityMode:!0});let I=w.version,v=w.languageName||r,b=p.linkType.toUpperCase(),E=p.conditions??null,R=w.dependencies,N=w.peerDependencies,U=w.dependenciesMeta,V=w.peerDependenciesMeta,ee=w.bin;if(p.checksum!=null){let fe=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,fe)}let le={...h,version:I,languageName:v,linkType:b,conditions:E,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:V,bin:ee};this.originalPackages.set(le.locatorHash,le);for(let fe of A.split(cAt)){let de=nh(fe);n<=6&&(de=this.configuration.normalizeDependency(de),de=Cn(de,de.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(de.descriptorHash,de),this.storedResolutions.set(de.descriptorHash,h.locatorHash)}}}else o.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let t=new Set,r=(0,eQ.default)(4),o=async(a,n)=>{if(t.has(n))return a;t.add(n);let u=new aw(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(t){let r=this.workspacesByIdent.get(t.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${ls(this.configuration,t.anchoredLocator)}: ${Ae.fromPortablePath(t.cwd)} conflicts with ${Ae.fromPortablePath(r.cwd)}`);this.workspaces.push(t),this.workspacesByCwd.set(t.cwd,t),this.workspacesByIdent.set(t.anchoredLocator.identHash,t)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(t){J.isAbsolute(t)||(t=J.resolve(this.cwd,t)),t=J.normalize(t).replace(/\/+$/,"");let r=this.workspacesByCwd.get(t);return r||null}getWorkspaceByCwd(t){let r=this.tryWorkspaceByCwd(t);if(!r)throw new Error(`Workspace not found (${t})`);return r}tryWorkspaceByFilePath(t){let r=null;for(let o of this.workspaces)J.relative(o.cwd,t).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);return r||null}getWorkspaceByFilePath(t){let r=this.tryWorkspaceByFilePath(t);if(!r)throw new Error(`Workspace not found (${t})`);return r}tryWorkspaceByIdent(t){let r=this.workspacesByIdent.get(t.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(t){let r=this.tryWorkspaceByIdent(t);if(!r)throw new Error(`Workspace not found (${ls(this.configuration,t)})`);return r}tryWorkspaceByDescriptor(t){if(t.range.startsWith(Vn.protocol)){let o=t.range.slice(Vn.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!ba(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(t);return r===null||(Pf(t)&&(t=ZI(t)),!r.accepts(t.range))?null:r}getWorkspaceByDescriptor(t){let r=this.tryWorkspaceByDescriptor(t);if(r===null)throw new Error(`Workspace not found (${jn(this.configuration,t)})`);return r}tryWorkspaceByLocator(t){let r=this.tryWorkspaceByIdent(t);return r===null||(jc(t)&&(t=$I(t)),r.anchoredLocator.locatorHash!==t.locatorHash)?null:r}getWorkspaceByLocator(t){let r=this.tryWorkspaceByLocator(t);if(!r)throw new Error(`Workspace not found (${jr(this.configuration,t)})`);return r}deleteDescriptor(t){this.storedResolutions.delete(t),this.storedDescriptors.delete(t)}deleteLocator(t){this.originalPackages.delete(t),this.storedPackages.delete(t),this.accessibleLocators.delete(t)}forgetResolution(t){if("descriptorHash"in t){let r=this.storedResolutions.get(t.descriptorHash);this.deleteDescriptor(t.descriptorHash);let o=new Set(this.storedResolutions.values());typeof r<"u"&&!o.has(r)&&this.deleteLocator(r)}if("locatorHash"in t){this.deleteLocator(t.locatorHash);for(let[r,o]of this.storedResolutions)o===t.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let t=this.configuration.makeResolver(),r=new Map;for(let[o,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(o)}for(let o of this.originalPackages.values()){let a;try{a=t.shouldPersistResolution(o,{project:this,resolver:t})}catch{a=!1}if(!a){this.deleteLocator(o.locatorHash);let n=r.get(o.locatorHash);if(n){r.delete(o.locatorHash);for(let u of n)this.deleteDescriptor(u)}}}}forgetVirtualResolutions(){for(let t of this.storedPackages.values())for(let[r,o]of t.dependencies)Pf(o)&&t.dependencies.set(r,ZI(o))}getDependencyMeta(t,r){let o={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(An(t));if(!n)return o;let u=n.get(null);if(u&&Object.assign(o,u),r===null||!Wpe.default.valid(r))return o;for(let[A,p]of n)A!==null&&A===r&&Object.assign(o,p);return o}async findLocatorForLocation(t,{strict:r=!1}={}){let o=new ki,a=this.configuration.getLinkers(),n={project:this,report:o};for(let u of a){let A=await u.findPackageLocator(t,n);if(A){if(r&&(await u.findPackageLocation(A,n)).replace(Gpe,"")!==t.replace(Gpe,""))continue;return A}}return null}async loadUserConfig(){let t=J.join(this.cwd,"yarn.config.js");return await ae.existsPromise(t)?Vp(t):null}async preparePackage(t,{resolver:r,resolveOptions:o}){let a=this.configuration.normalizePackage(t);for(let[n,u]of a.dependencies){let A=await this.configuration.reduceHook(h=>h.reduceDependency,u,this,a,u,{resolver:r,resolveOptions:o});if(!e1(u,A))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");let p=r.bindDescriptor(A,a,o);a.dependencies.set(n,p)}return a}async resolveEverything(t){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions();let r=new Map(this.originalPackages),o=[];t.lockfileOnly||this.forgetTransientResolutions();let a=t.resolver||this.configuration.makeResolver(),n=new iw(a);await n.setup(this,{report:t.report});let u=t.lockfileOnly?[new Xb(a)]:[n,a],A=new vd([new sw(a),...u]),p=new vd([...u]),h=this.configuration.makeFetcher(),w=t.lockfileOnly?{project:this,report:t.report,resolver:A}:{project:this,report:t.report,resolver:A,fetchOptions:{project:this,cache:t.cache,checksums:this.storedChecksums,report:t.report,fetcher:h,cacheOptions:{mirrorWriteOnly:!0}}},I=new Map,v=new Map,b=new Map,E=new Map,R=new Map,N=new Map,U=this.topLevelWorkspace.anchoredLocator,V=new Set,ee=[],le=M4(),fe=this.configuration.getSupportedArchitectures();await t.report.startProgressPromise(Zs.progressViaTitle(),async ce=>{let ne=async H=>{let at=await Wy(async()=>await A.resolve(H,w),He=>`${jr(this.configuration,H)}: ${He}`);if(!t1(H,at))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${jr(this.configuration,H)} to ${jr(this.configuration,at)})`);E.set(at.locatorHash,at),!r.delete(at.locatorHash)&&!this.tryWorkspaceByLocator(at)&&o.push(at);let Qe=await this.preparePackage(at,{resolver:A,resolveOptions:w}),ke=Uc([...Qe.dependencies.values()].map(He=>dt(He)));return ee.push(ke),ke.catch(()=>{}),v.set(Qe.locatorHash,Qe),Qe},te=async H=>{let at=R.get(H.locatorHash);if(typeof at<"u")return at;let Te=Promise.resolve().then(()=>ne(H));return R.set(H.locatorHash,Te),Te},Ee=async(H,at)=>{let Te=await dt(at);return I.set(H.descriptorHash,H),b.set(H.descriptorHash,Te.locatorHash),Te},Re=async H=>{ce.setTitle(jn(this.configuration,H));let at=this.resolutionAliases.get(H.descriptorHash);if(typeof at<"u")return Ee(H,this.storedDescriptors.get(at));let Te=A.getResolutionDependencies(H,w),Qe=Object.fromEntries(await Uc(Object.entries(Te).map(async([Ne,Ve])=>{let je=A.bindDescriptor(Ve,U,w),x=await dt(je);return V.add(x.locatorHash),[Ne,x]}))),He=(await Wy(async()=>await A.getCandidates(H,Qe,w),Ne=>`${jn(this.configuration,H)}: ${Ne}`))[0];if(typeof He>"u")throw new zt(82,`${jn(this.configuration,H)}: No candidates found`);if(t.checkResolutions){let{locators:Ne}=await p.getSatisfying(H,Qe,[He],{...w,resolver:p});if(!Ne.find(Ve=>Ve.locatorHash===He.locatorHash))throw new zt(78,`Invalid resolution ${VI(this.configuration,H,He)}`)}return I.set(H.descriptorHash,H),b.set(H.descriptorHash,He.locatorHash),te(He)},dt=H=>{let at=N.get(H.descriptorHash);if(typeof at<"u")return at;I.set(H.descriptorHash,H);let Te=Promise.resolve().then(()=>Re(H));return N.set(H.descriptorHash,Te),Te};for(let H of this.workspaces){let at=H.anchoredDescriptor;ee.push(dt(at))}for(;ee.length>0;){let H=[...ee];ee.length=0,await Uc(H)}});let de=sl(r.values(),ce=>this.tryWorkspaceByLocator(ce)?sl.skip:ce);if(o.length>0||de.length>0){let ce=new Set(this.workspaces.flatMap(H=>{let at=v.get(H.anchoredLocator.locatorHash);if(!at)throw new Error("Assertion failed: The workspace should have been resolved");return Array.from(at.dependencies.values(),Te=>{let Qe=b.get(Te.descriptorHash);if(!Qe)throw new Error("Assertion failed: The resolution should have been registered");return Qe})})),ne=H=>ce.has(H.locatorHash)?"0":"1",te=H=>xa(H),Ee=ks(o,[ne,te]),Re=ks(de,[ne,te]),dt=t.report.getRecommendedLength();Ee.length>0&&t.report.reportInfo(85,`${_t(this.configuration,"+",Et.ADDED)} ${lP(this.configuration,Ee,dt)}`),Re.length>0&&t.report.reportInfo(85,`${_t(this.configuration,"-",Et.REMOVED)} ${lP(this.configuration,Re,dt)}`)}let ge=new Set(this.resolutionAliases.values()),oe=new Set(v.keys()),Be=new Set,be=new Map,g=[];pAt({project:this,accessibleLocators:Be,volatileDescriptors:ge,optionalBuilds:oe,peerRequirements:be,peerWarnings:g,allDescriptors:I,allResolutions:b,allPackages:v});for(let ce of V)oe.delete(ce);for(let ce of ge)I.delete(ce),b.delete(ce);let we=new Set,Se=new Set;for(let ce of v.values())ce.conditions!=null&&(!oe.has(ce.locatorHash)||(_P(ce,fe)||(_P(ce,le)&&t.report.reportWarningOnce(77,`${jr(this.configuration,ce)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${_t(this.configuration,"supportedArchitectures",Et.SETTING)} setting`),Se.add(ce.locatorHash)),we.add(ce.locatorHash)));this.storedResolutions=b,this.storedDescriptors=I,this.storedPackages=v,this.accessibleLocators=Be,this.conditionalLocators=we,this.disabledLocators=Se,this.originalPackages=E,this.optionalBuilds=oe,this.peerRequirements=be,this.peerWarnings=g}async fetchEverything({cache:t,report:r,fetcher:o,mode:a,persistProject:n=!0}){let u={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},A=o||this.configuration.makeFetcher(),p={checksums:this.storedChecksums,project:this,cache:t,fetcher:A,report:r,cacheOptions:u},h=Array.from(new Set(ks(this.storedResolutions.values(),[E=>{let R=this.storedPackages.get(E);if(!R)throw new Error("Assertion failed: The locator should have been registered");return xa(R)}])));a==="update-lockfile"&&(h=h.filter(E=>!this.storedChecksums.has(E)));let w=!1,I=Zs.progressViaCounter(h.length);await r.reportProgress(I);let v=(0,eQ.default)(uAt);if(await Uc(h.map(E=>v(async()=>{let R=this.storedPackages.get(E);if(!R)throw new Error("Assertion failed: The locator should have been registered");if(jc(R))return;let N;try{N=await A.fetch(R,p)}catch(U){U.message=`${jr(this.configuration,R)}: ${U.message}`,r.reportExceptionOnce(U),w=U;return}N.checksum!=null?this.storedChecksums.set(R.locatorHash,N.checksum):this.storedChecksums.delete(R.locatorHash),N.releaseFs&&N.releaseFs()}).finally(()=>{I.tick()}))),w)throw w;let b=n&&a!=="update-lockfile"?await this.cacheCleanup({cache:t,report:r}):null;if(r.cacheMisses.size>0||b){let R=(await Promise.all([...r.cacheMisses].map(async de=>{let ge=this.storedPackages.get(de),oe=this.storedChecksums.get(de)??null,Be=t.getLocatorPath(ge,oe,u);return(Be?await ae.statPromise(Be):null)?.size??0}))).reduce((de,ge)=>de+ge,0)-(b?.size??0),N=r.cacheMisses.size,U=b?.count??0,V=`${rP(N,{zero:"No new packages",one:"A package was",more:`${_t(this.configuration,N,Et.NUMBER)} packages were`})} added to the cache`,ee=`${rP(U,{zero:"none were",one:"one was",more:`${_t(this.configuration,U,Et.NUMBER)} were`})} removed`,le=R!==0?` (${_t(this.configuration,R,Et.SIZE_DIFF)})`:"",fe=U>0?N>0?`${V}, and ${ee}${le}.`:`${V}, but ${ee}${le}.`:`${V}${le}.`;r.reportInfo(13,fe)}}async linkEverything({cache:t,report:r,fetcher:o,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},u=o||this.configuration.makeFetcher(),A={checksums:this.storedChecksums,project:this,cache:t,fetcher:u,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},w=new Map(p.map(ce=>{let ne=ce.makeInstaller(h),te=ce.getCustomDataKey(),Ee=this.linkersCustomData.get(te);return typeof Ee<"u"&&ne.attachCustomData(Ee),[ce,ne]})),I=new Map,v=new Map,b=new Map,E=new Map(await Uc([...this.accessibleLocators].map(async ce=>{let ne=this.storedPackages.get(ce);if(!ne)throw new Error("Assertion failed: The locator should have been registered");return[ce,await u.fetch(ne,A)]}))),R=[],N=new Set,U=[];for(let ce of this.accessibleLocators){let ne=this.storedPackages.get(ce);if(typeof ne>"u")throw new Error("Assertion failed: The locator should have been registered");let te=E.get(ne.locatorHash);if(typeof te>"u")throw new Error("Assertion failed: The fetch result should have been registered");let Ee=[],Re=H=>{Ee.push(H)},dt=this.tryWorkspaceByLocator(ne);if(dt!==null){let H=[],{scripts:at}=dt.manifest;for(let Qe of["preinstall","install","postinstall"])at.has(Qe)&&H.push({type:0,script:Qe});try{for(let[Qe,ke]of w)if(Qe.supportsPackage(ne,h)&&(await ke.installPackage(ne,te,{holdFetchResult:Re})).buildRequest!==null)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}finally{Ee.length===0?te.releaseFs?.():R.push(Uc(Ee).catch(()=>{}).then(()=>{te.releaseFs?.()}))}let Te=J.join(te.packageFs.getRealPath(),te.prefixPath);v.set(ne.locatorHash,Te),!jc(ne)&&H.length>0&&b.set(ne.locatorHash,{buildDirectives:H,buildLocations:[Te]})}else{let H=p.find(Qe=>Qe.supportsPackage(ne,h));if(!H)throw new zt(12,`${jr(this.configuration,ne)} isn't supported by any available linker`);let at=w.get(H);if(!at)throw new Error("Assertion failed: The installer should have been registered");let Te;try{Te=await at.installPackage(ne,te,{holdFetchResult:Re})}finally{Ee.length===0?te.releaseFs?.():R.push(Uc(Ee).then(()=>{}).then(()=>{te.releaseFs?.()}))}I.set(ne.locatorHash,H),v.set(ne.locatorHash,Te.packageLocation),Te.buildRequest&&Te.packageLocation&&(Te.buildRequest.skipped?(N.add(ne.locatorHash),this.skippedBuilds.has(ne.locatorHash)||U.push([ne,Te.buildRequest.explain])):b.set(ne.locatorHash,{buildDirectives:Te.buildRequest.directives,buildLocations:[Te.packageLocation]}))}}let V=new Map;for(let ce of this.accessibleLocators){let ne=this.storedPackages.get(ce);if(!ne)throw new Error("Assertion failed: The locator should have been registered");let te=this.tryWorkspaceByLocator(ne)!==null,Ee=async(Re,dt)=>{let H=v.get(ne.locatorHash);if(typeof H>"u")throw new Error(`Assertion failed: The package (${jr(this.configuration,ne)}) should have been registered`);let at=[];for(let Te of ne.dependencies.values()){let Qe=this.storedResolutions.get(Te.descriptorHash);if(typeof Qe>"u")throw new Error(`Assertion failed: The resolution (${jn(this.configuration,Te)}, from ${jr(this.configuration,ne)})should have been registered`);let ke=this.storedPackages.get(Qe);if(typeof ke>"u")throw new Error(`Assertion failed: The package (${Qe}, resolved from ${jn(this.configuration,Te)}) should have been registered`);let He=this.tryWorkspaceByLocator(ke)===null?I.get(Qe):null;if(typeof He>"u")throw new Error(`Assertion failed: The package (${Qe}, resolved from ${jn(this.configuration,Te)}) should have been registered`);He===Re||He===null?v.get(ke.locatorHash)!==null&&at.push([Te,ke]):!te&&H!==null&&Gy(V,Qe).push(H)}H!==null&&await dt.attachInternalDependencies(ne,at)};if(te)for(let[Re,dt]of w)Re.supportsPackage(ne,h)&&await Ee(Re,dt);else{let Re=I.get(ne.locatorHash);if(!Re)throw new Error("Assertion failed: The linker should have been found");let dt=w.get(Re);if(!dt)throw new Error("Assertion failed: The installer should have been registered");await Ee(Re,dt)}}for(let[ce,ne]of V){let te=this.storedPackages.get(ce);if(!te)throw new Error("Assertion failed: The package should have been registered");let Ee=I.get(te.locatorHash);if(!Ee)throw new Error("Assertion failed: The linker should have been found");let Re=w.get(Ee);if(!Re)throw new Error("Assertion failed: The installer should have been registered");await Re.attachExternalDependents(te,ne)}let ee=new Map;for(let[ce,ne]of w){let te=await ne.finalizeInstall();for(let Ee of te?.records??[])Ee.buildRequest.skipped?(N.add(Ee.locator.locatorHash),this.skippedBuilds.has(Ee.locator.locatorHash)||U.push([Ee.locator,Ee.buildRequest.explain])):b.set(Ee.locator.locatorHash,{buildDirectives:Ee.buildRequest.directives,buildLocations:Ee.buildLocations});typeof te?.customData<"u"&&ee.set(ce.getCustomDataKey(),te.customData)}if(this.linkersCustomData=ee,await Uc(R),a==="skip-build")return;for(let[,ce]of ks(U,([ne])=>xa(ne)))ce(r);let le=new Set(this.storedPackages.keys()),fe=new Set(b.keys());for(let ce of fe)le.delete(ce);let de=(0,Zb.createHash)("sha512");de.update(process.versions.node),await this.configuration.triggerHook(ce=>ce.globalHashGeneration,this,ce=>{de.update("\0"),de.update(ce)});let ge=de.digest("hex"),oe=new Map,Be=ce=>{let ne=oe.get(ce.locatorHash);if(typeof ne<"u")return ne;let te=this.storedPackages.get(ce.locatorHash);if(typeof te>"u")throw new Error("Assertion failed: The package should have been registered");let Ee=(0,Zb.createHash)("sha512");Ee.update(ce.locatorHash),oe.set(ce.locatorHash,"<recursive>");for(let Re of te.dependencies.values()){let dt=this.storedResolutions.get(Re.descriptorHash);if(typeof dt>"u")throw new Error(`Assertion failed: The resolution (${jn(this.configuration,Re)}) should have been registered`);let H=this.storedPackages.get(dt);if(typeof H>"u")throw new Error("Assertion failed: The package should have been registered");Ee.update(Be(H))}return ne=Ee.digest("hex"),oe.set(ce.locatorHash,ne),ne},be=(ce,ne)=>{let te=(0,Zb.createHash)("sha512");te.update(ge),te.update(Be(ce));for(let Ee of ne)te.update(Ee);return te.digest("hex")},g=new Map,we=!1,Se=ce=>{let ne=new Set([ce.locatorHash]);for(let te of ne){let Ee=this.storedPackages.get(te);if(!Ee)throw new Error("Assertion failed: The package should have been registered");for(let Re of Ee.dependencies.values()){let dt=this.storedResolutions.get(Re.descriptorHash);if(!dt)throw new Error(`Assertion failed: The resolution (${jn(this.configuration,Re)}) should have been registered`);if(dt!==ce.locatorHash&&fe.has(dt))return!1;let H=this.storedPackages.get(dt);if(!H)throw new Error("Assertion failed: The package should have been registered");let at=this.tryWorkspaceByLocator(H);if(at){if(at.anchoredLocator.locatorHash!==ce.locatorHash&&fe.has(at.anchoredLocator.locatorHash))return!1;ne.add(at.anchoredLocator.locatorHash)}ne.add(dt)}}return!0};for(;fe.size>0;){let ce=fe.size,ne=[];for(let te of fe){let Ee=this.storedPackages.get(te);if(!Ee)throw new Error("Assertion failed: The package should have been registered");if(!Se(Ee))continue;let Re=b.get(Ee.locatorHash);if(!Re)throw new Error("Assertion failed: The build directive should have been registered");let dt=be(Ee,Re.buildLocations);if(this.storedBuildState.get(Ee.locatorHash)===dt){g.set(Ee.locatorHash,dt),fe.delete(te);continue}we||(await this.persistInstallStateFile(),we=!0),this.storedBuildState.has(Ee.locatorHash)?r.reportInfo(8,`${jr(this.configuration,Ee)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${jr(this.configuration,Ee)} must be built because it never has been before or the last one failed`);let H=Re.buildLocations.map(async at=>{if(!J.isAbsolute(at))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${at})`);for(let Te of Re.buildDirectives){let Qe=`# This file contains the result of Yarn building a package (${xa(Ee)})
211`;switch(Te.type){case 0:Qe+=`# Script name: ${Te.script}
212`;break;case 1:Qe+=`# Script code: ${Te.script}
213`;break}let ke=null;if(!await ae.mktempPromise(async Ne=>{let Ve=J.join(Ne,"build.log"),{stdout:je,stderr:x}=this.configuration.getSubprocessStreams(Ve,{header:Qe,prefix:jr(this.configuration,Ee),report:r}),C;try{switch(Te.type){case 0:C=await Gx(Ee,Te.script,[],{cwd:at,project:this,stdin:ke,stdout:je,stderr:x});break;case 1:C=await EU(Ee,Te.script,[],{cwd:at,project:this,stdin:ke,stdout:je,stderr:x});break}}catch(F){x.write(F.stack),C=1}if(je.end(),x.end(),C===0)return!0;ae.detachTemp(Ne);let P=`${jr(this.configuration,Ee)} couldn't be built successfully (exit code ${_t(this.configuration,C,Et.NUMBER)}, logs can be found here: ${_t(this.configuration,Ve,Et.PATH)})`,y=this.optionalBuilds.has(Ee.locatorHash);return y?r.reportInfo(9,P):r.reportError(9,P),Gce&&r.reportFold(Ae.fromPortablePath(Ve),ae.readFileSync(Ve,"utf8")),y}))return!1}return!0});ne.push(...H,Promise.allSettled(H).then(at=>{fe.delete(te),at.every(Te=>Te.status==="fulfilled"&&Te.value===!0)&&g.set(Ee.locatorHash,dt)}))}if(await Uc(ne),ce===fe.size){let te=Array.from(fe).map(Ee=>{let Re=this.storedPackages.get(Ee);if(!Re)throw new Error("Assertion failed: The package should have been registered");return jr(this.configuration,Re)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${te})`);break}}this.storedBuildState=g,this.skippedBuilds=N}async installWithNewReport(t,r){return(await Nt.start({configuration:this.configuration,json:t.json,stdout:t.stdout,forceSectionAlignment:!0,includeLogs:!t.json&&!t.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(t){let r=this.configuration.get("nodeLinker");Ke.telemetry?.reportInstall(r);let o=!1;if(await t.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(h=>h.validateProject,this,{reportWarning:(h,w)=>{t.report.reportWarning(h,w)},reportError:(h,w)=>{t.report.reportError(h,w),o=!0}})}),o)return;for(let h of this.configuration.packageExtensions.values())for(let[,w]of h)for(let I of w)I.status="inactive";let a=J.join(this.cwd,gr.lockfile),n=null;if(t.immutable)try{n=await ae.readFilePromise(a,"utf8")}catch(h){throw h.code==="ENOENT"?new zt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):h}await t.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(t)}),await t.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{hAt(this,t.report);for(let[,h]of this.configuration.packageExtensions)for(let[,w]of h)for(let I of w)if(I.userProvided){let v=_t(this.configuration,I,Et.PACKAGE_EXTENSION);switch(I.status){case"inactive":t.report.reportWarning(68,`${v}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":t.report.reportWarning(69,`${v}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(n!==null){let h=Mg(n,this.generateLockfile());if(h!==n){let w=lpe(a,a,n,h,void 0,void 0,{maxEditLength:100});if(w){t.report.reportSeparator();for(let I of w.hunks){t.report.reportInfo(null,`@@ -${I.oldStart},${I.oldLines} +${I.newStart},${I.newLines} @@`);for(let v of I.lines)v.startsWith("+")?t.report.reportError(28,_t(this.configuration,v,Et.ADDED)):v.startsWith("-")?t.report.reportError(28,_t(this.configuration,v,Et.REMOVED)):t.report.reportInfo(null,_t(this.configuration,v,"grey"))}t.report.reportSeparator()}throw new zt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let h of this.configuration.packageExtensions.values())for(let[,w]of h)for(let I of w)I.userProvided&&I.status==="active"&&Ke.telemetry?.reportPackageExtension(yd(I,Et.PACKAGE_EXTENSION));await t.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(t)});let u=t.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],A=await Promise.all(u.map(async h=>NP(h,{cwd:this.cwd})));(typeof t.persistProject>"u"||t.persistProject)&&await this.persist(),await t.report.startTimerPromise("Link step",async()=>{if(t.mode==="update-lockfile"){t.report.reportWarning(73,`Skipped due to ${_t(this.configuration,"mode=update-lockfile",Et.CODE)}`);return}await this.linkEverything(t);let h=await Promise.all(u.map(async w=>NP(w,{cwd:this.cwd})));for(let w=0;w<u.length;++w)A[w]!==h[w]&&t.report.reportError(64,`The checksum for ${u[w]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let p=!1;await t.report.startTimerPromise("Post-install validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(h=>h.validateProjectAfterInstall,this,{reportWarning:(h,w)=>{t.report.reportWarning(h,w)},reportError:(h,w)=>{t.report.reportError(h,w),p=!0}})}),!p&&await this.configuration.triggerHook(h=>h.afterAllInstalled,this,t)}generateLockfile(){let t=new Map;for(let[n,u]of this.storedResolutions.entries()){let A=t.get(u);A||t.set(u,A=new Set),A.add(n)}let r={},{cacheKey:o}=Nr.getCacheKey(this.configuration);r.__metadata={version:tQ,cacheKey:o};for(let[n,u]of t.entries()){let A=this.originalPackages.get(n);if(!A)continue;let p=[];for(let b of u){let E=this.storedDescriptors.get(b);if(!E)throw new Error("Assertion failed: The descriptor should have been registered");p.push(E)}let h=p.map(b=>Pa(b)).sort().join(", "),w=new Ot;w.version=A.linkType==="HARD"?A.version:"0.0.0-use.local",w.languageName=A.languageName,w.dependencies=new Map(A.dependencies),w.peerDependencies=new Map(A.peerDependencies),w.dependenciesMeta=new Map(A.dependenciesMeta),w.peerDependenciesMeta=new Map(A.peerDependenciesMeta),w.bin=new Map(A.bin);let I,v=this.storedChecksums.get(A.locatorHash);if(typeof v<"u"){let b=v.indexOf("/");if(b===-1)throw new Error("Assertion failed: Expected the checksum to reference its cache key");let E=v.slice(0,b),R=v.slice(b+1);E===o?I=R:I=v}r[h]={...w.exportTo({},{compatibilityMode:!1}),linkType:A.linkType.toLowerCase(),resolution:xa(A),checksum:I,conditions:A.conditions||void 0}}return`${[`# This file is generated by running "yarn install" inside your project.
214`,`# Manual changes might be lost - proceed with caution!
215`].join("")}
216`+Ba(r)}async persistLockfile(){let t=J.join(this.cwd,gr.lockfile),r="";try{r=await ae.readFilePromise(t,"utf8")}catch{}let o=this.generateLockfile(),a=Mg(r,o);a!==r&&(await ae.writeFilePromise(t,a),this.lockFileChecksum=Ype(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let t=[];for(let u of Object.values(v_))t.push(...u);let r=(0,$b.default)(this,t),o=D_.default.serialize(r),a=Fs(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await ae.mkdirPromise(J.dirname(n),{recursive:!0}),await ae.writeFilePromise(n,await AAt(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:t=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await fAt(await ae.readFilePromise(a));n=D_.default.deserialize(u),this.installStateChecksum=Fs(u)}catch{r&&await this.applyLightResolution();return}t&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,$b.default)(n,v_.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,$b.default)(n,v_.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new ki}),await this.persistInstallStateFile()}async persist(){let t=(0,eQ.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>t(()=>r.persistManifest()))])}async cacheCleanup({cache:t,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let o=new Set([".gitignore"]);if(!EM(t.cwd,this.cwd)||!await ae.existsPromise(t.cwd))return null;let a=[];for(let u of await ae.readdirPromise(t.cwd)){if(o.has(u))continue;let A=J.resolve(t.cwd,u);t.markedFiles.has(A)||(t.immutable?r.reportError(56,`${_t(this.configuration,J.basename(A),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(ae.lstatPromise(A).then(async p=>(await ae.removePromise(A),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((u,A)=>u+A,0)}}}});function gAt(e){let o=Math.floor(e.timeNow/864e5),a=e.updateInterval*864e5,n=e.state.lastUpdate??e.timeNow+a+Math.floor(a*e.randomInitialInterval),u=n+a,A=e.state.lastTips??o*864e5,p=A+864e5+8*36e5-e.timeZone,h=u<=e.timeNow,w=p<=e.timeNow,I=null;return(h||w||!e.state.lastUpdate||!e.state.lastTips)&&(I={},I.lastUpdate=h?e.timeNow:n,I.lastTips=A,I.blocks=h?{}:e.state.blocks,I.displayedTips=e.state.displayedTips),{nextState:I,triggerUpdate:h,triggerTips:w,nextTips:w?o*864e5:A}}var lw,Jpe=yt(()=>{St();T1();rh();wx();jl();Qf();lw=class{constructor(t,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=t;let o=this.getRegistryPath();this.isNew=!ae.existsSync(o),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(t){let r=new Set(this.displayedTips),o=A=>A&&en?bf(en,A):!1,a=t.map((A,p)=>p).filter(A=>t[A]&&o(t[A]?.selector));if(a.length===0)return null;let n=a.filter(A=>!r.has(A));if(n.length===0){let A=Math.floor(a.length*.2);this.displayedTips=A>0?this.displayedTips.slice(-A):[],n=a.filter(p=>!r.has(p))}let u=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(u),this.commitTips(),t[u]}reportVersion(t){this.reportValue("version",t.replace(/-git\..*/,"-git"))}reportCommandName(t){this.reportValue("commandName",t||"<none>")}reportPluginName(t){this.reportValue("pluginName",t)}reportProject(t){this.reportEnumerator("projectCount",t)}reportInstall(t){this.reportHit("installCount",t)}reportPackageExtension(t){this.reportValue("packageExtension",t)}reportWorkspaceCount(t){this.reportValue("workspaceCount",String(t))}reportDependencyCount(t){this.reportValue("dependencyCount",String(t))}reportValue(t,r){dd(this.values,t).add(r)}reportEnumerator(t,r){dd(this.enumerators,t).add(Fs(r))}reportHit(t,r="*"){let o=Yy(this.hits,t),a=_c(o,r,()=>0);o.set(r,a+1)}getRegistryPath(){let t=this.configuration.get("globalFolder");return J.join(t,"telemetry.json")}sendReport(t){let r=this.getRegistryPath(),o;try{o=ae.readJsonSync(r)}catch{o={}}let{nextState:a,triggerUpdate:n,triggerTips:u,nextTips:A}=gAt({state:o,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=A,this.displayedTips=o.displayedTips??[],a!==null)try{ae.mkdirSync(J.dirname(r),{recursive:!0}),ae.writeJsonSync(r,a)}catch{return!1}if(u&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=o.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${t}?ddsource=yarn`,w=I=>L4(h,I,{configuration:this.configuration}).catch(()=>{});for(let[I,v]of Object.entries(o.blocks??{})){if(Object.keys(v).length===0)continue;let b=v;b.userId=I,b.reportType="primary";for(let N of Object.keys(b.enumerators??{}))b.enumerators[N]=b.enumerators[N].length;w(b);let E=new Map,R=20;for(let[N,U]of Object.entries(b.values))U.length>0&&E.set(N,U.slice(0,R));for(;E.size>0;){let N={};N.userId=I,N.reportType="secondary",N.metrics={};for(let[U,V]of E)N.metrics[U]=V.shift(),V.length===0&&E.delete(U);w(N)}}}}return!0}applyChanges(){let t=this.getRegistryPath(),r;try{r=ae.readJsonSync(t)}catch{r={}}let o=this.configuration.get("telemetryUserId")??"*",a=r.blocks=r.blocks??{},n=a[o]=a[o]??{};for(let u of this.hits.keys()){let A=n.hits=n.hits??{},p=A[u]=A[u]??{};for(let[h,w]of this.hits.get(u))p[h]=(p[h]??0)+w}for(let u of["values","enumerators"])for(let A of this[u].keys()){let p=n[u]=n[u]??{};p[A]=[...new Set([...p[A]??[],...this[u].get(A)??[]])]}this.shouldCommitTips&&(r.lastTips=this.nextTips,r.displayedTips=this.displayedTips),ae.mkdirSync(J.dirname(t),{recursive:!0}),ae.writeJsonSync(t,r)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}}});var r2={};Jt(r2,{BuildDirectiveType:()=>Jb,CACHE_CHECKPOINT:()=>s_,CACHE_VERSION:()=>Kb,Cache:()=>Nr,Configuration:()=>Ke,DEFAULT_RC_FILENAME:()=>q4,FormatType:()=>Sle,InstallMode:()=>fl,LEGACY_PLUGINS:()=>I1,LOCKFILE_VERSION:()=>tQ,LegacyMigrationResolver:()=>iw,LightReport:()=>fA,LinkType:()=>Vy,LockfileResolver:()=>sw,Manifest:()=>Ot,MessageName:()=>wr,MultiFetcher:()=>pE,PackageExtensionStatus:()=>IL,PackageExtensionType:()=>CL,Project:()=>Pt,ProjectLookup:()=>W4,Report:()=>Zs,ReportError:()=>zt,SettingsType:()=>B1,StreamReport:()=>Nt,TAG_REGEXP:()=>kE,TelemetryManager:()=>lw,ThrowReport:()=>ki,VirtualFetcher:()=>hE,WindowsLinkType:()=>Px,Workspace:()=>aw,WorkspaceFetcher:()=>dE,WorkspaceResolver:()=>Vn,YarnVersion:()=>en,execUtils:()=>Mr,folderUtils:()=>qP,formatUtils:()=>ye,hashUtils:()=>wn,httpUtils:()=>tn,miscUtils:()=>_e,nodeUtils:()=>cs,parseMessageName:()=>uS,scriptUtils:()=>cn,semverUtils:()=>Qr,stringifyMessageName:()=>Ju,structUtils:()=>G,tgzUtils:()=>zi,treeUtils:()=>ra});var Ye=yt(()=>{Ix();GP();ql();rh();wx();jl();C1();BU();Qf();xo();Jfe();tpe();o_();v1();v1();npe();a_();ipe();l_();AE();AS();lM();Kpe();Yl();N1();Jpe();I_();uM();AM();Bd();B_();T1();yne()});var ehe=_((B_t,i2)=>{"use strict";var mAt=process.env.TERM_PROGRAM==="Hyper",yAt=process.platform==="win32",Xpe=process.platform==="linux",x_={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},Zpe=Object.assign({},x_,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),$pe=Object.assign({},x_,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:Xpe?"\u25B8":"\u276F",pointerSmall:Xpe?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});i2.exports=yAt&&!mAt?Zpe:$pe;Reflect.defineProperty(i2.exports,"common",{enumerable:!1,value:x_});Reflect.defineProperty(i2.exports,"windows",{enumerable:!1,value:Zpe});Reflect.defineProperty(i2.exports,"other",{enumerable:!1,value:$pe})});var Vc=_((v_t,b_)=>{"use strict";var EAt=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),wAt=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,the=()=>{let e={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(e.enabled=process.env.FORCE_COLOR!=="0");let t=n=>{let u=n.open=`\x1B[${n.codes[0]}m`,A=n.close=`\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\u001b\\[${n.codes[1]}m`,"g");return n.wrap=(h,w)=>{h.includes(A)&&(h=h.replace(p,A+u));let I=u+h+A;return w?I.replace(/\r*\n/g,`${A}$&${u}`):I},n},r=(n,u,A)=>typeof n=="function"?n(u):n.wrap(u,A),o=(n,u)=>{if(n===""||n==null)return"";if(e.enabled===!1)return n;if(e.visible===!1)return"";let A=""+n,p=A.includes(`
217`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(e.styles[u[h]],A,p);return A},a=(n,u,A)=>{e.styles[n]=t({name:n,codes:u}),(e.keys[A]||(e.keys[A]=[])).push(n),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(h){e.alias(n,h)},get(){let h=w=>o(w,h.stack);return Reflect.setPrototypeOf(h,e),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=wAt,e.hasColor=e.hasAnsi=n=>(e.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&e.ansiRegex.test(n)),e.alias=(n,u)=>{let A=typeof u=="string"?e[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),e.styles[n]=A,A.stack=[n]),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(p){e.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,e),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},e.theme=n=>{if(!EAt(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))e.alias(u,n[u]);return e},e.alias("unstyle",n=>typeof n=="string"&&n!==""?(e.ansiRegex.lastIndex=0,n.replace(e.ansiRegex,"")):""),e.alias("noop",n=>n),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=ehe(),e.define=a,e};b_.exports=the();b_.exports.create=the});var No=_(rn=>{"use strict";var CAt=Object.prototype.toString,rc=Vc(),rhe=!1,Q_=[],nhe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};rn.longest=(e,t)=>e.reduce((r,o)=>Math.max(r,t?o[t].length:o.length),0);rn.hasColor=e=>!!e&&rc.hasColor(e);var nQ=rn.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);rn.nativeType=e=>CAt.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"");rn.isAsyncFn=e=>rn.nativeType(e)==="asyncfunction";rn.isPrimitive=e=>e!=null&&typeof e!="object"&&typeof e!="function";rn.resolve=(e,t,...r)=>typeof t=="function"?t.call(e,...r):t;rn.scrollDown=(e=[])=>[...e.slice(1),e[0]];rn.scrollUp=(e=[])=>[e.pop(),...e];rn.reorder=(e=[])=>{let t=e.slice();return t.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),t};rn.swap=(e,t,r)=>{let o=e.length,a=r===o?0:r<0?o-1:r,n=e[t];e[t]=e[a],e[a]=n};rn.width=(e,t=80)=>{let r=e&&e.columns?e.columns:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[0]),process.platform==="win32"?r-1:r};rn.height=(e,t=20)=>{let r=e&&e.rows?e.rows:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[1]),r};rn.wordWrap=(e,t={})=>{if(!e)return e;typeof t=="number"&&(t={width:t});let{indent:r="",newline:o=`
218`+r,width:a=80}=t,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=e.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(w=>w.replace(/\n$/,"")),t.padEnd&&(h=h.map(w=>w.padEnd(a," "))),t.padStart&&(h=h.map(w=>w.padStart(a," "))),r+h.join(o)};rn.unmute=e=>{let t=e.stack.find(o=>rc.keys.color.includes(o));return t?rc[t]:e.stack.find(o=>o.slice(2)==="bg")?rc[t.slice(2)]:o=>o};rn.pascal=e=>e?e[0].toUpperCase()+e.slice(1):"";rn.inverse=e=>{if(!e||!e.stack)return e;let t=e.stack.find(o=>rc.keys.color.includes(o));if(t){let o=rc["bg"+rn.pascal(t)];return o?o.black:e}let r=e.stack.find(o=>o.slice(0,2)==="bg");return r?rc[r.slice(2).toLowerCase()]||e:rc.none};rn.complement=e=>{if(!e||!e.stack)return e;let t=e.stack.find(o=>rc.keys.color.includes(o)),r=e.stack.find(o=>o.slice(0,2)==="bg");if(t&&!r)return rc[nhe[t]||t];if(r){let o=r.slice(2).toLowerCase(),a=nhe[o];return a&&rc["bg"+rn.pascal(a)]||e}return rc.none};rn.meridiem=e=>{let t=e.getHours(),r=e.getMinutes(),o=t>=12?"pm":"am";t=t%12;let a=t===0?12:t,n=r<10?"0"+r:r;return a+":"+n+" "+o};rn.set=(e={},t="",r)=>t.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!rn.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},e);rn.get=(e={},t="",r)=>{let o=e[t]==null?t.split(".").reduce((a,n)=>a&&a[n],e):e[t];return o??r};rn.mixin=(e,t)=>{if(!nQ(e))return t;if(!nQ(t))return e;for(let r of Object.keys(t)){let o=Object.getOwnPropertyDescriptor(t,r);if(o.hasOwnProperty("value"))if(e.hasOwnProperty(r)&&nQ(o.value)){let a=Object.getOwnPropertyDescriptor(e,r);nQ(a.value)?e[r]=rn.merge({},e[r],t[r]):Reflect.defineProperty(e,r,o)}else Reflect.defineProperty(e,r,o);else Reflect.defineProperty(e,r,o)}return e};rn.merge=(...e)=>{let t={};for(let r of e)rn.mixin(t,r);return t};rn.mixinEmitter=(e,t)=>{let r=t.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?rn.define(e,o,a.bind(t)):rn.define(e,o,a)}};rn.onExit=e=>{let t=(r,o)=>{rhe||(rhe=!0,Q_.forEach(a=>a()),r===!0&&process.exit(128+o))};Q_.length===0&&(process.once("SIGTERM",t.bind(null,!0,15)),process.once("SIGINT",t.bind(null,!0,2)),process.once("exit",t)),Q_.push(e)};rn.define=(e,t,r)=>{Reflect.defineProperty(e,t,{value:r})};rn.defineExport=(e,t,r)=>{let o;Reflect.defineProperty(e,t,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var ihe=_(fw=>{"use strict";fw.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};fw.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};fw.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};fw.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};fw.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var ahe=_((P_t,ohe)=>{"use strict";var she=Ie("readline"),IAt=ihe(),BAt=/^(?:\x1b)([a-zA-Z0-9])$/,vAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,DAt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function SAt(e){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(e)}function PAt(e){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(e)}var iQ=(e="",t={})=>{let r,o={name:t.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:e,raw:e,...t};if(Buffer.isBuffer(e)?e[0]>127&&e[1]===void 0?(e[0]-=128,e="\x1B"+String(e)):e=String(e):e!==void 0&&typeof e!="string"?e=String(e):e||(e=o.sequence||""),o.sequence=o.sequence||e||o.name,e==="\r")o.raw=void 0,o.name="return";else if(e===`
219`)o.name="enter";else if(e===" ")o.name="tab";else if(e==="\b"||e==="\x7F"||e==="\x1B\x7F"||e==="\x1B\b")o.name="backspace",o.meta=e.charAt(0)==="\x1B";else if(e==="\x1B"||e==="\x1B\x1B")o.name="escape",o.meta=e.length===2;else if(e===" "||e==="\x1B ")o.name="space",o.meta=e.length===2;else if(e<="")o.name=String.fromCharCode(e.charCodeAt(0)+"a".charCodeAt(0)-1),o.ctrl=!0;else if(e.length===1&&e>="0"&&e<="9")o.name="number";else if(e.length===1&&e>="a"&&e<="z")o.name=e;else if(e.length===1&&e>="A"&&e<="Z")o.name=e.toLowerCase(),o.shift=!0;else if(r=BAt.exec(e))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=vAt.exec(e)){let a=[...e];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=DAt[n],o.shift=SAt(n)||o.shift,o.ctrl=PAt(n)||o.ctrl}return o};iQ.listen=(e={},t)=>{let{stdin:r}=e;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=she.createInterface({terminal:!0,input:r});she.emitKeypressEvents(r,o);let a=(A,p)=>t(A,iQ(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};iQ.action=(e,t,r)=>{let o={...IAt,...r};return t.ctrl?(t.action=o.ctrl[t.name],t):t.option&&o.option?(t.action=o.option[t.name],t):t.shift?(t.action=o.shift[t.name],t):(t.action=o.keys[t.name],t)};ohe.exports=iQ});var che=_((x_t,lhe)=>{"use strict";lhe.exports=e=>{e.timers=e.timers||{};let t=e.options.timers;if(!!t)for(let r of Object.keys(t)){let o=t[r];typeof o=="number"&&(o={interval:o}),xAt(e,r,o)}};function xAt(e,t,r={}){let o=e.timers[t]={name:t,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,e.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),e.once("close",()=>o.stop()),o.stop}});var Ahe=_((b_t,uhe)=>{"use strict";var{define:bAt,width:QAt}=No(),k_=class{constructor(t){let r=t.options;bAt(this,"_prompt",t),this.type=t.type,this.name=t.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=QAt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=t.symbols,this.styles=t.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let t={...this};return t.status=this.status,t.buffer=Buffer.from(t.buffer),delete t.clone,t}set color(t){this._color=t}get color(){let t=this.prompt.styles;if(this.cancelled)return t.cancelled;if(this.submitted)return t.submitted;let r=this._color||t[this.status];return typeof r=="function"?r:t.pending}set loading(t){this._loading=t}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};uhe.exports=k_});var phe=_((Q_t,fhe)=>{"use strict";var F_=No(),eo=Vc(),R_={default:eo.noop,noop:eo.noop,set inverse(e){this._inverse=e},get inverse(){return this._inverse||F_.inverse(this.primary)},set complement(e){this._complement=e},get complement(){return this._complement||F_.complement(this.primary)},primary:eo.cyan,success:eo.green,danger:eo.magenta,strong:eo.bold,warning:eo.yellow,muted:eo.dim,disabled:eo.gray,dark:eo.dim.gray,underline:eo.underline,set info(e){this._info=e},get info(){return this._info||this.primary},set em(e){this._em=e},get em(){return this._em||this.primary.underline},set heading(e){this._heading=e},get heading(){return this._heading||this.muted.underline},set pending(e){this._pending=e},get pending(){return this._pending||this.primary},set submitted(e){this._submitted=e},get submitted(){return this._submitted||this.success},set cancelled(e){this._cancelled=e},get cancelled(){return this._cancelled||this.danger},set typing(e){this._typing=e},get typing(){return this._typing||this.dim},set placeholder(e){this._placeholder=e},get placeholder(){return this._placeholder||this.primary.dim},set highlight(e){this._highlight=e},get highlight(){return this._highlight||this.inverse}};R_.merge=(e={})=>{e.styles&&typeof e.styles.enabled=="boolean"&&(eo.enabled=e.styles.enabled),e.styles&&typeof e.styles.visible=="boolean"&&(eo.visible=e.styles.visible);let t=F_.merge({},R_,e.styles);delete t.merge;for(let r of Object.keys(eo))t.hasOwnProperty(r)||Reflect.defineProperty(t,r,{get:()=>eo[r]});for(let r of Object.keys(eo.styles))t.hasOwnProperty(r)||Reflect.defineProperty(t,r,{get:()=>eo[r]});return t};fhe.exports=R_});var ghe=_((k_t,hhe)=>{"use strict";var T_=process.platform==="win32",Kf=Vc(),kAt=No(),N_={...Kf.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:Kf.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:Kf.symbols.question,submitted:Kf.symbols.check,cancelled:Kf.symbols.cross},separator:{pending:Kf.symbols.pointerSmall,submitted:Kf.symbols.middot,cancelled:Kf.symbols.middot},radio:{off:T_?"( )":"\u25EF",on:T_?"(*)":"\u25C9",disabled:T_?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};N_.merge=e=>{let t=kAt.merge({},Kf.symbols,N_,e.symbols);return delete t.merge,t};hhe.exports=N_});var mhe=_((F_t,dhe)=>{"use strict";var FAt=phe(),RAt=ghe(),TAt=No();dhe.exports=e=>{e.options=TAt.merge({},e.options.theme,e.options),e.symbols=RAt.merge(e.options),e.styles=FAt.merge(e.options)}});var Ihe=_((whe,Che)=>{"use strict";var yhe=process.env.TERM_PROGRAM==="Apple_Terminal",NAt=Vc(),L_=No(),zc=Che.exports=whe,vi="\x1B[",Ehe="\x07",O_=!1,Sh=zc.code={bell:Ehe,beep:Ehe,beginning:`${vi}G`,down:`${vi}J`,esc:vi,getPosition:`${vi}6n`,hide:`${vi}?25l`,line:`${vi}2K`,lineEnd:`${vi}K`,lineStart:`${vi}1K`,restorePosition:vi+(yhe?"8":"u"),savePosition:vi+(yhe?"7":"s"),screen:`${vi}2J`,show:`${vi}?25h`,up:`${vi}1J`},qd=zc.cursor={get hidden(){return O_},hide(){return O_=!0,Sh.hide},show(){return O_=!1,Sh.show},forward:(e=1)=>`${vi}${e}C`,backward:(e=1)=>`${vi}${e}D`,nextLine:(e=1)=>`${vi}E`.repeat(e),prevLine:(e=1)=>`${vi}F`.repeat(e),up:(e=1)=>e?`${vi}${e}A`:"",down:(e=1)=>e?`${vi}${e}B`:"",right:(e=1)=>e?`${vi}${e}C`:"",left:(e=1)=>e?`${vi}${e}D`:"",to(e,t){return t?`${vi}${t+1};${e+1}H`:`${vi}${e+1}G`},move(e=0,t=0){let r="";return r+=e<0?qd.left(-e):e>0?qd.right(e):"",r+=t<0?qd.up(-t):t>0?qd.down(t):"",r},restore(e={}){let{after:t,cursor:r,initial:o,input:a,prompt:n,size:u,value:A}=e;if(o=L_.isPrimitive(o)?String(o):"",a=L_.isPrimitive(a)?String(a):"",A=L_.isPrimitive(A)?String(A):"",u){let p=zc.cursor.up(u)+zc.cursor.to(n.length),h=a.length-r;return h>0&&(p+=zc.cursor.left(h)),p}if(A||t){let p=!a&&!!o?-o.length:-a.length+r;return t&&(p-=t.length),a===""&&o&&!n.includes(o)&&(p+=o.length),zc.cursor.move(p)}}},M_=zc.erase={screen:Sh.screen,up:Sh.up,down:Sh.down,line:Sh.line,lineEnd:Sh.lineEnd,lineStart:Sh.lineStart,lines(e){let t="";for(let r=0;r<e;r++)t+=zc.erase.line+(r<e-1?zc.cursor.up(1):"");return e&&(t+=zc.code.beginning),t}};zc.clear=(e="",t=process.stdout.columns)=>{if(!t)return M_.line+qd.to(0);let r=n=>[...NAt.unstyle(n)].length,o=e.split(/\r?\n/),a=0;for(let n of o)a+=1+Math.floor(Math.max(r(n)-1,0)/t);return(M_.line+qd.prevLine()).repeat(a-1)+M_.line+qd.to(0)}});var pw=_((R_t,vhe)=>{"use strict";var LAt=Ie("events"),Bhe=Vc(),U_=ahe(),OAt=che(),MAt=Ahe(),UAt=mhe(),Ra=No(),Gd=Ihe(),s2=class extends LAt{constructor(t={}){super(),this.name=t.name,this.type=t.type,this.options=t,UAt(this),OAt(this),this.state=new MAt(this),this.initial=[t.initial,t.default].find(r=>r!=null),this.stdout=t.stdout||process.stdout,this.stdin=t.stdin||process.stdin,this.scale=t.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=HAt(this.options.margin),this.setMaxListeners(0),_At(this)}async keypress(t,r={}){this.keypressed=!0;let o=U_.action(t,U_(t,r),this.options.actions);this.state.keypress=o,this.emit("keypress",t,o),this.emit("state",this.state.clone());let a=this.options[o.action]||this[o.action]||this.dispatch;if(typeof a=="function")return await a.call(this,t,o);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(Gd.code.beep)}cursorHide(){this.stdout.write(Gd.cursor.hide()),Ra.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(Gd.cursor.show())}write(t){!t||(this.stdout&&this.state.show!==!1&&this.stdout.write(t),this.state.buffer+=t)}clear(t=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!t||this.options.show===!1)&&this.stdout.write(Gd.cursor.down(t)+Gd.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:t,after:r,rest:o}=this.sections(),{cursor:a,initial:n="",input:u="",value:A=""}=this,p=this.state.size=o.length,h={after:r,cursor:a,initial:n,input:u,prompt:t,size:p,value:A},w=Gd.cursor.restore(h);w&&this.stdout.write(w)}sections(){let{buffer:t,input:r,prompt:o}=this.state;o=Bhe.unstyle(o);let a=Bhe.unstyle(t),n=a.indexOf(o),u=a.slice(0,n),p=a.slice(n).split(`
220`),h=p[0],w=p[p.length-1],v=(o+(r?" "+r:"")).length,b=v<h.length?h.slice(v+1):"";return{header:u,prompt:h,after:b,rest:p.slice(1),last:w}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let t=this.state.error||await this.validate(this.value,this.state);if(t!==!0){let r=`
221`+this.symbols.pointer+" ";typeof t=="string"?r+=t.trim():r+="Invalid input",this.state.error=`
222`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(t){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(t))}async close(){this.state.closed=!0;try{let t=this.sections(),r=Math.ceil(t.prompt.length/this.width);t.rest&&this.write(Gd.cursor.down(t.rest.length)),this.write(`
223`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=U_.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:t,options:r,result:o}=this;if(this.format=()=>t.call(this,this.value),this.result=()=>o.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(t,r)=>{if(this.once("submit",t),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(t,r,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[t];n.timer=p;let h=a[t]||n[t]||u[t],w=r&&r[t]!=null?r[t]:await h;if(w==="")return w;let I=await this.resolve(w,n,r,o);return!I&&r&&r[t]?this.resolve(h,n,r,o):I}async prefix(){let t=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Ra.isObject(t)&&(t=t[o.status]||t.pending),Ra.hasColor(t)?t:(this.styles[o.status]||this.styles.pending)(t)}async message(){let t=await this.element("message");return Ra.hasColor(t)?t:this.styles.strong(t)}async separator(){let t=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=t[o.status]||t.pending||o.separator,n=await this.resolve(a,o);return Ra.isObject(n)&&(n=n[o.status]||n.pending),Ra.hasColor(n)?n:this.styles.muted(n)}async pointer(t,r){let o=await this.element("pointer",t,r);if(typeof o=="string"&&Ra.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Ra.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(t,r){let o=await this.element("indicator",t,r);if(typeof o=="string"&&Ra.hasColor(o))return o;if(o){let a=this.styles,n=t.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Ra.hasColor(A)?A:u(A)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let t=await this.element("hint");return Ra.hasColor(t)?t:this.styles.muted(t)}}error(t){return this.state.submitted?"":t||this.state.error}format(t){return t}result(t){return t}validate(t){return this.options.required===!0?this.isValue(t):!0}isValue(t){return t!=null&&t!==""}resolve(t,...r){return Ra.resolve(this,t,...r)}get base(){return s2.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Ra.height(this.stdout,25)}get width(){return this.options.columns||Ra.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(t){this.state.cursor=t}get cursor(){return this.state.cursor}set input(t){this.state.input=t}get input(){return this.state.input}set value(t){this.state.value=t}get value(){let{input:t,value:r}=this.state,o=[r,t].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return t=>new this(t).run()}};function _At(e){let t=a=>e[a]===void 0||typeof e[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(e.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=e.options[a];typeof n=="function"&&t(a)?o.includes(a)||(e[a]=n.bind(e)):typeof e[a]!="function"&&(e[a]=n)}}function HAt(e){typeof e=="number"&&(e=[e,e,e,e]);let t=[].concat(e||[]),r=a=>a%2===0?`
224`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);t[a]?o.push(n.repeat(t[a])):o.push("")}return o}vhe.exports=s2});var Phe=_((T_t,She)=>{"use strict";var jAt=No(),Dhe={default(e,t){return t},checkbox(e,t){throw new Error("checkbox role is not implemented yet")},editable(e,t){throw new Error("editable role is not implemented yet")},expandable(e,t){throw new Error("expandable role is not implemented yet")},heading(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||"",t},input(e,t){throw new Error("input role is not implemented yet")},option(e,t){return Dhe.default(e,t)},radio(e,t){throw new Error("radio role is not implemented yet")},separator(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||e.symbols.line.repeat(5),t},spacer(e,t){return t}};She.exports=(e,t={})=>{let r=jAt.merge({},Dhe,t.roles);return r[e]||r.default}});var o2=_((N_t,Qhe)=>{"use strict";var qAt=Vc(),GAt=pw(),YAt=Phe(),sQ=No(),{reorder:__,scrollUp:WAt,scrollDown:KAt,isObject:xhe,swap:JAt}=sQ,H_=class extends GAt{constructor(t){super(t),this.cursorHide(),this.maxSelected=t.maxSelected||1/0,this.multiple=t.multiple||!1,this.initial=t.initial||0,this.delay=t.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:t,initial:r,autofocus:o,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(t)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");xhe(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(t,r){this.state.loadingChoices=!0;let o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(t,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(t,r,o){if(typeof t=="function"&&(t=await t.call(this,this)),t instanceof Promise&&(t=await t),typeof t=="string"&&(t={name:t}),t.normalized)return t;t.normalized=!0;let a=t.value;if(t=YAt(t.role,this.options)(this,t),typeof t.disabled=="string"&&!t.hint&&(t.hint=t.disabled,t.disabled=!0),t.disabled===!0&&t.hint==null&&(t.hint="(disabled)"),t.index!=null)return t;t.name=t.name||t.key||t.title||t.value||t.message,t.message=t.message||t.name||"",t.value=[t.value,t.name].find(this.isValue.bind(this)),t.input="",t.index=r,t.cursor=0,sQ.define(t,"parent",o),t.level=o?o.level+1:1,t.indent==null&&(t.indent=o?o.indent+" ":t.indent||""),t.path=o?o.path+"."+t.name:t.name,t.enabled=!!(this.multiple&&!this.isDisabled(t)&&(t.enabled||this.isSelected(t))),this.isDisabled(t)||(this.longest=Math.max(this.longest,qAt.unstyle(t.message).length));let u={...t};return t.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))t[h]=u[h];t.input=A,t.value=p},a==null&&typeof t.initial=="function"&&(t.input=await t.initial.call(this,this.state,t,r)),t}async onChoice(t,r){this.emit("choice",t,r,this),typeof t.onChoice=="function"&&await t.onChoice.call(this,this.state,t,r)}async addChoice(t,r,o){let a=await this.toChoice(t,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(t,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...t},n=await this.addChoice(a,r,o);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(t){return t.indent==null?t.level>1?" ".repeat(t.level-1):"":t.indent}dispatch(t,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(t,r){return typeof r!="boolean"&&(r=t.enabled),r&&!t.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=t.index,t.enabled=r&&!this.isDisabled(t),t)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let t=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!t),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(t=>t.enabled=!t.enabled),this.render())}g(t=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(t.parent&&!t.choices?t.parent:t),this.render()):this.a()}toggle(t,r){if(!t.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!t.enabled),t.enabled=r,t.choices&&t.choices.forEach(a=>this.toggle(a,r));let o=t.parent;for(;o;){let a=o.choices.filter(n=>this.isDisabled(n));o.enabled=a.every(n=>n.enabled===!0),o=o.parent}return bhe(this,this.choices),this.emit("toggle",t,this),t}enable(t){return this.selected.length>=this.maxSelected?this.alert():(t.enabled=!this.isDisabled(t),t.choices&&t.choices.forEach(this.enable.bind(this)),t)}disable(t){return t.enabled=!1,t.choices&&t.choices.forEach(this.disable.bind(this)),t}number(t){this.num+=t;let r=o=>{let a=Number(o);if(a>this.choices.length-1)return this.alert();let n=this.focused,u=this.choices.find(A=>a===A.index);if(!u.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(u)===-1){let A=__(this.choices),p=A.indexOf(u);if(n.index>p){let h=A.slice(p,p+this.limit),w=A.filter(I=>!h.includes(I));this.choices=h.concat(w)}else{let h=p-this.limit+1;this.choices=A.slice(h).concat(A.slice(0,h))}}return this.index=this.choices.indexOf(u),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(o=>{let a=this.choices.length,n=this.num,u=(A=!1,p)=>{clearTimeout(this.numberTimeout),A&&(p=r(n)),this.num="",o(p)};if(n==="0"||n.length===1&&Number(n+"0")>a)return u(!0);if(Number(n)>a)return u(!1,this.alert());this.numberTimeout=setTimeout(()=>u(!0),this.delay)})}home(){return this.choices=__(this.choices),this.index=0,this.render()}end(){let t=this.choices.length-this.limit,r=__(this.choices);return this.choices=r.slice(t).concat(r.slice(0,t)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let t=this.choices.length,r=this.visible.length,o=this.index;return this.options.scroll===!1&&o===0?this.alert():t>r&&o===0?this.scrollUp():(this.index=(o-1%t+t)%t,this.isDisabled()?this.up():this.render())}down(){let t=this.choices.length,r=this.visible.length,o=this.index;return this.options.scroll===!1&&o===r-1?this.alert():t>r&&o===r-1?this.scrollDown():(this.index=(o+1)%t,this.isDisabled()?this.down():this.render())}scrollUp(t=0){return this.choices=WAt(this.choices),this.index=t,this.isDisabled()?this.up():this.render()}scrollDown(t=this.visible.length-1){return this.choices=KAt(this.choices),this.index=t,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(t){JAt(this.choices,this.index,t)}isDisabled(t=this.focused){return t&&["disabled","collapsed","hidden","completing","readonly"].some(o=>t[o]===!0)?!0:t&&t.role==="heading"}isEnabled(t=this.focused){if(Array.isArray(t))return t.every(r=>this.isEnabled(r));if(t.choices){let r=t.choices.filter(o=>!this.isDisabled(o));return t.enabled&&r.every(o=>this.isEnabled(o))}return t.enabled&&!this.isDisabled(t)}isChoice(t,r){return t.name===r||t.index===Number(r)}isSelected(t){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(t,r)):this.isChoice(t,this.initial)}map(t=[],r="value"){return[].concat(t||[]).reduce((o,a)=>(o[a]=this.find(a,r),o),{})}filter(t,r){let a=typeof t=="function"?t:(A,p)=>[A.name,p].includes(t),u=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?u.map(A=>A[r]):u}find(t,r){if(xhe(t))return r?t[r]:t;let a=typeof t=="function"?t:(u,A)=>[u.name,A].includes(t),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(t){return this.choices.indexOf(this.find(t))}async submit(){let t=this.focused;if(!t)return this.alert();if(t.newChoice)return t.input?(t.updateChoice(),this.render()):this.alert();if(this.choices.some(u=>u.newChoice))return this.alert();let{reorder:r,sort:o}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&o!==!0&&(n=sQ.reorder(n)),this.value=a?n.map(u=>u.name):n.name,super.submit())}set choices(t=[]){this.state._choices=this.state._choices||[],this.state.choices=t;for(let r of t)this.state._choices.some(o=>o.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let o=this.find(r);o&&(this.initial=o.index,this.focus(o,!0))}}}get choices(){return bhe(this,this.state.choices||[])}set visible(t){this.state.visible=t}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(t){this.state.limit=t}get limit(){let{state:t,options:r,choices:o}=this,a=t.limit||this._limit||r.limit||o.length;return Math.min(a,this.height)}set value(t){super.value=t}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(t){this.state.index=t}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let t=this.choices[this.index];return t&&this.state.submitted&&this.multiple!==!0&&(t.enabled=!0),t}get selectable(){return this.choices.filter(t=>!this.isDisabled(t))}get selected(){return this.multiple?this.enabled:this.focused}};function bhe(e,t){if(t instanceof Promise)return t;if(typeof t=="function"){if(sQ.isAsyncFn(t))return t;t=t.call(e,e)}for(let r of t){if(Array.isArray(r.choices)){let o=r.choices.filter(a=>!e.isDisabled(a));r.enabled=o.every(a=>a.enabled===!0)}e.isDisabled(r)===!0&&delete r.enabled}return t}Qhe.exports=H_});var Ph=_((L_t,khe)=>{"use strict";var VAt=o2(),j_=No(),q_=class extends VAt{constructor(t){super(t),this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(t,r){if(this.multiple)return this[r.name]?await this[r.name](t,r):await super.dispatch(t,r);this.alert()}separator(){if(this.options.separator)return super.separator();let t=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():t}pointer(t,r){return!this.multiple||this.options.pointer?super.pointer(t,r):""}indicator(t,r){return this.multiple?super.indicator(t,r):""}choiceMessage(t,r){let o=this.resolve(t.message,this.state,t,r);return t.role==="heading"&&!j_.hasColor(o)&&(o=this.styles.strong(o)),this.resolve(o,this.state,t,r)}choiceSeparator(){return":"}async renderChoice(t,r){await this.onChoice(t,r);let o=this.index===r,a=await this.pointer(t,r),n=await this.indicator(t,r)+(t.pad||""),u=await this.resolve(t.hint,this.state,t,r);u&&!j_.hasColor(u)&&(u=this.styles.muted(u));let A=this.indent(t),p=await this.choiceMessage(t,r),h=()=>[this.margin[3],A+a+n,p,this.margin[1],u].filter(Boolean).join(" ");return t.role==="heading"?h():t.disabled?(j_.hasColor(p)||(p=this.styles.disabled(p)),h()):(o&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let t=this.visible.map(async(n,u)=>await this.renderChoice(n,u)),r=await Promise.all(t);r.length||r.push(this.styles.danger("No matching choices"));let o=this.margin[0]+r.join(`
225`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].filter(Boolean).join(`
226`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(t=>this.styles.primary(t.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:t,size:r}=this.state,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),w=await this.renderChoices(),I=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),t&&!p&&!w.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,w,I].filter(Boolean).join(`
227`)),this.write(this.margin[2]),this.restore()}};khe.exports=q_});var Rhe=_((O_t,Fhe)=>{"use strict";var zAt=Ph(),XAt=(e,t)=>{let r=e.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=t(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},G_=class extends zAt{constructor(t){super(t),this.cursorShow()}moveCursor(t){this.state.cursor+=t}dispatch(t){return this.append(t)}space(t){return this.options.multiple?super.space(t):this.append(t)}append(t){let{cursor:r,input:o}=this.state;return this.input=o.slice(0,r)+t+o.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:t,input:r}=this.state;return r?(this.input=r.slice(0,t-1)+r.slice(t),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:t,input:r}=this.state;return r[t]===void 0?this.alert():(this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.complete())}number(t){return this.append(t)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(t=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,t,r);let o=t.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(t=>this.styles.primary(t.message)).join(", ");if(this.state.submitted){let t=this.value=this.input=this.focused.value;return this.styles.primary(t)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let t=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=XAt(this.input,t),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(t=>t.name)),super.submit()}};Fhe.exports=G_});var W_=_((M_t,The)=>{"use strict";var Y_=No();The.exports=(e,t={})=>{e.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=t,A=u||e.styles.placeholder,p=Y_.inverse(e.styles.primary),h=R=>p(e.styles.black(R)),w=r,I=" ",v=h(I);if(e.blink&&e.blink.off===!0&&(h=R=>R,v=""),n&&a===0&&o===""&&r==="")return h(I);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=Y_.isPrimitive(o)?`${o}`:"",r=Y_.isPrimitive(r)?`${r}`:"";let b=o&&o.startsWith(r)&&o!==r,E=b?h(o[r.length]):v;if(a!==r.length&&n===!0&&(w=r.slice(0,a)+h(r[a])+r.slice(a+1),E=""),n===!1&&(E=""),b){let R=e.styles.unstyle(w+E);return w+E+A(o.slice(R.length))}return w+E}});var oQ=_((U_t,Nhe)=>{"use strict";var ZAt=Vc(),$At=Ph(),eft=W_(),K_=class extends $At{constructor(t){super({...t,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(t){return await super.reset(),t===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(t){return!!t&&this.append(t)}append(t){let r=this.focused;if(!r)return this.alert();let{cursor:o,input:a}=r;return r.value=r.input=a.slice(0,o)+t+a.slice(o),r.cursor++,this.render()}delete(){let t=this.focused;if(!t||t.cursor<=0)return this.alert();let{cursor:r,input:o}=t;return t.value=t.input=o.slice(0,r-1)+o.slice(r),t.cursor--,this.render()}deleteForward(){let t=this.focused;if(!t)return this.alert();let{cursor:r,input:o}=t;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.slice(r+1);return t.value=t.input=a,this.render()}right(){let t=this.focused;return t?t.cursor>=t.input.length?this.alert():(t.cursor++,this.render()):this.alert()}left(){let t=this.focused;return t?t.cursor<=0?this.alert():(t.cursor--,this.render()):this.alert()}space(t,r){return this.dispatch(t,r)}number(t,r){return this.dispatch(t,r)}next(){let t=this.focused;if(!t)return this.alert();let{initial:r,input:o}=t;return r&&r.startsWith(o)&&o!==r?(t.value=t.input=r,t.cursor=t.value.length,this.render()):super.next()}prev(){let t=this.focused;return t?t.cursor===0?super.prev():(t.value=t.input="",t.cursor=0,this.render()):this.alert()}separator(){return""}format(t){return this.state.submitted?"":super.format(t)}pointer(){return""}indicator(t){return t.input?"\u29BF":"\u2299"}async choiceSeparator(t,r){let o=await this.resolve(t.separator,this.state,t,r)||":";return o?" "+this.styles.disabled(o):""}async renderChoice(t,r){await this.onChoice(t,r);let{state:o,styles:a}=this,{cursor:n,initial:u="",name:A,hint:p,input:h=""}=t,{muted:w,submitted:I,primary:v,danger:b}=a,E=p,R=this.index===r,N=t.validate||(()=>!0),U=await this.choiceSeparator(t,r),V=t.message;this.align==="right"&&(V=V.padStart(this.longest+1," ")),this.align==="left"&&(V=V.padEnd(this.longest+1," "));let ee=this.values[A]=h||u,le=h?"success":"dark";await N.call(t,ee,this.state)!==!0&&(le="danger");let fe=a[le],de=fe(await this.indicator(t,r))+(t.pad||""),ge=this.indent(t),oe=()=>[ge,de,V+U,h,E].filter(Boolean).join(" ");if(o.submitted)return V=ZAt.unstyle(V),h=I(h),E="",oe();if(t.format)h=await t.format.call(this,h,t,r);else{let Be=this.styles.muted;h=eft(this,{input:h,initial:u,pos:n,showCursor:R,color:Be})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),t.result&&(this.values[A]=await t.result.call(this,ee,t,r)),R&&(V=v(V)),t.error?h+=(h?" ":"")+b(t.error.trim()):t.hint&&(h+=(h?" ":"")+w(t.hint.trim())),oe()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Nhe.exports=K_});var J_=_((__t,Ohe)=>{"use strict";var tft=oQ(),rft=()=>{throw new Error("expected prompt to have a custom authenticate method")},Lhe=(e=rft)=>{class t extends tft{constructor(o){super(o)}async submit(){this.value=await e.call(this,this.values,this.state),super.base.submit.call(this)}static create(o){return Lhe(o)}}return t};Ohe.exports=Lhe()});var _he=_((H_t,Uhe)=>{"use strict";var nft=J_();function ift(e,t){return e.username===this.options.username&&e.password===this.options.password}var Mhe=(e=ift)=>{let t=[{name:"username",message:"username"},{name:"password",message:"password",format(o){return this.options.showPassword?o:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(o.length))}}];class r extends nft.create(e){constructor(a){super({...a,choices:t})}static create(a){return Mhe(a)}}return r};Uhe.exports=Mhe()});var aQ=_((j_t,Hhe)=>{"use strict";var sft=pw(),{isPrimitive:oft,hasColor:aft}=No(),V_=class extends sft{constructor(t){super(t),this.cursorHide()}async initialize(){let t=await this.resolve(this.initial,this.state);this.input=await this.cast(t),await super.initialize()}dispatch(t){return this.isValue(t)?(this.input=t,this.submit()):this.alert()}format(t){let{styles:r,state:o}=this;return o.submitted?r.success(t):r.primary(t)}cast(t){return this.isTrue(t)}isTrue(t){return/^[ty1]/i.test(t)}isFalse(t){return/^[fn0]/i.test(t)}isValue(t){return oft(t)&&(this.isTrue(t)||this.isFalse(t))}async hint(){if(this.state.status==="pending"){let t=await this.element("hint");return aft(t)?t:this.styles.muted(t)}}async render(){let{input:t,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=this.styles.muted(this.default),A=[o,n,u,a].filter(Boolean).join(" ");this.state.prompt=A;let p=await this.header(),h=this.value=this.cast(t),w=await this.format(h),I=await this.error()||await this.hint(),v=await this.footer();I&&!A.includes(I)&&(w+=" "+I),A+=" "+w,this.clear(r),this.write([p,A,v].filter(Boolean).join(`
228`)),this.restore()}set value(t){super.value=t}get value(){return this.cast(super.value)}};Hhe.exports=V_});var qhe=_((q_t,jhe)=>{"use strict";var lft=aQ(),z_=class extends lft{constructor(t){super(t),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};jhe.exports=z_});var Yhe=_((G_t,Ghe)=>{"use strict";var cft=Ph(),uft=oQ(),hw=uft.prototype,X_=class extends cft{constructor(t){super({...t,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(t,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(t==="a"||t==="i")?super[t]():hw.dispatch.call(this,t,r)}append(t,r){return hw.append.call(this,t,r)}delete(t,r){return hw.delete.call(this,t,r)}space(t){return this.focused.editable?this.append(t):super.space()}number(t){return this.focused.editable?this.append(t):super.number(t)}next(){return this.focused.editable?hw.next.call(this):super.next()}prev(){return this.focused.editable?hw.prev.call(this):super.prev()}async indicator(t,r){let o=t.indicator||"",a=t.editable?o:super.indicator(t,r);return await this.resolve(a,this.state,t,r)||""}indent(t){return t.role==="heading"?"":t.editable?" ":" "}async renderChoice(t,r){return t.indent="",t.editable?hw.renderChoice.call(this,t,r):super.renderChoice(t,r)}error(){return""}footer(){return this.state.error}async validate(){let t=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),t=await r.validate(o,this.state),t!==!0)break}return t!==!0&&(this.state.error=typeof t=="string"?t:"Invalid Input"),t}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(t=>t.newChoice))return this.alert();this.value={};for(let t of this.choices){let r=t.parent?this.value[t.parent.name]:this.value;if(t.role==="heading"){this.value[t.name]={};continue}t.editable?r[t.name]=t.value===t.name?t.initial||"":t.value:this.isDisabled(t)||(r[t.name]=t.enabled===!0)}return this.base.submit.call(this)}};Ghe.exports=X_});var Yd=_((Y_t,Whe)=>{"use strict";var Aft=pw(),fft=W_(),{isPrimitive:pft}=No(),Z_=class extends Aft{constructor(t){super(t),this.initial=pft(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(t,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.name!=="return")?this.append(`
229`,r):super.keypress(t,r)}moveCursor(t){this.cursor+=t}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(t,r){if(!t||r.ctrl||r.code)return this.alert();this.append(t)}append(t){let{cursor:r,input:o}=this.state;this.input=`${o}`.slice(0,r)+t+`${o}`.slice(r),this.moveCursor(String(t).length),this.render()}insert(t){this.append(t)}delete(){let{cursor:t,input:r}=this.state;if(t<=0)return this.alert();this.input=`${r}`.slice(0,t-1)+`${r}`.slice(t),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:t,input:r}=this.state;if(r[t]===void 0)return this.alert();this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.render()}cutForward(){let t=this.cursor;if(this.input.length<=t)return this.alert();this.state.clipboard.push(this.input.slice(t)),this.input=this.input.slice(0,t),this.render()}cutLeft(){let t=this.cursor;if(t===0)return this.alert();let r=this.input.slice(0,t),o=this.input.slice(t),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let t=this.initial!=null?String(this.initial):"";if(!t||!t.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(t){return!!t}async format(t=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(t||r):fft(this,{input:t,initial:r,pos:this.cursor})}async render(){let t=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(t),this.write([u,n,h].filter(Boolean).join(`
230`)),this.restore()}};Whe.exports=Z_});var Jhe=_((W_t,Khe)=>{"use strict";var hft=e=>e.filter((t,r)=>e.lastIndexOf(t)===r),lQ=e=>hft(e).filter(Boolean);Khe.exports=(e,t={},r="")=>{let{past:o=[],present:a=""}=t,n,u;switch(e){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:lQ([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:lQ([...n,r]),present:u};case"save":return{past:lQ([...o,r]),present:""};case"remove":return u=lQ(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${e}"`)}}});var e8=_((K_t,zhe)=>{"use strict";var gft=Yd(),Vhe=Jhe(),$_=class extends gft{constructor(t){super(t);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(t){return this.store?(this.data=Vhe(t,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=Vhe("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};zhe.exports=$_});var Zhe=_((J_t,Xhe)=>{"use strict";var dft=Yd(),t8=class extends dft{format(){return""}};Xhe.exports=t8});var e0e=_((V_t,$he)=>{"use strict";var mft=Yd(),r8=class extends mft{constructor(t={}){super(t),this.sep=this.options.separator||/, */,this.initial=t.initial||""}split(t=this.value){return t?String(t).split(this.sep):[]}format(){let t=this.state.submitted?this.styles.primary:r=>r;return this.list.map(t).join(", ")}async submit(t){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};$he.exports=r8});var r0e=_((z_t,t0e)=>{"use strict";var yft=Ph(),n8=class extends yft{constructor(t){super({...t,multiple:!0})}};t0e.exports=n8});var s8=_((X_t,n0e)=>{"use strict";var Eft=Yd(),i8=class extends Eft{constructor(t={}){super({style:"number",...t}),this.min=this.isValue(t.min)?this.toNumber(t.min):-1/0,this.max=this.isValue(t.max)?this.toNumber(t.max):1/0,this.delay=t.delay!=null?t.delay:1e3,this.float=t.float!==!1,this.round=t.round===!0||t.float===!1,this.major=t.major||10,this.minor=t.minor||1,this.initial=t.initial!=null?t.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(t){return!/[-+.]/.test(t)||t==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(t)}number(t){return super.append(t)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(t){let r=t||this.minor,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(t){let r=t||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(t=this.input){return typeof this.options.format=="function"?this.options.format.call(this,t):this.styles.info(t)}toNumber(t=""){return this.float?+t:Math.round(+t)}isValue(t){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(t)}submit(){let t=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(t||0),super.submit()}};n0e.exports=i8});var s0e=_((Z_t,i0e)=>{i0e.exports=s8()});var a0e=_(($_t,o0e)=>{"use strict";var wft=Yd(),o8=class extends wft{constructor(t){super(t),this.cursorShow()}format(t=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(t.length)):""}};o0e.exports=o8});var u0e=_((e8t,c0e)=>{"use strict";var Cft=Vc(),Ift=o2(),l0e=No(),a8=class extends Ift{constructor(t={}){super(t),this.widths=[].concat(t.messageWidth||50),this.align=[].concat(t.align||"left"),this.linebreak=t.linebreak||!1,this.edgeLength=t.edgeLength||3,this.newline=t.newline||`
231 `;let r=t.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let t=0;for(let r of this.choices){t=Math.max(t,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let o=0;o<this.scale.length;o++)r.scale.push({index:o})}this.widths[0]=Math.min(this.widths[0],t+3)}async dispatch(t,r){if(this.multiple)return this[r.name]?await this[r.name](t,r):await super.dispatch(t,r);this.alert()}heading(t,r,o){return this.styles.strong(t)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIndex>=this.scale.length-1?this.alert():(t.scaleIndex++,this.render())}left(){let t=this.focused;return t.scaleIndex<=0?this.alert():(t.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
232`)}renderScaleHeading(t){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,t));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(t,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,t,r,o);let a=t.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(t,r){let o=t.scale.map(n=>this.scaleIndicator(t,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(t,r){await this.onChoice(t,r);let o=this.index===r,a=await this.pointer(t,r),n=await t.hint;n&&!l0e.hasColor(n)&&(n=this.styles.muted(n));let u=E=>this.margin[3]+E.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(t),h=await this.resolve(t.message,this.state,t,r),w=await this.renderScale(t,r),I=this.margin[1]+this.margin[3];this.scaleLength=Cft.unstyle(w).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-I.length);let b=l0e.wordWrap(h,{width:this.widths[0],newline:A}).split(`
233`).map(E=>u(E)+this.margin[1]);return o&&(w=this.styles.info(w),b=b.map(E=>this.styles.info(E))),b[0]+=w,this.linebreak&&b.push(""),[p+a,b.join(`
234`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let t=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(t),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
235`)}async render(){let{submitted:t,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),w=await this.error()||await this.hint(),I=await this.renderChoices(),v=await this.footer(),b=this.emptyError;p&&(u+=p),w&&!u.includes(w)&&(u+=" "+w),t&&!p&&!I.trim()&&this.multiple&&b!=null&&(u+=this.styles.danger(b)),this.clear(r),this.write([A,u,h,I,v].filter(Boolean).join(`
236`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIndex;return this.base.submit.call(this)}};c0e.exports=a8});var p0e=_((t8t,f0e)=>{"use strict";var A0e=Vc(),Bft=(e="")=>typeof e=="string"?e.replace(/^['"]|['"]$/g,""):"",c8=class{constructor(t){this.name=t.key,this.field=t.field||{},this.value=Bft(t.initial||this.field.initial||""),this.message=t.message||this.name,this.cursor=0,this.input="",this.lines=[]}},vft=async(e={},t={},r=o=>o)=>{let o=new Set,a=e.fields||[],n=e.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let w=-1,I=()=>n[++w],v=()=>n[w+1],b=E=>{E.line=h,u.push(E)};for(b({type:"bos",value:""});w<n.length-1;){let E=I();if(/^[^\S\n ]$/.test(E)){b({type:"text",value:E});continue}if(E===`
237`){b({type:"newline",value:E}),h++;continue}if(E==="\\"){E+=I(),b({type:"text",value:E});continue}if((E==="$"||E==="#"||E==="{")&&v()==="{"){let N=I();E+=N;let U={type:"template",open:E,inner:"",close:"",value:E},V;for(;V=I();){if(V==="}"){v()==="}"&&(V+=I()),U.value+=V,U.close=V;break}V===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=V),U.value+=V,U.inner+=V}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,t.hasOwnProperty(U.key)&&(U.initial=t[U.key]),U=r(U),b(U),p.push(U.key),o.add(U.key);let ee=A.find(le=>le.name===U.key);U.field=a.find(le=>le.name===U.key),ee||(ee=new c8(U),A.push(ee)),ee.lines.push(U.line-1);continue}let R=u[u.length-1];R.type==="text"&&R.line===h?R.value+=E:b({type:"text",value:E})}return b({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};f0e.exports=async e=>{let t=e.options,r=new Set(t.required===!0?[]:t.required||[]),o={...t.values,...t.initial},{tabstops:a,items:n,keys:u}=await vft(t,o),A=l8("result",e,t),p=l8("format",e,t),h=l8("validate",e,t,!0),w=e.isValue.bind(e);return async(I={},v=!1)=>{let b=0;I.required=r,I.items=n,I.keys=u,I.output="";let E=async(V,ee,le,fe)=>{let de=await h(V,ee,le,fe);return de===!1?"Invalid field "+le.name:de};for(let V of a){let ee=V.value,le=V.key;if(V.type!=="template"){ee&&(I.output+=ee);continue}if(V.type==="template"){let fe=n.find(be=>be.name===le);t.required===!0&&I.required.add(fe.name);let de=[fe.input,I.values[fe.value],fe.value,ee].find(w),oe=(fe.field||{}).message||V.inner;if(v){let be=await E(I.values[le],I,fe,b);if(be&&typeof be=="string"||be===!1){I.invalid.set(le,be);continue}I.invalid.delete(le);let g=await A(I.values[le],I,fe,b);I.output+=A0e.unstyle(g);continue}fe.placeholder=!1;let Be=ee;ee=await p(ee,I,fe,b),de!==ee?(I.values[le]=de,ee=e.styles.typing(de),I.missing.delete(oe)):(I.values[le]=void 0,de=`<${oe}>`,ee=e.styles.primary(de),fe.placeholder=!0,I.required.has(le)&&I.missing.add(oe)),I.missing.has(oe)&&I.validating&&(ee=e.styles.warning(de)),I.invalid.has(le)&&I.validating&&(ee=e.styles.danger(de)),b===I.index&&(Be!==ee?ee=e.styles.underline(ee):ee=e.styles.heading(A0e.unstyle(ee))),b++}ee&&(I.output+=ee)}let R=I.output.split(`
238`).map(V=>" "+V),N=n.length,U=0;for(let V of n)I.invalid.has(V.name)&&V.lines.forEach(ee=>{R[ee][0]===" "&&(R[ee]=I.styles.danger(I.symbols.bullet)+R[ee].slice(1))}),e.isValue(I.values[V.name])&&U++;return I.completed=(U/N*100).toFixed(0),I.output=R.join(`
239`),I.output}};function l8(e,t,r,o){return(a,n,u,A)=>typeof u.field[e]=="function"?u.field[e].call(t,a,n,u,A):[o,a].find(p=>t.isValue(p))}});var g0e=_((r8t,h0e)=>{"use strict";var Dft=Vc(),Sft=p0e(),Pft=pw(),u8=class extends Pft{constructor(t){super(t),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Sft(this),await super.initialize()}async reset(t){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},t!==!0&&(await this.initialize(),await this.render())}moveCursor(t){let r=this.getItem();this.cursor+=t,r.cursor+=t}dispatch(t,r){if(!r.code&&!r.ctrl&&t!=null&&this.getItem()){this.append(t,r);return}this.alert()}append(t,r){let o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.input=`${a}${t}${n}`,this.moveCursor(1),this.render()}delete(){let t=this.getItem();if(this.cursor<=0||!t.input)return this.alert();let r=t.input.slice(this.cursor),o=t.input.slice(0,this.cursor-1);this.input=t.input=`${o}${r}`,this.moveCursor(-1),this.render()}increment(t){return t>=this.state.keys.length-1?0:t+1}decrement(t){return t<=0?this.state.keys.length-1:t-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(t){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:t,keys:r=[],submitted:o,size:a}=this.state,n=[this.options.newline,`
240`].find(V=>V!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let w=await this.header(),I=await this.error()||"",v=await this.hint()||"",b=o?"":await this.interpolate(this.state),E=this.state.key=r[t]||"",R=await this.format(E),N=await this.footer();R&&(h+=" "+R),v&&!R&&this.state.completed===0&&(h+=" "+v),this.clear(a);let U=[w,h,b,N,I.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(t){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:t,missing:r,output:o,values:a}=this.state;if(t.size){let A="";for(let[p,h]of t)A+=`Invalid ${p}: ${h}
241`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=Dft.unstyle(o).split(`
242`).map(A=>A.slice(1)).join(`
243`);return this.value={values:a,result:u},super.submit()}};h0e.exports=u8});var m0e=_((n8t,d0e)=>{"use strict";var xft="(Use <shift>+<up/down> to sort)",bft=Ph(),A8=class extends bft{constructor(t){super({...t,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,xft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(t,r){let o=await super.renderChoice(t,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(t=>t.value),super.submit()}};d0e.exports=A8});var E0e=_((i8t,y0e)=>{"use strict";var Qft=o2(),f8=class extends Qft{constructor(t={}){if(super(t),this.emptyError=t.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(o=>this.styles.muted(o)),this.state.header=r.join(`
244 `)}}async toChoices(...t){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...t);for(let o of r)o.scale=kft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let t=this.focused,r=t.scale[t.scaleIdx],o=r.selected;return t.scale.forEach(a=>a.selected=!1),r.selected=!o,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIdx>=t.scale.length-1?this.alert():(t.scaleIdx++,this.render())}left(){let t=this.focused;return t.scaleIdx<=0?this.alert():(t.scaleIdx--,this.render())}indent(){return" "}async renderChoice(t,r){await this.onChoice(t,r);let o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=ee=>(ee?this.styles.success("\u25C9"):"\u25EF")+u,w=r+1+".",I=o?this.styles.heading:this.styles.noop,v=await this.resolve(t.message,this.state,t,r),b=this.indent(t),E=b+t.scale.map((ee,le)=>h(le===t.scaleIdx)).join(A),R=ee=>ee===t.scaleIdx?I(ee):ee,N=b+t.scale.map((ee,le)=>R(le)).join(p),U=()=>[w,v].filter(Boolean).join(" "),V=()=>[U(),E,N," "].filter(Boolean).join(`
245`);return o&&(E=this.styles.cyan(E),N=this.styles.cyan(N)),V()}async renderChoices(){if(this.state.submitted)return"";let t=this.visible.map(async(o,a)=>await this.renderChoice(o,a)),r=await Promise.all(t);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
246`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:t,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),w=await this.renderChoices(),I=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),t&&!p&&!w&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,w,I].filter(Boolean).join(`
247`)),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIdx;return this.base.submit.call(this)}};function kft(e,t={}){if(Array.isArray(t.scale))return t.scale.map(o=>({...o}));let r=[];for(let o=1;o<e+1;o++)r.push({i:o,selected:!1});return r}y0e.exports=f8});var C0e=_((s8t,w0e)=>{w0e.exports=e8()});var B0e=_((o8t,I0e)=>{"use strict";var Fft=aQ(),p8=class extends Fft{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(t="",r){switch(t.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let t=o=>this.styles.primary.underline(o);return[this.value?this.disabled:t(this.disabled),this.value?t(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:t}=this.state,r=await this.header(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(t),this.write([r,h,p].filter(Boolean).join(`
248`)),this.write(this.margin[2]),this.restore()}};I0e.exports=p8});var D0e=_((a8t,v0e)=>{"use strict";var Rft=Ph(),h8=class extends Rft{constructor(t){if(super(t),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(t,r){let o=await super.toChoices(t,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}check(t){return t.index===this.options.correctChoice}async result(t){return{selectedAnswer:t,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};v0e.exports=h8});var P0e=_(g8=>{"use strict";var S0e=No(),fs=(e,t)=>{S0e.defineExport(g8,e,t),S0e.defineExport(g8,e.toLowerCase(),t)};fs("AutoComplete",()=>Rhe());fs("BasicAuth",()=>_he());fs("Confirm",()=>qhe());fs("Editable",()=>Yhe());fs("Form",()=>oQ());fs("Input",()=>e8());fs("Invisible",()=>Zhe());fs("List",()=>e0e());fs("MultiSelect",()=>r0e());fs("Numeral",()=>s0e());fs("Password",()=>a0e());fs("Scale",()=>u0e());fs("Select",()=>Ph());fs("Snippet",()=>g0e());fs("Sort",()=>m0e());fs("Survey",()=>E0e());fs("Text",()=>C0e());fs("Toggle",()=>B0e());fs("Quiz",()=>D0e())});var b0e=_((c8t,x0e)=>{x0e.exports={ArrayPrompt:o2(),AuthPrompt:J_(),BooleanPrompt:aQ(),NumberPrompt:s8(),StringPrompt:Yd()}});var l2=_((u8t,k0e)=>{"use strict";var Q0e=Ie("assert"),m8=Ie("events"),xh=No(),Xc=class extends m8{constructor(t,r){super(),this.options=xh.merge({},t),this.answers={...r}}register(t,r){if(xh.isObject(t)){for(let a of Object.keys(t))this.register(a,t[a]);return this}Q0e.equal(typeof r,"function","expected a function");let o=t.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=r(this.Prompt,this),this}async prompt(t=[]){for(let r of[].concat(t))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(xh.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(t){typeof t=="function"&&(t=await t.call(this));let r=xh.merge({},this.options,t),{type:o,name:a}=t,{set:n,get:u}=xh;if(typeof o=="function"&&(o=await o.call(this,t,this.answers)),!o)return this.answers[a];Q0e(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",w=>{this.emit("answer",a,w,A),n(this.answers,a,w)});let h=A.emit.bind(A);return A.emit=(...w)=>(this.emit.call(this,...w),h(...w)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.run(),p}use(t){return t.call(this,this),this}set Prompt(t){this._Prompt=t}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(t){this._Prompt=t}static get Prompt(){return this._Prompt||pw()}static get prompts(){return P0e()}static get types(){return b0e()}static get prompt(){let t=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(t.emit(...u),n(...u)),a.prompt(r)};return xh.mixinEmitter(t,new m8),t}};xh.mixinEmitter(Xc,new m8);var d8=Xc.prompts;for(let e of Object.keys(d8)){let t=e.toLowerCase(),r=o=>new d8[e](o).run();Xc.prompt[t]=r,Xc[t]=r,Xc[e]||Reflect.defineProperty(Xc,e,{get:()=>d8[e]})}var a2=e=>{xh.defineExport(Xc,e,()=>Xc.types[e])};a2("ArrayPrompt");a2("AuthPrompt");a2("BooleanPrompt");a2("NumberPrompt");a2("StringPrompt");k0e.exports=Xc});var f2=_((W8t,M0e)=>{var Uft=zb();function _ft(e,t,r){var o=e==null?void 0:Uft(e,t);return o===void 0?r:o}M0e.exports=_ft});var H0e=_((Z8t,_0e)=>{function Hft(e,t){for(var r=-1,o=e==null?0:e.length;++r<o&&t(e[r],r,e)!==!1;);return e}_0e.exports=Hft});var q0e=_(($8t,j0e)=>{var jft=gd(),qft=VS();function Gft(e,t){return e&&jft(t,qft(t),e)}j0e.exports=Gft});var Y0e=_((eHt,G0e)=>{var Yft=gd(),Wft=qy();function Kft(e,t){return e&&Yft(t,Wft(t),e)}G0e.exports=Kft});var K0e=_((tHt,W0e)=>{var Jft=gd(),Vft=qS();function zft(e,t){return Jft(e,Vft(e),t)}W0e.exports=zft});var B8=_((rHt,J0e)=>{var Xft=jS(),Zft=eP(),$ft=qS(),ept=YN(),tpt=Object.getOwnPropertySymbols,rpt=tpt?function(e){for(var t=[];e;)Xft(t,$ft(e)),e=Zft(e);return t}:ept;J0e.exports=rpt});var z0e=_((nHt,V0e)=>{var npt=gd(),ipt=B8();function spt(e,t){return npt(e,ipt(e),t)}V0e.exports=spt});var v8=_((iHt,X0e)=>{var opt=GN(),apt=B8(),lpt=qy();function cpt(e){return opt(e,lpt,apt)}X0e.exports=cpt});var $0e=_((sHt,Z0e)=>{var upt=Object.prototype,Apt=upt.hasOwnProperty;function fpt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Apt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}Z0e.exports=fpt});var tge=_((oHt,ege)=>{var ppt=ZS();function hpt(e,t){var r=t?ppt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}ege.exports=hpt});var nge=_((aHt,rge)=>{var gpt=/\w*$/;function dpt(e){var t=new e.constructor(e.source,gpt.exec(e));return t.lastIndex=e.lastIndex,t}rge.exports=dpt});var lge=_((lHt,age)=>{var ige=fd(),sge=ige?ige.prototype:void 0,oge=sge?sge.valueOf:void 0;function mpt(e){return oge?Object(oge.call(e)):{}}age.exports=mpt});var uge=_((cHt,cge)=>{var ypt=ZS(),Ept=tge(),wpt=nge(),Cpt=lge(),Ipt=sL(),Bpt="[object Boolean]",vpt="[object Date]",Dpt="[object Map]",Spt="[object Number]",Ppt="[object RegExp]",xpt="[object Set]",bpt="[object String]",Qpt="[object Symbol]",kpt="[object ArrayBuffer]",Fpt="[object DataView]",Rpt="[object Float32Array]",Tpt="[object Float64Array]",Npt="[object Int8Array]",Lpt="[object Int16Array]",Opt="[object Int32Array]",Mpt="[object Uint8Array]",Upt="[object Uint8ClampedArray]",_pt="[object Uint16Array]",Hpt="[object Uint32Array]";function jpt(e,t,r){var o=e.constructor;switch(t){case kpt:return ypt(e);case Bpt:case vpt:return new o(+e);case Fpt:return Ept(e,r);case Rpt:case Tpt:case Npt:case Lpt:case Opt:case Mpt:case Upt:case _pt:case Hpt:return Ipt(e,r);case Dpt:return new o;case Spt:case bpt:return new o(e);case Ppt:return wpt(e);case xpt:return new o;case Qpt:return Cpt(e)}}cge.exports=jpt});var fge=_((uHt,Age)=>{var qpt=HI(),Gpt=Xu(),Ypt="[object Map]";function Wpt(e){return Gpt(e)&&qpt(e)==Ypt}Age.exports=Wpt});var dge=_((AHt,gge)=>{var Kpt=fge(),Jpt=YS(),pge=WS(),hge=pge&&pge.isMap,Vpt=hge?Jpt(hge):Kpt;gge.exports=Vpt});var yge=_((fHt,mge)=>{var zpt=HI(),Xpt=Xu(),Zpt="[object Set]";function $pt(e){return Xpt(e)&&zpt(e)==Zpt}mge.exports=$pt});var Ige=_((pHt,Cge)=>{var eht=yge(),tht=YS(),Ege=WS(),wge=Ege&&Ege.isSet,rht=wge?tht(wge):eht;Cge.exports=rht});var D8=_((hHt,Sge)=>{var nht=_S(),iht=H0e(),sht=tP(),oht=q0e(),aht=Y0e(),lht=iL(),cht=$S(),uht=K0e(),Aht=z0e(),fht=VN(),pht=v8(),hht=HI(),ght=$0e(),dht=uge(),mht=oL(),yht=Hl(),Eht=LI(),wht=dge(),Cht=il(),Iht=Ige(),Bht=VS(),vht=qy(),Dht=1,Sht=2,Pht=4,Bge="[object Arguments]",xht="[object Array]",bht="[object Boolean]",Qht="[object Date]",kht="[object Error]",vge="[object Function]",Fht="[object GeneratorFunction]",Rht="[object Map]",Tht="[object Number]",Dge="[object Object]",Nht="[object RegExp]",Lht="[object Set]",Oht="[object String]",Mht="[object Symbol]",Uht="[object WeakMap]",_ht="[object ArrayBuffer]",Hht="[object DataView]",jht="[object Float32Array]",qht="[object Float64Array]",Ght="[object Int8Array]",Yht="[object Int16Array]",Wht="[object Int32Array]",Kht="[object Uint8Array]",Jht="[object Uint8ClampedArray]",Vht="[object Uint16Array]",zht="[object Uint32Array]",ti={};ti[Bge]=ti[xht]=ti[_ht]=ti[Hht]=ti[bht]=ti[Qht]=ti[jht]=ti[qht]=ti[Ght]=ti[Yht]=ti[Wht]=ti[Rht]=ti[Tht]=ti[Dge]=ti[Nht]=ti[Lht]=ti[Oht]=ti[Mht]=ti[Kht]=ti[Jht]=ti[Vht]=ti[zht]=!0;ti[kht]=ti[vge]=ti[Uht]=!1;function uQ(e,t,r,o,a,n){var u,A=t&Dht,p=t&Sht,h=t&Pht;if(r&&(u=a?r(e,o,a,n):r(e)),u!==void 0)return u;if(!Cht(e))return e;var w=yht(e);if(w){if(u=ght(e),!A)return cht(e,u)}else{var I=hht(e),v=I==vge||I==Fht;if(Eht(e))return lht(e,A);if(I==Dge||I==Bge||v&&!a){if(u=p||v?{}:mht(e),!A)return p?Aht(e,aht(u,e)):uht(e,oht(u,e))}else{if(!ti[I])return a?e:{};u=dht(e,I,A)}}n||(n=new nht);var b=n.get(e);if(b)return b;n.set(e,u),Iht(e)?e.forEach(function(N){u.add(uQ(N,t,r,N,e,n))}):wht(e)&&e.forEach(function(N,U){u.set(U,uQ(N,t,r,U,e,n))});var E=h?p?pht:fht:p?vht:Bht,R=w?void 0:E(e);return iht(R||e,function(N,U){R&&(U=N,N=e[U]),sht(u,U,uQ(N,t,r,U,e,n))}),u}Sge.exports=uQ});var S8=_((gHt,Pge)=>{var Xht=D8(),Zht=1,$ht=4;function e0t(e){return Xht(e,Zht|$ht)}Pge.exports=e0t});var P8=_((dHt,xge)=>{var t0t=y_();function r0t(e,t,r){return e==null?e:t0t(e,t,r)}xge.exports=r0t});var Rge=_((IHt,Fge)=>{var n0t=Object.prototype,i0t=n0t.hasOwnProperty;function s0t(e,t){return e!=null&&i0t.call(e,t)}Fge.exports=s0t});var Nge=_((BHt,Tge)=>{var o0t=Rge(),a0t=E_();function l0t(e,t){return e!=null&&a0t(e,t,o0t)}Tge.exports=l0t});var Oge=_((vHt,Lge)=>{function c0t(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}Lge.exports=c0t});var Uge=_((DHt,Mge)=>{var u0t=zb(),A0t=pU();function f0t(e,t){return t.length<2?e:u0t(e,A0t(t,0,-1))}Mge.exports=f0t});var b8=_((SHt,_ge)=>{var p0t=jd(),h0t=Oge(),g0t=Uge(),d0t=ow();function m0t(e,t){return t=p0t(t,e),e=g0t(e,t),e==null||delete e[d0t(h0t(t))]}_ge.exports=m0t});var Q8=_((PHt,Hge)=>{var y0t=b8();function E0t(e,t){return e==null?!0:y0t(e,t)}Hge.exports=E0t});var Wge=_((r6t,I0t)=>{I0t.exports={name:"@yarnpkg/cli",version:"4.0.0-rc.50",stableVersion:"3.6.3",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspace:^","ci-info":"^3.2.0",clipanion:"^4.0.0-rc.2",semver:"^7.1.2",tslib:"^2.4.0",typanion:"^3.14.0"},devDependencies:{"@types/semver":"^7.1.0","@yarnpkg/builder":"workspace:^","@yarnpkg/monorepo":"workspace:^","@yarnpkg/pnpify":"workspace:^"},peerDependencies:{"@yarnpkg/core":"workspace:^"},scripts:{postpack:"rm -rf lib",prepack:'run build:compile "$(pwd)"',"build:cli+hook":"run build:pnp:hook && builder build bundle","build:cli":"builder build bundle","run:cli":"builder run","update-local":"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/"},publishConfig:{main:"./lib/index.js",bin:null,exports:{".":"./lib/index.js","./package.json":"./package.json"}},files:["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{bundles:{standard:["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]}},repository:{type:"git",url:"ssh://git@github.com/yarnpkg/berry.git",directory:"packages/yarnpkg-cli"},engines:{node:">=18.12.0"}}});var _8=_((RGt,sde)=>{"use strict";sde.exports=function(t,r){r===!0&&(r=0);var o="";if(typeof t=="string")try{o=new URL(t).protocol}catch{}else t&&t.constructor===URL&&(o=t.protocol);var a=o.split(/\:|\+/).filter(Boolean);return typeof r=="number"?a[r]:a}});var ade=_((TGt,ode)=>{"use strict";var _0t=_8();function H0t(e){var t={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:e,query:{},parse_failed:!1};try{var r=new URL(e);t.protocols=_0t(r),t.protocol=t.protocols[0],t.port=r.port,t.resource=r.hostname,t.host=r.host,t.user=r.username||"",t.password=r.password||"",t.pathname=r.pathname,t.hash=r.hash.slice(1),t.search=r.search.slice(1),t.href=r.href,t.query=Object.fromEntries(r.searchParams)}catch{t.protocols=["file"],t.protocol=t.protocols[0],t.port="",t.resource="",t.user="",t.pathname="",t.hash="",t.search="",t.href=e,t.query={},t.parse_failed=!0}return t}ode.exports=H0t});var ude=_((NGt,cde)=>{"use strict";var j0t=ade();function q0t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var G0t=q0t(j0t),Y0t="text/plain",W0t="us-ascii",lde=(e,t)=>t.some(r=>r instanceof RegExp?r.test(e):r===e),K0t=(e,{stripHash:t})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!r)throw new Error(`Invalid URL: ${e}`);let{type:o,data:a,hash:n}=r.groups,u=o.split(";");n=t?"":n;let A=!1;u[u.length-1]==="base64"&&(u.pop(),A=!0);let p=(u.shift()||"").toLowerCase(),w=[...u.map(I=>{let[v,b=""]=I.split("=").map(E=>E.trim());return v==="charset"&&(b=b.toLowerCase(),b===W0t)?"":`${v}${b?`=${b}`:""}`}).filter(Boolean)];return A&&w.push("base64"),(w.length>0||p&&p!==Y0t)&&w.unshift(p),`data:${w.join(";")},${A?a.trim():a}${n?`#${n}`:""}`};function J0t(e,t){if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...t},e=e.trim(),/^data:/i.test(e))return K0t(e,t);if(/^view-source:/i.test(e))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let a=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),t.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),t.stripAuthentication&&(a.username="",a.password=""),t.stripHash?a.hash="":t.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname){let u=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,A=0,p="";for(;;){let w=u.exec(a.pathname);if(!w)break;let I=w[0],v=w.index,b=a.pathname.slice(A,v);p+=b.replace(/\/{2,}/g,"/"),p+=I,A=v+I.length}let h=a.pathname.slice(A,a.pathname.length);p+=h.replace(/\/{2,}/g,"/"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let u=a.pathname.split("/"),A=u[u.length-1];lde(A,t.removeDirectoryIndex)&&(u=u.slice(0,-1),a.pathname=u.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(let u of[...a.searchParams.keys()])lde(u,t.removeQueryParameters)&&a.searchParams.delete(u);if(t.removeQueryParameters===!0&&(a.search=""),t.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}t.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,""));let n=e;return e=a.toString(),!t.removeSingleSlash&&a.pathname==="/"&&!n.endsWith("/")&&a.hash===""&&(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}var H8=(e,t=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/,o=n=>{let u=new Error(n);throw u.subject_url=e,u};(typeof e!="string"||!e.trim())&&o("Invalid url."),e.length>H8.MAX_INPUT_LENGTH&&o("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),t&&(typeof t!="object"&&(t={stripHash:!1}),e=J0t(e,t));let a=G0t.default(e);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=["ssh"],a.protocol="ssh",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):o("URL parsing failed.")}return a};H8.MAX_INPUT_LENGTH=2048;cde.exports=H8});var pde=_((LGt,fde)=>{"use strict";var V0t=_8();function Ade(e){if(Array.isArray(e))return e.indexOf("ssh")!==-1||e.indexOf("rsync")!==-1;if(typeof e!="string")return!1;var t=V0t(e);if(e=e.substring(e.indexOf("://")+3),Ade(t))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!e.match(r)&&e.indexOf("@")<e.indexOf(":")}fde.exports=Ade});var dde=_((OGt,gde)=>{"use strict";var z0t=ude(),hde=pde();function X0t(e){var t=z0t(e);return t.token="",t.password==="x-oauth-basic"?t.token=t.user:t.user==="x-token-auth"&&(t.token=t.password),hde(t.protocols)||t.protocols.length===0&&hde(e)?t.protocol="ssh":t.protocols.length?t.protocol=t.protocols[0]:(t.protocol="file",t.protocols=["file"]),t.href=t.href.replace(/\/$/,""),t}gde.exports=X0t});var yde=_((MGt,mde)=>{"use strict";var Z0t=dde();function j8(e){if(typeof e!="string")throw new Error("The url must be a string.");var t=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;t.test(e)&&(e="https://github.com/"+e);var r=Z0t(e),o=r.resource.split("."),a=null;switch(r.toString=function(N){return j8.stringify(this,N)},r.source=o.length>2?o.slice(1-o.length).join("."):r.source=r.resource,r.git_suffix=/\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),r.owner=decodeURIComponent(r.user),r.source){case"git.cloudforge.com":r.owner=r.user,r.organization=o[0],r.source="cloudforge.com";break;case"visualstudio.com":if(r.resource==="vs-ssh.visualstudio.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+"/"+a[3]);break}else{a=r.name.split("/"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name);break}case"dev.azure.com":case"azure.com":if(r.resource==="ssh.dev.azure.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split("/"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\/+/g,"")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,""));break}default:a=r.name.split("/");var n=a.length-1;if(a.length>=2){var u=a.indexOf("-",2),A=a.indexOf("blob",2),p=a.indexOf("tree",2),h=a.indexOf("commit",2),w=a.indexOf("src",2),I=a.indexOf("raw",2),v=a.indexOf("edit",2);n=u>0?u-1:A>0?A-1:p>0?p-1:h>0?h-1:w>0?w-1:I>0?I-1:v>0?v-1:n,r.owner=a.slice(0,n).join("/"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref="",r.filepathtype="",r.filepath="";var b=a.length>n&&a[n+1]==="-"?n+1:n;a.length>b+2&&["raw","src","blob","tree","edit"].indexOf(a[b+1])>=0&&(r.filepathtype=a[b+1],r.ref=a[b+2],a.length>b+3&&(r.filepath=a.slice(b+3).join("/"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+="/"),r.full_name+=r.name)),r.owner.startsWith("scm/")&&(r.source="bitbucket-server",r.owner=r.owner.replace("scm/",""),r.organization=r.owner,r.full_name=r.owner+"/"+r.name);var E=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,R=E.exec(r.pathname);return R!=null&&(r.source="bitbucket-server",R[1]==="users"?r.owner="~"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split("/"),a.length>1&&(["raw","browse"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join("/"))):a[1]==="commits"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+"/"+r.name,r.query.at?r.ref=r.query.at:r.ref=""),r}j8.stringify=function(e,t){t=t||(e.protocols&&e.protocols.length?e.protocols.join("+"):e.protocol);var r=e.port?":"+e.port:"",o=e.user||"git",a=e.git_suffix?".git":"";switch(t){case"ssh":return r?"ssh://"+o+"@"+e.resource+r+"/"+e.full_name+a:o+"@"+e.resource+":"+e.full_name+a;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return t+"://"+o+"@"+e.resource+r+"/"+e.full_name+a;case"http":case"https":var n=e.token?$0t(e):e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?e.user+"@":"";return t+"://"+n+e.resource+r+"/"+egt(e)+a;default:return e.href}};function $0t(e){switch(e.source){case"bitbucket.org":return"x-token-auth:"+e.token+"@";default:return e.token+"@"}}function egt(e){switch(e.source){case"bitbucket-server":return"scm/"+e.full_name;default:return""+e.full_name}}mde.exports=j8});var Tde=_((m5t,Rde)=>{var Agt=Ux(),fgt=$S(),pgt=Hl(),hgt=fE(),ggt=m_(),dgt=ow(),mgt=R1();function ygt(e){return pgt(e)?Agt(e,dgt):hgt(e)?[e]:fgt(ggt(mgt(e)))}Rde.exports=ygt});function Igt(e,t){return t===1&&Cgt.has(e[0])}function E2(e){let t=Array.isArray(e)?e:(0,Ode.default)(e);return t.map((o,a)=>Egt.test(o)?`[${o}]`:wgt.test(o)&&!Igt(t,a)?`.${o}`:`[${JSON.stringify(o)}]`).join("").replace(/^\./,"")}function Bgt(e,t){let r=[];if(t.methodName!==null&&r.push(ye.pretty(e,t.methodName,ye.Type.CODE)),t.file!==null){let o=[];o.push(ye.pretty(e,t.file,ye.Type.PATH)),t.line!==null&&(o.push(ye.pretty(e,t.line,ye.Type.NUMBER)),t.column!==null&&o.push(ye.pretty(e,t.column,ye.Type.NUMBER))),r.push(`(${o.join(ye.pretty(e,":","grey"))})`)}return r.join(" ")}function pQ(e,{manifestUpdates:t,reportedErrors:r},{fix:o}={}){let a=new Map,n=new Map;for(let[u,A]of t){let p=r.get(u)?.map(v=>({text:v,fixable:!1}))??[],h=!1,w=e.getWorkspaceByCwd(u),I=w.manifest.exportTo({});for(let[v,b]of A){if(b.size>1){let E=[...b].map(([R,N])=>{let U=ye.pretty(e.configuration,R,ye.Type.INSPECT),V=N.size>0?Bgt(e.configuration,N.values().next().value):null;return V!==null?`
249${U} at ${V}`:`
250${U}`}).join("");p.push({text:`Conflict detected in constraint targeting ${ye.pretty(e.configuration,v,ye.Type.CODE)}; conflicting values are:${E}`,fixable:!1})}else{let[[E]]=b,R=(0,Nde.default)(I,v);if(R===E)continue;if(!o){let N=typeof R>"u"?`Missing field ${ye.pretty(e.configuration,v,ye.Type.CODE)}; expected ${ye.pretty(e.configuration,E,ye.Type.INSPECT)}`:typeof E>"u"?`Extraneous field ${ye.pretty(e.configuration,v,ye.Type.CODE)} currently set to ${ye.pretty(e.configuration,R,ye.Type.INSPECT)}`:`Invalid field ${ye.pretty(e.configuration,v,ye.Type.CODE)}; expected ${ye.pretty(e.configuration,E,ye.Type.INSPECT)}, found ${ye.pretty(e.configuration,R,ye.Type.INSPECT)}`;p.push({text:N,fixable:!0});continue}typeof E>"u"?(0,Mde.default)(I,v):(0,Lde.default)(I,v,E),h=!0}h&&a.set(w,I)}p.length>0&&n.set(w,p)}return{changedWorkspaces:a,remainingErrors:n}}function Ude(e,{configuration:t}){let r={children:[]};for(let[o,a]of e){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${ye.pretty(t,"\u2699","gray")} ${p[0]}`),n.push({value:ye.tuple(ye.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:ye.tuple(ye.Type.NO_HINT,h)}))})}let u={value:ye.tuple(ye.Type.LOCATOR,o.anchoredLocator),children:_e.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=_e.sortMap(r.children,o=>o.value[1]),r}var Nde,Lde,Ode,Mde,Ew,Egt,wgt,Cgt,w2=yt(()=>{Ye();Nde=$e(f2()),Lde=$e(P8()),Ode=$e(Tde()),Mde=$e(Q8()),Ew=class{constructor(t){this.indexedFields=t;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let t of this.indexedFields)this.indexes[t]=new Map}insert(t){this.items.push(t);for(let r of this.indexedFields){let o=Object.hasOwn(t,r)?t[r]:void 0;if(typeof o>"u")continue;_e.getArrayWithDefault(this.indexes[r],o).push(t)}return t}find(t){if(typeof t>"u")return this.items;let r=Object.entries(t);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let w=new Set(h.get(A)??[]);if(w.size===0)return[];if(typeof a>"u")a=w;else for(let I of a)w.has(I)||a.delete(I);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.hasOwn(u,A)&&u[A]===p:Object.hasOwn(u,A)===!1))return!1;return!0})),n}},Egt=/^[0-9]+$/,wgt=/^[a-zA-Z0-9_]+$/,Cgt=new Set(["scripts",...Ot.allDependencies])});var _de=_((b5t,rH)=>{var vgt;(function(e){var t=function(){return{"append/2":[new e.type.Rule(new e.type.Term("append",[new e.type.Var("X"),new e.type.Var("L")]),new e.type.Term("foldl",[new e.type.Term("append",[]),new e.type.Var("X"),new e.type.Term("[]",[]),new e.type.Var("L")]))],"append/3":[new e.type.Rule(new e.type.Term("append",[new e.type.Term("[]",[]),new e.type.Var("X"),new e.type.Var("X")]),null),new e.type.Rule(new e.type.Term("append",[new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("S")])]),new e.type.Term("append",[new e.type.Var("T"),new e.type.Var("X"),new e.type.Var("S")]))],"member/2":[new e.type.Rule(new e.type.Term("member",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("_")])]),null),new e.type.Rule(new e.type.Term("member",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("_"),new e.type.Var("Xs")])]),new e.type.Term("member",[new e.type.Var("X"),new e.type.Var("Xs")]))],"permutation/2":[new e.type.Rule(new e.type.Term("permutation",[new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("permutation",[new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("permutation",[new e.type.Var("T"),new e.type.Var("P")]),new e.type.Term(",",[new e.type.Term("append",[new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("P")]),new e.type.Term("append",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("Y")]),new e.type.Var("S")])])]))],"maplist/2":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("X")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("Xs")])]))],"maplist/3":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs")])]))],"maplist/4":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")]),new e.type.Term(".",[new e.type.Var("C"),new e.type.Var("Cs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B"),new e.type.Var("C")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs"),new e.type.Var("Cs")])]))],"maplist/5":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")]),new e.type.Term(".",[new e.type.Var("C"),new e.type.Var("Cs")]),new e.type.Term(".",[new e.type.Var("D"),new e.type.Var("Ds")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B"),new e.type.Var("C"),new e.type.Var("D")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs"),new e.type.Var("Cs"),new e.type.Var("Ds")])]))],"maplist/6":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")]),new e.type.Term(".",[new e.type.Var("C"),new e.type.Var("Cs")]),new e.type.Term(".",[new e.type.Var("D"),new e.type.Var("Ds")]),new e.type.Term(".",[new e.type.Var("E"),new e.type.Var("Es")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B"),new e.type.Var("C"),new e.type.Var("D"),new e.type.Var("E")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs"),new e.type.Var("Cs"),new e.type.Var("Ds"),new e.type.Var("Es")])]))],"maplist/7":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")]),new e.type.Term(".",[new e.type.Var("C"),new e.type.Var("Cs")]),new e.type.Term(".",[new e.type.Var("D"),new e.type.Var("Ds")]),new e.type.Term(".",[new e.type.Var("E"),new e.type.Var("Es")]),new e.type.Term(".",[new e.type.Var("F"),new e.type.Var("Fs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B"),new e.type.Var("C"),new e.type.Var("D"),new e.type.Var("E"),new e.type.Var("F")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs"),new e.type.Var("Cs"),new e.type.Var("Ds"),new e.type.Var("Es"),new e.type.Var("Fs")])]))],"maplist/8":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")]),new e.type.Term(".",[new e.type.Var("C"),new e.type.Var("Cs")]),new e.type.Term(".",[new e.type.Var("D"),new e.type.Var("Ds")]),new e.type.Term(".",[new e.type.Var("E"),new e.type.Var("Es")]),new e.type.Term(".",[new e.type.Var("F"),new e.type.Var("Fs")]),new e.type.Term(".",[new e.type.Var("G"),new e.type.Var("Gs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B"),new e.type.Var("C"),new e.type.Var("D"),new e.type.Var("E"),new e.type.Var("F"),new e.type.Var("G")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs"),new e.type.Var("Cs"),new e.type.Var("Ds"),new e.type.Var("Es"),new e.type.Var("Fs"),new e.type.Var("Gs")])]))],"include/3":[new e.type.Rule(new e.type.Term("include",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("include",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("L")]),new e.type.Term(",",[new e.type.Term("=..",[new e.type.Var("P"),new e.type.Var("A")]),new e.type.Term(",",[new e.type.Term("append",[new e.type.Var("A"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Term("[]",[])]),new e.type.Var("B")]),new e.type.Term(",",[new e.type.Term("=..",[new e.type.Var("F"),new e.type.Var("B")]),new e.type.Term(",",[new e.type.Term(";",[new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("F")]),new e.type.Term(",",[new e.type.Term("=",[new e.type.Var("L"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("S")])]),new e.type.Term("!",[])])]),new e.type.Term("=",[new e.type.Var("L"),new e.type.Var("S")])]),new e.type.Term("include",[new e.type.Var("P"),new e.type.Var("T"),new e.type.Var("S")])])])])]))],"exclude/3":[new e.type.Rule(new e.type.Term("exclude",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("exclude",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("exclude",[new e.type.Var("P"),new e.type.Var("T"),new e.type.Var("E")]),new e.type.Term(",",[new e.type.Term("=..",[new e.type.Var("P"),new e.type.Var("L")]),new e.type.Term(",",[new e.type.Term("append",[new e.type.Var("L"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Term("[]",[])]),new e.type.Var("Q")]),new e.type.Term(",",[new e.type.Term("=..",[new e.type.Var("R"),new e.type.Var("Q")]),new e.type.Term(";",[new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("R")]),new e.type.Term(",",[new e.type.Term("!",[]),new e.type.Term("=",[new e.type.Var("S"),new e.type.Var("E")])])]),new e.type.Term("=",[new e.type.Var("S"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("E")])])])])])])]))],"foldl/4":[new e.type.Rule(new e.type.Term("foldl",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Var("I"),new e.type.Var("I")]),null),new e.type.Rule(new e.type.Term("foldl",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("I"),new e.type.Var("R")]),new e.type.Term(",",[new e.type.Term("=..",[new e.type.Var("P"),new e.type.Var("L")]),new e.type.Term(",",[new e.type.Term("append",[new e.type.Var("L"),new e.type.Term(".",[new e.type.Var("I"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Term("[]",[])])])]),new e.type.Var("L2")]),new e.type.Term(",",[new e.type.Term("=..",[new e.type.Var("P2"),new e.type.Var("L2")]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P2")]),new e.type.Term("foldl",[new e.type.Var("P"),new e.type.Var("T"),new e.type.Var("X"),new e.type.Var("R")])])])])]))],"select/3":[new e.type.Rule(new e.type.Term("select",[new e.type.Var("E"),new e.type.Term(".",[new e.type.Var("E"),new e.type.Var("Xs")]),new e.type.Var("Xs")]),null),new e.type.Rule(new e.type.Term("select",[new e.type.Var("E"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")]),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Ys")])]),new e.type.Term("select",[new e.type.Var("E"),new e.type.Var("Xs"),new e.type.Var("Ys")]))],"sum_list/2":[new e.type.Rule(new e.type.Term("sum_list",[new e.type.Term("[]",[]),new e.type.Num(0,!1)]),null),new e.type.Rule(new e.type.Term("sum_list",[new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("sum_list",[new e.type.Var("Xs"),new e.type.Var("Y")]),new e.type.Term("is",[new e.type.Var("S"),new e.type.Term("+",[new e.type.Var("X"),new e.type.Var("Y")])])]))],"max_list/2":[new e.type.Rule(new e.type.Term("max_list",[new e.type.Term(".",[new e.type.Var("X"),new e.type.Term("[]",[])]),new e.type.Var("X")]),null),new e.type.Rule(new e.type.Term("max_list",[new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("max_list",[new e.type.Var("Xs"),new e.type.Var("Y")]),new e.type.Term(";",[new e.type.Term(",",[new e.type.Term(">=",[new e.type.Var("X"),new e.type.Var("Y")]),new e.type.Term(",",[new e.type.Term("=",[new e.type.Var("S"),new e.type.Var("X")]),new e.type.Term("!",[])])]),new e.type.Term("=",[new e.type.Var("S"),new e.type.Var("Y")])])]))],"min_list/2":[new e.type.Rule(new e.type.Term("min_list",[new e.type.Term(".",[new e.type.Var("X"),new e.type.Term("[]",[])]),new e.type.Var("X")]),null),new e.type.Rule(new e.type.Term("min_list",[new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("min_list",[new e.type.Var("Xs"),new e.type.Var("Y")]),new e.type.Term(";",[new e.type.Term(",",[new e.type.Term("=<",[new e.type.Var("X"),new e.type.Var("Y")]),new e.type.Term(",",[new e.type.Term("=",[new e.type.Var("S"),new e.type.Var("X")]),new e.type.Term("!",[])])]),new e.type.Term("=",[new e.type.Var("S"),new e.type.Var("Y")])])]))],"prod_list/2":[new e.type.Rule(new e.type.Term("prod_list",[new e.type.Term("[]",[]),new e.type.Num(1,!1)]),null),new e.type.Rule(new e.type.Term("prod_list",[new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("prod_list",[new e.type.Var("Xs"),new e.type.Var("Y")]),new e.type.Term("is",[new e.type.Var("S"),new e.type.Term("*",[new e.type.Var("X"),new e.type.Var("Y")])])]))],"last/2":[new e.type.Rule(new e.type.Term("last",[new e.type.Term(".",[new e.type.Var("X"),new e.type.Term("[]",[])]),new e.type.Var("X")]),null),new e.type.Rule(new e.type.Term("last",[new e.type.Term(".",[new e.type.Var("_"),new e.type.Var("Xs")]),new e.type.Var("X")]),new e.type.Term("last",[new e.type.Var("Xs"),new e.type.Var("X")]))],"prefix/2":[new e.type.Rule(new e.type.Term("prefix",[new e.type.Var("Part"),new e.type.Var("Whole")]),new e.type.Term("append",[new e.type.Var("Part"),new e.type.Var("_"),new e.type.Var("Whole")]))],"nth0/3":[new e.type.Rule(new e.type.Term("nth0",[new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z")]),new e.type.Term(";",[new e.type.Term("->",[new e.type.Term("var",[new e.type.Var("X")]),new e.type.Term("nth",[new e.type.Num(0,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("_")])]),new e.type.Term(",",[new e.type.Term(">=",[new e.type.Var("X"),new e.type.Num(0,!1)]),new e.type.Term(",",[new e.type.Term("nth",[new e.type.Num(0,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("_")]),new e.type.Term("!",[])])])]))],"nth1/3":[new e.type.Rule(new e.type.Term("nth1",[new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z")]),new e.type.Term(";",[new e.type.Term("->",[new e.type.Term("var",[new e.type.Var("X")]),new e.type.Term("nth",[new e.type.Num(1,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("_")])]),new e.type.Term(",",[new e.type.Term(">",[new e.type.Var("X"),new e.type.Num(0,!1)]),new e.type.Term(",",[new e.type.Term("nth",[new e.type.Num(1,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("_")]),new e.type.Term("!",[])])])]))],"nth0/4":[new e.type.Rule(new e.type.Term("nth0",[new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("W")]),new e.type.Term(";",[new e.type.Term("->",[new e.type.Term("var",[new e.type.Var("X")]),new e.type.Term("nth",[new e.type.Num(0,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("W")])]),new e.type.Term(",",[new e.type.Term(">=",[new e.type.Var("X"),new e.type.Num(0,!1)]),new e.type.Term(",",[new e.type.Term("nth",[new e.type.Num(0,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("W")]),new e.type.Term("!",[])])])]))],"nth1/4":[new e.type.Rule(new e.type.Term("nth1",[new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("W")]),new e.type.Term(";",[new e.type.Term("->",[new e.type.Term("var",[new e.type.Var("X")]),new e.type.Term("nth",[new e.type.Num(1,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("W")])]),new e.type.Term(",",[new e.type.Term(">",[new e.type.Var("X"),new e.type.Num(0,!1)]),new e.type.Term(",",[new e.type.Term("nth",[new e.type.Num(1,!1),new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("Z"),new e.type.Var("W")]),new e.type.Term("!",[])])])]))],"nth/5":[new e.type.Rule(new e.type.Term("nth",[new e.type.Var("N"),new e.type.Var("N"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")]),new e.type.Var("X"),new e.type.Var("Xs")]),null),new e.type.Rule(new e.type.Term("nth",[new e.type.Var("N"),new e.type.Var("O"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")]),new e.type.Var("Y"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Ys")])]),new e.type.Term(",",[new e.type.Term("is",[new e.type.Var("M"),new e.type.Term("+",[new e.type.Var("N"),new e.type.Num(1,!1)])]),new e.type.Term("nth",[new e.type.Var("M"),new e.type.Var("O"),new e.type.Var("Xs"),new e.type.Var("Y"),new e.type.Var("Ys")])]))],"length/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(!e.type.is_variable(A)&&!e.type.is_integer(A))o.throw_error(e.error.type("integer",A,n.indicator));else if(e.type.is_integer(A)&&A.value<0)o.throw_error(e.error.domain("not_less_than_zero",A,n.indicator));else{var p=new e.type.Term("length",[u,new e.type.Num(0,!1),A]);e.type.is_integer(A)&&(p=new e.type.Term(",",[p,new e.type.Term("!",[])])),o.prepend([new e.type.State(a.goal.replace(p),a.substitution,a)])}},"length/3":[new e.type.Rule(new e.type.Term("length",[new e.type.Term("[]",[]),new e.type.Var("N"),new e.type.Var("N")]),null),new e.type.Rule(new e.type.Term("length",[new e.type.Term(".",[new e.type.Var("_"),new e.type.Var("X")]),new e.type.Var("A"),new e.type.Var("N")]),new e.type.Term(",",[new e.type.Term("succ",[new e.type.Var("A"),new e.type.Var("B")]),new e.type.Term("length",[new e.type.Var("X"),new e.type.Var("B"),new e.type.Var("N")])]))],"replicate/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(e.type.is_variable(A))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_integer(A))o.throw_error(e.error.type("integer",A,n.indicator));else if(A.value<0)o.throw_error(e.error.domain("not_less_than_zero",A,n.indicator));else if(!e.type.is_variable(p)&&!e.type.is_list(p))o.throw_error(e.error.type("list",p,n.indicator));else{for(var h=new e.type.Term("[]"),w=0;w<A.value;w++)h=new e.type.Term(".",[u,h]);o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[h,p])),a.substitution,a)])}},"sort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(e.type.is_variable(u))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_variable(A)&&!e.type.is_fully_list(A))o.throw_error(e.error.type("list",A,n.indicator));else{for(var p=[],h=u;h.indicator==="./2";)p.push(h.args[0]),h=h.args[1];if(e.type.is_variable(h))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_empty_list(h))o.throw_error(e.error.type("list",u,n.indicator));else{for(var w=p.sort(e.compare),I=w.length-1;I>0;I--)w[I].equals(w[I-1])&&w.splice(I,1);for(var v=new e.type.Term("[]"),I=w.length-1;I>=0;I--)v=new e.type.Term(".",[w[I],v]);o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[v,A])),a.substitution,a)])}}},"msort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(e.type.is_variable(u))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_variable(A)&&!e.type.is_fully_list(A))o.throw_error(e.error.type("list",A,n.indicator));else{for(var p=[],h=u;h.indicator==="./2";)p.push(h.args[0]),h=h.args[1];if(e.type.is_variable(h))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_empty_list(h))o.throw_error(e.error.type("list",u,n.indicator));else{for(var w=p.sort(e.compare),I=new e.type.Term("[]"),v=w.length-1;v>=0;v--)I=new e.type.Term(".",[w[v],I]);o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[I,A])),a.substitution,a)])}}},"keysort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(e.type.is_variable(u))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_variable(A)&&!e.type.is_fully_list(A))o.throw_error(e.error.type("list",A,n.indicator));else{for(var p=[],h,w=u;w.indicator==="./2";){if(h=w.args[0],e.type.is_variable(h)){o.throw_error(e.error.instantiation(n.indicator));return}else if(!e.type.is_term(h)||h.indicator!=="-/2"){o.throw_error(e.error.type("pair",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),w=w.args[1]}if(e.type.is_variable(w))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_empty_list(w))o.throw_error(e.error.type("list",u,n.indicator));else{for(var I=p.sort(e.compare),v=new e.type.Term("[]"),b=I.length-1;b>=0;b--)v=new e.type.Term(".",[new e.type.Term("-",[I[b],I[b].pair]),v]),delete I[b].pair;o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[v,A])),a.substitution,a)])}}},"take/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(e.type.is_variable(A)||e.type.is_variable(u))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_list(A))o.throw_error(e.error.type("list",A,n.indicator));else if(!e.type.is_integer(u))o.throw_error(e.error.type("integer",u,n.indicator));else if(!e.type.is_variable(p)&&!e.type.is_list(p))o.throw_error(e.error.type("list",p,n.indicator));else{for(var h=u.value,w=[],I=A;h>0&&I.indicator==="./2";)w.push(I.args[0]),I=I.args[1],h--;if(h===0){for(var v=new e.type.Term("[]"),h=w.length-1;h>=0;h--)v=new e.type.Term(".",[w[h],v]);o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[v,p])),a.substitution,a)])}}},"drop/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(e.type.is_variable(A)||e.type.is_variable(u))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_list(A))o.throw_error(e.error.type("list",A,n.indicator));else if(!e.type.is_integer(u))o.throw_error(e.error.type("integer",u,n.indicator));else if(!e.type.is_variable(p)&&!e.type.is_list(p))o.throw_error(e.error.type("list",p,n.indicator));else{for(var h=u.value,w=[],I=A;h>0&&I.indicator==="./2";)w.push(I.args[0]),I=I.args[1],h--;h===0&&o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[I,p])),a.substitution,a)])}},"reverse/2":function(o,a,n){var u=n.args[0],A=n.args[1],p=e.type.is_instantiated_list(u),h=e.type.is_instantiated_list(A);if(e.type.is_variable(u)&&e.type.is_variable(A))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_variable(u)&&!e.type.is_fully_list(u))o.throw_error(e.error.type("list",u,n.indicator));else if(!e.type.is_variable(A)&&!e.type.is_fully_list(A))o.throw_error(e.error.type("list",A,n.indicator));else if(!p&&!h)o.throw_error(e.error.instantiation(n.indicator));else{for(var w=p?u:A,I=new e.type.Term("[]",[]);w.indicator==="./2";)I=new e.type.Term(".",[w.args[0],I]),w=w.args[1];o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[I,p?A:u])),a.substitution,a)])}},"list_to_set/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(e.type.is_variable(u))o.throw_error(e.error.instantiation(n.indicator));else{for(var p=u,h=[];p.indicator==="./2";)h.push(p.args[0]),p=p.args[1];if(e.type.is_variable(p))o.throw_error(e.error.instantiation(n.indicator));else if(!e.type.is_term(p)||p.indicator!=="[]/0")o.throw_error(e.error.type("list",u,n.indicator));else{for(var w=[],I=new e.type.Term("[]",[]),v,b=0;b<h.length;b++){v=!1;for(var E=0;E<w.length&&!v;E++)v=e.compare(h[b],w[E])===0;v||w.push(h[b])}for(b=w.length-1;b>=0;b--)I=new e.type.Term(".",[w[b],I]);o.prepend([new e.type.State(a.goal.replace(new e.type.Term("=",[A,I])),a.substitution,a)])}}}}},r=["append/2","append/3","member/2","permutation/2","maplist/2","maplist/3","maplist/4","maplist/5","maplist/6","maplist/7","maplist/8","include/3","exclude/3","foldl/4","sum_list/2","max_list/2","min_list/2","prod_list/2","last/2","prefix/2","nth0/3","nth1/3","nth0/4","nth1/4","length/2","replicate/3","select/3","sort/2","msort/2","keysort/2","take/3","drop/3","reverse/2","list_to_set/2"];typeof rH<"u"?rH.exports=function(o){e=o,new e.type.Module("lists",t(),r)}:new e.type.Module("lists",t(),r)})(vgt)});var tme=_(Gr=>{"use strict";var Zd=process.platform==="win32",nH="aes-256-cbc",Dgt="sha256",qde="The current environment doesn't support interactive reading from TTY.",Gn=Ie("fs"),Hde=process.binding("tty_wrap").TTY,sH=Ie("child_process"),l0=Ie("path"),oH={prompt:"> ",hideEchoBack:!1,mask:"*",limit:[],limitMessage:"Input another, please.$<( [)limit(])>",defaultInput:"",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:"utf8",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},Vf="none",$c,Cw,jde=!1,a0,gQ,iH,Sgt=0,AH="",Xd=[],dQ,Gde=!1,aH=!1,C2=!1;function Yde(e){function t(r){return r.replace(/[^\w\u0080-\uFFFF]/g,function(o){return"#"+o.charCodeAt(0)+";"})}return gQ.concat(function(r){var o=[];return Object.keys(r).forEach(function(a){r[a]==="boolean"?e[a]&&o.push("--"+a):r[a]==="string"&&e[a]&&o.push("--"+a,t(e[a]))}),o}({display:"string",displayOnly:"boolean",keyIn:"boolean",hideEchoBack:"boolean",mask:"string",limit:"string",caseSensitive:"boolean"}))}function Pgt(e,t){function r(U){var V,ee="",le;for(iH=iH||Ie("os").tmpdir();;){V=l0.join(iH,U+ee);try{le=Gn.openSync(V,"wx")}catch(fe){if(fe.code==="EEXIST"){ee++;continue}else throw fe}Gn.closeSync(le);break}return V}var o,a,n,u={},A,p,h=r("readline-sync.stdout"),w=r("readline-sync.stderr"),I=r("readline-sync.exit"),v=r("readline-sync.done"),b=Ie("crypto"),E,R,N;E=b.createHash(Dgt),E.update(""+process.pid+Sgt+++Math.random()),N=E.digest("hex"),R=b.createDecipher(nH,N),o=Yde(e),Zd?(a=process.env.ComSpec||"cmd.exe",process.env.Q='"',n=["/V:ON","/S","/C","(%Q%"+a+"%Q% /V:ON /S /C %Q%%Q%"+a0+"%Q%"+o.map(function(U){return" %Q%"+U+"%Q%"}).join("")+" & (echo !ERRORLEVEL!)>%Q%"+I+"%Q%%Q%) 2>%Q%"+w+"%Q% |%Q%"+process.execPath+"%Q% %Q%"+__dirname+"\\encrypt.js%Q% %Q%"+nH+"%Q% %Q%"+N+"%Q% >%Q%"+h+"%Q% & (echo 1)>%Q%"+v+"%Q%"]):(a="/bin/sh",n=["-c",'("'+a0+'"'+o.map(function(U){return" '"+U.replace(/'/g,"'\\''")+"'"}).join("")+'; echo $?>"'+I+'") 2>"'+w+'" |"'+process.execPath+'" "'+__dirname+'/encrypt.js" "'+nH+'" "'+N+'" >"'+h+'"; echo 1 >"'+v+'"']),C2&&C2("_execFileSync",o);try{sH.spawn(a,n,t)}catch(U){u.error=new Error(U.message),u.error.method="_execFileSync - spawn",u.error.program=a,u.error.args=n}for(;Gn.readFileSync(v,{encoding:e.encoding}).trim()!=="1";);return(A=Gn.readFileSync(I,{encoding:e.encoding}).trim())==="0"?u.input=R.update(Gn.readFileSync(h,{encoding:"binary"}),"hex",e.encoding)+R.final(e.encoding):(p=Gn.readFileSync(w,{encoding:e.encoding}).trim(),u.error=new Error(qde+(p?`
251`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Gn.unlinkSync(h),Gn.unlinkSync(w),Gn.unlinkSync(I),Gn.unlinkSync(v),u}function xgt(e){var t,r={},o,a={env:process.env,encoding:e.encoding};if(a0||(Zd?process.env.PSModulePath?(a0="powershell.exe",gQ=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(a0="cscript.exe",gQ=["//nologo",__dirname+"\\read.cs.js"]):(a0="/bin/sh",gQ=[__dirname+"/read.sh"])),Zd&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),sH.execFileSync){t=Yde(e),C2&&C2("execFileSync",t);try{r.input=sH.execFileSync(a0,t,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(qde+(o?`
252`+o:"")),r.error.method="execFileSync",r.error.program=a0,r.error.args=t,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=Pgt(e,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),e.display=""),r}function lH(e){var t="",r=e.display,o=!e.display&&e.keyIn&&e.hideEchoBack&&!e.mask;function a(){var n=xgt(e);if(n.error)throw n.error;return n.input}return aH&&aH(e),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Vf=="string")if(Vf=null,Zd){if(A=function(h){var w=h.replace(/^\D+/,"").split("."),I=0;return(w[0]=+w[0])&&(I+=w[0]*1e4),(w[1]=+w[1])&&(I+=w[1]*100),(w[2]=+w[2])&&(I+=w[2]),I}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Vf=process.stdin.fd,Cw=process.stdin._handle;else try{Vf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),Cw=new Hde(Vf,!0)}catch{}if(process.stdout.isTTY)$c=process.stdout.fd;else{try{$c=Gn.openSync("\\\\.\\CON","w")}catch{}if(typeof $c!="number")try{$c=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Vf=Gn.openSync("/dev/tty","r"),Cw=process.stdin._handle}catch{}}else try{Vf=Gn.openSync("/dev/tty","r"),Cw=new Hde(Vf,!1)}catch{}if(process.stdout.isTTY)$c=process.stdout.fd;else try{$c=Gn.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!e.hideEchoBack&&!e.keyIn,p,h,w,I,v;dQ="";function b(E){return E===jde?!0:Cw.setRawMode(E)!==0?!1:(jde=E,!0)}if(Gde||!Cw||typeof $c!="number"&&(e.display||!A)){t=a();return}if(e.display&&(Gn.writeSync($c,e.display),e.display=""),!e.displayOnly){if(!b(!A)){t=a();return}for(h=e.keyIn?1:e.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),e.keyIn&&e.limit&&(u=new RegExp("[^"+e.limit+"]","g"+(e.caseSensitive?"":"i")));;){w=0;try{w=Gn.readSync(Vf,p,0,h)}catch(E){if(E.code!=="EOF"){b(!1),t+=a();return}}if(w>0?(I=p.toString(e.encoding,0,w),dQ+=I):(I=`
253`,dQ+=String.fromCharCode(0)),I&&typeof(v=(I.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(I=v,n=!0),I&&(I=I.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),I&&u&&(I=I.replace(u,"")),I&&(A||(e.hideEchoBack?e.mask&&Gn.writeSync($c,new Array(I.length+1).join(e.mask)):Gn.writeSync($c,I)),t+=I),!e.keyIn&&n||e.keyIn&&t.length>=h)break}!A&&!o&&Gn.writeSync($c,`
254`),b(!1)}}(),e.print&&!o&&e.print(r+(e.displayOnly?"":(e.hideEchoBack?new Array(t.length+1).join(e.mask):t)+`
255`),e.encoding),e.displayOnly?"":AH=e.keepWhitespace||e.keyIn?t:t.trim()}function bgt(e,t){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!t||t(a))&&r.push(a))}return o(e),r}function fH(e){return e.replace(/[\x00-\x7f]/g,function(t){return"\\x"+("00"+t.charCodeAt().toString(16)).substr(-2)})}function Ns(){var e=Array.prototype.slice.call(arguments),t,r;return e.length&&typeof e[0]=="boolean"&&(r=e.shift(),r&&(t=Object.keys(oH),e.unshift(oH))),e.reduce(function(o,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(t=Object.keys(a)),t.forEach(function(n){var u;if(!!a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=bgt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function cH(e,t,r){return t.some(function(o){var a=typeof o;return a==="string"?r?e===o:e.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(e)===o:a==="function"?o(e):o instanceof RegExp?o.test(e):!1})}function pH(e,t){var r=l0.normalize(Zd?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return e=l0.normalize(e),t?e.replace(/^~(?=\/|\\|$)/,r):e.replace(new RegExp("^"+fH(r)+"(?=\\/|\\\\|$)",Zd?"i":""),"~")}function Iw(e,t){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,w,I){var v;return A||typeof(v=t(w))!="string"?p:v?(h||"")+v+(I||""):""}return e.replace(o,n).replace(a,n)}function Wde(e,t,r){var o,a=[],n=-1,u=0,A="",p;function h(w,I){return I.length>3?(w.push(I[0]+"..."+I[I.length-1]),p=!0):I.length&&(w=w.concat(I)),w}return o=e.reduce(function(w,I){return w.concat((I+"").split(""))},[]).reduce(function(w,I){var v,b;return t||(I=I.toLowerCase()),v=/^\d$/.test(I)?1:/^[A-Z]$/.test(I)?2:/^[a-z]$/.test(I)?3:0,r&&v===0?A+=I:(b=I.charCodeAt(0),v&&v===n&&b===u+1?a.push(I):(w=h(w,a),a=[I],n=v),u=b),w},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Kde(e,t){return e.join(e.length>2?", ":t?" / ":"/")}function Jde(e,t){var r,o,a={},n;if(t.phContent&&(r=t.phContent(e,t)),typeof r!="string")switch(e){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=t.hasOwnProperty(e)?typeof t[e]=="boolean"?t[e]?"on":"off":t[e]+"":"";break;case"limit":case"trueValue":case"falseValue":o=t[t.hasOwnProperty(e+"Src")?e+"Src":e],t.keyIn?(a=Wde(o,t.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Kde(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=t[t.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||e!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=AH;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),e==="CWD"?r=l0.basename(r):e==="cwdHome"&&(r=pH(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+e.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(e.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Xd[Xd.length-n]||"")}return r}function Vde(e){var t=/^(.)-(.)$/.exec(e),r="",o,a,n,u;if(!t)return null;for(o=t[1].charCodeAt(0),a=t[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode(n);return r}function uH(e){var t=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,o="",a=[],n;for(e=e.trim();r=t.exec(e);)n=r[3]||r[4]||"",r[1]&&(a.push(o),o=""),o+=n;return o&&a.push(o),a}function zde(e,t){return t.trueValue.length&&cH(e,t.trueValue,t.caseSensitive)?!0:t.falseValue.length&&cH(e,t.falseValue,t.caseSensitive)?!1:e}function Xde(e){var t,r,o,a,n,u,A;function p(w){return Jde(w,e)}function h(w){e.display+=(/[^\r\n]$/.test(e.display)?`
256`:"")+w}for(e.limitSrc=e.limit,e.displaySrc=e.display,e.limit="",e.display=Iw(e.display+"",p);;){if(t=lH(e),r=!1,o="",e.defaultInput&&!t&&(t=e.defaultInput),e.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(t))?(n=Xd[0]||"",a[1]?r=!0:t=n,h(n+`
257`),r||(e.displayOnly=!0,lH(e),e.displayOnly=!1)):t&&t!==Xd[Xd.length-1]&&(Xd=[t])),!r&&e.cd&&t)switch(u=uH(t),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(pH(u[1],!0))}catch(w){h(w+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&e.preCheck&&(A=e.preCheck(t,e),t=A.res,A.forceNext&&(r=!0)),!r){if(!e.limitSrc.length||cH(t,e.limitSrc,e.caseSensitive))break;e.limitMessage&&(o=Iw(e.limitMessage,p))}h((o?o+`
258`:"")+Iw(e.displaySrc+"",p))}return zde(t,e)}Gr._DBG_set_useExt=function(e){Gde=e};Gr._DBG_set_checkOptions=function(e){aH=e};Gr._DBG_set_checkMethod=function(e){C2=e};Gr._DBG_clearHistory=function(){AH="",Xd=[]};Gr.setDefaultOptions=function(e){return oH=Ns(!0,e),Ns(!0)};Gr.question=function(e,t){return Xde(Ns(Ns(!0,t),{display:e}))};Gr.prompt=function(e){var t=Ns(!0,e);return t.display=t.prompt,Xde(t)};Gr.keyIn=function(e,t){var r=Ns(Ns(!0,t),{display:e,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return Iw(o+"",Vde)}),r.limit=fH(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=Iw(r.display+"",function(o){return Jde(o,r)}),zde(lH(r),r)};Gr.questionEMail=function(e,t){return e==null&&(e="Input e-mail address: "),Gr.question(e,Ns({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},t,{keepWhitespace:!1,cd:!1}))};Gr.questionNewPassword=function(e,t){var r,o,a,n=Ns({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
259And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},t,{history:!1,cd:!1,phContent:function(b){return b==="charlist"?r.text:b==="length"?o+"..."+a:null}}),u,A,p,h,w,I,v;for(t=t||{},u=Iw(t.charlist?t.charlist+"":"$<!-~>",Vde),(isNaN(o=parseInt(t.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(t.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+fH(u)+"]{"+o+","+a+"}$"),r=Wde([u],n.caseSensitive,!0),r.text=Kde(r.values,r.suppressed),A=t.confirmMessage!=null?t.confirmMessage:"Reinput a same one to confirm it: ",p=t.unmatchMessage!=null?t.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",e==null&&(e="Input new password: "),w=n.limitMessage;!v;)n.limit=h,n.limitMessage=w,I=Gr.question(e,n),n.limit=[I,""],n.limitMessage=p,v=Gr.question(A,n);return I};function Zde(e,t,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return Gr.question(e,Ns({limitMessage:"Input valid number, please."},t,{limit:a,cd:!1})),o}Gr.questionInt=function(e,t){return Zde(e,t,function(r){return parseInt(r,10)})};Gr.questionFloat=function(e,t){return Zde(e,t,parseFloat)};Gr.questionPath=function(e,t){var r,o="",a=Ns({hideEchoBack:!1,limitMessage:`$<error(
260)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},t,{keepWhitespace:!1,limit:function(n){var u,A,p;n=pH(n,!0),o="";function h(w){w.split(/\/|\\/).reduce(function(I,v){var b=l0.resolve(I+=v+l0.sep);if(!Gn.existsSync(b))Gn.mkdirSync(b);else if(!Gn.statSync(b).isDirectory())throw new Error("Non directory already exists: "+b);return I},"")}try{if(u=Gn.existsSync(n),r=u?Gn.realpathSync(n):l0.resolve(n),!t.hasOwnProperty("exists")&&!u||typeof t.exists=="boolean"&&t.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&t.create&&(t.isDirectory?h(r):(h(l0.dirname(r)),Gn.closeSync(Gn.openSync(r,"w"))),r=Gn.realpathSync(r)),u&&(t.min||t.max||t.isFile||t.isDirectory)){if(A=Gn.statSync(r),t.isFile&&!A.isFile())return o="Not file: "+r,!1;if(t.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(t.min&&A.size<+t.min||t.max&&A.size>+t.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof t.validate=="function"&&(p=t.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(w){return o=w+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:t.hasOwnProperty(n)?t[n]+"":""}});return t=t||{},e==null&&(e='Input path (you can "cd" and "pwd"): '),Gr.question(e,a),r};function $de(e,t){var r={},o={};return typeof e=="object"?(Object.keys(e).forEach(function(a){typeof e[a]=="function"&&(o[t.caseSensitive?a:a.toLowerCase()]=e[a])}),r.preCheck=function(a){var n;return r.args=uH(a),n=r.args[0]||"",t.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return t.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=uH(a),r.hRes=typeof e=="function"?e.apply(a,r.args):!0,{res:a,forceNext:!1}},r}Gr.promptCL=function(e,t){var r=Ns({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),o=$de(e,r);return r.limit=o.limit,r.preCheck=o.preCheck,Gr.prompt(r),o.args};Gr.promptLoop=function(e,t){for(var r=Ns({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},t);!e(Gr.prompt(r)););};Gr.promptCLLoop=function(e,t){var r=Ns({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),o=$de(e,r);for(r.limit=o.limit,r.preCheck=o.preCheck;Gr.prompt(r),!o.hRes;);};Gr.promptSimShell=function(e){return Gr.prompt(Ns({hideEchoBack:!1,history:!0},e,{prompt:function(){return Zd?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function eme(e,t,r){var o;return e==null&&(e="Are you sure? "),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=Gr.keyIn(e,Ns(t,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}Gr.keyInYN=function(e,t){return eme(e,t)};Gr.keyInYNStrict=function(e,t){return eme(e,t,"yn")};Gr.keyInPause=function(e,t){e==null&&(e="Continue..."),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s+$/,"")+" (Hit any key)"),Gr.keyIn(e,Ns({limit:null},t,{hideEchoBack:!0,mask:""}))};Gr.keyInSelect=function(e,t,r){var o=Ns({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?e.length+"":p==="firstItem"?(e[0]+"").trim():p==="lastItem"?(e[e.length-1]+"").trim():null}}),a="",n={},u=49,A=`
261`;if(!Array.isArray(e)||!e.length||e.length>35)throw"`items` must be Array (max length: 35).";return e.forEach(function(p,h){var w=String.fromCharCode(u);a+=w,n[w]=h,A+="["+w+"] "+(p+"").trim()+`
262`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
263`),o.limit=a,A+=`
264`,t==null&&(t="Choose one from list: "),(t+="")&&((!r||r.guide!==!1)&&(t=t.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=t),n[Gr.keyIn(A,o).toLowerCase()]};Gr.getRawInput=function(){return dQ};function I2(e,t){var r;return t.length&&(r={},r[e]=t[0]),Gr.setDefaultOptions(r)[e]}Gr.setPrint=function(){return I2("print",arguments)};Gr.setPrompt=function(){return I2("prompt",arguments)};Gr.setEncoding=function(){return I2("encoding",arguments)};Gr.setMask=function(){return I2("mask",arguments)};Gr.setBufferSize=function(){return I2("bufferSize",arguments)}});var hH=_((k5t,pl)=>{(function(){var e={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(C,P,y){var F=tau_file_system.files[C];if(!F){if(y==="read")return null;F={path:C,text:"",type:P,get:function(z,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+z)},put:function(z,X){return X==="end_of_file"?(this.text+=z,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var Z=n(this.text[Math.floor(z/2)],0);return z%2===0?Z&255:Z/256>>>0},put_byte:function(z,X){var Z=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<Z)return null;var ie=this.text.length===Z?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(ie=ie/256>>>0,ie=(ie&255)<<8|z&255):(ie=ie&255,ie=(z&255)<<8|ie&255),this.text.length===Z?this.text+=u(ie):this.text=this.text.substring(0,Z)+u(ie)+this.text.substring(Z+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[C]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(C,P){for(var y;tau_user_input.buffer.length<C;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,C),tau_user_input.buffer=tau_user_input.buffer.substr(C),y}},tau_user_output={put:function(C,P){return console.log(C),!0},flush:function(){return!0}},nodejs_file_system={open:function(C,P,y){var F=Ie("fs"),z=F.openSync(C,y[0]);return y==="read"&&!F.existsSync(C)?null:{get:function(X,Z){var ie=new Buffer(X);return F.readSync(z,ie,0,X,Z),ie.toString()},put:function(X,Z){var ie=Buffer.from(X);if(Z==="end_of_file")F.writeSync(z,ie);else{if(Z==="past_end_of_file")return null;F.writeSync(z,ie,0,ie.length,Z)}return!0},get_byte:function(X){return null},put_byte:function(X,Z){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:"",get:function(C,P){for(var y,F=tme();nodejs_user_input.buffer.length<C;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,C),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(C),y}},nodejs_user_output={put:function(C,P){return process.stdout.write(C),!0},flush:function(){return!0}};var t;Array.prototype.indexOf?t=function(C,P){return C.indexOf(P)}:t=function(C,P){for(var y=C.length,F=0;F<y;F++)if(P===C[F])return F;return-1};var r=function(C,P){if(C.length!==0){for(var y=C[0],F=C.length,z=1;z<F;z++)y=P(y,C[z]);return y}},o;Array.prototype.map?o=function(C,P){return C.map(P)}:o=function(C,P){for(var y=[],F=C.length,z=0;z<F;z++)y.push(P(C[z]));return y};var a;Array.prototype.filter?a=function(C,P){return C.filter(P)}:a=function(C,P){for(var y=[],F=C.length,z=0;z<F;z++)P(C[z])&&y.push(C[z]);return y};var n;String.prototype.codePointAt?n=function(C,P){return C.codePointAt(P)}:n=function(C,P){return C.charCodeAt(P)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,w={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function I(C){var P=[],y=!1;return C.replace(h,function(F,z,X,Z,ie,Pe,Le,ot,gt,jt,$t,xt,on,br,dr,Pr,Yr){switch(!0){case gt!==void 0:return P.push(parseInt(gt,16)),"";case jt!==void 0:return P.push(parseInt(jt,8)),"";case $t!==void 0:case xt!==void 0:case on!==void 0:case br!==void 0:case dr!==void 0:return P.push(n(F.substr(1),0)),"";case Yr!==void 0:return P.push(n(Yr,0)),"";case Pr!==void 0:y=!0;default:return P.push(w[F]),""}}),y?null:P}function v(C,P){var y="";if(C.length<2)return C;try{C=C.replace(/\\([0-7]+)\\/g,function(Z,ie){return u(parseInt(ie,8))}),C=C.replace(/\\x([0-9a-fA-F]+)\\/g,function(Z,ie){return u(parseInt(ie,16))})}catch{return null}for(var F=0;F<C.length;F++){var z=C.charAt(F),X=C.charAt(F+1);if(z===P&&X===P)F++,y+=P;else if(z==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
265`,"\r"," ","\v"].indexOf(X)!==-1)switch(F+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
266`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=z}return y}function b(C){for(var P="",y=0;y<C.length;y++)switch(C.charAt(y)){case"'":P+="\\'";break;case"\\":P+="\\\\";break;case"\b":P+="\\b";break;case"\f":P+="\\f";break;case`
267`:P+="\\n";break;case"\r":P+="\\r";break;case" ":P+="\\t";break;case"\v":P+="\\v";break;default:P+=C.charAt(y);break}return P}function E(C){var P=C.substr(2);switch(C.substr(0,2).toLowerCase()){case"0x":return parseInt(P,16);case"0b":return parseInt(P,2);case"0o":return parseInt(P,8);case"0'":return I(P)[0];default:return parseFloat(C)}}var R={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function N(C,P){return C.get_flag("char_conversion").id==="on"?P.replace(/./g,function(y){return C.get_char_conversion(y)}):P}function U(C){this.thread=C,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(C){return this.tokens=C},U.prototype.new_text=function(C){this.text=C,this.tokens=[]},U.prototype.get_tokens=function(C){var P,y=0,F=0,z=0,X=[],Z=!1;if(C){var ie=this.tokens[C-1];y=ie.len,P=N(this.thread,this.text.substr(ie.len)),F=ie.line,z=ie.start}else P=this.text;if(/^\s*$/.test(P))return null;for(;P!=="";){var Pe=[],Le=!1;if(/^\n/.exec(P)!==null){F++,z=0,y++,P=P.replace(/\n/,""),Z=!0;continue}for(var ot in R)if(R.hasOwnProperty(ot)){var gt=R[ot].exec(P);gt&&Pe.push({value:gt[0],name:ot,matches:gt})}if(!Pe.length)return this.set_last_tokens([{value:P,matches:[],name:"lexical",line:F,start:z}]);var ie=r(Pe,function(br,dr){return br.value.length>=dr.value.length?br:dr});switch(ie.start=z,ie.line=F,P=P.replace(ie.value,""),z+=ie.value.length,y+=ie.value.length,ie.name){case"atom":ie.raw=ie.value,ie.value.charAt(0)==="'"&&(ie.value=v(ie.value.substr(1,ie.value.length-2),"'"),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence"));break;case"number":ie.float=ie.value.substring(0,2)!=="0x"&&ie.value.match(/[.eE]/)!==null&&ie.value!=="0'.",ie.value=E(ie.value),ie.blank=Le;break;case"string":var jt=ie.value.charAt(0);ie.value=v(ie.value.substr(1,ie.value.length-2),jt),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence");break;case"whitespace":var $t=X[X.length-1];$t&&($t.space=!0),Le=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(ie=X.pop(),ie.name="atom",ie.value="{}",ie.raw="{}",ie.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(ie=X.pop(),ie.name="atom",ie.value="[]",ie.raw="[]",ie.space=!1);break}ie.len=y,X.push(ie),Le=!1}var xt=this.set_last_tokens(X);return xt.length===0?null:xt};function V(C,P,y,F,z){if(!P[y])return{type:A,value:x.error.syntax(P[y-1],"expression expected",!0)};var X;if(F==="0"){var Z=P[y];switch(Z.name){case"number":return{type:p,len:y+1,value:new x.type.Num(Z.value,Z.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var(Z.value)};case"string":var ie;switch(C.get_flag("double_quotes").id){case"atom":ie=new H(Z.value,[]);break;case"codes":ie=new H("[]",[]);for(var Pe=Z.value.length-1;Pe>=0;Pe--)ie=new H(".",[new x.type.Num(n(Z.value,Pe),!1),ie]);break;case"chars":ie=new H("[]",[]);for(var Pe=Z.value.length-1;Pe>=0;Pe--)ie=new H(".",[new x.type.Term(Z.value.charAt(Pe),[]),ie]);break}return{type:p,len:y+1,value:ie};case"l_paren":var xt=V(C,P,y+1,C.__get_max_priority(),!0);return xt.type!==p?xt:P[xt.len]&&P[xt.len].name==="r_paren"?(xt.len++,xt):{type:A,derived:!0,value:x.error.syntax(P[xt.len]?P[xt.len]:P[xt.len-1],") or operator expected",!P[xt.len])};case"l_bracket":var xt=V(C,P,y+1,C.__get_max_priority(),!0);return xt.type!==p?xt:P[xt.len]&&P[xt.len].name==="r_bracket"?(xt.len++,xt.value=new H("{}",[xt.value]),xt):{type:A,derived:!0,value:x.error.syntax(P[xt.len]?P[xt.len]:P[xt.len-1],"} or operator expected",!P[xt.len])}}var Le=ee(C,P,y,z);return Le.type===p||Le.derived||(Le=le(C,P,y),Le.type===p||Le.derived)?Le:{type:A,derived:!1,value:x.error.syntax(P[y],"unexpected token")}}var ot=C.__get_max_priority(),gt=C.__get_next_priority(F),jt=y;if(P[y].name==="atom"&&P[y+1]&&(P[y].space||P[y+1].name!=="l_paren")){var Z=P[y++],$t=C.__lookup_operator_classes(F,Z.value);if($t&&$t.indexOf("fy")>-1){var xt=V(C,P,y,F,z);if(xt.type!==A)return Z.value==="-"&&!Z.space&&x.type.is_number(xt.value)?{value:new x.type.Num(-xt.value.value,xt.value.is_float),len:xt.len,type:p}:{value:new x.type.Term(Z.value,[xt.value]),len:xt.len,type:p};X=xt}else if($t&&$t.indexOf("fx")>-1){var xt=V(C,P,y,gt,z);if(xt.type!==A)return{value:new x.type.Term(Z.value,[xt.value]),len:xt.len,type:p};X=xt}}y=jt;var xt=V(C,P,y,gt,z);if(xt.type===p){y=xt.len;var Z=P[y];if(P[y]&&(P[y].name==="atom"&&C.__lookup_operator_classes(F,Z.value)||P[y].name==="bar"&&C.__lookup_operator_classes(F,"|"))){var on=gt,br=F,$t=C.__lookup_operator_classes(F,Z.value);if($t.indexOf("xf")>-1)return{value:new x.type.Term(Z.value,[xt.value]),len:++xt.len,type:p};if($t.indexOf("xfx")>-1){var dr=V(C,P,y+1,on,z);return dr.type===p?{value:new x.type.Term(Z.value,[xt.value,dr.value]),len:dr.len,type:p}:(dr.derived=!0,dr)}else if($t.indexOf("xfy")>-1){var dr=V(C,P,y+1,br,z);return dr.type===p?{value:new x.type.Term(Z.value,[xt.value,dr.value]),len:dr.len,type:p}:(dr.derived=!0,dr)}else if(xt.type!==A)for(;;){y=xt.len;var Z=P[y];if(Z&&Z.name==="atom"&&C.__lookup_operator_classes(F,Z.value)){var $t=C.__lookup_operator_classes(F,Z.value);if($t.indexOf("yf")>-1)xt={value:new x.type.Term(Z.value,[xt.value]),len:++y,type:p};else if($t.indexOf("yfx")>-1){var dr=V(C,P,++y,on,z);if(dr.type===A)return dr.derived=!0,dr;y=dr.len,xt={value:new x.type.Term(Z.value,[xt.value,dr.value]),len:y,type:p}}else break}else break}}else X={type:A,value:x.error.syntax(P[xt.len-1],"operator expected")};return xt}return xt}function ee(C,P,y,F){if(!P[y]||P[y].name==="atom"&&P[y].raw==="."&&!F&&(P[y].space||!P[y+1]||P[y+1].name!=="l_paren"))return{type:A,derived:!1,value:x.error.syntax(P[y-1],"unfounded token")};var z=P[y],X=[];if(P[y].name==="atom"&&P[y].raw!==","){if(y++,P[y-1].space)return{type:p,len:y,value:new x.type.Term(z.value,X)};if(P[y]&&P[y].name==="l_paren"){if(P[y+1]&&P[y+1].name==="r_paren")return{type:A,derived:!0,value:x.error.syntax(P[y+1],"argument expected")};var Z=V(C,P,++y,"999",!0);if(Z.type===A)return Z.derived?Z:{type:A,derived:!0,value:x.error.syntax(P[y]?P[y]:P[y-1],"argument expected",!P[y])};for(X.push(Z.value),y=Z.len;P[y]&&P[y].name==="atom"&&P[y].value===",";){if(Z=V(C,P,y+1,"999",!0),Z.type===A)return Z.derived?Z:{type:A,derived:!0,value:x.error.syntax(P[y+1]?P[y+1]:P[y],"argument expected",!P[y+1])};X.push(Z.value),y=Z.len}if(P[y]&&P[y].name==="r_paren")y++;else return{type:A,derived:!0,value:x.error.syntax(P[y]?P[y]:P[y-1],", or ) expected",!P[y])}}return{type:p,len:y,value:new x.type.Term(z.value,X)}}return{type:A,derived:!1,value:x.error.syntax(P[y],"term expected")}}function le(C,P,y){if(!P[y])return{type:A,derived:!1,value:x.error.syntax(P[y-1],"[ expected")};if(P[y]&&P[y].name==="l_brace"){var F=V(C,P,++y,"999",!0),z=[F.value],X=void 0;if(F.type===A)return P[y]&&P[y].name==="r_brace"?{type:p,len:y+1,value:new x.type.Term("[]",[])}:{type:A,derived:!0,value:x.error.syntax(P[y],"] expected")};for(y=F.len;P[y]&&P[y].name==="atom"&&P[y].value===",";){if(F=V(C,P,y+1,"999",!0),F.type===A)return F.derived?F:{type:A,derived:!0,value:x.error.syntax(P[y+1]?P[y+1]:P[y],"argument expected",!P[y+1])};z.push(F.value),y=F.len}var Z=!1;if(P[y]&&P[y].name==="bar"){if(Z=!0,F=V(C,P,y+1,"999",!0),F.type===A)return F.derived?F:{type:A,derived:!0,value:x.error.syntax(P[y+1]?P[y+1]:P[y],"argument expected",!P[y+1])};X=F.value,y=F.len}return P[y]&&P[y].name==="r_brace"?{type:p,len:y+1,value:g(z,X)}:{type:A,derived:!0,value:x.error.syntax(P[y]?P[y]:P[y-1],Z?"] expected":", or | or ] expected",!P[y])}}return{type:A,derived:!1,value:x.error.syntax(P[y],"list expected")}}function fe(C,P,y){var F=P[y].line,z=V(C,P,y,C.__get_max_priority(),!1),X=null,Z;if(z.type!==A)if(y=z.len,P[y]&&P[y].name==="atom"&&P[y].raw===".")if(y++,x.type.is_term(z.value)){if(z.value.indicator===":-/2"?(X=new x.type.Rule(z.value.args[0],be(z.value.args[1])),Z={value:X,len:y,type:p}):z.value.indicator==="-->/2"?(X=oe(new x.type.Rule(z.value.args[0],z.value.args[1]),C),X.body=be(X.body),Z={value:X,len:y,type:x.type.is_rule(X)?p:A}):(X=new x.type.Rule(z.value,null),Z={value:X,len:y,type:p}),X){var ie=X.singleton_variables();ie.length>0&&C.throw_warning(x.warning.singleton(ie,X.head.indicator,F))}return Z}else return{type:A,value:x.error.syntax(P[y],"callable expected")};else return{type:A,value:x.error.syntax(P[y]?P[y]:P[y-1],". or operator expected")};return z}function de(C,P,y){y=y||{},y.from=y.from?y.from:"$tau-js",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new U(C),z={},X;F.new_text(P);var Z=0,ie=F.get_tokens(Z);do{if(ie===null||!ie[Z])break;var Pe=fe(C,ie,Z);if(Pe.type===A)return new H("throw",[Pe.value]);if(Pe.value.body===null&&Pe.value.head.indicator==="?-/1"){var Le=new Ve(C.session);Le.add_goal(Pe.value.head.args[0]),Le.answer(function(gt){x.type.is_error(gt)?C.throw_warning(gt.args[0]):(gt===!1||gt===null)&&C.throw_warning(x.warning.failed_goal(Pe.value.head.args[0],Pe.len))}),Z=Pe.len;var ot=!0}else if(Pe.value.body===null&&Pe.value.head.indicator===":-/1"){var ot=C.run_directive(Pe.value.head.args[0]);Z=Pe.len,Pe.value.head.args[0].indicator==="char_conversion/2"&&(ie=F.get_tokens(Z),Z=0)}else{X=Pe.value.head.indicator,y.reconsult!==!1&&z[X]!==!0&&!C.is_multifile_predicate(X)&&(C.session.rules[X]=a(C.session.rules[X]||[],function(jt){return jt.dynamic}),z[X]=!0);var ot=C.add_rule(Pe.value,y);Z=Pe.len}if(!ot)return ot}while(!0);return!0}function ge(C,P){var y=new U(C);y.new_text(P);var F=0;do{var z=y.get_tokens(F);if(z===null)break;var X=V(C,z,0,C.__get_max_priority(),!1);if(X.type!==A){var Z=X.len,ie=Z;if(z[Z]&&z[Z].name==="atom"&&z[Z].raw===".")C.add_goal(be(X.value));else{var Pe=z[Z];return new H("throw",[x.error.syntax(Pe||z[Z-1],". or operator expected",!Pe)])}F=X.len+1}else return new H("throw",[X.value])}while(!0);return!0}function oe(C,P){C=C.rename(P);var y=P.next_free_variable(),F=Be(C.body,y,P);return F.error?F.value:(C.body=F.value,C.head.args=C.head.args.concat([y,F.variable]),C.head=new H(C.head.id,C.head.args),C)}function Be(C,P,y){var F;if(x.type.is_term(C)&&C.indicator==="!/0")return{value:C,variable:P,error:!1};if(x.type.is_term(C)&&C.indicator===",/2"){var z=Be(C.args[0],P,y);if(z.error)return z;var X=Be(C.args[1],z.variable,y);return X.error?X:{value:new H(",",[z.value,X.value]),variable:X.variable,error:!1}}else{if(x.type.is_term(C)&&C.indicator==="{}/1")return{value:C.args[0],variable:P,error:!1};if(x.type.is_empty_list(C))return{value:new H("true",[]),variable:P,error:!1};if(x.type.is_list(C)){F=y.next_free_variable();for(var Z=C,ie;Z.indicator==="./2";)ie=Z,Z=Z.args[1];return x.type.is_variable(Z)?{value:x.error.instantiation("DCG"),variable:P,error:!0}:x.type.is_empty_list(Z)?(ie.args[1]=F,{value:new H("=",[P,C]),variable:F,error:!1}):{value:x.error.type("list",C,"DCG"),variable:P,error:!0}}else return x.type.is_callable(C)?(F=y.next_free_variable(),C.args=C.args.concat([P,F]),C=new H(C.id,C.args),{value:C,variable:F,error:!1}):{value:x.error.type("callable",C,"DCG"),variable:P,error:!0}}}function be(C){return x.type.is_variable(C)?new H("call",[C]):x.type.is_term(C)&&[",/2",";/2","->/2"].indexOf(C.indicator)!==-1?new H(C.id,[be(C.args[0]),be(C.args[1])]):C}function g(C,P){for(var y=P||new x.type.Term("[]",[]),F=C.length-1;F>=0;F--)y=new x.type.Term(".",[C[F],y]);return y}function we(C,P){for(var y=C.length-1;y>=0;y--)C[y]===P&&C.splice(y,1)}function Se(C){for(var P={},y=[],F=0;F<C.length;F++)C[F]in P||(y.push(C[F]),P[C[F]]=!0);return y}function ce(C,P,y,F){if(C.session.rules[y]!==null){for(var z=0;z<C.session.rules[y].length;z++)if(C.session.rules[y][z]===F){C.session.rules[y].splice(z,1),C.success(P);break}}}function ne(C){return function(P,y,F){var z=F.args[0],X=F.args.slice(1,C);if(x.type.is_variable(z))P.throw_error(x.error.instantiation(P.level));else if(!x.type.is_callable(z))P.throw_error(x.error.type("callable",z,P.level));else{var Z=new H(z.id,z.args.concat(X));P.prepend([new ke(y.goal.replace(Z),y.substitution,y)])}}}function te(C){for(var P=C.length-1;P>=0;P--)if(C.charAt(P)==="/")return new H("/",[new H(C.substring(0,P)),new Re(parseInt(C.substring(P+1)),!1)])}function Ee(C){this.id=C}function Re(C,P){this.is_float=P!==void 0?P:parseInt(C)!==C,this.value=this.is_float?C:parseInt(C)}var dt=0;function H(C,P,y){this.ref=y||++dt,this.id=C,this.args=P||[],this.indicator=C+"/"+this.args.length}var at=0;function Te(C,P,y,F,z,X){this.id=at++,this.stream=C,this.mode=P,this.alias=y,this.type=F!==void 0?F:"text",this.reposition=z!==void 0?z:!0,this.eof_action=X!==void 0?X:"eof_code",this.position=this.mode==="append"?"end_of_stream":0,this.output=this.mode==="write"||this.mode==="append",this.input=this.mode==="read"}function Qe(C){C=C||{},this.links=C}function ke(C,P,y){P=P||new Qe,y=y||null,this.goal=C,this.substitution=P,this.parent=y}function He(C,P,y){this.head=C,this.body=P,this.dynamic=y||!1}function Ne(C){C=C===void 0||C<=0?1e3:C,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new Ve(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=C,this.streams={user_input:new Te(typeof pl<"u"&&pl.exports?nodejs_user_input:tau_user_input,"read","user_input","text",!1,"reset"),user_output:new Te(typeof pl<"u"&&pl.exports?nodejs_user_output:tau_user_output,"write","user_output","text",!1,"eof_code")},this.file_system=typeof pl<"u"&&pl.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(P){return P.substitution},this.format_error=function(P){return P.goal},this.flag={bounded:x.flag.bounded.value,max_integer:x.flag.max_integer.value,min_integer:x.flag.min_integer.value,integer_rounding_function:x.flag.integer_rounding_function.value,char_conversion:x.flag.char_conversion.value,debug:x.flag.debug.value,max_arity:x.flag.max_arity.value,unknown:x.flag.unknown.value,double_quotes:x.flag.double_quotes.value,occurs_check:x.flag.occurs_check.value,dialect:x.flag.dialect.value,version_data:x.flag.version_data.value,nodejs:x.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{":-":["fx","xfx"],"-->":["xfx"],"?-":["fx"]},1100:{";":["xfy"]},1050:{"->":["xfy"]},1e3:{",":["xfy"]},900:{"\\+":["fy"]},700:{"=":["xfx"],"\\=":["xfx"],"==":["xfx"],"\\==":["xfx"],"@<":["xfx"],"@=<":["xfx"],"@>":["xfx"],"@>=":["xfx"],"=..":["xfx"],is:["xfx"],"=:=":["xfx"],"=\\=":["xfx"],"<":["xfx"],"=<":["xfx"],">":["xfx"],">=":["xfx"]},600:{":":["xfy"]},500:{"+":["yfx"],"-":["yfx"],"/\\":["yfx"],"\\/":["yfx"]},400:{"*":["yfx"],"/":["yfx"],"//":["yfx"],rem:["yfx"],mod:["yfx"],"<<":["yfx"],">>":["yfx"]},200:{"**":["xfx"],"^":["xfy"],"-":["fy"],"+":["fy"],"\\":["fy"]}}}function Ve(C){this.epoch=Date.now(),this.session=C,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level="top_level/0",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function je(C,P,y){this.id=C,this.rules=P,this.exports=y,x.module[C]=this}je.prototype.exports_predicate=function(C){return this.exports.indexOf(C)!==-1},Ee.prototype.unify=function(C,P){if(P&&t(C.variables(),this.id)!==-1&&!x.type.is_variable(C))return null;var y={};return y[this.id]=C,new Qe(y)},Re.prototype.unify=function(C,P){return x.type.is_number(C)&&this.value===C.value&&this.is_float===C.is_float?new Qe:null},H.prototype.unify=function(C,P){if(x.type.is_term(C)&&this.indicator===C.indicator){for(var y=new Qe,F=0;F<this.args.length;F++){var z=x.unify(this.args[F].apply(y),C.args[F].apply(y),P);if(z===null)return null;for(var X in z.links)y.links[X]=z.links[X];y=y.apply(z)}return y}return null},Te.prototype.unify=function(C,P){return x.type.is_stream(C)&&this.id===C.id?new Qe:null},Ee.prototype.toString=function(C){return this.id},Re.prototype.toString=function(C){return this.is_float&&t(this.value.toString(),".")===-1?this.value+".0":this.value.toString()},H.prototype.toString=function(C,P,y){if(C=C||{},C.quoted=C.quoted===void 0?!0:C.quoted,C.ignore_ops=C.ignore_ops===void 0?!1:C.ignore_ops,C.numbervars=C.numbervars===void 0?!1:C.numbervars,P=P===void 0?1200:P,y=y===void 0?"":y,C.numbervars&&this.indicator==="$VAR/1"&&x.type.is_integer(this.args[0])&&this.args[0].value>=0){var F=this.args[0].value,z=Math.floor(F/26),X=F%26;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[X]+(z!==0?z:"")}switch(this.indicator){case"[]/0":case"{}/0":case"!/0":return this.id;case"{}/1":return"{"+this.args[0].toString(C)+"}";case"./2":for(var Z="["+this.args[0].toString(C),ie=this.args[1];ie.indicator==="./2";)Z+=", "+ie.args[0].toString(C),ie=ie.args[1];return ie.indicator!=="[]/0"&&(Z+="|"+ie.toString(C)),Z+="]",Z;case",/2":return"("+this.args[0].toString(C)+", "+this.args[1].toString(C)+")";default:var Pe=this.id,Le=C.session?C.session.lookup_operator(this.id,this.args.length):null;if(C.session===void 0||C.ignore_ops||Le===null)return C.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(Pe)&&Pe!=="{}"&&Pe!=="[]"&&(Pe="'"+b(Pe)+"'"),Pe+(this.args.length?"("+o(this.args,function($t){return $t.toString(C)}).join(", ")+")":"");var ot=Le.priority>P.priority||Le.priority===P.priority&&(Le.class==="xfy"&&this.indicator!==P.indicator||Le.class==="yfx"&&this.indicator!==P.indicator||this.indicator===P.indicator&&Le.class==="yfx"&&y==="right"||this.indicator===P.indicator&&Le.class==="xfy"&&y==="left");Le.indicator=this.indicator;var gt=ot?"(":"",jt=ot?")":"";return this.args.length===0?"("+this.id+")":["fy","fx"].indexOf(Le.class)!==-1?gt+Pe+" "+this.args[0].toString(C,Le)+jt:["yf","xf"].indexOf(Le.class)!==-1?gt+this.args[0].toString(C,Le)+" "+Pe+jt:gt+this.args[0].toString(C,Le,"left")+" "+this.id+" "+this.args[1].toString(C,Le,"right")+jt}},Te.prototype.toString=function(C){return"<stream>("+this.id+")"},Qe.prototype.toString=function(C){var P="{";for(var y in this.links)!this.links.hasOwnProperty(y)||(P!=="{"&&(P+=", "),P+=y+"/"+this.links[y].toString(C));return P+="}",P},ke.prototype.toString=function(C){return this.goal===null?"<"+this.substitution.toString(C)+">":"<"+this.goal.toString(C)+", "+this.substitution.toString(C)+">"},He.prototype.toString=function(C){return this.body?this.head.toString(C)+" :- "+this.body.toString(C)+".":this.head.toString(C)+"."},Ne.prototype.toString=function(C){for(var P="",y=0;y<this.modules.length;y++)P+=":- use_module(library("+this.modules[y]+`)).
268`;P+=`
269`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)P+=this.rules[key][y].toString(C),P+=`
270`;return P},Ee.prototype.clone=function(){return new Ee(this.id)},Re.prototype.clone=function(){return new Re(this.value,this.is_float)},H.prototype.clone=function(){return new H(this.id,o(this.args,function(C){return C.clone()}))},Te.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Qe.prototype.clone=function(){var C={};for(var P in this.links)!this.links.hasOwnProperty(P)||(C[P]=this.links[P].clone());return new Qe(C)},ke.prototype.clone=function(){return new ke(this.goal.clone(),this.substitution.clone(),this.parent)},He.prototype.clone=function(){return new He(this.head.clone(),this.body!==null?this.body.clone():null)},Ee.prototype.equals=function(C){return x.type.is_variable(C)&&this.id===C.id},Re.prototype.equals=function(C){return x.type.is_number(C)&&this.value===C.value&&this.is_float===C.is_float},H.prototype.equals=function(C){if(!x.type.is_term(C)||this.indicator!==C.indicator)return!1;for(var P=0;P<this.args.length;P++)if(!this.args[P].equals(C.args[P]))return!1;return!0},Te.prototype.equals=function(C){return x.type.is_stream(C)&&this.id===C.id},Qe.prototype.equals=function(C){var P;if(!x.type.is_substitution(C))return!1;for(P in this.links)if(!!this.links.hasOwnProperty(P)&&(!C.links[P]||!this.links[P].equals(C.links[P])))return!1;for(P in C.links)if(!!C.links.hasOwnProperty(P)&&!this.links[P])return!1;return!0},ke.prototype.equals=function(C){return x.type.is_state(C)&&this.goal.equals(C.goal)&&this.substitution.equals(C.substitution)&&this.parent===C.parent},He.prototype.equals=function(C){return x.type.is_rule(C)&&this.head.equals(C.head)&&(this.body===null&&C.body===null||this.body!==null&&this.body.equals(C.body))},Ee.prototype.rename=function(C){return C.get_free_variable(this)},Re.prototype.rename=function(C){return this},H.prototype.rename=function(C){return new H(this.id,o(this.args,function(P){return P.rename(C)}))},Te.prototype.rename=function(C){return this},He.prototype.rename=function(C){return new He(this.head.rename(C),this.body!==null?this.body.rename(C):null)},Ee.prototype.variables=function(){return[this.id]},Re.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(C){return C.variables()}))},Te.prototype.variables=function(){return[]},He.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},Ee.prototype.apply=function(C){return C.lookup(this.id)?C.lookup(this.id):this},Re.prototype.apply=function(C){return this},H.prototype.apply=function(C){if(this.indicator==="./2"){for(var P=[],y=this;y.indicator==="./2";)P.push(y.args[0].apply(C)),y=y.args[1];for(var F=y.apply(C),z=P.length-1;z>=0;z--)F=new H(".",[P[z],F]);return F}return new H(this.id,o(this.args,function(X){return X.apply(C)}),this.ref)},Te.prototype.apply=function(C){return this},He.prototype.apply=function(C){return new He(this.head.apply(C),this.body!==null?this.body.apply(C):null)},Qe.prototype.apply=function(C){var P,y={};for(P in this.links)!this.links.hasOwnProperty(P)||(y[P]=this.links[P].apply(C));return new Qe(y)},H.prototype.select=function(){for(var C=this;C.indicator===",/2";)C=C.args[0];return C},H.prototype.replace=function(C){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(C),this.args[1]]):C===null?this.args[1]:new H(",",[C,this.args[1]]):C},H.prototype.search=function(C){if(x.type.is_term(C)&&C.ref!==void 0&&this.ref===C.ref)return!0;for(var P=0;P<this.args.length;P++)if(x.type.is_term(this.args[P])&&this.args[P].search(C))return!0;return!1},Ne.prototype.get_current_input=function(){return this.current_input},Ve.prototype.get_current_input=function(){return this.session.get_current_input()},Ne.prototype.get_current_output=function(){return this.current_output},Ve.prototype.get_current_output=function(){return this.session.get_current_output()},Ne.prototype.set_current_input=function(C){this.current_input=C},Ve.prototype.set_current_input=function(C){return this.session.set_current_input(C)},Ne.prototype.set_current_output=function(C){this.current_input=C},Ve.prototype.set_current_output=function(C){return this.session.set_current_output(C)},Ne.prototype.get_stream_by_alias=function(C){return this.streams[C]},Ve.prototype.get_stream_by_alias=function(C){return this.session.get_stream_by_alias(C)},Ne.prototype.file_system_open=function(C,P,y){return this.file_system.open(C,P,y)},Ve.prototype.file_system_open=function(C,P,y){return this.session.file_system_open(C,P,y)},Ne.prototype.get_char_conversion=function(C){return this.__char_conversion[C]||C},Ve.prototype.get_char_conversion=function(C){return this.session.get_char_conversion(C)},Ne.prototype.parse=function(C){return this.thread.parse(C)},Ve.prototype.parse=function(C){var P=new U(this);P.new_text(C);var y=P.get_tokens();if(y===null)return!1;var F=V(this,y,0,this.__get_max_priority(),!1);return F.len!==y.length?!1:{value:F.value,expr:F,tokens:y}},Ne.prototype.get_flag=function(C){return this.flag[C]},Ve.prototype.get_flag=function(C){return this.session.get_flag(C)},Ne.prototype.add_rule=function(C,P){return P=P||{},P.from=P.from?P.from:"$tau-js",this.src_predicates[C.head.indicator]=P.from,this.rules[C.head.indicator]||(this.rules[C.head.indicator]=[]),this.rules[C.head.indicator].push(C),this.public_predicates.hasOwnProperty(C.head.indicator)||(this.public_predicates[C.head.indicator]=!1),!0},Ve.prototype.add_rule=function(C,P){return this.session.add_rule(C,P)},Ne.prototype.run_directive=function(C){this.thread.run_directive(C)},Ve.prototype.run_directive=function(C){return x.type.is_directive(C)?(x.directive[C.indicator](this,C),!0):!1},Ne.prototype.__get_max_priority=function(){return"1200"},Ve.prototype.__get_max_priority=function(){return this.session.__get_max_priority()},Ne.prototype.__get_next_priority=function(C){var P=0;C=parseInt(C);for(var y in this.__operators)if(!!this.__operators.hasOwnProperty(y)){var F=parseInt(y);F>P&&F<C&&(P=F)}return P.toString()},Ve.prototype.__get_next_priority=function(C){return this.session.__get_next_priority(C)},Ne.prototype.__lookup_operator_classes=function(C,P){return this.__operators.hasOwnProperty(C)&&this.__operators[C][P]instanceof Array&&this.__operators[C][P]||!1},Ve.prototype.__lookup_operator_classes=function(C,P){return this.session.__lookup_operator_classes(C,P)},Ne.prototype.lookup_operator=function(C,P){for(var y in this.__operators)if(this.__operators[y][C]){for(var F=0;F<this.__operators[y][C].length;F++)if(P===0||this.__operators[y][C][F].length===P+1)return{priority:y,class:this.__operators[y][C][F]}}return null},Ve.prototype.lookup_operator=function(C,P){return this.session.lookup_operator(C,P)},Ne.prototype.throw_warning=function(C){this.thread.throw_warning(C)},Ve.prototype.throw_warning=function(C){this.warnings.push(C)},Ne.prototype.get_warnings=function(){return this.thread.get_warnings()},Ve.prototype.get_warnings=function(){return this.warnings},Ne.prototype.add_goal=function(C,P){this.thread.add_goal(C,P)},Ve.prototype.add_goal=function(C,P,y){y=y||null,P===!0&&(this.points=[]);for(var F=C.variables(),z={},X=0;X<F.length;X++)z[F[X]]=new Ee(F[X]);this.points.push(new ke(C,new Qe(z),y))},Ne.prototype.consult=function(C,P){return this.thread.consult(C,P)},Ve.prototype.consult=function(C,P){var y="";if(typeof C=="string"){y=C;var F=y.length;if(y.substring(F-3,F)===".pl"&&document.getElementById(y)){var z=document.getElementById(y),X=z.getAttribute("type");X!==null&&X.replace(/ /g,"").toLowerCase()==="text/prolog"&&(y=z.text)}}else if(C.nodeName)switch(C.nodeName.toLowerCase()){case"input":case"textarea":y=C.value;break;default:y=C.innerHTML;break}else return!1;return this.warnings=[],de(this,y,P)},Ne.prototype.query=function(C){return this.thread.query(C)},Ve.prototype.query=function(C){return this.points=[],this.debugger_points=[],ge(this,C)},Ne.prototype.head_point=function(){return this.thread.head_point()},Ve.prototype.head_point=function(){return this.points[this.points.length-1]},Ne.prototype.get_free_variable=function(C){return this.thread.get_free_variable(C)},Ve.prototype.get_free_variable=function(C){var P=[];if(C.id==="_"||this.session.renamed_variables[C.id]===void 0){for(this.session.rename++,this.points.length>0&&(P=this.head_point().substitution.domain());t(P,x.format_variable(this.session.rename))!==-1;)this.session.rename++;if(C.id==="_")return new Ee(x.format_variable(this.session.rename));this.session.renamed_variables[C.id]=x.format_variable(this.session.rename)}return new Ee(this.session.renamed_variables[C.id])},Ne.prototype.next_free_variable=function(){return this.thread.next_free_variable()},Ve.prototype.next_free_variable=function(){this.session.rename++;var C=[];for(this.points.length>0&&(C=this.head_point().substitution.domain());t(C,x.format_variable(this.session.rename))!==-1;)this.session.rename++;return new Ee(x.format_variable(this.session.rename))},Ne.prototype.is_public_predicate=function(C){return!this.public_predicates.hasOwnProperty(C)||this.public_predicates[C]===!0},Ve.prototype.is_public_predicate=function(C){return this.session.is_public_predicate(C)},Ne.prototype.is_multifile_predicate=function(C){return this.multifile_predicates.hasOwnProperty(C)&&this.multifile_predicates[C]===!0},Ve.prototype.is_multifile_predicate=function(C){return this.session.is_multifile_predicate(C)},Ne.prototype.prepend=function(C){return this.thread.prepend(C)},Ve.prototype.prepend=function(C){for(var P=C.length-1;P>=0;P--)this.points.push(C[P])},Ne.prototype.success=function(C,P){return this.thread.success(C,P)},Ve.prototype.success=function(C,y){var y=typeof y>"u"?C:y;this.prepend([new ke(C.goal.replace(null),C.substitution,y)])},Ne.prototype.throw_error=function(C){return this.thread.throw_error(C)},Ve.prototype.throw_error=function(C){this.prepend([new ke(new H("throw",[C]),new Qe,null,null)])},Ne.prototype.step_rule=function(C,P){return this.thread.step_rule(C,P)},Ve.prototype.step_rule=function(C,P){var y=P.indicator;if(C==="user"&&(C=null),C===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=C===null?this.session.modules:t(this.session.modules,C)===-1?[]:[C],z=0;z<F.length;z++){var X=x.module[F[z]];if(X.rules.hasOwnProperty(y)&&(X.rules.hasOwnProperty(this.level)||X.exports_predicate(y)))return x.module[F[z]].rules[y]}return null},Ne.prototype.step=function(){return this.thread.step()},Ve.prototype.step=function(){if(this.points.length!==0){var C=!1,P=this.points.pop();if(this.debugger&&this.debugger_states.push(P),x.type.is_term(P.goal)){var y=P.goal.select(),F=null,z=[];if(y!==null){this.total_steps++;for(var X=P;X.parent!==null&&X.parent.goal.search(y);)X=X.parent;if(this.level=X.parent===null?"top_level/0":X.parent.goal.select().indicator,x.type.is_term(y)&&y.indicator===":/2"&&(F=y.args[0].id,y=y.args[1]),F===null&&x.type.is_builtin(y))this.__call_indicator=y.indicator,C=x.predicate[y.indicator](this,P,y);else{var Z=this.step_rule(F,y);if(Z===null)this.session.rules.hasOwnProperty(y.indicator)||(this.get_flag("unknown").id==="error"?this.throw_error(x.error.existence("procedure",y.indicator,this.level)):this.get_flag("unknown").id==="warning"&&this.throw_warning("unknown procedure "+y.indicator+" (from "+this.level+")"));else if(Z instanceof Function)C=Z(this,P,y);else{for(var ie in Z)if(!!Z.hasOwnProperty(ie)){var Pe=Z[ie];this.session.renamed_variables={},Pe=Pe.rename(this);var Le=this.get_flag("occurs_check").indicator==="true/0",ot=new ke,gt=x.unify(y,Pe.head,Le);gt!==null&&(ot.goal=P.goal.replace(Pe.body),ot.goal!==null&&(ot.goal=ot.goal.apply(gt)),ot.substitution=P.substitution.apply(gt),ot.parent=P,z.push(ot))}this.prepend(z)}}}}else x.type.is_variable(P.goal)?this.throw_error(x.error.instantiation(this.level)):this.throw_error(x.error.type("callable",P.goal,this.level));return C}},Ne.prototype.answer=function(C){return this.thread.answer(C)},Ve.prototype.answer=function(C){C=C||function(P){},this.__calls.push(C),!(this.__calls.length>1)&&this.again()},Ne.prototype.answers=function(C,P,y){return this.thread.answers(C,P,y)},Ve.prototype.answers=function(C,P,y){var F=P||1e3,z=this;if(P<=0){y&&y();return}this.answer(function(X){C(X),X!==!1?setTimeout(function(){z.answers(C,P-1,y)},1):y&&y()})},Ne.prototype.again=function(C){return this.thread.again(C)},Ve.prototype.again=function(C){for(var P,y=Date.now();this.__calls.length>0;){for(this.warnings=[],C!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!x.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var z=this.__calls.shift();this.current_limit<=0?z(null):this.points.length===0?z(!1):x.type.is_error(this.head_point().goal)?(P=this.session.format_error(this.points.pop()),this.points=[],z(P)):(this.debugger&&this.debugger_states.push(this.head_point()),P=this.session.format_success(this.points.pop()),z(P))}},Ne.prototype.unfold=function(C){if(C.body===null)return!1;var P=C.head,y=C.body,F=y.select(),z=new Ve(this),X=[];z.add_goal(F),z.step();for(var Z=z.points.length-1;Z>=0;Z--){var ie=z.points[Z],Pe=P.apply(ie.substitution),Le=y.replace(ie.goal);Le!==null&&(Le=Le.apply(ie.substitution)),X.push(new He(Pe,Le))}var ot=this.rules[P.indicator],gt=t(ot,C);return X.length>0&&gt!==-1?(ot.splice.apply(ot,[gt,1].concat(X)),!0):!1},Ve.prototype.unfold=function(C){return this.session.unfold(C)},Ee.prototype.interpret=function(C){return x.error.instantiation(C.level)},Re.prototype.interpret=function(C){return this},H.prototype.interpret=function(C){return x.type.is_unitary_list(this)?this.args[0].interpret(C):x.operate(C,this)},Ee.prototype.compare=function(C){return this.id<C.id?-1:this.id>C.id?1:0},Re.prototype.compare=function(C){if(this.value===C.value&&this.is_float===C.is_float)return 0;if(this.value<C.value||this.value===C.value&&this.is_float&&!C.is_float)return-1;if(this.value>C.value)return 1},H.prototype.compare=function(C){if(this.args.length<C.args.length||this.args.length===C.args.length&&this.id<C.id)return-1;if(this.args.length>C.args.length||this.args.length===C.args.length&&this.id>C.id)return 1;for(var P=0;P<this.args.length;P++){var y=x.compare(this.args[P],C.args[P]);if(y!==0)return y}return 0},Qe.prototype.lookup=function(C){return this.links[C]?this.links[C]:null},Qe.prototype.filter=function(C){var P={};for(var y in this.links)if(!!this.links.hasOwnProperty(y)){var F=this.links[y];C(y,F)&&(P[y]=F)}return new Qe(P)},Qe.prototype.exclude=function(C){var P={};for(var y in this.links)!this.links.hasOwnProperty(y)||t(C,y)===-1&&(P[y]=this.links[y]);return new Qe(P)},Qe.prototype.add=function(C,P){this.links[C]=P},Qe.prototype.domain=function(C){var P=C===!0?function(z){return z}:function(z){return new Ee(z)},y=[];for(var F in this.links)y.push(P(F));return y},Ee.prototype.compile=function(){return'new pl.type.Var("'+this.id.toString()+'")'},Re.prototype.compile=function(){return"new pl.type.Num("+this.value.toString()+", "+this.is_float.toString()+")"},H.prototype.compile=function(){return'new pl.type.Term("'+this.id.replace(/"/g,'\\"')+'", ['+o(this.args,function(C){return C.compile()})+"])"},He.prototype.compile=function(){return"new pl.type.Rule("+this.head.compile()+", "+(this.body===null?"null":this.body.compile())+")"},Ne.prototype.compile=function(){var C,P=[],y;for(var F in this.rules)if(!!this.rules.hasOwnProperty(F)){var z=this.rules[F];y=[],C='"'+F+'": [';for(var X=0;X<z.length;X++)y.push(z[X].compile());C+=y.join(),C+="]",P.push(C)}return"{"+P.join()+"};"},Ee.prototype.toJavaScript=function(){},Re.prototype.toJavaScript=function(){return this.value},H.prototype.toJavaScript=function(){if(this.args.length===0&&this.indicator!=="[]/0")return this.id;if(x.type.is_list(this)){for(var C=[],P=this,y;P.indicator==="./2";){if(y=P.args[0].toJavaScript(),y===void 0)return;C.push(y),P=P.args[1]}if(P.indicator==="[]/0")return C}},He.prototype.singleton_variables=function(){var C=this.head.variables(),P={},y=[];this.body!==null&&(C=C.concat(this.body.variables()));for(var F=0;F<C.length;F++)P[C[F]]===void 0&&(P[C[F]]=0),P[C[F]]++;for(var z in P)z!=="_"&&P[z]===1&&y.push(z);return y};var x={__env:typeof pl<"u"&&pl.exports?global:window,module:{},version:e,parser:{tokenizer:U,expression:V},utils:{str_indicator:te,codePointAt:n,fromCodePoint:u},statistics:{getCountTerms:function(){return dt}},fromJavaScript:{test:{boolean:function(C){return C===!0||C===!1},number:function(C){return typeof C=="number"},string:function(C){return typeof C=="string"},list:function(C){return C instanceof Array},variable:function(C){return C===void 0},any:function(C){return!0}},conversion:{boolean:function(C){return new H(C?"true":"false",[])},number:function(C){return new Re(C,C%1!==0)},string:function(C){return new H(C,[])},list:function(C){for(var P=[],y,F=0;F<C.length;F++){if(y=x.fromJavaScript.apply(C[F]),y===void 0)return;P.push(y)}return g(P)},variable:function(C){return new Ee("_")},any:function(C){}},apply:function(C){for(var P in x.fromJavaScript.test)if(P!=="any"&&x.fromJavaScript.test[P](C))return x.fromJavaScript.conversion[P](C);return x.fromJavaScript.conversion.any(C)}},type:{Var:Ee,Num:Re,Term:H,Rule:He,State:ke,Stream:Te,Module:je,Thread:Ve,Session:Ne,Substitution:Qe,order:[Ee,Re,H,Te],compare:function(C,P){var y=t(x.type.order,C.constructor),F=t(x.type.order,P.constructor);if(y<F)return-1;if(y>F)return 1;if(C.constructor===Re){if(C.is_float&&P.is_float)return 0;if(C.is_float)return-1;if(P.is_float)return 1}return 0},is_substitution:function(C){return C instanceof Qe},is_state:function(C){return C instanceof ke},is_rule:function(C){return C instanceof He},is_variable:function(C){return C instanceof Ee},is_stream:function(C){return C instanceof Te},is_anonymous_var:function(C){return C instanceof Ee&&C.id==="_"},is_callable:function(C){return C instanceof H},is_number:function(C){return C instanceof Re},is_integer:function(C){return C instanceof Re&&!C.is_float},is_float:function(C){return C instanceof Re&&C.is_float},is_term:function(C){return C instanceof H},is_atom:function(C){return C instanceof H&&C.args.length===0},is_ground:function(C){if(C instanceof Ee)return!1;if(C instanceof H){for(var P=0;P<C.args.length;P++)if(!x.type.is_ground(C.args[P]))return!1}return!0},is_atomic:function(C){return C instanceof H&&C.args.length===0||C instanceof Re},is_compound:function(C){return C instanceof H&&C.args.length>0},is_list:function(C){return C instanceof H&&(C.indicator==="[]/0"||C.indicator==="./2")},is_empty_list:function(C){return C instanceof H&&C.indicator==="[]/0"},is_non_empty_list:function(C){return C instanceof H&&C.indicator==="./2"},is_fully_list:function(C){for(;C instanceof H&&C.indicator==="./2";)C=C.args[1];return C instanceof Ee||C instanceof H&&C.indicator==="[]/0"},is_instantiated_list:function(C){for(;C instanceof H&&C.indicator==="./2";)C=C.args[1];return C instanceof H&&C.indicator==="[]/0"},is_unitary_list:function(C){return C instanceof H&&C.indicator==="./2"&&C.args[1]instanceof H&&C.args[1].indicator==="[]/0"},is_character:function(C){return C instanceof H&&(C.id.length===1||C.id.length>0&&C.id.length<=2&&n(C.id,0)>=65536)},is_character_code:function(C){return C instanceof Re&&!C.is_float&&C.value>=0&&C.value<=1114111},is_byte:function(C){return C instanceof Re&&!C.is_float&&C.value>=0&&C.value<=255},is_operator:function(C){return C instanceof H&&x.arithmetic.evaluation[C.indicator]},is_directive:function(C){return C instanceof H&&x.directive[C.indicator]!==void 0},is_builtin:function(C){return C instanceof H&&x.predicate[C.indicator]!==void 0},is_error:function(C){return C instanceof H&&C.indicator==="throw/1"},is_predicate_indicator:function(C){return C instanceof H&&C.indicator==="//2"&&C.args[0]instanceof H&&C.args[0].args.length===0&&C.args[1]instanceof Re&&C.args[1].is_float===!1},is_flag:function(C){return C instanceof H&&C.args.length===0&&x.flag[C.id]!==void 0},is_value_flag:function(C,P){if(!x.type.is_flag(C))return!1;for(var y in x.flag[C.id].allowed)if(!!x.flag[C.id].allowed.hasOwnProperty(y)&&x.flag[C.id].allowed[y].equals(P))return!0;return!1},is_io_mode:function(C){return x.type.is_atom(C)&&["read","write","append"].indexOf(C.id)!==-1},is_stream_option:function(C){return x.type.is_term(C)&&(C.indicator==="alias/1"&&x.type.is_atom(C.args[0])||C.indicator==="reposition/1"&&x.type.is_atom(C.args[0])&&(C.args[0].id==="true"||C.args[0].id==="false")||C.indicator==="type/1"&&x.type.is_atom(C.args[0])&&(C.args[0].id==="text"||C.args[0].id==="binary")||C.indicator==="eof_action/1"&&x.type.is_atom(C.args[0])&&(C.args[0].id==="error"||C.args[0].id==="eof_code"||C.args[0].id==="reset"))},is_stream_position:function(C){return x.type.is_integer(C)&&C.value>=0||x.type.is_atom(C)&&(C.id==="end_of_stream"||C.id==="past_end_of_stream")},is_stream_property:function(C){return x.type.is_term(C)&&(C.indicator==="input/0"||C.indicator==="output/0"||C.indicator==="alias/1"&&(x.type.is_variable(C.args[0])||x.type.is_atom(C.args[0]))||C.indicator==="file_name/1"&&(x.type.is_variable(C.args[0])||x.type.is_atom(C.args[0]))||C.indicator==="position/1"&&(x.type.is_variable(C.args[0])||x.type.is_stream_position(C.args[0]))||C.indicator==="reposition/1"&&(x.type.is_variable(C.args[0])||x.type.is_atom(C.args[0])&&(C.args[0].id==="true"||C.args[0].id==="false"))||C.indicator==="type/1"&&(x.type.is_variable(C.args[0])||x.type.is_atom(C.args[0])&&(C.args[0].id==="text"||C.args[0].id==="binary"))||C.indicator==="mode/1"&&(x.type.is_variable(C.args[0])||x.type.is_atom(C.args[0])&&(C.args[0].id==="read"||C.args[0].id==="write"||C.args[0].id==="append"))||C.indicator==="eof_action/1"&&(x.type.is_variable(C.args[0])||x.type.is_atom(C.args[0])&&(C.args[0].id==="error"||C.args[0].id==="eof_code"||C.args[0].id==="reset"))||C.indicator==="end_of_stream/1"&&(x.type.is_variable(C.args[0])||x.type.is_atom(C.args[0])&&(C.args[0].id==="at"||C.args[0].id==="past"||C.args[0].id==="not")))},is_streamable:function(C){return C.__proto__.stream!==void 0},is_read_option:function(C){return x.type.is_term(C)&&["variables/1","variable_names/1","singletons/1"].indexOf(C.indicator)!==-1},is_write_option:function(C){return x.type.is_term(C)&&(C.indicator==="quoted/1"&&x.type.is_atom(C.args[0])&&(C.args[0].id==="true"||C.args[0].id==="false")||C.indicator==="ignore_ops/1"&&x.type.is_atom(C.args[0])&&(C.args[0].id==="true"||C.args[0].id==="false")||C.indicator==="numbervars/1"&&x.type.is_atom(C.args[0])&&(C.args[0].id==="true"||C.args[0].id==="false"))},is_close_option:function(C){return x.type.is_term(C)&&C.indicator==="force/1"&&x.type.is_atom(C.args[0])&&(C.args[0].id==="true"||C.args[0].id==="false")},is_modifiable_flag:function(C){return x.type.is_flag(C)&&x.flag[C.id].changeable},is_module:function(C){return C instanceof H&&C.indicator==="library/1"&&C.args[0]instanceof H&&C.args[0].args.length===0&&x.module[C.args[0].id]!==void 0}},arithmetic:{evaluation:{"e/0":{type_args:null,type_result:!0,fn:function(C){return Math.E}},"pi/0":{type_args:null,type_result:!0,fn:function(C){return Math.PI}},"tau/0":{type_args:null,type_result:!0,fn:function(C){return 2*Math.PI}},"epsilon/0":{type_args:null,type_result:!0,fn:function(C){return Number.EPSILON}},"+/1":{type_args:null,type_result:null,fn:function(C,P){return C}},"-/1":{type_args:null,type_result:null,fn:function(C,P){return-C}},"\\/1":{type_args:!1,type_result:!1,fn:function(C,P){return~C}},"abs/1":{type_args:null,type_result:null,fn:function(C,P){return Math.abs(C)}},"sign/1":{type_args:null,type_result:null,fn:function(C,P){return Math.sign(C)}},"float_integer_part/1":{type_args:!0,type_result:!1,fn:function(C,P){return parseInt(C)}},"float_fractional_part/1":{type_args:!0,type_result:!0,fn:function(C,P){return C-parseInt(C)}},"float/1":{type_args:null,type_result:!0,fn:function(C,P){return parseFloat(C)}},"floor/1":{type_args:!0,type_result:!1,fn:function(C,P){return Math.floor(C)}},"truncate/1":{type_args:!0,type_result:!1,fn:function(C,P){return parseInt(C)}},"round/1":{type_args:!0,type_result:!1,fn:function(C,P){return Math.round(C)}},"ceiling/1":{type_args:!0,type_result:!1,fn:function(C,P){return Math.ceil(C)}},"sin/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.sin(C)}},"cos/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.cos(C)}},"tan/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.tan(C)}},"asin/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.asin(C)}},"acos/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.acos(C)}},"atan/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.atan(C)}},"atan2/2":{type_args:null,type_result:!0,fn:function(C,P,y){return Math.atan2(C,P)}},"exp/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.exp(C)}},"sqrt/1":{type_args:null,type_result:!0,fn:function(C,P){return Math.sqrt(C)}},"log/1":{type_args:null,type_result:!0,fn:function(C,P){return C>0?Math.log(C):x.error.evaluation("undefined",P.__call_indicator)}},"+/2":{type_args:null,type_result:null,fn:function(C,P,y){return C+P}},"-/2":{type_args:null,type_result:null,fn:function(C,P,y){return C-P}},"*/2":{type_args:null,type_result:null,fn:function(C,P,y){return C*P}},"//2":{type_args:null,type_result:!0,fn:function(C,P,y){return P?C/P:x.error.evaluation("zero_division",y.__call_indicator)}},"///2":{type_args:!1,type_result:!1,fn:function(C,P,y){return P?parseInt(C/P):x.error.evaluation("zero_division",y.__call_indicator)}},"**/2":{type_args:null,type_result:!0,fn:function(C,P,y){return Math.pow(C,P)}},"^/2":{type_args:null,type_result:null,fn:function(C,P,y){return Math.pow(C,P)}},"<</2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C<<P}},">>/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C>>P}},"/\\/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C&P}},"\\//2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C|P}},"xor/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C^P}},"rem/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return P?C%P:x.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return P?C-parseInt(C/P)*P:x.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(C,P,y){return Math.max(C,P)}},"min/2":{type_args:null,type_result:null,fn:function(C,P,y){return Math.min(C,P)}}}},directive:{"dynamic/1":function(C,P){var y=P.args[0];if(x.type.is_variable(y))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_compound(y)||y.indicator!=="//2")C.throw_error(x.error.type("predicate_indicator",y,P.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_atom(y.args[0]))C.throw_error(x.error.type("atom",y.args[0],P.indicator));else if(!x.type.is_integer(y.args[1]))C.throw_error(x.error.type("integer",y.args[1],P.indicator));else{var F=P.args[0].args[0].id+"/"+P.args[0].args[1].value;C.session.public_predicates[F]=!0,C.session.rules[F]||(C.session.rules[F]=[])}},"multifile/1":function(C,P){var y=P.args[0];x.type.is_variable(y)?C.throw_error(x.error.instantiation(P.indicator)):!x.type.is_compound(y)||y.indicator!=="//2"?C.throw_error(x.error.type("predicate_indicator",y,P.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?C.throw_error(x.error.instantiation(P.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?C.session.multifile_predicates[P.args[0].args[0].id+"/"+P.args[0].args[1].value]=!0:C.throw_error(x.error.type("integer",y.args[1],P.indicator)):C.throw_error(x.error.type("atom",y.args[0],P.indicator))},"set_prolog_flag/2":function(C,P){var y=P.args[0],F=P.args[1];x.type.is_variable(y)||x.type.is_variable(F)?C.throw_error(x.error.instantiation(P.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?C.session.flag[y.id]=F:C.throw_error(x.error.permission("modify","flag",y)):C.throw_error(x.error.domain("flag_value",new H("+",[y,F]),P.indicator)):C.throw_error(x.error.domain("prolog_flag",y,P.indicator)):C.throw_error(x.error.type("atom",y,P.indicator))},"use_module/1":function(C,P){var y=P.args[0];if(x.type.is_variable(y))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_term(y))C.throw_error(x.error.type("term",y,P.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;t(C.session.modules,F)===-1&&C.session.modules.push(F)}},"char_conversion/2":function(C,P){var y=P.args[0],F=P.args[1];x.type.is_variable(y)||x.type.is_variable(F)?C.throw_error(x.error.instantiation(P.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete C.session.__char_conversion[y.id]:C.session.__char_conversion[y.id]=F.id:C.throw_error(x.error.type("character",F,P.indicator)):C.throw_error(x.error.type("character",y,P.indicator))},"op/3":function(C,P){var y=P.args[0],F=P.args[1],z=P.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_integer(y))C.throw_error(x.error.type("integer",y,P.indicator));else if(!x.type.is_atom(F))C.throw_error(x.error.type("atom",F,P.indicator));else if(!x.type.is_atom(z))C.throw_error(x.error.type("atom",z,P.indicator));else if(y.value<0||y.value>1200)C.throw_error(x.error.domain("operator_priority",y,P.indicator));else if(z.id===",")C.throw_error(x.error.permission("modify","operator",z,P.indicator));else if(z.id==="|"&&(y.value<1001||F.id.length!==3))C.throw_error(x.error.permission("modify","operator",z,P.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(F.id)===-1)C.throw_error(x.error.domain("operator_specifier",F,P.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var Z in C.session.__operators)if(!!C.session.__operators.hasOwnProperty(Z)){var ie=C.session.__operators[Z][z.id];ie&&(t(ie,"fx")!==-1&&(X.prefix={priority:Z,type:"fx"}),t(ie,"fy")!==-1&&(X.prefix={priority:Z,type:"fy"}),t(ie,"xf")!==-1&&(X.postfix={priority:Z,type:"xf"}),t(ie,"yf")!==-1&&(X.postfix={priority:Z,type:"yf"}),t(ie,"xfx")!==-1&&(X.infix={priority:Z,type:"xfx"}),t(ie,"xfy")!==-1&&(X.infix={priority:Z,type:"xfy"}),t(ie,"yfx")!==-1&&(X.infix={priority:Z,type:"yfx"}))}var Pe;switch(F.id){case"fy":case"fx":Pe="prefix";break;case"yf":case"xf":Pe="postfix";break;default:Pe="infix";break}if(((X.prefix&&Pe==="prefix"||X.postfix&&Pe==="postfix"||X.infix&&Pe==="infix")&&X[Pe].type!==F.id||X.infix&&Pe==="postfix"||X.postfix&&Pe==="infix")&&y.value!==0)C.throw_error(x.error.permission("create","operator",z,P.indicator));else return X[Pe]&&(we(C.session.__operators[X[Pe].priority][z.id],F.id),C.session.__operators[X[Pe].priority][z.id].length===0&&delete C.session.__operators[X[Pe].priority][z.id]),y.value>0&&(C.session.__operators[y.value]||(C.session.__operators[y.value.toString()]={}),C.session.__operators[y.value][z.id]||(C.session.__operators[y.value][z.id]=[]),C.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{"op/3":function(C,P,y){x.directive["op/3"](C,y)&&C.success(P)},"current_op/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],Z=[];for(var ie in C.session.__operators)for(var Pe in C.session.__operators[ie])for(var Le=0;Le<C.session.__operators[ie][Pe].length;Le++)Z.push(new ke(P.goal.replace(new H(",",[new H("=",[new Re(ie,!1),F]),new H(",",[new H("=",[new H(C.session.__operators[ie][Pe][Le],[]),z]),new H("=",[new H(Pe,[]),X])])])),P.substitution,P));C.prepend(Z)},";/2":function(C,P,y){if(x.type.is_term(y.args[0])&&y.args[0].indicator==="->/2"){var F=C.points,z=C.session.format_success,X=C.session.format_error;C.session.format_success=function(Le){return Le.substitution},C.session.format_error=function(Le){return Le.goal},C.points=[new ke(y.args[0].args[0],P.substitution,P)];var Z=function(Le){C.points=F,C.session.format_success=z,C.session.format_error=X,Le===!1?C.prepend([new ke(P.goal.replace(y.args[1]),P.substitution,P)]):x.type.is_error(Le)?C.throw_error(Le.args[0]):Le===null?(C.prepend([P]),C.__calls.shift()(null)):C.prepend([new ke(P.goal.replace(y.args[0].args[1]).apply(Le),P.substitution.apply(Le),P)])};C.__calls.unshift(Z)}else{var ie=new ke(P.goal.replace(y.args[0]),P.substitution,P),Pe=new ke(P.goal.replace(y.args[1]),P.substitution,P);C.prepend([ie,Pe])}},"!/0":function(C,P,y){var F,z,X=[];for(F=P,z=null;F.parent!==null&&F.parent.goal.search(y);)if(z=F,F=F.parent,F.goal!==null){var Z=F.goal.select();if(Z&&Z.id==="call"&&Z.search(y)){F=z;break}}for(var ie=C.points.length-1;ie>=0;ie--){for(var Pe=C.points[ie],Le=Pe.parent;Le!==null&&Le!==F.parent;)Le=Le.parent;Le===null&&Le!==F.parent&&X.push(Pe)}C.points=X.reverse(),C.success(P)},"\\+/1":function(C,P,y){var F=y.args[0];x.type.is_variable(F)?C.throw_error(x.error.instantiation(C.level)):x.type.is_callable(F)?C.prepend([new ke(P.goal.replace(new H(",",[new H(",",[new H("call",[F]),new H("!",[])]),new H("fail",[])])),P.substitution,P),new ke(P.goal.replace(null),P.substitution,P)]):C.throw_error(x.error.type("callable",F,C.level))},"->/2":function(C,P,y){var F=P.goal.replace(new H(",",[y.args[0],new H(",",[new H("!"),y.args[1]])]));C.prepend([new ke(F,P.substitution,P)])},"fail/0":function(C,P,y){},"false/0":function(C,P,y){},"true/0":function(C,P,y){C.success(P)},"call/1":ne(1),"call/2":ne(2),"call/3":ne(3),"call/4":ne(4),"call/5":ne(5),"call/6":ne(6),"call/7":ne(7),"call/8":ne(8),"once/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("call",[F]),new H("!",[])])),P.substitution,P)])},"forall/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H("\\+",[new H(",",[new H("call",[F]),new H("\\+",[new H("call",[z])])])])),P.substitution,P)])},"repeat/0":function(C,P,y){C.prepend([new ke(P.goal.replace(null),P.substitution,P),P])},"throw/1":function(C,P,y){x.type.is_variable(y.args[0])?C.throw_error(x.error.instantiation(C.level)):C.throw_error(y.args[0])},"catch/3":function(C,P,y){var F=C.points;C.points=[],C.prepend([new ke(y.args[0],P.substitution,P)]);var z=C.session.format_success,X=C.session.format_error;C.session.format_success=function(ie){return ie.substitution},C.session.format_error=function(ie){return ie.goal};var Z=function(ie){var Pe=C.points;if(C.points=F,C.session.format_success=z,C.session.format_error=X,x.type.is_error(ie)){for(var Le=[],ot=C.points.length-1;ot>=0;ot--){for(var $t=C.points[ot],gt=$t.parent;gt!==null&&gt!==P.parent;)gt=gt.parent;gt===null&&gt!==P.parent&&Le.push($t)}C.points=Le;var jt=C.get_flag("occurs_check").indicator==="true/0",$t=new ke,xt=x.unify(ie.args[0],y.args[1],jt);xt!==null?($t.substitution=P.substitution.apply(xt),$t.goal=P.goal.replace(y.args[2]).apply(xt),$t.parent=P,C.prepend([$t])):C.throw_error(ie.args[0])}else if(ie!==!1){for(var on=ie===null?[]:[new ke(P.goal.apply(ie).replace(null),P.substitution.apply(ie),P)],br=[],ot=Pe.length-1;ot>=0;ot--){br.push(Pe[ot]);var dr=Pe[ot].goal!==null?Pe[ot].goal.select():null;if(x.type.is_term(dr)&&dr.indicator==="!/0")break}var Pr=o(br,function(Yr){return Yr.goal===null&&(Yr.goal=new H("true",[])),Yr=new ke(P.goal.replace(new H("catch",[Yr.goal,y.args[1],y.args[2]])),P.substitution.apply(Yr.substitution),Yr.parent),Yr.exclude=y.args[0].variables(),Yr}).reverse();C.prepend(Pr),C.prepend(on),ie===null&&(this.current_limit=0,C.__calls.shift()(null))}};C.__calls.unshift(Z)},"=/2":function(C,P,y){var F=C.get_flag("occurs_check").indicator==="true/0",z=new ke,X=x.unify(y.args[0],y.args[1],F);X!==null&&(z.goal=P.goal.apply(X).replace(null),z.substitution=P.substitution.apply(X),z.parent=P,C.prepend([z]))},"unify_with_occurs_check/2":function(C,P,y){var F=new ke,z=x.unify(y.args[0],y.args[1],!0);z!==null&&(F.goal=P.goal.apply(z).replace(null),F.substitution=P.substitution.apply(z),F.parent=P,C.prepend([F]))},"\\=/2":function(C,P,y){var F=C.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[0],y.args[1],F);z===null&&C.success(P)},"subsumes_term/2":function(C,P,y){var F=C.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[1],y.args[0],F);z!==null&&y.args[1].apply(z).equals(y.args[1])&&C.success(P)},"findall/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(z))C.throw_error(x.error.type("callable",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))C.throw_error(x.error.type("list",X,y.indicator));else{var Z=C.next_free_variable(),ie=new H(",",[z,new H("=",[Z,F])]),Pe=C.points,Le=C.session.limit,ot=C.session.format_success;C.session.format_success=function($t){return $t.substitution},C.add_goal(ie,!0,P);var gt=[],jt=function($t){if($t!==!1&&$t!==null&&!x.type.is_error($t))C.__calls.unshift(jt),gt.push($t.links[Z.id]),C.session.limit=C.current_limit;else if(C.points=Pe,C.session.limit=Le,C.session.format_success=ot,x.type.is_error($t))C.throw_error($t.args[0]);else if(C.current_limit>0){for(var xt=new H("[]"),on=gt.length-1;on>=0;on--)xt=new H(".",[gt[on],xt]);C.prepend([new ke(P.goal.replace(new H("=",[X,xt])),P.substitution,P)])}};C.__calls.unshift(jt)}},"bagof/3":function(C,P,y){var F,z=y.args[0],X=y.args[1],Z=y.args[2];if(x.type.is_variable(X))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))C.throw_error(x.error.type("callable",X,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))C.throw_error(x.error.type("list",Z,y.indicator));else{var ie=C.next_free_variable(),Pe;X.indicator==="^/2"?(Pe=X.args[0].variables(),X=X.args[1]):Pe=[],Pe=Pe.concat(z.variables());for(var Le=X.variables().filter(function(Pr){return t(Pe,Pr)===-1}),ot=new H("[]"),gt=Le.length-1;gt>=0;gt--)ot=new H(".",[new Ee(Le[gt]),ot]);var jt=new H(",",[X,new H("=",[ie,new H(",",[ot,z])])]),$t=C.points,xt=C.session.limit,on=C.session.format_success;C.session.format_success=function(Pr){return Pr.substitution},C.add_goal(jt,!0,P);var br=[],dr=function(Pr){if(Pr!==!1&&Pr!==null&&!x.type.is_error(Pr)){C.__calls.unshift(dr);var Yr=!1,Wn=Pr.links[ie.id].args[0],Os=Pr.links[ie.id].args[1];for(var Ti in br)if(!!br.hasOwnProperty(Ti)){var hs=br[Ti];if(hs.variables.equals(Wn)){hs.answers.push(Os),Yr=!0;break}}Yr||br.push({variables:Wn,answers:[Os]}),C.session.limit=C.current_limit}else if(C.points=$t,C.session.limit=xt,C.session.format_success=on,x.type.is_error(Pr))C.throw_error(Pr.args[0]);else if(C.current_limit>0){for(var io=[],Si=0;Si<br.length;Si++){Pr=br[Si].answers;for(var Ms=new H("[]"),so=Pr.length-1;so>=0;so--)Ms=new H(".",[Pr[so],Ms]);io.push(new ke(P.goal.replace(new H(",",[new H("=",[ot,br[Si].variables]),new H("=",[Z,Ms])])),P.substitution,P))}C.prepend(io)}};C.__calls.unshift(dr)}},"setof/3":function(C,P,y){var F,z=y.args[0],X=y.args[1],Z=y.args[2];if(x.type.is_variable(X))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))C.throw_error(x.error.type("callable",X,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))C.throw_error(x.error.type("list",Z,y.indicator));else{var ie=C.next_free_variable(),Pe;X.indicator==="^/2"?(Pe=X.args[0].variables(),X=X.args[1]):Pe=[],Pe=Pe.concat(z.variables());for(var Le=X.variables().filter(function(Pr){return t(Pe,Pr)===-1}),ot=new H("[]"),gt=Le.length-1;gt>=0;gt--)ot=new H(".",[new Ee(Le[gt]),ot]);var jt=new H(",",[X,new H("=",[ie,new H(",",[ot,z])])]),$t=C.points,xt=C.session.limit,on=C.session.format_success;C.session.format_success=function(Pr){return Pr.substitution},C.add_goal(jt,!0,P);var br=[],dr=function(Pr){if(Pr!==!1&&Pr!==null&&!x.type.is_error(Pr)){C.__calls.unshift(dr);var Yr=!1,Wn=Pr.links[ie.id].args[0],Os=Pr.links[ie.id].args[1];for(var Ti in br)if(!!br.hasOwnProperty(Ti)){var hs=br[Ti];if(hs.variables.equals(Wn)){hs.answers.push(Os),Yr=!0;break}}Yr||br.push({variables:Wn,answers:[Os]}),C.session.limit=C.current_limit}else if(C.points=$t,C.session.limit=xt,C.session.format_success=on,x.type.is_error(Pr))C.throw_error(Pr.args[0]);else if(C.current_limit>0){for(var io=[],Si=0;Si<br.length;Si++){Pr=br[Si].answers.sort(x.compare);for(var Ms=new H("[]"),so=Pr.length-1;so>=0;so--)Ms=new H(".",[Pr[so],Ms]);io.push(new ke(P.goal.replace(new H(",",[new H("=",[ot,br[Si].variables]),new H("=",[Z,Ms])])),P.substitution,P))}C.prepend(io)}};C.__calls.unshift(dr)}},"functor/3":function(C,P,y){var F,z=y.args[0],X=y.args[1],Z=y.args[2];if(x.type.is_variable(z)&&(x.type.is_variable(X)||x.type.is_variable(Z)))C.throw_error(x.error.instantiation("functor/3"));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))C.throw_error(x.error.type("integer",y.args[2],"functor/3"));else if(!x.type.is_variable(X)&&!x.type.is_atomic(X))C.throw_error(x.error.type("atomic",y.args[1],"functor/3"));else if(x.type.is_integer(X)&&x.type.is_integer(Z)&&Z.value!==0)C.throw_error(x.error.type("atom",y.args[1],"functor/3"));else if(x.type.is_variable(z)){if(y.args[2].value>=0){for(var ie=[],Pe=0;Pe<Z.value;Pe++)ie.push(C.next_free_variable());var Le=x.type.is_integer(X)?X:new H(X.id,ie);C.prepend([new ke(P.goal.replace(new H("=",[z,Le])),P.substitution,P)])}}else{var ot=x.type.is_integer(z)?z:new H(z.id,[]),gt=x.type.is_integer(z)?new Re(0,!1):new Re(z.args.length,!1),jt=new H(",",[new H("=",[ot,X]),new H("=",[gt,Z])]);C.prepend([new ke(P.goal.replace(jt),P.substitution,P)])}},"arg/3":function(C,P,y){if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))C.throw_error(x.error.instantiation(y.indicator));else if(y.args[0].value<0)C.throw_error(x.error.domain("not_less_than_zero",y.args[0],y.indicator));else if(!x.type.is_compound(y.args[1]))C.throw_error(x.error.type("compound",y.args[1],y.indicator));else{var F=y.args[0].value;if(F>0&&F<=y.args[1].args.length){var z=new H("=",[y.args[1].args[F-1],y.args[2]]);C.prepend([new ke(P.goal.replace(z),P.substitution,P)])}}},"=../2":function(C,P,y){var F;if(x.type.is_variable(y.args[0])&&(x.type.is_variable(y.args[1])||x.type.is_non_empty_list(y.args[1])&&x.type.is_variable(y.args[1].args[0])))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_fully_list(y.args[1]))C.throw_error(x.error.type("list",y.args[1],y.indicator));else if(x.type.is_variable(y.args[0])){if(!x.type.is_variable(y.args[1])){var X=[];for(F=y.args[1].args[1];F.indicator==="./2";)X.push(F.args[0]),F=F.args[1];x.type.is_variable(y.args[0])&&x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):X.length===0&&x.type.is_compound(y.args[1].args[0])?C.throw_error(x.error.type("atomic",y.args[1].args[0],y.indicator)):X.length>0&&(x.type.is_compound(y.args[1].args[0])||x.type.is_number(y.args[1].args[0]))?C.throw_error(x.error.type("atom",y.args[1].args[0],y.indicator)):X.length===0?C.prepend([new ke(P.goal.replace(new H("=",[y.args[1].args[0],y.args[0]],P)),P.substitution,P)]):C.prepend([new ke(P.goal.replace(new H("=",[new H(y.args[1].args[0].id,X),y.args[0]])),P.substitution,P)])}}else{if(x.type.is_atomic(y.args[0]))F=new H(".",[y.args[0],new H("[]")]);else{F=new H("[]");for(var z=y.args[0].args.length-1;z>=0;z--)F=new H(".",[y.args[0].args[z],F]);F=new H(".",[new H(y.args[0].id),F])}C.prepend([new ke(P.goal.replace(new H("=",[F,y.args[1]])),P.substitution,P)])}},"copy_term/2":function(C,P,y){var F=y.args[0].rename(C);C.prepend([new ke(P.goal.replace(new H("=",[F,y.args[1]])),P.substitution,P.parent)])},"term_variables/2":function(C,P,y){var F=y.args[0],z=y.args[1];if(!x.type.is_fully_list(z))C.throw_error(x.error.type("list",z,y.indicator));else{var X=g(o(Se(F.variables()),function(Z){return new Ee(Z)}));C.prepend([new ke(P.goal.replace(new H("=",[z,X])),P.substitution,P)])}},"clause/2":function(C,P,y){if(x.type.is_variable(y.args[0]))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))C.throw_error(x.error.type("callable",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_callable(y.args[1]))C.throw_error(x.error.type("callable",y.args[1],y.indicator));else if(C.session.rules[y.args[0].indicator]!==void 0)if(C.is_public_predicate(y.args[0].indicator)){var F=[];for(var z in C.session.rules[y.args[0].indicator])if(!!C.session.rules[y.args[0].indicator].hasOwnProperty(z)){var X=C.session.rules[y.args[0].indicator][z];C.session.renamed_variables={},X=X.rename(C),X.body===null&&(X.body=new H("true"));var Z=new H(",",[new H("=",[X.head,y.args[0]]),new H("=",[X.body,y.args[1]])]);F.push(new ke(P.goal.replace(Z),P.substitution,P))}C.prepend(F)}else C.throw_error(x.error.permission("access","private_procedure",y.args[0].indicator,y.indicator))},"current_predicate/1":function(C,P,y){var F=y.args[0];if(!x.type.is_variable(F)&&(!x.type.is_compound(F)||F.indicator!=="//2"))C.throw_error(x.error.type("predicate_indicator",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[0])&&!x.type.is_atom(F.args[0]))C.throw_error(x.error.type("atom",F.args[0],y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[1])&&!x.type.is_integer(F.args[1]))C.throw_error(x.error.type("integer",F.args[1],y.indicator));else{var z=[];for(var X in C.session.rules)if(!!C.session.rules.hasOwnProperty(X)){var Z=X.lastIndexOf("/"),ie=X.substr(0,Z),Pe=parseInt(X.substr(Z+1,X.length-(Z+1))),Le=new H("/",[new H(ie),new Re(Pe,!1)]),ot=new H("=",[Le,F]);z.push(new ke(P.goal.replace(ot),P.substitution,P))}C.prepend(z)}},"asserta/1":function(C,P,y){if(x.type.is_variable(y.args[0]))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))C.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=be(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?C.throw_error(x.error.type("callable",z,y.indicator)):C.is_public_predicate(F.indicator)?(C.session.rules[F.indicator]===void 0&&(C.session.rules[F.indicator]=[]),C.session.public_predicates[F.indicator]=!0,C.session.rules[F.indicator]=[new He(F,z,!0)].concat(C.session.rules[F.indicator]),C.success(P)):C.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):C.throw_error(x.error.type("callable",F,y.indicator))}},"assertz/1":function(C,P,y){if(x.type.is_variable(y.args[0]))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))C.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=be(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?C.throw_error(x.error.type("callable",z,y.indicator)):C.is_public_predicate(F.indicator)?(C.session.rules[F.indicator]===void 0&&(C.session.rules[F.indicator]=[]),C.session.public_predicates[F.indicator]=!0,C.session.rules[F.indicator].push(new He(F,z,!0)),C.success(P)):C.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):C.throw_error(x.error.type("callable",F,y.indicator))}},"retract/1":function(C,P,y){if(x.type.is_variable(y.args[0]))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))C.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;if(y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=y.args[0].args[1]):(F=y.args[0],z=new H("true")),typeof P.retract>"u")if(C.is_public_predicate(F.indicator)){if(C.session.rules[F.indicator]!==void 0){for(var X=[],Z=0;Z<C.session.rules[F.indicator].length;Z++){C.session.renamed_variables={};var ie=C.session.rules[F.indicator][Z],Pe=ie.rename(C);Pe.body===null&&(Pe.body=new H("true",[]));var Le=C.get_flag("occurs_check").indicator==="true/0",ot=x.unify(new H(",",[F,z]),new H(",",[Pe.head,Pe.body]),Le);if(ot!==null){var gt=new ke(P.goal.replace(new H(",",[new H("retract",[new H(":-",[F,z])]),new H(",",[new H("=",[F,Pe.head]),new H("=",[z,Pe.body])])])),P.substitution,P);gt.retract=ie,X.push(gt)}}C.prepend(X)}}else C.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator));else ce(C,P,F.indicator,P.retract)}},"retractall/1":function(C,P,y){var F=y.args[0];x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_callable(F)?C.prepend([new ke(P.goal.replace(new H(",",[new H("retract",[new x.type.Term(":-",[F,new Ee("_")])]),new H("fail",[])])),P.substitution,P),new ke(P.goal.replace(null),P.substitution,P)]):C.throw_error(x.error.type("callable",F,y.indicator))},"abolish/1":function(C,P,y){if(x.type.is_variable(y.args[0])||x.type.is_term(y.args[0])&&y.args[0].indicator==="//2"&&(x.type.is_variable(y.args[0].args[0])||x.type.is_variable(y.args[0].args[1])))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_term(y.args[0])||y.args[0].indicator!=="//2")C.throw_error(x.error.type("predicate_indicator",y.args[0],y.indicator));else if(!x.type.is_atom(y.args[0].args[0]))C.throw_error(x.error.type("atom",y.args[0].args[0],y.indicator));else if(!x.type.is_integer(y.args[0].args[1]))C.throw_error(x.error.type("integer",y.args[0].args[1],y.indicator));else if(y.args[0].args[1].value<0)C.throw_error(x.error.domain("not_less_than_zero",y.args[0].args[1],y.indicator));else if(x.type.is_number(C.get_flag("max_arity"))&&y.args[0].args[1].value>C.get_flag("max_arity").value)C.throw_error(x.error.representation("max_arity",y.indicator));else{var F=y.args[0].args[0].id+"/"+y.args[0].args[1].value;C.is_public_predicate(F)?(delete C.session.rules[F],C.success(P)):C.throw_error(x.error.permission("modify","static_procedure",F,y.indicator))}},"atom_length/2":function(C,P,y){if(x.type.is_variable(y.args[0]))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_atom(y.args[0]))C.throw_error(x.error.type("atom",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_integer(y.args[1]))C.throw_error(x.error.type("integer",y.args[1],y.indicator));else if(x.type.is_integer(y.args[1])&&y.args[1].value<0)C.throw_error(x.error.domain("not_less_than_zero",y.args[1],y.indicator));else{var F=new Re(y.args[0].id.length,!1);C.prepend([new ke(P.goal.replace(new H("=",[F,y.args[1]])),P.substitution,P)])}},"atom_concat/3":function(C,P,y){var F,z,X=y.args[0],Z=y.args[1],ie=y.args[2];if(x.type.is_variable(ie)&&(x.type.is_variable(X)||x.type.is_variable(Z)))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))C.throw_error(x.error.type("atom",X,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_atom(Z))C.throw_error(x.error.type("atom",Z,y.indicator));else if(!x.type.is_variable(ie)&&!x.type.is_atom(ie))C.throw_error(x.error.type("atom",ie,y.indicator));else{var Pe=x.type.is_variable(X),Le=x.type.is_variable(Z);if(!Pe&&!Le)z=new H("=",[ie,new H(X.id+Z.id)]),C.prepend([new ke(P.goal.replace(z),P.substitution,P)]);else if(Pe&&!Le)F=ie.id.substr(0,ie.id.length-Z.id.length),F+Z.id===ie.id&&(z=new H("=",[X,new H(F)]),C.prepend([new ke(P.goal.replace(z),P.substitution,P)]));else if(Le&&!Pe)F=ie.id.substr(X.id.length),X.id+F===ie.id&&(z=new H("=",[Z,new H(F)]),C.prepend([new ke(P.goal.replace(z),P.substitution,P)]));else{for(var ot=[],gt=0;gt<=ie.id.length;gt++){var jt=new H(ie.id.substr(0,gt)),$t=new H(ie.id.substr(gt));z=new H(",",[new H("=",[jt,X]),new H("=",[$t,Z])]),ot.push(new ke(P.goal.replace(z),P.substitution,P))}C.prepend(ot)}}},"sub_atom/5":function(C,P,y){var F,z=y.args[0],X=y.args[1],Z=y.args[2],ie=y.args[3],Pe=y.args[4];if(x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))C.throw_error(x.error.type("integer",X,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))C.throw_error(x.error.type("integer",Z,y.indicator));else if(!x.type.is_variable(ie)&&!x.type.is_integer(ie))C.throw_error(x.error.type("integer",ie,y.indicator));else if(x.type.is_integer(X)&&X.value<0)C.throw_error(x.error.domain("not_less_than_zero",X,y.indicator));else if(x.type.is_integer(Z)&&Z.value<0)C.throw_error(x.error.domain("not_less_than_zero",Z,y.indicator));else if(x.type.is_integer(ie)&&ie.value<0)C.throw_error(x.error.domain("not_less_than_zero",ie,y.indicator));else{var Le=[],ot=[],gt=[];if(x.type.is_variable(X))for(F=0;F<=z.id.length;F++)Le.push(F);else Le.push(X.value);if(x.type.is_variable(Z))for(F=0;F<=z.id.length;F++)ot.push(F);else ot.push(Z.value);if(x.type.is_variable(ie))for(F=0;F<=z.id.length;F++)gt.push(F);else gt.push(ie.value);var jt=[];for(var $t in Le)if(!!Le.hasOwnProperty($t)){F=Le[$t];for(var xt in ot)if(!!ot.hasOwnProperty(xt)){var on=ot[xt],br=z.id.length-F-on;if(t(gt,br)!==-1&&F+on+br===z.id.length){var dr=z.id.substr(F,on);if(z.id===z.id.substr(0,F)+dr+z.id.substr(F+on,br)){var Pr=new H("=",[new H(dr),Pe]),Yr=new H("=",[X,new Re(F)]),Wn=new H("=",[Z,new Re(on)]),Os=new H("=",[ie,new Re(br)]),Ti=new H(",",[new H(",",[new H(",",[Yr,Wn]),Os]),Pr]);jt.push(new ke(P.goal.replace(Ti),P.substitution,P))}}}}C.prepend(jt)}},"atom_chars/2":function(C,P,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))C.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var ie=z,Pe=x.type.is_variable(F),Le="";ie.indicator==="./2";){if(x.type.is_character(ie.args[0]))Le+=ie.args[0].id;else if(x.type.is_variable(ie.args[0])&&Pe){C.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(ie.args[0])){C.throw_error(x.error.type("character",ie.args[0],y.indicator));return}ie=ie.args[1]}x.type.is_variable(ie)&&Pe?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)?C.throw_error(x.error.type("list",z,y.indicator)):C.prepend([new ke(P.goal.replace(new H("=",[new H(Le),F])),P.substitution,P)])}else{for(var X=new H("[]"),Z=F.id.length-1;Z>=0;Z--)X=new H(".",[new H(F.id.charAt(Z)),X]);C.prepend([new ke(P.goal.replace(new H("=",[z,X])),P.substitution,P)])}},"atom_codes/2":function(C,P,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))C.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var ie=z,Pe=x.type.is_variable(F),Le="";ie.indicator==="./2";){if(x.type.is_character_code(ie.args[0]))Le+=u(ie.args[0].value);else if(x.type.is_variable(ie.args[0])&&Pe){C.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(ie.args[0])){C.throw_error(x.error.representation("character_code",y.indicator));return}ie=ie.args[1]}x.type.is_variable(ie)&&Pe?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)?C.throw_error(x.error.type("list",z,y.indicator)):C.prepend([new ke(P.goal.replace(new H("=",[new H(Le),F])),P.substitution,P)])}else{for(var X=new H("[]"),Z=F.id.length-1;Z>=0;Z--)X=new H(".",[new Re(n(F.id,Z),!1),X]);C.prepend([new ke(P.goal.replace(new H("=",[z,X])),P.substitution,P)])}},"char_code/2":function(C,P,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_character(F))C.throw_error(x.error.type("character",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))C.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character_code(z))C.throw_error(x.error.representation("character_code",y.indicator));else if(x.type.is_variable(z)){var X=new Re(n(F.id,0),!1);C.prepend([new ke(P.goal.replace(new H("=",[X,z])),P.substitution,P)])}else{var Z=new H(u(z.value));C.prepend([new ke(P.goal.replace(new H("=",[Z,F])),P.substitution,P)])}},"number_chars/2":function(C,P,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))C.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))C.throw_error(x.error.type("list",X,y.indicator));else{var Z=x.type.is_variable(z);if(!x.type.is_variable(X)){var ie=X,Pe=!0;for(F="";ie.indicator==="./2";){if(x.type.is_character(ie.args[0]))F+=ie.args[0].id;else if(x.type.is_variable(ie.args[0]))Pe=!1;else if(!x.type.is_variable(ie.args[0])){C.throw_error(x.error.type("character",ie.args[0],y.indicator));return}ie=ie.args[1]}if(Pe=Pe&&x.type.is_empty_list(ie),!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)){C.throw_error(x.error.type("list",X,y.indicator));return}if(!Pe&&Z){C.throw_error(x.error.instantiation(y.indicator));return}else if(Pe)if(x.type.is_variable(ie)&&Z){C.throw_error(x.error.instantiation(y.indicator));return}else{var Le=C.parse(F),ot=Le.value;!x.type.is_number(ot)||Le.tokens[Le.tokens.length-1].space?C.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):C.prepend([new ke(P.goal.replace(new H("=",[z,ot])),P.substitution,P)]);return}}if(!Z){F=z.toString();for(var gt=new H("[]"),jt=F.length-1;jt>=0;jt--)gt=new H(".",[new H(F.charAt(jt)),gt]);C.prepend([new ke(P.goal.replace(new H("=",[X,gt])),P.substitution,P)])}}},"number_codes/2":function(C,P,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))C.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))C.throw_error(x.error.type("list",X,y.indicator));else{var Z=x.type.is_variable(z);if(!x.type.is_variable(X)){var ie=X,Pe=!0;for(F="";ie.indicator==="./2";){if(x.type.is_character_code(ie.args[0]))F+=u(ie.args[0].value);else if(x.type.is_variable(ie.args[0]))Pe=!1;else if(!x.type.is_variable(ie.args[0])){C.throw_error(x.error.type("character_code",ie.args[0],y.indicator));return}ie=ie.args[1]}if(Pe=Pe&&x.type.is_empty_list(ie),!x.type.is_empty_list(ie)&&!x.type.is_variable(ie)){C.throw_error(x.error.type("list",X,y.indicator));return}if(!Pe&&Z){C.throw_error(x.error.instantiation(y.indicator));return}else if(Pe)if(x.type.is_variable(ie)&&Z){C.throw_error(x.error.instantiation(y.indicator));return}else{var Le=C.parse(F),ot=Le.value;!x.type.is_number(ot)||Le.tokens[Le.tokens.length-1].space?C.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):C.prepend([new ke(P.goal.replace(new H("=",[z,ot])),P.substitution,P)]);return}}if(!Z){F=z.toString();for(var gt=new H("[]"),jt=F.length-1;jt>=0;jt--)gt=new H(".",[new Re(n(F,jt),!1),gt]);C.prepend([new ke(P.goal.replace(new H("=",[X,gt])),P.substitution,P)])}}},"upcase_atom/2":function(C,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?C.throw_error(x.error.type("atom",z,y.indicator)):C.prepend([new ke(P.goal.replace(new H("=",[z,new H(F.id.toUpperCase(),[])])),P.substitution,P)]):C.throw_error(x.error.type("atom",F,y.indicator))},"downcase_atom/2":function(C,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?C.throw_error(x.error.type("atom",z,y.indicator)):C.prepend([new ke(P.goal.replace(new H("=",[z,new H(F.id.toLowerCase(),[])])),P.substitution,P)]):C.throw_error(x.error.type("atom",F,y.indicator))},"atomic_list_concat/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H("atomic_list_concat",[F,new H("",[]),z])),P.substitution,P)])},"atomic_list_concat/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z)||x.type.is_variable(F)&&x.type.is_variable(X))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_list(F))C.throw_error(x.error.type("list",F,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))C.throw_error(x.error.type("atom",X,y.indicator));else if(x.type.is_variable(X)){for(var ie="",Pe=F;x.type.is_term(Pe)&&Pe.indicator==="./2";){if(!x.type.is_atom(Pe.args[0])&&!x.type.is_number(Pe.args[0])){C.throw_error(x.error.type("atomic",Pe.args[0],y.indicator));return}ie!==""&&(ie+=z.id),x.type.is_atom(Pe.args[0])?ie+=Pe.args[0].id:ie+=""+Pe.args[0].value,Pe=Pe.args[1]}ie=new H(ie,[]),x.type.is_variable(Pe)?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_term(Pe)||Pe.indicator!=="[]/0"?C.throw_error(x.error.type("list",F,y.indicator)):C.prepend([new ke(P.goal.replace(new H("=",[ie,X])),P.substitution,P)])}else{var Z=g(o(X.id.split(z.id),function(Le){return new H(Le,[])}));C.prepend([new ke(P.goal.replace(new H("=",[Z,F])),P.substitution,P)])}},"@=</2":function(C,P,y){x.compare(y.args[0],y.args[1])<=0&&C.success(P)},"==/2":function(C,P,y){x.compare(y.args[0],y.args[1])===0&&C.success(P)},"\\==/2":function(C,P,y){x.compare(y.args[0],y.args[1])!==0&&C.success(P)},"@</2":function(C,P,y){x.compare(y.args[0],y.args[1])<0&&C.success(P)},"@>/2":function(C,P,y){x.compare(y.args[0],y.args[1])>0&&C.success(P)},"@>=/2":function(C,P,y){x.compare(y.args[0],y.args[1])>=0&&C.success(P)},"compare/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(!x.type.is_variable(F)&&!x.type.is_atom(F))C.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_atom(F)&&["<",">","="].indexOf(F.id)===-1)C.throw_error(x.type.domain("order",F,y.indicator));else{var Z=x.compare(z,X);Z=Z===0?"=":Z===-1?"<":">",C.prepend([new ke(P.goal.replace(new H("=",[F,new H(Z,[])])),P.substitution,P)])}},"is/2":function(C,P,y){var F=y.args[1].interpret(C);x.type.is_number(F)?C.prepend([new ke(P.goal.replace(new H("=",[y.args[0],F],C.level)),P.substitution,P)]):C.throw_error(F)},"between/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(F)||x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_integer(F))C.throw_error(x.error.type("integer",F,y.indicator));else if(!x.type.is_integer(z))C.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))C.throw_error(x.error.type("integer",X,y.indicator));else if(x.type.is_variable(X)){var Z=[new ke(P.goal.replace(new H("=",[X,F])),P.substitution,P)];F.value<z.value&&Z.push(new ke(P.goal.replace(new H("between",[new Re(F.value+1,!1),z,X])),P.substitution,P)),C.prepend(Z)}else F.value<=X.value&&z.value>=X.value&&C.success(P)},"succ/2":function(C,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)&&x.type.is_variable(z)?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_integer(F)?C.throw_error(x.error.type("integer",F,y.indicator)):!x.type.is_variable(z)&&!x.type.is_integer(z)?C.throw_error(x.error.type("integer",z,y.indicator)):!x.type.is_variable(F)&&F.value<0?C.throw_error(x.error.domain("not_less_than_zero",F,y.indicator)):!x.type.is_variable(z)&&z.value<0?C.throw_error(x.error.domain("not_less_than_zero",z,y.indicator)):(x.type.is_variable(z)||z.value>0)&&(x.type.is_variable(F)?C.prepend([new ke(P.goal.replace(new H("=",[F,new Re(z.value-1,!1)])),P.substitution,P)]):C.prepend([new ke(P.goal.replace(new H("=",[z,new Re(F.value+1,!1)])),P.substitution,P)]))},"=:=/2":function(C,P,y){var F=x.arithmetic_compare(C,y.args[0],y.args[1]);x.type.is_term(F)?C.throw_error(F):F===0&&C.success(P)},"=\\=/2":function(C,P,y){var F=x.arithmetic_compare(C,y.args[0],y.args[1]);x.type.is_term(F)?C.throw_error(F):F!==0&&C.success(P)},"</2":function(C,P,y){var F=x.arithmetic_compare(C,y.args[0],y.args[1]);x.type.is_term(F)?C.throw_error(F):F<0&&C.success(P)},"=</2":function(C,P,y){var F=x.arithmetic_compare(C,y.args[0],y.args[1]);x.type.is_term(F)?C.throw_error(F):F<=0&&C.success(P)},">/2":function(C,P,y){var F=x.arithmetic_compare(C,y.args[0],y.args[1]);x.type.is_term(F)?C.throw_error(F):F>0&&C.success(P)},">=/2":function(C,P,y){var F=x.arithmetic_compare(C,y.args[0],y.args[1]);x.type.is_term(F)?C.throw_error(F):F>=0&&C.success(P)},"var/1":function(C,P,y){x.type.is_variable(y.args[0])&&C.success(P)},"atom/1":function(C,P,y){x.type.is_atom(y.args[0])&&C.success(P)},"atomic/1":function(C,P,y){x.type.is_atomic(y.args[0])&&C.success(P)},"compound/1":function(C,P,y){x.type.is_compound(y.args[0])&&C.success(P)},"integer/1":function(C,P,y){x.type.is_integer(y.args[0])&&C.success(P)},"float/1":function(C,P,y){x.type.is_float(y.args[0])&&C.success(P)},"number/1":function(C,P,y){x.type.is_number(y.args[0])&&C.success(P)},"nonvar/1":function(C,P,y){x.type.is_variable(y.args[0])||C.success(P)},"ground/1":function(C,P,y){y.variables().length===0&&C.success(P)},"acyclic_term/1":function(C,P,y){for(var F=P.substitution.apply(P.substitution),z=y.args[0].variables(),X=0;X<z.length;X++)if(P.substitution.links[z[X]]!==void 0&&!P.substitution.links[z[X]].equals(F.links[z[X]]))return;C.success(P)},"callable/1":function(C,P,y){x.type.is_callable(y.args[0])&&C.success(P)},"is_list/1":function(C,P,y){for(var F=y.args[0];x.type.is_term(F)&&F.indicator==="./2";)F=F.args[1];x.type.is_term(F)&&F.indicator==="[]/0"&&C.success(P)},"current_input/1":function(C,P,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream",F,y.indicator)):(x.type.is_atom(F)&&C.get_stream_by_alias(F.id)&&(F=C.get_stream_by_alias(F.id)),C.prepend([new ke(P.goal.replace(new H("=",[F,C.get_current_input()])),P.substitution,P)]))},"current_output/1":function(C,P,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):(x.type.is_atom(F)&&C.get_stream_by_alias(F.id)&&(F=C.get_stream_by_alias(F.id)),C.prepend([new ke(P.goal.replace(new H("=",[F,C.get_current_output()])),P.substitution,P)]))},"set_input/1":function(C,P,y){var F=y.args[0],z=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):x.type.is_stream(z)?z.output===!0?C.throw_error(x.error.permission("input","stream",F,y.indicator)):(C.set_current_input(z),C.success(P)):C.throw_error(x.error.existence("stream",F,y.indicator))},"set_output/1":function(C,P,y){var F=y.args[0],z=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):x.type.is_stream(z)?z.input===!0?C.throw_error(x.error.permission("output","stream",F,y.indicator)):(C.set_current_output(z),C.success(P)):C.throw_error(x.error.existence("stream",F,y.indicator))},"open/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2];C.prepend([new ke(P.goal.replace(new H("open",[F,z,X,new H("[]",[])])),P.substitution,P)])},"open/4":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],Z=y.args[3];if(x.type.is_variable(F)||x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_atom(z))C.throw_error(x.error.type("atom",z,y.indicator));else if(!x.type.is_list(Z))C.throw_error(x.error.type("list",Z,y.indicator));else if(!x.type.is_variable(X))C.throw_error(x.error.type("variable",X,y.indicator));else if(!x.type.is_atom(F)&&!x.type.is_streamable(F))C.throw_error(x.error.domain("source_sink",F,y.indicator));else if(!x.type.is_io_mode(z))C.throw_error(x.error.domain("io_mode",z,y.indicator));else{for(var ie={},Pe=Z,Le;x.type.is_term(Pe)&&Pe.indicator==="./2";){if(Le=Pe.args[0],x.type.is_variable(Le)){C.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_stream_option(Le)){C.throw_error(x.error.domain("stream_option",Le,y.indicator));return}ie[Le.id]=Le.args[0].id,Pe=Pe.args[1]}if(Pe.indicator!=="[]/0"){x.type.is_variable(Pe)?C.throw_error(x.error.instantiation(y.indicator)):C.throw_error(x.error.type("list",Z,y.indicator));return}else{var ot=ie.alias;if(ot&&C.get_stream_by_alias(ot)){C.throw_error(x.error.permission("open","source_sink",new H("alias",[new H(ot,[])]),y.indicator));return}ie.type||(ie.type="text");var gt;if(x.type.is_atom(F)?gt=C.file_system_open(F.id,ie.type,z.id):gt=F.stream(ie.type,z.id),gt===!1){C.throw_error(x.error.permission("open","source_sink",F,y.indicator));return}else if(gt===null){C.throw_error(x.error.existence("source_sink",F,y.indicator));return}var jt=new Te(gt,z.id,ie.alias,ie.type,ie.reposition==="true",ie.eof_action);ot?C.session.streams[ot]=jt:C.session.streams[jt.id]=jt,C.prepend([new ke(P.goal.replace(new H("=",[X,jt])),P.substitution,P)])}}},"close/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H("close",[F,new H("[]",[])])),P.substitution,P)])},"close/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(z))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(z))C.throw_error(x.error.type("list",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else{for(var Z={},ie=z,Pe;x.type.is_term(ie)&&ie.indicator==="./2";){if(Pe=ie.args[0],x.type.is_variable(Pe)){C.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_close_option(Pe)){C.throw_error(x.error.domain("close_option",Pe,y.indicator));return}Z[Pe.id]=Pe.args[0].id==="true",ie=ie.args[1]}if(ie.indicator!=="[]/0"){x.type.is_variable(ie)?C.throw_error(x.error.instantiation(y.indicator)):C.throw_error(x.error.type("list",z,y.indicator));return}else{if(X===C.session.standard_input||X===C.session.standard_output){C.success(P);return}else X===C.session.current_input?C.session.current_input=C.session.standard_input:X===C.session.current_output&&(C.session.current_output=C.session.current_output);X.alias!==null?delete C.session.streams[X.alias]:delete C.session.streams[X.id],X.output&&X.stream.flush();var Le=X.stream.close();X.stream=null,(Z.force===!0||Le===!0)&&C.success(P)}}},"flush_output/0":function(C,P,y){C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("flush_output",[new Ee("S")])])),P.substitution,P)])},"flush_output/1":function(C,P,y){var F=y.args[0],z=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(z)||z.stream===null?C.throw_error(x.error.existence("stream",F,y.indicator)):F.input===!0?C.throw_error(x.error.permission("output","stream",output,y.indicator)):(z.stream.flush(),C.success(P))},"stream_property/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_variable(F)&&(!x.type.is_stream(X)||X.stream===null))C.throw_error(x.error.existence("stream",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_stream_property(z))C.throw_error(x.error.domain("stream_property",z,y.indicator));else{var Z=[],ie=[];if(!x.type.is_variable(F))Z.push(X);else for(var Pe in C.session.streams)Z.push(C.session.streams[Pe]);for(var Le=0;Le<Z.length;Le++){var ot=[];Z[Le].filename&&ot.push(new H("file_name",[new H(Z[Le].file_name,[])])),ot.push(new H("mode",[new H(Z[Le].mode,[])])),ot.push(new H(Z[Le].input?"input":"output",[])),Z[Le].alias&&ot.push(new H("alias",[new H(Z[Le].alias,[])])),ot.push(new H("position",[typeof Z[Le].position=="number"?new Re(Z[Le].position,!1):new H(Z[Le].position,[])])),ot.push(new H("end_of_stream",[new H(Z[Le].position==="end_of_stream"?"at":Z[Le].position==="past_end_of_stream"?"past":"not",[])])),ot.push(new H("eof_action",[new H(Z[Le].eof_action,[])])),ot.push(new H("reposition",[new H(Z[Le].reposition?"true":"false",[])])),ot.push(new H("type",[new H(Z[Le].type,[])]));for(var gt=0;gt<ot.length;gt++)ie.push(new ke(P.goal.replace(new H(",",[new H("=",[x.type.is_variable(F)?F:X,Z[Le]]),new H("=",[z,ot[gt]])])),P.substitution,P))}C.prepend(ie)}},"at_end_of_stream/0":function(C,P,y){C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H(",",[new H("stream_property",[new Ee("S"),new H("end_of_stream",[new Ee("E")])]),new H(",",[new H("!",[]),new H(";",[new H("=",[new Ee("E"),new H("at",[])]),new H("=",[new Ee("E"),new H("past",[])])])])])])),P.substitution,P)])},"at_end_of_stream/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("stream_property",[F,new H("end_of_stream",[new Ee("E")])]),new H(",",[new H("!",[]),new H(";",[new H("=",[new Ee("E"),new H("at",[])]),new H("=",[new Ee("E"),new H("past",[])])])])])),P.substitution,P)])},"set_stream_position/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?C.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?C.throw_error(x.error.existence("stream",F,y.indicator)):x.type.is_stream_position(z)?X.reposition===!1?C.throw_error(x.error.permission("reposition","stream",F,y.indicator)):(x.type.is_integer(z)?X.position=z.value:X.position=z.id,C.success(P)):C.throw_error(x.error.domain("stream_position",z,y.indicator))},"get_char/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("get_char",[new Ee("S"),F])])),P.substitution,P)])},"get_char/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))C.throw_error(x.error.type("in_character",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)C.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")C.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")C.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else{if(Z=X.stream.get(1,X.position),Z===null){C.throw_error(x.error.representation("character",y.indicator));return}X.position++}C.prepend([new ke(P.goal.replace(new H("=",[new H(Z,[]),z])),P.substitution,P)])}},"get_code/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("get_code",[new Ee("S"),F])])),P.substitution,P)])},"get_code/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))C.throw_error(x.error.type("integer",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)C.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")C.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")C.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z=-1,X.position="past_end_of_stream";else{if(Z=X.stream.get(1,X.position),Z===null){C.throw_error(x.error.representation("character",y.indicator));return}Z=n(Z,0),X.position++}C.prepend([new ke(P.goal.replace(new H("=",[new Re(Z,!1),z])),P.substitution,P)])}},"peek_char/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("peek_char",[new Ee("S"),F])])),P.substitution,P)])},"peek_char/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))C.throw_error(x.error.type("in_character",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)C.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")C.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")C.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else if(Z=X.stream.get(1,X.position),Z===null){C.throw_error(x.error.representation("character",y.indicator));return}C.prepend([new ke(P.goal.replace(new H("=",[new H(Z,[]),z])),P.substitution,P)])}},"peek_code/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("peek_code",[new Ee("S"),F])])),P.substitution,P)])},"peek_code/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))C.throw_error(x.error.type("integer",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)C.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="binary")C.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")C.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z=-1,X.position="past_end_of_stream";else{if(Z=X.stream.get(1,X.position),Z===null){C.throw_error(x.error.representation("character",y.indicator));return}Z=n(Z,0)}C.prepend([new ke(P.goal.replace(new H("=",[new Re(Z,!1),z])),P.substitution,P)])}},"put_char/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("put_char",[new Ee("S"),F])])),P.substitution,P)])},"put_char/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_character(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?C.throw_error(x.error.existence("stream",F,y.indicator)):X.input?C.throw_error(x.error.permission("output","stream",F,y.indicator)):X.type==="binary"?C.throw_error(x.error.permission("output","binary_stream",F,y.indicator)):X.stream.put(z.id,X.position)&&(typeof X.position=="number"&&X.position++,C.success(P)):C.throw_error(x.error.type("character",z,y.indicator))},"put_code/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("put_code",[new Ee("S"),F])])),P.substitution,P)])},"put_code/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(z)?x.type.is_character_code(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?C.throw_error(x.error.existence("stream",F,y.indicator)):X.input?C.throw_error(x.error.permission("output","stream",F,y.indicator)):X.type==="binary"?C.throw_error(x.error.permission("output","binary_stream",F,y.indicator)):X.stream.put_char(u(z.value),X.position)&&(typeof X.position=="number"&&X.position++,C.success(P)):C.throw_error(x.error.representation("character_code",y.indicator)):C.throw_error(x.error.type("integer",z,y.indicator))},"nl/0":function(C,P,y){C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("put_char",[new Ee("S"),new H(`
271`,[])])])),P.substitution,P)])},"nl/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H("put_char",[F,new H(`
272`,[])])),P.substitution,P)])},"get_byte/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("get_byte",[new Ee("S"),F])])),P.substitution,P)])},"get_byte/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))C.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)C.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="text")C.throw_error(x.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")C.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else{if(Z=X.stream.get_byte(X.position),Z===null){C.throw_error(x.error.representation("byte",y.indicator));return}X.position++}C.prepend([new ke(P.goal.replace(new H("=",[new Re(Z,!1),z])),P.substitution,P)])}},"peek_byte/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("peek_byte",[new Ee("S"),F])])),P.substitution,P)])},"peek_byte/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))C.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)C.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="text")C.throw_error(x.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")C.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else if(Z=X.stream.get_byte(X.position),Z===null){C.throw_error(x.error.representation("byte",y.indicator));return}C.prepend([new ke(P.goal.replace(new H("=",[new Re(Z,!1),z])),P.substitution,P)])}},"put_byte/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("put_byte",[new Ee("S"),F])])),P.substitution,P)])},"put_byte/2":function(C,P,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?C.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?C.throw_error(x.error.existence("stream",F,y.indicator)):X.input?C.throw_error(x.error.permission("output","stream",F,y.indicator)):X.type==="text"?C.throw_error(x.error.permission("output","text_stream",F,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position=="number"&&X.position++,C.success(P)):C.throw_error(x.error.type("byte",z,y.indicator))},"read/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("read_term",[new Ee("S"),F,new H("[]",[])])])),P.substitution,P)])},"read/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H("read_term",[F,z,new H("[]",[])])),P.substitution,P)])},"read_term/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("read_term",[new Ee("S"),F,z])])),P.substitution,P)])},"read_term/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],Z=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))C.throw_error(x.error.type("list",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(Z.output)C.throw_error(x.error.permission("input","stream",F,y.indicator));else if(Z.type==="binary")C.throw_error(x.error.permission("input","binary_stream",F,y.indicator));else if(Z.position==="past_end_of_stream"&&Z.eof_action==="error")C.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{for(var ie={},Pe=X,Le;x.type.is_term(Pe)&&Pe.indicator==="./2";){if(Le=Pe.args[0],x.type.is_variable(Le)){C.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_read_option(Le)){C.throw_error(x.error.domain("read_option",Le,y.indicator));return}ie[Le.id]=Le.args[0],Pe=Pe.args[1]}if(Pe.indicator!=="[]/0"){x.type.is_variable(Pe)?C.throw_error(x.error.instantiation(y.indicator)):C.throw_error(x.error.type("list",X,y.indicator));return}else{for(var ot,gt,jt,$t="",xt=[],on=null;on===null||on.name!=="atom"||on.value!=="."||jt.type===A&&x.flatten_error(new H("throw",[jt.value])).found==="token_not_found";){if(ot=Z.stream.get(1,Z.position),ot===null){C.throw_error(x.error.representation("character",y.indicator));return}if(ot==="end_of_file"||ot==="past_end_of_file"){jt?C.throw_error(x.error.syntax(xt[jt.len-1],". or expression expected",!1)):C.throw_error(x.error.syntax(null,"token not found",!0));return}Z.position++,$t+=ot,gt=new U(C),gt.new_text($t),xt=gt.get_tokens(),on=xt!==null&&xt.length>0?xt[xt.length-1]:null,xt!==null&&(jt=V(C,xt,0,C.__get_max_priority(),!1))}if(jt.type===p&&jt.len===xt.length-1&&on.value==="."){jt=jt.value.rename(C);var br=new H("=",[z,jt]);if(ie.variables){var dr=g(o(Se(jt.variables()),function(Pr){return new Ee(Pr)}));br=new H(",",[br,new H("=",[ie.variables,dr])])}if(ie.variable_names){var dr=g(o(Se(jt.variables()),function(Yr){var Wn;for(Wn in C.session.renamed_variables)if(C.session.renamed_variables.hasOwnProperty(Wn)&&C.session.renamed_variables[Wn]===Yr)break;return new H("=",[new H(Wn,[]),new Ee(Yr)])}));br=new H(",",[br,new H("=",[ie.variable_names,dr])])}if(ie.singletons){var dr=g(o(new He(jt,null).singleton_variables(),function(Yr){var Wn;for(Wn in C.session.renamed_variables)if(C.session.renamed_variables.hasOwnProperty(Wn)&&C.session.renamed_variables[Wn]===Yr)break;return new H("=",[new H(Wn,[]),new Ee(Yr)])}));br=new H(",",[br,new H("=",[ie.singletons,dr])])}C.prepend([new ke(P.goal.replace(br),P.substitution,P)])}else jt.type===p?C.throw_error(x.error.syntax(xt[jt.len],"unexpected token",!1)):C.throw_error(jt.value)}}},"write/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("write",[new Ee("S"),F])])),P.substitution,P)])},"write/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H("write_term",[F,z,new H(".",[new H("quoted",[new H("false",[])]),new H(".",[new H("ignore_ops",[new H("false")]),new H(".",[new H("numbervars",[new H("true")]),new H("[]",[])])])])])),P.substitution,P)])},"writeq/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("writeq",[new Ee("S"),F])])),P.substitution,P)])},"writeq/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H("write_term",[F,z,new H(".",[new H("quoted",[new H("true",[])]),new H(".",[new H("ignore_ops",[new H("false")]),new H(".",[new H("numbervars",[new H("true")]),new H("[]",[])])])])])),P.substitution,P)])},"write_canonical/1":function(C,P,y){var F=y.args[0];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("write_canonical",[new Ee("S"),F])])),P.substitution,P)])},"write_canonical/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H("write_term",[F,z,new H(".",[new H("quoted",[new H("true",[])]),new H(".",[new H("ignore_ops",[new H("true")]),new H(".",[new H("numbervars",[new H("false")]),new H("[]",[])])])])])),P.substitution,P)])},"write_term/2":function(C,P,y){var F=y.args[0],z=y.args[1];C.prepend([new ke(P.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("write_term",[new Ee("S"),F,z])])),P.substitution,P)])},"write_term/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],Z=x.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))C.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))C.throw_error(x.error.type("list",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))C.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)C.throw_error(x.error.existence("stream",F,y.indicator));else if(Z.input)C.throw_error(x.error.permission("output","stream",F,y.indicator));else if(Z.type==="binary")C.throw_error(x.error.permission("output","binary_stream",F,y.indicator));else if(Z.position==="past_end_of_stream"&&Z.eof_action==="error")C.throw_error(x.error.permission("output","past_end_of_stream",F,y.indicator));else{for(var ie={},Pe=X,Le;x.type.is_term(Pe)&&Pe.indicator==="./2";){if(Le=Pe.args[0],x.type.is_variable(Le)){C.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_write_option(Le)){C.throw_error(x.error.domain("write_option",Le,y.indicator));return}ie[Le.id]=Le.args[0].id==="true",Pe=Pe.args[1]}if(Pe.indicator!=="[]/0"){x.type.is_variable(Pe)?C.throw_error(x.error.instantiation(y.indicator)):C.throw_error(x.error.type("list",X,y.indicator));return}else{ie.session=C.session;var ot=z.toString(ie);Z.stream.put(ot,Z.position),typeof Z.position=="number"&&(Z.position+=ot.length),C.success(P)}}},"halt/0":function(C,P,y){C.points=[]},"halt/1":function(C,P,y){var F=y.args[0];x.type.is_variable(F)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(F)?C.points=[]:C.throw_error(x.error.type("integer",F,y.indicator))},"current_prolog_flag/2":function(C,P,y){var F=y.args[0],z=y.args[1];if(!x.type.is_variable(F)&&!x.type.is_atom(F))C.throw_error(x.error.type("atom",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_flag(F))C.throw_error(x.error.domain("prolog_flag",F,y.indicator));else{var X=[];for(var Z in x.flag)if(!!x.flag.hasOwnProperty(Z)){var ie=new H(",",[new H("=",[new H(Z),F]),new H("=",[C.get_flag(Z),z])]);X.push(new ke(P.goal.replace(ie),P.substitution,P))}C.prepend(X)}},"set_prolog_flag/2":function(C,P,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)||x.type.is_variable(z)?C.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?x.type.is_flag(F)?x.type.is_value_flag(F,z)?x.type.is_modifiable_flag(F)?(C.session.flag[F.id]=z,C.success(P)):C.throw_error(x.error.permission("modify","flag",F)):C.throw_error(x.error.domain("flag_value",new H("+",[F,z]),y.indicator)):C.throw_error(x.error.domain("prolog_flag",F,y.indicator)):C.throw_error(x.error.type("atom",F,y.indicator))}},flag:{bounded:{allowed:[new H("true"),new H("false")],value:new H("true"),changeable:!1},max_integer:{allowed:[new Re(Number.MAX_SAFE_INTEGER)],value:new Re(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new Re(Number.MIN_SAFE_INTEGER)],value:new Re(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new H("down"),new H("toward_zero")],value:new H("toward_zero"),changeable:!1},char_conversion:{allowed:[new H("on"),new H("off")],value:new H("on"),changeable:!0},debug:{allowed:[new H("on"),new H("off")],value:new H("off"),changeable:!0},max_arity:{allowed:[new H("unbounded")],value:new H("unbounded"),changeable:!1},unknown:{allowed:[new H("error"),new H("fail"),new H("warning")],value:new H("error"),changeable:!0},double_quotes:{allowed:[new H("chars"),new H("codes"),new H("atom")],value:new H("codes"),changeable:!0},occurs_check:{allowed:[new H("false"),new H("true")],value:new H("false"),changeable:!0},dialect:{allowed:[new H("tau")],value:new H("tau"),changeable:!1},version_data:{allowed:[new H("tau",[new Re(e.major,!1),new Re(e.minor,!1),new Re(e.patch,!1),new H(e.status)])],value:new H("tau",[new Re(e.major,!1),new Re(e.minor,!1),new Re(e.patch,!1),new H(e.status)]),changeable:!1},nodejs:{allowed:[new H("yes"),new H("no")],value:new H(typeof pl<"u"&&pl.exports?"yes":"no"),changeable:!1}},unify:function(C,P,y){y=y===void 0?!1:y;for(var F=[{left:C,right:P}],z={};F.length!==0;){var X=F.pop();if(C=X.left,P=X.right,x.type.is_term(C)&&x.type.is_term(P)){if(C.indicator!==P.indicator)return null;for(var Z=0;Z<C.args.length;Z++)F.push({left:C.args[Z],right:P.args[Z]})}else if(x.type.is_number(C)&&x.type.is_number(P)){if(C.value!==P.value||C.is_float!==P.is_float)return null}else if(x.type.is_variable(C)){if(x.type.is_variable(P)&&C.id===P.id)continue;if(y===!0&&P.variables().indexOf(C.id)!==-1)return null;if(C.id!=="_"){var ie=new Qe;ie.add(C.id,P);for(var Z=0;Z<F.length;Z++)F[Z].left=F[Z].left.apply(ie),F[Z].right=F[Z].right.apply(ie);for(var Z in z)z[Z]=z[Z].apply(ie);z[C.id]=P}}else if(x.type.is_variable(P))F.push({left:P,right:C});else if(C.unify!==void 0){if(!C.unify(P))return null}else return null}return new Qe(z)},compare:function(C,P){var y=x.type.compare(C,P);return y!==0?y:C.compare(P)},arithmetic_compare:function(C,P,y){var F=P.interpret(C);if(x.type.is_number(F)){var z=y.interpret(C);return x.type.is_number(z)?F.value<z.value?-1:F.value>z.value?1:0:z}else return F},operate:function(C,P){if(x.type.is_operator(P)){for(var y=x.type.is_operator(P),F=[],z,X=!1,Z=0;Z<P.args.length;Z++){if(z=P.args[Z].interpret(C),x.type.is_number(z)){if(y.type_args!==null&&z.is_float!==y.type_args)return x.error.type(y.type_args?"float":"integer",z,C.__call_indicator);F.push(z.value)}else return z;X=X||z.is_float}return F.push(C),z=x.arithmetic.evaluation[P.indicator].fn.apply(this,F),X=y.type_result===null?X:y.type_result,x.type.is_term(z)?z:z===Number.POSITIVE_INFINITY||z===Number.NEGATIVE_INFINITY?x.error.evaluation("overflow",C.__call_indicator):X===!1&&C.get_flag("bounded").id==="true"&&(z>C.get_flag("max_integer").value||z<C.get_flag("min_integer").value)?x.error.evaluation("int_overflow",C.__call_indicator):new Re(z,X)}else return x.error.type("evaluable",P.indicator,C.__call_indicator)},error:{existence:function(C,P,y){return typeof P=="string"&&(P=te(P)),new H("error",[new H("existence_error",[new H(C),P]),te(y)])},type:function(C,P,y){return new H("error",[new H("type_error",[new H(C),P]),te(y)])},instantiation:function(C){return new H("error",[new H("instantiation_error"),te(C)])},domain:function(C,P,y){return new H("error",[new H("domain_error",[new H(C),P]),te(y)])},representation:function(C,P){return new H("error",[new H("representation_error",[new H(C)]),te(P)])},permission:function(C,P,y,F){return new H("error",[new H("permission_error",[new H(C),new H(P),y]),te(F)])},evaluation:function(C,P){return new H("error",[new H("evaluation_error",[new H(C)]),te(P)])},syntax:function(C,P,y){C=C||{value:"",line:0,column:0,matches:[""],start:0};var F=y&&C.matches.length>0?C.start+C.matches[0].length:C.start,z=y?new H("token_not_found"):new H("found",[new H(C.value.toString())]),X=new H(".",[new H("line",[new Re(C.line+1)]),new H(".",[new H("column",[new Re(F+1)]),new H(".",[z,new H("[]",[])])])]);return new H("error",[new H("syntax_error",[new H(P)]),X])},syntax_by_predicate:function(C,P){return new H("error",[new H("syntax_error",[new H(C)]),te(P)])}},warning:{singleton:function(C,P,y){for(var F=new H("[]"),z=C.length-1;z>=0;z--)F=new H(".",[new Ee(C[z]),F]);return new H("warning",[new H("singleton_variables",[F,te(P)]),new H(".",[new H("line",[new Re(y,!1)]),new H("[]")])])},failed_goal:function(C,P){return new H("warning",[new H("failed_goal",[C]),new H(".",[new H("line",[new Re(P,!1)]),new H("[]")])])}},format_variable:function(C){return"_"+C},format_answer:function(C,P,F){P instanceof Ne&&(P=P.thread);var F=F||{};if(F.session=P?P.session:void 0,x.type.is_error(C))return"uncaught exception: "+C.args[0].toString();if(C===!1)return"false.";if(C===null)return"limit exceeded ;";var z=0,X="";if(x.type.is_substitution(C)){var Z=C.domain(!0);C=C.filter(function(Le,ot){return!x.type.is_variable(ot)||Z.indexOf(ot.id)!==-1&&Le!==ot.id})}for(var ie in C.links)!C.links.hasOwnProperty(ie)||(z++,X!==""&&(X+=", "),X+=ie.toString(F)+" = "+C.links[ie].toString(F));var Pe=typeof P>"u"||P.points.length>0?" ;":".";return z===0?"true"+Pe:X+Pe},flatten_error:function(C){if(!x.type.is_error(C))return null;C=C.args[0];var P={};return P.type=C.args[0].id,P.thrown=P.type==="syntax_error"?null:C.args[1].id,P.expected=null,P.found=null,P.representation=null,P.existence=null,P.existence_type=null,P.line=null,P.column=null,P.permission_operation=null,P.permission_type=null,P.evaluation_type=null,P.type==="type_error"||P.type==="domain_error"?(P.expected=C.args[0].args[0].id,P.found=C.args[0].args[1].toString()):P.type==="syntax_error"?C.args[1].indicator==="./2"?(P.expected=C.args[0].args[0].id,P.found=C.args[1].args[1].args[1].args[0],P.found=P.found.id==="token_not_found"?P.found.id:P.found.args[0].id,P.line=C.args[1].args[0].args[0].value,P.column=C.args[1].args[1].args[0].args[0].value):P.thrown=C.args[1].id:P.type==="permission_error"?(P.found=C.args[0].args[2].toString(),P.permission_operation=C.args[0].args[0].id,P.permission_type=C.args[0].args[1].id):P.type==="evaluation_error"?P.evaluation_type=C.args[0].args[0].id:P.type==="representation_error"?P.representation=C.args[0].args[0].id:P.type==="existence_error"&&(P.existence=C.args[0].args[1].toString(),P.existence_type=C.args[0].args[0].id),P},create:function(C){return new x.type.Session(C)}};typeof pl<"u"?pl.exports=x:window.pl=x})()});function rme(e,t,r){e.prepend(r.map(o=>new Ta.default.type.State(t.goal.replace(o),t.substitution,t)))}function gH(e){let t=ime.get(e.session);if(t==null)throw new Error("Assertion failed: A project should have been registered for the active session");return t}function sme(e,t){ime.set(e,t),e.consult(`:- use_module(library(${Fgt.id})).`)}var dH,Ta,nme,c0,Qgt,kgt,ime,Fgt,ome=yt(()=>{Ye();dH=$e(f2()),Ta=$e(hH()),nme=$e(Ie("vm")),{is_atom:c0,is_variable:Qgt,is_instantiated_list:kgt}=Ta.default.type;ime=new WeakMap;Fgt=new Ta.default.type.Module("constraints",{["project_workspaces_by_descriptor/3"]:(e,t,r)=>{let[o,a,n]=r.args;if(!c0(o)||!c0(a)){e.throw_error(Ta.default.error.instantiation(r.indicator));return}let u=G.parseIdent(o.id),A=G.makeDescriptor(u,a.id),h=gH(e).tryWorkspaceByDescriptor(A);Qgt(n)&&h!==null&&rme(e,t,[new Ta.default.type.Term("=",[n,new Ta.default.type.Term(String(h.relativeCwd))])]),c0(n)&&h!==null&&h.relativeCwd===n.id&&e.success(t)},["workspace_field/3"]:(e,t,r)=>{let[o,a,n]=r.args;if(!c0(o)||!c0(a)){e.throw_error(Ta.default.error.instantiation(r.indicator));return}let A=gH(e).tryWorkspaceByCwd(o.id);if(A==null)return;let p=(0,dH.default)(A.manifest.raw,a.id);typeof p>"u"||rme(e,t,[new Ta.default.type.Term("=",[n,new Ta.default.type.Term(typeof p=="object"?JSON.stringify(p):p)])])},["workspace_field_test/3"]:(e,t,r)=>{let[o,a,n]=r.args;e.prepend([new Ta.default.type.State(t.goal.replace(new Ta.default.type.Term("workspace_field_test",[o,a,n,new Ta.default.type.Term("[]",[])])),t.substitution,t)])},["workspace_field_test/4"]:(e,t,r)=>{let[o,a,n,u]=r.args;if(!c0(o)||!c0(a)||!c0(n)||!kgt(u)){e.throw_error(Ta.default.error.instantiation(r.indicator));return}let p=gH(e).tryWorkspaceByCwd(o.id);if(p==null)return;let h=(0,dH.default)(p.manifest.raw,a.id);if(typeof h>"u")return;let w={$$:h};for(let[v,b]of u.toJavaScript().entries())w[`$${v}`]=b;nme.default.runInNewContext(n.id,w)&&e.success(t)}},["project_workspaces_by_descriptor/3","workspace_field/3","workspace_field_test/3","workspace_field_test/4"])});var v2={};Jt(v2,{Constraints:()=>B2,DependencyType:()=>ume});function to(e){if(e instanceof Bw.default.type.Num)return e.value;if(e instanceof Bw.default.type.Term)switch(e.indicator){case"throw/1":return to(e.args[0]);case"error/1":return to(e.args[0]);case"error/2":if(e.args[0]instanceof Bw.default.type.Term&&e.args[0].indicator==="syntax_error/1")return Object.assign(to(e.args[0]),...to(e.args[1]));{let t=to(e.args[0]);return t.message+=` (in ${to(e.args[1])})`,t}case"syntax_error/1":return new zt(43,`Syntax error: ${to(e.args[0])}`);case"existence_error/2":return new zt(44,`Existence error: ${to(e.args[0])} ${to(e.args[1])} not found`);case"instantiation_error/0":return new zt(75,"Instantiation error: an argument is variable when an instantiated argument was expected");case"line/1":return{line:to(e.args[0])};case"column/1":return{column:to(e.args[0])};case"found/1":return{found:to(e.args[0])};case"./2":return[to(e.args[0])].concat(to(e.args[1]));case"//2":return`${to(e.args[0])}/${to(e.args[1])}`;default:return e.id}throw`couldn't pretty print because of unsupported node ${e}`}function lme(e){let t;try{t=to(e)}catch(r){throw typeof r=="string"?new zt(42,`Unknown error: ${e} (note: ${r})`):r}return typeof t.line<"u"&&typeof t.column<"u"&&(t.message+=` at line ${t.line}, column ${t.column}`),t}function $d(e){return e.id==="null"?null:`${e.toJavaScript()}`}function Rgt(e){if(e.id==="null")return null;{let t=e.toJavaScript();if(typeof t!="string")return JSON.stringify(t);try{return JSON.stringify(JSON.parse(t))}catch{return JSON.stringify(t)}}}function u0(e){return typeof e=="string"?`'${e}'`:"[]"}var cme,Bw,ume,ame,mH,B2,D2=yt(()=>{Ye();Ye();St();cme=$e(_de()),Bw=$e(hH());w2();ome();(0,cme.default)(Bw.default);ume=(o=>(o.Dependencies="dependencies",o.DevDependencies="devDependencies",o.PeerDependencies="peerDependencies",o))(ume||{}),ame=["dependencies","devDependencies","peerDependencies"];mH=class{constructor(t,r){let o=1e3*t.workspaces.length;this.session=Bw.default.create(o),sme(this.session,t),this.session.consult(":- use_module(library(lists))."),this.session.consult(r)}fetchNextAnswer(){return new Promise(t=>{this.session.answer(r=>{t(r)})})}async*makeQuery(t){let r=this.session.query(t);if(r!==!0)throw lme(r);for(;;){let o=await this.fetchNextAnswer();if(o===null)throw new zt(79,"Resolution limit exceeded");if(!o)break;if(o.id==="throw")throw lme(o);yield o}}};B2=class{constructor(t){this.source="";this.project=t;let r=t.configuration.get("constraintsPath");ae.existsSync(r)&&(this.source=ae.readFileSync(r,"utf8"))}static async find(t){return new B2(t)}getProjectDatabase(){let t="";for(let r of ame)t+=`dependency_type(${r}).
273`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;t+=`workspace(${u0(o)}).
274`,t+=`workspace_ident(${u0(o)}, ${u0(G.stringifyIdent(r.anchoredLocator))}).
275`,t+=`workspace_version(${u0(o)}, ${u0(r.manifest.version)}).
276`;for(let a of ame)for(let n of r.manifest[a].values())t+=`workspace_has_dependency(${u0(o)}, ${u0(G.stringifyIdent(n))}, ${u0(n.range)}, ${a}).
277`}return t+=`workspace(_) :- false.
278`,t+=`workspace_ident(_, _) :- false.
279`,t+=`workspace_version(_, _) :- false.
280`,t+=`workspace_has_dependency(_, _, _, _) :- false.
281`,t}getDeclarations(){let t="";return t+=`gen_enforced_dependency(_, _, _, _) :- false.
282`,t+=`gen_enforced_field(_, _, _) :- false.
283`,t}get fullSource(){return`${this.getProjectDatabase()}
284${this.source}
285${this.getDeclarations()}`}createSession(){return new mH(this.project,this.fullSource)}async processClassic(){let t=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(t),enforcedFields:await this.genEnforcedFields(t)}}async process(){let{enforcedDependencies:t,enforcedFields:r}=await this.processClassic(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of t){let p=E2([A,G.stringifyIdent(n)]),h=_e.getMapWithDefault(o,a.cwd);_e.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=E2(n),p=_e.getMapWithDefault(o,a.cwd);_e.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(t){let r=[];for await(let o of t.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=J.resolve(this.project.cwd,$d(o.links.WorkspaceCwd)),n=$d(o.links.DependencyIdent),u=$d(o.links.DependencyRange),A=$d(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=G.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return _e.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({dependencyIdent:o})=>G.stringifyIdent(o)])}async genEnforcedFields(t){let r=[];for await(let o of t.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=J.resolve(this.project.cwd,$d(o.links.WorkspaceCwd)),n=$d(o.links.FieldPath),u=Rgt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return _e.sortMap(r,[({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({fieldPath:o})=>o])}async*query(t){let r=this.createSession();for await(let o of r.makeQuery(t)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=$d(u));yield a}}}});var yme=_(wQ=>{"use strict";Object.defineProperty(wQ,"__esModule",{value:!0});function H2(e){let t=[...e.caches],r=t.shift();return r===void 0?mme():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>H2({caches:t}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>H2({caches:t}).set(o,a))},delete(o){return r.delete(o).catch(()=>H2({caches:t}).delete(o))},clear(){return r.clear().catch(()=>H2({caches:t}).clear())}}}function mme(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}wQ.createFallbackableCache=H2;wQ.createNullCache=mme});var wme=_((uWt,Eme)=>{Eme.exports=yme()});var Cme=_(kH=>{"use strict";Object.defineProperty(kH,"__esModule",{value:!0});function Zgt(e={serializable:!0}){let t={};return{get(r,o,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);let u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}kH.createInMemoryCache=Zgt});var Bme=_((fWt,Ime)=>{Ime.exports=Cme()});var Dme=_(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});function $gt(e,t,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===FH.WithinHeaders?o:{}},queryParameters(){return e===FH.WithinQueryParameters?o:{}}}}function edt(e){let t=0,r=()=>(t++,new Promise(o=>{setTimeout(()=>{o(e(r))},Math.min(100*t,1e3))}));return e(r)}function vme(e,t=(r,o)=>Promise.resolve()){return Object.assign(e,{wait(r){return vme(e.then(o=>Promise.all([t(o,r),o])).then(o=>o[1]))}})}function tdt(e){let t=e.length-1;for(t;t>0;t--){let r=Math.floor(Math.random()*(t+1)),o=e[t];e[t]=e[r],e[r]=o}return e}function rdt(e,t){return t&&Object.keys(t).forEach(r=>{e[r]=t[r](e)}),e}function ndt(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}var idt="4.14.2",sdt=e=>()=>e.transporter.requester.destroy(),FH={WithinQueryParameters:0,WithinHeaders:1};eu.AuthMode=FH;eu.addMethods=rdt;eu.createAuth=$gt;eu.createRetryablePromise=edt;eu.createWaitablePromise=vme;eu.destroy=sdt;eu.encode=ndt;eu.shuffle=tdt;eu.version=idt});var j2=_((hWt,Sme)=>{Sme.exports=Dme()});var Pme=_(RH=>{"use strict";Object.defineProperty(RH,"__esModule",{value:!0});var odt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};RH.MethodEnum=odt});var q2=_((dWt,xme)=>{xme.exports=Pme()});var qme=_(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});var Qme=q2();function TH(e,t){let r=e||{},o=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(o[a]=r[a])}),{data:Object.entries(o).length>0?o:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var G2={Read:1,Write:2,Any:3},Pw={Up:1,Down:2,Timeouted:3},kme=2*60*1e3;function LH(e,t=Pw.Up){return{...e,status:t,lastUpdate:Date.now()}}function Fme(e){return e.status===Pw.Up||Date.now()-e.lastUpdate>kme}function Rme(e){return e.status===Pw.Timeouted&&Date.now()-e.lastUpdate<=kme}function OH(e){return typeof e=="string"?{protocol:"https",url:e,accept:G2.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||G2.Any}}function adt(e,t){return Promise.all(t.map(r=>e.get(r,()=>Promise.resolve(LH(r))))).then(r=>{let o=r.filter(A=>Fme(A)),a=r.filter(A=>Rme(A)),n=[...o,...a],u=n.length>0?n.map(A=>OH(A)):t;return{getTimeout(A,p){return(a.length===0&&A===0?1:a.length+3+A)*p},statelessHosts:u}})}var ldt=({isTimedOut:e,status:t})=>!e&&~~t===0,cdt=e=>{let t=e.status;return e.isTimedOut||ldt(e)||~~(t/100)!==2&&~~(t/100)!==4},udt=({status:e})=>~~(e/100)===2,Adt=(e,t)=>cdt(e)?t.onRetry(e):udt(e)?t.onSuccess(e):t.onFail(e);function bme(e,t,r,o){let a=[],n=Mme(r,o),u=Ume(e,o),A=r.method,p=r.method!==Qme.MethodEnum.Get?{}:{...r.data,...o.data},h={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...p,...o.queryParameters},w=0,I=(v,b)=>{let E=v.pop();if(E===void 0)throw jme(NH(a));let R={data:n,headers:u,method:A,url:Lme(E,r.path,h),connectTimeout:b(w,e.timeouts.connect),responseTimeout:b(w,o.timeout)},N=V=>{let ee={request:R,response:V,host:E,triesLeft:v.length};return a.push(ee),ee},U={onSuccess:V=>Tme(V),onRetry(V){let ee=N(V);return V.isTimedOut&&w++,Promise.all([e.logger.info("Retryable failure",MH(ee)),e.hostsCache.set(E,LH(E,V.isTimedOut?Pw.Timeouted:Pw.Down))]).then(()=>I(v,b))},onFail(V){throw N(V),Nme(V,NH(a))}};return e.requester.send(R).then(V=>Adt(V,U))};return adt(e.hostsCache,t).then(v=>I([...v.statelessHosts].reverse(),v.getTimeout))}function fdt(e){let{hostsCache:t,logger:r,requester:o,requestsCache:a,responsesCache:n,timeouts:u,userAgent:A,hosts:p,queryParameters:h,headers:w}=e,I={hostsCache:t,logger:r,requester:o,requestsCache:a,responsesCache:n,timeouts:u,userAgent:A,headers:w,queryParameters:h,hosts:p.map(v=>OH(v)),read(v,b){let E=TH(b,I.timeouts.read),R=()=>bme(I,I.hosts.filter(V=>(V.accept&G2.Read)!==0),v,E);if((E.cacheable!==void 0?E.cacheable:v.cacheable)!==!0)return R();let U={request:v,mappedRequestOptions:E,transporter:{queryParameters:I.queryParameters,headers:I.headers}};return I.responsesCache.get(U,()=>I.requestsCache.get(U,()=>I.requestsCache.set(U,R()).then(V=>Promise.all([I.requestsCache.delete(U),V]),V=>Promise.all([I.requestsCache.delete(U),Promise.reject(V)])).then(([V,ee])=>ee)),{miss:V=>I.responsesCache.set(U,V)})},write(v,b){return bme(I,I.hosts.filter(E=>(E.accept&G2.Write)!==0),v,TH(b,I.timeouts.write))}};return I}function pdt(e){let t={value:`Algolia for JavaScript (${e})`,add(r){let o=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return t.value.indexOf(o)===-1&&(t.value=`${t.value}${o}`),t}};return t}function Tme(e){try{return JSON.parse(e.content)}catch(t){throw Hme(t.message,e)}}function Nme({content:e,status:t},r){let o=e;try{o=JSON.parse(e).message}catch{}return _me(o,t,r)}function hdt(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}function Lme(e,t,r){let o=Ome(r),a=`${e.protocol}://${e.url}/${t.charAt(0)==="/"?t.substr(1):t}`;return o.length&&(a+=`?${o}`),a}function Ome(e){let t=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(e).map(r=>hdt("%s=%s",r,t(e[r])?JSON.stringify(e[r]):e[r])).join("&")}function Mme(e,t){if(e.method===Qme.MethodEnum.Get||e.data===void 0&&t.data===void 0)return;let r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}function Ume(e,t){let r={...e.headers,...t.headers},o={};return Object.keys(r).forEach(a=>{let n=r[a];o[a.toLowerCase()]=n}),o}function NH(e){return e.map(t=>MH(t))}function MH(e){let t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function _me(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}function Hme(e,t){return{name:"DeserializationError",message:e,response:t}}function jme(e){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:e}}Fi.CallEnum=G2;Fi.HostStatusEnum=Pw;Fi.createApiError=_me;Fi.createDeserializationError=Hme;Fi.createMappedRequestOptions=TH;Fi.createRetryError=jme;Fi.createStatefulHost=LH;Fi.createStatelessHost=OH;Fi.createTransporter=fdt;Fi.createUserAgent=pdt;Fi.deserializeFailure=Nme;Fi.deserializeSuccess=Tme;Fi.isStatefulHostTimeouted=Rme;Fi.isStatefulHostUp=Fme;Fi.serializeData=Mme;Fi.serializeHeaders=Ume;Fi.serializeQueryParameters=Ome;Fi.serializeUrl=Lme;Fi.stackFrameWithoutCredentials=MH;Fi.stackTraceWithoutCredentials=NH});var Y2=_((yWt,Gme)=>{Gme.exports=qme()});var Yme=_(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});var xw=j2(),gdt=Y2(),W2=q2(),ddt=e=>{let t=e.region||"us",r=xw.createAuth(xw.AuthMode.WithinHeaders,e.appId,e.apiKey),o=gdt.createTransporter({hosts:[{url:`analytics.${t}.algolia.com`}],...e,headers:{...r.headers(),"content-type":"application/json",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),a=e.appId;return xw.addMethods({appId:a,transporter:o},e.methods)},mdt=e=>(t,r)=>e.transporter.write({method:W2.MethodEnum.Post,path:"2/abtests",data:t},r),ydt=e=>(t,r)=>e.transporter.write({method:W2.MethodEnum.Delete,path:xw.encode("2/abtests/%s",t)},r),Edt=e=>(t,r)=>e.transporter.read({method:W2.MethodEnum.Get,path:xw.encode("2/abtests/%s",t)},r),wdt=e=>t=>e.transporter.read({method:W2.MethodEnum.Get,path:"2/abtests"},t),Cdt=e=>(t,r)=>e.transporter.write({method:W2.MethodEnum.Post,path:xw.encode("2/abtests/%s/stop",t)},r);d0.addABTest=mdt;d0.createAnalyticsClient=ddt;d0.deleteABTest=ydt;d0.getABTest=Edt;d0.getABTests=wdt;d0.stopABTest=Cdt});var Kme=_((wWt,Wme)=>{Wme.exports=Yme()});var Vme=_(K2=>{"use strict";Object.defineProperty(K2,"__esModule",{value:!0});var UH=j2(),Idt=Y2(),Jme=q2(),Bdt=e=>{let t=e.region||"us",r=UH.createAuth(UH.AuthMode.WithinHeaders,e.appId,e.apiKey),o=Idt.createTransporter({hosts:[{url:`personalization.${t}.algolia.com`}],...e,headers:{...r.headers(),"content-type":"application/json",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}});return UH.addMethods({appId:e.appId,transporter:o},e.methods)},vdt=e=>t=>e.transporter.read({method:Jme.MethodEnum.Get,path:"1/strategies/personalization"},t),Ddt=e=>(t,r)=>e.transporter.write({method:Jme.MethodEnum.Post,path:"1/strategies/personalization",data:t},r);K2.createPersonalizationClient=Bdt;K2.getPersonalizationStrategy=vdt;K2.setPersonalizationStrategy=Ddt});var Xme=_((IWt,zme)=>{zme.exports=Vme()});var Aye=_(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});var Gt=j2(),Na=Y2(),Cr=q2(),Sdt=Ie("crypto");function CQ(e){let t=r=>e.request(r).then(o=>{if(e.batch!==void 0&&e.batch(o.hits),!e.shouldStop(o))return o.cursor?t({cursor:o.cursor}):t({page:(r.page||0)+1})});return t({})}var Pdt=e=>{let t=e.appId,r=Gt.createAuth(e.authMode!==void 0?e.authMode:Gt.AuthMode.WithinHeaders,t,e.apiKey),o=Na.createTransporter({hosts:[{url:`${t}-dsn.algolia.net`,accept:Na.CallEnum.Read},{url:`${t}.algolia.net`,accept:Na.CallEnum.Write}].concat(Gt.shuffle([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),a={transporter:o,appId:t,addAlgoliaAgent(n,u){o.userAgent.add({segment:n,version:u})},clearCache(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(()=>{})}};return Gt.addMethods(a,e.methods)};function Zme(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function $me(){return{name:"ObjectNotFoundError",message:"Object not found."}}function eye(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var xdt=e=>(t,r)=>{let{queryParameters:o,...a}=r||{},n={acl:t,...o!==void 0?{queryParameters:o}:{}},u=(A,p)=>Gt.createRetryablePromise(h=>J2(e)(A.key,p).catch(w=>{if(w.status!==404)throw w;return h()}));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:"1/keys",data:n},a),u)},bdt=e=>(t,r,o)=>{let a=Na.createMappedRequestOptions(o);return a.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:Cr.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:r}},a)},Qdt=e=>(t,r,o)=>e.transporter.write({method:Cr.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:t,cluster:r}},o),kdt=e=>(t,r)=>Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},r),(o,a)=>bw(e)(o.taskID,a)),IQ=e=>(t,r,o)=>{let a=(n,u)=>V2(e)(t,{methods:{waitTask:Xi}}).waitTask(n.taskID,u);return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/operation",t),data:{operation:"copy",destination:r}},o),a)},Fdt=e=>(t,r,o)=>IQ(e)(t,r,{...o,scope:[vQ.Rules]}),Rdt=e=>(t,r,o)=>IQ(e)(t,r,{...o,scope:[vQ.Settings]}),Tdt=e=>(t,r,o)=>IQ(e)(t,r,{...o,scope:[vQ.Synonyms]}),Ndt=e=>(t,r)=>t.method===Cr.MethodEnum.Get?e.transporter.read(t,r):e.transporter.write(t,r),Ldt=e=>(t,r)=>{let o=(a,n)=>Gt.createRetryablePromise(u=>J2(e)(t,n).then(u).catch(A=>{if(A.status!==404)throw A}));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Delete,path:Gt.encode("1/keys/%s",t)},r),o)},Odt=e=>(t,r,o)=>{let a=r.map(n=>({action:"deleteEntry",body:{objectID:n}}));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!1,requests:a}},o),(n,u)=>bw(e)(n.taskID,u))},Mdt=()=>(e,t)=>{let r=Na.serializeQueryParameters(t),o=Sdt.createHmac("sha256",e).update(r).digest("hex");return Buffer.from(o+r).toString("base64")},J2=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/keys/%s",t)},r),tye=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/task/%s",t.toString())},r),Udt=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:"/1/dictionaries/*/settings"},t),_dt=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:"1/logs"},t),Hdt=()=>e=>{let t=Buffer.from(e,"base64").toString("ascii"),r=/validUntil=(\d+)/,o=t.match(r);if(o===null)throw eye();return parseInt(o[1],10)-Math.round(new Date().getTime()/1e3)},jdt=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:"1/clusters/mapping/top"},t),qdt=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/clusters/mapping/%s",t)},r),Gdt=e=>t=>{let{retrieveMappings:r,...o}=t||{};return r===!0&&(o.getClusters=!0),e.transporter.read({method:Cr.MethodEnum.Get,path:"1/clusters/mapping/pending"},o)},V2=e=>(t,r={})=>{let o={transporter:e.transporter,appId:e.appId,indexName:t};return Gt.addMethods(o,r.methods)},Ydt=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:"1/keys"},t),Wdt=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:"1/clusters"},t),Kdt=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:"1/indexes"},t),Jdt=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:"1/clusters/mapping"},t),Vdt=e=>(t,r,o)=>{let a=(n,u)=>V2(e)(t,{methods:{waitTask:Xi}}).waitTask(n.taskID,u);return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/operation",t),data:{operation:"move",destination:r}},o),a)},zdt=e=>(t,r)=>{let o=(a,n)=>Promise.all(Object.keys(a.taskID).map(u=>V2(e)(u,{methods:{waitTask:Xi}}).waitTask(a.taskID[u],n)));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:t}},r),o)},Xdt=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:t}},r),Zdt=e=>(t,r)=>{let o=t.map(a=>({...a,params:Na.serializeQueryParameters(a.params||{})}));return e.transporter.read({method:Cr.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:o},cacheable:!0},r)},$dt=e=>(t,r)=>Promise.all(t.map(o=>{let{facetName:a,facetQuery:n,...u}=o.params;return V2(e)(o.indexName,{methods:{searchForFacetValues:lye}}).searchForFacetValues(a,n,{...r,...u})})),emt=e=>(t,r)=>{let o=Na.createMappedRequestOptions(r);return o.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:Cr.MethodEnum.Delete,path:"1/clusters/mapping"},o)},tmt=e=>(t,r,o)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!0,requests:a}},o),(n,u)=>bw(e)(n.taskID,u))},rmt=e=>(t,r)=>{let o=(a,n)=>Gt.createRetryablePromise(u=>J2(e)(t,n).catch(A=>{if(A.status!==404)throw A;return u()}));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/keys/%s/restore",t)},r),o)},nmt=e=>(t,r,o)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!1,requests:a}},o),(n,u)=>bw(e)(n.taskID,u))},imt=e=>(t,r,o)=>e.transporter.read({method:Cr.MethodEnum.Post,path:Gt.encode("/1/dictionaries/%s/search",t),data:{query:r},cacheable:!0},o),smt=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:t}},r),omt=e=>(t,r)=>Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Put,path:"/1/dictionaries/*/settings",data:t},r),(o,a)=>bw(e)(o.taskID,a)),amt=e=>(t,r)=>{let o=Object.assign({},r),{queryParameters:a,...n}=r||{},u=a?{queryParameters:a}:{},A=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],p=w=>Object.keys(o).filter(I=>A.indexOf(I)!==-1).every(I=>w[I]===o[I]),h=(w,I)=>Gt.createRetryablePromise(v=>J2(e)(t,I).then(b=>p(b)?Promise.resolve():v()));return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Put,path:Gt.encode("1/keys/%s",t),data:u},n),h)},bw=e=>(t,r)=>Gt.createRetryablePromise(o=>tye(e)(t,r).then(a=>a.status!=="published"?o():void 0)),rye=e=>(t,r)=>{let o=(a,n)=>Xi(e)(a.taskID,n);return Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/batch",e.indexName),data:{requests:t}},r),o)},lmt=e=>t=>CQ({shouldStop:r=>r.cursor===void 0,...t,request:r=>e.transporter.read({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/browse",e.indexName),data:r},t)}),cmt=e=>t=>{let r={hitsPerPage:1e3,...t};return CQ({shouldStop:o=>o.hits.length<r.hitsPerPage,...r,request(o){return cye(e)("",{...r,...o}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},umt=e=>t=>{let r={hitsPerPage:1e3,...t};return CQ({shouldStop:o=>o.hits.length<r.hitsPerPage,...r,request(o){return uye(e)("",{...r,...o}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},BQ=e=>(t,r,o)=>{let{batchSize:a,...n}=o||{},u={taskIDs:[],objectIDs:[]},A=(p=0)=>{let h=[],w;for(w=p;w<t.length&&(h.push(t[w]),h.length!==(a||1e3));w++);return h.length===0?Promise.resolve(u):rye(e)(h.map(I=>({action:r,body:I})),n).then(I=>(u.objectIDs=u.objectIDs.concat(I.objectIDs),u.taskIDs.push(I.taskID),w++,A(w)))};return Gt.createWaitablePromise(A(),(p,h)=>Promise.all(p.taskIDs.map(w=>Xi(e)(w,h))))},Amt=e=>t=>Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/clear",e.indexName)},t),(r,o)=>Xi(e)(r.taskID,o)),fmt=e=>t=>{let{forwardToReplicas:r,...o}=t||{},a=Na.createMappedRequestOptions(o);return r&&(a.queryParameters.forwardToReplicas=1),Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/rules/clear",e.indexName)},a),(n,u)=>Xi(e)(n.taskID,u))},pmt=e=>t=>{let{forwardToReplicas:r,...o}=t||{},a=Na.createMappedRequestOptions(o);return r&&(a.queryParameters.forwardToReplicas=1),Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/synonyms/clear",e.indexName)},a),(n,u)=>Xi(e)(n.taskID,u))},hmt=e=>(t,r)=>Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/deleteByQuery",e.indexName),data:t},r),(o,a)=>Xi(e)(o.taskID,a)),gmt=e=>t=>Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Delete,path:Gt.encode("1/indexes/%s",e.indexName)},t),(r,o)=>Xi(e)(r.taskID,o)),dmt=e=>(t,r)=>Gt.createWaitablePromise(nye(e)([t],r).then(o=>({taskID:o.taskIDs[0]})),(o,a)=>Xi(e)(o.taskID,a)),nye=e=>(t,r)=>{let o=t.map(a=>({objectID:a}));return BQ(e)(o,rm.DeleteObject,r)},mmt=e=>(t,r)=>{let{forwardToReplicas:o,...a}=r||{},n=Na.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Delete,path:Gt.encode("1/indexes/%s/rules/%s",e.indexName,t)},n),(u,A)=>Xi(e)(u.taskID,A))},ymt=e=>(t,r)=>{let{forwardToReplicas:o,...a}=r||{},n=Na.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Delete,path:Gt.encode("1/indexes/%s/synonyms/%s",e.indexName,t)},n),(u,A)=>Xi(e)(u.taskID,A))},Emt=e=>t=>iye(e)(t).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),wmt=e=>(t,r,o)=>e.transporter.read({method:Cr.MethodEnum.Post,path:Gt.encode("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},o),Cmt=e=>(t,r)=>{let{query:o,paginate:a,...n}=r||{},u=0,A=()=>aye(e)(o||"",{...n,page:u}).then(p=>{for(let[h,w]of Object.entries(p.hits))if(t(w))return{object:w,position:parseInt(h,10),page:u};if(u++,a===!1||u>=p.nbPages)throw $me();return A()});return A()},Imt=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/indexes/%s/%s",e.indexName,t)},r),Bmt=()=>(e,t)=>{for(let[r,o]of Object.entries(e.hits))if(o.objectID===t)return parseInt(r,10);return-1},vmt=e=>(t,r)=>{let{attributesToRetrieve:o,...a}=r||{},n=t.map(u=>({indexName:e.indexName,objectID:u,...o?{attributesToRetrieve:o}:{}}));return e.transporter.read({method:Cr.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:n}},a)},Dmt=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/indexes/%s/rules/%s",e.indexName,t)},r),iye=e=>t=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/indexes/%s/settings",e.indexName),data:{getVersion:2}},t),Smt=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/indexes/%s/synonyms/%s",e.indexName,t)},r),sye=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Get,path:Gt.encode("1/indexes/%s/task/%s",e.indexName,t.toString())},r),Pmt=e=>(t,r)=>Gt.createWaitablePromise(oye(e)([t],r).then(o=>({objectID:o.objectIDs[0],taskID:o.taskIDs[0]})),(o,a)=>Xi(e)(o.taskID,a)),oye=e=>(t,r)=>{let{createIfNotExists:o,...a}=r||{},n=o?rm.PartialUpdateObject:rm.PartialUpdateObjectNoCreate;return BQ(e)(t,n,a)},xmt=e=>(t,r)=>{let{safe:o,autoGenerateObjectIDIfNotExist:a,batchSize:n,...u}=r||{},A=(E,R,N,U)=>Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/operation",E),data:{operation:N,destination:R}},U),(V,ee)=>Xi(e)(V.taskID,ee)),p=Math.random().toString(36).substring(7),h=`${e.indexName}_tmp_${p}`,w=_H({appId:e.appId,transporter:e.transporter,indexName:h}),I=[],v=A(e.indexName,h,"copy",{...u,scope:["settings","synonyms","rules"]});I.push(v);let b=(o?v.wait(u):v).then(()=>{let E=w(t,{...u,autoGenerateObjectIDIfNotExist:a,batchSize:n});return I.push(E),o?E.wait(u):E}).then(()=>{let E=A(h,e.indexName,"move",u);return I.push(E),o?E.wait(u):E}).then(()=>Promise.all(I)).then(([E,R,N])=>({objectIDs:R.objectIDs,taskIDs:[E.taskID,...R.taskIDs,N.taskID]}));return Gt.createWaitablePromise(b,(E,R)=>Promise.all(I.map(N=>N.wait(R))))},bmt=e=>(t,r)=>HH(e)(t,{...r,clearExistingRules:!0}),Qmt=e=>(t,r)=>jH(e)(t,{...r,clearExistingSynonyms:!0}),kmt=e=>(t,r)=>Gt.createWaitablePromise(_H(e)([t],r).then(o=>({objectID:o.objectIDs[0],taskID:o.taskIDs[0]})),(o,a)=>Xi(e)(o.taskID,a)),_H=e=>(t,r)=>{let{autoGenerateObjectIDIfNotExist:o,...a}=r||{},n=o?rm.AddObject:rm.UpdateObject;if(n===rm.UpdateObject){for(let u of t)if(u.objectID===void 0)return Gt.createWaitablePromise(Promise.reject(Zme()))}return BQ(e)(t,n,a)},Fmt=e=>(t,r)=>HH(e)([t],r),HH=e=>(t,r)=>{let{forwardToReplicas:o,clearExistingRules:a,...n}=r||{},u=Na.createMappedRequestOptions(n);return o&&(u.queryParameters.forwardToReplicas=1),a&&(u.queryParameters.clearExistingRules=1),Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/rules/batch",e.indexName),data:t},u),(A,p)=>Xi(e)(A.taskID,p))},Rmt=e=>(t,r)=>jH(e)([t],r),jH=e=>(t,r)=>{let{forwardToReplicas:o,clearExistingSynonyms:a,replaceExistingSynonyms:n,...u}=r||{},A=Na.createMappedRequestOptions(u);return o&&(A.queryParameters.forwardToReplicas=1),(n||a)&&(A.queryParameters.replaceExistingSynonyms=1),Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/synonyms/batch",e.indexName),data:t},A),(p,h)=>Xi(e)(p.taskID,h))},aye=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),lye=e=>(t,r,o)=>e.transporter.read({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},o),cye=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/rules/search",e.indexName),data:{query:t}},r),uye=e=>(t,r)=>e.transporter.read({method:Cr.MethodEnum.Post,path:Gt.encode("1/indexes/%s/synonyms/search",e.indexName),data:{query:t}},r),Tmt=e=>(t,r)=>{let{forwardToReplicas:o,...a}=r||{},n=Na.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),Gt.createWaitablePromise(e.transporter.write({method:Cr.MethodEnum.Put,path:Gt.encode("1/indexes/%s/settings",e.indexName),data:t},n),(u,A)=>Xi(e)(u.taskID,A))},Xi=e=>(t,r)=>Gt.createRetryablePromise(o=>sye(e)(t,r).then(a=>a.status!=="published"?o():void 0)),Nmt={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Personalization:"personalization",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},rm={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},vQ={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Lmt={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Omt={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};Ft.ApiKeyACLEnum=Nmt;Ft.BatchActionEnum=rm;Ft.ScopeEnum=vQ;Ft.StrategyEnum=Lmt;Ft.SynonymEnum=Omt;Ft.addApiKey=xdt;Ft.assignUserID=bdt;Ft.assignUserIDs=Qdt;Ft.batch=rye;Ft.browseObjects=lmt;Ft.browseRules=cmt;Ft.browseSynonyms=umt;Ft.chunkedBatch=BQ;Ft.clearDictionaryEntries=kdt;Ft.clearObjects=Amt;Ft.clearRules=fmt;Ft.clearSynonyms=pmt;Ft.copyIndex=IQ;Ft.copyRules=Fdt;Ft.copySettings=Rdt;Ft.copySynonyms=Tdt;Ft.createBrowsablePromise=CQ;Ft.createMissingObjectIDError=Zme;Ft.createObjectNotFoundError=$me;Ft.createSearchClient=Pdt;Ft.createValidUntilNotFoundError=eye;Ft.customRequest=Ndt;Ft.deleteApiKey=Ldt;Ft.deleteBy=hmt;Ft.deleteDictionaryEntries=Odt;Ft.deleteIndex=gmt;Ft.deleteObject=dmt;Ft.deleteObjects=nye;Ft.deleteRule=mmt;Ft.deleteSynonym=ymt;Ft.exists=Emt;Ft.findAnswers=wmt;Ft.findObject=Cmt;Ft.generateSecuredApiKey=Mdt;Ft.getApiKey=J2;Ft.getAppTask=tye;Ft.getDictionarySettings=Udt;Ft.getLogs=_dt;Ft.getObject=Imt;Ft.getObjectPosition=Bmt;Ft.getObjects=vmt;Ft.getRule=Dmt;Ft.getSecuredApiKeyRemainingValidity=Hdt;Ft.getSettings=iye;Ft.getSynonym=Smt;Ft.getTask=sye;Ft.getTopUserIDs=jdt;Ft.getUserID=qdt;Ft.hasPendingMappings=Gdt;Ft.initIndex=V2;Ft.listApiKeys=Ydt;Ft.listClusters=Wdt;Ft.listIndices=Kdt;Ft.listUserIDs=Jdt;Ft.moveIndex=Vdt;Ft.multipleBatch=zdt;Ft.multipleGetObjects=Xdt;Ft.multipleQueries=Zdt;Ft.multipleSearchForFacetValues=$dt;Ft.partialUpdateObject=Pmt;Ft.partialUpdateObjects=oye;Ft.removeUserID=emt;Ft.replaceAllObjects=xmt;Ft.replaceAllRules=bmt;Ft.replaceAllSynonyms=Qmt;Ft.replaceDictionaryEntries=tmt;Ft.restoreApiKey=rmt;Ft.saveDictionaryEntries=nmt;Ft.saveObject=kmt;Ft.saveObjects=_H;Ft.saveRule=Fmt;Ft.saveRules=HH;Ft.saveSynonym=Rmt;Ft.saveSynonyms=jH;Ft.search=aye;Ft.searchDictionaryEntries=imt;Ft.searchForFacetValues=lye;Ft.searchRules=cye;Ft.searchSynonyms=uye;Ft.searchUserIDs=smt;Ft.setDictionarySettings=omt;Ft.setSettings=Tmt;Ft.updateApiKey=amt;Ft.waitAppTask=bw;Ft.waitTask=Xi});var pye=_((vWt,fye)=>{fye.exports=Aye()});var hye=_(DQ=>{"use strict";Object.defineProperty(DQ,"__esModule",{value:!0});function Mmt(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var Umt={Debug:1,Info:2,Error:3};DQ.LogLevelEnum=Umt;DQ.createNullLogger=Mmt});var dye=_((SWt,gye)=>{gye.exports=hye()});var wye=_(qH=>{"use strict";Object.defineProperty(qH,"__esModule",{value:!0});var mye=Ie("http"),yye=Ie("https"),_mt=Ie("url"),Eye={keepAlive:!0},Hmt=new mye.Agent(Eye),jmt=new yye.Agent(Eye);function qmt({agent:e,httpAgent:t,httpsAgent:r,requesterOptions:o={}}={}){let a=t||e||Hmt,n=r||e||jmt;return{send(u){return new Promise(A=>{let p=_mt.parse(u.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,w={...o,agent:p.protocol==="https:"?n:a,hostname:p.hostname,path:h,method:u.method,headers:{...o&&o.headers?o.headers:{},...u.headers},...p.port!==void 0?{port:p.port||""}:{}},I=(p.protocol==="https:"?yye:mye).request(w,R=>{let N=[];R.on("data",U=>{N=N.concat(U)}),R.on("end",()=>{clearTimeout(b),clearTimeout(E),A({status:R.statusCode||0,content:Buffer.concat(N).toString(),isTimedOut:!1})})}),v=(R,N)=>setTimeout(()=>{I.abort(),A({status:0,content:N,isTimedOut:!0})},R*1e3),b=v(u.connectTimeout,"Connection timeout"),E;I.on("error",R=>{clearTimeout(b),clearTimeout(E),A({status:0,content:R.message,isTimedOut:!1})}),I.once("response",()=>{clearTimeout(b),E=v(u.responseTimeout,"Socket timeout")}),u.data!==void 0&&I.write(u.data),I.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}qH.createNodeHttpRequester=qmt});var Iye=_((xWt,Cye)=>{Cye.exports=wye()});var Sye=_((bWt,Dye)=>{"use strict";var Bye=wme(),Gmt=Bme(),Qw=Kme(),YH=j2(),GH=Xme(),Mt=pye(),Ymt=dye(),Wmt=Iye(),Kmt=Y2();function vye(e,t,r){let o={appId:e,apiKey:t,timeouts:{connect:2,read:5,write:30},requester:Wmt.createNodeHttpRequester(),logger:Ymt.createNullLogger(),responsesCache:Bye.createNullCache(),requestsCache:Bye.createNullCache(),hostsCache:Gmt.createInMemoryCache(),userAgent:Kmt.createUserAgent(YH.version).add({segment:"Node.js",version:process.versions.node})},a={...o,...r},n=()=>u=>GH.createPersonalizationClient({...o,...u,methods:{getPersonalizationStrategy:GH.getPersonalizationStrategy,setPersonalizationStrategy:GH.setPersonalizationStrategy}});return Mt.createSearchClient({...a,methods:{search:Mt.multipleQueries,searchForFacetValues:Mt.multipleSearchForFacetValues,multipleBatch:Mt.multipleBatch,multipleGetObjects:Mt.multipleGetObjects,multipleQueries:Mt.multipleQueries,copyIndex:Mt.copyIndex,copySettings:Mt.copySettings,copyRules:Mt.copyRules,copySynonyms:Mt.copySynonyms,moveIndex:Mt.moveIndex,listIndices:Mt.listIndices,getLogs:Mt.getLogs,listClusters:Mt.listClusters,multipleSearchForFacetValues:Mt.multipleSearchForFacetValues,getApiKey:Mt.getApiKey,addApiKey:Mt.addApiKey,listApiKeys:Mt.listApiKeys,updateApiKey:Mt.updateApiKey,deleteApiKey:Mt.deleteApiKey,restoreApiKey:Mt.restoreApiKey,assignUserID:Mt.assignUserID,assignUserIDs:Mt.assignUserIDs,getUserID:Mt.getUserID,searchUserIDs:Mt.searchUserIDs,listUserIDs:Mt.listUserIDs,getTopUserIDs:Mt.getTopUserIDs,removeUserID:Mt.removeUserID,hasPendingMappings:Mt.hasPendingMappings,generateSecuredApiKey:Mt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:Mt.getSecuredApiKeyRemainingValidity,destroy:YH.destroy,clearDictionaryEntries:Mt.clearDictionaryEntries,deleteDictionaryEntries:Mt.deleteDictionaryEntries,getDictionarySettings:Mt.getDictionarySettings,getAppTask:Mt.getAppTask,replaceDictionaryEntries:Mt.replaceDictionaryEntries,saveDictionaryEntries:Mt.saveDictionaryEntries,searchDictionaryEntries:Mt.searchDictionaryEntries,setDictionarySettings:Mt.setDictionarySettings,waitAppTask:Mt.waitAppTask,customRequest:Mt.customRequest,initIndex:u=>A=>Mt.initIndex(u)(A,{methods:{batch:Mt.batch,delete:Mt.deleteIndex,findAnswers:Mt.findAnswers,getObject:Mt.getObject,getObjects:Mt.getObjects,saveObject:Mt.saveObject,saveObjects:Mt.saveObjects,search:Mt.search,searchForFacetValues:Mt.searchForFacetValues,waitTask:Mt.waitTask,setSettings:Mt.setSettings,getSettings:Mt.getSettings,partialUpdateObject:Mt.partialUpdateObject,partialUpdateObjects:Mt.partialUpdateObjects,deleteObject:Mt.deleteObject,deleteObjects:Mt.deleteObjects,deleteBy:Mt.deleteBy,clearObjects:Mt.clearObjects,browseObjects:Mt.browseObjects,getObjectPosition:Mt.getObjectPosition,findObject:Mt.findObject,exists:Mt.exists,saveSynonym:Mt.saveSynonym,saveSynonyms:Mt.saveSynonyms,getSynonym:Mt.getSynonym,searchSynonyms:Mt.searchSynonyms,browseSynonyms:Mt.browseSynonyms,deleteSynonym:Mt.deleteSynonym,clearSynonyms:Mt.clearSynonyms,replaceAllObjects:Mt.replaceAllObjects,replaceAllSynonyms:Mt.replaceAllSynonyms,searchRules:Mt.searchRules,getRule:Mt.getRule,deleteRule:Mt.deleteRule,saveRule:Mt.saveRule,saveRules:Mt.saveRules,replaceAllRules:Mt.replaceAllRules,browseRules:Mt.browseRules,clearRules:Mt.clearRules}}),initAnalytics:()=>u=>Qw.createAnalyticsClient({...o,...u,methods:{addABTest:Qw.addABTest,getABTest:Qw.getABTest,getABTests:Qw.getABTests,stopABTest:Qw.stopABTest,deleteABTest:Qw.deleteABTest}}),initPersonalization:n,initRecommendation:()=>u=>(a.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),n()(u))}})}vye.version=YH.version;Dye.exports=vye});var KH=_((QWt,WH)=>{var Pye=Sye();WH.exports=Pye;WH.exports.default=Pye});var zH=_((FWt,Qye)=>{"use strict";var bye=Object.getOwnPropertySymbols,Vmt=Object.prototype.hasOwnProperty,zmt=Object.prototype.propertyIsEnumerable;function Xmt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Zmt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(t).map(function(n){return t[n]});if(o.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Qye.exports=Zmt()?Object.assign:function(e,t){for(var r,o=Xmt(e),a,n=1;n<arguments.length;n++){r=Object(arguments[n]);for(var u in r)Vmt.call(r,u)&&(o[u]=r[u]);if(bye){a=bye(r);for(var A=0;A<a.length;A++)zmt.call(r,a[A])&&(o[a[A]]=r[a[A]])}}return o}});var jye=_(Tn=>{"use strict";var t6=zH(),tu=typeof Symbol=="function"&&Symbol.for,z2=tu?Symbol.for("react.element"):60103,$mt=tu?Symbol.for("react.portal"):60106,eyt=tu?Symbol.for("react.fragment"):60107,tyt=tu?Symbol.for("react.strict_mode"):60108,ryt=tu?Symbol.for("react.profiler"):60114,nyt=tu?Symbol.for("react.provider"):60109,iyt=tu?Symbol.for("react.context"):60110,syt=tu?Symbol.for("react.forward_ref"):60112,oyt=tu?Symbol.for("react.suspense"):60113,ayt=tu?Symbol.for("react.memo"):60115,lyt=tu?Symbol.for("react.lazy"):60116,kye=typeof Symbol=="function"&&Symbol.iterator;function X2(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Fye={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rye={};function kw(e,t,r){this.props=e,this.context=t,this.refs=Rye,this.updater=r||Fye}kw.prototype.isReactComponent={};kw.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(X2(85));this.updater.enqueueSetState(this,e,t,"setState")};kw.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tye(){}Tye.prototype=kw.prototype;function r6(e,t,r){this.props=e,this.context=t,this.refs=Rye,this.updater=r||Fye}var n6=r6.prototype=new Tye;n6.constructor=r6;t6(n6,kw.prototype);n6.isPureReactComponent=!0;var i6={current:null},Nye=Object.prototype.hasOwnProperty,Lye={key:!0,ref:!0,__self:!0,__source:!0};function Oye(e,t,r){var o,a={},n=null,u=null;if(t!=null)for(o in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(n=""+t.key),t)Nye.call(t,o)&&!Lye.hasOwnProperty(o)&&(a[o]=t[o]);var A=arguments.length-2;if(A===1)a.children=r;else if(1<A){for(var p=Array(A),h=0;h<A;h++)p[h]=arguments[h+2];a.children=p}if(e&&e.defaultProps)for(o in A=e.defaultProps,A)a[o]===void 0&&(a[o]=A[o]);return{$$typeof:z2,type:e,key:n,ref:u,props:a,_owner:i6.current}}function cyt(e,t){return{$$typeof:z2,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function s6(e){return typeof e=="object"&&e!==null&&e.$$typeof===z2}function uyt(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(r){return t[r]})}var Mye=/\/+/g,SQ=[];function Uye(e,t,r,o){if(SQ.length){var a=SQ.pop();return a.result=e,a.keyPrefix=t,a.func=r,a.context=o,a.count=0,a}return{result:e,keyPrefix:t,func:r,context:o,count:0}}function _ye(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>SQ.length&&SQ.push(e)}function ZH(e,t,r,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(a){case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case z2:case $mt:n=!0}}if(n)return r(o,e,t===""?"."+XH(e,0):t),1;if(n=0,t=t===""?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){a=e[u];var A=t+XH(a,u);n+=ZH(a,A,r,o)}else if(e===null||typeof e!="object"?A=null:(A=kye&&e[kye]||e["@@iterator"],A=typeof A=="function"?A:null),typeof A=="function")for(e=A.call(e),u=0;!(a=e.next()).done;)a=a.value,A=t+XH(a,u++),n+=ZH(a,A,r,o);else if(a==="object")throw r=""+e,Error(X2(31,r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r,""));return n}function $H(e,t,r){return e==null?0:ZH(e,"",t,r)}function XH(e,t){return typeof e=="object"&&e!==null&&e.key!=null?uyt(e.key):t.toString(36)}function Ayt(e,t){e.func.call(e.context,t,e.count++)}function fyt(e,t,r){var o=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?e6(e,o,r,function(n){return n}):e!=null&&(s6(e)&&(e=cyt(e,a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(Mye,"$&/")+"/")+r)),o.push(e))}function e6(e,t,r,o,a){var n="";r!=null&&(n=(""+r).replace(Mye,"$&/")+"/"),t=Uye(t,n,o,a),$H(e,fyt,t),_ye(t)}var Hye={current:null};function zf(){var e=Hye.current;if(e===null)throw Error(X2(321));return e}var pyt={ReactCurrentDispatcher:Hye,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:i6,IsSomeRendererActing:{current:!1},assign:t6};Tn.Children={map:function(e,t,r){if(e==null)return e;var o=[];return e6(e,o,null,t,r),o},forEach:function(e,t,r){if(e==null)return e;t=Uye(null,null,t,r),$H(e,Ayt,t),_ye(t)},count:function(e){return $H(e,function(){return null},null)},toArray:function(e){var t=[];return e6(e,t,null,function(r){return r}),t},only:function(e){if(!s6(e))throw Error(X2(143));return e}};Tn.Component=kw;Tn.Fragment=eyt;Tn.Profiler=ryt;Tn.PureComponent=r6;Tn.StrictMode=tyt;Tn.Suspense=oyt;Tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pyt;Tn.cloneElement=function(e,t,r){if(e==null)throw Error(X2(267,e));var o=t6({},e.props),a=e.key,n=e.ref,u=e._owner;if(t!=null){if(t.ref!==void 0&&(n=t.ref,u=i6.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var A=e.type.defaultProps;for(p in t)Nye.call(t,p)&&!Lye.hasOwnProperty(p)&&(o[p]=t[p]===void 0&&A!==void 0?A[p]:t[p])}var p=arguments.length-2;if(p===1)o.children=r;else if(1<p){A=Array(p);for(var h=0;h<p;h++)A[h]=arguments[h+2];o.children=A}return{$$typeof:z2,type:e.type,key:a,ref:n,props:o,_owner:u}};Tn.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:iyt,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:nyt,_context:e},e.Consumer=e};Tn.createElement=Oye;Tn.createFactory=function(e){var t=Oye.bind(null,e);return t.type=e,t};Tn.createRef=function(){return{current:null}};Tn.forwardRef=function(e){return{$$typeof:syt,render:e}};Tn.isValidElement=s6;Tn.lazy=function(e){return{$$typeof:lyt,_ctor:e,_status:-1,_result:null}};Tn.memo=function(e,t){return{$$typeof:ayt,type:e,compare:t===void 0?null:t}};Tn.useCallback=function(e,t){return zf().useCallback(e,t)};Tn.useContext=function(e,t){return zf().useContext(e,t)};Tn.useDebugValue=function(){};Tn.useEffect=function(e,t){return zf().useEffect(e,t)};Tn.useImperativeHandle=function(e,t,r){return zf().useImperativeHandle(e,t,r)};Tn.useLayoutEffect=function(e,t){return zf().useLayoutEffect(e,t)};Tn.useMemo=function(e,t){return zf().useMemo(e,t)};Tn.useReducer=function(e,t,r){return zf().useReducer(e,t,r)};Tn.useRef=function(e){return zf().useRef(e)};Tn.useState=function(e){return zf().useState(e)};Tn.version="16.13.1"});var nn=_((TWt,qye)=>{"use strict";qye.exports=jye()});var a6=_((NWt,o6)=>{"use strict";var un=o6.exports;o6.exports.default=un;var Nn="\x1B[",Z2="\x1B]",Fw="\x07",PQ=";",Gye=process.env.TERM_PROGRAM==="Apple_Terminal";un.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?Nn+(e+1)+"G":Nn+(t+1)+";"+(e+1)+"H"};un.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=Nn+-e+"D":e>0&&(r+=Nn+e+"C"),t<0?r+=Nn+-t+"A":t>0&&(r+=Nn+t+"B"),r};un.cursorUp=(e=1)=>Nn+e+"A";un.cursorDown=(e=1)=>Nn+e+"B";un.cursorForward=(e=1)=>Nn+e+"C";un.cursorBackward=(e=1)=>Nn+e+"D";un.cursorLeft=Nn+"G";un.cursorSavePosition=Gye?"\x1B7":Nn+"s";un.cursorRestorePosition=Gye?"\x1B8":Nn+"u";un.cursorGetPosition=Nn+"6n";un.cursorNextLine=Nn+"E";un.cursorPrevLine=Nn+"F";un.cursorHide=Nn+"?25l";un.cursorShow=Nn+"?25h";un.eraseLines=e=>{let t="";for(let r=0;r<e;r++)t+=un.eraseLine+(r<e-1?un.cursorUp():"");return e&&(t+=un.cursorLeft),t};un.eraseEndLine=Nn+"K";un.eraseStartLine=Nn+"1K";un.eraseLine=Nn+"2K";un.eraseDown=Nn+"J";un.eraseUp=Nn+"1J";un.eraseScreen=Nn+"2J";un.scrollUp=Nn+"S";un.scrollDown=Nn+"T";un.clearScreen="\x1Bc";un.clearTerminal=process.platform==="win32"?`${un.eraseScreen}${Nn}0f`:`${un.eraseScreen}${Nn}3J${Nn}H`;un.beep=Fw;un.link=(e,t)=>[Z2,"8",PQ,PQ,t,Fw,e,Z2,"8",PQ,PQ,Fw].join("");un.image=(e,t={})=>{let r=`${Z2}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+Fw};un.iTerm={setCwd:(e=process.cwd())=>`${Z2}50;CurrentDir=${e}${Fw}`,annotation:(e,t={})=>{let r=`${Z2}1337;`,o=typeof t.x<"u",a=typeof t.y<"u";if((o||a)&&!(o&&a&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(o?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+Fw}}});var Wye=_((LWt,l6)=>{"use strict";var Yye=(e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};l6.exports=Yye;l6.exports.default=Yye});var Jye=_((OWt,bQ)=>{"use strict";var hyt=Wye(),xQ=new WeakMap,Kye=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,o=0,a=e.displayName||e.name||"<anonymous>",n=function(...u){if(xQ.set(n,++o),o===1)r=e.apply(this,u),e=null;else if(t.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return r};return hyt(n,e),xQ.set(n,o),n};bQ.exports=Kye;bQ.exports.default=Kye;bQ.exports.callCount=e=>{if(!xQ.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return xQ.get(e)}});var Vye=_((MWt,QQ)=>{QQ.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&QQ.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&QQ.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var A6=_((UWt,Nw)=>{var yi=global.process,nm=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};nm(yi)?(zye=Ie("assert"),Rw=Vye(),Xye=/^win/i.test(yi.platform),$2=Ie("events"),typeof $2!="function"&&($2=$2.EventEmitter),yi.__signal_exit_emitter__?Ls=yi.__signal_exit_emitter__:(Ls=yi.__signal_exit_emitter__=new $2,Ls.count=0,Ls.emitted={}),Ls.infinite||(Ls.setMaxListeners(1/0),Ls.infinite=!0),Nw.exports=function(e,t){if(!nm(global.process))return function(){};zye.equal(typeof e,"function","a callback must be provided for exit handler"),Tw===!1&&c6();var r="exit";t&&t.alwaysLast&&(r="afterexit");var o=function(){Ls.removeListener(r,e),Ls.listeners("exit").length===0&&Ls.listeners("afterexit").length===0&&kQ()};return Ls.on(r,e),o},kQ=function(){!Tw||!nm(global.process)||(Tw=!1,Rw.forEach(function(t){try{yi.removeListener(t,FQ[t])}catch{}}),yi.emit=RQ,yi.reallyExit=u6,Ls.count-=1)},Nw.exports.unload=kQ,im=function(t,r,o){Ls.emitted[t]||(Ls.emitted[t]=!0,Ls.emit(t,r,o))},FQ={},Rw.forEach(function(e){FQ[e]=function(){if(!!nm(global.process)){var r=yi.listeners(e);r.length===Ls.count&&(kQ(),im("exit",null,e),im("afterexit",null,e),Xye&&e==="SIGHUP"&&(e="SIGINT"),yi.kill(yi.pid,e))}}}),Nw.exports.signals=function(){return Rw},Tw=!1,c6=function(){Tw||!nm(global.process)||(Tw=!0,Ls.count+=1,Rw=Rw.filter(function(t){try{return yi.on(t,FQ[t]),!0}catch{return!1}}),yi.emit=$ye,yi.reallyExit=Zye)},Nw.exports.load=c6,u6=yi.reallyExit,Zye=function(t){!nm(global.process)||(yi.exitCode=t||0,im("exit",yi.exitCode,null),im("afterexit",yi.exitCode,null),u6.call(yi,yi.exitCode))},RQ=yi.emit,$ye=function(t,r){if(t==="exit"&&nm(global.process)){r!==void 0&&(yi.exitCode=r);var o=RQ.apply(this,arguments);return im("exit",yi.exitCode,null),im("afterexit",yi.exitCode,null),o}else return RQ.apply(this,arguments)}):Nw.exports=function(){return function(){}};var zye,Rw,Xye,$2,Ls,kQ,im,FQ,Tw,c6,u6,Zye,RQ,$ye});var tEe=_((_Wt,eEe)=>{"use strict";var gyt=Jye(),dyt=A6();eEe.exports=gyt(()=>{dyt(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var f6=_(Lw=>{"use strict";var myt=tEe(),TQ=!1;Lw.show=(e=process.stderr)=>{!e.isTTY||(TQ=!1,e.write("\x1B[?25h"))};Lw.hide=(e=process.stderr)=>{!e.isTTY||(myt(),TQ=!0,e.write("\x1B[?25l"))};Lw.toggle=(e,t)=>{e!==void 0&&(TQ=e),TQ?Lw.show(t):Lw.hide(t)}});var sEe=_(eB=>{"use strict";var iEe=eB&&eB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(eB,"__esModule",{value:!0});var rEe=iEe(a6()),nEe=iEe(f6()),yyt=(e,{showCursor:t=!1}={})=>{let r=0,o="",a=!1,n=u=>{!t&&!a&&(nEe.default.hide(),a=!0);let A=u+`
286`;A!==o&&(o=A,e.write(rEe.default.eraseLines(r)+A),r=A.split(`
287`).length)};return n.clear=()=>{e.write(rEe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,t||(nEe.default.show(),a=!1)},n};eB.default={create:yyt}});var oEe=_((qWt,Eyt)=>{Eyt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var cEe=_(hl=>{"use strict";var lEe=oEe(),hA=process.env;Object.defineProperty(hl,"_vendors",{value:lEe.map(function(e){return e.constant})});hl.name=null;hl.isPR=null;lEe.forEach(function(e){var t=Array.isArray(e.env)?e.env:[e.env],r=t.every(function(o){return aEe(o)});if(hl[e.constant]=r,r)switch(hl.name=e.name,typeof e.pr){case"string":hl.isPR=!!hA[e.pr];break;case"object":"env"in e.pr?hl.isPR=e.pr.env in hA&&hA[e.pr.env]!==e.pr.ne:"any"in e.pr?hl.isPR=e.pr.any.some(function(o){return!!hA[o]}):hl.isPR=aEe(e.pr);break;default:hl.isPR=null}});hl.isCI=!!(hA.CI||hA.CONTINUOUS_INTEGRATION||hA.BUILD_NUMBER||hA.RUN_ID||hl.name);function aEe(e){return typeof e=="string"?!!hA[e]:Object.keys(e).every(function(t){return hA[t]===e[t]})}});var AEe=_((YWt,uEe)=>{"use strict";uEe.exports=cEe().isCI});var pEe=_((WWt,fEe)=>{"use strict";var wyt=e=>{let t=new Set;do for(let r of Reflect.ownKeys(e))t.add([e,r]);while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t};fEe.exports=(e,{include:t,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return t?t.some(n):r?!r.some(n):!0};for(let[a,n]of wyt(e.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(e[n]=e[n].bind(e))}return e}});var wEe=_(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var Mw,nB,UQ,_Q,E6;typeof window>"u"||typeof MessageChannel!="function"?(Ow=null,p6=null,h6=function(){if(Ow!==null)try{var e=bn.unstable_now();Ow(!0,e),Ow=null}catch(t){throw setTimeout(h6,0),t}},hEe=Date.now(),bn.unstable_now=function(){return Date.now()-hEe},Mw=function(e){Ow!==null?setTimeout(Mw,0,e):(Ow=e,setTimeout(h6,0))},nB=function(e,t){p6=setTimeout(e,t)},UQ=function(){clearTimeout(p6)},_Q=function(){return!1},E6=bn.unstable_forceFrameRate=function(){}):(NQ=window.performance,g6=window.Date,gEe=window.setTimeout,dEe=window.clearTimeout,typeof console<"u"&&(mEe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof mEe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof NQ=="object"&&typeof NQ.now=="function"?bn.unstable_now=function(){return NQ.now()}:(yEe=g6.now(),bn.unstable_now=function(){return g6.now()-yEe}),tB=!1,rB=null,LQ=-1,d6=5,m6=0,_Q=function(){return bn.unstable_now()>=m6},E6=function(){},bn.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):d6=0<e?Math.floor(1e3/e):5},y6=new MessageChannel,OQ=y6.port2,y6.port1.onmessage=function(){if(rB!==null){var e=bn.unstable_now();m6=e+d6;try{rB(!0,e)?OQ.postMessage(null):(tB=!1,rB=null)}catch(t){throw OQ.postMessage(null),t}}else tB=!1},Mw=function(e){rB=e,tB||(tB=!0,OQ.postMessage(null))},nB=function(e,t){LQ=gEe(function(){e(bn.unstable_now())},t)},UQ=function(){dEe(LQ),LQ=-1});var Ow,p6,h6,hEe,NQ,g6,gEe,dEe,mEe,yEe,tB,rB,LQ,d6,m6,y6,OQ;function w6(e,t){var r=e.length;e.push(t);e:for(;;){var o=Math.floor((r-1)/2),a=e[o];if(a!==void 0&&0<MQ(a,t))e[o]=t,e[r]=a,r=o;else break e}}function nc(e){return e=e[0],e===void 0?null:e}function HQ(e){var t=e[0];if(t!==void 0){var r=e.pop();if(r!==t){e[0]=r;e:for(var o=0,a=e.length;o<a;){var n=2*(o+1)-1,u=e[n],A=n+1,p=e[A];if(u!==void 0&&0>MQ(u,r))p!==void 0&&0>MQ(p,u)?(e[o]=p,e[A]=r,o=A):(e[o]=u,e[n]=r,o=n);else if(p!==void 0&&0>MQ(p,r))e[o]=p,e[A]=r,o=A;else break e}}return t}return null}function MQ(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}var ru=[],m0=[],Cyt=1,ia=null,Lo=3,jQ=!1,sm=!1,iB=!1;function qQ(e){for(var t=nc(m0);t!==null;){if(t.callback===null)HQ(m0);else if(t.startTime<=e)HQ(m0),t.sortIndex=t.expirationTime,w6(ru,t);else break;t=nc(m0)}}function C6(e){if(iB=!1,qQ(e),!sm)if(nc(ru)!==null)sm=!0,Mw(I6);else{var t=nc(m0);t!==null&&nB(C6,t.startTime-e)}}function I6(e,t){sm=!1,iB&&(iB=!1,UQ()),jQ=!0;var r=Lo;try{for(qQ(t),ia=nc(ru);ia!==null&&(!(ia.expirationTime>t)||e&&!_Q());){var o=ia.callback;if(o!==null){ia.callback=null,Lo=ia.priorityLevel;var a=o(ia.expirationTime<=t);t=bn.unstable_now(),typeof a=="function"?ia.callback=a:ia===nc(ru)&&HQ(ru),qQ(t)}else HQ(ru);ia=nc(ru)}if(ia!==null)var n=!0;else{var u=nc(m0);u!==null&&nB(C6,u.startTime-t),n=!1}return n}finally{ia=null,Lo=r,jQ=!1}}function EEe(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Iyt=E6;bn.unstable_ImmediatePriority=1;bn.unstable_UserBlockingPriority=2;bn.unstable_NormalPriority=3;bn.unstable_IdlePriority=5;bn.unstable_LowPriority=4;bn.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Lo;Lo=e;try{return t()}finally{Lo=r}};bn.unstable_next=function(e){switch(Lo){case 1:case 2:case 3:var t=3;break;default:t=Lo}var r=Lo;Lo=t;try{return e()}finally{Lo=r}};bn.unstable_scheduleCallback=function(e,t,r){var o=bn.unstable_now();if(typeof r=="object"&&r!==null){var a=r.delay;a=typeof a=="number"&&0<a?o+a:o,r=typeof r.timeout=="number"?r.timeout:EEe(e)}else r=EEe(e),a=o;return r=a+r,e={id:Cyt++,callback:t,priorityLevel:e,startTime:a,expirationTime:r,sortIndex:-1},a>o?(e.sortIndex=a,w6(m0,e),nc(ru)===null&&e===nc(m0)&&(iB?UQ():iB=!0,nB(C6,a-o))):(e.sortIndex=r,w6(ru,e),sm||jQ||(sm=!0,Mw(I6))),e};bn.unstable_cancelCallback=function(e){e.callback=null};bn.unstable_wrapCallback=function(e){var t=Lo;return function(){var r=Lo;Lo=t;try{return e.apply(this,arguments)}finally{Lo=r}}};bn.unstable_getCurrentPriorityLevel=function(){return Lo};bn.unstable_shouldYield=function(){var e=bn.unstable_now();qQ(e);var t=nc(ru);return t!==ia&&ia!==null&&t!==null&&t.callback!==null&&t.startTime<=e&&t.expirationTime<ia.expirationTime||_Q()};bn.unstable_requestPaint=Iyt;bn.unstable_continueExecution=function(){sm||jQ||(sm=!0,Mw(I6))};bn.unstable_pauseExecution=function(){};bn.unstable_getFirstCallbackNode=function(){return nc(ru)};bn.unstable_Profiling=null});var B6=_((JWt,CEe)=>{"use strict";CEe.exports=wEe()});var IEe=_((VWt,sB)=>{sB.exports=function e(t){"use strict";var r=zH(),o=nn(),a=B6();function n(S){for(var D="https://reactjs.org/docs/error-decoder.html?invariant="+S,T=1;T<arguments.length;T++)D+="&args[]="+encodeURIComponent(arguments[T]);return"Minified React error #"+S+"; visit "+D+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;u.hasOwnProperty("ReactCurrentDispatcher")||(u.ReactCurrentDispatcher={current:null}),u.hasOwnProperty("ReactCurrentBatchConfig")||(u.ReactCurrentBatchConfig={suspense:null});var A=typeof Symbol=="function"&&Symbol.for,p=A?Symbol.for("react.element"):60103,h=A?Symbol.for("react.portal"):60106,w=A?Symbol.for("react.fragment"):60107,I=A?Symbol.for("react.strict_mode"):60108,v=A?Symbol.for("react.profiler"):60114,b=A?Symbol.for("react.provider"):60109,E=A?Symbol.for("react.context"):60110,R=A?Symbol.for("react.concurrent_mode"):60111,N=A?Symbol.for("react.forward_ref"):60112,U=A?Symbol.for("react.suspense"):60113,V=A?Symbol.for("react.suspense_list"):60120,ee=A?Symbol.for("react.memo"):60115,le=A?Symbol.for("react.lazy"):60116;A&&Symbol.for("react.fundamental"),A&&Symbol.for("react.responder"),A&&Symbol.for("react.scope");var fe=typeof Symbol=="function"&&Symbol.iterator;function de(S){return S===null||typeof S!="object"?null:(S=fe&&S[fe]||S["@@iterator"],typeof S=="function"?S:null)}function ge(S){if(S._status===-1){S._status=0;var D=S._ctor;D=D(),S._result=D,D.then(function(T){S._status===0&&(T=T.default,S._status=1,S._result=T)},function(T){S._status===0&&(S._status=2,S._result=T)})}}function oe(S){if(S==null)return null;if(typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case w:return"Fragment";case h:return"Portal";case v:return"Profiler";case I:return"StrictMode";case U:return"Suspense";case V:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case E:return"Context.Consumer";case b:return"Context.Provider";case N:var D=S.render;return D=D.displayName||D.name||"",S.displayName||(D!==""?"ForwardRef("+D+")":"ForwardRef");case ee:return oe(S.type);case le:if(S=S._status===1?S._result:null)return oe(S)}return null}function Be(S){var D=S,T=S;if(S.alternate)for(;D.return;)D=D.return;else{S=D;do D=S,(D.effectTag&1026)!==0&&(T=D.return),S=D.return;while(S)}return D.tag===3?T:null}function be(S){if(Be(S)!==S)throw Error(n(188))}function g(S){var D=S.alternate;if(!D){if(D=Be(S),D===null)throw Error(n(188));return D!==S?null:S}for(var T=S,j=D;;){var W=T.return;if(W===null)break;var ue=W.alternate;if(ue===null){if(j=W.return,j!==null){T=j;continue}break}if(W.child===ue.child){for(ue=W.child;ue;){if(ue===T)return be(W),S;if(ue===j)return be(W),D;ue=ue.sibling}throw Error(n(188))}if(T.return!==j.return)T=W,j=ue;else{for(var De=!1,vt=W.child;vt;){if(vt===T){De=!0,T=W,j=ue;break}if(vt===j){De=!0,j=W,T=ue;break}vt=vt.sibling}if(!De){for(vt=ue.child;vt;){if(vt===T){De=!0,T=ue,j=W;break}if(vt===j){De=!0,j=ue,T=W;break}vt=vt.sibling}if(!De)throw Error(n(189))}}if(T.alternate!==j)throw Error(n(190))}if(T.tag!==3)throw Error(n(188));return T.stateNode.current===T?S:D}function we(S){if(S=g(S),!S)return null;for(var D=S;;){if(D.tag===5||D.tag===6)return D;if(D.child)D.child.return=D,D=D.child;else{if(D===S)break;for(;!D.sibling;){if(!D.return||D.return===S)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function Se(S){if(S=g(S),!S)return null;for(var D=S;;){if(D.tag===5||D.tag===6)return D;if(D.child&&D.tag!==4)D.child.return=D,D=D.child;else{if(D===S)break;for(;!D.sibling;){if(!D.return||D.return===S)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}var ce=t.getPublicInstance,ne=t.getRootHostContext,te=t.getChildHostContext,Ee=t.prepareForCommit,Re=t.resetAfterCommit,dt=t.createInstance,H=t.appendInitialChild,at=t.finalizeInitialChildren,Te=t.prepareUpdate,Qe=t.shouldSetTextContent,ke=t.shouldDeprioritizeSubtree,He=t.createTextInstance,Ne=t.setTimeout,Ve=t.clearTimeout,je=t.noTimeout,x=t.isPrimaryRenderer,C=t.supportsMutation,P=t.supportsPersistence,y=t.supportsHydration,F=t.appendChild,z=t.appendChildToContainer,X=t.commitTextUpdate,Z=t.commitMount,ie=t.commitUpdate,Pe=t.insertBefore,Le=t.insertInContainerBefore,ot=t.removeChild,gt=t.removeChildFromContainer,jt=t.resetTextContent,$t=t.hideInstance,xt=t.hideTextInstance,on=t.unhideInstance,br=t.unhideTextInstance,dr=t.cloneInstance,Pr=t.createContainerChildSet,Yr=t.appendChildToContainerChildSet,Wn=t.finalizeContainerChildren,Os=t.replaceContainerChildren,Ti=t.cloneHiddenInstance,hs=t.cloneHiddenTextInstance,io=t.canHydrateInstance,Si=t.canHydrateTextInstance,Ms=t.isSuspenseInstancePending,so=t.isSuspenseInstanceFallback,cc=t.getNextHydratableSibling,Au=t.getFirstHydratableChild,op=t.hydrateInstance,ap=t.hydrateTextInstance,Us=t.getNextHydratableInstanceAfterSuspenseInstance,vn=t.commitHydratedContainer,oo=t.commitHydratedSuspenseInstance,_s=/^(.*)[\\\/]/;function dl(S){var D="";do{e:switch(S.tag){case 3:case 4:case 6:case 7:case 10:case 9:var T="";break e;default:var j=S._debugOwner,W=S._debugSource,ue=oe(S.type);T=null,j&&(T=oe(j.type)),j=ue,ue="",W?ue=" (at "+W.fileName.replace(_s,"")+":"+W.lineNumber+")":T&&(ue=" (created by "+T+")"),T=`
288 in `+(j||"Unknown")+ue}D+=T,S=S.return}while(S);return D}var ml=[],ao=-1;function Kn(S){0>ao||(S.current=ml[ao],ml[ao]=null,ao--)}function Ln(S,D){ao++,ml[ao]=S.current,S.current=D}var Ni={},On={current:Ni},Hi={current:!1},ve=Ni;function Li(S,D){var T=S.type.contextTypes;if(!T)return Ni;var j=S.stateNode;if(j&&j.__reactInternalMemoizedUnmaskedChildContext===D)return j.__reactInternalMemoizedMaskedChildContext;var W={},ue;for(ue in T)W[ue]=D[ue];return j&&(S=S.stateNode,S.__reactInternalMemoizedUnmaskedChildContext=D,S.__reactInternalMemoizedMaskedChildContext=W),W}function ni(S){return S=S.childContextTypes,S!=null}function Ma(S){Kn(Hi,S),Kn(On,S)}function pr(S){Kn(Hi,S),Kn(On,S)}function uc(S,D,T){if(On.current!==Ni)throw Error(n(168));Ln(On,D,S),Ln(Hi,T,S)}function fu(S,D,T){var j=S.stateNode;if(S=D.childContextTypes,typeof j.getChildContext!="function")return T;j=j.getChildContext();for(var W in j)if(!(W in S))throw Error(n(108,oe(D)||"Unknown",W));return r({},T,{},j)}function Ac(S){var D=S.stateNode;return D=D&&D.__reactInternalMemoizedMergedChildContext||Ni,ve=On.current,Ln(On,D,S),Ln(Hi,Hi.current,S),!0}function yl(S,D,T){var j=S.stateNode;if(!j)throw Error(n(169));T?(D=fu(S,D,ve),j.__reactInternalMemoizedMergedChildContext=D,Kn(Hi,S),Kn(On,S),Ln(On,D,S)):Kn(Hi,S),Ln(Hi,T,S)}var DA=a.unstable_runWithPriority,pu=a.unstable_scheduleCallback,Ce=a.unstable_cancelCallback,Rt=a.unstable_shouldYield,fc=a.unstable_requestPaint,ji=a.unstable_now,hu=a.unstable_getCurrentPriorityLevel,Yt=a.unstable_ImmediatePriority,El=a.unstable_UserBlockingPriority,SA=a.unstable_NormalPriority,lp=a.unstable_LowPriority,pc=a.unstable_IdlePriority,PA={},Qn=fc!==void 0?fc:function(){},pi=null,hc=null,xA=!1,oa=ji(),Oi=1e4>oa?ji:function(){return ji()-oa};function _o(){switch(hu()){case Yt:return 99;case El:return 98;case SA:return 97;case lp:return 96;case pc:return 95;default:throw Error(n(332))}}function Ze(S){switch(S){case 99:return Yt;case 98:return El;case 97:return SA;case 96:return lp;case 95:return pc;default:throw Error(n(332))}}function lo(S,D){return S=Ze(S),DA(S,D)}function gc(S,D,T){return S=Ze(S),pu(S,D,T)}function gu(S){return pi===null?(pi=[S],hc=pu(Yt,du)):pi.push(S),PA}function qi(){if(hc!==null){var S=hc;hc=null,Ce(S)}du()}function du(){if(!xA&&pi!==null){xA=!0;var S=0;try{var D=pi;lo(99,function(){for(;S<D.length;S++){var T=D[S];do T=T(!0);while(T!==null)}}),pi=null}catch(T){throw pi!==null&&(pi=pi.slice(S+1)),pu(Yt,qi),T}finally{xA=!1}}}var bA=3;function Ua(S,D,T){return T/=10,1073741821-(((1073741821-S+D/10)/T|0)+1)*T}function dc(S,D){return S===D&&(S!==0||1/S===1/D)||S!==S&&D!==D}var gs=typeof Object.is=="function"?Object.is:dc,Ut=Object.prototype.hasOwnProperty;function kn(S,D){if(gs(S,D))return!0;if(typeof S!="object"||S===null||typeof D!="object"||D===null)return!1;var T=Object.keys(S),j=Object.keys(D);if(T.length!==j.length)return!1;for(j=0;j<T.length;j++)if(!Ut.call(D,T[j])||!gs(S[T[j]],D[T[j]]))return!1;return!0}function Ei(S,D){if(S&&S.defaultProps){D=r({},D),S=S.defaultProps;for(var T in S)D[T]===void 0&&(D[T]=S[T])}return D}var aa={current:null},co=null,Hs=null,la=null;function ca(){la=Hs=co=null}function Ho(S,D){var T=S.type._context;x?(Ln(aa,T._currentValue,S),T._currentValue=D):(Ln(aa,T._currentValue2,S),T._currentValue2=D)}function wi(S){var D=aa.current;Kn(aa,S),S=S.type._context,x?S._currentValue=D:S._currentValue2=D}function ds(S,D){for(;S!==null;){var T=S.alternate;if(S.childExpirationTime<D)S.childExpirationTime=D,T!==null&&T.childExpirationTime<D&&(T.childExpirationTime=D);else if(T!==null&&T.childExpirationTime<D)T.childExpirationTime=D;else break;S=S.return}}function ms(S,D){co=S,la=Hs=null,S=S.dependencies,S!==null&&S.firstContext!==null&&(S.expirationTime>=D&&(qo=!0),S.firstContext=null)}function ys(S,D){if(la!==S&&D!==!1&&D!==0)if((typeof D!="number"||D===1073741823)&&(la=S,D=1073741823),D={context:S,observedBits:D,next:null},Hs===null){if(co===null)throw Error(n(308));Hs=D,co.dependencies={expirationTime:0,firstContext:D,responders:null}}else Hs=Hs.next=D;return x?S._currentValue:S._currentValue2}var js=!1;function Mn(S){return{baseState:S,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Dn(S){return{baseState:S.baseState,firstUpdate:S.firstUpdate,lastUpdate:S.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Es(S,D){return{expirationTime:S,suspenseConfig:D,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function We(S,D){S.lastUpdate===null?S.firstUpdate=S.lastUpdate=D:(S.lastUpdate.next=D,S.lastUpdate=D)}function tt(S,D){var T=S.alternate;if(T===null){var j=S.updateQueue,W=null;j===null&&(j=S.updateQueue=Mn(S.memoizedState))}else j=S.updateQueue,W=T.updateQueue,j===null?W===null?(j=S.updateQueue=Mn(S.memoizedState),W=T.updateQueue=Mn(T.memoizedState)):j=S.updateQueue=Dn(W):W===null&&(W=T.updateQueue=Dn(j));W===null||j===W?We(j,D):j.lastUpdate===null||W.lastUpdate===null?(We(j,D),We(W,D)):(We(j,D),W.lastUpdate=D)}function It(S,D){var T=S.updateQueue;T=T===null?S.updateQueue=Mn(S.memoizedState):rr(S,T),T.lastCapturedUpdate===null?T.firstCapturedUpdate=T.lastCapturedUpdate=D:(T.lastCapturedUpdate.next=D,T.lastCapturedUpdate=D)}function rr(S,D){var T=S.alternate;return T!==null&&D===T.updateQueue&&(D=S.updateQueue=Dn(D)),D}function $(S,D,T,j,W,ue){switch(T.tag){case 1:return S=T.payload,typeof S=="function"?S.call(ue,j,W):S;case 3:S.effectTag=S.effectTag&-4097|64;case 0:if(S=T.payload,W=typeof S=="function"?S.call(ue,j,W):S,W==null)break;return r({},j,W);case 2:js=!0}return j}function me(S,D,T,j,W){js=!1,D=rr(S,D);for(var ue=D.baseState,De=null,vt=0,Ct=D.firstUpdate,bt=ue;Ct!==null;){var Ur=Ct.expirationTime;Ur<W?(De===null&&(De=Ct,ue=bt),vt<Ur&&(vt=Ur)):(DC(Ur,Ct.suspenseConfig),bt=$(S,D,Ct,bt,T,j),Ct.callback!==null&&(S.effectTag|=32,Ct.nextEffect=null,D.lastEffect===null?D.firstEffect=D.lastEffect=Ct:(D.lastEffect.nextEffect=Ct,D.lastEffect=Ct))),Ct=Ct.next}for(Ur=null,Ct=D.firstCapturedUpdate;Ct!==null;){var ns=Ct.expirationTime;ns<W?(Ur===null&&(Ur=Ct,De===null&&(ue=bt)),vt<ns&&(vt=ns)):(bt=$(S,D,Ct,bt,T,j),Ct.callback!==null&&(S.effectTag|=32,Ct.nextEffect=null,D.lastCapturedEffect===null?D.firstCapturedEffect=D.lastCapturedEffect=Ct:(D.lastCapturedEffect.nextEffect=Ct,D.lastCapturedEffect=Ct))),Ct=Ct.next}De===null&&(D.lastUpdate=null),Ur===null?D.lastCapturedUpdate=null:S.effectTag|=32,De===null&&Ur===null&&(ue=bt),D.baseState=ue,D.firstUpdate=De,D.firstCapturedUpdate=Ur,_m(vt),S.expirationTime=vt,S.memoizedState=bt}function Oe(S,D,T){D.firstCapturedUpdate!==null&&(D.lastUpdate!==null&&(D.lastUpdate.next=D.firstCapturedUpdate,D.lastUpdate=D.lastCapturedUpdate),D.firstCapturedUpdate=D.lastCapturedUpdate=null),ft(D.firstEffect,T),D.firstEffect=D.lastEffect=null,ft(D.firstCapturedEffect,T),D.firstCapturedEffect=D.lastCapturedEffect=null}function ft(S,D){for(;S!==null;){var T=S.callback;if(T!==null){S.callback=null;var j=D;if(typeof T!="function")throw Error(n(191,T));T.call(j)}S=S.nextEffect}}var pt=u.ReactCurrentBatchConfig,Tt=new o.Component().refs;function er(S,D,T,j){D=S.memoizedState,T=T(j,D),T=T==null?D:r({},D,T),S.memoizedState=T,j=S.updateQueue,j!==null&&S.expirationTime===0&&(j.baseState=T)}var Xr={isMounted:function(S){return(S=S._reactInternalFiber)?Be(S)===S:!1},enqueueSetState:function(S,D,T){S=S._reactInternalFiber;var j=da(),W=pt.suspense;j=jA(j,S,W),W=Es(j,W),W.payload=D,T!=null&&(W.callback=T),tt(S,W),Pc(S,j)},enqueueReplaceState:function(S,D,T){S=S._reactInternalFiber;var j=da(),W=pt.suspense;j=jA(j,S,W),W=Es(j,W),W.tag=1,W.payload=D,T!=null&&(W.callback=T),tt(S,W),Pc(S,j)},enqueueForceUpdate:function(S,D){S=S._reactInternalFiber;var T=da(),j=pt.suspense;T=jA(T,S,j),j=Es(T,j),j.tag=2,D!=null&&(j.callback=D),tt(S,j),Pc(S,T)}};function Gi(S,D,T,j,W,ue,De){return S=S.stateNode,typeof S.shouldComponentUpdate=="function"?S.shouldComponentUpdate(j,ue,De):D.prototype&&D.prototype.isPureReactComponent?!kn(T,j)||!kn(W,ue):!0}function $i(S,D,T){var j=!1,W=Ni,ue=D.contextType;return typeof ue=="object"&&ue!==null?ue=ys(ue):(W=ni(D)?ve:On.current,j=D.contextTypes,ue=(j=j!=null)?Li(S,W):Ni),D=new D(T,ue),S.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=Xr,S.stateNode=D,D._reactInternalFiber=S,j&&(S=S.stateNode,S.__reactInternalMemoizedUnmaskedChildContext=W,S.__reactInternalMemoizedMaskedChildContext=ue),D}function Pi(S,D,T,j){S=D.state,typeof D.componentWillReceiveProps=="function"&&D.componentWillReceiveProps(T,j),typeof D.UNSAFE_componentWillReceiveProps=="function"&&D.UNSAFE_componentWillReceiveProps(T,j),D.state!==S&&Xr.enqueueReplaceState(D,D.state,null)}function jo(S,D,T,j){var W=S.stateNode;W.props=T,W.state=S.memoizedState,W.refs=Tt;var ue=D.contextType;typeof ue=="object"&&ue!==null?W.context=ys(ue):(ue=ni(D)?ve:On.current,W.context=Li(S,ue)),ue=S.updateQueue,ue!==null&&(me(S,ue,T,W,j),W.state=S.memoizedState),ue=D.getDerivedStateFromProps,typeof ue=="function"&&(er(S,D,ue,T),W.state=S.memoizedState),typeof D.getDerivedStateFromProps=="function"||typeof W.getSnapshotBeforeUpdate=="function"||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(D=W.state,typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount(),D!==W.state&&Xr.enqueueReplaceState(W,W.state,null),ue=S.updateQueue,ue!==null&&(me(S,ue,T,W,j),W.state=S.memoizedState)),typeof W.componentDidMount=="function"&&(S.effectTag|=4)}var QA=Array.isArray;function kA(S,D,T){if(S=T.ref,S!==null&&typeof S!="function"&&typeof S!="object"){if(T._owner){if(T=T._owner,T){if(T.tag!==1)throw Error(n(309));var j=T.stateNode}if(!j)throw Error(n(147,S));var W=""+S;return D!==null&&D.ref!==null&&typeof D.ref=="function"&&D.ref._stringRef===W?D.ref:(D=function(ue){var De=j.refs;De===Tt&&(De=j.refs={}),ue===null?delete De[W]:De[W]=ue},D._stringRef=W,D)}if(typeof S!="string")throw Error(n(284));if(!T._owner)throw Error(n(290,S))}return S}function cp(S,D){if(S.type!=="textarea")throw Error(n(31,Object.prototype.toString.call(D)==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":D,""))}function rg(S){function D(rt,Je){if(S){var At=rt.lastEffect;At!==null?(At.nextEffect=Je,rt.lastEffect=Je):rt.firstEffect=rt.lastEffect=Je,Je.nextEffect=null,Je.effectTag=8}}function T(rt,Je){if(!S)return null;for(;Je!==null;)D(rt,Je),Je=Je.sibling;return null}function j(rt,Je){for(rt=new Map;Je!==null;)Je.key!==null?rt.set(Je.key,Je):rt.set(Je.index,Je),Je=Je.sibling;return rt}function W(rt,Je,At){return rt=WA(rt,Je,At),rt.index=0,rt.sibling=null,rt}function ue(rt,Je,At){return rt.index=At,S?(At=rt.alternate,At!==null?(At=At.index,At<Je?(rt.effectTag=2,Je):At):(rt.effectTag=2,Je)):Je}function De(rt){return S&&rt.alternate===null&&(rt.effectTag=2),rt}function vt(rt,Je,At,Wt){return Je===null||Je.tag!==6?(Je=QC(At,rt.mode,Wt),Je.return=rt,Je):(Je=W(Je,At,Wt),Je.return=rt,Je)}function Ct(rt,Je,At,Wt){return Je!==null&&Je.elementType===At.type?(Wt=W(Je,At.props,Wt),Wt.ref=kA(rt,Je,At),Wt.return=rt,Wt):(Wt=Hm(At.type,At.key,At.props,null,rt.mode,Wt),Wt.ref=kA(rt,Je,At),Wt.return=rt,Wt)}function bt(rt,Je,At,Wt){return Je===null||Je.tag!==4||Je.stateNode.containerInfo!==At.containerInfo||Je.stateNode.implementation!==At.implementation?(Je=kC(At,rt.mode,Wt),Je.return=rt,Je):(Je=W(Je,At.children||[],Wt),Je.return=rt,Je)}function Ur(rt,Je,At,Wt,Br){return Je===null||Je.tag!==7?(Je=Qu(At,rt.mode,Wt,Br),Je.return=rt,Je):(Je=W(Je,At,Wt),Je.return=rt,Je)}function ns(rt,Je,At){if(typeof Je=="string"||typeof Je=="number")return Je=QC(""+Je,rt.mode,At),Je.return=rt,Je;if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case p:return At=Hm(Je.type,Je.key,Je.props,null,rt.mode,At),At.ref=kA(rt,null,Je),At.return=rt,At;case h:return Je=kC(Je,rt.mode,At),Je.return=rt,Je}if(QA(Je)||de(Je))return Je=Qu(Je,rt.mode,At,null),Je.return=rt,Je;cp(rt,Je)}return null}function gi(rt,Je,At,Wt){var Br=Je!==null?Je.key:null;if(typeof At=="string"||typeof At=="number")return Br!==null?null:vt(rt,Je,""+At,Wt);if(typeof At=="object"&&At!==null){switch(At.$$typeof){case p:return At.key===Br?At.type===w?Ur(rt,Je,At.props.children,Wt,Br):Ct(rt,Je,At,Wt):null;case h:return At.key===Br?bt(rt,Je,At,Wt):null}if(QA(At)||de(At))return Br!==null?null:Ur(rt,Je,At,Wt,null);cp(rt,At)}return null}function po(rt,Je,At,Wt,Br){if(typeof Wt=="string"||typeof Wt=="number")return rt=rt.get(At)||null,vt(Je,rt,""+Wt,Br);if(typeof Wt=="object"&&Wt!==null){switch(Wt.$$typeof){case p:return rt=rt.get(Wt.key===null?At:Wt.key)||null,Wt.type===w?Ur(Je,rt,Wt.props.children,Br,Wt.key):Ct(Je,rt,Wt,Br);case h:return rt=rt.get(Wt.key===null?At:Wt.key)||null,bt(Je,rt,Wt,Br)}if(QA(Wt)||de(Wt))return rt=rt.get(At)||null,Ur(Je,rt,Wt,Br,null);cp(Je,Wt)}return null}function JA(rt,Je,At,Wt){for(var Br=null,Sn=null,kr=Je,Pn=Je=0,oi=null;kr!==null&&Pn<At.length;Pn++){kr.index>Pn?(oi=kr,kr=null):oi=kr.sibling;var $r=gi(rt,kr,At[Pn],Wt);if($r===null){kr===null&&(kr=oi);break}S&&kr&&$r.alternate===null&&D(rt,kr),Je=ue($r,Je,Pn),Sn===null?Br=$r:Sn.sibling=$r,Sn=$r,kr=oi}if(Pn===At.length)return T(rt,kr),Br;if(kr===null){for(;Pn<At.length;Pn++)kr=ns(rt,At[Pn],Wt),kr!==null&&(Je=ue(kr,Je,Pn),Sn===null?Br=kr:Sn.sibling=kr,Sn=kr);return Br}for(kr=j(rt,kr);Pn<At.length;Pn++)oi=po(kr,rt,Pn,At[Pn],Wt),oi!==null&&(S&&oi.alternate!==null&&kr.delete(oi.key===null?Pn:oi.key),Je=ue(oi,Je,Pn),Sn===null?Br=oi:Sn.sibling=oi,Sn=oi);return S&&kr.forEach(function(ho){return D(rt,ho)}),Br}function Yo(rt,Je,At,Wt){var Br=de(At);if(typeof Br!="function")throw Error(n(150));if(At=Br.call(At),At==null)throw Error(n(151));for(var Sn=Br=null,kr=Je,Pn=Je=0,oi=null,$r=At.next();kr!==null&&!$r.done;Pn++,$r=At.next()){kr.index>Pn?(oi=kr,kr=null):oi=kr.sibling;var ho=gi(rt,kr,$r.value,Wt);if(ho===null){kr===null&&(kr=oi);break}S&&kr&&ho.alternate===null&&D(rt,kr),Je=ue(ho,Je,Pn),Sn===null?Br=ho:Sn.sibling=ho,Sn=ho,kr=oi}if($r.done)return T(rt,kr),Br;if(kr===null){for(;!$r.done;Pn++,$r=At.next())$r=ns(rt,$r.value,Wt),$r!==null&&(Je=ue($r,Je,Pn),Sn===null?Br=$r:Sn.sibling=$r,Sn=$r);return Br}for(kr=j(rt,kr);!$r.done;Pn++,$r=At.next())$r=po(kr,rt,Pn,$r.value,Wt),$r!==null&&(S&&$r.alternate!==null&&kr.delete($r.key===null?Pn:$r.key),Je=ue($r,Je,Pn),Sn===null?Br=$r:Sn.sibling=$r,Sn=$r);return S&&kr.forEach(function(BF){return D(rt,BF)}),Br}return function(rt,Je,At,Wt){var Br=typeof At=="object"&&At!==null&&At.type===w&&At.key===null;Br&&(At=At.props.children);var Sn=typeof At=="object"&&At!==null;if(Sn)switch(At.$$typeof){case p:e:{for(Sn=At.key,Br=Je;Br!==null;){if(Br.key===Sn)if(Br.tag===7?At.type===w:Br.elementType===At.type){T(rt,Br.sibling),Je=W(Br,At.type===w?At.props.children:At.props,Wt),Je.ref=kA(rt,Br,At),Je.return=rt,rt=Je;break e}else{T(rt,Br);break}else D(rt,Br);Br=Br.sibling}At.type===w?(Je=Qu(At.props.children,rt.mode,Wt,At.key),Je.return=rt,rt=Je):(Wt=Hm(At.type,At.key,At.props,null,rt.mode,Wt),Wt.ref=kA(rt,Je,At),Wt.return=rt,rt=Wt)}return De(rt);case h:e:{for(Br=At.key;Je!==null;){if(Je.key===Br)if(Je.tag===4&&Je.stateNode.containerInfo===At.containerInfo&&Je.stateNode.implementation===At.implementation){T(rt,Je.sibling),Je=W(Je,At.children||[],Wt),Je.return=rt,rt=Je;break e}else{T(rt,Je);break}else D(rt,Je);Je=Je.sibling}Je=kC(At,rt.mode,Wt),Je.return=rt,rt=Je}return De(rt)}if(typeof At=="string"||typeof At=="number")return At=""+At,Je!==null&&Je.tag===6?(T(rt,Je.sibling),Je=W(Je,At,Wt),Je.return=rt,rt=Je):(T(rt,Je),Je=QC(At,rt.mode,Wt),Je.return=rt,rt=Je),De(rt);if(QA(At))return JA(rt,Je,At,Wt);if(de(At))return Yo(rt,Je,At,Wt);if(Sn&&cp(rt,At),typeof At>"u"&&!Br)switch(rt.tag){case 1:case 0:throw rt=rt.type,Error(n(152,rt.displayName||rt.name||"Component"))}return T(rt,Je)}}var mu=rg(!0),ng=rg(!1),yu={},uo={current:yu},FA={current:yu},mc={current:yu};function ua(S){if(S===yu)throw Error(n(174));return S}function ig(S,D){Ln(mc,D,S),Ln(FA,S,S),Ln(uo,yu,S),D=ne(D),Kn(uo,S),Ln(uo,D,S)}function yc(S){Kn(uo,S),Kn(FA,S),Kn(mc,S)}function Sm(S){var D=ua(mc.current),T=ua(uo.current);D=te(T,S.type,D),T!==D&&(Ln(FA,S,S),Ln(uo,D,S))}function sg(S){FA.current===S&&(Kn(uo,S),Kn(FA,S))}var Xn={current:0};function up(S){for(var D=S;D!==null;){if(D.tag===13){var T=D.memoizedState;if(T!==null&&(T=T.dehydrated,T===null||Ms(T)||so(T)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if((D.effectTag&64)!==0)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===S)break;for(;D.sibling===null;){if(D.return===null||D.return===S)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}function og(S,D){return{responder:S,props:D}}var RA=u.ReactCurrentDispatcher,qs=u.ReactCurrentBatchConfig,Eu=0,Ha=null,Yi=null,Aa=null,wu=null,ws=null,Ec=null,wc=0,Y=null,Dt=0,wl=!1,xi=null,Cc=0;function ct(){throw Error(n(321))}function Cu(S,D){if(D===null)return!1;for(var T=0;T<D.length&&T<S.length;T++)if(!gs(S[T],D[T]))return!1;return!0}function ag(S,D,T,j,W,ue){if(Eu=ue,Ha=D,Aa=S!==null?S.memoizedState:null,RA.current=Aa===null?mC:bm,D=T(j,W),wl){do wl=!1,Cc+=1,Aa=S!==null?S.memoizedState:null,Ec=wu,Y=ws=Yi=null,RA.current=bm,D=T(j,W);while(wl);xi=null,Cc=0}if(RA.current=Bu,S=Ha,S.memoizedState=wu,S.expirationTime=wc,S.updateQueue=Y,S.effectTag|=Dt,S=Yi!==null&&Yi.next!==null,Eu=0,Ec=ws=wu=Aa=Yi=Ha=null,wc=0,Y=null,Dt=0,S)throw Error(n(300));return D}function dC(){RA.current=Bu,Eu=0,Ec=ws=wu=Aa=Yi=Ha=null,wc=0,Y=null,Dt=0,wl=!1,xi=null,Cc=0}function TA(){var S={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return ws===null?wu=ws=S:ws=ws.next=S,ws}function Ap(){if(Ec!==null)ws=Ec,Ec=ws.next,Yi=Aa,Aa=Yi!==null?Yi.next:null;else{if(Aa===null)throw Error(n(310));Yi=Aa;var S={memoizedState:Yi.memoizedState,baseState:Yi.baseState,queue:Yi.queue,baseUpdate:Yi.baseUpdate,next:null};ws=ws===null?wu=S:ws.next=S,Aa=Yi.next}return ws}function Ir(S,D){return typeof D=="function"?D(S):D}function Cs(S){var D=Ap(),T=D.queue;if(T===null)throw Error(n(311));if(T.lastRenderedReducer=S,0<Cc){var j=T.dispatch;if(xi!==null){var W=xi.get(T);if(W!==void 0){xi.delete(T);var ue=D.memoizedState;do ue=S(ue,W.action),W=W.next;while(W!==null);return gs(ue,D.memoizedState)||(qo=!0),D.memoizedState=ue,D.baseUpdate===T.last&&(D.baseState=ue),T.lastRenderedState=ue,[ue,j]}}return[D.memoizedState,j]}j=T.last;var De=D.baseUpdate;if(ue=D.baseState,De!==null?(j!==null&&(j.next=null),j=De.next):j=j!==null?j.next:null,j!==null){var vt=W=null,Ct=j,bt=!1;do{var Ur=Ct.expirationTime;Ur<Eu?(bt||(bt=!0,vt=De,W=ue),Ur>wc&&(wc=Ur,_m(wc))):(DC(Ur,Ct.suspenseConfig),ue=Ct.eagerReducer===S?Ct.eagerState:S(ue,Ct.action)),De=Ct,Ct=Ct.next}while(Ct!==null&&Ct!==j);bt||(vt=De,W=ue),gs(ue,D.memoizedState)||(qo=!0),D.memoizedState=ue,D.baseUpdate=vt,D.baseState=W,T.lastRenderedState=ue}return[D.memoizedState,T.dispatch]}function lg(S){var D=TA();return typeof S=="function"&&(S=S()),D.memoizedState=D.baseState=S,S=D.queue={last:null,dispatch:null,lastRenderedReducer:Ir,lastRenderedState:S},S=S.dispatch=pg.bind(null,Ha,S),[D.memoizedState,S]}function cg(S){return Cs(Ir,S)}function ug(S,D,T,j){return S={tag:S,create:D,destroy:T,deps:j,next:null},Y===null?(Y={lastEffect:null},Y.lastEffect=S.next=S):(D=Y.lastEffect,D===null?Y.lastEffect=S.next=S:(T=D.next,D.next=S,S.next=T,Y.lastEffect=S)),S}function fp(S,D,T,j){var W=TA();Dt|=S,W.memoizedState=ug(D,T,void 0,j===void 0?null:j)}function Ic(S,D,T,j){var W=Ap();j=j===void 0?null:j;var ue=void 0;if(Yi!==null){var De=Yi.memoizedState;if(ue=De.destroy,j!==null&&Cu(j,De.deps)){ug(0,T,ue,j);return}}Dt|=S,W.memoizedState=ug(D,T,ue,j)}function wt(S,D){return fp(516,192,S,D)}function Pm(S,D){return Ic(516,192,S,D)}function Ag(S,D){if(typeof D=="function")return S=S(),D(S),function(){D(null)};if(D!=null)return S=S(),D.current=S,function(){D.current=null}}function fg(){}function Iu(S,D){return TA().memoizedState=[S,D===void 0?null:D],S}function xm(S,D){var T=Ap();D=D===void 0?null:D;var j=T.memoizedState;return j!==null&&D!==null&&Cu(D,j[1])?j[0]:(T.memoizedState=[S,D],S)}function pg(S,D,T){if(!(25>Cc))throw Error(n(301));var j=S.alternate;if(S===Ha||j!==null&&j===Ha)if(wl=!0,S={expirationTime:Eu,suspenseConfig:null,action:T,eagerReducer:null,eagerState:null,next:null},xi===null&&(xi=new Map),T=xi.get(D),T===void 0)xi.set(D,S);else{for(D=T;D.next!==null;)D=D.next;D.next=S}else{var W=da(),ue=pt.suspense;W=jA(W,S,ue),ue={expirationTime:W,suspenseConfig:ue,action:T,eagerReducer:null,eagerState:null,next:null};var De=D.last;if(De===null)ue.next=ue;else{var vt=De.next;vt!==null&&(ue.next=vt),De.next=ue}if(D.last=ue,S.expirationTime===0&&(j===null||j.expirationTime===0)&&(j=D.lastRenderedReducer,j!==null))try{var Ct=D.lastRenderedState,bt=j(Ct,T);if(ue.eagerReducer=j,ue.eagerState=bt,gs(bt,Ct))return}catch{}finally{}Pc(S,W)}}var Bu={readContext:ys,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useResponder:ct,useDeferredValue:ct,useTransition:ct},mC={readContext:ys,useCallback:Iu,useContext:ys,useEffect:wt,useImperativeHandle:function(S,D,T){return T=T!=null?T.concat([S]):null,fp(4,36,Ag.bind(null,D,S),T)},useLayoutEffect:function(S,D){return fp(4,36,S,D)},useMemo:function(S,D){var T=TA();return D=D===void 0?null:D,S=S(),T.memoizedState=[S,D],S},useReducer:function(S,D,T){var j=TA();return D=T!==void 0?T(D):D,j.memoizedState=j.baseState=D,S=j.queue={last:null,dispatch:null,lastRenderedReducer:S,lastRenderedState:D},S=S.dispatch=pg.bind(null,Ha,S),[j.memoizedState,S]},useRef:function(S){var D=TA();return S={current:S},D.memoizedState=S},useState:lg,useDebugValue:fg,useResponder:og,useDeferredValue:function(S,D){var T=lg(S),j=T[0],W=T[1];return wt(function(){a.unstable_next(function(){var ue=qs.suspense;qs.suspense=D===void 0?null:D;try{W(S)}finally{qs.suspense=ue}})},[S,D]),j},useTransition:function(S){var D=lg(!1),T=D[0],j=D[1];return[Iu(function(W){j(!0),a.unstable_next(function(){var ue=qs.suspense;qs.suspense=S===void 0?null:S;try{j(!1),W()}finally{qs.suspense=ue}})},[S,T]),T]}},bm={readContext:ys,useCallback:xm,useContext:ys,useEffect:Pm,useImperativeHandle:function(S,D,T){return T=T!=null?T.concat([S]):null,Ic(4,36,Ag.bind(null,D,S),T)},useLayoutEffect:function(S,D){return Ic(4,36,S,D)},useMemo:function(S,D){var T=Ap();D=D===void 0?null:D;var j=T.memoizedState;return j!==null&&D!==null&&Cu(D,j[1])?j[0]:(S=S(),T.memoizedState=[S,D],S)},useReducer:Cs,useRef:function(){return Ap().memoizedState},useState:cg,useDebugValue:fg,useResponder:og,useDeferredValue:function(S,D){var T=cg(S),j=T[0],W=T[1];return Pm(function(){a.unstable_next(function(){var ue=qs.suspense;qs.suspense=D===void 0?null:D;try{W(S)}finally{qs.suspense=ue}})},[S,D]),j},useTransition:function(S){var D=cg(!1),T=D[0],j=D[1];return[xm(function(W){j(!0),a.unstable_next(function(){var ue=qs.suspense;qs.suspense=S===void 0?null:S;try{j(!1),W()}finally{qs.suspense=ue}})},[S,T]),T]}},fa=null,Bc=null,Cl=!1;function vu(S,D){var T=vl(5,null,null,0);T.elementType="DELETED",T.type="DELETED",T.stateNode=D,T.return=S,T.effectTag=8,S.lastEffect!==null?(S.lastEffect.nextEffect=T,S.lastEffect=T):S.firstEffect=S.lastEffect=T}function hg(S,D){switch(S.tag){case 5:return D=io(D,S.type,S.pendingProps),D!==null?(S.stateNode=D,!0):!1;case 6:return D=Si(D,S.pendingProps),D!==null?(S.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function NA(S){if(Cl){var D=Bc;if(D){var T=D;if(!hg(S,D)){if(D=cc(T),!D||!hg(S,D)){S.effectTag=S.effectTag&-1025|2,Cl=!1,fa=S;return}vu(fa,T)}fa=S,Bc=Au(D)}else S.effectTag=S.effectTag&-1025|2,Cl=!1,fa=S}}function pp(S){for(S=S.return;S!==null&&S.tag!==5&&S.tag!==3&&S.tag!==13;)S=S.return;fa=S}function ja(S){if(!y||S!==fa)return!1;if(!Cl)return pp(S),Cl=!0,!1;var D=S.type;if(S.tag!==5||D!=="head"&&D!=="body"&&!Qe(D,S.memoizedProps))for(D=Bc;D;)vu(S,D),D=cc(D);if(pp(S),S.tag===13){if(!y)throw Error(n(316));if(S=S.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(n(317));Bc=Us(S)}else Bc=fa?cc(S.stateNode):null;return!0}function gg(){y&&(Bc=fa=null,Cl=!1)}var hp=u.ReactCurrentOwner,qo=!1;function Is(S,D,T,j){D.child=S===null?ng(D,null,T,j):mu(D,S.child,T,j)}function Ci(S,D,T,j,W){T=T.render;var ue=D.ref;return ms(D,W),j=ag(S,D,T,j,ue,W),S!==null&&!qo?(D.updateQueue=S.updateQueue,D.effectTag&=-517,S.expirationTime<=W&&(S.expirationTime=0),ii(S,D,W)):(D.effectTag|=1,Is(S,D,j,W),D.child)}function Qm(S,D,T,j,W,ue){if(S===null){var De=T.type;return typeof De=="function"&&!bC(De)&&De.defaultProps===void 0&&T.compare===null&&T.defaultProps===void 0?(D.tag=15,D.type=De,km(S,D,De,j,W,ue)):(S=Hm(T.type,null,j,null,D.mode,ue),S.ref=D.ref,S.return=D,D.child=S)}return De=S.child,W<ue&&(W=De.memoizedProps,T=T.compare,T=T!==null?T:kn,T(W,j)&&S.ref===D.ref)?ii(S,D,ue):(D.effectTag|=1,S=WA(De,j,ue),S.ref=D.ref,S.return=D,D.child=S)}function km(S,D,T,j,W,ue){return S!==null&&kn(S.memoizedProps,j)&&S.ref===D.ref&&(qo=!1,W<ue)?ii(S,D,ue):LA(S,D,T,j,ue)}function Go(S,D){var T=D.ref;(S===null&&T!==null||S!==null&&S.ref!==T)&&(D.effectTag|=128)}function LA(S,D,T,j,W){var ue=ni(T)?ve:On.current;return ue=Li(D,ue),ms(D,W),T=ag(S,D,T,j,ue,W),S!==null&&!qo?(D.updateQueue=S.updateQueue,D.effectTag&=-517,S.expirationTime<=W&&(S.expirationTime=0),ii(S,D,W)):(D.effectTag|=1,Is(S,D,T,W),D.child)}function gp(S,D,T,j,W){if(ni(T)){var ue=!0;Ac(D)}else ue=!1;if(ms(D,W),D.stateNode===null)S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),$i(D,T,j,W),jo(D,T,j,W),j=!0;else if(S===null){var De=D.stateNode,vt=D.memoizedProps;De.props=vt;var Ct=De.context,bt=T.contextType;typeof bt=="object"&&bt!==null?bt=ys(bt):(bt=ni(T)?ve:On.current,bt=Li(D,bt));var Ur=T.getDerivedStateFromProps,ns=typeof Ur=="function"||typeof De.getSnapshotBeforeUpdate=="function";ns||typeof De.UNSAFE_componentWillReceiveProps!="function"&&typeof De.componentWillReceiveProps!="function"||(vt!==j||Ct!==bt)&&Pi(D,De,j,bt),js=!1;var gi=D.memoizedState;Ct=De.state=gi;var po=D.updateQueue;po!==null&&(me(D,po,j,De,W),Ct=D.memoizedState),vt!==j||gi!==Ct||Hi.current||js?(typeof Ur=="function"&&(er(D,T,Ur,j),Ct=D.memoizedState),(vt=js||Gi(D,T,vt,j,gi,Ct,bt))?(ns||typeof De.UNSAFE_componentWillMount!="function"&&typeof De.componentWillMount!="function"||(typeof De.componentWillMount=="function"&&De.componentWillMount(),typeof De.UNSAFE_componentWillMount=="function"&&De.UNSAFE_componentWillMount()),typeof De.componentDidMount=="function"&&(D.effectTag|=4)):(typeof De.componentDidMount=="function"&&(D.effectTag|=4),D.memoizedProps=j,D.memoizedState=Ct),De.props=j,De.state=Ct,De.context=bt,j=vt):(typeof De.componentDidMount=="function"&&(D.effectTag|=4),j=!1)}else De=D.stateNode,vt=D.memoizedProps,De.props=D.type===D.elementType?vt:Ei(D.type,vt),Ct=De.context,bt=T.contextType,typeof bt=="object"&&bt!==null?bt=ys(bt):(bt=ni(T)?ve:On.current,bt=Li(D,bt)),Ur=T.getDerivedStateFromProps,(ns=typeof Ur=="function"||typeof De.getSnapshotBeforeUpdate=="function")||typeof De.UNSAFE_componentWillReceiveProps!="function"&&typeof De.componentWillReceiveProps!="function"||(vt!==j||Ct!==bt)&&Pi(D,De,j,bt),js=!1,Ct=D.memoizedState,gi=De.state=Ct,po=D.updateQueue,po!==null&&(me(D,po,j,De,W),gi=D.memoizedState),vt!==j||Ct!==gi||Hi.current||js?(typeof Ur=="function"&&(er(D,T,Ur,j),gi=D.memoizedState),(Ur=js||Gi(D,T,vt,j,Ct,gi,bt))?(ns||typeof De.UNSAFE_componentWillUpdate!="function"&&typeof De.componentWillUpdate!="function"||(typeof De.componentWillUpdate=="function"&&De.componentWillUpdate(j,gi,bt),typeof De.UNSAFE_componentWillUpdate=="function"&&De.UNSAFE_componentWillUpdate(j,gi,bt)),typeof De.componentDidUpdate=="function"&&(D.effectTag|=4),typeof De.getSnapshotBeforeUpdate=="function"&&(D.effectTag|=256)):(typeof De.componentDidUpdate!="function"||vt===S.memoizedProps&&Ct===S.memoizedState||(D.effectTag|=4),typeof De.getSnapshotBeforeUpdate!="function"||vt===S.memoizedProps&&Ct===S.memoizedState||(D.effectTag|=256),D.memoizedProps=j,D.memoizedState=gi),De.props=j,De.state=gi,De.context=bt,j=Ur):(typeof De.componentDidUpdate!="function"||vt===S.memoizedProps&&Ct===S.memoizedState||(D.effectTag|=4),typeof De.getSnapshotBeforeUpdate!="function"||vt===S.memoizedProps&&Ct===S.memoizedState||(D.effectTag|=256),j=!1);return dp(S,D,T,j,ue,W)}function dp(S,D,T,j,W,ue){Go(S,D);var De=(D.effectTag&64)!==0;if(!j&&!De)return W&&yl(D,T,!1),ii(S,D,ue);j=D.stateNode,hp.current=D;var vt=De&&typeof T.getDerivedStateFromError!="function"?null:j.render();return D.effectTag|=1,S!==null&&De?(D.child=mu(D,S.child,null,ue),D.child=mu(D,null,vt,ue)):Is(S,D,vt,ue),D.memoizedState=j.state,W&&yl(D,T,!0),D.child}function dg(S){var D=S.stateNode;D.pendingContext?uc(S,D.pendingContext,D.pendingContext!==D.context):D.context&&uc(S,D.context,!1),ig(S,D.containerInfo)}var pa={dehydrated:null,retryTime:0};function an(S,D,T){var j=D.mode,W=D.pendingProps,ue=Xn.current,De=!1,vt;if((vt=(D.effectTag&64)!==0)||(vt=(ue&2)!==0&&(S===null||S.memoizedState!==null)),vt?(De=!0,D.effectTag&=-65):S!==null&&S.memoizedState===null||W.fallback===void 0||W.unstable_avoidThisFallback===!0||(ue|=1),Ln(Xn,ue&1,D),S===null){if(W.fallback!==void 0&&NA(D),De){if(De=W.fallback,W=Qu(null,j,0,null),W.return=D,(D.mode&2)===0)for(S=D.memoizedState!==null?D.child.child:D.child,W.child=S;S!==null;)S.return=W,S=S.sibling;return T=Qu(De,j,T,null),T.return=D,W.sibling=T,D.memoizedState=pa,D.child=W,T}return j=W.children,D.memoizedState=null,D.child=ng(D,null,j,T)}if(S.memoizedState!==null){if(S=S.child,j=S.sibling,De){if(W=W.fallback,T=WA(S,S.pendingProps,0),T.return=D,(D.mode&2)===0&&(De=D.memoizedState!==null?D.child.child:D.child,De!==S.child))for(T.child=De;De!==null;)De.return=T,De=De.sibling;return j=WA(j,W,j.expirationTime),j.return=D,T.sibling=j,T.childExpirationTime=0,D.memoizedState=pa,D.child=T,j}return T=mu(D,S.child,W.children,T),D.memoizedState=null,D.child=T}if(S=S.child,De){if(De=W.fallback,W=Qu(null,j,0,null),W.return=D,W.child=S,S!==null&&(S.return=W),(D.mode&2)===0)for(S=D.memoizedState!==null?D.child.child:D.child,W.child=S;S!==null;)S.return=W,S=S.sibling;return T=Qu(De,j,T,null),T.return=D,W.sibling=T,T.effectTag|=2,W.childExpirationTime=0,D.memoizedState=pa,D.child=W,T}return D.memoizedState=null,D.child=mu(D,S,W.children,T)}function Ao(S,D){S.expirationTime<D&&(S.expirationTime=D);var T=S.alternate;T!==null&&T.expirationTime<D&&(T.expirationTime=D),ds(S.return,D)}function OA(S,D,T,j,W,ue){var De=S.memoizedState;De===null?S.memoizedState={isBackwards:D,rendering:null,last:j,tail:T,tailExpiration:0,tailMode:W,lastEffect:ue}:(De.isBackwards=D,De.rendering=null,De.last=j,De.tail=T,De.tailExpiration=0,De.tailMode=W,De.lastEffect=ue)}function qa(S,D,T){var j=D.pendingProps,W=j.revealOrder,ue=j.tail;if(Is(S,D,j.children,T),j=Xn.current,(j&2)!==0)j=j&1|2,D.effectTag|=64;else{if(S!==null&&(S.effectTag&64)!==0)e:for(S=D.child;S!==null;){if(S.tag===13)S.memoizedState!==null&&Ao(S,T);else if(S.tag===19)Ao(S,T);else if(S.child!==null){S.child.return=S,S=S.child;continue}if(S===D)break e;for(;S.sibling===null;){if(S.return===null||S.return===D)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}j&=1}if(Ln(Xn,j,D),(D.mode&2)===0)D.memoizedState=null;else switch(W){case"forwards":for(T=D.child,W=null;T!==null;)S=T.alternate,S!==null&&up(S)===null&&(W=T),T=T.sibling;T=W,T===null?(W=D.child,D.child=null):(W=T.sibling,T.sibling=null),OA(D,!1,W,T,ue,D.lastEffect);break;case"backwards":for(T=null,W=D.child,D.child=null;W!==null;){if(S=W.alternate,S!==null&&up(S)===null){D.child=W;break}S=W.sibling,W.sibling=T,T=W,W=S}OA(D,!0,T,null,ue,D.lastEffect);break;case"together":OA(D,!1,null,null,void 0,D.lastEffect);break;default:D.memoizedState=null}return D.child}function ii(S,D,T){S!==null&&(D.dependencies=S.dependencies);var j=D.expirationTime;if(j!==0&&_m(j),D.childExpirationTime<T)return null;if(S!==null&&D.child!==S.child)throw Error(n(153));if(D.child!==null){for(S=D.child,T=WA(S,S.pendingProps,S.expirationTime),D.child=T,T.return=D;S.sibling!==null;)S=S.sibling,T=T.sibling=WA(S,S.pendingProps,S.expirationTime),T.return=D;T.sibling=null}return D.child}function ha(S){S.effectTag|=4}var vc,Il,es,qr;if(C)vc=function(S,D){for(var T=D.child;T!==null;){if(T.tag===5||T.tag===6)H(S,T.stateNode);else if(T.tag!==4&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===D)break;for(;T.sibling===null;){if(T.return===null||T.return===D)return;T=T.return}T.sibling.return=T.return,T=T.sibling}},Il=function(){},es=function(S,D,T,j,W){if(S=S.memoizedProps,S!==j){var ue=D.stateNode,De=ua(uo.current);T=Te(ue,T,S,j,W,De),(D.updateQueue=T)&&ha(D)}},qr=function(S,D,T,j){T!==j&&ha(D)};else if(P){vc=function(S,D,T,j){for(var W=D.child;W!==null;){if(W.tag===5){var ue=W.stateNode;T&&j&&(ue=Ti(ue,W.type,W.memoizedProps,W)),H(S,ue)}else if(W.tag===6)ue=W.stateNode,T&&j&&(ue=hs(ue,W.memoizedProps,W)),H(S,ue);else if(W.tag!==4){if(W.tag===13&&(W.effectTag&4)!==0&&(ue=W.memoizedState!==null)){var De=W.child;if(De!==null&&(De.child!==null&&(De.child.return=De,vc(S,De,!0,ue)),ue=De.sibling,ue!==null)){ue.return=W,W=ue;continue}}if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===D)break;for(;W.sibling===null;){if(W.return===null||W.return===D)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};var mp=function(S,D,T,j){for(var W=D.child;W!==null;){if(W.tag===5){var ue=W.stateNode;T&&j&&(ue=Ti(ue,W.type,W.memoizedProps,W)),Yr(S,ue)}else if(W.tag===6)ue=W.stateNode,T&&j&&(ue=hs(ue,W.memoizedProps,W)),Yr(S,ue);else if(W.tag!==4){if(W.tag===13&&(W.effectTag&4)!==0&&(ue=W.memoizedState!==null)){var De=W.child;if(De!==null&&(De.child!==null&&(De.child.return=De,mp(S,De,!0,ue)),ue=De.sibling,ue!==null)){ue.return=W,W=ue;continue}}if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===D)break;for(;W.sibling===null;){if(W.return===null||W.return===D)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};Il=function(S){var D=S.stateNode;if(S.firstEffect!==null){var T=D.containerInfo,j=Pr(T);mp(j,S,!1,!1),D.pendingChildren=j,ha(S),Wn(T,j)}},es=function(S,D,T,j,W){var ue=S.stateNode,De=S.memoizedProps;if((S=D.firstEffect===null)&&De===j)D.stateNode=ue;else{var vt=D.stateNode,Ct=ua(uo.current),bt=null;De!==j&&(bt=Te(vt,T,De,j,W,Ct)),S&&bt===null?D.stateNode=ue:(ue=dr(ue,bt,T,De,j,D,S,vt),at(ue,T,j,W,Ct)&&ha(D),D.stateNode=ue,S?ha(D):vc(ue,D,!1,!1))}},qr=function(S,D,T,j){T!==j&&(S=ua(mc.current),T=ua(uo.current),D.stateNode=He(j,S,T,D),ha(D))}}else Il=function(){},es=function(){},qr=function(){};function Dc(S,D){switch(S.tailMode){case"hidden":D=S.tail;for(var T=null;D!==null;)D.alternate!==null&&(T=D),D=D.sibling;T===null?S.tail=null:T.sibling=null;break;case"collapsed":T=S.tail;for(var j=null;T!==null;)T.alternate!==null&&(j=T),T=T.sibling;j===null?D||S.tail===null?S.tail=null:S.tail.sibling=null:j.sibling=null}}function yC(S){switch(S.tag){case 1:ni(S.type)&&Ma(S);var D=S.effectTag;return D&4096?(S.effectTag=D&-4097|64,S):null;case 3:if(yc(S),pr(S),D=S.effectTag,(D&64)!==0)throw Error(n(285));return S.effectTag=D&-4097|64,S;case 5:return sg(S),null;case 13:return Kn(Xn,S),D=S.effectTag,D&4096?(S.effectTag=D&-4097|64,S):null;case 19:return Kn(Xn,S),null;case 4:return yc(S),null;case 10:return wi(S),null;default:return null}}function mg(S,D){return{value:S,source:D,stack:dl(D)}}var yg=typeof WeakSet=="function"?WeakSet:Set;function Ga(S,D){var T=D.source,j=D.stack;j===null&&T!==null&&(j=dl(T)),T!==null&&oe(T.type),D=D.value,S!==null&&S.tag===1&&oe(S.type);try{console.error(D)}catch(W){setTimeout(function(){throw W})}}function Fm(S,D){try{D.props=S.memoizedProps,D.state=S.memoizedState,D.componentWillUnmount()}catch(T){YA(S,T)}}function Eg(S){var D=S.ref;if(D!==null)if(typeof D=="function")try{D(null)}catch(T){YA(S,T)}else D.current=null}function kt(S,D){switch(D.tag){case 0:case 11:case 15:L(2,0,D);break;case 1:if(D.effectTag&256&&S!==null){var T=S.memoizedProps,j=S.memoizedState;S=D.stateNode,D=S.getSnapshotBeforeUpdate(D.elementType===D.type?T:Ei(D.type,T),j),S.__reactInternalSnapshotBeforeUpdate=D}break;case 3:case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}function L(S,D,T){if(T=T.updateQueue,T=T!==null?T.lastEffect:null,T!==null){var j=T=T.next;do{if((j.tag&S)!==0){var W=j.destroy;j.destroy=void 0,W!==void 0&&W()}(j.tag&D)!==0&&(W=j.create,j.destroy=W()),j=j.next}while(j!==T)}}function K(S,D,T){switch(typeof xC=="function"&&xC(D),D.tag){case 0:case 11:case 14:case 15:if(S=D.updateQueue,S!==null&&(S=S.lastEffect,S!==null)){var j=S.next;lo(97<T?97:T,function(){var W=j;do{var ue=W.destroy;if(ue!==void 0){var De=D;try{ue()}catch(vt){YA(De,vt)}}W=W.next}while(W!==j)})}break;case 1:Eg(D),T=D.stateNode,typeof T.componentWillUnmount=="function"&&Fm(D,T);break;case 5:Eg(D);break;case 4:C?Er(S,D,T):P&&ze(D)}}function re(S,D,T){for(var j=D;;)if(K(S,j,T),j.child===null||C&&j.tag===4){if(j===D)break;for(;j.sibling===null;){if(j.return===null||j.return===D)return;j=j.return}j.sibling.return=j.return,j=j.sibling}else j.child.return=j,j=j.child}function pe(S){var D=S.alternate;S.return=null,S.child=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.alternate=null,S.firstEffect=null,S.lastEffect=null,S.pendingProps=null,S.memoizedProps=null,D!==null&&pe(D)}function ze(S){if(P){S=S.stateNode.containerInfo;var D=Pr(S);Os(S,D)}}function mt(S){return S.tag===5||S.tag===3||S.tag===4}function Ar(S){if(C){e:{for(var D=S.return;D!==null;){if(mt(D)){var T=D;break e}D=D.return}throw Error(n(160))}switch(D=T.stateNode,T.tag){case 5:var j=!1;break;case 3:D=D.containerInfo,j=!0;break;case 4:D=D.containerInfo,j=!0;break;default:throw Error(n(161))}T.effectTag&16&&(jt(D),T.effectTag&=-17);e:t:for(T=S;;){for(;T.sibling===null;){if(T.return===null||mt(T.return)){T=null;break e}T=T.return}for(T.sibling.return=T.return,T=T.sibling;T.tag!==5&&T.tag!==6&&T.tag!==18;){if(T.effectTag&2||T.child===null||T.tag===4)continue t;T.child.return=T,T=T.child}if(!(T.effectTag&2)){T=T.stateNode;break e}}for(var W=S;;){var ue=W.tag===5||W.tag===6;if(ue)ue=ue?W.stateNode:W.stateNode.instance,T?j?Le(D,ue,T):Pe(D,ue,T):j?z(D,ue):F(D,ue);else if(W.tag!==4&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===S)break;for(;W.sibling===null;){if(W.return===null||W.return===S)return;W=W.return}W.sibling.return=W.return,W=W.sibling}}}function Er(S,D,T){for(var j=D,W=!1,ue,De;;){if(!W){W=j.return;e:for(;;){if(W===null)throw Error(n(160));switch(ue=W.stateNode,W.tag){case 5:De=!1;break e;case 3:ue=ue.containerInfo,De=!0;break e;case 4:ue=ue.containerInfo,De=!0;break e}W=W.return}W=!0}if(j.tag===5||j.tag===6)re(S,j,T),De?gt(ue,j.stateNode):ot(ue,j.stateNode);else if(j.tag===4){if(j.child!==null){ue=j.stateNode.containerInfo,De=!0,j.child.return=j,j=j.child;continue}}else if(K(S,j,T),j.child!==null){j.child.return=j,j=j.child;continue}if(j===D)break;for(;j.sibling===null;){if(j.return===null||j.return===D)return;j=j.return,j.tag===4&&(W=!1)}j.sibling.return=j.return,j=j.sibling}}function mn(S,D){if(C)switch(D.tag){case 0:case 11:case 14:case 15:L(4,8,D);break;case 1:break;case 5:var T=D.stateNode;if(T!=null){var j=D.memoizedProps;S=S!==null?S.memoizedProps:j;var W=D.type,ue=D.updateQueue;D.updateQueue=null,ue!==null&&ie(T,ue,W,S,j,D)}break;case 6:if(D.stateNode===null)throw Error(n(162));T=D.memoizedProps,X(D.stateNode,S!==null?S.memoizedProps:T,T);break;case 3:y&&(D=D.stateNode,D.hydrate&&(D.hydrate=!1,vn(D.containerInfo)));break;case 12:break;case 13:si(D),Mi(D);break;case 19:Mi(D);break;case 17:break;case 20:break;case 21:break;default:throw Error(n(163))}else{switch(D.tag){case 0:case 11:case 14:case 15:L(4,8,D);return;case 12:return;case 13:si(D),Mi(D);return;case 19:Mi(D);return;case 3:y&&(T=D.stateNode,T.hydrate&&(T.hydrate=!1,vn(T.containerInfo)))}e:if(P)switch(D.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:D=D.stateNode,Os(D.containerInfo,D.pendingChildren);break e;default:throw Error(n(163))}}}function si(S){var D=S;if(S.memoizedState===null)var T=!1;else T=!0,D=S.child,CC=Oi();if(C&&D!==null){e:if(S=D,C)for(D=S;;){if(D.tag===5){var j=D.stateNode;T?$t(j):on(D.stateNode,D.memoizedProps)}else if(D.tag===6)j=D.stateNode,T?xt(j):br(j,D.memoizedProps);else if(D.tag===13&&D.memoizedState!==null&&D.memoizedState.dehydrated===null){j=D.child.sibling,j.return=D,D=j;continue}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===S)break e;for(;D.sibling===null;){if(D.return===null||D.return===S)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}}}function Mi(S){var D=S.updateQueue;if(D!==null){S.updateQueue=null;var T=S.stateNode;T===null&&(T=S.stateNode=new yg),D.forEach(function(j){var W=mF.bind(null,S,j);T.has(j)||(T.add(j),j.then(W,W))})}}var wg=typeof WeakMap=="function"?WeakMap:Map;function qv(S,D,T){T=Es(T,null),T.tag=3,T.payload={element:null};var j=D.value;return T.callback=function(){Su||(Su=!0,Om=j),Ga(S,D)},T}function Gv(S,D,T){T=Es(T,null),T.tag=3;var j=S.type.getDerivedStateFromError;if(typeof j=="function"){var W=D.value;T.payload=function(){return Ga(S,D),j(W)}}var ue=S.stateNode;return ue!==null&&typeof ue.componentDidCatch=="function"&&(T.callback=function(){typeof j!="function"&&(Pu===null?Pu=new Set([this]):Pu.add(this),Ga(S,D));var De=D.stack;this.componentDidCatch(D.value,{componentStack:De!==null?De:""})}),T}var EC=Math.ceil,yp=u.ReactCurrentDispatcher,wC=u.ReactCurrentOwner,yn=0,Rm=8,ts=16,Gs=32,Du=0,Tm=1,Ii=2,ga=3,Bl=4,Sc=5,mr=yn,hi=null,Lr=null,rs=0,Wi=Du,Nm=null,Ya=1073741823,MA=1073741823,Lm=null,Ep=0,UA=!1,CC=0,IC=500,ir=null,Su=!1,Om=null,Pu=null,wp=!1,Cg=null,_A=90,HA=null,Ig=0,BC=null,Mm=0;function da(){return(mr&(ts|Gs))!==yn?1073741821-(Oi()/10|0):Mm!==0?Mm:Mm=1073741821-(Oi()/10|0)}function jA(S,D,T){if(D=D.mode,(D&2)===0)return 1073741823;var j=_o();if((D&4)===0)return j===99?1073741823:1073741822;if((mr&ts)!==yn)return rs;if(T!==null)S=Ua(S,T.timeoutMs|0||5e3,250);else switch(j){case 99:S=1073741823;break;case 98:S=Ua(S,150,100);break;case 97:case 96:S=Ua(S,5e3,250);break;case 95:S=2;break;default:throw Error(n(326))}return hi!==null&&S===rs&&--S,S}function Pc(S,D){if(50<Ig)throw Ig=0,BC=null,Error(n(185));if(S=Bg(S,D),S!==null){var T=_o();D===1073741823?(mr&Rm)!==yn&&(mr&(ts|Gs))===yn?vC(S):(fo(S),mr===yn&&qi()):fo(S),(mr&4)===yn||T!==98&&T!==99||(HA===null?HA=new Map([[S,D]]):(T=HA.get(S),(T===void 0||T>D)&&HA.set(S,D)))}}function Bg(S,D){S.expirationTime<D&&(S.expirationTime=D);var T=S.alternate;T!==null&&T.expirationTime<D&&(T.expirationTime=D);var j=S.return,W=null;if(j===null&&S.tag===3)W=S.stateNode;else for(;j!==null;){if(T=j.alternate,j.childExpirationTime<D&&(j.childExpirationTime=D),T!==null&&T.childExpirationTime<D&&(T.childExpirationTime=D),j.return===null&&j.tag===3){W=j.stateNode;break}j=j.return}return W!==null&&(hi===W&&(_m(D),Wi===Bl&&KA(W,rs)),$v(W,D)),W}function Um(S){var D=S.lastExpiredTime;return D!==0||(D=S.firstPendingTime,!Zv(S,D))?D:(D=S.lastPingedTime,S=S.nextKnownPendingLevel,D>S?D:S)}function fo(S){if(S.lastExpiredTime!==0)S.callbackExpirationTime=1073741823,S.callbackPriority=99,S.callbackNode=gu(vC.bind(null,S));else{var D=Um(S),T=S.callbackNode;if(D===0)T!==null&&(S.callbackNode=null,S.callbackExpirationTime=0,S.callbackPriority=90);else{var j=da();if(D===1073741823?j=99:D===1||D===2?j=95:(j=10*(1073741821-D)-10*(1073741821-j),j=0>=j?99:250>=j?98:5250>=j?97:95),T!==null){var W=S.callbackPriority;if(S.callbackExpirationTime===D&&W>=j)return;T!==PA&&Ce(T)}S.callbackExpirationTime=D,S.callbackPriority=j,D=D===1073741823?gu(vC.bind(null,S)):gc(j,Yv.bind(null,S),{timeout:10*(1073741821-D)-Oi()}),S.callbackNode=D}}}function Yv(S,D){if(Mm=0,D)return D=da(),jm(S,D),fo(S),null;var T=Um(S);if(T!==0){if(D=S.callbackNode,(mr&(ts|Gs))!==yn)throw Error(n(327));if(Cp(),S===hi&&T===rs||xu(S,T),Lr!==null){var j=mr;mr|=ts;var W=GA(S);do try{fF();break}catch(vt){qA(S,vt)}while(1);if(ca(),mr=j,yp.current=W,Wi===Tm)throw D=Nm,xu(S,T),KA(S,T),fo(S),D;if(Lr===null)switch(W=S.finishedWork=S.current.alternate,S.finishedExpirationTime=T,j=Wi,hi=null,j){case Du:case Tm:throw Error(n(345));case Ii:jm(S,2<T?2:T);break;case ga:if(KA(S,T),j=S.lastSuspendedTime,T===j&&(S.nextKnownPendingLevel=SC(W)),Ya===1073741823&&(W=CC+IC-Oi(),10<W)){if(UA){var ue=S.lastPingedTime;if(ue===0||ue>=T){S.lastPingedTime=T,xu(S,T);break}}if(ue=Um(S),ue!==0&&ue!==T)break;if(j!==0&&j!==T){S.lastPingedTime=j;break}S.timeoutHandle=Ne(bu.bind(null,S),W);break}bu(S);break;case Bl:if(KA(S,T),j=S.lastSuspendedTime,T===j&&(S.nextKnownPendingLevel=SC(W)),UA&&(W=S.lastPingedTime,W===0||W>=T)){S.lastPingedTime=T,xu(S,T);break}if(W=Um(S),W!==0&&W!==T)break;if(j!==0&&j!==T){S.lastPingedTime=j;break}if(MA!==1073741823?j=10*(1073741821-MA)-Oi():Ya===1073741823?j=0:(j=10*(1073741821-Ya)-5e3,W=Oi(),T=10*(1073741821-T)-W,j=W-j,0>j&&(j=0),j=(120>j?120:480>j?480:1080>j?1080:1920>j?1920:3e3>j?3e3:4320>j?4320:1960*EC(j/1960))-j,T<j&&(j=T)),10<j){S.timeoutHandle=Ne(bu.bind(null,S),j);break}bu(S);break;case Sc:if(Ya!==1073741823&&Lm!==null){ue=Ya;var De=Lm;if(j=De.busyMinDurationMs|0,0>=j?j=0:(W=De.busyDelayMs|0,ue=Oi()-(10*(1073741821-ue)-(De.timeoutMs|0||5e3)),j=ue<=W?0:W+j-ue),10<j){KA(S,T),S.timeoutHandle=Ne(bu.bind(null,S),j);break}}bu(S);break;default:throw Error(n(329))}if(fo(S),S.callbackNode===D)return Yv.bind(null,S)}}return null}function vC(S){var D=S.lastExpiredTime;if(D=D!==0?D:1073741823,S.finishedExpirationTime===D)bu(S);else{if((mr&(ts|Gs))!==yn)throw Error(n(327));if(Cp(),S===hi&&D===rs||xu(S,D),Lr!==null){var T=mr;mr|=ts;var j=GA(S);do try{AF();break}catch(W){qA(S,W)}while(1);if(ca(),mr=T,yp.current=j,Wi===Tm)throw T=Nm,xu(S,D),KA(S,D),fo(S),T;if(Lr!==null)throw Error(n(261));S.finishedWork=S.current.alternate,S.finishedExpirationTime=D,hi=null,bu(S),fo(S)}}return null}function Wv(S,D){jm(S,D),fo(S),(mr&(ts|Gs))===yn&&qi()}function uF(){if(HA!==null){var S=HA;HA=null,S.forEach(function(D,T){jm(T,D),fo(T)}),qi()}}function Kv(S,D){if((mr&(ts|Gs))!==yn)throw Error(n(187));var T=mr;mr|=1;try{return lo(99,S.bind(null,D))}finally{mr=T,qi()}}function xu(S,D){S.finishedWork=null,S.finishedExpirationTime=0;var T=S.timeoutHandle;if(T!==je&&(S.timeoutHandle=je,Ve(T)),Lr!==null)for(T=Lr.return;T!==null;){var j=T;switch(j.tag){case 1:var W=j.type.childContextTypes;W!=null&&Ma(j);break;case 3:yc(j),pr(j);break;case 5:sg(j);break;case 4:yc(j);break;case 13:Kn(Xn,j);break;case 19:Kn(Xn,j);break;case 10:wi(j)}T=T.return}hi=S,Lr=WA(S.current,null,D),rs=D,Wi=Du,Nm=null,MA=Ya=1073741823,Lm=null,Ep=0,UA=!1}function qA(S,D){do{try{if(ca(),dC(),Lr===null||Lr.return===null)return Wi=Tm,Nm=D,null;e:{var T=S,j=Lr.return,W=Lr,ue=D;if(D=rs,W.effectTag|=2048,W.firstEffect=W.lastEffect=null,ue!==null&&typeof ue=="object"&&typeof ue.then=="function"){var De=ue,vt=(Xn.current&1)!==0,Ct=j;do{var bt;if(bt=Ct.tag===13){var Ur=Ct.memoizedState;if(Ur!==null)bt=Ur.dehydrated!==null;else{var ns=Ct.memoizedProps;bt=ns.fallback===void 0?!1:ns.unstable_avoidThisFallback!==!0?!0:!vt}}if(bt){var gi=Ct.updateQueue;if(gi===null){var po=new Set;po.add(De),Ct.updateQueue=po}else gi.add(De);if((Ct.mode&2)===0){if(Ct.effectTag|=64,W.effectTag&=-2981,W.tag===1)if(W.alternate===null)W.tag=17;else{var JA=Es(1073741823,null);JA.tag=2,tt(W,JA)}W.expirationTime=1073741823;break e}ue=void 0,W=D;var Yo=T.pingCache;if(Yo===null?(Yo=T.pingCache=new wg,ue=new Set,Yo.set(De,ue)):(ue=Yo.get(De),ue===void 0&&(ue=new Set,Yo.set(De,ue))),!ue.has(W)){ue.add(W);var rt=dF.bind(null,T,De,W);De.then(rt,rt)}Ct.effectTag|=4096,Ct.expirationTime=D;break e}Ct=Ct.return}while(Ct!==null);ue=Error((oe(W.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
289
290Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+dl(W))}Wi!==Sc&&(Wi=Ii),ue=mg(ue,W),Ct=j;do{switch(Ct.tag){case 3:De=ue,Ct.effectTag|=4096,Ct.expirationTime=D;var Je=qv(Ct,De,D);It(Ct,Je);break e;case 1:De=ue;var At=Ct.type,Wt=Ct.stateNode;if((Ct.effectTag&64)===0&&(typeof At.getDerivedStateFromError=="function"||Wt!==null&&typeof Wt.componentDidCatch=="function"&&(Pu===null||!Pu.has(Wt)))){Ct.effectTag|=4096,Ct.expirationTime=D;var Br=Gv(Ct,De,D);It(Ct,Br);break e}}Ct=Ct.return}while(Ct!==null)}Lr=Vv(Lr)}catch(Sn){D=Sn;continue}break}while(1)}function GA(){var S=yp.current;return yp.current=Bu,S===null?Bu:S}function DC(S,D){S<Ya&&2<S&&(Ya=S),D!==null&&S<MA&&2<S&&(MA=S,Lm=D)}function _m(S){S>Ep&&(Ep=S)}function AF(){for(;Lr!==null;)Lr=Jv(Lr)}function fF(){for(;Lr!==null&&!Rt();)Lr=Jv(Lr)}function Jv(S){var D=Xv(S.alternate,S,rs);return S.memoizedProps=S.pendingProps,D===null&&(D=Vv(S)),wC.current=null,D}function Vv(S){Lr=S;do{var D=Lr.alternate;if(S=Lr.return,(Lr.effectTag&2048)===0){e:{var T=D;D=Lr;var j=rs,W=D.pendingProps;switch(D.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:ni(D.type)&&Ma(D);break;case 3:yc(D),pr(D),W=D.stateNode,W.pendingContext&&(W.context=W.pendingContext,W.pendingContext=null),(T===null||T.child===null)&&ja(D)&&ha(D),Il(D);break;case 5:sg(D);var ue=ua(mc.current);if(j=D.type,T!==null&&D.stateNode!=null)es(T,D,j,W,ue),T.ref!==D.ref&&(D.effectTag|=128);else if(W){if(T=ua(uo.current),ja(D)){if(W=D,!y)throw Error(n(175));T=op(W.stateNode,W.type,W.memoizedProps,ue,T,W),W.updateQueue=T,T=T!==null,T&&ha(D)}else{var De=dt(j,W,ue,T,D);vc(De,D,!1,!1),D.stateNode=De,at(De,j,W,ue,T)&&ha(D)}D.ref!==null&&(D.effectTag|=128)}else if(D.stateNode===null)throw Error(n(166));break;case 6:if(T&&D.stateNode!=null)qr(T,D,T.memoizedProps,W);else{if(typeof W!="string"&&D.stateNode===null)throw Error(n(166));if(T=ua(mc.current),ue=ua(uo.current),ja(D)){if(T=D,!y)throw Error(n(176));(T=ap(T.stateNode,T.memoizedProps,T))&&ha(D)}else D.stateNode=He(W,T,ue,D)}break;case 11:break;case 13:if(Kn(Xn,D),W=D.memoizedState,(D.effectTag&64)!==0){D.expirationTime=j;break e}W=W!==null,ue=!1,T===null?D.memoizedProps.fallback!==void 0&&ja(D):(j=T.memoizedState,ue=j!==null,W||j===null||(j=T.child.sibling,j!==null&&(De=D.firstEffect,De!==null?(D.firstEffect=j,j.nextEffect=De):(D.firstEffect=D.lastEffect=j,j.nextEffect=null),j.effectTag=8))),W&&!ue&&(D.mode&2)!==0&&(T===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||(Xn.current&1)!==0?Wi===Du&&(Wi=ga):((Wi===Du||Wi===ga)&&(Wi=Bl),Ep!==0&&hi!==null&&(KA(hi,rs),$v(hi,Ep)))),P&&W&&(D.effectTag|=4),C&&(W||ue)&&(D.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:yc(D),Il(D);break;case 10:wi(D);break;case 9:break;case 14:break;case 17:ni(D.type)&&Ma(D);break;case 19:if(Kn(Xn,D),W=D.memoizedState,W===null)break;if(ue=(D.effectTag&64)!==0,De=W.rendering,De===null){if(ue)Dc(W,!1);else if(Wi!==Du||T!==null&&(T.effectTag&64)!==0)for(T=D.child;T!==null;){if(De=up(T),De!==null){for(D.effectTag|=64,Dc(W,!1),T=De.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),W.lastEffect===null&&(D.firstEffect=null),D.lastEffect=W.lastEffect,T=j,W=D.child;W!==null;)ue=W,j=T,ue.effectTag&=2,ue.nextEffect=null,ue.firstEffect=null,ue.lastEffect=null,De=ue.alternate,De===null?(ue.childExpirationTime=0,ue.expirationTime=j,ue.child=null,ue.memoizedProps=null,ue.memoizedState=null,ue.updateQueue=null,ue.dependencies=null):(ue.childExpirationTime=De.childExpirationTime,ue.expirationTime=De.expirationTime,ue.child=De.child,ue.memoizedProps=De.memoizedProps,ue.memoizedState=De.memoizedState,ue.updateQueue=De.updateQueue,j=De.dependencies,ue.dependencies=j===null?null:{expirationTime:j.expirationTime,firstContext:j.firstContext,responders:j.responders}),W=W.sibling;Ln(Xn,Xn.current&1|2,D),D=D.child;break e}T=T.sibling}}else{if(!ue)if(T=up(De),T!==null){if(D.effectTag|=64,ue=!0,T=T.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),Dc(W,!0),W.tail===null&&W.tailMode==="hidden"&&!De.alternate){D=D.lastEffect=W.lastEffect,D!==null&&(D.nextEffect=null);break}}else Oi()>W.tailExpiration&&1<j&&(D.effectTag|=64,ue=!0,Dc(W,!1),D.expirationTime=D.childExpirationTime=j-1);W.isBackwards?(De.sibling=D.child,D.child=De):(T=W.last,T!==null?T.sibling=De:D.child=De,W.last=De)}if(W.tail!==null){W.tailExpiration===0&&(W.tailExpiration=Oi()+500),T=W.tail,W.rendering=T,W.tail=T.sibling,W.lastEffect=D.lastEffect,T.sibling=null,W=Xn.current,W=ue?W&1|2:W&1,Ln(Xn,W,D),D=T;break e}break;case 20:break;case 21:break;default:throw Error(n(156,D.tag))}D=null}if(T=Lr,rs===1||T.childExpirationTime!==1){for(W=0,ue=T.child;ue!==null;)j=ue.expirationTime,De=ue.childExpirationTime,j>W&&(W=j),De>W&&(W=De),ue=ue.sibling;T.childExpirationTime=W}if(D!==null)return D;S!==null&&(S.effectTag&2048)===0&&(S.firstEffect===null&&(S.firstEffect=Lr.firstEffect),Lr.lastEffect!==null&&(S.lastEffect!==null&&(S.lastEffect.nextEffect=Lr.firstEffect),S.lastEffect=Lr.lastEffect),1<Lr.effectTag&&(S.lastEffect!==null?S.lastEffect.nextEffect=Lr:S.firstEffect=Lr,S.lastEffect=Lr))}else{if(D=yC(Lr,rs),D!==null)return D.effectTag&=2047,D;S!==null&&(S.firstEffect=S.lastEffect=null,S.effectTag|=2048)}if(D=Lr.sibling,D!==null)return D;Lr=S}while(Lr!==null);return Wi===Du&&(Wi=Sc),null}function SC(S){var D=S.expirationTime;return S=S.childExpirationTime,D>S?D:S}function bu(S){var D=_o();return lo(99,pF.bind(null,S,D)),null}function pF(S,D){do Cp();while(Cg!==null);if((mr&(ts|Gs))!==yn)throw Error(n(327));var T=S.finishedWork,j=S.finishedExpirationTime;if(T===null)return null;if(S.finishedWork=null,S.finishedExpirationTime=0,T===S.current)throw Error(n(177));S.callbackNode=null,S.callbackExpirationTime=0,S.callbackPriority=90,S.nextKnownPendingLevel=0;var W=SC(T);if(S.firstPendingTime=W,j<=S.lastSuspendedTime?S.firstSuspendedTime=S.lastSuspendedTime=S.nextKnownPendingLevel=0:j<=S.firstSuspendedTime&&(S.firstSuspendedTime=j-1),j<=S.lastPingedTime&&(S.lastPingedTime=0),j<=S.lastExpiredTime&&(S.lastExpiredTime=0),S===hi&&(Lr=hi=null,rs=0),1<T.effectTag?T.lastEffect!==null?(T.lastEffect.nextEffect=T,W=T.firstEffect):W=T:W=T.firstEffect,W!==null){var ue=mr;mr|=Gs,wC.current=null,Ee(S.containerInfo),ir=W;do try{hF()}catch(ho){if(ir===null)throw Error(n(330));YA(ir,ho),ir=ir.nextEffect}while(ir!==null);ir=W;do try{for(var De=S,vt=D;ir!==null;){var Ct=ir.effectTag;if(Ct&16&&C&&jt(ir.stateNode),Ct&128){var bt=ir.alternate;if(bt!==null){var Ur=bt.ref;Ur!==null&&(typeof Ur=="function"?Ur(null):Ur.current=null)}}switch(Ct&1038){case 2:Ar(ir),ir.effectTag&=-3;break;case 6:Ar(ir),ir.effectTag&=-3,mn(ir.alternate,ir);break;case 1024:ir.effectTag&=-1025;break;case 1028:ir.effectTag&=-1025,mn(ir.alternate,ir);break;case 4:mn(ir.alternate,ir);break;case 8:var ns=De,gi=ir,po=vt;C?Er(ns,gi,po):re(ns,gi,po),pe(gi)}ir=ir.nextEffect}}catch(ho){if(ir===null)throw Error(n(330));YA(ir,ho),ir=ir.nextEffect}while(ir!==null);Re(S.containerInfo),S.current=T,ir=W;do try{for(Ct=j;ir!==null;){var JA=ir.effectTag;if(JA&36){var Yo=ir.alternate;switch(bt=ir,Ur=Ct,bt.tag){case 0:case 11:case 15:L(16,32,bt);break;case 1:var rt=bt.stateNode;if(bt.effectTag&4)if(Yo===null)rt.componentDidMount();else{var Je=bt.elementType===bt.type?Yo.memoizedProps:Ei(bt.type,Yo.memoizedProps);rt.componentDidUpdate(Je,Yo.memoizedState,rt.__reactInternalSnapshotBeforeUpdate)}var At=bt.updateQueue;At!==null&&Oe(bt,At,rt,Ur);break;case 3:var Wt=bt.updateQueue;if(Wt!==null){if(De=null,bt.child!==null)switch(bt.child.tag){case 5:De=ce(bt.child.stateNode);break;case 1:De=bt.child.stateNode}Oe(bt,Wt,De,Ur)}break;case 5:var Br=bt.stateNode;Yo===null&&bt.effectTag&4&&Z(Br,bt.type,bt.memoizedProps,bt);break;case 6:break;case 4:break;case 12:break;case 13:if(y&&bt.memoizedState===null){var Sn=bt.alternate;if(Sn!==null){var kr=Sn.memoizedState;if(kr!==null){var Pn=kr.dehydrated;Pn!==null&&oo(Pn)}}}break;case 19:case 17:case 20:case 21:break;default:throw Error(n(163))}}if(JA&128){bt=void 0;var oi=ir.ref;if(oi!==null){var $r=ir.stateNode;switch(ir.tag){case 5:bt=ce($r);break;default:bt=$r}typeof oi=="function"?oi(bt):oi.current=bt}}ir=ir.nextEffect}}catch(ho){if(ir===null)throw Error(n(330));YA(ir,ho),ir=ir.nextEffect}while(ir!==null);ir=null,Qn(),mr=ue}else S.current=T;if(wp)wp=!1,Cg=S,_A=D;else for(ir=W;ir!==null;)D=ir.nextEffect,ir.nextEffect=null,ir=D;if(D=S.firstPendingTime,D===0&&(Pu=null),D===1073741823?S===BC?Ig++:(Ig=0,BC=S):Ig=0,typeof PC=="function"&&PC(T.stateNode,j),fo(S),Su)throw Su=!1,S=Om,Om=null,S;return(mr&Rm)!==yn||qi(),null}function hF(){for(;ir!==null;){var S=ir.effectTag;(S&256)!==0&&kt(ir.alternate,ir),(S&512)===0||wp||(wp=!0,gc(97,function(){return Cp(),null})),ir=ir.nextEffect}}function Cp(){if(_A!==90){var S=97<_A?97:_A;return _A=90,lo(S,gF)}}function gF(){if(Cg===null)return!1;var S=Cg;if(Cg=null,(mr&(ts|Gs))!==yn)throw Error(n(331));var D=mr;for(mr|=Gs,S=S.current.firstEffect;S!==null;){try{var T=S;if((T.effectTag&512)!==0)switch(T.tag){case 0:case 11:case 15:L(128,0,T),L(0,64,T)}}catch(j){if(S===null)throw Error(n(330));YA(S,j)}T=S.nextEffect,S.nextEffect=null,S=T}return mr=D,qi(),!0}function zv(S,D,T){D=mg(T,D),D=qv(S,D,1073741823),tt(S,D),S=Bg(S,1073741823),S!==null&&fo(S)}function YA(S,D){if(S.tag===3)zv(S,S,D);else for(var T=S.return;T!==null;){if(T.tag===3){zv(T,S,D);break}else if(T.tag===1){var j=T.stateNode;if(typeof T.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&(Pu===null||!Pu.has(j))){S=mg(D,S),S=Gv(T,S,1073741823),tt(T,S),T=Bg(T,1073741823),T!==null&&fo(T);break}}T=T.return}}function dF(S,D,T){var j=S.pingCache;j!==null&&j.delete(D),hi===S&&rs===T?Wi===Bl||Wi===ga&&Ya===1073741823&&Oi()-CC<IC?xu(S,rs):UA=!0:Zv(S,T)&&(D=S.lastPingedTime,D!==0&&D<T||(S.lastPingedTime=T,S.finishedExpirationTime===T&&(S.finishedExpirationTime=0,S.finishedWork=null),fo(S)))}function mF(S,D){var T=S.stateNode;T!==null&&T.delete(D),D=0,D===0&&(D=da(),D=jA(D,S,null)),S=Bg(S,D),S!==null&&fo(S)}var Xv;Xv=function(S,D,T){var j=D.expirationTime;if(S!==null){var W=D.pendingProps;if(S.memoizedProps!==W||Hi.current)qo=!0;else{if(j<T){switch(qo=!1,D.tag){case 3:dg(D),gg();break;case 5:if(Sm(D),D.mode&4&&T!==1&&ke(D.type,W))return D.expirationTime=D.childExpirationTime=1,null;break;case 1:ni(D.type)&&Ac(D);break;case 4:ig(D,D.stateNode.containerInfo);break;case 10:Ho(D,D.memoizedProps.value);break;case 13:if(D.memoizedState!==null)return j=D.child.childExpirationTime,j!==0&&j>=T?an(S,D,T):(Ln(Xn,Xn.current&1,D),D=ii(S,D,T),D!==null?D.sibling:null);Ln(Xn,Xn.current&1,D);break;case 19:if(j=D.childExpirationTime>=T,(S.effectTag&64)!==0){if(j)return qa(S,D,T);D.effectTag|=64}if(W=D.memoizedState,W!==null&&(W.rendering=null,W.tail=null),Ln(Xn,Xn.current,D),!j)return null}return ii(S,D,T)}qo=!1}}else qo=!1;switch(D.expirationTime=0,D.tag){case 2:if(j=D.type,S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),S=D.pendingProps,W=Li(D,On.current),ms(D,T),W=ag(null,D,j,S,W,T),D.effectTag|=1,typeof W=="object"&&W!==null&&typeof W.render=="function"&&W.$$typeof===void 0){if(D.tag=1,dC(),ni(j)){var ue=!0;Ac(D)}else ue=!1;D.memoizedState=W.state!==null&&W.state!==void 0?W.state:null;var De=j.getDerivedStateFromProps;typeof De=="function"&&er(D,j,De,S),W.updater=Xr,D.stateNode=W,W._reactInternalFiber=D,jo(D,j,S,T),D=dp(null,D,j,!0,ue,T)}else D.tag=0,Is(null,D,W,T),D=D.child;return D;case 16:if(W=D.elementType,S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),S=D.pendingProps,ge(W),W._status!==1)throw W._result;switch(W=W._result,D.type=W,ue=D.tag=wF(W),S=Ei(W,S),ue){case 0:D=LA(null,D,W,S,T);break;case 1:D=gp(null,D,W,S,T);break;case 11:D=Ci(null,D,W,S,T);break;case 14:D=Qm(null,D,W,Ei(W.type,S),j,T);break;default:throw Error(n(306,W,""))}return D;case 0:return j=D.type,W=D.pendingProps,W=D.elementType===j?W:Ei(j,W),LA(S,D,j,W,T);case 1:return j=D.type,W=D.pendingProps,W=D.elementType===j?W:Ei(j,W),gp(S,D,j,W,T);case 3:if(dg(D),j=D.updateQueue,j===null)throw Error(n(282));if(W=D.memoizedState,W=W!==null?W.element:null,me(D,j,D.pendingProps,null,T),j=D.memoizedState.element,j===W)gg(),D=ii(S,D,T);else{if((W=D.stateNode.hydrate)&&(y?(Bc=Au(D.stateNode.containerInfo),fa=D,W=Cl=!0):W=!1),W)for(T=ng(D,null,j,T),D.child=T;T;)T.effectTag=T.effectTag&-3|1024,T=T.sibling;else Is(S,D,j,T),gg();D=D.child}return D;case 5:return Sm(D),S===null&&NA(D),j=D.type,W=D.pendingProps,ue=S!==null?S.memoizedProps:null,De=W.children,Qe(j,W)?De=null:ue!==null&&Qe(j,ue)&&(D.effectTag|=16),Go(S,D),D.mode&4&&T!==1&&ke(j,W)?(D.expirationTime=D.childExpirationTime=1,D=null):(Is(S,D,De,T),D=D.child),D;case 6:return S===null&&NA(D),null;case 13:return an(S,D,T);case 4:return ig(D,D.stateNode.containerInfo),j=D.pendingProps,S===null?D.child=mu(D,null,j,T):Is(S,D,j,T),D.child;case 11:return j=D.type,W=D.pendingProps,W=D.elementType===j?W:Ei(j,W),Ci(S,D,j,W,T);case 7:return Is(S,D,D.pendingProps,T),D.child;case 8:return Is(S,D,D.pendingProps.children,T),D.child;case 12:return Is(S,D,D.pendingProps.children,T),D.child;case 10:e:{if(j=D.type._context,W=D.pendingProps,De=D.memoizedProps,ue=W.value,Ho(D,ue),De!==null){var vt=De.value;if(ue=gs(vt,ue)?0:(typeof j._calculateChangedBits=="function"?j._calculateChangedBits(vt,ue):1073741823)|0,ue===0){if(De.children===W.children&&!Hi.current){D=ii(S,D,T);break e}}else for(vt=D.child,vt!==null&&(vt.return=D);vt!==null;){var Ct=vt.dependencies;if(Ct!==null){De=vt.child;for(var bt=Ct.firstContext;bt!==null;){if(bt.context===j&&(bt.observedBits&ue)!==0){vt.tag===1&&(bt=Es(T,null),bt.tag=2,tt(vt,bt)),vt.expirationTime<T&&(vt.expirationTime=T),bt=vt.alternate,bt!==null&&bt.expirationTime<T&&(bt.expirationTime=T),ds(vt.return,T),Ct.expirationTime<T&&(Ct.expirationTime=T);break}bt=bt.next}}else De=vt.tag===10&&vt.type===D.type?null:vt.child;if(De!==null)De.return=vt;else for(De=vt;De!==null;){if(De===D){De=null;break}if(vt=De.sibling,vt!==null){vt.return=De.return,De=vt;break}De=De.return}vt=De}}Is(S,D,W.children,T),D=D.child}return D;case 9:return W=D.type,ue=D.pendingProps,j=ue.children,ms(D,T),W=ys(W,ue.unstable_observedBits),j=j(W),D.effectTag|=1,Is(S,D,j,T),D.child;case 14:return W=D.type,ue=Ei(W,D.pendingProps),ue=Ei(W.type,ue),Qm(S,D,W,ue,j,T);case 15:return km(S,D,D.type,D.pendingProps,j,T);case 17:return j=D.type,W=D.pendingProps,W=D.elementType===j?W:Ei(j,W),S!==null&&(S.alternate=null,D.alternate=null,D.effectTag|=2),D.tag=1,ni(j)?(S=!0,Ac(D)):S=!1,ms(D,T),$i(D,j,W,T),jo(D,j,W,T),dp(null,D,j,!0,S,T);case 19:return qa(S,D,T)}throw Error(n(156,D.tag))};var PC=null,xC=null;function yF(S){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(D.isDisabled||!D.supportsFiber)return!0;try{var T=D.inject(S);PC=function(j){try{D.onCommitFiberRoot(T,j,void 0,(j.current.effectTag&64)===64)}catch{}},xC=function(j){try{D.onCommitFiberUnmount(T,j)}catch{}}}catch{}return!0}function EF(S,D,T,j){this.tag=S,this.key=T,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=D,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=j,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function vl(S,D,T,j){return new EF(S,D,T,j)}function bC(S){return S=S.prototype,!(!S||!S.isReactComponent)}function wF(S){if(typeof S=="function")return bC(S)?1:0;if(S!=null){if(S=S.$$typeof,S===N)return 11;if(S===ee)return 14}return 2}function WA(S,D){var T=S.alternate;return T===null?(T=vl(S.tag,D,S.key,S.mode),T.elementType=S.elementType,T.type=S.type,T.stateNode=S.stateNode,T.alternate=S,S.alternate=T):(T.pendingProps=D,T.effectTag=0,T.nextEffect=null,T.firstEffect=null,T.lastEffect=null),T.childExpirationTime=S.childExpirationTime,T.expirationTime=S.expirationTime,T.child=S.child,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,D=S.dependencies,T.dependencies=D===null?null:{expirationTime:D.expirationTime,firstContext:D.firstContext,responders:D.responders},T.sibling=S.sibling,T.index=S.index,T.ref=S.ref,T}function Hm(S,D,T,j,W,ue){var De=2;if(j=S,typeof S=="function")bC(S)&&(De=1);else if(typeof S=="string")De=5;else e:switch(S){case w:return Qu(T.children,W,ue,D);case R:De=8,W|=7;break;case I:De=8,W|=1;break;case v:return S=vl(12,T,D,W|8),S.elementType=v,S.type=v,S.expirationTime=ue,S;case U:return S=vl(13,T,D,W),S.type=U,S.elementType=U,S.expirationTime=ue,S;case V:return S=vl(19,T,D,W),S.elementType=V,S.expirationTime=ue,S;default:if(typeof S=="object"&&S!==null)switch(S.$$typeof){case b:De=10;break e;case E:De=9;break e;case N:De=11;break e;case ee:De=14;break e;case le:De=16,j=null;break e}throw Error(n(130,S==null?S:typeof S,""))}return D=vl(De,T,D,W),D.elementType=S,D.type=j,D.expirationTime=ue,D}function Qu(S,D,T,j){return S=vl(7,S,j,D),S.expirationTime=T,S}function QC(S,D,T){return S=vl(6,S,null,D),S.expirationTime=T,S}function kC(S,D,T){return D=vl(4,S.children!==null?S.children:[],S.key,D),D.expirationTime=T,D.stateNode={containerInfo:S.containerInfo,pendingChildren:null,implementation:S.implementation},D}function CF(S,D,T){this.tag=D,this.current=null,this.containerInfo=S,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=je,this.pendingContext=this.context=null,this.hydrate=T,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Zv(S,D){var T=S.firstSuspendedTime;return S=S.lastSuspendedTime,T!==0&&T>=D&&S<=D}function KA(S,D){var T=S.firstSuspendedTime,j=S.lastSuspendedTime;T<D&&(S.firstSuspendedTime=D),(j>D||T===0)&&(S.lastSuspendedTime=D),D<=S.lastPingedTime&&(S.lastPingedTime=0),D<=S.lastExpiredTime&&(S.lastExpiredTime=0)}function $v(S,D){D>S.firstPendingTime&&(S.firstPendingTime=D);var T=S.firstSuspendedTime;T!==0&&(D>=T?S.firstSuspendedTime=S.lastSuspendedTime=S.nextKnownPendingLevel=0:D>=S.lastSuspendedTime&&(S.lastSuspendedTime=D+1),D>S.nextKnownPendingLevel&&(S.nextKnownPendingLevel=D))}function jm(S,D){var T=S.lastExpiredTime;(T===0||T>D)&&(S.lastExpiredTime=D)}function eD(S){var D=S._reactInternalFiber;if(D===void 0)throw typeof S.render=="function"?Error(n(188)):Error(n(268,Object.keys(S)));return S=we(D),S===null?null:S.stateNode}function tD(S,D){S=S.memoizedState,S!==null&&S.dehydrated!==null&&S.retryTime<D&&(S.retryTime=D)}function qm(S,D){tD(S,D),(S=S.alternate)&&tD(S,D)}var rD={createContainer:function(S,D,T){return S=new CF(S,D,T),D=vl(3,null,null,D===2?7:D===1?3:0),S.current=D,D.stateNode=S},updateContainer:function(S,D,T,j){var W=D.current,ue=da(),De=pt.suspense;ue=jA(ue,W,De);e:if(T){T=T._reactInternalFiber;t:{if(Be(T)!==T||T.tag!==1)throw Error(n(170));var vt=T;do{switch(vt.tag){case 3:vt=vt.stateNode.context;break t;case 1:if(ni(vt.type)){vt=vt.stateNode.__reactInternalMemoizedMergedChildContext;break t}}vt=vt.return}while(vt!==null);throw Error(n(171))}if(T.tag===1){var Ct=T.type;if(ni(Ct)){T=fu(T,Ct,vt);break e}}T=vt}else T=Ni;return D.context===null?D.context=T:D.pendingContext=T,D=Es(ue,De),D.payload={element:S},j=j===void 0?null:j,j!==null&&(D.callback=j),tt(W,D),Pc(W,ue),ue},batchedEventUpdates:function(S,D){var T=mr;mr|=2;try{return S(D)}finally{mr=T,mr===yn&&qi()}},batchedUpdates:function(S,D){var T=mr;mr|=1;try{return S(D)}finally{mr=T,mr===yn&&qi()}},unbatchedUpdates:function(S,D){var T=mr;mr&=-2,mr|=Rm;try{return S(D)}finally{mr=T,mr===yn&&qi()}},deferredUpdates:function(S){return lo(97,S)},syncUpdates:function(S,D,T,j){return lo(99,S.bind(null,D,T,j))},discreteUpdates:function(S,D,T,j){var W=mr;mr|=4;try{return lo(98,S.bind(null,D,T,j))}finally{mr=W,mr===yn&&qi()}},flushDiscreteUpdates:function(){(mr&(1|ts|Gs))===yn&&(uF(),Cp())},flushControlled:function(S){var D=mr;mr|=1;try{lo(99,S)}finally{mr=D,mr===yn&&qi()}},flushSync:Kv,flushPassiveEffects:Cp,IsThisRendererActing:{current:!1},getPublicRootInstance:function(S){if(S=S.current,!S.child)return null;switch(S.child.tag){case 5:return ce(S.child.stateNode);default:return S.child.stateNode}},attemptSynchronousHydration:function(S){switch(S.tag){case 3:var D=S.stateNode;D.hydrate&&Wv(D,D.firstPendingTime);break;case 13:Kv(function(){return Pc(S,1073741823)}),D=Ua(da(),150,100),qm(S,D)}},attemptUserBlockingHydration:function(S){if(S.tag===13){var D=Ua(da(),150,100);Pc(S,D),qm(S,D)}},attemptContinuousHydration:function(S){if(S.tag===13){da();var D=bA++;Pc(S,D),qm(S,D)}},attemptHydrationAtCurrentPriority:function(S){if(S.tag===13){var D=da();D=jA(D,S,null),Pc(S,D),qm(S,D)}},findHostInstance:eD,findHostInstanceWithWarning:function(S){return eD(S)},findHostInstanceWithNoPortals:function(S){return S=Se(S),S===null?null:S.tag===20?S.stateNode.instance:S.stateNode},shouldSuspend:function(){return!1},injectIntoDevTools:function(S){var D=S.findFiberByHostInstance;return yF(r({},S,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:u.ReactCurrentDispatcher,findHostInstanceByFiber:function(T){return T=we(T),T===null?null:T.stateNode},findFiberByHostInstance:function(T){return D?D(T):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}};sB.exports=rD.default||rD;var IF=sB.exports;return sB.exports=e,IF}});var vEe=_((zWt,BEe)=>{"use strict";BEe.exports=IEe()});var SEe=_((XWt,DEe)=>{"use strict";var Byt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};DEe.exports=Byt});var QEe=_((ZWt,bEe)=>{"use strict";var vyt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},GQ=function(){function e(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}();function v6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var nu=SEe(),Dyt=function(){function e(t,r,o,a,n,u){D6(this,e),this.left=t,this.right=r,this.top=o,this.bottom=a,this.width=n,this.height=u}return GQ(e,[{key:"fromJS",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:"toString",value:function(){return"<Layout#"+this.left+":"+this.right+";"+this.top+":"+this.bottom+";"+this.width+":"+this.height+">"}}]),e}(),PEe=function(){GQ(e,null,[{key:"fromJS",value:function(r){var o=r.width,a=r.height;return new e(o,a)}}]);function e(t,r){D6(this,e),this.width=t,this.height=r}return GQ(e,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toString",value:function(){return"<Size#"+this.width+"x"+this.height+">"}}]),e}(),xEe=function(){function e(t,r){D6(this,e),this.unit=t,this.value=r}return GQ(e,[{key:"fromJS",value:function(r){r(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case nu.UNIT_POINT:return String(this.value);case nu.UNIT_PERCENT:return this.value+"%";case nu.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),e}();bEe.exports=function(e,t){function r(u,A,p){var h=u[A];u[A]=function(){for(var w=arguments.length,I=Array(w),v=0;v<w;v++)I[v]=arguments[v];return p.call.apply(p,[this,h].concat(I))}}for(var o=["setPosition","setMargin","setFlexBasis","setWidth","setHeight","setMinWidth","setMinHeight","setMaxWidth","setMaxHeight","setPadding"],a=function(){var A,p=o[n],h=(A={},v6(A,nu.UNIT_POINT,t.Node.prototype[p]),v6(A,nu.UNIT_PERCENT,t.Node.prototype[p+"Percent"]),v6(A,nu.UNIT_AUTO,t.Node.prototype[p+"Auto"]),A);r(t.Node.prototype,p,function(w){for(var I=arguments.length,v=Array(I>1?I-1:0),b=1;b<I;b++)v[b-1]=arguments[b];var E=v.pop(),R=void 0,N=void 0;if(E==="auto")R=nu.UNIT_AUTO,N=void 0;else if(E instanceof xEe)R=E.unit,N=E.valueOf();else if(R=typeof E=="string"&&E.endsWith("%")?nu.UNIT_PERCENT:nu.UNIT_POINT,N=parseFloat(E),!Number.isNaN(E)&&Number.isNaN(N))throw new Error("Invalid value "+E+" for "+p);if(!h[R])throw new Error('Failed to execute "'+p+`": Unsupported unit '`+E+"'");if(N!==void 0){var U;return(U=h[R]).call.apply(U,[this].concat(v,[N]))}else{var V;return(V=h[R]).call.apply(V,[this].concat(v))}})},n=0;n<o.length;n++)a();return r(t.Config.prototype,"free",function(){t.Config.destroy(this)}),r(t.Node,"create",function(u,A){return A?t.Node.createWithConfig(A):t.Node.createDefault()}),r(t.Node.prototype,"free",function(){t.Node.destroy(this)}),r(t.Node.prototype,"freeRecursive",function(){for(var u=0,A=this.getChildCount();u<A;++u)this.getChild(0).freeRecursive();this.free()}),r(t.Node.prototype,"setMeasureFunc",function(u,A){return A?u.call(this,function(){return PEe.fromJS(A.apply(void 0,arguments))}):this.unsetMeasureFunc()}),r(t.Node.prototype,"calculateLayout",function(u){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:nu.DIRECTION_LTR;return u.call(this,A,p,h)}),vyt({Config:t.Config,Node:t.Node,Layout:e("Layout",Dyt),Size:e("Size",PEe),Value:e("Value",xEe),getInstanceCount:function(){return t.getInstanceCount.apply(t,arguments)}},nu)}});var kEe=_((exports,module)=>{(function(e,t){typeof define=="function"&&define.amd?define([],function(){return t}):typeof module=="object"&&module.exports?module.exports=t:(e.nbind=e.nbind||{}).init=t})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(e,t){return function(){e&&e.apply(this,arguments);try{Module.ccall("nbind_init")}catch(r){t(r);return}t(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof Ie=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(t,r){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),t=nodePath.normalize(t);var o=nodeFS.readFileSync(t);return r?o:o.toString()},Module.readBinary=function(t){var r=Module.read(t,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(t){globalEval(read(t))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(t){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(t));var r=read(t,"binary");return assert(typeof r=="object"),r},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(e,t){quit(e)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(t){var r=new XMLHttpRequest;return r.open("GET",t,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(t){var r=new XMLHttpRequest;return r.open("GET",t,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(t,r,o){var a=new XMLHttpRequest;a.open("GET",t,!0),a.responseType="arraybuffer",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):o()},a.onerror=o,a.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(t){console.log(t)}),Module.printErr||(Module.printErr=function(t){console.warn(t)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(e){dump(e)}:function(e){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(e){document.title=e})}else throw"Unknown runtime environment. Where are we?";function globalEval(e){eval.call(null,e)}!Module.load&&Module.read&&(Module.load=function(t){globalEval(Module.read(t))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(e,t){throw t}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(e){return tempRet0=e,e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(e[e.length-1]==="*")return Runtime.QUANTUM_SIZE;if(e[0]==="i"){var t=parseInt(e.substr(1));return assert(t%8===0),t/8}else return 0}}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,t){return t==="double"||t==="i64"?e&7&&(assert((e&7)===4),e+=4):assert((e&3)===0),e},getAlignSize:function(e,t,r){return!r&&(e=="i64"||e=="double")?8:e?Math.min(t||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(t,8)},dynCall:function(e,t,r){return r&&r.length?Module["dynCall_"+e].apply(null,[t].concat(r)):Module["dynCall_"+e].call(null,t)},functionPointers:[],addFunction:function(e){for(var t=0;t<Runtime.functionPointers.length;t++)if(!Runtime.functionPointers[t])return Runtime.functionPointers[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,t){if(!!e){assert(t),Runtime.funcWrappers[t]||(Runtime.funcWrappers[t]={});var r=Runtime.funcWrappers[t];return r[e]||(t.length===1?r[e]=function(){return Runtime.dynCall(t,e)}:t.length===2?r[e]=function(a){return Runtime.dynCall(t,e,[a])}:r[e]=function(){return Runtime.dynCall(t,e,Array.prototype.slice.call(arguments))}),r[e]}},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var t=STACKTOP;return STACKTOP=STACKTOP+e|0,STACKTOP=STACKTOP+15&-16,t},staticAlloc:function(e){var t=STATICTOP;return STATICTOP=STATICTOP+e|0,STATICTOP=STATICTOP+15&-16,t},dynamicAlloc:function(e){var t=HEAP32[DYNAMICTOP_PTR>>2],r=(t+e+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var o=enlargeMemory();if(!o)return HEAP32[DYNAMICTOP_PTR>>2]=t,0}return t},alignMemory:function(e,t){var r=e=Math.ceil(e/(t||16))*(t||16);return r},makeBigInt:function(e,t,r){var o=r?+(e>>>0)+ +(t>>>0)*4294967296:+(e>>>0)+ +(t|0)*4294967296;return o},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(e,t){e||abort("Assertion failed: "+t)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var t=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,t),t},stringToC:function(e){var t=0;if(e!=null&&e!==0){var r=(e.length<<2)+1;t=Runtime.stackAlloc(r),stringToUTF8(e,t,r)}return t}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(t,r,o,a,n){var u=getCFunc(t),A=[],p=0;if(a)for(var h=0;h<a.length;h++){var w=toC[o[h]];w?(p===0&&(p=Runtime.stackSave()),A[h]=w(a[h])):A[h]=a[h]}var I=u.apply(null,A);if(r==="string"&&(I=Pointer_stringify(I)),p!==0){if(n&&n.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(p)});return}Runtime.stackRestore(p)}return I};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var t=e.toString().match(sourceRegex).slice(1);return{arguments:t[0],body:t[1],returnValue:t[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var e in JSfuncs)JSfuncs.hasOwnProperty(e)&&(JSsource[e]=parseJSFunc(JSfuncs[e]))}}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(e){return e==="number"}),numericRet=returnType!=="string";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(e,t){return"$"+t}),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if(type!=="number"){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap;function setValue(e,t,r,o){switch(r=r||"i8",r.charAt(r.length-1)==="*"&&(r="i32"),r){case"i1":HEAP8[e>>0]=t;break;case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+r)}}Module.setValue=setValue;function getValue(e,t,r){switch(t=t||"i8",t.charAt(t.length-1)==="*"&&(t="i32"),t){case"i1":return HEAP8[e>>0];case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":return HEAP32[e>>2];case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+t)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(e,t,r,o){var a,n;typeof e=="number"?(a=!0,n=e):(a=!1,n=e.length);var u=typeof t=="string"?t:null,A;if(r==ALLOC_NONE?A=o:A=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,u?1:t.length)),a){var o=A,p;for(assert((A&3)==0),p=A+(n&-4);o<p;o+=4)HEAP32[o>>2]=0;for(p=A+n;o<p;)HEAP8[o++>>0]=0;return A}if(u==="i8")return e.subarray||e.slice?HEAPU8.set(e,A):HEAPU8.set(new Uint8Array(e),A),A;for(var h=0,w,I,v;h<n;){var b=e[h];if(typeof b=="function"&&(b=Runtime.getFunctionIndex(b)),w=u||t[h],w===0){h++;continue}w=="i64"&&(w="i32"),setValue(A+h,b,w),v!==w&&(I=Runtime.getNativeTypeSize(w),v=w),h+=I}return A}Module.allocate=allocate;function getMemory(e){return staticSealed?runtimeInitialized?_malloc(e):Runtime.dynamicAlloc(e):Runtime.staticAlloc(e)}Module.getMemory=getMemory;function Pointer_stringify(e,t){if(t===0||!e)return"";for(var r=0,o,a=0;o=HEAPU8[e+a>>0],r|=o,!(o==0&&!t||(a++,t&&a==t)););t||(t=a);var n="";if(r<128){for(var u=1024,A;t>0;)A=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,u))),n=n?n+A:A,e+=u,t-=u;return n}return Module.UTF8ToString(e)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(e){for(var t="";;){var r=HEAP8[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(e,t){return writeAsciiToMemory(e,t,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t){for(var r=t;e[r];)++r;if(r-t>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,r));for(var o,a,n,u,A,p,h="";;){if(o=e[t++],!o)return h;if(!(o&128)){h+=String.fromCharCode(o);continue}if(a=e[t++]&63,(o&224)==192){h+=String.fromCharCode((o&31)<<6|a);continue}if(n=e[t++]&63,(o&240)==224?o=(o&15)<<12|a<<6|n:(u=e[t++]&63,(o&248)==240?o=(o&7)<<18|a<<12|n<<6|u:(A=e[t++]&63,(o&252)==248?o=(o&3)<<24|a<<18|n<<12|u<<6|A:(p=e[t++]&63,o=(o&1)<<30|a<<24|n<<18|u<<12|A<<6|p))),o<65536)h+=String.fromCharCode(o);else{var w=o-65536;h+=String.fromCharCode(55296|w>>10,56320|w&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(e,t,r,o){if(!(o>0))return 0;for(var a=r,n=r+o-1,u=0;u<e.length;++u){var A=e.charCodeAt(u);if(A>=55296&&A<=57343&&(A=65536+((A&1023)<<10)|e.charCodeAt(++u)&1023),A<=127){if(r>=n)break;t[r++]=A}else if(A<=2047){if(r+1>=n)break;t[r++]=192|A>>6,t[r++]=128|A&63}else if(A<=65535){if(r+2>=n)break;t[r++]=224|A>>12,t[r++]=128|A>>6&63,t[r++]=128|A&63}else if(A<=2097151){if(r+3>=n)break;t[r++]=240|A>>18,t[r++]=128|A>>12&63,t[r++]=128|A>>6&63,t[r++]=128|A&63}else if(A<=67108863){if(r+4>=n)break;t[r++]=248|A>>24,t[r++]=128|A>>18&63,t[r++]=128|A>>12&63,t[r++]=128|A>>6&63,t[r++]=128|A&63}else{if(r+5>=n)break;t[r++]=252|A>>30,t[r++]=128|A>>24&63,t[r++]=128|A>>18&63,t[r++]=128|A>>12&63,t[r++]=128|A>>6&63,t[r++]=128|A&63}}return t[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(e,t,r){return stringToUTF8Array(e,HEAPU8,t,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(e){for(var t=0,r=0;r<e.length;++r){var o=e.charCodeAt(r);o>=55296&&o<=57343&&(o=65536+((o&1023)<<10)|e.charCodeAt(++r)&1023),o<=127?++t:o<=2047?t+=2:o<=65535?t+=3:o<=2097151?t+=4:o<=67108863?t+=5:t+=6}return t}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function demangle(e){var t=Module.___cxa_demangle||Module.__cxa_demangle;if(t){try{var r=e.substr(1),o=lengthBytesUTF8(r)+1,a=_malloc(o);stringToUTF8(r,a,o);var n=_malloc(4),u=t(a,0,0,n);if(getValue(n,"i32")===0&&u)return Pointer_stringify(u)}catch{}finally{a&&_free(a),n&&_free(n),u&&_free(u)}return e}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){var t=/__Z[\w\d_]+/g;return e.replace(t,function(r){var o=demangle(r);return r===o?r:r+" ["+o+"]"})}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+=`
291`+Module.extraStackTrace()),demangleAll(e)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t();continue}var r=t.func;typeof r=="number"?t.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,t.arg):r(t.arg===void 0?null:t.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}Module.addOnPreRun=addOnPreRun;function addOnInit(e){__ATINIT__.unshift(e)}Module.addOnInit=addOnInit;function addOnPreMain(e){__ATMAIN__.unshift(e)}Module.addOnPreMain=addOnPreMain;function addOnExit(e){__ATEXIT__.unshift(e)}Module.addOnExit=addOnExit;function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(e,t,r){var o=r>0?r:lengthBytesUTF8(e)+1,a=new Array(o),n=stringToUTF8Array(e,a,0,a.length);return t&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(e){for(var t=[],r=0;r<e.length;r++){var o=e[r];o>255&&(o&=255),t.push(String.fromCharCode(o))}return t.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(e,t,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var o,a;r&&(a=t+lengthBytesUTF8(e),o=HEAP8[a]),stringToUTF8(e,t,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(e,t){HEAP8.set(e,t)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(e,t,r){for(var o=0;o<e.length;++o)HEAP8[t++>>0]=e.charCodeAt(o);r||(HEAP8[t>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function e(t,r){var o=t>>>16,a=t&65535,n=r>>>16,u=r&65535;return a*u+(o*u+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(e){return froundBuffer[0]=e,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(e){e=e>>>0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(e,t,r,o,a,n,u,A){return _nbind.callbackSignatureList[e].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(e,t,r,o,a,n,u,A){return ASM_CONSTS[e](t,r,o,a,n,u,A)}function _emscripten_asm_const_iiiii(e,t,r,o,a){return ASM_CONSTS[e](t,r,o,a)}function _emscripten_asm_const_iiidddddd(e,t,r,o,a,n,u,A,p){return ASM_CONSTS[e](t,r,o,a,n,u,A,p)}function _emscripten_asm_const_iiididi(e,t,r,o,a,n,u){return ASM_CONSTS[e](t,r,o,a,n,u)}function _emscripten_asm_const_iiii(e,t,r,o){return ASM_CONSTS[e](t,r,o)}function _emscripten_asm_const_iiiid(e,t,r,o,a){return ASM_CONSTS[e](t,r,o,a)}function _emscripten_asm_const_iiiiii(e,t,r,o,a,n){return ASM_CONSTS[e](t,r,o,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(e,t){__ATEXIT__.unshift({func:e,arg:t})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(e,t,r,o){var a=arguments.length,n=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,o);else for(var A=e.length-1;A>=0;A--)(u=e[A])&&(n=(a<3?u(n):a>3?u(t,r,n):u(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n}function _defineHidden(e){return function(t,r){Object.defineProperty(t,r,{configurable:!1,enumerable:!1,value:e,writable:!0})}}var _nbind={};function __nbind_free_external(e){_nbind.externalList[e].dereference(e)}function __nbind_reference_external(e){_nbind.externalList[e].reference()}function _llvm_stackrestore(e){var t=_llvm_stacksave,r=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),Runtime.stackRestore(r)}function __nbind_register_pool(e,t,r,o){_nbind.Pool.pageSize=e,_nbind.Pool.usedPtr=t/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=o/4,HEAP32[t/4]=16909060,HEAP8[t]==1&&(_nbind.bigEndian=!0),HEAP32[t/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(e,t){if(Browser.mainLoop.timingMode=e,Browser.mainLoop.timingValue=t,!Browser.mainLoop.func)return 1;if(e==0)Browser.mainLoop.scheduler=function(){var u=Math.max(0,Browser.mainLoop.tickStartTime+t-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,u)},Browser.mainLoop.method="timeout";else if(e==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(e==2){if(!window.setImmediate){let n=function(u){u.source===window&&u.data===o&&(u.stopPropagation(),r.shift()())};var a=n,r=[],o="setimmediate";window.addEventListener("message",n,!0),window.setImmediate=function(A){r.push(A),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(A),window.postMessage({target:o})):window.postMessage(o,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(e,t,r,o,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=e,Browser.mainLoop.arg=o;var n;typeof o<"u"?n=function(){Module.dynCall_vi(e,o)}:n=function(){Module.dynCall_v(e)};var u=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var w=Browser.mainLoop.remainingBlockers,I=w%1==0?w-1:Math.floor(w);h.counted?Browser.mainLoop.remainingBlockers=I:(I=I+.5,Browser.mainLoop.remainingBlockers=(8*w+I)/9)}if(console.log('main loop blocker "'+h.name+'" took '+(Date.now()-p)+" ms"),Browser.mainLoop.updateStatus(),u<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(!(u<Browser.mainLoop.currentlyRunningMainloop)){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(n),!(u<Browser.mainLoop.currentlyRunningMainloop)&&(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())}}},a||(t&&t>0?_emscripten_set_main_loop_timing(0,1e3/t):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var e=Browser.mainLoop.timingMode,t=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(e,t),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var e=Module.statusMessage||"Please wait...",t=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;t?t<r?Module.setStatus(e+" ("+(r-t)+"/"+r+")"):Module.setStatus(e):Module.setStatus("")}},runIter:function(e){if(!ABORT){if(Module.preMainLoop){var t=Module.preMainLoop();if(t===!1)return}try{e()}catch(r){if(r instanceof ExitStatus)return;throw r&&typeof r=="object"&&r.stack&&Module.printErr("exception thrown: "+[r,r.stack]),r}Module.postMainLoop&&Module.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Module.preloadPlugins||(Module.preloadPlugins=[]),Browser.initted)return;Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch{Browser.hasBlobConstructor=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder=typeof MozBlobBuilder<"u"?MozBlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log("warning: no BlobBuilder"),Browser.URLObject=typeof window<"u"?window.URL?window.URL:window.webkitURL:void 0,!Module.noImageDecoding&&typeof Browser.URLObject>"u"&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var e={};e.canHandle=function(n){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(n)},e.handle=function(n,u,A,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(u)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(u)}))}catch(b){Runtime.warnOnce("Blob constructor present but fails: "+b+"; falling back to blob builder")}if(!h){var w=new Browser.BlobBuilder;w.append(new Uint8Array(n).buffer),h=w.getBlob()}var I=Browser.URLObject.createObjectURL(h),v=new Image;v.onload=function(){assert(v.complete,"Image "+u+" could not be decoded");var E=document.createElement("canvas");E.width=v.width,E.height=v.height;var R=E.getContext("2d");R.drawImage(v,0,0),Module.preloadedImages[u]=E,Browser.URLObject.revokeObjectURL(I),A&&A(n)},v.onerror=function(E){console.log("Image "+I+" could not be decoded"),p&&p()},v.src=I},Module.preloadPlugins.push(e);var t={};t.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},t.handle=function(n,u,A,p){var h=!1;function w(R){h||(h=!0,Module.preloadedAudios[u]=R,A&&A(n))}function I(){h||(h=!0,Module.preloadedAudios[u]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var v=new Blob([n],{type:Browser.getMimetype(u)})}catch{return I()}var b=Browser.URLObject.createObjectURL(v),E=new Audio;E.addEventListener("canplaythrough",function(){w(E)},!1),E.onerror=function(N){if(h)return;console.log("warning: browser could not fully decode audio "+u+", trying slower base64 approach");function U(V){for(var ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",le="=",fe="",de=0,ge=0,oe=0;oe<V.length;oe++)for(de=de<<8|V[oe],ge+=8;ge>=6;){var Be=de>>ge-6&63;ge-=6,fe+=ee[Be]}return ge==2?(fe+=ee[(de&3)<<4],fe+=le+le):ge==4&&(fe+=ee[(de&15)<<2],fe+=le),fe}E.src="data:audio/x-"+u.substr(-3)+";base64,"+U(n),w(E)},E.src=b,Browser.safeSetTimeout(function(){w(E)},1e4)}else return I()},Module.preloadPlugins.push(t);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var o=Module.canvas;o&&(o.requestPointerLock=o.requestPointerLock||o.mozRequestPointerLock||o.webkitRequestPointerLock||o.msRequestPointerLock||function(){},o.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},o.exitPointerLock=o.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",r,!1),document.addEventListener("mozpointerlockchange",r,!1),document.addEventListener("webkitpointerlockchange",r,!1),document.addEventListener("mspointerlockchange",r,!1),Module.elementPointerLock&&o.addEventListener("click",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(e,t,r,o){if(t&&Module.ctx&&e==Module.canvas)return Module.ctx;var a,n;if(t){var u={antialias:!1,alpha:!1};if(o)for(var A in o)u[A]=o[A];n=GL.createContext(e,u),n&&(a=GL.getContext(n).GLctx)}else a=e.getContext("2d");return a?(r&&(t||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=a,t&&GL.makeContextCurrent(n),Module.useWebGL=t,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t,r){Browser.lockPointer=e,Browser.resizeCanvas=t,Browser.vrDevice=r,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var o=Module.canvas;function a(){Browser.isFullscreen=!1;var u=o.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===u?(o.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},o.exitFullscreen=o.exitFullscreen.bind(document),Browser.lockPointer&&o.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(u.parentNode.insertBefore(o,u),u.parentNode.removeChild(u),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(o)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",a,!1),document.addEventListener("mozfullscreenchange",a,!1),document.addEventListener("webkitfullscreenchange",a,!1),document.addEventListener("MSFullscreenChange",a,!1));var n=document.createElement("div");o.parentNode.insertBefore(n,o),n.appendChild(o),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(e,t,r){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(o,a,n){return Browser.requestFullscreen(o,a,n)},Browser.requestFullscreen(e,t,r)},nextRAF:0,fakeRequestAnimationFrame:function(e){var t=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=t+1e3/60;else for(;t+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function e(t){typeof window>"u"?Browser.fakeRequestAnimationFrame(t):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(t))},safeCallback:function(e){return function(){if(!ABORT)return e.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var e=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],e.forEach(function(t){t()})}},safeRequestAnimationFrame:function(e){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?e():Browser.queuedAsyncCallbacks.push(e))})},safeSetTimeout:function(e,t){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?e():Browser.queuedAsyncCallbacks.push(e))},t)},safeSetInterval:function(e,t){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&e()},t)},getMimetype:function(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta:function(e){var t=0;switch(e.type){case"DOMMouseScroll":t=e.detail;break;case"mousewheel":t=e.wheelDelta;break;case"wheel":t=e.deltaY;break;default:throw"unrecognized mouse wheel event: "+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(e){if(Browser.pointerLock)e.type!="mousemove"&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var t=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,o=Module.canvas.height,a=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(e.type==="touchstart"||e.type==="touchend"||e.type==="touchmove"){var u=e.touch;if(u===void 0)return;var A=u.pageX-(a+t.left),p=u.pageY-(n+t.top);A=A*(r/t.width),p=p*(o/t.height);var h={x:A,y:p};if(e.type==="touchstart")Browser.lastTouches[u.identifier]=h,Browser.touches[u.identifier]=h;else if(e.type==="touchend"||e.type==="touchmove"){var w=Browser.touches[u.identifier];w||(w=h),Browser.lastTouches[u.identifier]=w,Browser.touches[u.identifier]=h}return}var I=e.pageX-(a+t.left),v=e.pageY-(n+t.top);I=I*(r/t.width),v=v*(o/t.height),Browser.mouseMovementX=I-Browser.mouseX,Browser.mouseMovementY=v-Browser.mouseY,Browser.mouseX=I,Browser.mouseY=v}},asyncLoad:function(e,t,r,o){var a=o?"":"al "+e;Module.readAsync(e,function(n){assert(n,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file "'+e+'" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var e=Module.canvas;Browser.resizeListeners.forEach(function(t){t(e.width,e.height)})},setCanvasSize:function(e,t,r){var o=Module.canvas;Browser.updateCanvasDimensions(o,e,t),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];e=e|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=e}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];e=e&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=e}Browser.updateResizeListeners()},updateCanvasDimensions:function(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var o=t,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(o/a<Module.forcedAspectRatio?o=Math.round(a*Module.forcedAspectRatio):a=Math.round(o/Module.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&typeof screen<"u"){var n=Math.min(screen.width/o,screen.height/a);o=Math.round(o*n),a=Math.round(a*n)}Browser.resizeCanvas?(e.width!=o&&(e.width=o),e.height!=a&&(e.height=a),typeof e.style<"u"&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),typeof e.style<"u"&&(o!=t||a!=r?(e.style.setProperty("width",o+"px","important"),e.style.setProperty("height",a+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var e=Browser.nextWgetRequestHandle;return Browser.nextWgetRequestHandle++,e}},SYSCALLS={varargs:0,get:function(e){SYSCALLS.varargs+=4;var t=HEAP32[SYSCALLS.varargs-4>>2];return t},getStr:function(){var e=Pointer_stringify(SYSCALLS.get());return e},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return e>=0?assert(t===0):assert(t===-1),e},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(o){return(typeof FS>"u"||!(o instanceof FS.ErrnoError))&&abort(o),-o.errno}}function ___syscall54(e,t){SYSCALLS.varargs=t;try{return 0}catch(r){return(typeof FS>"u"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(e){var t=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr<X>"],[640,1,"std::unique_ptr<X>"],[5120,1,"std::vector<X>"],[6144,2,"std::array<X, Y>"],[9216,-1,"std::function<X (Y)>"]];function r(p,h,w,I,v,b){if(h==1){var E=I&896;(E==128||E==256||E==384)&&(p="X const")}var R;return b?R=w.replace("X",p).replace("Y",v):R=p.replace("X",w).replace("Y",v),R.replace(/([*&]) (?=[*&])/g,"$1")}function o(p,h,w,I,v){throw new Error(p+" type "+w.replace("X",h+"?")+(I?" with flag "+I:"")+" in "+v)}function a(p,h,w,I,v,b,E,R){b===void 0&&(b="X"),R===void 0&&(R=1);var N=w(p);if(N)return N;var U=I(p),V=U.placeholderFlag,ee=t[V];E&&ee&&(b=r(E[2],E[0],b,ee[0],"?",!0));var le;V==0&&(le="Unbound"),V>=10&&(le="Corrupt"),R>20&&(le="Deeply nested"),le&&o(le,p,b,V,v||"?");var fe=U.paramList[0],de=a(fe,h,w,I,v,b,ee,R+1),ge,oe={flags:ee[0],id:p,name:"",paramList:[de]},Be=[],be="?";switch(U.placeholderFlag){case 1:ge=de.spec;break;case 2:if((de.flags&15360)==1024&&de.spec.ptrSize==1){oe.flags=7168;break}case 3:case 6:case 5:ge=de.spec,de.flags&15360;break;case 8:be=""+U.paramList[1],oe.paramList.push(U.paramList[1]);break;case 9:for(var g=0,we=U.paramList[1];g<we.length;g++){var Se=we[g],ce=a(Se,h,w,I,v,b,ee,R+1);Be.push(ce.name),oe.paramList.push(ce)}be=Be.join(", ");break;default:break}if(oe.name=r(ee[2],ee[0],de.name,de.flags,be),ge){for(var ne=0,te=Object.keys(ge);ne<te.length;ne++){var Ee=te[ne];oe[Ee]=oe[Ee]||ge[Ee]}oe.flags|=ge.flags}return n(h,oe)}function n(p,h){var w=h.flags,I=w&896,v=w&15360;return!h.name&&v==1024&&(h.ptrSize==1?h.name=(w&16?"":(w&8?"un":"")+"signed ")+"char":h.name=(w&8?"u":"")+(w&32?"float":"int")+(h.ptrSize*8+"_t")),h.ptrSize==8&&!(w&32)&&(v=64),v==2048&&(I==512||I==640?v=4096:I&&(v=3072)),p(v,h)}var u=function(){function p(h){this.id=h.id,this.name=h.name,this.flags=h.flags,this.spec=h}return p.prototype.toString=function(){return this.name},p}(),A={Type:u,getComplexType:a,makeType:n,structureList:t};return e.output=A,e.output||A}function __nbind_register_type(e,t){var r=_nbind.readAsciiString(t),o={flags:10240,id:e,name:r};_nbind.makeType(_nbind.constructType,o)}function __nbind_register_callback_signature(e,t){var r=_nbind.readTypeIdList(e,t),o=_nbind.callbackSignatureList.length;return _nbind.callbackSignatureList[o]=_nbind.makeJSCaller(r),o}function __extends(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);function o(){this.constructor=e}o.prototype=t.prototype,e.prototype=new o}function __nbind_register_class(e,t,r,o,a,n,u){var A=_nbind.readAsciiString(u),p=_nbind.readPolicyList(t),h=HEAPU32.subarray(e/4,e/4+2),w={flags:2048|(p.Value?2:0),id:h[0],name:A},I=_nbind.makeType(_nbind.constructType,w);I.ptrType=_nbind.getComplexType(h[1],_nbind.constructType,_nbind.getType,_nbind.queryType),I.destroy=_nbind.makeMethodCaller(I.ptrType,{boundID:w.id,flags:0,name:"destroy",num:0,ptr:n,title:I.name+".free",typeList:["void","uint32_t","uint32_t"]}),a&&(I.superIdList=Array.prototype.slice.call(HEAPU32.subarray(r/4,r/4+a)),I.upcastList=Array.prototype.slice.call(HEAPU32.subarray(o/4,o/4+a))),Module[I.name]=I.makeBound(p),_nbind.BindClass.list.push(I)}function _removeAccessorPrefix(e){var t=/^[Gg]et_?([A-Z]?([A-Z]?))/;return e.replace(t,function(r,o,a){return a?o:o.toLowerCase()})}function __nbind_register_function(e,t,r,o,a,n,u,A,p,h){var w=_nbind.getType(e),I=_nbind.readPolicyList(t),v=_nbind.readTypeIdList(r,o),b;if(u==5)b=[{direct:a,name:"__nbindConstructor",ptr:0,title:w.name+" constructor",typeList:["uint32_t"].concat(v.slice(1))},{direct:n,name:"__nbindValueConstructor",ptr:0,title:w.name+" value constructor",typeList:["void","uint32_t"].concat(v.slice(1))}];else{var E=_nbind.readAsciiString(A),R=(w.name&&w.name+".")+E;(u==3||u==4)&&(E=_removeAccessorPrefix(E)),b=[{boundID:e,direct:n,name:E,ptr:a,title:R,typeList:v}]}for(var N=0,U=b;N<U.length;N++){var V=U[N];V.signatureType=u,V.policyTbl=I,V.num=p,V.flags=h,w.addMethod(V)}}function _nbind_value(e,t){_nbind.typeNameTbl[e]||_nbind.throwError("Unknown value type "+e),Module.NBind.bind_value(e,t),_defineHidden(_nbind.typeNameTbl[e].proto.prototype.__nbindValueConstructor)(t.prototype,"__nbindValueConstructor")}Module._nbind_value=_nbind_value;function __nbind_get_value_object(e,t){var r=_nbind.popValue(e);if(!r.fromJS)throw new Error("Object "+r+" has no fromJS function");r.fromJS(function(){r.__nbindValueConstructor.apply(this,Array.prototype.concat.apply([t],arguments))})}function _emscripten_memcpy_big(e,t,r){return HEAPU8.set(HEAPU8.subarray(t,t+r),e),e}function __nbind_register_primitive(e,t,r){var o={flags:1024|r,id:e,ptrSize:t};_nbind.makeType(_nbind.constructType,o)}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}function _llvm_stacksave(){var e=_llvm_stacksave;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),e.LLVM_SAVEDSTACKS.length-1}function ___syscall140(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),o=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),u=SYSCALLS.get(),A=a;return FS.llseek(r,A,u),HEAP32[n>>2]=r.position,r.getdents&&A===0&&u===0&&(r.getdents=null),0}catch(p){return(typeof FS>"u"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.get(),o=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(w,I){var v=___syscall146.buffers[w];assert(v),I===0||I===10?((w===1?Module.print:Module.printErr)(UTF8ArrayToString(v,0)),v.length=0):v.push(I)});for(var u=0;u<a;u++){for(var A=HEAP32[o+u*8>>2],p=HEAP32[o+(u*8+4)>>2],h=0;h<p;h++)___syscall146.printChar(r,HEAPU8[A+h]);n+=p}return n}catch(w){return(typeof FS>"u"||!(w instanceof FS.ErrnoError))&&abort(w),-w.errno}}function __nbind_finish(){for(var e=0,t=_nbind.BindClass.list;e<t.length;e++){var r=t[e];r.finish()}}var ___dso_handle=STATICTOP;STATICTOP+=16,function(_nbind){var typeIdTbl={};_nbind.typeNameTbl={};var Pool=function(){function e(){}return e.lalloc=function(t){t=t+7&-8;var r=HEAPU32[e.usedPtr];if(t>e.pageSize/2||t>e.pageSize-r){var o=_nbind.typeNameTbl.NBind.proto;return o.lalloc(t)}else return HEAPU32[e.usedPtr]=r+t,e.rootPtr+r},e.lreset=function(t,r){var o=HEAPU32[e.pagePtr];if(o){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(t,r)}else HEAPU32[e.usedPtr]=t},e}();_nbind.Pool=Pool;function constructType(e,t){var r=e==10240?_nbind.makeTypeNameTbl[t.name]||_nbind.BindType:_nbind.makeTypeKindTbl[e],o=new r(t);return typeIdTbl[t.id]=o,_nbind.typeNameTbl[t.name]=o,o}_nbind.constructType=constructType;function getType(e){return typeIdTbl[e]}_nbind.getType=getType;function queryType(e){var t=HEAPU8[e],r=_nbind.structureList[t][1];e/=4,r<0&&(++e,r=HEAPU32[e]+1);var o=Array.prototype.slice.call(HEAPU32.subarray(e+1,e+1+r));return t==9&&(o=[o[0],o.slice(1)]),{paramList:o,placeholderFlag:t}}_nbind.queryType=queryType;function getTypes(e,t){return e.map(function(r){return typeof r=="number"?_nbind.getComplexType(r,constructType,getType,queryType,t):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(e,t){return Array.prototype.slice.call(HEAPU32,e/4,e/4+t)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(e){for(var t=e;HEAPU8[t++];);return String.fromCharCode.apply("",HEAPU8.subarray(e,t-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(e){var t={};if(e)for(;;){var r=HEAPU32[e/4];if(!r)break;t[readAsciiString(r)]=!0,e+=4}return t}_nbind.readPolicyList=readPolicyList;function getDynCall(e,t){var r={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},o=e.map(function(n){return r[n.name]||"i"}).join(""),a=Module["dynCall_"+o];if(!a)throw new Error("dynCall_"+o+" not found for "+t+"("+e.map(function(n){return n.name}).join(", ")+")");return a}_nbind.getDynCall=getDynCall;function addMethod(e,t,r,o){var a=e[t];e.hasOwnProperty(t)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),e[t]=a),a.addMethod(r,o)):(r.arity=o,e[t]=r)}_nbind.addMethod=addMethod;function throwError(e){throw new Error(e)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return t.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},t.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},t}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(e){__extends(t,e);function t(r){var o=e.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return o.heap=a[r.ptrSize*8],o.ptrSize=r.ptrSize,o}return t.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},t.prototype.makeWireWrite=function(r,o){return o&&o.Strict&&function(a){if(typeof a=="number")return a;throw new Error("Type mismatch")}},t}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(e,t){if(e==null){if(t&&t.Nullable)return 0;throw new Error("Type mismatch")}if(t&&t.Strict){if(typeof e!="string")throw new Error("Type mismatch")}else e=e.toString();var r=Module.lengthBytesUTF8(e)+1,o=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(e,HEAPU8,o,r),o}_nbind.pushCString=pushCString;function popCString(e){return e===0?null:Module.Pointer_stringify(e)}_nbind.popCString=popCString;var CStringType=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return t.prototype.makeWireWrite=function(r,o){return function(a){return pushCString(a,o)}},t}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.wireRead=function(o){return!!o},r}return t.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},t.prototype.makeWireRead=function(r){return"!!("+r+")"},t.prototype.makeWireWrite=function(r,o){return o&&o.Strict&&function(a){if(typeof a=="boolean")return a;throw new Error("Type mismatch")}||r},t}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function e(){}return e.prototype.persist=function(){this.__nbindState|=1},e}();_nbind.Wrapper=Wrapper;function makeBound(e,t){var r=function(o){__extends(a,o);function a(n,u,A,p){var h=o.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var w=u,I=A,v=p;if(n!==_nbind.ptrMarker){var b=h.__nbindConstructor.apply(h,arguments);w=4608,v=HEAPU32[b/4],I=HEAPU32[b/4+1]}var E={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:w,__nbindPtr:I};v&&(R.__nbindShared=v,_nbind.mark(h));for(var N=0,U=Object.keys(R);N<U.length;N++){var V=U[N];E.value=R[V],Object.defineProperty(h,V,E)}return _defineHidden(0)(h,"__nbindState"),h}return a.prototype.free=function(){t.destroy.call(this,this.__nbindShared,this.__nbindFlags),this.__nbindState|=2,disableMember(this,"__nbindShared"),disableMember(this,"__nbindPtr")},a}(Wrapper);return __decorate([_defineHidden()],r.prototype,"__nbindConstructor",void 0),__decorate([_defineHidden()],r.prototype,"__nbindValueConstructor",void 0),__decorate([_defineHidden(e)],r.prototype,"__nbindPolicies",void 0),r}_nbind.makeBound=makeBound;function disableMember(e,t){function r(){throw new Error("Accessing deleted object")}Object.defineProperty(e,t,{configurable:!1,enumerable:!1,get:r,set:r})}_nbind.ptrMarker={};var BindClass=function(e){__extends(t,e);function t(r){var o=e.call(this,r)||this;return o.wireRead=function(a){return _nbind.popValue(a,o.ptrType)},o.wireWrite=function(a){return pushPointer(a,o.ptrType,!0)},o.pendingSuperCount=0,o.ready=!1,o.methodTbl={},r.paramList?(o.classType=r.paramList[0].classType,o.proto=o.classType.proto):o.classType=o,o}return t.prototype.makeBound=function(r){var o=_nbind.makeBound(r,this);return this.proto=o,this.ptrType.proto=o,o},t.prototype.addMethod=function(r){var o=this.methodTbl[r.name]||[];o.push(r),this.methodTbl[r.name]=o},t.prototype.registerMethods=function(r,o){for(var a,n=0,u=Object.keys(r.methodTbl);n<u.length;n++)for(var A=u[n],p=r.methodTbl[A],h=0,w=p;h<w.length;h++){var I=w[h],v=void 0,b=void 0;if(v=this.proto.prototype,!(o&&I.signatureType!=1))switch(I.signatureType){case 1:v=this.proto;case 5:b=_nbind.makeCaller(I),_nbind.addMethod(v,I.name,b,I.typeList.length-1);break;case 4:a=_nbind.makeMethodCaller(r.ptrType,I);break;case 3:Object.defineProperty(v,I.name,{configurable:!0,enumerable:!1,get:_nbind.makeMethodCaller(r.ptrType,I),set:a});break;case 2:b=_nbind.makeMethodCaller(r.ptrType,I),_nbind.addMethod(v,I.name,b,I.typeList.length-1);break;default:break}}},t.prototype.registerSuperMethods=function(r,o,a){if(!a[r.name]){a[r.name]=!0;for(var n=0,u,A=0,p=r.superIdList||[];A<p.length;A++){var h=p[A],w=_nbind.getType(h);n++<o||o<0?u=-1:u=0,this.registerSuperMethods(w,u,a)}this.registerMethods(r,o<0)}},t.prototype.finish=function(){if(this.ready)return this;this.ready=!0,this.superList=(this.superIdList||[]).map(function(a){return _nbind.getType(a).finish()});var r=this.proto;if(this.superList.length){var o=function(){this.constructor=r};o.prototype=this.superList[0].proto.prototype,r.prototype=new o}return r!=Module&&(r.prototype.__nbindType=this),this.registerSuperMethods(this,1,{}),this},t.prototype.upcastStep=function(r,o){if(r==this)return o;for(var a=0;a<this.superList.length;++a){var n=this.superList[a].upcastStep(r,_nbind.callUpcast(this.upcastList[a],o));if(n)return n}return 0},t}(_nbind.BindType);BindClass.list=[],_nbind.BindClass=BindClass;function popPointer(e,t){return e?new t.proto(_nbind.ptrMarker,t.flags,e):null}_nbind.popPointer=popPointer;function pushPointer(e,t,r){if(!(e instanceof _nbind.Wrapper)){if(r)return _nbind.pushValue(e);throw new Error("Type mismatch")}var o=e.__nbindPtr,a=e.__nbindType.classType,n=t.classType;if(e instanceof t.proto)for(;a!=n;)o=_nbind.callUpcast(a.upcastList[0],o),a=a.superList[0];else if(o=a.upcastStep(n,o),!o)throw new Error("Type mismatch");return o}_nbind.pushPointer=pushPointer;function pushMutablePointer(e,t){var r=pushPointer(e,t);if(e.__nbindFlags&1)throw new Error("Passing a const value as a non-const argument");return r}var BindClassPtr=function(e){__extends(t,e);function t(r){var o=e.call(this,r)||this;o.classType=r.paramList[0].classType,o.proto=o.classType.proto;var a=r.flags&1,n=(o.flags&896)==256&&r.flags&2,u=a?pushPointer:pushMutablePointer,A=n?_nbind.popValue:popPointer;return o.makeWireWrite=function(p,h){return h.Nullable?function(w){return w?u(w,o):0}:function(w){return u(w,o)}},o.wireRead=function(p){return A(p,o)},o.wireWrite=function(p){return u(p,o)},o}return t}(_nbind.BindType);_nbind.BindClassPtr=BindClassPtr;function popShared(e,t){var r=HEAPU32[e/4],o=HEAPU32[e/4+1];return o?new t.proto(_nbind.ptrMarker,t.flags,o,r):null}_nbind.popShared=popShared;function pushShared(e,t){if(!(e instanceof t.proto))throw new Error("Type mismatch");return e.__nbindShared}function pushMutableShared(e,t){if(!(e instanceof t.proto))throw new Error("Type mismatch");if(e.__nbindFlags&1)throw new Error("Passing a const value as a non-const argument");return e.__nbindShared}var SharedClassPtr=function(e){__extends(t,e);function t(r){var o=e.call(this,r)||this;o.readResources=[_nbind.resources.pool],o.classType=r.paramList[0].classType,o.proto=o.classType.proto;var a=r.flags&1,n=a?pushShared:pushMutableShared;return o.wireRead=function(u){return popShared(u,o)},o.wireWrite=function(u){return n(u,o)},o}return t}(_nbind.BindType);_nbind.SharedClassPtr=SharedClassPtr,_nbind.externalList=[0];var firstFreeExternal=0,External=function(){function e(t){this.refCount=1,this.data=t}return e.prototype.register=function(){var t=firstFreeExternal;return t?firstFreeExternal=_nbind.externalList[t]:t=_nbind.externalList.length,_nbind.externalList[t]=this,t},e.prototype.reference=function(){++this.refCount},e.prototype.dereference=function(t){--this.refCount==0&&(this.free&&this.free(),_nbind.externalList[t]=firstFreeExternal,firstFreeExternal=t)},e}();_nbind.External=External;function popExternal(e){var t=_nbind.externalList[e];return t.dereference(e),t.data}function pushExternal(e){var t=new External(e);return t.reference(),t.register()}var ExternalType=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.wireRead=popExternal,r.wireWrite=pushExternal,r}return t}(_nbind.BindType);_nbind.ExternalType=ExternalType,_nbind.callbackSignatureList=[];var CallbackType=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.wireWrite=function(o){return typeof o!="function"&&_nbind.throwError("Type mismatch"),new _nbind.External(o).register()},r}return t}(_nbind.BindType);_nbind.CallbackType=CallbackType,_nbind.valueList=[0];var firstFreeValue=0;function pushValue(e){var t=firstFreeValue;return t?firstFreeValue=_nbind.valueList[t]:t=_nbind.valueList.length,_nbind.valueList[t]=e,t*2+1}_nbind.pushValue=pushValue;function popValue(e,t){if(e||_nbind.throwError("Value type JavaScript class is missing or not registered"),e&1){e>>=1;var r=_nbind.valueList[e];return _nbind.valueList[e]=firstFreeValue,firstFreeValue=e,r}else{if(t)return _nbind.popShared(e,t);throw new Error("Invalid value slot "+e)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(e){return typeof e=="number"?e:pushValue(e)*4096+valueBase}function pop64(e){return e<valueBase?e:popValue((e-valueBase)/4096)}var CreateValueType=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeWireWrite=function(r){return"(_nbind.pushValue(new "+r+"))"},t}(_nbind.BindType);_nbind.CreateValueType=CreateValueType;var Int64Type=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.wireWrite=push64,r.wireRead=pop64,r}return t}(_nbind.BindType);_nbind.Int64Type=Int64Type;function pushArray(e,t){if(!e)return 0;var r=e.length;if((t.size||t.size===0)&&r<t.size)throw new Error("Type mismatch");var o=t.memberType.ptrSize,a=_nbind.Pool.lalloc(4+r*o);HEAPU32[a/4]=r;var n=t.memberType.heap,u=(a+4)/o,A=t.memberType.wireWrite,p=0;if(A)for(;p<r;)n[u++]=A(e[p++]);else for(;p<r;)n[u++]=e[p++];return a}_nbind.pushArray=pushArray;function popArray(e,t){if(e===0)return null;var r=HEAPU32[e/4],o=new Array(r),a=t.memberType.heap;e=(e+4)/t.memberType.ptrSize;var n=t.memberType.wireRead,u=0;if(n)for(;u<r;)o[u++]=n(a[e++]);else for(;u<r;)o[u++]=a[e++];return o}_nbind.popArray=popArray;var ArrayType=function(e){__extends(t,e);function t(r){var o=e.call(this,r)||this;return o.wireRead=function(a){return popArray(a,o)},o.wireWrite=function(a){return pushArray(a,o)},o.readResources=[_nbind.resources.pool],o.writeResources=[_nbind.resources.pool],o.memberType=r.paramList[0],r.paramList[1]&&(o.size=r.paramList[1]),o}return t}(_nbind.BindType);_nbind.ArrayType=ArrayType;function pushString(e,t){if(e==null)if(t&&t.Nullable)e="";else throw new Error("Type mismatch");if(t&&t.Strict){if(typeof e!="string")throw new Error("Type mismatch")}else e=e.toString();var r=Module.lengthBytesUTF8(e),o=_nbind.Pool.lalloc(4+r+1);return HEAPU32[o/4]=r,Module.stringToUTF8Array(e,HEAPU8,o+4,r+1),o}_nbind.pushString=pushString;function popString(e){if(e===0)return null;var t=HEAPU32[e/4];return Module.Pointer_stringify(e+4,t)}_nbind.popString=popString;var StringType=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.wireRead=popString,r.wireWrite=pushString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return t.prototype.makeWireWrite=function(r,o){return function(a){return pushString(a,o)}},t}(_nbind.BindType);_nbind.StringType=StringType;function makeArgList(e){return Array.apply(null,Array(e)).map(function(t,r){return"a"+(r+1)})}function anyNeedsWireWrite(e,t){return e.reduce(function(r,o){return r||o.needsWireWrite(t)},!1)}function anyNeedsWireRead(e,t){return e.reduce(function(r,o){return r||!!o.needsWireRead(t)},!1)}function makeWireRead(e,t,r,o){var a=e.length;return r.makeWireRead?r.makeWireRead(o,e,a):r.wireRead?(e[a]=r.wireRead,"(convertParamList["+a+"]("+o+"))"):o}function makeWireWrite(e,t,r,o){var a,n=e.length;return r.makeWireWrite?a=r.makeWireWrite(o,t,e,n):a=r.wireWrite,a?typeof a=="string"?a:(e[n]=a,"(convertParamList["+n+"]("+o+"))"):o}function buildCallerFunction(dynCall,ptrType,ptr,num,policyTbl,needsWireWrite,prefix,returnType,argTypeList,mask,err){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireRead(convertParamList,policyTbl,returnType,"dynCall("+[prefix].concat(argList.map(function(e,t){return makeWireWrite(convertParamList,policyTbl,argTypeList[t],e)})).join(",")+")"),resourceSet=_nbind.listResources([returnType],argTypeList),sourceCode="function("+argList.join(",")+"){"+(mask?"this.__nbindFlags&mask&&err();":"")+resourceSet.makeOpen()+"var r="+callExpression+";"+resourceSet.makeClose()+"return r;}";return eval("("+sourceCode+")")}function buildJSCallerFunction(returnType,argTypeList){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireWrite(convertParamList,null,returnType,"_nbind.externalList[num].data("+argList.map(function(e,t){return makeWireRead(convertParamList,null,argTypeList[t],e)}).join(",")+")"),resourceSet=_nbind.listResources(argTypeList,[returnType]);resourceSet.remove(_nbind.resources.pool);var sourceCode="function("+["dummy","num"].concat(argList).join(",")+"){"+resourceSet.makeOpen()+"var r="+callExpression+";"+resourceSet.makeClose()+"return r;}";return eval("("+sourceCode+")")}_nbind.buildJSCallerFunction=buildJSCallerFunction;function makeJSCaller(e){var t=e.length-1,r=_nbind.getTypes(e,"callback"),o=r[0],a=r.slice(1),n=anyNeedsWireRead(a,null),u=o.needsWireWrite(null);if(!u&&!n)switch(t){case 0:return function(A,p){return _nbind.externalList[p].data()};case 1:return function(A,p,h){return _nbind.externalList[p].data(h)};case 2:return function(A,p,h,w){return _nbind.externalList[p].data(h,w)};case 3:return function(A,p,h,w,I){return _nbind.externalList[p].data(h,w,I)};default:break}return buildJSCallerFunction(o,a)}_nbind.makeJSCaller=makeJSCaller;function makeMethodCaller(e,t){var r=t.typeList.length-1,o=t.typeList.slice(0);o.splice(1,0,"uint32_t",t.boundID);var a=_nbind.getTypes(o,t.title),n=a[0],u=a.slice(3),A=n.needsWireRead(t.policyTbl),p=anyNeedsWireWrite(u,t.policyTbl),h=t.ptr,w=t.num,I=_nbind.getDynCall(a,t.title),v=~t.flags&1;function b(){throw new Error("Calling a non-const method on a const object")}if(!A&&!p)switch(r){case 0:return function(){return this.__nbindFlags&v?b():I(h,w,_nbind.pushPointer(this,e))};case 1:return function(E){return this.__nbindFlags&v?b():I(h,w,_nbind.pushPointer(this,e),E)};case 2:return function(E,R){return this.__nbindFlags&v?b():I(h,w,_nbind.pushPointer(this,e),E,R)};case 3:return function(E,R,N){return this.__nbindFlags&v?b():I(h,w,_nbind.pushPointer(this,e),E,R,N)};default:break}return buildCallerFunction(I,e,h,w,t.policyTbl,p,"ptr,num,pushPointer(this,ptrType)",n,u,v,b)}_nbind.makeMethodCaller=makeMethodCaller;function makeCaller(e){var t=e.typeList.length-1,r=_nbind.getTypes(e.typeList,e.title),o=r[0],a=r.slice(1),n=o.needsWireRead(e.policyTbl),u=anyNeedsWireWrite(a,e.policyTbl),A=e.direct,p=e.ptr;if(e.direct&&!n&&!u){var h=_nbind.getDynCall(r,e.title);switch(t){case 0:return function(){return h(A)};case 1:return function(b){return h(A,b)};case 2:return function(b,E){return h(A,b,E)};case 3:return function(b,E,R){return h(A,b,E,R)};default:break}p=0}var w;if(p){var I=e.typeList.slice(0);I.splice(1,0,"uint32_t"),r=_nbind.getTypes(I,e.title),w="ptr,num"}else p=A,w="ptr";var v=_nbind.getDynCall(r,e.title);return buildCallerFunction(v,null,p,e.num,e.policyTbl,u,w,o,a)}_nbind.makeCaller=makeCaller;function makeOverloader(e,t){var r=[];function o(){return r[arguments.length].apply(this,arguments)}return o.addMethod=function(a,n){r[n]=a},o.addMethod(e,t),o}_nbind.makeOverloader=makeOverloader;var Resource=function(){function e(t,r){var o=this;this.makeOpen=function(){return Object.keys(o.openTbl).join("")},this.makeClose=function(){return Object.keys(o.closeTbl).join("")},this.openTbl={},this.closeTbl={},t&&(this.openTbl[t]=!0),r&&(this.closeTbl[r]=!0)}return e.prototype.add=function(t){for(var r=0,o=Object.keys(t.openTbl);r<o.length;r++){var a=o[r];this.openTbl[a]=!0}for(var n=0,u=Object.keys(t.closeTbl);n<u.length;n++){var a=u[n];this.closeTbl[a]=!0}},e.prototype.remove=function(t){for(var r=0,o=Object.keys(t.openTbl);r<o.length;r++){var a=o[r];delete this.openTbl[a]}for(var n=0,u=Object.keys(t.closeTbl);n<u.length;n++){var a=u[n];delete this.closeTbl[a]}},e}();_nbind.Resource=Resource;function listResources(e,t){for(var r=new Resource,o=0,a=e;o<a.length;o++)for(var n=a[o],u=0,A=n.readResources||[];u<A.length;u++){var p=A[u];r.add(p)}for(var h=0,w=t;h<w.length;h++)for(var n=w[h],I=0,v=n.writeResources||[];I<v.length;I++){var p=v[I];r.add(p)}return r}_nbind.listResources=listResources,_nbind.resources={pool:new Resource("var used=HEAPU32[_nbind.Pool.usedPtr],page=HEAPU32[_nbind.Pool.pagePtr];","_nbind.Pool.lreset(used,page);")};var ExternalBuffer=function(e){__extends(t,e);function t(r,o){var a=e.call(this,r)||this;return a.ptr=o,a}return t.prototype.free=function(){_free(this.ptr)},t}(_nbind.External);function getBuffer(e){return e instanceof ArrayBuffer?new Uint8Array(e):e instanceof DataView?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function pushBuffer(e,t){if(e==null&&t&&t.Nullable&&(e=[]),typeof e!="object")throw new Error("Type mismatch");var r=e,o=r.byteLength||r.length;if(!o&&o!==0&&r.byteLength!==0)throw new Error("Type mismatch");var a=_nbind.Pool.lalloc(8),n=_malloc(o),u=a/4;return HEAPU32[u++]=o,HEAPU32[u++]=n,HEAPU32[u++]=new ExternalBuffer(e,n).register(),HEAPU8.set(getBuffer(e),n),a}var BufferType=function(e){__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.wireWrite=pushBuffer,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return t.prototype.makeWireWrite=function(r,o){return function(a){return pushBuffer(a,o)}},t}(_nbind.BindType);_nbind.BufferType=BufferType;function commitBuffer(e,t,r){var o=_nbind.externalList[e].data,a=Buffer;if(typeof Buffer!="function"&&(a=function(){}),!(o instanceof Array)){var n=HEAPU8.subarray(t,t+r);if(o instanceof a){var u=void 0;typeof Buffer.from=="function"&&Buffer.from.length>=3?u=Buffer.from(n):u=new Buffer(n),u.copy(o)}else getBuffer(o).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var e=0,t=dirtyList;e<t.length;e++){var r=t[e];r.__nbindState&3||r.free()}dirtyList=[],gcTimer=0}_nbind.mark=function(e){};function toggleLightGC(e){e?_nbind.mark=function(t){dirtyList.push(t),gcTimer||(gcTimer=setTimeout(sweep,0))}:_nbind.mark=function(t){}}_nbind.toggleLightGC=toggleLightGC}(_nbind),Module.requestFullScreen=function e(t,r,o){Module.printErr("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead."),Module.requestFullScreen=Module.requestFullscreen,Browser.requestFullScreen(t,r,o)},Module.requestFullscreen=function e(t,r,o){Browser.requestFullscreen(t,r,o)},Module.requestAnimationFrame=function e(t){Browser.requestAnimationFrame(t)},Module.setCanvasSize=function e(t,r,o){Browser.setCanvasSize(t,r,o)},Module.pauseMainLoop=function e(){Browser.mainLoop.pause()},Module.resumeMainLoop=function e(){Browser.mainLoop.resume()},Module.getUserMedia=function e(){Browser.getUserMedia()},Module.createContext=function e(t,r,o,a){return Browser.createContext(t,r,o,a)},ENVIRONMENT_IS_NODE?_emscripten_get_now=function(){var t=process.hrtime();return t[0]*1e3+t[1]/1e6}:typeof dateNow<"u"?_emscripten_get_now=dateNow:typeof self=="object"&&self.performance&&typeof self.performance.now=="function"?_emscripten_get_now=function(){return self.performance.now()}:typeof performance=="object"&&typeof performance.now=="function"?_emscripten_get_now=function(){return performance.now()}:_emscripten_get_now=Date.now,__ATEXIT__.push(function(){var e=Module._fflush;e&&e(0);var t=___syscall146.printChar;if(!!t){var r=___syscall146.buffers;r[1].length&&t(1,10),r[2].length&&t(2,10)}}),DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(e,t,r,o,a,n){try{Module.dynCall_viiiii(e,t,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_vif(e,t,r){try{Module.dynCall_vif(e,t,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_vid(e,t,r){try{Module.dynCall_vid(e,t,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_fiff(e,t,r,o){try{return Module.dynCall_fiff(e,t,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vi(e,t){try{Module.dynCall_vi(e,t)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_vii(e,t,r){try{Module.dynCall_vii(e,t,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_ii(e,t){try{return Module.dynCall_ii(e,t)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_viddi(e,t,r,o,a){try{Module.dynCall_viddi(e,t,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_vidd(e,t,r,o){try{Module.dynCall_vidd(e,t,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iiii(e,t,r,o){try{return Module.dynCall_iiii(e,t,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_diii(e,t,r,o){try{return Module.dynCall_diii(e,t,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_di(e,t){try{return Module.dynCall_di(e,t)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_iid(e,t,r){try{return Module.dynCall_iid(e,t,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iii(e,t,r){try{return Module.dynCall_iii(e,t,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viiddi(e,t,r,o,a,n){try{Module.dynCall_viiddi(e,t,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_viiiiii(e,t,r,o,a,n,u){try{Module.dynCall_viiiiii(e,t,r,o,a,n,u)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_dii(e,t,r){try{return Module.dynCall_dii(e,t,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_i(e){try{return Module.dynCall_i(e)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_iiiiii(e,t,r,o,a,n){try{return Module.dynCall_iiiiii(e,t,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_viiid(e,t,r,o,a){try{Module.dynCall_viiid(e,t,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_viififi(e,t,r,o,a,n,u){try{Module.dynCall_viififi(e,t,r,o,a,n,u)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_viii(e,t,r,o){try{Module.dynCall_viii(e,t,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_viid(e,t,r,o){try{Module.dynCall_viid(e,t,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_idd(e,t,r){try{return Module.dynCall_idd(e,t,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viiii(e,t,r,o,a){try{Module.dynCall_viiii(e,t,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(e,t,r){var o=new e.Int8Array(r),a=new e.Int16Array(r),n=new e.Int32Array(r),u=new e.Uint8Array(r),A=new e.Uint16Array(r),p=new e.Uint32Array(r),h=new e.Float32Array(r),w=new e.Float64Array(r),I=t.DYNAMICTOP_PTR|0,v=t.tempDoublePtr|0,b=t.ABORT|0,E=t.STACKTOP|0,R=t.STACK_MAX|0,N=t.cttz_i8|0,U=t.___dso_handle|0,V=0,ee=0,le=0,fe=0,de=e.NaN,ge=e.Infinity,oe=0,Be=0,be=0,g=0,we=0,Se=0,ce=e.Math.floor,ne=e.Math.abs,te=e.Math.sqrt,Ee=e.Math.pow,Re=e.Math.cos,dt=e.Math.sin,H=e.Math.tan,at=e.Math.acos,Te=e.Math.asin,Qe=e.Math.atan,ke=e.Math.atan2,He=e.Math.exp,Ne=e.Math.log,Ve=e.Math.ceil,je=e.Math.imul,x=e.Math.min,C=e.Math.max,P=e.Math.clz32,y=e.Math.fround,F=t.abort,z=t.assert,X=t.enlargeMemory,Z=t.getTotalMemory,ie=t.abortOnCannotGrowMemory,Pe=t.invoke_viiiii,Le=t.invoke_vif,ot=t.invoke_vid,gt=t.invoke_fiff,jt=t.invoke_vi,$t=t.invoke_vii,xt=t.invoke_ii,on=t.invoke_viddi,br=t.invoke_vidd,dr=t.invoke_iiii,Pr=t.invoke_diii,Yr=t.invoke_di,Wn=t.invoke_iid,Os=t.invoke_iii,Ti=t.invoke_viiddi,hs=t.invoke_viiiiii,io=t.invoke_dii,Si=t.invoke_i,Ms=t.invoke_iiiiii,so=t.invoke_viiid,cc=t.invoke_viififi,Au=t.invoke_viii,op=t.invoke_v,ap=t.invoke_viid,Us=t.invoke_idd,vn=t.invoke_viiii,oo=t._emscripten_asm_const_iiiii,_s=t._emscripten_asm_const_iiidddddd,dl=t._emscripten_asm_const_iiiid,ml=t.__nbind_reference_external,ao=t._emscripten_asm_const_iiiiiiii,Kn=t._removeAccessorPrefix,Ln=t._typeModule,Ni=t.__nbind_register_pool,On=t.__decorate,Hi=t._llvm_stackrestore,ve=t.___cxa_atexit,Li=t.__extends,ni=t.__nbind_get_value_object,Ma=t.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,pr=t._emscripten_set_main_loop_timing,uc=t.__nbind_register_primitive,fu=t.__nbind_register_type,Ac=t._emscripten_memcpy_big,yl=t.__nbind_register_function,DA=t.___setErrNo,pu=t.__nbind_register_class,Ce=t.__nbind_finish,Rt=t._abort,fc=t._nbind_value,ji=t._llvm_stacksave,hu=t.___syscall54,Yt=t._defineHidden,El=t._emscripten_set_main_loop,SA=t._emscripten_get_now,lp=t.__nbind_register_callback_signature,pc=t._emscripten_asm_const_iiiiii,PA=t.__nbind_free_external,Qn=t._emscripten_asm_const_iiii,pi=t._emscripten_asm_const_iiididi,hc=t.___syscall6,xA=t._atexit,oa=t.___syscall140,Oi=t.___syscall146,_o=y(0);let Ze=y(0);function lo(s){s=s|0;var l=0;return l=E,E=E+s|0,E=E+15&-16,l|0}function gc(){return E|0}function gu(s){s=s|0,E=s}function qi(s,l){s=s|0,l=l|0,E=s,R=l}function du(s,l){s=s|0,l=l|0,V||(V=s,ee=l)}function bA(s){s=s|0,Se=s}function Ua(){return Se|0}function dc(){var s=0,l=0;vr(8104,8,400)|0,vr(8504,408,540)|0,s=9044,l=s+44|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));o[9088]=0,o[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,ve(17,8104,U|0)|0}function gs(s){s=s|0,ft(s+948|0)}function Ut(s){return s=y(s),((Pu(s)|0)&2147483647)>>>0>2139095040|0}function kn(s,l,c){s=s|0,l=l|0,c=c|0;e:do if(n[s+(l<<3)+4>>2]|0)s=s+(l<<3)|0;else{if((l|2|0)==3&&n[s+60>>2]|0){s=s+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[s+52>>2]|0){s=s+48|0;break e}break}default:}if(n[s+68>>2]|0){s=s+64|0;break}else{s=(l|1|0)==5?948:c;break}}while(0);return s|0}function Ei(s){s=s|0;var l=0;return l=fD(1e3)|0,aa(s,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,vr(l|0,8104,1e3)|0,o[s+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=s,l|0}function aa(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;d=E,E=E+16|0,f=d,l||(n[f>>2]=c,mg(s,5,3197,f)),E=d}function co(){return Ei(956)|0}function Hs(s){s=s|0;var l=0;return l=Kt(1e3)|0,la(l,s),aa(n[s+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function la(s,l){s=s|0,l=l|0;var c=0;vr(s|0,l|0,948)|0,Fm(s+948|0,l+948|0),c=s+960|0,s=l+960|0,l=c+40|0;do n[c>>2]=n[s>>2],c=c+4|0,s=s+4|0;while((c|0)<(l|0))}function ca(s){s=s|0;var l=0,c=0,f=0,d=0;if(l=s+944|0,c=n[l>>2]|0,c|0&&(Ho(c+948|0,s)|0,n[l>>2]=0),c=wi(s)|0,c|0){l=0;do n[(ds(s,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(c|0))}c=s+948|0,f=n[c>>2]|0,d=s+952|0,l=n[d>>2]|0,(l|0)!=(f|0)&&(n[d>>2]=l+(~((l+-4-f|0)>>>2)<<2)),ms(c),pD(s),n[2276]=(n[2276]|0)+-1}function Ho(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0;f=n[s>>2]|0,Q=s+4|0,c=n[Q>>2]|0,m=c;e:do if((f|0)==(c|0))d=f,B=4;else for(s=f;;){if((n[s>>2]|0)==(l|0)){d=s,B=4;break e}if(s=s+4|0,(s|0)==(c|0)){s=0;break}}while(0);return(B|0)==4&&((d|0)!=(c|0)?(f=d+4|0,s=m-f|0,l=s>>2,l&&(LC(d|0,f|0,s|0)|0,c=n[Q>>2]|0),s=d+(l<<2)|0,(c|0)==(s|0)||(n[Q>>2]=c+(~((c+-4-s|0)>>>2)<<2)),s=1):s=0),s|0}function wi(s){return s=s|0,(n[s+952>>2]|0)-(n[s+948>>2]|0)>>2|0}function ds(s,l){s=s|0,l=l|0;var c=0;return c=n[s+948>>2]|0,(n[s+952>>2]|0)-c>>2>>>0>l>>>0?s=n[c+(l<<2)>>2]|0:s=0,s|0}function ms(s){s=s|0;var l=0,c=0,f=0,d=0;f=E,E=E+32|0,l=f,d=n[s>>2]|0,c=(n[s+4>>2]|0)-d|0,((n[s+8>>2]|0)-d|0)>>>0>c>>>0&&(d=c>>2,wp(l,d,d,s+8|0),Cg(s,l),_A(l)),E=f}function ys(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;M=wi(s)|0;do if(M|0){if((n[(ds(s,0)|0)+944>>2]|0)==(s|0)){if(!(Ho(s+948|0,l)|0))break;vr(l+400|0,8504,540)|0,n[l+944>>2]=0,Oe(s);break}B=n[(n[s+976>>2]|0)+12>>2]|0,Q=s+948|0,k=(B|0)==0,c=0,m=0;do f=n[(n[Q>>2]|0)+(m<<2)>>2]|0,(f|0)==(l|0)?Oe(s):(d=Hs(f)|0,n[(n[Q>>2]|0)+(c<<2)>>2]=d,n[d+944>>2]=s,k||RR[B&15](f,d,s,c),c=c+1|0),m=m+1|0;while((m|0)!=(M|0));if(c>>>0<M>>>0){k=s+948|0,Q=s+952|0,B=c,c=n[Q>>2]|0;do m=(n[k>>2]|0)+(B<<2)|0,f=m+4|0,d=c-f|0,l=d>>2,l&&(LC(m|0,f|0,d|0)|0,c=n[Q>>2]|0),d=c,f=m+(l<<2)|0,(d|0)!=(f|0)&&(c=d+(~((d+-4-f|0)>>>2)<<2)|0,n[Q>>2]=c),B=B+1|0;while((B|0)!=(M|0))}}while(0)}function js(s){s=s|0;var l=0,c=0,f=0,d=0;Mn(s,(wi(s)|0)==0,2491),Mn(s,(n[s+944>>2]|0)==0,2545),l=s+948|0,c=n[l>>2]|0,f=s+952|0,d=n[f>>2]|0,(d|0)!=(c|0)&&(n[f>>2]=d+(~((d+-4-c|0)>>>2)<<2)),ms(l),l=s+976|0,c=n[l>>2]|0,vr(s|0,8104,1e3)|0,o[c+2>>0]|0&&(n[s+4>>2]=2,n[s+12>>2]=4),n[l>>2]=c}function Mn(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;d=E,E=E+16|0,f=d,l||(n[f>>2]=c,Ao(s,5,3197,f)),E=d}function Dn(){return n[2276]|0}function Es(){var s=0;return s=fD(20)|0,We((s|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[s>>2]=n[239],n[s+4>>2]=n[240],n[s+8>>2]=n[241],n[s+12>>2]=n[242],n[s+16>>2]=n[243],s|0}function We(s,l){s=s|0,l=l|0;var c=0,f=0;f=E,E=E+16|0,c=f,s||(n[c>>2]=l,Ao(0,5,3197,c)),E=f}function tt(s){s=s|0,pD(s),n[2277]=(n[2277]|0)+-1}function It(s,l){s=s|0,l=l|0;var c=0;l?(Mn(s,(wi(s)|0)==0,2629),c=1):(c=0,l=0),n[s+964>>2]=l,n[s+988>>2]=c}function rr(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,m=f+8|0,d=f+4|0,B=f,n[d>>2]=l,Mn(s,(n[l+944>>2]|0)==0,2709),Mn(s,(n[s+964>>2]|0)==0,2763),$(s),l=s+948|0,n[B>>2]=(n[l>>2]|0)+(c<<2),n[m>>2]=n[B>>2],me(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=s,Oe(s),E=f}function $(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;if(c=wi(s)|0,c|0&&(n[(ds(s,0)|0)+944>>2]|0)!=(s|0)){f=n[(n[s+976>>2]|0)+12>>2]|0,d=s+948|0,m=(f|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,Q=Hs(B)|0,n[(n[d>>2]|0)+(l<<2)>>2]=Q,n[Q+944>>2]=s,m||RR[f&15](B,Q,s,l),l=l+1|0;while((l|0)!=(c|0))}}function me(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0,Me=0,Fe=0,et=0,Xe=0;et=E,E=E+64|0,q=et+52|0,Q=et+48|0,se=et+28|0,Ge=et+24|0,Me=et+20|0,Fe=et,f=n[s>>2]|0,m=f,l=f+((n[l>>2]|0)-m>>2<<2)|0,f=s+4|0,d=n[f>>2]|0,B=s+8|0;do if(d>>>0<(n[B>>2]|0)>>>0){if((l|0)==(d|0)){n[l>>2]=n[c>>2],n[f>>2]=(n[f>>2]|0)+4;break}HA(s,l,d,l+4|0),l>>>0<=c>>>0&&(c=(n[f>>2]|0)>>>0>c>>>0?c+4|0:c),n[l>>2]=n[c>>2]}else{f=(d-m>>2)+1|0,d=L(s)|0,d>>>0<f>>>0&&Vr(s),O=n[s>>2]|0,M=(n[B>>2]|0)-O|0,m=M>>1,wp(Fe,M>>2>>>0<d>>>1>>>0?m>>>0<f>>>0?f:m:d,l-O>>2,s+8|0),O=Fe+8|0,f=n[O>>2]|0,m=Fe+12|0,M=n[m>>2]|0,B=M,k=f;do if((f|0)==(M|0)){if(M=Fe+4|0,f=n[M>>2]|0,Xe=n[Fe>>2]|0,d=Xe,f>>>0<=Xe>>>0){f=B-d>>1,f=(f|0)==0?1:f,wp(se,f,f>>>2,n[Fe+16>>2]|0),n[Ge>>2]=n[M>>2],n[Me>>2]=n[O>>2],n[Q>>2]=n[Ge>>2],n[q>>2]=n[Me>>2],BC(se,Q,q),f=n[Fe>>2]|0,n[Fe>>2]=n[se>>2],n[se>>2]=f,f=se+4|0,Xe=n[M>>2]|0,n[M>>2]=n[f>>2],n[f>>2]=Xe,f=se+8|0,Xe=n[O>>2]|0,n[O>>2]=n[f>>2],n[f>>2]=Xe,f=se+12|0,Xe=n[m>>2]|0,n[m>>2]=n[f>>2],n[f>>2]=Xe,_A(se),f=n[O>>2]|0;break}m=f,B=((m-d>>2)+1|0)/-2|0,Q=f+(B<<2)|0,d=k-m|0,m=d>>2,m&&(LC(Q|0,f|0,d|0)|0,f=n[M>>2]|0),Xe=Q+(m<<2)|0,n[O>>2]=Xe,n[M>>2]=f+(B<<2),f=Xe}while(0);n[f>>2]=n[c>>2],n[O>>2]=(n[O>>2]|0)+4,l=Ig(s,Fe,l)|0,_A(Fe)}while(0);return E=et,l|0}function Oe(s){s=s|0;var l=0;do{if(l=s+984|0,o[l>>0]|0)break;o[l>>0]=1,h[s+504>>2]=y(de),s=n[s+944>>2]|0}while((s|0)!=0)}function ft(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),ht(c))}function pt(s){return s=s|0,n[s+944>>2]|0}function Tt(s){s=s|0,Mn(s,(n[s+964>>2]|0)!=0,2832),Oe(s)}function er(s){return s=s|0,(o[s+984>>0]|0)!=0|0}function Xr(s,l){s=s|0,l=l|0,QUe(s,l,400)|0&&(vr(s|0,l|0,400)|0,Oe(s))}function Gi(s){s=s|0;var l=Ze;return l=y(h[s+44>>2]),s=Ut(l)|0,y(s?y(0):l)}function $i(s){s=s|0;var l=Ze;return l=y(h[s+48>>2]),Ut(l)|0&&(l=o[(n[s+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function Pi(s,l){s=s|0,l=l|0,n[s+980>>2]=l}function jo(s){return s=s|0,n[s+980>>2]|0}function QA(s,l){s=s|0,l=l|0;var c=0;c=s+4|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function kA(s){return s=s|0,n[s+4>>2]|0}function cp(s,l){s=s|0,l=l|0;var c=0;c=s+8|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function rg(s){return s=s|0,n[s+8>>2]|0}function mu(s,l){s=s|0,l=l|0;var c=0;c=s+12|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function ng(s){return s=s|0,n[s+12>>2]|0}function yu(s,l){s=s|0,l=l|0;var c=0;c=s+16|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function uo(s){return s=s|0,n[s+16>>2]|0}function FA(s,l){s=s|0,l=l|0;var c=0;c=s+20|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function mc(s){return s=s|0,n[s+20>>2]|0}function ua(s,l){s=s|0,l=l|0;var c=0;c=s+24|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function ig(s){return s=s|0,n[s+24>>2]|0}function yc(s,l){s=s|0,l=l|0;var c=0;c=s+28|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function Sm(s){return s=s|0,n[s+28>>2]|0}function sg(s,l){s=s|0,l=l|0;var c=0;c=s+32|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function Xn(s){return s=s|0,n[s+32>>2]|0}function up(s,l){s=s|0,l=l|0;var c=0;c=s+36|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Oe(s))}function og(s){return s=s|0,n[s+36>>2]|0}function RA(s,l){s=s|0,l=y(l);var c=0;c=s+40|0,y(h[c>>2])!=l&&(h[c>>2]=l,Oe(s))}function qs(s,l){s=s|0,l=y(l);var c=0;c=s+44|0,y(h[c>>2])!=l&&(h[c>>2]=l,Oe(s))}function Eu(s,l){s=s|0,l=y(l);var c=0;c=s+48|0,y(h[c>>2])!=l&&(h[c>>2]=l,Oe(s))}function Ha(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=(m^1)&1,f=s+52|0,d=s+56|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function Yi(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+52|0,c=s+56|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ut(l)|0,n[c>>2]=f?3:2,Oe(s))}function Aa(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+52|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function wu(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ut(c)|0,f=(m^1)&1,d=s+132+(l<<3)|0,l=s+132+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Oe(s))}function ws(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ut(c)|0,f=m?0:2,d=s+132+(l<<3)|0,l=s+132+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Oe(s))}function Ec(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+132+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function wc(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ut(c)|0,f=(m^1)&1,d=s+60+(l<<3)|0,l=s+60+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Oe(s))}function Y(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ut(c)|0,f=m?0:2,d=s+60+(l<<3)|0,l=s+60+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Oe(s))}function Dt(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+60+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function wl(s,l){s=s|0,l=l|0;var c=0;c=s+60+(l<<3)+4|0,(n[c>>2]|0)!=3&&(h[s+60+(l<<3)>>2]=y(de),n[c>>2]=3,Oe(s))}function xi(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ut(c)|0,f=(m^1)&1,d=s+204+(l<<3)|0,l=s+204+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Oe(s))}function Cc(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ut(c)|0,f=m?0:2,d=s+204+(l<<3)|0,l=s+204+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Oe(s))}function ct(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+204+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function Cu(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ut(c)|0,f=(m^1)&1,d=s+276+(l<<3)|0,l=s+276+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Oe(s))}function ag(s,l){return s=s|0,l=l|0,y(h[s+276+(l<<3)>>2])}function dC(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=(m^1)&1,f=s+348|0,d=s+352|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function TA(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+348|0,c=s+352|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ut(l)|0,n[c>>2]=f?3:2,Oe(s))}function Ap(s){s=s|0;var l=0;l=s+352|0,(n[l>>2]|0)!=3&&(h[s+348>>2]=y(de),n[l>>2]=3,Oe(s))}function Ir(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+348|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Cs(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=(m^1)&1,f=s+356|0,d=s+360|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function lg(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+356|0,c=s+360|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ut(l)|0,n[c>>2]=f?3:2,Oe(s))}function cg(s){s=s|0;var l=0;l=s+360|0,(n[l>>2]|0)!=3&&(h[s+356>>2]=y(de),n[l>>2]=3,Oe(s))}function ug(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+356|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function fp(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=(m^1)&1,f=s+364|0,d=s+368|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function Ic(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=m?0:2,f=s+364|0,d=s+368|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function wt(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+364|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Pm(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=(m^1)&1,f=s+372|0,d=s+376|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function Ag(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=m?0:2,f=s+372|0,d=s+376|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function fg(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+372|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Iu(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=(m^1)&1,f=s+380|0,d=s+384|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function xm(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=m?0:2,f=s+380|0,d=s+384|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function pg(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+380|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Bu(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=(m^1)&1,f=s+388|0,d=s+392|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function mC(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ut(l)|0,c=m?0:2,f=s+388|0,d=s+392|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Oe(s))}function bm(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+388|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function fa(s,l){s=s|0,l=y(l);var c=0;c=s+396|0,y(h[c>>2])!=l&&(h[c>>2]=l,Oe(s))}function Bc(s){return s=s|0,y(h[s+396>>2])}function Cl(s){return s=s|0,y(h[s+400>>2])}function vu(s){return s=s|0,y(h[s+404>>2])}function hg(s){return s=s|0,y(h[s+408>>2])}function NA(s){return s=s|0,y(h[s+412>>2])}function pp(s){return s=s|0,y(h[s+416>>2])}function ja(s){return s=s|0,y(h[s+420>>2])}function gg(s,l){switch(s=s|0,l=l|0,Mn(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+424+(l<<2)>>2])}function hp(s,l){switch(s=s|0,l=l|0,Mn(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+448+(l<<2)>>2])}function qo(s,l){switch(s=s|0,l=l|0,Mn(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+472+(l<<2)>>2])}function Is(s,l){s=s|0,l=l|0;var c=0,f=Ze;return c=n[s+4>>2]|0,(c|0)==(n[l+4>>2]|0)?c?(f=y(h[s>>2]),s=y(ne(y(f-y(h[l>>2]))))<y(999999974e-13)):s=1:s=0,s|0}function Ci(s,l){s=y(s),l=y(l);var c=0;return Ut(s)|0?c=Ut(l)|0:c=y(ne(y(s-l)))<y(999999974e-13),c|0}function Qm(s,l){s=s|0,l=l|0,km(s,l)}function km(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c+4|0,n[f>>2]=0,n[f+4>>2]=0,n[f+8>>2]=0,Ma(f|0,s|0,l|0,0),Ao(s,3,(o[f+11>>0]|0)<0?n[f>>2]|0:f,c),$Ue(f),E=c}function Go(s,l,c,f){s=y(s),l=y(l),c=c|0,f=f|0;var d=Ze;s=y(s*l),d=y(PR(s,y(1)));do if(Ci(d,y(0))|0)s=y(s-d);else{if(s=y(s-d),Ci(d,y(1))|0){s=y(s+y(1));break}if(c){s=y(s+y(1));break}f||(d>y(.5)?d=y(1):(f=Ci(d,y(.5))|0,d=y(f?1:0)),s=y(s+d))}while(0);return y(s/l)}function LA(s,l,c,f,d,m,B,Q,k,M,O,q,se){s=s|0,l=y(l),c=c|0,f=y(f),d=d|0,m=y(m),B=B|0,Q=y(Q),k=y(k),M=y(M),O=y(O),q=y(q),se=se|0;var Ge=0,Me=Ze,Fe=Ze,et=Ze,Xe=Ze,lt=Ze,Ue=Ze;return k<y(0)|M<y(0)?se=0:((se|0)!=0&&(Me=y(h[se+4>>2]),Me!=y(0))?(et=y(Go(l,Me,0,0)),Xe=y(Go(f,Me,0,0)),Fe=y(Go(m,Me,0,0)),Me=y(Go(Q,Me,0,0))):(Fe=m,et=l,Me=Q,Xe=f),(d|0)==(s|0)?Ge=Ci(Fe,et)|0:Ge=0,(B|0)==(c|0)?se=Ci(Me,Xe)|0:se=0,!Ge&&(lt=y(l-O),!(gp(s,lt,k)|0))&&!(dp(s,lt,d,k)|0)?Ge=dg(s,lt,d,m,k)|0:Ge=1,!se&&(Ue=y(f-q),!(gp(c,Ue,M)|0))&&!(dp(c,Ue,B,M)|0)?se=dg(c,Ue,B,Q,M)|0:se=1,se=Ge&se),se|0}function gp(s,l,c){return s=s|0,l=y(l),c=y(c),(s|0)==1?s=Ci(l,c)|0:s=0,s|0}function dp(s,l,c,f){return s=s|0,l=y(l),c=c|0,f=y(f),(s|0)==2&(c|0)==0?l>=f?s=1:s=Ci(l,f)|0:s=0,s|0}function dg(s,l,c,f,d){return s=s|0,l=y(l),c=c|0,f=y(f),d=y(d),(s|0)==2&(c|0)==2&f>l?d<=l?s=1:s=Ci(l,d)|0:s=0,s|0}function pa(s,l,c,f,d,m,B,Q,k,M,O){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=m|0,B=y(B),Q=y(Q),k=k|0,M=M|0,O=O|0;var q=0,se=0,Ge=0,Me=0,Fe=Ze,et=Ze,Xe=0,lt=0,Ue=0,qe=0,Lt=0,Or=0,sr=0,Xt=0,Dr=0,Tr=0,nr=0,xn=Ze,go=Ze,mo=Ze,yo=0,Ea=0;nr=E,E=E+160|0,Xt=nr+152|0,sr=nr+120|0,Or=nr+104|0,Ue=nr+72|0,Me=nr+56|0,Lt=nr+8|0,lt=nr,qe=(n[2279]|0)+1|0,n[2279]=qe,Dr=s+984|0,(o[Dr>>0]|0)!=0&&(n[s+512>>2]|0)!=(n[2278]|0)?Xe=4:(n[s+516>>2]|0)==(f|0)?Tr=0:Xe=4,(Xe|0)==4&&(n[s+520>>2]=0,n[s+924>>2]=-1,n[s+928>>2]=-1,h[s+932>>2]=y(-1),h[s+936>>2]=y(-1),Tr=1);e:do if(n[s+964>>2]|0)if(Fe=y(an(s,2,B)),et=y(an(s,0,B)),q=s+916|0,mo=y(h[q>>2]),go=y(h[s+920>>2]),xn=y(h[s+932>>2]),LA(d,l,m,c,n[s+924>>2]|0,mo,n[s+928>>2]|0,go,xn,y(h[s+936>>2]),Fe,et,O)|0)Xe=22;else if(Ge=n[s+520>>2]|0,!Ge)Xe=21;else for(se=0;;){if(q=s+524+(se*24|0)|0,xn=y(h[q>>2]),go=y(h[s+524+(se*24|0)+4>>2]),mo=y(h[s+524+(se*24|0)+16>>2]),LA(d,l,m,c,n[s+524+(se*24|0)+8>>2]|0,xn,n[s+524+(se*24|0)+12>>2]|0,go,mo,y(h[s+524+(se*24|0)+20>>2]),Fe,et,O)|0){Xe=22;break e}if(se=se+1|0,se>>>0>=Ge>>>0){Xe=21;break}}else{if(k){if(q=s+916|0,!(Ci(y(h[q>>2]),l)|0)){Xe=21;break}if(!(Ci(y(h[s+920>>2]),c)|0)){Xe=21;break}if((n[s+924>>2]|0)!=(d|0)){Xe=21;break}q=(n[s+928>>2]|0)==(m|0)?q:0,Xe=22;break}if(Ge=n[s+520>>2]|0,!Ge)Xe=21;else for(se=0;;){if(q=s+524+(se*24|0)|0,Ci(y(h[q>>2]),l)|0&&Ci(y(h[s+524+(se*24|0)+4>>2]),c)|0&&(n[s+524+(se*24|0)+8>>2]|0)==(d|0)&&(n[s+524+(se*24|0)+12>>2]|0)==(m|0)){Xe=22;break e}if(se=se+1|0,se>>>0>=Ge>>>0){Xe=21;break}}}while(0);do if((Xe|0)==21)o[11697]|0?(q=0,Xe=28):(q=0,Xe=31);else if((Xe|0)==22){if(se=(o[11697]|0)!=0,!((q|0)!=0&(Tr^1)))if(se){Xe=28;break}else{Xe=31;break}Me=q+16|0,n[s+908>>2]=n[Me>>2],Ge=q+20|0,n[s+912>>2]=n[Ge>>2],(o[11698]|0)==0|se^1||(n[lt>>2]=OA(qe)|0,n[lt+4>>2]=qe,Ao(s,4,2972,lt),se=n[s+972>>2]|0,se|0&&tf[se&127](s),d=qa(d,k)|0,m=qa(m,k)|0,Ea=+y(h[Me>>2]),yo=+y(h[Ge>>2]),n[Lt>>2]=d,n[Lt+4>>2]=m,w[Lt+8>>3]=+l,w[Lt+16>>3]=+c,w[Lt+24>>3]=Ea,w[Lt+32>>3]=yo,n[Lt+40>>2]=M,Ao(s,4,2989,Lt))}while(0);return(Xe|0)==28&&(se=OA(qe)|0,n[Me>>2]=se,n[Me+4>>2]=qe,n[Me+8>>2]=Tr?3047:11699,Ao(s,4,3038,Me),se=n[s+972>>2]|0,se|0&&tf[se&127](s),Lt=qa(d,k)|0,Xe=qa(m,k)|0,n[Ue>>2]=Lt,n[Ue+4>>2]=Xe,w[Ue+8>>3]=+l,w[Ue+16>>3]=+c,n[Ue+24>>2]=M,Ao(s,4,3049,Ue),Xe=31),(Xe|0)==31&&(ii(s,l,c,f,d,m,B,Q,k,O),o[11697]|0&&(se=n[2279]|0,Lt=OA(se)|0,n[Or>>2]=Lt,n[Or+4>>2]=se,n[Or+8>>2]=Tr?3047:11699,Ao(s,4,3083,Or),se=n[s+972>>2]|0,se|0&&tf[se&127](s),Lt=qa(d,k)|0,Or=qa(m,k)|0,yo=+y(h[s+908>>2]),Ea=+y(h[s+912>>2]),n[sr>>2]=Lt,n[sr+4>>2]=Or,w[sr+8>>3]=yo,w[sr+16>>3]=Ea,n[sr+24>>2]=M,Ao(s,4,3092,sr)),n[s+516>>2]=f,q||(se=s+520|0,q=n[se>>2]|0,(q|0)==16&&(o[11697]|0&&Ao(s,4,3124,Xt),n[se>>2]=0,q=0),k?q=s+916|0:(n[se>>2]=q+1,q=s+524+(q*24|0)|0),h[q>>2]=l,h[q+4>>2]=c,n[q+8>>2]=d,n[q+12>>2]=m,n[q+16>>2]=n[s+908>>2],n[q+20>>2]=n[s+912>>2],q=0)),k&&(n[s+416>>2]=n[s+908>>2],n[s+420>>2]=n[s+912>>2],o[s+985>>0]=1,o[Dr>>0]=0),n[2279]=(n[2279]|0)+-1,n[s+512>>2]=n[2278],E=nr,Tr|(q|0)==0|0}function an(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return f=y(K(s,l,c)),y(f+y(re(s,l,c)))}function Ao(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=E,E=E+16|0,d=m,n[d>>2]=f,s?f=n[s+976>>2]|0:f=0,yg(f,s,l,c,d),E=m}function OA(s){return s=s|0,(s>>>0>60?3201:3201+(60-s)|0)|0}function qa(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;return d=E,E=E+32|0,c=d+12|0,f=d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h[Ys>>2]),hf=n[bl>>2]|0,ai=n[Wo>>2]|0,pa(q,Jn?Vt:Xt,Jn?Xt:Vt,Ss,Jn?hf:ai,Jn?ai:hf,xr,Eo,k&(O^1),3488,M)|0,o[xl>>0]=o[xl>>0]|o[q+508>>0],q=n[q+960>>2]|0}while((q|0)!=0)}}else l=y(0);if(l=y(Dr+l),ai=l<y(0)&1,o[xl>>0]=ai|u[xl>>0],kp&l>y(0)?(O=n[Pl>>2]|0,(n[s+364+(O<<3)+4>>2]|0)!=0&&(Ws=y(qr(s+364+(O<<3)|0,wo)),Ws>=y(0))?Fe=y(Un(y(0),y(Ws-y(nr-l)))):Fe=y(0)):Fe=l,Lt=Tr>>>0<sr>>>0,Lt){Ge=n[Co>>2]|0,se=Tr,O=0;do q=n[Ge+(se<<2)>>2]|0,n[q+24>>2]|0||(O=((n[(Bl(q,Fr)|0)+4>>2]|0)==3&1)+O|0,O=O+((n[(Sc(q,Fr)|0)+4>>2]|0)==3&1)|0),se=se+1|0;while((se|0)!=(sr|0));O?(Xe=y(0),c=y(0)):zr=101}else zr=101;e:do if((zr|0)==101)switch(zr=0,Lp|0){case 1:{O=0,Xe=y(Fe*y(.5)),c=y(0);break e}case 2:{O=0,Xe=Fe,c=y(0);break e}case 3:{if(m>>>0<=1){O=0,Xe=y(0),c=y(0);break e}c=y((m+-1|0)>>>0),O=0,Xe=y(0),c=y(y(Un(Fe,y(0)))/c);break e}case 5:{c=y(Fe/y((m+1|0)>>>0)),O=0,Xe=c;break e}case 4:{c=y(Fe/y(m>>>0)),O=0,Xe=y(c*y(.5));break e}default:{O=0,Xe=y(0),c=y(0);break e}}while(0);if(l=y(Op+Xe),Lt){et=y(Fe/y(O|0)),se=n[Co>>2]|0,q=Tr,Fe=y(0);do{O=n[se+(q<<2)>>2]|0;e:do if((n[O+36>>2]|0)!=1){switch(n[O+24>>2]|0){case 1:{if(hi(O,Fr)|0){if(!k)break e;Vt=y(Lr(O,Fr,nr)),Vt=y(Vt+y(Er(s,Fr))),Vt=y(Vt+y(K(O,Fr,xr))),h[O+400+(n[Nu>>2]<<2)>>2]=Vt;break e}break}case 0:if(ai=(n[(Bl(O,Fr)|0)+4>>2]|0)==3,Vt=y(et+l),l=ai?Vt:l,k&&(ai=O+400+(n[Nu>>2]<<2)|0,h[ai>>2]=y(l+y(h[ai>>2]))),ai=(n[(Sc(O,Fr)|0)+4>>2]|0)==3,Vt=y(et+l),l=ai?Vt:l,Ea){Vt=y(c+y(an(O,Fr,xr))),Fe=Fn,l=y(l+y(Vt+y(h[O+504>>2])));break e}else{l=y(l+y(c+y(rs(O,Fr,xr)))),Fe=y(Un(Fe,y(rs(O,cr,xr))));break e}default:}k&&(Vt=y(Xe+y(Er(s,Fr))),ai=O+400+(n[Nu>>2]<<2)|0,h[ai>>2]=y(Vt+y(h[ai>>2])))}while(0);q=q+1|0}while((q|0)!=(sr|0))}else Fe=y(0);if(c=y(Mp+l),Fp?Xe=y(y(Ii(s,cr,y(Ks+Fe),Rc,B))-Ks):Xe=Fn,et=y(y(Ii(s,cr,y(Ks+(Np?Fn:Fe)),Rc,B))-Ks),Lt&k){q=Tr;do{se=n[(n[Co>>2]|0)+(q<<2)>>2]|0;do if((n[se+36>>2]|0)!=1){if((n[se+24>>2]|0)==1){if(hi(se,cr)|0){if(Vt=y(Lr(se,cr,Fn)),Vt=y(Vt+y(Er(s,cr))),Vt=y(Vt+y(K(se,cr,xr))),O=n[Tu>>2]|0,h[se+400+(O<<2)>>2]=Vt,!(Ut(Vt)|0))break}else O=n[Tu>>2]|0;Vt=y(Er(s,cr)),h[se+400+(O<<2)>>2]=y(Vt+y(K(se,cr,xr)));break}O=ga(s,se)|0;do if((O|0)==4){if((n[(Bl(se,cr)|0)+4>>2]|0)==3){zr=139;break}if((n[(Sc(se,cr)|0)+4>>2]|0)==3){zr=139;break}if(es(se,cr,Fn)|0){l=Me;break}hf=n[se+908+(n[Pl>>2]<<2)>>2]|0,n[Ys>>2]=hf,l=y(h[se+396>>2]),ai=Ut(l)|0,Fe=(n[v>>2]=hf,y(h[v>>2])),ai?l=et:(Dr=y(an(se,cr,xr)),Vt=y(Fe/l),l=y(l*Fe),l=y(Dr+(Jn?Vt:l))),h[za>>2]=l,h[Ys>>2]=y(y(an(se,Fr,xr))+Fe),n[Wo>>2]=1,n[bl>>2]=1,mr(se,Fr,nr,xr,Wo,Ys),mr(se,cr,Fn,xr,bl,za),l=y(h[Ys>>2]),Dr=y(h[za>>2]),Vt=Jn?l:Dr,l=Jn?Dr:l,ai=((Ut(Vt)|0)^1)&1,pa(se,Vt,l,Ss,ai,((Ut(l)|0)^1)&1,xr,Eo,1,3493,M)|0,l=Me}else zr=139;while(0);e:do if((zr|0)==139){zr=0,l=y(Xe-y(rs(se,cr,xr)));do if((n[(Bl(se,cr)|0)+4>>2]|0)==3){if((n[(Sc(se,cr)|0)+4>>2]|0)!=3)break;l=y(Me+y(Un(y(0),y(l*y(.5)))));break e}while(0);if((n[(Sc(se,cr)|0)+4>>2]|0)==3){l=Me;break}if((n[(Bl(se,cr)|0)+4>>2]|0)==3){l=y(Me+y(Un(y(0),l)));break}switch(O|0){case 1:{l=Me;break e}case 2:{l=y(Me+y(l*y(.5)));break e}default:{l=y(Me+l);break e}}}while(0);Vt=y(Ds+l),ai=se+400+(n[Tu>>2]<<2)|0,h[ai>>2]=y(Vt+y(h[ai>>2]))}while(0);q=q+1|0}while((q|0)!=(sr|0))}if(Ds=y(Ds+et),Qc=y(Un(Qc,c)),m=yo+1|0,sr>>>0>=Js>>>0)break;l=nr,Tr=sr,yo=m}do if(k){if(O=m>>>0>1,!O&&!(Wi(s)|0))break;if(!(Ut(Fn)|0)){l=y(Fn-Ds);e:do switch(n[s+12>>2]|0){case 3:{Me=y(Me+l),Ue=y(0);break}case 2:{Me=y(Me+y(l*y(.5))),Ue=y(0);break}case 4:{Fn>Ds?Ue=y(l/y(m>>>0)):Ue=y(0);break}case 7:if(Fn>Ds){Me=y(Me+y(l/y(m<<1>>>0))),Ue=y(l/y(m>>>0)),Ue=O?Ue:y(0);break e}else{Me=y(Me+y(l*y(.5))),Ue=y(0);break e}case 6:{Ue=y(l/y(yo>>>0)),Ue=Fn>Ds&O?Ue:y(0);break}default:Ue=y(0)}while(0);if(m|0)for(Lt=1040+(cr<<2)|0,Or=976+(cr<<2)|0,Ge=0,q=0;;){e:do if(q>>>0<Js>>>0)for(Fe=y(0),et=y(0),l=y(0),se=q;;){O=n[(n[Co>>2]|0)+(se<<2)>>2]|0;do if((n[O+36>>2]|0)!=1&&(n[O+24>>2]|0)==0){if((n[O+940>>2]|0)!=(Ge|0))break e;if(Nm(O,cr)|0&&(Vt=y(h[O+908+(n[Or>>2]<<2)>>2]),l=y(Un(l,y(Vt+y(an(O,cr,xr)))))),(ga(s,O)|0)!=5)break;Ws=y(Ya(O)),Ws=y(Ws+y(K(O,0,xr))),Vt=y(h[O+912>>2]),Vt=y(y(Vt+y(an(O,0,xr)))-Ws),Ws=y(Un(et,Ws)),Vt=y(Un(Fe,Vt)),Fe=Vt,et=Ws,l=y(Un(l,y(Ws+Vt)))}while(0);if(O=se+1|0,O>>>0<Js>>>0)se=O;else{se=O;break}}else et=y(0),l=y(0),se=q;while(0);if(lt=y(Ue+l),c=Me,Me=y(Me+lt),q>>>0<se>>>0){Xe=y(c+et),O=q;do{q=n[(n[Co>>2]|0)+(O<<2)>>2]|0;e:do if((n[q+36>>2]|0)!=1&&(n[q+24>>2]|0)==0)switch(ga(s,q)|0){case 1:{Vt=y(c+y(K(q,cr,xr))),h[q+400+(n[Lt>>2]<<2)>>2]=Vt;break e}case 3:{Vt=y(y(Me-y(re(q,cr,xr)))-y(h[q+908+(n[Or>>2]<<2)>>2])),h[q+400+(n[Lt>>2]<<2)>>2]=Vt;break e}case 2:{Vt=y(c+y(y(lt-y(h[q+908+(n[Or>>2]<<2)>>2]))*y(.5))),h[q+400+(n[Lt>>2]<<2)>>2]=Vt;break e}case 4:{if(Vt=y(c+y(K(q,cr,xr))),h[q+400+(n[Lt>>2]<<2)>>2]=Vt,es(q,cr,Fn)|0||(Jn?(Fe=y(h[q+908>>2]),l=y(Fe+y(an(q,Fr,xr))),et=lt):(et=y(h[q+912>>2]),et=y(et+y(an(q,cr,xr))),l=lt,Fe=y(h[q+908>>2])),Ci(l,Fe)|0&&Ci(et,y(h[q+912>>2]))|0))break e;pa(q,l,et,Ss,1,1,xr,Eo,1,3501,M)|0;break e}case 5:{h[q+404>>2]=y(y(Xe-y(Ya(q)))+y(Lr(q,0,Fn)));break e}default:break e}while(0);O=O+1|0}while((O|0)!=(se|0))}if(Ge=Ge+1|0,(Ge|0)==(m|0))break;q=se}}}while(0);if(h[s+908>>2]=y(Ii(s,2,kc,B,B)),h[s+912>>2]=y(Ii(s,0,lf,Q,B)),(Ql|0)!=0&&(cf=n[s+32>>2]|0,uf=(Ql|0)==2,!(uf&(cf|0)!=2))?uf&(cf|0)==2&&(l=y(Fc+nr),l=y(Un(y(Fg(l,y(MA(s,Fr,Qc,wo)))),Fc)),zr=198):(l=y(Ii(s,Fr,Qc,wo,B)),zr=198),(zr|0)==198&&(h[s+908+(n[976+(Fr<<2)>>2]<<2)>>2]=l),(kl|0)!=0&&(ff=n[s+32>>2]|0,pf=(kl|0)==2,!(pf&(ff|0)!=2))?pf&(ff|0)==2&&(l=y(Ks+Fn),l=y(Un(y(Fg(l,y(MA(s,cr,y(Ks+Ds),Rc)))),Ks)),zr=204):(l=y(Ii(s,cr,y(Ks+Ds),Rc,B)),zr=204),(zr|0)==204&&(h[s+908+(n[976+(cr<<2)>>2]<<2)>>2]=l),k){if((n[Af>>2]|0)==2){q=976+(cr<<2)|0,se=1040+(cr<<2)|0,O=0;do Ge=ds(s,O)|0,n[Ge+24>>2]|0||(hf=n[q>>2]|0,Vt=y(h[s+908+(hf<<2)>>2]),ai=Ge+400+(n[se>>2]<<2)|0,Vt=y(Vt-y(h[ai>>2])),h[ai>>2]=y(Vt-y(h[Ge+908+(hf<<2)>>2]))),O=O+1|0;while((O|0)!=(Js|0))}if(f|0){O=Jn?Ql:d;do Lm(s,f,xr,O,Eo,Ss,M),f=n[f+960>>2]|0;while((f|0)!=0)}if(O=(Fr|2|0)==3,q=(cr|2|0)==3,O|q){f=0;do se=n[(n[Co>>2]|0)+(f<<2)>>2]|0,(n[se+36>>2]|0)!=1&&(O&&Ep(s,se,Fr),q&&Ep(s,se,cr)),f=f+1|0;while((f|0)!=(Js|0))}}}while(0);E=Fl}function ha(s,l){s=s|0,l=y(l);var c=0;aa(s,l>=y(0),3147),c=l==y(0),h[s+4>>2]=c?y(0):l}function vc(s,l,c,f){s=s|0,l=y(l),c=y(c),f=f|0;var d=Ze,m=Ze,B=0,Q=0,k=0;n[2278]=(n[2278]|0)+1,Il(s),es(s,2,l)|0?(d=y(qr(n[s+992>>2]|0,l)),k=1,d=y(d+y(an(s,2,l)))):(d=y(qr(s+380|0,l)),d>=y(0)?k=2:(k=((Ut(l)|0)^1)&1,d=l)),es(s,0,c)|0?(m=y(qr(n[s+996>>2]|0,c)),Q=1,m=y(m+y(an(s,0,l)))):(m=y(qr(s+388|0,c)),m>=y(0)?Q=2:(Q=((Ut(c)|0)^1)&1,m=c)),B=s+976|0,pa(s,d,m,f,k,Q,l,c,1,3189,n[B>>2]|0)|0&&(mp(s,n[s+496>>2]|0,l,c,l),Dc(s,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),o[11696]|0)&&Qm(s,7)}function Il(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;Q=E,E=E+32|0,B=Q+24|0,m=Q+16|0,f=Q+8|0,d=Q,c=0;do l=s+380+(c<<3)|0,(n[s+380+(c<<3)+4>>2]|0)!=0&&(k=l,M=n[k+4>>2]|0,O=f,n[O>>2]=n[k>>2],n[O+4>>2]=M,O=s+364+(c<<3)|0,M=n[O+4>>2]|0,k=d,n[k>>2]=n[O>>2],n[k+4>>2]=M,n[m>>2]=n[f>>2],n[m+4>>2]=n[f+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],Is(m,B)|0)||(l=s+348+(c<<3)|0),n[s+992+(c<<2)>>2]=l,c=c+1|0;while((c|0)!=2);E=Q}function es(s,l,c){s=s|0,l=l|0,c=y(c);var f=0;switch(s=n[s+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[s+4>>2]|0){case 0:case 3:{s=0;break}case 1:{y(h[s>>2])<y(0)?s=0:f=5;break}case 2:{y(h[s>>2])<y(0)?s=0:s=(Ut(c)|0)^1;break}default:f=5}return(f|0)==5&&(s=1),s|0}function qr(s,l){switch(s=s|0,l=y(l),n[s+4>>2]|0){case 2:{l=y(y(y(h[s>>2])*l)/y(100));break}case 1:{l=y(h[s>>2]);break}default:l=y(de)}return y(l)}function mp(s,l,c,f,d){s=s|0,l=l|0,c=y(c),f=y(f),d=y(d);var m=0,B=Ze;l=n[s+944>>2]|0?l:1,m=Ar(n[s+4>>2]|0,l)|0,l=EC(m,l)|0,c=y(Om(s,m,c)),f=y(Om(s,l,f)),B=y(c+y(K(s,m,d))),h[s+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,c=y(c+y(re(s,m,d))),h[s+400+(n[1e3+(m<<2)>>2]<<2)>>2]=c,c=y(f+y(K(s,l,d))),h[s+400+(n[1040+(l<<2)>>2]<<2)>>2]=c,d=y(f+y(re(s,l,d))),h[s+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function Dc(s,l,c,f){s=s|0,l=y(l),c=y(c),f=y(f);var d=0,m=0,B=Ze,Q=Ze,k=0,M=0,O=Ze,q=0,se=Ze,Ge=Ze,Me=Ze,Fe=Ze;if(l!=y(0)&&(d=s+400|0,Fe=y(h[d>>2]),m=s+404|0,Me=y(h[m>>2]),q=s+416|0,Ge=y(h[q>>2]),M=s+420|0,B=y(h[M>>2]),se=y(Fe+c),O=y(Me+f),f=y(se+Ge),Q=y(O+B),k=(n[s+988>>2]|0)==1,h[d>>2]=y(Go(Fe,l,0,k)),h[m>>2]=y(Go(Me,l,0,k)),c=y(PR(y(Ge*l),y(1))),Ci(c,y(0))|0?m=0:m=(Ci(c,y(1))|0)^1,c=y(PR(y(B*l),y(1))),Ci(c,y(0))|0?d=0:d=(Ci(c,y(1))|0)^1,Fe=y(Go(f,l,k&m,k&(m^1))),h[q>>2]=y(Fe-y(Go(se,l,0,k))),Fe=y(Go(Q,l,k&d,k&(d^1))),h[M>>2]=y(Fe-y(Go(O,l,0,k))),m=(n[s+952>>2]|0)-(n[s+948>>2]|0)>>2,m|0)){d=0;do Dc(ds(s,d)|0,l,se,O),d=d+1|0;while((d|0)!=(m|0))}}function yC(s,l,c,f,d){switch(s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,c|0){case 5:case 0:{s=n7(n[489]|0,f,d)|0;break}default:s=VUe(f,d)|0}return s|0}function mg(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;d=E,E=E+16|0,m=d,n[m>>2]=f,yg(s,0,l,c,m),E=d}function yg(s,l,c,f,d){if(s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,s=s|0?s:956,v7[n[s+8>>2]&1](s,l,c,f,d)|0,(c|0)==5)Rt();else return}function Ga(s,l,c){s=s|0,l=l|0,c=c|0,o[s+l>>0]=c&1}function Fm(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(Eg(s,f),kt(s,n[l>>2]|0,n[c>>2]|0,f))}function Eg(s,l){s=s|0,l=l|0;var c=0;if((L(s)|0)>>>0<l>>>0&&Vr(s),l>>>0>1073741823)Rt();else{c=Kt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function kt(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(vr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function L(s){return s=s|0,1073741823}function K(s,l,c){return s=s|0,l=l|0,c=y(c),pe(l)|0&&(n[s+96>>2]|0)!=0?s=s+92|0:s=kn(s+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(ze(s,c))}function re(s,l,c){return s=s|0,l=l|0,c=y(c),pe(l)|0&&(n[s+104>>2]|0)!=0?s=s+100|0:s=kn(s+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(ze(s,c))}function pe(s){return s=s|0,(s|1|0)==3|0}function ze(s,l){return s=s|0,l=y(l),(n[s+4>>2]|0)==3?l=y(0):l=y(qr(s,l)),y(l)}function mt(s,l){return s=s|0,l=l|0,s=n[s>>2]|0,((s|0)==0?(l|0)>1?l:1:s)|0}function Ar(s,l){s=s|0,l=l|0;var c=0;e:do if((l|0)==2){switch(s|0){case 2:{s=3;break e}case 3:break;default:{c=4;break e}}s=2}else c=4;while(0);return s|0}function Er(s,l){s=s|0,l=l|0;var c=Ze;return pe(l)|0&&(n[s+312>>2]|0)!=0&&(c=y(h[s+308>>2]),c>=y(0))||(c=y(Un(y(h[(kn(s+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(c)}function mn(s,l){s=s|0,l=l|0;var c=Ze;return pe(l)|0&&(n[s+320>>2]|0)!=0&&(c=y(h[s+316>>2]),c>=y(0))||(c=y(Un(y(h[(kn(s+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(c)}function si(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return pe(l)|0&&(n[s+240>>2]|0)!=0&&(f=y(qr(s+236|0,c)),f>=y(0))||(f=y(Un(y(qr(kn(s+204|0,n[1040+(l<<2)>>2]|0,992)|0,c)),y(0)))),y(f)}function Mi(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return pe(l)|0&&(n[s+248>>2]|0)!=0&&(f=y(qr(s+244|0,c)),f>=y(0))||(f=y(Un(y(qr(kn(s+204|0,n[1e3+(l<<2)>>2]|0,992)|0,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):l,m,m)),l=y(c-k),Q=c<y(0)&(d|0)==2|(Ut(c)|0),h[s+912>>2]=y(Ii(s,0,Q?y(0):l,B,m)),s=1),s|0}function EC(s,l){return s=s|0,l=l|0,UA(s)|0?s=Ar(2,l)|0:s=0,s|0}function yp(s,l,c){return s=s|0,l=l|0,c=y(c),c=y(si(s,l,c)),y(c+y(Er(s,l)))}function wC(s,l,c){return s=s|0,l=l|0,c=y(c),c=y(Mi(s,l,c)),y(c+y(mn(s,l)))}function yn(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return f=y(yp(s,l,c)),y(f+y(wC(s,l,c)))}function Rm(s){return s=s|0,n[s+24>>2]|0?s=0:y(ts(s))!=y(0)?s=1:s=y(Gs(s))!=y(0),s|0}function ts(s){s=s|0;var l=Ze;if(n[s+944>>2]|0){if(l=y(h[s+44>>2]),Ut(l)|0)return l=y(h[s+40>>2]),s=l>y(0)&((Ut(l)|0)^1),y(s?l:y(0))}else l=y(0);return y(l)}function Gs(s){s=s|0;var l=Ze,c=0,f=Ze;do if(n[s+944>>2]|0){if(l=y(h[s+48>>2]),Ut(l)|0){if(c=o[(n[s+976>>2]|0)+2>>0]|0,c<<24>>24==0&&(f=y(h[s+40>>2]),f<y(0)&((Ut(f)|0)^1))){l=y(-f);break}l=c<<24>>24?y(1):y(0)}}else l=y(0);while(0);return y(l)}function Du(s){s=s|0;var l=0,c=0;if(zm(s+400|0,0,540)|0,o[s+985>>0]=1,$(s),c=wi(s)|0,c|0){l=s+948|0,s=0;do Du(n[(n[l>>2]|0)+(s<<2)>>2]|0),s=s+1|0;while((s|0)!=(c|0))}}function Tm(s,l,c,f,d,m,B,Q,k,M){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=y(m),B=y(B),Q=Q|0,k=k|0,M=M|0;var O=0,q=Ze,se=0,Ge=0,Me=Ze,Fe=Ze,et=0,Xe=Ze,lt=0,Ue=Ze,qe=0,Lt=0,Or=0,sr=0,Xt=0,Dr=0,Tr=0,nr=0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ge=(ga(s,l)|0)!=4,!(qe|Lt|((f|0)!=1|go)|(Ge|(se|0)==1))&&(h[Or>>2]=c,n[Xt>>2]=1,!et)&&(h[sr>>2]=y(y(c-Xe)/Fe),n[Dr>>2]=1,O=1),!(Tr|lt|((Q|0)!=1|(Ut(d)|0))|(Ge|(O|0)==1))&&(h[sr>>2]=d,n[Dr>>2]=1,!et)&&(h[Or>>2]=y(Fe*y(d-Ue)),n[Xt>>2]=1),mr(l,2,m,m,Xt,Or),mr(l,0,B,m,Dr,sr),c=y(h[Or>>2]),d=y(h[sr>>2]),pa(l,c,d,k,n[Xt>>2]|0,n[Dr>>2]|0,m,B,0,3565,M)|0,B=y(h[l+908+(n[976+(nr<<2)>>2]<<2)>>2]),h[l+504>>2]=y(Un(B,y(yn(l,nr,m))))}while(0);n[l+500>>2]=n[2278],E=xn}function Ii(s,l,c,f,d){return s=s|0,l=l|0,c=y(c),f=y(f),d=y(d),f=y(MA(s,l,c,f)),y(Un(f,y(yn(s,l,d))))}function ga(s,l){return s=s|0,l=l|0,l=l+20|0,l=n[((n[l>>2]|0)==0?s+16|0:l)>>2]|0,(l|0)==5&&UA(n[s+4>>2]|0)|0&&(l=1),l|0}function Bl(s,l){return s=s|0,l=l|0,pe(l)|0&&(n[s+96>>2]|0)!=0?l=4:l=n[1040+(l<<2)>>2]|0,s+60+(l<<3)|0}function Sc(s,l){return s=s|0,l=l|0,pe(l)|0&&(n[s+104>>2]|0)!=0?l=5:l=n[1e3+(l<<2)>>2]|0,s+60+(l<<3)|0}function mr(s,l,c,f,d,m){switch(s=s|0,l=l|0,c=y(c),f=y(f),d=d|0,m=m|0,c=y(qr(s+380+(n[976+(l<<2)>>2]<<3)|0,c)),c=y(c+y(an(s,l,f))),n[d>>2]|0){case 2:case 1:{d=Ut(c)|0,f=y(h[m>>2]),h[m>>2]=d|f<c?f:c;break}case 0:{Ut(c)|0||(n[d>>2]=2,h[m>>2]=c);break}default:}}function hi(s,l){return s=s|0,l=l|0,s=s+132|0,pe(l)|0&&(n[(kn(s,4,948)|0)+4>>2]|0)!=0?s=1:s=(n[(kn(s,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,s|0}function Lr(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0;return s=s+132|0,pe(l)|0&&(f=kn(s,4,948)|0,(n[f+4>>2]|0)!=0)?d=4:(f=kn(s,n[1040+(l<<2)>>2]|0,948)|0,n[f+4>>2]|0?d=4:c=y(0)),(d|0)==4&&(c=y(qr(f,c))),y(c)}function rs(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return f=y(h[s+908+(n[976+(l<<2)>>2]<<2)>>2]),f=y(f+y(K(s,l,c))),y(f+y(re(s,l,c)))}function Wi(s){s=s|0;var l=0,c=0,f=0;e:do if(UA(n[s+4>>2]|0)|0)l=0;else if((n[s+16>>2]|0)!=5)if(c=wi(s)|0,!c)l=0;else for(l=0;;){if(f=ds(s,l)|0,(n[f+24>>2]|0)==0&&(n[f+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=c>>>0){l=0;break}}else l=1;while(0);return l|0}function Nm(s,l){s=s|0,l=l|0;var c=Ze;return c=y(h[s+908+(n[976+(l<<2)>>2]<<2)>>2]),c>=y(0)&((Ut(c)|0)^1)|0}function Ya(s){s=s|0;var l=Ze,c=0,f=0,d=0,m=0,B=0,Q=0,k=Ze;if(c=n[s+968>>2]|0,c)k=y(h[s+908>>2]),l=y(h[s+912>>2]),l=y(w7[c&0](s,k,l)),Mn(s,(Ut(l)|0)^1,3573);else{m=wi(s)|0;do if(m|0){for(c=0,d=0;;){if(f=ds(s,d)|0,n[f+940>>2]|0){B=8;break}if((n[f+24>>2]|0)!=1)if(Q=(ga(s,f)|0)==5,Q){c=f;break}else c=(c|0)==0?f:c;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!c)break;return l=y(Ya(c)),y(l+y(h[c+404>>2]))}while(0);l=y(h[s+912>>2])}return y(l)}function MA(s,l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B)|0,Q=y(h[l+908>>2]),Q=y(Q+y(an(l,2,c))),k=y(h[l+912>>2]),k=y(k+y(an(l,0,c)))),pa(l,Q,k,m,1,1,Q,k,1,3635,B)|0,ir(l,et)|0&&!(hi(l,et)|0)?(Ue=n[976+(et<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(lt-y(h[l+908+(Ue<<2)>>2])),lt=y(lt-y(mn(s,et))),lt=y(lt-y(re(l,et,c))),lt=y(lt-y(Su(l,et,Fe?c:d))),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=lt):Xe=21;do if((Xe|0)==21){if(!(hi(l,et)|0)&&(n[s+8>>2]|0)==1){Ue=n[976+(et<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(y(lt-y(h[l+908+(Ue<<2)>>2]))*y(.5)),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=lt;break}!(hi(l,et)|0)&&(n[s+8>>2]|0)==2&&(Ue=n[976+(et<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(lt-y(h[l+908+(Ue<<2)>>2])),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=lt)}while(0);ir(l,Me)|0&&!(hi(l,Me)|0)?(Ue=n[976+(Me<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(lt-y(h[l+908+(Ue<<2)>>2])),lt=y(lt-y(mn(s,Me))),lt=y(lt-y(re(l,Me,c))),lt=y(lt-y(Su(l,Me,Fe?d:c))),h[l+400+(n[1040+(Me<<2)>>2]<<2)>>2]=lt):Xe=30;do if((Xe|0)==30&&!(hi(l,Me)|0)){if((ga(s,l)|0)==2){Ue=n[976+(Me<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(y(lt-y(h[l+908+(Ue<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Me<<2)>>2]<<2)>>2]=lt;break}Ue=(ga(s,l)|0)==3,Ue^(n[s+28>>2]|0)==2&&(Ue=n[976+(Me<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(lt-y(h[l+908+(Ue<<2)>>2])),h[l+400+(n[1040+(Me<<2)>>2]<<2)>>2]=lt)}while(0)}function Ep(s,l,c){s=s|0,l=l|0,c=c|0;var f=Ze,d=0;d=n[976+(c<<2)>>2]|0,f=y(h[l+908+(d<<2)>>2]),f=y(y(h[s+908+(d<<2)>>2])-f),f=y(f-y(h[l+400+(n[1040+(c<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(c<<2)>>2]<<2)>>2]=f}function UA(s){return s=s|0,(s|1|0)==1|0}function CC(s){s=s|0;var l=Ze;switch(n[s+56>>2]|0){case 0:case 3:{l=y(h[s+40>>2]),l>y(0)&((Ut(l)|0)^1)?s=o[(n[s+976>>2]|0)+2>>0]|0?1056:992:s=1056;break}default:s=s+52|0}return s|0}function IC(s,l){return s=s|0,l=l|0,(o[s+l>>0]|0)!=0|0}function ir(s,l){return s=s|0,l=l|0,s=s+132|0,pe(l)|0&&(n[(kn(s,5,948)|0)+4>>2]|0)!=0?s=1:s=(n[(kn(s,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,s|0}function Su(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0;return s=s+132|0,pe(l)|0&&(f=kn(s,5,948)|0,(n[f+4>>2]|0)!=0)?d=4:(f=kn(s,n[1e3+(l<<2)>>2]|0,948)|0,n[f+4>>2]|0?d=4:c=y(0)),(d|0)==4&&(c=y(qr(f,c))),y(c)}function Om(s,l,c){return s=s|0,l=l|0,c=y(c),hi(s,l)|0?c=y(Lr(s,l,c)):c=y(-y(Su(s,l,c))),y(c)}function Pu(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function wp(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Kt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f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B,B=n[d>>2]|0,n[d>>2]=n[m>>2],n[m>>2]=B,B=s+8|0,c=l+12|0,s=n[B>>2]|0,n[B>>2]=n[c>>2],n[c>>2]=s,n[l>>2]=n[Q>>2],k|0}function BC(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;if(B=n[l>>2]|0,m=n[c>>2]|0,(B|0)!=(m|0)){d=s+8|0,c=((m+-4-B|0)>>>2)+1|0,s=B,f=n[d>>2]|0;do n[f>>2]=n[s>>2],f=(n[d>>2]|0)+4|0,n[d>>2]=f,s=s+4|0;while((s|0)!=(m|0));n[l>>2]=B+(c<<2)}}function Mm(){dc()}function da(){var s=0;return s=Kt(4)|0,jA(s),s|0}function jA(s){s=s|0,n[s>>2]=Es()|0}function Pc(s){s=s|0,s|0&&(Bg(s),ht(s))}function Bg(s){s=s|0,tt(n[s>>2]|0)}function Um(s,l,c){s=s|0,l=l|0,c=c|0,Ga(n[s>>2]|0,l,c)}function fo(s,l){s=s|0,l=y(l),ha(n[s>>2]|0,l)}function Yv(s,l){return s=s|0,l=l|0,IC(n[s>>2]|0,l)|0}function vC(){var s=0;return s=Kt(8)|0,Wv(s,0),s|0}function Wv(s,l){s=s|0,l=l|0,l?l=Ei(n[l>>2]|0)|0:l=co()|0,n[s>>2]=l,n[s+4>>2]=0,Pi(l,s)}function uF(s){s=s|0;var l=0;return l=Kt(8)|0,Wv(l,s),l|0}function Kv(s){s=s|0,s|0&&(xu(s),ht(s))}function xu(s){s=s|0;var l=0;ca(n[s>>2]|0),l=s+4|0,s=n[l>>2]|0,n[l>>2]=0,s|0&&(qA(s),ht(s))}function qA(s){s=s|0,GA(s)}function GA(s){s=s|0,s=n[s>>2]|0,s|0&&PA(s|0)}function DC(s){return s=s|0,jo(s)|0}function _m(s){s=s|0;var l=0,c=0;c=s+4|0,l=n[c>>2]|0,n[c>>2]=0,l|0&&(qA(l),ht(l)),js(n[s>>2]|0)}function AF(s,l){s=s|0,l=l|0,Xr(n[s>>2]|0,n[l>>2]|0)}function fF(s,l){s=s|0,l=l|0,ua(n[s>>2]|0,l)}function Jv(s,l,c){s=s|0,l=l|0,c=+c,wu(n[s>>2]|0,l,y(c))}function Vv(s,l,c){s=s|0,l=l|0,c=+c,ws(n[s>>2]|0,l,y(c))}function SC(s,l){s=s|0,l=l|0,mu(n[s>>2]|0,l)}function bu(s,l){s=s|0,l=l|0,yu(n[s>>2]|0,l)}function pF(s,l){s=s|0,l=l|0,FA(n[s>>2]|0,l)}function hF(s,l){s=s|0,l=l|0,QA(n[s>>2]|0,l)}function Cp(s,l){s=s|0,l=l|0,yc(n[s>>2]|0,l)}function gF(s,l){s=s|0,l=l|0,cp(n[s>>2]|0,l)}function zv(s,l,c){s=s|0,l=l|0,c=+c,wc(n[s>>2]|0,l,y(c))}function YA(s,l,c){s=s|0,l=l|0,c=+c,Y(n[s>>2]|0,l,y(c))}function dF(s,l){s=s|0,l=l|0,wl(n[s>>2]|0,l)}function mF(s,l){s=s|0,l=l|0,sg(n[s>>2]|0,l)}function Xv(s,l){s=s|0,l=l|0,up(n[s>>2]|0,l)}function PC(s,l){s=s|0,l=+l,RA(n[s>>2]|0,y(l))}function xC(s,l){s=s|0,l=+l,Ha(n[s>>2]|0,y(l))}function yF(s,l){s=s|0,l=+l,Yi(n[s>>2]|0,y(l))}function EF(s,l){s=s|0,l=+l,qs(n[s>>2]|0,y(l))}function vl(s,l){s=s|0,l=+l,Eu(n[s>>2]|0,y(l))}function bC(s,l){s=s|0,l=+l,dC(n[s>>2]|0,y(l))}function wF(s,l){s=s|0,l=+l,TA(n[s>>2]|0,y(l))}function WA(s){s=s|0,Ap(n[s>>2]|0)}function Hm(s,l){s=s|0,l=+l,Cs(n[s>>2]|0,y(l))}function Qu(s,l){s=s|0,l=+l,lg(n[s>>2]|0,y(l))}function QC(s){s=s|0,cg(n[s>>2]|0)}function kC(s,l){s=s|0,l=+l,fp(n[s>>2]|0,y(l))}function CF(s,l){s=s|0,l=+l,Ic(n[s>>2]|0,y(l))}function Zv(s,l){s=s|0,l=+l,Pm(n[s>>2]|0,y(l))}function KA(s,l){s=s|0,l=+l,Ag(n[s>>2]|0,y(l))}function $v(s,l){s=s|0,l=+l,Iu(n[s>>2]|0,y(l))}function jm(s,l){s=s|0,l=+l,xm(n[s>>2]|0,y(l))}function eD(s,l){s=s|0,l=+l,Bu(n[s>>2]|0,y(l))}function tD(s,l){s=s|0,l=+l,mC(n[s>>2]|0,y(l))}function qm(s,l){s=s|0,l=+l,fa(n[s>>2]|0,y(l))}function rD(s,l,c){s=s|0,l=l|0,c=+c,Cu(n[s>>2]|0,l,y(c))}function IF(s,l,c){s=s|0,l=l|0,c=+c,xi(n[s>>2]|0,l,y(c))}function S(s,l,c){s=s|0,l=l|0,c=+c,Cc(n[s>>2]|0,l,y(c))}function D(s){return s=s|0,ig(n[s>>2]|0)|0}function T(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=E,E=E+16|0,d=f,Ec(d,n[l>>2]|0,c),j(s,d),E=f}function j(s,l){s=s|0,l=l|0,W(s,n[l+4>>2]|0,+y(h[l>>2]))}function W(s,l,c){s=s|0,l=l|0,c=+c,n[s>>2]=l,w[s+8>>3]=c}function ue(s){return s=s|0,ng(n[s>>2]|0)|0}function De(s){return s=s|0,uo(n[s>>2]|0)|0}function vt(s){return s=s|0,mc(n[s>>2]|0)|0}function Ct(s){return s=s|0,kA(n[s>>2]|0)|0}function bt(s){return s=s|0,Sm(n[s>>2]|0)|0}function Ur(s){return s=s|0,rg(n[s>>2]|0)|0}function ns(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=E,E=E+16|0,d=f,Dt(d,n[l>>2]|0,c),j(s,d),E=f}function gi(s){return s=s|0,Xn(n[s>>2]|0)|0}function po(s){return s=s|0,og(n[s>>2]|0)|0}function JA(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,Aa(f,n[l>>2]|0),j(s,f),E=c}function Yo(s){return s=s|0,+ +y(Gi(n[s>>2]|0))}function rt(s){return s=s|0,+ +y($i(n[s>>2]|0))}function Je(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,Ir(f,n[l>>2]|0),j(s,f),E=c}function At(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,ug(f,n[l>>2]|0),j(s,f),E=c}function Wt(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,wt(f,n[l>>2]|0),j(s,f),E=c}function Br(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,fg(f,n[l>>2]|0),j(s,f),E=c}function Sn(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,pg(f,n[l>>2]|0),j(s,f),E=c}function kr(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,bm(f,n[l>>2]|0),j(s,f),E=c}function Pn(s){return s=s|0,+ +y(Bc(n[s>>2]|0))}function oi(s,l){return s=s|0,l=l|0,+ +y(ag(n[s>>2]|0,l))}function $r(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=E,E=E+16|0,d=f,ct(d,n[l>>2]|0,c),j(s,d),E=f}function ho(s,l,c){s=s|0,l=l|0,c=c|0,rr(n[s>>2]|0,n[l>>2]|0,c)}function BF(s,l){s=s|0,l=l|0,ys(n[s>>2]|0,n[l>>2]|0)}function $Be(s){return s=s|0,wi(n[s>>2]|0)|0}function eve(s){return s=s|0,s=pt(n[s>>2]|0)|0,s?s=DC(s)|0:s=0,s|0}function tve(s,l){return s=s|0,l=l|0,s=ds(n[s>>2]|0,l)|0,s?s=DC(s)|0:s=0,s|0}function rve(s,l){s=s|0,l=l|0;var c=0,f=0;f=Kt(4)|0,VG(f,l),c=s+4|0,l=n[c>>2]|0,n[c>>2]=f,l|0&&(qA(l),ht(l)),It(n[s>>2]|0,1)}function VG(s,l){s=s|0,l=l|0,hve(s,l)}function nve(s,l,c,f,d,m){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=m|0;var B=0,Q=0;B=E,E=E+16|0,Q=B,ive(Q,jo(l)|0,+c,f,+d,m),h[s>>2]=y(+w[Q>>3]),h[s+4>>2]=y(+w[Q+8>>3]),E=B}function ive(s,l,c,f,d,m){s=s|0,l=l|0,c=+c,f=f|0,d=+d,m=m|0;var B=0,Q=0,k=0,M=0,O=0;B=E,E=E+32|0,O=B+8|0,M=B+20|0,k=B,Q=B+16|0,w[O>>3]=c,n[M>>2]=f,w[k>>3]=d,n[Q>>2]=m,sve(s,n[l+4>>2]|0,O,M,k,Q),E=B}function sve(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0;B=E,E=E+16|0,Q=B,Ka(Q),l=ma(l)|0,ove(s,l,+w[c>>3],n[f>>2]|0,+w[d>>3],n[m>>2]|0),Ja(Q),E=B}function ma(s){return s=s|0,n[s>>2]|0}function ove(s,l,c,f,d,m){s=s|0,l=l|0,c=+c,f=f|0,d=+d,m=m|0;var B=0;B=Dl(ave()|0)|0,c=+VA(c),f=vF(f)|0,d=+VA(d),lve(s,pi(0,B|0,l|0,+c,f|0,+d,vF(m)|0)|0)}function ave(){var s=0;return o[7608]|0||(fve(9120),s=7608,n[s>>2]=1,n[s+4>>2]=0),9120}function Dl(s){return s=s|0,n[s+8>>2]|0}function VA(s){return s=+s,+ +DF(s)}function vF(s){return s=s|0,XG(s)|0}function lve(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=E,E=E+32|0,c=d,f=l,f&1?(cve(c,0),ni(f|0,c|0)|0,uve(s,c),Ave(c)):(n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2]),E=d}function cve(s,l){s=s|0,l=l|0,zG(s,l),n[s+8>>2]=0,o[s+24>>0]=0}function uve(s,l){s=s|0,l=l|0,l=l+8|0,n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2]}function Ave(s){s=s|0,o[s+24>>0]=0}function zG(s,l){s=s|0,l=l|0,n[s>>2]=l}function XG(s){return s=s|0,s|0}function DF(s){return s=+s,+s}function fve(s){s=s|0,Sl(s,pve()|0,4)}function pve(){return 1064}function Sl(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=lp(l|0,c+1|0)|0}function hve(s,l){s=s|0,l=l|0,l=n[l>>2]|0,n[s>>2]=l,ml(l|0)}function gve(s){s=s|0;var l=0,c=0;c=s+4|0,l=n[c>>2]|0,n[c>>2]=0,l|0&&(qA(l),ht(l)),It(n[s>>2]|0,0)}function dve(s){s=s|0,Tt(n[s>>2]|0)}function mve(s){return s=s|0,er(n[s>>2]|0)|0}function yve(s,l,c,f){s=s|0,l=+l,c=+c,f=f|0,vc(n[s>>2]|0,y(l),y(c),f)}function Eve(s){return s=s|0,+ +y(Cl(n[s>>2]|0))}function wve(s){return s=s|0,+ +y(hg(n[s>>2]|0))}function Cve(s){return s=s|0,+ +y(vu(n[s>>2]|0))}function Ive(s){return s=s|0,+ +y(NA(n[s>>2]|0))}function Bve(s){return s=s|0,+ +y(pp(n[s>>2]|0))}function vve(s){return s=s|0,+ +y(ja(n[s>>2]|0))}function Dve(s,l){s=s|0,l=l|0,w[s>>3]=+y(Cl(n[l>>2]|0)),w[s+8>>3]=+y(hg(n[l>>2]|0)),w[s+16>>3]=+y(vu(n[l>>2]|0)),w[s+24>>3]=+y(NA(n[l>>2]|0)),w[s+32>>3]=+y(pp(n[l>>2]|0)),w[s+40>>3]=+y(ja(n[l>>2]|0))}function Sve(s,l){return s=s|0,l=l|0,+ +y(gg(n[s>>2]|0,l))}function Pve(s,l){return s=s|0,l=l|0,+ +y(hp(n[s>>2]|0,l))}function xve(s,l){return s=s|0,l=l|0,+ +y(qo(n[s>>2]|0,l))}function bve(){return Dn()|0}function Qve(){kve(),Fve(),Rve(),Tve(),Nve(),Lve()}function kve(){NNe(11713,4938,1)}function Fve(){eNe(10448)}function Rve(){NTe(10408)}function Tve(){iTe(10324)}function Nve(){fFe(10096)}function Lve(){Ove(9132)}function Ove(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0,Me=0,Fe=0,et=0,Xe=0,lt=0,Ue=0,qe=0,Lt=0,Or=0,sr=0,Xt=0,Dr=0,Tr=0,nr=0,xn=0,go=0,mo=0,yo=0,Ea=0,Qp=0,kp=0,Pl=0,Fp=0,Tu=0,Nu=0,Rp=0,Tp=0,Np=0,zr=0,xl=0,Lp=0,bc=0,Op=0,Mp=0,Lu=0,Ou=0,Qc=0,Ys=0,za=0,Wo=0,bl=0,nf=0,sf=0,Mu=0,of=0,af=0,Ws=0,Ds=0,Ql=0,Fn=0,lf=0,Eo=0,kc=0,wo=0,Fc=0,cf=0,uf=0,Rc=0,Ks=0,kl=0,Af=0,ff=0,pf=0,xr=0,Jn=0,Ss=0,Co=0,Js=0,Fr=0,cr=0,Fl=0;l=E,E=E+672|0,c=l+656|0,Fl=l+648|0,cr=l+640|0,Fr=l+632|0,Js=l+624|0,Co=l+616|0,Ss=l+608|0,Jn=l+600|0,xr=l+592|0,pf=l+584|0,ff=l+576|0,Af=l+568|0,kl=l+560|0,Ks=l+552|0,Rc=l+544|0,uf=l+536|0,cf=l+528|0,Fc=l+520|0,wo=l+512|0,kc=l+504|0,Eo=l+496|0,lf=l+488|0,Fn=l+480|0,Ql=l+472|0,Ds=l+464|0,Ws=l+456|0,af=l+448|0,of=l+440|0,Mu=l+432|0,sf=l+424|0,nf=l+416|0,bl=l+408|0,Wo=l+400|0,za=l+392|0,Ys=l+384|0,Qc=l+376|0,Ou=l+368|0,Lu=l+360|0,Mp=l+352|0,Op=l+344|0,bc=l+336|0,Lp=l+328|0,xl=l+320|0,zr=l+312|0,Np=l+304|0,Tp=l+296|0,Rp=l+288|0,Nu=l+280|0,T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c>>2]=n[Q>>2],n[c+4>>2]=n[Q+4>>2],XA(s,4736,c)|0,n[B>>2]=21,n[B+4>>2]=0,n[c>>2]=n[B>>2],n[c+4>>2]=n[B+4>>2],Xve(s,4754,c)|0,n[m>>2]=2,n[m+4>>2]=0,n[c>>2]=n[m>>2],n[c+4>>2]=n[m+4>>2],nD(s,4772,c)|0,n[d>>2]=3,n[d+4>>2]=0,n[c>>2]=n[d>>2],n[c+4>>2]=n[d+4>>2],nD(s,4790,c)|0,n[f>>2]=4,n[f+4>>2]=0,n[c>>2]=n[f>>2],n[c+4>>2]=n[f+4>>2],nD(s,4808,c)|0,E=l}function Mve(s,l){s=s|0,l=l|0;var c=0;c=nFe()|0,n[s>>2]=c,iFe(c,l),Pp(n[s>>2]|0)}function Uve(s,l,c){return s=s|0,l=l|0,c=c|0,qke(s,fn(l)|0,c,0),s|0}function _ve(s,l,c){return s=s|0,l=l|0,c=c|0,Pke(s,fn(l)|0,c,0),s|0}function Hve(s,l,c){return s=s|0,l=l|0,c=c|0,pke(s,fn(l)|0,c,0),s|0}function FC(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],XQe(s,l,d),E=f,s|0}function jve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],FQe(s,l,d),E=f,s|0}function ku(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dQe(s,l,d),E=f,s|0}function vg(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eQe(s,l,d),E=f,s|0}function Bs(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Mbe(s,l,d),E=f,s|0}function zA(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Ibe(s,l,d),E=f,s|0}function SF(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],obe(s,l,d),E=f,s|0}function Dg(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Fxe(s,l,d),E=f,s|0}function XA(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dxe(s,l,d),E=f,s|0}function nD(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],exe(s,l,d),E=f,s|0}function qve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],MPe(s,l,d),E=f,s|0}function Gve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],IPe(s,l,d),E=f,s|0}function Yve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],aPe(s,l,d),E=f,s|0}function Wve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],WSe(s,l,d),E=f,s|0}function Kve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],bSe(s,l,d),E=f,s|0}function Jve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fSe(s,l,d),E=f,s|0}function Vve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],zDe(s,l,d),E=f,s|0}function zve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],FDe(s,l,d),E=f,s|0}function Xve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Zve(s,l,d),E=f,s|0}function Zve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],$ve(s,c,d,1),E=f}function fn(s){return s=s|0,s|0}function $ve(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=PF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=eDe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,tDe(m,f)|0,f),E=d}function PF(){var s=0,l=0;if(o[7616]|0||(e9(9136),ve(24,9136,U|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9136)|0)){s=9136,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));e9(9136)}return 9136}function eDe(s){return s=s|0,0}function tDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=PF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],$G(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(iDe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function pn(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0;B=E,E=E+32|0,se=B+24|0,q=B+20|0,k=B+16|0,O=B+12|0,M=B+8|0,Q=B+4|0,Ge=B,n[q>>2]=l,n[k>>2]=c,n[O>>2]=f,n[M>>2]=d,n[Q>>2]=m,m=s+28|0,n[Ge>>2]=n[m>>2],n[se>>2]=n[Ge>>2],rDe(s+24|0,se,q,O,M,k,Q)|0,n[m>>2]=n[n[m>>2]>>2],E=B}function rDe(s,l,c,f,d,m,B){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,s=nDe(l)|0,l=Kt(24)|0,ZG(l+4|0,n[c>>2]|0,n[f>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[s>>2],n[s>>2]=l,l|0}function nDe(s){return s=s|0,n[s>>2]|0}function ZG(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=f,n[s+12>>2]=d,n[s+16>>2]=m}function hr(s,l){return s=s|0,l=l|0,l|s|0}function $G(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function iDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=sDe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,oDe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],$G(m,f,c),n[k>>2]=(n[k>>2]|0)+12,aDe(s,Q),lDe(Q),E=M;return}}function sDe(s){return s=s|0,357913941}function oDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function aDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function lDe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function e9(s){s=s|0,ADe(s)}function cDe(s){s=s|0,uDe(s+24|0)}function Rr(s){return s=s|0,n[s>>2]|0}function uDe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function ADe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,3,l,fDe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Wr(){return 9228}function fDe(){return 1140}function pDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=hDe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=gDe(l,f)|0,E=c,l|0}function Kr(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=f,n[s+12>>2]=d,n[s+16>>2]=m}function hDe(s){return s=s|0,(n[(PF()|0)+24>>2]|0)+(s*12|0)|0}function gDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;return d=E,E=E+48|0,f=d,c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),rf[c&31](f,s),f=dDe(f)|0,E=d,f|0}function dDe(s){s=s|0;var l=0,c=0,f=0,d=0;return d=E,E=E+32|0,l=d+12|0,c=d,f=xF(t9()|0)|0,f?(bF(l,f),QF(c,l),mDe(s,c),s=kF(l)|0):s=yDe(s)|0,E=d,s|0}function t9(){var s=0;return o[7632]|0||(xDe(9184),ve(25,9184,U|0)|0,s=7632,n[s>>2]=1,n[s+4>>2]=0),9184}function xF(s){return s=s|0,n[s+36>>2]|0}function bF(s,l){s=s|0,l=l|0,n[s>>2]=l,n[s+4>>2]=s,n[s+8>>2]=0}function QF(s,l){s=s|0,l=l|0,n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=0}function mDe(s,l){s=s|0,l=l|0,IDe(l,s,s+8|0,s+16|0,s+24|0,s+32|0,s+40|0)|0}function kF(s){return s=s|0,n[(n[s+4>>2]|0)+8>>2]|0}function yDe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0;k=E,E=E+16|0,c=k+4|0,f=k,d=Wa(8)|0,m=d,B=Kt(48)|0,Q=B,l=Q+48|0;do n[Q>>2]=n[s>>2],Q=Q+4|0,s=s+4|0;while((Q|0)<(l|0));return l=m+4|0,n[l>>2]=B,Q=Kt(8)|0,B=n[l>>2]|0,n[f>>2]=0,n[c>>2]=n[f>>2],r9(Q,B,c),n[d>>2]=Q,E=k,m|0}function r9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1092,n[c+12>>2]=l,n[s+4>>2]=c}function EDe(s){s=s|0,Vm(s),ht(s)}function wDe(s){s=s|0,s=n[s+12>>2]|0,s|0&&ht(s)}function CDe(s){s=s|0,ht(s)}function IDe(s,l,c,f,d,m,B){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,m=BDe(n[s>>2]|0,l,c,f,d,m,B)|0,B=s+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function BDe(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0;var Q=0,k=0;return Q=E,E=E+16|0,k=Q,Ka(k),s=ma(s)|0,B=vDe(s,+w[l>>3],+w[c>>3],+w[f>>3],+w[d>>3],+w[m>>3],+w[B>>3])|0,Ja(k),E=Q,B|0}function vDe(s,l,c,f,d,m,B){s=s|0,l=+l,c=+c,f=+f,d=+d,m=+m,B=+B;var Q=0;return Q=Dl(DDe()|0)|0,l=+VA(l),c=+VA(c),f=+VA(f),d=+VA(d),m=+VA(m),_s(0,Q|0,s|0,+l,+c,+f,+d,+m,+ +VA(B))|0}function DDe(){var s=0;return o[7624]|0||(SDe(9172),s=7624,n[s>>2]=1,n[s+4>>2]=0),9172}function SDe(s){s=s|0,Sl(s,PDe()|0,6)}function PDe(){return 1112}function xDe(s){s=s|0,Ip(s)}function bDe(s){s=s|0,n9(s+24|0),i9(s+16|0)}function n9(s){s=s|0,kDe(s)}function i9(s){s=s|0,QDe(s)}function QDe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,ht(c);while((l|0)!=0);n[s>>2]=0}function kDe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,ht(c);while((l|0)!=0);n[s>>2]=0}function Ip(s){s=s|0;var l=0;n[s+16>>2]=0,n[s+20>>2]=0,l=s+24|0,n[l>>2]=0,n[s+28>>2]=l,n[s+36>>2]=0,o[s+40>>0]=0,o[s+41>>0]=0}function FDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RDe(s,c,d,0),E=f}function RDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=FF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=TDe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,NDe(m,f)|0,f),E=d}function FF(){var s=0,l=0;if(o[7640]|0||(o9(9232),ve(26,9232,U|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9232)|0)){s=9232,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));o9(9232)}return 9232}function TDe(s){return s=s|0,0}function NDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=FF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],s9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(LDe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function s9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function LDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=ODe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,MDe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],s9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,UDe(s,Q),_De(Q),E=M;return}}function ODe(s){return s=s|0,357913941}function MDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function UDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function _De(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function o9(s){s=s|0,qDe(s)}function HDe(s){s=s|0,jDe(s+24|0)}function jDe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function qDe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,1,l,GDe()|0,3),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function GDe(){return 1144}function YDe(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0;var m=0,B=0,Q=0,k=0;m=E,E=E+16|0,B=m+8|0,Q=m,k=WDe(s)|0,s=n[k+4>>2]|0,n[Q>>2]=n[k>>2],n[Q+4>>2]=s,n[B>>2]=n[Q>>2],n[B+4>>2]=n[Q+4>>2],KDe(l,B,c,f,d),E=m}function WDe(s){return s=s|0,(n[(FF()|0)+24>>2]|0)+(s*12|0)|0}function KDe(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0;var m=0,B=0,Q=0,k=0,M=0;M=E,E=E+16|0,B=M+2|0,Q=M+1|0,k=M,m=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(m=n[(n[s>>2]|0)+m>>2]|0),Fu(B,c),c=+Ru(B,c),Fu(Q,f),f=+Ru(Q,f),ZA(k,d),k=$A(k,d)|0,C7[m&1](s,c,f,k),E=M}function Fu(s,l){s=s|0,l=+l}function Ru(s,l){return s=s|0,l=+l,+ +VDe(l)}function ZA(s,l){s=s|0,l=l|0}function $A(s,l){return s=s|0,l=l|0,JDe(l)|0}function JDe(s){return s=s|0,s|0}function VDe(s){return s=+s,+s}function zDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],XDe(s,c,d,1),E=f}function XDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=RF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=ZDe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,$De(m,f)|0,f),E=d}function RF(){var s=0,l=0;if(o[7648]|0||(l9(9268),ve(27,9268,U|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9268)|0)){s=9268,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));l9(9268)}return 9268}function ZDe(s){return s=s|0,0}function $De(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=RF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],a9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(eSe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function a9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function eSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=tSe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,rSe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],a9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,nSe(s,Q),iSe(Q),E=M;return}}function tSe(s){return s=s|0,357913941}function rSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function nSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function iSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function l9(s){s=s|0,aSe(s)}function sSe(s){s=s|0,oSe(s+24|0)}function oSe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function aSe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,4,l,lSe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function lSe(){return 1160}function cSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=uSe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=ASe(l,f)|0,E=c,l|0}function uSe(s){return s=s|0,(n[(RF()|0)+24>>2]|0)+(s*12|0)|0}function ASe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),c9(Tg[c&31](s)|0)|0}function c9(s){return s=s|0,s&1|0}function fSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],pSe(s,c,d,0),E=f}function pSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=TF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=hSe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,gSe(m,f)|0,f),E=d}function TF(){var s=0,l=0;if(o[7656]|0||(A9(9304),ve(28,9304,U|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9304)|0)){s=9304,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));A9(9304)}return 9304}function hSe(s){return s=s|0,0}function gSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=TF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],u9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(dSe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function u9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function dSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=mSe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,ySe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],u9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,ESe(s,Q),wSe(Q),E=M;return}}function mSe(s){return s=s|0,357913941}function ySe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function ESe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function wSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function A9(s){s=s|0,BSe(s)}function CSe(s){s=s|0,ISe(s+24|0)}function ISe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function BSe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,5,l,vSe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function vSe(){return 1164}function DSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=SSe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],PSe(l,d,c),E=f}function SSe(s){return s=s|0,(n[(TF()|0)+24>>2]|0)+(s*12|0)|0}function PSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Bp(d,c),c=vp(d,c)|0,rf[f&31](s,c),Dp(d),E=m}function Bp(s,l){s=s|0,l=l|0,xSe(s,l)}function vp(s,l){return s=s|0,l=l|0,s|0}function Dp(s){s=s|0,qA(s)}function xSe(s,l){s=s|0,l=l|0,NF(s,l)}function NF(s,l){s=s|0,l=l|0,n[s>>2]=l}function bSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],QSe(s,c,d,0),E=f}function QSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=LF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=kSe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,FSe(m,f)|0,f),E=d}function LF(){var s=0,l=0;if(o[7664]|0||(p9(9340),ve(29,9340,U|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9340)|0)){s=9340,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));p9(9340)}return 9340}function kSe(s){return s=s|0,0}function FSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=LF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],f9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(RSe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function f9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function RSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=TSe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,NSe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],f9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,LSe(s,Q),OSe(Q),E=M;return}}function TSe(s){return s=s|0,357913941}function NSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function LSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function OSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function p9(s){s=s|0,_Se(s)}function MSe(s){s=s|0,USe(s+24|0)}function USe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function _Se(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,4,l,HSe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function HSe(){return 1180}function jSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=qSe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=GSe(l,d,c)|0,E=f,c|0}function qSe(s){return s=s|0,(n[(LF()|0)+24>>2]|0)+(s*12|0)|0}function GSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Sg(d,c),d=Pg(d,c)|0,d=iD(FR[f&15](s,d)|0)|0,E=m,d|0}function Sg(s,l){s=s|0,l=l|0}function Pg(s,l){return s=s|0,l=l|0,YSe(l)|0}function iD(s){return s=s|0,s|0}function YSe(s){return s=s|0,s|0}function WSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],KSe(s,c,d,0),E=f}function KSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=OF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=JSe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,VSe(m,f)|0,f),E=d}function OF(){var s=0,l=0;if(o[7672]|0||(g9(9376),ve(30,9376,U|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9376)|0)){s=9376,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));g9(9376)}return 9376}function JSe(s){return s=s|0,0}function VSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=OF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],h9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(zSe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function h9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function zSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=XSe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,ZSe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],h9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,$Se(s,Q),ePe(Q),E=M;return}}function XSe(s){return s=s|0,357913941}function ZSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function $Se(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function ePe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function g9(s){s=s|0,nPe(s)}function tPe(s){s=s|0,rPe(s+24|0)}function rPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function nPe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,5,l,d9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function d9(){return 1196}function iPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=sPe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=oPe(l,f)|0,E=c,l|0}function sPe(s){return s=s|0,(n[(OF()|0)+24>>2]|0)+(s*12|0)|0}function oPe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),iD(Tg[c&31](s)|0)|0}function aPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lPe(s,c,d,1),E=f}function lPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=MF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=cPe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,uPe(m,f)|0,f),E=d}function MF(){var s=0,l=0;if(o[7680]|0||(y9(9412),ve(31,9412,U|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9412)|0)){s=9412,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));y9(9412)}return 9412}function cPe(s){return s=s|0,0}function uPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=MF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],m9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(APe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function m9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function APe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=fPe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,pPe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],m9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,hPe(s,Q),gPe(Q),E=M;return}}function fPe(s){return s=s|0,357913941}function pPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function hPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function gPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function y9(s){s=s|0,yPe(s)}function dPe(s){s=s|0,mPe(s+24|0)}function mPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function yPe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,6,l,E9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function E9(){return 1200}function EPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=wPe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=CPe(l,f)|0,E=c,l|0}function wPe(s){return s=s|0,(n[(MF()|0)+24>>2]|0)+(s*12|0)|0}function CPe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),sD(Tg[c&31](s)|0)|0}function sD(s){return s=s|0,s|0}function IPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],BPe(s,c,d,0),E=f}function BPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=UF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=vPe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,DPe(m,f)|0,f),E=d}function UF(){var s=0,l=0;if(o[7688]|0||(C9(9448),ve(32,9448,U|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9448)|0)){s=9448,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));C9(9448)}return 9448}function vPe(s){return s=s|0,0}function DPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=UF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],w9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(SPe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function w9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function SPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=PPe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,xPe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],w9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,bPe(s,Q),QPe(Q),E=M;return}}function PPe(s){return s=s|0,357913941}function xPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function bPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function QPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function C9(s){s=s|0,RPe(s)}function kPe(s){s=s|0,FPe(s+24|0)}function FPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function RPe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,6,l,I9()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function I9(){return 1204}function TPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=NPe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],LPe(l,d,c),E=f}function NPe(s){return s=s|0,(n[(UF()|0)+24>>2]|0)+(s*12|0)|0}function LPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),_F(d,c),d=HF(d,c)|0,rf[f&31](s,d),E=m}function _F(s,l){s=s|0,l=l|0}function HF(s,l){return s=s|0,l=l|0,OPe(l)|0}function OPe(s){return s=s|0,s|0}function MPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],UPe(s,c,d,0),E=f}function UPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=jF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=_Pe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,HPe(m,f)|0,f),E=d}function jF(){var s=0,l=0;if(o[7696]|0||(v9(9484),ve(33,9484,U|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9484)|0)){s=9484,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));v9(9484)}return 9484}function _Pe(s){return s=s|0,0}function HPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=jF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],B9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(jPe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function B9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function jPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=qPe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,GPe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],B9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,YPe(s,Q),WPe(Q),E=M;return}}function qPe(s){return s=s|0,357913941}function GPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function YPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function WPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function v9(s){s=s|0,VPe(s)}function KPe(s){s=s|0,JPe(s+24|0)}function JPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function VPe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,1,l,zPe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function zPe(){return 1212}function XPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,m=d+8|0,B=d,Q=ZPe(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],$Pe(l,m,c,f),E=d}function ZPe(s){return s=s|0,(n[(jF()|0)+24>>2]|0)+(s*12|0)|0}function $Pe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;Q=E,E=E+16|0,m=Q+1|0,B=Q,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),_F(m,c),m=HF(m,c)|0,Sg(B,f),B=Pg(B,f)|0,UC[d&15](s,m,B),E=Q}function exe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],txe(s,c,d,1),E=f}function txe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=qF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=rxe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,nxe(m,f)|0,f),E=d}function qF(){var s=0,l=0;if(o[7704]|0||(S9(9520),ve(34,9520,U|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9520)|0)){s=9520,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));S9(9520)}return 9520}function rxe(s){return s=s|0,0}function nxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=qF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],D9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(ixe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function D9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function ixe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=sxe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,oxe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],D9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,axe(s,Q),lxe(Q),E=M;return}}function sxe(s){return s=s|0,357913941}function oxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function axe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function lxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function S9(s){s=s|0,Axe(s)}function cxe(s){s=s|0,uxe(s+24|0)}function uxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function Axe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,1,l,fxe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function fxe(){return 1224}function pxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;return d=E,E=E+16|0,m=d+8|0,B=d,Q=hxe(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],f=+gxe(l,m,c),E=d,+f}function hxe(s){return s=s|0,(n[(qF()|0)+24>>2]|0)+(s*12|0)|0}function gxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(d,c),d=$A(d,c)|0,B=+DF(+B7[f&7](s,d)),E=m,+B}function dxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],mxe(s,c,d,1),E=f}function mxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=GF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=yxe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,Exe(m,f)|0,f),E=d}function GF(){var s=0,l=0;if(o[7712]|0||(x9(9556),ve(35,9556,U|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9556)|0)){s=9556,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));x9(9556)}return 9556}function yxe(s){return s=s|0,0}function Exe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=GF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],P9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(wxe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function P9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function wxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Cxe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,Ixe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],P9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Bxe(s,Q),vxe(Q),E=M;return}}function Cxe(s){return s=s|0,357913941}function Ixe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Bxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function vxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function x9(s){s=s|0,Pxe(s)}function Dxe(s){s=s|0,Sxe(s+24|0)}function Sxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function Pxe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,5,l,xxe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function xxe(){return 1232}function bxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=Qxe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=+kxe(l,d),E=f,+c}function Qxe(s){return s=s|0,(n[(GF()|0)+24>>2]|0)+(s*12|0)|0}function kxe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),+ +DF(+I7[c&15](s))}function Fxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Rxe(s,c,d,1),E=f}function Rxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=YF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Txe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,Nxe(m,f)|0,f),E=d}function YF(){var s=0,l=0;if(o[7720]|0||(Q9(9592),ve(36,9592,U|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9592)|0)){s=9592,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));Q9(9592)}return 9592}function Txe(s){return s=s|0,0}function Nxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=YF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],b9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Lxe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function b9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Lxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Oxe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,Mxe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],b9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Uxe(s,Q),_xe(Q),E=M;return}}function Oxe(s){return s=s|0,357913941}function Mxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Uxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function _xe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function Q9(s){s=s|0,qxe(s)}function Hxe(s){s=s|0,jxe(s+24|0)}function jxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function qxe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,7,l,Gxe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Gxe(){return 1276}function Yxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=Wxe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=Kxe(l,f)|0,E=c,l|0}function Wxe(s){return s=s|0,(n[(YF()|0)+24>>2]|0)+(s*12|0)|0}function Kxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;return d=E,E=E+16|0,f=d,c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),rf[c&31](f,s),f=k9(f)|0,E=d,f|0}function k9(s){s=s|0;var l=0,c=0,f=0,d=0;return d=E,E=E+32|0,l=d+12|0,c=d,f=xF(F9()|0)|0,f?(bF(l,f),QF(c,l),Jxe(s,c),s=kF(l)|0):s=Vxe(s)|0,E=d,s|0}function F9(){var s=0;return o[7736]|0||(sbe(9640),ve(25,9640,U|0)|0,s=7736,n[s>>2]=1,n[s+4>>2]=0),9640}function Jxe(s,l){s=s|0,l=l|0,$xe(l,s,s+8|0)|0}function Vxe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;return c=E,E=E+16|0,d=c+4|0,B=c,f=Wa(8)|0,l=f,Q=Kt(16)|0,n[Q>>2]=n[s>>2],n[Q+4>>2]=n[s+4>>2],n[Q+8>>2]=n[s+8>>2],n[Q+12>>2]=n[s+12>>2],m=l+4|0,n[m>>2]=Q,s=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],WF(s,m,d),n[f>>2]=s,E=c,l|0}function WF(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1244,n[c+12>>2]=l,n[s+4>>2]=c}function zxe(s){s=s|0,Vm(s),ht(s)}function Xxe(s){s=s|0,s=n[s+12>>2]|0,s|0&&ht(s)}function Zxe(s){s=s|0,ht(s)}function $xe(s,l,c){return s=s|0,l=l|0,c=c|0,l=ebe(n[s>>2]|0,l,c)|0,c=s+4|0,n[(n[c>>2]|0)+8>>2]=l,n[(n[c>>2]|0)+8>>2]|0}function ebe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;return f=E,E=E+16|0,d=f,Ka(d),s=ma(s)|0,c=tbe(s,n[l>>2]|0,+w[c>>3])|0,Ja(d),E=f,c|0}function tbe(s,l,c){s=s|0,l=l|0,c=+c;var f=0;return f=Dl(rbe()|0)|0,l=vF(l)|0,dl(0,f|0,s|0,l|0,+ +VA(c))|0}function rbe(){var s=0;return o[7728]|0||(nbe(9628),s=7728,n[s>>2]=1,n[s+4>>2]=0),9628}function nbe(s){s=s|0,Sl(s,ibe()|0,2)}function ibe(){return 1264}function sbe(s){s=s|0,Ip(s)}function obe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],abe(s,c,d,1),E=f}function abe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=KF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=lbe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,cbe(m,f)|0,f),E=d}function KF(){var s=0,l=0;if(o[7744]|0||(T9(9684),ve(37,9684,U|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9684)|0)){s=9684,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));T9(9684)}return 9684}function lbe(s){return s=s|0,0}function cbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=KF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],R9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(ube(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function R9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function ube(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Abe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,fbe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],R9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,pbe(s,Q),hbe(Q),E=M;return}}function Abe(s){return s=s|0,357913941}function fbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function pbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function hbe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function T9(s){s=s|0,mbe(s)}function gbe(s){s=s|0,dbe(s+24|0)}function dbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function mbe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,5,l,ybe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function ybe(){return 1280}function Ebe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=wbe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=Cbe(l,d,c)|0,E=f,c|0}function wbe(s){return s=s|0,(n[(KF()|0)+24>>2]|0)+(s*12|0)|0}function Cbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return B=E,E=E+32|0,d=B,m=B+16|0,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(m,c),m=$A(m,c)|0,UC[f&15](d,s,m),m=k9(d)|0,E=B,m|0}function Ibe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Bbe(s,c,d,1),E=f}function Bbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=JF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=vbe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,Dbe(m,f)|0,f),E=d}function JF(){var s=0,l=0;if(o[7752]|0||(L9(9720),ve(38,9720,U|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9720)|0)){s=9720,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));L9(9720)}return 9720}function vbe(s){return s=s|0,0}function Dbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=JF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],N9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Sbe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function N9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Sbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Pbe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,xbe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],N9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,bbe(s,Q),Qbe(Q),E=M;return}}function Pbe(s){return s=s|0,357913941}function xbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function bbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Qbe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function L9(s){s=s|0,Rbe(s)}function kbe(s){s=s|0,Fbe(s+24|0)}function Fbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function Rbe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,8,l,Tbe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Tbe(){return 1288}function Nbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=E,E=E+16|0,f=c+8|0,d=c,m=Lbe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=Obe(l,f)|0,E=c,l|0}function Lbe(s){return s=s|0,(n[(JF()|0)+24>>2]|0)+(s*12|0)|0}function Obe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),XG(Tg[c&31](s)|0)|0}function Mbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Ube(s,c,d,0),E=f}function Ube(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=VF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=_be(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,Hbe(m,f)|0,f),E=d}function VF(){var s=0,l=0;if(o[7760]|0||(M9(9756),ve(39,9756,U|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9756)|0)){s=9756,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));M9(9756)}return 9756}function _be(s){return s=s|0,0}function Hbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=VF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],O9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(jbe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function O9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function jbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=qbe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,Gbe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],O9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,Ybe(s,Q),Wbe(Q),E=M;return}}function qbe(s){return s=s|0,357913941}function Gbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Ybe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Wbe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function M9(s){s=s|0,Vbe(s)}function Kbe(s){s=s|0,Jbe(s+24|0)}function Jbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function Vbe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,8,l,zbe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function zbe(){return 1292}function Xbe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=Zbe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],$be(l,d,c),E=f}function Zbe(s){return s=s|0,(n[(VF()|0)+24>>2]|0)+(s*12|0)|0}function $be(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Fu(d,c),c=+Ru(d,c),E7[f&31](s,c),E=m}function eQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tQe(s,c,d,0),E=f}function tQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=zF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=rQe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,nQe(m,f)|0,f),E=d}function zF(){var s=0,l=0;if(o[7768]|0||(_9(9792),ve(40,9792,U|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9792)|0)){s=9792,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));_9(9792)}return 9792}function rQe(s){return s=s|0,0}function nQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=zF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],U9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(iQe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function U9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function iQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=sQe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,oQe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],U9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,aQe(s,Q),lQe(Q),E=M;return}}function sQe(s){return s=s|0,357913941}function oQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function aQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function lQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function _9(s){s=s|0,AQe(s)}function cQe(s){s=s|0,uQe(s+24|0)}function uQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function AQe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,1,l,fQe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function fQe(){return 1300}function pQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,m=d+8|0,B=d,Q=hQe(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],gQe(l,m,c,f),E=d}function hQe(s){return s=s|0,(n[(zF()|0)+24>>2]|0)+(s*12|0)|0}function gQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f;var d=0,m=0,B=0,Q=0;Q=E,E=E+16|0,m=Q+1|0,B=Q,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),ZA(m,c),m=$A(m,c)|0,Fu(B,f),f=+Ru(B,f),P7[d&15](s,m,f),E=Q}function dQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],mQe(s,c,d,0),E=f}function mQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=XF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=yQe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,EQe(m,f)|0,f),E=d}function XF(){var s=0,l=0;if(o[7776]|0||(j9(9828),ve(41,9828,U|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9828)|0)){s=9828,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));j9(9828)}return 9828}function yQe(s){return s=s|0,0}function EQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=XF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],H9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(wQe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function H9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function wQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=CQe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,IQe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],H9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,BQe(s,Q),vQe(Q),E=M;return}}function CQe(s){return s=s|0,357913941}function IQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function BQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function vQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function j9(s){s=s|0,PQe(s)}function DQe(s){s=s|0,SQe(s+24|0)}function SQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function PQe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,7,l,xQe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function xQe(){return 1312}function bQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=QQe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],kQe(l,d,c),E=f}function QQe(s){return s=s|0,(n[(XF()|0)+24>>2]|0)+(s*12|0)|0}function kQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(d,c),d=$A(d,c)|0,rf[f&31](s,d),E=m}function FQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RQe(s,c,d,0),E=f}function RQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=ZF()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=TQe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,NQe(m,f)|0,f),E=d}function ZF(){var s=0,l=0;if(o[7784]|0||(G9(9864),ve(42,9864,U|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9864)|0)){s=9864,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));G9(9864)}return 9864}function TQe(s){return s=s|0,0}function NQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=ZF()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],q9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(LQe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function q9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function LQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=OQe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,MQe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],q9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,UQe(s,Q),_Qe(Q),E=M;return}}function OQe(s){return s=s|0,357913941}function MQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function UQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function _Qe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function G9(s){s=s|0,qQe(s)}function HQe(s){s=s|0,jQe(s+24|0)}function jQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function qQe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,8,l,GQe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function GQe(){return 1320}function YQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=WQe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],KQe(l,d,c),E=f}function WQe(s){return s=s|0,(n[(ZF()|0)+24>>2]|0)+(s*12|0)|0}function KQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),JQe(d,c),d=VQe(d,c)|0,rf[f&31](s,d),E=m}function JQe(s,l){s=s|0,l=l|0}function VQe(s,l){return s=s|0,l=l|0,zQe(l)|0}function zQe(s){return s=s|0,s|0}function XQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ZQe(s,c,d,0),E=f}function ZQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=$F()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=$Qe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,eke(m,f)|0,f),E=d}function $F(){var s=0,l=0;if(o[7792]|0||(W9(9900),ve(43,9900,U|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9900)|0)){s=9900,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));W9(9900)}return 9900}function $Qe(s){return s=s|0,0}function eke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=$F()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Y9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(tke(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function Y9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function tke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=rke(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,nke(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],Y9(m,f,c),n[k>>2]=(n[k>>2]|0)+12,ike(s,Q),ske(Q),E=M;return}}function rke(s){return s=s|0,357913941}function nke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function ike(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function ske(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function W9(s){s=s|0,lke(s)}function oke(s){s=s|0,ake(s+24|0)}function ake(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function lke(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,22,l,cke()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function cke(){return 1344}function uke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;c=E,E=E+16|0,f=c+8|0,d=c,m=Ake(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],fke(l,f),E=c}function Ake(s){return s=s|0,(n[($F()|0)+24>>2]|0)+(s*12|0)|0}function fke(s,l){s=s|0,l=l|0;var c=0;c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),tf[c&127](s)}function pke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=eR()|0,s=hke(c)|0,pn(m,l,d,s,gke(c,f)|0,f)}function eR(){var s=0,l=0;if(o[7800]|0||(J9(9936),ve(44,9936,U|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9936)|0)){s=9936,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));J9(9936)}return 9936}function hke(s){return s=s|0,s|0}function gke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=eR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(K9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(dke(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function K9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function dke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=mke(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,yke(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,K9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Eke(s,d),wke(d),E=Q;return}}function mke(s){return s=s|0,536870911}function yke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function Eke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function wke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function J9(s){s=s|0,Bke(s)}function Cke(s){s=s|0,Ike(s+24|0)}function Ike(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function Bke(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,23,l,I9()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function vke(s,l){s=s|0,l=l|0,Ske(n[(Dke(s)|0)>>2]|0,l)}function Dke(s){return s=s|0,(n[(eR()|0)+24>>2]|0)+(s<<3)|0}function Ske(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,_F(f,l),l=HF(f,l)|0,tf[s&127](l),E=c}function Pke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=tR()|0,s=xke(c)|0,pn(m,l,d,s,bke(c,f)|0,f)}function tR(){var s=0,l=0;if(o[7808]|0||(z9(9972),ve(45,9972,U|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(Rr(9972)|0)){s=9972,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));z9(9972)}return 9972}function xke(s){return s=s|0,s|0}function bke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=tR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(V9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(Qke(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function V9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function Qke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=kke(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,Fke(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,V9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Rke(s,d),Tke(d),E=Q;return}}function kke(s){return s=s|0,536870911}function Fke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function Rke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Tke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function z9(s){s=s|0,Oke(s)}function Nke(s){s=s|0,Lke(s+24|0)}function Lke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function Oke(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,9,l,Mke()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Mke(){return 1348}function Uke(s,l){return s=s|0,l=l|0,Hke(n[(_ke(s)|0)>>2]|0,l)|0}function _ke(s){return s=s|0,(n[(tR()|0)+24>>2]|0)+(s<<3)|0}function Hke(s,l){s=s|0,l=l|0;var c=0,f=0;return c=E,E=E+16|0,f=c,X9(f,l),l=Z9(f,l)|0,l=iD(Tg[s&31](l)|0)|0,E=c,l|0}function X9(s,l){s=s|0,l=l|0}function Z9(s,l){return s=s|0,l=l|0,jke(l)|0}function jke(s){return s=s|0,s|0}function qke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=rR()|0,s=Gke(c)|0,pn(m,l,d,s,Yke(c,f)|0,f)}function rR(){var s=0,l=0;if(o[7816]|0||(e5(10008),ve(46,10008,U|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10008)|0)){s=10008,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));e5(10008)}return 10008}function Gke(s){return s=s|0,s|0}function Yke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=rR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?($9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(Wke(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function $9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function Wke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=Kke(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,Jke(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,$9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Vke(s,d),zke(d),E=Q;return}}function Kke(s){return s=s|0,536870911}function Jke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function Vke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function zke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function e5(s){s=s|0,$ke(s)}function Xke(s){s=s|0,Zke(s+24|0)}function Zke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function $ke(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,15,l,d9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function eFe(s){return s=s|0,rFe(n[(tFe(s)|0)>>2]|0)|0}function tFe(s){return s=s|0,(n[(rR()|0)+24>>2]|0)+(s<<3)|0}function rFe(s){return s=s|0,iD(ED[s&7]()|0)|0}function nFe(){var s=0;return o[7832]|0||(AFe(10052),ve(25,10052,U|0)|0,s=7832,n[s>>2]=1,n[s+4>>2]=0),10052}function iFe(s,l){s=s|0,l=l|0,n[s>>2]=sFe()|0,n[s+4>>2]=oFe()|0,n[s+12>>2]=l,n[s+8>>2]=aFe()|0,n[s+32>>2]=2}function sFe(){return 11709}function oFe(){return 1188}function aFe(){return oD()|0}function lFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&(cFe(c),ht(c)):l|0&&(xu(l),ht(l))}function Sp(s,l){return s=s|0,l=l|0,l&s|0}function cFe(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function oD(){var s=0;return o[7824]|0||(n[2511]=uFe()|0,n[2512]=0,s=7824,n[s>>2]=1,n[s+4>>2]=0),10044}function uFe(){return 0}function AFe(s){s=s|0,Ip(s)}function fFe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0;l=E,E=E+32|0,c=l+24|0,m=l+16|0,d=l+8|0,f=l,pFe(s,4827),hFe(s,4834,3)|0,gFe(s,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[c>>2]=n[m>>2],n[c+4>>2]=n[m+4>>2],dFe(s,4841,c)|0,n[d>>2]=1,n[d+4>>2]=0,n[c>>2]=n[d>>2],n[c+4>>2]=n[d+4>>2],mFe(s,4871,c)|0,n[f>>2]=10,n[f+4>>2]=0,n[c>>2]=n[f>>2],n[c+4>>2]=n[f+4>>2],yFe(s,4891,c)|0,E=l}function pFe(s,l){s=s|0,l=l|0;var c=0;c=zRe()|0,n[s>>2]=c,XRe(c,l),Pp(n[s>>2]|0)}function hFe(s,l,c){return s=s|0,l=l|0,c=c|0,TRe(s,fn(l)|0,c,0),s|0}function gFe(s,l,c){return s=s|0,l=l|0,c=c|0,ERe(s,fn(l)|0,c,0),s|0}function dFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eRe(s,l,d),E=f,s|0}function mFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],NFe(s,l,d),E=f,s|0}function yFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],EFe(s,l,d),E=f,s|0}function EFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wFe(s,c,d,1),E=f}function wFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=nR()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=CFe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,IFe(m,f)|0,f),E=d}function nR(){var s=0,l=0;if(o[7840]|0||(r5(10100),ve(48,10100,U|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10100)|0)){s=10100,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));r5(10100)}return 10100}function CFe(s){return s=s|0,0}function IFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=nR()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],t5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(BFe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function t5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function BFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=vFe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,DFe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],t5(m,f,c),n[k>>2]=(n[k>>2]|0)+12,SFe(s,Q),PFe(Q),E=M;return}}function vFe(s){return s=s|0,357913941}function DFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function SFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function PFe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function r5(s){s=s|0,QFe(s)}function xFe(s){s=s|0,bFe(s+24|0)}function bFe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function QFe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,6,l,kFe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function kFe(){return 1364}function FFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=E,E=E+16|0,d=f+8|0,m=f,B=RFe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=TFe(l,d,c)|0,E=f,c|0}function RFe(s){return s=s|0,(n[(nR()|0)+24>>2]|0)+(s*12|0)|0}function TFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(d,c),d=$A(d,c)|0,d=c9(FR[f&15](s,d)|0)|0,E=m,d|0}function NFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],LFe(s,c,d,0),E=f}function LFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=iR()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=OFe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,MFe(m,f)|0,f),E=d}function iR(){var s=0,l=0;if(o[7848]|0||(i5(10136),ve(49,10136,U|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10136)|0)){s=10136,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));i5(10136)}return 10136}function OFe(s){return s=s|0,0}function MFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=iR()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],n5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(UFe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function n5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function UFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=_Fe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,HFe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],n5(m,f,c),n[k>>2]=(n[k>>2]|0)+12,jFe(s,Q),qFe(Q),E=M;return}}function _Fe(s){return s=s|0,357913941}function HFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function jFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function qFe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function i5(s){s=s|0,WFe(s)}function GFe(s){s=s|0,YFe(s+24|0)}function YFe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function WFe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,9,l,KFe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function KFe(){return 1372}function JFe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,d=f+8|0,m=f,B=VFe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],zFe(l,d,c),E=f}function VFe(s){return s=s|0,(n[(iR()|0)+24>>2]|0)+(s*12|0)|0}function zFe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=Ze;m=E,E=E+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),XFe(d,c),B=y(ZFe(d,c)),y7[f&1](s,B),E=m}function XFe(s,l){s=s|0,l=+l}function ZFe(s,l){return s=s|0,l=+l,y($Fe(l))}function $Fe(s){return s=+s,y(s)}function eRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,d=f+8|0,m=f,Q=n[c>>2]|0,B=n[c+4>>2]|0,c=fn(l)|0,n[m>>2]=Q,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tRe(s,c,d,0),E=f}function tRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0,k=0,M=0,O=0;d=E,E=E+32|0,m=d+16|0,O=d+8|0,Q=d,M=n[c>>2]|0,k=n[c+4>>2]|0,B=n[s>>2]|0,s=sR()|0,n[O>>2]=M,n[O+4>>2]=k,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=rRe(m)|0,n[Q>>2]=M,n[Q+4>>2]=k,n[m>>2]=n[Q>>2],n[m+4>>2]=n[Q+4>>2],pn(B,l,s,c,nRe(m,f)|0,f),E=d}function sR(){var s=0,l=0;if(o[7856]|0||(o5(10172),ve(50,10172,U|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10172)|0)){s=10172,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));o5(10172)}return 10172}function rRe(s){return s=s|0,0}function nRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0;return O=E,E=E+32|0,d=O+24|0,B=O+16|0,Q=O,k=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[Q>>2]=m,n[Q+4>>2]=f,q=sR()|0,M=q+24|0,s=hr(l,4)|0,n[k>>2]=s,l=q+28|0,c=n[l>>2]|0,c>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],s5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(iRe(M,Q,k),s=n[l>>2]|0),E=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function s5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function iRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;if(M=E,E=E+48|0,f=M+32|0,B=M+24|0,Q=M,k=s+4|0,d=(((n[k>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=sRe(s)|0,m>>>0<d>>>0)Vr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,q=se<<1,oRe(Q,se>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[k>>2]|0)-O|0)/12|0,s+8|0),k=Q+8|0,m=n[k>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],s5(m,f,c),n[k>>2]=(n[k>>2]|0)+12,aRe(s,Q),lRe(Q),E=M;return}}function sRe(s){return s=s|0,357913941}function oRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function aRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function lRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&&ht(s)}function o5(s){s=s|0,ARe(s)}function cRe(s){s=s|0,uRe(s+24|0)}function uRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),ht(c))}function ARe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,2,3,l,fRe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function fRe(){return 1380}function pRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,m=d+8|0,B=d,Q=hRe(s)|0,s=n[Q+4>>2]|0,n[B>>2]=n[Q>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],gRe(l,m,c,f),E=d}function hRe(s){return s=s|0,(n[(sR()|0)+24>>2]|0)+(s*12|0)|0}function gRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;Q=E,E=E+16|0,m=Q+1|0,B=Q,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),ZA(m,c),m=$A(m,c)|0,dRe(B,f),B=mRe(B,f)|0,UC[d&15](s,m,B),E=Q}function dRe(s,l){s=s|0,l=l|0}function mRe(s,l){return s=s|0,l=l|0,yRe(l)|0}function yRe(s){return s=s|0,(s|0)!=0|0}function ERe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=oR()|0,s=wRe(c)|0,pn(m,l,d,s,CRe(c,f)|0,f)}function oR(){var s=0,l=0;if(o[7864]|0||(l5(10208),ve(51,10208,U|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10208)|0)){s=10208,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));l5(10208)}return 10208}function wRe(s){return s=s|0,s|0}function CRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=oR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(a5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(IRe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function a5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function IRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=BRe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,vRe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,a5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,DRe(s,d),SRe(d),E=Q;return}}function BRe(s){return s=s|0,536870911}function vRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function DRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function SRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function l5(s){s=s|0,bRe(s)}function PRe(s){s=s|0,xRe(s+24|0)}function xRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function bRe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,24,l,QRe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function QRe(){return 1392}function kRe(s,l){s=s|0,l=l|0,RRe(n[(FRe(s)|0)>>2]|0,l)}function FRe(s){return s=s|0,(n[(oR()|0)+24>>2]|0)+(s<<3)|0}function RRe(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,X9(f,l),l=Z9(f,l)|0,tf[s&127](l),E=c}function TRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=aR()|0,s=NRe(c)|0,pn(m,l,d,s,LRe(c,f)|0,f)}function aR(){var s=0,l=0;if(o[7872]|0||(u5(10244),ve(52,10244,U|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10244)|0)){s=10244,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));u5(10244)}return 10244}function NRe(s){return s=s|0,s|0}function LRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=aR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(c5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(ORe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function c5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function ORe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=MRe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,URe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,c5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,_Re(s,d),HRe(d),E=Q;return}}function MRe(s){return s=s|0,536870911}function URe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function _Re(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function HRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function u5(s){s=s|0,GRe(s)}function jRe(s){s=s|0,qRe(s+24|0)}function qRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function GRe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,16,l,YRe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function YRe(){return 1400}function WRe(s){return s=s|0,JRe(n[(KRe(s)|0)>>2]|0)|0}function KRe(s){return s=s|0,(n[(aR()|0)+24>>2]|0)+(s<<3)|0}function JRe(s){return s=s|0,VRe(ED[s&7]()|0)|0}function VRe(s){return s=s|0,s|0}function zRe(){var s=0;return o[7880]|0||(nTe(10280),ve(25,10280,U|0)|0,s=7880,n[s>>2]=1,n[s+4>>2]=0),10280}function XRe(s,l){s=s|0,l=l|0,n[s>>2]=ZRe()|0,n[s+4>>2]=$Re()|0,n[s+12>>2]=l,n[s+8>>2]=eTe()|0,n[s+32>>2]=4}function ZRe(){return 11711}function $Re(){return 1356}function eTe(){return oD()|0}function tTe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&(rTe(c),ht(c)):l|0&&(Bg(l),ht(l))}function rTe(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function nTe(s){s=s|0,Ip(s)}function iTe(s){s=s|0,sTe(s,4920),oTe(s)|0,aTe(s)|0}function sTe(s,l){s=s|0,l=l|0;var c=0;c=F9()|0,n[s>>2]=c,xTe(c,l),Pp(n[s>>2]|0)}function oTe(s){s=s|0;var l=0;return l=n[s>>2]|0,xg(l,yTe()|0),s|0}function aTe(s){s=s|0;var l=0;return l=n[s>>2]|0,xg(l,lTe()|0),s|0}function lTe(){var s=0;return o[7888]|0||(A5(10328),ve(53,10328,U|0)|0,s=7888,n[s>>2]=1,n[s+4>>2]=0),Rr(10328)|0||A5(10328),10328}function xg(s,l){s=s|0,l=l|0,pn(s,0,l,0,0,0)}function A5(s){s=s|0,ATe(s),bg(s,10)}function cTe(s){s=s|0,uTe(s+24|0)}function uTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function ATe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,5,1,l,gTe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function fTe(s,l,c){s=s|0,l=l|0,c=+c,pTe(s,l,c)}function bg(s,l){s=s|0,l=l|0,n[s+20>>2]=l}function pTe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+16|0,m=f+8|0,Q=f+13|0,d=f,B=f+12|0,ZA(Q,l),n[m>>2]=$A(Q,l)|0,Fu(B,c),w[d>>3]=+Ru(B,c),hTe(s,m,d),E=f}function hTe(s,l,c){s=s|0,l=l|0,c=c|0,W(s+8|0,n[l>>2]|0,+w[c>>3]),o[s+24>>0]=1}function gTe(){return 1404}function dTe(s,l){return s=s|0,l=+l,mTe(s,l)|0}function mTe(s,l){s=s|0,l=+l;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return f=E,E=E+16|0,m=f+4|0,B=f+8|0,Q=f,d=Wa(8)|0,c=d,k=Kt(16)|0,ZA(m,s),s=$A(m,s)|0,Fu(B,l),W(k,s,+Ru(B,l)),B=c+4|0,n[B>>2]=k,s=Kt(8)|0,B=n[B>>2]|0,n[Q>>2]=0,n[m>>2]=n[Q>>2],WF(s,B,m),n[d>>2]=s,E=f,c|0}function yTe(){var s=0;return o[7896]|0||(f5(10364),ve(54,10364,U|0)|0,s=7896,n[s>>2]=1,n[s+4>>2]=0),Rr(10364)|0||f5(10364),10364}function f5(s){s=s|0,CTe(s),bg(s,55)}function ETe(s){s=s|0,wTe(s+24|0)}function wTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function CTe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,5,4,l,DTe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function ITe(s){s=s|0,BTe(s)}function BTe(s){s=s|0,vTe(s)}function vTe(s){s=s|0,p5(s+8|0),o[s+24>>0]=1}function p5(s){s=s|0,n[s>>2]=0,w[s+8>>3]=0}function DTe(){return 1424}function STe(){return PTe()|0}function PTe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=E,E=E+16|0,d=l+4|0,B=l,c=Wa(8)|0,s=c,f=Kt(16)|0,p5(f),m=s+4|0,n[m>>2]=f,f=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],WF(f,m,d),n[c>>2]=f,E=l,s|0}function xTe(s,l){s=s|0,l=l|0,n[s>>2]=bTe()|0,n[s+4>>2]=QTe()|0,n[s+12>>2]=l,n[s+8>>2]=kTe()|0,n[s+32>>2]=5}function bTe(){return 11710}function QTe(){return 1416}function kTe(){return aD()|0}function FTe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&(RTe(c),ht(c)):l|0&&ht(l)}function RTe(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function aD(){var s=0;return o[7904]|0||(n[2600]=TTe()|0,n[2601]=0,s=7904,n[s>>2]=1,n[s+4>>2]=0),10400}function TTe(){return n[357]|0}function NTe(s){s=s|0,LTe(s,4926),OTe(s)|0}function LTe(s,l){s=s|0,l=l|0;var c=0;c=t9()|0,n[s>>2]=c,JTe(c,l),Pp(n[s>>2]|0)}function OTe(s){s=s|0;var l=0;return l=n[s>>2]|0,xg(l,MTe()|0),s|0}function MTe(){var s=0;return o[7912]|0||(h5(10412),ve(56,10412,U|0)|0,s=7912,n[s>>2]=1,n[s+4>>2]=0),Rr(10412)|0||h5(10412),10412}function h5(s){s=s|0,HTe(s),bg(s,57)}function UTe(s){s=s|0,_Te(s+24|0)}function _Te(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function HTe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,5,5,l,YTe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function jTe(s){s=s|0,qTe(s)}function qTe(s){s=s|0,GTe(s)}function GTe(s){s=s|0;var l=0,c=0;l=s+8|0,c=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(c|0));o[s+56>>0]=1}function YTe(){return 1432}function WTe(){return KTe()|0}function KTe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0,Q=0;B=E,E=E+16|0,s=B+4|0,l=B,c=Wa(8)|0,f=c,d=Kt(48)|0,m=d,Q=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(Q|0));return m=f+4|0,n[m>>2]=d,Q=Kt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[s>>2]=n[l>>2],r9(Q,m,s),n[c>>2]=Q,E=B,f|0}function JTe(s,l){s=s|0,l=l|0,n[s>>2]=VTe()|0,n[s+4>>2]=zTe()|0,n[s+12>>2]=l,n[s+8>>2]=XTe()|0,n[s+32>>2]=6}function VTe(){return 11704}function zTe(){return 1436}function XTe(){return aD()|0}function ZTe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&($Te(c),ht(c)):l|0&&ht(l)}function $Te(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function eNe(s){s=s|0,tNe(s,4933),rNe(s)|0,nNe(s)|0}function tNe(s,l){s=s|0,l=l|0;var c=0;c=PNe()|0,n[s>>2]=c,xNe(c,l),Pp(n[s>>2]|0)}function rNe(s){s=s|0;var l=0;return l=n[s>>2]|0,xg(l,mNe()|0),s|0}function nNe(s){s=s|0;var l=0;return l=n[s>>2]|0,xg(l,iNe()|0),s|0}function iNe(){var s=0;return o[7920]|0||(g5(10452),ve(58,10452,U|0)|0,s=7920,n[s>>2]=1,n[s+4>>2]=0),Rr(10452)|0||g5(10452),10452}function g5(s){s=s|0,aNe(s),bg(s,1)}function sNe(s){s=s|0,oNe(s+24|0)}function oNe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function aNe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,5,1,l,ANe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function lNe(s,l,c){s=s|0,l=+l,c=+c,cNe(s,l,c)}function cNe(s,l,c){s=s|0,l=+l,c=+c;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+32|0,m=f+8|0,Q=f+17|0,d=f,B=f+16|0,Fu(Q,l),w[m>>3]=+Ru(Q,l),Fu(B,c),w[d>>3]=+Ru(B,c),uNe(s,m,d),E=f}function uNe(s,l,c){s=s|0,l=l|0,c=c|0,d5(s+8|0,+w[l>>3],+w[c>>3]),o[s+24>>0]=1}function d5(s,l,c){s=s|0,l=+l,c=+c,w[s>>3]=l,w[s+8>>3]=c}function ANe(){return 1472}function fNe(s,l){return s=+s,l=+l,pNe(s,l)|0}function pNe(s,l){s=+s,l=+l;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return f=E,E=E+16|0,B=f+4|0,Q=f+8|0,k=f,d=Wa(8)|0,c=d,m=Kt(16)|0,Fu(B,s),s=+Ru(B,s),Fu(Q,l),d5(m,s,+Ru(Q,l)),Q=c+4|0,n[Q>>2]=m,m=Kt(8)|0,Q=n[Q>>2]|0,n[k>>2]=0,n[B>>2]=n[k>>2],m5(m,Q,B),n[d>>2]=m,E=f,c|0}function m5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1452,n[c+12>>2]=l,n[s+4>>2]=c}function hNe(s){s=s|0,Vm(s),ht(s)}function gNe(s){s=s|0,s=n[s+12>>2]|0,s|0&&ht(s)}function dNe(s){s=s|0,ht(s)}function mNe(){var s=0;return o[7928]|0||(y5(10488),ve(59,10488,U|0)|0,s=7928,n[s>>2]=1,n[s+4>>2]=0),Rr(10488)|0||y5(10488),10488}function y5(s){s=s|0,wNe(s),bg(s,60)}function yNe(s){s=s|0,ENe(s+24|0)}function ENe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function wNe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,5,6,l,vNe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function CNe(s){s=s|0,INe(s)}function INe(s){s=s|0,BNe(s)}function BNe(s){s=s|0,E5(s+8|0),o[s+24>>0]=1}function E5(s){s=s|0,n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,n[s+12>>2]=0}function vNe(){return 1492}function DNe(){return SNe()|0}function SNe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=E,E=E+16|0,d=l+4|0,B=l,c=Wa(8)|0,s=c,f=Kt(16)|0,E5(f),m=s+4|0,n[m>>2]=f,f=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],m5(f,m,d),n[c>>2]=f,E=l,s|0}function PNe(){var s=0;return o[7936]|0||(TNe(10524),ve(25,10524,U|0)|0,s=7936,n[s>>2]=1,n[s+4>>2]=0),10524}function xNe(s,l){s=s|0,l=l|0,n[s>>2]=bNe()|0,n[s+4>>2]=QNe()|0,n[s+12>>2]=l,n[s+8>>2]=kNe()|0,n[s+32>>2]=7}function bNe(){return 11700}function QNe(){return 1484}function kNe(){return aD()|0}function FNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&(RNe(c),ht(c)):l|0&&ht(l)}function RNe(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function TNe(s){s=s|0,Ip(s)}function NNe(s,l,c){s=s|0,l=l|0,c=c|0,s=fn(l)|0,l=LNe(c)|0,c=ONe(c,0)|0,pLe(s,l,c,lR()|0,0)}function LNe(s){return s=s|0,s|0}function ONe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=lR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(C5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(GNe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function lR(){var s=0,l=0;if(o[7944]|0||(w5(10568),ve(61,10568,U|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10568)|0)){s=10568,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));w5(10568)}return 10568}function w5(s){s=s|0,_Ne(s)}function MNe(s){s=s|0,UNe(s+24|0)}function UNe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function _Ne(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,17,l,E9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function HNe(s){return s=s|0,qNe(n[(jNe(s)|0)>>2]|0)|0}function jNe(s){return s=s|0,(n[(lR()|0)+24>>2]|0)+(s<<3)|0}function qNe(s){return s=s|0,sD(ED[s&7]()|0)|0}function C5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function GNe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=YNe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,WNe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,C5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,KNe(s,d),JNe(d),E=Q;return}}function YNe(s){return s=s|0,536870911}function WNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function KNe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function JNe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function VNe(){zNe()}function zNe(){XNe(10604)}function XNe(s){s=s|0,ZNe(s,4955)}function ZNe(s,l){s=s|0,l=l|0;var c=0;c=$Ne()|0,n[s>>2]=c,eLe(c,l),Pp(n[s>>2]|0)}function $Ne(){var s=0;return o[7952]|0||(cLe(10612),ve(25,10612,U|0)|0,s=7952,n[s>>2]=1,n[s+4>>2]=0),10612}function eLe(s,l){s=s|0,l=l|0,n[s>>2]=iLe()|0,n[s+4>>2]=sLe()|0,n[s+12>>2]=l,n[s+8>>2]=oLe()|0,n[s+32>>2]=8}function Pp(s){s=s|0;var l=0,c=0;l=E,E=E+16|0,c=l,Gm()|0,n[c>>2]=s,tLe(10608,c),E=l}function Gm(){return o[11714]|0||(n[2652]=0,ve(62,10608,U|0)|0,o[11714]=1),10608}function tLe(s,l){s=s|0,l=l|0;var c=0;c=Kt(8)|0,n[c+4>>2]=n[l>>2],n[c>>2]=n[s>>2],n[s>>2]=c}function rLe(s){s=s|0,nLe(s)}function nLe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,ht(c);while((l|0)!=0);n[s>>2]=0}function iLe(){return 11715}function sLe(){return 1496}function oLe(){return oD()|0}function aLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&(lLe(c),ht(c)):l|0&&ht(l)}function lLe(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function cLe(s){s=s|0,Ip(s)}function uLe(s,l){s=s|0,l=l|0;var c=0,f=0;Gm()|0,c=n[2652]|0;e:do if(c|0){for(;f=n[c+4>>2]|0,!(f|0&&(r7(cR(f)|0,s)|0)==0);)if(c=n[c>>2]|0,!c)break e;ALe(f,l)}while(0)}function cR(s){return s=s|0,n[s+12>>2]|0}function ALe(s,l){s=s|0,l=l|0;var c=0;s=s+36|0,c=n[s>>2]|0,c|0&&(qA(c),ht(c)),c=Kt(4)|0,VG(c,l),n[s>>2]=c}function uR(){return o[11716]|0||(n[2664]=0,ve(63,10656,U|0)|0,o[11716]=1),10656}function I5(){var s=0;return o[11717]|0?s=n[2665]|0:(fLe(),n[2665]=1504,o[11717]=1,s=1504),s|0}function fLe(){o[11740]|0||(o[11718]=hr(hr(8,0)|0,0)|0,o[11719]=hr(hr(0,0)|0,0)|0,o[11720]=hr(hr(0,16)|0,0)|0,o[11721]=hr(hr(8,0)|0,0)|0,o[11722]=hr(hr(0,0)|0,0)|0,o[11723]=hr(hr(8,0)|0,0)|0,o[11724]=hr(hr(0,0)|0,0)|0,o[11725]=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>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?dLe(Fe,f):(n[d>>2]=n[f>>2],n[M>>2]=(n[M>>2]|0)+4),f=f+4|0,!(n[f>>2]|0))break e;d=n[M>>2]|0,m=n[q>>2]|0}while(0);n[et>>2]=lD(B)|0,n[Xe>>2]=Rr(Q)|0,mLe(c,s,et,Xe,Me,Fe),pR(Fe),ef(Me)}l=n[l>>2]|0}while((l|0)!=0)}E=lt}function AR(s){return s=s|0,n[s+12>>2]|0}function RC(s){return s=s|0,n[s+12>>2]|0}function TC(s){return s=s|0,n[s+16>>2]|0}function gLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=E,E=E+32|0,c=d,f=n[s>>2]|0,(n[s+8>>2]|0)-f>>2>>>0<l>>>0&&(F5(c,l,(n[s+4>>2]|0)-f>>2,s+8|0),R5(s,c),T5(c)),E=d}function fR(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;if(B=E,E=E+32|0,c=B,f=s+4|0,d=((n[f>>2]|0)-(n[s>>2]|0)>>2)+1|0,m=k5(s)|0,m>>>0<d>>>0)Vr(s);else{Q=n[s>>2]|0,M=(n[s+8>>2]|0)-Q|0,k=M>>1,F5(c,M>>2>>>0<m>>>1>>>0?k>>>0<d>>>0?d:k:m,(n[f>>2]|0)-Q>>2,s+8|0),m=c+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,R5(s,c),T5(c),E=B;return}}function NC(s){return s=s|0,n[s+8>>2]|0}function dLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;if(B=E,E=E+32|0,c=B,f=s+4|0,d=((n[f>>2]|0)-(n[s>>2]|0)>>2)+1|0,m=Q5(s)|0,m>>>0<d>>>0)Vr(s);else{Q=n[s>>2]|0,M=(n[s+8>>2]|0)-Q|0,k=M>>1,LLe(c,M>>2>>>0<m>>>1>>>0?k>>>0<d>>>0?d:k:m,(n[f>>2]|0)-Q>>2,s+8|0),m=c+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,OLe(s,c),MLe(c),E=B;return}}function lD(s){return s=s|0,n[s>>2]|0}function mLe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,yLe(s,l,c,f,d,m)}function pR(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),ht(c))}function ef(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),ht(c))}function yLe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,q=0;B=E,E=E+48|0,O=B+40|0,Q=B+32|0,q=B+24|0,k=B+12|0,M=B,Ka(Q),s=ma(s)|0,n[q>>2]=n[l>>2],c=n[c>>2]|0,f=n[f>>2]|0,hR(k,d),ELe(M,m),n[O>>2]=n[q>>2],wLe(s,O,c,f,k,M),pR(M),ef(k),Ja(Q),E=B}function hR(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(TLe(s,f),NLe(s,n[l>>2]|0,n[c>>2]|0,f))}function ELe(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(FLe(s,f),RLe(s,n[l>>2]|0,n[c>>2]|0,f))}function wLe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,q=0;B=E,E=E+32|0,O=B+28|0,q=B+24|0,Q=B+12|0,k=B,M=Dl(CLe()|0)|0,n[q>>2]=n[l>>2],n[O>>2]=n[q>>2],l=Qg(O)|0,c=D5(c)|0,f=gR(f)|0,n[Q>>2]=n[d>>2],O=d+4|0,n[Q+4>>2]=n[O>>2],q=d+8|0,n[Q+8>>2]=n[q>>2],n[q>>2]=0,n[O>>2]=0,n[d>>2]=0,d=dR(Q)|0,n[k>>2]=n[m>>2],O=m+4|0,n[k+4>>2]=n[O>>2],q=m+8|0,n[k+8>>2]=n[q>>2],n[q>>2]=0,n[O>>2]=0,n[m>>2]=0,ao(0,M|0,s|0,l|0,c|0,f|0,d|0,ILe(k)|0)|0,pR(k),ef(Q),E=B}function CLe(){var s=0;return o[7968]|0||(QLe(10708),s=7968,n[s>>2]=1,n[s+4>>2]=0),10708}function Qg(s){return s=s|0,P5(s)|0}function D5(s){return s=s|0,S5(s)|0}function gR(s){return s=s|0,sD(s)|0}function dR(s){return s=s|0,vLe(s)|0}function ILe(s){return s=s|0,BLe(s)|0}function BLe(s){s=s|0;var l=0,c=0,f=0;if(f=(n[s+4>>2]|0)-(n[s>>2]|0)|0,c=f>>2,f=Wa(f+4|0)|0,n[f>>2]=c,c|0){l=0;do n[f+4+(l<<2)>>2]=S5(n[(n[s>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(c|0))}return f|0}function S5(s){return s=s|0,s|0}function vLe(s){s=s|0;var l=0,c=0,f=0;if(f=(n[s+4>>2]|0)-(n[s>>2]|0)|0,c=f>>2,f=Wa(f+4|0)|0,n[f>>2]=c,c|0){l=0;do n[f+4+(l<<2)>>2]=P5((n[s>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(c|0))}return f|0}function P5(s){s=s|0;var l=0,c=0,f=0,d=0;return d=E,E=E+32|0,l=d+12|0,c=d,f=xF(x5()|0)|0,f?(bF(l,f),QF(c,l),oUe(s,c),s=kF(l)|0):s=DLe(s)|0,E=d,s|0}function x5(){var s=0;return o[7960]|0||(bLe(10664),ve(25,10664,U|0)|0,s=7960,n[s>>2]=1,n[s+4>>2]=0),10664}function DLe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;return c=E,E=E+16|0,d=c+4|0,B=c,f=Wa(8)|0,l=f,Q=Kt(4)|0,n[Q>>2]=n[s>>2],m=l+4|0,n[m>>2]=Q,s=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],b5(s,m,d),n[f>>2]=s,E=c,l|0}function b5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1656,n[c+12>>2]=l,n[s+4>>2]=c}function SLe(s){s=s|0,Vm(s),ht(s)}function PLe(s){s=s|0,s=n[s+12>>2]|0,s|0&&ht(s)}function xLe(s){s=s|0,ht(s)}function bLe(s){s=s|0,Ip(s)}function QLe(s){s=s|0,Sl(s,kLe()|0,5)}function kLe(){return 1676}function FLe(s,l){s=s|0,l=l|0;var c=0;if((Q5(s)|0)>>>0<l>>>0&&Vr(s),l>>>0>1073741823)Rt();else{c=Kt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function RLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(vr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function Q5(s){return s=s|0,1073741823}function TLe(s,l){s=s|0,l=l|0;var c=0;if((k5(s)|0)>>>0<l>>>0&&Vr(s),l>>>0>1073741823)Rt();else{c=Kt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function NLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(vr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function k5(s){return s=s|0,1073741823}function LLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Kt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<2)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<2)}function OLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function MLe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-4-l|0)>>>2)<<2)),s=n[s>>2]|0,s|0&&ht(s)}function F5(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Kt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<2)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<2)}function R5(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0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2]|0),Q=n[s>>2]|0,Q>>>0<(n[c>>2]|0)>>>0?(n[Q>>2]=n[Ge>>2],n[s>>2]=(n[s>>2]|0)+4):fR(O,Ge),B=n[B>>2]|0;while((B|0)!=0);GLe(f,q,O),ef(O)}n[Me>>2]=n[q>>2],M=L5(k)|0,n[O>>2]=n[Me>>2],v5(O,M,d),i9(se),m=n[m>>2]|0}while((m|0)!=0)}E=Fe}function _Le(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,rOe(s,l,c,f)}function HLe(s,l,c){s=s|0,l=l|0,c=c|0,tOe(s,l,c)}function Ym(s){return s=s|0,s|0}function jLe(s,l,c){s=s|0,l=l|0,c=c|0,XLe(s,l,c)}function N5(s){return s=s|0,s+16|0}function qLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;if(m=E,E=E+16|0,d=m+8|0,c=m,n[s>>2]=0,f=n[l>>2]|0,n[d>>2]=f,n[c>>2]=s,c=zLe(c)|0,f|0){if(f=Kt(12)|0,B=(O5(d)|0)+4|0,s=n[B+4>>2]|0,l=f+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=s,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)s=f;else for(l=f;s=Kt(12)|0,k=(O5(d)|0)+4|0,Q=n[k+4>>2]|0,B=s+4|0,n[B>>2]=n[k>>2],n[B+4>>2]=Q,n[l>>2]=s,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=s;n[s>>2]=n[c>>2],n[c>>2]=f}E=m}function GLe(s,l,c){s=s|0,l=l|0,c=c|0,YLe(s,l,c)}function L5(s){return s=s|0,s+24|0}function YLe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+32|0,B=f+24|0,d=f+16|0,Q=f+12|0,m=f,Ka(d),s=ma(s)|0,n[Q>>2]=n[l>>2],hR(m,c),n[B>>2]=n[Q>>2],WLe(s,B,m),ef(m),Ja(d),E=f}function WLe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=E,E=E+32|0,B=f+16|0,Q=f+12|0,d=f,m=Dl(KLe()|0)|0,n[Q>>2]=n[l>>2],n[B>>2]=n[Q>>2],l=Qg(B)|0,n[d>>2]=n[c>>2],B=c+4|0,n[d+4>>2]=n[B>>2],Q=c+8|0,n[d+8>>2]=n[Q>>2],n[Q>>2]=0,n[B>>2]=0,n[c>>2]=0,oo(0,m|0,s|0,l|0,dR(d)|0)|0,ef(d),E=f}function KLe(){var s=0;return o[7976]|0||(JLe(10720),s=7976,n[s>>2]=1,n[s+4>>2]=0),10720}function JLe(s){s=s|0,Sl(s,VLe()|0,2)}function VLe(){return 1732}function zLe(s){return s=s|0,n[s>>2]|0}function O5(s){return s=s|0,n[s>>2]|0}function XLe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+32|0,m=f+16|0,d=f+8|0,B=f,Ka(d),s=ma(s)|0,n[B>>2]=n[l>>2],c=n[c>>2]|0,n[m>>2]=n[B>>2],M5(s,m,c),Ja(d),E=f}function M5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+16|0,m=f+4|0,B=f,d=Dl(ZLe()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=Qg(m)|0,oo(0,d|0,s|0,l|0,D5(c)|0)|0,E=f}function ZLe(){var s=0;return o[7984]|0||($Le(10732),s=7984,n[s>>2]=1,n[s+4>>2]=0),10732}function $Le(s){s=s|0,Sl(s,eOe()|0,2)}function eOe(){return 1744}function tOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=E,E=E+32|0,m=f+16|0,d=f+8|0,B=f,Ka(d),s=ma(s)|0,n[B>>2]=n[l>>2],c=n[c>>2]|0,n[m>>2]=n[B>>2],M5(s,m,c),Ja(d),E=f}function rOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+32|0,B=d+16|0,m=d+8|0,Q=d,Ka(m),s=ma(s)|0,n[Q>>2]=n[l>>2],c=o[c>>0]|0,f=o[f>>0]|0,n[B>>2]=n[Q>>2],nOe(s,B,c,f),Ja(m),E=d}function nOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,B=d+4|0,Q=d,m=Dl(iOe()|0)|0,n[Q>>2]=n[l>>2],n[B>>2]=n[Q>>2],l=Qg(B)|0,c=Wm(c)|0,pc(0,m|0,s|0,l|0,c|0,Wm(f)|0)|0,E=d}function iOe(){var s=0;return o[7992]|0||(oOe(10744),s=7992,n[s>>2]=1,n[s+4>>2]=0),10744}function Wm(s){return s=s|0,sOe(s)|0}function sOe(s){return s=s|0,s&255|0}function oOe(s){s=s|0,Sl(s,aOe()|0,3)}function aOe(){return 1756}function lOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;switch(se=E,E=E+32|0,Q=se+8|0,k=se+4|0,M=se+20|0,O=se,NF(s,0),f=sUe(l)|0,n[Q>>2]=0,q=Q+4|0,n[q>>2]=0,n[Q+8>>2]=0,f<<24>>24){case 0:{o[M>>0]=0,cOe(k,c,M),cD(s,k)|0,GA(k);break}case 8:{q=IR(l)|0,o[M>>0]=8,xc(O,n[q+4>>2]|0),uOe(k,c,M,O,q+8|0),cD(s,k)|0,GA(k);break}case 9:{if(m=IR(l)|0,l=n[m+4>>2]|0,l|0)for(B=Q+8|0,d=m+12|0;l=l+-1|0,xc(k,n[d>>2]|0),f=n[q>>2]|0,f>>>0<(n[B>>2]|0)>>>0?(n[f>>2]=n[k>>2],n[q>>2]=(n[q>>2]|0)+4):fR(Q,k),l;)d=d+4|0;o[M>>0]=9,xc(O,n[m+8>>2]|0),AOe(k,c,M,O,Q),cD(s,k)|0,GA(k);break}default:q=IR(l)|0,o[M>>0]=f,xc(O,n[q+4>>2]|0),fOe(k,c,M,O),cD(s,k)|0,GA(k)}ef(Q),E=se}function cOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=E,E=E+16|0,d=f,Ka(d),l=ma(l)|0,DOe(s,l,o[c>>0]|0),Ja(d),E=f}function cD(s,l){s=s|0,l=l|0;var c=0;return c=n[s>>2]|0,c|0&&PA(c|0),n[s>>2]=n[l>>2],n[l>>2]=0,s|0}function uOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,Q=0,k=0;m=E,E=E+32|0,Q=m+16|0,B=m+8|0,k=m,Ka(B),l=ma(l)|0,c=o[c>>0]|0,n[k>>2]=n[f>>2],d=n[d>>2]|0,n[Q>>2]=n[k>>2],COe(s,l,c,Q,d),Ja(B),E=m}function AOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,Q=0,k=0,M=0;m=E,E=E+32|0,k=m+24|0,B=m+16|0,M=m+12|0,Q=m,Ka(B),l=ma(l)|0,c=o[c>>0]|0,n[M>>2]=n[f>>2],hR(Q,d),n[k>>2]=n[M>>2],mOe(s,l,c,k,Q),ef(Q),Ja(B),E=m}function fOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+32|0,B=d+16|0,m=d+8|0,Q=d,Ka(m),l=ma(l)|0,c=o[c>>0]|0,n[Q>>2]=n[f>>2],n[B>>2]=n[Q>>2],pOe(s,l,c,B),Ja(m),E=d}function pOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,Q=0;d=E,E=E+16|0,m=d+4|0,Q=d,B=Dl(hOe()|0)|0,c=Wm(c)|0,n[Q>>2]=n[f>>2],n[m>>2]=n[Q>>2],uD(s,oo(0,B|0,l|0,c|0,Qg(m)|0)|0),E=d}function hOe(){var s=0;return o[8e3]|0||(gOe(10756),s=8e3,n[s>>2]=1,n[s+4>>2]=0),10756}function uD(s,l){s=s|0,l=l|0,NF(s,l)}function gOe(s){s=s|0,Sl(s,dOe()|0,2)}function dOe(){return 1772}function mOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,Q=0,k=0,M=0;m=E,E=E+32|0,k=m+16|0,M=m+12|0,B=m,Q=Dl(yOe()|0)|0,c=Wm(c)|0,n[M>>2]=n[f>>2],n[k>>2]=n[M>>2],f=Qg(k)|0,n[B>>2]=n[d>>2],k=d+4|0,n[B+4>>2]=n[k>>2],M=d+8|0,n[B+8>>2]=n[M>>2],n[M>>2]=0,n[k>>2]=0,n[d>>2]=0,uD(s,pc(0,Q|0,l|0,c|0,f|0,dR(B)|0)|0),ef(B),E=m}function yOe(){var s=0;return o[8008]|0||(EOe(10768),s=8008,n[s>>2]=1,n[s+4>>2]=0),10768}function EOe(s){s=s|0,Sl(s,wOe()|0,3)}function wOe(){return 1784}function COe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,Q=0,k=0;m=E,E=E+16|0,Q=m+4|0,k=m,B=Dl(IOe()|0)|0,c=Wm(c)|0,n[k>>2]=n[f>>2],n[Q>>2]=n[k>>2],f=Qg(Q)|0,uD(s,pc(0,B|0,l|0,c|0,f|0,gR(d)|0)|0),E=m}function IOe(){var s=0;return o[8016]|0||(BOe(10780),s=8016,n[s>>2]=1,n[s+4>>2]=0),10780}function BOe(s){s=s|0,Sl(s,vOe()|0,3)}function vOe(){return 1800}function DOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=Dl(SOe()|0)|0,uD(s,Qn(0,f|0,l|0,Wm(c)|0)|0)}function SOe(){var s=0;return o[8024]|0||(POe(10792),s=8024,n[s>>2]=1,n[s+4>>2]=0),10792}function POe(s){s=s|0,Sl(s,xOe()|0,1)}function xOe(){return 1816}function bOe(){QOe(),kOe(),FOe()}function QOe(){n[2702]=f7(65536)|0}function kOe(){ZOe(10856)}function FOe(){ROe(10816)}function ROe(s){s=s|0,TOe(s,5044),NOe(s)|0}function TOe(s,l){s=s|0,l=l|0;var c=0;c=x5()|0,n[s>>2]=c,WOe(c,l),Pp(n[s>>2]|0)}function NOe(s){s=s|0;var l=0;return l=n[s>>2]|0,xg(l,LOe()|0),s|0}function LOe(){var s=0;return o[8032]|0||(U5(10820),ve(64,10820,U|0)|0,s=8032,n[s>>2]=1,n[s+4>>2]=0),Rr(10820)|0||U5(10820),10820}function U5(s){s=s|0,UOe(s),bg(s,25)}function OOe(s){s=s|0,MOe(s+24|0)}function MOe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function UOe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,5,18,l,qOe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function _Oe(s,l){s=s|0,l=l|0,HOe(s,l)}function HOe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;c=E,E=E+16|0,f=c,d=c+4|0,Sg(d,l),n[f>>2]=Pg(d,l)|0,jOe(s,f),E=c}function jOe(s,l){s=s|0,l=l|0,_5(s+4|0,n[l>>2]|0),o[s+8>>0]=1}function _5(s,l){s=s|0,l=l|0,n[s>>2]=l}function qOe(){return 1824}function GOe(s){return s=s|0,YOe(s)|0}function YOe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0;return c=E,E=E+16|0,d=c+4|0,B=c,f=Wa(8)|0,l=f,Q=Kt(4)|0,Sg(d,s),_5(Q,Pg(d,s)|0),m=l+4|0,n[m>>2]=Q,s=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],b5(s,m,d),n[f>>2]=s,E=c,l|0}function Wa(s){s=s|0;var l=0,c=0;return s=s+7&-8,s>>>0<=32768&&(l=n[2701]|0,s>>>0<=(65536-l|0)>>>0)?(c=(n[2702]|0)+l|0,n[2701]=l+s,s=c):(s=f7(s+8|0)|0,n[s>>2]=n[2703],n[2703]=s,s=s+8|0),s|0}function WOe(s,l){s=s|0,l=l|0,n[s>>2]=KOe()|0,n[s+4>>2]=JOe()|0,n[s+12>>2]=l,n[s+8>>2]=VOe()|0,n[s+32>>2]=9}function KOe(){return 11744}function JOe(){return 1832}function VOe(){return aD()|0}function zOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&(XOe(c),ht(c)):l|0&&ht(l)}function XOe(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function ZOe(s){s=s|0,$Oe(s,5052),eMe(s)|0,tMe(s,5058,26)|0,rMe(s,5069,1)|0,nMe(s,5077,10)|0,iMe(s,5087,19)|0,sMe(s,5094,27)|0}function $Oe(s,l){s=s|0,l=l|0;var c=0;c=X4e()|0,n[s>>2]=c,Z4e(c,l),Pp(n[s>>2]|0)}function eMe(s){s=s|0;var l=0;return l=n[s>>2]|0,xg(l,O4e()|0),s|0}function tMe(s,l,c){return s=s|0,l=l|0,c=c|0,E4e(s,fn(l)|0,c,0),s|0}function rMe(s,l,c){return s=s|0,l=l|0,c=c|0,i4e(s,fn(l)|0,c,0),s|0}function nMe(s,l,c){return s=s|0,l=l|0,c=c|0,LMe(s,fn(l)|0,c,0),s|0}function iMe(s,l,c){return s=s|0,l=l|0,c=c|0,CMe(s,fn(l)|0,c,0),s|0}function H5(s,l){s=s|0,l=l|0;var c=0,f=0;e:for(;;){for(c=n[2703]|0;;){if((c|0)==(l|0))break e;if(f=n[c>>2]|0,n[2703]=f,!c)c=f;else break}ht(c)}n[2701]=s}function sMe(s,l,c){return s=s|0,l=l|0,c=c|0,oMe(s,fn(l)|0,c,0),s|0}function oMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=mR()|0,s=aMe(c)|0,pn(m,l,d,s,lMe(c,f)|0,f)}function mR(){var s=0,l=0;if(o[8040]|0||(q5(10860),ve(65,10860,U|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10860)|0)){s=10860,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));q5(10860)}return 10860}function aMe(s){return s=s|0,s|0}function lMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=mR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(j5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(cMe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function j5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function cMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=uMe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,AMe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,j5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,fMe(s,d),pMe(d),E=Q;return}}function uMe(s){return s=s|0,536870911}function AMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function fMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function pMe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function q5(s){s=s|0,dMe(s)}function hMe(s){s=s|0,gMe(s+24|0)}function gMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function dMe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,11,l,mMe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function mMe(){return 1840}function yMe(s,l,c){s=s|0,l=l|0,c=c|0,wMe(n[(EMe(s)|0)>>2]|0,l,c)}function EMe(s){return s=s|0,(n[(mR()|0)+24>>2]|0)+(s<<3)|0}function wMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;f=E,E=E+16|0,m=f+1|0,d=f,Sg(m,l),l=Pg(m,l)|0,Sg(d,c),c=Pg(d,c)|0,rf[s&31](l,c),E=f}function CMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=yR()|0,s=IMe(c)|0,pn(m,l,d,s,BMe(c,f)|0,f)}function yR(){var s=0,l=0;if(o[8048]|0||(Y5(10896),ve(66,10896,U|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10896)|0)){s=10896,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));Y5(10896)}return 10896}function IMe(s){return s=s|0,s|0}function BMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=yR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(G5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(vMe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function G5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function vMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=DMe(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,SMe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,G5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,PMe(s,d),xMe(d),E=Q;return}}function DMe(s){return s=s|0,536870911}function SMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function PMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function xMe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function Y5(s){s=s|0,kMe(s)}function bMe(s){s=s|0,QMe(s+24|0)}function QMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function kMe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,11,l,FMe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function FMe(){return 1852}function RMe(s,l){return s=s|0,l=l|0,NMe(n[(TMe(s)|0)>>2]|0,l)|0}function TMe(s){return s=s|0,(n[(yR()|0)+24>>2]|0)+(s<<3)|0}function NMe(s,l){s=s|0,l=l|0;var c=0,f=0;return c=E,E=E+16|0,f=c,Sg(f,l),l=Pg(f,l)|0,l=sD(Tg[s&31](l)|0)|0,E=c,l|0}function LMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=ER()|0,s=OMe(c)|0,pn(m,l,d,s,MMe(c,f)|0,f)}function ER(){var s=0,l=0;if(o[8056]|0||(K5(10932),ve(67,10932,U|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10932)|0)){s=10932,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));K5(10932)}return 10932}function OMe(s){return s=s|0,s|0}function MMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=ER()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(W5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(UMe(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function W5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function UMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=_Me(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,HMe(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,W5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,jMe(s,d),qMe(d),E=Q;return}}function _Me(s){return s=s|0,536870911}function HMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function jMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function qMe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function K5(s){s=s|0,WMe(s)}function GMe(s){s=s|0,YMe(s+24|0)}function YMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function WMe(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,7,l,KMe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function KMe(){return 1860}function JMe(s,l,c){return s=s|0,l=l|0,c=c|0,zMe(n[(VMe(s)|0)>>2]|0,l,c)|0}function VMe(s){return s=s|0,(n[(ER()|0)+24>>2]|0)+(s<<3)|0}function zMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0;return f=E,E=E+32|0,B=f+12|0,m=f+8|0,Q=f,k=f+16|0,d=f+4|0,XMe(k,l),ZMe(Q,k,l),Bp(d,c),c=vp(d,c)|0,n[B>>2]=n[Q>>2],UC[s&15](m,B,c),c=$Me(m)|0,GA(m),Dp(d),E=f,c|0}function XMe(s,l){s=s|0,l=l|0}function ZMe(s,l,c){s=s|0,l=l|0,c=c|0,e4e(s,c)}function $Me(s){return s=s|0,ma(s)|0}function e4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=E,E=E+16|0,c=d,f=l,f&1?(t4e(c,0),ni(f|0,c|0)|0,r4e(s,c),n4e(c)):n[s>>2]=n[l>>2],E=d}function t4e(s,l){s=s|0,l=l|0,zG(s,l),n[s+4>>2]=0,o[s+8>>0]=0}function r4e(s,l){s=s|0,l=l|0,n[s>>2]=n[l+4>>2]}function n4e(s){s=s|0,o[s+8>>0]=0}function i4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=wR()|0,s=s4e(c)|0,pn(m,l,d,s,o4e(c,f)|0,f)}function wR(){var s=0,l=0;if(o[8064]|0||(V5(10968),ve(68,10968,U|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(Rr(10968)|0)){s=10968,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));V5(10968)}return 10968}function s4e(s){return s=s|0,s|0}function o4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=wR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(J5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(a4e(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function J5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function a4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=l4e(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,c4e(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,J5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,u4e(s,d),A4e(d),E=Q;return}}function l4e(s){return s=s|0,536870911}function c4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function u4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function A4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function V5(s){s=s|0,h4e(s)}function f4e(s){s=s|0,p4e(s+24|0)}function p4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function h4e(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,1,l,g4e()|0,5),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function g4e(){return 1872}function d4e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,y4e(n[(m4e(s)|0)>>2]|0,l,c,f,d,m)}function m4e(s){return s=s|0,(n[(wR()|0)+24>>2]|0)+(s<<3)|0}function y4e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,q=0;B=E,E=E+32|0,Q=B+16|0,k=B+12|0,M=B+8|0,O=B+4|0,q=B,Bp(Q,l),l=vp(Q,l)|0,Bp(k,c),c=vp(k,c)|0,Bp(M,f),f=vp(M,f)|0,Bp(O,d),d=vp(O,d)|0,Bp(q,m),m=vp(q,m)|0,m7[s&1](l,c,f,d,m),Dp(q),Dp(O),Dp(M),Dp(k),Dp(Q),E=B}function E4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=CR()|0,s=w4e(c)|0,pn(m,l,d,s,C4e(c,f)|0,f)}function CR(){var s=0,l=0;if(o[8072]|0||(X5(11004),ve(69,11004,U|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(Rr(11004)|0)){s=11004,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));X5(11004)}return 11004}function w4e(s){return s=s|0,s|0}function C4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,Q=0,k=0;return Q=E,E=E+16|0,d=Q,m=Q+4|0,n[d>>2]=s,k=CR()|0,B=k+24|0,l=hr(l,4)|0,n[m>>2]=l,c=k+28|0,f=n[c>>2]|0,f>>>0<(n[k+32>>2]|0)>>>0?(z5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(I4e(B,d,m),l=n[c>>2]|0),E=Q,(l-(n[B>>2]|0)>>3)+-1|0}function z5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function I4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0;if(Q=E,E=E+32|0,d=Q,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=B4e(s)|0,f>>>0<B>>>0)Vr(s);else{k=n[s>>2]|0,O=(n[s+8>>2]|0)-k|0,M=O>>2,v4e(d,O>>3>>>0<f>>>1>>>0?M>>>0<B>>>0?B:M:f,(n[m>>2]|0)-k>>3,s+8|0),B=d+8|0,z5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,D4e(s,d),S4e(d),E=Q;return}}function B4e(s){return s=s|0,536870911}function v4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function D4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(vr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function S4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&&ht(s)}function X5(s){s=s|0,b4e(s)}function P4e(s){s=s|0,x4e(s+24|0)}function x4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function b4e(s){s=s|0;var l=0;l=Wr()|0,Kr(s,1,12,l,Q4e()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Q4e(){return 1896}function k4e(s,l,c){s=s|0,l=l|0,c=c|0,R4e(n[(F4e(s)|0)>>2]|0,l,c)}function F4e(s){return s=s|0,(n[(CR()|0)+24>>2]|0)+(s<<3)|0}function R4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;f=E,E=E+16|0,m=f+4|0,d=f,T4e(m,l),l=N4e(m,l)|0,Bp(d,c),c=vp(d,c)|0,rf[s&31](l,c),Dp(d),E=f}function T4e(s,l){s=s|0,l=l|0}function N4e(s,l){return s=s|0,l=l|0,L4e(l)|0}function L4e(s){return s=s|0,s|0}function O4e(){var s=0;return o[8080]|0||(Z5(11040),ve(70,11040,U|0)|0,s=8080,n[s>>2]=1,n[s+4>>2]=0),Rr(11040)|0||Z5(11040),11040}function Z5(s){s=s|0,_4e(s),bg(s,71)}function M4e(s){s=s|0,U4e(s+24|0)}function U4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),ht(c))}function _4e(s){s=s|0;var l=0;l=Wr()|0,Kr(s,5,7,l,G4e()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function H4e(s){s=s|0,j4e(s)}function j4e(s){s=s|0,q4e(s)}function q4e(s){s=s|0,o[s+8>>0]=1}function G4e(){return 1936}function Y4e(){return W4e()|0}function W4e(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=E,E=E+16|0,d=l+4|0,B=l,c=Wa(8)|0,s=c,m=s+4|0,n[m>>2]=Kt(1)|0,f=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],K4e(f,m,d),n[c>>2]=f,E=l,s|0}function K4e(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1916,n[c+12>>2]=l,n[s+4>>2]=c}function J4e(s){s=s|0,Vm(s),ht(s)}function V4e(s){s=s|0,s=n[s+12>>2]|0,s|0&&ht(s)}function z4e(s){s=s|0,ht(s)}function X4e(){var s=0;return o[8088]|0||(iUe(11076),ve(25,11076,U|0)|0,s=8088,n[s>>2]=1,n[s+4>>2]=0),11076}function Z4e(s,l){s=s|0,l=l|0,n[s>>2]=$4e()|0,n[s+4>>2]=eUe()|0,n[s+12>>2]=l,n[s+8>>2]=tUe()|0,n[s+32>>2]=10}function $4e(){return 11745}function eUe(){return 1940}function tUe(){return oD()|0}function rUe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(Sp(f,896)|0)==512?c|0&&(nUe(c),ht(c)):l|0&&ht(l)}function nUe(s){s=s|0,s=n[s+4>>2]|0,s|0&&xp(s)}function iUe(s){s=s|0,Ip(s)}function xc(s,l){s=s|0,l=l|0,n[s>>2]=l}function IR(s){return s=s|0,n[s>>2]|0}function sUe(s){return s=s|0,o[n[s>>2]>>0]|0}function oUe(s,l){s=s|0,l=l|0;var c=0,f=0;c=E,E=E+16|0,f=c,n[f>>2]=n[s>>2],aUe(l,f)|0,E=c}function aUe(s,l){s=s|0,l=l|0;var c=0;return c=lUe(n[s>>2]|0,l)|0,l=s+4|0,n[(n[l>>2]|0)+8>>2]=c,n[(n[l>>2]|0)+8>>2]|0}function lUe(s,l){s=s|0,l=l|0;var c=0,f=0;return c=E,E=E+16|0,f=c,Ka(f),s=ma(s)|0,l=cUe(s,n[l>>2]|0)|0,Ja(f),E=c,l|0}function Ka(s){s=s|0,n[s>>2]=n[2701],n[s+4>>2]=n[2703]}function cUe(s,l){s=s|0,l=l|0;var c=0;return c=Dl(uUe()|0)|0,Qn(0,c|0,s|0,gR(l)|0)|0}function Ja(s){s=s|0,H5(n[s>>2]|0,n[s+4>>2]|0)}function uUe(){var s=0;return o[8096]|0||(AUe(11120),s=8096,n[s>>2]=1,n[s+4>>2]=0),11120}function AUe(s){s=s|0,Sl(s,fUe()|0,1)}function fUe(){return 1948}function pUe(){hUe()}function hUe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0,Me=0,Fe=0;if(Me=E,E=E+16|0,O=Me+4|0,q=Me,Ni(65536,10804,n[2702]|0,10812),c=I5()|0,l=n[c>>2]|0,s=n[l>>2]|0,s|0)for(f=n[c+8>>2]|0,c=n[c+4>>2]|0;uc(s|0,u[c>>0]|0|0,o[f>>0]|0),l=l+4|0,s=n[l>>2]|0,s;)f=f+1|0,c=c+1|0;if(s=B5()|0,l=n[s>>2]|0,l|0)do fu(l|0,n[s+4>>2]|0),s=s+8|0,l=n[s>>2]|0;while((l|0)!=0);fu(gUe()|0,5167),M=Gm()|0,s=n[M>>2]|0;e:do if(s|0){do dUe(n[s+4>>2]|0),s=n[s>>2]|0;while((s|0)!=0);if(s=n[M>>2]|0,s|0){k=M;do{for(;d=s,s=n[s>>2]|0,d=n[d+4>>2]|0,!!(mUe(d)|0);)if(n[q>>2]=k,n[O>>2]=n[q>>2],yUe(M,O)|0,!s)break e;if(EUe(d),k=n[k>>2]|0,l=$5(d)|0,m=ji()|0,B=E,E=E+((1*(l<<2)|0)+15&-16)|0,Q=E,E=E+((1*(l<<2)|0)+15&-16)|0,l=n[(N5(d)|0)>>2]|0,l|0)for(c=B,f=Q;n[c>>2]=n[(Ym(n[l+4>>2]|0)|0)>>2],n[f>>2]=n[l+8>>2],l=n[l>>2]|0,l;)c=c+4|0,f=f+4|0;Fe=Ym(d)|0,l=wUe(d)|0,c=$5(d)|0,f=CUe(d)|0,pu(Fe|0,l|0,B|0,Q|0,c|0,f|0,cR(d)|0),Hi(m|0)}while((s|0)!=0)}}while(0);if(s=n[(uR()|0)>>2]|0,s|0)do Fe=s+4|0,M=AR(Fe)|0,d=NC(M)|0,m=RC(M)|0,B=(TC(M)|0)+1|0,Q=AD(M)|0,k=e7(Fe)|0,M=Rr(M)|0,O=lD(Fe)|0,q=BR(Fe)|0,yl(0,d|0,m|0,B|0,Q|0,k|0,M|0,O|0,q|0,vR(Fe)|0),s=n[s>>2]|0;while((s|0)!=0);s=n[(Gm()|0)>>2]|0;e:do if(s|0){t:for(;;){if(l=n[s+4>>2]|0,l|0&&(se=n[(Ym(l)|0)>>2]|0,Ge=n[(L5(l)|0)>>2]|0,Ge|0)){c=Ge;do{l=c+4|0,f=AR(l)|0;r:do if(f|0)switch(Rr(f)|0){case 0:break t;case 4:case 3:case 2:{Q=NC(f)|0,k=RC(f)|0,M=(TC(f)|0)+1|0,O=AD(f)|0,q=Rr(f)|0,Fe=lD(l)|0,yl(se|0,Q|0,k|0,M|0,O|0,0,q|0,Fe|0,BR(l)|0,vR(l)|0);break r}case 1:{B=NC(f)|0,Q=RC(f)|0,k=(TC(f)|0)+1|0,M=AD(f)|0,O=e7(l)|0,q=Rr(f)|0,Fe=lD(l)|0,yl(se|0,B|0,Q|0,k|0,M|0,O|0,q|0,Fe|0,BR(l)|0,vR(l)|0);break r}case 5:{M=NC(f)|0,O=RC(f)|0,q=(TC(f)|0)+1|0,Fe=AD(f)|0,yl(se|0,M|0,O|0,q|0,Fe|0,IUe(f)|0,Rr(f)|0,0,0,0);break r}default:break r}while(0);c=n[c>>2]|0}while((c|0)!=0)}if(s=n[s>>2]|0,!s)break e}Rt()}while(0);Ce(),E=Me}function gUe(){return 11703}function dUe(s){s=s|0,o[s+40>>0]=0}function mUe(s){return s=s|0,(o[s+40>>0]|0)!=0|0}function yUe(s,l){return s=s|0,l=l|0,l=BUe(l)|0,s=n[l>>2]|0,n[l>>2]=n[s>>2],ht(s),n[l>>2]|0}function EUe(s){s=s|0,o[s+40>>0]=1}function $5(s){return s=s|0,n[s+20>>2]|0}function wUe(s){return s=s|0,n[s+8>>2]|0}function CUe(s){return s=s|0,n[s+32>>2]|0}function AD(s){return s=s|0,n[s+4>>2]|0}function e7(s){return s=s|0,n[s+4>>2]|0}function BR(s){return s=s|0,n[s+8>>2]|0}function vR(s){return s=s|0,n[s+16>>2]|0}function IUe(s){return s=s|0,n[s+20>>2]|0}function BUe(s){return s=s|0,n[s>>2]|0}function fD(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0,Me=0,Fe=0,et=0,Xe=0,lt=0,Ue=0,qe=0,Lt=0;Lt=E,E=E+16|0,se=Lt;do if(s>>>0<245){if(M=s>>>0<11?16:s+11&-8,s=M>>>3,q=n[2783]|0,c=q>>>s,c&3|0)return l=(c&1^1)+s|0,s=11172+(l<<1<<2)|0,c=s+8|0,f=n[c>>2]|0,d=f+8|0,m=n[d>>2]|0,(s|0)==(m|0)?n[2783]=q&~(1<<l):(n[m+12>>2]=s,n[c>>2]=m),qe=l<<3,n[f+4>>2]=qe|3,qe=f+qe+4|0,n[qe>>2]=n[qe>>2]|1,qe=d,E=Lt,qe|0;if(O=n[2785]|0,M>>>0>O>>>0){if(c|0)return l=2<<s,l=c<<s&(l|0-l),l=(l&0-l)+-1|0,B=l>>>12&16,l=l>>>B,c=l>>>5&8,l=l>>>c,d=l>>>2&4,l=l>>>d,s=l>>>1&2,l=l>>>s,f=l>>>1&1,f=(c|B|d|s|f)+(l>>>f)|0,l=11172+(f<<1<<2)|0,s=l+8|0,d=n[s>>2]|0,B=d+8|0,c=n[B>>2]|0,(l|0)==(c|0)?(s=q&~(1<<f),n[2783]=s):(n[c+12>>2]=l,n[s>>2]=c,s=q),m=(f<<3)-M|0,n[d+4>>2]=M|3,f=d+M|0,n[f+4>>2]=m|1,n[f+m>>2]=m,O|0&&(d=n[2788]|0,l=O>>>3,c=11172+(l<<1<<2)|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=c),n[2785]=m,n[2788]=f,qe=B,E=Lt,qe|0;if(Q=n[2784]|0,Q){if(c=(Q&0-Q)+-1|0,B=c>>>12&16,c=c>>>B,m=c>>>5&8,c=c>>>m,k=c>>>2&4,c=c>>>k,f=c>>>1&2,c=c>>>f,s=c>>>1&1,s=n[11436+((m|B|k|f|s)+(c>>>s)<<2)>>2]|0,c=(n[s+4>>2]&-8)-M|0,f=n[s+16+(((n[s+16>>2]|0)==0&1)<<2)>>2]|0,!f)k=s,m=c;else{do B=(n[f+4>>2]&-8)-M|0,k=B>>>0<c>>>0,c=k?B:c,s=k?f:s,f=n[f+16+(((n[f+16>>2]|0)==0&1)<<2)>>2]|0;while((f|0)!=0);k=s,m=c}if(B=k+M|0,k>>>0<B>>>0){d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(s=k+20|0,l=n[s>>2]|0,!l&&(s=k+16|0,l=n[s>>2]|0,!l)){c=0;break}for(;;){if(c=l+20|0,f=n[c>>2]|0,f|0){l=f,s=c;continue}if(c=l+16|0,f=n[c>>2]|0,f)l=f,s=c;else break}n[s>>2]=0,c=l}else c=n[k+8>>2]|0,n[c+12>>2]=l,n[l+8>>2]=c,c=l;while(0);do if(d|0){if(l=n[k+28>>2]|0,s=11436+(l<<2)|0,(k|0)==(n[s>>2]|0)){if(n[s>>2]=c,!c){n[2784]=Q&~(1<<l);break}}else if(n[d+16+(((n[d+16>>2]|0)!=(k|0)&1)<<2)>>2]=c,!c)break;n[c+24>>2]=d,l=n[k+16>>2]|0,l|0&&(n[c+16>>2]=l,n[l+24>>2]=c),l=n[k+20>>2]|0,l|0&&(n[c+20>>2]=l,n[l+24>>2]=c)}while(0);return m>>>0<16?(qe=m+M|0,n[k+4>>2]=qe|3,qe=k+qe+4|0,n[qe>>2]=n[qe>>2]|1):(n[k+4>>2]=M|3,n[B+4>>2]=m|1,n[B+m>>2]=m,O|0&&(f=n[2788]|0,l=O>>>3,c=11172+(l<<1<<2)|0,l=1<<l,q&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=q|l,l=c,s=c+8|0),n[s>>2]=f,n[l+12>>2]=f,n[f+8>>2]=l,n[f+12>>2]=c),n[2785]=m,n[2788]=B),qe=k+8|0,E=Lt,qe|0}else q=M}else q=M}else q=M}else if(s>>>0<=4294967231)if(s=s+11|0,M=s&-8,k=n[2784]|0,k){f=0-M|0,s=s>>>8,s?M>>>0>16777215?Q=31:(q=(s+1048320|0)>>>16&8,Ue=s<<q,O=(Ue+520192|0)>>>16&4,Ue=Ue<<O,Q=(Ue+245760|0)>>>16&2,Q=14-(O|q|Q)+(Ue<<Q>>>15)|0,Q=M>>>(Q+7|0)&1|Q<<1):Q=0,c=n[11436+(Q<<2)>>2]|0;e:do if(!c)c=0,s=0,Ue=57;else for(s=0,B=M<<((Q|0)==31?0:25-(Q>>>1)|0),m=0;;){if(d=(n[c+4>>2]&-8)-M|0,d>>>0<f>>>0)if(d)s=c,f=d;else{s=c,f=0,d=c,Ue=61;break e}if(d=n[c+20>>2]|0,c=n[c+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(c|0)?m:d,d=(c|0)==0,d){c=m,Ue=57;break}else B=B<<((d^1)&1)}while(0);if((Ue|0)==57){if((c|0)==0&(s|0)==0){if(s=2<<Q,s=k&(s|0-s),!s){q=M;break}q=(s&0-s)+-1|0,B=q>>>12&16,q=q>>>B,m=q>>>5&8,q=q>>>m,Q=q>>>2&4,q=q>>>Q,O=q>>>1&2,q=q>>>O,c=q>>>1&1,s=0,c=n[11436+((m|B|Q|O|c)+(q>>>c)<<2)>>2]|0}c?(d=c,Ue=61):(Q=s,B=f)}if((Ue|0)==61)for(;;)if(Ue=0,c=(n[d+4>>2]&-8)-M|0,q=c>>>0<f>>>0,c=q?c:f,s=q?d:s,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)f=c,Ue=61;else{Q=s,B=c;break}if((Q|0)!=0&&B>>>0<((n[2785]|0)-M|0)>>>0){if(m=Q+M|0,Q>>>0>=m>>>0)return qe=0,E=Lt,qe|0;d=n[Q+24>>2]|0,l=n[Q+12>>2]|0;do if((l|0)==(Q|0)){if(s=Q+20|0,l=n[s>>2]|0,!l&&(s=Q+16|0,l=n[s>>2]|0,!l)){l=0;break}for(;;){if(c=l+20|0,f=n[c>>2]|0,f|0){l=f,s=c;continue}if(c=l+16|0,f=n[c>>2]|0,f)l=f,s=c;else break}n[s>>2]=0}else qe=n[Q+8>>2]|0,n[qe+12>>2]=l,n[l+8>>2]=qe;while(0);do if(d){if(s=n[Q+28>>2]|0,c=11436+(s<<2)|0,(Q|0)==(n[c>>2]|0)){if(n[c>>2]=l,!l){f=k&~(1<<s),n[2784]=f;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(Q|0)&1)<<2)>>2]=l,!l){f=k;break}n[l+24>>2]=d,s=n[Q+16>>2]|0,s|0&&(n[l+16>>2]=s,n[s+24>>2]=l),s=n[Q+20>>2]|0,s&&(n[l+20>>2]=s,n[s+24>>2]=l),f=k}else f=k;while(0);do if(B>>>0>=16){if(n[Q+4>>2]=M|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=c;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(Ue=(l+1048320|0)>>>16&8,qe=l<<Ue,lt=(qe+520192|0)>>>16&4,qe=qe<<lt,l=(qe+245760|0)>>>16&2,l=14-(lt|Ue|l)+(qe<<l>>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,c=11436+(l<<2)|0,n[m+28>>2]=l,s=m+16|0,n[s+4>>2]=0,n[s>>2]=0,s=1<<l,!(f&s)){n[2784]=f|s,n[c>>2]=m,n[m+24>>2]=c,n[m+12>>2]=m,n[m+8>>2]=m;break}for(s=B<<((l|0)==31?0:25-(l>>>1)|0),c=n[c>>2]|0;;){if((n[c+4>>2]&-8|0)==(B|0)){Ue=97;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{Ue=96;break}}if((Ue|0)==96){n[f>>2]=m,n[m+24>>2]=c,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((Ue|0)==97){Ue=c+8|0,qe=n[Ue>>2]|0,n[qe+12>>2]=m,n[Ue>>2]=m,n[m+8>>2]=qe,n[m+12>>2]=c,n[m+24>>2]=0;break}}else qe=B+M|0,n[Q+4>>2]=qe|3,qe=Q+qe+4|0,n[qe>>2]=n[qe>>2]|1;while(0);return qe=Q+8|0,E=Lt,qe|0}else q=M}else q=M;else q=-1;while(0);if(c=n[2785]|0,c>>>0>=q>>>0)return l=c-q|0,s=n[2788]|0,l>>>0>15?(qe=s+q|0,n[2788]=qe,n[2785]=l,n[qe+4>>2]=l|1,n[qe+l>>2]=l,n[s+4>>2]=q|3):(n[2785]=0,n[2788]=0,n[s+4>>2]=c|3,qe=s+c+4|0,n[qe>>2]=n[qe>>2]|1),qe=s+8|0,E=Lt,qe|0;if(B=n[2786]|0,B>>>0>q>>>0)return lt=B-q|0,n[2786]=lt,qe=n[2789]|0,Ue=qe+q|0,n[2789]=Ue,n[Ue+4>>2]=lt|1,n[qe+4>>2]=q|3,qe=qe+8|0,E=Lt,qe|0;if(n[2901]|0?s=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,s=se&-16^1431655768,n[se>>2]=s,n[2901]=s,s=4096),Q=q+48|0,k=q+47|0,m=s+k|0,d=0-s|0,M=m&d,M>>>0<=q>>>0||(s=n[2893]|0,s|0&&(O=n[2891]|0,se=O+M|0,se>>>0<=O>>>0|se>>>0>s>>>0)))return qe=0,E=Lt,qe|0;e:do if(n[2894]&4)l=0,Ue=133;else{c=n[2789]|0;t:do if(c){for(f=11580;s=n[f>>2]|0,!(s>>>0<=c>>>0&&(Fe=f+4|0,(s+(n[Fe>>2]|0)|0)>>>0>c>>>0));)if(s=n[f+8>>2]|0,s)f=s;else{Ue=118;break t}if(l=m-B&d,l>>>0<2147483647)if(s=bp(l|0)|0,(s|0)==((n[f>>2]|0)+(n[Fe>>2]|0)|0)){if((s|0)!=-1){B=l,m=s,Ue=135;break e}}else f=s,Ue=126;else l=0}else Ue=118;while(0);do if((Ue|0)==118)if(c=bp(0)|0,(c|0)!=-1&&(l=c,Ge=n[2902]|0,Me=Ge+-1|0,l=((Me&l|0)==0?0:(Me+l&0-Ge)-l|0)+M|0,Ge=n[2891]|0,Me=l+Ge|0,l>>>0>q>>>0&l>>>0<2147483647)){if(Fe=n[2893]|0,Fe|0&&Me>>>0<=Ge>>>0|Me>>>0>Fe>>>0){l=0;break}if(s=bp(l|0)|0,(s|0)==(c|0)){B=l,m=c,Ue=135;break e}else f=s,Ue=126}else l=0;while(0);do if((Ue|0)==126){if(c=0-l|0,!(Q>>>0>l>>>0&(l>>>0<2147483647&(f|0)!=-1)))if((f|0)==-1){l=0;break}else{B=l,m=f,Ue=135;break e}if(s=n[2903]|0,s=k-l+s&0-s,s>>>0>=2147483647){B=l,m=f,Ue=135;break e}if((bp(s|0)|0)==-1){bp(c|0)|0,l=0;break}else{B=s+l|0,m=f,Ue=135;break e}}while(0);n[2894]=n[2894]|4,Ue=133}while(0);if((Ue|0)==133&&M>>>0<2147483647&&(lt=bp(M|0)|0,Fe=bp(0)|0,et=Fe-lt|0,Xe=et>>>0>(q+40|0)>>>0,!((lt|0)==-1|Xe^1|lt>>>0<Fe>>>0&((lt|0)!=-1&(Fe|0)!=-1)^1))&&(B=Xe?et:l,m=lt,Ue=135),(Ue|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),k=n[2789]|0;do if(k){for(l=11580;;){if(s=n[l>>2]|0,c=l+4|0,f=n[c>>2]|0,(m|0)==(s+f|0)){Ue=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((Ue|0)==145&&(n[l+12>>2]&8|0)==0&&k>>>0<m>>>0&k>>>0>=s>>>0){n[c>>2]=f+B,qe=k+8|0,qe=(qe&7|0)==0?0:0-qe&7,Ue=k+qe|0,qe=(n[2786]|0)+(B-qe)|0,n[2789]=Ue,n[2786]=qe,n[Ue+4>>2]=qe|1,n[Ue+qe+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),c=m+B|0,l=11580;;){if((n[l>>2]|0)==(c|0)){Ue=153;break}if(s=n[l+8>>2]|0,s)l=s;else break}if((Ue|0)==153&&(n[l+12>>2]&8|0)==0){n[l>>2]=m,O=l+4|0,n[O>>2]=(n[O>>2]|0)+B,O=m+8|0,O=m+((O&7|0)==0?0:0-O&7)|0,l=c+8|0,l=c+((l&7|0)==0?0:0-l&7)|0,M=O+q|0,Q=l-O-q|0,n[O+4>>2]=q|3;do if((l|0)!=(k|0)){if((l|0)==(n[2788]|0)){qe=(n[2785]|0)+Q|0,n[2785]=qe,n[2788]=M,n[M+4>>2]=qe|1,n[M+qe>>2]=qe;break}if(s=n[l+4>>2]|0,(s&3|0)==1){B=s&-8,f=s>>>3;e:do if(s>>>0<256)if(s=n[l+8>>2]|0,c=n[l+12>>2]|0,(c|0)==(s|0)){n[2783]=n[2783]&~(1<<f);break}else{n[s+12>>2]=c,n[c+8>>2]=s;break}else{m=n[l+24>>2]|0,s=n[l+12>>2]|0;do if((s|0)==(l|0)){if(f=l+16|0,c=f+4|0,s=n[c>>2]|0,!s)if(s=n[f>>2]|0,s)c=f;else{s=0;break}for(;;){if(f=s+20|0,d=n[f>>2]|0,d|0){s=d,c=f;continue}if(f=s+16|0,d=n[f>>2]|0,d)s=d,c=f;else break}n[c>>2]=0}else qe=n[l+8>>2]|0,n[qe+12>>2]=s,n[s+8>>2]=qe;while(0);if(!m)break;c=n[l+28>>2]|0,f=11436+(c<<2)|0;do if((l|0)!=(n[f>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=s,!s)break e}else{if(n[f>>2]=s,s|0)break;n[2784]=n[2784]&~(1<<c);break e}while(0);if(n[s+24>>2]=m,c=l+16|0,f=n[c>>2]|0,f|0&&(n[s+16>>2]=f,n[f+24>>2]=s),c=n[c+4>>2]|0,!c)break;n[s+20>>2]=c,n[c+24>>2]=s}while(0);l=l+B|0,d=B+Q|0}else d=Q;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[M+4>>2]=d|1,n[M+d>>2]=d,l=d>>>3,d>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=M,n[l+12>>2]=M,n[M+8>>2]=l,n[M+12>>2]=c;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}Ue=(l+1048320|0)>>>16&8,qe=l<<Ue,lt=(qe+520192|0)>>>16&4,qe=qe<<lt,l=(qe+245760|0)>>>16&2,l=14-(lt|Ue|l)+(qe<<l>>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(0);if(f=11436+(l<<2)|0,n[M+28>>2]=l,s=M+16|0,n[s+4>>2]=0,n[s>>2]=0,s=n[2784]|0,c=1<<l,!(s&c)){n[2784]=s|c,n[f>>2]=M,n[M+24>>2]=f,n[M+12>>2]=M,n[M+8>>2]=M;break}for(s=d<<((l|0)==31?0:25-(l>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(d|0)){Ue=194;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{Ue=193;break}}if((Ue|0)==193){n[f>>2]=M,n[M+24>>2]=c,n[M+12>>2]=M,n[M+8>>2]=M;break}else if((Ue|0)==194){Ue=c+8|0,qe=n[Ue>>2]|0,n[qe+12>>2]=M,n[Ue>>2]=M,n[M+8>>2]=qe,n[M+12>>2]=c,n[M+24>>2]=0;break}}else qe=(n[2786]|0)+Q|0,n[2786]=qe,n[2789]=M,n[M+4>>2]=qe|1;while(0);return qe=O+8|0,E=Lt,qe|0}for(l=11580;s=n[l>>2]|0,!(s>>>0<=k>>>0&&(qe=s+(n[l+4>>2]|0)|0,qe>>>0>k>>>0));)l=n[l+8>>2]|0;d=qe+-47|0,s=d+8|0,s=d+((s&7|0)==0?0:0-s&7)|0,d=k+16|0,s=s>>>0<d>>>0?k:s,l=s+8|0,c=m+8|0,c=(c&7|0)==0?0:0-c&7,Ue=m+c|0,c=B+-40-c|0,n[2789]=Ue,n[2786]=c,n[Ue+4>>2]=c|1,n[Ue+c+4>>2]=40,n[2790]=n[2905],c=s+4|0,n[c>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=s+24|0;do Ue=l,l=l+4|0,n[l>>2]=7;while((Ue+8|0)>>>0<qe>>>0);if((s|0)!=(k|0)){if(m=s-k|0,n[c>>2]=n[c>>2]&-2,n[k+4>>2]=m|1,n[s>>2]=m,l=m>>>3,m>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<<l,s&l?(s=c+8|0,l=n[s>>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=k,n[l+12>>2]=k,n[k+8>>2]=l,n[k+12>>2]=c;break}if(l=m>>>8,l?m>>>0>16777215?c=31:(Ue=(l+1048320|0)>>>16&8,qe=l<<Ue,lt=(qe+520192|0)>>>16&4,qe=qe<<lt,c=(qe+245760|0)>>>16&2,c=14-(lt|Ue|c)+(qe<<c>>>15)|0,c=m>>>(c+7|0)&1|c<<1):c=0,f=11436+(c<<2)|0,n[k+28>>2]=c,n[k+20>>2]=0,n[d>>2]=0,l=n[2784]|0,s=1<<c,!(l&s)){n[2784]=l|s,n[f>>2]=k,n[k+24>>2]=f,n[k+12>>2]=k,n[k+8>>2]=k;break}for(s=m<<((c|0)==31?0:25-(c>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(m|0)){Ue=216;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{Ue=215;break}}if((Ue|0)==215){n[f>>2]=k,n[k+24>>2]=c,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((Ue|0)==216){Ue=c+8|0,qe=n[Ue>>2]|0,n[qe+12>>2]=k,n[Ue>>2]=k,n[k+8>>2]=qe,n[k+12>>2]=c,n[k+24>>2]=0;break}}}else{qe=n[2787]|0,(qe|0)==0|m>>>0<qe>>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do qe=11172+(l<<1<<2)|0,n[qe+12>>2]=qe,n[qe+8>>2]=qe,l=l+1|0;while((l|0)!=32);qe=m+8|0,qe=(qe&7|0)==0?0:0-qe&7,Ue=m+qe|0,qe=B+-40-qe|0,n[2789]=Ue,n[2786]=qe,n[Ue+4>>2]=qe|1,n[Ue+qe+4>>2]=40,n[2790]=n[2905]}while(0);if(l=n[2786]|0,l>>>0>q>>>0)return lt=l-q|0,n[2786]=lt,qe=n[2789]|0,Ue=qe+q|0,n[2789]=Ue,n[Ue+4>>2]=lt|1,n[qe+4>>2]=q|3,qe=qe+8|0,E=Lt,qe|0}return n[(Km()|0)>>2]=12,qe=0,E=Lt,qe|0}function pD(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,Q=0,k=0;if(!!s){c=s+-8|0,d=n[2787]|0,s=n[s+-4>>2]|0,l=s&-8,k=c+l|0;do if(s&1)Q=c,B=c;else{if(f=n[c>>2]|0,!(s&3)||(B=c+(0-f)|0,m=f+l|0,B>>>0<d>>>0))return;if((B|0)==(n[2788]|0)){if(s=k+4|0,l=n[s>>2]|0,(l&3|0)!=3){Q=B,l=m;break}n[2785]=m,n[s>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(c=f>>>3,f>>>0<256)if(s=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(s|0)){n[2783]=n[2783]&~(1<<c),Q=B,l=m;break}else{n[s+12>>2]=l,n[l+8>>2]=s,Q=B,l=m;break}d=n[B+24>>2]|0,s=n[B+12>>2]|0;do if((s|0)==(B|0)){if(c=B+16|0,l=c+4|0,s=n[l>>2]|0,!s)if(s=n[c>>2]|0,s)l=c;else{s=0;break}for(;;){if(c=s+20|0,f=n[c>>2]|0,f|0){s=f,l=c;continue}if(c=s+16|0,f=n[c>>2]|0,f)s=f,l=c;else break}n[l>>2]=0}else Q=n[B+8>>2]|0,n[Q+12>>2]=s,n[s+8>>2]=Q;while(0);if(d){if(l=n[B+28>>2]|0,c=11436+(l<<2)|0,(B|0)==(n[c>>2]|0)){if(n[c>>2]=s,!s){n[2784]=n[2784]&~(1<<l),Q=B,l=m;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(B|0)&1)<<2)>>2]=s,!s){Q=B,l=m;break}n[s+24>>2]=d,l=B+16|0,c=n[l>>2]|0,c|0&&(n[s+16>>2]=c,n[c+24>>2]=s),l=n[l+4>>2]|0,l?(n[s+20>>2]=l,n[l+24>>2]=s,Q=B,l=m):(Q=B,l=m)}else Q=B,l=m}while(0);if(!(B>>>0>=k>>>0)&&(s=k+4|0,f=n[s>>2]|0,!!(f&1))){if(f&2)n[s>>2]=f&-2,n[Q+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(s=n[2788]|0,(k|0)==(n[2789]|0)){if(k=(n[2786]|0)+l|0,n[2786]=k,n[2789]=Q,n[Q+4>>2]=k|1,(Q|0)!=(s|0))return;n[2788]=0,n[2785]=0;return}if((k|0)==(s|0)){k=(n[2785]|0)+l|0,n[2785]=k,n[2788]=B,n[Q+4>>2]=k|1,n[B+k>>2]=k;return}d=(f&-8)+l|0,c=f>>>3;do if(f>>>0<256)if(l=n[k+8>>2]|0,s=n[k+12>>2]|0,(s|0)==(l|0)){n[2783]=n[2783]&~(1<<c);break}else{n[l+12>>2]=s,n[s+8>>2]=l;break}else{m=n[k+24>>2]|0,s=n[k+12>>2]|0;do if((s|0)==(k|0)){if(c=k+16|0,l=c+4|0,s=n[l>>2]|0,!s)if(s=n[c>>2]|0,s)l=c;else{c=0;break}for(;;){if(c=s+20|0,f=n[c>>2]|0,f|0){s=f,l=c;continue}if(c=s+16|0,f=n[c>>2]|0,f)s=f,l=c;else break}n[l>>2]=0,c=s}else c=n[k+8>>2]|0,n[c+12>>2]=s,n[s+8>>2]=c,c=s;while(0);if(m|0){if(s=n[k+28>>2]|0,l=11436+(s<<2)|0,(k|0)==(n[l>>2]|0)){if(n[l>>2]=c,!c){n[2784]=n[2784]&~(1<<s);break}}else if(n[m+16+(((n[m+16>>2]|0)!=(k|0)&1)<<2)>>2]=c,!c)break;n[c+24>>2]=m,s=k+16|0,l=n[s>>2]|0,l|0&&(n[c+16>>2]=l,n[l+24>>2]=c),s=n[s+4>>2]|0,s|0&&(n[c+20>>2]=s,n[s+24>>2]=c)}}while(0);if(n[Q+4>>2]=d|1,n[B+d>>2]=d,(Q|0)==(n[2788]|0)){n[2785]=d;return}}if(s=d>>>3,d>>>0<256){c=11172+(s<<1<<2)|0,l=n[2783]|0,s=1<<s,l&s?(l=c+8|0,s=n[l>>2]|0):(n[2783]=l|s,s=c,l=c+8|0),n[l>>2]=Q,n[s+12>>2]=Q,n[Q+8>>2]=s,n[Q+12>>2]=c;return}s=d>>>8,s?d>>>0>16777215?s=31:(B=(s+1048320|0)>>>16&8,k=s<<B,m=(k+520192|0)>>>16&4,k=k<<m,s=(k+245760|0)>>>16&2,s=14-(m|B|s)+(k<<s>>>15)|0,s=d>>>(s+7|0)&1|s<<1):s=0,f=11436+(s<<2)|0,n[Q+28>>2]=s,n[Q+20>>2]=0,n[Q+16>>2]=0,l=n[2784]|0,c=1<<s;do if(l&c){for(l=d<<((s|0)==31?0:25-(s>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(d|0)){s=73;break}if(f=c+16+(l>>>31<<2)|0,s=n[f>>2]|0,s)l=l<<1,c=s;else{s=72;break}}if((s|0)==72){n[f>>2]=Q,n[Q+24>>2]=c,n[Q+12>>2]=Q,n[Q+8>>2]=Q;break}else if((s|0)==73){B=c+8|0,k=n[B>>2]|0,n[k+12>>2]=Q,n[B>>2]=Q,n[Q+8>>2]=k,n[Q+12>>2]=c,n[Q+24>>2]=0;break}}else n[2784]=l|c,n[f>>2]=Q,n[Q+24>>2]=f,n[Q+12>>2]=Q,n[Q+8>>2]=Q;while(0);if(k=(n[2791]|0)+-1|0,n[2791]=k,!k)s=11588;else return;for(;s=n[s>>2]|0,s;)s=s+8|0;n[2791]=-1}}}function vUe(){return 11628}function DUe(s){s=s|0;var l=0,c=0;return l=E,E=E+16|0,c=l,n[c>>2]=xUe(n[s+60>>2]|0)|0,s=hD(hc(6,c|0)|0)|0,E=l,s|0}function t7(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0;q=E,E=E+48|0,M=q+16|0,m=q,d=q+32|0,Q=s+28|0,f=n[Q>>2]|0,n[d>>2]=f,k=s+20|0,f=(n[k>>2]|0)-f|0,n[d+4>>2]=f,n[d+8>>2]=l,n[d+12>>2]=c,f=f+c|0,B=s+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=hD(Oi(146,m|0)|0)|0;e:do if((f|0)!=(m|0)){for(l=2;!((m|0)<0);)if(f=f-m|0,Ge=n[d+4>>2]|0,se=m>>>0>Ge>>>0,d=se?d+8|0:d,l=(se<<31>>31)+l|0,Ge=m-(se?Ge:0)|0,n[d>>2]=(n[d>>2]|0)+Ge,se=d+4|0,n[se>>2]=(n[se>>2]|0)-Ge,n[M>>2]=n[B>>2],n[M+4>>2]=d,n[M+8>>2]=l,m=hD(Oi(146,M|0)|0)|0,(f|0)==(m|0)){O=3;break e}n[s+16>>2]=0,n[Q>>2]=0,n[k>>2]=0,n[s>>2]=n[s>>2]|32,(l|0)==2?c=0:c=c-(n[d+4>>2]|0)|0}else O=3;while(0);return(O|0)==3&&(Ge=n[s+44>>2]|0,n[s+16>>2]=Ge+(n[s+48>>2]|0),n[Q>>2]=Ge,n[k>>2]=Ge),E=q,c|0}function SUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return d=E,E=E+32|0,m=d,f=d+20|0,n[m>>2]=n[s+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=f,n[m+16>>2]=c,(hD(oa(140,m|0)|0)|0)<0?(n[f>>2]=-1,s=-1):s=n[f>>2]|0,E=d,s|0}function hD(s){return s=s|0,s>>>0>4294963200&&(n[(Km()|0)>>2]=0-s,s=-1),s|0}function Km(){return(PUe()|0)+64|0}function PUe(){return DR()|0}function DR(){return 2084}function xUe(s){return s=s|0,s|0}function bUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;return d=E,E=E+32|0,f=d,n[s+36>>2]=1,(n[s>>2]&64|0)==0&&(n[f>>2]=n[s+60>>2],n[f+4>>2]=21523,n[f+8>>2]=d+16,hu(54,f|0)|0)&&(o[s+75>>0]=-1),f=t7(s,l,c)|0,E=d,f|0}function r7(s,l){s=s|0,l=l|0;var c=0,f=0;if(c=o[s>>0]|0,f=o[l>>0]|0,c<<24>>24==0||c<<24>>24!=f<<24>>24)s=f;else{do s=s+1|0,l=l+1|0,c=o[s>>0]|0,f=o[l>>0]|0;while(!(c<<24>>24==0||c<<24>>24!=f<<24>>24));s=f}return(c&255)-(s&255)|0}function QUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;e:do if(!c)s=0;else{for(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,B=0,m=0,O=0;e:for(;;){do if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(Km()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(0);if(B=o[l>>0]|0,B<<24>>24)Q=l;else{Xe=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=Q,Xe=9;break t}case 0:{B=Q;break t}default:}et=Q+1|0,n[sr>>2]=et,B=o[et>>0]|0,Q=et}t:do if((Xe|0)==9)for(;;){if(Xe=0,(o[Q+1>>0]|0)!=37)break t;if(B=B+1|0,Q=Q+2|0,n[sr>>2]=Q,(o[Q>>0]|0)==37)Xe=9;else break}while(0);if(B=B-l|0,lt&&is(s,l,B),B|0){l=Q;continue}k=Q+1|0,B=(o[k>>0]|0)+-48|0,B>>>0<10?(et=(o[Q+2>>0]|0)==36,Fe=et?B:-1,O=et?1:O,k=et?Q+3|0:k):Fe=-1,n[sr>>2]=k,B=o[k>>0]|0,Q=(B<<24>>24)+-32|0;t:do if(Q>>>0<32)for(M=0,q=B;;){if(B=1<<Q,!(B&75913)){B=q;break t}if(M=B|M,k=k+1|0,n[sr>>2]=k,B=o[k>>0]|0,Q=(B<<24>>24)+-32|0,Q>>>0>=32)break;q=B}else M=0;while(0);if(B<<24>>24==42){if(Q=k+1|0,B=(o[Q>>0]|0)+-48|0,B>>>0<10&&(o[k+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[f+((o[Q>>0]|0)+-48<<3)>>2]|0,O=1,k=k+3|0;else{if(O|0){m=-1;break}lt?(O=(n[c>>2]|0)+(4-1)&~(4-1),B=n[O>>2]|0,n[c>>2]=O+4,O=0,k=Q):(B=0,O=0,k=Q)}n[sr>>2]=k,et=(B|0)<0,B=et?0-B|0:B,M=et?M|8192:M}else{if(B=i7(sr)|0,(B|0)<0){m=-1;break}k=n[sr>>2]|0}do if((o[k>>0]|0)==46){if((o[k+1>>0]|0)!=42){n[sr>>2]=k+1,Q=i7(sr)|0,k=n[sr>>2]|0;break}if(q=k+2|0,Q=(o[q>>0]|0)+-48|0,Q>>>0<10&&(o[k+3>>0]|0)==36){n[d+(Q<<2)>>2]=10,Q=n[f+((o[q>>0]|0)+-48<<3)>>2]|0,k=k+4|0,n[sr>>2]=k;break}if(O|0){m=-1;break e}lt?(et=(n[c>>2]|0)+(4-1)&~(4-1),Q=n[et>>2]|0,n[c>>2]=et+4):Q=0,n[sr>>2]=q,k=q}else Q=-1;while(0);for(Me=0;;){if(((o[k>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(et=k+1|0,n[sr>>2]=et,q=o[(o[k>>0]|0)+-65+(5178+(Me*58|0))>>0]|0,se=q&255,(se+-1|0)>>>0<8)Me=se,k=et;else break}if(!(q<<24>>24)){m=-1;break}Ge=(Fe|0)>-1;do if(q<<24>>24==19)if(Ge){m=-1;break e}else Xe=49;else{if(Ge){n[d+(Fe<<2)>>2]=se,Ge=f+(Fe<<3)|0,Fe=n[Ge+4>>2]|0,Xe=Xt,n[Xe>>2]=n[Ge>>2],n[Xe+4>>2]=Fe,Xe=49;break}if(!lt){m=0;break e}s7(Xt,se,c)}while(0);if((Xe|0)==49&&(Xe=0,!lt)){B=0,l=et;continue}k=o[k>>0]|0,k=(Me|0)!=0&(k&15|0)==3?k&-33:k,Ge=M&-65537,Fe=(M&8192|0)==0?M:Ge;t:do switch(k|0){case 110:switch((Me&255)<<24>>24){case 0:{n[n[Xt>>2]>>2]=m,B=0,l=et;continue e}case 1:{n[n[Xt>>2]>>2]=m,B=0,l=et;continue e}case 2:{B=n[Xt>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=et;continue e}case 3:{a[n[Xt>>2]>>1]=m,B=0,l=et;continue e}case 4:{o[n[Xt>>2]>>0]=m,B=0,l=et;continue e}case 6:{n[n[Xt>>2]>>2]=m,B=0,l=et;continue e}case 7:{B=n[Xt>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=et;continue e}default:{B=0,l=et;continue e}}case 112:{k=120,Q=Q>>>0>8?Q:8,l=Fe|8,Xe=61;break}case 88:case 120:{l=Fe,Xe=61;break}case 111:{k=Xt,l=n[k>>2]|0,k=n[k+4>>2]|0,se=TUe(l,k,Ue)|0,Ge=qe-se|0,M=0,q=5642,Q=(Fe&8|0)==0|(Q|0)>(Ge|0)?Q:Ge+1|0,Ge=Fe,Xe=67;break}case 105:case 100:if(k=Xt,l=n[k>>2]|0,k=n[k+4>>2]|0,(k|0)<0){l=gD(0,0,l|0,k|0)|0,k=Se,M=Xt,n[M>>2]=l,n[M+4>>2]=k,M=1,q=5642,Xe=66;break t}else{M=(Fe&2049|0)!=0&1,q=(Fe&2048|0)==0?(Fe&1|0)==0?5642:5644:5643,Xe=66;break t}case 117:{k=Xt,M=0,q=5642,l=n[k>>2]|0,k=n[k+4>>2]|0,Xe=66;break}case 99:{o[Lt>>0]=n[Xt>>2],l=Lt,M=0,q=5642,se=Ue,k=1,Q=Ge;break}case 109:{k=NUe(n[(Km()|0)>>2]|0)|0,Xe=71;break}case 115:{k=n[Xt>>2]|0,k=k|0?k:5652,Xe=71;break}case 67:{n[Dr>>2]=n[Xt>>2],n[Or>>2]=0,n[Xt>>2]=Dr,se=-1,k=Dr,Xe=75;break}case 83:{l=n[Xt>>2]|0,Q?(se=Q,k=l,Xe=75):(vs(s,32,B,0,Fe),l=0,Xe=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=OUe(s,+w[Xt>>3],B,Q,Fe,k)|0,l=et;continue e}default:M=0,q=5642,se=Ue,k=Q,Q=Fe}while(0);t:do if((Xe|0)==61)Fe=Xt,Me=n[Fe>>2]|0,Fe=n[Fe+4>>2]|0,se=RUe(Me,Fe,Ue,k&32)|0,q=(l&8|0)==0|(Me|0)==0&(Fe|0)==0,M=q?0:2,q=q?5642:5642+(k>>4)|0,Ge=l,l=Me,k=Fe,Xe=67;else if((Xe|0)==66)se=Jm(l,k,Ue)|0,Ge=Fe,Xe=67;else if((Xe|0)==71)Xe=0,Fe=LUe(k,0,Q)|0,Me=(Fe|0)==0,l=k,M=0,q=5642,se=Me?k+Q|0:Fe,k=Me?Q:Fe-k|0,Q=Ge;else if((Xe|0)==75){for(Xe=0,q=k,l=0,Q=0;M=n[q>>2]|0,!(!M||(Q=o7(Tr,M)|0,(Q|0)<0|Q>>>0>(se-l|0)>>>0));)if(l=Q+l|0,se>>>0>l>>>0)q=q+4|0;else break;if((Q|0)<0){m=-1;break e}if(vs(s,32,B,l,Fe),!l)l=0,Xe=84;else for(M=0;;){if(Q=n[k>>2]|0,!Q){Xe=84;break t}if(Q=o7(Tr,Q)|0,M=Q+M|0,(M|0)>(l|0)){Xe=84;break t}if(is(s,Tr,Q),M>>>0>=l>>>0){Xe=84;break}else k=k+4|0}}while(0);if((Xe|0)==67)Xe=0,k=(l|0)!=0|(k|0)!=0,Fe=(Q|0)!=0|k,k=((k^1)&1)+(qe-se)|0,l=Fe?se:Ue,se=Ue,k=Fe?(Q|0)>(k|0)?Q:k:Q,Q=(Q|0)>-1?Ge&-65537:Ge;else if((Xe|0)==84){Xe=0,vs(s,32,B,l,Fe^8192),B=(B|0)>(l|0)?B:l,l=et;continue}Me=se-l|0,Ge=(k|0)<(Me|0)?Me:k,Fe=Ge+M|0,B=(B|0)<(Fe|0)?Fe:B,vs(s,32,B,Fe,Q),is(s,q,M),vs(s,48,B,Fe,Q^65536),vs(s,48,Ge,Me,0),is(s,l,Me),vs(s,32,B,Fe,Q^8192),l=et}e:do if((Xe|0)==87&&!s)if(!O)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(s7(f+(m<<3)|0,l,c),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(0);return E=nr,m|0}function kUe(s){return s=s|0,0}function FUe(s){s=s|0}function is(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]&32||WUe(l,c,s)|0}function i7(s){s=s|0;var l=0,c=0,f=0;if(c=n[s>>2]|0,f=(o[c>>0]|0)+-48|0,f>>>0<10){l=0;do l=f+(l*10|0)|0,c=c+1|0,n[s>>2]=c,f=(o[c>>0]|0)+-48|0;while(f>>>0<10)}else l=0;return l|0}function s7(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,n[s>>2]=l;break e}case 10:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,f=s,n[f>>2]=l,n[f+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,f=s,n[f>>2]=l,n[f+4>>2]=0;break e}case 12:{f=(n[c>>2]|0)+(8-1)&~(8-1),l=f,d=n[l>>2]|0,l=n[l+4>>2]|0,n[c>>2]=f+8,f=s,n[f>>2]=d,n[f+4>>2]=l;break e}case 13:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,f=(f&65535)<<16>>16,d=s,n[d>>2]=f,n[d+4>>2]=((f|0)<0)<<31>>31;break e}case 14:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,d=s,n[d>>2]=f&65535,n[d+4>>2]=0;break e}case 15:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,f=(f&255)<<24>>24,d=s,n[d>>2]=f,n[d+4>>2]=((f|0)<0)<<31>>31;break e}case 16:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,d=s,n[d>>2]=f&255,n[d+4>>2]=0;break e}case 17:{d=(n[c>>2]|0)+(8-1)&~(8-1),m=+w[d>>3],n[c>>2]=d+8,w[s>>3]=m;break e}case 18:{d=(n[c>>2]|0)+(8-1)&~(8-1),m=+w[d>>3],n[c>>2]=d+8,w[s>>3]=m;break e}default:break e}while(0);while(0)}function RUe(s,l,c,f){if(s=s|0,l=l|0,c=c|0,f=f|0,!((s|0)==0&(l|0)==0))do c=c+-1|0,o[c>>0]=u[5694+(s&15)>>0]|0|f,s=dD(s|0,l|0,4)|0,l=Se;while(!((s|0)==0&(l|0)==0));return c|0}function TUe(s,l,c){if(s=s|0,l=l|0,c=c|0,!((s|0)==0&(l|0)==0))do c=c+-1|0,o[c>>0]=s&7|48,s=dD(s|0,l|0,3)|0,l=Se;while(!((s|0)==0&(l|0)==0));return c|0}function Jm(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;if(l>>>0>0|(l|0)==0&s>>>0>4294967295){for(;f=QR(s|0,l|0,10,0)|0,c=c+-1|0,o[c>>0]=f&255|48,f=s,s=bR(s|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&f>>>0>4294967295;)l=Se;l=s}else l=s;if(l)for(;c=c+-1|0,o[c>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return c|0}function NUe(s){return s=s|0,jUe(s,n[(HUe()|0)+188>>2]|0)|0}function LUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;m=l&255,f=(c|0)!=0;e:do if(f&(s&3|0)!=0)for(d=l&255;;){if((o[s>>0]|0)==d<<24>>24){B=6;break e}if(s=s+1|0,c=c+-1|0,f=(c|0)!=0,!(f&(s&3|0)!=0)){B=5;break}}else B=5;while(0);(B|0)==5&&(f?B=6:c=0);e:do if((B|0)==6&&(d=l&255,(o[s>>0]|0)!=d<<24>>24)){f=je(m,16843009)|0;t:do if(c>>>0>3){for(;m=n[s>>2]^f,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(s=s+4|0,c=c+-4|0,c>>>0<=3){B=11;break t}}else B=11;while(0);if((B|0)==11&&!c){c=0;break}for(;;){if((o[s>>0]|0)==d<<24>>24)break e;if(s=s+1|0,c=c+-1|0,!c){c=0;break}}}while(0);return(c|0?s:0)|0}function vs(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0;if(B=E,E=E+256|0,m=B,(c|0)>(f|0)&(d&73728|0)==0){if(d=c-f|0,zm(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=c-f|0;do is(s,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}is(s,m,d)}E=B}function o7(s,l){return s=s|0,l=l|0,s?s=UUe(s,l,0)|0:s=0,s|0}function OUe(s,l,c,f,d,m){s=s|0,l=+l,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0,Me=0,Fe=0,et=0,Xe=0,lt=0,Ue=0,qe=0,Lt=0,Or=0,sr=0,Xt=0,Dr=0,Tr=0,nr=0,xn=0;xn=E,E=E+560|0,k=xn+8|0,et=xn,nr=xn+524|0,Tr=nr,M=xn+512|0,n[et>>2]=0,Dr=M+12|0,a7(l)|0,(Se|0)<0?(l=-l,sr=1,Or=5659):(sr=(d&2049|0)!=0&1,Or=(d&2048|0)==0?(d&1|0)==0?5660:5665:5662),a7(l)|0,Xt=Se&2146435072;do if(Xt>>>0<2146435072|(Xt|0)==2146435072&0<0){if(Ge=+MUe(l,et)*2,B=Ge!=0,B&&(n[et>>2]=(n[et>>2]|0)+-1),lt=m|32,(lt|0)==97){Me=m&32,se=(Me|0)==0?Or:Or+9|0,q=sr|2,B=12-f|0;do if(f>>>0>11|(B|0)==0)l=Ge;else{l=8;do B=B+-1|0,l=l*16;while((B|0)!=0);if((o[se>>0]|0)==45){l=-(l+(-Ge-l));break}else{l=Ge+l-l;break}}while(0);Q=n[et>>2]|0,B=(Q|0)<0?0-Q|0:Q,B=Jm(B,((B|0)<0)<<31>>31,Dr)|0,(B|0)==(Dr|0)&&(B=M+11|0,o[B>>0]=48),o[B+-1>>0]=(Q>>31&2)+43,O=B+-2|0,o[O>>0]=m+15,M=(f|0)<1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n[k>>2]=se,M=B,B=k+4|0):(M=B,B=k)}else M=(n[M>>2]|0)==0?M+4|0:M,B=k;k=Fe?Xt:M,k=(B-k>>2|0)>(f|0)?k+(f<<2)|0:B,B=(n[et>>2]|0)+Me|0,n[et>>2]=B}while((B|0)<0);B=M,f=k}else B=M,f=k;if(qe=Xt,B>>>0<f>>>0){if(k=(qe-B>>2)*9|0,O=n[B>>2]|0,O>>>0>=10){M=10;do M=M*10|0,k=k+1|0;while(O>>>0>=M>>>0)}}else k=0;if(Fe=(lt|0)==103,Xe=(Q|0)!=0,M=Q-((lt|0)!=102?k:0)+((Xe&Fe)<<31>>31)|0,(M|0)<(((f-qe>>2)*9|0)+-9|0)){if(M=M+9216|0,Me=Xt+4+(((M|0)/9|0)+-1024<<2)|0,M=((M|0)%9|0)+1|0,(M|0)<9){O=10;do O=O*10|0,M=M+1|0;while((M|0)!=9)}else O=10;if(q=n[Me>>2]|0,se=(q>>>0)%(O>>>0)|0,M=(Me+4|0)==(f|0),M&(se|0)==0)M=Me;else if(Ge=(((q>>>0)/(O>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,Ue=(O|0)/2|0,l=se>>>0<Ue>>>0?.5:M&(se|0)==(Ue|0)?1:1.5,sr&&(Ue=(o[Or>>0]|0)==45,l=Ue?-l:l,Ge=Ue?-Ge:Ge),M=q-se|0,n[Me>>2]=M,Ge+l!=Ge){if(Ue=M+O|0,n[Me>>2]=Ue,Ue>>>0>999999999)for(k=Me;M=k+-4|0,n[k>>2]=0,M>>>0<B>>>0&&(B=B+-4|0,n[B>>2]=0),Ue=(n[M>>2]|0)+1|0,n[M>>2]=Ue,Ue>>>0>999999999;)k=M;else M=Me;if(k=(qe-B>>2)*9|0,q=n[B>>2]|0,q>>>0>=10){O=10;do O=O*10|0,k=k+1|0;while(q>>>0>=O>>>0)}}else M=Me;M=M+4|0,M=f>>>0>M>>>0?M:f,Ue=B}else M=f,Ue=B;for(lt=M;;){if(lt>>>0<=Ue>>>0){et=0;break}if(B=lt+-4|0,!(n[B>>2]|0))lt=B;else{et=1;break}}f=0-k|0;do if(Fe)if(B=((Xe^1)&1)+Q|0,(B|0)>(k|0)&(k|0)>-5?(O=m+-1|0,Q=B+-1-k|0):(O=m+-2|0,Q=B+-1|0),B=d&8,B)Me=B;else{if(et&&(Lt=n[lt+-4>>2]|0,(Lt|0)!=0))if((Lt>>>0)%10|0)M=0;else{M=0,B=10;do B=B*10|0,M=M+1|0;while(!((Lt>>>0)%(B>>>0)|0|0))}else M=9;if(B=((lt-qe>>2)*9|0)+-9|0,(O|32|0)==102){Me=B-M|0,Me=(Me|0)>0?Me:0,Q=(Q|0)<(Me|0)?Q:Me,Me=0;break}else{Me=B+k-M|0,Me=(Me|0)>0?Me:0,Q=(Q|0)<(Me|0)?Q:Me,Me=0;break}}else O=m,Me=d&8;while(0);if(Fe=Q|Me,q=(Fe|0)!=0&1,se=(O|32|0)==102,se)Xe=0,B=(k|0)>0?k:0;else{if(B=(k|0)<0?f:k,B=Jm(B,((B|0)<0)<<31>>31,Dr)|0,M=Dr,(M-B|0)<2)do B=B+-1|0,o[B>>0]=48;while((M-B|0)<2);o[B+-1>>0]=(k>>31&2)+43,B=B+-2|0,o[B>>0]=O,Xe=B,B=M-B|0}if(B=sr+1+Q+q+B|0,vs(s,32,c,B,d),is(s,Or,sr),vs(s,48,c,B,d^65536),se){O=Ue>>>0>Xt>>>0?Xt:Ue,Me=nr+9|0,q=Me,se=nr+8|0,M=O;do{if(k=Jm(n[M>>2]|0,0,Me)|0,(M|0)==(O|0))(k|0)==(Me|0)&&(o[se>>0]=48,k=se);else if(k>>>0>nr>>>0){zm(nr|0,48,k-Tr|0)|0;do k=k+-1|0;while(k>>>0>nr>>>0)}is(s,k,q-k|0),M=M+4|0}while(M>>>0<=Xt>>>0);if(Fe|0&&is(s,5710,1),M>>>0<lt>>>0&(Q|0)>0)for(;;){if(k=Jm(n[M>>2]|0,0,Me)|0,k>>>0>nr>>>0){zm(nr|0,48,k-Tr|0)|0;do k=k+-1|0;while(k>>>0>nr>>>0)}if(is(s,k,(Q|0)<9?Q:9),M=M+4|0,k=Q+-9|0,M>>>0<lt>>>0&(Q|0)>9)Q=k;else{Q=k;break}}vs(s,48,Q+9|0,9,0)}else{if(Fe=et?lt:Ue+4|0,(Q|0)>-1){et=nr+9|0,Me=(Me|0)==0,f=et,q=0-Tr|0,se=nr+8|0,O=Ue;do{k=Jm(n[O>>2]|0,0,et)|0,(k|0)==(et|0)&&(o[se>>0]=48,k=se);do if((O|0)==(Ue|0)){if(M=k+1|0,is(s,k,1),Me&(Q|0)<1){k=M;break}is(s,5710,1),k=M}else{if(k>>>0<=nr>>>0)break;zm(nr|0,48,k+q|0)|0;do k=k+-1|0;while(k>>>0>nr>>>0)}while(0);Tr=f-k|0,is(s,k,(Q|0)>(Tr|0)?Tr:Q),Q=Q-Tr|0,O=O+4|0}while(O>>>0<Fe>>>0&(Q|0)>-1)}vs(s,48,Q+18|0,18,0),is(s,Xe,Dr-Xe|0)}vs(s,32,c,B,d^8192)}else nr=(m&32|0)!=0,B=sr+3|0,vs(s,32,c,B,d&-65537),is(s,Or,sr),is(s,l!=l|!1?nr?5686:5690:nr?5678:5682,3),vs(s,32,c,B,d^8192);while(0);return E=xn,((B|0)<(c|0)?c:B)|0}function a7(s){s=+s;var l=0;return w[v>>3]=s,l=n[v>>2]|0,Se=n[v+4>>2]|0,l|0}function MUe(s,l){return s=+s,l=l|0,+ +l7(s,l)}function l7(s,l){s=+s,l=l|0;var c=0,f=0,d=0;switch(w[v>>3]=s,c=n[v>>2]|0,f=n[v+4>>2]|0,d=dD(c|0,f|0,52)|0,d&2047){case 0:{s!=0?(s=+l7(s*18446744073709552e3,l),c=(n[l>>2]|0)+-64|0):c=0,n[l>>2]=c;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[v>>2]=c,n[v+4>>2]=f&-2146435073|1071644672,s=+w[v>>3]}return+s}function UUe(s,l,c){s=s|0,l=l|0,c=c|0;do if(s){if(l>>>0<128){o[s>>0]=l,s=1;break}if(!(n[n[(_Ue()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){o[s>>0]=l,s=1;break}else{n[(Km()|0)>>2]=84,s=-1;break}if(l>>>0<2048){o[s>>0]=l>>>6|192,o[s+1>>0]=l&63|128,s=2;break}if(l>>>0<55296|(l&-8192|0)==57344){o[s>>0]=l>>>12|224,o[s+1>>0]=l>>>6&63|128,o[s+2>>0]=l&63|128,s=3;break}if((l+-65536|0)>>>0<1048576){o[s>>0]=l>>>18|240,o[s+1>>0]=l>>>12&63|128,o[s+2>>0]=l>>>6&63|128,o[s+3>>0]=l&63|128,s=4;break}else{n[(Km()|0)>>2]=84,s=-1;break}}else s=1;while(0);return s|0}function _Ue(){return DR()|0}function HUe(){return DR()|0}function jUe(s,l){s=s|0,l=l|0;var c=0,f=0;for(f=0;;){if((u[5712+f>>0]|0)==(s|0)){s=2;break}if(c=f+1|0,(c|0)==87){c=5800,f=87,s=5;break}else f=c}if((s|0)==2&&(f?(c=5800,s=5):c=5800),(s|0)==5)for(;;){do s=c,c=c+1|0;while((o[s>>0]|0)!=0);if(f=f+-1|0,f)s=5;else break}return qUe(c,n[l+20>>2]|0)|0}function qUe(s,l){return s=s|0,l=l|0,GUe(s,l)|0}function GUe(s,l){return s=s|0,l=l|0,l?l=YUe(n[l>>2]|0,n[l+4>>2]|0,s)|0:l=0,(l|0?l:s)|0}function YUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0;se=(n[s>>2]|0)+1794895138|0,m=kg(n[s+8>>2]|0,se)|0,f=kg(n[s+12>>2]|0,se)|0,d=kg(n[s+16>>2]|0,se)|0;e:do if(m>>>0<l>>>2>>>0&&(q=l-(m<<2)|0,f>>>0<q>>>0&d>>>0<q>>>0)&&((d|f)&3|0)==0){for(q=f>>>2,O=d>>>2,M=0;;){if(Q=m>>>1,k=M+Q|0,B=k<<1,d=B+q|0,f=kg(n[s+(d<<2)>>2]|0,se)|0,d=kg(n[s+(d+1<<2)>>2]|0,se)|0,!(d>>>0<l>>>0&f>>>0<(l-d|0)>>>0)){f=0;break e}if(o[s+(d+f)>>0]|0){f=0;break e}if(f=r7(c,s+d|0)|0,!f)break;if(f=(f|0)<0,(m|0)==1){f=0;break e}else M=f?M:k,m=f?Q:m-Q|0}f=B+O|0,d=kg(n[s+(f<<2)>>2]|0,se)|0,f=kg(n[s+(f+1<<2)>>2]|0,se)|0,f>>>0<l>>>0&d>>>0<(l-f|0)>>>0?f=(o[s+(f+d)>>0]|0)==0?s+f|0:0:f=0}else f=0;while(0);return f|0}function kg(s,l){s=s|0,l=l|0;var c=0;return c=d7(s|0)|0,((l|0)==0?s:c)|0}function WUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,Q=0;f=c+16|0,d=n[f>>2]|0,d?m=5:KUe(c)|0?f=0:(d=n[f>>2]|0,m=5);e:do if((m|0)==5){if(Q=c+20|0,B=n[Q>>2]|0,f=B,(d-B|0)>>>0<l>>>0){f=yD[n[c+36>>2]&7](c,s,l)|0;break}t:do if((o[c+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=s;break t}if(d=B+-1|0,(o[s+d>>0]|0)==10)break;B=d}if(f=yD[n[c+36>>2]&7](c,s,B)|0,f>>>0<B>>>0)break e;m=B,d=s+B|0,l=l-B|0,f=n[Q>>2]|0}else m=0,d=s;while(0);vr(f|0,d|0,l|0)|0,n[Q>>2]=(n[Q>>2]|0)+l,f=m+l|0}while(0);return f|0}function KUe(s){s=s|0;var l=0,c=0;return l=s+74|0,c=o[l>>0]|0,o[l>>0]=c+255|c,l=n[s>>2]|0,l&8?(n[s>>2]=l|32,s=-1):(n[s+8>>2]=0,n[s+4>>2]=0,c=n[s+44>>2]|0,n[s+28>>2]=c,n[s+20>>2]=c,n[s+16>>2]=c+(n[s+48>>2]|0),s=0),s|0}function Un(s,l){s=y(s),l=y(l);var c=0,f=0;c=c7(s)|0;do if((c&2147483647)>>>0<=2139095040){if(f=c7(l)|0,(f&2147483647)>>>0<=2139095040)if((f^c|0)<0){s=(c|0)<0?l:s;break}else{s=s<l?l:s;break}}else s=l;while(0);return y(s)}function c7(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function Fg(s,l){s=y(s),l=y(l);var c=0,f=0;c=u7(s)|0;do if((c&2147483647)>>>0<=2139095040){if(f=u7(l)|0,(f&2147483647)>>>0<=2139095040)if((f^c|0)<0){s=(c|0)<0?s:l;break}else{s=s<l?s:l;break}}else s=l;while(0);return y(s)}function u7(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function PR(s,l){s=y(s),l=y(l);var c=0,f=0,d=0,m=0,B=0,Q=0,k=0,M=0;m=(h[v>>2]=s,n[v>>2]|0),Q=(h[v>>2]=l,n[v>>2]|0),c=m>>>23&255,B=Q>>>23&255,k=m&-2147483648,d=Q<<1;e:do if((d|0)!=0&&!((c|0)==255|((JUe(l)|0)&2147483647)>>>0>2139095040)){if(f=m<<1,f>>>0<=d>>>0)return l=y(s*y(0)),y((f|0)==(d|0)?l:s);if(c)f=m&8388607|8388608;else{if(c=m<<9,(c|0)>-1){f=c,c=0;do c=c+-1|0,f=f<<1;while((f|0)>-1)}else c=0;f=m<<1-c}if(B)Q=Q&8388607|8388608;else{if(m=Q<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,Q=Q<<1-d}d=f-Q|0,m=(d|0)>-1;t:do if((c|0)>(B|0)){for(;;){if(m)if(d)f=d;else break;if(f=f<<1,c=c+-1|0,d=f-Q|0,m=(d|0)>-1,(c|0)<=(B|0))break t}l=y(s*y(0));break e}while(0);if(m)if(d)f=d;else{l=y(s*y(0));break}if(f>>>0<8388608)do f=f<<1,c=c+-1|0;while(f>>>0<8388608);(c|0)>0?c=f+-8388608|c<<23:c=f>>>(1-c|0),l=(n[v>>2]=c|k,y(h[v>>2]))}else M=3;while(0);return(M|0)==3&&(l=y(s*l),l=y(l/l)),y(l)}function JUe(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function VUe(s,l){return s=s|0,l=l|0,n7(n[582]|0,s,l)|0}function Vr(s){s=s|0,Rt()}function Vm(s){s=s|0}function zUe(s,l){return s=s|0,l=l|0,0}function XUe(s){return s=s|0,(A7(s+4|0)|0)==-1?(tf[n[(n[s>>2]|0)+8>>2]&127](s),s=1):s=0,s|0}function A7(s){s=s|0;var l=0;return l=n[s>>2]|0,n[s>>2]=l+-1,l+-1|0}function xp(s){s=s|0,XUe(s)|0&&ZUe(s)}function ZUe(s){s=s|0;var l=0;l=s+8|0,(n[l>>2]|0)!=0&&(A7(l)|0)!=-1||tf[n[(n[s>>2]|0)+16>>2]&127](s)}function Kt(s){s=s|0;var l=0;for(l=(s|0)==0?1:s;s=fD(l)|0,!(s|0);){if(s=e3e()|0,!s){s=0;break}S7[s&0]()}return s|0}function f7(s){return s=s|0,Kt(s)|0}function ht(s){s=s|0,pD(s)}function $Ue(s){s=s|0,(o[s+11>>0]|0)<0&&ht(n[s>>2]|0)}function e3e(){var s=0;return s=n[2923]|0,n[2923]=s+0,s|0}function t3e(){}function gD(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,f=l-f-(c>>>0>s>>>0|0)>>>0,Se=f,s-c>>>0|0|0}function xR(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,c=s+c>>>0,Se=l+f+(c>>>0<s>>>0|0)>>>0,c|0|0}function zm(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;if(m=s+c|0,l=l&255,(c|0)>=67){for(;s&3;)o[s>>0]=l,s=s+1|0;for(f=m&-4|0,d=f-64|0,B=l|l<<8|l<<16|l<<24;(s|0)<=(d|0);)n[s>>2]=B,n[s+4>>2]=B,n[s+8>>2]=B,n[s+12>>2]=B,n[s+16>>2]=B,n[s+20>>2]=B,n[s+24>>2]=B,n[s+28>>2]=B,n[s+32>>2]=B,n[s+36>>2]=B,n[s+40>>2]=B,n[s+44>>2]=B,n[s+48>>2]=B,n[s+52>>2]=B,n[s+56>>2]=B,n[s+60>>2]=B,s=s+64|0;for(;(s|0)<(f|0);)n[s>>2]=B,s=s+4|0}for(;(s|0)<(m|0);)o[s>>0]=l,s=s+1|0;return m-c|0}function p7(s,l,c){return s=s|0,l=l|0,c=c|0,(c|0)<32?(Se=l<<c|(s&(1<<c)-1<<32-c)>>>32-c,s<<c):(Se=s<<c-32,0)}function dD(s,l,c){return s=s|0,l=l|0,c=c|0,(c|0)<32?(Se=l>>>c,s>>>c|(l&(1<<c)-1)<<32-c):(Se=0,l>>>c-32|0)}function vr(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;if((c|0)>=8192)return Ac(s|0,l|0,c|0)|0;if(m=s|0,d=s+c|0,(s&3)==(l&3)){for(;s&3;){if(!c)return m|0;o[s>>0]=o[l>>0]|0,s=s+1|0,l=l+1|0,c=c-1|0}for(c=d&-4|0,f=c-64|0;(s|0)<=(f|0);)n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2],n[s+16>>2]=n[l+16>>2],n[s+20>>2]=n[l+20>>2],n[s+24>>2]=n[l+24>>2],n[s+28>>2]=n[l+28>>2],n[s+32>>2]=n[l+32>>2],n[s+36>>2]=n[l+36>>2],n[s+40>>2]=n[l+40>>2],n[s+44>>2]=n[l+44>>2],n[s+48>>2]=n[l+48>>2],n[s+52>>2]=n[l+52>>2],n[s+56>>2]=n[l+56>>2],n[s+60>>2]=n[l+60>>2],s=s+64|0,l=l+64|0;for(;(s|0)<(c|0);)n[s>>2]=n[l>>2],s=s+4|0,l=l+4|0}else for(c=d-4|0;(s|0)<(c|0);)o[s>>0]=o[l>>0]|0,o[s+1>>0]=o[l+1>>0]|0,o[s+2>>0]=o[l+2>>0]|0,o[s+3>>0]=o[l+3>>0]|0,s=s+4|0,l=l+4|0;for(;(s|0)<(d|0);)o[s>>0]=o[l>>0]|0,s=s+1|0,l=l+1|0;return m|0}function h7(s){s=s|0;var l=0;return l=o[N+(s&255)>>0]|0,(l|0)<8?l|0:(l=o[N+(s>>8&255)>>0]|0,(l|0)<8?l+8|0:(l=o[N+(s>>16&255)>>0]|0,(l|0)<8?l+16|0:(o[N+(s>>>24)>>0]|0)+24|0))}function g7(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,Q=0,k=0,M=0,O=0,q=0,se=0,Ge=0,Me=0;if(O=s,k=l,M=k,B=c,se=f,Q=se,!M)return m=(d|0)!=0,Q?m?(n[d>>2]=s|0,n[d+4>>2]=l&0,se=0,d=0,Se=se,d|0):(se=0,d=0,Se=se,d|0):(m&&(n[d>>2]=(O>>>0)%(B>>>0),n[d+4>>2]=0),se=0,d=(O>>>0)/(B>>>0)>>>0,Se=se,d|0);m=(Q|0)==0;do if(B){if(!m){if(m=(P(Q|0)|0)-(P(M|0)|0)|0,m>>>0<=31){q=m+1|0,Q=31-m|0,l=m-31>>31,B=q,s=O>>>(q>>>0)&l|M<<Q,l=M>>>(q>>>0)&l,m=0,Q=O<<Q;break}return d?(n[d>>2]=s|0,n[d+4>>2]=k|l&0,se=0,d=0,Se=se,d|0):(se=0,d=0,Se=se,d|0)}if(m=B-1|0,m&B|0){Q=(P(B|0)|0)+33-(P(M|0)|0)|0,Me=64-Q|0,q=32-Q|0,k=q>>31,Ge=Q-32|0,l=Ge>>31,B=Q,s=q-1>>31&M>>>(Ge>>>0)|(M<<q|O>>>(Q>>>0))&l,l=l&M>>>(Q>>>0),m=O<<Me&k,Q=(M<<Me|O>>>(Ge>>>0))&k|O<<q&Q-33>>31;break}return d|0&&(n[d>>2]=m&O,n[d+4>>2]=0),(B|0)==1?(Ge=k|l&0,Me=s|0|0,Se=Ge,Me|0):(Me=h7(B|0)|0,Ge=M>>>(Me>>>0)|0,Me=M<<32-Me|O>>>(Me>>>0)|0,Se=Ge,Me|0)}else{if(m)return d|0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(Z()|0)&&(X()|0)==0?(n[I>>2]=l,DA(12),-1):l|0)}function LC(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;if((l|0)<(s|0)&(s|0)<(l+c|0)){for(f=s,l=l+c|0,s=s+c|0;(c|0)>0;)s=s-1|0,l=l-1|0,c=c-1|0,o[s>>0]=o[l>>0]|0;s=f}else vr(s,l,c)|0;return s|0}function QR(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;return m=E,E=E+16|0,d=m|0,g7(s,l,c,f,d)|0,E=m,Se=n[d+4>>2]|0,n[d>>2]|0|0}function d7(s){return s=s|0,(s&255)<<24|(s>>8&255)<<16|(s>>16&255)<<8|s>>>24|0}function r3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,m7[s&1](l|0,c|0,f|0,d|0,m|0)}function n3e(s,l,c){s=s|0,l=l|0,c=y(c),y7[s&1](l|0,y(c))}function i3e(s,l,c){s=s|0,l=l|0,c=+c,E7[s&31](l|0,+c)}function s3e(s,l,c,f){return s=s|0,l=l|0,c=y(c),f=y(f),y(w7[s&0](l|0,y(c),y(f)))}function o3e(s,l){s=s|0,l=l|0,tf[s&127](l|0)}function a3e(s,l,c){s=s|0,l=l|0,c=c|0,rf[s&31](l|0,c|0)}function l3e(s,l){return s=s|0,l=l|0,Tg[s&31](l|0)|0}function c3e(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0,C7[s&1](l|0,+c,+f,d|0)}function u3e(s,l,c,f){s=s|0,l=l|0,c=+c,f=+f,G3e[s&1](l|0,+c,+f)}function A3e(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,yD[s&7](l|0,c|0,f|0)|0}function f3e(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,+Y3e[s&1](l|0,c|0,f|0)}function p3e(s,l){return s=s|0,l=l|0,+I7[s&15](l|0)}function h3e(s,l,c){return s=s|0,l=l|0,c=+c,W3e[s&1](l|0,+c)|0}function g3e(s,l,c){return s=s|0,l=l|0,c=c|0,FR[s&15](l|0,c|0)|0}function d3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=+f,d=+d,m=m|0,K3e[s&1](l|0,c|0,+f,+d,m|0)}function m3e(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,J3e[s&1](l|0,c|0,f|0,d|0,m|0,B|0)}function y3e(s,l,c){return s=s|0,l=l|0,c=c|0,+B7[s&7](l|0,c|0)}function E3e(s){return s=s|0,ED[s&7]()|0}function w3e(s,l,c,f,d,m){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,v7[s&1](l|0,c|0,f|0,d|0,m|0)|0}function C3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=+d,V3e[s&1](l|0,c|0,f|0,+d)}function I3e(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=y(f),d=d|0,m=y(m),B=B|0,D7[s&1](l|0,c|0,y(f),d|0,y(m),B|0)}function B3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,UC[s&15](l|0,c|0,f|0)}function v3e(s){s=s|0,S7[s&0]()}function D3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f,P7[s&15](l|0,c|0,+f)}function S3e(s,l,c){return s=s|0,l=+l,c=+c,z3e[s&1](+l,+c)|0}function P3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,RR[s&15](l|0,c|0,f|0,d|0)}function x3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,F(0)}function b3e(s,l){s=s|0,l=y(l),F(1)}function ya(s,l){s=s|0,l=+l,F(2)}function Q3e(s,l,c){return s=s|0,l=y(l),c=y(c),F(3),Ze}function yr(s){s=s|0,F(4)}function OC(s,l){s=s|0,l=l|0,F(5)}function Va(s){return s=s|0,F(6),0}function k3e(s,l,c,f){s=s|0,l=+l,c=+c,f=f|0,F(7)}function F3e(s,l,c){s=s|0,l=+l,c=+c,F(8)}function R3e(s,l,c){return s=s|0,l=l|0,c=c|0,F(9),0}function T3e(s,l,c){return s=s|0,l=l|0,c=c|0,F(10),0}function Rg(s){return s=s|0,F(11),0}function N3e(s,l){return s=s|0,l=+l,F(12),0}function MC(s,l){return s=s|0,l=l|0,F(13),0}function L3e(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0,F(14)}function O3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,F(15)}function kR(s,l){return s=s|0,l=l|0,F(16),0}function M3e(){return F(17),0}function U3e(s,l,c,f,d){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,F(18),0}function _3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f,F(19)}function H3e(s,l,c,f,d,m){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=m|0,F(20)}function mD(s,l,c){s=s|0,l=l|0,c=c|0,F(21)}function j3e(){F(22)}function Xm(s,l,c){s=s|0,l=l|0,c=+c,F(23)}function q3e(s,l){return s=+s,l=+l,F(24),0}function Zm(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,F(25)}var m7=[x3e,ULe],y7=[b3e,fo],E7=[ya,PC,xC,yF,EF,vl,bC,wF,Hm,Qu,kC,CF,Zv,KA,$v,jm,eD,tD,qm,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya,ya],w7=[Q3e],tf=[yr,Vm,EDe,wDe,CDe,zxe,Xxe,Zxe,hNe,gNe,dNe,SLe,PLe,xLe,J4e,V4e,z4e,gs,Kv,_m,WA,QC,gve,dve,cDe,bDe,HDe,sSe,CSe,MSe,tPe,dPe,kPe,KPe,cxe,Dxe,Hxe,gbe,kbe,Kbe,cQe,DQe,HQe,oke,Cke,Nke,Xke,Pc,xFe,GFe,cRe,PRe,jRe,cTe,ETe,ITe,UTe,jTe,sNe,yNe,CNe,MNe,rLe,n9,OOe,hM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all_vif:n3e,setThrew:du,dynCall_viii:B3e,_bitshift64Lshr:dD,_bitshift64Shl:p7,dynCall_vi:o3e,dynCall_viiddi:d3e,dynCall_diii:f3e,dynCall_iii:g3e,_memset:zm,_sbrk:bp,_memcpy:vr,__GLOBAL__sub_I_Yoga_cpp:Mm,dynCall_vii:a3e,___uremdi3:QR,dynCall_vid:i3e,stackAlloc:lo,_nbind_init:pUe,getTempRet0:Ua,dynCall_di:p3e,dynCall_iid:h3e,setTempRet0:bA,_i64Add:xR,dynCall_fiff:s3e,dynCall_iiii:A3e,_emscripten_get_global_libc:vUe,dynCall_viid:D3e,dynCall_viiid:C3e,dynCall_viififi:I3e,dynCall_ii:l3e,__GLOBAL__sub_I_Binding_cc:bOe,dynCall_viiii:P3e,dynCall_iiiiii:w3e,stackSave:gc,dynCall_viiiii:r3e,__GLOBAL__sub_I_nbind_cc:Qve,dynCall_vidd:u3e,_free:pD,runPostSets:t3e,dynCall_viiiiii:m3e,establishStackSpace:qi,_memmove:LC,stackRestore:gu,_malloc:fD,__GLOBAL__sub_I_common_cc:VNe,dynCall_viddi:c3e,dynCall_dii:y3e,dynCall_v:v3e}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function e(t){t=t||[],ensureInitRuntime();var r=t.length+1;function o(){for(var p=0;p<4-1;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];o();for(var n=0;n<r-1;n=n+1)a.push(allocate(intArrayFromString(t[n]),"i8",ALLOC_NORMAL)),o();a.push(0),a=allocate(a,"i32",ALLOC_NORMAL);try{var u=Module._main(r,a,0);exit(u,!0)}catch(p){if(p instanceof ExitStatus)return;if(p=="SimulateInfiniteLoop"){Module.noExitRuntime=!0;return}else{var A=p;p&&typeof p=="object"&&p.stack&&(A=[p,p.stack]),Module.printErr("exception thrown: "+A),Module.quit(1,p)}}finally{calledMain=!0}};function run(e){if(e=e||Module.arguments,preloadStartTime===null&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun)return;function t(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()}Module.run=Module.run=run;function exit(e,t){t&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=e,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(e){Module.onAbort&&Module.onAbort(e),e!==void 0?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0,EXITSTATUS=1;var t=`
292If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+e+") at "+stackTrace()+t;throw abortDecorators&&abortDecorators.forEach(function(o){r=o(r,e)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var om=_((eKt,FEe)=>{"use strict";var Syt=QEe(),Pyt=kEe(),S6=!1,P6=null;Pyt({},function(e,t){if(!S6){if(S6=!0,e)throw e;P6=t}});if(!S6)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");FEe.exports=Syt(P6.bind,P6.lib)});var b6=_((tKt,x6)=>{"use strict";var REe=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);x6.exports=REe;x6.exports.default=REe});var NEe=_((rKt,TEe)=>{"use strict";TEe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\u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FC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var YQ=_((nKt,Q6)=>{"use strict";var xyt=LS(),byt=b6(),Qyt=NEe(),LEe=e=>{if(typeof e!="string"||e.length===0||(e=xyt(e),e.length===0))return 0;e=e.replace(Qyt()," ");let t=0;for(let r=0;r<e.length;r++){let o=e.codePointAt(r);o<=31||o>=127&&o<=159||o>=768&&o<=879||(o>65535&&r++,t+=byt(o)?2:1)}return t};Q6.exports=LEe;Q6.exports.default=LEe});var F6=_((iKt,k6)=>{"use strict";var kyt=YQ(),OEe=e=>{let t=0;for(let r of e.split(`
293`))t=Math.max(t,kyt(r));return t};k6.exports=OEe;k6.exports.default=OEe});var MEe=_(oB=>{"use strict";var Fyt=oB&&oB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oB,"__esModule",{value:!0});var Ryt=Fyt(F6()),R6={};oB.default=e=>{if(e.length===0)return{width:0,height:0};if(R6[e])return R6[e];let t=Ryt.default(e),r=e.split(`
294`).length;return R6[e]={width:t,height:r},{width:t,height:r}}});var UEe=_(aB=>{"use strict";var Tyt=aB&&aB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aB,"__esModule",{value:!0});var gn=Tyt(om()),Nyt=(e,t)=>{"position"in t&&e.setPositionType(t.position==="absolute"?gn.default.POSITION_TYPE_ABSOLUTE:gn.default.POSITION_TYPE_RELATIVE)},Lyt=(e,t)=>{"marginLeft"in t&&e.setMargin(gn.default.EDGE_START,t.marginLeft||0),"marginRight"in t&&e.setMargin(gn.default.EDGE_END,t.marginRight||0),"marginTop"in t&&e.setMargin(gn.default.EDGE_TOP,t.marginTop||0),"marginBottom"in t&&e.setMargin(gn.default.EDGE_BOTTOM,t.marginBottom||0)},Oyt=(e,t)=>{"paddingLeft"in t&&e.setPadding(gn.default.EDGE_LEFT,t.paddingLeft||0),"paddingRight"in t&&e.setPadding(gn.default.EDGE_RIGHT,t.paddingRight||0),"paddingTop"in t&&e.setPadding(gn.default.EDGE_TOP,t.paddingTop||0),"paddingBottom"in t&&e.setPadding(gn.default.EDGE_BOTTOM,t.paddingBottom||0)},Myt=(e,t)=>{var r;"flexGrow"in t&&e.setFlexGrow((r=t.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in t&&e.setFlexShrink(typeof t.flexShrink=="number"?t.flexShrink:1),"flexDirection"in t&&(t.flexDirection==="row"&&e.setFlexDirection(gn.default.FLEX_DIRECTION_ROW),t.flexDirection==="row-reverse"&&e.setFlexDirection(gn.default.FLEX_DIRECTION_ROW_REVERSE),t.flexDirection==="column"&&e.setFlexDirection(gn.default.FLEX_DIRECTION_COLUMN),t.flexDirection==="column-reverse"&&e.setFlexDirection(gn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in t&&(typeof t.flexBasis=="number"?e.setFlexBasis(t.flexBasis):typeof t.flexBasis=="string"?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(NaN)),"alignItems"in t&&((t.alignItems==="stretch"||!t.alignItems)&&e.setAlignItems(gn.default.ALIGN_STRETCH),t.alignItems==="flex-start"&&e.setAlignItems(gn.default.ALIGN_FLEX_START),t.alignItems==="center"&&e.setAlignItems(gn.default.ALIGN_CENTER),t.alignItems==="flex-end"&&e.setAlignItems(gn.default.ALIGN_FLEX_END)),"alignSelf"in t&&((t.alignSelf==="auto"||!t.alignSelf)&&e.setAlignSelf(gn.default.ALIGN_AUTO),t.alignSelf==="flex-start"&&e.setAlignSelf(gn.default.ALIGN_FLEX_START),t.alignSelf==="center"&&e.setAlignSelf(gn.default.ALIGN_CENTER),t.alignSelf==="flex-end"&&e.setAlignSelf(gn.default.ALIGN_FLEX_END)),"justifyContent"in t&&((t.justifyContent==="flex-start"||!t.justifyContent)&&e.setJustifyContent(gn.default.JUSTIFY_FLEX_START),t.justifyContent==="center"&&e.setJustifyContent(gn.default.JUSTIFY_CENTER),t.justifyContent==="flex-end"&&e.setJustifyContent(gn.default.JUSTIFY_FLEX_END),t.justifyContent==="space-between"&&e.setJustifyContent(gn.default.JUSTIFY_SPACE_BETWEEN),t.justifyContent==="space-around"&&e.setJustifyContent(gn.default.JUSTIFY_SPACE_AROUND))},Uyt=(e,t)=>{var r,o;"width"in t&&(typeof t.width=="number"?e.setWidth(t.width):typeof t.width=="string"?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),"height"in t&&(typeof t.height=="number"?e.setHeight(t.height):typeof t.height=="string"?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),"minWidth"in t&&(typeof t.minWidth=="string"?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth((r=t.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in t&&(typeof t.minHeight=="string"?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight((o=t.minHeight)!==null&&o!==void 0?o:0))},_yt=(e,t)=>{"display"in t&&e.setDisplay(t.display==="flex"?gn.default.DISPLAY_FLEX:gn.default.DISPLAY_NONE)},Hyt=(e,t)=>{if("borderStyle"in t){let r=typeof t.borderStyle=="string"?1:0;e.setBorder(gn.default.EDGE_TOP,r),e.setBorder(gn.default.EDGE_BOTTOM,r),e.setBorder(gn.default.EDGE_LEFT,r),e.setBorder(gn.default.EDGE_RIGHT,r)}};aB.default=(e,t={})=>{Nyt(e,t),Lyt(e,t),Oyt(e,t),Myt(e,t),Uyt(e,t),_yt(e,t),Hyt(e,t)}});var jEe=_((aKt,HEe)=>{"use strict";var lB=YQ(),jyt=LS(),qyt=II(),N6=new Set(["\x1B","\x9B"]),Gyt=39,_Ee=e=>`${N6.values().next().value}[${e}m`,Yyt=e=>e.split(" ").map(t=>lB(t)),T6=(e,t,r)=>{let o=[...t],a=!1,n=lB(jyt(e[e.length-1]));for(let[u,A]of o.entries()){let p=lB(A);if(n+p<=r?e[e.length-1]+=A:(e.push(A),n=0),N6.has(A))a=!0;else if(a&&A==="m"){a=!1;continue}a||(n+=p,n===r&&u<o.length-1&&(e.push(""),n=0))}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Wyt=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(lB(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Kyt=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let o="",a="",n,u=Yyt(e),A=[""];for(let[p,h]of e.split(" ").entries()){r.trim!==!1&&(A[A.length-1]=A[A.length-1].trimLeft());let w=lB(A[A.length-1]);if(p!==0&&(w>=t&&(r.wordWrap===!1||r.trim===!1)&&(A.push(""),w=0),(w>0||r.trim===!1)&&(A[A.length-1]+=" ",w++)),r.hard&&u[p]>t){let I=t-w,v=1+Math.floor((u[p]-I-1)/t);Math.floor((u[p]-1)/t)<v&&A.push(""),T6(A,h,t);continue}if(w+u[p]>t&&w>0&&u[p]>0){if(r.wordWrap===!1&&w<t){T6(A,h,t);continue}A.push("")}if(w+u[p]>t&&r.wordWrap===!1){T6(A,h,t);continue}A[A.length-1]+=h}r.trim!==!1&&(A=A.map(Wyt)),o=A.join(`
295`);for(let[p,h]of[...o].entries()){if(a+=h,N6.has(h)){let I=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=I===Gyt?null:I}let w=qyt.codes.get(Number(n));n&&w&&(o[p+1]===`
296`?a+=_Ee(w):h===`
297`&&(a+=_Ee(n)))}return a};HEe.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,`
298`).split(`
299`).map(o=>Kyt(o,t,r)).join(`
300`)});var YEe=_((lKt,GEe)=>{"use strict";var qEe="[\uD800-\uDBFF][\uDC00-\uDFFF]",Jyt=e=>e&&e.exact?new RegExp(`^${qEe}$`):new RegExp(qEe,"g");GEe.exports=Jyt});var L6=_((cKt,VEe)=>{"use strict";var Vyt=b6(),zyt=YEe(),WEe=II(),JEe=["\x1B","\x9B"],WQ=e=>`${JEe[0]}[${e}m`,KEe=(e,t,r)=>{let o=[];e=[...e];for(let a of e){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=WEe.codes.get(parseInt(a,10));if(u){let A=e.indexOf(u.toString());A>=0?e.splice(A,1):o.push(WQ(t?u:n))}else if(t){o.push(WQ(0));break}else o.push(WQ(n))}if(t&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=WQ(WEe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};VEe.exports=(e,t,r)=>{let o=[...e.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,w]of o.entries()){let I=!1;if(JEe.includes(w)){let v=/\d[^m]*/.exec(e.slice(h,h+18));u=v&&v.length>0?v[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&w==="m"&&(n=!1,I=!0);if(!n&&!I&&++A,!zyt({exact:!0}).test(w)&&Vyt(w.codePointAt())&&++A,A>t&&A<=r)p+=w;else if(A===t&&!n&&u!==void 0)p=KEe(a);else if(A>=r){p+=KEe(a,!0,u);break}}return p}});var XEe=_((uKt,zEe)=>{"use strict";var y0=L6(),Xyt=YQ();function KQ(e,t,r){if(e.charAt(t)===" ")return t;for(let o=1;o<=3;o++)if(r){if(e.charAt(t+o)===" ")return t+o}else if(e.charAt(t-o)===" ")return t-o;return t}zEe.exports=(e,t,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=1;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return u;let p=Xyt(e);if(p<=t)return e;if(o==="start"){if(n){let h=KQ(e,p-t+1,!0);return u+y0(e,h,p).trim()}return a===!0&&(u+=" ",A=2),u+y0(e,p-t+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(t/2);if(n){let w=KQ(e,h),I=KQ(e,p-(t-h)+1,!0);return y0(e,0,w)+u+y0(e,I,p).trim()}return y0(e,0,h)+u+y0(e,p-(t-h)+A,p)}if(o==="end"){if(n){let h=KQ(e,t-1);return y0(e,0,h)+u}return a===!0&&(u=" "+u,A=2),y0(e,0,t-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var M6=_(cB=>{"use strict";var ZEe=cB&&cB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cB,"__esModule",{value:!0});var Zyt=ZEe(jEe()),$yt=ZEe(XEe()),O6={};cB.default=(e,t,r)=>{let o=e+String(t)+String(r);if(O6[o])return O6[o];let a=e;if(r==="wrap"&&(a=Zyt.default(e,t,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=$yt.default(e,t,{position:n})}return O6[o]=a,a}});var _6=_(U6=>{"use strict";Object.defineProperty(U6,"__esModule",{value:!0});var $Ee=e=>{let t="";if(e.childNodes.length>0)for(let r of e.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=$Ee(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),t+=o}return t};U6.default=$Ee});var H6=_(fi=>{"use strict";var uB=fi&&fi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0});fi.setTextNodeValue=fi.createTextNode=fi.setStyle=fi.setAttribute=fi.removeChildNode=fi.insertBeforeNode=fi.appendChildNode=fi.createNode=fi.TEXT_NAME=void 0;var eEt=uB(om()),ewe=uB(MEe()),tEt=uB(UEe()),rEt=uB(M6()),nEt=uB(_6());fi.TEXT_NAME="#text";fi.createNode=e=>{var t;let r={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:e==="ink-virtual-text"?void 0:eEt.default.Node.create()};return e==="ink-text"&&((t=r.yogaNode)===null||t===void 0||t.setMeasureFunc(iEt.bind(null,r))),r};fi.appendChildNode=(e,t)=>{var r;t.parentNode&&fi.removeChildNode(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&((r=e.yogaNode)===null||r===void 0||r.insertChild(t.yogaNode,e.yogaNode.getChildCount())),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&JQ(e)};fi.insertBeforeNode=(e,t,r)=>{var o,a;t.parentNode&&fi.removeChildNode(t.parentNode,t),t.parentNode=e;let n=e.childNodes.indexOf(r);if(n>=0){e.childNodes.splice(n,0,t),t.yogaNode&&((o=e.yogaNode)===null||o===void 0||o.insertChild(t.yogaNode,n));return}e.childNodes.push(t),t.yogaNode&&((a=e.yogaNode)===null||a===void 0||a.insertChild(t.yogaNode,e.yogaNode.getChildCount())),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&JQ(e)};fi.removeChildNode=(e,t)=>{var r,o;t.yogaNode&&((o=(r=t.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||o===void 0||o.removeChild(t.yogaNode)),t.parentNode=null;let a=e.childNodes.indexOf(t);a>=0&&e.childNodes.splice(a,1),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&JQ(e)};fi.setAttribute=(e,t,r)=>{e.attributes[t]=r};fi.setStyle=(e,t)=>{e.style=t,e.yogaNode&&tEt.default(e.yogaNode,t)};fi.createTextNode=e=>{let t={nodeName:"#text",nodeValue:e,yogaNode:void 0,parentNode:null,style:{}};return fi.setTextNodeValue(t,e),t};var iEt=function(e,t){var r,o;let a=e.nodeName==="#text"?e.nodeValue:nEt.default(e),n=ewe.default(a);if(n.width<=t||n.width>=1&&t>0&&t<1)return n;let u=(o=(r=e.style)===null||r===void 0?void 0:r.textWrap)!==null&&o!==void 0?o:"wrap",A=rEt.default(a,t,u);return ewe.default(A)},twe=e=>{var t;if(!(!e||!e.parentNode))return(t=e.yogaNode)!==null&&t!==void 0?t:twe(e.parentNode)},JQ=e=>{let t=twe(e);t?.markDirty()};fi.setTextNodeValue=(e,t)=>{typeof t!="string"&&(t=String(t)),e.nodeValue=t,JQ(e)}});var owe=_(AB=>{"use strict";var swe=AB&&AB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(AB,"__esModule",{value:!0});var rwe=B6(),sEt=swe(vEe()),nwe=swe(om()),Oo=H6(),iwe=e=>{e?.unsetMeasureFunc(),e?.freeRecursive()};AB.default=sEt.default({schedulePassiveEffects:rwe.unstable_scheduleCallback,cancelPassiveEffects:rwe.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:e=>{if(e.isStaticDirty){e.isStaticDirty=!1,typeof e.onImmediateRender=="function"&&e.onImmediateRender();return}typeof e.onRender=="function"&&e.onRender()},getChildHostContext:(e,t)=>{let r=e.isInsideText,o=t==="ink-text"||t==="ink-virtual-text";return r===o?e:{isInsideText:o}},shouldSetTextContent:()=>!1,createInstance:(e,t,r,o)=>{if(o.isInsideText&&e==="ink-box")throw new Error("<Box> can\u2019t be nested inside <Text> component");let a=e==="ink-text"&&o.isInsideText?"ink-virtual-text":e,n=Oo.createNode(a);for(let[u,A]of Object.entries(t))u!=="children"&&(u==="style"?Oo.setStyle(n,A):u==="internal_transform"?n.internal_transform=A:u==="internal_static"?n.internal_static=!0:Oo.setAttribute(n,u,A));return n},createTextInstance:(e,t,r)=>{if(!r.isInsideText)throw new Error(`Text string "${e}" must be rendered inside <Text> component`);return Oo.createTextNode(e)},resetTextContent:()=>{},hideTextInstance:e=>{Oo.setTextNodeValue(e,"")},unhideTextInstance:(e,t)=>{Oo.setTextNodeValue(e,t)},getPublicInstance:e=>e,hideInstance:e=>{var t;(t=e.yogaNode)===null||t===void 0||t.setDisplay(nwe.default.DISPLAY_NONE)},unhideInstance:e=>{var t;(t=e.yogaNode)===null||t===void 0||t.setDisplay(nwe.default.DISPLAY_FLEX)},appendInitialChild:Oo.appendChildNode,appendChild:Oo.appendChildNode,insertBefore:Oo.insertBeforeNode,finalizeInitialChildren:(e,t,r,o)=>(e.internal_static&&(o.isStaticDirty=!0,o.staticNode=e),!1),supportsMutation:!0,appendChildToContainer:Oo.appendChildNode,insertInContainerBefore:Oo.insertBeforeNode,removeChildFromContainer:(e,t)=>{Oo.removeChildNode(e,t),iwe(t.yogaNode)},prepareUpdate:(e,t,r,o,a)=>{e.internal_static&&(a.isStaticDirty=!0);let n={},u=Object.keys(o);for(let A of u)if(o[A]!==r[A]){if(A==="style"&&typeof o.style=="object"&&typeof r.style=="object"){let h=o.style,w=r.style,I=Object.keys(h);for(let v of I){if(v==="borderStyle"||v==="borderColor"){if(typeof n.style!="object"){let b={};n.style=b}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[v]!==w[v]){if(typeof n.style!="object"){let b={};n.style=b}n.style[v]=h[v]}}continue}n[A]=o[A]}return n},commitUpdate:(e,t)=>{for(let[r,o]of Object.entries(t))r!=="children"&&(r==="style"?Oo.setStyle(e,o):r==="internal_transform"?e.internal_transform=o:r==="internal_static"?e.internal_static=!0:Oo.setAttribute(e,r,o))},commitTextUpdate:(e,t,r)=>{Oo.setTextNodeValue(e,r)},removeChild:(e,t)=>{Oo.removeChildNode(e,t),iwe(t.yogaNode)}})});var lwe=_((gKt,awe)=>{"use strict";awe.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let o=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(o,r.indent.repeat(t))}});var cwe=_(fB=>{"use strict";var oEt=fB&&fB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fB,"__esModule",{value:!0});var VQ=oEt(om());fB.default=e=>e.getComputedWidth()-e.getComputedPadding(VQ.default.EDGE_LEFT)-e.getComputedPadding(VQ.default.EDGE_RIGHT)-e.getComputedBorder(VQ.default.EDGE_LEFT)-e.getComputedBorder(VQ.default.EDGE_RIGHT)});var uwe=_((mKt,aEt)=>{aEt.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var fwe=_((yKt,j6)=>{"use strict";var Awe=uwe();j6.exports=Awe;j6.exports.default=Awe});var hwe=_((EKt,pwe)=>{"use strict";var lEt=(e,t,r)=>{let o=e.indexOf(t);if(o===-1)return e;let a=t.length,n=0,u="";do u+=e.substr(n,o-n)+t+r,n=o+a,o=e.indexOf(t,n);while(o!==-1);return u+=e.substr(n),u},cEt=(e,t,r,o)=>{let a=0,n="";do{let u=e[o-1]==="\r";n+=e.substr(a,(u?o-1:o)-a)+t+(u?`\r
301`:`
302`)+r,a=o+1,o=e.indexOf(`
303`,a)}while(o!==-1);return n+=e.substr(a),n};pwe.exports={stringReplaceAll:lEt,stringEncaseCRLFWithFirstIndex:cEt}});var Ewe=_((wKt,ywe)=>{"use strict";var uEt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,gwe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,AEt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,fEt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,pEt=new Map([["n",`
304`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function mwe(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):pEt.get(e)||e}function hEt(e,t){let r=[],o=t.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(AEt))r.push(a[2].replace(fEt,(A,p,h)=>p?mwe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${e}')`)}return r}function gEt(e){gwe.lastIndex=0;let t=[],r;for(;(r=gwe.exec(e))!==null;){let o=r[1];if(r[2]){let a=hEt(o,r[2]);t.push([o].concat(a))}else t.push([o])}return t}function dwe(e,t){let r={};for(let a of t)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=e;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}ywe.exports=(e,t)=>{let r=[],o=[],a=[];if(t.replace(uEt,(n,u,A,p,h,w)=>{if(u)a.push(mwe(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:dwe(e,r)(I)),r.push({inverse:A,styles:gEt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(dwe(e,r)(a.join(""))),a=[],r.pop()}else a.push(w)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var ek=_((CKt,Dwe)=>{"use strict";var pB=II(),{stdout:G6,stderr:Y6}=gN(),{stringReplaceAll:dEt,stringEncaseCRLFWithFirstIndex:mEt}=hwe(),{isArray:zQ}=Array,Cwe=["ansi","ansi","ansi256","ansi16m"],Uw=Object.create(null),yEt=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=G6?G6.level:0;e.level=t.level===void 0?r:t.level},W6=class{constructor(t){return Iwe(t)}},Iwe=e=>{let t={};return yEt(t,e),t.template=(...r)=>vwe(t.template,...r),Object.setPrototypeOf(t,XQ.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=W6,t.template};function XQ(e){return Iwe(e)}for(let[e,t]of Object.entries(pB))Uw[e]={get(){let r=ZQ(this,K6(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};Uw.visible={get(){let e=ZQ(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Bwe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of Bwe)Uw[e]={get(){let{level:t}=this;return function(...r){let o=K6(pB.color[Cwe[t]][e](...r),pB.color.close,this._styler);return ZQ(this,o,this._isEmpty)}}};for(let e of Bwe){let t="bg"+e[0].toUpperCase()+e.slice(1);Uw[t]={get(){let{level:r}=this;return function(...o){let a=K6(pB.bgColor[Cwe[r]][e](...o),pB.bgColor.close,this._styler);return ZQ(this,a,this._isEmpty)}}}}var EEt=Object.defineProperties(()=>{},{...Uw,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),K6=(e,t,r)=>{let o,a;return r===void 0?(o=e,a=t):(o=r.openAll+e,a=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:a,parent:r}},ZQ=(e,t,r)=>{let o=(...a)=>zQ(a[0])&&zQ(a[0].raw)?wwe(o,vwe(o,...a)):wwe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,EEt),o._generator=e,o._styler=t,o._isEmpty=r,o},wwe=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:o,closeAll:a}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=dEt(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
305`);return n!==-1&&(t=mEt(t,a,o,n)),o+t+a},q6,vwe=(e,...t)=>{let[r]=t;if(!zQ(r)||!zQ(r.raw))return t.join(" ");let o=t.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return q6===void 0&&(q6=Ewe()),q6(e,a.join(""))};Object.defineProperties(XQ.prototype,Uw);var $Q=XQ();$Q.supportsColor=G6;$Q.stderr=XQ({level:Y6?Y6.level:0});$Q.stderr.supportsColor=Y6;Dwe.exports=$Q});var J6=_(gB=>{"use strict";var wEt=gB&&gB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gB,"__esModule",{value:!0});var hB=wEt(ek()),CEt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,IEt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,tk=(e,t)=>t==="foreground"?e:"bg"+e[0].toUpperCase()+e.slice(1);gB.default=(e,t,r)=>{if(!t)return e;if(t in hB.default){let a=tk(t,r);return hB.default[a](e)}if(t.startsWith("#")){let a=tk("hex",r);return hB.default[a](t)(e)}if(t.startsWith("ansi")){let a=IEt.exec(t);if(!a)return e;let n=tk(a[1],r),u=Number(a[2]);return hB.default[n](u)(e)}if(t.startsWith("rgb")||t.startsWith("hsl")||t.startsWith("hsv")||t.startsWith("hwb")){let a=CEt.exec(t);if(!a)return e;let n=tk(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return hB.default[n](u,A,p)(e)}return e}});var Pwe=_(dB=>{"use strict";var Swe=dB&&dB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dB,"__esModule",{value:!0});var BEt=Swe(fwe()),V6=Swe(J6());dB.default=(e,t,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=BEt.default[r.style.borderStyle],p=V6.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(V6.default(A.vertical,u,"foreground")+`
306`).repeat(n-2),w=V6.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(e,t,p,{transformers:[]}),o.write(e,t+1,h,{transformers:[]}),o.write(e+a-1,t+1,h,{transformers:[]}),o.write(e,t+n-1,w,{transformers:[]})}}});var bwe=_(mB=>{"use strict";var am=mB&&mB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mB,"__esModule",{value:!0});var vEt=am(om()),DEt=am(F6()),SEt=am(lwe()),PEt=am(M6()),xEt=am(cwe()),bEt=am(_6()),QEt=am(Pwe()),kEt=(e,t)=>{var r;let o=(r=e.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();t=`
307`.repeat(n)+SEt.default(t,a)}return t},xwe=(e,t,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&e.internal_static)return;let{yogaNode:p}=e;if(p){if(p.getDisplay()===vEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),w=n+p.getComputedTop(),I=u;if(typeof e.internal_transform=="function"&&(I=[e.internal_transform,...u]),e.nodeName==="ink-text"){let v=bEt.default(e);if(v.length>0){let b=DEt.default(v),E=xEt.default(p);if(b>E){let R=(o=e.style.textWrap)!==null&&o!==void 0?o:"wrap";v=PEt.default(v,E,R)}v=kEt(e,v),t.write(h,w,v,{transformers:I})}return}if(e.nodeName==="ink-box"&&QEt.default(h,w,e,t),e.nodeName==="ink-root"||e.nodeName==="ink-box")for(let v of e.childNodes)xwe(v,t,{offsetX:h,offsetY:w,transformers:I,skipStaticElements:A})}};mB.default=xwe});var kwe=_((DKt,Qwe)=>{"use strict";Qwe.exports=e=>{e=Object.assign({onlyFirst:!1},e);let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e.onlyFirst?void 0:"g")}});var Rwe=_((SKt,z6)=>{"use strict";var FEt=kwe(),Fwe=e=>typeof e=="string"?e.replace(FEt(),""):e;z6.exports=Fwe;z6.exports.default=Fwe});var Lwe=_((PKt,Nwe)=>{"use strict";var Twe="[\uD800-\uDBFF][\uDC00-\uDFFF]";Nwe.exports=e=>e&&e.exact?new RegExp(`^${Twe}$`):new RegExp(Twe,"g")});var Mwe=_((xKt,X6)=>{"use strict";var REt=Rwe(),TEt=Lwe(),Owe=e=>REt(e).replace(TEt()," ").length;X6.exports=Owe;X6.exports.default=Owe});var Hwe=_(yB=>{"use strict";var _we=yB&&yB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yB,"__esModule",{value:!0});var Uwe=_we(L6()),NEt=_we(Mwe()),Z6=class{constructor(t){this.writes=[];let{width:r,height:o}=t;this.width=r,this.height=o}write(t,r,o,a){let{transformers:n}=a;!o||this.writes.push({x:t,y:r,text:o,transformers:n})}get(){let t=[];for(let o=0;o<this.height;o++)t.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
308`),h=0;for(let w of p){let I=t[n+h];if(!I)continue;let v=NEt.default(w);for(let b of A)w=b(w);t[n+h]=Uwe.default(I,0,a)+w+Uwe.default(I,a+v),h++}}return{output:t.map(o=>o.trimRight()).join(`
309`),height:t.length}}};yB.default=Z6});var Gwe=_(EB=>{"use strict";var $6=EB&&EB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(EB,"__esModule",{value:!0});var LEt=$6(om()),jwe=$6(bwe()),qwe=$6(Hwe());EB.default=(e,t)=>{var r;if(e.yogaNode.setWidth(t),e.yogaNode){e.yogaNode.calculateLayout(void 0,void 0,LEt.default.DIRECTION_LTR);let o=new qwe.default({width:e.yogaNode.getComputedWidth(),height:e.yogaNode.getComputedHeight()});jwe.default(e,o,{skipStaticElements:!0});let a;!((r=e.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new qwe.default({width:e.staticNode.yogaNode.getComputedWidth(),height:e.staticNode.yogaNode.getComputedHeight()}),jwe.default(e.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
310`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var Jwe=_((kKt,Kwe)=>{"use strict";var Ywe=Ie("stream"),Wwe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],ej={},OEt=e=>{let t=new Ywe.PassThrough,r=new Ywe.PassThrough;t.write=a=>e("stdout",a),r.write=a=>e("stderr",a);let o=new console.Console(t,r);for(let a of Wwe)ej[a]=console[a],console[a]=o[a];return()=>{for(let a of Wwe)console[a]=ej[a];ej={}}};Kwe.exports=OEt});var rj=_(tj=>{"use strict";Object.defineProperty(tj,"__esModule",{value:!0});tj.default=new WeakMap});var ij=_(nj=>{"use strict";Object.defineProperty(nj,"__esModule",{value:!0});var MEt=nn(),Vwe=MEt.createContext({exit:()=>{}});Vwe.displayName="InternalAppContext";nj.default=Vwe});var oj=_(sj=>{"use strict";Object.defineProperty(sj,"__esModule",{value:!0});var UEt=nn(),zwe=UEt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});zwe.displayName="InternalStdinContext";sj.default=zwe});var lj=_(aj=>{"use strict";Object.defineProperty(aj,"__esModule",{value:!0});var _Et=nn(),Xwe=_Et.createContext({stdout:void 0,write:()=>{}});Xwe.displayName="InternalStdoutContext";aj.default=Xwe});var uj=_(cj=>{"use strict";Object.defineProperty(cj,"__esModule",{value:!0});var HEt=nn(),Zwe=HEt.createContext({stderr:void 0,write:()=>{}});Zwe.displayName="InternalStderrContext";cj.default=Zwe});var rk=_(Aj=>{"use strict";Object.defineProperty(Aj,"__esModule",{value:!0});var jEt=nn(),$we=jEt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});$we.displayName="InternalFocusContext";Aj.default=$we});var tCe=_((MKt,eCe)=>{"use strict";var qEt=/[|\\{}()[\]^$+*?.-]/g;eCe.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(qEt,"\\$&")}});var sCe=_((UKt,iCe)=>{"use strict";var GEt=tCe(),YEt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",nCe=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(e=>new RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));nCe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var wB=class{constructor(t){t={ignoredPackages:[],...t},"internals"in t||(t.internals=wB.nodeInternals()),"cwd"in t||(t.cwd=YEt),this._cwd=t.cwd.replace(/\\/g,"/"),this._internals=[].concat(t.internals,WEt(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...nCe]}clean(t,r=0){r=" ".repeat(r),Array.isArray(t)||(t=t.split(`
311`)),!/^\s*at /.test(t[0])&&/^\s*at /.test(t[1])&&(t=t.slice(1));let o=!1,a=null,n=[];return t.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
312`).join("")}captureString(t,r=this.captureString){typeof t=="function"&&(r=t,t=1/0);let{stackTraceLimit:o}=Error;t&&(Error.stackTraceLimit=t);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(t,r=this.capture){typeof t=="function"&&(r=t,t=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,t&&(Error.stackTraceLimit=t);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(t=this.at){let[r]=this.capture(1,t);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};rCe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(t){let r=t&&t.match(KEt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],w=r[8],I=r[9],v=r[10]==="native",b=r[11]===")",E,R={};if(w&&(R.line=Number(w)),I&&(R.column=Number(I)),b&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let V=h.slice(0,U-1);h=h.slice(U+1),a+=` (${V}`;break}}if(a){let N=a.match(JEt);N&&(a=N[1],E=N[2])}return rCe(R,h,this._cwd),o&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=A,R.evalColumn=p,R.evalFile=u&&u.replace(/\\/g,"/")),v&&(R.native=!0),a&&(R.function=a),E&&a!==E&&(R.method=E),R}};function rCe(e,t,r){t&&(t=t.replace(/\\/g,"/"),t.startsWith(`${r}/`)&&(t=t.slice(r.length+1)),e.file=t)}function WEt(e){if(e.length===0)return[];let t=e.map(r=>GEt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${t.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var KEt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),JEt=/^(.*?) \[as (.*?)\]$/;iCe.exports=wB});var aCe=_((_Kt,oCe)=>{"use strict";oCe.exports=(e,t)=>e.replace(/^\t+/gm,r=>" ".repeat(r.length*(t||2)))});var cCe=_((HKt,lCe)=>{"use strict";var VEt=aCe(),zEt=(e,t)=>{let r=[],o=e-t,a=e+t;for(let n=o;n<=a;n++)r.push(n);return r};lCe.exports=(e,t,r)=>{if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");if(e=VEt(e).split(/\r?\n/),!(t>e.length))return r={around:3,...r},zEt(t,r.around).filter(o=>e[o-1]!==void 0).map(o=>({line:o,value:e[o-1]}))}});var nk=_(iu=>{"use strict";var XEt=iu&&iu.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),ZEt=iu&&iu.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$Et=iu&&iu.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&XEt(t,e,r);return ZEt(t,e),t},ewt=iu&&iu.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};Object.defineProperty(iu,"__esModule",{value:!0});var uCe=$Et(nn()),fj=uCe.forwardRef((e,t)=>{var{children:r}=e,o=ewt(e,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||o.padding||0,paddingBottom:o.paddingBottom||o.paddingY||o.padding||0});return uCe.default.createElement("ink-box",{ref:t,style:a},r)});fj.displayName="Box";fj.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};iu.default=fj});var gj=_(CB=>{"use strict";var pj=CB&&CB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(CB,"__esModule",{value:!0});var twt=pj(nn()),_w=pj(ek()),ACe=pj(J6()),hj=({color:e,backgroundColor:t,dimColor:r,bold:o,italic:a,underline:n,strikethrough:u,inverse:A,wrap:p,children:h})=>{if(h==null)return null;let w=I=>(r&&(I=_w.default.dim(I)),e&&(I=ACe.default(I,e,"foreground")),t&&(I=ACe.default(I,t,"background")),o&&(I=_w.default.bold(I)),a&&(I=_w.default.italic(I)),n&&(I=_w.default.underline(I)),u&&(I=_w.default.strikethrough(I)),A&&(I=_w.default.inverse(I)),I);return twt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:p},internal_transform:w},h)};hj.displayName="Text";hj.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};CB.default=hj});var gCe=_(su=>{"use strict";var rwt=su&&su.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),nwt=su&&su.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),iwt=su&&su.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&rwt(t,e,r);return nwt(t,e),t},IB=su&&su.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(su,"__esModule",{value:!0});var fCe=iwt(Ie("fs")),ps=IB(nn()),pCe=IB(sCe()),swt=IB(cCe()),Xf=IB(nk()),gA=IB(gj()),hCe=new pCe.default({cwd:process.cwd(),internals:pCe.default.nodeInternals()}),owt=({error:e})=>{let t=e.stack?e.stack.split(`
313`).slice(1):void 0,r=t?hCe.parseLine(t[0]):void 0,o,a=0;if(r?.file&&r?.line&&fCe.existsSync(r.file)){let n=fCe.readFileSync(r.file,"utf8");if(o=swt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return ps.default.createElement(Xf.default,{flexDirection:"column",padding:1},ps.default.createElement(Xf.default,null,ps.default.createElement(gA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),ps.default.createElement(gA.default,null," ",e.message)),r&&ps.default.createElement(Xf.default,{marginTop:1},ps.default.createElement(gA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&ps.default.createElement(Xf.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>ps.default.createElement(Xf.default,{key:n},ps.default.createElement(Xf.default,{width:a+1},ps.default.createElement(gA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),ps.default.createElement(gA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),e.stack&&ps.default.createElement(Xf.default,{marginTop:1,flexDirection:"column"},e.stack.split(`
314`).slice(1).map(n=>{let u=hCe.parseLine(n);return u?ps.default.createElement(Xf.default,{key:n},ps.default.createElement(gA.default,{dimColor:!0},"- "),ps.default.createElement(gA.default,{dimColor:!0,bold:!0},u.function),ps.default.createElement(gA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):ps.default.createElement(Xf.default,{key:n},ps.default.createElement(gA.default,{dimColor:!0},"- "),ps.default.createElement(gA.default,{dimColor:!0,bold:!0},n))})))};su.default=owt});var mCe=_(ou=>{"use strict";var awt=ou&&ou.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),lwt=ou&&ou.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cwt=ou&&ou.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&awt(t,e,r);return lwt(t,e),t},cm=ou&&ou.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ou,"__esModule",{value:!0});var lm=cwt(nn()),dCe=cm(f6()),uwt=cm(ij()),Awt=cm(oj()),fwt=cm(lj()),pwt=cm(uj()),hwt=cm(rk()),gwt=cm(gCe()),dwt=" ",mwt="\x1B[Z",ywt="\x1B",ik=class extends lm.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=t=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
315Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
316Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),t){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=t=>{t===""&&this.props.exitOnCtrlC&&this.handleExit(),t===ywt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(t===dwt&&this.focusNext(),t===mwt&&this.focusPrevious())},this.handleExit=t=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(t)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(t=>{let r=t.focusables[0].id;return{activeFocusId:this.findNextFocusable(t)||r}})},this.focusPrevious=()=>{this.setState(t=>{let r=t.focusables[t.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(t)||r}})},this.addFocusable=(t,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=t),{activeFocusId:a,focusables:[...o.focusables,{id:t,isActive:!0}]}})},this.removeFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==t)}))},this.activateFocusable=t=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==t?o:{id:t,isActive:!0})}))},this.deactivateFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==t?o:{id:t,isActive:!1})}))},this.findNextFocusable=t=>{let r=t.focusables.findIndex(o=>o.id===t.activeFocusId);for(let o=r+1;o<t.focusables.length;o++)if(t.focusables[o].isActive)return t.focusables[o].id},this.findPreviousFocusable=t=>{let r=t.focusables.findIndex(o=>o.id===t.activeFocusId);for(let o=r-1;o>=0;o--)if(t.focusables[o].isActive)return t.focusables[o].id}}static getDerivedStateFromError(t){return{error:t}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return lm.default.createElement(uwt.default.Provider,{value:{exit:this.handleExit}},lm.default.createElement(Awt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},lm.default.createElement(fwt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},lm.default.createElement(pwt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},lm.default.createElement(hwt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?lm.default.createElement(gwt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){dCe.default.hide(this.props.stdout)}componentWillUnmount(){dCe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(t){this.handleExit(t)}};ou.default=ik;ik.displayName="InternalApp"});var wCe=_(au=>{"use strict";var Ewt=au&&au.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),wwt=au&&au.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cwt=au&&au.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ewt(t,e,r);return wwt(t,e),t},lu=au&&au.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(au,"__esModule",{value:!0});var Iwt=lu(nn()),yCe=aM(),Bwt=lu(sEe()),vwt=lu(a6()),Dwt=lu(AEe()),Swt=lu(pEe()),dj=lu(owe()),Pwt=lu(Gwe()),xwt=lu(A6()),bwt=lu(Jwe()),Qwt=Cwt(H6()),kwt=lu(rj()),Fwt=lu(mCe()),Hw=process.env.CI==="false"?!1:Dwt.default,ECe=()=>{},mj=class{constructor(t){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:o,staticOutput:a}=Pwt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`
317`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(Hw){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(vwt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},Swt.default(this),this.options=t,this.rootNode=Qwt.createNode("ink-root"),this.rootNode.onRender=t.debug?this.onRender:yCe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=Bwt.default.create(t.stdout),this.throttledLog=t.debug?this.log:yCe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=dj.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=xwt.default(this.unmount,{alwaysLast:!1}),t.patchConsole&&this.patchConsole(),Hw||(t.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{t.stdout.off("resize",this.onRender)})}render(t){let r=Iwt.default.createElement(Fwt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},t);dj.default.updateContainer(r,this.container,null,ECe)}writeToStdout(t){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(t+this.fullStaticOutput+this.lastOutput);return}if(Hw){this.options.stdout.write(t);return}this.log.clear(),this.options.stdout.write(t),this.log(this.lastOutput)}}writeToStderr(t){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(t),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Hw){this.options.stderr.write(t);return}this.log.clear(),this.options.stderr.write(t),this.log(this.lastOutput)}}unmount(t){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),Hw?this.options.stdout.write(this.lastOutput+`
318`):this.options.debug||this.log.done(),this.isUnmounted=!0,dj.default.updateContainer(null,this.container,null,ECe),kwt.default.delete(this.options.stdout),t instanceof Error?this.rejectExitPromise(t):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((t,r)=>{this.resolveExitPromise=t,this.rejectExitPromise=r})),this.exitPromise}clear(){!Hw&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=bwt.default((t,r)=>{t==="stdout"&&this.writeToStdout(r),t==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};au.default=mj});var ICe=_(BB=>{"use strict";var CCe=BB&&BB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(BB,"__esModule",{value:!0});var Rwt=CCe(wCe()),sk=CCe(rj()),Twt=Ie("stream"),Nwt=(e,t)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},Lwt(t)),o=Owt(r.stdout,()=>new Rwt.default(r));return o.render(e),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>sk.default.delete(r.stdout),clear:o.clear}};BB.default=Nwt;var Lwt=(e={})=>e instanceof Twt.Stream?{stdout:e,stdin:process.stdin}:e,Owt=(e,t)=>{let r;return sk.default.has(e)?r=sk.default.get(e):(r=t(),sk.default.set(e,r)),r}});var vCe=_(Zf=>{"use strict";var Mwt=Zf&&Zf.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),Uwt=Zf&&Zf.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_wt=Zf&&Zf.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Mwt(t,e,r);return Uwt(t,e),t};Object.defineProperty(Zf,"__esModule",{value:!0});var vB=_wt(nn()),BCe=e=>{let{items:t,children:r,style:o}=e,[a,n]=vB.useState(0),u=vB.useMemo(()=>t.slice(a),[t,a]);vB.useLayoutEffect(()=>{n(t.length)},[t.length]);let A=u.map((h,w)=>r(h,a+w)),p=vB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return vB.default.createElement("ink-box",{internal_static:!0,style:p},A)};BCe.displayName="Static";Zf.default=BCe});var SCe=_(DB=>{"use strict";var Hwt=DB&&DB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(DB,"__esModule",{value:!0});var jwt=Hwt(nn()),DCe=({children:e,transform:t})=>e==null?null:jwt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:t},e);DCe.displayName="Transform";DB.default=DCe});var xCe=_(SB=>{"use strict";var qwt=SB&&SB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(SB,"__esModule",{value:!0});var Gwt=qwt(nn()),PCe=({count:e=1})=>Gwt.default.createElement("ink-text",null,`
319`.repeat(e));PCe.displayName="Newline";SB.default=PCe});var kCe=_(PB=>{"use strict";var bCe=PB&&PB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(PB,"__esModule",{value:!0});var Ywt=bCe(nn()),Wwt=bCe(nk()),QCe=()=>Ywt.default.createElement(Wwt.default,{flexGrow:1});QCe.displayName="Spacer";PB.default=QCe});var ok=_(xB=>{"use strict";var Kwt=xB&&xB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xB,"__esModule",{value:!0});var Jwt=nn(),Vwt=Kwt(oj()),zwt=()=>Jwt.useContext(Vwt.default);xB.default=zwt});var RCe=_(bB=>{"use strict";var Xwt=bB&&bB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bB,"__esModule",{value:!0});var FCe=nn(),Zwt=Xwt(ok()),$wt=(e,t={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=Zwt.default();FCe.useEffect(()=>{if(t.isActive!==!1)return o(!0),()=>{o(!1)}},[t.isActive,o]),FCe.useEffect(()=>{if(t.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",w=A>="\u0410"&&A<="\u042F";A.length===1&&(h||w)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&e(A,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[t.isActive,r,a,e])};bB.default=$wt});var TCe=_(QB=>{"use strict";var eCt=QB&&QB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(QB,"__esModule",{value:!0});var tCt=nn(),rCt=eCt(ij()),nCt=()=>tCt.useContext(rCt.default);QB.default=nCt});var NCe=_(kB=>{"use strict";var iCt=kB&&kB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kB,"__esModule",{value:!0});var sCt=nn(),oCt=iCt(lj()),aCt=()=>sCt.useContext(oCt.default);kB.default=aCt});var LCe=_(FB=>{"use strict";var lCt=FB&&FB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(FB,"__esModule",{value:!0});var cCt=nn(),uCt=lCt(uj()),ACt=()=>cCt.useContext(uCt.default);FB.default=ACt});var MCe=_(TB=>{"use strict";var OCe=TB&&TB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(TB,"__esModule",{value:!0});var RB=nn(),fCt=OCe(rk()),pCt=OCe(ok()),hCt=({isActive:e=!0,autoFocus:t=!1}={})=>{let{isRawModeSupported:r,setRawMode:o}=pCt.default(),{activeId:a,add:n,remove:u,activate:A,deactivate:p}=RB.useContext(fCt.default),h=RB.useMemo(()=>Math.random().toString().slice(2,7),[]);return RB.useEffect(()=>(n(h,{autoFocus:t}),()=>{u(h)}),[h,t]),RB.useEffect(()=>{e?A(h):p(h)},[e,h]),RB.useEffect(()=>{if(!(!r||!e))return o(!0),()=>{o(!1)}},[e]),{isFocused:Boolean(h)&&a===h}};TB.default=hCt});var UCe=_(NB=>{"use strict";var gCt=NB&&NB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(NB,"__esModule",{value:!0});var dCt=nn(),mCt=gCt(rk()),yCt=()=>{let e=dCt.useContext(mCt.default);return{enableFocus:e.enableFocus,disableFocus:e.disableFocus,focusNext:e.focusNext,focusPrevious:e.focusPrevious}};NB.default=yCt});var _Ce=_(yj=>{"use strict";Object.defineProperty(yj,"__esModule",{value:!0});yj.default=e=>{var t,r,o,a;return{width:(r=(t=e.yogaNode)===null||t===void 0?void 0:t.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=e.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var ic=_(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var ECt=ICe();Object.defineProperty(ro,"render",{enumerable:!0,get:function(){return ECt.default}});var wCt=nk();Object.defineProperty(ro,"Box",{enumerable:!0,get:function(){return wCt.default}});var CCt=gj();Object.defineProperty(ro,"Text",{enumerable:!0,get:function(){return CCt.default}});var ICt=vCe();Object.defineProperty(ro,"Static",{enumerable:!0,get:function(){return ICt.default}});var BCt=SCe();Object.defineProperty(ro,"Transform",{enumerable:!0,get:function(){return BCt.default}});var vCt=xCe();Object.defineProperty(ro,"Newline",{enumerable:!0,get:function(){return vCt.default}});var DCt=kCe();Object.defineProperty(ro,"Spacer",{enumerable:!0,get:function(){return DCt.default}});var SCt=RCe();Object.defineProperty(ro,"useInput",{enumerable:!0,get:function(){return SCt.default}});var PCt=TCe();Object.defineProperty(ro,"useApp",{enumerable:!0,get:function(){return PCt.default}});var xCt=ok();Object.defineProperty(ro,"useStdin",{enumerable:!0,get:function(){return xCt.default}});var bCt=NCe();Object.defineProperty(ro,"useStdout",{enumerable:!0,get:function(){return bCt.default}});var QCt=LCe();Object.defineProperty(ro,"useStderr",{enumerable:!0,get:function(){return QCt.default}});var kCt=MCe();Object.defineProperty(ro,"useFocus",{enumerable:!0,get:function(){return kCt.default}});var FCt=UCe();Object.defineProperty(ro,"useFocusManager",{enumerable:!0,get:function(){return FCt.default}});var RCt=_Ce();Object.defineProperty(ro,"measureElement",{enumerable:!0,get:function(){return RCt.default}})});var wj={};Jt(wj,{Gem:()=>Ej});var HCe,um,Ej,ak=yt(()=>{HCe=$e(ic()),um=$e(nn()),Ej=(0,um.memo)(({active:e})=>{let t=(0,um.useMemo)(()=>e?"\u25C9":"\u25EF",[e]),r=(0,um.useMemo)(()=>e?"green":"yellow",[e]);return um.default.createElement(HCe.Text,{color:r},t)})});var qCe={};Jt(qCe,{useKeypress:()=>Am});function Am({active:e},t,r){let{stdin:o}=(0,jCe.useStdin)(),a=(0,lk.useCallback)((n,u)=>t(n,u),r);(0,lk.useEffect)(()=>{if(!(!e||!o))return o.on("keypress",a),()=>{o.off("keypress",a)}},[e,a,o])}var jCe,lk,LB=yt(()=>{jCe=$e(ic()),lk=$e(nn())});var YCe={};Jt(YCe,{FocusRequest:()=>GCe,useFocusRequest:()=>Cj});var GCe,Cj,Ij=yt(()=>{LB();GCe=(r=>(r.BEFORE="before",r.AFTER="after",r))(GCe||{}),Cj=function({active:e},t,r){Am({active:e},(o,a)=>{a.name==="tab"&&(a.shift?t("before"):t("after"))},r)}});var WCe={};Jt(WCe,{useListInput:()=>OB});var OB,ck=yt(()=>{LB();OB=function(e,t,{active:r,minus:o,plus:a,set:n,loop:u=!0}){Am({active:r},(A,p)=>{let h=t.indexOf(e);switch(p.name){case o:{let w=h-1;if(u){n(t[(t.length+w)%t.length]);return}if(w<0)return;n(t[w])}break;case a:{let w=h+1;if(u){n(t[w%t.length]);return}if(w>=t.length)return;n(t[w])}break}},[t,e,a,n,u])}});var uk={};Jt(uk,{ScrollableItems:()=>TCt});var E0,La,TCt,Ak=yt(()=>{E0=$e(ic()),La=$e(nn());Ij();ck();TCt=({active:e=!0,children:t=[],radius:r=10,size:o=1,loop:a=!0,onFocusRequest:n,willReachEnd:u})=>{let A=N=>{if(N.key===null)throw new Error("Expected all children to have a key");return N.key},p=La.default.Children.map(t,N=>A(N)),h=p[0],[w,I]=(0,La.useState)(h),v=p.indexOf(w);(0,La.useEffect)(()=>{p.includes(w)||I(h)},[t]),(0,La.useEffect)(()=>{u&&v>=p.length-2&&u()},[v]),Cj({active:e&&!!n},N=>{n?.(N)},[n]),OB(w,p,{active:e,minus:"up",plus:"down",set:I,loop:a});let b=v-r,E=v+r;E>p.length&&(b-=E-p.length,E=p.length),b<0&&(E+=-b,b=0),E>=p.length&&(E=p.length-1);let R=[];for(let N=b;N<=E;++N){let U=p[N],V=e&&U===w;R.push(La.default.createElement(E0.Box,{key:U,height:o},La.default.createElement(E0.Box,{marginLeft:1,marginRight:1},La.default.createElement(E0.Text,null,V?La.default.createElement(E0.Text,{color:"cyan",bold:!0},">"):" ")),La.default.createElement(E0.Box,null,La.default.cloneElement(t[N],{active:V}))))}return La.default.createElement(E0.Box,{flexDirection:"column",width:"100%"},R)}});var KCe,$f,JCe,Bj,VCe,vj=yt(()=>{KCe=$e(ic()),$f=$e(nn()),JCe=Ie("readline"),Bj=$f.default.createContext(null),VCe=({children:e})=>{let{stdin:t,setRawMode:r}=(0,KCe.useStdin)();(0,$f.useEffect)(()=>{r&&r(!0),t&&(0,JCe.emitKeypressEvents)(t)},[t,r]);let[o,a]=(0,$f.useState)(new Map),n=(0,$f.useMemo)(()=>({getAll:()=>o,get:u=>o.get(u),set:(u,A)=>a(new Map([...o,[u,A]]))}),[o,a]);return $f.default.createElement(Bj.Provider,{value:n,children:e})}});var Dj={};Jt(Dj,{useMinistore:()=>NCt});function NCt(e,t){let r=(0,fk.useContext)(Bj);if(r===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof e>"u")return r.getAll();let o=(0,fk.useCallback)(n=>{r.set(e,n)},[e,r.set]),a=r.get(e);return typeof a>"u"&&(a=t),[a,o]}var fk,Sj=yt(()=>{fk=$e(nn());vj()});var hk={};Jt(hk,{renderForm:()=>LCt});async function LCt(e,t,{stdin:r,stdout:o,stderr:a}){let n,u=p=>{let{exit:h}=(0,pk.useApp)();Am({active:!0},(w,I)=>{I.name==="return"&&(n=p,h())},[h,p])},{waitUntilExit:A}=(0,pk.render)(Pj.default.createElement(VCe,null,Pj.default.createElement(e,{...t,useSubmit:u})),{stdin:r,stdout:o,stderr:a});return await A(),n}var pk,Pj,gk=yt(()=>{pk=$e(ic()),Pj=$e(nn());vj();LB()});var $Ce=_(MB=>{"use strict";Object.defineProperty(MB,"__esModule",{value:!0});MB.UncontrolledTextInput=void 0;var XCe=nn(),xj=nn(),zCe=ic(),fm=ek(),ZCe=({value:e,placeholder:t="",focus:r=!0,mask:o,highlightPastedText:a=!1,showCursor:n=!0,onChange:u,onSubmit:A})=>{let[{cursorOffset:p,cursorWidth:h},w]=xj.useState({cursorOffset:(e||"").length,cursorWidth:0});xj.useEffect(()=>{w(R=>{if(!r||!n)return R;let N=e||"";return R.cursorOffset>N.length-1?{cursorOffset:N.length,cursorWidth:0}:R})},[e,r,n]);let I=a?h:0,v=o?o.repeat(e.length):e,b=v,E=t?fm.grey(t):void 0;if(n&&r){E=t.length>0?fm.inverse(t[0])+fm.grey(t.slice(1)):fm.inverse(" "),b=v.length>0?"":fm.inverse(" ");let R=0;for(let N of v)R>=p-I&&R<=p?b+=fm.inverse(N):b+=N,R++;v.length>0&&p===v.length&&(b+=fm.inverse(" "))}return zCe.useInput((R,N)=>{if(N.upArrow||N.downArrow||N.ctrl&&R==="c"||N.tab||N.shift&&N.tab)return;if(N.return){A&&A(e);return}let U=p,V=e,ee=0;N.leftArrow?n&&U--:N.rightArrow?n&&U++:N.backspace||N.delete?p>0&&(V=e.slice(0,p-1)+e.slice(p,e.length),U--):(V=e.slice(0,p)+R+e.slice(p,e.length),U+=R.length,R.length>1&&(ee=R.length)),p<0&&(U=0),p>e.length&&(U=e.length),w({cursorOffset:U,cursorWidth:ee}),V!==e&&u(V)},{isActive:r}),XCe.createElement(zCe.Text,null,t?v.length>0?b:E:b)};MB.default=ZCe;MB.UncontrolledTextInput=e=>{let[t,r]=xj.useState("");return XCe.createElement(ZCe,Object.assign({},e,{value:t,onChange:r}))}});var rIe={};Jt(rIe,{Pad:()=>bj});var eIe,tIe,bj,Qj=yt(()=>{eIe=$e(ic()),tIe=$e(nn()),bj=({length:e,active:t})=>{if(e===0)return null;let r=e>1?` ${"-".repeat(e-1)}`:" ";return tIe.default.createElement(eIe.Text,{dimColor:!t},r)}});var nIe={};Jt(nIe,{ItemOptions:()=>OCt});var _B,C0,OCt,iIe=yt(()=>{_B=$e(ic()),C0=$e(nn());ck();ak();Qj();OCt=function({active:e,skewer:t,options:r,value:o,onChange:a,sizes:n=[]}){let u=r.filter(({label:p})=>!!p).map(({value:p})=>p),A=r.findIndex(p=>p.value===o&&p.label!="");return OB(o,u,{active:e,minus:"left",plus:"right",set:a}),C0.default.createElement(C0.default.Fragment,null,r.map(({label:p},h)=>{let w=h===A,I=n[h]-1||0,v=p.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),b=Math.max(0,I-v.length-2);return p?C0.default.createElement(_B.Box,{key:p,width:I,marginLeft:1},C0.default.createElement(_B.Text,{wrap:"truncate"},C0.default.createElement(Ej,{active:w})," ",p),t?C0.default.createElement(bj,{active:e,length:b}):null):C0.default.createElement(_B.Box,{key:`spacer-${h}`,width:I,marginLeft:1})}))}});var wIe=_((bVt,EIe)=>{var Uj;EIe.exports=()=>(typeof Uj>"u"&&(Uj=Ie("zlib").brotliDecompressSync(Buffer.from("W8pvVqLidXKoN8D++ytrk9rWiMd2SdJxgD8rjcjVnR4x8rCHPcl0XhNzkzIe9gxVNSupjLFNdPsBEK2q2pLlSBhVaKjoFGgI7qKaA+npzoPObqxgIYoSOS6j32tr4NrOkrEEdSyREbpJUaq5z1kmsh4IP0kv2OVv7f1htURC6F+KdrxfciWxRVLxOP48xp90iiRM+zmAjluvEsAI4YRNahSNmBQLMejwnRyaa/RM7t//bFqd7cvpWc1MSwR9e8Jmls3xhGwkYrMtwGVMJ6GFf8uc9ampHuQPYs8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L+zJTilaUi9tShVsB0aP2DQ4DxzNuFJ6sqFgkS7PCWJGBnGQcTga6sAIq8Srmje0ar1ZuneNQRvVh/NxUeb1e6RGZx3i+LhrSVLCe2qQIc7W5dKmSVVVXsvBmj2jSQveC7qHgswMR/BEHACo93D27z3RLu9HFwgC0O7P9iFLKtwIewVsXTZp8FiJ80b24a1QOZCDiyxCLdZPDHF1xSf0VLaKMCLjRPcyJPcax+x4rxnw3ScjHx1gsiTw7EPm3VXWgQzoLPI0aubRQehewDPjtpRwgfhRu8jA6TRC7REO8BIboPPR//oSMK9y4ZWSx6sUi3SqEhvh5Olr6RihjHF11wYfEO1H6M+Ou2U0dBTJcgTxS8B7HSzPIDBXgRTsl60igRICUimvFfOLFjTJl4UJLGZAT2aUi5F5G9WAuLM274KHWvV4iC2yXVo2hTS5GVR9Qfm0c0SSeSKrSEaNA53k/GCG+um1gUdEwgLjXK0i9kbwIQFpwF1Mt7VNvCpwKT7CT+yDL+prymme1hCbCyWI/xXbVrjSB80wr2QUua353PVIYi4ar/gI1X0dy9k6EDRz8exdhMu8YIGwTCLvxrqvd0Vfl7tCIUSOu9hF/GfznrAHPPRepjIRed8avCTjjVipbQbjVrXLAuHULLbQdglwrEDYHEw/eMCzBfxODu0OWuy1za7r6gj5Fd24/02Kr3UYGdOxIoyTc1l7qKE1FHWK/I50+uka4BAcPLWTl5LJvJFovv1itnI7KTe1q3UU9Ym+tGejzJ7BZxQVMi1/6/f/uuO3APzWj1ny/y6MYzjj9yczH6GPZ8s8SFAW/F7HUKdjbNPdlb+3aznJvLqVDWI1wv0AZrvlSJfNzx37HsVKTxyY7XaamY97wvxeLPzASU9lWKAwgNYwbblbzD9zQHYGXH52SBdPp9JFBBK7iSF17x1VmZxURAJ0SG1nhOoqN410dE1Mqym/svtoJvYC35PYpXacru3AA=","base64")).toString()),Uj)});var HIe=_((ezt,_Ie)=>{var Jj=Symbol("arg flag"),Oa=class extends Error{constructor(t,r){super(t),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,Oa.prototype)}};function rv(e,{argv:t=process.argv.slice(2),permissive:r=!1,stopAtPositional:o=!1}={}){if(!e)throw new Oa("argument specification object is required","ARG_CONFIG_NO_SPEC");let a={_:[]},n={},u={};for(let A of Object.keys(e)){if(!A)throw new Oa("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(A[0]!=="-")throw new Oa(`argument key must start with '-' but found: '${A}'`,"ARG_CONFIG_NONOPT_KEY");if(A.length===1)throw new Oa(`argument key must have a name; singular '-' keys are not allowed: ${A}`,"ARG_CONFIG_NONAME_KEY");if(typeof e[A]=="string"){n[A]=e[A];continue}let p=e[A],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]=="function"){let[w]=p;p=(I,v,b=[])=>(b.push(w(I,v,b[b.length-1])),b),h=w===Boolean||w[Jj]===!0}else if(typeof p=="function")h=p===Boolean||p[Jj]===!0;else throw new Oa(`type missing or not a function or valid array type: ${A}`,"ARG_CONFIG_VAD_TYPE");if(A[1]!=="-"&&A.length>2)throw new Oa(`short argument keys (with a single hyphen) must have only one character: ${A}`,"ARG_CONFIG_SHORTOPT_TOOLONG");u[A]=[p,h]}for(let A=0,p=t.length;A<p;A++){let h=t[A];if(o&&a._.length>0){a._=a._.concat(t.slice(A));break}if(h==="--"){a._=a._.concat(t.slice(A+1));break}if(h.length>1&&h[0]==="-"){let w=h[1]==="-"||h.length===2?[h]:h.slice(1).split("").map(I=>`-${I}`);for(let I=0;I<w.length;I++){let v=w[I],[b,E]=v[1]==="-"?v.split(/=(.*)/,2):[v,void 0],R=b;for(;R in n;)R=n[R];if(!(R in u))if(r){a._.push(v);continue}else throw new Oa(`unknown or unexpected option: ${b}`,"ARG_UNKNOWN_OPTION");let[N,U]=u[R];if(!U&&I+1<w.length)throw new Oa(`option requires argument (but was followed by another short argument): ${b}`,"ARG_MISSING_REQUIRED_SHORTARG");if(U)a[R]=N(!0,R,a[R]);else if(E===void 0){if(t.length<A+2||t[A+1].length>1&&t[A+1][0]==="-"&&!(t[A+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(N===Number||typeof BigInt<"u"&&N===BigInt))){let V=b===R?"":` (alias for ${R})`;throw new Oa(`option requires argument: ${b}${V}`,"ARG_MISSING_REQUIRED_LONGARG")}a[R]=N(t[A+1],R,a[R]),++A}else a[R]=N(E,R,a[R])}}else a._.push(h)}return a}rv.flag=e=>(e[Jj]=!0,e);rv.COUNT=rv.flag((e,t,r)=>(r||0)+1);rv.ArgError=Oa;_Ie.exports=rv});var zIe=_((Szt,VIe)=>{var $j;VIe.exports=()=>(typeof $j>"u"&&($j=Ie("zlib").brotliDecompressSync(Buffer.from("Wz4OIYpq1pWNDJRURgABywG7cfwjIlYtSe2M2l1JEHnVb9HbfhRbIXQGuMOKmF79fmnZXZfTn3aivLU4ZMk5yCH28lYagcZsY8QCE+Tnoqidv9Dqa9pcxPmfTe2eyw0tQ2RwEU7X+FlbSseT/aIoxvXPIk4yvqnq71qmF4VRCFoBotU8HdPrZDjGL6WC8u3d3P8ypWpjj8kC1EIv+VTsVVf1N9enahUWns4vS3EcWJbPTFV3LxO3uNCX29OHrc0NMt8WYhDw4aWk+/37pakjGxCPHPnkDu0omNmDRA4VZA4ydtV9dQ96QYtoLObSg9kg7Rity6uq9z+6GxBPAySPwOF4XdYsHqUKFUYgvWax7fm1f/UiwpOPMtk7eyfIFo39h+YE9wewrYwwBSPEvpaNK/zbuIsUMmh/b/aHzP8/bmo3p/N910IgIUAIVAv2/m3U8tdr7a0zVSGEwL8hZFHzx7J/dOUfuuI/TSYEKx6DtgshauiqDT/l3PFc1ywYhqqwHcv7q/UJw3Gw7vhPZ0TFS3c+xdOPPRqAHPYZTmqsLJM/qx94q7wvpOPwMsUGCWacd4CbqJzM4PdS5ZrqsvaiuC4esSkvr1J+MGNg283TsssQsQ4xGCJ/CVx6ZPW7YsBavwna/zpAaIAcS22RWN8A9u9rjHCW74+wNXKh7B5O1hGK2EUzZME2GXtx/DH6FMWfwArpz9e7TwuQB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ntlkf6vsroN8ffN2usQlsQXGqWNFAwoi+yjm8A3MDCNlLPAKRb9ggK1fBZp85OfovuIV4qX+GD/xuA4SqTfEO5hgQptPiJg0RyAqlG9g9CAjDbMeySfaCa97CgnOuTEPHOfPLL3TLW68biMC1MjQFJDt93NT+gGmzEF50fM7k8YlZ7esHD6engr2qwXfG//1xvL7A0GNdV3JiW8wOY5TX0+7V8PIMMmHJMQxoNpjmW+4JsDah7WzNU1qNkhP/KA+Mmv58hbGQmkjQD","base64")).toString()),$j)});var t1e=_((sq,oq)=>{(function(e){sq&&typeof sq=="object"&&typeof oq<"u"?oq.exports=e():typeof define=="function"&&define.amd?define([],e):typeof window<"u"?window.isWindows=e():typeof global<"u"?global.isWindows=e():typeof self<"u"?self.isWindows=e():this.isWindows=e()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var s1e=_((vXt,i1e)=>{"use strict";aq.ifExists=NIt;var qw=Ie("util"),sc=Ie("path"),r1e=t1e(),FIt=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,RIt={createPwshFile:!0,createCmdFile:r1e(),fs:Ie("fs")},TIt=new Map([[".js","node"],[".cjs","node"],[".mjs","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function n1e(e){let t={...RIt,...e},r=t.fs;return t.fs_={chmod:r.chmod?qw.promisify(r.chmod):async()=>{},mkdir:qw.promisify(r.mkdir),readFile:qw.promisify(r.readFile),stat:qw.promisify(r.stat),unlink:qw.promisify(r.unlink),writeFile:qw.promisify(r.writeFile)},t}async function aq(e,t,r){let o=n1e(r);await o.fs_.stat(e),await OIt(e,t,o)}function NIt(e,t,r){return aq(e,t,r).catch(()=>{})}function LIt(e,t){return t.fs_.unlink(e).catch(()=>{})}async function OIt(e,t,r){let o=await jIt(e,r);return await MIt(t,r),UIt(e,t,o,r)}function MIt(e,t){return t.fs_.mkdir(sc.dirname(e),{recursive:!0})}function UIt(e,t,r,o){let a=n1e(o),n=[{generator:YIt,extension:""}];return a.createCmdFile&&n.push({generator:GIt,extension:".cmd"}),a.createPwshFile&&n.push({generator:WIt,extension:".ps1"}),Promise.all(n.map(u=>qIt(e,t+u.extension,r,u.generator,a)))}function _It(e,t){return LIt(e,t)}function HIt(e,t){return KIt(e,t)}async function jIt(e,t){let a=(await t.fs_.readFile(e,"utf8")).trim().split(/\r*\n/)[0].match(FIt);if(!a){let n=sc.extname(e).toLowerCase();return{program:TIt.get(n)||null,additionalArgs:""}}return{program:a[1],additionalArgs:a[2]}}async function qIt(e,t,r,o,a){let n=a.preserveSymlinks?"--preserve-symlinks":"",u=[r.additionalArgs,n].filter(A=>A).join(" ");return a=Object.assign({},a,{prog:r.program,args:u}),await _It(t,a),await a.fs_.writeFile(t,o(e,t,a),"utf8"),HIt(t,a)}function GIt(e,t,r){let a=sc.relative(sc.dirname(t),e).split("/").join("\\"),n=sc.isAbsolute(a)?`"${a}"`:`"%~dp0\\${a}"`,u,A=r.prog,p=r.args||"",h=lq(r.nodePath).win32;A?(u=`"%~dp0\\${A}.exe"`,a=n):(A=n,p="",a="");let w=r.progArgs?`${r.progArgs.join(" ")} `:"",I=h?`@SET NODE_PATH=${h}\r
320`:"";return u?I+=`@IF EXIST ${u} (\r
321 ${u} ${p} ${a} ${w}%*\r
322) ELSE (\r
323 @SETLOCAL\r
324 @SET PATHEXT=%PATHEXT:;.JS;=;%\r
325 ${A} ${p} ${a} ${w}%*\r
326)\r
327`:I+=`@${A} ${p} ${a} ${w}%*\r
328`,I}function YIt(e,t,r){let o=sc.relative(sc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=sc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=lq(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",w=`#!/bin/sh
329basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
330
331case \`uname\` in
332 *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
333esac
334
335`,I=r.nodePath?`export NODE_PATH="${p}"
336`:"";return n?w+=`${I}if [ -x ${n} ]; then
337 exec ${n} ${A} ${o} ${h}"$@"
338else
339 exec ${a} ${A} ${o} ${h}"$@"
340fi
341`:w+=`${I}${a} ${A} ${o} ${h}"$@"
342exit $?
343`,w}function WIt(e,t,r){let o=sc.relative(sc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=sc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=lq(r.nodePath),w=h.win32,I=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let v=r.progArgs?`${r.progArgs.join(" ")} `:"",b=`#!/usr/bin/env pwsh
344$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
345
346$exe=""
347${r.nodePath?`$env_node_path=$env:NODE_PATH
348$env:NODE_PATH="${w}"
349`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
350 # Fix case when both the Windows and Linux builds of Node
351 # are installed in the same directory
352 $exe=".exe"
353}`;return r.nodePath&&(b+=` else {
354 $env:NODE_PATH="${I}"
355}`),u?b+=`
356$ret=0
357if (Test-Path ${u}) {
358 # Support pipeline input
359 if ($MyInvocation.ExpectingInput) {
360 $input | & ${u} ${p} ${o} ${v}$args
361 } else {
362 & ${u} ${p} ${o} ${v}$args
363 }
364 $ret=$LASTEXITCODE
365} else {
366 # Support pipeline input
367 if ($MyInvocation.ExpectingInput) {
368 $input | & ${n} ${p} ${o} ${v}$args
369 } else {
370 & ${n} ${p} ${o} ${v}$args
371 }
372 $ret=$LASTEXITCODE
373}
374${r.nodePath?`$env:NODE_PATH=$env_node_path
375`:""}exit $ret
376`:b+=`
377# Support pipeline input
378if ($MyInvocation.ExpectingInput) {
379 $input | & ${n} ${p} ${o} ${v}$args
380} else {
381 & ${n} ${p} ${o} ${v}$args
382}
383${r.nodePath?`$env:NODE_PATH=$env_node_path
384`:""}exit $LASTEXITCODE
385`,b}function KIt(e,t){return t.fs_.chmod(e,493)}function lq(e){if(!e)return{win32:"",posix:""};let t=typeof e=="string"?e.split(sc.delimiter):Array.from(e),r={};for(let o=0;o<t.length;o++){let a=t[o].split("/").join("\\"),n=r1e()?t[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):t[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}i1e.exports=aq});var Bq=_((YZt,S1e)=>{S1e.exports=Ie("stream")});var Q1e=_((WZt,b1e)=>{"use strict";function P1e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,o)}return r}function m1t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P1e(Object(r),!0).forEach(function(o){y1t(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P1e(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function y1t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E1t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x1e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function w1t(e,t,r){return t&&x1e(e.prototype,t),r&&x1e(e,r),e}var C1t=Ie("buffer"),xk=C1t.Buffer,I1t=Ie("util"),vq=I1t.inspect,B1t=vq&&vq.custom||"inspect";function v1t(e,t,r){xk.prototype.copy.call(e,t,r)}b1e.exports=function(){function e(){E1t(this,e),this.head=null,this.tail=null,this.length=0}return w1t(e,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return xk.alloc(0);for(var o=xk.allocUnsafe(r>>>0),a=this.head,n=0;a;)v1t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=xk.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:B1t,value:function(r,o){return vq(this,m1t({},o,{depth:0,customInspect:!1}))}}]),e}()});var Sq=_((KZt,F1e)=>{"use strict";function D1t(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Dq,this,e)):process.nextTick(Dq,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(n){!t&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(bk,r):(r._writableState.errorEmitted=!0,process.nextTick(k1e,r,n)):process.nextTick(k1e,r,n):t?(process.nextTick(bk,r),t(n)):process.nextTick(bk,r)}),this)}function k1e(e,t){Dq(e,t),bk(e)}function bk(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function S1t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Dq(e,t){e.emit("error",t)}function P1t(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}F1e.exports={destroy:D1t,undestroy:S1t,errorOrDestroy:P1t}});var b0=_((JZt,N1e)=>{"use strict";var T1e={};function ac(e,t,r){r||(r=Error);function o(n,u,A){return typeof t=="string"?t:t(n,u,A)}class a extends r{constructor(u,A,p){super(o(u,A,p))}}a.prototype.name=r.name,a.prototype.code=e,T1e[e]=a}function R1e(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(o=>String(o)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function x1t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function b1t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Q1t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}ac("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);ac("ERR_INVALID_ARG_TYPE",function(e,t,r){let o;typeof t=="string"&&x1t(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";let a;if(b1t(e," argument"))a=`The ${e} ${o} ${R1e(t,"type")}`;else{let n=Q1t(e,".")?"property":"argument";a=`The "${e}" ${n} ${o} ${R1e(t,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);ac("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ac("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});ac("ERR_STREAM_PREMATURE_CLOSE","Premature close");ac("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});ac("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ac("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ac("ERR_STREAM_WRITE_AFTER_END","write after end");ac("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ac("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);ac("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");N1e.exports.codes=T1e});var Pq=_((VZt,L1e)=>{"use strict";var k1t=b0().codes.ERR_INVALID_OPT_VALUE;function F1t(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function R1t(e,t,r,o){var a=F1t(t,o,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=o?r:"highWaterMark";throw new k1t(n,a)}return Math.floor(a)}return e.objectMode?16:16*1024}L1e.exports={getHighWaterMark:R1t}});var O1e=_((zZt,xq)=>{typeof Object.create=="function"?xq.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:xq.exports=function(t,r){if(r){t.super_=r;var o=function(){};o.prototype=r.prototype,t.prototype=new o,t.prototype.constructor=t}}});var Q0=_((XZt,Qq)=>{try{if(bq=Ie("util"),typeof bq.inherits!="function")throw"";Qq.exports=bq.inherits}catch{Qq.exports=O1e()}var bq});var U1e=_((ZZt,M1e)=>{M1e.exports=Ie("util").deprecate});var Rq=_(($Zt,Y1e)=>{"use strict";Y1e.exports=Ri;function H1e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){o2t(t,e)}}var Jw;Ri.WritableState=dv;var T1t={deprecate:U1e()},j1e=Bq(),kk=Ie("buffer").Buffer,N1t=global.Uint8Array||function(){};function L1t(e){return kk.from(e)}function O1t(e){return kk.isBuffer(e)||e instanceof N1t}var Fq=Sq(),M1t=Pq(),U1t=M1t.getHighWaterMark,k0=b0().codes,_1t=k0.ERR_INVALID_ARG_TYPE,H1t=k0.ERR_METHOD_NOT_IMPLEMENTED,j1t=k0.ERR_MULTIPLE_CALLBACK,q1t=k0.ERR_STREAM_CANNOT_PIPE,G1t=k0.ERR_STREAM_DESTROYED,Y1t=k0.ERR_STREAM_NULL_VALUES,W1t=k0.ERR_STREAM_WRITE_AFTER_END,K1t=k0.ERR_UNKNOWN_ENCODING,Vw=Fq.errorOrDestroy;Q0()(Ri,j1e);function J1t(){}function dv(e,t,r){Jw=Jw||Em(),e=e||{},typeof r!="boolean"&&(r=t instanceof Jw),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=U1t(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){t2t(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new H1e(this)}dv.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(dv.prototype,"buffer",{get:T1t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Qk;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Qk=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ri,Symbol.hasInstance,{value:function(t){return Qk.call(this,t)?!0:this!==Ri?!1:t&&t._writableState instanceof dv}})):Qk=function(t){return t instanceof this};function Ri(e){Jw=Jw||Em();var t=this instanceof Jw;if(!t&&!Qk.call(Ri,this))return new Ri(e);this._writableState=new dv(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),j1e.call(this)}Ri.prototype.pipe=function(){Vw(this,new q1t)};function V1t(e,t){var r=new W1t;Vw(e,r),process.nextTick(t,r)}function z1t(e,t,r,o){var a;return r===null?a=new Y1t:typeof r!="string"&&!t.objectMode&&(a=new _1t("chunk",["string","Buffer"],r)),a?(Vw(e,a),process.nextTick(o,a),!1):!0}Ri.prototype.write=function(e,t,r){var o=this._writableState,a=!1,n=!o.objectMode&&O1t(e);return n&&!kk.isBuffer(e)&&(e=L1t(e)),typeof t=="function"&&(r=t,t=null),n?t="buffer":t||(t=o.defaultEncoding),typeof r!="function"&&(r=J1t),o.ending?V1t(this,r):(n||z1t(this,o,e,r))&&(o.pendingcb++,a=Z1t(this,o,n,e,t,r)),a};Ri.prototype.cork=function(){this._writableState.corked++};Ri.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&q1e(this,e))};Ri.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new K1t(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Ri.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function X1t(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=kk.from(t,r)),t}Object.defineProperty(Ri.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Z1t(e,t,r,o,a,n){if(!r){var u=X1t(t,o,a);o!==u&&(r=!0,a="buffer",o=u)}var A=t.objectMode?1:o.length;t.length+=A;var p=t.length<t.highWaterMark;if(p||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:o,encoding:a,isBuf:r,callback:n,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else kq(e,t,!1,A,o,a,n);return p}function kq(e,t,r,o,a,n,u){t.writelen=o,t.writecb=u,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new G1t("write")):r?e._writev(a,t.onwrite):e._write(a,n,t.onwrite),t.sync=!1}function $1t(e,t,r,o,a){--t.pendingcb,r?(process.nextTick(a,o),process.nextTick(gv,e,t),e._writableState.errorEmitted=!0,Vw(e,o)):(a(o),e._writableState.errorEmitted=!0,Vw(e,o),gv(e,t))}function e2t(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function t2t(e,t){var r=e._writableState,o=r.sync,a=r.writecb;if(typeof a!="function")throw new j1t;if(e2t(r),t)$1t(e,r,o,t,a);else{var n=G1e(r)||e.destroyed;!n&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&q1e(e,r),o?process.nextTick(_1e,e,r,n,a):_1e(e,r,n,a)}}function _1e(e,t,r,o){r||r2t(e,t),t.pendingcb--,o(),gv(e,t)}function r2t(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function q1e(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var o=t.bufferedRequestCount,a=new Array(o),n=t.corkedRequestsFree;n.entry=r;for(var u=0,A=!0;r;)a[u]=r,r.isBuf||(A=!1),r=r.next,u+=1;a.allBuffers=A,kq(e,t,!0,t.length,a,"",n.finish),t.pendingcb++,t.lastBufferedRequest=null,n.next?(t.corkedRequestsFree=n.next,n.next=null):t.corkedRequestsFree=new H1e(t),t.bufferedRequestCount=0}else{for(;r;){var p=r.chunk,h=r.encoding,w=r.callback,I=t.objectMode?1:p.length;if(kq(e,t,!1,I,p,h,w),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Ri.prototype._write=function(e,t,r){r(new H1t("_write()"))};Ri.prototype._writev=null;Ri.prototype.end=function(e,t,r){var o=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||s2t(this,o,r),this};Object.defineProperty(Ri.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G1e(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function n2t(e,t){e._final(function(r){t.pendingcb--,r&&Vw(e,r),t.prefinished=!0,e.emit("prefinish"),gv(e,t)})}function i2t(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(n2t,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function gv(e,t){var r=G1e(t);if(r&&(i2t(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var o=e._readableState;(!o||o.autoDestroy&&o.endEmitted)&&e.destroy()}return r}function s2t(e,t,r){t.ending=!0,gv(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function o2t(e,t,r){var o=e.entry;for(e.entry=null;o;){var a=o.callback;t.pendingcb--,a(r),o=o.next}t.corkedRequestsFree.next=e}Object.defineProperty(Ri.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){!this._writableState||(this._writableState.destroyed=t)}});Ri.prototype.destroy=Fq.destroy;Ri.prototype._undestroy=Fq.undestroy;Ri.prototype._destroy=function(e,t){t(e)}});var Em=_((e$t,K1e)=>{"use strict";var a2t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};K1e.exports=EA;var W1e=Lq(),Nq=Rq();Q0()(EA,W1e);for(Tq=a2t(Nq.prototype),Fk=0;Fk<Tq.length;Fk++)Rk=Tq[Fk],EA.prototype[Rk]||(EA.prototype[Rk]=Nq.prototype[Rk]);var Tq,Rk,Fk;function EA(e){if(!(this instanceof EA))return new EA(e);W1e.call(this,e),Nq.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",l2t)))}Object.defineProperty(EA.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(EA.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(EA.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l2t(){this._writableState.ended||process.nextTick(c2t,this)}function c2t(e){e.end()}Object.defineProperty(EA.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var z1e=_((Oq,V1e)=>{var Tk=Ie("buffer"),rp=Tk.Buffer;function J1e(e,t){for(var r in e)t[r]=e[r]}rp.from&&rp.alloc&&rp.allocUnsafe&&rp.allocUnsafeSlow?V1e.exports=Tk:(J1e(Tk,Oq),Oq.Buffer=zw);function zw(e,t,r){return rp(e,t,r)}J1e(rp,zw);zw.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return rp(e,t,r)};zw.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=rp(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o};zw.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return rp(e)};zw.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Tk.SlowBuffer(e)}});var _q=_(Z1e=>{"use strict";var Uq=z1e().Buffer,X1e=Uq.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function u2t(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function A2t(e){var t=u2t(e);if(typeof t!="string"&&(Uq.isEncoding===X1e||!X1e(e)))throw new Error("Unknown encoding: "+e);return t||e}Z1e.StringDecoder=mv;function mv(e){this.encoding=A2t(e);var t;switch(this.encoding){case"utf16le":this.text=m2t,this.end=y2t,t=4;break;case"utf8":this.fillLast=h2t,t=4;break;case"base64":this.text=E2t,this.end=w2t,t=3;break;default:this.write=C2t,this.end=I2t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Uq.allocUnsafe(t)}mv.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};mv.prototype.end=d2t;mv.prototype.text=g2t;mv.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Mq(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function f2t(e,t,r){var o=t.length-1;if(o<r)return 0;var a=Mq(t[o]);return a>=0?(a>0&&(e.lastNeed=a-1),a):--o<r||a===-2?0:(a=Mq(t[o]),a>=0?(a>0&&(e.lastNeed=a-2),a):--o<r||a===-2?0:(a=Mq(t[o]),a>=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function p2t(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function h2t(e){var t=this.lastTotal-this.lastNeed,r=p2t(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function g2t(e,t){var r=f2t(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var o=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,o),e.toString("utf8",t,o)}function d2t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function m2t(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var o=r.charCodeAt(r.length-1);if(o>=55296&&o<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function y2t(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function E2t(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function w2t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function C2t(e){return e.toString(this.encoding)}function I2t(e){return e&&e.length?this.write(e):""}});var Nk=_((r$t,t2e)=>{"use strict";var $1e=b0().codes.ERR_STREAM_PREMATURE_CLOSE;function B2t(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];e.apply(this,o)}}}function v2t(){}function D2t(e){return e.setHeader&&typeof e.abort=="function"}function e2e(e,t,r){if(typeof t=="function")return e2e(e,null,t);t||(t={}),r=B2t(r||v2t);var o=t.readable||t.readable!==!1&&e.readable,a=t.writable||t.writable!==!1&&e.writable,n=function(){e.writable||A()},u=e._writableState&&e._writableState.finished,A=function(){a=!1,u=!0,o||r.call(e)},p=e._readableState&&e._readableState.endEmitted,h=function(){o=!1,p=!0,a||r.call(e)},w=function(E){r.call(e,E)},I=function(){var E;if(o&&!p)return(!e._readableState||!e._readableState.ended)&&(E=new $1e),r.call(e,E);if(a&&!u)return(!e._writableState||!e._writableState.ended)&&(E=new $1e),r.call(e,E)},v=function(){e.req.on("finish",A)};return D2t(e)?(e.on("complete",A),e.on("abort",I),e.req?v():e.on("request",v)):a&&!e._writableState&&(e.on("end",n),e.on("close",n)),e.on("end",h),e.on("finish",A),t.error!==!1&&e.on("error",w),e.on("close",I),function(){e.removeListener("complete",A),e.removeListener("abort",I),e.removeListener("request",v),e.req&&e.req.removeListener("finish",A),e.removeListener("end",n),e.removeListener("close",n),e.removeListener("finish",A),e.removeListener("end",h),e.removeListener("error",w),e.removeListener("close",I)}}t2e.exports=e2e});var n2e=_((n$t,r2e)=>{"use strict";var Lk;function F0(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var S2t=Nk(),R0=Symbol("lastResolve"),wm=Symbol("lastReject"),yv=Symbol("error"),Ok=Symbol("ended"),Cm=Symbol("lastPromise"),Hq=Symbol("handlePromise"),Im=Symbol("stream");function T0(e,t){return{value:e,done:t}}function P2t(e){var t=e[R0];if(t!==null){var r=e[Im].read();r!==null&&(e[Cm]=null,e[R0]=null,e[wm]=null,t(T0(r,!1)))}}function x2t(e){process.nextTick(P2t,e)}function b2t(e,t){return function(r,o){e.then(function(){if(t[Ok]){r(T0(void 0,!0));return}t[Hq](r,o)},o)}}var Q2t=Object.getPrototypeOf(function(){}),k2t=Object.setPrototypeOf((Lk={get stream(){return this[Im]},next:function(){var t=this,r=this[yv];if(r!==null)return Promise.reject(r);if(this[Ok])return Promise.resolve(T0(void 0,!0));if(this[Im].destroyed)return new Promise(function(u,A){process.nextTick(function(){t[yv]?A(t[yv]):u(T0(void 0,!0))})});var o=this[Cm],a;if(o)a=new Promise(b2t(o,this));else{var n=this[Im].read();if(n!==null)return Promise.resolve(T0(n,!1));a=new Promise(this[Hq])}return this[Cm]=a,a}},F0(Lk,Symbol.asyncIterator,function(){return this}),F0(Lk,"return",function(){var t=this;return new Promise(function(r,o){t[Im].destroy(null,function(a){if(a){o(a);return}r(T0(void 0,!0))})})}),Lk),Q2t),F2t=function(t){var r,o=Object.create(k2t,(r={},F0(r,Im,{value:t,writable:!0}),F0(r,R0,{value:null,writable:!0}),F0(r,wm,{value:null,writable:!0}),F0(r,yv,{value:null,writable:!0}),F0(r,Ok,{value:t._readableState.endEmitted,writable:!0}),F0(r,Hq,{value:function(n,u){var A=o[Im].read();A?(o[Cm]=null,o[R0]=null,o[wm]=null,n(T0(A,!1))):(o[R0]=n,o[wm]=u)},writable:!0}),r));return o[Cm]=null,S2t(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=o[wm];n!==null&&(o[Cm]=null,o[R0]=null,o[wm]=null,n(a)),o[yv]=a;return}var u=o[R0];u!==null&&(o[Cm]=null,o[R0]=null,o[wm]=null,u(T0(void 0,!0))),o[Ok]=!0}),t.on("readable",x2t.bind(null,o)),o};r2e.exports=F2t});var a2e=_((i$t,o2e)=>{"use strict";function i2e(e,t,r,o,a,n,u){try{var A=e[n](u),p=A.value}catch(h){r(h);return}A.done?t(p):Promise.resolve(p).then(o,a)}function R2t(e){return function(){var t=this,r=arguments;return new Promise(function(o,a){var n=e.apply(t,r);function u(p){i2e(n,o,a,u,A,"next",p)}function A(p){i2e(n,o,a,u,A,"throw",p)}u(void 0)})}}function s2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,o)}return r}function T2t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s2e(Object(r),!0).forEach(function(o){N2t(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s2e(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function N2t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var L2t=b0().codes.ERR_INVALID_ARG_TYPE;function O2t(e,t,r){var o;if(t&&typeof t.next=="function")o=t;else if(t&&t[Symbol.asyncIterator])o=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])o=t[Symbol.iterator]();else throw new L2t("iterable",["Iterable"],t);var a=new e(T2t({objectMode:!0},r)),n=!1;a._read=function(){n||(n=!0,u())};function u(){return A.apply(this,arguments)}function A(){return A=R2t(function*(){try{var p=yield o.next(),h=p.value,w=p.done;w?a.push(null):a.push(yield h)?u():n=!1}catch(I){a.destroy(I)}}),A.apply(this,arguments)}return a}o2e.exports=O2t});var Lq=_((o$t,m2e)=>{"use strict";m2e.exports=dn;var Xw;dn.ReadableState=A2e;var s$t=Ie("events").EventEmitter,u2e=function(t,r){return t.listeners(r).length},wv=Bq(),Mk=Ie("buffer").Buffer,M2t=global.Uint8Array||function(){};function U2t(e){return Mk.from(e)}function _2t(e){return Mk.isBuffer(e)||e instanceof M2t}var jq=Ie("util"),Zr;jq&&jq.debuglog?Zr=jq.debuglog("stream"):Zr=function(){};var H2t=Q1e(),Vq=Sq(),j2t=Pq(),q2t=j2t.getHighWaterMark,Uk=b0().codes,G2t=Uk.ERR_INVALID_ARG_TYPE,Y2t=Uk.ERR_STREAM_PUSH_AFTER_EOF,W2t=Uk.ERR_METHOD_NOT_IMPLEMENTED,K2t=Uk.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Zw,qq,Gq;Q0()(dn,wv);var Ev=Vq.errorOrDestroy,Yq=["error","close","destroy","pause","resume"];function J2t(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function A2e(e,t,r){Xw=Xw||Em(),e=e||{},typeof r!="boolean"&&(r=t instanceof Xw),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=q2t(this,e,"readableHighWaterMark",r),this.buffer=new H2t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Zw||(Zw=_q().StringDecoder),this.decoder=new Zw(e.encoding),this.encoding=e.encoding)}function dn(e){if(Xw=Xw||Em(),!(this instanceof dn))return new dn(e);var t=this instanceof Xw;this._readableState=new A2e(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wv.call(this)}Object.defineProperty(dn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){!this._readableState||(this._readableState.destroyed=t)}});dn.prototype.destroy=Vq.destroy;dn.prototype._undestroy=Vq.undestroy;dn.prototype._destroy=function(e,t){t(e)};dn.prototype.push=function(e,t){var r=this._readableState,o;return r.objectMode?o=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Mk.from(e,t),t=""),o=!0),f2e(this,e,t,!1,o)};dn.prototype.unshift=function(e){return f2e(this,e,null,!0,!1)};function f2e(e,t,r,o,a){Zr("readableAddChunk",t);var n=e._readableState;if(t===null)n.reading=!1,X2t(e,n);else{var u;if(a||(u=V2t(n,t)),u)Ev(e,u);else if(n.objectMode||t&&t.length>0)if(typeof t!="string"&&!n.objectMode&&Object.getPrototypeOf(t)!==Mk.prototype&&(t=U2t(t)),o)n.endEmitted?Ev(e,new K2t):Wq(e,n,t,!0);else if(n.ended)Ev(e,new Y2t);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(t=n.decoder.write(t),n.objectMode||t.length!==0?Wq(e,n,t,!1):Jq(e,n)):Wq(e,n,t,!1)}else o||(n.reading=!1,Jq(e,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function Wq(e,t,r,o){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&_k(e)),Jq(e,t)}function V2t(e,t){var r;return!_2t(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new G2t("chunk",["string","Buffer","Uint8Array"],t)),r}dn.prototype.isPaused=function(){return this._readableState.flowing===!1};dn.prototype.setEncoding=function(e){Zw||(Zw=_q().StringDecoder);var t=new Zw(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,o="";r!==null;)o+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),o!==""&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var l2e=1073741824;function z2t(e){return e>=l2e?e=l2e:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c2e(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=z2t(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}dn.prototype.read=function(e){Zr("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return Zr("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Kq(this):_k(this),null;if(e=c2e(e,t),e===0&&t.ended)return t.length===0&&Kq(this),null;var o=t.needReadable;Zr("need readable",o),(t.length===0||t.length-e<t.highWaterMark)&&(o=!0,Zr("length less than watermark",o)),t.ended||t.reading?(o=!1,Zr("reading or ended",o)):o&&(Zr("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=c2e(r,t)));var a;return e>0?a=g2e(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Kq(this)),a!==null&&this.emit("data",a),a};function X2t(e,t){if(Zr("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?_k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,p2e(e)))}}function _k(e){var t=e._readableState;Zr("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Zr("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(p2e,e))}function p2e(e){var t=e._readableState;Zr("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,zq(e)}function Jq(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Z2t,e,t))}function Z2t(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(Zr("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}dn.prototype._read=function(e){Ev(this,new W2t("_read()"))};dn.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e);break}o.pipesCount+=1,Zr("pipe count=%d opts=%j",o.pipesCount,t);var a=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,n=a?A:R;o.endEmitted?process.nextTick(n):r.once("end",n),e.on("unpipe",u);function u(N,U){Zr("onunpipe"),N===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,w())}function A(){Zr("onend"),e.end()}var p=$2t(r);e.on("drain",p);var h=!1;function w(){Zr("cleanup"),e.removeListener("close",b),e.removeListener("finish",E),e.removeListener("drain",p),e.removeListener("error",v),e.removeListener("unpipe",u),r.removeListener("end",A),r.removeListener("end",R),r.removeListener("data",I),h=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&p()}r.on("data",I);function I(N){Zr("ondata");var U=e.write(N);Zr("dest.write",U),U===!1&&((o.pipesCount===1&&o.pipes===e||o.pipesCount>1&&d2e(o.pipes,e)!==-1)&&!h&&(Zr("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function v(N){Zr("onerror",N),R(),e.removeListener("error",v),u2e(e,"error")===0&&Ev(e,N)}J2t(e,"error",v);function b(){e.removeListener("finish",E),R()}e.once("close",b);function E(){Zr("onfinish"),e.removeListener("close",b),R()}e.once("finish",E);function R(){Zr("unpipe"),r.unpipe(e)}return e.emit("pipe",r),o.flowing||(Zr("pipe resume"),r.resume()),e};function $2t(e){return function(){var r=e._readableState;Zr("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&u2e(e,"data")&&(r.flowing=!0,zq(e))}}dn.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var o=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var n=0;n<a;n++)o[n].emit("unpipe",this,{hasUnpiped:!1});return this}var u=d2e(t.pipes,e);return u===-1?this:(t.pipes.splice(u,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};dn.prototype.on=function(e,t){var r=wv.prototype.on.call(this,e,t),o=this._readableState;return e==="data"?(o.readableListening=this.listenerCount("readable")>0,o.flowing!==!1&&this.resume()):e==="readable"&&!o.endEmitted&&!o.readableListening&&(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,Zr("on readable",o.length,o.reading),o.length?_k(this):o.reading||process.nextTick(eBt,this)),r};dn.prototype.addListener=dn.prototype.on;dn.prototype.removeListener=function(e,t){var r=wv.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(h2e,this),r};dn.prototype.removeAllListeners=function(e){var t=wv.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(h2e,this),t};function h2e(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function eBt(e){Zr("readable nexttick read 0"),e.read(0)}dn.prototype.resume=function(){var e=this._readableState;return e.flowing||(Zr("resume"),e.flowing=!e.readableListening,tBt(this,e)),e.paused=!1,this};function tBt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(rBt,e,t))}function rBt(e,t){Zr("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),zq(e),t.flowing&&!t.reading&&e.read(0)}dn.prototype.pause=function(){return Zr("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Zr("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function zq(e){var t=e._readableState;for(Zr("flow",t.flowing);t.flowing&&e.read()!==null;);}dn.prototype.wrap=function(e){var t=this,r=this._readableState,o=!1;e.on("end",function(){if(Zr("wrapped end"),r.decoder&&!r.ended){var u=r.decoder.end();u&&u.length&&t.push(u)}t.push(null)}),e.on("data",function(u){if(Zr("wrapped data"),r.decoder&&(u=r.decoder.write(u)),!(r.objectMode&&u==null)&&!(!r.objectMode&&(!u||!u.length))){var A=t.push(u);A||(o=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=function(A){return function(){return e[A].apply(e,arguments)}}(a));for(var n=0;n<Yq.length;n++)e.on(Yq[n],this.emit.bind(this,Yq[n]));return this._read=function(u){Zr("wrapped _read",u),o&&(o=!1,e.resume())},this};typeof Symbol=="function"&&(dn.prototype[Symbol.asyncIterator]=function(){return qq===void 0&&(qq=n2e()),qq(this)});Object.defineProperty(dn.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(dn.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(dn.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});dn._fromList=g2e;Object.defineProperty(dn.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function g2e(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Kq(e){var t=e._readableState;Zr("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(nBt,t,e))}function nBt(e,t){if(Zr("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(dn.from=function(e,t){return Gq===void 0&&(Gq=a2e()),Gq(dn,e,t)});function d2e(e,t){for(var r=0,o=e.length;r<o;r++)if(e[r]===t)return r;return-1}});var Xq=_((a$t,E2e)=>{"use strict";E2e.exports=np;var Hk=b0().codes,iBt=Hk.ERR_METHOD_NOT_IMPLEMENTED,sBt=Hk.ERR_MULTIPLE_CALLBACK,oBt=Hk.ERR_TRANSFORM_ALREADY_TRANSFORMING,aBt=Hk.ERR_TRANSFORM_WITH_LENGTH_0,jk=Em();Q0()(np,jk);function lBt(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new sBt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),o(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function np(e){if(!(this instanceof np))return new np(e);jk.call(this,e),this._transformState={afterTransform:lBt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",cBt)}function cBt(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){y2e(e,t,r)}):y2e(this,null,null)}np.prototype.push=function(e,t){return this._transformState.needTransform=!1,jk.prototype.push.call(this,e,t)};np.prototype._transform=function(e,t,r){r(new iBt("_transform()"))};np.prototype._write=function(e,t,r){var o=this._transformState;if(o.writecb=r,o.writechunk=e,o.writeencoding=t,!o.transforming){var a=this._readableState;(o.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};np.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};np.prototype._destroy=function(e,t){jk.prototype._destroy.call(this,e,function(r){t(r)})};function y2e(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new aBt;if(e._transformState.transforming)throw new oBt;return e.push(null)}});var I2e=_((l$t,C2e)=>{"use strict";C2e.exports=Cv;var w2e=Xq();Q0()(Cv,w2e);function Cv(e){if(!(this instanceof Cv))return new Cv(e);w2e.call(this,e)}Cv.prototype._transform=function(e,t,r){r(null,e)}});var P2e=_((c$t,S2e)=>{"use strict";var Zq;function uBt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var D2e=b0().codes,ABt=D2e.ERR_MISSING_ARGS,fBt=D2e.ERR_STREAM_DESTROYED;function B2e(e){if(e)throw e}function pBt(e){return e.setHeader&&typeof e.abort=="function"}function hBt(e,t,r,o){o=uBt(o);var a=!1;e.on("close",function(){a=!0}),Zq===void 0&&(Zq=Nk()),Zq(e,{readable:t,writable:r},function(u){if(u)return o(u);a=!0,o()});var n=!1;return function(u){if(!a&&!n){if(n=!0,pBt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(u||new fBt("pipe"))}}}function v2e(e){e()}function gBt(e,t){return e.pipe(t)}function dBt(e){return!e.length||typeof e[e.length-1]!="function"?B2e:e.pop()}function mBt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=dBt(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new ABt("streams");var a,n=t.map(function(u,A){var p=A<t.length-1,h=A>0;return hBt(u,p,h,function(w){a||(a=w),w&&n.forEach(v2e),!p&&(n.forEach(v2e),o(a))})});return t.reduce(gBt)}S2e.exports=mBt});var $w=_((lc,Bv)=>{var Iv=Ie("stream");process.env.READABLE_STREAM==="disable"&&Iv?(Bv.exports=Iv.Readable,Object.assign(Bv.exports,Iv),Bv.exports.Stream=Iv):(lc=Bv.exports=Lq(),lc.Stream=Iv||lc,lc.Readable=lc,lc.Writable=Rq(),lc.Duplex=Em(),lc.Transform=Xq(),lc.PassThrough=I2e(),lc.finished=Nk(),lc.pipeline=P2e())});var Q2e=_((u$t,b2e)=>{"use strict";var{Buffer:uu}=Ie("buffer"),x2e=Symbol.for("BufferList");function ri(e){if(!(this instanceof ri))return new ri(e);ri._init.call(this,e)}ri._init=function(t){Object.defineProperty(this,x2e,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};ri.prototype._new=function(t){return new ri(t)};ri.prototype._offset=function(t){if(t===0)return[0,0];let r=0;for(let o=0;o<this._bufs.length;o++){let a=r+this._bufs[o].length;if(t<a||o===this._bufs.length-1)return[o,t-r];r=a}};ri.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let o=0;o<t;o++)r+=this._bufs[o].length;return r};ri.prototype.get=function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]};ri.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};ri.prototype.copy=function(t,r,o,a){if((typeof o!="number"||o<0)&&(o=0),(typeof a!="number"||a>this.length)&&(a=this.length),o>=this.length||a<=0)return t||uu.alloc(0);let n=!!t,u=this._offset(o),A=a-o,p=A,h=n&&r||0,w=u[1];if(o===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:uu.concat(this._bufs,this.length);for(let I=0;I<this._bufs.length;I++)this._bufs[I].copy(t,h),h+=this._bufs[I].length;return t}if(p<=this._bufs[u[0]].length-w)return n?this._bufs[u[0]].copy(t,r,w,w+p):this._bufs[u[0]].slice(w,w+p);n||(t=uu.allocUnsafe(A));for(let I=u[0];I<this._bufs.length;I++){let v=this._bufs[I].length-w;if(p>v)this._bufs[I].copy(t,h,w),h+=v;else{this._bufs[I].copy(t,h,w,w+p),h+=v;break}p-=v,w&&(w=0)}return t.length>h?t.slice(0,h):t};ri.prototype.shallowSlice=function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let o=this._offset(t),a=this._offset(r),n=this._bufs.slice(o[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),o[1]!==0&&(n[0]=n[0].slice(o[1])),this._new(n)};ri.prototype.toString=function(t,r,o){return this.slice(r,o).toString(t)};ri.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};ri.prototype.duplicate=function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t};ri.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(uu.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(uu.from(t));return this};ri.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};ri.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=uu.from([e]):typeof e=="string"?e=uu.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=uu.from(e.buffer,e.byteOffset,e.byteLength):uu.isBuffer(e)||(e=uu.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let o=this._offset(t),a=o[0],n=o[1];for(;a<this._bufs.length;a++){let u=this._bufs[a];for(;n<u.length;)if(u.length-n>=e.length){let p=u.indexOf(e,n);if(p!==-1)return this._reverseOffset([a,p]);n=u.length-e.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,e))return p;n++}n=0}return-1};ri.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?ri.prototype[r]=function(o,a){return this.slice(o,o+a)[r](0,a)}:ri.prototype[r]=function(o=0){return this.slice(o,o+e[r])[r](0)}})(t)})();ri.prototype._isBufferList=function(t){return t instanceof ri||ri.isBufferList(t)};ri.isBufferList=function(t){return t!=null&&t[x2e]};b2e.exports=ri});var k2e=_((A$t,qk)=>{"use strict";var $q=$w().Duplex,yBt=Q0(),vv=Q2e();function Uo(e){if(!(this instanceof Uo))return new Uo(e);if(typeof e=="function"){this._callback=e;let t=function(o){this._callback&&(this._callback(o),this._callback=null)}.bind(this);this.on("pipe",function(o){o.on("error",t)}),this.on("unpipe",function(o){o.removeListener("error",t)}),e=null}vv._init.call(this,e),$q.call(this)}yBt(Uo,$q);Object.assign(Uo.prototype,vv.prototype);Uo.prototype._new=function(t){return new Uo(t)};Uo.prototype._write=function(t,r,o){this._appendBuffer(t),typeof o=="function"&&o()};Uo.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};Uo.prototype.end=function(t){$q.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};Uo.prototype._destroy=function(t,r){this._bufs.length=0,this.length=0,r(t)};Uo.prototype._isBufferList=function(t){return t instanceof Uo||t instanceof vv||Uo.isBufferList(t)};Uo.isBufferList=vv.isBufferList;qk.exports=Uo;qk.exports.BufferListStream=Uo;qk.exports.BufferList=vv});var rG=_(tC=>{var EBt=Buffer.alloc,wBt="0000000000000000000",CBt="7777777777777777777",F2e="0".charCodeAt(0),R2e=Buffer.from("ustar\0","binary"),IBt=Buffer.from("00","binary"),BBt=Buffer.from("ustar ","binary"),vBt=Buffer.from(" \0","binary"),DBt=parseInt("7777",8),Dv=257,tG=263,SBt=function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},PBt=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},xBt=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},T2e=function(e,t,r,o){for(;r<o;r++)if(e[r]===t)return r;return o},N2e=function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var o=156;o<512;o++)t+=e[o];return t},N0=function(e,t){return e=e.toString(8),e.length>t?CBt.slice(0,t)+" ":wBt.slice(0,t-e.length)+e+" "};function bBt(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],o=e.length-1;o>0;o--){var a=e[o];t?r.push(a):r.push(255-a)}var n=0,u=r.length;for(o=0;o<u;o++)n+=r[o]*Math.pow(256,o);return t?n:-1*n}var L0=function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return bBt(e);for(;t<e.length&&e[t]===32;)t++;for(var o=SBt(T2e(e,32,t,e.length),e.length,e.length);t<o&&e[t]===0;)t++;return o===t?0:parseInt(e.slice(t,o).toString(),8)},eC=function(e,t,r,o){return e.slice(t,T2e(e,0,t,t+r)).toString(o)},eG=function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e};tC.decodeLongPath=function(e,t){return eC(e,0,e.length,t)};tC.encodePax=function(e){var t="";e.name&&(t+=eG(" path="+e.name+`
386`)),e.linkname&&(t+=eG(" linkpath="+e.linkname+`
387`));var r=e.pax;if(r)for(var o in r)t+=eG(" "+o+"="+r[o]+`
388`);return Buffer.from(t)};tC.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var o=parseInt(e.slice(0,r).toString(),10);if(!o)return t;var a=e.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return t;t[a.slice(0,n)]=a.slice(n+1),e=e.slice(o)}return t};tC.encode=function(e){var t=EBt(512),r=e.name,o="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(N0(e.mode&DBt,6),100),t.write(N0(e.uid,6),108),t.write(N0(e.gid,6),116),t.write(N0(e.size,11),124),t.write(N0(e.mtime.getTime()/1e3|0,11),136),t[156]=F2e+xBt(e.type),e.linkname&&t.write(e.linkname,157),R2e.copy(t,Dv),IBt.copy(t,tG),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(N0(e.devmajor||0,6),329),t.write(N0(e.devminor||0,6),337),o&&t.write(o,345),t.write(N0(N2e(t),6),148),t)};tC.decode=function(e,t,r){var o=e[156]===0?0:e[156]-F2e,a=eC(e,0,100,t),n=L0(e,100,8),u=L0(e,108,8),A=L0(e,116,8),p=L0(e,124,12),h=L0(e,136,12),w=PBt(o),I=e[157]===0?null:eC(e,157,100,t),v=eC(e,265,32),b=eC(e,297,32),E=L0(e,329,8),R=L0(e,337,8),N=N2e(e);if(N===8*32)return null;if(N!==L0(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(R2e.compare(e,Dv,Dv+6)===0)e[345]&&(a=eC(e,345,155,t)+"/"+a);else if(!(BBt.compare(e,Dv,Dv+6)===0&&vBt.compare(e,tG,tG+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:w,linkname:I,uname:v,gname:b,devmajor:E,devminor:R}}});var j2e=_((p$t,H2e)=>{var O2e=Ie("util"),QBt=k2e(),Sv=rG(),M2e=$w().Writable,U2e=$w().PassThrough,_2e=function(){},L2e=function(e){return e&=511,e&&512-e},kBt=function(e,t){var r=new Gk(e,t);return r.end(),r},FBt=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},Gk=function(e,t){this._parent=e,this.offset=t,U2e.call(this,{autoDestroy:!1})};O2e.inherits(Gk,U2e);Gk.prototype.destroy=function(e){this._parent.destroy(e)};var ip=function(e){if(!(this instanceof ip))return new ip(e);M2e.call(this,e),e=e||{},this._offset=0,this._buffer=QBt(),this._missing=0,this._partial=!1,this._onparse=_2e,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,o=function(){t._continue()},a=function(v){if(t._locked=!1,v)return t.destroy(v);t._stream||o()},n=function(){t._stream=null;var v=L2e(t._header.size);v?t._parse(v,u):t._parse(512,I),t._locked||o()},u=function(){t._buffer.consume(L2e(t._header.size)),t._parse(512,I),o()},A=function(){var v=t._header.size;t._paxGlobal=Sv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=t._header.size;t._pax=Sv.decodePax(r.slice(0,v)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(v),n()},h=function(){var v=t._header.size;this._gnuLongPath=Sv.decodeLongPath(r.slice(0,v),e.filenameEncoding),r.consume(v),n()},w=function(){var v=t._header.size;this._gnuLongLinkPath=Sv.decodeLongPath(r.slice(0,v),e.filenameEncoding),r.consume(v),n()},I=function(){var v=t._offset,b;try{b=t._header=Sv.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(E){t.emit("error",E)}if(r.consume(512),!b){t._parse(512,I),o();return}if(b.type==="gnu-long-path"){t._parse(b.size,h),o();return}if(b.type==="gnu-long-link-path"){t._parse(b.size,w),o();return}if(b.type==="pax-global-header"){t._parse(b.size,A),o();return}if(b.type==="pax-header"){t._parse(b.size,p),o();return}if(t._gnuLongPath&&(b.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(b.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=b=FBt(b,t._pax),t._pax=null),t._locked=!0,!b.size||b.type==="directory"){t._parse(512,I),t.emit("entry",b,kBt(t,v),a);return}t._stream=new Gk(t,v),t.emit("entry",b,t._stream,a),t._parse(b.size,n),o()};this._onheader=I,this._parse(512,I)};O2e.inherits(ip,M2e);ip.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};ip.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};ip.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=_2e,this._overflow?this._write(this._overflow,void 0,e):e()}};ip.prototype._write=function(e,t,r){if(!this._destroyed){var o=this._stream,a=this._buffer,n=this._missing;if(e.length&&(this._partial=!0),e.length<n)return this._missing-=e.length,this._overflow=null,o?o.write(e,r):(a.append(e),r());this._cb=r,this._missing=0;var u=null;e.length>n&&(u=e.slice(n),e=e.slice(0,n)),o?o.end(e):a.append(e),this._overflow=u,this._onparse()}};ip.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};H2e.exports=ip});var G2e=_((h$t,q2e)=>{q2e.exports=Ie("fs").constants||Ie("constants")});var V2e=_((g$t,J2e)=>{var rC=G2e(),Y2e=NM(),Wk=Q0(),RBt=Buffer.alloc,W2e=$w().Readable,nC=$w().Writable,TBt=Ie("string_decoder").StringDecoder,Yk=rG(),NBt=parseInt("755",8),LBt=parseInt("644",8),K2e=RBt(1024),iG=function(){},nG=function(e,t){t&=511,t&&e.push(K2e.slice(0,512-t))};function OBt(e){switch(e&rC.S_IFMT){case rC.S_IFBLK:return"block-device";case rC.S_IFCHR:return"character-device";case rC.S_IFDIR:return"directory";case rC.S_IFIFO:return"fifo";case rC.S_IFLNK:return"symlink"}return"file"}var Kk=function(e){nC.call(this),this.written=0,this._to=e,this._destroyed=!1};Wk(Kk,nC);Kk.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};Kk.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Jk=function(){nC.call(this),this.linkname="",this._decoder=new TBt("utf-8"),this._destroyed=!1};Wk(Jk,nC);Jk.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};Jk.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Pv=function(){nC.call(this),this._destroyed=!1};Wk(Pv,nC);Pv.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};Pv.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var wA=function(e){if(!(this instanceof wA))return new wA(e);W2e.call(this,e),this._drain=iG,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};Wk(wA,W2e);wA.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=iG);var o=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=OBt(e.mode)),e.mode||(e.mode=e.type==="directory"?NBt:LBt),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)){e.size=t.length,this._encode(e);var a=this.push(t);return nG(o,e.size),a?process.nextTick(r):this._drain=r,new Pv}if(e.type==="symlink"&&!e.linkname){var n=new Jk;return Y2e(n,function(A){if(A)return o.destroy(),r(A);e.linkname=n.linkname,o._encode(e),r()}),n}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new Pv;var u=new Kk(this);return this._stream=u,Y2e(u,function(A){if(o._stream=null,A)return o.destroy(),r(A);if(u.written!==e.size)return o.destroy(),r(new Error("size mismatch"));nG(o,e.size),o._finalizing&&o.finalize(),r()}),u}};wA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(K2e),this.push(null))};wA.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};wA.prototype._encode=function(e){if(!e.pax){var t=Yk.encode(e);if(t){this.push(t);return}}this._encodePax(e)};wA.prototype._encodePax=function(e){var t=Yk.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(Yk.encode(r)),this.push(t),nG(this,t.length),r.size=e.size,r.type=e.type,this.push(Yk.encode(r))};wA.prototype._read=function(e){var t=this._drain;this._drain=iG,t()};J2e.exports=wA});var z2e=_(sG=>{sG.extract=j2e();sG.pack=V2e()});var lBe=_((N$t,aBe)=>{"use strict";var Bm=class{constructor(t,r,o){this.__specs=t||{},Object.keys(this.__specs).forEach(a=>{if(typeof this.__specs[a]=="string"){let n=this.__specs[a],u=this.__specs[n];if(u){let A=u.aliases||[];A.push(a,n),u.aliases=[...new Set(A)],this.__specs[a]=u}else throw new Error(`Alias refers to invalid key: ${n} -> ${a}`)}}),this.__opts=r||{},this.__providers=sBe(o.filter(a=>a!=null&&typeof a=="object")),this.__isFiggyPudding=!0}get(t){return AG(this,t,!0)}get[Symbol.toStringTag](){return"FiggyPudding"}forEach(t,r=this){for(let[o,a]of this.entries())t.call(r,a,o,this)}toJSON(){let t={};return this.forEach((r,o)=>{t[o]=r}),t}*entries(t){for(let o of Object.keys(this.__specs))yield[o,this.get(o)];let r=t||this.__opts.other;if(r){let o=new Set;for(let a of this.__providers){let n=a.entries?a.entries(r):ZBt(a);for(let[u,A]of n)r(u)&&!o.has(u)&&(o.add(u),yield[u,A])}}}*[Symbol.iterator](){for(let[t,r]of this.entries())yield[t,r]}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}concat(...t){return new Proxy(new Bm(this.__specs,this.__opts,sBe(this.__providers).concat(t)),oBe)}};try{let e=Ie("util");Bm.prototype[e.inspect.custom]=function(t,r){return this[Symbol.toStringTag]+" "+e.inspect(this.toJSON(),r)}}catch{}function zBt(e){throw Object.assign(new Error(`invalid config key requested: ${e}`),{code:"EBADKEY"})}function AG(e,t,r){let o=e.__specs[t];if(r&&!o&&(!e.__opts.other||!e.__opts.other(t)))zBt(t);else{o||(o={});let a;for(let n of e.__providers){if(a=iBe(t,n),a===void 0&&o.aliases&&o.aliases.length){for(let u of o.aliases)if(u!==t&&(a=iBe(u,n),a!==void 0))break}if(a!==void 0)break}return a===void 0&&o.default!==void 0?typeof o.default=="function"?o.default(e):o.default:a}}function iBe(e,t){let r;return t.__isFiggyPudding?r=AG(t,e,!1):typeof t.get=="function"?r=t.get(e):r=t[e],r}var oBe={has(e,t){return t in e.__specs&&AG(e,t,!1)!==void 0},ownKeys(e){return Object.keys(e.__specs)},get(e,t){return typeof t=="symbol"||t.slice(0,2)==="__"||t in Bm.prototype?e[t]:e.get(t)},set(e,t,r){if(typeof t=="symbol"||t.slice(0,2)==="__")return e[t]=r,!0;throw new Error("figgyPudding options cannot be modified. Use .concat() instead.")},deleteProperty(){throw new Error("figgyPudding options cannot be deleted. Use .concat() and shadow them instead.")}};aBe.exports=XBt;function XBt(e,t){function r(...o){return new Proxy(new Bm(e,t,o),oBe)}return r}function sBe(e){let t=[];return e.forEach(r=>t.unshift(r)),t}function ZBt(e){return Object.keys(e).map(t=>[t,e[t]])}});var ABe=_((L$t,BA)=>{"use strict";var bv=Ie("crypto"),$Bt=lBe(),evt=Ie("stream").Transform,cBe=["sha256","sha384","sha512"],tvt=/^[a-z0-9+/]+(?:=?=?)$/i,rvt=/^([^-]+)-([^?]+)([?\S*]*)$/,nvt=/^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/,ivt=/^[\x21-\x7E]+$/,sa=$Bt({algorithms:{default:["sha512"]},error:{default:!1},integrity:{},options:{default:[]},pickAlgorithm:{default:()=>fvt},Promise:{default:()=>Promise},sep:{default:" "},single:{default:!1},size:{},strict:{default:!1}}),M0=class{get isHash(){return!0}constructor(t,r){r=sa(r);let o=!!r.strict;this.source=t.trim();let a=this.source.match(o?nvt:rvt);if(!a||o&&!cBe.some(u=>u===a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];this.options=n?n.slice(1).split("?"):[]}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(t){if(t=sa(t),t.strict&&!(cBe.some(o=>o===this.algorithm)&&this.digest.match(tvt)&&(this.options||[]).every(o=>o.match(ivt))))return"";let r=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${r}`}},vm=class{get isIntegrity(){return!0}toJSON(){return this.toString()}toString(t){t=sa(t);let r=t.sep||" ";return t.strict&&(r=r.replace(/\S+/g," ")),Object.keys(this).map(o=>this[o].map(a=>M0.prototype.toString.call(a,t)).filter(a=>a.length).join(r)).filter(o=>o.length).join(r)}concat(t,r){r=sa(r);let o=typeof t=="string"?t:xv(t,r);return IA(`${this.toString(r)} ${o}`,r)}hexDigest(){return IA(this,{single:!0}).hexDigest()}match(t,r){r=sa(r);let o=IA(t,r),a=o.pickAlgorithm(r);return this[a]&&o[a]&&this[a].find(n=>o[a].find(u=>n.digest===u.digest))||!1}pickAlgorithm(t){t=sa(t);let r=t.pickAlgorithm,o=Object.keys(this);if(!o.length)throw new Error(`No algorithms available for ${JSON.stringify(this.toString())}`);return o.reduce((a,n)=>r(a,n)||a)}};BA.exports.parse=IA;function IA(e,t){if(t=sa(t),typeof e=="string")return fG(e,t);if(e.algorithm&&e.digest){let r=new vm;return r[e.algorithm]=[e],fG(xv(r,t),t)}else return fG(xv(e,t),t)}function fG(e,t){return t.single?new M0(e,t):e.trim().split(/\s+/).reduce((r,o)=>{let a=new M0(o,t);if(a.algorithm&&a.digest){let n=a.algorithm;r[n]||(r[n]=[]),r[n].push(a)}return r},new vm)}BA.exports.stringify=xv;function xv(e,t){return t=sa(t),e.algorithm&&e.digest?M0.prototype.toString.call(e,t):typeof e=="string"?xv(IA(e,t),t):vm.prototype.toString.call(e,t)}BA.exports.fromHex=svt;function svt(e,t,r){r=sa(r);let o=r.options&&r.options.length?`?${r.options.join("?")}`:"";return IA(`${t}-${Buffer.from(e,"hex").toString("base64")}${o}`,r)}BA.exports.fromData=ovt;function ovt(e,t){t=sa(t);let r=t.algorithms,o=t.options&&t.options.length?`?${t.options.join("?")}`:"";return r.reduce((a,n)=>{let u=bv.createHash(n).update(e).digest("base64"),A=new M0(`${n}-${u}${o}`,t);if(A.algorithm&&A.digest){let p=A.algorithm;a[p]||(a[p]=[]),a[p].push(A)}return a},new vm)}BA.exports.fromStream=avt;function avt(e,t){t=sa(t);let r=t.Promise||Promise,o=pG(t);return new r((a,n)=>{e.pipe(o),e.on("error",n),o.on("error",n);let u;o.on("integrity",A=>{u=A}),o.on("end",()=>a(u)),o.on("data",()=>{})})}BA.exports.checkData=lvt;function lvt(e,t,r){if(r=sa(r),t=IA(t,r),!Object.keys(t).length){if(r.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let o=t.pickAlgorithm(r),a=bv.createHash(o).update(e).digest("base64"),n=IA({algorithm:o,digest:a}),u=n.match(t,r);if(u||!r.error)return u;if(typeof r.size=="number"&&e.length!==r.size){let A=new Error(`data size mismatch when checking ${t}.
389 Wanted: ${r.size}
390 Found: ${e.length}`);throw A.code="EBADSIZE",A.found=e.length,A.expected=r.size,A.sri=t,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${t}, but got ${n}. (${e.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=t,A.algorithm=o,A.sri=t,A}}BA.exports.checkStream=cvt;function cvt(e,t,r){r=sa(r);let o=r.Promise||Promise,a=pG(r.concat({integrity:t}));return new o((n,u)=>{e.pipe(a),e.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}BA.exports.integrityStream=pG;function pG(e){e=sa(e);let t=e.integrity&&IA(e.integrity,e),r=t&&Object.keys(t).length,o=r&&t.pickAlgorithm(e),a=r&&t[o],n=Array.from(new Set(e.algorithms.concat(o?[o]:[]))),u=n.map(bv.createHash),A=0,p=new evt({transform(h,w,I){A+=h.length,u.forEach(v=>v.update(h,w)),I(null,h,w)}}).on("end",()=>{let h=e.options&&e.options.length?`?${e.options.join("?")}`:"",w=IA(u.map((v,b)=>`${n[b]}-${v.digest("base64")}${h}`).join(" "),e),I=r&&w.match(t,e);if(typeof e.size=="number"&&A!==e.size){let v=new Error(`stream size mismatch when checking ${t}.
391 Wanted: ${e.size}
392 Found: ${A}`);v.code="EBADSIZE",v.found=A,v.expected=e.size,v.sri=t,p.emit("error",v)}else if(e.integrity&&!I){let v=new Error(`${t} integrity checksum failed when using ${o}: wanted ${a} but got ${w}. (${A} bytes)`);v.code="EINTEGRITY",v.found=w,v.expected=a,v.algorithm=o,v.sri=t,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",w),I&&p.emit("verified",I)});return p}BA.exports.create=uvt;function uvt(e){e=sa(e);let t=e.algorithms,r=e.options.length?`?${e.options.join("?")}`:"",o=t.map(bv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return t.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new M0(`${A}-${p}${r}`,e);if(h.algorithm&&h.digest){let w=h.algorithm;u[w]||(u[w]=[]),u[w].push(h)}return u},new vm)}}}var Avt=new Set(bv.getHashes()),uBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(e=>Avt.has(e));function fvt(e,t){return uBe.indexOf(e.toLowerCase())>=uBe.indexOf(t.toLowerCase())?e:t}});var HBe=_((Unr,_Be)=>{var ADt=aL();function fDt(e){return ADt(e)?void 0:e}_Be.exports=fDt});var qBe=_((_nr,jBe)=>{var pDt=Ux(),hDt=D8(),gDt=b8(),dDt=jd(),mDt=gd(),yDt=HBe(),EDt=w_(),wDt=v8(),CDt=1,IDt=2,BDt=4,vDt=EDt(function(e,t){var r={};if(e==null)return r;var o=!1;t=pDt(t,function(n){return n=dDt(n,e),o||(o=n.length>1),n}),mDt(e,wDt(e),r),o&&(r=hDt(r,CDt|IDt|BDt,yDt));for(var a=t.length;a--;)gDt(r,t[a]);return r});jBe.exports=vDt});St();Ye();St();var JBe=Ie("child_process"),VBe=$e($g());qt();var cw=new Map([]);var n2={};Jt(n2,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>tr,getCli:()=>zpe,getDynamicLibs:()=>Vpe,getPluginConfiguration:()=>Aw,openWorkspace:()=>uw,pluginCommands:()=>cw,runExit:()=>rQ});qt();var ut=class extends nt{constructor(){super(...arguments);this.cwd=he.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new it("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};Ye();St();qt();var tr=class extends it{constructor(t,r){let o=J.relative(t,r),a=J.join(t,Ot.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};Ye();St();iA();Nl();x1();qt();var dAt=$e(Zn());Za();var Vpe=()=>new Map([["@yarnpkg/cli",n2],["@yarnpkg/core",r2],["@yarnpkg/fslib",WC],["@yarnpkg/libzip",P1],["@yarnpkg/parsers",eI],["@yarnpkg/shell",F1],["clipanion",AI],["semver",dAt],["typanion",Jo]]);Ye();async function uw(e,t){let{project:r,workspace:o}=await Pt.find(e,t);if(!o)throw new tr(r.cwd,t);return o}Ye();St();iA();Nl();x1();qt();var RDt=$e(Zn());Za();var z8={};Jt(z8,{AddCommand:()=>bh,BinCommand:()=>Qh,CacheCleanCommand:()=>kh,ClipanionCommand:()=>Wd,ConfigCommand:()=>Nh,ConfigGetCommand:()=>Fh,ConfigSetCommand:()=>Rh,ConfigUnsetCommand:()=>Th,DedupeCommand:()=>Lh,EntryCommand:()=>gw,ExecCommand:()=>Oh,ExplainCommand:()=>_h,ExplainPeerRequirementsCommand:()=>Mh,HelpCommand:()=>Kd,InfoCommand:()=>Hh,LinkCommand:()=>qh,NodeCommand:()=>Gh,PluginCheckCommand:()=>Yh,PluginImportCommand:()=>Jh,PluginImportSourcesCommand:()=>Vh,PluginListCommand:()=>Wh,PluginRemoveCommand:()=>zh,PluginRuntimeCommand:()=>Xh,RebuildCommand:()=>Zh,RemoveCommand:()=>$h,RunCommand:()=>e0,RunIndexCommand:()=>zd,SetResolutionCommand:()=>t0,SetVersionCommand:()=>Uh,SetVersionSourcesCommand:()=>Kh,UnlinkCommand:()=>r0,UpCommand:()=>Jf,VersionCommand:()=>Jd,WhyCommand:()=>n0,WorkspaceCommand:()=>o0,WorkspacesListCommand:()=>s0,YarnCommand:()=>jh,dedupeUtils:()=>AQ,default:()=>lgt,suggestUtils:()=>Zc});var xde=$e($g());Ye();Ye();Ye();qt();var O0e=$e(l2());Za();var Zc={};Jt(Zc,{Modifier:()=>E8,Strategy:()=>cQ,Target:()=>c2,WorkspaceModifier:()=>F0e,applyModifier:()=>Lft,extractDescriptorFromPath:()=>w8,extractRangeModifier:()=>R0e,fetchDescriptorFrom:()=>C8,findProjectDescriptors:()=>L0e,getModifier:()=>u2,getSuggestedDescriptors:()=>A2,makeWorkspaceDescriptor:()=>N0e,toWorkspaceModifier:()=>T0e});Ye();Ye();St();var y8=$e(Zn()),Tft="workspace:",c2=(o=>(o.REGULAR="dependencies",o.DEVELOPMENT="devDependencies",o.PEER="peerDependencies",o))(c2||{}),E8=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="",o))(E8||{}),F0e=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="*",o))(F0e||{}),cQ=(n=>(n.KEEP="keep",n.REUSE="reuse",n.PROJECT="project",n.LATEST="latest",n.CACHE="cache",n))(cQ||{});function u2(e,t){return e.exact?"":e.caret?"^":e.tilde?"~":t.configuration.get("defaultSemverRangePrefix")}var Nft=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function R0e(e,{project:t}){let r=e.match(Nft);return r?r[1]:t.configuration.get("defaultSemverRangePrefix")}function Lft(e,t){let{protocol:r,source:o,params:a,selector:n}=G.parseRange(e.range);return y8.default.valid(n)&&(n=`${t}${e.range}`),G.makeDescriptor(e,G.makeRange({protocol:r,source:o,params:a,selector:n}))}function T0e(e){switch(e){case"^":return"^";case"~":return"~";case"":return"*";default:throw new Error(`Assertion failed: Unknown modifier: "${e}"`)}}function N0e(e,t){return G.makeDescriptor(e.anchoredDescriptor,`${Tft}${T0e(t)}`)}async function L0e(e,{project:t,target:r}){let o=new Map,a=n=>{let u=o.get(n.descriptorHash);return u||o.set(n.descriptorHash,u={descriptor:n,locators:[]}),u};for(let n of t.workspaces)if(r==="peerDependencies"){let u=n.manifest.peerDependencies.get(e.identHash);u!==void 0&&a(u).locators.push(n.anchoredLocator)}else{let u=n.manifest.dependencies.get(e.identHash),A=n.manifest.devDependencies.get(e.identHash);r==="devDependencies"?A!==void 0?a(A).locators.push(n.anchoredLocator):u!==void 0&&a(u).locators.push(n.anchoredLocator):u!==void 0?a(u).locators.push(n.anchoredLocator):A!==void 0&&a(A).locators.push(n.anchoredLocator)}return o}async function w8(e,{cwd:t,workspace:r}){return await Oft(async o=>{J.isAbsolute(e)||(e=J.relative(r.cwd,J.resolve(t,e)),e.match(/^\.{0,2}\//)||(e=`./${e}`));let{project:a}=r,n=await C8(G.makeIdent(null,"archive"),e,{project:r.project,cache:o,workspace:r});if(!n)throw new Error("Assertion failed: The descriptor should have been found");let u=new ki,A=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:o,fetcher:p,report:u,resolver:A},w=A.bindDescriptor(n,r.anchoredLocator,h),I=G.convertDescriptorToLocator(w),v=await p.fetch(I,h),b=await Ot.find(v.prefixPath,{baseFs:v.packageFs});if(!b.name)throw new Error("Target path doesn't have a name");return G.makeDescriptor(b.name,e)})}async function A2(e,{project:t,workspace:r,cache:o,target:a,fixed:n,modifier:u,strategies:A,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let[h,w]=e.range!=="unknown"?n||Qr.validRange(e.range)||!e.range.match(/^[a-z0-9._-]+$/i)?[e.range,"latest"]:["unknown",e.range]:["unknown","latest"];if(h!=="unknown")return{suggestions:[{descriptor:e,name:`Use ${G.prettyDescriptor(t.configuration,e)}`,reason:"(unambiguous explicit request)"}],rejections:[]};let I=typeof r<"u"&&r!==null&&r.manifest[a].get(e.identHash)||null,v=[],b=[],E=async R=>{try{await R()}catch(N){b.push(N)}};for(let R of A){if(v.length>=p)break;switch(R){case"keep":await E(async()=>{I&&v.push({descriptor:I,name:`Keep ${G.prettyDescriptor(t.configuration,I)}`,reason:"(no changes)"})});break;case"reuse":await E(async()=>{for(let{descriptor:N,locators:U}of(await L0e(e,{project:t,target:a})).values()){if(U.length===1&&U[0].locatorHash===r.anchoredLocator.locatorHash&&A.includes("keep"))continue;let V=`(originally used by ${G.prettyLocator(t.configuration,U[0])}`;V+=U.length>1?` and ${U.length-1} other${U.length>2?"s":""})`:")",v.push({descriptor:N,name:`Reuse ${G.prettyDescriptor(t.configuration,N)}`,reason:V})}});break;case"cache":await E(async()=>{for(let N of t.storedDescriptors.values())N.identHash===e.identHash&&v.push({descriptor:N,name:`Reuse ${G.prettyDescriptor(t.configuration,N)}`,reason:"(already used somewhere in the lockfile)"})});break;case"project":await E(async()=>{if(r.manifest.name!==null&&e.identHash===r.manifest.name.identHash)return;let N=t.tryWorkspaceByIdent(e);if(N===null)return;let U=N0e(N,u);v.push({descriptor:U,name:`Attach ${G.prettyDescriptor(t.configuration,U)}`,reason:`(local workspace at ${ye.pretty(t.configuration,N.relativeCwd,ye.Type.PATH)})`})});break;case"latest":await E(async()=>{if(a==="peerDependencies")v.push({descriptor:G.makeDescriptor(e,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(!t.configuration.get("enableNetwork"))v.push({descriptor:null,name:"Resolve from latest",reason:ye.pretty(t.configuration,"(unavailable because enableNetwork is toggled off)","grey")});else{let N=await C8(e,w,{project:t,cache:o,workspace:r,modifier:u});N&&v.push({descriptor:N,name:`Use ${G.prettyDescriptor(t.configuration,N)}`,reason:"(resolved from latest)"})}});break}}return{suggestions:v.slice(0,p),rejections:b.slice(0,p)}}async function C8(e,t,{project:r,cache:o,workspace:a,preserveModifier:n=!0,modifier:u}){let A=r.configuration.normalizeDependency(G.makeDescriptor(e,t)),p=new ki,h=r.configuration.makeFetcher(),w=r.configuration.makeResolver(),I={project:r,fetcher:h,cache:o,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},v={...I,resolver:w,fetchOptions:I},b=w.bindDescriptor(A,a.anchoredLocator,v),E=await w.getCandidates(b,{},v);if(E.length===0)return null;let R=E[0],{protocol:N,source:U,params:V,selector:ee}=G.parseRange(G.convertToManifestRange(R.reference));if(N===r.configuration.get("defaultProtocol")&&(N=null),y8.default.valid(ee)){let le=ee;if(typeof u<"u")ee=u+ee;else if(n!==!1){let ge=typeof n=="string"?n:A.range;ee=R0e(ge,{project:r})+ee}let fe=G.makeDescriptor(R,G.makeRange({protocol:N,source:U,params:V,selector:ee}));(await w.getCandidates(r.configuration.normalizeDependency(fe),{},v)).length!==1&&(ee=le)}return G.makeDescriptor(R,G.makeRange({protocol:N,source:U,params:V,selector:ee}))}async function Oft(e){return await ae.mktempPromise(async t=>{let r=Ke.create(t);return r.useWithSource(t,{enableMirror:!1,compressionLevel:0},t,{overwrite:!0}),await e(new Nr(t,{configuration:r,check:!1,immutable:!1}))})}var bh=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.fixed=he.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=he.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=he.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=he.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.dev=he.Boolean("-D,--dev",!1,{description:"Add a package as a dev dependency"});this.peer=he.Boolean("-P,--peer",!1,{description:"Add a package as a peer dependency"});this.optional=he.Boolean("-O,--optional",!1,{description:"Add / upgrade a package to an optional regular / peer dependency"});this.preferDev=he.Boolean("--prefer-dev",!1,{description:"Add / upgrade a package to a dev dependency"});this.interactive=he.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"});this.cached=he.Boolean("--cached",!1,{description:"Reuse the highest version already used somewhere within the project"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:Vs(fl)});this.silent=he.Boolean("--silent",{hidden:!0});this.packages=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=A||r.get("preferReuse"),h=u2(this,o),w=[p?"reuse":void 0,"project",this.cached?"cache":void 0,"latest"].filter(U=>typeof U<"u"),I=A?1/0:1,v=await Promise.all(this.packages.map(async U=>{let V=U.match(/^\.{0,2}\//)?await w8(U,{cwd:this.context.cwd,workspace:a}):G.tryParseDescriptor(U),ee=U.match(/^(https?:|git@github)/);if(ee)throw new it(`It seems you are trying to add a package using a ${ye.pretty(r,`${ee[0]}...`,ye.Type.RANGE)} url; we now require package names to be explicitly specified.
393Try running the command again with the package name prefixed: ${ye.pretty(r,"yarn add",ye.Type.CODE)} ${ye.pretty(r,G.makeDescriptor(G.makeIdent(null,"my-package"),`${ee[0]}...`),ye.Type.DESCRIPTOR)}`);if(!V)throw new it(`The ${ye.pretty(r,U,ye.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let le=Mft(a,V,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(le.map(async de=>{let ge=await A2(V,{project:o,workspace:a,cache:n,fixed:u,target:de,modifier:h,strategies:w,maxResults:I});return{request:V,suggestedDescriptors:ge,target:de}}))})).then(U=>U.flat()),b=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:V,suggestedDescriptors:{suggestions:ee,rejections:le}}of v)if(ee.filter(de=>de.descriptor!==null).length===0){let[de]=le;if(typeof de>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${G.prettyDescriptor(r,V)} can't be resolved to a satisfying range`):U.reportError(27,`${G.prettyDescriptor(r,V)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),U.reportSeparator(),U.reportExceptionOnce(de)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[],N=[];for(let{suggestedDescriptors:{suggestions:U},target:V}of v){let ee,le=U.filter(oe=>oe.descriptor!==null),fe=le[0].descriptor,de=le.every(oe=>G.areDescriptorsEqual(oe.descriptor,fe));le.length===1||de?ee=fe:(E=!0,{answer:ee}=await(0,O0e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:oe,name:Be,reason:be})=>oe?{name:Be,hint:be,descriptor:oe}:{name:Be,hint:be,disabled:!0}),onCancel:()=>process.exit(130),result(oe){return this.find(oe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ge=a.manifest[V].get(ee.identHash);(typeof ge>"u"||ge.descriptorHash!==ee.descriptorHash)&&(a.manifest[V].set(ee.identHash,ee),this.optional&&(V==="dependencies"?a.manifest.ensureDependencyMeta({...ee,range:"unknown"}).optional=!0:V==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...ee,range:"unknown"}).optional=!0)),typeof ge>"u"?R.push([a,V,ee,w]):N.push([a,V,ge,ee]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,R),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,N),E&&this.context.stdout.write(`
394`),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};bh.paths=[["add"]],bh.usage=nt.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]});function Mft(e,t,{dev:r,peer:o,preferDev:a,optional:n}){let u=e.manifest["dependencies"].has(t.identHash),A=e.manifest["devDependencies"].has(t.identHash),p=e.manifest["peerDependencies"].has(t.identHash);if((r||o)&&u)throw new it(`Package "${G.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!o&&p)throw new it(`Package "${G.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&A)throw new it(`Package "${G.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!o&&p)throw new it(`Package "${G.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new it(`Package "${G.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return o&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:A?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ye();Ye();qt();var Qh=class extends ut{constructor(){super(...arguments);this.verbose=he.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=he.String({required:!1})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await Pt.find(r,this.context.cwd);if(await o.restoreInstallState(),this.name){let A=(await cn.getPackageAccessibleBinaries(a,{project:o})).get(this.name);if(!A)throw new it(`Couldn't find a binary named "${this.name}" for package "${G.prettyLocator(r,a)}"`);let[,p]=A;return this.context.stdout.write(`${p}
395`),0}return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await cn.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((w,I)=>Math.max(w,I.length),0);for(let[w,[I,v]]of A)u.reportJson({name:w,source:G.stringifyIdent(I),path:v});if(this.verbose)for(let[w,[I]]of A)u.reportInfo(null,`${w.padEnd(h," ")} ${G.prettyLocator(r,I)}`);else for(let w of A.keys())u.reportInfo(null,w)})).exitCode()}};Qh.paths=[["bin"]],Qh.usage=nt.Usage({description:"get the path to a binary script",details:`
396 When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
397
398 When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
399 `,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});Ye();St();qt();var kh=class extends ut{constructor(){super(...arguments);this.mirror=he.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=he.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Nr.find(r);return(await Nt.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await ae.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await ae.removePromise(o.cwd)})).exitCode()}};kh.paths=[["cache","clean"],["cache","clear"]],kh.usage=nt.Usage({description:"remove the shared cache files",details:`
400 This command will remove all the files from the cache.
401 `,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});Ye();qt();var U0e=$e(f2()),I8=Ie("util"),Fh=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=he.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new it(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=_e.convertMapsToIndexableObjects(u),p=a?(0,U0e.default)(A,a):A,h=await Nt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async w=>{w.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
402`),h.exitCode();I8.inspect.styles.name="cyan",this.context.stdout.write(`${(0,I8.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
403`)}return h.exitCode()}};Fh.paths=[["config","get"]],Fh.usage=nt.Usage({description:"read a configuration settings",details:`
404 This command will print a configuration setting.
405
406 Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
407 `,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]});Ye();qt();var bge=$e(S8()),Qge=$e(f2()),kge=$e(P8()),x8=Ie("util"),Rh=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=he.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=he.String();this.value=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new it("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?E=>Ke.updateHomeConfiguration(E):E=>Ke.updateConfiguration(o(),E))(E=>{if(n){let R=(0,bge.default)(E);return(0,kge.default)(R,this.name,A),R}else return{...E,[a]:A}});let w=(await Ke.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),I=_e.convertMapsToIndexableObjects(w),v=n?(0,Qge.default)(I,n):I;return(await Nt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async E=>{x8.inspect.styles.name="cyan",E.reportInfo(0,`Successfully set ${this.name} to ${(0,x8.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Rh.paths=[["config","set"]],Rh.usage=nt.Usage({description:"change a configuration settings",details:`
408 This command will set a configuration setting.
409
410 When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
411
412 When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
413 `,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});Ye();qt();var jge=$e(S8()),qge=$e(Nge()),Gge=$e(Q8()),Th=class extends ut{constructor(){super(...arguments);this.home=he.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Ke.updateHomeConfiguration(h):h=>Ke.updateConfiguration(o(),h);return(await Nt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let w=!1;await A(I=>{if(!(0,qge.default)(I,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),w=!0,I;let v=n?(0,jge.default)(I):{...I};return(0,Gge.default)(v,this.name),v}),w||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Th.paths=[["config","unset"]],Th.usage=nt.Usage({description:"unset a configuration setting",details:`
414 This command will unset a configuration setting.
415 `,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]});Ye();Ye();qt();var k8=Ie("util"),Nh=class extends ut{constructor(){super(...arguments);this.verbose=he.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=he.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{if(r.invalid.size>0&&!this.json){for(let[n,u]of r.invalid)a.reportError(34,`Invalid configuration key "${n}" in ${u}`);a.reportSeparator()}if(this.json){let n=_e.sortMap(r.settings.keys(),u=>u);for(let u of n){let A=r.settings.get(u),p=r.getSpecial(u,{hideSecrets:!0,getNativePaths:!0}),h=r.sources.get(u);this.verbose?a.reportJson({key:u,effective:p,source:h}):a.reportJson({key:u,effective:p,source:h,...A})}}else{let n=_e.sortMap(r.settings.keys(),p=>p),u=n.reduce((p,h)=>Math.max(p,h.length),0),A={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let p=n.map(w=>{let I=r.settings.get(w);if(!I)throw new Error(`Assertion failed: This settings ("${w}") should have been registered`);let v=this.why?r.sources.get(w)||"<default>":I.description;return[w,v]}),h=p.reduce((w,[,I])=>Math.max(w,I.length),0);for(let[w,I]of p)a.reportInfo(null,`${w.padEnd(u," ")} ${I.padEnd(h," ")} ${(0,k8.inspect)(r.getSpecial(w,{hideSecrets:!0,getNativePaths:!0}),A)}`)}else for(let p of n)a.reportInfo(null,`${p.padEnd(u," ")} ${(0,k8.inspect)(r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),A)}`)}})).exitCode()}};Nh.paths=[["config"]],Nh.usage=nt.Usage({description:"display the current configuration",details:`
416 This command prints the current active configuration settings.
417 `,examples:[["Print the active configuration settings","$0 config"]]});Ye();qt();Za();var AQ={};Jt(AQ,{Strategy:()=>p2,acceptedStrategies:()=>w0t,dedupe:()=>F8});Ye();Ye();var Yge=$e(Zo()),p2=(t=>(t.HIGHEST="highest",t))(p2||{}),w0t=new Set(Object.values(p2)),C0t={highest:async(e,t,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of e.storedResolutions){let w=e.storedDescriptors.get(p);if(typeof w>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);_e.getSetWithDefault(u,w.identHash).add(h)}let A=new Map(_e.mapAndFilter(e.storedDescriptors.values(),p=>G.isVirtualDescriptor(p)?_e.mapAndFilter.skip:[p.descriptorHash,_e.makeDeferred()]));for(let p of e.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let w=e.storedResolutions.get(p.descriptorHash);if(typeof w>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let I=e.originalPackages.get(w);if(typeof I>"u")throw new Error(`Assertion failed: The package (${w}) should have been registered`);Promise.resolve().then(async()=>{let v=r.getResolutionDependencies(p,a),b=Object.fromEntries(await _e.allSettledSafe(Object.entries(v).map(async([ee,le])=>{let fe=A.get(le.descriptorHash);if(typeof fe>"u")throw new Error(`Assertion failed: The descriptor (${le.descriptorHash}) should have been registered`);let de=await fe.promise;if(!de)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[ee,de.updatedPackage]})));if(t.length&&!Yge.default.isMatch(G.stringifyIdent(p),t)||!r.shouldPersistResolution(I,a))return I;let E=u.get(p.identHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(E.size===1)return I;let R=[...E].map(ee=>{let le=e.originalPackages.get(ee);if(typeof le>"u")throw new Error(`Assertion failed: The package (${ee}) should have been registered`);return le}),N=await r.getSatisfying(p,b,R,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return I;let V=e.originalPackages.get(U.locatorHash);if(typeof V>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return V}).then(async v=>{let b=await e.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:I,updatedPackage:v,resolvedPackage:b})}).catch(v=>{h.reject(v)})}return[...A.values()].map(p=>p.promise)}};async function F8(e,{strategy:t,patterns:r,cache:o,report:a}){let{configuration:n}=e,u=new ki,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:e.storedChecksums,fetcher:p,project:e,report:u,cacheOptions:{skipIntegrityCheck:!0}},w={project:e,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let I=C0t[t],v=await I(e,r,{resolver:A,resolveOptions:w,fetcher:p,fetchOptions:h}),b=Zs.progressViaCounter(v.length);await a.reportProgress(b);let E=0;await Promise.all(v.map(U=>U.then(V=>{if(V===null||V.currentPackage.locatorHash===V.updatedPackage.locatorHash)return;E++;let{descriptor:ee,currentPackage:le,updatedPackage:fe}=V;a.reportInfo(0,`${G.prettyDescriptor(n,ee)} can be deduped from ${G.prettyLocator(n,le)} to ${G.prettyLocator(n,fe)}`),a.reportJson({descriptor:G.stringifyDescriptor(ee),currentResolution:G.stringifyLocator(le),updatedResolution:G.stringifyLocator(fe)}),e.storedResolutions.set(ee.descriptorHash,fe.locatorHash)}).finally(()=>b.tick())));let R;switch(E){case 0:R="No packages";break;case 1:R="One package";break;default:R=`${E} packages`}let N=ye.pretty(n,t,ye.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),E})}var Lh=class extends ut{constructor(){super(...arguments);this.strategy=he.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Vs(p2)});this.check=he.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:Vs(fl)});this.patterns=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=await Nr.find(r);await o.restoreInstallState({restoreResolutions:!1});let n=0,u=await Nt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async A=>{n=await F8(o,{strategy:this.strategy,patterns:this.patterns,cache:a,report:A})});return u.hasErrors()?u.exitCode():this.check?n?1:0:await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:a,mode:this.mode})}};Lh.paths=[["dedupe"]],Lh.usage=nt.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]});Ye();qt();var Wd=class extends ut{async execute(){let{plugins:t}=await Ke.find(this.context.cwd,this.context.plugins),r=[];for(let u of t){let{commands:A}=u[1];if(A){let h=os.from(A).definitions();r.push([u[0],h])}}let o=this.cli.definitions(),a=(u,A)=>u.split(" ").slice(1).join()===A.split(" ").slice(1).join(),n=Wge()["@yarnpkg/builder"].bundles.standard;for(let u of r){let A=u[1];for(let p of A)o.find(h=>a(h.path,p.path)).plugin={name:u[0],isDefault:n.includes(u[0])}}this.context.stdout.write(`${JSON.stringify(o,null,2)}
418`)}};Wd.paths=[["--clipanion=definitions"]];var Kd=class extends ut{async execute(){this.context.stdout.write(this.cli.usage(null))}};Kd.paths=[["help"],["--help"],["-h"]];Ye();St();qt();var gw=class extends ut{constructor(){super(...arguments);this.leadingArgument=he.String();this.args=he.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!G.tryParseIdent(this.leadingArgument)){let r=J.resolve(this.context.cwd,Ae.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ye();var Jd=class extends ut{async execute(){this.context.stdout.write(`${en||"<unknown>"}
419`)}};Jd.paths=[["-v"],["--version"]];Ye();Ye();qt();var Oh=class extends ut{constructor(){super(...arguments);this.commandName=he.String();this.args=he.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await Pt.find(r,this.context.cwd);return await o.restoreInstallState(),await cn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};Oh.paths=[["exec"]],Oh.usage=nt.Usage({description:"execute a shell script",details:`
420 This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
421
422 It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
423 `,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});Ye();qt();Za();var Mh=class extends ut{constructor(){super(...arguments);this.hash=he.String({required:!1,validator:rd(Ey(),[iI(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await B0t(this.hash,o,{stdout:this.context.stdout}):(await Nt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=[([,A])=>G.stringifyLocator(o.storedPackages.get(A.subject)),([,A])=>G.stringifyIdent(A.requested)];for(let[A,p]of _e.sortMap(o.peerRequirements,u)){let h=o.storedPackages.get(p.subject);if(typeof h>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let w=o.storedPackages.get(p.rootRequester);if(typeof w>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let I=h.dependencies.get(p.requested.identHash)??null,v=ye.pretty(r,A,ye.Type.CODE),b=G.prettyLocator(r,h),E=G.prettyIdent(r,p.requested),R=G.prettyIdent(r,w),N=p.allRequesters.length-1,U=`descendant${N===1?"":"s"}`,V=N>0?` and ${N} ${U}`:"",ee=I!==null?"provides":"doesn't provide";n.reportInfo(null,`${v} \u2192 ${b} ${ee} ${E} to ${R}${V}`)}})).exitCode()}};Mh.paths=[["explain","peer-requirements"]],Mh.usage=nt.Usage({description:"explain a set of peer requirements",details:`
424 A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.
425
426 When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.
427
428 When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.
429
430 **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
431 `,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});async function B0t(e,t,r){let{configuration:o}=t,a=t.peerRequirements.get(e);if(typeof a>"u")throw new Error(`No peerDependency requirements found for hash: "${e}"`);return(await Nt.start({configuration:o,stdout:r.stdout,includeFooter:!1},async u=>{let A=t.storedPackages.get(a.subject);if(typeof A>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let p=t.storedPackages.get(a.rootRequester);if(typeof p>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let h=A.dependencies.get(a.requested.identHash)??null,w=h!==null?t.storedResolutions.get(h.descriptorHash):null;if(typeof w>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let I=w!==null?t.storedPackages.get(w):null;if(typeof I>"u")throw new Error("Assertion failed: Expected the provided package to have been registered");let v=[...a.allRequesters.values()].map(U=>{let V=t.storedPackages.get(U);if(typeof V>"u")throw new Error("Assertion failed: Expected the package to be registered");let ee=G.devirtualizeLocator(V),le=t.storedPackages.get(ee.locatorHash);if(typeof le>"u")throw new Error("Assertion failed: Expected the package to be registered");let fe=le.peerDependencies.get(a.requested.identHash);if(typeof fe>"u")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:V,peerDependency:fe}});if(I!==null){let U=v.every(({peerDependency:V})=>Qr.satisfiesWithPrereleases(I.version,V.range));u.reportInfo(0,`${G.prettyLocator(o,A)} provides ${G.prettyLocator(o,I)} with version ${G.prettyReference(o,I.version??"<missing>")}, which ${U?"satisfies":"doesn't satisfy"} the following requirements:`)}else u.reportInfo(0,`${G.prettyLocator(o,A)} doesn't provide ${G.prettyIdent(o,a.requested)}, breaking the following requirements:`);u.reportSeparator();let b=ye.mark(o),E=[];for(let{pkg:U,peerDependency:V}of _e.sortMap(v,ee=>G.stringifyLocator(ee.pkg))){let le=(I!==null?Qr.satisfiesWithPrereleases(I.version,V.range):!1)?b.Check:b.Cross;E.push({stringifiedLocator:G.stringifyLocator(U),prettyLocator:G.prettyLocator(o,U),prettyRange:G.prettyRange(o,V.range),mark:le})}let R=Math.max(...E.map(({stringifiedLocator:U})=>U.length)),N=Math.max(...E.map(({prettyRange:U})=>U.length));for(let{stringifiedLocator:U,prettyLocator:V,prettyRange:ee,mark:le}of _e.sortMap(E,({stringifiedLocator:fe})=>fe))u.reportInfo(null,`${V.padEnd(R+(V.length-U.length)," ")} \u2192 ${ee.padEnd(N," ")} ${le}`);E.length>1&&(u.reportSeparator(),u.reportInfo(0,`Note: these requirements start with ${G.prettyLocator(t.configuration,p)}`))})).exitCode()}Ye();qt();Za();Ye();Ye();St();qt();var Kge=$e(Zn()),Uh=class extends ut{constructor(){super(...arguments);this.useYarnPath=he.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=he.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let A=r.sources.get("yarnPath");if(!A)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(J.contains(p,A))return 0}let o=()=>{if(typeof en>"u")throw new it("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(A,p)=>({version:p,url:A.replace(/\{\}/g,p)});if(this.version==="self")a={url:o(),version:en??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await h2(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await h2(r,"canary"));else if(this.version==="classic")a={url:"https://classic.yarnpkg.com/latest.js",version:"classic"};else if(this.version.match(/^https?:/))a={url:this.version,version:"remote"};else if(this.version.match(/^\.{0,2}[\\/]/)||Ae.isAbsolute(this.version))a={url:`file://${J.resolve(Ae.toPortablePath(this.version))}`,version:"file"};else if(Qr.satisfiesWithPrereleases(this.version,">=2.0.0"))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",this.version);else if(Qr.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))a=n("https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js",this.version);else if(Qr.validRange(this.version))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await v0t(r,this.version));else throw new it(`Invalid version descriptor "${this.version}"`);return(await Nt.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async A=>{let p=async()=>{let h="file://";return a.url.startsWith(h)?(A.reportInfo(0,`Retrieving ${ye.pretty(r,a.url,ye.Type.PATH)}`),await ae.readFilePromise(a.url.slice(h.length))):(A.reportInfo(0,`Downloading ${ye.pretty(r,a.url,ye.Type.URL)}`),await tn.get(a.url,{configuration:r}))};await R8(r,a.version,p,{report:A,useYarnPath:this.useYarnPath})})).exitCode()}};Uh.paths=[["set","version"]],Uh.usage=nt.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\n\n A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\n\n The version specifier can be:\n\n - a tag:\n - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\n - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\n - `classic` -> the most recent classic (`^0.x || ^1.x`) release\n\n - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\n\n - a semver version (e.g. `2.4.1`, `1.22.1`)\n\n - a local file referenced through either a relative or absolute path\n\n - `self` -> the version used to invoke the command\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest canary release from the Yarn repository","$0 set version canary"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download the most recent Yarn 3 build","$0 set version 3.x"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"],["Use a release from the local filesystem","$0 set version ./yarn.cjs"],["Use a release from a URL","$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js"],["Download the version used to invoke the command","$0 set version self"]]});async function v0t(e,t){let o=(await tn.get("https://repo.yarnpkg.com/tags",{configuration:e,jsonResponse:!0})).tags.filter(a=>Qr.satisfiesWithPrereleases(a,t));if(o.length===0)throw new it(`No matching release found for range ${ye.pretty(e,t,ye.Type.RANGE)}.`);return o[0]}async function h2(e,t){let r=await tn.get("https://repo.yarnpkg.com/tags",{configuration:e,jsonResponse:!0});if(!r.latest[t])throw new it(`Tag ${ye.pretty(e,t,ye.Type.RANGE)} not found`);return r.latest[t]}async function R8(e,t,r,{report:o,useYarnPath:a}){let n,u=async()=>(typeof n>"u"&&(n=await r()),n);if(t===null){let ee=await u();await ae.mktempPromise(async le=>{let fe=J.join(le,"yarn.cjs");await ae.writeFilePromise(fe,ee);let{stdout:de}=await Mr.execvp(process.execPath,[Ae.fromPortablePath(fe),"--version"],{cwd:le,env:{...e.env,YARN_IGNORE_PATH:"1"}});if(t=de.trim(),!Kge.default.valid(t))throw new Error(`Invalid semver version. ${ye.pretty(e,"yarn --version",ye.Type.CODE)} returned:
432${t}`)})}let A=e.projectCwd??e.startingCwd,p=J.resolve(A,".yarn/releases"),h=J.resolve(p,`yarn-${t}.cjs`),w=J.relative(e.startingCwd,h),I=_e.isTaggedYarnVersion(t),v=e.get("yarnPath"),b=!I,E=b||!!v||!!a;if(a===!1){if(b)throw new zt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");E=!1}else!E&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${ye.applyHyperlink(e,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${ye.applyHyperlink(e,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),E=!0);if(E){let ee=await u();o.reportInfo(0,`Saving the new release in ${ye.pretty(e,w,"magenta")}`),await ae.removePromise(J.dirname(h)),await ae.mkdirPromise(J.dirname(h),{recursive:!0}),await ae.writeFilePromise(h,ee,{mode:493}),await Ke.updateConfiguration(A,{yarnPath:J.relative(A,h)})}else await ae.removePromise(J.dirname(h)),await Ke.updateConfiguration(A,{yarnPath:Ke.deleteProperty});let R=await Ot.tryFind(A)||new Ot;R.packageManager=`yarn@${I?t:await h2(e,"stable")}`;let N={};R.exportTo(N);let U=J.join(A,Ot.fileName),V=`${JSON.stringify(N,null,R.indent)}
433`;return await ae.changeFilePromise(U,V,{automaticNewlines:!0}),{bundleVersion:t}}function Jge(e){return wr[uS(e)]}var D0t=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function S0t(e){let r=`https://repo.yarnpkg.com/${_e.isTaggedYarnVersion(en)?en:await h2(e,"canary")}/packages/gatsby/content/advanced/error-codes.md`,o=await tn.get(r,{configuration:e});return new Map(Array.from(o.toString().matchAll(D0t),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Jge(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var _h=class extends ut{constructor(){super(...arguments);this.code=he.String({required:!1,validator:rd(Ey(),[iI(/^YN[0-9]{4}$/)])});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=Jge(this.code),a=ye.pretty(r,o,ye.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await S0t(r)).get(this.code),p=typeof A<"u"?ye.jsonOrPretty(this.json,r,ye.tuple(ye.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
434
435You can help us by editing this page on GitHub \u{1F642}:
436${ye.jsonOrPretty(this.json,r,ye.tuple(ye.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))}
437`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
438`):this.context.stdout.write(`${n}
439
440${p}
441`)}else{let o={children:_e.mapAndFilter(Object.entries(wr),([a,n])=>Number.isNaN(Number(a))?_e.mapAndFilter.skip:{label:Ju(Number(a)),value:ye.tuple(ye.Type.CODE,n)})};ra.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};_h.paths=[["explain"]],_h.usage=nt.Usage({description:"explain an error code",details:`
442 When the code argument is specified, this command prints its name and its details.
443
444 When used without arguments, this command lists all error codes and their names.
445 `,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});Ye();St();qt();var Vge=$e(Zo()),Hh=class extends ut{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=he.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=he.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=he.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=he.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=he.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=he.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a&&!this.all)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(le,{recursive:fe})=>{let de=le.anchoredLocator.locatorHash,ge=new Map,oe=[de];for(;oe.length>0;){let Be=oe.shift();if(ge.has(Be))continue;let be=o.storedPackages.get(Be);if(typeof be>"u")throw new Error("Assertion failed: Expected the package to be registered");if(ge.set(Be,be),G.isVirtualLocator(be)&&oe.push(G.devirtualizeLocator(be).locatorHash),!(!fe&&Be!==de))for(let g of be.dependencies.values()){let we=o.storedResolutions.get(g.descriptorHash);if(typeof we>"u")throw new Error("Assertion failed: Expected the resolution to be registered");oe.push(we)}}return ge.values()},p=({recursive:le})=>{let fe=new Map;for(let de of o.workspaces)for(let ge of A(de,{recursive:le}))fe.set(ge.locatorHash,ge);return fe.values()},h=({all:le,recursive:fe})=>le&&fe?o.storedPackages.values():le?p({recursive:fe}):A(a,{recursive:fe}),w=({all:le,recursive:fe})=>{let de=h({all:le,recursive:fe}),ge=this.patterns.map(be=>{let g=G.parseLocator(be),we=Vge.default.makeRe(G.stringifyIdent(g)),Se=G.isVirtualLocator(g),ce=Se?G.devirtualizeLocator(g):g;return ne=>{let te=G.stringifyIdent(ne);if(!we.test(te))return!1;if(g.reference==="unknown")return!0;let Ee=G.isVirtualLocator(ne),Re=Ee?G.devirtualizeLocator(ne):ne;return!(Se&&Ee&&g.reference!==ne.reference||ce.reference!==Re.reference)}}),oe=_e.sortMap([...de],be=>G.stringifyLocator(be));return{selection:oe.filter(be=>ge.length===0||ge.some(g=>g(be))),sortedLookup:oe}},{selection:I,sortedLookup:v}=w({all:this.all,recursive:this.recursive});if(I.length===0)throw new it("No package matched your request");let b=new Map;if(this.dependents)for(let le of v)for(let fe of le.dependencies.values()){let de=o.storedResolutions.get(fe.descriptorHash);if(typeof de>"u")throw new Error("Assertion failed: Expected the resolution to be registered");_e.getArrayWithDefault(b,de).push(le)}let E=new Map;for(let le of v){if(!G.isVirtualLocator(le))continue;let fe=G.devirtualizeLocator(le);_e.getArrayWithDefault(E,fe.locatorHash).push(le)}let R={},N={children:R},U=r.makeFetcher(),V={project:o,fetcher:U,cache:n,checksums:o.storedChecksums,report:new ki,cacheOptions:{skipIntegrityCheck:!0}},ee=[async(le,fe,de)=>{if(!fe.has("manifest"))return;let ge=await U.fetch(le,V),oe;try{oe=await Ot.find(ge.prefixPath,{baseFs:ge.packageFs})}finally{ge.releaseFs?.()}de("Manifest",{License:ye.tuple(ye.Type.NO_HINT,oe.license),Homepage:ye.tuple(ye.Type.URL,oe.raw.homepage??null)})},async(le,fe,de)=>{if(!fe.has("cache"))return;let ge={mockedPackages:o.disabledLocators,unstablePackages:o.conditionalLocators},oe=o.storedChecksums.get(le.locatorHash)??null,Be=n.getLocatorPath(le,oe,ge),be;if(Be!==null)try{be=ae.statSync(Be)}catch{}let g=typeof be<"u"?[be.size,ye.Type.SIZE]:void 0;de("Cache",{Checksum:ye.tuple(ye.Type.NO_HINT,oe),Path:ye.tuple(ye.Type.PATH,Be),Size:g})}];for(let le of I){let fe=G.isVirtualLocator(le);if(!this.virtuals&&fe)continue;let de={},ge={value:[le,ye.Type.LOCATOR],children:de};if(R[G.stringifyLocator(le)]=ge,this.nameOnly){delete ge.children;continue}let oe=E.get(le.locatorHash);typeof oe<"u"&&(de.Instances={label:"Instances",value:ye.tuple(ye.Type.NUMBER,oe.length)}),de.Version={label:"Version",value:ye.tuple(ye.Type.NO_HINT,le.version)};let Be=(g,we)=>{let Se={};if(de[g]=Se,Array.isArray(we))Se.children=we.map(ce=>({value:ce}));else{let ce={};Se.children=ce;for(let[ne,te]of Object.entries(we))typeof te>"u"||(ce[ne]={label:ne,value:te})}};if(!fe){for(let g of ee)await g(le,u,Be);await r.triggerHook(g=>g.fetchPackageInfo,le,u,Be)}le.bin.size>0&&!fe&&Be("Exported Binaries",[...le.bin.keys()].map(g=>ye.tuple(ye.Type.PATH,g)));let be=b.get(le.locatorHash);typeof be<"u"&&be.length>0&&Be("Dependents",be.map(g=>ye.tuple(ye.Type.LOCATOR,g))),le.dependencies.size>0&&!fe&&Be("Dependencies",[...le.dependencies.values()].map(g=>{let we=o.storedResolutions.get(g.descriptorHash),Se=typeof we<"u"?o.storedPackages.get(we)??null:null;return ye.tuple(ye.Type.RESOLUTION,{descriptor:g,locator:Se})})),le.peerDependencies.size>0&&fe&&Be("Peer dependencies",[...le.peerDependencies.values()].map(g=>{let we=le.dependencies.get(g.identHash),Se=typeof we<"u"?o.storedResolutions.get(we.descriptorHash)??null:null,ce=Se!==null?o.storedPackages.get(Se)??null:null;return ye.tuple(ye.Type.RESOLUTION,{descriptor:g,locator:ce})}))}ra.emitTree(N,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};Hh.paths=[["info"]],Hh.usage=nt.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]});Ye();St();Nl();var fQ=$e($g());qt();var T8=$e(Zn());Za();var P0t=[{selector:e=>e===-1,name:"nodeLinker",value:"node-modules"},{selector:e=>e!==-1&&e<8,name:"enableGlobalCache",value:!1},{selector:e=>e!==-1&&e<8,name:"compressionLevel",value:"mixed"}],jh=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.immutable=he.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"});this.immutableCache=he.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"});this.refreshLockfile=he.Boolean("--refresh-lockfile",{description:"Refresh the package metadata stored in the lockfile"});this.checkCache=he.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"});this.checkResolutions=he.Boolean("--check-resolutions",{description:"Validates that the package resolutions are coherent"});this.inlineBuilds=he.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:Vs(fl)});this.cacheFolder=he.String("--cache-folder",{hidden:!0});this.frozenLockfile=he.Boolean("--frozen-lockfile",{hidden:!0});this.ignoreEngines=he.Boolean("--ignore-engines",{hidden:!0});this.nonInteractive=he.Boolean("--non-interactive",{hidden:!0});this.preferOffline=he.Boolean("--prefer-offline",{hidden:!0});this.production=he.Boolean("--production",{hidden:!0});this.registry=he.String("--registry",{hidden:!0});this.silent=he.Boolean("--silent",{hidden:!0});this.networkTimeout=he.String("--network-timeout",{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<"u"&&r.useWithSource("<cli>",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let o=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=async(E,{error:R})=>{let N=await Nt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async U=>{R?U.reportError(50,E):U.reportWarning(50,E)});return N.hasErrors()?N.exitCode():null};if(typeof this.ignoreEngines<"u"){let E=await a("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!fQ.default.VERCEL});if(E!==null)return E}if(typeof this.registry<"u"){let E=await a("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(E!==null)return E}if(typeof this.preferOffline<"u"){let E=await a("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!fQ.default.VERCEL});if(E!==null)return E}if(typeof this.production<"u"){let E=await a("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(E!==null)return E}if(typeof this.nonInteractive<"u"){let E=await a("The --non-interactive option is deprecated",{error:!o});if(E!==null)return E}if(typeof this.frozenLockfile<"u"&&(await a("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!1}),this.immutable=this.frozenLockfile),typeof this.cacheFolder<"u"){let E=await a("The cache-folder option has been deprecated; use rc settings instead",{error:!fQ.default.NETLIFY});if(E!==null)return E}let n=this.mode==="update-lockfile";if(n&&(this.immutable||this.immutableCache))throw new it(`${ye.pretty(r,"--immutable",ye.Type.CODE)} and ${ye.pretty(r,"--immutable-cache",ye.Type.CODE)} cannot be used with ${ye.pretty(r,"--mode=update-lockfile",ye.Type.CODE)}`);let u=(this.immutable??r.get("enableImmutableInstalls"))&&!n,A=this.immutableCache&&!n;if(r.projectCwd!==null){let E=await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{let N=!1;await Q0t(r,u)&&(R.reportInfo(48,"Automatically removed core plugins that are now builtins \u{1F44D}"),N=!0),await b0t(r,u)&&(R.reportInfo(48,"Automatically fixed merge conflicts \u{1F44D}"),N=!0),N&&R.reportSeparator()});if(E.hasErrors())return E.exitCode()}if(r.projectCwd!==null){let E=await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{if(Ke.telemetry?.isNew)Ke.telemetry.commitTips(),R.reportInfo(65,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),R.reportInfo(65,`Run ${ye.pretty(r,"yarn config set --home enableTelemetry 0",ye.Type.CODE)} to disable`),R.reportSeparator();else if(Ke.telemetry?.shouldShowTips){let N=await tn.get("https://repo.yarnpkg.com/tags",{configuration:r,jsonResponse:!0}).catch(()=>null);if(N!==null){let U=null;if(en!==null){let ee=T8.default.prerelease(en)?"canary":"stable",le=N.latest[ee];T8.default.gt(le,en)&&(U=[ee,le])}if(U)Ke.telemetry.commitTips(),R.reportInfo(88,`${ye.applyStyle(r,`A new ${U[0]} version of Yarn is available:`,ye.Style.BOLD)} ${G.prettyReference(r,U[1])}!`),R.reportInfo(88,`Upgrade now by running ${ye.pretty(r,`yarn set version ${U[1]}`,ye.Type.CODE)}`),R.reportSeparator();else{let V=Ke.telemetry.selectTip(N.tips);V&&(R.reportInfo(89,ye.pretty(r,V.message,ye.Type.MARKDOWN_INLINE)),V.url&&R.reportInfo(89,`Learn more at ${V.url}`),R.reportSeparator())}}}});if(E.hasErrors())return E.exitCode()}let{project:p,workspace:h}=await Pt.find(r,this.context.cwd),w=p.lockfileLastVersion;if(w!==null){let E=await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{let N={};for(let U of P0t)U.selector(w)&&typeof r.sources.get(U.name)>"u"&&(r.use("<compat>",{[U.name]:U.value},p.cwd,{overwrite:!0}),N[U.name]=U.value);Object.keys(N).length>0&&(await Ke.updateConfiguration(p.cwd,N),R.reportInfo(87,"Migrated your project to the latest Yarn version \u{1F680}"),R.reportSeparator())});if(E.hasErrors())return E.exitCode()}let I=await Nr.find(r,{immutable:A,check:this.checkCache});if(!h)throw new tr(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let v=r.get("enableHardenedMode");(this.refreshLockfile??v)&&(p.lockfileNeedsRefresh=!0);let b=this.checkResolutions??v;return await p.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:I,immutable:u,checkResolutions:b,mode:this.mode})}};jh.paths=[["install"],nt.Default],jh.usage=nt.Usage({description:"install the project dependencies",details:"\n This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the .pnp.cjs file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.cjs file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]});var x0t="<<<<<<<";async function b0t(e,t){if(!e.projectCwd)return!1;let r=J.join(e.projectCwd,gr.lockfile);if(!await ae.existsPromise(r)||!(await ae.readFilePromise(r,"utf8")).includes(x0t))return!1;if(t)throw new zt(47,"Cannot autofix a lockfile when running an immutable install");let a=await Mr.execvp("git",["rev-parse","MERGE_HEAD","HEAD"],{cwd:e.projectCwd});if(a.code!==0&&(a=await Mr.execvp("git",["rev-parse","REBASE_HEAD","HEAD"],{cwd:e.projectCwd})),a.code!==0&&(a=await Mr.execvp("git",["rev-parse","CHERRY_PICK_HEAD","HEAD"],{cwd:e.projectCwd})),a.code!==0)throw new zt(83,"Git returned an error when trying to find the commits pertaining to the conflict");let n=await Promise.all(a.stdout.trim().split(/\n/).map(async A=>{let p=await Mr.execvp("git",["show",`${A}:./${gr.lockfile}`],{cwd:e.projectCwd});if(p.code!==0)throw new zt(83,`Git returned an error when trying to access the lockfile content in ${A}`);try{return Ji(p.stdout)}catch{throw new zt(46,"A variant of the conflicting lockfile failed to parse")}}));n=n.filter(A=>!!A.__metadata);for(let A of n){if(A.__metadata.version<7)for(let p of Object.keys(A)){if(p==="__metadata")continue;let h=G.parseDescriptor(p,!0),w=e.normalizeDependency(h),I=G.stringifyDescriptor(w);I!==p&&(A[I]=A[p],delete A[p])}for(let p of Object.keys(A)){if(p==="__metadata")continue;let h=A[p].checksum;typeof h=="string"&&h.includes("/")||(A[p].checksum=`${A.__metadata.cacheKey}/${h}`)}}let u=Object.assign({},...n);u.__metadata.version=`${Math.min(...n.map(A=>parseInt(A.__metadata.version??0)))}`,u.__metadata.cacheKey="merged";for(let[A,p]of Object.entries(u))typeof p=="string"&&delete u[A];return await ae.changeFilePromise(r,Ba(u),{automaticNewlines:!0}),!0}async function Q0t(e,t){if(!e.projectCwd)return!1;let r=[],o=J.join(e.projectCwd,".yarn/plugins/@yarnpkg");return await Ke.updateConfiguration(e.projectCwd,{plugins:n=>{if(!Array.isArray(n))return n;let u=n.filter(A=>{if(!A.path)return!0;let p=J.resolve(e.projectCwd,A.path),h=I1.has(A.spec)&&J.contains(o,p);return h&&r.push(p),!h});return u.length===0?Ke.deleteProperty:u.length===n.length?n:u}},{immutable:t})?(await Promise.all(r.map(async n=>{await ae.removePromise(n)})),!0):!1}Ye();St();qt();var qh=class extends ut{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=he.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=he.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=o.topLevelWorkspace,A=[];for(let p of this.destinations){let h=J.resolve(this.context.cwd,Ae.toPortablePath(p)),w=await Ke.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:I,workspace:v}=await Pt.find(w,h);if(o.cwd===I.cwd)throw new it(`Invalid destination '${p}'; Can't link the project to itself`);if(!v)throw new tr(I.cwd,h);if(this.all){let b=!1;for(let E of I.workspaces)E.manifest.name&&(!E.manifest.private||this.private)&&(A.push(E),b=!0);if(!b)throw new it(`No workspace found to be linked in the target project: ${p}`)}else{if(!v.manifest.name)throw new it(`The target workspace at '${p}' doesn't have a name and thus cannot be linked`);if(v.manifest.private&&!this.private)throw new it(`The target workspace at '${p}' is marked private - use the --private flag to link it anyway`);A.push(v)}}for(let p of A){let h=G.stringifyIdent(p.anchoredLocator),w=this.relative?J.relative(o.cwd,p.cwd):p.cwd;u.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${w}`})}return await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};qh.paths=[["link"]],qh.usage=nt.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});qt();var Gh=class extends ut{constructor(){super(...arguments);this.args=he.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};Gh.paths=[["node"]],Gh.usage=nt.Usage({description:"run node with the hook already setup",details:`
446 This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
447
448 The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
449 `,examples:[["Run a Node script","$0 node ./my-script.js"]]});Ye();qt();var Yh=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Ke.findRcFiles(this.context.cwd);return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let u of o)if(!!u.data?.plugins)for(let A of u.data.plugins){if(!A.checksum||!A.spec.match(/^https?:/))continue;let p=await tn.get(A.spec,{configuration:r}),h=wn.makeHash(p);if(A.checksum===h)continue;let w=ye.pretty(r,A.path,ye.Type.PATH),I=ye.pretty(r,A.spec,ye.Type.URL),v=`${w} is different from the file provided by ${I}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,v)}})).exitCode()}};Yh.paths=[["plugin","check"]],Yh.usage=nt.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
450 Check only the plugins from https.
451
452 If this command detects any plugin differences in the CI environment, it will throw an error.
453 `,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]});Ye();Ye();St();qt();var tde=Ie("os");Ye();St();qt();var zge=Ie("os");Ye();Nl();qt();var k0t="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Vd(e,t){let r=await tn.get(k0t,{configuration:e}),o=Ji(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!t||Qr.satisfiesWithPrereleases(t,n.range??"<4.0.0-rc.1")))}var Wh=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Vd(r,en);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};Wh.paths=[["plugin","list"]],Wh.usage=nt.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var F0t=/^[0-9]+$/;function Xge(e){return F0t.test(e)?`pull/${e}/head`:e}var R0t=({repository:e,branch:t},r)=>[["git","init",Ae.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin","--depth=1",Xge(t)],["git","reset","--hard","FETCH_HEAD"]],T0t=({branch:e})=>[["git","fetch","origin","--depth=1",Xge(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],N0t=({plugins:e,noMinify:t},r,o)=>[["yarn","build:cli",...new Array().concat(...e.map(a=>["--plugin",J.resolve(o,a)])),...t?["--no-minify"]:[],"|"],["mv","packages/yarnpkg-cli/bundles/yarn.js",Ae.fromPortablePath(r),"|"]],Kh=class extends ut{constructor(){super(...arguments);this.installPath=he.String("--path",{description:"The path where the repository should be cloned to"});this.repository=he.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=he.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=he.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=he.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=he.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=he.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=he.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=typeof this.installPath<"u"?J.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):J.resolve(Ae.toPortablePath((0,zge.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Nt.start({configuration:r,stdout:this.context.stdout},async u=>{await N8(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator();let A=await Mr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=J.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);ae.existsSync(p)||(await g2(N0t(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await ae.readFilePromise(p);if(!this.dryRun){let{bundleVersion:w}=await R8(r,null,async()=>h,{report:u});this.skipPlugins||await L0t(this,w,{project:o,report:u,target:a})}})).exitCode()}};Kh.paths=[["set","version","from","sources"]],Kh.usage=nt.Usage({description:"build Yarn from master",details:`
454 This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
455
456 By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
457 `,examples:[["Build Yarn from master","$0 set version from sources"]]});async function g2(e,{configuration:t,context:r,target:o}){for(let[a,...n]of e){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Mr.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${ye.pretty(t,` $ ${[a,...n].join(" ")}`,"grey")}
458`);try{await Mr.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function N8(e,{configuration:t,report:r,target:o}){let a=!1;if(!e.force&&ae.existsSync(J.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await g2(T0t(e),{configuration:t,context:e.context,target:o}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await ae.removePromise(o),await ae.mkdirPromise(o,{recursive:!0}),await g2(R0t(e,o),{configuration:t,context:e.context,target:o}))}async function L0t(e,t,{project:r,report:o,target:a}){let n=await Vd(r.configuration,t),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())!u.has(A)||await L8(A,e,{project:r,report:o,target:a})}Ye();Ye();St();qt();var Zge=$e(Zn()),$ge=Ie("url"),ede=Ie("vm");var Jh=class extends ut{constructor(){super(...arguments);this.name=he.String();this.checksum=he.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Pt.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||Ae.isAbsolute(this.name)){let p=J.resolve(this.context.cwd,Ae.toPortablePath(this.name));a.reportInfo(0,`Reading ${ye.pretty(r,p,ye.Type.PATH)}`),u=J.relative(n.cwd,p),A=await ae.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new $ge.URL(this.name)}catch{throw new zt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=G.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!Zge.default.valid(h.reference))throw new zt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let w=G.stringifyIdent(h),I=await Vd(r,en);if(!Object.hasOwn(I,w)){let v=`Couldn't find a plugin named ${G.prettyIdent(r,h)} on the remote registry.
459`;throw r.plugins.has(w)?v+=`A plugin named ${G.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:v+=`Note that only the plugins referenced on our website (${ye.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",ye.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${ye.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",ye.Type.URL)}).`,new zt(51,v)}u=w,p=I[w].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${w}/${h.reference}/`):en!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${en}/`))}a.reportInfo(0,`Downloading ${ye.pretty(r,p,"green")}`),A=await tn.get(p,{configuration:r})}await O8(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};Jh.paths=[["plugin","import"]],Jh.usage=nt.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
460 This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
461
462 Three types of plugin references are accepted:
463
464 - If the plugin is stored within the Yarn repository, it can be referenced by name.
465 - Third-party plugins can be referenced directly through their public urls.
466 - Local plugins can be referenced by their path on the disk.
467
468 If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
469
470 Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
471 `,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]});async function O8(e,t,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,ede.runInNewContext)(t.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,w=J.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${ye.pretty(n,h,"magenta")}`),await ae.mkdirPromise(J.dirname(w),{recursive:!0}),await ae.writeFilePromise(w,t);let I={path:h,spec:e};r&&(I.checksum=wn.makeHash(t)),await Ke.addPlugin(o.cwd,[I])}var O0t=({pluginName:e,noMinify:t},r)=>[["yarn",`build:${e}`,...t?["--no-minify"]:[],"|"]],Vh=class extends ut{constructor(){super(...arguments);this.installPath=he.String("--path",{description:"The path where the repository should be cloned to"});this.repository=he.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=he.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=he.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=he.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?J.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):J.resolve(Ae.toPortablePath((0,tde.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Nt.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await Pt.find(r,this.context.cwd),A=G.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=G.stringifyIdent(A),h=await Vd(r,en);if(!Object.hasOwn(h,p))throw new zt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let w=p;await N8(this,{configuration:r,report:n,target:o}),await L8(w,this,{project:u,report:n,target:o})})).exitCode()}};Vh.paths=[["plugin","import","from","sources"]],Vh.usage=nt.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
472 This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
473
474 The plugins can be referenced by their short name if sourced from the official Yarn repository.
475 `,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]});async function L8(e,{context:t,noMinify:r},{project:o,report:a,target:n}){let u=e.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await g2(O0t({pluginName:u,noMinify:r},n),{configuration:A,context:t,target:n}),a.reportSeparator();let p=J.resolve(n,`packages/${u}/bundles/${e}.js`),h=await ae.readFilePromise(p);await O8(e,h,{project:o,report:a})}Ye();St();qt();var zh=class extends ut{constructor(){super(...arguments);this.name=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return(await Nt.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=G.parseIdent(u);if(!r.plugins.has(u))throw new it(`${G.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=J.resolve(o.cwd,p);ae.existsSync(h)&&(n.reportInfo(0,`Removing ${ye.pretty(r,p,ye.Type.PATH)}...`),await ae.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Ke.updateConfiguration(o.cwd,{plugins:w=>{if(!Array.isArray(w))return w;let I=w.filter(v=>v.path!==p);return I.length===0?Ke.deleteProperty:I.length===w.length?w:I}})})).exitCode()}};zh.paths=[["plugin","remove"]],zh.usage=nt.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
476 This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
477
478 **Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
479 `,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]});Ye();qt();var Xh=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};Xh.paths=[["plugin","runtime"]],Xh.usage=nt.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
480 This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
481 `,examples:[["List the currently active plugins","$0 plugin runtime"]]});Ye();Ye();qt();var Zh=class extends ut{constructor(){super(...arguments);this.idents=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(G.parseIdent(A).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new ki}),u.size>0)for(let A of o.storedPackages.values())u.has(A.identHash)&&(o.storedBuildState.delete(A.locatorHash),o.skippedBuilds.delete(A.locatorHash));else o.storedBuildState.clear(),o.skippedBuilds.clear();return await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Zh.paths=[["rebuild"]],Zh.usage=nt.Usage({description:"rebuild the project's native packages",details:`
482 This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
483
484 Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
485
486 By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
487 `,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});Ye();Ye();Ye();qt();var M8=$e(Zo());Za();var $h=class extends ut{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:Vs(fl)});this.patterns=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,w=[];for(let E of this.patterns){let R=!1,N=G.parseIdent(E);for(let U of u){let V=[...U.manifest.peerDependenciesMeta.keys()];for(let ee of(0,M8.default)(V,E))U.manifest.peerDependenciesMeta.delete(ee),h=!0,R=!0;for(let ee of A){let le=U.manifest.getForScope(ee),fe=[...le.values()].map(de=>G.stringifyIdent(de));for(let de of(0,M8.default)(fe,G.stringifyIdent(N))){let{identHash:ge}=G.parseIdent(de),oe=le.get(ge);if(typeof oe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[ee].delete(ge),w.push([U,ee,oe]),h=!0,R=!0}}}R||p.push(E)}let I=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",b=this.all?"any":"this";if(p.length>0)throw new it(`${I} ${ye.prettyList(r,p,ye.Type.CODE)} ${v} match any packages referenced by ${b} workspace`);return h?(await r.triggerMultipleHooks(E=>E.afterWorkspaceDependencyRemoval,w),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};$h.paths=[["remove"]],$h.usage=nt.Usage({description:"remove dependencies from the project",details:`
488 This command will remove the packages matching the specified patterns from the current workspace.
489
490 If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
491
492 - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
493
494 - \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
495
496 This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
497 `,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});Ye();Ye();var rde=Ie("util"),zd=class extends ut{async execute(){let t=await Ke.find(this.context.cwd,this.context.plugins),{project:r,workspace:o}=await Pt.find(t,this.context.cwd);if(!o)throw new tr(r.cwd,this.context.cwd);return(await Nt.start({configuration:t,stdout:this.context.stdout},async n=>{let u=o.manifest.scripts,A=_e.sortMap(u.keys(),w=>w),p={breakLength:1/0,colors:t.get("enableColors"),maxArrayLength:2},h=A.reduce((w,I)=>Math.max(w,I.length),0);for(let[w,I]of u.entries())n.reportInfo(null,`${w.padEnd(h," ")} ${(0,rde.inspect)(I,p)}`)})).exitCode()}};zd.paths=[["run"]];Ye();Ye();qt();var e0=class extends ut{constructor(){super(...arguments);this.inspect=he.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=he.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=he.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=he.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=he.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=he.Boolean("--silent",{hidden:!0});this.scriptName=he.String();this.args=he.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await Pt.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await cn.hasPackageScript(u,this.scriptName,{project:o}))return await cn.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await cn.getPackageAccessibleBinaries(u,{project:o});if(A.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await cn.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let w=(await Promise.all(o.workspaces.map(async I=>I.manifest.scripts.has(this.scriptName)?I:null))).filter(I=>I!==null);if(w.length===1)return await cn.executeWorkspaceScript(w[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new it("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[w,I]of cw)for(let v of I)if(h.length>=v.length&&JSON.stringify(h.slice(0,v.length))===JSON.stringify(v))throw new it(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${w} plugin. You can install it with "yarn plugin import ${w}".`);throw new it(`Couldn't find a script named "${this.scriptName}".`)}}};e0.paths=[["run"]],e0.usage=nt.Usage({description:"run a script defined in the package.json",details:`
498 This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
499
500 - If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
501
502 - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.
503
504 - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
505
506 Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
507 `,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});Ye();Ye();qt();var t0=class extends ut{constructor(){super(...arguments);this.save=he.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=he.String();this.resolution=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new tr(o.cwd,this.context.cwd);let u=G.parseDescriptor(this.descriptor,!0),A=G.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};t0.paths=[["set","resolution"]],t0.usage=nt.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});Ye();St();qt();var nde=$e(Zo()),r0=class extends ut{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of u.manifest.resolutions)h.startsWith("portal:")&&A.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=J.resolve(this.context.cwd,Ae.toPortablePath(p));if(_e.isPathLike(p)){let w=await Ke.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:I,workspace:v}=await Pt.find(w,h);if(!v)throw new tr(I.cwd,h);if(this.all){for(let b of I.workspaces)b.manifest.name&&A.add(G.stringifyIdent(b.anchoredLocator));if(A.size===0)throw new it("No workspace found to be unlinked in the target project")}else{if(!v.manifest.name)throw new it("The target workspace doesn't have a name and thus cannot be unlinked");A.add(G.stringifyIdent(v.anchoredLocator))}}else{let w=[...u.manifest.resolutions.map(({pattern:I})=>I.descriptor.fullName)];for(let I of(0,nde.default)(w,p))A.add(I)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:p})=>!A.has(p.descriptor.fullName)),await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};r0.paths=[["unlink"]],r0.usage=nt.Usage({description:"disconnect the local project from another one",details:`
508 This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
509 `,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]});Ye();Ye();Ye();qt();var ide=$e(l2()),U8=$e(Zo());Za();var Jf=class extends ut{constructor(){super(...arguments);this.interactive=he.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=he.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=he.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=he.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=he.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:Vs(fl)});this.patterns=he.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(w=>G.stringifyIdent(w)),p=new Set;for(let w of this.patterns){if(G.parseDescriptor(w).range!=="unknown")throw new it("Ranges aren't allowed when using --recursive");for(let I of(0,U8.default)(A,w)){let v=G.parseIdent(I);p.add(v.identHash)}}let h=u.filter(w=>p.has(w.identHash));for(let w of h)o.storedDescriptors.delete(w.descriptorHash),o.storedResolutions.delete(w.descriptorHash);return await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=u2(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],w=[],I=[];for(let N of this.patterns){let U=!1,V=G.parseDescriptor(N),ee=G.stringifyIdent(V);for(let le of o.workspaces)for(let fe of["dependencies","devDependencies"]){let ge=[...le.manifest.getForScope(fe).values()].map(Be=>G.stringifyIdent(Be)),oe=ee==="*"?ge:(0,U8.default)(ge,ee);for(let Be of oe){let be=G.parseIdent(Be),g=le.manifest[fe].get(be.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let we=G.makeDescriptor(be,V.range);w.push(Promise.resolve().then(async()=>[le,fe,g,await A2(we,{project:o,workspace:le,cache:n,target:fe,fixed:u,modifier:p,strategies:h})])),U=!0}}U||I.push(N)}if(I.length>1)throw new it(`Patterns ${ye.prettyList(r,I,ye.Type.CODE)} don't match any packages referenced by any workspace`);if(I.length>0)throw new it(`Pattern ${ye.prettyList(r,I,ye.Type.CODE)} doesn't match any packages referenced by any workspace`);let v=await Promise.all(w),b=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:V,rejections:ee}]of v){let le=V.filter(fe=>fe.descriptor!==null);if(le.length===0){let[fe]=ee;if(typeof fe>"u")throw new Error("Assertion failed: Expected an error to have been set");let de=this.cli.error(fe);o.configuration.get("enableNetwork")?N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range
510
511${de}`):N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
512
513${de}`)}else le.length>1&&!A&&N.reportError(27,`${G.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[];for(let[N,U,,{suggestions:V}]of v){let ee,le=V.filter(oe=>oe.descriptor!==null),fe=le[0].descriptor,de=le.every(oe=>G.areDescriptorsEqual(oe.descriptor,fe));le.length===1||de?ee=fe:(E=!0,{answer:ee}=await(0,ide.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${G.prettyWorkspace(r,N)} \u276F ${U}?`,choices:V.map(({descriptor:oe,name:Be,reason:be})=>oe?{name:Be,hint:be,descriptor:oe}:{name:Be,hint:be,disabled:!0}),onCancel:()=>process.exit(130),result(oe){return this.find(oe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ge=N.manifest[U].get(ee.identHash);if(typeof ge>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(ge.descriptorHash!==ee.descriptorHash)N.manifest[U].set(ee.identHash,ee),R.push([N,U,ge,ee]);else{let oe=r.makeResolver(),Be={project:o,resolver:oe},be=r.normalizeDependency(ge),g=oe.bindDescriptor(be,N.anchoredLocator,Be);o.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),E&&this.context.stdout.write(`
514`),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Jf.paths=[["up"]],Jf.usage=nt.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),Jf.schema=[oI("recursive",Wu.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];Ye();Ye();Ye();qt();var n0=class extends ut{constructor(){super(...arguments);this.recursive=he.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=he.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=G.parseIdent(this.package).identHash,u=this.recursive?U0t(o,n,{configuration:r,peers:this.peers}):M0t(o,n,{configuration:r,peers:this.peers});ra.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};n0.paths=[["why"]],n0.usage=nt.Usage({description:"display the reason why a package is needed",details:`
515 This command prints the exact reasons why a package appears in the dependency tree.
516
517 If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
518 `,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});function M0t(e,t,{configuration:r,peers:o}){let a=_e.sortMap(e.storedPackages.values(),A=>G.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let w of A.dependencies.values()){if(!o&&A.peerDependencies.has(w.identHash))continue;let I=e.storedResolutions.get(w.descriptorHash);if(!I)throw new Error("Assertion failed: The resolution should have been registered");let v=e.storedPackages.get(I);if(!v)throw new Error("Assertion failed: The package should have been registered");if(v.identHash!==t)continue;{let E=G.stringifyLocator(A);n[E]={value:[A,ye.Type.LOCATOR],children:p}}let b=G.stringifyLocator(v);p[b]={value:[{descriptor:w,locator:v},ye.Type.DEPENDENT]}}}return u}function U0t(e,t,{configuration:r,peers:o}){let a=_e.sortMap(e.workspaces,v=>G.stringifyLocator(v.anchoredLocator)),n=new Set,u=new Set,A=v=>{if(n.has(v.locatorHash))return u.has(v.locatorHash);if(n.add(v.locatorHash),v.identHash===t)return u.add(v.locatorHash),!0;let b=!1;v.identHash===t&&(b=!0);for(let E of v.dependencies.values()){if(!o&&v.peerDependencies.has(E.identHash))continue;let R=e.storedResolutions.get(E.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let N=e.storedPackages.get(R);if(!N)throw new Error("Assertion failed: The package should have been registered");A(N)&&(b=!0)}return b&&u.add(v.locatorHash),b};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},w={children:h},I=(v,b,E)=>{if(!u.has(v.locatorHash))return;let R=E!==null?ye.tuple(ye.Type.DEPENDENT,{locator:v,descriptor:E}):ye.tuple(ye.Type.LOCATOR,v),N={},U={value:R,children:N},V=G.stringifyLocator(v);if(b[V]=U,!p.has(v.locatorHash)&&(p.add(v.locatorHash),!(E!==null&&e.tryWorkspaceByLocator(v))))for(let ee of v.dependencies.values()){if(!o&&v.peerDependencies.has(ee.identHash))continue;let le=e.storedResolutions.get(ee.descriptorHash);if(!le)throw new Error("Assertion failed: The resolution should have been registered");let fe=e.storedPackages.get(le);if(!fe)throw new Error("Assertion failed: The package should have been registered");I(fe,N,ee)}};for(let v of a)I(v.anchoredPackage,h,null);return w}Ye();var V8={};Jt(V8,{GitFetcher:()=>m2,GitResolver:()=>y2,default:()=>ogt,gitUtils:()=>na});Ye();St();var na={};Jt(na,{TreeishProtocols:()=>d2,clone:()=>J8,fetchBase:()=>Sde,fetchChangedFiles:()=>Pde,fetchChangedWorkspaces:()=>igt,fetchRoot:()=>Dde,isGitUrl:()=>yw,lsRemote:()=>vde,normalizeLocator:()=>ngt,normalizeRepoUrl:()=>dw,resolveUrl:()=>K8,splitRepoUrl:()=>i0,validateRepoUrl:()=>W8});Ye();St();qt();var Cde=$e(yde()),Ide=$e(mU()),mw=$e(Ie("querystring")),G8=$e(Zn());function q8(e,t,r){let o=e.indexOf(r);return e.lastIndexOf(t,o>-1?o:1/0)}function Ede(e){try{return new URL(e)}catch{return}}function tgt(e){let t=q8(e,"@","#"),r=q8(e,":","#");return r>t&&(e=`${e.slice(0,r)}/${e.slice(r+1)}`),q8(e,":","#")===-1&&e.indexOf("//")===-1&&(e=`ssh://${e}`),e}function wde(e){return Ede(e)||Ede(tgt(e))}function dw(e,{git:t=!1}={}){if(e=e.replace(/^git\+https:/,"https:"),e=e.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),e=e.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),t){let r=wde(e);r&&(e=r.href),e=e.replace(/^git\+([^:]+):/,"$1:")}return e}function Bde(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var rgt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],d2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(d2||{});function yw(e){return e?rgt.some(t=>!!e.match(t)):!1}function i0(e){e=dw(e);let t=e.indexOf("#");if(t===-1)return{repo:e,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=e.slice(0,t),o=e.slice(t+1);if(o.match(/^[a-z]+=/)){let a=mw.default.parse(o);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(d2).find(p=>Object.hasOwn(a,p)),[u,A]=typeof n<"u"?[n,a[n]]:["head","HEAD"];for(let p of Object.values(d2))delete a[p];return{repo:r,treeish:{protocol:u,request:A},extra:a}}else{let a=o.indexOf(":"),[n,u]=a===-1?[null,o]:[o.slice(0,a),o.slice(a+1)];return{repo:r,treeish:{protocol:n,request:u},extra:{}}}}function ngt(e){return G.makeLocator(e,dw(e.reference))}function W8(e,{configuration:t}){let r=dw(e,{git:!0});if(!tn.getNetworkSettings(`https://${(0,Cde.default)(r).resource}`,{configuration:t}).enableNetwork)throw new zt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function vde(e,t){let r=W8(e,{configuration:t}),o=await Y8("listing refs",["ls-remote",r],{cwd:t.startingCwd,env:Bde()},{configuration:t,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\t([^\n]+)/gm,u;for(;(u=n.exec(o.stdout))!==null;)a.set(u[2],u[1]);return a}async function K8(e,t){let{repo:r,treeish:{protocol:o,request:a},extra:n}=i0(e),u=await vde(r,t),A=(h,w)=>{switch(h){case"commit":{if(!w.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return mw.default.stringify({...n,commit:w})}case"head":{let I=u.get(w==="HEAD"?w:`refs/heads/${w}`);if(typeof I>"u")throw new Error(`Unknown head ("${w}")`);return mw.default.stringify({...n,commit:I})}case"tag":{let I=u.get(`refs/tags/${w}`);if(typeof I>"u")throw new Error(`Unknown tag ("${w}")`);return mw.default.stringify({...n,commit:I})}case"semver":{let I=Qr.validRange(w);if(!I)throw new Error(`Invalid range ("${w}")`);let v=new Map([...u.entries()].filter(([E])=>E.startsWith("refs/tags/")).map(([E,R])=>[G8.default.parse(E.slice(10)),R]).filter(E=>E[0]!==null)),b=G8.default.maxSatisfying([...v.keys()],I);if(b===null)throw new Error(`No matching range ("${w}")`);return mw.default.stringify({...n,commit:v.get(b)})}case null:{let I;if((I=p("commit",w))!==null||(I=p("tag",w))!==null||(I=p("head",w))!==null)return I;throw w.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${w}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${w}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${h}")`)}},p=(h,w)=>{try{return A(h,w)}catch{return null}};return dw(`${r}#${A(o,a)}`)}async function J8(e,t){return await t.getLimit("cloneConcurrency")(async()=>{let{repo:r,treeish:{protocol:o,request:a}}=i0(e);if(o!=="commit")throw new Error("Invalid treeish protocol when cloning");let n=W8(r,{configuration:t}),u=await ae.mktempPromise(),A={cwd:u,env:Bde()};return await Y8("cloning the repository",["clone","-c core.autocrlf=false",n,Ae.fromPortablePath(u)],A,{configuration:t,normalizedRepoUrl:n}),await Y8("switching branch",["checkout",`${a}`],A,{configuration:t,normalizedRepoUrl:n}),u})}async function Dde(e){let t,r=e;do{if(t=r,await ae.existsPromise(J.join(t,".git")))return t;r=J.dirname(t)}while(r!==t);return null}async function Sde(e,{baseRefs:t}){if(t.length===0)throw new it("Can't run this command with zero base refs specified.");let r=[];for(let A of t){let{code:p}=await Mr.execvp("git",["merge-base",A,"HEAD"],{cwd:e});p===0&&r.push(A)}if(r.length===0)throw new it(`No ancestor could be found between any of HEAD and ${t.join(", ")}`);let{stdout:o}=await Mr.execvp("git",["merge-base","HEAD",...r],{cwd:e,strict:!0}),a=o.trim(),{stdout:n}=await Mr.execvp("git",["show","--quiet","--pretty=format:%s",a],{cwd:e,strict:!0}),u=n.trim();return{hash:a,title:u}}async function Pde(e,{base:t,project:r}){let o=_e.buildIgnorePattern(r.configuration.get("changesetIgnorePatterns")),{stdout:a}=await Mr.execvp("git",["diff","--name-only",`${t}`],{cwd:e,strict:!0}),n=a.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>J.resolve(e,Ae.toPortablePath(h))),{stdout:u}=await Mr.execvp("git",["ls-files","--others","--exclude-standard"],{cwd:e,strict:!0}),A=u.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>J.resolve(e,Ae.toPortablePath(h))),p=[...new Set([...n,...A].sort())];return o?p.filter(h=>!J.relative(r.cwd,h).match(o)):p}async function igt({ref:e,project:t}){if(t.configuration.projectCwd===null)throw new it("This command can only be run from within a Yarn project");let r=[J.resolve(t.cwd,gr.lockfile),J.resolve(t.cwd,t.configuration.get("cacheFolder")),J.resolve(t.cwd,t.configuration.get("installStatePath")),J.resolve(t.cwd,t.configuration.get("virtualFolder"))];await t.configuration.triggerHook(u=>u.populateYarnPaths,t,u=>{u!=null&&r.push(u)});let o=await Dde(t.configuration.projectCwd);if(o==null)throw new it("This command can only be run on Git repositories");let a=await Sde(o,{baseRefs:typeof e=="string"?[e]:t.configuration.get("changesetBaseRefs")}),n=await Pde(o,{base:a.hash,project:t});return new Set(_e.mapAndFilter(n,u=>{let A=t.tryWorkspaceByFilePath(u);return A===null?_e.mapAndFilter.skip:r.some(p=>u.startsWith(p))?_e.mapAndFilter.skip:A}))}async function Y8(e,t,r,{configuration:o,normalizedRepoUrl:a}){try{return await Mr.execvp("git",t,{...r,strict:!0})}catch(n){if(!(n instanceof Mr.ExecError))throw n;let u=n.reportExtra,A=n.stderr.toString();throw new zt(1,`Failed ${e}`,p=>{p.reportError(1,` ${ye.prettyField(o,{label:"Repository URL",value:ye.tuple(ye.Type.URL,a)})}`);for(let h of A.matchAll(/^(.+?): (.*)$/gm)){let[,w,I]=h;w=w.toLowerCase();let v=w==="error"?"Error":`${(0,Ide.default)(w)} Error`;p.reportError(1,` ${ye.prettyField(o,{label:v,value:ye.tuple(ye.Type.NO_HINT,I)})}`)}u?.(p)})}}var m2=class{supports(t,r){return yw(t.reference)}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,a=new Map(r.checksums);a.set(t.locatorHash,o);let n={...r,checksums:a},u=await this.downloadHosted(t,n);if(u!==null)return u;let[A,p,h]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(t,n),...r.cacheOptions});return{packageFs:A,releaseFs:p,prefixPath:G.getIdentVendorPath(t),checksum:h}}async downloadHosted(t,r){return r.project.configuration.reduceHook(o=>o.fetchHostedRepository,null,t,r)}async cloneFromRemote(t,r){let o=await J8(t.reference,r.project.configuration),a=i0(t.reference),n=J.join(o,"package.tgz");await cn.prepareExternalProject(o,n,{configuration:r.project.configuration,report:r.report,workspace:a.extra.workspace,locator:t});let u=await ae.readFilePromise(n);return await _e.releaseAfterUseAsync(async()=>await zi.convertToZip(u,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:G.getIdentVendorPath(t),stripComponents:1}))}};Ye();Ye();var y2=class{supportsDescriptor(t,r){return yw(t.range)}supportsLocator(t,r){return yw(t.reference)}shouldPersistResolution(t,r){return!0}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){let a=await K8(t.range,o.project.configuration);return[G.makeLocator(t,a)]}async getSatisfying(t,r,o,a){let n=i0(t.range);return{locators:o.filter(A=>{if(A.identHash!==t.identHash)return!1;let p=i0(A.reference);return!(n.repo!==p.repo||n.treeish.protocol==="commit"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var sgt={configuration:{changesetBaseRefs:{description:"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.",type:"STRING",isArray:!0,isNullable:!1,default:["master","origin/master","upstream/master","main","origin/main","upstream/main"]},changesetIgnorePatterns:{description:"Array of glob patterns; files matching them will be ignored when fetching the changed files",type:"STRING",default:[],isArray:!0},cloneConcurrency:{description:"Maximal number of concurrent clones",type:"NUMBER",default:2}},fetchers:[m2],resolvers:[y2]};var ogt=sgt;qt();var s0=class extends ut{constructor(){super(...arguments);this.since=he.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.noPrivate=he.Boolean("--no-private",{description:"Exclude workspaces that have the private field set to true"});this.verbose=he.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let u=this.since?await na.fetchChangedWorkspaces({ref:this.since,project:o}):o.workspaces,A=new Set(u);if(this.recursive)for(let p of[...u].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)A.add(h);for(let p of A){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let w;if(this.verbose){let I=new Set,v=new Set;for(let b of Ot.hardDependencies)for(let[E,R]of h.getForScope(b)){let N=o.tryWorkspaceByDescriptor(R);N===null?o.workspacesByIdent.has(E)&&v.add(R):I.add(N)}w={workspaceDependencies:Array.from(I).map(b=>b.relativeCwd),mismatchedWorkspaceDependencies:Array.from(v).map(b=>G.stringifyDescriptor(b))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?G.stringifyIdent(h.name):null,...w})}})).exitCode()}};s0.paths=[["workspaces","list"]],s0.usage=nt.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project.\n\n - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\n\n - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "});Ye();Ye();qt();var o0=class extends ut{constructor(){super(...arguments);this.workspaceName=he.String();this.commandName=he.String();this.args=he.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);let n=o.workspaces,u=new Map(n.map(p=>[G.stringifyIdent(p.anchoredLocator),p])),A=u.get(this.workspaceName);if(A===void 0){let p=Array.from(u.keys()).sort();throw new it(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:
519 - ${p.join(`
520 - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};o0.paths=[["workspace"]],o0.usage=nt.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
521 This command will run a given sub-command on a single workspace.
522 `,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var agt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:xde.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[kh,Fh,Rh,Th,t0,Kh,Uh,s0,Wd,Kd,gw,Jd,bh,Qh,Nh,Lh,Oh,Mh,_h,Hh,jh,qh,r0,Gh,Yh,Vh,Jh,zh,Wh,Xh,Zh,$h,zd,e0,Jf,n0,o0]},lgt=agt;var tH={};Jt(tH,{default:()=>ugt});Ye();var Qt={optional:!0},X8=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Qt}}],["got@<11",{dependencies:{["@types/responselike"]:"^1.0.0",["@types/keyv"]:"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{["@types/keyv"]:"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{["vscode-jsonrpc"]:"^5.0.1",["vscode-languageserver-protocol"]:"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{["postcss-html"]:Qt,["postcss-jsx"]:Qt,["postcss-less"]:Qt,["postcss-markdown"]:Qt,["postcss-scss"]:Qt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{["tiny-warning"]:"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Qt}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Qt,"utf-8-validate":Qt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{["cross-spawn"]:"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{["prop-types"]:"^15.7.2"}}],["@rebass/forms@*",{dependencies:{["@styled-system/should-forward-prop"]:"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt,"vuetify-loader":Qt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{dependencies:{"babel-loader":"^8.1.0"}}],["@vue/cli-plugin-typescript@<=5.0.0-beta.0",{dependencies:{"@babel/core":"^7.12.16"},peerDependencies:{"vue-template-compiler":"^2.0.0"},peerDependenciesMeta:{"vue-template-compiler":Qt}}],["cordova-ios@<=6.3.0",{dependencies:{underscore:"^1.9.2"}}],["cordova-lib@<=10.0.1",{dependencies:{underscore:"^1.9.2"}}],["git-node-fs@*",{peerDependencies:{"js-git":"^0.7.8"},peerDependenciesMeta:{"js-git":Qt}}],["consolidate@<0.16.0",{peerDependencies:{mustache:"^3.0.0"},peerDependenciesMeta:{mustache:Qt}}],["consolidate@<=0.16.0",{peerDependencies:{velocityjs:"^2.0.1",tinyliquid:"^0.2.34","liquid-node":"^3.0.1",jade:"^1.11.0","then-jade":"*",dust:"^0.3.0","dustjs-helpers":"^1.7.4","dustjs-linkedin":"^2.7.5",swig:"^1.4.2","swig-templates":"^2.0.3","razor-tmpl":"^1.3.1",atpl:">=0.7.6",liquor:"^0.0.5",twig:"^1.15.2",ejs:"^3.1.5",eco:"^1.1.0-rc-3",jazz:"^0.0.18",jqtpl:"~1.1.0",hamljs:"^0.6.2",hamlet:"^0.3.3",whiskers:"^0.4.0","haml-coffee":"^1.14.1","hogan.js":"^3.0.2",templayed:">=0.2.3",handlebars:"^4.7.6",underscore:"^1.11.0",lodash:"^4.17.20",pug:"^3.0.0","then-pug":"*",qejs:"^3.0.5",walrus:"^0.10.1",mustache:"^4.0.1",just:"^0.1.8",ect:"^0.5.9",mote:"^0.2.0",toffee:"^0.3.6",dot:"^1.1.3","bracket-template":"^1.1.5",ractive:"^1.3.12",nunjucks:"^3.2.2",htmling:"^0.0.8","babel-core":"^6.26.3",plates:"~0.4.11","react-dom":"^16.13.1",react:"^16.13.1","arc-templates":"^0.5.3",vash:"^0.13.0",slm:"^2.0.0",marko:"^3.14.4",teacup:"^2.0.0","coffee-script":"^1.12.7",squirrelly:"^5.1.0",twing:"^5.0.2"},peerDependenciesMeta:{velocityjs:Qt,tinyliquid:Qt,"liquid-node":Qt,jade:Qt,"then-jade":Qt,dust:Qt,"dustjs-helpers":Qt,"dustjs-linkedin":Qt,swig:Qt,"swig-templates":Qt,"razor-tmpl":Qt,atpl:Qt,liquor:Qt,twig:Qt,ejs:Qt,eco:Qt,jazz:Qt,jqtpl:Qt,hamljs:Qt,hamlet:Qt,whiskers:Qt,"haml-coffee":Qt,"hogan.js":Qt,templayed:Qt,handlebars:Qt,underscore:Qt,lodash:Qt,pug:Qt,"then-pug":Qt,qejs:Qt,walrus:Qt,mustache:Qt,just:Qt,ect:Qt,mote:Qt,toffee:Qt,dot:Qt,"bracket-template":Qt,ractive:Qt,nunjucks:Qt,htmling:Qt,"babel-core":Qt,plates:Qt,"react-dom":Qt,react:Qt,"arc-templates":Qt,vash:Qt,slm:Qt,marko:Qt,teacup:Qt,"coffee-script":Qt,squirrelly:Qt,twing:Qt}}],["vue-loader@<=16.3.3",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",webpack:"^4.1.0 || ^5.0.0-0"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt}}],["vue-loader@^16.7.0",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",vue:"^3.2.13"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt,vue:Qt}}],["scss-parser@<=1.0.5",{dependencies:{lodash:"^4.17.21"}}],["query-ast@<1.0.5",{dependencies:{lodash:"^4.17.21"}}],["redux-thunk@<=2.3.0",{peerDependencies:{redux:"^4.0.0"}}],["skypack@<=0.3.2",{dependencies:{tar:"^6.1.0"}}],["@npmcli/metavuln-calculator@<2.0.0",{dependencies:{"json-parse-even-better-errors":"^2.3.1"}}],["bin-links@<2.3.0",{dependencies:{"mkdirp-infer-owner":"^1.0.2"}}],["rollup-plugin-polyfill-node@<=0.8.0",{peerDependencies:{rollup:"^1.20.0 || ^2.0.0"}}],["snowpack@<3.8.6",{dependencies:{"magic-string":"^0.25.7"}}],["elm-webpack-loader@*",{dependencies:{temp:"^0.9.4"}}],["winston-transport@<=4.4.0",{dependencies:{logform:"^2.2.0"}}],["jest-vue-preprocessor@*",{dependencies:{"@babel/core":"7.8.7","@babel/template":"7.8.6"},peerDependencies:{pug:"^2.0.4"},peerDependenciesMeta:{pug:Qt}}],["redux-persist@*",{peerDependencies:{react:">=16"},peerDependenciesMeta:{react:Qt}}],["sodium@>=3",{dependencies:{"node-gyp":"^3.8.0"}}],["babel-plugin-graphql-tag@<=3.1.0",{peerDependencies:{graphql:"^14.0.0 || ^15.0.0"}}],["@playwright/test@<=1.14.1",{dependencies:{"jest-matcher-utils":"^26.4.2"}}],...["babel-plugin-remove-graphql-queries@<3.14.0-next.1","babel-preset-gatsby-package@<1.14.0-next.1","create-gatsby@<1.14.0-next.1","gatsby-admin@<0.24.0-next.1","gatsby-cli@<3.14.0-next.1","gatsby-core-utils@<2.14.0-next.1","gatsby-design-tokens@<3.14.0-next.1","gatsby-legacy-polyfills@<1.14.0-next.1","gatsby-plugin-benchmark-reporting@<1.14.0-next.1","gatsby-plugin-graphql-config@<0.23.0-next.1","gatsby-plugin-image@<1.14.0-next.1","gatsby-plugin-mdx@<2.14.0-next.1","gatsby-plugin-netlify-cms@<5.14.0-next.1","gatsby-plugin-no-sourcemaps@<3.14.0-next.1","gatsby-plugin-page-creator@<3.14.0-next.1","gatsby-plugin-preact@<5.14.0-next.1","gatsby-plugin-preload-fonts@<2.14.0-next.1","gatsby-plugin-schema-snapshot@<2.14.0-next.1","gatsby-plugin-styletron@<6.14.0-next.1","gatsby-plugin-subfont@<3.14.0-next.1","gatsby-plugin-utils@<1.14.0-next.1","gatsby-recipes@<0.25.0-next.1","gatsby-source-shopify@<5.6.0-next.1","gatsby-source-wikipedia@<3.14.0-next.1","gatsby-transformer-screenshot@<3.14.0-next.1","gatsby-worker@<0.5.0-next.1"].map(e=>[e,{dependencies:{"@babel/runtime":"^7.14.8"}}]),["gatsby-core-utils@<2.14.0-next.1",{dependencies:{got:"8.3.2"}}],["gatsby-plugin-gatsby-cloud@<=3.1.0-next.0",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["gatsby-plugin-gatsby-cloud@<=3.2.0-next.1",{peerDependencies:{webpack:"*"}}],["babel-plugin-remove-graphql-queries@<=3.14.0-next.1",{dependencies:{"gatsby-core-utils":"^2.8.0-next.1"}}],["gatsby-plugin-netlify@3.13.0-next.1",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["clipanion-v3-codemod@<=0.2.0",{peerDependencies:{jscodeshift:"^0.11.0"}}],["react-live@*",{peerDependencies:{"react-dom":"*",react:"*"}}],["webpack@<4.44.1",{peerDependenciesMeta:{"webpack-cli":Qt,"webpack-command":Qt}}],["webpack@<5.0.0-beta.23",{peerDependenciesMeta:{"webpack-cli":Qt}}],["webpack-dev-server@<3.10.2",{peerDependenciesMeta:{"webpack-cli":Qt}}],["@docusaurus/responsive-loader@<1.5.0",{peerDependenciesMeta:{sharp:Qt,jimp:Qt}}],["eslint-module-utils@*",{peerDependenciesMeta:{"eslint-import-resolver-node":Qt,"eslint-import-resolver-typescript":Qt,"eslint-import-resolver-webpack":Qt,"@typescript-eslint/parser":Qt}}],["eslint-plugin-import@*",{peerDependenciesMeta:{"@typescript-eslint/parser":Qt}}],["critters-webpack-plugin@<3.0.2",{peerDependenciesMeta:{"html-webpack-plugin":Qt}}],["terser@<=5.10.0",{dependencies:{acorn:"^8.5.0"}}],["babel-preset-react-app@10.0.x",{dependencies:{"@babel/plugin-proposal-private-property-in-object":"^7.16.0"}}],["eslint-config-react-app@*",{peerDependenciesMeta:{typescript:Qt}}],["@vue/eslint-config-typescript@<11.0.0",{peerDependenciesMeta:{typescript:Qt}}],["unplugin-vue2-script-setup@<0.9.1",{peerDependencies:{"@vue/composition-api":"^1.4.3","@vue/runtime-dom":"^3.2.26"}}],["@cypress/snapshot@*",{dependencies:{debug:"^3.2.7"}}],["auto-relay@<=0.14.0",{peerDependencies:{"reflect-metadata":"^0.1.13"}}],["vue-template-babel-compiler@<1.2.0",{peerDependencies:{["vue-template-compiler"]:"^2.6.0"}}],["@parcel/transformer-image@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["@parcel/transformer-js@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["parcel@*",{peerDependenciesMeta:{["@parcel/core"]:Qt}}],["react-scripts@*",{peerDependencies:{eslint:"*"}}],["focus-trap-react@^8.0.0",{dependencies:{tabbable:"^5.3.2"}}],["react-rnd@<10.3.7",{peerDependencies:{react:">=16.3.0","react-dom":">=16.3.0"}}],["connect-mongo@*",{peerDependencies:{"express-session":"^1.17.1"}}],["vue-i18n@<9",{peerDependencies:{vue:"^2"}}],["vue-router@<4",{peerDependencies:{vue:"^2"}}],["unified@<10",{dependencies:{"@types/unist":"^2.0.0"}}],["react-github-btn@<=1.3.0",{peerDependencies:{react:">=16.3.0"}}],["react-dev-utils@*",{peerDependencies:{typescript:">=2.7",webpack:">=4"},peerDependenciesMeta:{typescript:Qt}}],["@asyncapi/react-component@<=1.0.0-next.39",{peerDependencies:{react:">=16.8.0","react-dom":">=16.8.0"}}],["xo@*",{peerDependencies:{webpack:">=1.11.0"},peerDependenciesMeta:{webpack:Qt}}],["babel-plugin-remove-graphql-queries@<=4.20.0-next.0",{dependencies:{"@babel/types":"^7.15.4"}}],["gatsby-plugin-page-creator@<=4.20.0-next.1",{dependencies:{"fs-extra":"^10.1.0"}}],["gatsby-plugin-utils@<=3.14.0-next.1",{dependencies:{fastq:"^1.13.0"},peerDependencies:{graphql:"^15.0.0"}}],["gatsby-plugin-mdx@<3.1.0-next.1",{dependencies:{mkdirp:"^1.0.4"}}],["gatsby-plugin-mdx@^2",{peerDependencies:{gatsby:"^3.0.0-next"}}],["fdir@<=5.2.0",{peerDependencies:{picomatch:"2.x"},peerDependenciesMeta:{picomatch:Qt}}],["babel-plugin-transform-typescript-metadata@<=0.3.2",{peerDependencies:{"@babel/core":"^7","@babel/traverse":"^7"},peerDependenciesMeta:{"@babel/traverse":Qt}}],["graphql-compose@>=9.0.10",{peerDependencies:{graphql:"^14.2.0 || ^15.0.0 || ^16.0.0"}}]];var Z8;function bde(){return typeof Z8>"u"&&(Z8=Ie("zlib").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N7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),Z8}var $8;function Qde(){return typeof $8>"u"&&($8=Ie("zlib").brotliDecompressSync(Buffer.from("G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bcsRBsmarF328pAln04nyJFkwUAvNu934supAqLtyerZZpJ8I8suJHhf/ocMV+scKwa8NOiDKIPXw6Ex/EEZD6TEGaW8N5zvNHYF10l6Lfooj7D5W2k3dgvQSbp2Wv8TGOayS978gxlOLVjTGXs66ozewbrjwElLtyrYNnWTfzzdEutgROUFPVMhnMoy8EjJLLlWwIEoySxliim9kYW30JUHiPVyjt0iAw/ZpPmCbUCltYPnq6ZNblIKhTNhqS/oqC9iya5sGKZTOVsTEg34n92uZTf2iPpcZih8rPW8CzA+adIGmyCPc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qRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=","base64")).toString()),$8}var eH;function kde(){return typeof eH>"u"&&(eH=Ie("zlib").brotliDecompressSync(Buffer.from("m+glNQVystFl82jDWaeKVz5vCuRkI0+nDAO0BbahUf/v9oR0hj3ZG6FzbNK/g4IZ1m5A1VsBlcOWdAb/iNTCECLDJMFbG1WIHzt9BQLURMmode+yEyPqQalKrdiNeCPQe+OrHICpt+3NMLloYUFMHOY+P8ra98t42fVt+9PKKa968e2duc+/O2icAXx5pUSFtipelqMWzl+qUt4COLn13gEp7MbOmEWxGeaES9GEyNMvj5eDL6t2r4MGegcyGkb4GyhXQFr88lXt3z9fL33XWUJJrovX6FblViFZAGVOKIizC9nDK3/+NPv3z9dD20SxhQTb2Cgs6c6V5lxzdkAgzCqmjSQfmWNR0WbTqgIdqUjLfiUryfNEYIra+QmtxvE3iZcTFobKTph1CUBI1JRu+z019r3GQ9CboB6exJZk2Z4i2u79S9hCNQ2tWnfGYL4yuE5RqzQp9sPCLyga0EUBuYlh49J8FEBxG3ttn56fW7ekx9IQfrFWZ7Neycz9X5haXiFIBDjvLbVJnMcVwF2bdOKeOIcbTZGSQ463Cehf9etzGt3ADAEQbwCC9Eij8VslB2lDrl///6pGdwMSIFIiqWBZwSmFy8mXa8g359u5uhuQqTSRm6kNMRwOF0+qmqvCL03EF1L+AnwjfTu8LOSwJWuGtSEhIL8+rf73TLWMmaS3CKS1KZ9plX5YtmyzZIJmCmmmgORC2CmiPKZPif+4rAlT6n+h7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0sJyCNSsWa2N3y/HeYVlKdyWYarZ/Qwwz6Ei9acPeCh/h6OP/cg/E13pOalp4zsu6jYuoc153xQEArDcRGDJ6qY8lXbdxOmwY0IEMKespyo5hdhYTaTIDAMTCg3z46yvz8bY47I8rUopyaFzy5li2jqITg5fav2uM3XotzVeuTZbyyW5rY2Ik9z1peHg6sp9ajKYiURFjR2y0jVkRF9diohSD++RG1NFi5ZZ08OpQ6BNmSst0s3QQRSzMsWU0eC4bPbftFmV2mOgFNLxVsaiD5dvX9BEA3ARlHTx2T6FCnrrj5TRMSE6OMdNgzLsoyuygDTEVLoro7tqpYRVKuTVK16Lo2vu0G+0hWnF1m4bRiaby9E+r8M4XqK4gNF+Iw/CFBHBFByALIQfUg2Wa3qbsoeBmsKKgnY1SAfXXjwDgQrjyHuduoQPrXiFmIcz3SL53vpTeNw/rxFQPcWV6n6+L7jloOs2NEJefu4RMDiwWgwEAl5e4aoatT2oVPxE=","base64")).toString()),eH}var Fde=new Map([[G.makeIdent(null,"fsevents").identHash,bde],[G.makeIdent(null,"resolve").identHash,Qde],[G.makeIdent(null,"typescript").identHash,kde]]),cgt={hooks:{registerPackageExtensions:async(e,t)=>{for(let[r,o]of X8)t(G.parseDescriptor(r,!0),o)},getBuiltinPatch:async(e,t)=>{let r="compat/";if(!t.startsWith(r))return;let o=G.parseIdent(t.slice(r.length)),a=Fde.get(o.identHash)?.();return typeof a<"u"?a:null},reduceDependency:async(e,t,r,o)=>typeof Fde.get(e.identHash)>"u"?e:G.makeDescriptor(e,G.makeRange({protocol:"patch:",source:G.stringifyDescriptor(e),selector:`optional!builtin<compat/${G.stringifyIdent(e)}>`,params:null}))}},ugt=cgt;var yH={};Jt(yH,{ConstraintsCheckCommand:()=>p0,ConstraintsQueryCommand:()=>A0,ConstraintsSourceCommand:()=>f0,default:()=>Ogt});Ye();Ye();w2();var ww=class{constructor(t){this.project=t}createEnvironment(){let t=new Ew(["cwd","ident"]),r=new Ew(["workspace","type","ident"]),o=new Ew(["ident"]),a={manifestUpdates:new Map,reportedErrors:new Map},n=new Map,u=new Map;for(let A of this.project.storedPackages.values()){let p=Array.from(A.peerDependencies.values(),h=>[G.stringifyIdent(h),h.range]);n.set(A.locatorHash,{workspace:null,ident:G.stringifyIdent(A),version:A.version,dependencies:new Map,peerDependencies:new Map(p.filter(([h])=>A.peerDependenciesMeta.get(h)?.optional!==!0)),optionalPeerDependencies:new Map(p.filter(([h])=>A.peerDependenciesMeta.get(h)?.optional===!0))})}for(let A of this.project.storedPackages.values()){let p=n.get(A.locatorHash);p.dependencies=new Map(Array.from(A.dependencies.values(),h=>{let w=this.project.storedResolutions.get(h.descriptorHash);if(typeof w>"u")throw new Error("Assertion failed: The resolution should have been registered");let I=n.get(w);if(typeof I>"u")throw new Error("Assertion failed: The package should have been registered");return[G.stringifyIdent(h),I]})),p.dependencies.delete(p.ident)}for(let A of this.project.workspaces){let p=G.stringifyIdent(A.anchoredLocator),h=A.manifest.exportTo({}),w=n.get(A.anchoredLocator.locatorHash);if(typeof w>"u")throw new Error("Assertion failed: The package should have been registered");let I=(R,N,{caller:U=cs.getCaller()}={})=>{let V=E2(R),ee=_e.getMapWithDefault(a.manifestUpdates,A.cwd),le=_e.getMapWithDefault(ee,V),fe=_e.getSetWithDefault(le,N);U!==null&&fe.add(U)},v=R=>I(R,void 0,{caller:cs.getCaller()}),b=R=>{_e.getArrayWithDefault(a.reportedErrors,A.cwd).push(R)},E=t.insert({cwd:A.relativeCwd,ident:p,manifest:h,pkg:w,set:I,unset:v,error:b});u.set(A,E);for(let R of Ot.allDependencies)for(let N of A.manifest[R].values()){let U=G.stringifyIdent(N),V=()=>{I([R,U],void 0,{caller:cs.getCaller()})},ee=fe=>{I([R,U],fe,{caller:cs.getCaller()})},le=null;if(R!=="peerDependencies"&&(R!=="dependencies"||!A.manifest.devDependencies.has(N.identHash))){let fe=A.anchoredPackage.dependencies.get(N.identHash);if(fe){if(typeof fe>"u")throw new Error("Assertion failed: The dependency should have been registered");let de=this.project.storedResolutions.get(fe.descriptorHash);if(typeof de>"u")throw new Error("Assertion failed: The resolution should have been registered");let ge=n.get(de);if(typeof ge>"u")throw new Error("Assertion failed: The package should have been registered");le=ge}}r.insert({workspace:E,ident:U,range:N.range,type:R,resolution:le,update:ee,delete:V,error:b})}}for(let A of this.project.storedPackages.values()){let p=this.project.tryWorkspaceByLocator(A);if(!p)continue;let h=u.get(p);if(typeof h>"u")throw new Error("Assertion failed: The workspace should have been registered");let w=n.get(A.locatorHash);if(typeof w>"u")throw new Error("Assertion failed: The package should have been registered");w.workspace=h}return{workspaces:t,dependencies:r,packages:o,result:a}}async process(){let t=this.createEnvironment(),r={Yarn:{workspace:a=>t.workspaces.find(a)[0]??null,workspaces:a=>t.workspaces.find(a),dependency:a=>t.dependencies.find(a)[0]??null,dependencies:a=>t.dependencies.find(a),package:a=>t.packages.find(a)[0]??null,packages:a=>t.packages.find(a)}},o=await this.project.loadUserConfig();return o?.constraints?(await o.constraints(r),t.result):null}};Ye();Ye();qt();var A0=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.query=he.String()}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(D2(),v2)),o=await Ke.find(this.context.cwd,this.context.plugins),{project:a}=await Pt.find(o,this.context.cwd),n=await r.find(a),u=this.query;return u.endsWith(".")||(u=`${u}.`),(await Nt.start({configuration:o,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(u)){let w=Array.from(Object.entries(h)),I=w.length,v=w.reduce((b,[E])=>Math.max(b,E.length),0);for(let b=0;b<I;b++){let[E,R]=w[b];p.reportInfo(null,`${Ngt(b,I)}${E.padEnd(v," ")} = ${Tgt(R)}`)}p.reportJson(h)}})).exitCode()}};A0.paths=[["constraints","query"]],A0.usage=nt.Usage({category:"Constraints-related commands",description:"query the constraints fact database",details:`
523 This command will output all matches to the given prolog query.
524 `,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]});function Tgt(e){return typeof e!="string"?`${e}`:e.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?e:`'${e}'`}function Ngt(e,t){let r=e===0,o=e===t-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Ye();qt();var f0=class extends ut{constructor(){super(...arguments);this.verbose=he.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(D2(),v2)),o=await Ke.find(this.context.cwd,this.context.plugins),{project:a}=await Pt.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};f0.paths=[["constraints","source"]],f0.usage=nt.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]});Ye();Ye();qt();w2();var p0=class extends ut{constructor(){super(...arguments);this.fix=he.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);await o.restoreInstallState();let a=await o.loadUserConfig(),n;if(a?.constraints)n=new ww(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(D2(),v2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let w=await n.process();if(!w)break;let{changedWorkspaces:I,remainingErrors:v}=pQ(o,w,{fix:this.fix}),b=[];for(let[E,R]of I){let N=E.manifest.indent;E.manifest=new Ot,E.manifest.indent=N,E.manifest.load(R),b.push(E.persistManifest())}if(!(I.size>0&&h>1)){u=Ude(v,{configuration:r}),A=!1,p=!0;for(let[,E]of v)for(let R of E)R.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${ye.pretty(r,"yarn constraints --fix",ye.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${ye.pretty(r,"yarn constraints --fix",ye.Type.CODE)}`;await Nt.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async w=>{w.reportInfo(0,h),w.reportSeparator()})}return u.children=_e.sortMap(u.children,h=>h.value[1]),ra.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};p0.paths=[["constraints"]],p0.usage=nt.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
525 This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
526
527 If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
528
529 For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
530 `,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});w2();var Lgt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[A0,f0,p0],hooks:{async validateProjectAfterInstall(e,{reportError:t}){if(!e.configuration.get("enableConstraintsChecks"))return;let r=await e.loadUserConfig(),o;if(r?.constraints)o=new ww(e);else{let{Constraints:u}=await Promise.resolve().then(()=>(D2(),v2));o=await u.find(e)}let a=await o.process();if(!a)return;let{remainingErrors:n}=pQ(e,a);if(n.size!==0)if(e.configuration.isCI)for(let[u,A]of n)for(let p of A)t(84,`${ye.pretty(e.configuration,u.anchoredLocator,ye.Type.IDENT)}: ${p.text}`);else t(84,`Constraint check failed; run ${ye.pretty(e.configuration,"yarn constraints",ye.Type.CODE)} for more details`)}}},Ogt=Lgt;var EH={};Jt(EH,{CreateCommand:()=>em,DlxCommand:()=>h0,default:()=>Ugt});Ye();qt();var em=class extends ut{constructor(){super(...arguments);this.pkg=he.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=he.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=he.String();this.args=he.Proxy()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=G.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?G.makeIdent(a.scope,`create-${a.name}`):G.makeIdent(null,`create-${a.name}`),u=G.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};em.paths=[["create"]];Ye();Ye();St();qt();var h0=class extends ut{constructor(){super(...arguments);this.packages=he.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=he.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=he.String();this.args=he.Proxy()}async execute(){return Ke.telemetry=null,await ae.mktempPromise(async r=>{let o=J.join(r,`dlx-${process.pid}`);await ae.mkdirPromise(o),await ae.writeFilePromise(J.join(o,"package.json"),`{}
531`),await ae.writeFilePromise(J.join(o,"yarn.lock"),"");let a=J.join(o,".yarnrc.yml"),n=await Ke.findProjectCwd(this.context.cwd,gr.lockfile),A={enableGlobalCache:!(await Ke.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Ju(68),level:ye.LogLevel.Discard}]},p=n!==null?J.join(n,".yarnrc.yml"):null;p!==null&&ae.existsSync(p)?(await ae.copyFilePromise(p,a),await Ke.updateConfiguration(o,N=>{let U=_e.toMerged(N,A);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(V=>{let ee=typeof V=="string"?V:V.path,le=Ae.isAbsolute(ee)?ee:Ae.resolve(Ae.fromPortablePath(n),ee);return typeof V=="string"?le:{path:le,spec:V.spec}})),U})):await ae.writeJsonPromise(a,A);let h=this.packages??[this.command],w=G.parseDescriptor(this.command).name,I=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(I!==0)return I;this.quiet||this.context.stdout.write(`
532`);let v=await Ke.find(o,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,o);if(E===null)throw new tr(b.cwd,o);await b.restoreInstallState();let R=await cn.getWorkspaceAccessibleBinaries(E);return R.has(w)===!1&&R.size===1&&typeof this.packages>"u"&&(w=Array.from(R)[0][0]),await cn.executeWorkspaceAccessibleBinary(E,w,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};h0.paths=[["dlx"]],h0.usage=nt.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var Mgt={commands:[em,h0]},Ugt=Mgt;var IH={};Jt(IH,{ExecFetcher:()=>P2,ExecResolver:()=>x2,default:()=>jgt,execUtils:()=>mQ});Ye();Ye();St();var pA="exec:";var mQ={};Jt(mQ,{loadGeneratorFile:()=>S2,makeLocator:()=>CH,makeSpec:()=>Ame,parseSpec:()=>wH});Ye();St();function wH(e){let{params:t,selector:r}=G.parseRange(e),o=Ae.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?G.parseLocator(t.locator):null,path:o}}function Ame({parentLocator:e,path:t,generatorHash:r,protocol:o}){let a=e!==null?{locator:G.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:t,selector:t,params:{...n,...a}})}function CH(e,{parentLocator:t,path:r,generatorHash:o,protocol:a}){return G.makeLocator(e,Ame({parentLocator:t,path:r,generatorHash:o,protocol:a}))}async function S2(e,t,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e,{protocol:t}),n=J.isAbsolute(a)?{packageFs:new hn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new hn(Bt.root),prefixPath:J.relative(Bt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var P2=class{supports(t,r){return!!t.reference.startsWith(pA)}getLocalPath(t,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t.reference,{protocol:pA});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t),loader:()=>this.fetchFromDisk(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:u}}async fetchFromDisk(t,r){let o=await S2(t.reference,pA,r);return ae.mktempPromise(async a=>{let n=J.join(a,"generator.js");return await ae.writeFilePromise(n,o),ae.mktempPromise(async u=>{if(await this.generatePackage(u,t,n,r),!ae.existsSync(J.join(u,"build")))throw new Error("The script should have generated a build directory");return await zi.makeArchiveFromDirectory(J.join(u,"build"),{prefixPath:G.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(t,r,o,a){return await ae.mktempPromise(async n=>{let u=await cn.makeScriptEnv({project:a.project,binFolder:n}),A=J.join(t,"runtime.js");return await ae.mktempPromise(async p=>{let h=J.join(p,"buildfile.log"),w=J.join(t,"generator"),I=J.join(t,"build");await ae.mkdirPromise(w),await ae.mkdirPromise(I);let v={tempDir:Ae.fromPortablePath(w),buildDir:Ae.fromPortablePath(I),locator:G.stringifyLocator(r)};await ae.writeFilePromise(A,`
533 // Expose 'Module' as a global variable
534 Object.defineProperty(global, 'Module', {
535 get: () => require('module'),
536 configurable: true,
537 enumerable: false,
538 });
539
540 // Expose non-hidden built-in modules as global variables
541 for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {
542 Object.defineProperty(global, name, {
543 get: () => require(name),
544 configurable: true,
545 enumerable: false,
546 });
547 }
548
549 // Expose the 'execEnv' global variable
550 Object.defineProperty(global, 'execEnv', {
551 value: {
552 ...${JSON.stringify(v)},
553 },
554 enumerable: true,
555 });
556 `);let b=u.NODE_OPTIONS||"",E=/\s*--require\s+\S*\.pnp\.c?js\s*/g;b=b.replace(E," ").trim(),u.NODE_OPTIONS=b;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${G.stringifyLocator(r)})
557`,prefix:G.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Mr.pipevp(process.execPath,["--require",Ae.fromPortablePath(A),Ae.fromPortablePath(o),G.stringifyIdent(r)],{cwd:t,env:u,stdin:null,stdout:R,stderr:N});if(U!==0)throw ae.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${ye.pretty(a.project.configuration,h,ye.Type.PATH)})`)})})}};Ye();Ye();var _gt=2,x2=class{supportsDescriptor(t,r){return!!t.range.startsWith(pA)}supportsLocator(t,r){return!!t.reference.startsWith(pA)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return G.bindDescriptor(t,{locator:G.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=wH(t.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await S2(G.makeRange({protocol:pA,source:a,selector:a,params:{locator:G.stringifyLocator(n)}}),pA,o.fetchOptions),A=wn.makeHash(`${_gt}`,u).slice(0,6);return[CH(t,{parentLocator:n,path:a,generatorHash:A,protocol:pA})]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Hgt={fetchers:[P2],resolvers:[x2]},jgt=Hgt;var vH={};Jt(vH,{FileFetcher:()=>F2,FileResolver:()=>R2,TarballFileFetcher:()=>T2,TarballFileResolver:()=>N2,default:()=>Ygt,fileUtils:()=>tm});Ye();St();var vw=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,b2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,_i="file:";var tm={};Jt(tm,{fetchArchiveFromLocator:()=>k2,makeArchiveFromLocator:()=>yQ,makeBufferFromLocator:()=>BH,makeLocator:()=>Dw,makeSpec:()=>fme,parseSpec:()=>Q2});Ye();St();function Q2(e){let{params:t,selector:r}=G.parseRange(e),o=Ae.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?G.parseLocator(t.locator):null,path:o}}function fme({parentLocator:e,path:t,hash:r,protocol:o}){let a=e!==null?{locator:G.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:t,selector:t,params:{...n,...a}})}function Dw(e,{parentLocator:t,path:r,hash:o,protocol:a}){return G.makeLocator(e,fme({parentLocator:t,path:r,hash:o,protocol:a}))}async function k2(e,t){let{parentLocator:r,path:o}=G.parseFileStyleRange(e.reference,{protocol:_i}),a=J.isAbsolute(o)?{packageFs:new hn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await t.fetcher.fetch(r,t),n=a.localPath?{packageFs:new hn(Bt.root),prefixPath:J.relative(Bt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=J.join(n.prefixPath,o);return await _e.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function yQ(e,{protocol:t,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=G.parseFileStyleRange(e.reference,{protocol:t}),u=J.isAbsolute(n)?{packageFs:new hn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new hn(Bt.root),prefixPath:J.relative(Bt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=J.join(A.prefixPath,n);return await _e.releaseAfterUseAsync(async()=>await zi.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:G.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function BH(e,{protocol:t,fetchOptions:r}){return(await yQ(e,{protocol:t,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var F2=class{supports(t,r){return!!t.reference.startsWith(_i)}getLocalPath(t,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t.reference,{protocol:_i});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:u}}async fetchFromDisk(t,r){return yQ(t,{protocol:_i,fetchOptions:r})}};Ye();Ye();var qgt=2,R2=class{supportsDescriptor(t,r){return t.range.match(vw)?!0:!!t.range.startsWith(_i)}supportsLocator(t,r){return!!t.reference.startsWith(_i)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return vw.test(t.range)&&(t=G.makeDescriptor(t,`${_i}${t.range}`)),G.bindDescriptor(t,{locator:G.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=Q2(t.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await BH(G.makeLocator(t,G.makeRange({protocol:_i,source:a,selector:a,params:{locator:G.stringifyLocator(n)}})),{protocol:_i,fetchOptions:o.fetchOptions}),A=wn.makeHash(`${qgt}`,u).slice(0,6);return[Dw(t,{parentLocator:n,path:a,hash:A,protocol:_i})]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ye();var T2=class{supports(t,r){return b2.test(t.reference)?!!t.reference.startsWith(_i):!1}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),checksum:u}}async fetchFromDisk(t,r){let o=await k2(t,r);return await zi.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:G.getIdentVendorPath(t),stripComponents:1})}};Ye();Ye();Ye();var N2=class{supportsDescriptor(t,r){return b2.test(t.range)?!!(t.range.startsWith(_i)||vw.test(t.range)):!1}supportsLocator(t,r){return b2.test(t.reference)?!!t.reference.startsWith(_i):!1}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return vw.test(t.range)&&(t=G.makeDescriptor(t,`${_i}${t.range}`)),G.bindDescriptor(t,{locator:G.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=Q2(t.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=Dw(t,{parentLocator:n,path:a,hash:"",protocol:_i}),A=await k2(u,o.fetchOptions),p=wn.makeHash(A).slice(0,6);return[Dw(t,{parentLocator:n,path:a,hash:p,protocol:_i})]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Ggt={fetchers:[T2,F2],resolvers:[N2,R2]},Ygt=Ggt;var PH={};Jt(PH,{GithubFetcher:()=>L2,default:()=>Kgt,githubUtils:()=>EQ});Ye();St();var EQ={};Jt(EQ,{invalidGithubUrlMessage:()=>gme,isGithubUrl:()=>DH,parseGithubUrl:()=>SH});var pme=$e(Ie("querystring")),hme=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];function DH(e){return e?hme.some(t=>!!e.match(t)):!1}function SH(e){let t;for(let A of hme)if(t=e.match(A),t)break;if(!t)throw new Error(gme(e));let[,r,o,a,n="master"]=t,{commit:u}=pme.default.parse(n);return n=u||n.replace(/[^:]*:/,""),{auth:r,username:o,reponame:a,treeish:n}}function gme(e){return`Input cannot be parsed as a valid GitHub URL ('${e}').`}var L2=class{supports(t,r){return!!DH(t.reference)}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),checksum:u}}async fetchFromNetwork(t,r){let o=await tn.get(this.getLocatorUrl(t,r),{configuration:r.project.configuration});return await ae.mktempPromise(async a=>{let n=new hn(a);await zi.extractArchiveTo(o,n,{stripComponents:1});let u=na.splitRepoUrl(t.reference),A=J.join(a,"package.tgz");await cn.prepareExternalProject(a,A,{configuration:r.project.configuration,report:r.report,workspace:u.extra.workspace,locator:t});let p=await ae.readFilePromise(A);return await zi.convertToZip(p,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:G.getIdentVendorPath(t),stripComponents:1})})}getLocatorUrl(t,r){let{auth:o,username:a,reponame:n,treeish:u}=SH(t.reference);return`https://${o?`${o}@`:""}github.com/${a}/${n}/archive/${u}.tar.gz`}};var Wgt={hooks:{async fetchHostedRepository(e,t,r){if(e!==null)return e;let o=new L2;if(!o.supports(t,r))return null;try{return await o.fetch(t,r)}catch{return null}}}},Kgt=Wgt;var xH={};Jt(xH,{TarballHttpFetcher:()=>U2,TarballHttpResolver:()=>_2,default:()=>Vgt});Ye();var O2=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?(?:#.*)?$/,M2=/^https?:/;var U2=class{supports(t,r){return O2.test(t.reference)?!!M2.test(t.reference):!1}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),checksum:u}}async fetchFromNetwork(t,r){let o=await tn.get(t.reference,{configuration:r.project.configuration});return await zi.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:G.getIdentVendorPath(t),stripComponents:1})}};Ye();Ye();var _2=class{supportsDescriptor(t,r){return O2.test(t.range)?!!M2.test(t.range):!1}supportsLocator(t,r){return O2.test(t.reference)?!!M2.test(t.reference):!1}shouldPersistResolution(t,r){return!0}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){return[G.convertDescriptorToLocator(t)]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Jgt={fetchers:[U2],resolvers:[_2]},Vgt=Jgt;var bH={};Jt(bH,{InitCommand:()=>g0,default:()=>Xgt});Ye();Ye();St();qt();var g0=class extends ut{constructor(){super(...arguments);this.private=he.Boolean("-p,--private",!1,{description:"Initialize a private package"});this.workspace=he.Boolean("-w,--workspace",!1,{description:"Initialize a workspace root with a `packages/` directory"});this.install=he.String("-i,--install",!1,{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"});this.name=he.String("-n,--name",{description:"Initialize a package with the given name"});this.usev2=he.Boolean("-2",!1,{hidden:!0});this.yes=he.Boolean("-y,--yes",{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=typeof this.install=="string"?this.install:this.usev2||this.install===!0?"latest":null;return o!==null?await this.executeProxy(r,o):await this.executeRegular(r)}async executeProxy(r,o){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new it("Cannot use the --install flag from within a project subdirectory");ae.existsSync(this.context.cwd)||await ae.mkdirPromise(this.context.cwd,{recursive:!0});let a=J.join(this.context.cwd,gr.lockfile);ae.existsSync(a)||await ae.writeFilePromise(a,"");let n=await this.cli.run(["set","version",o],{quiet:!0});if(n!==0)return n;let u=[];return this.private&&u.push("-p"),this.workspace&&u.push("-w"),this.name&&u.push(`-n=${this.name}`),this.yes&&u.push("-y"),await ae.mktempPromise(async A=>{let{code:p}=await Mr.pipevp("yarn",["init",...u],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await cn.makeScriptEnv({binFolder:A})});return p})}async executeRegular(r){let o=null;try{o=(await Pt.find(r,this.context.cwd)).project}catch{o=null}ae.existsSync(this.context.cwd)||await ae.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Ot.tryFind(this.context.cwd),n=a??new Ot,u=Object.fromEntries(r.get("initFields").entries());n.load(u),n.name=n.name??G.makeIdent(r.get("initScope"),this.name??J.basename(this.context.cwd)),n.packageManager=en&&_e.isTaggedYarnVersion(en)?`yarn@${en}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await ae.mkdirPromise(J.join(this.context.cwd,"packages"),{recursive:!0}),n.workspaceDefinitions=[{pattern:"packages/*"}]);let A={};n.exportTo(A);let p=J.join(this.context.cwd,Ot.fileName);await ae.changeFilePromise(p,`${JSON.stringify(A,null,2)}
558`,{automaticNewlines:!0});let h=[p],w=J.join(this.context.cwd,"README.md");if(ae.existsSync(w)||(await ae.writeFilePromise(w,`# ${G.stringifyIdent(n.name)}
559`),h.push(w)),!o||o.cwd===this.context.cwd){let I=J.join(this.context.cwd,gr.lockfile);ae.existsSync(I)||(await ae.writeFilePromise(I,""),h.push(I));let b=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/zero-installs","","#!.yarn/cache",".pnp.*"].map(fe=>`${fe}
560`).join(""),E=J.join(this.context.cwd,".gitignore");ae.existsSync(E)||(await ae.writeFilePromise(E,b),h.push(E));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(fe=>`${fe}
561`).join(""),U=J.join(this.context.cwd,".gitattributes");ae.existsSync(U)||(await ae.writeFilePromise(U,N),h.push(U));let V={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};_e.mergeIntoTarget(V,r.get("initEditorConfig"));let ee=`root = true
562`;for(let[fe,de]of Object.entries(V)){ee+=`
563[${fe}]
564`;for(let[ge,oe]of Object.entries(de)){let Be=ge.replace(/[A-Z]/g,be=>`_${be.toLowerCase()}`);ee+=`${Be} = ${oe}
565`}}let le=J.join(this.context.cwd,".editorconfig");ae.existsSync(le)||(await ae.writeFilePromise(le,ee),h.push(le)),await this.cli.run(["install"],{quiet:!0}),ae.existsSync(J.join(this.context.cwd,".git"))||(await Mr.execvp("git",["init"],{cwd:this.context.cwd}),await Mr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Mr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};g0.paths=[["init"]],g0.usage=nt.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var zgt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[g0]},Xgt=zgt;var kj={};Jt(kj,{SearchCommand:()=>w0,UpgradeInteractiveCommand:()=>I0,default:()=>UCt});Ye();var dme=$e(Ie("os"));function Sw({stdout:e}){if(dme.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!e.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}qt();var xye=$e(KH()),JH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Jmt=(0,xye.default)(JH.appId,JH.apiKey).initIndex(JH.indexName),VH=async(e,t=0)=>await Jmt.search(e,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:t,hitsPerPage:10});var UB=["regular","dev","peer"],w0=class extends ut{async execute(){Sw(this.context);let{Gem:t}=await Promise.resolve().then(()=>(ak(),wj)),{ScrollableItems:r}=await Promise.resolve().then(()=>(Ak(),uk)),{useKeypress:o}=await Promise.resolve().then(()=>(LB(),qCe)),{useMinistore:a}=await Promise.resolve().then(()=>(Sj(),Dj)),{renderForm:n}=await Promise.resolve().then(()=>(gk(),hk)),{default:u}=await Promise.resolve().then(()=>$e($Ce())),{Box:A,Text:p}=await Promise.resolve().then(()=>$e(ic())),{default:h,useEffect:w,useState:I}=await Promise.resolve().then(()=>$e(nn())),v=await Ke.find(this.context.cwd,this.context.plugins),b=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),E=()=>h.createElement(h.Fragment,null,h.createElement(A,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(A,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(A,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),R=()=>h.createElement(A,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),N=({hit:oe,active:Be})=>{let[be,g]=a(oe.name,null);o({active:Be},(ce,ne)=>{if(ne.name!=="space")return;if(!be){g(UB[0]);return}let te=UB.indexOf(be)+1;te===UB.length?g(null):g(UB[te])},[be,g]);let we=G.parseIdent(oe.name),Se=G.prettyIdent(v,we);return h.createElement(A,null,h.createElement(A,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},Se)),h.createElement(A,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},oe.owner.name)),h.createElement(A,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},oe.version)),h.createElement(A,{width:16,marginLeft:1},h.createElement(p,null,oe.humanDownloadsLast30Days)))},U=({name:oe,active:Be})=>{let[be]=a(oe,null),g=G.parseIdent(oe);return h.createElement(A,null,h.createElement(A,{width:47},h.createElement(p,{bold:!0}," - ",G.prettyIdent(v,g))),UB.map(we=>h.createElement(A,{key:we,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(t,{active:be===we})," ",h.createElement(p,{bold:!0},we)))))},V=()=>h.createElement(A,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),le=await n(({useSubmit:oe})=>{let Be=a();oe(Be);let be=Array.from(Be.keys()).filter(H=>Be.get(H)!==null),[g,we]=I(""),[Se,ce]=I(0),[ne,te]=I([]),Ee=H=>{H.match(/\t| /)||we(H)},Re=async()=>{ce(0);let H=await VH(g);H.query===g&&te(H.hits)},dt=async()=>{let H=await VH(g,Se+1);H.query===g&&H.page-1===Se&&(ce(H.page),te([...ne,...H.hits]))};return w(()=>{g?Re():te([])},[g]),h.createElement(A,{flexDirection:"column"},h.createElement(b,null),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(A,{width:41},h.createElement(u,{value:g,onChange:Ee,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(E,null)),ne.length?h.createElement(r,{radius:2,loop:!1,children:ne.map(H=>h.createElement(N,{key:H.name,hit:H,active:!1})),willReachEnd:dt}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(A,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(R,null)),be.length?be.map(H=>h.createElement(U,{key:H,name:H,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(V,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof le>"u")return 1;let fe=Array.from(le.keys()).filter(oe=>le.get(oe)==="regular"),de=Array.from(le.keys()).filter(oe=>le.get(oe)==="dev"),ge=Array.from(le.keys()).filter(oe=>le.get(oe)==="peer");return fe.length&&await this.cli.run(["add",...fe]),de.length&&await this.cli.run(["add","--dev",...de]),ge&&await this.cli.run(["add","--peer",...ge]),0}};w0.paths=[["search"]],w0.usage=nt.Usage({category:"Interactive commands",description:"open the search interface",details:`
566 This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
567 `,examples:[["Open the search window","yarn search"]]});Ye();qt();g_();var oIe=$e(Zn()),sIe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,aIe=(e,t)=>e.length>0?[e.slice(0,t)].concat(aIe(e.slice(t),t)):[],I0=class extends ut{async execute(){Sw(this.context);let{ItemOptions:t}=await Promise.resolve().then(()=>(iIe(),nIe)),{Pad:r}=await Promise.resolve().then(()=>(Qj(),rIe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(Ak(),uk)),{useMinistore:a}=await Promise.resolve().then(()=>(Sj(),Dj)),{renderForm:n}=await Promise.resolve().then(()=>(gk(),hk)),{Box:u,Text:A}=await Promise.resolve().then(()=>$e(ic())),{default:p,useEffect:h,useRef:w,useState:I}=await Promise.resolve().then(()=>$e(nn())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,this.context.cwd),R=await Nr.find(v);if(!E)throw new tr(b.cwd,this.context.cwd);await b.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(we,Se)=>{let ce=ape(we,Se),ne="";for(let te of ce)te.added?ne+=ye.pretty(v,te.value,"green"):te.removed||(ne+=te.value);return ne},V=(we,Se)=>{if(we===Se)return Se;let ce=G.parseRange(we),ne=G.parseRange(Se),te=ce.selector.match(sIe),Ee=ne.selector.match(sIe);if(!te||!Ee)return U(we,Se);let Re=["gray","red","yellow","green","magenta"],dt=null,H="";for(let at=1;at<Re.length;++at)dt!==null||te[at]!==Ee[at]?(dt===null&&(dt=Re[at-1]),H+=ye.pretty(v,Ee[at],dt)):H+=Ee[at];return H},ee=async(we,Se,ce)=>{let ne=await Zc.fetchDescriptorFrom(we,ce,{project:b,cache:R,preserveModifier:Se,workspace:E});return ne!==null?ne.range:we.range},le=async we=>{let Se=oIe.default.valid(we.range)?`^${we.range}`:we.range,[ce,ne]=await Promise.all([ee(we,we.range,Se).catch(()=>null),ee(we,we.range,"latest").catch(()=>null)]),te=[{value:null,label:we.range}];return ce&&ce!==we.range?te.push({value:ce,label:V(we.range,ce)}):te.push({value:null,label:""}),ne&&ne!==ce&&ne!==we.range?te.push({value:ne,label:V(we.range,ne)}):te.push({value:null,label:""}),te},fe=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),de=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),ge=({active:we,descriptor:Se,suggestions:ce})=>{let[ne,te]=a(Se.descriptorHash,null),Ee=G.stringifyIdent(Se),Re=Math.max(0,45-Ee.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},G.prettyIdent(v,Se)),p.createElement(r,{active:we,length:Re})),p.createElement(t,{active:we,options:ce,value:ne,skewer:!0,onChange:te,sizes:[17,17,17]})))},oe=({dependencies:we})=>{let[Se,ce]=I(we.map(()=>null)),ne=w(!0),te=async Ee=>{let Re=await le(Ee);return Re.filter(dt=>dt.label!=="").length<=1?null:{descriptor:Ee,suggestions:Re}};return h(()=>()=>{ne.current=!1},[]),h(()=>{let Ee=Math.trunc(N*1.75),Re=we.slice(0,Ee),dt=we.slice(Ee),H=aIe(dt,N),at=Re.map(te).reduce(async(Te,Qe)=>{await Te;let ke=await Qe;ke!==null&&(!ne.current||ce(He=>{let Ne=He.findIndex(je=>je===null),Ve=[...He];return Ve[Ne]=ke,Ve}))},Promise.resolve());H.reduce((Te,Qe)=>Promise.all(Qe.map(ke=>Promise.resolve().then(()=>te(ke)))).then(async ke=>{ke=ke.filter(He=>He!==null),await Te,ne.current&&ce(He=>{let Ne=He.findIndex(Ve=>Ve===null);return He.slice(0,Ne).concat(ke).concat(He.slice(Ne+ke.length))})}),at).then(()=>{ne.current&&ce(Te=>Te.filter(Qe=>Qe!==null))})},[]),Se.length?p.createElement(o,{radius:N>>1,children:Se.map((Ee,Re)=>Ee!==null?p.createElement(ge,{key:Re,active:!1,descriptor:Ee.descriptor,suggestions:Ee.suggestions}):p.createElement(A,{key:Re},"Loading..."))}):p.createElement(A,null,"No upgrades found")},be=await n(({useSubmit:we})=>{we(a());let Se=new Map;for(let ne of b.workspaces)for(let te of["dependencies","devDependencies"])for(let Ee of ne.manifest[te].values())b.tryWorkspaceByDescriptor(Ee)===null&&(Ee.range.startsWith("link:")||Se.set(Ee.descriptorHash,Ee));let ce=_e.sortMap(Se.values(),ne=>G.stringifyDescriptor(ne));return p.createElement(u,{flexDirection:"column"},p.createElement(fe,null),p.createElement(de,null),p.createElement(oe,{dependencies:ce}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof be>"u")return 1;let g=!1;for(let we of b.workspaces)for(let Se of["dependencies","devDependencies"]){let ce=we.manifest[Se];for(let ne of ce.values()){let te=be.get(ne.descriptorHash);typeof te<"u"&&te!==null&&(ce.set(ne.identHash,G.makeDescriptor(ne,te)),g=!0)}}return g?await b.installWithNewReport({quiet:this.context.quiet,stdout:this.context.stdout},{cache:R}):0}};I0.paths=[["upgrade-interactive"]],I0.usage=nt.Usage({category:"Interactive commands",description:"open the upgrade interface",details:`
568 This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
569 `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var MCt={commands:[w0,I0]},UCt=MCt;var Fj={};Jt(Fj,{LinkFetcher:()=>HB,LinkResolver:()=>jB,PortalFetcher:()=>qB,PortalResolver:()=>GB,default:()=>HCt});Ye();St();var ep="portal:",tp="link:";var HB=class{supports(t,r){return!!t.reference.startsWith(tp)}getLocalPath(t,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t.reference,{protocol:tp});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t.reference,{protocol:tp}),n=J.isAbsolute(a)?{packageFs:new hn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new hn(Bt.root),prefixPath:J.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new hn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new ju(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0}}};Ye();St();var jB=class{supportsDescriptor(t,r){return!!t.range.startsWith(tp)}supportsLocator(t,r){return!!t.reference.startsWith(tp)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return G.bindDescriptor(t,{locator:G.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){let a=t.range.slice(tp.length);return[G.makeLocator(t,`${tp}${Ae.toPortablePath(a)}`)]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){return{...t,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ye();St();var qB=class{supports(t,r){return!!t.reference.startsWith(ep)}getLocalPath(t,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t.reference,{protocol:ep});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t.reference,{protocol:ep}),n=J.isAbsolute(a)?{packageFs:new hn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new hn(Bt.root),prefixPath:J.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new hn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,localPath:p}:{packageFs:new ju(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot}}};Ye();Ye();St();var GB=class{supportsDescriptor(t,r){return!!t.range.startsWith(ep)}supportsLocator(t,r){return!!t.reference.startsWith(ep)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return G.bindDescriptor(t,{locator:G.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){let a=t.range.slice(ep.length);return[G.makeLocator(t,`${ep}${Ae.toPortablePath(a)}`)]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var _Ct={fetchers:[HB,qB],resolvers:[jB,GB]},HCt=_Ct;var dq={};Jt(dq,{NodeModulesLinker:()=>av,NodeModulesMode:()=>fq,PnpLooseLinker:()=>lv,default:()=>i1t});St();Ye();St();St();var Tj=(e,t)=>`${e}@${t}`,lIe=(e,t)=>{let r=t.indexOf("#"),o=r>=0?t.substring(r+1):t;return Tj(e,o)};var AIe=(e,t={})=>{let r=t.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),o=t.check||r>=9,a=t.hoistingLimits||new Map,n={check:o,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},u;n.debugLevel>=0&&(u=Date.now());let A=JCt(e,n),p=!1,h=0;do p=Nj(A,[A],new Set([A.locator]),new Map,n).anotherRoundNeeded,n.fastLookupPossible=!1,h++;while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-u}ms, rounds: ${h}`),n.debugLevel>=1){let w=YB(A);if(Nj(A,[A],new Set([A.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree:
570${w}, next tree:
571${YB(A)}`);let v=fIe(A);if(v)throw new Error(`${v}, after hoisting finished:
572${YB(A)}`)}return n.debugLevel>=2&&console.log(YB(A)),VCt(A)},jCt=e=>{let t=e[e.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(t),r},qCt=e=>{let t=e[e.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let w;for(let I of e)w=I.dependencies.get(h.name),w&&r.set(w.name,w)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(t,a),r},cIe=(e,t)=>{if(t.decoupled)return t;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:w,isHoistBorder:I,hoistPriority:v,dependencyKind:b,hoistedFrom:E,hoistedTo:R}=t,N={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(w),decoupled:!0,isHoistBorder:I,hoistPriority:v,dependencyKind:b,hoistedFrom:new Map(E),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),e.dependencies.set(N.name,N),N},GCt=(e,t)=>{let r=new Map([[e.name,[e.ident]]]);for(let a of e.dependencies.values())e.peerNames.has(a.name)||r.set(a.name,[a.ident]);let o=Array.from(t.keys());o.sort((a,n)=>{let u=t.get(a),A=t.get(n);return A.hoistPriority!==u.hoistPriority?A.hoistPriority-u.hoistPriority:A.peerDependents.size!==u.peerDependents.size?A.peerDependents.size-u.peerDependents.size:A.dependents.size-u.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!e.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},Rj=e=>{let t=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!e.peerNames.has(n)){let u=e.dependencies.get(n);u&&!t.has(u)&&r(u,a)}t.add(o)}};for(let o of e.dependencies.values())e.peerNames.has(o.name)||r(o);return t},Nj=(e,t,r,o,a,n=new Set)=>{let u=t[t.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=zCt(u),p=GCt(u,A),h=e==u?new Map:a.fastLookupPossible?jCt(t):qCt(t),w,I=!1,v=!1,b=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),E=new Map;do{let R=KCt(e,t,r,h,b,p,o,E,a);R.isGraphChanged&&(v=!0),R.anotherRoundNeeded&&(I=!0),w=!1;for(let[N,U]of p)U.length>1&&!u.dependencies.has(N)&&(b.delete(N),U.shift(),b.set(N,U[0]),w=!0)}while(w);for(let R of u.dependencies.values())if(!u.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=Nj(e,[...t,R],r,E,a);N.isGraphChanged&&(v=!0),N.anotherRoundNeeded&&(I=!0),r.delete(R.locator)}return{anotherRoundNeeded:I,isGraphChanged:v}},YCt=e=>{for(let[t,r]of e.dependencies)if(!e.peerNames.has(t)&&r.ident!==e.ident)return!0;return!1},WCt=(e,t,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let w,I=null,v=new Set;p&&(w=`${Array.from(t).map(N=>no(N)).join("\u2192")}`);let b=r[r.length-1],R=!(o.ident===b.ident);if(p&&!R&&(I="- self-reference"),R&&(R=o.dependencyKind!==1,p&&!R&&(I="- workspace")),R&&o.dependencyKind===2&&(R=!YCt(o),p&&!R&&(I="- external soft link with unhoisted dependencies")),R&&(R=b.dependencyKind!==1||b.hoistedFrom.has(o.name)||t.size===1,p&&!R&&(I=b.reasons.get(o.name))),R&&(R=!e.peerNames.has(o.name),p&&!R&&(I=`- cannot shadow peer: ${no(e.originalDependencies.get(o.name).locator)} at ${w}`)),R){let N=!1,U=a.get(o.name);if(N=!U||U.ident===o.ident,p&&!N&&(I=`- filled by: ${no(U.locator)} at ${w}`),N)for(let V=r.length-1;V>=1;V--){let le=r[V].dependencies.get(o.name);if(le&&le.ident!==o.ident){N=!1;let fe=A.get(b);fe||(fe=new Set,A.set(b,fe)),fe.add(o.name),p&&(I=`- filled by ${no(le.locator)} at ${r.slice(0,V).map(de=>no(de.locator)).join("\u2192")}`);break}}R=N}if(R&&(R=n.get(o.name)===o.ident,p&&!R&&(I=`- filled by: ${no(u.get(o.name)[0])} at ${w}`)),R){let N=!0,U=new Set(o.peerNames);for(let V=r.length-1;V>=1;V--){let ee=r[V];for(let le of U){if(ee.peerNames.has(le)&&ee.originalDependencies.has(le))continue;let fe=ee.dependencies.get(le);fe&&e.dependencies.get(le)!==fe&&(V===r.length-1?v.add(fe):(v=null,N=!1,p&&(I=`- peer dependency ${no(fe.locator)} from parent ${no(ee.locator)} was not hoisted to ${w}`))),U.delete(le)}if(!N)break}R=N}if(R&&!h)for(let N of o.hoistedDependencies.values()){let U=a.get(N.name)||e.dependencies.get(N.name);if(!U||N.ident!==U.ident){R=!1,p&&(I=`- previously hoisted dependency mismatch, needed: ${no(N.locator)}, available: ${no(U?.locator)}`);break}}return v!==null&&v.size>0?{isHoistable:2,dependsOn:v,reason:I}:{isHoistable:R?0:1,reason:I}},dk=e=>`${e.name}@${e.locator}`,KCt=(e,t,r,o,a,n,u,A,p)=>{let h=t[t.length-1],w=new Set,I=!1,v=!1,b=(U,V,ee,le,fe)=>{if(w.has(le))return;let de=[...V,dk(le)],ge=[...ee,dk(le)],oe=new Map,Be=new Map;for(let ce of Rj(le)){let ne=WCt(h,r,[h,...U,le],ce,o,a,n,A,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(ce,ne),ne.isHoistable===2)for(let te of ne.dependsOn){let Ee=oe.get(te.name)||new Set;Ee.add(ce.name),oe.set(te.name,Ee)}}let be=new Set,g=(ce,ne,te)=>{if(!be.has(ce)){be.add(ce),Be.set(ce,{isHoistable:1,reason:te});for(let Ee of oe.get(ce.name)||[])g(le.dependencies.get(Ee),ne,p.debugLevel>=2?`- peer dependency ${no(ce.locator)} from parent ${no(le.locator)} was not hoisted`:"")}};for(let[ce,ne]of Be)ne.isHoistable===1&&g(ce,ne,ne.reason);let we=!1;for(let ce of Be.keys())if(!be.has(ce)){v=!0;let ne=u.get(le);ne&&ne.has(ce.name)&&(I=!0),we=!0,le.dependencies.delete(ce.name),le.hoistedDependencies.set(ce.name,ce),le.reasons.delete(ce.name);let te=h.dependencies.get(ce.name);if(p.debugLevel>=2){let Ee=Array.from(V).concat([le.locator]).map(dt=>no(dt)).join("\u2192"),Re=h.hoistedFrom.get(ce.name);Re||(Re=[],h.hoistedFrom.set(ce.name,Re)),Re.push(Ee),le.hoistedTo.set(ce.name,Array.from(t).map(dt=>no(dt.locator)).join("\u2192"))}if(!te)h.ident!==ce.ident&&(h.dependencies.set(ce.name,ce),fe.add(ce));else for(let Ee of ce.references)te.references.add(Ee)}if(le.dependencyKind===2&&we&&(I=!0),p.check){let ce=fIe(e);if(ce)throw new Error(`${ce}, after hoisting dependencies of ${[h,...U,le].map(ne=>no(ne.locator)).join("\u2192")}:
573${YB(e)}`)}let Se=Rj(le);for(let ce of Se)if(be.has(ce)){let ne=Be.get(ce);if((a.get(ce.name)===ce.ident||!le.reasons.has(ce.name))&&ne.isHoistable!==0&&le.reasons.set(ce.name,ne.reason),!ce.isHoistBorder&&ge.indexOf(dk(ce))<0){w.add(le);let Ee=cIe(le,ce);b([...U,le],de,ge,Ee,R),w.delete(le)}}},E,R=new Set(Rj(h)),N=Array.from(t).map(U=>dk(U));do{E=R,R=new Set;for(let U of E){if(U.locator===h.locator||U.isHoistBorder)continue;let V=cIe(h,U);b([],Array.from(r),N,V,R)}}while(R.size>0);return{anotherRoundNeeded:I,isGraphChanged:v}},fIe=e=>{let t=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let w=p.get(h.name),I=()=>`${Array.from(o).concat([n]).map(v=>no(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==w||!v||v.ident!==h.ident)&&t.push(`${I()} - broken peer promise: expected ${h.ident} but found ${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),b=n.hoistedTo.get(h.name),E=`${v?` hoisted from ${v.join(", ")}`:""}`,R=`${b?` hoisted to ${b}`:""}`,N=`${I()}${E}`;w?w.ident!==h.ident&&t.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${w.ident}`):t.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(e,e.dependencies,e),t.join(`
574`)},JCt=(e,t)=>{let{identName:r,name:o,reference:a,peerNames:n}=e,u={name:o,references:new Set([a]),locator:Tj(r,a),ident:lIe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},A=new Map([[e,u]]),p=(h,w)=>{let I=A.get(h),v=!!I;if(!I){let{name:b,identName:E,reference:R,peerNames:N,hoistPriority:U,dependencyKind:V}=h,ee=t.hoistingLimits.get(w.locator);I={name:b,references:new Set([R]),locator:Tj(E,R),ident:lIe(E,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:ee?ee.has(b):!1,hoistPriority:U||0,dependencyKind:V||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,I)}if(w.dependencies.set(h.name,I),w.originalDependencies.set(h.name,I),v){let b=new Set,E=R=>{if(!b.has(R)){b.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||E(N)}};E(I)}else for(let b of h.dependencies)p(b,I)};for(let h of e.dependencies)p(h,u);return u},Lj=e=>e.substring(0,e.indexOf("@",1)),VCt=e=>{let t={name:e.name,identName:Lj(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:w,locator:I}=a;p={name:h,identName:Lj(I),references:w,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of e.dependencies.values())o(a,e,t);return t},zCt=e=>{let t=new Map,r=new Set([e]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=t.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},t.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let w of A.dependencies.values()){let I=a(w);I.hoistPriority=Math.max(I.hoistPriority,w.hoistPriority),A.peerNames.has(w.name)?I.peerDependents.add(A.ident):n(A,w)}}};for(let u of e.dependencies.values())e.peerNames.has(u.name)||n(e,u);return t},no=e=>{if(!e)return"none";let t=e.indexOf("@",1),r=e.substring(0,t);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=e.substring(t+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`},uIe=5e4,YB=e=>{let t=0,r=(a,n,u="")=>{if(t>uIe||n.has(a))return"";t++;let A=Array.from(a.dependencies.values()).sort((h,w)=>h.name===w.name?0:h.name>w.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let w=A[h];if(!a.peerNames.has(w.name)&&w!==a){let I=a.reasons.get(w.name),v=Lj(w.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(w)?">":"")+(v!==w.name?`a:${w.name}:`:"")+no(w.locator)+(I?` ${I}`:"")}
575`,p+=r(w,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(e,new Set)+(t>uIe?`
576Tree is too large, part of the tree has been dunped
577`:"")};var WB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(WB||{}),pIe="node_modules",pm="$wsroot$";var KB=(e,t)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=ZCt(e,t),u=null;if(a.length===0){let A=AIe(r,{hoistingLimits:o});u=eIt(e,A,t)}return{tree:u,errors:a,preserveSymlinksRequired:n}},dA=e=>`${e.name}@${e.reference}`,Mj=e=>{let t=new Map;for(let[r,o]of e.entries())if(!o.dirList){let a=t.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},t.set(o.locator,a)),a.locations.push(r)}for(let r of t.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(J.delimiter).length,u=a.split(J.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return t},hIe=(e,t)=>{let r=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e,o=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t;return G.areLocatorsEqual(r,o)},Oj=(e,t,r,o)=>{if(e.linkType!=="SOFT")return!1;let a=Ae.toPortablePath(r.resolveVirtual&&t.reference&&t.reference.startsWith("virtual:")?r.resolveVirtual(e.packageLocation):e.packageLocation);return J.contains(o,a)===null},XCt=e=>{let t=e.getPackageInformation(e.topLevel);if(t===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(e.findPackageLocator(t.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let o=Ae.toPortablePath(t.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=e.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,b)=>{let E=dA(v);if(p.has(E))return;p.add(E);let R=e.getPackageInformation(v);if(R){let N=b?dA(b):"";if(dA(v)!==N&&R.linkType==="SOFT"&&!Oj(R,v,e,o)){let U=gIe(R,v,e);(!A.get(U)||v.reference.startsWith("workspace:"))&&A.set(U,v)}for(let[U,V]of R.packageDependencies)V!==null&&(R.packagePeers.has(U)||h(e.getLocator(U,V),v))}};for(let v of u)h(v,null);let w=o.split(J.sep);for(let v of A.values()){let b=e.getPackageInformation(v),R=Ae.toPortablePath(b.packageLocation.slice(0,-1)).split(J.sep).slice(w.length),N=n;for(let U of R){let V=N.children.get(U);V||(V={children:new Map},N.children.set(U,V)),N=V}N.workspaceLocator=v}let I=(v,b)=>{if(v.workspaceLocator){let E=dA(b),R=a.get(E);R||(R=new Set,a.set(E,R)),R.add(v.workspaceLocator)}for(let E of v.children.values())I(E,v.workspaceLocator||b)};for(let v of n.children.values())I(v,n.workspaceLocator);return a},ZCt=(e,t)=>{let r=[],o=!1,a=new Map,n=XCt(e),u=e.getPackageInformation(e.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=e.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=Ae.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},w=new Map,I=(b,E)=>`${dA(E)}:${b}`,v=(b,E,R,N,U,V,ee,le)=>{let fe=I(b,R),de=w.get(fe),ge=!!de;!ge&&R.name===A.name&&R.reference===A.reference&&(de=h,w.set(fe,h));let oe=Oj(E,R,e,p);if(!de){let ce=0;oe?ce=2:E.linkType==="SOFT"&&R.name.endsWith(pm)&&(ce=1),de={name:b,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:ce===1?new Set:E.packagePeers,dependencyKind:ce},w.set(fe,de)}let Be;if(oe?Be=2:U.linkType==="SOFT"?Be=1:Be=0,de.hoistPriority=Math.max(de.hoistPriority||0,Be),le&&!oe){let ce=dA({name:N.identName,reference:N.reference}),ne=a.get(ce)||new Set;a.set(ce,ne),ne.add(de.name)}let be=new Map(E.packageDependencies);if(t.project){let ce=t.project.workspacesByCwd.get(Ae.toPortablePath(E.packageLocation.slice(0,-1)));if(ce){let ne=new Set([...Array.from(ce.manifest.peerDependencies.values(),te=>G.stringifyIdent(te)),...Array.from(ce.manifest.peerDependenciesMeta.keys())]);for(let te of ne)be.has(te)||(be.set(te,V.get(te)||null),de.peerNames.add(te))}}let g=dA({name:R.name.replace(pm,""),reference:R.reference}),we=n.get(g);if(we)for(let ce of we)be.set(`${ce.name}${pm}`,ce.reference);(E!==U||E.linkType!=="SOFT"||!oe&&(!t.selfReferencesByCwd||t.selfReferencesByCwd.get(ee)))&&N.dependencies.add(de);let Se=R!==A&&E.linkType==="SOFT"&&!R.name.endsWith(pm)&&!oe;if(!ge&&!Se){let ce=new Map;for(let[ne,te]of be)if(te!==null){let Ee=e.getLocator(ne,te),Re=e.getLocator(ne.replace(pm,""),te),dt=e.getPackageInformation(Re);if(dt===null)throw new Error("Assertion failed: Expected the package to have been registered");let H=Oj(dt,Ee,e,p);if(t.validateExternalSoftLinks&&t.project&&H){dt.packageDependencies.size>0&&(o=!0);for(let[He,Ne]of dt.packageDependencies)if(Ne!==null){let Ve=G.parseLocator(Array.isArray(Ne)?`${Ne[0]}@${Ne[1]}`:`${He}@${Ne}`);if(dA(Ve)!==dA(Ee)){let je=be.get(He);if(je){let x=G.parseLocator(Array.isArray(je)?`${je[0]}@${je[1]}`:`${He}@${je}`);hIe(x,Ve)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(t.project.configuration,G.parseIdent(Ee.name))} into ${G.prettyLocator(t.project.configuration,G.parseLocator(`${R.name}@${R.reference}`))} dependency ${G.prettyLocator(t.project.configuration,Ve)} conflicts with parent dependency ${G.prettyLocator(t.project.configuration,x)}`})}else{let x=ce.get(He);if(x){let C=x.target,P=G.parseLocator(Array.isArray(C)?`${C[0]}@${C[1]}`:`${He}@${C}`);hIe(P,Ve)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(t.project.configuration,G.parseIdent(Ee.name))} into ${G.prettyLocator(t.project.configuration,G.parseLocator(`${R.name}@${R.reference}`))} dependency ${G.prettyLocator(t.project.configuration,Ve)} conflicts with dependency ${G.prettyLocator(t.project.configuration,P)} from sibling portal ${G.prettyIdent(t.project.configuration,G.parseIdent(x.portal.name))}`})}else ce.set(He,{target:Ve.reference,portal:Ee})}}}}let at=t.hoistingLimitsByCwd?.get(ee),Te=H?ee:J.relative(p,Ae.toPortablePath(dt.packageLocation))||Bt.dot,Qe=t.hoistingLimitsByCwd?.get(Te);v(ne,dt,Ee,de,E,be,Te,at==="dependencies"||Qe==="dependencies"||Qe==="workspaces")}}};return v(A.name,u,A,h,u,u.packageDependencies,Bt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:o}};function gIe(e,t,r){let o=r.resolveVirtual&&t.reference&&t.reference.startsWith("virtual:")?r.resolveVirtual(e.packageLocation):e.packageLocation;return Ae.toPortablePath(o||e.packageLocation)}function $Ct(e,t,r){let o=t.getLocator(e.name.replace(pm,""),e.reference),a=t.getPackageInformation(o);if(a===null)throw new Error("Assertion failed: Expected the package to be registered");return r.pnpifyFs?{linkType:"SOFT",target:Ae.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:gIe(a,e,t)}}var eIt=(e,t,r)=>{let o=new Map,a=(w,I,v)=>{let{linkType:b,target:E}=$Ct(w,e,r);return{locator:dA(w),nodePath:I,target:E,linkType:b,aliases:v}},n=w=>{let[I,v]=w.split("/");return v?{scope:bi(I),name:bi(v)}:{scope:null,name:bi(I)}},u=new Set,A=(w,I,v)=>{if(u.has(w))return;u.add(w);let b=Array.from(w.references).sort().join("#");for(let E of w.dependencies){let R=Array.from(E.references).sort().join("#");if(E.identName===w.identName&&R===b)continue;let N=Array.from(E.references).sort(),U={name:E.identName,reference:N[0]},{name:V,scope:ee}=n(E.name),le=ee?[ee,V]:[V],fe=J.join(I,pIe),de=J.join(fe,...le),ge=`${v}/${U.name}`,oe=a(U,v,N.slice(1)),Be=!1;if(oe.linkType==="SOFT"&&r.project){let g=r.project.workspacesByCwd.get(oe.target.slice(0,-1));Be=!!(g&&!g.manifest.name)}let be=oe.linkType==="SOFT"&&de.startsWith(oe.target);if(!E.name.endsWith(pm)&&!Be&&!be){let g=o.get(de);if(g){if(g.dirList)throw new Error(`Assertion failed: ${de} cannot merge dir node with leaf node`);{let ce=G.parseLocator(g.locator),ne=G.parseLocator(oe.locator);if(g.linkType!==oe.linkType)throw new Error(`Assertion failed: ${de} cannot merge nodes with different link types ${g.nodePath}/${G.stringifyLocator(ce)} and ${v}/${G.stringifyLocator(ne)}`);if(ce.identHash!==ne.identHash)throw new Error(`Assertion failed: ${de} cannot merge nodes with different idents ${g.nodePath}/${G.stringifyLocator(ce)} and ${v}/s${G.stringifyLocator(ne)}`);oe.aliases=[...oe.aliases,...g.aliases,G.parseLocator(g.locator).reference]}}o.set(de,oe);let we=de.split("/"),Se=we.indexOf(pIe);for(let ce=we.length-1;Se>=0&&ce>Se;ce--){let ne=Ae.toPortablePath(we.slice(0,ce).join(J.sep)),te=bi(we[ce]),Ee=o.get(ne);if(!Ee)o.set(ne,{dirList:new Set([te])});else if(Ee.dirList){if(Ee.dirList.has(te))break;Ee.dirList.add(te)}}}A(E,oe.linkType==="SOFT"?oe.target:de,ge)}},p=a({name:t.name,reference:Array.from(t.references)[0]},"",[]),h=p.target;return o.set(h,p),A(t,h,""),o};Ye();Ye();St();St();iA();Nl();var iq={};Jt(iq,{PnpInstaller:()=>dm,PnpLinker:()=>D0,UnplugCommand:()=>P0,default:()=>kIt,getPnpPath:()=>S0,jsInstallUtils:()=>yA,pnpUtils:()=>ov,quotePathIfNeeded:()=>e1e});St();var $Ie=Ie("url");Ye();Ye();St();St();var dIe={["DEFAULT"]:{collapsed:!1,next:{["*"]:"DEFAULT"}},["TOP_LEVEL"]:{collapsed:!1,next:{fallbackExclusionList:"FALLBACK_EXCLUSION_LIST",packageRegistryData:"PACKAGE_REGISTRY_DATA",["*"]:"DEFAULT"}},["FALLBACK_EXCLUSION_LIST"]:{collapsed:!1,next:{["*"]:"FALLBACK_EXCLUSION_ENTRIES"}},["FALLBACK_EXCLUSION_ENTRIES"]:{collapsed:!0,next:{["*"]:"FALLBACK_EXCLUSION_DATA"}},["FALLBACK_EXCLUSION_DATA"]:{collapsed:!0,next:{["*"]:"DEFAULT"}},["PACKAGE_REGISTRY_DATA"]:{collapsed:!1,next:{["*"]:"PACKAGE_REGISTRY_ENTRIES"}},["PACKAGE_REGISTRY_ENTRIES"]:{collapsed:!0,next:{["*"]:"PACKAGE_STORE_DATA"}},["PACKAGE_STORE_DATA"]:{collapsed:!1,next:{["*"]:"PACKAGE_STORE_ENTRIES"}},["PACKAGE_STORE_ENTRIES"]:{collapsed:!0,next:{["*"]:"PACKAGE_INFORMATION_DATA"}},["PACKAGE_INFORMATION_DATA"]:{collapsed:!1,next:{packageDependencies:"PACKAGE_DEPENDENCIES",["*"]:"DEFAULT"}},["PACKAGE_DEPENDENCIES"]:{collapsed:!1,next:{["*"]:"PACKAGE_DEPENDENCY"}},["PACKAGE_DEPENDENCY"]:{collapsed:!0,next:{["*"]:"DEFAULT"}}};function tIt(e,t,r){let o="";o+="[";for(let a=0,n=e.length;a<n;++a)o+=mk(String(a),e[a],t,r).replace(/^ +/g,""),a+1<n&&(o+=", ");return o+="]",o}function rIt(e,t,r){let o=`${r} `,a="";a+=r,a+=`[
578`;for(let n=0,u=e.length;n<u;++n)a+=o+mk(String(n),e[n],t,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
579`;return a+=r,a+="]",a}function nIt(e,t,r){let o=Object.keys(e),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=e[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=mk(p,h,t,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function iIt(e,t,r){let o=Object.keys(e),a=`${r} `,n="";n+=r,n+=`{
580`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],w=e[h];typeof w>"u"||(u!==0&&(n+=",",n+=`
581`),n+=a,n+=JSON.stringify(h),n+=": ",n+=mk(h,w,t,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
582`),n+=r,n+="}",n}function mk(e,t,r,o){let{next:a}=dIe[r],n=a[e]||a["*"];return mIe(t,n,o)}function mIe(e,t,r){let{collapsed:o}=dIe[t];return Array.isArray(e)?o?tIt(e,t,r):rIt(e,t,r):typeof e=="object"&&e!==null?o?nIt(e,t,r):iIt(e,t,r):JSON.stringify(e)}function yIe(e){return mIe(e,"TOP_LEVEL","")}function JB(e,t){let r=Array.from(e);Array.isArray(t)||(t=[t]);let o=[];for(let n of t)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function sIt(e){let t=new Map,r=JB(e.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=t.get(o);typeof n>"u"&&t.set(o,n=new Set),n.add(a)}return Array.from(t).map(([o,a])=>[o,Array.from(a)])}function oIt(e){return JB(e.fallbackPool||[],([t])=>t)}function aIt(e){let t=[];for(let[r,o]of JB(e.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];t.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:w}]of JB(o,([I])=>I===null?"0":`1${I}`)){let I=[];r!==null&&n!==null&&!A.has(r)&&I.push([r,n]);for(let[E,R]of JB(A.entries(),([N])=>N))I.push([E,R]);let v=p&&p.size>0?Array.from(p):void 0,b=w||void 0;a.push([n,{packageLocation:u,packageDependencies:I,packagePeers:v,linkType:h,discardFromLookup:b}])}}return t}function VB(e){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,fallbackExclusionList:sIt(e),fallbackPool:oIt(e),packageRegistryData:aIt(e)}}var CIe=$e(wIe());function IIe(e,t){return[e?`${e}
583`:"",`/* eslint-disable */
584`,`"use strict";
585`,`
586`,t,`
587`,(0,CIe.default)()].join("")}function lIt(e){return JSON.stringify(e,null,2)}function cIt(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
588`)}'`}function uIt(e){return[`const RAW_RUNTIME_STATE =
589`,`${cIt(yIe(e))};
590
591`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
592`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
593`,`}
594`].join("")}function AIt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
595`,` const fs = require('fs');
596`,` const path = require('path');
597`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(gr.pnpData)});
598`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
599`,`}
600`].join("")}function BIe(e){let t=VB(e),r=uIt(t);return IIe(e.shebang,r)}function vIe(e){let t=VB(e),r=AIt(),o=IIe(e.shebang,r);return{dataFile:lIt(t),loaderFile:o}}St();function _j(e,{basePath:t}){let r=Ae.toPortablePath(t),o=J.resolve(r),a=e.ignorePatternData!==null?new RegExp(e.ignorePatternData):null,n=new Map,u=new Map(e.packageRegistryData.map(([I,v])=>[I,new Map(v.map(([b,E])=>{if(I===null!=(b===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let R=E.discardFromLookup??!1,N={name:I,reference:b},U=n.get(E.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(E.packageLocation,{locator:N,discardFromLookup:R});let V=null;return[b,{packageDependencies:new Map(E.packageDependencies),packagePeers:new Set(E.packagePeers),linkType:E.linkType,discardFromLookup:R,get packageLocation(){return V||(V=J.join(o,E.packageLocation))}}]}))])),A=new Map(e.fallbackExclusionList.map(([I,v])=>[I,new Set(v)])),p=new Map(e.fallbackPool),h=e.dependencyTreeRoots,w=e.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:w,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}St();St();var iv=Ie("module"),gm=Ie("url"),Xj=Ie("util");var Mo=Ie("url");var xIe=$e(Ie("assert"));var Hj=Array.isArray,zB=JSON.stringify,XB=Object.getOwnPropertyNames,hm=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),jj=(e,t)=>RegExp.prototype.exec.call(e,t),qj=(e,...t)=>RegExp.prototype[Symbol.replace].apply(e,t),B0=(e,...t)=>String.prototype.endsWith.apply(e,t),Gj=(e,...t)=>String.prototype.includes.apply(e,t),Yj=(e,...t)=>String.prototype.lastIndexOf.apply(e,t),ZB=(e,...t)=>String.prototype.indexOf.apply(e,t),DIe=(e,...t)=>String.prototype.replace.apply(e,t),v0=(e,...t)=>String.prototype.slice.apply(e,t),mA=(e,...t)=>String.prototype.startsWith.apply(e,t),SIe=Map,PIe=JSON.parse;function $B(e,t,r){return class extends r{constructor(...o){super(t(...o)),this.code=e,this.name=`${r.name} [${e}]`}}}var bIe=$B("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError),Wj=$B("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError),QIe=$B("ERR_INVALID_PACKAGE_TARGET",(e,t,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!mA(r,"./");return t==="."?((0,xIe.default)(o===!1),`Invalid "exports" main target ${zB(r)} defined in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${zB(r)} defined for '${t}' in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),ev=$B("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error),kIe=$B("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);var Ek=Ie("url");function FIe(e,t){let r=Object.create(null);for(let o=0;o<t.length;o++){let a=t[o];hm(e,a)&&(r[a]=e[a])}return r}var yk=new SIe;function fIt(e,t,r,o){let a=yk.get(e);if(a!==void 0)return a;let n=o(e);if(n===void 0){let b={pjsonPath:e,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return yk.set(e,b),b}let u;try{u=PIe(n)}catch(b){throw new ev(e,(r?`"${t}" from `:"")+(0,Ek.fileURLToPath)(r||t),b.message)}let{imports:A,main:p,name:h,type:w}=FIe(u,["imports","main","name","type"]),I=hm(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),w!=="module"&&w!=="commonjs"&&(w="none");let v={pjsonPath:e,exists:!0,main:p,name:h,type:w,exports:I,imports:A};return yk.set(e,v),v}function RIe(e,t){let r=new URL("./package.json",e);for(;;){let n=r.pathname;if(B0(n,"node_modules/package.json"))break;let u=fIt((0,Ek.fileURLToPath)(r),e,void 0,t);if(u.exists)return u;let A=r;if(r=new URL("../package.json",r),r.pathname===A.pathname)break}let o=(0,Ek.fileURLToPath)(r),a={pjsonPath:o,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return yk.set(o,a),a}function pIt(e,t,r){throw new bIe(e,t&&(0,Mo.fileURLToPath)(new URL(".",t)),(0,Mo.fileURLToPath)(r))}function hIt(e,t,r,o){let a=`request is not a valid subpath for the "${r?"imports":"exports"}" resolution of ${(0,Mo.fileURLToPath)(t)}`;throw new Wj(e,a,o&&(0,Mo.fileURLToPath)(o))}function tv(e,t,r,o,a){throw typeof t=="object"&&t!==null?t=zB(t,null,""):t=`${t}`,new QIe((0,Mo.fileURLToPath)(new URL(".",r)),e,t,o,a&&(0,Mo.fileURLToPath)(a))}var TIe=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,NIe=/\*/g;function gIt(e,t,r,o,a,n,u,A){if(t!==""&&!n&&e[e.length-1]!=="/"&&tv(r,e,o,u,a),!mA(e,"./")){if(u&&!mA(e,"../")&&!mA(e,"/")){let I=!1;try{new URL(e),I=!0}catch{}if(!I)return n?qj(NIe,e,()=>t):e+t}tv(r,e,o,u,a)}jj(TIe,v0(e,2))!==null&&tv(r,e,o,u,a);let p=new URL(e,o),h=p.pathname,w=new URL(".",o).pathname;if(mA(h,w)||tv(r,e,o,u,a),t==="")return p;if(jj(TIe,t)!==null){let I=n?DIe(r,"*",()=>t):r+t;hIt(I,o,u,a)}return n?new URL(qj(NIe,p.href,()=>t)):new URL(t,p)}function dIt(e){let t=+e;return`${t}`!==e?!1:t>=0&&t<4294967295}function jw(e,t,r,o,a,n,u,A){if(typeof t=="string")return gIt(t,r,o,e,a,n,u,A);if(Hj(t)){if(t.length===0)return null;let p;for(let h=0;h<t.length;h++){let w=t[h],I;try{I=jw(e,w,r,o,a,n,u,A)}catch(v){if(p=v,v.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw v}if(I!==void 0){if(I===null){p=null;continue}return I}}if(p==null)return p;throw p}else if(typeof t=="object"&&t!==null){let p=XB(t);for(let h=0;h<p.length;h++){let w=p[h];if(dIt(w))throw new ev((0,Mo.fileURLToPath)(e),a,'"exports" cannot contain numeric property keys.')}for(let h=0;h<p.length;h++){let w=p[h];if(w==="default"||A.has(w)){let I=t[w],v=jw(e,I,r,o,a,n,u,A);if(v===void 0)continue;return v}}return}else if(t===null)return null;tv(o,t,e,u,a)}function OIe(e,t){let r=ZB(e,"*"),o=ZB(t,"*"),a=r===-1?e.length:r+1,n=o===-1?t.length:o+1;return a>n?-1:n>a||r===-1?1:o===-1||e.length>t.length?-1:t.length>e.length?1:0}function mIt(e,t,r){if(typeof e=="string"||Hj(e))return!0;if(typeof e!="object"||e===null)return!1;let o=XB(e),a=!1,n=0;for(let u=0;u<o.length;u++){let A=o[u],p=A===""||A[0]!==".";if(n++===0)a=p;else if(a!==p)throw new ev((0,Mo.fileURLToPath)(t),r,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return a}function Kj(e,t,r){throw new kIe((0,Mo.fileURLToPath)(new URL(".",t)),e,r&&(0,Mo.fileURLToPath)(r))}var LIe=new Set;function yIt(e,t,r){let o=(0,Mo.fileURLToPath)(t);LIe.has(o+"|"+e)||(LIe.add(o+"|"+e),process.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${o}${r?` imported from ${(0,Mo.fileURLToPath)(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function MIe({packageJSONUrl:e,packageSubpath:t,exports:r,base:o,conditions:a}){if(mIt(r,e,o)&&(r={".":r}),hm(r,t)&&!Gj(t,"*")&&!B0(t,"/")){let p=r[t],h=jw(e,p,"",t,o,!1,!1,a);return h==null&&Kj(t,e,o),h}let n="",u,A=XB(r);for(let p=0;p<A.length;p++){let h=A[p],w=ZB(h,"*");if(w!==-1&&mA(t,v0(h,0,w))){B0(t,"/")&&yIt(t,e,o);let I=v0(h,w+1);t.length>=h.length&&B0(t,I)&&OIe(n,h)===1&&Yj(h,"*")===w&&(n=h,u=v0(t,w,t.length-I.length))}}if(n){let p=r[n],h=jw(e,p,u,n,o,!0,!1,a);return h==null&&Kj(t,e,o),h}Kj(t,e,o)}function UIe({name:e,base:t,conditions:r,readFileSyncFn:o}){if(e==="#"||mA(e,"#/")||B0(e,"/")){let u="is not a valid internal imports specifier name";throw new Wj(e,u,(0,Mo.fileURLToPath)(t))}let a,n=RIe(t,o);if(n.exists){a=(0,Mo.pathToFileURL)(n.pjsonPath);let u=n.imports;if(u)if(hm(u,e)&&!Gj(e,"*")){let A=jw(a,u[e],"",e,t,!1,!0,r);if(A!=null)return A}else{let A="",p,h=XB(u);for(let w=0;w<h.length;w++){let I=h[w],v=ZB(I,"*");if(v!==-1&&mA(e,v0(I,0,v))){let b=v0(I,v+1);e.length>=I.length&&B0(e,b)&&OIe(A,I)===1&&Yj(I,"*")===v&&(A=I,p=v0(e,v,e.length-b.length))}}if(A){let w=u[A],I=jw(a,w,p,A,t,!0,!0,r);if(I!=null)return I}}}pIt(e,a,t)}St();var EIt=new Set(["BUILTIN_NODE_RESOLUTION_FAILED","MISSING_DEPENDENCY","MISSING_PEER_DEPENDENCY","QUALIFIED_PATH_RESOLUTION_FAILED","UNDECLARED_DEPENDENCY"]);function Zi(e,t,r={},o){o??=EIt.has(e)?"MODULE_NOT_FOUND":e;let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(t),{code:{...a,value:o},pnpCode:{...a,value:e},data:{...a,value:r}})}function cu(e){return Ae.normalize(Ae.fromPortablePath(e))}var qIe=$e(HIe());function GIe(e){return wIt(),Vj[e]}var Vj;function wIt(){Vj||(Vj={"--conditions":[],...jIe(CIt()),...jIe(process.execArgv)})}function jIe(e){return(0,qIe.default)({"--conditions":[String],"-C":"--conditions"},{argv:e,permissive:!0})}function CIt(){let e=[],t=IIt(process.env.NODE_OPTIONS||"",e);return e.length,t}function IIt(e,t){let r=[],o=!1,a=!0;for(let n=0;n<e.length;++n){let u=e[n];if(u==="\\"&&o){if(n+1===e.length)return t.push(`invalid value for NODE_OPTIONS (invalid escape)
601`),r;u=e[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&t.push(`invalid value for NODE_OPTIONS (unterminated string)
602`),r}St();var WIe=Ie("module");var[nv,zj]=process.versions.node.split(".").map(e=>parseInt(e,10)),YIe=nv>19||nv===19&&zj>=2||nv===18&&zj>=13,rzt=nv>19||nv===19&&zj>=3;var BIt=new Set(WIe.Module.builtinModules||Object.keys(process.binding("natives"))),wk=e=>e.startsWith("node:")||BIt.has(e);function KIe(e){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(e=e.map(t=>Ae.fromPortablePath(di.resolveVirtual(Ae.toPortablePath(t)))),YIe)process.send({"watch:require":e});else for(let t of e)process.send({"watch:require":t})}function Zj(e,t){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],w=new Set;if(e.enableTopLevelFallback===!0&&h.push(p),t.compatibilityMode!==!1)for(let Te of["react-scripts","gatsby"]){let Qe=e.packageRegistry.get(Te);if(Qe)for(let ke of Qe.keys()){if(ke===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Te,reference:ke})}}let{ignorePattern:I,packageRegistry:v,packageLocatorsByLocations:b}=e;function E(Te,Qe){return{fn:Te,args:Qe,error:null,result:null}}function R(Te){let Qe=process.stderr?.hasColors?.()??process.stdout.isTTY,ke=(Ve,je)=>`\x1B[${Ve}m${je}\x1B[0m`,He=Te.error;console.error(He?ke("31;1",`\u2716 ${Te.error?.message.replace(/\n.*/s,"")}`):ke("33;1","\u203C Resolution")),Te.args.length>0&&console.error();for(let Ve of Te.args)console.error(` ${ke("37;1","In \u2190")} ${(0,Xj.inspect)(Ve,{colors:Qe,compact:!0})}`);Te.result&&(console.error(),console.error(` ${ke("37;1","Out \u2192")} ${(0,Xj.inspect)(Te.result,{colors:Qe,compact:!0})}`));let Ne=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Ne.length>0){console.error();for(let Ve of Ne)console.error(` ${ke("38;5;244",Ve)}`)}console.error()}function N(Te,Qe){if(t.allowDebug===!1)return Qe;if(Number.isFinite(o)){if(o>=2)return(...ke)=>{let He=E(Te,ke);try{return He.result=Qe(...ke)}catch(Ne){throw He.error=Ne}finally{R(He)}};if(o>=1)return(...ke)=>{try{return Qe(...ke)}catch(He){let Ne=E(Te,ke);throw Ne.error=He,R(Ne),He}}}return Qe}function U(Te){let Qe=g(Te);if(!Qe)throw Zi("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Qe}function V(Te){if(Te.name===null)return!0;for(let Qe of e.dependencyTreeRoots)if(Qe.name===Te.name&&Qe.reference===Te.reference)return!0;return!1}let ee=new Set(["node","require",...GIe("--conditions")]);function le(Te,Qe=ee,ke){let He=ce(J.join(Te,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(He===null)throw Zi("INTERNAL",`The locator that owns the "${Te}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Ne}=U(He),Ve=J.join(Ne,gr.manifest);if(!t.fakeFs.existsSync(Ve))return null;let je=JSON.parse(t.fakeFs.readFileSync(Ve,"utf8"));if(je.exports==null)return null;let x=J.contains(Ne,Te);if(x===null)throw Zi("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!A.test(x)&&(x=`./${x}`);try{let C=MIe({packageJSONUrl:(0,gm.pathToFileURL)(Ae.fromPortablePath(Ve)),packageSubpath:x,exports:je.exports,base:ke?(0,gm.pathToFileURL)(Ae.fromPortablePath(ke)):null,conditions:Qe});return Ae.toPortablePath((0,gm.fileURLToPath)(C))}catch(C){throw Zi("EXPORTS_RESOLUTION_FAILED",C.message,{unqualifiedPath:cu(Te),locator:He,pkgJson:je,subpath:cu(x),conditions:Qe},C.code)}}function fe(Te,Qe,{extensions:ke}){let He;try{Qe.push(Te),He=t.fakeFs.statSync(Te)}catch{}if(He&&!He.isDirectory())return t.fakeFs.realpathSync(Te);if(He&&He.isDirectory()){let Ne;try{Ne=JSON.parse(t.fakeFs.readFileSync(J.join(Te,gr.manifest),"utf8"))}catch{}let Ve;if(Ne&&Ne.main&&(Ve=J.resolve(Te,Ne.main)),Ve&&Ve!==Te){let je=fe(Ve,Qe,{extensions:ke});if(je!==null)return je}}for(let Ne=0,Ve=ke.length;Ne<Ve;Ne++){let je=`${Te}${ke[Ne]}`;if(Qe.push(je),t.fakeFs.existsSync(je))return je}if(He&&He.isDirectory())for(let Ne=0,Ve=ke.length;Ne<Ve;Ne++){let je=J.format({dir:Te,name:"index",ext:ke[Ne]});if(Qe.push(je),t.fakeFs.existsSync(je))return je}return null}function de(Te){let Qe=new iv.Module(Te,null);return Qe.filename=Te,Qe.paths=iv.Module._nodeModulePaths(Te),Qe}function ge(Te,Qe){return Qe.endsWith("/")&&(Qe=J.join(Qe,"internal.js")),iv.Module._resolveFilename(Ae.fromPortablePath(Te),de(Ae.fromPortablePath(Qe)),!1,{plugnplay:!1})}function oe(Te){if(I===null)return!1;let Qe=J.contains(e.basePath,Te);return Qe===null?!1:!!I.test(Qe.replace(/\/$/,""))}let Be={std:3,resolveVirtual:1,getAllLocators:1},be=p;function g({name:Te,reference:Qe}){let ke=v.get(Te);if(!ke)return null;let He=ke.get(Qe);return He||null}function we({name:Te,reference:Qe}){let ke=[];for(let[He,Ne]of v)if(He!==null)for(let[Ve,je]of Ne)Ve===null||je.packageDependencies.get(Te)!==Qe||He===Te&&Ve===Qe||ke.push({name:He,reference:Ve});return ke}function Se(Te,Qe){let ke=new Map,He=new Set,Ne=je=>{let x=JSON.stringify(je.name);if(He.has(x))return;He.add(x);let C=we(je);for(let P of C)if(U(P).packagePeers.has(Te))Ne(P);else{let F=ke.get(P.name);typeof F>"u"&&ke.set(P.name,F=new Set),F.add(P.reference)}};Ne(Qe);let Ve=[];for(let je of[...ke.keys()].sort())for(let x of[...ke.get(je)].sort())Ve.push({name:je,reference:x});return Ve}function ce(Te,{resolveIgnored:Qe=!1,includeDiscardFromLookup:ke=!1}={}){if(oe(Te)&&!Qe)return null;let He=J.relative(e.basePath,Te);He.match(n)||(He=`./${He}`),He.endsWith("/")||(He=`${He}/`);do{let Ne=b.get(He);if(typeof Ne>"u"||Ne.discardFromLookup&&!ke){He=He.substring(0,He.lastIndexOf("/",He.length-2)+1);continue}return Ne.locator}while(He!=="");return null}function ne(Te){try{return t.fakeFs.readFileSync(Ae.toPortablePath(Te),"utf8")}catch(Qe){if(Qe.code==="ENOENT")return;throw Qe}}function te(Te,Qe,{considerBuiltins:ke=!0}={}){if(Te.startsWith("#"))throw new Error("resolveToUnqualified can not handle private import mappings");if(Te==="pnpapi")return Ae.toPortablePath(t.pnpapiResolution);if(ke&&wk(Te))return null;let He=cu(Te),Ne=Qe&&cu(Qe);if(Qe&&oe(Qe)&&(!J.isAbsolute(Te)||ce(Te)===null)){let x=ge(Te,Qe);if(x===!1)throw Zi("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp)
603
604Require request: "${He}"
605Required by: ${Ne}
606`,{request:He,issuer:Ne});return Ae.toPortablePath(x)}let Ve,je=Te.match(a);if(je){if(!Qe)throw Zi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:He,issuer:Ne});let[,x,C]=je,P=ce(Qe);if(!P){let Le=ge(Te,Qe);if(Le===!1)throw Zi("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
607
608Require path: "${He}"
609Required by: ${Ne}
610`,{request:He,issuer:Ne});return Ae.toPortablePath(Le)}let F=U(P).packageDependencies.get(x),z=null;if(F==null&&P.name!==null){let Le=e.fallbackExclusionList.get(P.name);if(!Le||!Le.has(P.reference)){for(let gt=0,jt=h.length;gt<jt;++gt){let xt=U(h[gt]).packageDependencies.get(x);if(xt!=null){r?z=xt:F=xt;break}}if(e.enableTopLevelFallback&&F==null&&z===null){let gt=e.fallbackPool.get(x);gt!=null&&(z=gt)}}}let X=null;if(F===null)if(V(P))X=Zi("MISSING_PEER_DEPENDENCY",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
611
612Required package: ${x}${x!==He?` (via "${He}")`:""}
613Required by: ${Ne}
614`,{request:He,issuer:Ne,dependencyName:x});else{let Le=Se(x,P);Le.every(ot=>V(ot))?X=Zi("MISSING_PEER_DEPENDENCY",`${P.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
615
616Required package: ${x}${x!==He?` (via "${He}")`:""}
617Required by: ${P.name}@${P.reference} (via ${Ne})
618${Le.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference}
619`).join("")}
620`,{request:He,issuer:Ne,issuerLocator:Object.assign({},P),dependencyName:x,brokenAncestors:Le}):X=Zi("MISSING_PEER_DEPENDENCY",`${P.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
621
622Required package: ${x}${x!==He?` (via "${He}")`:""}
623Required by: ${P.name}@${P.reference} (via ${Ne})
624
625${Le.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference}
626`).join("")}
627`,{request:He,issuer:Ne,issuerLocator:Object.assign({},P),dependencyName:x,brokenAncestors:Le})}else F===void 0&&(!ke&&wk(Te)?V(P)?X=Zi("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
628
629Required package: ${x}${x!==He?` (via "${He}")`:""}
630Required by: ${Ne}
631`,{request:He,issuer:Ne,dependencyName:x}):X=Zi("UNDECLARED_DEPENDENCY",`${P.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${P.name}'s dependencies, this makes the require call ambiguous and unsound.
632
633Required package: ${x}${x!==He?` (via "${He}")`:""}
634Required by: ${Ne}
635`,{request:He,issuer:Ne,issuerLocator:Object.assign({},P),dependencyName:x}):V(P)?X=Zi("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
636
637Required package: ${x}${x!==He?` (via "${He}")`:""}
638Required by: ${Ne}
639`,{request:He,issuer:Ne,dependencyName:x}):X=Zi("UNDECLARED_DEPENDENCY",`${P.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
640
641Required package: ${x}${x!==He?` (via "${He}")`:""}
642Required by: ${P.name}@${P.reference} (via ${Ne})
643`,{request:He,issuer:Ne,issuerLocator:Object.assign({},P),dependencyName:x}));if(F==null){if(z===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");F=z;let Le=X.message.replace(/\n.*/g,"");X.message=Le,!w.has(Le)&&o!==0&&(w.add(Le),process.emitWarning(X))}let Z=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},ie=U(Z);if(!ie.packageLocation)throw Zi("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
644
645Required package: ${Z.name}@${Z.reference}${Z.name!==He?` (via "${He}")`:""}
646Required by: ${P.name}@${P.reference} (via ${Ne})
647`,{request:He,issuer:Ne,dependencyLocator:Object.assign({},Z)});let Pe=ie.packageLocation;C?Ve=J.join(Pe,C):Ve=Pe}else if(J.isAbsolute(Te))Ve=J.normalize(Te);else{if(!Qe)throw Zi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:He,issuer:Ne});let x=J.resolve(Qe);Qe.match(u)?Ve=J.normalize(J.join(x,Te)):Ve=J.normalize(J.join(J.dirname(x),Te))}return J.normalize(Ve)}function Ee(Te,Qe,ke=ee,He){if(n.test(Te))return Qe;let Ne=le(Qe,ke,He);return Ne?J.normalize(Ne):Qe}function Re(Te,{extensions:Qe=Object.keys(iv.Module._extensions)}={}){let ke=[],He=fe(Te,ke,{extensions:Qe});if(He)return J.normalize(He);{KIe(ke.map(je=>Ae.fromPortablePath(je)));let Ne=cu(Te),Ve=ce(Te);if(Ve){let{packageLocation:je}=U(Ve),x=!0;try{t.fakeFs.accessSync(je)}catch(C){if(C?.code==="ENOENT")x=!1;else{let P=(C?.message??C??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw Zi("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${P}).
648
649Missing package: ${Ve.name}@${Ve.reference}
650Expected package location: ${cu(je)}
651`,{unqualifiedPath:Ne,extensions:Qe})}}if(!x){let C=je.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw Zi("QUALIFIED_PATH_RESOLUTION_FAILED",`${C}
652
653Missing package: ${Ve.name}@${Ve.reference}
654Expected package location: ${cu(je)}
655`,{unqualifiedPath:Ne,extensions:Qe})}}throw Zi("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
656
657Source path: ${Ne}
658${ke.map(je=>`Not found: ${cu(je)}
659`).join("")}`,{unqualifiedPath:Ne,extensions:Qe})}}function dt(Te,Qe,ke){if(!Qe)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let He=UIe({name:Te,base:(0,gm.pathToFileURL)(Ae.fromPortablePath(Qe)),conditions:ke.conditions??ee,readFileSyncFn:ne});if(He instanceof URL)return Re(Ae.toPortablePath((0,gm.fileURLToPath)(He)),{extensions:ke.extensions});if(He.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return H(He,Qe,ke)}function H(Te,Qe,ke={}){try{if(Te.startsWith("#"))return dt(Te,Qe,ke);let{considerBuiltins:He,extensions:Ne,conditions:Ve}=ke,je=te(Te,Qe,{considerBuiltins:He});if(Te==="pnpapi")return je;if(je===null)return null;let x=()=>Qe!==null?oe(Qe):!1,C=(!He||!wk(Te))&&!x()?Ee(Te,je,Ve,Qe):je;return Re(C,{extensions:Ne})}catch(He){throw Object.hasOwn(He,"pnpCode")&&Object.assign(He.data,{request:cu(Te),issuer:Qe&&cu(Qe)}),He}}function at(Te){let Qe=J.normalize(Te),ke=di.resolveVirtual(Qe);return ke!==Qe?ke:null}return{VERSIONS:Be,topLevel:be,getLocator:(Te,Qe)=>Array.isArray(Qe)?{name:Qe[0],reference:Qe[1]}:{name:Te,reference:Qe},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){let Te=[];for(let[Qe,ke]of v)for(let He of ke.keys())Qe!==null&&He!==null&&Te.push({name:Qe,reference:He});return Te},getPackageInformation:Te=>{let Qe=g(Te);if(Qe===null)return null;let ke=Ae.fromPortablePath(Qe.packageLocation);return{...Qe,packageLocation:ke}},findPackageLocator:Te=>ce(Ae.toPortablePath(Te)),resolveToUnqualified:N("resolveToUnqualified",(Te,Qe,ke)=>{let He=Qe!==null?Ae.toPortablePath(Qe):null,Ne=te(Ae.toPortablePath(Te),He,ke);return Ne===null?null:Ae.fromPortablePath(Ne)}),resolveUnqualified:N("resolveUnqualified",(Te,Qe)=>Ae.fromPortablePath(Re(Ae.toPortablePath(Te),Qe))),resolveRequest:N("resolveRequest",(Te,Qe,ke)=>{let He=Qe!==null?Ae.toPortablePath(Qe):null,Ne=H(Ae.toPortablePath(Te),He,ke);return Ne===null?null:Ae.fromPortablePath(Ne)}),resolveVirtual:N("resolveVirtual",Te=>{let Qe=at(Ae.toPortablePath(Te));return Qe!==null?Ae.fromPortablePath(Qe):null})}}St();var JIe=(e,t,r)=>{let o=VB(e),a=_j(o,{basePath:t}),n=Ae.join(t,gr.pnpCjs);return Zj(a,{fakeFs:r,pnpapiResolution:n})};var eq=$e(zIe());qt();var yA={};Jt(yA,{checkManifestCompatibility:()=>XIe,extractBuildRequest:()=>Ck,getExtractHint:()=>tq,hasBindingGyp:()=>rq});Ye();St();function XIe(e){return G.isPackageCompatible(e,cs.getArchitectureSet())}function Ck(e,t,r,{configuration:o}){let a=[];for(let n of["preinstall","install","postinstall"])t.manifest.scripts.has(n)&&a.push({type:0,script:n});return!t.manifest.scripts.has("install")&&t.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:e.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${G.prettyLocator(o,e)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${G.prettyLocator(o,e)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!o.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${G.prettyLocator(o,e)} lists build scripts, but all build scripts have been disabled.`)}:XIe(e)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${G.prettyLocator(o,e)} The ${cs.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var DIt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function tq(e){return e.packageFs.getExtractHint({relevantExtensions:DIt})}function rq(e){let t=J.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}var ov={};Jt(ov,{getUnpluggedPath:()=>sv});Ye();St();function sv(e,{configuration:t}){return J.resolve(t.get("pnpUnpluggedFolder"),G.slugifyLocator(e))}var SIt=new Set([G.makeIdent(null,"open").identHash,G.makeIdent(null,"opn").identHash]),D0=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(t,r){return this.isEnabled(r)}async findPackageLocation(t,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let o=S0(r.project).cjs;if(!ae.existsSync(o))throw new it(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=_e.getFactoryWithDefault(this.pnpCache,o,()=>_e.dynamicRequire(o,{cachingStrategy:_e.CachingStrategy.FsTime})),n={name:G.stringifyIdent(t),reference:t.reference},u=a.getPackageInformation(n);if(!u)throw new it(`Couldn't find ${G.prettyLocator(r.project.configuration,t)} in the currently installed PnP map - running an install might help`);return Ae.toPortablePath(u.packageLocation)}async findPackageLocator(t,r){if(!this.isEnabled(r))return null;let o=S0(r.project).cjs;if(!ae.existsSync(o))return null;let n=_e.getFactoryWithDefault(this.pnpCache,o,()=>_e.dynamicRequire(o,{cachingStrategy:_e.CachingStrategy.FsTime})).findPackageLocator(Ae.fromPortablePath(t));return n?G.makeLocator(G.parseIdent(n.name),n.reference):null}makeInstaller(t){return new dm(t)}isEnabled(t){return!(t.project.configuration.get("nodeLinker")!=="pnp"||t.project.configuration.get("pnpMode")!==this.mode)}},dm=class{constructor(t){this.opts=t;this.mode="strict";this.asyncActions=new _e.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=t}attachCustomData(t){this.customData=t}async installPackage(t,r,o){let a=G.stringifyIdent(t),n=t.reference,u=!!this.opts.project.tryWorkspaceByLocator(t),A=G.isVirtualLocator(t),p=t.peerDependencies.size>0&&!A,h=!p&&!u,w=!p&&t.linkType!=="SOFT",I,v;if(h||w){let ee=A?G.devirtualizeLocator(t):t;I=this.customData.store.get(ee.locatorHash),typeof I>"u"&&(I=await PIt(r),t.linkType==="HARD"&&this.customData.store.set(ee.locatorHash,I)),I.manifest.type==="module"&&(this.isESMLoaderRequired=!0),v=this.opts.project.getDependencyMeta(ee,t.version)}let b=h?Ck(t,I,v,{configuration:this.opts.project.configuration}):null,E=w?await this.unplugPackageIfNeeded(t,I,r,v,o):r.packageFs;if(J.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=J.resolve(E.getRealPath(),r.prefixPath),N=nq(this.opts.project.cwd,R),U=new Map,V=new Set;if(A){for(let ee of t.peerDependencies.values())U.set(G.stringifyIdent(ee),null),V.add(G.stringifyIdent(ee));if(!u){let ee=G.devirtualizeLocator(t);this.virtualTemplates.set(ee.locatorHash,{location:nq(this.opts.project.cwd,di.resolveVirtual(R)),locator:ee})}}return _e.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:N,packageDependencies:U,packagePeers:V,linkType:t.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildRequest:b}}async attachInternalDependencies(t,r){let o=this.getPackageInformation(t);for(let[a,n]of r){let u=G.areIdentsEqual(a,n)?n.reference:[G.stringifyIdent(n),n.reference];o.packageDependencies.set(G.stringifyIdent(a),u)}}async attachExternalDependents(t,r){for(let o of r)this.getDiskInformation(o).packageDependencies.set(G.stringifyIdent(t),t.reference)}async finalizeInstall(){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;let t=S0(this.opts.project);if(this.isEsmEnabled()||await ae.removePromise(t.esmLoader),this.opts.project.configuration.get("nodeLinker")!=="pnp"){await ae.removePromise(t.cjs),await ae.removePromise(t.data),await ae.removePromise(t.esmLoader),await ae.removePromise(this.opts.project.configuration.get("pnpUnpluggedFolder"));return}for(let{locator:w,location:I}of this.virtualTemplates.values())_e.getMapWithDefault(this.packageRegistry,G.stringifyIdent(w)).set(w.reference,{packageLocation:I,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));let r=this.opts.project.configuration.get("pnpFallbackMode"),o=this.opts.project.workspaces.map(({anchoredLocator:w})=>({name:G.stringifyIdent(w),reference:w.reference})),a=r!=="none",n=[],u=new Map,A=_e.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),p=this.packageRegistry,h=this.opts.project.configuration.get("pnpShebang");if(r==="dependencies-only")for(let w of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(w)&&n.push({name:G.stringifyIdent(w),reference:w.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:o,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:u,ignorePattern:A,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(t){}isEsmEnabled(){if(this.opts.project.configuration.sources.has("pnpEnableEsmLoader"))return this.opts.project.configuration.get("pnpEnableEsmLoader");if(this.isESMLoaderRequired)return!0;for(let t of this.opts.project.workspaces)if(t.manifest.type==="module")return!0;return!1}async finalizeInstallWithPnp(t){let r=S0(this.opts.project),o=await this.locateNodeModules(t.ignorePattern);if(o.length>0){this.opts.report.reportWarning(31,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(let n of o)await ae.removePromise(n)}if(await this.transformPnpSettings(t),this.opts.project.configuration.get("pnpEnableInlining")){let n=BIe(t);await ae.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await ae.removePromise(r.data)}else{let{dataFile:n,loaderFile:u}=vIe(t);await ae.changeFilePromise(r.cjs,u,{automaticNewlines:!0,mode:493}),await ae.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,"ESM support for PnP uses the experimental loader API and is therefore experimental"),await ae.changeFilePromise(r.esmLoader,(0,eq.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get("pnpUnpluggedFolder");if(this.unpluggedPaths.size===0)await ae.removePromise(a);else for(let n of await ae.readdirPromise(a)){let u=J.resolve(a,n);this.unpluggedPaths.has(u)||await ae.removePromise(u)}}async locateNodeModules(t){let r=[],o=t?new RegExp(t):null;for(let a of this.opts.project.workspaces){let n=J.join(a.cwd,"node_modules");if(o&&o.test(J.relative(this.opts.project.cwd,a.cwd))||!ae.existsSync(n))continue;let u=await ae.readdirPromise(n,{withFileTypes:!0}),A=u.filter(p=>!p.isDirectory()||p.name===".bin"||!p.name.startsWith("."));if(A.length===u.length)r.push(n);else for(let p of A)r.push(J.join(n,p.name))}return r}async unplugPackageIfNeeded(t,r,o,a,n){return this.shouldBeUnplugged(t,r,a)?this.unplugPackage(t,o,n):o.packageFs}shouldBeUnplugged(t,r,o){return typeof o.unplugged<"u"?o.unplugged:SIt.has(t.identHash)||t.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(Ck(t,r,o,{configuration:this.opts.project.configuration})?.skipped===!1||r.misc.extractHint)}async unplugPackage(t,r,o){let a=sv(t,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(t.locatorHash)?new Hu(a,{baseFs:r.packageFs,pathUtils:J}):(this.unpluggedPaths.add(a),o.holdFetchResult(this.asyncActions.set(t.locatorHash,async()=>{let n=J.join(a,r.prefixPath,".ready");await ae.existsPromise(n)||(this.opts.project.storedBuildState.delete(t.locatorHash),await ae.mkdirPromise(a,{recursive:!0}),await ae.copyPromise(a,Bt.dot,{baseFs:r.packageFs,overwrite:!1}),await ae.writeFilePromise(n,""))})),new hn(a))}getPackageInformation(t){let r=G.stringifyIdent(t),o=t.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${G.prettyIdent(this.opts.project.configuration,t)})`);let n=a.get(o);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${G.prettyLocator(this.opts.project.configuration,t)})`);return n}getDiskInformation(t){let r=_e.getMapWithDefault(this.packageRegistry,"@@disk"),o=nq(this.opts.project.cwd,t);return _e.getFactoryWithDefault(r,o,()=>({packageLocation:o,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1}))}};function nq(e,t){let r=J.relative(e,t);return r.match(/^\.{0,2}\//)||(r=`./${r}`),r.replace(/\/?$/,"/")}async function PIt(e){let t=await Ot.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Ot,r=new Set(["preinstall","install","postinstall"]);for(let o of t.scripts.keys())r.has(o)||t.scripts.delete(o);return{manifest:{scripts:t.scripts,preferUnplugged:t.preferUnplugged,type:t.type},misc:{extractHint:tq(e),hasBindingGyp:rq(e)}}}Ye();Ye();qt();var ZIe=$e(Zo());var P0=class extends ut{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Unplug direct dependencies from the entire project"});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Unplug both direct and transitive dependencies"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);if(r.get("nodeLinker")!=="pnp")throw new it("This command can only be used if the `nodeLinker` option is set to `pnp`");await o.restoreInstallState();let u=new Set(this.patterns),A=this.patterns.map(b=>{let E=G.parseDescriptor(b),R=E.range!=="unknown"?E:G.makeDescriptor(E,"*");if(!Qr.validRange(R.range))throw new it(`The range of the descriptor patterns must be a valid semver range (${G.prettyDescriptor(r,R)})`);return N=>{let U=G.stringifyIdent(N);return!ZIe.default.isMatch(U,G.stringifyIdent(R))||N.version&&!Qr.satisfiesWithPrereleases(N.version,R.range)?!1:(u.delete(b),!0)}}),p=()=>{let b=[];for(let E of o.storedPackages.values())!o.tryWorkspaceByLocator(E)&&!G.isVirtualLocator(E)&&A.some(R=>R(E))&&b.push(E);return b},h=b=>{let E=new Set,R=[],N=(U,V)=>{if(!E.has(U.locatorHash)&&(E.add(U.locatorHash),!o.tryWorkspaceByLocator(U)&&A.some(ee=>ee(U))&&R.push(U),!(V>0&&!this.recursive)))for(let ee of U.dependencies.values()){let le=o.storedResolutions.get(ee.descriptorHash);if(!le)throw new Error("Assertion failed: The resolution should have been registered");let fe=o.storedPackages.get(le);if(!fe)throw new Error("Assertion failed: The package should have been registered");N(fe,V+1)}};for(let U of b)N(U.anchoredPackage,0);return R},w,I;if(this.all&&this.recursive?(w=p(),I="the project"):this.all?(w=h(o.workspaces),I="any workspace"):(w=h([a]),I="this workspace"),u.size>1)throw new it(`Patterns ${ye.prettyList(r,u,ye.Type.CODE)} don't match any packages referenced by ${I}`);if(u.size>0)throw new it(`Pattern ${ye.prettyList(r,u,ye.Type.CODE)} doesn't match any packages referenced by ${I}`);w=_e.sortMap(w,b=>G.stringifyLocator(b));let v=await Nt.start({configuration:r,stdout:this.context.stdout,json:this.json},async b=>{for(let E of w){let R=E.version??"unknown",N=o.topLevelWorkspace.manifest.ensureDependencyMeta(G.makeDescriptor(E,R));N.unplugged=!0,b.reportInfo(0,`Will unpack ${G.prettyLocator(r,E)} to ${ye.pretty(r,sv(E,{configuration:r}),ye.Type.PATH)}`),b.reportJson({locator:G.stringifyLocator(E),version:R})}await o.topLevelWorkspace.persistManifest(),this.json||b.reportSeparator()});return v.hasErrors()?v.exitCode():await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};P0.paths=[["unplug"]],P0.usage=nt.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]});var S0=e=>({cjs:J.join(e.cwd,gr.pnpCjs),data:J.join(e.cwd,gr.pnpData),esmLoader:J.join(e.cwd,gr.pnpEsmLoader)}),e1e=e=>/\s/.test(e)?JSON.stringify(e):e;async function xIt(e,t,r){let o=/\s*--require\s+\S*\.pnp\.c?js\s*/g,a=/\s*--experimental-loader\s+\S*\.pnp\.loader\.mjs\s*/,n=(t.NODE_OPTIONS??"").replace(o," ").replace(a," ").trim();if(e.configuration.get("nodeLinker")!=="pnp"){t.NODE_OPTIONS=n;return}let u=S0(e),A=`--require ${e1e(Ae.fromPortablePath(u.cjs))}`;ae.existsSync(u.esmLoader)&&(A=`${A} --experimental-loader ${(0,$Ie.pathToFileURL)(Ae.fromPortablePath(u.esmLoader)).href}`),ae.existsSync(u.cjs)&&(t.NODE_OPTIONS=n?`${A} ${n}`:A)}async function bIt(e,t){let r=S0(e);t(r.cjs),t(r.data),t(r.esmLoader),t(e.configuration.get("pnpUnpluggedFolder"))}var QIt={hooks:{populateYarnPaths:bIt,setupScriptEnvironment:xIt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:"STRING",default:"pnp"},winLinkType:{description:"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.",type:"STRING",values:["junctions","symlinks"],default:"junctions"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:"STRING",default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:"STRING",default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:"STRING",default:[],isArray:!0},pnpEnableEsmLoader:{description:"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.",type:"BOOLEAN",default:!1},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:"BOOLEAN",default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:"STRING",default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:"ABSOLUTE_PATH",default:"./.yarn/unplugged"}},linkers:[D0],commands:[P0]},kIt=QIt;var l1e=$e(s1e());qt();var Aq=$e(Ie("crypto")),c1e=$e(Ie("fs")),u1e=1,Di="node_modules",Ik=".bin",A1e=".yarn-state.yml",JIt=1e3,fq=(o=>(o.CLASSIC="classic",o.HARDLINKS_LOCAL="hardlinks-local",o.HARDLINKS_GLOBAL="hardlinks-global",o))(fq||{}),av=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:"NodeModulesLinker",version:3})}supportsPackage(t,r){return this.isEnabled(r)}async findPackageLocation(t,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the node-modules linker to be enabled");let o=r.project.tryWorkspaceByLocator(t);if(o)return o.cwd;let a=await _e.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await uq(r.project,{unrollAliases:!0}));if(a===null)throw new it("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");let n=a.locatorMap.get(G.stringifyLocator(t));if(!n){let p=new it(`Couldn't find ${G.prettyLocator(r.project.configuration,t)} in the currently installed node_modules map - running an install might help`);throw p.code="LOCATOR_NOT_INSTALLED",p}let u=n.locations.sort((p,h)=>p.split(J.sep).length-h.split(J.sep).length),A=J.join(r.project.configuration.startingCwd,Di);return u.find(p=>J.contains(A,p))||n.locations[0]}async findPackageLocator(t,r){if(!this.isEnabled(r))return null;let o=await _e.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await uq(r.project,{unrollAliases:!0}));if(o===null)return null;let{locationRoot:a,segments:n}=Bk(J.resolve(t),{skipPrefix:r.project.cwd}),u=o.locationTree.get(a);if(!u)return null;let A=u.locator;for(let p of n){if(u=u.children.get(p),!u)break;A=u.locator||A}return G.parseLocator(A)}makeInstaller(t){return new cq(t)}isEnabled(t){return t.project.configuration.get("nodeLinker")==="node-modules"}},cq=class{constructor(t){this.opts=t;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(t){this.customData=t}async installPackage(t,r){let o=J.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(t.locatorHash);if(typeof a>"u"&&(a=await VIt(t,r),t.linkType==="HARD"&&this.customData.store.set(t.locatorHash,a)),!G.isPackageCompatible(t,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildRequest:null};let n=new Map,u=new Set;n.has(G.stringifyIdent(t))||n.set(G.stringifyIdent(t),t.reference);let A=t;if(G.isVirtualLocator(t)){A=G.devirtualizeLocator(t);for(let w of t.peerDependencies.values())n.set(G.stringifyIdent(w),null),u.add(G.stringifyIdent(w))}let p={packageLocation:`${Ae.fromPortablePath(o)}/`,packageDependencies:n,packagePeers:u,linkType:t.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(t.locatorHash,{pkg:t,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(t,t.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf("/")+1):null;return this.realLocatorChecksums.set(A.locatorHash,h),{packageLocation:o,buildRequest:null}}async attachInternalDependencies(t,r){let o=this.localStore.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected information object to have been registered");for(let[a,n]of r){let u=G.areIdentsEqual(a,n)?n.reference:[G.stringifyIdent(n),n.reference];o.pnpNode.packageDependencies.set(G.stringifyIdent(a),u)}}async attachExternalDependents(t,r){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if(this.opts.project.configuration.get("nodeLinker")!=="node-modules")return;let t=new di({baseFs:new Vl({maxOpenFiles:80,readOnlyArchives:!0})}),r=await uq(this.opts.project),o=this.opts.project.configuration.get("nmMode");(r===null||o!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:o,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(v=>{let b=this.opts.project.configuration.get("nmHoistingLimits");try{b=_e.validateEnum(WB,v.manifest.installConfig?.hoistingLimits??b)}catch{let R=G.prettyWorkspace(this.opts.project.configuration,v);this.opts.report.reportWarning(57,`${R}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(WB).join(", ")}, using default: "${b}"`)}return[v.relativeCwd,b]})),n=new Map(this.opts.project.workspaces.map(v=>{let b=this.opts.project.configuration.get("nmSelfReferences");return b=v.manifest.installConfig?.selfReferences??b,[v.relativeCwd,b]})),u={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(v,b)=>Array.isArray(b)?{name:b[0],reference:b[1]}:{name:v,reference:b},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(v=>{let b=v.anchoredLocator;return{name:G.stringifyIdent(b),reference:b.reference}}),getPackageInformation:v=>{let b=v.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:G.makeLocator(G.parseIdent(v.name),v.reference),E=this.localStore.get(b.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: Expected the package reference to have been registered");return E.pnpNode},findPackageLocator:v=>{let b=this.opts.project.tryWorkspaceByCwd(Ae.toPortablePath(v));if(b!==null){let E=b.anchoredLocator;return{name:G.stringifyIdent(E),reference:E.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:v=>Ae.fromPortablePath(di.resolveVirtual(Ae.toPortablePath(v)))},{tree:A,errors:p,preserveSymlinksRequired:h}=KB(u,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!A){for(let{messageName:v,text:b}of p)this.opts.report.reportError(v,b);return}let w=Mj(A);await t1t(r,w,{baseFs:t,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async v=>{let b=G.parseLocator(v),E=this.localStore.get(b.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: Expected the slot to exist");return E.customPackageData.manifest}});let I=[];for(let[v,b]of w.entries()){if(g1e(v))continue;let E=G.parseLocator(v),R=this.localStore.get(E.locatorHash);if(typeof R>"u")throw new Error("Assertion failed: Expected the slot to exist");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let N=yA.extractBuildRequest(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration});!N||I.push({buildLocations:b.locations,locator:E,buildRequest:N})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${ye.pretty(this.opts.project.configuration,"--preserve-symlinks",ye.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:I}}};async function VIt(e,t){let r=await Ot.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Ot,o=new Set(["preinstall","install","postinstall"]);for(let a of r.scripts.keys())o.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:yA.hasBindingGyp(t)}}}async function zIt(e,t,r,o,{installChangedByUser:a}){let n="";n+=`# Warning: This file is automatically generated. Removing it is fine, but will
660`,n+=`# cause your node_modules installation to become invalidated.
661`,n+=`
662`,n+=`__metadata:
663`,n+=` version: ${u1e}
664`,n+=` nmMode: ${o.value}
665`;let u=Array.from(t.keys()).sort(),A=G.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(let w of u){let I=t.get(w);n+=`
666`,n+=`${JSON.stringify(w)}:
667`,n+=` locations:
668`;for(let v of I.locations){let b=J.contains(e.cwd,v);if(b===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` - ${JSON.stringify(b)}
669`}if(I.aliases.length>0){n+=` aliases:
670`;for(let v of I.aliases)n+=` - ${JSON.stringify(v)}
671`}if(w===A&&r.size>0){n+=` bin:
672`;for(let[v,b]of r){let E=J.contains(e.cwd,v);if(E===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` ${JSON.stringify(E)}:
673`;for(let[R,N]of b){let U=J.relative(J.join(v,Di),N);n+=` ${JSON.stringify(R)}: ${JSON.stringify(U)}
674`}}}}let p=e.cwd,h=J.join(p,Di,A1e);a&&await ae.removePromise(h),await ae.changeFilePromise(h,n,{automaticNewlines:!0})}async function uq(e,{unrollAliases:t=!1}={}){let r=e.cwd,o=J.join(r,Di,A1e),a;try{a=await ae.statPromise(o)}catch{}if(!a)return null;let n=Ji(await ae.readFilePromise(o,"utf8"));if(n.__metadata.version>u1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,w]of Object.entries(n)){let I=w.locations.map(b=>J.join(r,b)),v=w.bin;if(v)for(let[b,E]of Object.entries(v)){let R=J.join(r,Ae.toPortablePath(b)),N=_e.getMapWithDefault(p,R);for(let[U,V]of Object.entries(E))N.set(bi(U),Ae.toPortablePath([R,Di,V].join(J.sep)))}if(A.set(h,{target:Bt.dot,linkType:"HARD",locations:I,aliases:w.aliases||[]}),t&&w.aliases)for(let b of w.aliases){let{scope:E,name:R}=G.parseLocator(h),N=G.makeLocator(G.makeIdent(E,R),b),U=G.stringifyLocator(N);A.set(U,{target:Bt.dot,linkType:"HARD",locations:I,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:f1e(A,{skipPrefix:e.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var Gw=async(e,t)=>{if(e.split(J.sep).indexOf(Di)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${e}`);try{if(!t.innerLoop){let o=t.allowSymlink?await ae.statPromise(e):await ae.lstatPromise(e);if(t.allowSymlink&&!o.isDirectory()||!t.allowSymlink&&o.isSymbolicLink()){await ae.unlinkPromise(e);return}}let r=await ae.readdirPromise(e,{withFileTypes:!0});for(let o of r){let a=J.join(e,bi(o.name));o.isDirectory()?(o.name!==Di||t&&t.innerLoop)&&await Gw(a,{innerLoop:!0,contentsOnly:!1}):await ae.unlinkPromise(a)}t.contentsOnly||await ae.rmdirPromise(e)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},o1e=4,Bk=(e,{skipPrefix:t})=>{let r=J.contains(t,e);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${e} which is outside project root: ${t}`);let o=r.split(J.sep).filter(p=>p!==""),a=o.indexOf(Di),n=o.slice(0,a).join(J.sep),u=J.join(t,n),A=o.slice(a);return{locationRoot:u,segments:A}},f1e=(e,{skipPrefix:t})=>{let r=new Map;if(e===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of e.entries()){if(n.linkType==="SOFT"&&J.contains(t,n.target)!==null){let A=_e.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=Bk(u,{skipPrefix:t}),h=_e.getFactoryWithDefault(r,A,o);for(let w=0;w<p.length;++w){let I=p[w];if(I!=="."){let v=_e.getFactoryWithDefault(h.children,I,o);h.children.set(I,v),h=v}w===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},pq=async(e,t,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await ae.lstatPromise(e)}catch{}if(!o||o.isDirectory()){await ae.symlinkPromise(e,t,"junction");return}}await ae.symlinkPromise(J.relative(J.dirname(t),e),t)};async function p1e(e,t,r){let o=J.join(e,bi(`${Aq.default.randomBytes(16).toString("hex")}.tmp`));try{await ae.writeFilePromise(o,r);try{await ae.linkPromise(o,t)}catch{}}finally{await ae.unlinkPromise(o)}}async function XIt({srcPath:e,dstPath:t,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind===h1e.FILE){if(n.value==="hardlinks-global"&&o&&r.digest){let A=J.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await ae.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-JIt))if(await wn.checksumFile(A,{baseFs:ae,algorithm:"sha1"})!==r.digest){let I=J.join(o,bi(`${Aq.default.randomBytes(16).toString("hex")}.tmp`));await ae.renamePromise(A,I);let v=await a.readFilePromise(e);await ae.writeFilePromise(I,v);try{await ae.linkPromise(I,A),r.mtimeMs=new Date().getTime(),await ae.unlinkPromise(I)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await ae.linkPromise(A,t),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(e);await p1e(o,A,h),r.mtimeMs=new Date().getTime();try{await ae.linkPromise(A,t)}catch(w){w&&w.code&&w.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(e,t))}}}else await a.copyFilePromise(e,t);let u=r.mode&511;u!==420&&await ae.chmodPromise(t,u)}}var h1e=(o=>(o.FILE="file",o.DIRECTORY="directory",o.SYMLINK="symlink",o))(h1e||{}),ZIt=async(e,t,{baseFs:r,globalHardlinksStore:o,nmMode:a,windowsLinkType:n,packageChecksum:u})=>{await ae.mkdirPromise(e,{recursive:!0});let A=async(w=Bt.dot)=>{let I=J.join(t,w),v=await r.readdirPromise(I,{withFileTypes:!0}),b=new Map;for(let E of v){let R=J.join(w,E.name),N,U=J.join(I,E.name);if(E.isFile()){if(N={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let V=await wn.checksumFile(U,{baseFs:r,algorithm:"sha1"});N.digest=V}}else if(E.isDirectory())N={kind:"directory"};else if(E.isSymbolicLink())N={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(b.set(R,N),E.isDirectory()&&R!==Di){let V=await A(R);for(let[ee,le]of V)b.set(ee,le)}}return b},p;if(a.value==="hardlinks-global"&&o&&u){let w=J.join(o,u.substring(0,2),`${u.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await ae.readFilePromise(w,"utf8"))))}catch{p=await A()}}else p=await A();let h=!1;for(let[w,I]of p){let v=J.join(t,w),b=J.join(e,w);if(I.kind==="directory")await ae.mkdirPromise(b,{recursive:!0});else if(I.kind==="file"){let E=I.mtimeMs;await XIt({srcPath:v,dstPath:b,entry:I,nmMode:a,baseFs:r,globalHardlinksStore:o}),I.mtimeMs!==E&&(h=!0)}else I.kind==="symlink"&&await pq(J.resolve(J.dirname(b),I.symlinkTo),b,n)}if(a.value==="hardlinks-global"&&o&&h&&u){let w=J.join(o,u.substring(0,2),`${u.substring(2)}.json`);await ae.removePromise(w),await p1e(o,w,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function $It(e,t,r,o){let a=new Map,n=new Map,u=new Map,A=!1,p=(h,w,I,v,b)=>{let E=!0,R=J.join(h,w),N=new Set;if(w===Di||w.startsWith("@")){let V;try{V=ae.statSync(R)}catch{}E=!!V,V?V.mtimeMs>r?(A=!0,N=new Set(ae.readdirSync(R))):N=new Set(I.children.get(w).children.keys()):A=!0;let ee=t.get(h);if(ee){let le=J.join(h,Di,Ik),fe;try{fe=ae.statSync(le)}catch{}if(!fe)A=!0;else if(fe.mtimeMs>r){A=!0;let de=new Set(ae.readdirSync(le)),ge=new Map;n.set(h,ge);for(let[oe,Be]of ee)de.has(oe)&&ge.set(oe,Be)}else n.set(h,ee)}}else E=b.has(w);let U=I.children.get(w);if(E){let{linkType:V,locator:ee}=U,le={children:new Map,linkType:V,locator:ee};if(v.children.set(w,le),ee){let fe=_e.getSetWithDefault(u,ee);fe.add(R),u.set(ee,fe)}for(let fe of U.children.keys())p(R,fe,U,le,N)}else U.locator&&o.storedBuildState.delete(G.parseLocator(U.locator).locatorHash)};for(let[h,w]of e){let{linkType:I,locator:v}=w,b={children:new Map,linkType:I,locator:v};if(a.set(h,b),v){let E=_e.getSetWithDefault(u,w.locator);E.add(h),u.set(w.locator,E)}w.children.has(Di)&&p(h,Di,w,b,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:u,installChangedByUser:A}}function g1e(e){let t=G.parseDescriptor(e);return G.isVirtualDescriptor(t)&&(t=G.devirtualizeDescriptor(t)),t.range.startsWith("link:")}async function e1t(e,t,r,{loadManifest:o}){let a=new Map;for(let[A,{locations:p}]of e){let h=g1e(A)?null:await o(A,p[0]),w=new Map;if(h)for(let[I,v]of h.bin){let b=J.join(p[0],v);v!==""&&ae.existsSync(b)&&w.set(I,v)}a.set(A,w)}let n=new Map,u=(A,p,h)=>{let w=new Map,I=J.contains(r,A);if(h.locator&&I!==null){let v=a.get(h.locator);for(let[b,E]of v){let R=J.join(A,Ae.toPortablePath(E));w.set(bi(b),R)}for(let[b,E]of h.children){let R=J.join(A,b),N=u(R,R,E);N.size>0&&n.set(A,new Map([...n.get(A)||new Map,...N]))}}else for(let[v,b]of h.children){let E=u(J.join(A,v),p,b);for(let[R,N]of E)w.set(R,N)}return w};for(let[A,p]of t){let h=u(A,A,p);h.size>0&&n.set(A,new Map([...n.get(A)||new Map,...h]))}return n}var a1e=(e,t)=>{if(!e||!t)return e===t;let r=G.parseLocator(e);G.isVirtualLocator(r)&&(r=G.devirtualizeLocator(r));let o=G.parseLocator(t);return G.isVirtualLocator(o)&&(o=G.devirtualizeLocator(o)),G.areLocatorsEqual(r,o)};function hq(e){return J.join(e.get("globalFolder"),"store")}async function t1t(e,t,{baseFs:r,project:o,report:a,loadManifest:n,realLocatorChecksums:u}){let A=J.join(o.cwd,Di),{locationTree:p,binSymlinks:h,locatorLocations:w,installChangedByUser:I}=$It(e.locationTree,e.binSymlinks,e.mtimeMs,o),v=f1e(t,{skipPrefix:o.cwd}),b=[],E=async({srcDir:Be,dstDir:be,linkType:g,globalHardlinksStore:we,nmMode:Se,windowsLinkType:ce,packageChecksum:ne})=>{let te=(async()=>{try{g==="SOFT"?(await ae.mkdirPromise(J.dirname(be),{recursive:!0}),await pq(J.resolve(Be),be,ce)):await ZIt(be,Be,{baseFs:r,globalHardlinksStore:we,nmMode:Se,windowsLinkType:ce,packageChecksum:ne})}catch(Ee){throw Ee.message=`While persisting ${Be} -> ${be} ${Ee.message}`,Ee}finally{le.tick()}})().then(()=>b.splice(b.indexOf(te),1));b.push(te),b.length>o1e&&await Promise.race(b)},R=async(Be,be,g)=>{let we=(async()=>{let Se=async(ce,ne,te)=>{try{te.innerLoop||await ae.mkdirPromise(ne,{recursive:!0});let Ee=await ae.readdirPromise(ce,{withFileTypes:!0});for(let Re of Ee){if(!te.innerLoop&&Re.name===Ik)continue;let dt=J.join(ce,Re.name),H=J.join(ne,Re.name);Re.isDirectory()?(Re.name!==Di||te&&te.innerLoop)&&(await ae.mkdirPromise(H,{recursive:!0}),await Se(dt,H,{...te,innerLoop:!0})):ge.value==="hardlinks-local"||ge.value==="hardlinks-global"?await ae.linkPromise(dt,H):await ae.copyFilePromise(dt,H,c1e.default.constants.COPYFILE_FICLONE)}}catch(Ee){throw te.innerLoop||(Ee.message=`While cloning ${ce} -> ${ne} ${Ee.message}`),Ee}finally{te.innerLoop||le.tick()}};await Se(Be,be,g)})().then(()=>b.splice(b.indexOf(we),1));b.push(we),b.length>o1e&&await Promise.race(b)},N=async(Be,be,g)=>{if(g)for(let[we,Se]of be.children){let ce=g.children.get(we);await N(J.join(Be,we),Se,ce)}else{be.children.has(Di)&&await Gw(J.join(Be,Di),{contentsOnly:!1});let we=J.basename(Be)===Di&&v.has(J.join(J.dirname(Be),J.sep));await Gw(Be,{contentsOnly:Be===A,allowSymlink:we})}};for(let[Be,be]of p){let g=v.get(Be);for(let[we,Se]of be.children){if(we===".")continue;let ce=g&&g.children.get(we),ne=J.join(Be,we);await N(ne,Se,ce)}}let U=async(Be,be,g)=>{if(g){a1e(be.locator,g.locator)||await Gw(Be,{contentsOnly:be.linkType==="HARD"});for(let[we,Se]of be.children){let ce=g.children.get(we);await U(J.join(Be,we),Se,ce)}}else{be.children.has(Di)&&await Gw(J.join(Be,Di),{contentsOnly:!0});let we=J.basename(Be)===Di&&v.has(J.join(J.dirname(Be),J.sep));await Gw(Be,{contentsOnly:be.linkType==="HARD",allowSymlink:we})}};for(let[Be,be]of v){let g=p.get(Be);for(let[we,Se]of be.children){if(we===".")continue;let ce=g&&g.children.get(we);await U(J.join(Be,we),Se,ce)}}let V=new Map,ee=[];for(let[Be,be]of w)for(let g of be){let{locationRoot:we,segments:Se}=Bk(g,{skipPrefix:o.cwd}),ce=v.get(we),ne=we;if(ce){for(let te of Se)if(ne=J.join(ne,te),ce=ce.children.get(te),!ce)break;if(ce){let te=a1e(ce.locator,Be),Ee=t.get(ce.locator),Re=Ee.target,dt=ne,H=Ee.linkType;if(te)V.has(Re)||V.set(Re,dt);else if(Re!==dt){let at=G.parseLocator(ce.locator);G.isVirtualLocator(at)&&(at=G.devirtualizeLocator(at)),ee.push({srcDir:Re,dstDir:dt,linkType:H,realLocatorHash:at.locatorHash})}}}}for(let[Be,{locations:be}]of t.entries())for(let g of be){let{locationRoot:we,segments:Se}=Bk(g,{skipPrefix:o.cwd}),ce=p.get(we),ne=v.get(we),te=we,Ee=t.get(Be),Re=G.parseLocator(Be);G.isVirtualLocator(Re)&&(Re=G.devirtualizeLocator(Re));let dt=Re.locatorHash,H=Ee.target,at=g;if(H===at)continue;let Te=Ee.linkType;for(let Qe of Se)ne=ne.children.get(Qe);if(!ce)ee.push({srcDir:H,dstDir:at,linkType:Te,realLocatorHash:dt});else for(let Qe of Se)if(te=J.join(te,Qe),ce=ce.children.get(Qe),!ce){ee.push({srcDir:H,dstDir:at,linkType:Te,realLocatorHash:dt});break}}let le=Zs.progressViaCounter(ee.length),fe=a.reportProgress(le),de=o.configuration.get("nmMode"),ge={value:de},oe=o.configuration.get("winLinkType");try{let Be=ge.value==="hardlinks-global"?`${hq(o.configuration)}/v1`:null;if(Be&&!await ae.existsPromise(Be)){await ae.mkdirpPromise(Be);for(let g=0;g<256;g++)await ae.mkdirPromise(J.join(Be,g.toString(16).padStart(2,"0")))}for(let g of ee)(g.linkType==="SOFT"||!V.has(g.srcDir))&&(V.set(g.srcDir,g.dstDir),await E({...g,globalHardlinksStore:Be,nmMode:ge,windowsLinkType:oe,packageChecksum:u.get(g.realLocatorHash)||null}));await Promise.all(b),b.length=0;for(let g of ee){let we=V.get(g.srcDir);g.linkType!=="SOFT"&&g.dstDir!==we&&await R(we,g.dstDir,{nmMode:ge})}await Promise.all(b),await ae.mkdirPromise(A,{recursive:!0});let be=await e1t(t,v,o.cwd,{loadManifest:n});await r1t(h,be,o.cwd,oe),await zIt(o,t,be,ge,{installChangedByUser:I}),de=="hardlinks-global"&&ge.value=="hardlinks-local"&&a.reportWarningOnce(74,"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices")}finally{fe.stop()}}async function r1t(e,t,r,o){for(let a of e.keys()){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!t.has(a)){let n=J.join(a,Di,Ik);await ae.removePromise(n)}}for(let[a,n]of t){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let u=J.join(a,Di,Ik),A=e.get(a)||new Map;await ae.mkdirPromise(u,{recursive:!0});for(let p of A.keys())n.has(p)||(await ae.removePromise(J.join(u,p)),process.platform==="win32"&&await ae.removePromise(J.join(u,bi(`${p}.cmd`))));for(let[p,h]of n){let w=A.get(p),I=J.join(u,p);w!==h&&(process.platform==="win32"?await(0,l1e.default)(Ae.fromPortablePath(h),Ae.fromPortablePath(I),{createPwshFile:!1}):(await ae.removePromise(I),await pq(h,I,o),J.contains(r,await ae.realpathPromise(h))!==null&&await ae.chmodPromise(h,493)))}}}Ye();St();iA();var lv=class extends D0{constructor(){super(...arguments);this.mode="loose"}makeInstaller(r){return new gq(r)}},gq=class extends dm{constructor(){super(...arguments);this.mode="loose"}async transformPnpSettings(r){let o=new di({baseFs:new Vl({maxOpenFiles:80,readOnlyArchives:!0})}),a=JIe(r,this.opts.project.cwd,o),{tree:n,errors:u}=KB(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:I,text:v}of u)this.opts.report.reportError(I,v);return}let A=new Map;r.fallbackPool=A;let p=(I,v)=>{let b=G.parseLocator(v.locator),E=G.stringifyIdent(b);E===I?A.set(I,b.reference):A.set(I,[E,b.reference])},h=J.join(this.opts.project.cwd,gr.nodeModules),w=n.get(h);if(!(typeof w>"u")){if("target"in w)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(let I of w.dirList){let v=J.join(h,I),b=n.get(v);if(typeof b>"u")throw new Error("Assertion failed: Expected the child to have been registered");if("target"in b)p(I,b);else for(let E of b.dirList){let R=J.join(v,E),N=n.get(R);if(typeof N>"u")throw new Error("Assertion failed: Expected the subchild to have been registered");if("target"in N)p(`${I}/${E}`,N);else throw new Error("Assertion failed: Expected the leaf junction to be a package")}}}}};var n1t={hooks:{cleanGlobalArtifacts:async e=>{let t=hq(e);await ae.removePromise(t)}},configuration:{nmHoistingLimits:{description:"Prevent packages to be hoisted past specific levels",type:"STRING",values:["workspaces","dependencies","none"],default:"none"},nmMode:{description:'If set to "hardlinks-local" Yarn will utilize hardlinks to reduce disk space consumption inside "node_modules" directories. With "hardlinks-global" Yarn will use global content addressable storage to reduce "node_modules" size across all the projects using this option.',type:"STRING",values:["classic","hardlinks-local","hardlinks-global"],default:"classic"},nmSelfReferences:{description:"If set to 'false' the workspace will not be allowed to require itself and corresponding self-referencing symlink will not be created",type:"BOOLEAN",default:!0}},linkers:[av,lv]},i1t=n1t;var gG={};Jt(gG,{NpmHttpFetcher:()=>Av,NpmRemapResolver:()=>fv,NpmSemverFetcher:()=>gl,NpmSemverResolver:()=>pv,NpmTagResolver:()=>hv,default:()=>dvt,npmConfigUtils:()=>zn,npmHttpUtils:()=>sn,npmPublishUtils:()=>iC});Ye();var I1e=$e(Zn());var Yn="npm:";var sn={};Jt(sn,{AuthType:()=>w1e,customPackageError:()=>mm,del:()=>p1t,get:()=>ym,getIdentUrl:()=>vk,getPackageMetadata:()=>Kw,handleInvalidAuthenticationError:()=>x0,post:()=>A1t,put:()=>f1t});Ye();Ye();St();var Eq=$e(l2()),E1e=$e(C_()),wq=Ie("url");var zn={};Jt(zn,{RegistryType:()=>d1e,getAuditRegistry:()=>s1t,getAuthConfiguration:()=>yq,getDefaultRegistry:()=>cv,getPublishRegistry:()=>o1t,getRegistryConfiguration:()=>m1e,getScopeConfiguration:()=>mq,getScopeRegistry:()=>Yw,normalizeRegistry:()=>oc});var d1e=(o=>(o.AUDIT_REGISTRY="npmAuditRegistry",o.FETCH_REGISTRY="npmRegistryServer",o.PUBLISH_REGISTRY="npmPublishRegistry",o))(d1e||{});function oc(e){return e.replace(/\/$/,"")}function s1t({configuration:e}){return cv({configuration:e,type:"npmAuditRegistry"})}function o1t(e,{configuration:t}){return e.publishConfig?.registry?oc(e.publishConfig.registry):e.name?Yw(e.name.scope,{configuration:t,type:"npmPublishRegistry"}):cv({configuration:t,type:"npmPublishRegistry"})}function Yw(e,{configuration:t,type:r="npmRegistryServer"}){let o=mq(e,{configuration:t});if(o===null)return cv({configuration:t,type:r});let a=o.get(r);return a===null?cv({configuration:t,type:r}):oc(a)}function cv({configuration:e,type:t="npmRegistryServer"}){let r=e.get(t);return oc(r!==null?r:e.get("npmRegistryServer"))}function m1e(e,{configuration:t}){let r=t.get("npmRegistries"),o=oc(e),a=r.get(o);if(typeof a<"u")return a;let n=r.get(o.replace(/^[a-z]+:/,""));return typeof n<"u"?n:null}function mq(e,{configuration:t}){if(e===null)return null;let o=t.get("npmScopes").get(e);return o||null}function yq(e,{configuration:t,ident:r}){let o=r&&mq(r.scope,{configuration:t});return o?.get("npmAuthIdent")||o?.get("npmAuthToken")?o:m1e(e,{configuration:t})||t}var w1e=(a=>(a[a.NO_AUTH=0]="NO_AUTH",a[a.BEST_EFFORT=1]="BEST_EFFORT",a[a.CONFIGURATION=2]="CONFIGURATION",a[a.ALWAYS_AUTH=3]="ALWAYS_AUTH",a))(w1e||{});async function x0(e,{attemptedAs:t,registry:r,headers:o,configuration:a}){if(Sk(e))throw new zt(41,"Invalid OTP token");if(e.originalError?.name==="HTTPError"&&e.originalError?.response.statusCode===401)throw new zt(41,`Invalid authentication (${typeof t!="string"?`as ${await g1t(r,o,{configuration:a})}`:`attempted as ${t}`})`)}function mm(e,t){let r=e.response?.statusCode;return r?r===404?"Package not found":r>=500&&r<600?`The registry appears to be down (using a ${ye.applyHyperlink(t,"local cache","https://yarnpkg.com/advanced/lexicon#local-cache")} might have protected you against such outages)`:null:null}function vk(e){return e.scope?`/@${e.scope}%2f${e.name}`:`/${e.name}`}var y1e=new Map;async function Kw(e,{project:t,registry:r,headers:o,version:a,...n}){return await _e.getFactoryWithDefault(y1e,e.identHash,async()=>{let{configuration:u}=t;r=uv(u,{ident:e,registry:r});let A=c1t(u,r),p=J.join(A,`${G.slugifyIdent(e)}.json`),h=null;if(!t.lockfileNeedsRefresh)try{if(h=await ae.readJsonPromise(p),typeof a<"u"&&typeof h.metadata.versions[a]<"u")return h.metadata}catch{}return await ym(vk(e),{...n,customErrorMessage:mm,configuration:u,registry:r,ident:e,headers:{...o,["If-None-Match"]:h?.etag,["If-Modified-Since"]:h?.lastModified},wrapNetworkRequest:async w=>async()=>{let I=await w();if(I.statusCode===304){if(h===null)throw new Error("Assertion failed: cachedMetadata should not be null");return{...I,body:h.metadata}}let v=a1t(JSON.parse(I.body.toString()));y1e.set(e.identHash,v);let b={metadata:v,etag:I.headers.etag,lastModified:I.headers["last-modified"]},E=`${p}-${process.pid}.tmp`;return await ae.mkdirPromise(A,{recursive:!0}),await ae.writeJsonPromise(E,b,{compact:!0}),await ae.renamePromise(E,p),{...I,body:v}}})})}var C1e=["name","dist.tarball","bin","scripts","os","cpu","libc","dependencies","dependenciesMeta","optionalDependencies","peerDependencies","peerDependenciesMeta","deprecated"];function a1t(e){return{"dist-tags":e["dist-tags"],versions:Object.fromEntries(Object.entries(e.versions).map(([t,r])=>[t,(0,E1e.default)(r,C1e)]))}}var l1t=wn.makeHash(...C1e).slice(0,6);function c1t(e,t){let r=u1t(e),o=new wq.URL(t),a=bi(o.hostname);return J.join(r,l1t,a)}function u1t(e){return J.join(e.get("globalFolder"),"metadata/npm")}async function ym(e,{configuration:t,headers:r,ident:o,authType:a,registry:n,...u}){n=uv(t,{ident:o,registry:n}),o&&o.scope&&typeof a>"u"&&(a=1);let A=await Dk(n,{authType:a,configuration:t,ident:o});A&&(r={...r,authorization:A});try{return await tn.get(e.charAt(0)==="/"?`${n}${e}`:e,{configuration:t,headers:r,...u})}catch(p){throw await x0(p,{registry:n,configuration:t,headers:r}),p}}async function A1t(e,t,{attemptedAs:r,configuration:o,headers:a,ident:n,authType:u=3,registry:A,otp:p,...h}){A=uv(o,{ident:n,registry:A});let w=await Dk(A,{authType:u,configuration:o,ident:n});w&&(a={...a,authorization:w}),p&&(a={...a,...Ww(p)});try{return await tn.post(A+e,t,{configuration:o,headers:a,...h})}catch(I){if(!Sk(I)||p)throw await x0(I,{attemptedAs:r,registry:A,configuration:o,headers:a}),I;p=await Cq(I,{configuration:o});let v={...a,...Ww(p)};try{return await tn.post(`${A}${e}`,t,{configuration:o,headers:v,...h})}catch(b){throw await x0(b,{attemptedAs:r,registry:A,configuration:o,headers:a}),b}}}async function f1t(e,t,{attemptedAs:r,configuration:o,headers:a,ident:n,authType:u=3,registry:A,otp:p,...h}){A=uv(o,{ident:n,registry:A});let w=await Dk(A,{authType:u,configuration:o,ident:n});w&&(a={...a,authorization:w}),p&&(a={...a,...Ww(p)});try{return await tn.put(A+e,t,{configuration:o,headers:a,...h})}catch(I){if(!Sk(I))throw await x0(I,{attemptedAs:r,registry:A,configuration:o,headers:a}),I;p=await Cq(I,{configuration:o});let v={...a,...Ww(p)};try{return await tn.put(`${A}${e}`,t,{configuration:o,headers:v,...h})}catch(b){throw await x0(b,{attemptedAs:r,registry:A,configuration:o,headers:a}),b}}}async function p1t(e,{attemptedAs:t,configuration:r,headers:o,ident:a,authType:n=3,registry:u,otp:A,...p}){u=uv(r,{ident:a,registry:u});let h=await Dk(u,{authType:n,configuration:r,ident:a});h&&(o={...o,authorization:h}),A&&(o={...o,...Ww(A)});try{return await tn.del(u+e,{configuration:r,headers:o,...p})}catch(w){if(!Sk(w)||A)throw await x0(w,{attemptedAs:t,registry:u,configuration:r,headers:o}),w;A=await Cq(w,{configuration:r});let I={...o,...Ww(A)};try{return await tn.del(`${u}${e}`,{configuration:r,headers:I,...p})}catch(v){throw await x0(v,{attemptedAs:t,registry:u,configuration:r,headers:o}),v}}}function uv(e,{ident:t,registry:r}){if(typeof r>"u"&&t)return Yw(t.scope,{configuration:e});if(typeof r!="string")throw new Error("Assertion failed: The registry should be a string");return oc(r)}async function Dk(e,{authType:t=2,configuration:r,ident:o}){let a=yq(e,{configuration:r,ident:o}),n=h1t(a,t);if(!n)return null;let u=await r.reduceHook(A=>A.getNpmAuthenticationHeader,void 0,e,{configuration:r,ident:o});if(u)return u;if(a.get("npmAuthToken"))return`Bearer ${a.get("npmAuthToken")}`;if(a.get("npmAuthIdent")){let A=a.get("npmAuthIdent");return A.includes(":")?`Basic ${Buffer.from(A).toString("base64")}`:`Basic ${A}`}if(n&&t!==1)throw new zt(33,"No authentication configured for request");return null}function h1t(e,t){switch(t){case 2:return e.get("npmAlwaysAuth");case 1:case 3:return!0;case 0:return!1;default:throw new Error("Unreachable")}}async function g1t(e,t,{configuration:r}){if(typeof t>"u"||typeof t.authorization>"u")return"an anonymous user";try{return(await tn.get(new wq.URL(`${e}/-/whoami`).href,{configuration:r,headers:t,jsonResponse:!0})).username??"an unknown user"}catch{return"an unknown user"}}async function Cq(e,{configuration:t}){let r=e.originalError?.response.headers["npm-notice"];if(r&&(await Nt.start({configuration:t,stdout:process.stdout,includeFooter:!1},async a=>{if(a.reportInfo(0,r.replace(/(https?:\/\/\S+)/g,ye.pretty(t,"$1",ye.Type.URL))),!process.env.YARN_IS_TEST_ENV){let n=r.match(/open (https?:\/\/\S+)/i);if(n&&cs.openUrl){let{openNow:u}=await(0,Eq.prompt)({type:"confirm",name:"openNow",message:"Do you want to try to open this url now?",required:!0,initial:!0,onCancel:()=>process.exit(130)});u&&(await cs.openUrl(n[1])||(a.reportSeparator(),a.reportWarning(0,"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.")))}}}),process.stdout.write(`
675`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,Eq.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
676`),o}function Sk(e){if(e.originalError?.name!=="HTTPError")return!1;try{return(e.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function Ww(e){return{["npm-otp"]:e}}var Av=class{supports(t,r){if(!t.reference.startsWith(Yn))return!1;let{selector:o,params:a}=G.parseRange(t.reference);return!(!I1e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),checksum:u}}async fetchFromNetwork(t,r){let{params:o}=G.parseRange(t.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await ym(o.__archiveUrl,{customErrorMessage:mm,configuration:r.project.configuration,ident:t});return await zi.convertToZip(a,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:G.getIdentVendorPath(t),stripComponents:1})}};Ye();var fv=class{supportsDescriptor(t,r){return!(!t.range.startsWith(Yn)||!G.tryParseDescriptor(t.range.slice(Yn.length),!0))}supportsLocator(t,r){return!1}shouldPersistResolution(t,r){throw new Error("Unreachable")}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){let o=r.project.configuration.normalizeDependency(G.parseDescriptor(t.range.slice(Yn.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(t,r,o){let a=o.project.configuration.normalizeDependency(G.parseDescriptor(t.range.slice(Yn.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(t,r,o,a){let n=a.project.configuration.normalizeDependency(G.parseDescriptor(t.range.slice(Yn.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(t,r){throw new Error("Unreachable")}};Ye();Ye();var B1e=$e(Zn()),v1e=Ie("url");var gl=class{supports(t,r){if(!t.reference.startsWith(Yn))return!1;let o=new v1e.URL(t.reference);return!(!B1e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),checksum:u}}async fetchFromNetwork(t,r){let o;try{o=await ym(gl.getLocatorUrl(t),{customErrorMessage:mm,configuration:r.project.configuration,ident:t})}catch{o=await ym(gl.getLocatorUrl(t).replace(/%2f/g,"/"),{customErrorMessage:mm,configuration:r.project.configuration,ident:t})}return await zi.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:G.getIdentVendorPath(t),stripComponents:1})}static isConventionalTarballUrl(t,r,{configuration:o}){let a=Yw(t.scope,{configuration:o}),n=gl.getLocatorUrl(t);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(t){let r=Qr.clean(t.reference.slice(Yn.length));if(r===null)throw new zt(10,"The npm semver resolver got selected, but the version isn't semver");return`${vk(t)}/-/${t.name}-${r}.tgz`}};Ye();Ye();Ye();var Iq=$e(Zn());var Pk=G.makeIdent(null,"node-gyp"),d1t=/\b(node-gyp|prebuild-install)\b/,pv=class{supportsDescriptor(t,r){return t.range.startsWith(Yn)?!!Qr.validRange(t.range.slice(Yn.length)):!1}supportsLocator(t,r){if(!t.reference.startsWith(Yn))return!1;let{selector:o}=G.parseRange(t.reference);return!!Iq.default.valid(o)}shouldPersistResolution(t,r){return!0}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){let a=Qr.validRange(t.range.slice(Yn.length));if(a===null)throw new Error(`Expected a valid range, got ${t.range.slice(Yn.length)}`);let n=await Kw(t,{project:o.project,version:Iq.default.valid(a.raw)?a.raw:void 0}),u=_e.mapAndFilter(Object.keys(n.versions),h=>{try{let w=new Qr.SemVer(h);if(a.test(w))return w}catch{}return _e.mapAndFilter.skip}),A=u.filter(h=>!n.versions[h.raw].deprecated),p=A.length>0?A:u;return p.sort((h,w)=>-h.compare(w)),p.map(h=>{let w=G.makeLocator(t,`${Yn}${h.raw}`),I=n.versions[h.raw].dist.tarball;return gl.isConventionalTarballUrl(w,I,{configuration:o.project.configuration})?w:G.bindLocator(w,{__archiveUrl:I})})}async getSatisfying(t,r,o,a){let n=Qr.validRange(t.range.slice(Yn.length));if(n===null)throw new Error(`Expected a valid range, got ${t.range.slice(Yn.length)}`);return{locators:_e.mapAndFilter(o,p=>{if(p.identHash!==t.identHash)return _e.mapAndFilter.skip;let h=G.tryParseRange(p.reference,{requireProtocol:Yn});if(!h)return _e.mapAndFilter.skip;let w=new Qr.SemVer(h.selector);return n.test(w)?{locator:p,version:w}:_e.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(t,r){let{selector:o}=G.parseRange(t.reference),a=Qr.clean(o);if(a===null)throw new zt(10,"The npm semver resolver got selected, but the version isn't semver");let n=await Kw(t,{project:r.project,version:a});if(!Object.hasOwn(n,"versions"))throw new zt(15,'Registry returned invalid data for - missing "versions" field');if(!Object.hasOwn(n.versions,a))throw new zt(16,`Registry failed to return reference "${a}"`);let u=new Ot;if(u.load(n.versions[a]),!u.dependencies.has(Pk.identHash)&&!u.peerDependencies.has(Pk.identHash)){for(let A of u.scripts.values())if(A.match(d1t)){u.dependencies.set(Pk.identHash,G.makeDescriptor(Pk,"latest"));break}}return{...t,version:a,languageName:"node",linkType:"HARD",conditions:u.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(u.dependencies),peerDependencies:u.peerDependencies,dependenciesMeta:u.dependenciesMeta,peerDependenciesMeta:u.peerDependenciesMeta,bin:u.bin}}};Ye();Ye();var D1e=$e(Zn());var hv=class{supportsDescriptor(t,r){return!(!t.range.startsWith(Yn)||!kE.test(t.range.slice(Yn.length)))}supportsLocator(t,r){return!1}shouldPersistResolution(t,r){throw new Error("Unreachable")}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){let a=t.range.slice(Yn.length),n=await Kw(t,{project:o.project});if(!Object.hasOwn(n,"dist-tags"))throw new zt(15,'Registry returned invalid data - missing "dist-tags" field');let u=n["dist-tags"];if(!Object.hasOwn(u,a))throw new zt(16,`Registry failed to return tag "${a}"`);let A=u[a],p=G.makeLocator(t,`${Yn}${A}`),h=n.versions[A].dist.tarball;return gl.isConventionalTarballUrl(p,h,{configuration:o.project.configuration})?[p]:[G.bindLocator(p,{__archiveUrl:h})]}async getSatisfying(t,r,o,a){let n=[];for(let u of o){if(u.identHash!==t.identHash)continue;let A=G.tryParseRange(u.reference,{requireProtocol:Yn});if(!(!A||!D1e.default.valid(A.selector))){if(A.params?.__archiveUrl){let p=G.makeRange({protocol:Yn,selector:A.selector,source:null,params:null}),[h]=await a.resolver.getCandidates(G.makeDescriptor(t,p),r,a);if(u.reference!==h.reference)continue}n.push(u)}}return{locators:n,sorted:!1}}async resolve(t,r){throw new Error("Unreachable")}};var iC={};Jt(iC,{getGitHead:()=>hvt,getPublishAccess:()=>gBe,getReadmeContent:()=>dBe,makePublishBody:()=>pvt});Ye();Ye();St();var uG={};Jt(uG,{PackCommand:()=>O0,default:()=>VBt,packUtils:()=>CA});Ye();Ye();Ye();St();qt();var CA={};Jt(CA,{genPackList:()=>zk,genPackStream:()=>cG,genPackageManifest:()=>rBe,hasPackScripts:()=>aG,prepareForPack:()=>lG});Ye();St();var oG=$e(Zo()),eBe=$e(z2e()),tBe=Ie("zlib"),MBt=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],UBt=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function aG(e){return!!(cn.hasWorkspaceScript(e,"prepack")||cn.hasWorkspaceScript(e,"postpack"))}async function lG(e,{report:t},r){await cn.maybeExecuteWorkspaceLifecycleScript(e,"prepack",{report:t});try{let o=J.join(e.cwd,Ot.fileName);await ae.existsPromise(o)&&await e.manifest.loadFile(o,{baseFs:ae}),await r()}finally{await cn.maybeExecuteWorkspaceLifecycleScript(e,"postpack",{report:t})}}async function cG(e,t){typeof t>"u"&&(t=await zk(e));let r=new Set;for(let n of e.manifest.publishConfig?.executableFiles??new Set)r.add(J.normalize(n));for(let n of e.manifest.bin.values())r.add(J.normalize(n));let o=eBe.default.pack();process.nextTick(async()=>{for(let n of t){let u=J.normalize(n),A=J.resolve(e.cwd,u),p=J.join("package",u),h=await ae.lstatPromise(A),w={name:p,mtime:new Date(Bi.SAFE_TIME*1e3)},I=r.has(u)?493:420,v,b,E=new Promise((N,U)=>{v=N,b=U}),R=N=>{N?b(N):v()};if(h.isFile()){let N;u==="package.json"?N=Buffer.from(JSON.stringify(await rBe(e),null,2)):N=await ae.readFilePromise(A),o.entry({...w,mode:I,type:"file"},N,R)}else h.isSymbolicLink()?o.entry({...w,mode:I,type:"symlink",linkname:await ae.readlinkPromise(A)},R):R(new Error(`Unsupported file type ${h.mode} for ${Ae.fromPortablePath(u)}`));await E}o.finalize()});let a=(0,tBe.createGzip)();return o.pipe(a),a}async function rBe(e){let t=JSON.parse(JSON.stringify(e.manifest.raw));return await e.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,e,t),t}async function zk(e){let t=e.project,r=t.configuration,o={accept:[],reject:[]};for(let I of UBt)o.reject.push(I);for(let I of MBt)o.accept.push(I);o.reject.push(r.get("rcFilename"));let a=I=>{if(I===null||!I.startsWith(`${e.cwd}/`))return;let v=J.relative(e.cwd,I),b=J.resolve(Bt.root,v);o.reject.push(b)};a(J.resolve(t.cwd,gr.lockfile)),a(r.get("cacheFolder")),a(r.get("globalFolder")),a(r.get("installStatePath")),a(r.get("virtualFolder")),a(r.get("yarnPath")),await r.triggerHook(I=>I.populateYarnPaths,t,I=>{a(I)});for(let I of t.workspaces){let v=J.relative(e.cwd,I.cwd);v!==""&&!v.match(/^(\.\.)?\//)&&o.reject.push(`/${v}`)}let n={accept:[],reject:[]},u=e.manifest.publishConfig?.main??e.manifest.main,A=e.manifest.publishConfig?.module??e.manifest.module,p=e.manifest.publishConfig?.browser??e.manifest.browser,h=e.manifest.publishConfig?.bin??e.manifest.bin;u!=null&&n.accept.push(J.resolve(Bt.root,u)),A!=null&&n.accept.push(J.resolve(Bt.root,A)),typeof p=="string"&&n.accept.push(J.resolve(Bt.root,p));for(let I of h.values())n.accept.push(J.resolve(Bt.root,I));if(p instanceof Map)for(let[I,v]of p.entries())n.accept.push(J.resolve(Bt.root,I)),typeof v=="string"&&n.accept.push(J.resolve(Bt.root,v));let w=e.manifest.files!==null;if(w){n.reject.push("/*");for(let I of e.manifest.files)nBe(n.accept,I,{cwd:Bt.root})}return await _Bt(e.cwd,{hasExplicitFileList:w,globalList:o,ignoreList:n})}async function _Bt(e,{hasExplicitFileList:t,globalList:r,ignoreList:o}){let a=[],n=new ju(e),u=[[Bt.root,[o]]];for(;u.length>0;){let[A,p]=u.pop(),h=await n.lstatPromise(A);if(!Z2e(A,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let w=await n.readdirPromise(A),I=!1,v=!1;if(!t||A!==Bt.root)for(let R of w)I=I||R===".gitignore",v=v||R===".npmignore";let b=v?await X2e(n,A,".npmignore"):I?await X2e(n,A,".gitignore"):null,E=b!==null?[b].concat(p):p;Z2e(A,{globalList:r,ignoreLists:p})&&(E=[...p,{accept:[],reject:["**/*"]}]);for(let R of w)u.push([J.resolve(A,R),E])}else(h.isFile()||h.isSymbolicLink())&&a.push(J.relative(Bt.root,A))}return a.sort()}async function X2e(e,t,r){let o={accept:[],reject:[]},a=await e.readFilePromise(J.join(t,r),"utf8");for(let n of a.split(/\n/g))nBe(o.reject,n,{cwd:t});return o}function HBt(e,{cwd:t}){let r=e[0]==="!";return r&&(e=e.slice(1)),e.match(/\.{0,1}\//)&&(e=J.resolve(t,e)),r&&(e=`!${e}`),e}function nBe(e,t,{cwd:r}){let o=t.trim();o===""||o[0]==="#"||e.push(HBt(o,{cwd:r}))}function Z2e(e,{globalList:t,ignoreLists:r}){let o=Vk(e,t.accept);if(o!==0)return o===2;let a=Vk(e,t.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let u=Vk(e,n.accept);if(u!==0)return u===2;let A=Vk(e,n.reject);if(A!==0)return A===1}return!1}function Vk(e,t){let r=t,o=[];for(let a=0;a<t.length;++a)t[a][0]!=="!"?r!==t&&r.push(t[a]):(r===t&&(r=t.slice(0,a)),o.push(t[a].slice(1)));return $2e(e,o)?2:$2e(e,r)?1:0}function $2e(e,t){let r=t,o=[];for(let a=0;a<t.length;++a)t[a].includes("/")?r!==t&&r.push(t[a]):(r===t&&(r=t.slice(0,a)),o.push(t[a]));return!!(oG.default.isMatch(e,r,{dot:!0,nocase:!0})||oG.default.isMatch(e,o,{dot:!0,basename:!0,nocase:!0}))}var O0=class extends ut{constructor(){super(...arguments);this.installIfNeeded=he.Boolean("--install-if-needed",!1,{description:"Run a preliminary `yarn install` if the package contains build scripts"});this.dryRun=he.Boolean("-n,--dry-run",!1,{description:"Print the file paths without actually generating the package archive"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.out=he.String("-o,--out",{description:"Create the archive at the specified path"});this.filename=he.String("--filename",{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);await aG(a)&&(this.installIfNeeded?await o.install({cache:await Nr.find(r),report:new ki}):await o.restoreInstallState());let n=this.out??this.filename,u=typeof n<"u"?J.resolve(this.context.cwd,jBt(n,{workspace:a})):J.resolve(a.cwd,"package.tgz");return(await Nt.start({configuration:r,stdout:this.context.stdout,json:this.json},async p=>{await lG(a,{report:p},async()=>{p.reportJson({base:Ae.fromPortablePath(a.cwd)});let h=await zk(a);for(let w of h)p.reportInfo(null,Ae.fromPortablePath(w)),p.reportJson({location:Ae.fromPortablePath(w)});if(!this.dryRun){let w=await cG(a,h),I=ae.createWriteStream(u);w.pipe(I),await new Promise(v=>{I.on("finish",v)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${ye.pretty(r,u,ye.Type.PATH)}`),p.reportJson({output:Ae.fromPortablePath(u)}))})).exitCode()}};O0.paths=[["pack"]],O0.usage=nt.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]});function jBt(e,{workspace:t}){let r=e.replace("%s",qBt(t)).replace("%v",GBt(t));return Ae.toPortablePath(r)}function qBt(e){return e.manifest.name!==null?G.slugifyIdent(e.manifest.name):"package"}function GBt(e){return e.manifest.version!==null?e.manifest.version:"unknown"}var YBt=["dependencies","devDependencies","peerDependencies"],WBt="workspace:",KBt=(e,t)=>{t.publishConfig&&(t.publishConfig.type&&(t.type=t.publishConfig.type),t.publishConfig.main&&(t.main=t.publishConfig.main),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.module&&(t.module=t.publishConfig.module),t.publishConfig.exports&&(t.exports=t.publishConfig.exports),t.publishConfig.imports&&(t.imports=t.publishConfig.imports),t.publishConfig.bin&&(t.bin=t.publishConfig.bin));let r=e.project;for(let o of YBt)for(let a of e.manifest.getForScope(o).values()){let n=r.tryWorkspaceByDescriptor(a),u=G.parseRange(a.range);if(u.protocol===WBt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new zt(21,`${G.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let A;G.areDescriptorsEqual(a,n.anchoredDescriptor)||u.selector==="*"?A=n.manifest.version??"0.0.0":u.selector==="~"||u.selector==="^"?A=`${u.selector}${n.manifest.version??"0.0.0"}`:A=u.selector;let p=o==="dependencies"?G.makeDescriptor(a,"unknown"):null,h=p!==null&&e.manifest.ensureDependencyMeta(p).optional?"optionalDependencies":o;t[h][G.stringifyIdent(a)]=A}}},JBt={hooks:{beforeWorkspacePacking:KBt},commands:[O0]},VBt=JBt;var fBe=Ie("crypto"),pBe=$e(ABe()),hBe=Ie("url");async function pvt(e,t,{access:r,tag:o,registry:a,gitHead:n}){let u=e.manifest.name,A=e.manifest.version,p=G.stringifyIdent(u),h=(0,fBe.createHash)("sha1").update(t).digest("hex"),w=pBe.default.fromData(t).toString(),I=r??gBe(e,u),v=await dBe(e),b=await CA.genPackageManifest(e),E=`${p}-${A}.tgz`,R=new hBe.URL(`${oc(a)}/${p}/-/${E}`);return{_id:p,_attachments:{[E]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}},name:p,access:I,["dist-tags"]:{[o]:A},versions:{[A]:{...b,_id:`${p}@${A}`,name:p,version:A,gitHead:n,dist:{shasum:h,integrity:w,tarball:R.toString()}}},readme:v}}async function hvt(e){try{let{stdout:t}=await Mr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:e});return t.trim()===""?void 0:t.trim()}catch{return}}function gBe(e,t){let r=e.project.configuration;return e.manifest.publishConfig&&typeof e.manifest.publishConfig.access=="string"?e.manifest.publishConfig.access:r.get("npmPublishAccess")!==null?r.get("npmPublishAccess"):t.scope?"restricted":"public"}async function dBe(e){let t=Ae.toPortablePath(`${e.cwd}/README.md`),r=e.manifest.name,a=`# ${G.stringifyIdent(r)}
677`;try{a=await ae.readFilePromise(t,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var hG={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},mBe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},gvt={configuration:{...hG,...mBe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...hG,...mBe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:oc,valueDefinition:{description:"",type:"SHAPE",properties:{...hG}}}},fetchers:[Av,gl],resolvers:[fv,pv,hv]},dvt=gvt;var vG={};Jt(vG,{NpmAuditCommand:()=>U0,NpmInfoCommand:()=>_0,NpmLoginCommand:()=>H0,NpmLogoutCommand:()=>j0,NpmPublishCommand:()=>q0,NpmTagAddCommand:()=>Y0,NpmTagListCommand:()=>G0,NpmTagRemoveCommand:()=>W0,NpmWhoamiCommand:()=>K0,default:()=>Ivt,npmAuditTypes:()=>Fv,npmAuditUtils:()=>Xk});Ye();Ye();qt();var wG=$e(Zo());Za();var Fv={};Jt(Fv,{Environment:()=>Qv,Severity:()=>kv});var Qv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Qv||{}),kv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(kv||{});var Xk={};Jt(Xk,{allSeverities:()=>sC,getPackages:()=>EG,getReportTree:()=>mG,getSeverityInclusions:()=>dG,getTopLevelDependencies:()=>yG});Ye();var yBe=$e(Zn());var sC=["info","low","moderate","high","critical"];function dG(e){if(typeof e>"u")return new Set(sC);let t=sC.indexOf(e),r=sC.slice(t);return new Set(r)}function mG(e){let t={},r={children:t};for(let[o,a]of _e.sortMap(Object.entries(e),n=>n[0]))for(let n of _e.sortMap(a,u=>`${u.id}`))t[`${o}/${n.id}`]={value:ye.tuple(ye.Type.IDENT,G.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:ye.tuple(ye.Type.ID,n.id)},Issue:{label:"Issue",value:ye.tuple(ye.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:ye.tuple(ye.Type.URL,n.url)},Severity:{label:"Severity",value:ye.tuple(ye.Type.NO_HINT,n.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:ye.tuple(ye.Type.RANGE,n.vulnerable_versions)},["Tree Versions"]:{label:"Tree Versions",children:[...n.versions].sort(yBe.default.compare).map(u=>({value:ye.tuple(ye.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:_e.sortMap(n.dependents,u=>G.stringifyLocator(u)).map(u=>({value:ye.tuple(ye.Type.LOCATOR,u)}))}}};return r}function yG(e,t,{all:r,environment:o}){let a=[],n=r?e.workspaces:[t],u=["all","production"].includes(o),A=["all","development"].includes(o);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!A:!u)||a.push({workspace:p,dependency:h});return a}function EG(e,t,{recursive:r}){let o=new Map,a=new Set,n=[],u=(A,p)=>{let h=e.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let w=e.storedPackages.get(h);if(typeof w>"u")throw new Error("Assertion failed: The package should have been registered");if(G.ensureDevirtualizedLocator(w).reference.startsWith("npm:")&&w.version!==null){let v=G.stringifyIdent(w),b=_e.getMapWithDefault(o,v);_e.getArrayWithDefault(b,w.version).push(A)}if(r)for(let v of w.dependencies.values())n.push([w,v])};for(let{workspace:A,dependency:p}of t)n.push([A.anchoredLocator,p]);for(;n.length>0;){let[A,p]=n.shift();u(A,p)}return o}var U0=class extends ut{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=he.String("--environment","all",{description:"Which environments to cover",validator:Vs(Qv)});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.noDeprecations=he.Boolean("--no-deprecations",!1,{description:"Don't warn about deprecated packages"});this.severity=he.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:Vs(kv)});this.excludes=he.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=he.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=yG(o,a,{all:this.all,environment:this.environment}),u=EG(o,n,{recursive:this.recursive}),A=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[N,U]of u)A.some(V=>wG.default.isMatch(N,V))||(p[N]=[...U.keys()]);let h=zn.getAuditRegistry({configuration:r}),w,I=await fA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=sn.post("/-/npm/v1/security/advisories/bulk",p,{authType:sn.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=await Promise.all(this.noDeprecations?[]:Array.from(u,async([ee,le])=>{let fe=await sn.getPackageMetadata(G.parseIdent(ee),{project:o});return _e.mapAndFilter(le.keys(),de=>{let{deprecated:ge}=fe.versions[de];return ge?[ee,de,ge]:_e.mapAndFilter.skip})})),V=await N;for(let[ee,le,fe]of U.flat(1))Object.hasOwn(V,ee)&&V[ee].some(de=>Qr.satisfiesWithPrereleases(le,de.vulnerable_versions))||(V[ee]??=[],V[ee].push({id:`${ee} (deprecation)`,title:fe.trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:le}));w=V});if(I.hasErrors())return I.exitCode();let v=dG(this.severity),b=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),E=Object.create(null);for(let[N,U]of Object.entries(w)){let V=U.filter(ee=>!wG.default.isMatch(`${ee.id}`,b)&&v.has(ee.severity));V.length>0&&(E[N]=V.map(ee=>{let le=u.get(N);if(typeof le>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let fe=[...le.keys()].filter(ge=>Qr.satisfiesWithPrereleases(ge,ee.vulnerable_versions)),de=new Map;for(let ge of fe)for(let oe of le.get(ge))de.set(oe.locatorHash,oe);return{...ee,versions:fe,dependents:[...de.values()]}}))}let R=Object.keys(E).length>0;return!this.json&&R?(ra.emitTree(mG(E),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Nt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportJson(w),R||N.reportInfo(1,"No audit suggestions")}),R?1:0)}};U0.paths=[["npm","audit"]],U0.usage=nt.Usage({description:"perform a vulnerability audit against the installed packages",details:`
678 This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
679
680 For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
681
682 Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${sC.map(r=>`\`${r}\``).join(", ")}.
683
684 If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
685
686 If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option.
687
688 If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
689
690 To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them.
691 `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]});Ye();Ye();St();qt();var CG=$e(Zn()),IG=Ie("util"),_0=class extends ut{constructor(){super(...arguments);this.fields=he.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],u=!1,A=await Nt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let w;if(h==="."){let le=o.topLevelWorkspace;if(!le.manifest.name)throw new it(`Missing ${ye.pretty(r,"name",ye.Type.CODE)} field in ${Ae.fromPortablePath(J.join(le.cwd,gr.manifest))}`);w=G.makeDescriptor(le.manifest.name,"unknown")}else w=G.parseDescriptor(h);let I=sn.getIdentUrl(w),v=BG(await sn.get(I,{configuration:r,ident:w,jsonResponse:!0,customErrorMessage:sn.customPackageError})),b=Object.keys(v.versions).sort(CG.default.compareLoose),R=v["dist-tags"].latest||b[b.length-1],N=Qr.validRange(w.range);if(N){let le=CG.default.maxSatisfying(b,N);le!==null?R=le:(p.reportWarning(0,`Unmet range ${G.prettyRange(r,w.range)}; falling back to the latest version`),u=!0)}else Object.hasOwn(v["dist-tags"],w.range)?R=v["dist-tags"][w.range]:w.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${G.prettyRange(r,w.range)}; falling back to the latest version`),u=!0);let U=v.versions[R],V={...v,...U,version:R,versions:b},ee;if(a!==null){ee={};for(let le of a){let fe=V[le];if(typeof fe<"u")ee[le]=fe;else{p.reportWarning(1,`The ${ye.pretty(r,le,ye.Type.CODE)} field doesn't exist inside ${G.prettyIdent(r,w)}'s information`),u=!0;continue}}}else this.json||(delete V.dist,delete V.readme,delete V.users),ee=V;p.reportJson(ee),this.json||n.push(ee)}});IG.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(`
692`),this.context.stdout.write(`${(0,IG.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
693`);return A.exitCode()}};_0.paths=[["npm","info"]],_0.usage=nt.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});function BG(e){if(Array.isArray(e)){let t=[];for(let r of e)r=BG(r),r&&t.push(r);return t}else if(typeof e=="object"&&e!==null){let t={};for(let r of Object.keys(e)){if(r.startsWith("_"))continue;let o=BG(e[r]);o&&(t[r]=o)}return t}else return e||null}Ye();Ye();qt();var EBe=$e(l2()),H0=class extends ut{constructor(){super(...arguments);this.scope=he.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=he.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=he.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Zk({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Nt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await yvt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=`/-/user/org.couchdb.user:${encodeURIComponent(u.name)}`,p=await sn.put(A,u,{attemptedAs:u.name,configuration:r,registry:o,jsonResponse:!0,authType:sn.AuthType.NO_AUTH});return await mvt(o,p.token,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};H0.paths=[["npm","login"]],H0.usage=nt.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});async function Zk({scope:e,publish:t,configuration:r,cwd:o}){return e&&t?zn.getScopeRegistry(e,{configuration:r,type:zn.RegistryType.PUBLISH_REGISTRY}):e?zn.getScopeRegistry(e,{configuration:r}):t?zn.getPublishRegistry((await uw(r,o)).manifest,{configuration:r}):zn.getDefaultRegistry({configuration:r})}async function mvt(e,t,{alwaysAuth:r,scope:o}){let a=u=>A=>{let p=_e.isIndexableObject(A)?A:{},h=p[u],w=_e.isIndexableObject(h)?h:{};return{...p,[u]:{...w,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:t}}},n=o?{npmScopes:a(o)}:{npmRegistries:a(e)};return await Ke.updateHomeConfiguration(n)}async function yvt({configuration:e,registry:t,report:r,stdin:o,stdout:a}){r.reportInfo(0,`Logging in to ${ye.pretty(e,t,ye.Type.URL)}`);let n=!1;if(t.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),e.env.YARN_IS_TEST_ENV)return{name:e.env.YARN_INJECT_NPM_USER||"",password:e.env.YARN_INJECT_NPM_PASSWORD||""};let{username:u,password:A}=await(0,EBe.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a}]);return r.reportSeparator(),{name:u,password:A}}Ye();Ye();qt();var oC=new Set(["npmAuthIdent","npmAuthToken"]),j0=class extends ut{constructor(){super(...arguments);this.scope=he.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=he.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=he.Boolean("-A,--all",!1,{description:"Logout of all registries"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=async()=>{let n=await Zk({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),u=await Ke.find(this.context.cwd,this.context.plugins),A=G.makeIdent(this.scope??null,"pkg");return!zn.getAuthConfiguration(n,{configuration:u,ident:A}).get("npmAuthToken")};return(await Nt.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await wvt(),n.reportInfo(0,"Successfully logged out from everything")),this.scope){await wBe("npmScopes",this.scope),await o()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,"Scope authentication settings removed, but some other ones settings still apply to it");return}let u=await Zk({configuration:r,cwd:this.context.cwd,publish:this.publish});await wBe("npmRegistries",u),await o()?n.reportInfo(0,`Successfully logged out from ${u}`):n.reportWarning(0,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}};j0.paths=[["npm","logout"]],j0.usage=nt.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]});function Evt(e,t){let r=e[t];if(!_e.isIndexableObject(r))return!1;let o=new Set(Object.keys(r));if([...oC].every(n=>!o.has(n)))return!1;for(let n of oC)o.delete(n);if(o.size===0)return e[t]=void 0,!0;let a={...r};for(let n of oC)delete a[n];return e[t]=a,!0}async function wvt(){let e=t=>{let r=!1,o=_e.isIndexableObject(t)?{...t}:{};o.npmAuthToken&&(delete o.npmAuthToken,r=!0);for(let a of Object.keys(o))Evt(o,a)&&(r=!0);if(Object.keys(o).length!==0)return r?o:t};return await Ke.updateHomeConfiguration({npmRegistries:e,npmScopes:e})}async function wBe(e,t){return await Ke.updateHomeConfiguration({[e]:r=>{let o=_e.isIndexableObject(r)?r:{};if(!Object.hasOwn(o,t))return r;let a=o[t],n=_e.isIndexableObject(a)?a:{},u=new Set(Object.keys(n));if([...oC].every(p=>!u.has(p)))return r;for(let p of oC)u.delete(p);if(u.size===0)return Object.keys(o).length===1?void 0:{...o,[t]:void 0};let A={};for(let p of oC)A[p]=void 0;return{...o,[t]:{...n,...A}}}})}Ye();qt();var q0=class extends ut{constructor(){super(...arguments);this.access=he.String("--access",{description:"The access for the published package (public or restricted)"});this.tag=he.String("--tag","latest",{description:"The tag on the registry that the package should be attached to"});this.tolerateRepublish=he.Boolean("--tolerate-republish",!1,{description:"Warn and exit when republishing an already existing version of a package"});this.otp=he.String("--otp",{description:"The OTP token to use with the command"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);if(a.manifest.private)throw new it("Private workspaces cannot be published");if(a.manifest.name===null||a.manifest.version===null)throw new it("Workspaces must have valid names and versions to be published on an external registry");await o.restoreInstallState();let n=a.manifest.name,u=a.manifest.version,A=zn.getPublishRegistry(a.manifest,{configuration:r});return(await Nt.start({configuration:r,stdout:this.context.stdout},async h=>{if(this.tolerateRepublish)try{let w=await sn.get(sn.getIdentUrl(n),{configuration:r,registry:A,ident:n,jsonResponse:!0});if(!Object.hasOwn(w,"versions"))throw new zt(15,'Registry returned invalid data for - missing "versions" field');if(Object.hasOwn(w.versions,u)){h.reportWarning(0,`Registry already knows about version ${u}; skipping.`);return}}catch(w){if(w.originalError?.response?.statusCode!==404)throw w}await cn.maybeExecuteWorkspaceLifecycleScript(a,"prepublish",{report:h}),await CA.prepareForPack(a,{report:h},async()=>{let w=await CA.genPackList(a);for(let R of w)h.reportInfo(null,R);let I=await CA.genPackStream(a,w),v=await _e.bufferStream(I),b=await iC.getGitHead(a.cwd),E=await iC.makePublishBody(a,v,{access:this.access,tag:this.tag,registry:A,gitHead:b});await sn.put(sn.getIdentUrl(n),E,{configuration:r,registry:A,ident:n,otp:this.otp,jsonResponse:!0})}),h.reportInfo(0,"Package archive published")})).exitCode()}};q0.paths=[["npm","publish"]],q0.usage=nt.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]});Ye();qt();var CBe=$e(Zn());Ye();St();qt();var G0=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=he.String({required:!1})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=G.parseIdent(this.package);else{if(!a)throw new tr(o.cwd,this.context.cwd);if(!a.manifest.name)throw new it(`Missing 'name' field in ${Ae.fromPortablePath(J.join(a.cwd,gr.manifest))}`);n=a.manifest.name}let u=await Rv(n,r),p={children:_e.sortMap(Object.entries(u),([h])=>h).map(([h,w])=>({value:ye.tuple(ye.Type.RESOLUTION,{descriptor:G.makeDescriptor(n,h),locator:G.makeLocator(n,w)})}))};return ra.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};G0.paths=[["npm","tag","list"]],G0.usage=nt.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:`
694 This command will list all tags of a package from the npm registry.
695
696 If the package is not specified, Yarn will default to the current workspace.
697 `,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function Rv(e,t){let r=`/-/package${sn.getIdentUrl(e)}/dist-tags`;return sn.get(r,{configuration:t,ident:e,jsonResponse:!0,customErrorMessage:sn.customPackageError})}var Y0=class extends ut{constructor(){super(...arguments);this.package=he.String();this.tag=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);let n=G.parseDescriptor(this.package,!0),u=n.range;if(!CBe.default.valid(u))throw new it(`The range ${ye.pretty(r,n.range,ye.Type.RANGE)} must be a valid semver version`);let A=zn.getPublishRegistry(a.manifest,{configuration:r}),p=ye.pretty(r,n,ye.Type.IDENT),h=ye.pretty(r,u,ye.Type.RANGE),w=ye.pretty(r,this.tag,ye.Type.CODE);return(await Nt.start({configuration:r,stdout:this.context.stdout},async v=>{let b=await Rv(n,r);Object.hasOwn(b,this.tag)&&b[this.tag]===u&&v.reportWarning(0,`Tag ${w} is already set to version ${h}`);let E=`/-/package${sn.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await sn.put(E,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag ${w} added to version ${h} of package ${p}`)})).exitCode()}};Y0.paths=[["npm","tag","add"]],Y0.usage=nt.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
698 This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
699 `,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]});Ye();qt();var W0=class extends ut{constructor(){super(...arguments);this.package=he.String();this.tag=he.String()}async execute(){if(this.tag==="latest")throw new it("The 'latest' tag cannot be removed.");let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);let n=G.parseIdent(this.package),u=zn.getPublishRegistry(a.manifest,{configuration:r}),A=ye.pretty(r,this.tag,ye.Type.CODE),p=ye.pretty(r,n,ye.Type.IDENT),h=await Rv(n,r);if(!Object.hasOwn(h,this.tag))throw new it(`${A} is not a tag of package ${p}`);return(await Nt.start({configuration:r,stdout:this.context.stdout},async I=>{let v=`/-/package${sn.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await sn.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),I.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};W0.paths=[["npm","tag","remove"]],W0.usage=nt.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
700 This command will remove a tag from a package from the npm registry.
701 `,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});Ye();Ye();qt();var K0=class extends ut{constructor(){super(...arguments);this.scope=he.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=he.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=zn.getScopeRegistry(this.scope,{configuration:r,type:zn.RegistryType.PUBLISH_REGISTRY}):this.scope?o=zn.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=zn.getPublishRegistry((await uw(r,this.context.cwd)).manifest,{configuration:r}):o=zn.getDefaultRegistry({configuration:r}),(await Nt.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await sn.get("/-/whoami",{configuration:r,registry:o,authType:sn.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?G.makeIdent(this.scope,""):void 0})}catch(A){if(A.response?.statusCode===401||A.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw A}n.reportInfo(0,u.username)})).exitCode()}};K0.paths=[["npm","whoami"]],K0.usage=nt.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var Cvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[U0,_0,H0,j0,q0,Y0,G0,W0,K0]},Ivt=Cvt;var kG={};Jt(kG,{PatchCommand:()=>z0,PatchCommitCommand:()=>V0,PatchFetcher:()=>Mv,PatchResolver:()=>Uv,default:()=>_vt,patchUtils:()=>Dm});Ye();Ye();St();iA();var Dm={};Jt(Dm,{applyPatchFile:()=>eF,diffFolders:()=>bG,ensureUnpatchedDescriptor:()=>DG,ensureUnpatchedLocator:()=>rF,extractPackageToDisk:()=>xG,extractPatchFlags:()=>xBe,isParentRequired:()=>PG,isPatchDescriptor:()=>tF,isPatchLocator:()=>J0,loadPatchFiles:()=>Ov,makeDescriptor:()=>nF,makeLocator:()=>SG,makePatchHash:()=>QG,parseDescriptor:()=>Nv,parseLocator:()=>Lv,parsePatchFile:()=>Tv,unpatchDescriptor:()=>Ovt,unpatchLocator:()=>Mvt});Ye();St();Ye();St();var Bvt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function aC(e){return J.relative(Bt.root,J.resolve(Bt.root,Ae.toPortablePath(e)))}function vvt(e){let t=e.trim().match(Bvt);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}var Dvt=420,Svt=493;var IBe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),Pvt=e=>({header:vvt(e),parts:[]}),xvt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function bvt(e){let t=[],r=IBe(),o="parsing header",a=null,n=null;function u(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function A(){u(),t.push(r),r=IBe()}for(let p=0;p<e.length;p++){let h=e[p];if(o==="parsing header")if(h.startsWith("@@"))o="parsing hunks",r.hunks=[],p-=1;else if(h.startsWith("diff --git ")){r&&r.diffLineFromPath&&A();let w=h.match(/^diff --git a\/(.*?) b\/(.*?)\s*$/);if(!w)throw new Error(`Bad diff line: ${h}`);r.diffLineFromPath=w[1],r.diffLineToPath=w[2]}else if(h.startsWith("old mode "))r.oldMode=h.slice(9).trim();else if(h.startsWith("new mode "))r.newMode=h.slice(9).trim();else if(h.startsWith("deleted file mode "))r.deletedFileMode=h.slice(18).trim();else if(h.startsWith("new file mode "))r.newFileMode=h.slice(14).trim();else if(h.startsWith("rename from "))r.renameFrom=h.slice(12).trim();else if(h.startsWith("rename to "))r.renameTo=h.slice(10).trim();else if(h.startsWith("index ")){let w=h.match(/(\w+)\.\.(\w+)/);if(!w)continue;r.beforeHash=w[1],r.afterHash=w[2]}else h.startsWith("semver exclusivity ")?r.semverExclusivity=h.slice(19).trim():h.startsWith("--- ")?r.fromPath=h.slice(6).trim():h.startsWith("+++ ")&&(r.toPath=h.slice(6).trim());else{let w=xvt[h[0]]||null;switch(w){case"header":u(),a=Pvt(h);break;case null:o="parsing header",A(),p-=1;break;case"pragma":{if(!h.startsWith("\\ No newline at end of file"))throw new Error(`Unrecognized pragma in patch file: ${h}`);if(!n)throw new Error("Bad parser state: No newline at EOF pragma encountered without context");n.noNewlineAtEndOfFile=!0}break;case"context":case"deletion":case"insertion":{if(!a)throw new Error("Bad parser state: Hunk lines encountered before hunk header");n&&n.type!==w&&(a.parts.push(n),n=null),n||(n={type:w,lines:[],noNewlineAtEndOfFile:!1}),n.lines.push(h.slice(1))}break;default:_e.assertNever(w);break}}}A();for(let{hunks:p}of t)if(p)for(let h of p)kvt(h);return t}function Qvt(e){let t=[];for(let r of e){let{semverExclusivity:o,diffLineFromPath:a,diffLineToPath:n,oldMode:u,newMode:A,deletedFileMode:p,newFileMode:h,renameFrom:w,renameTo:I,beforeHash:v,afterHash:b,fromPath:E,toPath:R,hunks:N}=r,U=w?"rename":p?"file deletion":h?"file creation":N&&N.length>0?"patch":"mode change",V=null;switch(U){case"rename":{if(!w||!I)throw new Error("Bad parser state: rename from & to not given");t.push({type:"rename",semverExclusivity:o,fromPath:aC(w),toPath:aC(I)}),V=I}break;case"file deletion":{let ee=a||E;if(!ee)throw new Error("Bad parse state: no path given for file deletion");t.push({type:"file deletion",semverExclusivity:o,hunk:N&&N[0]||null,path:aC(ee),mode:$k(p),hash:v})}break;case"file creation":{let ee=n||R;if(!ee)throw new Error("Bad parse state: no path given for file creation");t.push({type:"file creation",semverExclusivity:o,hunk:N&&N[0]||null,path:aC(ee),mode:$k(h),hash:b})}break;case"patch":case"mode change":V=R||n;break;default:_e.assertNever(U);break}V&&u&&A&&u!==A&&t.push({type:"mode change",semverExclusivity:o,path:aC(V),oldMode:$k(u),newMode:$k(A)}),V&&N&&N.length&&t.push({type:"patch",semverExclusivity:o,path:aC(V),hunks:N,beforeHash:v,afterHash:b})}if(t.length===0)throw new Error("Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string");return t}function $k(e){let t=parseInt(e,8)&511;if(t!==Dvt&&t!==Svt)throw new Error(`Unexpected file mode string: ${e}`);return t}function Tv(e){let t=e.split(/\n/g);return t[t.length-1]===""&&t.pop(),Qvt(bvt(t))}function kvt(e){let t=0,r=0;for(let{type:o,lines:a}of e.parts)switch(o){case"context":r+=a.length,t+=a.length;break;case"deletion":t+=a.length;break;case"insertion":r+=a.length;break;default:_e.assertNever(o);break}if(t!==e.header.original.length||r!==e.header.patched.length){let o=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${o(e.header.original.length)} ${o(e.header.patched.length)} @@, got @@ ${o(t)} ${o(r)} @@)`)}}Ye();St();var lC=class extends Error{constructor(r,o){super(`Cannot apply hunk #${r+1}`);this.hunk=o}};async function cC(e,t,r){let o=await e.lstatPromise(t),a=await r();typeof a<"u"&&(t=a),await e.lutimesPromise(t,o.atime,o.mtime)}async function eF(e,{baseFs:t=new Rn,dryRun:r=!1,version:o=null}={}){for(let a of e)if(!(a.semverExclusivity!==null&&o!==null&&!Qr.satisfiesWithPrereleases(o,a.semverExclusivity)))switch(a.type){case"file deletion":if(r){if(!t.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await cC(t,J.dirname(a.path),async()=>{await t.unlinkPromise(a.path)});break;case"rename":if(r){if(!t.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await cC(t,J.dirname(a.fromPath),async()=>{await cC(t,J.dirname(a.toPath),async()=>{await cC(t,a.fromPath,async()=>(await t.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case"file creation":if(r){if(t.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(`
702`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
703`):"";await t.mkdirpPromise(J.dirname(a.path),{chmod:493,utimes:[Bi.SAFE_TIME,Bi.SAFE_TIME]}),await t.writeFilePromise(a.path,n,{mode:a.mode}),await t.utimesPromise(a.path,Bi.SAFE_TIME,Bi.SAFE_TIME)}break;case"patch":await cC(t,a.path,async()=>{await Tvt(a,{baseFs:t,dryRun:r})});break;case"mode change":{let u=(await t.statPromise(a.path)).mode;if(BBe(a.newMode)!==BBe(u))continue;await cC(t,a.path,async()=>{await t.chmodPromise(a.path,a.newMode)})}break;default:_e.assertNever(a);break}}function BBe(e){return(e&64)>0}function vBe(e){return e.replace(/\s+$/,"")}function Rvt(e,t){return vBe(e)===vBe(t)}async function Tvt({hunks:e,path:t},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(t).mode,u=(await r.readFileSync(t,"utf8")).split(/\n/),A=[],p=0,h=0;for(let I of e){let v=Math.max(h,I.header.patched.start+p),b=Math.max(0,v-h),E=Math.max(0,u.length-v-I.header.original.length),R=Math.max(b,E),N=0,U=0,V=null;for(;N<=R;){if(N<=b&&(U=v-N,V=DBe(I,u,U),V!==null)){N=-N;break}if(N<=E&&(U=v+N,V=DBe(I,u,U),V!==null))break;N+=1}if(V===null)throw new lC(e.indexOf(I),I);A.push(V),p+=N,h=U+I.header.original.length}if(o)return;let w=0;for(let I of A)for(let v of I)switch(v.type){case"splice":{let b=v.index+w;u.splice(b,v.numToDelete,...v.linesToInsert),w+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:_e.assertNever(v);break}await r.writeFilePromise(t,u.join(`
704`),{mode:a})}function DBe(e,t,r){let o=[];for(let a of e.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=t[r];if(u==null||!Rvt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:_e.assertNever(a.type);break}return o}var Lvt=/^builtin<([^>]+)>$/;function uC(e,t){let{protocol:r,source:o,selector:a,params:n}=G.parseRange(e);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(w=>Ae.toPortablePath(w)):[],A=n&&typeof n.locator=="string"?G.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=t(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function tF(e){return e.range.startsWith("patch:")}function J0(e){return e.reference.startsWith("patch:")}function Nv(e){let{sourceItem:t,...r}=uC(e.range,G.parseDescriptor);return{...r,sourceDescriptor:t}}function Lv(e){let{sourceItem:t,...r}=uC(e.reference,G.parseLocator);return{...r,sourceLocator:t}}function Ovt(e){let{sourceItem:t}=uC(e.range,G.parseDescriptor);return t}function Mvt(e){let{sourceItem:t}=uC(e.reference,G.parseLocator);return t}function DG(e){if(!tF(e))return e;let{sourceItem:t}=uC(e.range,G.parseDescriptor);return t}function rF(e){if(!J0(e))return e;let{sourceItem:t}=uC(e.reference,G.parseLocator);return t}function SBe({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=e!==null?{locator:G.stringifyLocator(e)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return G.makeRange({protocol:"patch:",source:n(t),selector:r.join("&"),params:{...A,...p,...u}})}function nF(e,{parentLocator:t,sourceDescriptor:r,patchPaths:o}){return G.makeDescriptor(e,SBe({parentLocator:t,sourceItem:r,patchPaths:o},G.stringifyDescriptor))}function SG(e,{parentLocator:t,sourcePackage:r,patchPaths:o,patchHash:a}){return G.makeLocator(e,SBe({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},G.stringifyLocator))}function PBe({onAbsolute:e,onRelative:t,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(Lvt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):J.isAbsolute(a)?e(a):t(a)}function xBe(e){let t=e.lastIndexOf("!");return{optional:(t!==-1?new Set(e.slice(0,t).split(/!/)):new Set).has("optional")}}function PG(e){return PBe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},e)}async function Ov(e,t,r){let o=e!==null?await r.fetcher.fetch(e,r):null,a=o&&o.localPath?{packageFs:new hn(Bt.root),prefixPath:J.relative(Bt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await _e.releaseAfterUseAsync(async()=>await Promise.all(t.map(async u=>{let A=xBe(u),p=await PBe({onAbsolute:async h=>await ae.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(J.join(a.prefixPath,h),"utf8")},onProject:async h=>await ae.readFilePromise(J.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(w=>w.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
705`));return n}async function xG(e,{cache:t,project:r}){let o=r.storedPackages.get(e.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=rF(e),n=r.storedChecksums,u=new ki,A=await ae.mktempPromise(),p=J.join(A,"source"),h=J.join(A,"user"),w=J.join(A,".yarn-patch.json"),I=r.configuration.makeFetcher(),v=[];try{let b,E;if(e.locatorHash===a.locatorHash){let R=await I.fetch(e,{cache:t,project:r,fetcher:I,checksums:n,report:u});v.push(()=>R.releaseFs?.()),b=R,E=R}else b=await I.fetch(e,{cache:t,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>b.releaseFs?.()),E=await I.fetch(e,{cache:t,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>E.releaseFs?.());await Promise.all([ae.copyPromise(p,b.prefixPath,{baseFs:b.packageFs}),ae.copyPromise(h,E.prefixPath,{baseFs:E.packageFs}),ae.writeJsonPromise(w,{locator:G.stringifyLocator(e),version:o.version})])}finally{for(let b of v)b()}return ae.detachTemp(A),h}async function bG(e,t){let r=Ae.fromPortablePath(e).replace(/\\/g,"/"),o=Ae.fromPortablePath(t).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Mr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,o],{cwd:Ae.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
706The following error was reported by 'git':
707${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${_e.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${_e.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(_e.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(_e.escapeRegExp(`${o}/`),"g"),"")}function QG(e,t){let r=[];for(let{source:o}of e){if(o===null)continue;let a=Tv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&t!==null&&!Qr.satisfiesWithPrereleases(t,u)||r.push(JSON.stringify(A))}}return wn.makeHash(`${3}`,...r).slice(0,6)}Ye();function bBe(e,{configuration:t,report:r}){for(let o of e.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${ye.pretty(t,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${ye.pretty(t,a,ye.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${ye.pretty(t,a,ye.Type.ADDED)}`);break;default:_e.assertNever(o.type)}}var Mv=class{supports(t,r){return!!J0(t)}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${G.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:u}}async patchPackage(t,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=Lv(t),A=await Ov(o,u,r),p=await ae.mktempPromise(),h=J.join(p,"current.zip"),w=await r.fetcher.fetch(a,r),I=G.getIdentVendorPath(t),v=new us(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await _e.releaseAfterUseAsync(async()=>{await v.copyPromise(I,w.prefixPath,{baseFs:w.packageFs,stableSort:!0})},w.releaseFs),v.saveAndClose();for(let{source:b,optional:E}of A){if(b===null)continue;let R=new us(h,{level:r.project.configuration.get("compressionLevel")}),N=new hn(J.resolve(Bt.root,I),{baseFs:R});try{await eF(Tv(b),{baseFs:N,version:n})}catch(U){if(!(U instanceof lC))throw U;let V=r.project.configuration.get("enableInlineHunks"),ee=!V&&!E?" (set enableInlineHunks for details)":"",le=`${G.prettyLocator(r.project.configuration,t)}: ${U.message}${ee}`,fe=de=>{!V||bBe(U.hunk,{configuration:r.project.configuration,report:de})};if(R.discardAndClose(),E){r.report.reportWarningOnce(66,le,{reportExtra:fe});continue}else throw new zt(66,le,fe)}R.saveAndClose()}return new us(h,{level:r.project.configuration.get("compressionLevel")})}};Ye();var Uv=class{supportsDescriptor(t,r){return!!tF(t)}supportsLocator(t,r){return!!J0(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){let{patchPaths:a}=Nv(t);return a.every(n=>!PG(n))?t:G.bindDescriptor(t,{locator:G.stringifyLocator(r)})}getResolutionDependencies(t,r){let{sourceDescriptor:o}=Nv(t);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(t,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=Nv(t),u=await Ov(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=QG(u,A.version);return[SG(t,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let{sourceLocator:o}=Lv(t);return{...await r.resolver.resolve(o,r),...t}}};Ye();St();qt();var V0=class extends ut{constructor(){super(...arguments);this.save=he.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=J.resolve(this.context.cwd,Ae.toPortablePath(this.patchFolder)),u=J.join(n,"../source"),A=J.join(n,"../.yarn-patch.json");if(!ae.existsSync(u))throw new it("The argument folder didn't get created by 'yarn patch'");let p=await bG(u,n),h=await ae.readJsonPromise(A),w=G.parseLocator(h.locator,!0);if(!o.storedPackages.has(w.locatorHash))throw new it("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(p);return}let I=r.get("patchFolder"),v=J.join(I,`${G.slugifyLocator(w)}.patch`);await ae.mkdirPromise(I,{recursive:!0}),await ae.writeFilePromise(v,p);let b=[],E=new Map;for(let R of o.storedPackages.values()){if(G.isVirtualLocator(R))continue;let N=R.dependencies.get(w.identHash);if(!N)continue;let U=G.ensureDevirtualizedDescriptor(N),V=DG(U),ee=o.storedResolutions.get(V.descriptorHash);if(!ee)throw new Error("Assertion failed: Expected the resolution to have been registered");if(!o.storedPackages.get(ee))throw new Error("Assertion failed: Expected the package to have been registered");let fe=o.tryWorkspaceByLocator(R);if(fe)b.push(fe);else{let de=o.originalPackages.get(R.locatorHash);if(!de)throw new Error("Assertion failed: Expected the original package to have been registered");let ge=de.dependencies.get(N.identHash);if(!ge)throw new Error("Assertion failed: Expected the original dependency to have been registered");E.set(ge.descriptorHash,ge)}}for(let R of b)for(let N of Ot.hardDependencies){let U=R.manifest[N].get(w.identHash);if(!U)continue;let V=nF(U,{parentLocator:null,sourceDescriptor:G.convertLocatorToDescriptor(w),patchPaths:[J.join(gr.home,J.relative(o.cwd,v))]});R.manifest[N].set(U.identHash,V)}for(let R of E.values()){let N=nF(R,{parentLocator:null,sourceDescriptor:G.convertLocatorToDescriptor(w),patchPaths:[J.join(gr.home,J.relative(o.cwd,v))]});o.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:G.stringifyIdent(N),description:R.range}},reference:N.range})}await o.persist()}};V0.paths=[["patch-commit"]],V0.usage=nt.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "});Ye();St();qt();var z0=class extends ut{constructor(){super(...arguments);this.update=he.Boolean("-u,--update",!1,{description:"Reapply local patches that already apply to this packages"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState();let u=G.parseLocator(this.package);if(u.reference==="unknown"){let A=_e.mapAndFilter([...o.storedPackages.values()],p=>p.identHash!==u.identHash?_e.mapAndFilter.skip:G.isVirtualLocator(p)?_e.mapAndFilter.skip:J0(p)!==this.update?_e.mapAndFilter.skip:p);if(A.length===0)throw new it("No package found in the project for the given locator");if(A.length>1)throw new it(`Multiple candidate packages found; explicitly choose one of them (use \`yarn why <package>\` to get more information as to who depends on them):
708${A.map(p=>`
709- ${G.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new it("No package found in the project for the given locator");await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=rF(u),h=await xG(u,{cache:n,project:o});A.reportJson({locator:G.stringifyLocator(p),path:Ae.fromPortablePath(h)});let w=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${G.prettyLocator(r,p)} got extracted with success${w}!`),A.reportInfo(0,`You can now edit the following folder: ${ye.pretty(r,Ae.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${ye.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${Ae.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};z0.paths=[["patch"]],z0.usage=nt.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "});var Uvt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[V0,z0],fetchers:[Mv],resolvers:[Uv]},_vt=Uvt;var TG={};Jt(TG,{PnpmLinker:()=>_v,default:()=>Yvt});Ye();St();qt();var _v=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(t,r){return this.isEnabled(r)}async findPackageLocation(t,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(t.locatorHash);if(typeof n>"u")throw new it(`Couldn't find ${G.prettyLocator(r.project.configuration,t)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(t,r){if(!this.isEnabled(r))return null;let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=t.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let u=t,A=t;do{A=u,u=J.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(t){return new FG(t)}isEnabled(t){return t.project.configuration.get("nodeLinker")==="pnpm"}},FG=class{constructor(t){this.opts=t;this.asyncActions=new _e.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=DD(ae,{indexPath:J.join(t.project.configuration.get("globalFolder"),"index")})}attachCustomData(t){}async installPackage(t,r,o){switch(t.linkType){case"SOFT":return this.installPackageSoft(t,r,o);case"HARD":return this.installPackageHard(t,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(t,r,o){let a=J.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(t)?J.join(a,gr.nodeModules):null;return this.customData.pathsByLocator.set(t.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(t,r,o){let a=Hvt(t,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,G.stringifyLocator(t)),this.customData.pathsByLocator.set(t.locatorHash,a),o.holdFetchResult(this.asyncActions.set(t.locatorHash,async()=>{await ae.mkdirPromise(n,{recursive:!0}),await ae.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let A=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t,p={manifest:await Ot.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ot,misc:{hasBindingGyp:yA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(A,t.version),w=yA.extractBuildRequest(t,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:w}}async attachInternalDependencies(t,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!QBe(t,{project:this.opts.project}))return;let o=this.customData.pathsByLocator.get(t.locatorHash);if(typeof o>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(t)})`);let{dependenciesLocation:a}=o;!a||this.asyncActions.reduce(t.locatorHash,async n=>{await ae.mkdirPromise(a,{recursive:!0});let u=await jvt(a),A=new Map(u),p=[n],h=(I,v)=>{let b=v;QBe(v,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),b=G.devirtualizeLocator(v));let E=this.customData.pathsByLocator.get(b.locatorHash);if(typeof E>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(v)})`);let R=G.stringifyIdent(I),N=J.join(a,R),U=J.relative(J.dirname(N),E.packageLocation),V=A.get(R);A.delete(R),p.push(Promise.resolve().then(async()=>{if(V){if(V.isSymbolicLink()&&await ae.readlinkPromise(N)===U)return;await ae.removePromise(N)}await ae.mkdirpPromise(J.dirname(N)),process.platform=="win32"&&this.opts.project.configuration.get("winLinkType")==="junctions"?await ae.symlinkPromise(E.packageLocation,N,"junction"):await ae.symlinkPromise(U,N)}))},w=!1;for(let[I,v]of r)I.identHash===t.identHash&&(w=!0),h(I,v);!w&&!this.opts.project.tryWorkspaceByLocator(t)&&h(G.convertLocatorToDescriptor(t),t),p.push(qvt(a,A)),await Promise.all(p)})}async attachExternalDependents(t,r){throw new Error("External dependencies haven't been implemented for the pnpm linker")}async finalizeInstall(){let t=FBe(this.opts.project);if(this.opts.project.configuration.get("nodeLinker")!=="pnpm")await ae.removePromise(t);else{let r;try{r=new Set(await ae.readdirPromise(t))}catch{r=new Set}for(let{dependenciesLocation:o}of this.customData.pathsByLocator.values()){if(!o)continue;let a=J.contains(t,o);if(a===null)continue;let[n]=a.split(J.sep);r.delete(n)}await Promise.all([...r].map(async o=>{await ae.removePromise(J.join(t,o))}))}return await this.asyncActions.wait(),await RG(t),this.opts.project.configuration.get("nodeLinker")!=="node-modules"&&await RG(kBe(this.opts.project)),{customData:this.customData}}};function kBe(e){return J.join(e.cwd,gr.nodeModules)}function FBe(e){return J.join(kBe(e),".store")}function Hvt(e,{project:t}){let r=G.slugifyLocator(e),o=FBe(t),a=J.join(o,r,"package"),n=J.join(o,r,gr.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function QBe(e,{project:t}){return!G.isVirtualLocator(e)||!t.tryWorkspaceByLocator(e)}async function jvt(e){let t=new Map,r=[];try{r=await ae.readdirPromise(e,{withFileTypes:!0})}catch(o){if(o.code!=="ENOENT")throw o}try{for(let o of r)if(!o.name.startsWith("."))if(o.name.startsWith("@")){let a=await ae.readdirPromise(J.join(e,o.name),{withFileTypes:!0});if(a.length===0)t.set(o.name,o);else for(let n of a)t.set(`${o.name}/${n.name}`,n)}else t.set(o.name,o)}catch(o){if(o.code!=="ENOENT")throw o}return t}async function qvt(e,t){let r=[],o=new Set;for(let a of t.keys()){r.push(ae.removePromise(J.join(e,a)));let n=G.tryParseIdent(a)?.scope;n&&o.add(`@${n}`)}return Promise.all(r).then(()=>Promise.all([...o].map(a=>RG(J.join(e,a)))))}async function RG(e){try{await ae.rmdirPromise(e)}catch(t){if(t.code!=="ENOENT"&&t.code!=="ENOTEMPTY")throw t}}var Gvt={linkers:[_v]},Yvt=Gvt;var HG={};Jt(HG,{StageCommand:()=>X0,default:()=>rDt,stageUtils:()=>sF});Ye();St();qt();Ye();St();var sF={};Jt(sF,{ActionType:()=>NG,checkConsensus:()=>iF,expandDirectory:()=>MG,findConsensus:()=>UG,findVcsRoot:()=>LG,genCommitMessage:()=>_G,getCommitPrefix:()=>RBe,isYarnFile:()=>OG});St();var NG=(n=>(n[n.CREATE=0]="CREATE",n[n.DELETE=1]="DELETE",n[n.ADD=2]="ADD",n[n.REMOVE=3]="REMOVE",n[n.MODIFY=4]="MODIFY",n))(NG||{});async function LG(e,{marker:t}){do if(!ae.existsSync(J.join(e,t)))e=J.dirname(e);else return e;while(e!=="/");return null}function OG(e,{roots:t,names:r}){if(r.has(J.basename(e)))return!0;do if(!t.has(e))e=J.dirname(e);else return!0;while(e!=="/");return!1}function MG(e){let t=[],r=[e];for(;r.length>0;){let o=r.pop(),a=ae.readdirSync(o);for(let n of a){let u=J.resolve(o,n);ae.lstatSync(u).isDirectory()?r.push(u):t.push(u)}}return t}function iF(e,t){let r=0,o=0;for(let a of e)a!=="wip"&&(t.test(a)?r+=1:o+=1);return r>=o}function UG(e){let t=iF(e,/^(\w\(\w+\):\s*)?\w+s/),r=iF(e,/^(\w\(\w+\):\s*)?[A-Z]/),o=iF(e,/^\w\(\w+\):/);return{useThirdPerson:t,useUpperCase:r,useComponent:o}}function RBe(e){return e.useComponent?"chore(yarn): ":""}var Wvt=new Map([[0,"create"],[1,"delete"],[2,"add"],[3,"remove"],[4,"update"]]);function _G(e,t){let r=RBe(e),o=[],a=t.slice().sort((n,u)=>n[0]-u[0]);for(;a.length>0;){let[n,u]=a.shift(),A=Wvt.get(n);e.useUpperCase&&o.length===0&&(A=`${A[0].toUpperCase()}${A.slice(1)}`),e.useThirdPerson&&(A+="s");let p=[u];for(;a.length>0&&a[0][0]===n;){let[,w]=a.shift();p.push(w)}p.sort();let h=p.shift();p.length===1?h+=" (and one other)":p.length>1&&(h+=` (and ${p.length} others)`),o.push(`${A} ${h}`)}return`${r}${o.join(", ")}`}var Kvt="Commit generated via `yarn stage`",Jvt=11;async function TBe(e){let{code:t,stdout:r}=await Mr.execvp("git",["log","-1","--pretty=format:%H"],{cwd:e});return t===0?r.trim():null}async function Vvt(e,t){let r=[],o=t.filter(h=>J.basename(h.path)==="package.json");for(let{action:h,path:w}of o){let I=J.relative(e,w);if(h===4){let v=await TBe(e),{stdout:b}=await Mr.execvp("git",["show",`${v}:${I}`],{cwd:e,strict:!0}),E=await Ot.fromText(b),R=await Ot.fromFile(w),N=new Map([...R.dependencies,...R.devDependencies]),U=new Map([...E.dependencies,...E.devDependencies]);for(let[V,ee]of U){let le=G.stringifyIdent(ee),fe=N.get(V);fe?fe.range!==ee.range&&r.push([4,`${le} to ${fe.range}`]):r.push([3,le])}for(let[V,ee]of N)U.has(V)||r.push([2,G.stringifyIdent(ee)])}else if(h===0){let v=await Ot.fromFile(w);v.name?r.push([0,G.stringifyIdent(v.name)]):r.push([0,"a package"])}else if(h===1){let v=await TBe(e),{stdout:b}=await Mr.execvp("git",["show",`${v}:${I}`],{cwd:e,strict:!0}),E=await Ot.fromText(b);E.name?r.push([1,G.stringifyIdent(E.name)]):r.push([1,"a package"])}else throw new Error("Assertion failed: Unsupported action type")}let{code:a,stdout:n}=await Mr.execvp("git",["log",`-${Jvt}`,"--pretty=format:%s"],{cwd:e}),u=a===0?n.split(/\n/g).filter(h=>h!==""):[],A=UG(u);return _G(A,r)}var zvt={[0]:[" A ","?? "],[4]:[" M "],[1]:[" D "]},Xvt={[0]:["A "],[4]:["M "],[1]:["D "]},NBe={async findRoot(e){return await LG(e,{marker:".git"})},async filterChanges(e,t,r,o){let{stdout:a}=await Mr.execvp("git",["status","-s"],{cwd:e,strict:!0}),n=a.toString().split(/\n/g),u=o?.staged?Xvt:zvt;return[].concat(...n.map(p=>{if(p==="")return[];let h=p.slice(0,3),w=J.resolve(e,p.slice(3));if(!o?.staged&&h==="?? "&&p.endsWith("/"))return MG(w).map(I=>({action:0,path:I}));{let v=[0,4,1].find(b=>u[b].includes(h));return v!==void 0?[{action:v,path:w}]:[]}})).filter(p=>OG(p.path,{roots:t,names:r}))},async genCommitMessage(e,t){return await Vvt(e,t)},async makeStage(e,t){let r=t.map(o=>Ae.fromPortablePath(o.path));await Mr.execvp("git",["add","--",...r],{cwd:e,strict:!0})},async makeCommit(e,t,r){let o=t.map(a=>Ae.fromPortablePath(a.path));await Mr.execvp("git",["add","-N","--",...o],{cwd:e,strict:!0}),await Mr.execvp("git",["commit","-m",`${r}
710
711${Kvt}
712`,"--",...o],{cwd:e,strict:!0})},async makeReset(e,t){let r=t.map(o=>Ae.fromPortablePath(o.path));await Mr.execvp("git",["reset","HEAD","--",...r],{cwd:e,strict:!0})}};var Zvt=[NBe],X0=class extends ut{constructor(){super(...arguments);this.commit=he.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=he.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=he.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=he.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),{driver:a,root:n}=await $vt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(I=>I.populateYarnPaths,o,I=>{u.push(I)});let A=new Set;for(let I of u)for(let v of eDt(n,I))A.add(v);let p=new Set([r.get("rcFilename"),gr.lockfile,gr.manifest]),h=await a.filterChanges(n,A,p),w=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${w}
713`);else for(let I of h)this.context.stdout.write(`${Ae.fromPortablePath(I.path)}
714`);else if(this.reset){let I=await a.filterChanges(n,A,p,{staged:!0});I.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,I)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,w):(await a.makeStage(n,h),this.context.stdout.write(w))}};X0.paths=[["stage"]],X0.usage=nt.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]});async function $vt(e){let t=null,r=null;for(let o of Zvt)if((r=await o.findRoot(e))!==null){t=o;break}if(t===null||r===null)throw new it("No stage driver has been found for your current project");return{driver:t,root:r}}function eDt(e,t){let r=[];if(t===null)return r;for(;;){(t===e||t.startsWith(`${e}/`))&&r.push(t);let o;try{o=ae.statSync(t)}catch{break}if(o.isSymbolicLink())t=J.resolve(J.dirname(t),ae.readlinkSync(t));else break}return r}var tDt={commands:[X0]},rDt=tDt;var jG={};Jt(jG,{default:()=>uDt});Ye();Ye();St();var MBe=$e(Zn());Ye();var LBe=$e(KH()),nDt="e8e1bd300d860104bb8c58453ffa1eb4",iDt="OFCNCOG2CU",OBe=async(e,t)=>{let r=G.stringifyIdent(e),a=sDt(t).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},sDt=e=>(0,LBe.default)(iDt,nDt,{requester:{async send(r){try{let o=await tn.request(r.url,r.data||null,{configuration:e,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var UBe=e=>e.scope?`${e.scope}__${e.name}`:`${e.name}`,oDt=async(e,t,r,o)=>{if(r.scope==="types")return;let{project:a}=e,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??ae.existsSync(J.join(a.cwd,"tsconfig.json"))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new ki};if(!await OBe(r,n))return;let w=UBe(r),I=G.parseRange(r.range).selector;if(!Qr.validRange(I)){let N=n.normalizeDependency(r),U=await A.getCandidates(N,{},p);I=G.parseRange(U[0].reference).selector}let v=MBe.default.coerce(I);if(v===null)return;let b=`${Zc.Modifier.CARET}${v.major}`,E=G.makeDescriptor(G.makeIdent("types",w),b),R=_e.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,V=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&V!==r.descriptorHash)return _e.mapAndFind.skip;let ee=[];for(let le of Ot.allDependencies){let fe=N.manifest[le].get(E.identHash);typeof fe>"u"||ee.push([le,fe])}return ee.length===0?_e.mapAndFind.skip:ee});if(typeof R<"u")for(let[N,U]of R)e.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(E);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}e.manifest[Zc.Target.DEVELOPMENT].set(E.identHash,E)}},aDt=async(e,t,r)=>{if(r.scope==="types")return;let{project:o}=e,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??ae.existsSync(J.join(o.cwd,"tsconfig.json"))))return;let u=UBe(r),A=G.makeIdent("types",u);for(let p of Ot.allDependencies)typeof e.manifest[p].get(A.identHash)>"u"||e.manifest[p].delete(A.identHash)},lDt=(e,t)=>{t.publishConfig&&t.publishConfig.typings&&(t.typings=t.publishConfig.typings),t.publishConfig&&t.publishConfig.types&&(t.types=t.publishConfig.types)},cDt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:oDt,afterWorkspaceDependencyRemoval:aDt,beforeWorkspacePacking:lDt}},uDt=cDt;var KG={};Jt(KG,{VersionApplyCommand:()=>Z0,VersionCheckCommand:()=>$0,VersionCommand:()=>eg,default:()=>bDt,versionUtils:()=>hC});Ye();Ye();qt();var hC={};Jt(hC,{Decision:()=>fC,applyPrerelease:()=>YBe,applyReleases:()=>WG,applyStrategy:()=>aF,clearVersionFiles:()=>qG,getUndecidedDependentWorkspaces:()=>jv,getUndecidedWorkspaces:()=>oF,openVersionFile:()=>pC,requireMoreDecisions:()=>SDt,resolveVersionFiles:()=>Hv,suggestStrategy:()=>YG,updateVersionFiles:()=>GG,validateReleaseDecision:()=>AC});Ye();St();Nl();qt();var GBe=$e(qBe()),vA=$e(Zn()),DDt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,fC=(u=>(u.UNDECIDED="undecided",u.DECLINE="decline",u.MAJOR="major",u.MINOR="minor",u.PATCH="patch",u.PRERELEASE="prerelease",u))(fC||{});function AC(e){let t=vA.default.valid(e);return t||_e.validateEnum((0,GBe.default)(fC,"UNDECIDED"),e)}async function Hv(e,{prerelease:t=null}={}){let r=new Map,o=e.configuration.get("deferredVersionFolder");if(!ae.existsSync(o))return r;let a=await ae.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=J.join(o,n),A=await ae.readFilePromise(u,"utf8"),p=Ji(A);for(let[h,w]of Object.entries(p.releases||{})){if(w==="decline")continue;let I=G.parseIdent(h),v=e.tryWorkspaceByIdent(I);if(v===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${J.basename(u)} references ${h})`);if(v.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${G.prettyLocator(e.configuration,v.anchoredLocator)})`);let b=v.manifest.raw.stableVersion??v.manifest.version,E=r.get(v),R=aF(b,AC(w));if(R===null)throw new Error(`Assertion failed: Expected ${b} to support being bumped via strategy ${w}`);let N=typeof E<"u"?vA.default.gt(R,E)?R:E:R;r.set(v,N)}}return t&&(r=new Map([...r].map(([n,u])=>[n,YBe(u,{current:n.manifest.version,prerelease:t})]))),r}async function qG(e){let t=e.configuration.get("deferredVersionFolder");!ae.existsSync(t)||await ae.removePromise(t)}async function GG(e,t){let r=new Set(t),o=e.configuration.get("deferredVersionFolder");if(!ae.existsSync(o))return;let a=await ae.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=J.join(o,n),A=await ae.readFilePromise(u,"utf8"),p=Ji(A),h=p?.releases;if(!!h){for(let w of Object.keys(h)){let I=G.parseIdent(w),v=e.tryWorkspaceByIdent(I);(v===null||r.has(v))&&delete p.releases[w]}Object.keys(p.releases).length>0?await ae.changeFilePromise(u,Ba(new Ba.PreserveOrdering(p))):await ae.unlinkPromise(u)}}}async function pC(e,{allowEmpty:t=!1}={}){let r=e.configuration;if(r.projectCwd===null)throw new it("This command can only be run from within a Yarn project");let o=await na.fetchRoot(r.projectCwd),a=o!==null?await na.fetchBase(o,{baseRefs:r.get("changesetBaseRefs")}):null,n=o!==null?await na.fetchChangedFiles(o,{base:a.hash,project:e}):[],u=r.get("deferredVersionFolder"),A=n.filter(b=>J.contains(u,b)!==null);if(A.length>1)throw new it(`Your current branch contains multiple versioning files; this isn't supported:
715- ${A.map(b=>Ae.fromPortablePath(b)).join(`
716- `)}`);let p=new Set(_e.mapAndFilter(n,b=>{let E=e.tryWorkspaceByFilePath(b);return E===null?_e.mapAndFilter.skip:E}));if(A.length===0&&p.size===0&&!t)return null;let h=A.length===1?A[0]:J.join(u,`${wn.makeHash(Math.random().toString()).slice(0,8)}.yml`),w=ae.existsSync(h)?await ae.readFilePromise(h,"utf8"):"{}",I=Ji(w),v=new Map;for(let b of I.declined||[]){let E=G.parseIdent(b),R=e.getWorkspaceByIdent(E);v.set(R,"decline")}for(let[b,E]of Object.entries(I.releases||{})){let R=G.parseIdent(b),N=e.getWorkspaceByIdent(R);v.set(N,AC(E))}return{project:e,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(b=>b.manifest.version!==null)),releases:v,async saveAll(){let b={},E=[],R=[];for(let N of e.workspaces){if(N.manifest.version===null)continue;let U=G.stringifyIdent(N.anchoredLocator),V=v.get(N);V==="decline"?E.push(U):typeof V<"u"?b[U]=AC(V):p.has(N)&&R.push(U)}await ae.mkdirPromise(J.dirname(h),{recursive:!0}),await ae.changeFilePromise(h,Ba(new Ba.PreserveOrdering({releases:Object.keys(b).length>0?b:void 0,declined:E.length>0?E:void 0,undecided:R.length>0?R:void 0})))}}}function SDt(e){return oF(e).size>0||jv(e).length>0}function oF(e){let t=new Set;for(let r of e.changedWorkspaces)r.manifest.version!==null&&(e.releases.has(r)||t.add(r));return t}function jv(e,{include:t=new Set}={}){let r=[],o=new Map(_e.mapAndFilter([...e.releases],([n,u])=>u==="decline"?_e.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(_e.mapAndFilter([...e.releases],([n,u])=>u!=="decline"?_e.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of e.project.workspaces)if(!(!t.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of Ot.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=e.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function YG(e,t){let r=vA.default.clean(t);for(let o of Object.values(fC))if(o!=="undecided"&&o!=="decline"&&vA.default.inc(e,o)===r)return o;return null}function aF(e,t){if(vA.default.valid(t))return t;if(e===null)throw new it(`Cannot apply the release strategy "${t}" unless the workspace already has a valid version`);if(!vA.default.valid(e))throw new it(`Cannot apply the release strategy "${t}" on a non-semver version (${e})`);let r=vA.default.inc(e,t);if(r===null)throw new it(`Cannot apply the release strategy "${t}" on the specified version (${e})`);return r}function WG(e,t,{report:r}){let o=new Map;for(let a of e.workspaces)for(let n of Ot.allDependencies)for(let u of a.manifest[n].values()){let A=e.tryWorkspaceByDescriptor(u);if(A===null||!t.has(A))continue;_e.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of t){let u=a.manifest.version;a.manifest.version=n,vA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?G.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${G.prettyLocator(e.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:Ae.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,w,I]of p){let v=h.manifest[w].get(I);if(typeof v>"u")throw new Error("Assertion failed: The dependency should have existed");let b=v.range,E=!1;if(b.startsWith(Vn.protocol)&&(b=b.slice(Vn.protocol.length),E=!0,b===a.relativeCwd))continue;let R=b.match(DDt);if(!R){r.reportWarning(0,`Couldn't auto-upgrade range ${b} (in ${G.prettyLocator(e.configuration,h.anchoredLocator)})`);continue}let N=`${R[1]}${n}`;E&&(N=`${Vn.protocol}${N}`);let U=G.makeDescriptor(v,N);h.manifest[w].set(I,U)}}}var PDt=new Map([["%n",{extract:e=>e.length>=1?[e[0],e.slice(1)]:null,generate:(e=0)=>`${e+1}`}]]);function YBe(e,{current:t,prerelease:r}){let o=new vA.default.SemVer(t),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==e&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=PDt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():u=!1;else{let w=u?h.extract(a):null;w!==null&&typeof w[0]=="number"?(n.push(h.generate(w[0])),a=w[1]):(n.push(h.generate()),u=!1)}}return o.prerelease&&(o.prerelease=[]),`${e}-${n.join(".")}`}var Z0=class extends ut{constructor(){super(...arguments);this.all=he.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=he.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=he.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.recursive=he.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await Hv(o,{prerelease:p}),w=new Map;if(this.all)w=h;else{let I=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let v of I){let b=h.get(v);typeof b<"u"&&w.set(v,b)}}if(w.size===0){let I=h.size>0?" Did you want to add --all?":"";A.reportWarning(0,`The current workspace doesn't seem to require a version bump.${I}`);return}WG(o,w,{report:A}),this.dryRun||(p||(this.all?await qG(o):await GG(o,[...w.keys()])),A.reportSeparator())});return u.hasErrors()?u.exitCode():await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Z0.paths=[["version","apply"]],Z0.usage=nt.Usage({category:"Release-related commands",description:"apply all the deferred version bumps at once",details:`
717 This command will apply the deferred version changes and remove their definitions from the repository.
718
719 Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%d\`) will be used on all new versions and the version definitions will be kept as-is.
720
721 By default only the current workspace will be bumped, but you can configure this behavior by using one of:
722
723 - \`--recursive\` to also apply the version bump on its dependencies
724 - \`--all\` to apply the version bump on all packages in the repository
725
726 Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
727 `,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});Ye();St();qt();var lF=$e(Zn());var $0=class extends ut{constructor(){super(...arguments);this.interactive=he.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){Sw(this.context);let{Gem:r}=await Promise.resolve().then(()=>(ak(),wj)),{ScrollableItems:o}=await Promise.resolve().then(()=>(Ak(),uk)),{FocusRequest:a}=await Promise.resolve().then(()=>(Ij(),YCe)),{useListInput:n}=await Promise.resolve().then(()=>(ck(),WCe)),{renderForm:u}=await Promise.resolve().then(()=>(gk(),hk)),{Box:A,Text:p}=await Promise.resolve().then(()=>$e(ic())),{default:h,useCallback:w,useState:I}=await Promise.resolve().then(()=>$e(nn())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,this.context.cwd);if(!E)throw new tr(b.cwd,this.context.cwd);await b.restoreInstallState();let R=await pC(b);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new it("This command can only be run on Git repositories");let N=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:ge,active:oe,decision:Be,setDecision:be})=>{let g=ge.manifest.raw.stableVersion??ge.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${G.prettyLocator(v,ge.anchoredLocator)})`);if(lF.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let we=["undecided","decline","patch","minor","major"];n(Be,we,{active:oe,minus:"left",plus:"right",set:be});let Se=Be==="undecided"?h.createElement(p,{color:"yellow"},g):Be==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},lF.default.valid(Be)?Be:lF.default.inc(g,Be)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,G.prettyLocator(v,ge.anchoredLocator)," - ",Se)),h.createElement(A,null,we.map(ce=>h.createElement(A,{key:ce,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:ce===Be})," ",ce)))))},V=ge=>{let oe=new Set(R.releaseRoots),Be=new Map([...ge].filter(([be])=>oe.has(be)));for(;;){let be=jv({project:R.project,releases:Be}),g=!1;if(be.length>0){for(let[we]of be)if(!oe.has(we)){oe.add(we),g=!0;let Se=ge.get(we);typeof Se<"u"&&Be.set(we,Se)}}if(!g)break}return{relevantWorkspaces:oe,relevantReleases:Be}},ee=()=>{let[ge,oe]=I(()=>new Map(R.releases)),Be=w((be,g)=>{let we=new Map(ge);g!=="undecided"?we.set(be,g):we.delete(be);let{relevantReleases:Se}=V(we);oe(Se)},[ge,oe]);return[ge,Be]},le=({workspaces:ge,releases:oe})=>{let Be=[];Be.push(`${ge.size} total`);let be=0,g=0;for(let we of ge){let Se=oe.get(we);typeof Se>"u"?g+=1:Se!=="decline"&&(be+=1)}return Be.push(`${be} release${be===1?"":"s"}`),Be.push(`${g} remaining`),h.createElement(p,{color:"yellow"},Be.join(", "))},de=await u(({useSubmit:ge})=>{let[oe,Be]=ee();ge(oe);let{relevantWorkspaces:be}=V(oe),g=new Set([...be].filter(ne=>!R.releaseRoots.has(ne))),[we,Se]=I(0),ce=w(ne=>{switch(ne){case a.BEFORE:Se(we-1);break;case a.AFTER:Se(we+1);break}},[we,Se]);return h.createElement(A,{flexDirection:"column"},h.createElement(N,null),h.createElement(A,null,h.createElement(p,{wrap:"wrap"},"The following files have been modified in your local checkout.")),h.createElement(A,{flexDirection:"column",marginTop:1,paddingLeft:2},[...R.changedFiles].map(ne=>h.createElement(A,{key:ne},h.createElement(p,null,h.createElement(p,{color:"grey"},Ae.fromPortablePath(R.root)),Ae.sep,Ae.relative(Ae.fromPortablePath(R.root),Ae.fromPortablePath(ne)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(A,{marginTop:1},h.createElement(p,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):")),g.size>3?h.createElement(A,{marginTop:1},h.createElement(le,{workspaces:R.releaseRoots,releases:oe})):null,h.createElement(A,{marginTop:1,flexDirection:"column"},h.createElement(o,{active:we%2===0,radius:1,size:2,onFocusRequest:ce},[...R.releaseRoots].map(ne=>h.createElement(U,{key:ne.cwd,workspace:ne,decision:oe.get(ne)||"undecided",setDecision:te=>Be(ne,te)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(A,{marginTop:1},h.createElement(p,{wrap:"wrap"},"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:")),h.createElement(A,null,h.createElement(p,null,"(Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<tab>")," to move the focus between the workspace groups.)")),g.size>5?h.createElement(A,{marginTop:1},h.createElement(le,{workspaces:g,releases:oe})):null,h.createElement(A,{marginTop:1,flexDirection:"column"},h.createElement(o,{active:we%2===1,radius:2,size:2,onFocusRequest:ce},[...g].map(ne=>h.createElement(U,{key:ne.cwd,workspace:ne,decision:oe.get(ne)||"undecided",setDecision:te=>Be(ne,te)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof de>"u")return 1;R.releases.clear();for(let[ge,oe]of de)R.releases.set(ge,oe);await R.saveAll()}async executeStandard(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);return await o.restoreInstallState(),(await Nt.start({configuration:r,stdout:this.context.stdout},async u=>{let A=await pC(o);if(A===null||A.releaseRoots.size===0)return;if(A.root===null)throw new it("This command can only be run on Git repositories");if(u.reportInfo(0,`Your PR was started right after ${ye.pretty(r,A.baseHash.slice(0,7),"yellow")} ${ye.pretty(r,A.baseTitle,"magenta")}`),A.changedFiles.size>0){u.reportInfo(0,"You have changed the following files since then:"),u.reportSeparator();for(let v of A.changedFiles)u.reportInfo(null,`${ye.pretty(r,Ae.fromPortablePath(A.root),"gray")}${Ae.sep}${Ae.relative(Ae.fromPortablePath(A.root),Ae.fromPortablePath(v))}`)}let p=!1,h=!1,w=oF(A);if(w.size>0){p||u.reportSeparator();for(let v of w)u.reportError(0,`${G.prettyLocator(r,v.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let I=jv(A);for(let[v,b]of I)h||u.reportSeparator(),u.reportError(0,`${G.prettyLocator(r,v.anchoredLocator)} doesn't have a release strategy attached, but depends on ${G.prettyWorkspace(r,b)} which is planned for release.`),h=!0;(p||h)&&(u.reportSeparator(),u.reportInfo(0,"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed)."),u.reportInfo(0,"To correct these errors, run `yarn version check --interactive` then follow the instructions."))})).exitCode()}};$0.paths=[["version","check"]],$0.usage=nt.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]});Ye();qt();var cF=$e(Zn());var eg=class extends ut{constructor(){super(...arguments);this.deferred=he.Boolean("-d,--deferred",{description:"Prepare the version to be bumped during the next release cycle"});this.immediate=he.Boolean("-i,--immediate",{description:"Bump the version immediately"});this.strategy=he.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new tr(o.cwd,this.context.cwd);let n=r.get("preferDeferredVersions");this.deferred&&(n=!0),this.immediate&&(n=!1);let u=cF.default.valid(this.strategy),A=this.strategy==="decline",p;if(u)if(a.manifest.version!==null){let w=YG(a.manifest.version,this.strategy);w!==null?p=w:p=this.strategy}else p=this.strategy;else{let w=a.manifest.version;if(!A){if(w===null)throw new it("Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.");if(typeof w!="string"||!cF.default.valid(w))throw new it(`Can't bump the version (${w}) if it's not valid semver`)}p=AC(this.strategy)}if(!n){let I=(await Hv(o)).get(a);if(typeof I<"u"&&p!=="decline"){let v=aF(a.manifest.version,p);if(cF.default.lt(v,I))throw new it(`Can't bump the version to one that would be lower than the current deferred one (${I})`)}}let h=await pC(o,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run(["version","apply"])}};eg.paths=[["version"]],eg.usage=nt.Usage({category:"Release-related commands",description:"apply a new version to the current package",details:"\n This command will bump the version number for the given package, following the specified strategy:\n\n - If `major`, the first number from the semver range will be increased (`X.0.0`).\n - If `minor`, the second number from the semver range will be increased (`0.X.0`).\n - If `patch`, the third number from the semver range will be increased (`0.0.X`).\n - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\n - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\n - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\n - If a valid semver range, it will be used as new version.\n - If unspecified, Yarn will ask you for guidance.\n\n For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\n ",examples:[["Immediately bump the version to the next major","yarn version major"],["Prepare the version to be bumped to the next major","yarn version major --deferred"]]});var xDt={configuration:{deferredVersionFolder:{description:"Folder where are stored the versioning files",type:"ABSOLUTE_PATH",default:"./.yarn/versions"},preferDeferredVersions:{description:"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set",type:"BOOLEAN",default:!1}},commands:[Z0,$0,eg]},bDt=xDt;var JG={};Jt(JG,{WorkspacesFocusCommand:()=>tg,WorkspacesForeachCommand:()=>sp,default:()=>FDt});Ye();Ye();qt();var tg=class extends ut{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=he.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=he.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=he.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Nr.find(r);await o.restoreInstallState({restoreResolutions:!1});let u;if(this.all)u=new Set(o.workspaces);else if(this.workspaces.length===0){if(!a)throw new tr(o.cwd,this.context.cwd);u=new Set([a])}else u=new Set(this.workspaces.map(A=>o.getWorkspaceByIdent(G.parseIdent(A))));for(let A of u)for(let p of this.production?["dependencies"]:Ot.hardDependencies)for(let h of A.manifest.getForScope(p).values()){let w=o.tryWorkspaceByDescriptor(h);w!==null&&u.add(w)}for(let A of o.workspaces)u.has(A)?this.production&&A.manifest.devDependencies.clear():(A.manifest.installConfig=A.manifest.installConfig||{},A.manifest.installConfig.selfReferences=!1,A.manifest.dependencies.clear(),A.manifest.devDependencies.clear(),A.manifest.peerDependencies.clear(),A.manifest.scripts.clear());return await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n,persistProject:!1})}};tg.paths=[["workspaces","focus"]],tg.usage=nt.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});Ye();Ye();Ye();qt();var gC=$e(Zo()),KBe=$e(nd());Za();var sp=class extends ut{constructor(){super(...arguments);this.from=he.Array("--from",{description:"An array of glob pattern idents or paths from which to base any recursion"});this.all=he.Boolean("-A,--all",{description:"Run the command on all workspaces of a project"});this.recursive=he.Boolean("-R,--recursive",{description:"Run the command on the current workspace and all of its recursive dependencies"});this.worktree=he.Boolean("-W,--worktree",{description:"Run the command on all workspaces of the current worktree"});this.verbose=he.Boolean("-v,--verbose",{description:"Prefix each output line with the name of the originating workspace"});this.parallel=he.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=he.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=he.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:RT([Vs(["unlimited"]),rd(FT(),[NT(),TT(1)])])});this.topological=he.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=he.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=he.Array("--include",[],{description:"An array of glob pattern idents or paths; only matching workspaces will be traversed"});this.exclude=he.Array("--exclude",[],{description:"An array of glob pattern idents or paths; matching workspaces won't be traversed"});this.publicOnly=he.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=he.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.dryRun=he.Boolean("-n,--dry-run",{description:"Print the commands that would be run, without actually running them"});this.commandName=he.String();this.args=he.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!this.all&&!a)throw new tr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),u=n.path.length===1&&n.path[0]==="run"&&typeof n.scriptName<"u"?n.scriptName:null;if(n.path.length===0)throw new it("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let A=oe=>{!this.dryRun||this.context.stdout.write(`${oe}
728`)},p=()=>{let oe=this.from.map(Be=>gC.default.matcher(Be));return o.workspaces.filter(Be=>{let be=G.stringifyIdent(Be.anchoredLocator),g=Be.relativeCwd;return oe.some(we=>we(be)||we(g))})},h=[];if(this.since?(A("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await na.fetchChangedWorkspaces({ref:this.since,project:o}))):this.from?(A("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(A("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(A("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(A("Option --all is set; selecting all workspaces"),h=[...o.workspaces]),this.dryRun&&!this.all){for(let oe of h)A(`
729- ${oe.relativeCwd}
730 ${G.prettyLocator(r,oe.anchoredLocator)}`);h.length>0&&A("")}let w;if(this.recursive?this.since?(A("Option --recursive --since is set; recursively selecting all dependent workspaces"),w=new Set(h.map(oe=>[...oe.getRecursiveWorkspaceDependents()]).flat())):(A("Option --recursive is set; recursively selecting all transitive dependencies"),w=new Set(h.map(oe=>[...oe.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(A("Option --worktree is set; recursively selecting all nested workspaces"),w=new Set(h.map(oe=>[...oe.getRecursiveWorkspaceChildren()]).flat())):w=null,w!==null&&(h=[...new Set([...h,...w])],this.dryRun))for(let oe of w)A(`
731- ${oe.relativeCwd}
732 ${G.prettyLocator(r,oe.anchoredLocator)}`);let I=[],v=!1;if(u?.includes(":")){for(let oe of o.workspaces)if(oe.manifest.scripts.has(u)&&(v=!v,v===!1))break}for(let oe of h){if(u&&!oe.manifest.scripts.has(u)&&!v&&!(await cn.getWorkspaceAccessibleBinaries(oe)).has(u)){A(`Excluding ${oe.relativeCwd} because it doesn't have a "${u}" script`);continue}if(!(u===r.env.npm_lifecycle_event&&oe.cwd===a.cwd)){if(this.include.length>0&&!gC.default.isMatch(G.stringifyIdent(oe.anchoredLocator),this.include)&&!gC.default.isMatch(oe.relativeCwd,this.include)){A(`Excluding ${oe.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(gC.default.isMatch(G.stringifyIdent(oe.anchoredLocator),this.exclude)||gC.default.isMatch(oe.relativeCwd,this.exclude))){A(`Excluding ${oe.relativeCwd} because it matches the --include filter`);continue}if(this.publicOnly&&oe.manifest.private===!0){A(`Excluding ${oe.relativeCwd} because it's a private workspace and --no-private was set`);continue}I.push(oe)}}if(this.dryRun)return 0;let b=this.verbose??this.context.stdout.isTTY,E=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(cs.availableParallelism()/2):1,R=E===1?!1:this.parallel,N=R?this.interlaced:!0,U=(0,KBe.default)(E),V=new Map,ee=new Set,le=0,fe=null,de=!1,ge=await Nt.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async oe=>{let Be=async(be,{commandIndex:g})=>{if(de)return-1;!R&&b&&g>1&&oe.reportSeparator();let we=QDt(be,{configuration:r,verbose:b,commandIndex:g}),[Se,ce]=WBe(oe,{prefix:we,interlaced:N}),[ne,te]=WBe(oe,{prefix:we,interlaced:N});try{b&&oe.reportInfo(null,`${we} Process started`);let Ee=Date.now(),Re=await this.cli.run([this.commandName,...this.args],{cwd:be.cwd,stdout:Se,stderr:ne})||0;Se.end(),ne.end(),await ce,await te;let dt=Date.now();if(b){let H=r.get("enableTimers")?`, completed in ${ye.pretty(r,dt-Ee,ye.Type.DURATION)}`:"";oe.reportInfo(null,`${we} Process exited (exit code ${Re})${H}`)}return Re===130&&(de=!0,fe=Re),Re}catch(Ee){throw Se.end(),ne.end(),await ce,await te,Ee}};for(let be of I)V.set(be.anchoredLocator.locatorHash,be);for(;V.size>0&&!oe.hasErrors();){let be=[];for(let[Se,ce]of V){if(ee.has(ce.anchoredDescriptor.descriptorHash))continue;let ne=!0;if(this.topological||this.topologicalDev){let te=this.topologicalDev?new Map([...ce.manifest.dependencies,...ce.manifest.devDependencies]):ce.manifest.dependencies;for(let Ee of te.values()){let Re=o.tryWorkspaceByDescriptor(Ee);if(ne=Re===null||!V.has(Re.anchoredLocator.locatorHash),!ne)break}}if(!!ne&&(ee.add(ce.anchoredDescriptor.descriptorHash),be.push(U(async()=>{let te=await Be(ce,{commandIndex:++le});return V.delete(Se),ee.delete(ce.anchoredDescriptor.descriptorHash),te})),!R))break}if(be.length===0){let Se=Array.from(V.values()).map(ce=>G.prettyLocator(r,ce.anchoredLocator)).join(", ");oe.reportError(3,`Dependency cycle detected (${Se})`);return}let we=(await Promise.all(be)).find(Se=>Se!==0);fe===null&&(fe=typeof we<"u"?1:fe),(this.topological||this.topologicalDev)&&typeof we<"u"&&oe.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return fe!==null?fe:ge.exitCode()}};sp.paths=[["workspaces","foreach"]],sp.usage=nt.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project. This is the default behavior.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `-W,--worktree` is set, Yarn will find workspaces to run the command on by looking at the current worktree.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `--dry-run` is set, Yarn will explain what it would do without actually doing anything.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n Adding the `-v,--verbose` flag (automatically enabled in interactive terminal environments) will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]}),sp.schema=[oI("all",Wu.Forbids,["from","recursive","since","worktree"],{missingIf:"undefined"}),LT(["all","recursive","since","worktree"],{missingIf:"undefined"})];function WBe(e,{prefix:t,interlaced:r}){let o=e.createStreamReporter(t),a=new _e.DefaultStream;a.pipe(o,{end:!1}),a.on("finish",()=>{o.end()});let n=new Promise(A=>{o.on("finish",()=>{A(a.active)})});if(r)return[a,n];let u=new _e.BufferStream;return u.pipe(a,{end:!1}),u.on("finish",()=>{a.end()}),[u,n]}function QDt(e,{configuration:t,commandIndex:r,verbose:o}){if(!o)return null;let n=`[${G.stringifyIdent(e.anchoredLocator)}]:`,u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[r%u.length];return ye.pretty(t,n,A)}var kDt={commands:[tg,sp]},FDt=kDt;var Aw=()=>({modules:new Map([["@yarnpkg/cli",n2],["@yarnpkg/core",r2],["@yarnpkg/fslib",WC],["@yarnpkg/libzip",P1],["@yarnpkg/parsers",eI],["@yarnpkg/shell",F1],["clipanion",AI],["semver",RDt],["typanion",Jo],["@yarnpkg/plugin-essentials",z8],["@yarnpkg/plugin-compat",tH],["@yarnpkg/plugin-constraints",yH],["@yarnpkg/plugin-dlx",EH],["@yarnpkg/plugin-exec",IH],["@yarnpkg/plugin-file",vH],["@yarnpkg/plugin-git",V8],["@yarnpkg/plugin-github",PH],["@yarnpkg/plugin-http",xH],["@yarnpkg/plugin-init",bH],["@yarnpkg/plugin-interactive-tools",kj],["@yarnpkg/plugin-link",Fj],["@yarnpkg/plugin-nm",dq],["@yarnpkg/plugin-npm",gG],["@yarnpkg/plugin-npm-cli",vG],["@yarnpkg/plugin-pack",uG],["@yarnpkg/plugin-patch",kG],["@yarnpkg/plugin-pnp",iq],["@yarnpkg/plugin-pnpm",TG],["@yarnpkg/plugin-stage",HG],["@yarnpkg/plugin-typescript",jG],["@yarnpkg/plugin-version",KG],["@yarnpkg/plugin-workspace-tools",JG]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"])});function zBe({cwd:e,pluginConfiguration:t}){let r=new os({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:en??"<unknown>"});return Object.assign(r,{defaultContext:{...os.defaultContext,cwd:e,plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function TDt(e){if(_e.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let r=process.versions.node,o=">=18.12.0";if(Qr.satisfiesWithPrereleases(r,o))return!0;let a=new it(`This tool requires a Node version compatible with ${o} (got ${r}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);return os.defaultContext.stdout.write(e.error(a)),!1}async function XBe({selfPath:e,pluginConfiguration:t}){return await Ke.find(Ae.toPortablePath(process.cwd()),t,{strict:!1,usePathCheck:e})}function NDt(e,t,{yarnPath:r}){if(!ae.existsSync(r))return e.error(new Error(`The "yarn-path" option has been set, but the specified location doesn't exist (${r}).`)),1;process.on("SIGINT",()=>{});let o={stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1"}};try{(0,JBe.execFileSync)(process.execPath,[Ae.fromPortablePath(r),...t],o)}catch(a){return a.status??1}return 0}function LDt(e,t){let r=null,o=t;return t.length>=2&&t[0]==="--cwd"?(r=Ae.toPortablePath(t[1]),o=t.slice(2)):t.length>=1&&t[0].startsWith("--cwd=")&&(r=Ae.toPortablePath(t[0].slice(6)),o=t.slice(1)),e.defaultContext.cwd=r!==null?J.resolve(r):J.cwd(),o}function ODt(e,{configuration:t}){if(!(!t.get("enableTelemetry")||VBe.isCI||!process.stdout.isTTY)){Ke.telemetry=new lw(t,"puba9cdc10ec5790a2cf4969dd413a47270");for(let o of t.plugins.keys())cw.has(o.match(/^@yarnpkg\/plugin-(.*)$/)?.[1]??"")&&Ke.telemetry?.reportPluginName(o);e.binaryVersion&&Ke.telemetry.reportVersion(e.binaryVersion)}}function ZBe(e,{configuration:t}){for(let r of t.plugins.values())for(let o of r.commands||[])e.register(o)}async function MDt(e,t,{selfPath:r,pluginConfiguration:o}){if(!TDt(e))return 1;let a=await XBe({selfPath:r,pluginConfiguration:o}),n=a.get("yarnPath"),u=a.get("ignorePath");if(n&&!u)return NDt(e,t,{yarnPath:n});delete process.env.YARN_IGNORE_PATH;let A=LDt(e,t);ODt(e,{configuration:a}),ZBe(e,{configuration:a});let p=e.process(A,e.defaultContext);return p.help||Ke.telemetry?.reportCommandName(p.path.join(" ")),await e.run(p,e.defaultContext)}async function zpe({cwd:e=J.cwd(),pluginConfiguration:t=Aw()}={}){let r=zBe({cwd:e,pluginConfiguration:t}),o=await XBe({pluginConfiguration:t,selfPath:null});return ZBe(r,{configuration:o}),r}async function rQ(e,{cwd:t=J.cwd(),selfPath:r,pluginConfiguration:o}){let a=zBe({cwd:t,pluginConfiguration:o});try{process.exitCode=await MDt(a,e,{selfPath:r,pluginConfiguration:o})}catch(n){os.defaultContext.stdout.write(a.error(n)),process.exitCode=1}finally{await ae.rmtempPromise()}}rQ(process.argv.slice(2),{cwd:J.cwd(),selfPath:Ae.toPortablePath(Ae.resolve(process.argv[1])),pluginConfiguration:Aw()});})();
733/*
734object-assign
735(c) Sindre Sorhus
736@license MIT
737*/
738/*!
739 * buildToken
740 * Builds OAuth token prefix (helper function)
741 *
742 * @name buildToken
743 * @function
744 * @param {GitUrl} obj The parsed Git url object.
745 * @return {String} token prefix
746 */
747/*!
748 * fill-range <https://github.com/jonschlinkert/fill-range>
749 *
750 * Copyright (c) 2014-present, Jon Schlinkert.
751 * Licensed under the MIT License.
752 */
753/*!
754 * is-extglob <https://github.com/jonschlinkert/is-extglob>
755 *
756 * Copyright (c) 2014-2016, Jon Schlinkert.
757 * Licensed under the MIT License.
758 */
759/*!
760 * is-glob <https://github.com/jonschlinkert/is-glob>
761 *
762 * Copyright (c) 2014-2017, Jon Schlinkert.
763 * Released under the MIT License.
764 */
765/*!
766 * is-number <https://github.com/jonschlinkert/is-number>
767 *
768 * Copyright (c) 2014-present, Jon Schlinkert.
769 * Released under the MIT License.
770 */
771/*!
772 * is-windows <https://github.com/jonschlinkert/is-windows>
773 *
774 * Copyright © 2015-2018, Jon Schlinkert.
775 * Released under the MIT License.
776 */
777/*!
778 * to-regex-range <https://github.com/micromatch/to-regex-range>
779 *
780 * Copyright (c) 2015-present, Jon Schlinkert.
781 * Released under the MIT License.
782 */
783/**
784 @license
785 Copyright (c) 2015, Rebecca Turner
786
787 Permission to use, copy, modify, and/or distribute this software for any
788 purpose with or without fee is hereby granted, provided that the above
789 copyright notice and this permission notice appear in all copies.
790
791 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
792 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
793 FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
794 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
795 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
796 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
797 PERFORMANCE OF THIS SOFTWARE.
798 */
799/**
800 @license
801 Copyright Joyent, Inc. and other Node contributors.
802
803 Permission is hereby granted, free of charge, to any person obtaining a
804 copy of this software and associated documentation files (the
805 "Software"), to deal in the Software without restriction, including
806 without limitation the rights to use, copy, modify, merge, publish,
807 distribute, sublicense, and/or sell copies of the Software, and to permit
808 persons to whom the Software is furnished to do so, subject to the
809 following conditions:
810
811 The above copyright notice and this permission notice shall be included
812 in all copies or substantial portions of the Software.
813
814 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
815 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
816 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
817 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
818 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
819 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
820 USE OR OTHER DEALINGS IN THE SOFTWARE.
821*/
822/**
823 @license
824 Copyright Node.js contributors. All rights reserved.
825
826 Permission is hereby granted, free of charge, to any person obtaining a copy
827 of this software and associated documentation files (the "Software"), to
828 deal in the Software without restriction, including without limitation the
829 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
830 sell copies of the Software, and to permit persons to whom the Software is
831 furnished to do so, subject to the following conditions:
832
833 The above copyright notice and this permission notice shall be included in
834 all copies or substantial portions of the Software.
835
836 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
837 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
838 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
839 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
840 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
841 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
842 IN THE SOFTWARE.
843*/
844/**
845 @license
846 The MIT License (MIT)
847
848 Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
849
850 Permission is hereby granted, free of charge, to any person obtaining a copy
851 of this software and associated documentation files (the "Software"), to deal
852 in the Software without restriction, including without limitation the rights
853 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
854 copies of the Software, and to permit persons to whom the Software is
855 furnished to do so, subject to the following conditions:
856
857 The above copyright notice and this permission notice shall be included in
858 all copies or substantial portions of the Software.
859
860 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
861 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
862 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
863 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
864 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
865 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
866 THE SOFTWARE.
867*/
868/** @license React v0.18.0
869 * scheduler.production.min.js
870 *
871 * Copyright (c) Facebook, Inc. and its affiliates.
872 *
873 * This source code is licensed under the MIT license found in the
874 * LICENSE file in the root directory of this source tree.
875 */
876/** @license React v0.24.0
877 * react-reconciler.production.min.js
878 *
879 * Copyright (c) Facebook, Inc. and its affiliates.
880 *
881 * This source code is licensed under the MIT license found in the
882 * LICENSE file in the root directory of this source tree.
883 */
884/** @license React v16.13.1
885 * react.production.min.js
886 *
887 * Copyright (c) Facebook, Inc. and its affiliates.
888 *
889 * This source code is licensed under the MIT license found in the
890 * LICENSE file in the root directory of this source tree.
891 */
diff --git a/.yarnrc.yml b/.yarnrc.yml
index 84755cc2..4ec36248 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -15,4 +15,4 @@ packageExtensions:
15 peerDependencies: 15 peerDependencies:
16 csstype: "*" 16 csstype: "*"
17 17
18yarnPath: .yarn/releases/yarn-4.0.0-rc.45.cjs 18yarnPath: .yarn/releases/yarn-4.0.0-rc.50.cjs
diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt
new file mode 100644
index 00000000..ea890afb
--- /dev/null
+++ b/LICENSES/BSD-3-Clause.txt
@@ -0,0 +1,11 @@
1Copyright (c) <year> <owner>.
2
3Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
51. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
72. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
93. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
11THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/LICENSES/ISC.txt b/LICENSES/ISC.txt
new file mode 100644
index 00000000..b9c199c9
--- /dev/null
+++ b/LICENSES/ISC.txt
@@ -0,0 +1,8 @@
1ISC License:
2
3Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
4Copyright (c) 1995-2003 by Internet Software Consortium
5
6Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
7
8THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/LICENSES/LicenseRef-EPL-Steward.txt b/LICENSES/LicenseRef-EPL-Steward.txt
new file mode 100644
index 00000000..4b81ef82
--- /dev/null
+++ b/LICENSES/LicenseRef-EPL-Steward.txt
@@ -0,0 +1 @@
Everyone is permitted to copy and distribute copies of the Agreement; however, in order to avoid inconsistency, the agreement is copyrighted and may only be modified by the Agreement Steward who reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify the Agreement.
diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts
index 7c7cbabd..20c404a0 100644
--- a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/java-conventions.gradle.kts
@@ -17,9 +17,6 @@ plugins {
17 17
18repositories { 18repositories {
19 mavenCentral() 19 mavenCentral()
20 maven {
21 url = uri("https://repo.eclipse.org/content/groups/releases/")
22 }
23} 20}
24 21
25// Use log4j-over-slf4j instead of log4j 1.x in the tests. 22// Use log4j-over-slf4j instead of log4j 1.x in the tests.
@@ -35,6 +32,7 @@ dependencies {
35 testImplementation(libs.hamcrest) 32 testImplementation(libs.hamcrest)
36 testImplementation(libs.junit.api) 33 testImplementation(libs.junit.api)
37 testRuntimeOnly(libs.junit.engine) 34 testRuntimeOnly(libs.junit.engine)
35 testRuntimeOnly("org.junit.platform:junit-platform-launcher")
38 testImplementation(libs.junit.params) 36 testImplementation(libs.junit.params)
39 testImplementation(libs.mockito.core) 37 testImplementation(libs.mockito.core)
40 testImplementation(libs.mockito.junit) 38 testImplementation(libs.mockito.junit)
diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts
index 0924311b..6c80c971 100644
--- a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts
+++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-application.gradle.kts
@@ -25,7 +25,7 @@ dependencies {
25 implementation(libs.slf4j.log4j) 25 implementation(libs.slf4j.log4j)
26} 26}
27 27
28for (taskName in listOf("distTar", "distZip", "shadowDistTar", "shadowDistZip")) { 28for (taskName in listOf("distZip", "shadowDistTar", "shadowDistZip")) {
29 tasks.named(taskName) { 29 tasks.named(taskName) {
30 enabled = false 30 enabled = false
31 } 31 }
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 00000000..79a5eacf
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,71 @@
1# SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
2#
3# SPDX-License-Identifier: EPL-2.0
4
5FROM public.ecr.aws/amazoncorretto/amazoncorretto:17-al2023-jdk AS jdk
6
7FROM --platform=$BUILDPLATFORM docker.io/eclipse-temurin:17-jammy AS jlink-base
8# Use the Ubuntu Jammy based Temurin image for JLink, because it already
9# contains the require objcopy tool for stripping debug symbols:
10# https://github.com/docker-library/openjdk/issues/351
11# We'll have to cross-jlink the JDK: https://stackoverflow.com/a/47611708
12COPY --link --from=jdk /usr/lib/jvm/java-17-amazon-corretto /crossjdk
13
14FROM --platform=$BUILDPLATFORM jlink-base AS jlink-amd64-on-amd64
15
16FROM --platform=$BUILDPLATFORM jlink-base AS jlink-arm64-on-arm64
17
18FROM --platform=$BUILDPLATFORM jlink-base AS jlink-arm64-on-amd64
19# When cross-building the Docker image, we have the wrong toolchain for the
20# target architecture. We forcibly override the target for the objcopy tool.
21# The cross toolchain is not available in Amazon Linux 2023.
22RUN apt-get update && \
23 apt-get install binutils-aarch64-linux-gnu && \
24 ln -sf /usr/bin/aarch64-linux-gnu-objcopy /usr/bin/objcopy && \
25 rm -rf /var/lib/apt/lists/*
26
27FROM --platform=$BUILDPLATFORM jlink-base AS jlink-amd64-on-arm64
28RUN apt-get update && \
29 apt-get install binutils-x86-64-linux-gnu && \
30 ln -sf /usr/bin/x86_64-linux-gnu-objcopy /usr/bin/objcopy && \
31 rm -rf /var/lib/apt/lists/*
32
33FROM --platform=$BUILDPLATFORM jlink-$TARGETARCH-on-$BUILDARCH as jlink
34RUN jlink --no-header-files --no-man-pages --compress=2 \
35 --module-path=/crossjdk/jmods --strip-debug --add-modules \
36 java.base,java.logging,java.xml,jdk.zipfs \
37 --output /jlink
38
39FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal AS base
40# The launcher script generated by Gradle uses xargs to parse the argument list.
41RUN dnf install -y findutils && \
42 dnf clean all
43# The first layer contains the slimmed down JRE.
44COPY --link --from=jlink /jlink /usr/lib/java
45ENV JAVA_HOME="/usr/lib/java" PATH="/usr/lib/java/bin:${PATH}"
46# Layer with platform-independent dependencies, slow changing.
47ADD --link lib /app/lib
48
49FROM base AS refinery-amd64
50# Layer with platform-dependent dependencies, slow changing.
51ADD --link lib_amd64 /app/lib
52# Layer with platform-dependent startup script containing references to all
53# dependency version.
54ADD --link app_amd64_bin /app/bin
55
56FROM base AS refinery-arm64
57# Layer with platform-dependent dependencies, slow changing.
58ADD --link lib_arm64 /app/lib
59# Layer with platform-dependent startup script containing references to all
60# dependency version.
61ADD --link app_arm64_bin /app/bin
62
63FROM refinery-$TARGETARCH
64# Layer with platform-independent application jars.
65ADD --link app_lib /app/lib
66# Common settings added on top.
67ENV REFINERY_LISTEN_HOST=0.0.0.0 REFINERY_LISTEN_PORT=8888
68EXPOSE 8888
69USER 1000
70WORKDIR /app
71ENTRYPOINT /app/bin/refinery-language-web
diff --git a/docker/build.sh b/docker/build.sh
new file mode 100755
index 00000000..76970617
--- /dev/null
+++ b/docker/build.sh
@@ -0,0 +1,39 @@
1#!/usr/bin/env bash
2
3# SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
4#
5# SPDX-License-Identifier: EPL-2.0
6
7set -euo pipefail
8
9(cd .. && ./gradlew :refinery-language-web:distTar)
10
11refinery_version="$(grep '^version=' ../gradle.properties | cut -d'=' -f2)"
12distribution_name="refinery-language-web-${refinery_version}"
13rm -rf "${distribution_name}" dist app_lib app_{amd64,arm64}_bin lib lib_{amd64,arm64}
14
15tar -xf "../subprojects/language-web/build/distributions/${distribution_name}.tar"
16mv "${distribution_name}" dist
17mkdir -p app_lib app_{amd64,arm64}_bin lib lib_{amd64,arm64}
18
19# Move architecture-specific jars to their repsective directories.
20mv dist/lib/ortools-linux-x86-64-*.jar lib_amd64
21mv dist/lib/ortools-linux-aarch64-*.jar lib_arm64
22rm dist/lib/ortools-{darwin,win32}-*.jar
23# Move the applications jars for the dependencies into a separate Docker layer
24# to enable faster updates.
25mv dist/lib/refinery-* app_lib
26mv dist/lib/* lib
27# Omit references to jars not present for the current architecture from the
28# startup scripts.
29sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-aarch64\)[^:]\+\.jar//g' dist/bin/refinery-language-web > app_amd64_bin/refinery-language-web
30sed 's/:\$APP_HOME\/lib\/ortools-\(darwin\|win32\|linux-x86-64\)[^:]\+\.jar//g' dist/bin/refinery-language-web > app_arm64_bin/refinery-language-web
31chmod a+x app_{amd64,arm64}_bin/refinery-language-web
32rm -rf dist
33
34docker buildx build . \
35 --platform linux/amd64,linux/arm64 \
36 --output "type=image,name=ghcr.io/graphs4value/refinery:${refinery_version},name=ghcr.io/graphs4value/refinery:latest,push=true,annotation-index.org.opencontainers.image.source=https://github.com/graphs4value/refinery,annotation-index.org.opencontainers.image.description=Refinery: an efficient graph solver for generating well-formed models,annotation-index.org.opencontainers.image.licenses=EPL-2.0" \
37 --label 'org.opencontainers.image.source=https://github.com/graphs4value/refinery' \
38 --label 'org.opencontainers.image.description=Refinery: an efficient graph solver for generating well-formed models' \
39 --label 'org.opencontainers.image.licenses=EPL-2.0'
diff --git a/gradle.properties b/gradle.properties
index 535c14df..41b2ee91 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,8 +3,8 @@
3# SPDX-License-Identifier: EPL-2.0 3# SPDX-License-Identifier: EPL-2.0
4 4
5file.encoding=UTF-8 5file.encoding=UTF-8
6frontend.nodeVersion=18.16.0 6frontend.nodeVersion=18.17.1
7frontend.yarnVersion=4.0.0-rc.45 7frontend.yarnVersion=4.0.0-rc.50
8frontend.yarn1Version=1.22.19 8frontend.yarn1Version=1.22.19
9group=tools.refinery 9group=tools.refinery
10# Set to true once tools.refinery.gradle.frontend-worktree supports the cache. 10# Set to true once tools.refinery.gradle.frontend-worktree supports the cache.
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index c21d2718..7b874f23 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,26 +3,27 @@
3# SPDX-License-Identifier: EPL-2.0 3# SPDX-License-Identifier: EPL-2.0
4 4
5[versions] 5[versions]
6eclipseCollections = "12.0.0.M1" 6eclipseCollections = "12.0.0.M3"
7ecore = "2.34.0" 7ecore = "2.26.0"
8jetty = "12.0.0.beta1" 8jetty = "12.0.1"
9jmh = "1.36" 9jmh = "1.37"
10junit = "5.10.0-M1" 10junit = "5.10.0"
11mockito = "5.4.0" 11mockito = "5.5.0"
12mwe2 = "2.15.0.M0" 12mwe2 = "2.15.0"
13slf4j = "2.0.7" 13slf4j = "2.0.9"
14xtext = "2.31.0" 14xtext = "2.32.0"
15 15
16[libraries] 16[libraries]
17jetbrainsAnnotations = { group = "org.jetbrains", name = "annotations", version = "24.0.1" } 17jetbrainsAnnotations = { group = "org.jetbrains", name = "annotations", version = "24.0.1" }
18eclipseCollections = { group = "org.eclipse.collections", name = "eclipse-collections", version.ref = "eclipseCollections" } 18eclipseCollections = { group = "org.eclipse.collections", name = "eclipse-collections", version.ref = "eclipseCollections" }
19eclipseCollections-api = { group = "org.eclipse.collections", name = "eclipse-collections-api", version.ref = "eclipseCollections" } 19eclipseCollections-api = { group = "org.eclipse.collections", name = "eclipse-collections-api", version.ref = "eclipseCollections" }
20ecore = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore", version.ref = "ecore" } 20ecore = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore", version.ref = "ecore" }
21ecore-xmi = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore.xmi", version = "2.18.0" } 21ecore-xmi = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore.xmi", version = "2.16.0" }
22ecore-codegen = { group = "org.eclipse.emf", name = "org.eclipse.emf.codegen.ecore", version.ref = "ecore" } 22ecore-codegen = { group = "org.eclipse.emf", name = "org.eclipse.emf.codegen.ecore", version.ref = "ecore" }
23gradlePlugin-frontend = { group = "org.siouan", name = "frontend-gradle-plugin-jdk11", version = "6.0.0" } 23gradlePlugin-frontend = { group = "org.siouan", name = "frontend-gradle-plugin-jdk11", version = "6.0.0" }
24gradlePlugin-shadow = { group = "com.github.johnrengelman", name = "shadow", version = "8.1.1" } 24gradlePlugin-shadow = { group = "com.github.johnrengelman", name = "shadow", version = "8.1.1" }
25gradlePlugin-sonarqube = { group = "org.sonarsource.scanner.gradle", name = "sonarqube-gradle-plugin", version = "4.2.1.3168" } 25gradlePlugin-sonarqube = { group = "org.sonarsource.scanner.gradle", name = "sonarqube-gradle-plugin", version = "4.3.1.3277" }
26gson = { group = "com.google.code.gson", name = "gson", version = "2.10.1" }
26hamcrest = { group = "org.hamcrest", name = "hamcrest", version = "2.2" } 27hamcrest = { group = "org.hamcrest", name = "hamcrest", version = "2.2" }
27jetty-server = { group = "org.eclipse.jetty", name = "jetty-server", version.ref = "jetty" } 28jetty-server = { group = "org.eclipse.jetty", name = "jetty-server", version.ref = "jetty" }
28jetty-servlet = { group = "org.eclipse.jetty.ee10", name = "jetty-ee10-servlet", version.ref = "jetty" } 29jetty-servlet = { group = "org.eclipse.jetty.ee10", name = "jetty-ee10-servlet", version.ref = "jetty" }
@@ -36,13 +37,13 @@ junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", ver
36junit-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" } 37junit-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" }
37mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" } 38mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
38mockito-junit = { group = "org.mockito", name = "mockito-junit-jupiter", version.ref = "mockito" } 39mockito-junit = { group = "org.mockito", name = "mockito-junit-jupiter", version.ref = "mockito" }
39mwe-utils = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe.utils", version = "1.9.0.M0" } 40mwe-utils = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe.utils", version = "1.9.0" }
40mwe2-launch = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.launch", version.ref = "mwe2" } 41mwe2-launch = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.launch", version.ref = "mwe2" }
41mwe2-lib = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.lib", version.ref = "mwe2" } 42mwe2-lib = { group = "org.eclipse.emf", name = "org.eclipse.emf.mwe2.lib", version.ref = "mwe2" }
43ortools = { group = "com.google.ortools", name = "ortools-java", version = "9.7.2996" }
42slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" } 44slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
43slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" } 45slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
44slf4j-log4j = { group = "org.slf4j", name = "log4j-over-slf4j", version.ref = "slf4j" } 46slf4j-log4j = { group = "org.slf4j", name = "log4j-over-slf4j", version.ref = "slf4j" }
45viatra = { group = "org.eclipse.viatra", name = "viatra-query-runtime", version = "2.7.0" }
46xtext-bom = { group = "org.eclipse.xtext", name = "xtext-dev-bom", version.ref = "xtext" } 47xtext-bom = { group = "org.eclipse.xtext", name = "xtext-dev-bom", version.ref = "xtext" }
47xtext-core = { group = "org.eclipse.xtext", name = "org.eclipse.xtext", version.ref = "xtext" } 48xtext-core = { group = "org.eclipse.xtext", name = "org.eclipse.xtext", version.ref = "xtext" }
48xtext-generator-antlr = { group = "org.eclipse.xtext", name = "xtext-antlr-generator", version = "2.1.1" } 49xtext-generator-antlr = { group = "org.eclipse.xtext", name = "xtext-antlr-generator", version = "2.1.1" }
@@ -54,4 +55,4 @@ xtext-xbase = { group = "org.eclipse.xtext", name = "org.eclipse.xtext.xbase", v
54xtext-xbase-ide = { group = "org.eclipse.xtext", name = "org.eclipse.xtext.xbase.ide", version.ref = "xtext" } 55xtext-xbase-ide = { group = "org.eclipse.xtext", name = "org.eclipse.xtext.xbase.ide", version.ref = "xtext" }
55 56
56[plugins] 57[plugins]
57versions = { id = "com.github.ben-manes.versions", version = "0.47.0" } 58versions = { id = "com.github.ben-manes.versions", version = "0.48.0" }
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index c1962a79..033e24c4 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index c2929f89..ac72c34e 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
1distributionBase=GRADLE_USER_HOME 1distributionBase=GRADLE_USER_HOME
2distributionPath=wrapper/dists 2distributionPath=wrapper/dists
3distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-rc-2-bin.zip 3distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
4networkTimeout=10000 4networkTimeout=10000
5validateDistributionUrl=true
5zipStoreBase=GRADLE_USER_HOME 6zipStoreBase=GRADLE_USER_HOME
6zipStorePath=wrapper/dists 7zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index aeb74cbb..fcb6fca1 100755
--- a/gradlew
+++ b/gradlew
@@ -130,10 +130,13 @@ location of your Java installation."
130 fi 130 fi
131else 131else
132 JAVACMD=java 132 JAVACMD=java
133 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 133 if ! command -v java >/dev/null 2>&1
134 then
135 die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134 136
135Please set the JAVA_HOME variable in your environment to match the 137Please set the JAVA_HOME variable in your environment to match the
136location of your Java installation." 138location of your Java installation."
139 fi
137fi 140fi
138 141
139# Increase the maximum file descriptors if we can. 142# Increase the maximum file descriptors if we can.
diff --git a/package.json b/package.json
index 80ddacd3..227a33ed 100644
--- a/package.json
+++ b/package.json
@@ -23,9 +23,13 @@
23 "scripts": { 23 "scripts": {
24 "frontend": "yarn workspace @refinery/frontend" 24 "frontend": "yarn workspace @refinery/frontend"
25 }, 25 },
26 "packageManager": "yarn@4.0.0-rc.45", 26 "packageManager": "yarn@4.0.0-rc.50",
27 "devDependencies": { 27 "devDependencies": {
28 "eslint": "^8.43.0", 28 "eslint": "^8.49.0",
29 "typescript": "5.1.3" 29 "typescript": "5.2.2"
30 },
31 "resolutions": {
32 "d3-zoom@npm:^3.0.0": "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch",
33 "d3-zoom@npm:3": "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch"
30 } 34 }
31} 35}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 0eae2800..49eec202 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -15,10 +15,15 @@ include(
15 "language-web", 15 "language-web",
16 "store", 16 "store",
17 "store-dse", 17 "store-dse",
18 "store-dse-visualization",
18 "store-query", 19 "store-query",
19 "store-query-viatra", 20 "store-query-viatra",
20 "store-reasoning", 21 "store-reasoning",
21 "visualization", 22 "store-reasoning-scope",
23 "viatra-runtime",
24 "viatra-runtime-localsearch",
25 "viatra-runtime-rete",
26 "viatra-runtime-rete-recipes",
22) 27)
23 28
24for (project in rootProject.children) { 29for (project in rootProject.children) {
diff --git a/subprojects/frontend/build.gradle.kts b/subprojects/frontend/build.gradle.kts
index d0839371..286dd05c 100644
--- a/subprojects/frontend/build.gradle.kts
+++ b/subprojects/frontend/build.gradle.kts
@@ -16,9 +16,9 @@ frontend {
16 assembleScript.set("run build") 16 assembleScript.set("run build")
17} 17}
18 18
19val viteOutputDir = "$buildDir/vite" 19val viteOutputDir = layout.buildDirectory.dir("vite")
20 20
21val productionResources = file("$viteOutputDir/production") 21val productionResources = viteOutputDir.map { it.dir("production") }
22 22
23val productionAssets: Configuration by configurations.creating { 23val productionAssets: Configuration by configurations.creating {
24 isCanBeConsumed = true 24 isCanBeConsumed = true
@@ -81,7 +81,7 @@ tasks {
81 dependsOn(installFrontend) 81 dependsOn(installFrontend)
82 dependsOn(generateXStateTypes) 82 dependsOn(generateXStateTypes)
83 inputs.files(lintingFiles) 83 inputs.files(lintingFiles)
84 outputs.dir("$buildDir/typescript") 84 outputs.dir(layout.buildDirectory.dir("typescript"))
85 script.set("run typecheck") 85 script.set("run typecheck")
86 group = "verification" 86 group = "verification"
87 description = "Check for TypeScript type errors." 87 description = "Check for TypeScript type errors."
@@ -92,7 +92,7 @@ tasks {
92 dependsOn(generateXStateTypes) 92 dependsOn(generateXStateTypes)
93 dependsOn(typeCheckFrontend) 93 dependsOn(typeCheckFrontend)
94 inputs.files(lintingFiles) 94 inputs.files(lintingFiles)
95 outputs.file("$buildDir/eslint.json") 95 outputs.file(layout.buildDirectory.file("eslint.json"))
96 script.set("run lint") 96 script.set("run lint")
97 group = "verification" 97 group = "verification"
98 description = "Check for TypeScript lint errors and warnings." 98 description = "Check for TypeScript lint errors and warnings."
@@ -140,5 +140,5 @@ artifacts {
140sonarqube.properties { 140sonarqube.properties {
141 SonarPropertiesUtils.addToList(properties, "sonar.sources", "src") 141 SonarPropertiesUtils.addToList(properties, "sonar.sources", "src")
142 property("sonar.nodejs.executable", "${frontend.nodeInstallDirectory.get()}/bin/node") 142 property("sonar.nodejs.executable", "${frontend.nodeInstallDirectory.get()}/bin/node")
143 property("sonar.eslint.reportPaths", "$buildDir/eslint.json") 143 property("sonar.eslint.reportPaths", "${layout.buildDirectory.get()}/eslint.json")
144} 144}
diff --git a/subprojects/frontend/config/detectDevModeOptions.ts b/subprojects/frontend/config/detectDevModeOptions.ts
index 665204dc..6052e047 100644
--- a/subprojects/frontend/config/detectDevModeOptions.ts
+++ b/subprojects/frontend/config/detectDevModeOptions.ts
@@ -30,8 +30,8 @@ function detectListenOptions(
30 fallbackHost: string, 30 fallbackHost: string,
31 fallbackPort: number, 31 fallbackPort: number,
32): ListenOptions { 32): ListenOptions {
33 const host = process.env[`${name}_HOST`] ?? fallbackHost; 33 const host = process.env[`REFINERY_${name}_HOST`] ?? fallbackHost;
34 const rawPort = process.env[`${name}_PORT`]; 34 const rawPort = process.env[`REFINERY_${name}_PORT`];
35 const port = rawPort === undefined ? fallbackPort : parseInt(rawPort, 10); 35 const port = rawPort === undefined ? fallbackPort : parseInt(rawPort, 10);
36 const secure = port === 443; 36 const secure = port === 443;
37 return { host, port, secure }; 37 return { host, port, secure };
diff --git a/subprojects/frontend/config/graphvizUMDVitePlugin.ts b/subprojects/frontend/config/graphvizUMDVitePlugin.ts
new file mode 100644
index 00000000..9c60a84e
--- /dev/null
+++ b/subprojects/frontend/config/graphvizUMDVitePlugin.ts
@@ -0,0 +1,69 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { readFile } from 'node:fs/promises';
8import path from 'node:path';
9
10import pnpapi from 'pnpapi';
11import type { PluginOption, ResolvedConfig } from 'vite';
12
13// Use a CJS file as the PnP resolution issuer to force resolution to a non-ESM export.
14const issuerFileName = 'worker.cjs';
15
16export default function graphvizUMDVitePlugin(): PluginOption {
17 let command: ResolvedConfig['command'] = 'build';
18 let root: string | undefined;
19 let url: string | undefined;
20
21 return {
22 name: 'graphviz-umd',
23 enforce: 'post',
24 configResolved(config) {
25 ({ command, root } = config);
26 },
27 async buildStart() {
28 const issuer =
29 root === undefined ? issuerFileName : path.join(issuerFileName);
30 const resolvedPath = pnpapi.resolveRequest(
31 '@hpcc-js/wasm/graphviz',
32 issuer,
33 );
34 if (resolvedPath === null) {
35 return;
36 }
37 if (command === 'serve') {
38 url = `/@fs/${resolvedPath}`;
39 } else {
40 const content = await readFile(resolvedPath, null);
41 url = this.emitFile({
42 name: path.basename(resolvedPath),
43 type: 'asset',
44 source: content,
45 });
46 }
47 },
48 renderStart() {
49 if (url !== undefined && command !== 'serve') {
50 url = this.getFileName(url);
51 }
52 },
53 transformIndexHtml() {
54 if (url === undefined) {
55 return undefined;
56 }
57 return [
58 {
59 tag: 'script',
60 attrs: {
61 src: url,
62 type: 'javascript/worker',
63 },
64 injectTo: 'head',
65 },
66 ];
67 },
68 };
69}
diff --git a/subprojects/frontend/index.html b/subprojects/frontend/index.html
index 1bf3472e..8992d538 100644
--- a/subprojects/frontend/index.html
+++ b/subprojects/frontend/index.html
@@ -18,7 +18,8 @@
18 <meta name="theme-color" media="(prefers-color-scheme:light)" content="#f5f5f5"> 18 <meta name="theme-color" media="(prefers-color-scheme:light)" content="#f5f5f5">
19 <meta name="theme-color" media="(prefers-color-scheme:dark)" content="#21252b"> 19 <meta name="theme-color" media="(prefers-color-scheme:dark)" content="#21252b">
20 <style> 20 <style>
21 @import '@fontsource-variable/inter/wght.css'; 21 @import '@fontsource-variable/open-sans/wdth.css';
22 @import '@fontsource-variable/open-sans/wdth-italic.css';
22 @import '@fontsource-variable/jetbrains-mono/wght.css'; 23 @import '@fontsource-variable/jetbrains-mono/wght.css';
23 @import '@fontsource-variable/jetbrains-mono/wght-italic.css'; 24 @import '@fontsource-variable/jetbrains-mono/wght-italic.css';
24 </style> 25 </style>
diff --git a/subprojects/frontend/package.json b/subprojects/frontend/package.json
index ba8a0a58..873e5170 100644
--- a/subprojects/frontend/package.json
+++ b/subprojects/frontend/package.json
@@ -28,72 +28,85 @@
28 }, 28 },
29 "homepage": "https://refinery.tools", 29 "homepage": "https://refinery.tools",
30 "dependencies": { 30 "dependencies": {
31 "@codemirror/autocomplete": "^6.8.0", 31 "@codemirror/autocomplete": "^6.9.0",
32 "@codemirror/commands": "^6.2.4", 32 "@codemirror/commands": "^6.2.5",
33 "@codemirror/language": "^6.8.0", 33 "@codemirror/language": "^6.9.0",
34 "@codemirror/lint": "^6.2.2", 34 "@codemirror/lint": "^6.4.1",
35 "@codemirror/search": "^6.5.0", 35 "@codemirror/search": "^6.5.2",
36 "@codemirror/state": "^6.2.1", 36 "@codemirror/state": "^6.2.1",
37 "@codemirror/view": "^6.13.2", 37 "@codemirror/view": "^6.18.1",
38 "@emotion/react": "^11.11.1", 38 "@emotion/react": "^11.11.1",
39 "@emotion/styled": "^11.11.0", 39 "@emotion/styled": "^11.11.0",
40 "@fontsource-variable/inter": "^5.0.3", 40 "@fontsource-variable/jetbrains-mono": "^5.0.13",
41 "@fontsource-variable/jetbrains-mono": "^5.0.3", 41 "@fontsource-variable/open-sans": "^5.0.13",
42 "@lezer/common": "^1.0.3", 42 "@hpcc-js/wasm": "^2.13.1",
43 "@lezer/common": "^1.0.4",
43 "@lezer/highlight": "^1.1.6", 44 "@lezer/highlight": "^1.1.6",
44 "@lezer/lr": "^1.3.6", 45 "@lezer/lr": "^1.3.10",
45 "@material-icons/svg": "^1.0.33", 46 "@material-icons/svg": "^1.0.33",
46 "@mui/icons-material": "5.11.16", 47 "@mui/icons-material": "5.14.8",
47 "@mui/material": "5.13.5", 48 "@mui/material": "5.14.8",
48 "@vitejs/plugin-react-swc": "^3.3.2", 49 "@mui/system": "^5.14.8",
50 "@mui/x-data-grid": "^6.10.0 <6.10.1",
49 "ansi-styles": "^6.2.1", 51 "ansi-styles": "^6.2.1",
50 "csstype": "^3.1.2", 52 "csstype": "^3.1.2",
53 "d3": "^7.8.5",
54 "d3-graphviz": "patch:d3-graphviz@npm%3A5.1.0#~/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch",
55 "d3-selection": "^3.0.0",
56 "d3-zoom": "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch",
51 "escape-string-regexp": "^5.0.0", 57 "escape-string-regexp": "^5.0.0",
52 "lodash-es": "^4.17.21", 58 "lodash-es": "^4.17.21",
53 "loglevel": "^1.8.1", 59 "loglevel": "^1.8.1",
54 "loglevel-plugin-prefix": "^0.8.4", 60 "loglevel-plugin-prefix": "^0.8.4",
55 "mobx": "^6.9.0", 61 "mobx": "^6.10.2",
56 "mobx-react-lite": "^3.4.3", 62 "mobx-react-lite": "^4.0.4",
57 "ms": "^2.1.3", 63 "ms": "^2.1.3",
58 "nanoid": "^4.0.2", 64 "nanoid": "^4.0.2",
59 "notistack": "^3.0.1", 65 "notistack": "^3.0.1",
60 "react": "^18.2.0", 66 "react": "^18.2.0",
61 "react-dom": "^18.2.0", 67 "react-dom": "^18.2.0",
62 "xstate": "^4.37.2", 68 "react-resize-detector": "^9.1.0",
63 "zod": "^3.21.4" 69 "xstate": "^4.38.2",
70 "zod": "^3.22.2"
64 }, 71 },
65 "devDependencies": { 72 "devDependencies": {
66 "@lezer/generator": "^1.3.0", 73 "@lezer/generator": "^1.5.0",
67 "@types/eslint": "^8.40.2", 74 "@types/d3": "^7.4.0",
75 "@types/d3-graphviz": "^2.6.7",
76 "@types/d3-selection": "^3.0.6",
77 "@types/d3-zoom": "^3.0.4",
78 "@types/eslint": "^8.44.2",
68 "@types/html-minifier-terser": "^7.0.0", 79 "@types/html-minifier-terser": "^7.0.0",
69 "@types/lodash-es": "^4.17.7", 80 "@types/lodash-es": "^4.17.9",
70 "@types/micromatch": "^4.0.2", 81 "@types/micromatch": "^4.0.2",
71 "@types/ms": "^0.7.31", 82 "@types/ms": "^0.7.31",
72 "@types/node": "^18.16.18", 83 "@types/node": "^18.17.15",
73 "@types/prettier": "^2.7.3", 84 "@types/pnpapi": "^0.0.2",
74 "@types/react": "^18.2.12", 85 "@types/react": "^18.2.21",
75 "@types/react-dom": "^18.2.5", 86 "@types/react-dom": "^18.2.7",
76 "@typescript-eslint/eslint-plugin": "^5.59.11", 87 "@typescript-eslint/eslint-plugin": "^6.7.0",
77 "@typescript-eslint/parser": "^5.59.11", 88 "@typescript-eslint/parser": "^6.7.0",
78 "@xstate/cli": "^0.5.1", 89 "@vitejs/plugin-react-swc": "^3.3.2",
90 "@xstate/cli": "^0.5.2",
79 "cross-env": "^7.0.3", 91 "cross-env": "^7.0.3",
80 "eslint": "^8.43.0", 92 "eslint": "^8.49.0",
81 "eslint-config-airbnb": "^19.0.4", 93 "eslint-config-airbnb": "^19.0.4",
82 "eslint-config-airbnb-typescript": "^17.0.0", 94 "eslint-config-airbnb-typescript": "^17.1.0",
83 "eslint-config-prettier": "^8.8.0", 95 "eslint-config-prettier": "^9.0.0",
84 "eslint-import-resolver-typescript": "^3.5.5", 96 "eslint-import-resolver-typescript": "^3.6.0",
85 "eslint-plugin-import": "^2.27.5", 97 "eslint-plugin-import": "^2.28.1",
86 "eslint-plugin-jsx-a11y": "^6.7.1", 98 "eslint-plugin-jsx-a11y": "^6.7.1",
87 "eslint-plugin-mobx": "^0.0.9", 99 "eslint-plugin-mobx": "^0.0.9",
88 "eslint-plugin-prettier": "^4.2.1", 100 "eslint-plugin-prettier": "^5.0.0",
89 "eslint-plugin-react": "^7.32.2", 101 "eslint-plugin-react": "^7.33.2",
90 "eslint-plugin-react-hooks": "^4.6.0", 102 "eslint-plugin-react-hooks": "^4.6.0",
91 "html-minifier-terser": "^7.2.0", 103 "html-minifier-terser": "^7.2.0",
92 "micromatch": "^4.0.5", 104 "micromatch": "^4.0.5",
93 "prettier": "^2.8.8", 105 "pnpapi": "^0.0.0",
94 "typescript": "5.1.3", 106 "prettier": "^3.0.3",
95 "vite": "^4.3.9", 107 "typescript": "5.2.2",
96 "vite-plugin-pwa": "^0.16.4", 108 "vite": "^4.4.9",
109 "vite-plugin-pwa": "^0.16.5",
97 "workbox-window": "^7.0.0" 110 "workbox-window": "^7.0.0"
98 } 111 }
99} 112}
diff --git a/subprojects/frontend/src/DirectionalSplitPane.tsx b/subprojects/frontend/src/DirectionalSplitPane.tsx
new file mode 100644
index 00000000..59c8b739
--- /dev/null
+++ b/subprojects/frontend/src/DirectionalSplitPane.tsx
@@ -0,0 +1,159 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
8import MoreVertIcon from '@mui/icons-material/MoreVert';
9import Box from '@mui/material/Box';
10import Stack from '@mui/material/Stack';
11import { alpha, useTheme } from '@mui/material/styles';
12import { useCallback, useRef, useState } from 'react';
13import { useResizeDetector } from 'react-resize-detector';
14
15export default function DirectionalSplitPane({
16 primary: left,
17 secondary: right,
18 primaryOnly: showLeftOnly,
19 secondaryOnly: showRightOnly,
20}: {
21 primary: React.ReactNode;
22 secondary: React.ReactNode;
23 primaryOnly?: boolean;
24 secondaryOnly?: boolean;
25}): JSX.Element {
26 const theme = useTheme();
27 const stackRef = useRef<HTMLDivElement | null>(null);
28 const { ref: resizeRef, width, height } = useResizeDetector();
29 const sliderRef = useRef<HTMLDivElement>(null);
30 const [resizing, setResizing] = useState(false);
31 const [fraction, setFraction] = useState(0.5);
32
33 const horizontalSplit =
34 width !== undefined && height !== undefined && height > width;
35 const direction = horizontalSplit ? 'column' : 'row';
36 const axis = horizontalSplit ? 'height' : 'width';
37 const primarySize = showLeftOnly
38 ? '100%'
39 : `calc(${fraction * 100}% - 0.5px)`;
40 const secondarySize = showRightOnly
41 ? '100%'
42 : `calc(${(1 - fraction) * 100}% - 0.5px)`;
43 const ref = useCallback(
44 (element: HTMLDivElement | null) => {
45 resizeRef(element);
46 stackRef.current = element;
47 },
48 [resizeRef],
49 );
50
51 return (
52 <Stack
53 direction={direction}
54 height="100%"
55 width="100%"
56 overflow="hidden"
57 ref={ref}
58 >
59 {!showRightOnly && <Box {...{ [axis]: primarySize }}>{left}</Box>}
60 <Box
61 sx={{
62 overflow: 'visible',
63 position: 'relative',
64 [axis]: '0px',
65 display: showLeftOnly || showRightOnly ? 'none' : 'flex',
66 flexDirection: direction,
67 [horizontalSplit
68 ? 'borderBottom'
69 : 'borderRight']: `1px solid ${theme.palette.outer.border}`,
70 }}
71 >
72 <Box
73 ref={sliderRef}
74 sx={{
75 display: 'flex',
76 position: 'absolute',
77 [axis]: theme.spacing(2),
78 ...(horizontalSplit
79 ? {
80 top: theme.spacing(-1),
81 left: 0,
82 right: 0,
83 transform: 'translateY(0.5px)',
84 }
85 : {
86 left: theme.spacing(-1),
87 top: 0,
88 bottom: 0,
89 transform: 'translateX(0.5px)',
90 }),
91 zIndex: 999,
92 alignItems: 'center',
93 justifyContent: 'center',
94 color: theme.palette.text.secondary,
95 cursor: horizontalSplit ? 'ns-resize' : 'ew-resize',
96 '.MuiSvgIcon-root': {
97 opacity: resizing ? 1 : 0,
98 },
99 ...(resizing
100 ? {
101 background: alpha(
102 theme.palette.text.primary,
103 theme.palette.action.activatedOpacity,
104 ),
105 }
106 : {
107 '&:hover': {
108 background: alpha(
109 theme.palette.text.primary,
110 theme.palette.action.hoverOpacity,
111 ),
112 '.MuiSvgIcon-root': {
113 opacity: 1,
114 },
115 },
116 }),
117 }}
118 onPointerDown={(event) => {
119 if (event.button !== 0) {
120 return;
121 }
122 sliderRef.current?.setPointerCapture(event.pointerId);
123 setResizing(true);
124 }}
125 onPointerUp={(event) => {
126 if (event.button !== 0) {
127 return;
128 }
129 sliderRef.current?.releasePointerCapture(event.pointerId);
130 setResizing(false);
131 }}
132 onPointerMove={(event) => {
133 if (!resizing) {
134 return;
135 }
136 const container = stackRef.current;
137 if (container === null) {
138 return;
139 }
140 const rect = container.getBoundingClientRect();
141 const newFraction = horizontalSplit
142 ? (event.clientY - rect.top) / rect.height
143 : (event.clientX - rect.left) / rect.width;
144 setFraction(Math.min(0.9, Math.max(0.1, newFraction)));
145 }}
146 onDoubleClick={() => setFraction(0.5)}
147 >
148 {horizontalSplit ? <MoreHorizIcon /> : <MoreVertIcon />}
149 </Box>
150 </Box>
151 {!showLeftOnly && <Box {...{ [axis]: secondarySize }}>{right}</Box>}
152 </Stack>
153 );
154}
155
156DirectionalSplitPane.defaultProps = {
157 primaryOnly: false,
158 secondaryOnly: false,
159};
diff --git a/subprojects/frontend/src/ModelWorkArea.tsx b/subprojects/frontend/src/ModelWorkArea.tsx
new file mode 100644
index 00000000..16e16a97
--- /dev/null
+++ b/subprojects/frontend/src/ModelWorkArea.tsx
@@ -0,0 +1,193 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import CloseIcon from '@mui/icons-material/Close';
8import SentimentVeryDissatisfiedIcon from '@mui/icons-material/SentimentVeryDissatisfied';
9import CircularProgress from '@mui/material/CircularProgress';
10import IconButton from '@mui/material/IconButton';
11import Stack from '@mui/material/Stack';
12import Tab from '@mui/material/Tab';
13import Tabs from '@mui/material/Tabs';
14import { styled } from '@mui/material/styles';
15import { observer } from 'mobx-react-lite';
16
17import DirectionalSplitPane from './DirectionalSplitPane';
18import Loading from './Loading';
19import { useRootStore } from './RootStoreProvider';
20import type GeneratedModelStore from './editor/GeneratedModelStore';
21import GraphPane from './graph/GraphPane';
22import type GraphStore from './graph/GraphStore';
23import TablePane from './table/TablePane';
24import type ThemeStore from './theme/ThemeStore';
25
26const SplitGraphPane = observer(function SplitGraphPane({
27 graph,
28 themeStore,
29}: {
30 graph: GraphStore;
31 themeStore: ThemeStore;
32}): JSX.Element {
33 return (
34 <DirectionalSplitPane
35 primary={<GraphPane graph={graph} />}
36 secondary={<TablePane graph={graph} />}
37 primaryOnly={!themeStore.showTable}
38 secondaryOnly={!themeStore.showGraph}
39 />
40 );
41});
42
43const GenerationStatus = styled('div', {
44 name: 'ModelWorkArea-GenerationStatus',
45 shouldForwardProp: (prop) => prop !== 'error',
46})<{ error: boolean }>(({ error, theme }) => ({
47 color: error ? theme.palette.error.main : theme.palette.text.primary,
48}));
49
50const GeneratedModelPane = observer(function GeneratedModelPane({
51 generatedModel,
52 themeStore,
53}: {
54 generatedModel: GeneratedModelStore;
55 themeStore: ThemeStore;
56}): JSX.Element {
57 const { message, error, graph } = generatedModel;
58
59 if (graph !== undefined) {
60 return <SplitGraphPane graph={graph} themeStore={themeStore} />;
61 }
62
63 return (
64 <Stack
65 direction="column"
66 alignItems="center"
67 justifyContent="center"
68 height="100%"
69 width="100%"
70 overflow="hidden"
71 my={2}
72 >
73 <Stack
74 direction="column"
75 alignItems="center"
76 flexGrow={1}
77 flexShrink={1}
78 flexBasis={0}
79 sx={(theme) => ({
80 maxHeight: '6rem',
81 height: 'calc(100% - 8rem)',
82 marginBottom: theme.spacing(1),
83 padding: error ? 0 : theme.spacing(1),
84 color: theme.palette.text.secondary,
85 '.MuiCircularProgress-root, .MuiCircularProgress-svg, .MuiSvgIcon-root':
86 {
87 height: '100% !important',
88 width: '100% !important',
89 },
90 })}
91 >
92 {error ? (
93 <SentimentVeryDissatisfiedIcon
94 className="VisibilityDialog-emptyIcon"
95 fontSize="inherit"
96 />
97 ) : (
98 <CircularProgress color="inherit" />
99 )}
100 </Stack>
101 <GenerationStatus error={error}>{message}</GenerationStatus>
102 </Stack>
103 );
104});
105
106function ModelWorkArea(): JSX.Element {
107 const { editorStore, themeStore } = useRootStore();
108
109 if (editorStore === undefined) {
110 return <Loading />;
111 }
112
113 const { graph, generatedModels, selectedGeneratedModel } = editorStore;
114
115 const generatedModelNames: string[] = [];
116 const generatedModelTabs: JSX.Element[] = [];
117 generatedModels.forEach((value, key) => {
118 generatedModelNames.push(key);
119 /* eslint-disable react/no-array-index-key -- Key is a string here, not the array index. */
120 generatedModelTabs.push(
121 <Tab
122 label={value.title}
123 key={key}
124 onAuxClick={(event) => {
125 if (event.button === 1) {
126 editorStore.deleteGeneratedModel(key);
127 event.preventDefault();
128 event.stopPropagation();
129 }
130 }}
131 />,
132 );
133 /* eslint-enable react/no-array-index-key */
134 });
135 const generatedModel =
136 selectedGeneratedModel === undefined
137 ? undefined
138 : generatedModels.get(selectedGeneratedModel);
139 const selectedIndex =
140 selectedGeneratedModel === undefined
141 ? 0
142 : generatedModelNames.indexOf(selectedGeneratedModel) + 1;
143
144 return (
145 <Stack direction="column" height="100%" width="100%" overflow="hidden">
146 <Stack
147 direction="row"
148 sx={(theme) => ({
149 display: generatedModelNames.length === 0 ? 'none' : 'flex',
150 alignItems: 'center',
151 borderBottom: `1px solid ${theme.palette.outer.border}`,
152 })}
153 >
154 <Tabs
155 value={selectedIndex}
156 onChange={(_event, value) => {
157 if (value === 0) {
158 editorStore.selectGeneratedModel(undefined);
159 } else if (typeof value === 'number') {
160 editorStore.selectGeneratedModel(generatedModelNames[value - 1]);
161 }
162 }}
163 variant="scrollable"
164 scrollButtons="auto"
165 sx={{ flexGrow: 1 }}
166 >
167 <Tab label="Initial model" />
168 {generatedModelTabs}
169 </Tabs>
170 <IconButton
171 aria-label="Close generated model"
172 onClick={() =>
173 editorStore.deleteGeneratedModel(selectedGeneratedModel)
174 }
175 disabled={selectedIndex === 0}
176 sx={{ mx: 1 }}
177 >
178 <CloseIcon fontSize="small" />
179 </IconButton>
180 </Stack>
181 {generatedModel === undefined ? (
182 <SplitGraphPane graph={graph} themeStore={themeStore} />
183 ) : (
184 <GeneratedModelPane
185 generatedModel={generatedModel}
186 themeStore={themeStore}
187 />
188 )}
189 </Stack>
190 );
191}
192
193export default observer(ModelWorkArea);
diff --git a/subprojects/frontend/src/PaneButtons.tsx b/subprojects/frontend/src/PaneButtons.tsx
new file mode 100644
index 00000000..7e884ab0
--- /dev/null
+++ b/subprojects/frontend/src/PaneButtons.tsx
@@ -0,0 +1,144 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import CodeIcon from '@mui/icons-material/Code';
8import SchemaRoundedIcon from '@mui/icons-material/SchemaRounded';
9import TableChartIcon from '@mui/icons-material/TableChart';
10import ToggleButton from '@mui/material/ToggleButton';
11import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
12import { alpha, styled } from '@mui/material/styles';
13import { observer } from 'mobx-react-lite';
14
15import type ThemeStore from './theme/ThemeStore';
16
17const PaneButtonGroup = styled(ToggleButtonGroup, {
18 name: 'PaneButtons-Group',
19 shouldForwardProp: (prop) => prop !== 'hideLabel',
20})<{ hideLabel: boolean }>(({ theme, hideLabel }) => {
21 const color =
22 theme.palette.mode === 'dark'
23 ? theme.palette.primary.main
24 : theme.palette.text.primary;
25 return {
26 gap: theme.spacing(1),
27 '.MuiToggleButton-root': {
28 fontSize: '1rem',
29 lineHeight: '1.5',
30 border: 'none',
31 ...(hideLabel ? {} : { paddingBlock: 6 }),
32 '&::before': {
33 content: '" "',
34 position: 'absolute',
35 bottom: 0,
36 left: 0,
37 width: '0%',
38 height: '2px',
39 background: color,
40 transition: theme.transitions.create('width', {
41 duration: theme.transitions.duration.standard,
42 }),
43 },
44 '&.MuiToggleButtonGroup-grouped': {
45 borderTopLeftRadius: theme.shape.borderRadius,
46 borderTopRightRadius: theme.shape.borderRadius,
47 borderBottomLeftRadius: 0,
48 borderBottomRightRadius: 0,
49 },
50 '&:not(.Mui-selected)': {
51 color: theme.palette.text.secondary,
52 },
53 '&.Mui-selected': {
54 color,
55 '&::before': {
56 width: '100%',
57 },
58 '&:not(:active)': {
59 background: 'transparent',
60 },
61 '&:hover': {
62 background: alpha(
63 theme.palette.text.primary,
64 theme.palette.action.hoverOpacity,
65 ),
66 '@media (hover: none)': {
67 background: 'transparent',
68 },
69 },
70 },
71 },
72 ...(hideLabel
73 ? {}
74 : {
75 '& svg': {
76 margin: '0 6px 0 -4px',
77 },
78 }),
79 };
80});
81
82function PaneButtons({
83 themeStore,
84 hideLabel,
85}: {
86 themeStore: ThemeStore;
87 hideLabel?: boolean;
88}): JSX.Element {
89 return (
90 <PaneButtonGroup
91 size={hideLabel ? 'small' : 'medium'}
92 hideLabel={hideLabel ?? PaneButtons.defaultProps.hideLabel}
93 >
94 <ToggleButton
95 value="code"
96 selected={themeStore.showCode}
97 onClick={(event) => {
98 if (event.shiftKey || event.ctrlKey) {
99 themeStore.setSelectedPane('code');
100 } else {
101 themeStore.toggleCode();
102 }
103 }}
104 >
105 <CodeIcon fontSize="small" />
106 {!hideLabel && 'Code'}
107 </ToggleButton>
108 <ToggleButton
109 value="graph"
110 selected={themeStore.showGraph}
111 onClick={(event) => {
112 if (event.shiftKey || event.ctrlKey) {
113 themeStore.setSelectedPane('graph', event.shiftKey);
114 } else {
115 themeStore.toggleGraph();
116 }
117 }}
118 >
119 <SchemaRoundedIcon fontSize="small" />
120 {!hideLabel && 'Graph'}
121 </ToggleButton>
122 <ToggleButton
123 value="table"
124 selected={themeStore.showTable}
125 onClick={(event) => {
126 if (event.shiftKey || event.ctrlKey) {
127 themeStore.setSelectedPane('table', event.shiftKey);
128 } else {
129 themeStore.toggleTable();
130 }
131 }}
132 >
133 <TableChartIcon fontSize="small" />
134 {!hideLabel && 'Table'}
135 </ToggleButton>
136 </PaneButtonGroup>
137 );
138}
139
140PaneButtons.defaultProps = {
141 hideLabel: false,
142};
143
144export default observer(PaneButtons);
diff --git a/subprojects/frontend/src/Refinery.tsx b/subprojects/frontend/src/Refinery.tsx
index b5ff94e1..5ad16000 100644
--- a/subprojects/frontend/src/Refinery.tsx
+++ b/subprojects/frontend/src/Refinery.tsx
@@ -10,7 +10,7 @@ import { SnackbarProvider } from 'notistack';
10 10
11import TopBar from './TopBar'; 11import TopBar from './TopBar';
12import UpdateNotification from './UpdateNotification'; 12import UpdateNotification from './UpdateNotification';
13import EditorPane from './editor/EditorPane'; 13import WorkArea from './WorkArea';
14 14
15export default function Refinery(): JSX.Element { 15export default function Refinery(): JSX.Element {
16 return ( 16 return (
@@ -18,7 +18,7 @@ export default function Refinery(): JSX.Element {
18 <UpdateNotification /> 18 <UpdateNotification />
19 <Stack direction="column" height="100%" overflow="auto"> 19 <Stack direction="column" height="100%" overflow="auto">
20 <TopBar /> 20 <TopBar />
21 <EditorPane /> 21 <WorkArea />
22 </Stack> 22 </Stack>
23 </SnackbarProvider> 23 </SnackbarProvider>
24 ); 24 );
diff --git a/subprojects/frontend/src/TopBar.tsx b/subprojects/frontend/src/TopBar.tsx
index f2542b14..867a24a0 100644
--- a/subprojects/frontend/src/TopBar.tsx
+++ b/subprojects/frontend/src/TopBar.tsx
@@ -6,7 +6,6 @@
6 6
7import GitHubIcon from '@mui/icons-material/GitHub'; 7import GitHubIcon from '@mui/icons-material/GitHub';
8import AppBar from '@mui/material/AppBar'; 8import AppBar from '@mui/material/AppBar';
9import Button from '@mui/material/Button';
10import IconButton from '@mui/material/IconButton'; 9import IconButton from '@mui/material/IconButton';
11import Stack from '@mui/material/Stack'; 10import Stack from '@mui/material/Stack';
12import Toolbar from '@mui/material/Toolbar'; 11import Toolbar from '@mui/material/Toolbar';
@@ -17,6 +16,7 @@ import { throttle } from 'lodash-es';
17import { observer } from 'mobx-react-lite'; 16import { observer } from 'mobx-react-lite';
18import { useEffect, useMemo, useState } from 'react'; 17import { useEffect, useMemo, useState } from 'react';
19 18
19import PaneButtons from './PaneButtons';
20import { useRootStore } from './RootStoreProvider'; 20import { useRootStore } from './RootStoreProvider';
21import ToggleDarkModeButton from './ToggleDarkModeButton'; 21import ToggleDarkModeButton from './ToggleDarkModeButton';
22import GenerateButton from './editor/GenerateButton'; 22import GenerateButton from './editor/GenerateButton';
@@ -65,11 +65,12 @@ const DevModeBadge = styled('div')(({ theme }) => ({
65})); 65}));
66 66
67export default observer(function TopBar(): JSX.Element { 67export default observer(function TopBar(): JSX.Element {
68 const { editorStore } = useRootStore(); 68 const { editorStore, themeStore } = useRootStore();
69 const overlayVisible = useWindowControlsOverlayVisible(); 69 const overlayVisible = useWindowControlsOverlayVisible();
70 const { breakpoints } = useTheme(); 70 const { breakpoints } = useTheme();
71 const small = useMediaQuery(breakpoints.down('sm')); 71 const medium = useMediaQuery(breakpoints.up('sm'));
72 const large = useMediaQuery(breakpoints.up('md')); 72 const large = useMediaQuery(breakpoints.up('md'));
73 const veryLarge = useMediaQuery(breakpoints.up('lg'));
73 74
74 return ( 75 return (
75 <AppBar 76 <AppBar
@@ -100,50 +101,46 @@ export default observer(function TopBar(): JSX.Element {
100 py: 0.5, 101 py: 0.5,
101 }} 102 }}
102 > 103 >
103 <Typography variant="h6" component="h1" flexGrow={1}> 104 <Typography variant="h6" component="h1">
104 Refinery {import.meta.env.DEV && <DevModeBadge>Dev</DevModeBadge>} 105 Refinery {import.meta.env.DEV && <DevModeBadge>Dev</DevModeBadge>}
105 </Typography> 106 </Typography>
106 <Stack direction="row" marginRight={1}> 107 <Stack direction="row" alignItems="center" flexGrow={1} marginLeft={1}>
107 <GenerateButton editorStore={editorStore} hideWarnings={small} /> 108 {medium && !large && (
109 <PaneButtons themeStore={themeStore} hideLabel />
110 )}
111 </Stack>
112 {large && (
113 <Stack
114 direction="row"
115 alignItems="center"
116 sx={{
117 position: 'absolute',
118 top: 0,
119 bottom: 0,
120 left: '50%',
121 transform: 'translateX(-50%)',
122 }}
123 >
124 <PaneButtons themeStore={themeStore} />
125 </Stack>
126 )}
127 <Stack
128 direction="row"
129 marginLeft={1}
130 marginRight={1}
131 gap={1}
132 alignItems="center"
133 >
134 <GenerateButton editorStore={editorStore} hideWarnings={!veryLarge} />
108 {large && ( 135 {large && (
109 <> 136 <IconButton
110 <Button 137 aria-label="GitHub"
111 arial-label="Budapest University of Technology and Economics, Critical Systems Research Group" 138 href="https://github.com/graphs4value/refinery"
112 className="rounded" 139 target="_blank"
113 color="inherit" 140 color="inherit"
114 href="https://ftsrg.mit.bme.hu" 141 >
115 target="_blank" 142 <GitHubIcon />
116 sx={{ marginLeft: 1 }} 143 </IconButton>
117 >
118 BME FTSRG
119 </Button>
120 <Button
121 aria-label="McGill University, Department of Electrical and Computer Engineering"
122 className="rounded"
123 color="inherit"
124 href="https://www.mcgill.ca/ece/daniel-varro"
125 target="_blank"
126 >
127 McGill ECE
128 </Button>
129 <Button
130 aria-label="2022 Amazon Research Awards recipent"
131 className="rounded"
132 color="inherit"
133 href="https://www.amazon.science/research-awards/recipients/daniel-varro-fall-2021"
134 target="_blank"
135 >
136 Amazon Science
137 </Button>
138 <IconButton
139 aria-label="GitHub"
140 href="https://github.com/graphs4value/refinery"
141 target="_blank"
142 color="inherit"
143 >
144 <GitHubIcon />
145 </IconButton>
146 </>
147 )} 144 )}
148 </Stack> 145 </Stack>
149 <ToggleDarkModeButton /> 146 <ToggleDarkModeButton />
diff --git a/subprojects/frontend/src/WorkArea.tsx b/subprojects/frontend/src/WorkArea.tsx
new file mode 100644
index 00000000..a1fbf7dc
--- /dev/null
+++ b/subprojects/frontend/src/WorkArea.tsx
@@ -0,0 +1,25 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { observer } from 'mobx-react-lite';
8
9import DirectionalSplitPane from './DirectionalSplitPane';
10import ModelWorkArea from './ModelWorkArea';
11import { useRootStore } from './RootStoreProvider';
12import EditorPane from './editor/EditorPane';
13
14export default observer(function WorkArea(): JSX.Element {
15 const { themeStore } = useRootStore();
16
17 return (
18 <DirectionalSplitPane
19 primary={<EditorPane />}
20 secondary={<ModelWorkArea />}
21 primaryOnly={!themeStore.showGraph && !themeStore.showTable}
22 secondaryOnly={!themeStore.showCode}
23 />
24 );
25});
diff --git a/subprojects/frontend/src/editor/AnalysisErrorNotification.tsx b/subprojects/frontend/src/editor/AnalysisErrorNotification.tsx
new file mode 100644
index 00000000..591a3600
--- /dev/null
+++ b/subprojects/frontend/src/editor/AnalysisErrorNotification.tsx
@@ -0,0 +1,74 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { reaction } from 'mobx';
8import { type SnackbarKey, useSnackbar } from 'notistack';
9import { useEffect, useState } from 'react';
10
11import type EditorStore from './EditorStore';
12
13function MessageObserver({
14 editorStore,
15}: {
16 editorStore: EditorStore;
17}): React.ReactNode {
18 const [message, setMessage] = useState(
19 editorStore.delayedErrors.semanticsError ?? '',
20 );
21 // Instead of making this component an `observer`,
22 // we only update the message is one is present to make sure that the
23 // disappear animation has a chance to complete.
24 useEffect(
25 () =>
26 reaction(
27 () => editorStore.delayedErrors.semanticsError,
28 (newMessage) => {
29 if (newMessage !== undefined) {
30 setMessage(newMessage);
31 }
32 },
33 { fireImmediately: false },
34 ),
35 [editorStore],
36 );
37 return message;
38}
39
40export default function AnalysisErrorNotification({
41 editorStore,
42}: {
43 editorStore: EditorStore;
44}): null {
45 const { enqueueSnackbar, closeSnackbar } = useSnackbar();
46 useEffect(() => {
47 let key: SnackbarKey | undefined;
48 const disposer = reaction(
49 () => editorStore.delayedErrors.semanticsError !== undefined,
50 (hasError) => {
51 if (hasError) {
52 if (key === undefined) {
53 key = enqueueSnackbar({
54 message: <MessageObserver editorStore={editorStore} />,
55 variant: 'error',
56 persist: true,
57 });
58 }
59 } else if (key !== undefined) {
60 closeSnackbar(key);
61 key = undefined;
62 }
63 },
64 { fireImmediately: true },
65 );
66 return () => {
67 disposer();
68 if (key !== undefined) {
69 closeSnackbar(key);
70 }
71 };
72 }, [editorStore, enqueueSnackbar, closeSnackbar]);
73 return null;
74}
diff --git a/subprojects/frontend/src/editor/AnimatedButton.tsx b/subprojects/frontend/src/editor/AnimatedButton.tsx
index dbbda618..606aabea 100644
--- a/subprojects/frontend/src/editor/AnimatedButton.tsx
+++ b/subprojects/frontend/src/editor/AnimatedButton.tsx
@@ -45,10 +45,10 @@ export default function AnimatedButton({
45 children, 45 children,
46}: { 46}: {
47 'aria-label'?: string; 47 'aria-label'?: string;
48 onClick?: () => void; 48 onClick?: React.MouseEventHandler<HTMLElement>;
49 color: 'error' | 'warning' | 'primary' | 'inherit'; 49 color: 'error' | 'warning' | 'primary' | 'inherit';
50 disabled?: boolean; 50 disabled?: boolean;
51 startIcon: JSX.Element; 51 startIcon?: JSX.Element;
52 sx?: SxProps<Theme> | undefined; 52 sx?: SxProps<Theme> | undefined;
53 children?: ReactNode; 53 children?: ReactNode;
54}): JSX.Element { 54}): JSX.Element {
@@ -79,7 +79,11 @@ export default function AnimatedButton({
79 className="rounded shaded" 79 className="rounded shaded"
80 disabled={disabled ?? false} 80 disabled={disabled ?? false}
81 startIcon={startIcon} 81 startIcon={startIcon}
82 width={width === undefined ? 'auto' : `calc(${width} + 50px)`} 82 width={
83 width === undefined
84 ? 'auto'
85 : `calc(${width} + ${startIcon === undefined ? 28 : 50}px)`
86 }
83 > 87 >
84 <Box 88 <Box
85 display="flex" 89 display="flex"
@@ -100,6 +104,7 @@ AnimatedButton.defaultProps = {
100 'aria-label': undefined, 104 'aria-label': undefined,
101 onClick: undefined, 105 onClick: undefined,
102 disabled: false, 106 disabled: false,
107 startIcon: undefined,
103 sx: undefined, 108 sx: undefined,
104 children: undefined, 109 children: undefined,
105}; 110};
diff --git a/subprojects/frontend/src/editor/DiagnosticValue.ts b/subprojects/frontend/src/editor/DiagnosticValue.ts
index 20478262..410a46b7 100644
--- a/subprojects/frontend/src/editor/DiagnosticValue.ts
+++ b/subprojects/frontend/src/editor/DiagnosticValue.ts
@@ -14,6 +14,7 @@ export default class DiagnosticValue extends RangeValue {
14 error: new DiagnosticValue('error'), 14 error: new DiagnosticValue('error'),
15 warning: new DiagnosticValue('warning'), 15 warning: new DiagnosticValue('warning'),
16 info: new DiagnosticValue('info'), 16 info: new DiagnosticValue('info'),
17 hint: new DiagnosticValue('hint'),
17 }; 18 };
18 19
19 private constructor(public readonly severity: Severity) { 20 private constructor(public readonly severity: Severity) {
diff --git a/subprojects/frontend/src/editor/EditorButtons.tsx b/subprojects/frontend/src/editor/EditorButtons.tsx
index 9b187e5c..ca51f975 100644
--- a/subprojects/frontend/src/editor/EditorButtons.tsx
+++ b/subprojects/frontend/src/editor/EditorButtons.tsx
@@ -5,8 +5,8 @@
5 */ 5 */
6 6
7import type { Diagnostic } from '@codemirror/lint'; 7import type { Diagnostic } from '@codemirror/lint';
8import CancelIcon from '@mui/icons-material/Cancel';
8import CheckIcon from '@mui/icons-material/Check'; 9import CheckIcon from '@mui/icons-material/Check';
9import ErrorIcon from '@mui/icons-material/Error';
10import FormatListNumberedIcon from '@mui/icons-material/FormatListNumbered'; 10import FormatListNumberedIcon from '@mui/icons-material/FormatListNumbered';
11import FormatPaint from '@mui/icons-material/FormatPaint'; 11import FormatPaint from '@mui/icons-material/FormatPaint';
12import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'; 12import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
@@ -28,7 +28,7 @@ import type EditorStore from './EditorStore';
28function getLintIcon(severity: Diagnostic['severity'] | undefined) { 28function getLintIcon(severity: Diagnostic['severity'] | undefined) {
29 switch (severity) { 29 switch (severity) {
30 case 'error': 30 case 'error':
31 return <ErrorIcon fontSize="small" />; 31 return <CancelIcon fontSize="small" />;
32 case 'warning': 32 case 'warning':
33 return <WarningIcon fontSize="small" />; 33 return <WarningIcon fontSize="small" />;
34 case 'info': 34 case 'info':
@@ -95,7 +95,7 @@ export default observer(function EditorButtons({
95 })} 95 })}
96 value="show-lint-panel" 96 value="show-lint-panel"
97 > 97 >
98 {getLintIcon(editorStore?.highestDiagnosticLevel)} 98 {getLintIcon(editorStore?.delayedErrors?.highestDiagnosticLevel)}
99 </ToggleButton> 99 </ToggleButton>
100 </ToggleButtonGroup> 100 </ToggleButtonGroup>
101 <IconButton 101 <IconButton
diff --git a/subprojects/frontend/src/editor/EditorErrors.tsx b/subprojects/frontend/src/editor/EditorErrors.tsx
new file mode 100644
index 00000000..40becf7e
--- /dev/null
+++ b/subprojects/frontend/src/editor/EditorErrors.tsx
@@ -0,0 +1,93 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { Diagnostic } from '@codemirror/lint';
8import { type IReactionDisposer, makeAutoObservable, reaction } from 'mobx';
9
10import type EditorStore from './EditorStore';
11
12const HYSTERESIS_TIME_MS = 250;
13
14export interface State {
15 analyzing: boolean;
16 errorCount: number;
17 warningCount: number;
18 infoCount: number;
19 semanticsError: string | undefined;
20}
21
22export default class EditorErrors implements State {
23 private readonly disposer: IReactionDisposer;
24
25 private timer: number | undefined;
26
27 analyzing = false;
28
29 errorCount = 0;
30
31 warningCount = 0;
32
33 infoCount = 0;
34
35 semanticsError: string | undefined;
36
37 constructor(private readonly store: EditorStore) {
38 this.updateImmediately(this.getNextState());
39 makeAutoObservable<EditorErrors, 'disposer' | 'timer'>(this, {
40 disposer: false,
41 timer: false,
42 });
43 this.disposer = reaction(
44 () => this.getNextState(),
45 (nextState) => {
46 if (this.timer !== undefined) {
47 clearTimeout(this.timer);
48 this.timer = undefined;
49 }
50 if (nextState.analyzing) {
51 this.timer = setTimeout(
52 () => this.updateImmediately(nextState),
53 HYSTERESIS_TIME_MS,
54 );
55 } else {
56 this.updateImmediately(nextState);
57 }
58 },
59 { fireImmediately: true },
60 );
61 }
62
63 get highestDiagnosticLevel(): Diagnostic['severity'] | undefined {
64 if (this.errorCount > 0) {
65 return 'error';
66 }
67 if (this.warningCount > 0) {
68 return 'warning';
69 }
70 if (this.infoCount > 0) {
71 return 'info';
72 }
73 return undefined;
74 }
75
76 private getNextState(): State {
77 return {
78 analyzing: this.store.analyzing,
79 errorCount: this.store.errorCount,
80 warningCount: this.store.warningCount,
81 infoCount: this.store.infoCount,
82 semanticsError: this.store.semanticsError,
83 };
84 }
85
86 private updateImmediately(nextState: State) {
87 Object.assign(this, nextState);
88 }
89
90 dispose() {
91 this.disposer();
92 }
93}
diff --git a/subprojects/frontend/src/editor/EditorPane.tsx b/subprojects/frontend/src/editor/EditorPane.tsx
index 87f408fe..1125a0ec 100644
--- a/subprojects/frontend/src/editor/EditorPane.tsx
+++ b/subprojects/frontend/src/editor/EditorPane.tsx
@@ -13,6 +13,7 @@ import { useState } from 'react';
13 13
14import { useRootStore } from '../RootStoreProvider'; 14import { useRootStore } from '../RootStoreProvider';
15 15
16import AnalysisErrorNotification from './AnalysisErrorNotification';
16import ConnectionStatusNotification from './ConnectionStatusNotification'; 17import ConnectionStatusNotification from './ConnectionStatusNotification';
17import EditorArea from './EditorArea'; 18import EditorArea from './EditorArea';
18import EditorButtons from './EditorButtons'; 19import EditorButtons from './EditorButtons';
@@ -39,7 +40,7 @@ export default observer(function EditorPane(): JSX.Element {
39 const { editorStore } = useRootStore(); 40 const { editorStore } = useRootStore();
40 41
41 return ( 42 return (
42 <Stack direction="column" flexGrow={1} flexShrink={1} overflow="auto"> 43 <Stack direction="column" height="100%" overflow="auto">
43 <Toolbar variant="dense"> 44 <Toolbar variant="dense">
44 <EditorButtons editorStore={editorStore} /> 45 <EditorButtons editorStore={editorStore} />
45 </Toolbar> 46 </Toolbar>
@@ -48,6 +49,7 @@ export default observer(function EditorPane(): JSX.Element {
48 <EditorLoading /> 49 <EditorLoading />
49 ) : ( 50 ) : (
50 <> 51 <>
52 <AnalysisErrorNotification editorStore={editorStore} />
51 <ConnectionStatusNotification editorStore={editorStore} /> 53 <ConnectionStatusNotification editorStore={editorStore} />
52 <SearchPanelPortal editorStore={editorStore} /> 54 <SearchPanelPortal editorStore={editorStore} />
53 <EditorArea editorStore={editorStore} /> 55 <EditorArea editorStore={editorStore} />
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts
index b98f085e..9508858d 100644
--- a/subprojects/frontend/src/editor/EditorStore.ts
+++ b/subprojects/frontend/src/editor/EditorStore.ts
@@ -26,9 +26,13 @@ import { makeAutoObservable, observable, runInAction } from 'mobx';
26import { nanoid } from 'nanoid'; 26import { nanoid } from 'nanoid';
27 27
28import type PWAStore from '../PWAStore'; 28import type PWAStore from '../PWAStore';
29import GraphStore from '../graph/GraphStore';
29import getLogger from '../utils/getLogger'; 30import getLogger from '../utils/getLogger';
30import type XtextClient from '../xtext/XtextClient'; 31import type XtextClient from '../xtext/XtextClient';
32import type { SemanticsSuccessResult } from '../xtext/xtextServiceResults';
31 33
34import EditorErrors from './EditorErrors';
35import GeneratedModelStore from './GeneratedModelStore';
32import LintPanelStore from './LintPanelStore'; 36import LintPanelStore from './LintPanelStore';
33import SearchPanelStore from './SearchPanelStore'; 37import SearchPanelStore from './SearchPanelStore';
34import createEditorState from './createEditorState'; 38import createEditorState from './createEditorState';
@@ -54,13 +58,26 @@ export default class EditorStore {
54 58
55 readonly lintPanel: LintPanelStore; 59 readonly lintPanel: LintPanelStore;
56 60
61 readonly delayedErrors: EditorErrors;
62
57 showLineNumbers = false; 63 showLineNumbers = false;
58 64
59 disposed = false; 65 disposed = false;
60 66
67 analyzing = false;
68
69 semanticsError: string | undefined;
70
71 graph: GraphStore;
72
73 generatedModels = new Map<string, GeneratedModelStore>();
74
75 selectedGeneratedModel: string | undefined;
76
61 constructor(initialValue: string, pwaStore: PWAStore) { 77 constructor(initialValue: string, pwaStore: PWAStore) {
62 this.id = nanoid(); 78 this.id = nanoid();
63 this.state = createEditorState(initialValue, this); 79 this.state = createEditorState(initialValue, this);
80 this.delayedErrors = new EditorErrors(this);
64 this.searchPanel = new SearchPanelStore(this); 81 this.searchPanel = new SearchPanelStore(this);
65 this.lintPanel = new LintPanelStore(this); 82 this.lintPanel = new LintPanelStore(this);
66 (async () => { 83 (async () => {
@@ -75,6 +92,7 @@ export default class EditorStore {
75 })().catch((error) => { 92 })().catch((error) => {
76 log.error('Failed to load XtextClient', error); 93 log.error('Failed to load XtextClient', error);
77 }); 94 });
95 this.graph = new GraphStore();
78 makeAutoObservable<EditorStore, 'client'>(this, { 96 makeAutoObservable<EditorStore, 'client'>(this, {
79 id: false, 97 id: false,
80 state: observable.ref, 98 state: observable.ref,
@@ -213,19 +231,6 @@ export default class EditorStore {
213 this.doCommand(nextDiagnostic); 231 this.doCommand(nextDiagnostic);
214 } 232 }
215 233
216 get highestDiagnosticLevel(): Diagnostic['severity'] | undefined {
217 if (this.errorCount > 0) {
218 return 'error';
219 }
220 if (this.warningCount > 0) {
221 return 'warning';
222 }
223 if (this.infoCount > 0) {
224 return 'info';
225 }
226 return undefined;
227 }
228
229 updateSemanticHighlighting(ranges: IHighlightRange[]): void { 234 updateSemanticHighlighting(ranges: IHighlightRange[]): void {
230 this.dispatch(setSemanticHighlighting(ranges)); 235 this.dispatch(setSemanticHighlighting(ranges));
231 } 236 }
@@ -282,8 +287,109 @@ export default class EditorStore {
282 return true; 287 return true;
283 } 288 }
284 289
290 analysisStarted() {
291 this.analyzing = true;
292 }
293
294 analysisCompleted(semanticAnalysisSkipped = false) {
295 this.analyzing = false;
296 if (semanticAnalysisSkipped) {
297 this.semanticsError = undefined;
298 }
299 }
300
301 setSemanticsError(semanticsError: string) {
302 this.semanticsError = semanticsError;
303 }
304
305 setSemantics(semantics: SemanticsSuccessResult) {
306 this.semanticsError = undefined;
307 this.graph.setSemantics(semantics);
308 }
309
285 dispose(): void { 310 dispose(): void {
286 this.client?.dispose(); 311 this.client?.dispose();
312 this.delayedErrors.dispose();
287 this.disposed = true; 313 this.disposed = true;
288 } 314 }
315
316 startModelGeneration(randomSeed?: number): void {
317 this.client
318 ?.startModelGeneration(randomSeed)
319 ?.catch((error) => log.error('Could not start model generation', error));
320 }
321
322 addGeneratedModel(uuid: string, randomSeed: number): void {
323 this.generatedModels.set(uuid, new GeneratedModelStore(randomSeed));
324 this.selectGeneratedModel(uuid);
325 }
326
327 cancelModelGeneration(): void {
328 this.client
329 ?.cancelModelGeneration()
330 ?.catch((error) => log.error('Could not start model generation', error));
331 }
332
333 selectGeneratedModel(uuid: string | undefined): void {
334 if (uuid === undefined) {
335 this.selectedGeneratedModel = uuid;
336 return;
337 }
338 if (this.generatedModels.has(uuid)) {
339 this.selectedGeneratedModel = uuid;
340 return;
341 }
342 this.selectedGeneratedModel = undefined;
343 }
344
345 deleteGeneratedModel(uuid: string | undefined): void {
346 if (uuid === undefined) {
347 return;
348 }
349 if (this.selectedGeneratedModel === uuid) {
350 let previous: string | undefined;
351 let found: string | undefined;
352 this.generatedModels.forEach((_value, key) => {
353 if (key === uuid) {
354 found = previous;
355 }
356 previous = key;
357 });
358 this.selectGeneratedModel(found);
359 }
360 const generatedModel = this.generatedModels.get(uuid);
361 if (generatedModel !== undefined && generatedModel.running) {
362 this.cancelModelGeneration();
363 }
364 this.generatedModels.delete(uuid);
365 }
366
367 modelGenerationCancelled(): void {
368 this.generatedModels.forEach((value) =>
369 value.setError('Model generation cancelled'),
370 );
371 }
372
373 setGeneratedModelMessage(uuid: string, message: string): void {
374 this.generatedModels.get(uuid)?.setMessage(message);
375 }
376
377 setGeneratedModelError(uuid: string, message: string): void {
378 this.generatedModels.get(uuid)?.setError(message);
379 }
380
381 setGeneratedModelSemantics(
382 uuid: string,
383 semantics: SemanticsSuccessResult,
384 ): void {
385 this.generatedModels.get(uuid)?.setSemantics(semantics);
386 }
387
388 get generating(): boolean {
389 let generating = false;
390 this.generatedModels.forEach((value) => {
391 generating = generating || value.running;
392 });
393 return generating;
394 }
289} 395}
diff --git a/subprojects/frontend/src/editor/EditorTheme.ts b/subprojects/frontend/src/editor/EditorTheme.ts
index e057ce18..055b62e2 100644
--- a/subprojects/frontend/src/editor/EditorTheme.ts
+++ b/subprojects/frontend/src/editor/EditorTheme.ts
@@ -4,15 +4,13 @@
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6 6
7import errorSVG from '@material-icons/svg/svg/error/baseline.svg?raw'; 7import cancelSVG from '@material-icons/svg/svg/cancel/baseline.svg?raw';
8import expandMoreSVG from '@material-icons/svg/svg/expand_more/baseline.svg?raw'; 8import expandMoreSVG from '@material-icons/svg/svg/expand_more/baseline.svg?raw';
9import infoSVG from '@material-icons/svg/svg/info/baseline.svg?raw'; 9import infoSVG from '@material-icons/svg/svg/info/baseline.svg?raw';
10import warningSVG from '@material-icons/svg/svg/warning/baseline.svg?raw'; 10import warningSVG from '@material-icons/svg/svg/warning/baseline.svg?raw';
11import { alpha, styled, type CSSObject } from '@mui/material/styles'; 11import { alpha, styled, type CSSObject } from '@mui/material/styles';
12 12
13function svgURL(svg: string): string { 13import svgURL from '../utils/svgURL';
14 return `url('data:image/svg+xml;utf8,${svg}')`;
15}
16 14
17export default styled('div', { 15export default styled('div', {
18 name: 'EditorTheme', 16 name: 'EditorTheme',
@@ -56,15 +54,16 @@ export default styled('div', {
56 '.cm-activeLineGutter': { 54 '.cm-activeLineGutter': {
57 background: 'transparent', 55 background: 'transparent',
58 }, 56 },
59 '.cm-cursor, .cm-cursor-primary': { 57 '.cm-cursor, .cm-dropCursor, .cm-cursor-primary': {
60 borderLeft: `2px solid ${theme.palette.info.main}`, 58 borderLeft: `2px solid ${theme.palette.info.main}`,
59 marginLeft: -1,
61 }, 60 },
62 '.cm-selectionBackground': { 61 '.cm-selectionBackground': {
63 background: theme.palette.highlight.selection, 62 background: theme.palette.highlight.selection,
64 }, 63 },
65 '.cm-focused': { 64 '.cm-focused': {
66 outline: 'none', 65 outline: 'none',
67 '.cm-selectionBackground': { 66 '& > .cm-scroller > .cm-selectionLayer .cm-selectionBackground': {
68 background: theme.palette.highlight.selection, 67 background: theme.palette.highlight.selection,
69 }, 68 },
70 }, 69 },
@@ -106,7 +105,7 @@ export default styled('div', {
106 color: theme.palette.text.primary, 105 color: theme.palette.text.primary,
107 }, 106 },
108 }, 107 },
109 '.tok-problem-abstract, .tok-problem-new': { 108 '.tok-problem-abstract': {
110 fontStyle: 'italic', 109 fontStyle: 'italic',
111 }, 110 },
112 '.tok-problem-containment': { 111 '.tok-problem-containment': {
@@ -331,7 +330,7 @@ export default styled('div', {
331 '.cm-lintRange-active': { 330 '.cm-lintRange-active': {
332 background: theme.palette.highlight.activeLintRange, 331 background: theme.palette.highlight.activeLintRange,
333 }, 332 },
334 ...lintSeverityStyle('error', errorSVG, 120), 333 ...lintSeverityStyle('error', cancelSVG, 120),
335 ...lintSeverityStyle('warning', warningSVG, 110), 334 ...lintSeverityStyle('warning', warningSVG, 110),
336 ...lintSeverityStyle('info', infoSVG, 100), 335 ...lintSeverityStyle('info', infoSVG, 100),
337 }; 336 };
diff --git a/subprojects/frontend/src/editor/GenerateButton.tsx b/subprojects/frontend/src/editor/GenerateButton.tsx
index 3837ef8e..b6b1655a 100644
--- a/subprojects/frontend/src/editor/GenerateButton.tsx
+++ b/subprojects/frontend/src/editor/GenerateButton.tsx
@@ -4,10 +4,9 @@
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6 6
7import DangerousOutlinedIcon from '@mui/icons-material/DangerousOutlined'; 7import CancelIcon from '@mui/icons-material/Cancel';
8import CloseIcon from '@mui/icons-material/Close';
8import PlayArrowIcon from '@mui/icons-material/PlayArrow'; 9import PlayArrowIcon from '@mui/icons-material/PlayArrow';
9import Button from '@mui/material/Button';
10import type { SxProps, Theme } from '@mui/material/styles';
11import { observer } from 'mobx-react-lite'; 10import { observer } from 'mobx-react-lite';
12 11
13import AnimatedButton from './AnimatedButton'; 12import AnimatedButton from './AnimatedButton';
@@ -18,26 +17,59 @@ const GENERATE_LABEL = 'Generate';
18const GenerateButton = observer(function GenerateButton({ 17const GenerateButton = observer(function GenerateButton({
19 editorStore, 18 editorStore,
20 hideWarnings, 19 hideWarnings,
21 sx,
22}: { 20}: {
23 editorStore: EditorStore | undefined; 21 editorStore: EditorStore | undefined;
24 hideWarnings?: boolean | undefined; 22 hideWarnings?: boolean | undefined;
25 sx?: SxProps<Theme> | undefined;
26}): JSX.Element { 23}): JSX.Element {
27 if (editorStore === undefined) { 24 if (editorStore === undefined) {
28 return ( 25 return (
29 <Button 26 <AnimatedButton color="inherit" disabled>
27 Loading&hellip;
28 </AnimatedButton>
29 );
30 }
31
32 const {
33 delayedErrors: { analyzing, errorCount, warningCount, semanticsError },
34 generating,
35 } = editorStore;
36
37 if (analyzing) {
38 return (
39 <AnimatedButton color="inherit" disabled>
40 Analyzing&hellip;
41 </AnimatedButton>
42 );
43 }
44
45 if (generating) {
46 return (
47 <AnimatedButton
30 color="inherit" 48 color="inherit"
31 className="rounded shaded" 49 onClick={() => editorStore.cancelModelGeneration()}
32 disabled 50 startIcon={<CloseIcon />}
33 {...(sx === undefined ? {} : { sx })}
34 > 51 >
35 Loading&hellip; 52 Cancel
36 </Button> 53 </AnimatedButton>
37 ); 54 );
38 } 55 }
39 56
40 const { errorCount, warningCount } = editorStore; 57 if (semanticsError !== undefined && editorStore.opened) {
58 return (
59 <AnimatedButton
60 color="error"
61 disabled
62 startIcon={<CancelIcon />}
63 sx={(theme) => ({
64 '&.Mui-disabled': {
65 color: `${theme.palette.error.main} !important`,
66 },
67 })}
68 >
69 Analysis error
70 </AnimatedButton>
71 );
72 }
41 73
42 const diagnostics: string[] = []; 74 const diagnostics: string[] = [];
43 if (errorCount > 0) { 75 if (errorCount > 0) {
@@ -54,8 +86,7 @@ const GenerateButton = observer(function GenerateButton({
54 aria-label={`Select next diagnostic out of ${summary}`} 86 aria-label={`Select next diagnostic out of ${summary}`}
55 onClick={() => editorStore.nextDiagnostic()} 87 onClick={() => editorStore.nextDiagnostic()}
56 color="error" 88 color="error"
57 startIcon={<DangerousOutlinedIcon />} 89 startIcon={<CancelIcon />}
58 {...(sx === undefined ? {} : { sx })}
59 > 90 >
60 {summary} 91 {summary}
61 </AnimatedButton> 92 </AnimatedButton>
@@ -67,7 +98,13 @@ const GenerateButton = observer(function GenerateButton({
67 disabled={!editorStore.opened} 98 disabled={!editorStore.opened}
68 color={warningCount > 0 ? 'warning' : 'primary'} 99 color={warningCount > 0 ? 'warning' : 'primary'}
69 startIcon={<PlayArrowIcon />} 100 startIcon={<PlayArrowIcon />}
70 {...(sx === undefined ? {} : { sx })} 101 onClick={(event) => {
102 if (event.shiftKey) {
103 editorStore.startModelGeneration(1);
104 } else {
105 editorStore.startModelGeneration();
106 }
107 }}
71 > 108 >
72 {summary === '' ? GENERATE_LABEL : `${GENERATE_LABEL} (${summary})`} 109 {summary === '' ? GENERATE_LABEL : `${GENERATE_LABEL} (${summary})`}
73 </AnimatedButton> 110 </AnimatedButton>
@@ -76,7 +113,6 @@ const GenerateButton = observer(function GenerateButton({
76 113
77GenerateButton.defaultProps = { 114GenerateButton.defaultProps = {
78 hideWarnings: false, 115 hideWarnings: false,
79 sx: undefined,
80}; 116};
81 117
82export default GenerateButton; 118export default GenerateButton;
diff --git a/subprojects/frontend/src/editor/GeneratedModelStore.ts b/subprojects/frontend/src/editor/GeneratedModelStore.ts
new file mode 100644
index 00000000..5088d603
--- /dev/null
+++ b/subprojects/frontend/src/editor/GeneratedModelStore.ts
@@ -0,0 +1,50 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { makeAutoObservable } from 'mobx';
8
9import GraphStore from '../graph/GraphStore';
10import type { SemanticsSuccessResult } from '../xtext/xtextServiceResults';
11
12export default class GeneratedModelStore {
13 title: string;
14
15 message = 'Waiting for server';
16
17 error = false;
18
19 graph: GraphStore | undefined;
20
21 constructor(randomSeed: number) {
22 const time = new Date().toLocaleTimeString(undefined, { hour12: false });
23 this.title = `Generated at ${time} (${randomSeed})`;
24 makeAutoObservable(this);
25 }
26
27 get running(): boolean {
28 return !this.error && this.graph === undefined;
29 }
30
31 setMessage(message: string): void {
32 if (this.running) {
33 this.message = message;
34 }
35 }
36
37 setError(message: string): void {
38 if (this.running) {
39 this.error = true;
40 this.message = message;
41 }
42 }
43
44 setSemantics(semantics: SemanticsSuccessResult): void {
45 if (this.running) {
46 this.graph = new GraphStore();
47 this.graph.setSemantics(semantics);
48 }
49 }
50}
diff --git a/subprojects/frontend/src/graph/DotGraphVisualizer.tsx b/subprojects/frontend/src/graph/DotGraphVisualizer.tsx
new file mode 100644
index 00000000..eec72a7d
--- /dev/null
+++ b/subprojects/frontend/src/graph/DotGraphVisualizer.tsx
@@ -0,0 +1,162 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import * as d3 from 'd3';
8import { type Graphviz, graphviz } from 'd3-graphviz';
9import type { BaseType, Selection } from 'd3-selection';
10import { reaction, type IReactionDisposer } from 'mobx';
11import { observer } from 'mobx-react-lite';
12import { useCallback, useRef, useState } from 'react';
13
14import getLogger from '../utils/getLogger';
15
16import type GraphStore from './GraphStore';
17import GraphTheme from './GraphTheme';
18import { FitZoomCallback } from './ZoomCanvas';
19import dotSource from './dotSource';
20import postProcessSvg from './postProcessSVG';
21
22const LOG = getLogger('graph.DotGraphVisualizer');
23
24function ptToPx(pt: number): number {
25 return (pt * 4) / 3;
26}
27
28function DotGraphVisualizer({
29 graph,
30 fitZoom,
31 transitionTime,
32 animateThreshold,
33}: {
34 graph: GraphStore;
35 fitZoom?: FitZoomCallback;
36 transitionTime?: number;
37 animateThreshold?: number;
38}): JSX.Element {
39 const transitionTimeOrDefault =
40 transitionTime ?? DotGraphVisualizer.defaultProps.transitionTime;
41 const animateThresholdOrDefault =
42 animateThreshold ?? DotGraphVisualizer.defaultProps.animateThreshold;
43 const disposerRef = useRef<IReactionDisposer | undefined>();
44 const graphvizRef = useRef<
45 Graphviz<BaseType, unknown, null, undefined> | undefined
46 >();
47 const [animate, setAnimate] = useState(true);
48
49 const setElement = useCallback(
50 (element: HTMLDivElement | null) => {
51 if (disposerRef.current !== undefined) {
52 disposerRef.current();
53 disposerRef.current = undefined;
54 }
55 if (graphvizRef.current !== undefined) {
56 // `@types/d3-graphviz` does not contain the signature for the `destroy` method.
57 (graphvizRef.current as unknown as { destroy(): void }).destroy();
58 graphvizRef.current = undefined;
59 }
60 if (element !== null) {
61 element.replaceChildren();
62 const renderer = graphviz(element) as Graphviz<
63 BaseType,
64 unknown,
65 null,
66 undefined
67 >;
68 renderer.keyMode('id');
69 ['TRUE', 'UNKNOWN', 'ERROR'].forEach((icon) =>
70 renderer.addImage(`#${icon}`, 16, 16),
71 );
72 renderer.zoom(false);
73 renderer.tweenPrecision('5%');
74 renderer.tweenShapes(false);
75 renderer.convertEqualSidedPolygons(false);
76 if (animate) {
77 const transition = () =>
78 d3
79 .transition()
80 .duration(transitionTimeOrDefault)
81 .ease(d3.easeCubic);
82 /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument,
83 @typescript-eslint/no-explicit-any --
84 Workaround for error in `@types/d3-graphviz`.
85 */
86 renderer.transition(transition as any);
87 } else {
88 renderer.tweenPaths(false);
89 }
90 let newViewBox = { width: 0, height: 0 };
91 renderer.onerror(LOG.error.bind(LOG));
92 renderer.on(
93 'postProcessSVG',
94 // @ts-expect-error Custom `d3-graphviz` hook not covered by typings.
95 (
96 svgSelection: Selection<SVGSVGElement, unknown, BaseType, unknown>,
97 ) => {
98 const svg = svgSelection.node();
99 if (svg !== null) {
100 postProcessSvg(svg);
101 newViewBox = {
102 width: ptToPx(svg.viewBox.baseVal.width),
103 height: ptToPx(svg.viewBox.baseVal.height),
104 };
105 } else {
106 // Do not trigger fit zoom.
107 newViewBox = { width: 0, height: 0 };
108 }
109 },
110 );
111 renderer.on('renderEnd', () => {
112 // `d3-graphviz` uses `<title>` elements for traceability,
113 // so we only remove them after the rendering is finished.
114 d3.select(element).selectAll('title').remove();
115 });
116 if (fitZoom !== undefined) {
117 if (animate) {
118 renderer.on('transitionStart', () => fitZoom(newViewBox));
119 } else {
120 renderer.on('end', () => fitZoom(false));
121 }
122 }
123 disposerRef.current = reaction(
124 () => dotSource(graph),
125 (result) => {
126 if (result === undefined) {
127 return;
128 }
129 const [source, size] = result;
130 // Disable tweening for large graphs to improve performance.
131 // See https://github.com/magjac/d3-graphviz/issues/232#issuecomment-1157555213
132 const newAnimate = size < animateThresholdOrDefault;
133 if (animate === newAnimate) {
134 renderer.renderDot(source);
135 } else {
136 setAnimate(newAnimate);
137 }
138 },
139 { fireImmediately: true },
140 );
141 graphvizRef.current = renderer;
142 }
143 },
144 [
145 graph,
146 fitZoom,
147 transitionTimeOrDefault,
148 animateThresholdOrDefault,
149 animate,
150 ],
151 );
152
153 return <GraphTheme ref={setElement} />;
154}
155
156DotGraphVisualizer.defaultProps = {
157 fitZoom: undefined,
158 transitionTime: 250,
159 animateThreshold: 100,
160};
161
162export default observer(DotGraphVisualizer);
diff --git a/subprojects/frontend/src/graph/GraphArea.tsx b/subprojects/frontend/src/graph/GraphArea.tsx
new file mode 100644
index 00000000..d5801b9a
--- /dev/null
+++ b/subprojects/frontend/src/graph/GraphArea.tsx
@@ -0,0 +1,46 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import Box from '@mui/material/Box';
8import { useTheme } from '@mui/material/styles';
9import { observer } from 'mobx-react-lite';
10import { useResizeDetector } from 'react-resize-detector';
11
12import DotGraphVisualizer from './DotGraphVisualizer';
13import type GraphStore from './GraphStore';
14import VisibilityPanel from './VisibilityPanel';
15import ZoomCanvas from './ZoomCanvas';
16
17function GraphArea({ graph }: { graph: GraphStore }): JSX.Element {
18 const { breakpoints } = useTheme();
19 const { ref, width, height } = useResizeDetector({
20 refreshMode: 'debounce',
21 });
22
23 const breakpoint = breakpoints.values.sm;
24 const dialog =
25 width === undefined ||
26 height === undefined ||
27 width < breakpoint ||
28 height < breakpoint;
29
30 return (
31 <Box
32 width="100%"
33 height="100%"
34 overflow="hidden"
35 position="relative"
36 ref={ref}
37 >
38 <ZoomCanvas>
39 {(fitZoom) => <DotGraphVisualizer graph={graph} fitZoom={fitZoom} />}
40 </ZoomCanvas>
41 <VisibilityPanel graph={graph} dialog={dialog} />
42 </Box>
43 );
44}
45
46export default observer(GraphArea);
diff --git a/subprojects/frontend/src/graph/GraphPane.tsx b/subprojects/frontend/src/graph/GraphPane.tsx
new file mode 100644
index 00000000..67dbfcbd
--- /dev/null
+++ b/subprojects/frontend/src/graph/GraphPane.tsx
@@ -0,0 +1,34 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import Stack from '@mui/material/Stack';
8import { Suspense, lazy } from 'react';
9
10import Loading from '../Loading';
11
12import type GraphStore from './GraphStore';
13
14const GraphArea = lazy(() => import('./GraphArea'));
15
16export default function GraphPane({
17 graph,
18}: {
19 graph: GraphStore;
20}): JSX.Element {
21 return (
22 <Stack
23 direction="column"
24 height="100%"
25 overflow="auto"
26 alignItems="center"
27 justifyContent="center"
28 >
29 <Suspense fallback={<Loading />}>
30 <GraphArea graph={graph} />
31 </Suspense>
32 </Stack>
33 );
34}
diff --git a/subprojects/frontend/src/graph/GraphStore.ts b/subprojects/frontend/src/graph/GraphStore.ts
new file mode 100644
index 00000000..ecb016b5
--- /dev/null
+++ b/subprojects/frontend/src/graph/GraphStore.ts
@@ -0,0 +1,187 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { makeAutoObservable, observable } from 'mobx';
8
9import type {
10 RelationMetadata,
11 SemanticsSuccessResult,
12} from '../xtext/xtextServiceResults';
13
14export type Visibility = 'all' | 'must' | 'none';
15
16export function getDefaultVisibility(
17 metadata: RelationMetadata | undefined,
18): Visibility {
19 if (metadata === undefined || metadata.arity <= 0 || metadata.arity > 2) {
20 return 'none';
21 }
22 const { detail } = metadata;
23 switch (detail.type) {
24 case 'class':
25 case 'reference':
26 case 'opposite':
27 return 'all';
28 case 'predicate':
29 return detail.error ? 'must' : 'none';
30 default:
31 return 'none';
32 }
33}
34
35export function isVisibilityAllowed(
36 metadata: RelationMetadata | undefined,
37 visibility: Visibility,
38): boolean {
39 if (metadata === undefined || metadata.arity <= 0 || metadata.arity > 2) {
40 return visibility === 'none';
41 }
42 const { detail } = metadata;
43 if (detail.type === 'predicate' && detail.error) {
44 // We can't display may matches of error predicates,
45 // because they have none by definition.
46 return visibility !== 'all';
47 }
48 return true;
49}
50
51export default class GraphStore {
52 semantics: SemanticsSuccessResult = {
53 nodes: [],
54 relations: [],
55 partialInterpretation: {},
56 };
57
58 relationMetadata = new Map<string, RelationMetadata>();
59
60 visibility = new Map<string, Visibility>();
61
62 abbreviate = true;
63
64 scopes = false;
65
66 selectedSymbol: RelationMetadata | undefined;
67
68 constructor() {
69 makeAutoObservable(this, {
70 semantics: observable.ref,
71 });
72 }
73
74 getVisibility(relation: string): Visibility {
75 const visibilityOverride = this.visibility.get(relation);
76 if (visibilityOverride !== undefined) {
77 return visibilityOverride;
78 }
79 return this.getDefaultVisibility(relation);
80 }
81
82 getDefaultVisibility(relation: string): Visibility {
83 const metadata = this.relationMetadata.get(relation);
84 return getDefaultVisibility(metadata);
85 }
86
87 isVisibilityAllowed(relation: string, visibility: Visibility): boolean {
88 const metadata = this.relationMetadata.get(relation);
89 return isVisibilityAllowed(metadata, visibility);
90 }
91
92 setVisibility(relation: string, visibility: Visibility): void {
93 const metadata = this.relationMetadata.get(relation);
94 if (metadata === undefined || !isVisibilityAllowed(metadata, visibility)) {
95 return;
96 }
97 const defaultVisiblity = getDefaultVisibility(metadata);
98 if (defaultVisiblity === visibility) {
99 this.visibility.delete(relation);
100 } else {
101 this.visibility.set(relation, visibility);
102 }
103 }
104
105 cycleVisibility(relation: string): void {
106 const metadata = this.relationMetadata.get(relation);
107 if (metadata === undefined) {
108 return;
109 }
110 switch (this.getVisibility(relation)) {
111 case 'none':
112 if (isVisibilityAllowed(metadata, 'must')) {
113 this.setVisibility(relation, 'must');
114 }
115 break;
116 case 'must':
117 {
118 const next = isVisibilityAllowed(metadata, 'all') ? 'all' : 'none';
119 this.setVisibility(relation, next);
120 }
121 break;
122 default:
123 this.setVisibility(relation, 'none');
124 break;
125 }
126 }
127
128 hideAll(): void {
129 this.relationMetadata.forEach((metadata, name) => {
130 if (getDefaultVisibility(metadata) === 'none') {
131 this.visibility.delete(name);
132 } else {
133 this.visibility.set(name, 'none');
134 }
135 });
136 }
137
138 resetFilter(): void {
139 this.visibility.clear();
140 }
141
142 getName({ name, simpleName }: { name: string; simpleName: string }): string {
143 return this.abbreviate ? simpleName : name;
144 }
145
146 toggleAbbrevaite(): void {
147 this.abbreviate = !this.abbreviate;
148 }
149
150 toggleScopes(): void {
151 this.scopes = !this.scopes;
152 }
153
154 setSelectedSymbol(option: RelationMetadata | undefined): void {
155 if (option === undefined) {
156 this.selectedSymbol = undefined;
157 return;
158 }
159 const metadata = this.relationMetadata.get(option.name);
160 if (metadata !== undefined) {
161 this.selectedSymbol = metadata;
162 } else {
163 this.selectedSymbol = undefined;
164 }
165 }
166
167 setSemantics(semantics: SemanticsSuccessResult) {
168 this.semantics = semantics;
169 this.relationMetadata.clear();
170 this.semantics.relations.forEach((metadata) => {
171 this.relationMetadata.set(metadata.name, metadata);
172 });
173 const toRemove = new Set<string>();
174 this.visibility.forEach((value, key) => {
175 if (
176 !this.isVisibilityAllowed(key, value) ||
177 this.getDefaultVisibility(key) === value
178 ) {
179 toRemove.add(key);
180 }
181 });
182 toRemove.forEach((key) => {
183 this.visibility.delete(key);
184 });
185 this.setSelectedSymbol(this.selectedSymbol);
186 }
187}
diff --git a/subprojects/frontend/src/graph/GraphTheme.tsx b/subprojects/frontend/src/graph/GraphTheme.tsx
new file mode 100644
index 00000000..14d58b96
--- /dev/null
+++ b/subprojects/frontend/src/graph/GraphTheme.tsx
@@ -0,0 +1,111 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import cancelSVG from '@material-icons/svg/svg/cancel/baseline.svg?raw';
8import labelSVG from '@material-icons/svg/svg/label/baseline.svg?raw';
9import labelOutlinedSVG from '@material-icons/svg/svg/label/outline.svg?raw';
10import { alpha, styled, type CSSObject } from '@mui/material/styles';
11
12import svgURL from '../utils/svgURL';
13
14function createEdgeColor(
15 suffix: string,
16 stroke: string,
17 fill?: string,
18): CSSObject {
19 return {
20 [`.edge-${suffix}`]: {
21 '& text': {
22 fill: stroke,
23 },
24 '& [stroke="black"]': {
25 stroke,
26 },
27 '& [fill="black"]': {
28 fill: fill ?? stroke,
29 },
30 },
31 };
32}
33
34export default styled('div', {
35 name: 'GraphTheme',
36})(({ theme }) => ({
37 '& svg': {
38 userSelect: 'none',
39 '.node': {
40 '& text': {
41 fontFamily: theme.typography.fontFamily,
42 fill: theme.palette.text.primary,
43 },
44 '& [stroke="black"]': {
45 stroke: theme.palette.text.primary,
46 },
47 '& [fill="green"]': {
48 fill:
49 theme.palette.mode === 'dark'
50 ? theme.palette.primary.dark
51 : theme.palette.primary.light,
52 },
53 '& [fill="white"]': {
54 fill: theme.palette.background.default,
55 },
56 },
57 '.node-INDIVIDUAL': {
58 '& [stroke="black"]': {
59 strokeWidth: 2,
60 },
61 },
62 '.node-shadow[fill="white"]': {
63 fill: alpha(
64 theme.palette.text.primary,
65 theme.palette.mode === 'dark' ? 0.32 : 0.24,
66 ),
67 },
68 '.node-exists-UNKNOWN [stroke="black"]': {
69 strokeDasharray: '5 2',
70 },
71 '.edge': {
72 '& text': {
73 fontFamily: theme.typography.fontFamily,
74 fill: theme.palette.text.primary,
75 },
76 '& [stroke="black"]': {
77 stroke: theme.palette.text.primary,
78 },
79 '& [fill="black"]': {
80 fill: theme.palette.text.primary,
81 },
82 },
83 ...createEdgeColor('UNKNOWN', theme.palette.text.secondary, 'none'),
84 ...createEdgeColor('ERROR', theme.palette.error.main),
85 '.icon': {
86 maskSize: '12px 12px',
87 maskPosition: '50% 50%',
88 maskRepeat: 'no-repeat',
89 width: '100%',
90 height: '100%',
91 },
92 '.icon-TRUE': {
93 maskImage: svgURL(labelSVG),
94 background: theme.palette.text.primary,
95 },
96 '.icon-UNKNOWN': {
97 maskImage: svgURL(labelOutlinedSVG),
98 background: theme.palette.text.secondary,
99 },
100 '.icon-ERROR': {
101 maskImage: svgURL(cancelSVG),
102 background: theme.palette.error.main,
103 },
104 'text.label-UNKNOWN': {
105 fill: theme.palette.text.secondary,
106 },
107 'text.label-ERROR': {
108 fill: theme.palette.error.main,
109 },
110 },
111}));
diff --git a/subprojects/frontend/src/graph/RelationName.tsx b/subprojects/frontend/src/graph/RelationName.tsx
new file mode 100644
index 00000000..ec26fb21
--- /dev/null
+++ b/subprojects/frontend/src/graph/RelationName.tsx
@@ -0,0 +1,72 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { styled } from '@mui/material/styles';
8import { observer } from 'mobx-react-lite';
9
10import { RelationMetadata } from '../xtext/xtextServiceResults';
11
12const Error = styled('span', {
13 name: 'RelationName-Error',
14})(({ theme }) => ({
15 color: theme.palette.error.main,
16}));
17
18const Qualifier = styled('span', {
19 name: 'RelationName-Qualifier',
20})(({ theme }) => ({
21 color: theme.palette.text.secondary,
22}));
23
24const FormattedName = observer(function FormattedName({
25 name,
26 metadata,
27}: {
28 name: string;
29 metadata: RelationMetadata;
30}): React.ReactNode {
31 const { detail } = metadata;
32 if (detail.type === 'class' && detail.abstractClass) {
33 return <i>{name}</i>;
34 }
35 if (detail.type === 'reference' && detail.containment) {
36 return <b>{name}</b>;
37 }
38 if (detail.type === 'predicate' && detail.error) {
39 return <Error>{name}</Error>;
40 }
41 return name;
42});
43
44function RelationName({
45 metadata,
46 abbreviate,
47}: {
48 metadata: RelationMetadata;
49 abbreviate?: boolean;
50}): JSX.Element {
51 const { name, simpleName } = metadata;
52 if (abbreviate ?? RelationName.defaultProps.abbreviate) {
53 return <FormattedName name={simpleName} metadata={metadata} />;
54 }
55 if (name.endsWith(simpleName)) {
56 return (
57 <>
58 <Qualifier>
59 {name.substring(0, name.length - simpleName.length)}
60 </Qualifier>
61 <FormattedName name={simpleName} metadata={metadata} />
62 </>
63 );
64 }
65 return <FormattedName name={name} metadata={metadata} />;
66}
67
68RelationName.defaultProps = {
69 abbreviate: false,
70};
71
72export default observer(RelationName);
diff --git a/subprojects/frontend/src/graph/VisibilityDialog.tsx b/subprojects/frontend/src/graph/VisibilityDialog.tsx
new file mode 100644
index 00000000..f1fef28b
--- /dev/null
+++ b/subprojects/frontend/src/graph/VisibilityDialog.tsx
@@ -0,0 +1,315 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import CloseIcon from '@mui/icons-material/Close';
8import FilterListIcon from '@mui/icons-material/FilterList';
9import LabelIcon from '@mui/icons-material/Label';
10import LabelOutlinedIcon from '@mui/icons-material/LabelOutlined';
11import SentimentVeryDissatisfiedIcon from '@mui/icons-material/SentimentVeryDissatisfied';
12import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
13import Button from '@mui/material/Button';
14import Checkbox from '@mui/material/Checkbox';
15import FormControlLabel from '@mui/material/FormControlLabel';
16import IconButton from '@mui/material/IconButton';
17import Switch from '@mui/material/Switch';
18import Typography from '@mui/material/Typography';
19import { styled } from '@mui/material/styles';
20import { observer } from 'mobx-react-lite';
21import { useId } from 'react';
22
23import type GraphStore from './GraphStore';
24import { isVisibilityAllowed } from './GraphStore';
25import RelationName from './RelationName';
26
27const VisibilityDialogRoot = styled('div', {
28 name: 'VisibilityDialog-Root',
29 shouldForwardProp: (propName) => propName !== 'dialog',
30})<{ dialog: boolean }>(({ theme, dialog }) => {
31 const overlayOpacity = dialog ? 0.16 : 0.09;
32 return {
33 maxHeight: '100%',
34 maxWidth: '100%',
35 overflow: 'hidden',
36 display: 'flex',
37 flexDirection: 'column',
38 '.VisibilityDialog-title': {
39 display: 'flex',
40 flexDirection: 'row',
41 alignItems: 'center',
42 padding: theme.spacing(1),
43 paddingLeft: theme.spacing(2),
44 borderBottom: `1px solid ${theme.palette.divider}`,
45 '& h2': {
46 flexGrow: 1,
47 },
48 '.MuiIconButton-root': {
49 flexGrow: 0,
50 flexShrink: 0,
51 marginLeft: theme.spacing(2),
52 },
53 },
54 '.MuiFormControlLabel-root': {
55 marginLeft: 0,
56 paddingTop: theme.spacing(1),
57 paddingLeft: theme.spacing(1),
58 '& + .MuiFormControlLabel-root': {
59 paddingTop: 0,
60 },
61 },
62 '.VisibilityDialog-scroll': {
63 display: 'flex',
64 flexDirection: 'column',
65 height: 'auto',
66 overflowX: 'hidden',
67 overflowY: 'auto',
68 margin: `0 ${theme.spacing(2)}`,
69 '& table': {
70 // We use flexbox instead of `display: table` to get proper text-overflow
71 // behavior for overly long relation names.
72 display: 'flex',
73 flexDirection: 'column',
74 },
75 '& thead, & tbody': {
76 display: 'flex',
77 flexDirection: 'column',
78 },
79 '& thead': {
80 position: 'sticky',
81 top: 0,
82 zIndex: 999,
83 backgroundColor: theme.palette.background.paper,
84 ...(theme.palette.mode === 'dark'
85 ? {
86 // In dark mode, MUI Paper gets a lighter overlay.
87 backgroundImage: `linear-gradient(
88 rgba(255, 255, 255, ${overlayOpacity}),
89 rgba(255, 255, 255, ${overlayOpacity})
90 )`,
91 }
92 : {}),
93 '& tr': {
94 height: '44px',
95 },
96 },
97 '& tr': {
98 display: 'flex',
99 flexDirection: 'row',
100 maxWidth: '100%',
101 },
102 '& tbody tr': {
103 transition: theme.transitions.create('background', {
104 duration: theme.transitions.duration.shortest,
105 }),
106 '&:hover': {
107 background: theme.palette.action.hover,
108 '@media (hover: none)': {
109 background: 'transparent',
110 },
111 },
112 },
113 '& th, & td': {
114 display: 'flex',
115 flexDirection: 'row',
116 alignItems: 'center',
117 justifyContent: 'center',
118 // Set width in advance, since we can't rely on `display: table-cell`.
119 width: '44px',
120 },
121 '& th:nth-of-type(3), & td:nth-of-type(3)': {
122 justifyContent: 'start',
123 paddingLeft: theme.spacing(1),
124 paddingRight: theme.spacing(2),
125 // Only let the last column grow or shrink.
126 flexGrow: 1,
127 flexShrink: 1,
128 // Compute the maximum available space in advance to let the text overflow.
129 maxWidth: 'calc(100% - 88px)',
130 width: 'min-content',
131 },
132 '& td:nth-of-type(3)': {
133 cursor: 'pointer',
134 userSelect: 'none',
135 WebkitTapHighlightColor: 'transparent',
136 },
137
138 '& thead th, .VisibilityDialog-custom tr:last-child td': {
139 borderBottom: `1px solid ${theme.palette.divider}`,
140 },
141 },
142 // Hack to apply `text-overflow`.
143 '.VisibilityDialog-nowrap': {
144 maxWidth: '100%',
145 overflow: 'hidden',
146 wordWrap: 'nowrap',
147 textOverflow: 'ellipsis',
148 },
149 '.VisibilityDialog-buttons': {
150 padding: theme.spacing(1),
151 display: 'flex',
152 flexDirection: 'row',
153 justifyContent: 'flex-end',
154 ...(dialog
155 ? {
156 marginTop: theme.spacing(1),
157 borderTop: `1px solid ${theme.palette.divider}`,
158 }
159 : {}),
160 },
161 '.VisibilityDialog-empty': {
162 display: 'flex',
163 flexDirection: 'column',
164 alignItems: 'center',
165 color: theme.palette.text.secondary,
166 },
167 '.VisibilityDialog-emptyIcon': {
168 fontSize: '6rem',
169 marginBottom: theme.spacing(1),
170 },
171 };
172});
173
174function VisibilityDialog({
175 graph,
176 close,
177 dialog,
178}: {
179 graph: GraphStore;
180 close: () => void;
181 dialog?: boolean;
182}): JSX.Element {
183 const titleId = useId();
184
185 const builtinRows: JSX.Element[] = [];
186 const rows: JSX.Element[] = [];
187 graph.relationMetadata.forEach((metadata, name) => {
188 if (!isVisibilityAllowed(metadata, 'must')) {
189 return;
190 }
191 const visibility = graph.getVisibility(name);
192 const row = (
193 <tr key={metadata.name}>
194 <td>
195 <Checkbox
196 checked={visibility !== 'none'}
197 aria-label={`Show true and error values of ${metadata.simpleName}`}
198 onClick={() =>
199 graph.setVisibility(name, visibility === 'none' ? 'must' : 'none')
200 }
201 />
202 </td>
203 <td>
204 <Checkbox
205 checked={visibility === 'all'}
206 disabled={!isVisibilityAllowed(metadata, 'all')}
207 aria-label={`Show all values of ${metadata.simpleName}`}
208 onClick={() =>
209 graph.setVisibility(name, visibility === 'all' ? 'must' : 'all')
210 }
211 />
212 </td>
213 <td onClick={() => graph.cycleVisibility(name)}>
214 <div className="VisibilityDialog-nowrap">
215 <RelationName metadata={metadata} abbreviate={graph.abbreviate} />
216 </div>
217 </td>
218 </tr>
219 );
220 if (name.startsWith('builtin::')) {
221 builtinRows.push(row);
222 } else {
223 rows.push(row);
224 }
225 });
226
227 const hasRows = rows.length > 0 || builtinRows.length > 0;
228
229 return (
230 <VisibilityDialogRoot
231 dialog={dialog ?? VisibilityDialog.defaultProps.dialog}
232 aria-labelledby={dialog ? titleId : undefined}
233 >
234 {dialog && (
235 <div className="VisibilityDialog-title">
236 <Typography variant="h6" component="h2" id={titleId}>
237 Customize view
238 </Typography>
239 <IconButton aria-label="Close" onClick={close}>
240 <CloseIcon />
241 </IconButton>
242 </div>
243 )}
244 <FormControlLabel
245 control={
246 <Switch
247 checked={!graph.abbreviate}
248 onClick={() => graph.toggleAbbrevaite()}
249 />
250 }
251 label="Fully qualified names"
252 />
253 <FormControlLabel
254 control={
255 <Switch checked={graph.scopes} onClick={() => graph.toggleScopes()} />
256 }
257 label="Object scopes"
258 />
259 <div className="VisibilityDialog-scroll">
260 {hasRows ? (
261 <table cellSpacing={0}>
262 <thead>
263 <tr>
264 <th>
265 <LabelIcon />
266 </th>
267 <th>
268 <LabelOutlinedIcon />
269 </th>
270 <th>Symbol</th>
271 </tr>
272 </thead>
273 <tbody className="VisibilityDialog-custom">{...rows}</tbody>
274 <tbody className="VisibilityDialog-builtin">{...builtinRows}</tbody>
275 </table>
276 ) : (
277 <div className="VisibilityDialog-empty">
278 <SentimentVeryDissatisfiedIcon
279 className="VisibilityDialog-emptyIcon"
280 fontSize="inherit"
281 />
282 <div>Partial model is empty</div>
283 </div>
284 )}
285 </div>
286 <div className="VisibilityDialog-buttons">
287 <Button
288 color="inherit"
289 onClick={() => graph.hideAll()}
290 startIcon={<VisibilityOffIcon />}
291 >
292 Hide all
293 </Button>
294 <Button
295 color="inherit"
296 onClick={() => graph.resetFilter()}
297 startIcon={<FilterListIcon />}
298 >
299 Reset filter
300 </Button>
301 {!dialog && (
302 <Button color="inherit" onClick={close}>
303 Close
304 </Button>
305 )}
306 </div>
307 </VisibilityDialogRoot>
308 );
309}
310
311VisibilityDialog.defaultProps = {
312 dialog: false,
313};
314
315export default observer(VisibilityDialog);
diff --git a/subprojects/frontend/src/graph/VisibilityPanel.tsx b/subprojects/frontend/src/graph/VisibilityPanel.tsx
new file mode 100644
index 00000000..20c4ffca
--- /dev/null
+++ b/subprojects/frontend/src/graph/VisibilityPanel.tsx
@@ -0,0 +1,91 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
8import TuneIcon from '@mui/icons-material/Tune';
9import Badge from '@mui/material/Badge';
10import Dialog from '@mui/material/Dialog';
11import IconButton from '@mui/material/IconButton';
12import Paper from '@mui/material/Paper';
13import Slide from '@mui/material/Slide';
14import { styled } from '@mui/material/styles';
15import { observer } from 'mobx-react-lite';
16import { useCallback, useId, useState } from 'react';
17
18import type GraphStore from './GraphStore';
19import VisibilityDialog from './VisibilityDialog';
20
21const VisibilityPanelRoot = styled('div', {
22 name: 'VisibilityPanel-Root',
23})(({ theme }) => ({
24 position: 'absolute',
25 padding: theme.spacing(1),
26 top: 0,
27 left: 0,
28 maxHeight: '100%',
29 maxWidth: '100%',
30 overflow: 'hidden',
31 display: 'flex',
32 flexDirection: 'column',
33 alignItems: 'start',
34 '.VisibilityPanel-drawer': {
35 overflow: 'hidden',
36 display: 'flex',
37 maxWidth: '100%',
38 margin: theme.spacing(1),
39 },
40}));
41
42function VisibilityPanel({
43 graph,
44 dialog,
45}: {
46 graph: GraphStore;
47 dialog: boolean;
48}): JSX.Element {
49 const id = useId();
50 const [showFilter, setShowFilter] = useState(false);
51 const close = useCallback(() => setShowFilter(false), []);
52
53 return (
54 <VisibilityPanelRoot>
55 <IconButton
56 role="switch"
57 aria-checked={showFilter}
58 aria-controls={dialog ? undefined : id}
59 aria-label="Show filter panel"
60 onClick={() => setShowFilter(!showFilter)}
61 >
62 <Badge
63 color="primary"
64 variant="dot"
65 invisible={graph.visibility.size === 0}
66 >
67 {showFilter && !dialog ? <ChevronLeftIcon /> : <TuneIcon />}
68 </Badge>
69 </IconButton>
70 {dialog ? (
71 <Dialog open={showFilter} onClose={close} maxWidth="xl">
72 <VisibilityDialog graph={graph} close={close} dialog />
73 </Dialog>
74 ) : (
75 <Slide
76 direction="right"
77 in={showFilter}
78 id={id}
79 mountOnEnter
80 unmountOnExit
81 >
82 <Paper className="VisibilityPanel-drawer" elevation={4}>
83 <VisibilityDialog graph={graph} close={close} />
84 </Paper>
85 </Slide>
86 )}
87 </VisibilityPanelRoot>
88 );
89}
90
91export default observer(VisibilityPanel);
diff --git a/subprojects/frontend/src/graph/ZoomButtons.tsx b/subprojects/frontend/src/graph/ZoomButtons.tsx
new file mode 100644
index 00000000..83938cf4
--- /dev/null
+++ b/subprojects/frontend/src/graph/ZoomButtons.tsx
@@ -0,0 +1,49 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import AddIcon from '@mui/icons-material/Add';
8import CropFreeIcon from '@mui/icons-material/CropFree';
9import RemoveIcon from '@mui/icons-material/Remove';
10import IconButton from '@mui/material/IconButton';
11import Stack from '@mui/material/Stack';
12import ToggleButton from '@mui/material/ToggleButton';
13
14import type { ChangeZoomCallback, SetFitZoomCallback } from './ZoomCanvas';
15
16export default function ZoomButtons({
17 changeZoom,
18 fitZoom,
19 setFitZoom,
20}: {
21 changeZoom: ChangeZoomCallback;
22 fitZoom: boolean;
23 setFitZoom: SetFitZoomCallback;
24}): JSX.Element {
25 return (
26 <Stack
27 direction="column"
28 p={1}
29 sx={{ position: 'absolute', bottom: 0, right: 0 }}
30 >
31 <IconButton aria-label="Zoom in" onClick={() => changeZoom(2)}>
32 <AddIcon fontSize="small" />
33 </IconButton>
34 <IconButton aria-label="Zoom out" onClick={() => changeZoom(0.5)}>
35 <RemoveIcon fontSize="small" />
36 </IconButton>
37 <ToggleButton
38 value="show-replace"
39 selected={fitZoom}
40 onClick={() => setFitZoom(!fitZoom)}
41 aria-label="Fit screen"
42 size="small"
43 className="iconOnly"
44 >
45 <CropFreeIcon fontSize="small" />
46 </ToggleButton>
47 </Stack>
48 );
49}
diff --git a/subprojects/frontend/src/graph/ZoomCanvas.tsx b/subprojects/frontend/src/graph/ZoomCanvas.tsx
new file mode 100644
index 00000000..0254bc59
--- /dev/null
+++ b/subprojects/frontend/src/graph/ZoomCanvas.tsx
@@ -0,0 +1,224 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import Box from '@mui/material/Box';
8import * as d3 from 'd3';
9import { zoom as d3Zoom } from 'd3-zoom';
10import React, { useCallback, useRef, useState } from 'react';
11import { useResizeDetector } from 'react-resize-detector';
12
13import ZoomButtons from './ZoomButtons';
14
15declare module 'd3-zoom' {
16 // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Redeclaring type parameters.
17 interface ZoomBehavior<ZoomRefElement extends Element, Datum> {
18 // `@types/d3-zoom` does not contain the `center` function, because it is
19 // only available as a pull request for `d3-zoom`.
20 center(callback: (event: MouseEvent | Touch) => [number, number]): this;
21
22 // Custom `centroid` method added via patch.
23 centroid(centroid: [number, number]): this;
24 }
25}
26
27interface Transform {
28 x: number;
29 y: number;
30 k: number;
31}
32
33export type ChangeZoomCallback = (factor: number) => void;
34
35export type SetFitZoomCallback = (fitZoom: boolean) => void;
36
37export type FitZoomCallback = ((newSize?: {
38 width: number;
39 height: number;
40}) => void) &
41 ((newSize: boolean) => void);
42
43export default function ZoomCanvas({
44 children,
45 fitPadding,
46 transitionTime,
47}: {
48 children?: React.ReactNode | ((fitZoom: FitZoomCallback) => React.ReactNode);
49 fitPadding?: number;
50 transitionTime?: number;
51}): JSX.Element {
52 const fitPaddingOrDefault = fitPadding ?? ZoomCanvas.defaultProps.fitPadding;
53 const transitionTimeOrDefault =
54 transitionTime ?? ZoomCanvas.defaultProps.transitionTime;
55
56 const canvasRef = useRef<HTMLDivElement | undefined>();
57 const elementRef = useRef<HTMLDivElement | undefined>();
58 const zoomRef = useRef<
59 d3.ZoomBehavior<HTMLDivElement, unknown> | undefined
60 >();
61 const [zoom, setZoom] = useState<Transform>({ x: 0, y: 0, k: 1 });
62 const [fitZoom, setFitZoom] = useState(true);
63 const fitZoomRef = useRef(fitZoom);
64
65 const makeTransition = useCallback(
66 (element: HTMLDivElement) =>
67 d3.select(element).transition().duration(transitionTimeOrDefault),
68 [transitionTimeOrDefault],
69 );
70
71 const fitZoomCallback = useCallback<FitZoomCallback>(
72 (newSize) => {
73 if (
74 !fitZoomRef.current ||
75 canvasRef.current === undefined ||
76 zoomRef.current === undefined ||
77 elementRef.current === undefined
78 ) {
79 return;
80 }
81 let width = 0;
82 let height = 0;
83 if (newSize === undefined || typeof newSize === 'boolean') {
84 const elementRect = elementRef.current.getBoundingClientRect();
85 const currentFactor = d3.zoomTransform(canvasRef.current).k;
86 width = elementRect.width / currentFactor;
87 height = elementRect.height / currentFactor;
88 } else {
89 ({ width, height } = newSize);
90 }
91 if (width === 0 || height === 0) {
92 return;
93 }
94 const canvasRect = canvasRef.current.getBoundingClientRect();
95 const factor = Math.min(
96 1.0,
97 (canvasRect.width - 2 * fitPaddingOrDefault) / width,
98 (canvasRect.height - 2 * fitPaddingOrDefault) / height,
99 );
100 const target =
101 newSize === false
102 ? d3.select(canvasRef.current)
103 : makeTransition(canvasRef.current);
104 zoomRef.current.transform(target, d3.zoomIdentity.scale(factor));
105 },
106 [fitPaddingOrDefault, makeTransition],
107 );
108
109 const setFitZoomCallback = useCallback<SetFitZoomCallback>(
110 (newFitZoom) => {
111 setFitZoom(newFitZoom);
112 fitZoomRef.current = newFitZoom;
113 if (newFitZoom) {
114 fitZoomCallback();
115 }
116 },
117 [fitZoomCallback],
118 );
119
120 const changeZoomCallback = useCallback<ChangeZoomCallback>(
121 (factor) => {
122 setFitZoomCallback(false);
123 if (canvasRef.current === undefined || zoomRef.current === undefined) {
124 return;
125 }
126 const zoomTransition = makeTransition(canvasRef.current);
127 const center: [number, number] = [0, 0];
128 zoomRef.current.scaleBy(zoomTransition, factor, center);
129 },
130 [makeTransition, setFitZoomCallback],
131 );
132
133 const onResize = useCallback(() => fitZoomCallback(), [fitZoomCallback]);
134
135 const { ref: resizeRef } = useResizeDetector({
136 onResize,
137 refreshMode: 'debounce',
138 refreshRate: transitionTimeOrDefault,
139 });
140
141 const setCanvas = useCallback(
142 (canvas: HTMLDivElement | null) => {
143 canvasRef.current = canvas ?? undefined;
144 resizeRef(canvas);
145 if (canvas === null) {
146 return;
147 }
148 const zoomBehavior = d3Zoom<HTMLDivElement, unknown>()
149 .duration(transitionTimeOrDefault)
150 .center((event) => {
151 const { width, height } = canvas.getBoundingClientRect();
152 const [x, y] = d3.pointer(event, canvas);
153 return [x - width / 2, y - height / 2];
154 })
155 .centroid([0, 0])
156 .scaleExtent([1 / 32, 8]);
157 zoomBehavior.on(
158 'zoom',
159 (event: d3.D3ZoomEvent<HTMLDivElement, unknown>) => {
160 setZoom(event.transform);
161 if (event.sourceEvent) {
162 setFitZoomCallback(false);
163 }
164 },
165 );
166 d3.select(canvas).call(zoomBehavior);
167 zoomRef.current = zoomBehavior;
168 },
169 [transitionTimeOrDefault, setFitZoomCallback, resizeRef],
170 );
171
172 return (
173 <Box
174 sx={{
175 width: '100%',
176 height: '100%',
177 position: 'relative',
178 overflow: 'hidden',
179 }}
180 >
181 <Box
182 sx={{
183 position: 'absolute',
184 overflow: 'hidden',
185 top: 0,
186 left: 0,
187 right: 0,
188 bottom: 0,
189 }}
190 ref={setCanvas}
191 >
192 <Box
193 sx={{
194 position: 'absolute',
195 top: '50%',
196 left: '50%',
197 transform: `
198 translate(${zoom.x}px, ${zoom.y}px)
199 scale(${zoom.k})
200 translate(-50%, -50%)
201 `,
202 transformOrigin: '0 0',
203 }}
204 ref={elementRef}
205 >
206 {typeof children === 'function'
207 ? children(fitZoomCallback)
208 : children}
209 </Box>
210 </Box>
211 <ZoomButtons
212 changeZoom={changeZoomCallback}
213 fitZoom={fitZoom}
214 setFitZoom={setFitZoomCallback}
215 />
216 </Box>
217 );
218}
219
220ZoomCanvas.defaultProps = {
221 children: undefined,
222 fitPadding: 8,
223 transitionTime: 250,
224};
diff --git a/subprojects/frontend/src/graph/dotSource.ts b/subprojects/frontend/src/graph/dotSource.ts
new file mode 100644
index 00000000..bd358dfa
--- /dev/null
+++ b/subprojects/frontend/src/graph/dotSource.ts
@@ -0,0 +1,366 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import type {
8 NodeMetadata,
9 RelationMetadata,
10} from '../xtext/xtextServiceResults';
11
12import type GraphStore from './GraphStore';
13
14const EDGE_WEIGHT = 1;
15const CONTAINMENT_WEIGHT = 5;
16const UNKNOWN_WEIGHT_FACTOR = 0.5;
17
18function nodeName(graph: GraphStore, metadata: NodeMetadata): string {
19 const name = graph.getName(metadata);
20 switch (metadata.kind) {
21 case 'INDIVIDUAL':
22 return `<b>${name}</b>`;
23 default:
24 return name;
25 }
26}
27
28function relationName(graph: GraphStore, metadata: RelationMetadata): string {
29 const name = graph.getName(metadata);
30 const { detail } = metadata;
31 if (detail.type === 'class' && detail.abstractClass) {
32 return `<i>${name}</i>`;
33 }
34 if (detail.type === 'reference' && detail.containment) {
35 return `<b>${name}</b>`;
36 }
37 return name;
38}
39
40interface NodeData {
41 isolated: boolean;
42 exists: string;
43 equalsSelf: string;
44 unaryPredicates: Map<RelationMetadata, string>;
45 count: string;
46}
47
48function computeNodeData(graph: GraphStore): NodeData[] {
49 const {
50 semantics: { nodes, relations, partialInterpretation },
51 } = graph;
52
53 const nodeData = Array.from(Array(nodes.length)).map(() => ({
54 isolated: true,
55 exists: 'FALSE',
56 equalsSelf: 'FALSE',
57 unaryPredicates: new Map(),
58 count: '[0]',
59 }));
60
61 relations.forEach((relation) => {
62 const visibility = graph.getVisibility(relation.name);
63 if (visibility === 'none') {
64 return;
65 }
66 const { arity } = relation;
67 const interpretation = partialInterpretation[relation.name] ?? [];
68 interpretation.forEach((tuple) => {
69 const value = tuple[arity];
70 if (visibility !== 'all' && value === 'UNKNOWN') {
71 return;
72 }
73 for (let i = 0; i < arity; i += 1) {
74 const index = tuple[i];
75 if (typeof index === 'number') {
76 const data = nodeData[index];
77 if (data !== undefined) {
78 data.isolated = false;
79 if (arity === 1) {
80 data.unaryPredicates.set(relation, value);
81 }
82 }
83 }
84 }
85 });
86 });
87
88 partialInterpretation['builtin::exists']?.forEach(([index, value]) => {
89 if (typeof index === 'number' && typeof value === 'string') {
90 const data = nodeData[index];
91 if (data !== undefined) {
92 data.exists = value;
93 }
94 }
95 });
96
97 partialInterpretation['builtin::equals']?.forEach(([index, other, value]) => {
98 if (
99 typeof index === 'number' &&
100 index === other &&
101 typeof value === 'string'
102 ) {
103 const data = nodeData[index];
104 if (data !== undefined) {
105 data.equalsSelf = value;
106 }
107 }
108 });
109
110 partialInterpretation['builtin::count']?.forEach(([index, value]) => {
111 if (typeof index === 'number' && typeof value === 'string') {
112 const data = nodeData[index];
113 if (data !== undefined) {
114 data.count = value;
115 }
116 }
117 });
118
119 return nodeData;
120}
121
122function createNodes(
123 graph: GraphStore,
124 nodeData: NodeData[],
125 lines: string[],
126): void {
127 const {
128 semantics: { nodes },
129 scopes,
130 } = graph;
131
132 nodes.forEach((node, i) => {
133 const data = nodeData[i];
134 if (data === undefined || data.isolated || data.exists === 'FALSE') {
135 return;
136 }
137 const classList = [
138 `node-${node.kind}`,
139 `node-exists-${data.exists}`,
140 `node-equalsSelf-${data.equalsSelf}`,
141 ];
142 if (data.unaryPredicates.size === 0) {
143 classList.push('node-empty');
144 }
145 const classes = classList.join(' ');
146 const name = nodeName(graph, node);
147 const border = node.kind === 'INDIVIDUAL' ? 2 : 1;
148 const count = scopes ? ` ${data.count}` : '';
149 lines.push(`n${i} [id="${node.name}", class="${classes}", label=<
150 <table border="${border}" cellborder="0" cellspacing="0" style="rounded" bgcolor="white">
151 <tr><td cellpadding="4.5" width="32" bgcolor="green">${name}${count}</td></tr>`);
152 if (data.unaryPredicates.size > 0) {
153 lines.push(
154 '<hr/><tr><td cellpadding="4.5"><table fixedsize="TRUE" align="left" border="0" cellborder="0" cellspacing="0" cellpadding="1.5">',
155 );
156 data.unaryPredicates.forEach((value, relation) => {
157 lines.push(
158 `<tr>
159 <td><img src="#${value}"/></td>
160 <td width="1.5"></td>
161 <td align="left" href="#${value}" id="${node.name},${
162 relation.name
163 },label">${relationName(graph, relation)}</td>
164 </tr>`,
165 );
166 });
167 lines.push('</table></td></tr>');
168 }
169 lines.push('</table>>]');
170 });
171}
172
173function compare(
174 a: readonly (number | string)[],
175 b: readonly number[],
176): number {
177 if (a.length !== b.length + 1) {
178 throw new Error('Tuple length mismatch');
179 }
180 for (let i = 0; i < b.length; i += 1) {
181 const aItem = a[i];
182 const bItem = b[i];
183 if (typeof aItem !== 'number' || typeof bItem !== 'number') {
184 throw new Error('Invalid tuple');
185 }
186 if (aItem < bItem) {
187 return -1;
188 }
189 if (aItem > bItem) {
190 return 1;
191 }
192 }
193 return 0;
194}
195
196function binarySerach(
197 tuples: readonly (readonly (number | string)[])[],
198 key: readonly number[],
199): string | undefined {
200 let lower = 0;
201 let upper = tuples.length - 1;
202 while (lower <= upper) {
203 const middle = Math.floor((lower + upper) / 2);
204 const tuple = tuples[middle];
205 if (tuple === undefined) {
206 throw new Error('Range error');
207 }
208 const result = compare(tuple, key);
209 if (result === 0) {
210 const found = tuple[key.length];
211 if (typeof found !== 'string') {
212 throw new Error('Invalid tuple value');
213 }
214 return found;
215 }
216 if (result < 0) {
217 lower = middle + 1;
218 } else {
219 // result > 0
220 upper = middle - 1;
221 }
222 }
223 return undefined;
224}
225
226function createRelationEdges(
227 graph: GraphStore,
228 nodeData: NodeData[],
229 relation: RelationMetadata,
230 showUnknown: boolean,
231 lines: string[],
232): void {
233 const {
234 semantics: { nodes, partialInterpretation },
235 } = graph;
236 const { detail } = relation;
237
238 let constraint: 'true' | 'false' = 'true';
239 let weight = EDGE_WEIGHT;
240 let penwidth = 1;
241 const name = graph.getName(relation);
242 let label = `"${name}"`;
243 if (detail.type === 'reference' && detail.containment) {
244 weight = CONTAINMENT_WEIGHT;
245 label = `<<b>${name}</b>>`;
246 penwidth = 2;
247 } else if (
248 detail.type === 'opposite' &&
249 graph.getVisibility(detail.opposite) !== 'none'
250 ) {
251 constraint = 'false';
252 weight = 0;
253 }
254
255 const tuples = partialInterpretation[relation.name] ?? [];
256 tuples.forEach(([from, to, value]) => {
257 const isUnknown = value === 'UNKNOWN';
258 if (
259 (!showUnknown && isUnknown) ||
260 typeof from !== 'number' ||
261 typeof to !== 'number' ||
262 typeof value !== 'string'
263 ) {
264 return;
265 }
266
267 const fromNode = nodes[from];
268 const toNode = nodes[to];
269 if (fromNode === undefined || toNode === undefined) {
270 return;
271 }
272
273 const fromData = nodeData[from];
274 const toData = nodeData[to];
275 if (
276 fromData === undefined ||
277 fromData.exists === 'FALSE' ||
278 toData === undefined ||
279 toData.exists === 'FALSE'
280 ) {
281 return;
282 }
283
284 let dir = 'forward';
285 let edgeConstraint = constraint;
286 let edgeWeight = weight;
287 const opposite = binarySerach(tuples, [to, from]);
288 const oppositeUnknown = opposite === 'UNKNOWN';
289 const oppositeSet = opposite !== undefined;
290 const oppositeVisible = oppositeSet && (showUnknown || !oppositeUnknown);
291 if (opposite === value) {
292 if (to < from) {
293 // We already added this edge in the reverse direction.
294 return;
295 }
296 if (to > from) {
297 dir = 'both';
298 }
299 } else if (oppositeVisible && to < from) {
300 // Let the opposite edge drive the graph layout.
301 edgeConstraint = 'false';
302 edgeWeight = 0;
303 } else if (isUnknown && (!oppositeSet || oppositeUnknown)) {
304 // Only apply the UNKNOWN value penalty if we aren't the opposite
305 // edge driving the graph layout from above, or the penalty would
306 // be applied anyway.
307 edgeWeight *= UNKNOWN_WEIGHT_FACTOR;
308 }
309
310 lines.push(`n${from} -> n${to} [
311 id="${fromNode.name},${toNode.name},${relation.name}",
312 dir="${dir}",
313 constraint=${edgeConstraint},
314 weight=${edgeWeight},
315 xlabel=${label},
316 penwidth=${penwidth},
317 arrowsize=${penwidth >= 2 ? 0.875 : 1},
318 style="${isUnknown ? 'dashed' : 'solid'}",
319 class="edge-${value}"
320 ]`);
321 });
322}
323
324function createEdges(
325 graph: GraphStore,
326 nodeData: NodeData[],
327 lines: string[],
328): void {
329 const {
330 semantics: { relations },
331 } = graph;
332 relations.forEach((relation) => {
333 if (relation.arity !== 2) {
334 return;
335 }
336 const visibility = graph.getVisibility(relation.name);
337 if (visibility !== 'none') {
338 createRelationEdges(
339 graph,
340 nodeData,
341 relation,
342 visibility === 'all',
343 lines,
344 );
345 }
346 });
347}
348
349export default function dotSource(
350 graph: GraphStore | undefined,
351): [string, number] | undefined {
352 if (graph === undefined) {
353 return undefined;
354 }
355 const lines = [
356 'digraph {',
357 'graph [bgcolor=transparent];',
358 `node [fontsize=12, shape=plain, fontname="OpenSans"];`,
359 'edge [fontsize=10.5, color=black, fontname="OpenSans"];',
360 ];
361 const nodeData = computeNodeData(graph);
362 createNodes(graph, nodeData, lines);
363 createEdges(graph, nodeData, lines);
364 lines.push('}');
365 return [lines.join('\n'), lines.length];
366}
diff --git a/subprojects/frontend/src/graph/parseBBox.ts b/subprojects/frontend/src/graph/parseBBox.ts
new file mode 100644
index 00000000..34df746b
--- /dev/null
+++ b/subprojects/frontend/src/graph/parseBBox.ts
@@ -0,0 +1,68 @@
1/*
2 * Copyright 2017, Magnus Jacobsson
3 * Copyright 2023, The Refinery Authors <https://refinery.tools/>
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 *
7 * This file Incorporates patches from the Refinery authors.
8 *
9 * Redistribution and use is only permitted if neither
10 * the name of the copyright holder Magnus Jacobsson nor the names of other
11 * contributors to the d3-graphviz project are used to endorse or promote
12 * products derived from this software as per the 3rd clause of the
13 * 3-clause BSD license.
14 *
15 * See LICENSES/BSD-3-Clause.txt for more details.
16 */
17
18export interface BBox {
19 x: number;
20 y: number;
21 width: number;
22 height: number;
23}
24
25function parsePoints(points: string[]): BBox {
26 const x = points.map((p) => Number(p.split(',')[0] ?? 0));
27 const y = points.map((p) => Number(p.split(',')[1] ?? 0));
28 const xmin = Math.min.apply(null, x);
29 const xmax = Math.max.apply(null, x);
30 const ymin = Math.min.apply(null, y);
31 const ymax = Math.max.apply(null, y);
32 return {
33 x: xmin,
34 y: ymin,
35 width: xmax - xmin,
36 height: ymax - ymin,
37 };
38}
39
40/**
41 * Compute the bounding box of a polygon without adding it to the DOM.
42 *
43 * Copyed from
44 * https://github.com/magjac/d3-graphviz/blob/81ab523fe5189a90da2d9d9cc9015c7079eea780/src/element.js#L36-L53
45 *
46 * @param path The polygon to compute the bounding box of.
47 * @returns The computed bounding box.
48 */
49export function parsePolygonBBox(polygon: SVGPolygonElement): BBox {
50 const points = (polygon.getAttribute('points') ?? '').split(' ');
51 return parsePoints(points);
52}
53
54/**
55 * Compute the bounding box of a path without adding it to the DOM.
56 *
57 * Copyed from
58 * https://github.com/magjac/d3-graphviz/blob/81ab523fe5189a90da2d9d9cc9015c7079eea780/src/element.js#L56-L75
59 *
60 * @param path The path to compute the bounding box of.
61 * @returns The computed bounding box.
62 */
63export function parsePathBBox(path: SVGPathElement): BBox {
64 const d = path.getAttribute('d') ?? '';
65 const points = d.split(/[A-Z ]/);
66 points.shift();
67 return parsePoints(points);
68}
diff --git a/subprojects/frontend/src/graph/postProcessSVG.ts b/subprojects/frontend/src/graph/postProcessSVG.ts
new file mode 100644
index 00000000..a580f5c6
--- /dev/null
+++ b/subprojects/frontend/src/graph/postProcessSVG.ts
@@ -0,0 +1,186 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { type BBox, parsePolygonBBox, parsePathBBox } from './parseBBox';
8
9const SVG_NS = 'http://www.w3.org/2000/svg';
10const XLINK_NS = 'http://www.w3.org/1999/xlink';
11
12function modifyAttribute(element: Element, attribute: string, change: number) {
13 const valueString = element.getAttribute(attribute);
14 if (valueString === null) {
15 return;
16 }
17 const value = parseInt(valueString, 10);
18 element.setAttribute(attribute, String(value + change));
19}
20
21function addShadow(
22 node: SVGGElement,
23 container: SVGRectElement,
24 offset: number,
25): void {
26 const shadow = container.cloneNode() as SVGRectElement;
27 // Leave space for 1pt stroke around the original container.
28 const offsetWithStroke = offset - 0.5;
29 modifyAttribute(shadow, 'x', offsetWithStroke);
30 modifyAttribute(shadow, 'y', offsetWithStroke);
31 modifyAttribute(shadow, 'width', 1);
32 modifyAttribute(shadow, 'height', 1);
33 modifyAttribute(shadow, 'rx', 0.5);
34 modifyAttribute(shadow, 'ry', 0.5);
35 shadow.setAttribute('class', 'node-shadow');
36 shadow.id = `${node.id},shadow`;
37 node.insertBefore(shadow, node.firstChild);
38}
39
40function clipCompartmentBackground(node: SVGGElement) {
41 // Background rectangle of the node created by the `<table bgcolor="white">`
42 // HTML element in dot. It was transformed into a rounded rect by `fixNodeBackground`.
43 const container = node.querySelector<SVGRectElement>('rect[fill="white"]');
44 // Background rectangle of the lower compartment created by the `<td bgcolor="green">`
45 // HTML element in dot. It was transformed into a rounded rect by `fixNodeBackground`.
46 // Since dot doesn't round the coners of `<td>` background,
47 // we have to clip it ourselves.
48 const compartment = node.querySelector<SVGRectElement>('rect[fill="green"]');
49 // Make sure we provide traceability with IDs also for the border.
50 const border = node.querySelector<SVGRectElement>('rect[stroke="black"]');
51 if (container === null || compartment === null || border === null) {
52 return;
53 }
54 const copyOfContainer = container.cloneNode() as SVGRectElement;
55 const clipPath = document.createElementNS(SVG_NS, 'clipPath');
56 const clipId = `${node.id},,clip`;
57 clipPath.setAttribute('id', clipId);
58 clipPath.appendChild(copyOfContainer);
59 node.appendChild(clipPath);
60 compartment.setAttribute('clip-path', `url(#${clipId})`);
61 // Enlarge the compartment to completely cover the background.
62 modifyAttribute(compartment, 'y', -5);
63 modifyAttribute(compartment, 'x', -5);
64 modifyAttribute(compartment, 'width', 10);
65 const isEmpty = node.classList.contains('node-empty');
66 // Make sure that empty nodes are fully filled.
67 modifyAttribute(compartment, 'height', isEmpty ? 10 : 5);
68 if (node.classList.contains('node-equalsSelf-UNKNOWN')) {
69 addShadow(node, container, 6);
70 }
71 container.id = `${node.id},container`;
72 compartment.id = `${node.id},compartment`;
73 border.id = `${node.id},border`;
74}
75
76function createRect(
77 { x, y, width, height }: BBox,
78 original: SVGElement,
79): SVGRectElement {
80 const rect = document.createElementNS(SVG_NS, 'rect');
81 rect.setAttribute('fill', original.getAttribute('fill') ?? '');
82 rect.setAttribute('stroke', original.getAttribute('stroke') ?? '');
83 rect.setAttribute('x', String(x));
84 rect.setAttribute('y', String(y));
85 rect.setAttribute('width', String(width));
86 rect.setAttribute('height', String(height));
87 return rect;
88}
89
90function optimizeNodeShapes(node: SVGGElement) {
91 node.querySelectorAll('path').forEach((path) => {
92 const bbox = parsePathBBox(path);
93 const rect = createRect(bbox, path);
94 rect.setAttribute('rx', '12');
95 rect.setAttribute('ry', '12');
96 path.parentNode?.replaceChild(rect, path);
97 });
98 node.querySelectorAll('polygon').forEach((polygon) => {
99 const bbox = parsePolygonBBox(polygon);
100 if (bbox.height === 0) {
101 const polyline = document.createElementNS(SVG_NS, 'polyline');
102 polyline.setAttribute('stroke', polygon.getAttribute('stroke') ?? '');
103 polyline.setAttribute(
104 'points',
105 `${bbox.x},${bbox.y} ${bbox.x + bbox.width},${bbox.y}`,
106 );
107 polygon.parentNode?.replaceChild(polyline, polygon);
108 } else {
109 const rect = createRect(bbox, polygon);
110 polygon.parentNode?.replaceChild(rect, polygon);
111 }
112 });
113 clipCompartmentBackground(node);
114}
115
116function hrefToClass(node: SVGGElement) {
117 node.querySelectorAll<SVGAElement>('a').forEach((a) => {
118 if (a.parentNode === null) {
119 return;
120 }
121 const href = a.getAttribute('href') ?? a.getAttributeNS(XLINK_NS, 'href');
122 if (href === 'undefined' || !href?.startsWith('#')) {
123 return;
124 }
125 while (a.lastChild !== null) {
126 const child = a.lastChild;
127 a.removeChild(child);
128 if (child.nodeType === Node.ELEMENT_NODE) {
129 const element = child as Element;
130 element.classList.add('label', `label-${href.replace('#', '')}`);
131 a.after(child);
132 }
133 }
134 a.parentNode.removeChild(a);
135 });
136}
137
138function replaceImages(node: SVGGElement) {
139 node.querySelectorAll<SVGImageElement>('image').forEach((image) => {
140 const href =
141 image.getAttribute('href') ?? image.getAttributeNS(XLINK_NS, 'href');
142 if (href === 'undefined' || !href?.startsWith('#')) {
143 return;
144 }
145 const width = image.getAttribute('width')?.replace('px', '') ?? '';
146 const height = image.getAttribute('height')?.replace('px', '') ?? '';
147 const foreign = document.createElementNS(SVG_NS, 'foreignObject');
148 foreign.setAttribute('x', image.getAttribute('x') ?? '');
149 foreign.setAttribute('y', image.getAttribute('y') ?? '');
150 foreign.setAttribute('width', width);
151 foreign.setAttribute('height', height);
152 const div = document.createElement('div');
153 div.classList.add('icon', `icon-${href.replace('#', '')}`);
154 foreign.appendChild(div);
155 const sibling = image.nextElementSibling;
156 // Since dot doesn't respect the `id` attribute on table cells with a single image,
157 // compute the ID based on the ID of the next element (the label).
158 if (
159 sibling !== null &&
160 sibling.tagName.toLowerCase() === 'g' &&
161 sibling.id !== ''
162 ) {
163 foreign.id = `${sibling.id},icon`;
164 }
165 image.parentNode?.replaceChild(foreign, image);
166 });
167}
168
169export default function postProcessSvg(svg: SVGSVGElement) {
170 // svg
171 // .querySelectorAll<SVGTitleElement>('title')
172 // .forEach((title) => title.parentElement?.removeChild(title));
173 svg.querySelectorAll<SVGGElement>('g.node').forEach((node) => {
174 optimizeNodeShapes(node);
175 hrefToClass(node);
176 replaceImages(node);
177 });
178 // Increase padding to fit box shadows for multi-objects.
179 const viewBox = [
180 svg.viewBox.baseVal.x - 6,
181 svg.viewBox.baseVal.y - 6,
182 svg.viewBox.baseVal.width + 12,
183 svg.viewBox.baseVal.height + 12,
184 ];
185 svg.setAttribute('viewBox', viewBox.join(' '));
186}
diff --git a/subprojects/frontend/src/index.tsx b/subprojects/frontend/src/index.tsx
index cb11e6c3..60debd6b 100644
--- a/subprojects/frontend/src/index.tsx
+++ b/subprojects/frontend/src/index.tsx
@@ -4,46 +4,113 @@
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6 6
7import { styled } from '@mui/material/styles';
7import { configure } from 'mobx'; 8import { configure } from 'mobx';
8import { type Root, createRoot } from 'react-dom/client'; 9import { type Root, createRoot } from 'react-dom/client';
9 10
10import App from './App'; 11import App from './App';
11import RootStore from './RootStore'; 12import RootStore from './RootStore';
12 13
13const initialValue = `// Metamodel 14// Make sure `styled` ends up in the entry chunk.
14class Person { 15// https://github.com/mui/material-ui/issues/32727#issuecomment-1659945548
15 Person[] friend opposite friend 16(window as unknown as { fixViteIssue: unknown }).fixViteIssue = styled;
17
18const initialValue = `% Metamodel
19
20abstract class CompositeElement {
21 contains Region[] regions
16} 22}
17 23
18class Post { 24class Region {
19 Person author 25 contains Vertex[] vertices opposite region
20 Post[0..1] replyTo
21} 26}
22 27
23// Constraints 28abstract class Vertex {
24error replyToNotFriend(Post x, Post y) <-> 29 container Region region opposite vertices
25 replyTo(x, y), 30 contains Transition[] outgoingTransition opposite source
26 author(x, xAuthor), 31 Transition[] incomingTransition opposite target
27 author(y, yAuthor), 32}
28 !friend(xAuthor, yAuthor). 33
29 34class Transition {
30error replyToCycle(Post x) <-> replyTo+(x,x). 35 container Vertex source opposite outgoingTransition
31 36 Vertex[1] target opposite incomingTransition
32// Instance model 37}
33Person(a). 38
34Person(b). 39abstract class Pseudostate extends Vertex.
35friend(a, b). 40
36friend(b, a). 41abstract class RegularState extends Vertex.
37Post(p1). 42
38author(p1, a). 43class Entry extends Pseudostate.
39Post(p2). 44
40author(p2, b). 45class Exit extends Pseudostate.
41replyTo(p2, p1). 46
42 47class Choice extends Pseudostate.
43!author(Post::new, a). // Automatically inferred: author(Post::new, b). 48
44 49class FinalState extends RegularState.
45// Scope 50
46scope Post = 10..15, Person += 0. 51class State extends RegularState, CompositeElement.
52
53class Statechart extends CompositeElement.
54
55% Constraints
56
57%% Entry
58
59pred entryInRegion(Region r, Entry e) <->
60 vertices(r, e).
61
62error noEntryInRegion(Region r) <->
63 !entryInRegion(r, _).
64
65error multipleEntryInRegion(Region r) <->
66 entryInRegion(r, e1),
67 entryInRegion(r, e2),
68 e1 != e2.
69
70error incomingToEntry(Transition t, Entry e) <->
71 target(t, e).
72
73error noOutgoingTransitionFromEntry(Entry e) <->
74 !source(_, e).
75
76error multipleTransitionFromEntry(Entry e, Transition t1, Transition t2) <->
77 outgoingTransition(e, t1),
78 outgoingTransition(e, t2),
79 t1 != t2.
80
81%% Exit
82
83error outgoingFromExit(Transition t, Exit e) <->
84 source(t, e).
85
86%% Final
87
88error outgoingFromFinal(Transition t, FinalState e) <->
89 source(t, e).
90
91%% State vs Region
92
93pred stateInRegion(Region r, State s) <->
94 vertices(r, s).
95
96error noStateInRegion(Region r) <->
97 !stateInRegion(r, _).
98
99%% Choice
100
101error choiceHasNoOutgoing(Choice c) <->
102 !source(_, c).
103
104error choiceHasNoIncoming(Choice c) <->
105 !target(_, c).
106
107% Instance model
108
109Statechart(sct).
110
111% Scope
112
113scope node = 20..30, Region = 2..*, Choice = 1..*, Statechart += 0.
47`; 114`;
48 115
49configure({ 116configure({
diff --git a/subprojects/frontend/src/language/indentation.ts b/subprojects/frontend/src/language/indentation.ts
index 8446d7fa..6806147b 100644
--- a/subprojects/frontend/src/language/indentation.ts
+++ b/subprojects/frontend/src/language/indentation.ts
@@ -2,7 +2,7 @@
2 * Copyright (C) 2018-2021 by Marijn Haverbeke <marijnh@gmail.com> and others 2 * Copyright (C) 2018-2021 by Marijn Haverbeke <marijnh@gmail.com> and others
3 * Copyright (C) 2021-2023 The Refinery Authors <https://refinery.tools/> 3 * Copyright (C) 2021-2023 The Refinery Authors <https://refinery.tools/>
4 * 4 *
5 * SPDX-License-Identifier: MIT OR EPL-2.0 5 * SPDX-License-Identifier: MIT AND EPL-2.0
6 */ 6 */
7 7
8import type { TreeIndentContext } from '@codemirror/language'; 8import type { TreeIndentContext } from '@codemirror/language';
diff --git a/subprojects/frontend/src/table/SymbolSelector.tsx b/subprojects/frontend/src/table/SymbolSelector.tsx
new file mode 100644
index 00000000..5272f8ed
--- /dev/null
+++ b/subprojects/frontend/src/table/SymbolSelector.tsx
@@ -0,0 +1,65 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import Autocomplete from '@mui/material/Autocomplete';
8import Box from '@mui/material/Box';
9import TextField from '@mui/material/TextField';
10import { observer } from 'mobx-react-lite';
11
12import type GraphStore from '../graph/GraphStore';
13import RelationName from '../graph/RelationName';
14
15function SymbolSelector({ graph }: { graph: GraphStore }): JSX.Element {
16 const {
17 selectedSymbol,
18 semantics: { relations },
19 } = graph;
20
21 return (
22 <Autocomplete
23 renderInput={(params) => (
24 <TextField
25 {...{
26 ...params,
27 InputLabelProps: {
28 ...params.InputLabelProps,
29 // Workaround for type errors.
30 className: params.InputLabelProps.className ?? '',
31 style: params.InputLabelProps.style ?? {},
32 },
33 }}
34 variant="standard"
35 size="medium"
36 placeholder="Symbol"
37 />
38 )}
39 options={relations}
40 getOptionLabel={(option) => option.name}
41 renderOption={(props, option) => (
42 <Box component="li" {...props}>
43 <RelationName metadata={option} />
44 </Box>
45 )}
46 value={selectedSymbol ?? null}
47 isOptionEqualToValue={(option, value) => option.name === value.name}
48 onChange={(_event, value) => graph.setSelectedSymbol(value ?? undefined)}
49 sx={(theme) => ({
50 flexBasis: 200,
51 maxWidth: 600,
52 flexGrow: 1,
53 flexShrink: 1,
54 '.MuiInput-underline::before': {
55 borderColor:
56 theme.palette.mode === 'dark'
57 ? theme.palette.divider
58 : theme.palette.outer.border,
59 },
60 })}
61 />
62 );
63}
64
65export default observer(SymbolSelector);
diff --git a/subprojects/frontend/src/table/TableArea.tsx b/subprojects/frontend/src/table/TableArea.tsx
new file mode 100644
index 00000000..166b8adf
--- /dev/null
+++ b/subprojects/frontend/src/table/TableArea.tsx
@@ -0,0 +1,109 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import Box from '@mui/material/Box';
8import {
9 DataGrid,
10 type GridRenderCellParams,
11 type GridColDef,
12} from '@mui/x-data-grid';
13import { observer } from 'mobx-react-lite';
14import { useMemo } from 'react';
15
16import type GraphStore from '../graph/GraphStore';
17
18import TableToolbar from './TableToolbar';
19import ValueRenderer from './ValueRenderer';
20
21interface Row {
22 nodes: string[];
23 value: string;
24}
25
26function TableArea({ graph }: { graph: GraphStore }): JSX.Element {
27 const {
28 selectedSymbol,
29 semantics: { nodes, partialInterpretation },
30 } = graph;
31 const symbolName = selectedSymbol?.name;
32 const arity = selectedSymbol?.arity ?? 0;
33
34 const columns = useMemo<GridColDef<Row>[]>(() => {
35 const defs: GridColDef<Row>[] = [];
36 for (let i = 0; i < arity; i += 1) {
37 defs.push({
38 field: `n${i}`,
39 headerName: String(i + 1),
40 valueGetter: (row) => row.row.nodes[i] ?? '',
41 flex: 1,
42 });
43 }
44 defs.push({
45 field: 'value',
46 headerName: 'Value',
47 flex: 1,
48 renderCell: ({ value }: GridRenderCellParams<Row, string>) => (
49 <ValueRenderer value={value} />
50 ),
51 });
52 return defs;
53 }, [arity]);
54
55 const rows = useMemo<Row[]>(() => {
56 if (symbolName === undefined) {
57 return [];
58 }
59 const interpretation = partialInterpretation[symbolName] ?? [];
60 return interpretation.map((tuple) => {
61 const nodeNames: string[] = [];
62 for (let i = 0; i < arity; i += 1) {
63 const index = tuple[i];
64 if (typeof index === 'number') {
65 const node = nodes[index];
66 if (node !== undefined) {
67 nodeNames.push(node.name);
68 }
69 }
70 }
71 return {
72 nodes: nodeNames,
73 value: String(tuple[arity]),
74 };
75 });
76 }, [arity, nodes, partialInterpretation, symbolName]);
77
78 return (
79 <Box
80 width="100%"
81 height="100%"
82 p={1}
83 sx={(theme) => ({
84 '.MuiDataGrid-withBorderColor': {
85 borderColor:
86 theme.palette.mode === 'dark'
87 ? theme.palette.divider
88 : theme.palette.outer.border,
89 },
90 })}
91 >
92 <DataGrid
93 slots={{ toolbar: TableToolbar }}
94 slotProps={{
95 toolbar: {
96 graph,
97 },
98 }}
99 density="compact"
100 rowSelection={false}
101 columns={columns}
102 rows={rows}
103 getRowId={(row) => row.nodes.join(',')}
104 />
105 </Box>
106 );
107}
108
109export default observer(TableArea);
diff --git a/subprojects/frontend/src/table/TablePane.tsx b/subprojects/frontend/src/table/TablePane.tsx
new file mode 100644
index 00000000..8b640217
--- /dev/null
+++ b/subprojects/frontend/src/table/TablePane.tsx
@@ -0,0 +1,27 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import Stack from '@mui/material/Stack';
8import { Suspense, lazy } from 'react';
9
10import Loading from '../Loading';
11import type GraphStore from '../graph/GraphStore';
12
13const TableArea = lazy(() => import('./TableArea'));
14
15export default function TablePane({
16 graph,
17}: {
18 graph: GraphStore;
19}): JSX.Element {
20 return (
21 <Stack direction="column" height="100%" overflow="auto" alignItems="center">
22 <Suspense fallback={<Loading />}>
23 <TableArea graph={graph} />
24 </Suspense>
25 </Stack>
26 );
27}
diff --git a/subprojects/frontend/src/table/TableToolbar.tsx b/subprojects/frontend/src/table/TableToolbar.tsx
new file mode 100644
index 00000000..b14e73c5
--- /dev/null
+++ b/subprojects/frontend/src/table/TableToolbar.tsx
@@ -0,0 +1,41 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import Stack from '@mui/material/Stack';
8import {
9 GridToolbarColumnsButton,
10 GridToolbarContainer,
11 GridToolbarExport,
12 GridToolbarFilterButton,
13} from '@mui/x-data-grid';
14
15import type GraphStore from '../graph/GraphStore';
16
17import SymbolSelector from './SymbolSelector';
18
19export default function TableToolbar({
20 graph,
21}: {
22 graph: GraphStore;
23}): JSX.Element {
24 return (
25 <GridToolbarContainer
26 sx={{
27 display: 'flex',
28 flexDirection: 'row',
29 flexWrap: 'wrap-reverse',
30 justifyContent: 'space-between',
31 }}
32 >
33 <Stack direction="row" flexWrap="wrap">
34 <GridToolbarColumnsButton />
35 <GridToolbarFilterButton />
36 <GridToolbarExport />
37 </Stack>
38 <SymbolSelector graph={graph} />
39 </GridToolbarContainer>
40 );
41}
diff --git a/subprojects/frontend/src/table/ValueRenderer.tsx b/subprojects/frontend/src/table/ValueRenderer.tsx
new file mode 100644
index 00000000..ac5700e4
--- /dev/null
+++ b/subprojects/frontend/src/table/ValueRenderer.tsx
@@ -0,0 +1,62 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import CancelIcon from '@mui/icons-material/Cancel';
8import LabelIcon from '@mui/icons-material/Label';
9import LabelOutlinedIcon from '@mui/icons-material/LabelOutlined';
10import { styled } from '@mui/material/styles';
11
12const Label = styled('div', {
13 name: 'ValueRenderer-Label',
14 shouldForwardProp: (prop) => prop !== 'value',
15})<{
16 value: 'TRUE' | 'UNKNOWN' | 'ERROR';
17}>(({ theme, value }) => ({
18 display: 'flex',
19 alignItems: 'center',
20 ...(value === 'UNKNOWN'
21 ? {
22 color: theme.palette.text.secondary,
23 }
24 : {}),
25 ...(value === 'ERROR'
26 ? {
27 color: theme.palette.error.main,
28 }
29 : {}),
30 '& svg': {
31 marginRight: theme.spacing(0.5),
32 },
33}));
34
35export default function ValueRenderer({
36 value,
37}: {
38 value: string | undefined;
39}): React.ReactNode {
40 switch (value) {
41 case 'TRUE':
42 return (
43 <Label value={value}>
44 <LabelIcon fontSize="small" /> true
45 </Label>
46 );
47 case 'UNKNOWN':
48 return (
49 <Label value={value}>
50 <LabelOutlinedIcon fontSize="small" /> unknown
51 </Label>
52 );
53 case 'ERROR':
54 return (
55 <Label value={value}>
56 <CancelIcon fontSize="small" /> error
57 </Label>
58 );
59 default:
60 return value;
61 }
62}
diff --git a/subprojects/frontend/src/theme/ThemeProvider.tsx b/subprojects/frontend/src/theme/ThemeProvider.tsx
index 78146f25..18310147 100644
--- a/subprojects/frontend/src/theme/ThemeProvider.tsx
+++ b/subprojects/frontend/src/theme/ThemeProvider.tsx
@@ -75,13 +75,15 @@ function createResponsiveTheme(
75 ...options, 75 ...options,
76 typography: { 76 typography: {
77 fontFamily: 77 fontFamily:
78 '"Inter Variable", "Inter", "Roboto", "Helvetica", "Arial", sans-serif', 78 '"Open Sans Variable", "Open Sans", "Roboto", "Helvetica", "Arial", sans-serif',
79 fontWeightMedium: 600, 79 fontWeightMedium: 500,
80 fontWeightEditorNormal: 400, 80 fontWeightEditorNormal: 400,
81 fontWeightEditorBold: 700, 81 fontWeightEditorBold: 700,
82 button: { 82 button: {
83 // 24px line height for 14px button text to fix browser rounding errors. 83 fontWeight: 600,
84 lineHeight: 1.714286, 84 fontVariationSettings: '"wdth" 87.5',
85 fontSize: '1rem',
86 lineHeight: 1.5,
85 }, 87 },
86 editor: { 88 editor: {
87 fontFamily: 89 fontFamily:
@@ -151,7 +153,7 @@ function createResponsiveTheme(
151 }, {}), 153 }, {}),
152 }, 154 },
153 }, 155 },
154 sizeSmall: { fontSize: '0.75rem' }, 156 sizeSmall: { fontSize: '0.875rem', lineHeight: '1.75' },
155 sizeLarge: { fontSize: '1rem' }, 157 sizeLarge: { fontSize: '1rem' },
156 text: { '&.rounded': { padding: '6px 14px' } }, 158 text: { '&.rounded': { padding: '6px 14px' } },
157 textSizeSmall: { '&.rounded': { padding: '4px 8px' } }, 159 textSizeSmall: { '&.rounded': { padding: '4px 8px' } },
@@ -287,7 +289,7 @@ const darkTheme = (() => {
287 secondary: secondaryText, 289 secondary: secondaryText,
288 disabled: '#5c6370', 290 disabled: '#5c6370',
289 }, 291 },
290 divider: alpha(secondaryText, 0.24), 292 divider: alpha(primaryText, 0.24),
291 outer: { 293 outer: {
292 background: darkBackground, 294 background: darkBackground,
293 border: '#181a1f', 295 border: '#181a1f',
diff --git a/subprojects/frontend/src/theme/ThemeStore.ts b/subprojects/frontend/src/theme/ThemeStore.ts
index 7c657449..12449b94 100644
--- a/subprojects/frontend/src/theme/ThemeStore.ts
+++ b/subprojects/frontend/src/theme/ThemeStore.ts
@@ -12,11 +12,19 @@ export enum ThemePreference {
12 PreferDark, 12 PreferDark,
13} 13}
14 14
15export type SelectedPane = 'code' | 'graph' | 'table';
16
15export default class ThemeStore { 17export default class ThemeStore {
16 preference = ThemePreference.System; 18 preference = ThemePreference.System;
17 19
18 systemDarkMode: boolean; 20 systemDarkMode: boolean;
19 21
22 showCode = true;
23
24 showGraph = true;
25
26 showTable = false;
27
20 constructor() { 28 constructor() {
21 const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); 29 const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
22 this.systemDarkMode = mediaQuery.matches; 30 this.systemDarkMode = mediaQuery.matches;
@@ -48,4 +56,44 @@ export default class ThemeStore {
48 : ThemePreference.PreferDark; 56 : ThemePreference.PreferDark;
49 } 57 }
50 } 58 }
59
60 toggleCode(): void {
61 if (!this.showGraph && !this.showTable) {
62 return;
63 }
64 this.showCode = !this.showCode;
65 }
66
67 toggleGraph(): void {
68 if (!this.showCode && !this.showTable) {
69 return;
70 }
71 this.showGraph = !this.showGraph;
72 }
73
74 toggleTable(): void {
75 if (!this.showCode && !this.showGraph) {
76 return;
77 }
78 this.showTable = !this.showTable;
79 }
80
81 get selectedPane(): SelectedPane {
82 if (this.showCode) {
83 return 'code';
84 }
85 if (this.showGraph) {
86 return 'graph';
87 }
88 if (this.showTable) {
89 return 'table';
90 }
91 return 'code';
92 }
93
94 setSelectedPane(pane: SelectedPane, keepCode = true): void {
95 this.showCode = pane === 'code' || (keepCode && this.showCode);
96 this.showGraph = pane === 'graph';
97 this.showTable = pane === 'table';
98 }
51} 99}
diff --git a/subprojects/frontend/src/utils/svgURL.ts b/subprojects/frontend/src/utils/svgURL.ts
new file mode 100644
index 00000000..9b8ecbd5
--- /dev/null
+++ b/subprojects/frontend/src/utils/svgURL.ts
@@ -0,0 +1,9 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7export default function svgURL(svg: string): string {
8 return `url('data:image/svg+xml;utf8,${svg}')`;
9}
diff --git a/subprojects/frontend/src/xtext/BackendConfig.ts b/subprojects/frontend/src/xtext/BackendConfig.ts
index 4c7eac5f..e7043bd5 100644
--- a/subprojects/frontend/src/xtext/BackendConfig.ts
+++ b/subprojects/frontend/src/xtext/BackendConfig.ts
@@ -11,7 +11,7 @@ import { z } from 'zod';
11export const ENDPOINT = 'config.json'; 11export const ENDPOINT = 'config.json';
12 12
13const BackendConfig = z.object({ 13const BackendConfig = z.object({
14 webSocketURL: z.string().url(), 14 webSocketURL: z.string().url().optional(),
15}); 15});
16 16
17type BackendConfig = z.infer<typeof BackendConfig>; 17type BackendConfig = z.infer<typeof BackendConfig>;
diff --git a/subprojects/frontend/src/xtext/ContentAssistService.ts b/subprojects/frontend/src/xtext/ContentAssistService.ts
index fd30c4f9..ac8ab36a 100644
--- a/subprojects/frontend/src/xtext/ContentAssistService.ts
+++ b/subprojects/frontend/src/xtext/ContentAssistService.ts
@@ -248,10 +248,20 @@ export default class ContentAssistService {
248 if (lastTo === undefined) { 248 if (lastTo === undefined) {
249 return true; 249 return true;
250 } 250 }
251 const [transformedFrom, transformedTo] = this.mapRangeInclusive( 251 let transformedFrom: number;
252 lastFrom, 252 let transformedTo: number;
253 lastTo, 253 try {
254 ); 254 [transformedFrom, transformedTo] = this.mapRangeInclusive(
255 lastFrom,
256 lastTo,
257 );
258 } catch (error) {
259 if (error instanceof RangeError) {
260 log.debug('Invalidating cache due to invalid range', error);
261 return true;
262 }
263 throw error;
264 }
255 let invalidate = false; 265 let invalidate = false;
256 transaction.changes.iterChangedRanges((fromA, toA) => { 266 transaction.changes.iterChangedRanges((fromA, toA) => {
257 if (fromA < transformedFrom || toA > transformedTo) { 267 if (fromA < transformedFrom || toA > transformedTo) {
diff --git a/subprojects/frontend/src/xtext/ModelGenerationService.ts b/subprojects/frontend/src/xtext/ModelGenerationService.ts
new file mode 100644
index 00000000..29a70623
--- /dev/null
+++ b/subprojects/frontend/src/xtext/ModelGenerationService.ts
@@ -0,0 +1,66 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import type { Transaction } from '@codemirror/state';
8
9import type EditorStore from '../editor/EditorStore';
10
11import type UpdateService from './UpdateService';
12import { ModelGenerationResult } from './xtextServiceResults';
13
14const INITIAL_RANDOM_SEED = 1;
15
16export default class ModelGenerationService {
17 private nextRandomSeed = INITIAL_RANDOM_SEED;
18
19 constructor(
20 private readonly store: EditorStore,
21 private readonly updateService: UpdateService,
22 ) {}
23
24 onPush(push: unknown): void {
25 const result = ModelGenerationResult.parse(push);
26 if ('status' in result) {
27 this.store.setGeneratedModelMessage(result.uuid, result.status);
28 } else if ('error' in result) {
29 this.store.setGeneratedModelError(result.uuid, result.error);
30 } else {
31 this.store.setGeneratedModelSemantics(result.uuid, result);
32 }
33 }
34
35 onTransaction(transaction: Transaction): void {
36 if (transaction.docChanged) {
37 this.resetRandomSeed();
38 }
39 }
40
41 onDisconnect(): void {
42 this.store.modelGenerationCancelled();
43 this.resetRandomSeed();
44 }
45
46 async start(randomSeed?: number): Promise<void> {
47 const randomSeedOrNext = randomSeed ?? this.nextRandomSeed;
48 this.nextRandomSeed = randomSeedOrNext + 1;
49 const result =
50 await this.updateService.startModelGeneration(randomSeedOrNext);
51 if (!result.cancelled) {
52 this.store.addGeneratedModel(result.data.uuid, randomSeedOrNext);
53 }
54 }
55
56 async cancel(): Promise<void> {
57 const result = await this.updateService.cancelModelGeneration();
58 if (!result.cancelled) {
59 this.store.modelGenerationCancelled();
60 }
61 }
62
63 private resetRandomSeed() {
64 this.nextRandomSeed = INITIAL_RANDOM_SEED;
65 }
66}
diff --git a/subprojects/frontend/src/xtext/SemanticsService.ts b/subprojects/frontend/src/xtext/SemanticsService.ts
new file mode 100644
index 00000000..d68b87a9
--- /dev/null
+++ b/subprojects/frontend/src/xtext/SemanticsService.ts
@@ -0,0 +1,32 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import type EditorStore from '../editor/EditorStore';
8
9import type ValidationService from './ValidationService';
10import { SemanticsResult } from './xtextServiceResults';
11
12export default class SemanticsService {
13 constructor(
14 private readonly store: EditorStore,
15 private readonly validationService: ValidationService,
16 ) {}
17
18 onPush(push: unknown): void {
19 const result = SemanticsResult.parse(push);
20 if ('issues' in result) {
21 this.validationService.setSemanticsIssues(result.issues);
22 } else {
23 this.validationService.setSemanticsIssues([]);
24 if ('error' in result) {
25 this.store.setSemanticsError(result.error);
26 } else {
27 this.store.setSemantics(result);
28 }
29 }
30 this.store.analysisCompleted();
31 }
32}
diff --git a/subprojects/frontend/src/xtext/UpdateService.ts b/subprojects/frontend/src/xtext/UpdateService.ts
index ee5ebde2..70e79764 100644
--- a/subprojects/frontend/src/xtext/UpdateService.ts
+++ b/subprojects/frontend/src/xtext/UpdateService.ts
@@ -22,6 +22,7 @@ import {
22 FormattingResult, 22 FormattingResult,
23 isConflictResult, 23 isConflictResult,
24 OccurrencesResult, 24 OccurrencesResult,
25 ModelGenerationStartedResult,
25} from './xtextServiceResults'; 26} from './xtextServiceResults';
26 27
27const UPDATE_TIMEOUT_MS = 500; 28const UPDATE_TIMEOUT_MS = 500;
@@ -133,6 +134,7 @@ export default class UpdateService {
133 return; 134 return;
134 } 135 }
135 log.trace('Editor delta', delta); 136 log.trace('Editor delta', delta);
137 this.store.analysisStarted();
136 const result = await this.webSocketClient.send({ 138 const result = await this.webSocketClient.send({
137 resource: this.resourceName, 139 resource: this.resourceName,
138 serviceType: 'update', 140 serviceType: 'update',
@@ -157,6 +159,7 @@ export default class UpdateService {
157 private async updateFullTextExclusive(): Promise<void> { 159 private async updateFullTextExclusive(): Promise<void> {
158 log.debug('Performing full text update'); 160 log.debug('Performing full text update');
159 this.tracker.prepareFullTextUpdateExclusive(); 161 this.tracker.prepareFullTextUpdateExclusive();
162 this.store.analysisStarted();
160 const result = await this.webSocketClient.send({ 163 const result = await this.webSocketClient.send({
161 resource: this.resourceName, 164 resource: this.resourceName,
162 serviceType: 'update', 165 serviceType: 'update',
@@ -339,4 +342,43 @@ export default class UpdateService {
339 } 342 }
340 return { cancelled: false, data: parsedOccurrencesResult }; 343 return { cancelled: false, data: parsedOccurrencesResult };
341 } 344 }
345
346 async startModelGeneration(
347 randomSeed: number,
348 ): Promise<CancellableResult<ModelGenerationStartedResult>> {
349 try {
350 await this.updateOrThrow();
351 } catch (error) {
352 if (error instanceof CancelledError || error instanceof TimeoutError) {
353 return { cancelled: true };
354 }
355 throw error;
356 }
357 log.debug('Starting model generation');
358 const data = await this.webSocketClient.send({
359 resource: this.resourceName,
360 serviceType: 'modelGeneration',
361 requiredStateId: this.xtextStateId,
362 start: true,
363 randomSeed,
364 });
365 if (isConflictResult(data)) {
366 return { cancelled: true };
367 }
368 const parsedResult = ModelGenerationStartedResult.parse(data);
369 return { cancelled: false, data: parsedResult };
370 }
371
372 async cancelModelGeneration(): Promise<CancellableResult<unknown>> {
373 log.debug('Cancelling model generation');
374 const data = await this.webSocketClient.send({
375 resource: this.resourceName,
376 serviceType: 'modelGeneration',
377 cancel: true,
378 });
379 if (isConflictResult(data)) {
380 return { cancelled: true };
381 }
382 return { cancelled: false, data };
383 }
342} 384}
diff --git a/subprojects/frontend/src/xtext/ValidationService.ts b/subprojects/frontend/src/xtext/ValidationService.ts
index 64fb63eb..1a896db3 100644
--- a/subprojects/frontend/src/xtext/ValidationService.ts
+++ b/subprojects/frontend/src/xtext/ValidationService.ts
@@ -9,7 +9,7 @@ import type { Diagnostic } from '@codemirror/lint';
9import type EditorStore from '../editor/EditorStore'; 9import type EditorStore from '../editor/EditorStore';
10 10
11import type UpdateService from './UpdateService'; 11import type UpdateService from './UpdateService';
12import { ValidationResult } from './xtextServiceResults'; 12import { Issue, ValidationResult } from './xtextServiceResults';
13 13
14export default class ValidationService { 14export default class ValidationService {
15 constructor( 15 constructor(
@@ -17,11 +17,41 @@ export default class ValidationService {
17 private readonly updateService: UpdateService, 17 private readonly updateService: UpdateService,
18 ) {} 18 ) {}
19 19
20 private lastValidationIssues: Issue[] = [];
21
22 private lastSemanticsIssues: Issue[] = [];
23
20 onPush(push: unknown): void { 24 onPush(push: unknown): void {
21 const { issues } = ValidationResult.parse(push); 25 ({ issues: this.lastValidationIssues } = ValidationResult.parse(push));
26 this.lastSemanticsIssues = [];
27 this.updateDiagnostics();
28 if (
29 this.lastValidationIssues.some(({ severity }) => severity === 'error')
30 ) {
31 this.store.analysisCompleted(true);
32 }
33 }
34
35 onDisconnect(): void {
36 this.store.updateDiagnostics([]);
37 this.lastValidationIssues = [];
38 this.lastSemanticsIssues = [];
39 }
40
41 setSemanticsIssues(issues: Issue[]): void {
42 this.lastSemanticsIssues = issues;
43 this.updateDiagnostics();
44 }
45
46 private updateDiagnostics(): void {
22 const allChanges = this.updateService.computeChangesSinceLastUpdate(); 47 const allChanges = this.updateService.computeChangesSinceLastUpdate();
23 const diagnostics: Diagnostic[] = []; 48 const diagnostics: Diagnostic[] = [];
24 issues.forEach(({ offset, length, severity, description }) => { 49 function createDiagnostic({
50 offset,
51 length,
52 severity,
53 description,
54 }: Issue): void {
25 if (severity === 'ignore') { 55 if (severity === 'ignore') {
26 return; 56 return;
27 } 57 }
@@ -31,11 +61,9 @@ export default class ValidationService {
31 severity, 61 severity,
32 message: description, 62 message: description,
33 }); 63 });
34 }); 64 }
65 this.lastValidationIssues.forEach(createDiagnostic);
66 this.lastSemanticsIssues.forEach(createDiagnostic);
35 this.store.updateDiagnostics(diagnostics); 67 this.store.updateDiagnostics(diagnostics);
36 } 68 }
37
38 onDisconnect(): void {
39 this.store.updateDiagnostics([]);
40 }
41} 69}
diff --git a/subprojects/frontend/src/xtext/XtextClient.ts b/subprojects/frontend/src/xtext/XtextClient.ts
index e8181af0..7486d737 100644
--- a/subprojects/frontend/src/xtext/XtextClient.ts
+++ b/subprojects/frontend/src/xtext/XtextClient.ts
@@ -9,6 +9,7 @@ import type {
9 CompletionResult, 9 CompletionResult,
10} from '@codemirror/autocomplete'; 10} from '@codemirror/autocomplete';
11import type { Transaction } from '@codemirror/state'; 11import type { Transaction } from '@codemirror/state';
12import { type IReactionDisposer, reaction } from 'mobx';
12 13
13import type PWAStore from '../PWAStore'; 14import type PWAStore from '../PWAStore';
14import type EditorStore from '../editor/EditorStore'; 15import type EditorStore from '../editor/EditorStore';
@@ -16,7 +17,9 @@ import getLogger from '../utils/getLogger';
16 17
17import ContentAssistService from './ContentAssistService'; 18import ContentAssistService from './ContentAssistService';
18import HighlightingService from './HighlightingService'; 19import HighlightingService from './HighlightingService';
20import ModelGenerationService from './ModelGenerationService';
19import OccurrencesService from './OccurrencesService'; 21import OccurrencesService from './OccurrencesService';
22import SemanticsService from './SemanticsService';
20import UpdateService from './UpdateService'; 23import UpdateService from './UpdateService';
21import ValidationService from './ValidationService'; 24import ValidationService from './ValidationService';
22import XtextWebSocketClient from './XtextWebSocketClient'; 25import XtextWebSocketClient from './XtextWebSocketClient';
@@ -37,7 +40,16 @@ export default class XtextClient {
37 40
38 private readonly occurrencesService: OccurrencesService; 41 private readonly occurrencesService: OccurrencesService;
39 42
40 constructor(store: EditorStore, private readonly pwaStore: PWAStore) { 43 private readonly semanticsService: SemanticsService;
44
45 private readonly modelGenerationService: ModelGenerationService;
46
47 private readonly keepAliveDisposer: IReactionDisposer;
48
49 constructor(
50 private readonly store: EditorStore,
51 private readonly pwaStore: PWAStore,
52 ) {
41 this.webSocketClient = new XtextWebSocketClient( 53 this.webSocketClient = new XtextWebSocketClient(
42 () => this.onReconnect(), 54 () => this.onReconnect(),
43 () => this.onDisconnect(), 55 () => this.onDisconnect(),
@@ -51,6 +63,16 @@ export default class XtextClient {
51 ); 63 );
52 this.validationService = new ValidationService(store, this.updateService); 64 this.validationService = new ValidationService(store, this.updateService);
53 this.occurrencesService = new OccurrencesService(store, this.updateService); 65 this.occurrencesService = new OccurrencesService(store, this.updateService);
66 this.semanticsService = new SemanticsService(store, this.validationService);
67 this.modelGenerationService = new ModelGenerationService(
68 store,
69 this.updateService,
70 );
71 this.keepAliveDisposer = reaction(
72 () => store.generating,
73 (generating) => this.webSocketClient.setKeepAlive(generating),
74 { fireImmediately: true },
75 );
54 } 76 }
55 77
56 start(): void { 78 start(): void {
@@ -64,9 +86,11 @@ export default class XtextClient {
64 } 86 }
65 87
66 private onDisconnect(): void { 88 private onDisconnect(): void {
89 this.store.analysisCompleted(true);
67 this.highlightingService.onDisconnect(); 90 this.highlightingService.onDisconnect();
68 this.validationService.onDisconnect(); 91 this.validationService.onDisconnect();
69 this.occurrencesService.onDisconnect(); 92 this.occurrencesService.onDisconnect();
93 this.modelGenerationService.onDisconnect();
70 } 94 }
71 95
72 onTransaction(transaction: Transaction): void { 96 onTransaction(transaction: Transaction): void {
@@ -75,6 +99,7 @@ export default class XtextClient {
75 this.contentAssistService.onTransaction(transaction); 99 this.contentAssistService.onTransaction(transaction);
76 this.updateService.onTransaction(transaction); 100 this.updateService.onTransaction(transaction);
77 this.occurrencesService.onTransaction(transaction); 101 this.occurrencesService.onTransaction(transaction);
102 this.modelGenerationService.onTransaction(transaction);
78 } 103 }
79 104
80 private onPush( 105 private onPush(
@@ -93,7 +118,7 @@ export default class XtextClient {
93 ); 118 );
94 return; 119 return;
95 } 120 }
96 if (stateId !== xtextStateId) { 121 if (stateId !== xtextStateId && service !== 'modelGeneration') {
97 log.error( 122 log.error(
98 'Unexpected xtext state id: expected:', 123 'Unexpected xtext state id: expected:',
99 xtextStateId, 124 xtextStateId,
@@ -111,6 +136,12 @@ export default class XtextClient {
111 case 'validate': 136 case 'validate':
112 this.validationService.onPush(push); 137 this.validationService.onPush(push);
113 return; 138 return;
139 case 'semantics':
140 this.semanticsService.onPush(push);
141 return;
142 case 'modelGeneration':
143 this.modelGenerationService.onPush(push);
144 return;
114 default: 145 default:
115 throw new Error('Unknown service'); 146 throw new Error('Unknown service');
116 } 147 }
@@ -120,6 +151,14 @@ export default class XtextClient {
120 return this.contentAssistService.contentAssist(context); 151 return this.contentAssistService.contentAssist(context);
121 } 152 }
122 153
154 startModelGeneration(randomSeed?: number): Promise<void> {
155 return this.modelGenerationService.start(randomSeed);
156 }
157
158 cancelModelGeneration(): Promise<void> {
159 return this.modelGenerationService.cancel();
160 }
161
123 formatText(): void { 162 formatText(): void {
124 this.updateService.formatText().catch((e) => { 163 this.updateService.formatText().catch((e) => {
125 log.error('Error while formatting text', e); 164 log.error('Error while formatting text', e);
@@ -127,6 +166,7 @@ export default class XtextClient {
127 } 166 }
128 167
129 dispose(): void { 168 dispose(): void {
169 this.keepAliveDisposer();
130 this.webSocketClient.disconnect(); 170 this.webSocketClient.disconnect();
131 } 171 }
132} 172}
diff --git a/subprojects/frontend/src/xtext/XtextWebSocketClient.ts b/subprojects/frontend/src/xtext/XtextWebSocketClient.ts
index 6bb7eec8..280ac875 100644
--- a/subprojects/frontend/src/xtext/XtextWebSocketClient.ts
+++ b/subprojects/frontend/src/xtext/XtextWebSocketClient.ts
@@ -204,7 +204,7 @@ export default class XtextWebSocketClient {
204 204
205 get state() { 205 get state() {
206 this.stateAtom.reportObserved(); 206 this.stateAtom.reportObserved();
207 return this.interpreter.state; 207 return this.interpreter.getSnapshot();
208 } 208 }
209 209
210 get opening(): boolean { 210 get opening(): boolean {
@@ -270,6 +270,12 @@ export default class XtextWebSocketClient {
270 return promise; 270 return promise;
271 } 271 }
272 272
273 setKeepAlive(keepAlive: boolean): void {
274 this.interpreter.send({
275 type: keepAlive ? 'GENERATION_STARTED' : 'GENERATION_ENDED',
276 });
277 }
278
273 private updateVisibility(): void { 279 private updateVisibility(): void {
274 this.interpreter.send(document.hidden ? 'TAB_HIDDEN' : 'TAB_VISIBLE'); 280 this.interpreter.send(document.hidden ? 'TAB_HIDDEN' : 'TAB_VISIBLE');
275 } 281 }
@@ -282,7 +288,10 @@ export default class XtextWebSocketClient {
282 log.debug('Creating WebSocket'); 288 log.debug('Creating WebSocket');
283 289
284 (async () => { 290 (async () => {
285 const { webSocketURL } = await fetchBackendConfig(); 291 let { webSocketURL } = await fetchBackendConfig();
292 if (webSocketURL === undefined) {
293 webSocketURL = `${window.origin.replace(/^http/, 'ws')}/xtext-service`;
294 }
286 this.openWebSocketWithURL(webSocketURL); 295 this.openWebSocketWithURL(webSocketURL);
287 })().catch((error) => { 296 })().catch((error) => {
288 log.error('Error while initializing connection', error); 297 log.error('Error while initializing connection', error);
diff --git a/subprojects/frontend/src/xtext/webSocketMachine.ts b/subprojects/frontend/src/xtext/webSocketMachine.ts
index 2fb1f52f..9113286f 100644
--- a/subprojects/frontend/src/xtext/webSocketMachine.ts
+++ b/subprojects/frontend/src/xtext/webSocketMachine.ts
@@ -27,6 +27,8 @@ export type WebSocketEvent =
27 | { type: 'PAGE_RESUME' } 27 | { type: 'PAGE_RESUME' }
28 | { type: 'ONLINE' } 28 | { type: 'ONLINE' }
29 | { type: 'OFFLINE' } 29 | { type: 'OFFLINE' }
30 | { type: 'GENERATION_STARTED' }
31 | { type: 'GENERATION_ENDED' }
30 | { type: 'ERROR'; message: string }; 32 | { type: 'ERROR'; message: string };
31 33
32export default createMachine( 34export default createMachine(
@@ -105,7 +107,7 @@ export default createMachine(
105 initial: 'opening', 107 initial: 'opening',
106 states: { 108 states: {
107 opening: { 109 opening: {
108 always: [{ target: '#timedOut', in: '#tabHidden' }], 110 always: [{ target: '#timedOut', in: '#mayDisconnect' }],
109 after: { 111 after: {
110 OPEN_TIMEOUT: { 112 OPEN_TIMEOUT: {
111 actions: 'raiseTimeoutError', 113 actions: 'raiseTimeoutError',
@@ -143,7 +145,7 @@ export default createMachine(
143 initial: 'active', 145 initial: 'active',
144 states: { 146 states: {
145 active: { 147 active: {
146 always: [{ target: 'inactive', in: '#tabHidden' }], 148 always: [{ target: 'inactive', in: '#mayDisconnect' }],
147 }, 149 },
148 inactive: { 150 inactive: {
149 always: [{ target: 'active', in: '#tabVisible' }], 151 always: [{ target: 'active', in: '#tabVisible' }],
@@ -173,14 +175,44 @@ export default createMachine(
173 visibleOrUnknown: { 175 visibleOrUnknown: {
174 id: 'tabVisible', 176 id: 'tabVisible',
175 on: { 177 on: {
176 TAB_HIDDEN: 'hidden', 178 TAB_HIDDEN: [
179 { target: 'hidden.mayDisconnect', in: '#generationIdle' },
180 { target: 'hidden.keepAlive', in: '#generationRunning' },
181 ],
177 }, 182 },
178 }, 183 },
179 hidden: { 184 hidden: {
180 id: 'tabHidden',
181 on: { 185 on: {
182 TAB_VISIBLE: 'visibleOrUnknown', 186 TAB_VISIBLE: 'visibleOrUnknown',
183 }, 187 },
188 initial: 'mayDisconnect',
189 states: {
190 mayDisconnect: {
191 id: 'mayDisconnect',
192 always: { target: 'keepAlive', in: '#generationRunning' },
193 },
194 keepAlive: {
195 id: 'keepAlive',
196 always: { target: 'mayDisconnect', in: '#generationIdle' },
197 },
198 },
199 },
200 },
201 },
202 generation: {
203 initial: 'idle',
204 states: {
205 idle: {
206 id: 'generationIdle',
207 on: {
208 GENERATION_STARTED: 'running',
209 },
210 },
211 running: {
212 id: 'generationRunning',
213 on: {
214 GENERATION_ENDED: 'idle',
215 },
184 }, 216 },
185 }, 217 },
186 }, 218 },
diff --git a/subprojects/frontend/src/xtext/xtextMessages.ts b/subprojects/frontend/src/xtext/xtextMessages.ts
index bbbff064..15831c5a 100644
--- a/subprojects/frontend/src/xtext/xtextMessages.ts
+++ b/subprojects/frontend/src/xtext/xtextMessages.ts
@@ -34,7 +34,12 @@ export const XtextWebErrorResponse = z.object({
34 34
35export type XtextWebErrorResponse = z.infer<typeof XtextWebErrorResponse>; 35export type XtextWebErrorResponse = z.infer<typeof XtextWebErrorResponse>;
36 36
37export const XtextWebPushService = z.enum(['highlight', 'validate']); 37export const XtextWebPushService = z.enum([
38 'highlight',
39 'validate',
40 'semantics',
41 'modelGeneration',
42]);
38 43
39export type XtextWebPushService = z.infer<typeof XtextWebPushService>; 44export type XtextWebPushService = z.infer<typeof XtextWebPushService>;
40 45
diff --git a/subprojects/frontend/src/xtext/xtextServiceResults.ts b/subprojects/frontend/src/xtext/xtextServiceResults.ts
index d3b467ad..e473bd48 100644
--- a/subprojects/frontend/src/xtext/xtextServiceResults.ts
+++ b/subprojects/frontend/src/xtext/xtextServiceResults.ts
@@ -125,3 +125,73 @@ export const FormattingResult = DocumentStateResult.extend({
125}); 125});
126 126
127export type FormattingResult = z.infer<typeof FormattingResult>; 127export type FormattingResult = z.infer<typeof FormattingResult>;
128
129export const ModelGenerationStartedResult = z.object({
130 uuid: z.string().nonempty(),
131});
132
133export type ModelGenerationStartedResult = z.infer<
134 typeof ModelGenerationStartedResult
135>;
136
137export const NodeMetadata = z.object({
138 name: z.string(),
139 simpleName: z.string(),
140 kind: z.enum(['IMPLICIT', 'INDIVIDUAL', 'NEW']),
141});
142
143export type NodeMetadata = z.infer<typeof NodeMetadata>;
144
145export const RelationMetadata = z.object({
146 name: z.string(),
147 simpleName: z.string(),
148 arity: z.number().nonnegative(),
149 detail: z.union([
150 z.object({ type: z.literal('class'), abstractClass: z.boolean() }),
151 z.object({ type: z.literal('reference'), containment: z.boolean() }),
152 z.object({
153 type: z.literal('opposite'),
154 container: z.boolean(),
155 opposite: z.string(),
156 }),
157 z.object({ type: z.literal('predicate'), error: z.boolean() }),
158 z.object({ type: z.literal('builtin') }),
159 ]),
160});
161
162export type RelationMetadata = z.infer<typeof RelationMetadata>;
163
164export const SemanticsSuccessResult = z.object({
165 nodes: NodeMetadata.array(),
166 relations: RelationMetadata.array(),
167 partialInterpretation: z.record(
168 z.string(),
169 z.union([z.number(), z.string()]).array().array(),
170 ),
171});
172
173export type SemanticsSuccessResult = z.infer<typeof SemanticsSuccessResult>;
174
175export const SemanticsResult = z.union([
176 z.object({ error: z.string() }),
177 z.object({ issues: Issue.array() }),
178 SemanticsSuccessResult,
179]);
180
181export type SemanticsResult = z.infer<typeof SemanticsResult>;
182
183export const ModelGenerationResult = z.union([
184 z.object({
185 uuid: z.string().nonempty(),
186 status: z.string(),
187 }),
188 z.object({
189 uuid: z.string().nonempty(),
190 error: z.string(),
191 }),
192 SemanticsSuccessResult.extend({
193 uuid: z.string().nonempty(),
194 }),
195]);
196
197export type ModelGenerationResult = z.infer<typeof ModelGenerationResult>;
diff --git a/subprojects/frontend/tsconfig.base.json b/subprojects/frontend/tsconfig.base.json
index 5ef50b5e..545eca35 100644
--- a/subprojects/frontend/tsconfig.base.json
+++ b/subprojects/frontend/tsconfig.base.json
@@ -2,7 +2,7 @@
2 * Copyright (c) Microsoft Corporation. 2 * Copyright (c) Microsoft Corporation.
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/> 3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * 4 *
5 * SPDX-License-Identifier: MIT OR EPL-2.0 5 * SPDX-License-Identifier: MIT
6 * 6 *
7 * This file is based on 7 * This file is based on
8 * https://github.com/tsconfig/bases/blob/7db25a41bc5a9c0f66d91f6f3aa28438afcb2f18/bases/strictest.json 8 * https://github.com/tsconfig/bases/blob/7db25a41bc5a9c0f66d91f6f3aa28438afcb2f18/bases/strictest.json
diff --git a/subprojects/frontend/types/ImportMeta.d.ts b/subprojects/frontend/types/ImportMeta.d.ts
index f5a32ef1..096f088b 100644
--- a/subprojects/frontend/types/ImportMeta.d.ts
+++ b/subprojects/frontend/types/ImportMeta.d.ts
@@ -2,7 +2,7 @@
2 * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors 2 * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
3 * Copyright (c) 2021-2023 The Refinery Authors <https://refinery.tools/> 3 * Copyright (c) 2021-2023 The Refinery Authors <https://refinery.tools/>
4 * 4 *
5 * SPDX-License-Identifier: MIT OR EPL-2.0 5 * SPDX-License-Identifier: MIT
6 */ 6 */
7 7
8interface ImportMeta { 8interface ImportMeta {
diff --git a/subprojects/frontend/types/grammar.d.ts b/subprojects/frontend/types/grammar.d.ts
index e7a7eebf..92f99ec3 100644
--- a/subprojects/frontend/types/grammar.d.ts
+++ b/subprojects/frontend/types/grammar.d.ts
@@ -2,7 +2,7 @@
2 * Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others 2 * Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
3 * Copyright (C) 2021-2023 The Refinery Authors <https://refinery.tools/> 3 * Copyright (C) 2021-2023 The Refinery Authors <https://refinery.tools/>
4 * 4 *
5 * SPDX-License-Identifier: MIT OR EPL-2.0 5 * SPDX-License-Identifier: MIT
6 */ 6 */
7 7
8declare module '*.grammar' { 8declare module '*.grammar' {
diff --git a/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts b/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts
index 4ef9f4e3..ce89a44c 100644
--- a/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts
+++ b/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts
@@ -2,7 +2,7 @@
2 * Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others 2 * Copyright (C) 2018 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
3 * Copyright (C) 2021-2023 The Refinery Authors <https://refinery.tools/> 3 * Copyright (C) 2021-2023 The Refinery Authors <https://refinery.tools/>
4 * 4 *
5 * SPDX-License-Identifier: MIT OR EPL-2.0 5 * SPDX-License-Identifier: MIT
6 */ 6 */
7 7
8// We have to explicitly redeclare the type of the `./rollup` ESM export of `@lezer/generator`, 8// We have to explicitly redeclare the type of the `./rollup` ESM export of `@lezer/generator`,
diff --git a/subprojects/frontend/vite.config.ts b/subprojects/frontend/vite.config.ts
index 9e08ccc4..63d5245f 100644
--- a/subprojects/frontend/vite.config.ts
+++ b/subprojects/frontend/vite.config.ts
@@ -17,6 +17,7 @@ import detectDevModeOptions, {
17 API_ENDPOINT, 17 API_ENDPOINT,
18} from './config/detectDevModeOptions'; 18} from './config/detectDevModeOptions';
19import fetchPackageMetadata from './config/fetchPackageMetadata'; 19import fetchPackageMetadata from './config/fetchPackageMetadata';
20import graphvizUMDVitePlugin from './config/graphvizUMDVitePlugin';
20import manifest from './config/manifest'; 21import manifest from './config/manifest';
21import minifyHTMLVitePlugin from './config/minifyHTMLVitePlugin'; 22import minifyHTMLVitePlugin from './config/minifyHTMLVitePlugin';
22import preloadFontsVitePlugin from './config/preloadFontsVitePlugin'; 23import preloadFontsVitePlugin from './config/preloadFontsVitePlugin';
@@ -29,8 +30,8 @@ const { mode, isDevelopment, devModePlugins, serverOptions } =
29process.env['NODE_ENV'] ??= mode; 30process.env['NODE_ENV'] ??= mode;
30 31
31const fontsGlob = [ 32const fontsGlob = [
32 'inter-latin-variable-wghtOnly-normal-*.woff2', 33 'open-sans-latin-wdth-{normal,italic}-*.woff2',
33 'jetbrains-mono-latin-variable-wghtOnly-{normal,italic}-*.woff2', 34 'jetbrains-mono-latin-wght-{normal,italic}-*.woff2',
34]; 35];
35 36
36const viteConfig: ViteConfig = { 37const viteConfig: ViteConfig = {
@@ -43,6 +44,7 @@ const viteConfig: ViteConfig = {
43 lezer(), 44 lezer(),
44 preloadFontsVitePlugin(fontsGlob), 45 preloadFontsVitePlugin(fontsGlob),
45 minifyHTMLVitePlugin(), 46 minifyHTMLVitePlugin(),
47 graphvizUMDVitePlugin(),
46 VitePWA({ 48 VitePWA({
47 strategies: 'generateSW', 49 strategies: 'generateSW',
48 registerType: 'prompt', 50 registerType: 'prompt',
diff --git a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java
index e194ee31..ea90a82e 100644
--- a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java
+++ b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/contentassist/ProblemCrossrefProposalProvider.java
@@ -5,39 +5,60 @@
5 */ 5 */
6package tools.refinery.language.ide.contentassist; 6package tools.refinery.language.ide.contentassist;
7 7
8import java.util.Objects; 8import com.google.inject.Inject;
9
10import org.eclipse.emf.ecore.EObject; 9import org.eclipse.emf.ecore.EObject;
11import org.eclipse.emf.ecore.util.EcoreUtil; 10import org.eclipse.emf.ecore.util.EcoreUtil;
12import org.eclipse.xtext.CrossReference; 11import org.eclipse.xtext.CrossReference;
13import org.eclipse.xtext.GrammarUtil; 12import org.eclipse.xtext.GrammarUtil;
14import org.eclipse.xtext.ide.editor.contentassist.ContentAssistContext; 13import org.eclipse.xtext.ide.editor.contentassist.ContentAssistContext;
15import org.eclipse.xtext.ide.editor.contentassist.ContentAssistEntry;
16import org.eclipse.xtext.ide.editor.contentassist.IdeCrossrefProposalProvider; 14import org.eclipse.xtext.ide.editor.contentassist.IdeCrossrefProposalProvider;
15import org.eclipse.xtext.naming.QualifiedName;
17import org.eclipse.xtext.nodemodel.util.NodeModelUtils; 16import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
18import org.eclipse.xtext.resource.IEObjectDescription; 17import org.eclipse.xtext.resource.IEObjectDescription;
19 18import org.eclipse.xtext.scoping.IScope;
20import com.google.inject.Inject;
21
22import tools.refinery.language.model.problem.Problem; 19import tools.refinery.language.model.problem.Problem;
20import tools.refinery.language.resource.ProblemResourceDescriptionStrategy;
23import tools.refinery.language.resource.ReferenceCounter; 21import tools.refinery.language.resource.ReferenceCounter;
24import tools.refinery.language.utils.ProblemUtil; 22import tools.refinery.language.utils.ProblemUtil;
25 23
24import java.util.ArrayList;
25import java.util.HashMap;
26import java.util.List;
27import java.util.Objects;
28
26public class ProblemCrossrefProposalProvider extends IdeCrossrefProposalProvider { 29public class ProblemCrossrefProposalProvider extends IdeCrossrefProposalProvider {
27 @Inject 30 @Inject
28 private ReferenceCounter referenceCounter; 31 private ReferenceCounter referenceCounter;
29 32
30 @Override 33 @Override
31 protected ContentAssistEntry createProposal(IEObjectDescription candidate, CrossReference crossRef, 34 protected Iterable<IEObjectDescription> queryScope(IScope scope, CrossReference crossReference,
32 ContentAssistContext context) { 35 ContentAssistContext context) {
33 if (!shouldCreateProposal(candidate, crossRef, context)) { 36 var eObjectDescriptionsByName = new HashMap<QualifiedName, List<IEObjectDescription>>();
34 return null; 37 for (var candidate : super.queryScope(scope, crossReference, context)) {
38 if (isExistingObject(candidate, crossReference, context)) {
39 // {@code getQualifiedName()} will refer to the full name for objects that are loaded from the global
40 // scope, but {@code getName()} returns the qualified name that we set in
41 // {@code ProblemResourceDescriptionStrategy}.
42 var qualifiedName = candidate.getName();
43 var candidateList = eObjectDescriptionsByName.computeIfAbsent(qualifiedName,
44 ignored -> new ArrayList<>());
45 candidateList.add(candidate);
46 }
35 } 47 }
36 return super.createProposal(candidate, crossRef, context); 48 var eObjectDescriptions = new ArrayList<IEObjectDescription>();
49 for (var candidates : eObjectDescriptionsByName.values()) {
50 if (candidates.size() == 1) {
51 var candidate = candidates.get(0);
52 if (shouldBeVisible(candidate)) {
53 eObjectDescriptions.add(candidate);
54 }
55 }
56 }
57 return eObjectDescriptions;
37 } 58 }
38 59
39 protected boolean shouldCreateProposal(IEObjectDescription candidate, CrossReference crossRef, 60 protected boolean isExistingObject(IEObjectDescription candidate, CrossReference crossRef,
40 ContentAssistContext context) { 61 ContentAssistContext context) {
41 var rootModel = context.getRootModel(); 62 var rootModel = context.getRootModel();
42 var eObjectOrProxy = candidate.getEObjectOrProxy(); 63 var eObjectOrProxy = candidate.getEObjectOrProxy();
43 if (!Objects.equals(rootModel.eResource(), eObjectOrProxy.eResource())) { 64 if (!Objects.equals(rootModel.eResource(), eObjectOrProxy.eResource())) {
@@ -60,6 +81,11 @@ public class ProblemCrossrefProposalProvider extends IdeCrossrefProposalProvider
60 return true; 81 return true;
61 } 82 }
62 83
84 protected boolean shouldBeVisible(IEObjectDescription candidate) {
85 var errorPredicate = candidate.getUserData(ProblemResourceDescriptionStrategy.ERROR_PREDICATE);
86 return !ProblemResourceDescriptionStrategy.ERROR_PREDICATE_TRUE.equals(errorPredicate);
87 }
88
63 protected EObject getCurrentValue(CrossReference crossRef, ContentAssistContext context) { 89 protected EObject getCurrentValue(CrossReference crossRef, ContentAssistContext context) {
64 var value = getCurrentValue(crossRef, context.getCurrentModel()); 90 var value = getCurrentValue(crossRef, context.getCurrentModel());
65 if (value != null) { 91 if (value != null) {
diff --git a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java
index e8f97d51..ae8c70e0 100644
--- a/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java
+++ b/subprojects/language-ide/src/main/java/tools/refinery/language/ide/syntaxcoloring/ProblemSemanticHighlightingCalculator.java
@@ -16,6 +16,7 @@ import org.eclipse.xtext.nodemodel.INode;
16import org.eclipse.xtext.nodemodel.util.NodeModelUtils; 16import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
17import org.eclipse.xtext.service.OperationCanceledManager; 17import org.eclipse.xtext.service.OperationCanceledManager;
18import org.eclipse.xtext.util.CancelIndicator; 18import org.eclipse.xtext.util.CancelIndicator;
19import org.jetbrains.annotations.NotNull;
19import tools.refinery.language.model.problem.*; 20import tools.refinery.language.model.problem.*;
20import tools.refinery.language.utils.ProblemDesugarer; 21import tools.refinery.language.utils.ProblemDesugarer;
21import tools.refinery.language.utils.ProblemUtil; 22import tools.refinery.language.utils.ProblemUtil;
@@ -94,9 +95,16 @@ public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighli
94 } 95 }
95 96
96 protected String[] getHighlightClass(EObject eObject, EReference reference) { 97 protected String[] getHighlightClass(EObject eObject, EReference reference) {
98 boolean isError = ProblemUtil.isError(eObject);
97 if (ProblemUtil.isBuiltIn(eObject)) { 99 if (ProblemUtil.isBuiltIn(eObject)) {
98 return new String[] { BUILTIN_CLASS }; 100 var className = isError ? ERROR_CLASS : BUILTIN_CLASS;
101 return new String[] { className };
99 } 102 }
103 return getUserDefinedElementHighlightClass(eObject, reference, isError);
104 }
105
106 @NotNull
107 private String[] getUserDefinedElementHighlightClass(EObject eObject, EReference reference, boolean isError) {
100 ImmutableList.Builder<String> classesBuilder = ImmutableList.builder(); 108 ImmutableList.Builder<String> classesBuilder = ImmutableList.builder();
101 if (eObject instanceof ClassDeclaration classDeclaration && classDeclaration.isAbstract()) { 109 if (eObject instanceof ClassDeclaration classDeclaration && classDeclaration.isAbstract()) {
102 classesBuilder.add(ABSTRACT_CLASS); 110 classesBuilder.add(ABSTRACT_CLASS);
@@ -105,8 +113,7 @@ public class ProblemSemanticHighlightingCalculator extends DefaultSemanticHighli
105 && desugarer.isContainmentReference(referenceDeclaration)) { 113 && desugarer.isContainmentReference(referenceDeclaration)) {
106 classesBuilder.add(CONTAINMENT_CLASS); 114 classesBuilder.add(CONTAINMENT_CLASS);
107 } 115 }
108 if (eObject instanceof PredicateDefinition predicateDefinition 116 if (isError) {
109 && predicateDefinition.getKind() == PredicateKind.ERROR) {
110 classesBuilder.add(ERROR_CLASS); 117 classesBuilder.add(ERROR_CLASS);
111 } 118 }
112 if (eObject instanceof Node node) { 119 if (eObject instanceof Node node) {
diff --git a/subprojects/language-model/problem.aird b/subprojects/language-model/problem.aird
index 286dabd6..a307ae83 100644
--- a/subprojects/language-model/problem.aird
+++ b/subprojects/language-model/problem.aird
@@ -7,7 +7,7 @@
7 <semanticResources>build/resources/main/model/problem.genmodel</semanticResources> 7 <semanticResources>build/resources/main/model/problem.genmodel</semanticResources>
8 <ownedViews xmi:type="viewpoint:DView" uid="_CsAAYKA4EeuqkpDnuik1sg"> 8 <ownedViews xmi:type="viewpoint:DView" uid="_CsAAYKA4EeuqkpDnuik1sg">
9 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> 9 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
10 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_CsYa4KA4EeuqkpDnuik1sg" name="declarations" repPath="#_CsUwgKA4EeuqkpDnuik1sg" changeId="f104e460-dce9-4947-b526-467cf8618336"> 10 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_CsYa4KA4EeuqkpDnuik1sg" name="declarations" repPath="#_CsUwgKA4EeuqkpDnuik1sg" changeId="7fa3b02a-a620-4e42-87d5-b2cc35ee8070">
11 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> 11 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
12 <target xmi:type="ecore:EPackage" href="src/main/resources/model/problem.ecore#/"/> 12 <target xmi:type="ecore:EPackage" href="src/main/resources/model/problem.ecore#/"/>
13 </ownedRepresentationDescriptors> 13 </ownedRepresentationDescriptors>
@@ -79,9 +79,9 @@
79 <children xmi:type="notation:Node" xmi:id="_fit3kKA5EeuqkpDnuik1sg" type="2003" element="_fihqUKA5EeuqkpDnuik1sg"> 79 <children xmi:type="notation:Node" xmi:id="_fit3kKA5EeuqkpDnuik1sg" type="2003" element="_fihqUKA5EeuqkpDnuik1sg">
80 <children xmi:type="notation:Node" xmi:id="_fit3k6A5EeuqkpDnuik1sg" type="5007"/> 80 <children xmi:type="notation:Node" xmi:id="_fit3k6A5EeuqkpDnuik1sg" type="5007"/>
81 <children xmi:type="notation:Node" xmi:id="_fit3lKA5EeuqkpDnuik1sg" type="7004"> 81 <children xmi:type="notation:Node" xmi:id="_fit3lKA5EeuqkpDnuik1sg" type="7004">
82 <children xmi:type="notation:Node" xmi:id="_id6DcDNoEe2fD4dIhR_vzA" type="3010" element="_ida7QDNoEe2fD4dIhR_vzA"> 82 <children xmi:type="notation:Node" xmi:id="_bmoagDrQEe62Q_vL_UTCsA" type="3010" element="_blvCoDrQEe62Q_vL_UTCsA">
83 <styles xmi:type="notation:FontStyle" xmi:id="_id6DcTNoEe2fD4dIhR_vzA" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/> 83 <styles xmi:type="notation:FontStyle" xmi:id="_bmoagTrQEe62Q_vL_UTCsA" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/>
84 <layoutConstraint xmi:type="notation:Location" xmi:id="_id6DcjNoEe2fD4dIhR_vzA"/> 84 <layoutConstraint xmi:type="notation:Location" xmi:id="_bmoagjrQEe62Q_vL_UTCsA"/>
85 </children> 85 </children>
86 <styles xmi:type="notation:SortingStyle" xmi:id="_fit3laA5EeuqkpDnuik1sg"/> 86 <styles xmi:type="notation:SortingStyle" xmi:id="_fit3laA5EeuqkpDnuik1sg"/>
87 <styles xmi:type="notation:FilteringStyle" xmi:id="_fit3lqA5EeuqkpDnuik1sg"/> 87 <styles xmi:type="notation:FilteringStyle" xmi:id="_fit3lqA5EeuqkpDnuik1sg"/>
@@ -92,10 +92,6 @@
92 <children xmi:type="notation:Node" xmi:id="_QKLK0KA6EeuqkpDnuik1sg" type="2003" element="_QKD2EKA6EeuqkpDnuik1sg"> 92 <children xmi:type="notation:Node" xmi:id="_QKLK0KA6EeuqkpDnuik1sg" type="2003" element="_QKD2EKA6EeuqkpDnuik1sg">
93 <children xmi:type="notation:Node" xmi:id="_QKLK06A6EeuqkpDnuik1sg" type="5007"/> 93 <children xmi:type="notation:Node" xmi:id="_QKLK06A6EeuqkpDnuik1sg" type="5007"/>
94 <children xmi:type="notation:Node" xmi:id="_QKLK1KA6EeuqkpDnuik1sg" type="7004"> 94 <children xmi:type="notation:Node" xmi:id="_QKLK1KA6EeuqkpDnuik1sg" type="7004">
95 <children xmi:type="notation:Node" xmi:id="_ARsFYBjHEe2_erjsEmF9GQ" type="3010" element="_ARaYkBjHEe2_erjsEmF9GQ">
96 <styles xmi:type="notation:FontStyle" xmi:id="_ARsFYRjHEe2_erjsEmF9GQ" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/>
97 <layoutConstraint xmi:type="notation:Location" xmi:id="_ARsFYhjHEe2_erjsEmF9GQ"/>
98 </children>
99 <styles xmi:type="notation:SortingStyle" xmi:id="_QKLK1aA6EeuqkpDnuik1sg"/> 95 <styles xmi:type="notation:SortingStyle" xmi:id="_QKLK1aA6EeuqkpDnuik1sg"/>
100 <styles xmi:type="notation:FilteringStyle" xmi:id="_QKLK1qA6EeuqkpDnuik1sg"/> 96 <styles xmi:type="notation:FilteringStyle" xmi:id="_QKLK1qA6EeuqkpDnuik1sg"/>
101 </children> 97 </children>
@@ -308,31 +304,6 @@
308 <styles xmi:type="notation:ShapeStyle" xmi:id="_xp1icTNlEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/> 304 <styles xmi:type="notation:ShapeStyle" xmi:id="_xp1icTNlEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/>
309 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xp1icjNlEe2fD4dIhR_vzA" x="574" y="1280" width="120" height="100"/> 305 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xp1icjNlEe2fD4dIhR_vzA" x="574" y="1280" width="120" height="100"/>
310 </children> 306 </children>
311 <children xmi:type="notation:Node" xmi:id="_DFHboDNoEe2fD4dIhR_vzA" type="2003" element="_DD1pQDNoEe2fD4dIhR_vzA">
312 <children xmi:type="notation:Node" xmi:id="_DFICsDNoEe2fD4dIhR_vzA" type="5007"/>
313 <children xmi:type="notation:Node" xmi:id="_DFICsTNoEe2fD4dIhR_vzA" type="7004">
314 <children xmi:type="notation:Node" xmi:id="_FDz88DNoEe2fD4dIhR_vzA" type="3010" element="_FDOuIDNoEe2fD4dIhR_vzA">
315 <styles xmi:type="notation:FontStyle" xmi:id="_FDz88TNoEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/>
316 <layoutConstraint xmi:type="notation:Location" xmi:id="_FDz88jNoEe2fD4dIhR_vzA"/>
317 </children>
318 <children xmi:type="notation:Node" xmi:id="_F3CwsDNoEe2fD4dIhR_vzA" type="3010" element="_F2glMDNoEe2fD4dIhR_vzA">
319 <styles xmi:type="notation:FontStyle" xmi:id="_F3CwsTNoEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/>
320 <layoutConstraint xmi:type="notation:Location" xmi:id="_F3CwsjNoEe2fD4dIhR_vzA"/>
321 </children>
322 <children xmi:type="notation:Node" xmi:id="_GTcY0DNoEe2fD4dIhR_vzA" type="3010" element="_GS7bcDNoEe2fD4dIhR_vzA">
323 <styles xmi:type="notation:FontStyle" xmi:id="_GTcY0TNoEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/>
324 <layoutConstraint xmi:type="notation:Location" xmi:id="_GTcY0jNoEe2fD4dIhR_vzA"/>
325 </children>
326 <children xmi:type="notation:Node" xmi:id="_GyKVIDNoEe2fD4dIhR_vzA" type="3010" element="_Gx7EkDNoEe2fD4dIhR_vzA">
327 <styles xmi:type="notation:FontStyle" xmi:id="_GyKVITNoEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/>
328 <layoutConstraint xmi:type="notation:Location" xmi:id="_GyKVIjNoEe2fD4dIhR_vzA"/>
329 </children>
330 <styles xmi:type="notation:SortingStyle" xmi:id="_DFICsjNoEe2fD4dIhR_vzA"/>
331 <styles xmi:type="notation:FilteringStyle" xmi:id="_DFICszNoEe2fD4dIhR_vzA"/>
332 </children>
333 <styles xmi:type="notation:ShapeStyle" xmi:id="_DFHboTNoEe2fD4dIhR_vzA" fontName="Noto Sans" fontHeight="8"/>
334 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DFHbojNoEe2fD4dIhR_vzA" x="1355" y="1280" width="120" height="100"/>
335 </children>
336 <children xmi:type="notation:Node" xmi:id="_782skF9mEe2rXNsIDUvqhw" type="2003" element="_78pRMF9mEe2rXNsIDUvqhw"> 307 <children xmi:type="notation:Node" xmi:id="_782skF9mEe2rXNsIDUvqhw" type="2003" element="_78pRMF9mEe2rXNsIDUvqhw">
337 <children xmi:type="notation:Node" xmi:id="_783ToF9mEe2rXNsIDUvqhw" type="5007"/> 308 <children xmi:type="notation:Node" xmi:id="_783ToF9mEe2rXNsIDUvqhw" type="5007"/>
338 <children xmi:type="notation:Node" xmi:id="_783ToV9mEe2rXNsIDUvqhw" type="7004"> 309 <children xmi:type="notation:Node" xmi:id="_783ToV9mEe2rXNsIDUvqhw" type="7004">
@@ -1184,17 +1155,17 @@
1184 </edges> 1155 </edges>
1185 <edges xmi:type="notation:Edge" xmi:id="_Nr78MGTzEe2qdtyPWAtoxA" type="4001" element="_NrtSzmTzEe2qdtyPWAtoxA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA"> 1156 <edges xmi:type="notation:Edge" xmi:id="_Nr78MGTzEe2qdtyPWAtoxA" type="4001" element="_NrtSzmTzEe2qdtyPWAtoxA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA">
1186 <children xmi:type="notation:Node" xmi:id="_Nr78NGTzEe2qdtyPWAtoxA" type="6001"> 1157 <children xmi:type="notation:Node" xmi:id="_Nr78NGTzEe2qdtyPWAtoxA" type="6001">
1187 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78NWTzEe2qdtyPWAtoxA" x="81"/> 1158 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78NWTzEe2qdtyPWAtoxA" x="79"/>
1188 </children> 1159 </children>
1189 <children xmi:type="notation:Node" xmi:id="_Nr78NmTzEe2qdtyPWAtoxA" type="6002"> 1160 <children xmi:type="notation:Node" xmi:id="_Nr78NmTzEe2qdtyPWAtoxA" type="6002">
1190 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78N2TzEe2qdtyPWAtoxA" x="196" y="10"/> 1161 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78N2TzEe2qdtyPWAtoxA" x="193" y="10"/>
1191 </children> 1162 </children>
1192 <children xmi:type="notation:Node" xmi:id="_Nr78OGTzEe2qdtyPWAtoxA" type="6003"> 1163 <children xmi:type="notation:Node" xmi:id="_Nr78OGTzEe2qdtyPWAtoxA" type="6003">
1193 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78OWTzEe2qdtyPWAtoxA" x="20" y="10"/> 1164 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nr78OWTzEe2qdtyPWAtoxA" x="19" y="10"/>
1194 </children> 1165 </children>
1195 <styles xmi:type="notation:ConnectorStyle" xmi:id="_Nr78MWTzEe2qdtyPWAtoxA" routing="Rectilinear"/> 1166 <styles xmi:type="notation:ConnectorStyle" xmi:id="_Nr78MWTzEe2qdtyPWAtoxA" routing="Rectilinear"/>
1196 <styles xmi:type="notation:FontStyle" xmi:id="_Nr78MmTzEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/> 1167 <styles xmi:type="notation:FontStyle" xmi:id="_Nr78MmTzEe2qdtyPWAtoxA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/>
1197 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Nr78M2TzEe2qdtyPWAtoxA" points="[-60, 24, 24, 526]$[-84, 24, 0, 526]$[-84, -502, 0, 0]"/> 1168 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Nr78M2TzEe2qdtyPWAtoxA" points="[-60, 24, 24, 526]$[-80, 24, 4, 526]$[-80, -502, 4, 0]"/>
1198 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78OmTzEe2qdtyPWAtoxA" id="(0.41379310344827586,0.0)"/> 1169 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78OmTzEe2qdtyPWAtoxA" id="(0.41379310344827586,0.0)"/>
1199 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78O2TzEe2qdtyPWAtoxA" id="(0.3305084745762712,1.0)"/> 1170 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nr78O2TzEe2qdtyPWAtoxA" id="(0.3305084745762712,1.0)"/>
1200 </edges> 1171 </edges>
@@ -1272,7 +1243,7 @@
1272 </children> 1243 </children>
1273 <styles xmi:type="notation:ConnectorStyle" xmi:id="_WnX2AWg8Ee25oofngfVl_A" routing="Tree"/> 1244 <styles xmi:type="notation:ConnectorStyle" xmi:id="_WnX2AWg8Ee25oofngfVl_A" routing="Tree"/>
1274 <styles xmi:type="notation:FontStyle" xmi:id="_WnX2Amg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/> 1245 <styles xmi:type="notation:FontStyle" xmi:id="_WnX2Amg8Ee25oofngfVl_A" fontName="Noto Sans" fontHeight="8"/>
1275 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WnX2A2g8Ee25oofngfVl_A" points="[0, -56, 86, 383]$[0, -320, 86, 119]$[-85, -320, 1, 119]$[-85, -390, 1, 49]"/> 1246 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WnX2A2g8Ee25oofngfVl_A" points="[0, -56, 44, 383]$[0, -316, 44, 123]$[-43, -316, 1, 123]$[-43, -390, 1, 49]"/>
1276 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WnZEIGg8Ee25oofngfVl_A" id="(0.22950819672131148,0.5714285714285714)"/> 1247 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WnZEIGg8Ee25oofngfVl_A" id="(0.22950819672131148,0.5714285714285714)"/>
1277 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WnZEIWg8Ee25oofngfVl_A" id="(0.5,0.5)"/> 1248 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WnZEIWg8Ee25oofngfVl_A" id="(0.5,0.5)"/>
1278 </edges> 1249 </edges>
@@ -1324,6 +1295,22 @@
1324 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mDflxmg8Ee25oofngfVl_A" id="(0.3644067796610169,0.16326530612244897)"/> 1295 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mDflxmg8Ee25oofngfVl_A" id="(0.3644067796610169,0.16326530612244897)"/>
1325 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mDflx2g8Ee25oofngfVl_A" id="(0.5,0.5)"/> 1296 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mDflx2g8Ee25oofngfVl_A" id="(0.5,0.5)"/>
1326 </edges> 1297 </edges>
1298 <edges xmi:type="notation:Edge" xmi:id="_8s7BwDrXEe62Q_vL_UTCsA" type="4001" element="_8sdu2DrXEe62Q_vL_UTCsA" source="_c-HCQKA4EeuqkpDnuik1sg" target="_dzfLYGTvEe2qdtyPWAtoxA">
1299 <children xmi:type="notation:Node" xmi:id="_8s-sIDrXEe62Q_vL_UTCsA" type="6001">
1300 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sITrXEe62Q_vL_UTCsA" x="-155" y="-60"/>
1301 </children>
1302 <children xmi:type="notation:Node" xmi:id="_8s-sIjrXEe62Q_vL_UTCsA" type="6002">
1303 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sIzrXEe62Q_vL_UTCsA" x="69" y="10"/>
1304 </children>
1305 <children xmi:type="notation:Node" xmi:id="_8s-sJDrXEe62Q_vL_UTCsA" type="6003">
1306 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8s-sJTrXEe62Q_vL_UTCsA" x="3" y="10"/>
1307 </children>
1308 <styles xmi:type="notation:ConnectorStyle" xmi:id="_8s7BwTrXEe62Q_vL_UTCsA" routing="Rectilinear"/>
1309 <styles xmi:type="notation:FontStyle" xmi:id="_8s7BwjrXEe62Q_vL_UTCsA" fontColor="7490599" fontName="Noto Sans" fontHeight="8"/>
1310 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8s7BwzrXEe62Q_vL_UTCsA" points="[-52, 40, 0, 542]$[-84, 40, -32, 542]$[-84, -502, -32, 0]"/>
1311 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8s_6QDrXEe62Q_vL_UTCsA" id="(0.3586206896551724,0.0)"/>
1312 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8s_6QTrXEe62Q_vL_UTCsA" id="(0.5338983050847458,1.0)"/>
1313 </edges>
1327 </data> 1314 </data>
1328 </ownedAnnotationEntries> 1315 </ownedAnnotationEntries>
1329 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Csiy8KA4EeuqkpDnuik1sg" source="DANNOTATION_CUSTOMIZATION_KEY"> 1316 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Csiy8KA4EeuqkpDnuik1sg" source="DANNOTATION_CUSTOMIZATION_KEY">
@@ -1369,7 +1356,7 @@
1369 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> 1356 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
1370 </ownedElements> 1357 </ownedElements>
1371 </ownedDiagramElements> 1358 </ownedDiagramElements>
1372 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_c-A7oKA4EeuqkpDnuik1sg" name="ReferenceDeclaration" tooltipText="" outgoingEdges="_0V3L1qA4EeuqkpDnuik1sg _p1JWcqBJEeuqkpDnuik1sg _NrtSzmTzEe2qdtyPWAtoxA _bNXJs2g8Ee25oofngfVl_A" incomingEdges="_0V3L1qA4EeuqkpDnuik1sg" width="12" height="10"> 1359 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_c-A7oKA4EeuqkpDnuik1sg" name="ReferenceDeclaration" tooltipText="" outgoingEdges="_0V3L1qA4EeuqkpDnuik1sg _p1JWcqBJEeuqkpDnuik1sg _NrtSzmTzEe2qdtyPWAtoxA _bNXJs2g8Ee25oofngfVl_A _8sdu2DrXEe62Q_vL_UTCsA" incomingEdges="_0V3L1qA4EeuqkpDnuik1sg" width="12" height="10">
1373 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> 1360 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/>
1374 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/> 1361 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration"/>
1375 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> 1362 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
@@ -1441,14 +1428,14 @@
1441 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> 1428 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1442 <arrangeConstraints>KEEP_SIZE</arrangeConstraints> 1429 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1443 <arrangeConstraints>KEEP_RATIO</arrangeConstraints> 1430 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1444 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_jX0uAjNoEe2fD4dIhR_vzA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> 1431 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_dFvc0DrQEe62Q_vL_UTCsA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
1445 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> 1432 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1446 </ownedStyle> 1433 </ownedStyle>
1447 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> 1434 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1448 <ownedElements xmi:type="diagram:DNodeListElement" uid="_ida7QDNoEe2fD4dIhR_vzA" name="kind : PredicateKind = DEFAULT" tooltipText=""> 1435 <ownedElements xmi:type="diagram:DNodeListElement" uid="_blvCoDrQEe62Q_vL_UTCsA" name="error : EBoolean = false" tooltipText="">
1449 <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//PredicateDefinition/kind"/> 1436 <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//PredicateDefinition/error"/>
1450 <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//PredicateDefinition/kind"/> 1437 <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//PredicateDefinition/error"/>
1451 <ownedStyle xmi:type="diagram:BundledImage" uid="_jX18JDNoEe2fD4dIhR_vzA" labelAlignment="LEFT"> 1438 <ownedStyle xmi:type="diagram:BundledImage" uid="_dFx5EzrQEe62Q_vL_UTCsA" labelAlignment="LEFT">
1452 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> 1439 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
1453 </ownedStyle> 1440 </ownedStyle>
1454 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> 1441 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
@@ -1464,14 +1451,6 @@
1464 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> 1451 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1465 </ownedStyle> 1452 </ownedStyle>
1466 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> 1453 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1467 <ownedElements xmi:type="diagram:DNodeListElement" uid="_ARaYkBjHEe2_erjsEmF9GQ" name="modality : Modality = DEFAULT" tooltipText="">
1468 <target xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//Parameter/modality"/>
1469 <semanticElements xmi:type="ecore:EAttribute" href="src/main/resources/model/problem.ecore#//Parameter/modality"/>
1470 <ownedStyle xmi:type="diagram:BundledImage" uid="_CsAyxRjHEe2_erjsEmF9GQ" labelAlignment="LEFT">
1471 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
1472 </ownedStyle>
1473 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
1474 </ownedElements>
1475 </ownedDiagramElements> 1454 </ownedDiagramElements>
1476 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_Uy4bWaA6EeuqkpDnuik1sg" name="[0..*] parameters" sourceNode="_A8hIkCrZEeyyC-O0_LlY9w" targetNode="_QKD2EKA6EeuqkpDnuik1sg"> 1455 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_Uy4bWaA6EeuqkpDnuik1sg" name="[0..*] parameters" sourceNode="_A8hIkCrZEeyyC-O0_LlY9w" targetNode="_QKD2EKA6EeuqkpDnuik1sg">
1477 <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ParametricDefinition/parameters"/> 1456 <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ParametricDefinition/parameters"/>
@@ -1940,12 +1919,12 @@
1940 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_ddmjcCrZEeyyC-O0_LlY9w" sourceNode="_fihqUKA5EeuqkpDnuik1sg" targetNode="_A8hIkCrZEeyyC-O0_LlY9w"> 1919 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_ddmjcCrZEeyyC-O0_LlY9w" sourceNode="_fihqUKA5EeuqkpDnuik1sg" targetNode="_A8hIkCrZEeyyC-O0_LlY9w">
1941 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/> 1920 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/>
1942 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/> 1921 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/>
1943 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_jX7b1DNoEe2fD4dIhR_vzA" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> 1922 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_dF7qIjrQEe62Q_vL_UTCsA" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree">
1944 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/> 1923 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@conditionnalStyles.0/@style"/>
1945 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_jX7b1TNoEe2fD4dIhR_vzA" showIcon="false"> 1924 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_dF7qIzrQEe62Q_vL_UTCsA" showIcon="false">
1946 <labelFormat>italic</labelFormat> 1925 <labelFormat>italic</labelFormat>
1947 </beginLabelStyle> 1926 </beginLabelStyle>
1948 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_jX7b1jNoEe2fD4dIhR_vzA" showIcon="false"/> 1927 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_dF7qJDrQEe62Q_vL_UTCsA" showIcon="false"/>
1949 </ownedStyle> 1928 </ownedStyle>
1950 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> 1929 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
1951 </ownedDiagramElements> 1930 </ownedDiagramElements>
@@ -2100,49 +2079,6 @@
2100 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> 2079 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2101 </ownedElements> 2080 </ownedElements>
2102 </ownedDiagramElements> 2081 </ownedDiagramElements>
2103 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_DD1pQDNoEe2fD4dIhR_vzA" name="PredicateKind" tooltipText="" width="12" height="10">
2104 <target xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//PredicateKind"/>
2105 <semanticElements xmi:type="ecore:EEnum" href="src/main/resources/model/problem.ecore#//PredicateKind"/>
2106 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
2107 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
2108 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
2109 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_DD1pQTNoEe2fD4dIhR_vzA" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202">
2110 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/>
2111 </ownedStyle>
2112 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/>
2113 <ownedElements xmi:type="diagram:DNodeListElement" uid="_FDOuIDNoEe2fD4dIhR_vzA" name="DEFAULT" tooltipText="">
2114 <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/DEFAULT"/>
2115 <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/DEFAULT"/>
2116 <ownedStyle xmi:type="diagram:BundledImage" uid="_FDPVMDNoEe2fD4dIhR_vzA" labelAlignment="LEFT">
2117 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
2118 </ownedStyle>
2119 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2120 </ownedElements>
2121 <ownedElements xmi:type="diagram:DNodeListElement" uid="_F2glMDNoEe2fD4dIhR_vzA" name="ERROR" tooltipText="">
2122 <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/ERROR"/>
2123 <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/ERROR"/>
2124 <ownedStyle xmi:type="diagram:BundledImage" uid="_F2hMQDNoEe2fD4dIhR_vzA" labelAlignment="LEFT">
2125 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
2126 </ownedStyle>
2127 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2128 </ownedElements>
2129 <ownedElements xmi:type="diagram:DNodeListElement" uid="_GS7bcDNoEe2fD4dIhR_vzA" name="CONTAINED" tooltipText="">
2130 <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/CONTAINED"/>
2131 <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/CONTAINED"/>
2132 <ownedStyle xmi:type="diagram:BundledImage" uid="_GS7bcTNoEe2fD4dIhR_vzA" labelAlignment="LEFT">
2133 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
2134 </ownedStyle>
2135 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2136 </ownedElements>
2137 <ownedElements xmi:type="diagram:DNodeListElement" uid="_Gx7EkDNoEe2fD4dIhR_vzA" name="CONTAINMENT" tooltipText="">
2138 <target xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/CONTAINMENT"/>
2139 <semanticElements xmi:type="ecore:EEnumLiteral" href="src/main/resources/model/problem.ecore#//PredicateKind/CONTAINMENT"/>
2140 <ownedStyle xmi:type="diagram:BundledImage" uid="_Gx7roDNoEe2fD4dIhR_vzA" labelAlignment="LEFT">
2141 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
2142 </ownedStyle>
2143 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2144 </ownedElements>
2145 </ownedDiagramElements>
2146 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_78pRMF9mEe2rXNsIDUvqhw" name="FunctionDefinition" tooltipText="" outgoingEdges="_rKoQHF9nEe2rXNsIDUvqhw _S6YCJl9wEe2rXNsIDUvqhw _sMPaBmTvEe2qdtyPWAtoxA" width="12" height="10"> 2082 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_78pRMF9mEe2rXNsIDUvqhw" name="FunctionDefinition" tooltipText="" outgoingEdges="_rKoQHF9nEe2rXNsIDUvqhw _S6YCJl9wEe2rXNsIDUvqhw _sMPaBmTvEe2qdtyPWAtoxA" width="12" height="10">
2147 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> 2083 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/>
2148 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/> 2084 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//FunctionDefinition"/>
@@ -2349,7 +2285,7 @@
2349 </ownedStyle> 2285 </ownedStyle>
2350 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> 2286 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
2351 </ownedDiagramElements> 2287 </ownedDiagramElements>
2352 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_dzVaYGTvEe2qdtyPWAtoxA" name="Relation" tooltipText="" outgoingEdges="_-OYJtGTvEe2qdtyPWAtoxA" incomingEdges="_m2GbcmTvEe2qdtyPWAtoxA _nxr57GTvEe2qdtyPWAtoxA _pHlWJ2TvEe2qdtyPWAtoxA _p-1uSmTvEe2qdtyPWAtoxA _sMPaBmTvEe2qdtyPWAtoxA _NrtSzmTzEe2qdtyPWAtoxA _YWqZhmTzEe2qdtyPWAtoxA _iWzpAmTzEe2qdtyPWAtoxA _q604amTzEe2qdtyPWAtoxA" width="12" height="10"> 2288 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_dzVaYGTvEe2qdtyPWAtoxA" name="Relation" tooltipText="" outgoingEdges="_-OYJtGTvEe2qdtyPWAtoxA" incomingEdges="_m2GbcmTvEe2qdtyPWAtoxA _nxr57GTvEe2qdtyPWAtoxA _pHlWJ2TvEe2qdtyPWAtoxA _p-1uSmTvEe2qdtyPWAtoxA _sMPaBmTvEe2qdtyPWAtoxA _NrtSzmTzEe2qdtyPWAtoxA _YWqZhmTzEe2qdtyPWAtoxA _iWzpAmTzEe2qdtyPWAtoxA _q604amTzEe2qdtyPWAtoxA _8sdu2DrXEe62Q_vL_UTCsA" width="12" height="10">
2353 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> 2289 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/>
2354 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/> 2290 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//Relation"/>
2355 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> 2291 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
@@ -2400,12 +2336,12 @@
2400 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_p-1uSmTvEe2qdtyPWAtoxA" sourceNode="_fihqUKA5EeuqkpDnuik1sg" targetNode="_dzVaYGTvEe2qdtyPWAtoxA"> 2336 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_p-1uSmTvEe2qdtyPWAtoxA" sourceNode="_fihqUKA5EeuqkpDnuik1sg" targetNode="_dzVaYGTvEe2qdtyPWAtoxA">
2401 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/> 2337 <target xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/>
2402 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/> 2338 <semanticElements xmi:type="ecore:EClass" href="src/main/resources/model/problem.ecore#//PredicateDefinition"/>
2403 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_p-1uS2TvEe2qdtyPWAtoxA" targetArrow="InputClosedArrow" routingStyle="tree"> 2339 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_dF7qKDrQEe62Q_vL_UTCsA" targetArrow="InputClosedArrow" routingStyle="tree">
2404 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> 2340 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
2405 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_p-1uTGTvEe2qdtyPWAtoxA" showIcon="false"> 2341 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_dF7qKTrQEe62Q_vL_UTCsA" showIcon="false">
2406 <labelFormat>italic</labelFormat> 2342 <labelFormat>italic</labelFormat>
2407 </beginLabelStyle> 2343 </beginLabelStyle>
2408 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_p-1uTWTvEe2qdtyPWAtoxA" showIcon="false"/> 2344 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_dF7qKjrQEe62Q_vL_UTCsA" showIcon="false"/>
2409 </ownedStyle> 2345 </ownedStyle>
2410 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> 2346 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
2411 </ownedDiagramElements> 2347 </ownedDiagramElements>
@@ -2611,6 +2547,19 @@
2611 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> 2547 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2612 </ownedElements> 2548 </ownedElements>
2613 </ownedDiagramElements> 2549 </ownedDiagramElements>
2550 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_8sdu2DrXEe62Q_vL_UTCsA" name="[0..1] invalidMultiplicity" sourceNode="_c-A7oKA4EeuqkpDnuik1sg" targetNode="_dzVaYGTvEe2qdtyPWAtoxA">
2551 <target xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/invalidMultiplicity"/>
2552 <semanticElements xmi:type="ecore:EReference" href="src/main/resources/model/problem.ecore#//ReferenceDeclaration/invalidMultiplicity"/>
2553 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_8seV0DrXEe62Q_vL_UTCsA" description="_L-JhMKA4EeuqkpDnuik1sg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
2554 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_8seV0jrXEe62Q_vL_UTCsA" showIcon="false">
2555 <customFeatures>labelSize</customFeatures>
2556 </centerLabelStyle>
2557 <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_8seV0TrXEe62Q_vL_UTCsA" showIcon="false" labelColor="39,76,114">
2558 <customFeatures>labelSize</customFeatures>
2559 </endLabelStyle>
2560 </ownedStyle>
2561 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
2562 </ownedDiagramElements>
2614 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> 2563 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
2615 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_CsWlsKA4EeuqkpDnuik1sg"/> 2564 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_CsWlsKA4EeuqkpDnuik1sg"/>
2616 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> 2565 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
diff --git a/subprojects/language-model/src/main/resources/model/problem.ecore b/subprojects/language-model/src/main/resources/model/problem.ecore
index 2d86382d..204f922c 100644
--- a/subprojects/language-model/src/main/resources/model/problem.ecore
+++ b/subprojects/language-model/src/main/resources/model/problem.ecore
@@ -22,17 +22,18 @@
22 containment="true"/> 22 containment="true"/>
23 <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//ReferenceKind"/> 23 <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//ReferenceKind"/>
24 <eStructuralFeatures xsi:type="ecore:EReference" name="referenceType" eType="#//Relation"/> 24 <eStructuralFeatures xsi:type="ecore:EReference" name="referenceType" eType="#//Relation"/>
25 <eStructuralFeatures xsi:type="ecore:EReference" name="invalidMultiplicity" eType="#//Relation"
26 containment="true"/>
25 </eClassifiers> 27 </eClassifiers>
26 <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true"> 28 <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
27 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> 29 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
28 </eClassifiers> 30 </eClassifiers>
29 <eClassifiers xsi:type="ecore:EClass" name="PredicateDefinition" eSuperTypes="#//ParametricDefinition #//Relation"> 31 <eClassifiers xsi:type="ecore:EClass" name="PredicateDefinition" eSuperTypes="#//ParametricDefinition #//Relation">
30 <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//PredicateKind"/>
31 <eStructuralFeatures xsi:type="ecore:EReference" name="bodies" upperBound="-1" 32 <eStructuralFeatures xsi:type="ecore:EReference" name="bodies" upperBound="-1"
32 eType="#//Conjunction" containment="true"/> 33 eType="#//Conjunction" containment="true"/>
34 <eStructuralFeatures xsi:type="ecore:EAttribute" name="error" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
33 </eClassifiers> 35 </eClassifiers>
34 <eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="#//Variable"> 36 <eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="#//Variable">
35 <eStructuralFeatures xsi:type="ecore:EAttribute" name="modality" eType="#//Modality"/>
36 <eStructuralFeatures xsi:type="ecore:EReference" name="parameterType" eType="#//Relation"/> 37 <eStructuralFeatures xsi:type="ecore:EReference" name="parameterType" eType="#//Relation"/>
37 </eClassifiers> 38 </eClassifiers>
38 <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//VariableOrNode"/> 39 <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//VariableOrNode"/>
@@ -169,12 +170,6 @@
169 <eLiterals name="CONTAINMENT" value="2"/> 170 <eLiterals name="CONTAINMENT" value="2"/>
170 <eLiterals name="CONTAINER" value="3"/> 171 <eLiterals name="CONTAINER" value="3"/>
171 </eClassifiers> 172 </eClassifiers>
172 <eClassifiers xsi:type="ecore:EEnum" name="PredicateKind">
173 <eLiterals name="DEFAULT"/>
174 <eLiterals name="ERROR" value="1"/>
175 <eLiterals name="CONTAINED" value="2"/>
176 <eLiterals name="CONTAINMENT" value="3"/>
177 </eClassifiers>
178 <eClassifiers xsi:type="ecore:EClass" name="Expr" abstract="true"/> 173 <eClassifiers xsi:type="ecore:EClass" name="Expr" abstract="true"/>
179 <eClassifiers xsi:type="ecore:EClass" name="VariableOrNodeExpr" eSuperTypes="#//Expr"> 174 <eClassifiers xsi:type="ecore:EClass" name="VariableOrNodeExpr" eSuperTypes="#//Expr">
180 <eStructuralFeatures xsi:type="ecore:EReference" name="variableOrNode" eType="#//VariableOrNode"/> 175 <eStructuralFeatures xsi:type="ecore:EReference" name="variableOrNode" eType="#//VariableOrNode"/>
diff --git a/subprojects/language-model/src/main/resources/model/problem.genmodel b/subprojects/language-model/src/main/resources/model/problem.genmodel
index 5767d18d..b5aa81c4 100644
--- a/subprojects/language-model/src/main/resources/model/problem.genmodel
+++ b/subprojects/language-model/src/main/resources/model/problem.genmodel
@@ -40,12 +40,6 @@
40 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINMENT"/> 40 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINMENT"/>
41 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINER"/> 41 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//ReferenceKind/CONTAINER"/>
42 </genEnums> 42 </genEnums>
43 <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//PredicateKind">
44 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//PredicateKind/DEFAULT"/>
45 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//PredicateKind/ERROR"/>
46 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//PredicateKind/CONTAINED"/>
47 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//PredicateKind/CONTAINMENT"/>
48 </genEnums>
49 <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//UnaryOp"> 43 <genEnums typeSafeEnumCompatible="false" ecoreEnum="problem.ecore#//UnaryOp">
50 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//UnaryOp/PLUS"/> 44 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//UnaryOp/PLUS"/>
51 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//UnaryOp/MINUS"/> 45 <genEnumLiterals ecoreEnumLiteral="problem.ecore#//UnaryOp/MINUS"/>
@@ -85,16 +79,16 @@
85 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/multiplicity"/> 79 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/multiplicity"/>
86 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ReferenceDeclaration/kind"/> 80 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//ReferenceDeclaration/kind"/>
87 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/referenceType"/> 81 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/referenceType"/>
82 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference problem.ecore#//ReferenceDeclaration/invalidMultiplicity"/>
88 </genClasses> 83 </genClasses>
89 <genClasses ecoreClass="problem.ecore#//NamedElement"> 84 <genClasses ecoreClass="problem.ecore#//NamedElement">
90 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//NamedElement/name"/> 85 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//NamedElement/name"/>
91 </genClasses> 86 </genClasses>
92 <genClasses ecoreClass="problem.ecore#//PredicateDefinition"> 87 <genClasses ecoreClass="problem.ecore#//PredicateDefinition">
93 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//PredicateDefinition/kind"/>
94 <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//PredicateDefinition/bodies"/> 88 <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//PredicateDefinition/bodies"/>
89 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//PredicateDefinition/error"/>
95 </genClasses> 90 </genClasses>
96 <genClasses ecoreClass="problem.ecore#//Parameter"> 91 <genClasses ecoreClass="problem.ecore#//Parameter">
97 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute problem.ecore#//Parameter/modality"/>
98 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Parameter/parameterType"/> 92 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference problem.ecore#//Parameter/parameterType"/>
99 </genClasses> 93 </genClasses>
100 <genClasses ecoreClass="problem.ecore#//Variable"/> 94 <genClasses ecoreClass="problem.ecore#//Variable"/>
diff --git a/subprojects/language-semantics/build.gradle.kts b/subprojects/language-semantics/build.gradle.kts
index 38cd9e0d..338ae345 100644
--- a/subprojects/language-semantics/build.gradle.kts
+++ b/subprojects/language-semantics/build.gradle.kts
@@ -9,9 +9,14 @@ plugins {
9} 9}
10 10
11dependencies { 11dependencies {
12 implementation(libs.eclipseCollections) 12 api(libs.eclipseCollections.api)
13 implementation(libs.eclipseCollections.api)
14 api(project(":refinery-language")) 13 api(project(":refinery-language"))
15 api(project(":refinery-store")) 14 api(project(":refinery-store"))
15 api(project(":refinery-store-query"))
16 api(project(":refinery-store-reasoning"))
17 implementation(project(":refinery-store-reasoning-scope"))
18 runtimeOnly(libs.eclipseCollections)
19 testImplementation(project(":refinery-store-dse-visualization"))
20 testImplementation(project(":refinery-store-query-viatra"))
16 testImplementation(testFixtures(project(":refinery-language"))) 21 testImplementation(testFixtures(project(":refinery-language")))
17} 22}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/BuiltInDetail.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/BuiltInDetail.java
new file mode 100644
index 00000000..6f706069
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/BuiltInDetail.java
@@ -0,0 +1,10 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public record BuiltInDetail() implements RelationDetail {
9 public static final BuiltInDetail INSTANCE = new BuiltInDetail();
10}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ClassDetail.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ClassDetail.java
new file mode 100644
index 00000000..1d3190f5
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ClassDetail.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public record ClassDetail(boolean abstractClass) implements RelationDetail {
9 public static final ClassDetail CONCRETE_CLASS = new ClassDetail(false);
10
11 public static final ClassDetail ABSTRACT_CLASS = new ClassDetail(true);
12
13 public static ClassDetail ofAbstractClass(boolean abstractClass) {
14 return abstractClass ? ABSTRACT_CLASS : CONCRETE_CLASS;
15 }
16}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/Metadata.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/Metadata.java
new file mode 100644
index 00000000..d2dcb43a
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/Metadata.java
@@ -0,0 +1,12 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public sealed interface Metadata permits NodeMetadata, RelationMetadata {
9 String name();
10
11 String simpleName();
12}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/MetadataCreator.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/MetadataCreator.java
new file mode 100644
index 00000000..cc262129
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/MetadataCreator.java
@@ -0,0 +1,200 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8import com.google.inject.Inject;
9import org.eclipse.emf.ecore.EObject;
10import org.eclipse.xtext.naming.IQualifiedNameConverter;
11import org.eclipse.xtext.naming.IQualifiedNameProvider;
12import org.eclipse.xtext.naming.QualifiedName;
13import org.eclipse.xtext.scoping.IScope;
14import org.eclipse.xtext.scoping.IScopeProvider;
15import tools.refinery.language.model.problem.*;
16import tools.refinery.language.semantics.model.ModelInitializer;
17import tools.refinery.language.semantics.model.TracedException;
18import tools.refinery.language.utils.ProblemUtil;
19import tools.refinery.store.reasoning.representation.PartialRelation;
20
21import java.util.*;
22
23public class MetadataCreator {
24 @Inject
25 private IScopeProvider scopeProvider;
26
27 @Inject
28 private IQualifiedNameProvider qualifiedNameProvider;
29
30 @Inject
31 private IQualifiedNameConverter qualifiedNameConverter;
32
33 private ModelInitializer initializer;
34
35 private IScope nodeScope;
36
37 private IScope relationScope;
38
39 public void setInitializer(ModelInitializer initializer) {
40 if (initializer == null) {
41 throw new IllegalArgumentException("Initializer was already set");
42 }
43 this.initializer = initializer;
44 var problem = initializer.getProblem();
45 nodeScope = scopeProvider.getScope(problem, ProblemPackage.Literals.NODE_ASSERTION_ARGUMENT__NODE);
46 relationScope = scopeProvider.getScope(problem, ProblemPackage.Literals.ASSERTION__RELATION);
47 }
48
49 public static String unnamedNode(int nodeId) {
50 return "::" + nodeId;
51 }
52
53 public List<NodeMetadata> getNodesMetadata() {
54 return getNodesMetadata(initializer.getNodeCount(), true);
55 }
56
57 public List<NodeMetadata> getNodesMetadata(int nodeCount, boolean preserveNewNodes) {
58 var nodes = new NodeMetadata[Math.max(initializer.getNodeCount(), nodeCount)];
59 for (var entry : initializer.getNodeTrace().keyValuesView()) {
60 var node = entry.getOne();
61 var id = entry.getTwo();
62 nodes[id] = getNodeMetadata(id, node, preserveNewNodes);
63 }
64 for (int i = 0; i < nodes.length; i++) {
65 if (nodes[i] == null) {
66 var nodeName = unnamedNode(i);
67 nodes[i] = new NodeMetadata(nodeName, nodeName, NodeKind.IMPLICIT);
68 }
69 }
70 return List.of(nodes);
71 }
72
73 private NodeMetadata getNodeMetadata(int nodeId, Node node, boolean preserveNewNodes) {
74 var kind = getNodeKind(node);
75 if (!preserveNewNodes && kind == NodeKind.NEW) {
76 var nodeName = unnamedNode(nodeId);
77 return new NodeMetadata(nodeName, nodeName, NodeKind.IMPLICIT);
78 }
79 var qualifiedName = getQualifiedName(node);
80 var simpleName = getSimpleName(node, qualifiedName, nodeScope);
81 return new NodeMetadata(qualifiedNameConverter.toString(qualifiedName),
82 qualifiedNameConverter.toString(simpleName), getNodeKind(node));
83 }
84
85 private NodeKind getNodeKind(Node node) {
86 if (ProblemUtil.isImplicitNode(node)) {
87 return NodeKind.IMPLICIT;
88 } else if (ProblemUtil.isIndividualNode(node)) {
89 return NodeKind.INDIVIDUAL;
90 } else if (ProblemUtil.isNewNode(node)) {
91 return NodeKind.NEW;
92 } else {
93 throw new TracedException(node, "Unknown node type");
94 }
95 }
96
97 public List<RelationMetadata> getRelationsMetadata() {
98 var relationTrace = initializer.getRelationTrace();
99 var relations = new ArrayList<RelationMetadata>(relationTrace.size());
100 for (var entry : relationTrace.entrySet()) {
101 var relation = entry.getKey();
102 var partialRelation = entry.getValue();
103 var metadata = getRelationMetadata(relation, partialRelation);
104 relations.add(metadata);
105 }
106 return Collections.unmodifiableList(relations);
107 }
108
109 private RelationMetadata getRelationMetadata(Relation relation, PartialRelation partialRelation) {
110 var qualifiedName = getQualifiedName(relation);
111 var qualifiedNameString = qualifiedNameConverter.toString(qualifiedName);
112 var simpleName = getSimpleName(relation, qualifiedName, relationScope);
113 var simpleNameString = qualifiedNameConverter.toString(simpleName);
114 var arity = partialRelation.arity();
115 var detail = getRelationDetail(relation, partialRelation);
116 return new RelationMetadata(qualifiedNameString, simpleNameString, arity, detail);
117 }
118
119 private RelationDetail getRelationDetail(Relation relation, PartialRelation partialRelation) {
120 if (ProblemUtil.isBuiltIn(relation) && !ProblemUtil.isError(relation)) {
121 return getBuiltInDetail();
122 }
123 if (relation instanceof ClassDeclaration classDeclaration) {
124 return getClassDetail(classDeclaration);
125 } else if (relation instanceof ReferenceDeclaration) {
126 return getReferenceDetail(partialRelation);
127 } else if (relation instanceof EnumDeclaration) {
128 return getEnumDetail();
129 } else if (relation instanceof PredicateDefinition predicateDefinition) {
130 return getPredicateDetail(predicateDefinition);
131 } else {
132 throw new TracedException(relation, "Unknown relation");
133 }
134 }
135
136 private RelationDetail getBuiltInDetail() {
137 return BuiltInDetail.INSTANCE;
138 }
139
140 private RelationDetail getClassDetail(ClassDeclaration classDeclaration) {
141 return ClassDetail.ofAbstractClass(classDeclaration.isAbstract());
142 }
143
144 private RelationDetail getReferenceDetail(PartialRelation partialRelation) {
145 var metamodel = initializer.getMetamodel();
146 var opposite = metamodel.oppositeReferences().get(partialRelation);
147 if (opposite == null) {
148 boolean isContainment = metamodel.containmentHierarchy().containsKey(partialRelation);
149 return ReferenceDetail.ofContainment(isContainment);
150 } else {
151 boolean isContainer = metamodel.containmentHierarchy().containsKey(opposite);
152 return new OppositeReferenceDetail(isContainer, opposite.name());
153 }
154 }
155
156 private RelationDetail getEnumDetail() {
157 return ClassDetail.CONCRETE_CLASS;
158 }
159
160 private RelationDetail getPredicateDetail(PredicateDefinition predicate) {
161 return PredicateDetail.ofError(predicate.isError());
162 }
163
164 private QualifiedName getQualifiedName(EObject eObject) {
165 var qualifiedName = qualifiedNameProvider.getFullyQualifiedName(eObject);
166 if (qualifiedName == null) {
167 throw new TracedException(eObject, "Unknown qualified name");
168 }
169 return qualifiedName;
170 }
171
172 private QualifiedName getSimpleName(EObject eObject, QualifiedName qualifiedName, IScope scope) {
173 var descriptions = scope.getElements(eObject);
174 var names = new HashSet<QualifiedName>();
175 for (var description : descriptions) {
176 // {@code getQualifiedName()} will refer to the full name for objects that are loaded from the global
177 // scope, but {@code getName()} returns the qualified name that we set in
178 // {@code ProblemResourceDescriptionStrategy}.
179 names.add(description.getName());
180 }
181 var iterator = names.stream().sorted(Comparator.comparingInt(QualifiedName::getSegmentCount)).iterator();
182 while (iterator.hasNext()) {
183 var simpleName = iterator.next();
184 if (names.contains(simpleName) && isUnique(scope, simpleName)) {
185 return simpleName;
186 }
187 }
188 throw new TracedException(eObject, "Ambiguous qualified name: " +
189 qualifiedNameConverter.toString(qualifiedName));
190 }
191
192 private boolean isUnique(IScope scope, QualifiedName name) {
193 var iterator = scope.getElements(name).iterator();
194 if (!iterator.hasNext()) {
195 return false;
196 }
197 iterator.next();
198 return !iterator.hasNext();
199 }
200}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeKind.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeKind.java
new file mode 100644
index 00000000..01f0cd09
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeKind.java
@@ -0,0 +1,12 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public enum NodeKind {
9 IMPLICIT,
10 INDIVIDUAL,
11 NEW
12}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeMetadata.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeMetadata.java
new file mode 100644
index 00000000..812952c0
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/NodeMetadata.java
@@ -0,0 +1,9 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public record NodeMetadata(String name, String simpleName, NodeKind kind) implements Metadata {
9}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/OppositeReferenceDetail.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/OppositeReferenceDetail.java
new file mode 100644
index 00000000..26d7461c
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/OppositeReferenceDetail.java
@@ -0,0 +1,9 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public record OppositeReferenceDetail(boolean container, String opposite) implements RelationDetail {
9}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/PredicateDetail.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/PredicateDetail.java
new file mode 100644
index 00000000..ca397eca
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/PredicateDetail.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public record PredicateDetail(boolean error) implements RelationDetail {
9 public static final PredicateDetail PREDICATE = new PredicateDetail(false);
10
11 public static final PredicateDetail ERROR_PREDICATE = new PredicateDetail(true);
12
13 public static PredicateDetail ofError(boolean error) {
14 return error ? ERROR_PREDICATE : PREDICATE;
15 }
16}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ReferenceDetail.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ReferenceDetail.java
new file mode 100644
index 00000000..36771566
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/ReferenceDetail.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public record ReferenceDetail(boolean containment) implements RelationDetail {
9 public static final ReferenceDetail CROSS_REFERENCE = new ReferenceDetail(false);
10
11 public static final ReferenceDetail CONTAINMENT_REFERENCE = new ReferenceDetail(true);
12
13 public static ReferenceDetail ofContainment(boolean containment) {
14 return containment ? CONTAINMENT_REFERENCE : CROSS_REFERENCE;
15 }
16}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationDetail.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationDetail.java
new file mode 100644
index 00000000..105179fd
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationDetail.java
@@ -0,0 +1,10 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public sealed interface RelationDetail permits ClassDetail, ReferenceDetail, PredicateDetail, OppositeReferenceDetail,
9 BuiltInDetail {
10}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationMetadata.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationMetadata.java
new file mode 100644
index 00000000..5abcc253
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/metadata/RelationMetadata.java
@@ -0,0 +1,9 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.metadata;
7
8public record RelationMetadata(String name, String simpleName, int arity, RelationDetail detail) implements Metadata {
9}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java
index 06b8ad77..85c8d701 100644
--- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java
@@ -9,67 +9,408 @@ import com.google.inject.Inject;
9import org.eclipse.collections.api.factory.primitive.ObjectIntMaps; 9import org.eclipse.collections.api.factory.primitive.ObjectIntMaps;
10import org.eclipse.collections.api.map.primitive.MutableObjectIntMap; 10import org.eclipse.collections.api.map.primitive.MutableObjectIntMap;
11import tools.refinery.language.model.problem.*; 11import tools.refinery.language.model.problem.*;
12import tools.refinery.language.semantics.model.internal.DecisionTree; 12import tools.refinery.language.semantics.model.internal.MutableSeed;
13import tools.refinery.language.utils.BuiltinSymbols;
13import tools.refinery.language.utils.ProblemDesugarer; 14import tools.refinery.language.utils.ProblemDesugarer;
14import tools.refinery.language.utils.RelationInfo; 15import tools.refinery.language.utils.ProblemUtil;
15import tools.refinery.store.representation.Symbol; 16import tools.refinery.store.dse.propagation.PropagationBuilder;
17import tools.refinery.store.model.ModelStoreBuilder;
18import tools.refinery.store.query.Constraint;
19import tools.refinery.store.query.dnf.InvalidClauseException;
20import tools.refinery.store.query.dnf.Query;
21import tools.refinery.store.query.dnf.RelationalQuery;
22import tools.refinery.store.query.literal.*;
23import tools.refinery.store.query.term.NodeVariable;
24import tools.refinery.store.query.term.Variable;
25import tools.refinery.store.reasoning.ReasoningAdapter;
26import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
27import tools.refinery.store.reasoning.representation.PartialRelation;
28import tools.refinery.store.reasoning.scope.ScopePropagator;
29import tools.refinery.store.reasoning.seed.ModelSeed;
30import tools.refinery.store.reasoning.seed.Seed;
31import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator;
32import tools.refinery.store.reasoning.translator.metamodel.Metamodel;
33import tools.refinery.store.reasoning.translator.metamodel.MetamodelBuilder;
34import tools.refinery.store.reasoning.translator.metamodel.MetamodelTranslator;
35import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
36import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity;
37import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
38import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity;
39import tools.refinery.store.reasoning.translator.predicate.PredicateTranslator;
16import tools.refinery.store.representation.TruthValue; 40import tools.refinery.store.representation.TruthValue;
41import tools.refinery.store.representation.cardinality.CardinalityInterval;
42import tools.refinery.store.representation.cardinality.CardinalityIntervals;
43import tools.refinery.store.representation.cardinality.UpperCardinalities;
17import tools.refinery.store.tuple.Tuple; 44import tools.refinery.store.tuple.Tuple;
18 45
19import java.util.HashMap; 46import java.util.*;
20import java.util.Map;
21 47
22public class ModelInitializer { 48public class ModelInitializer {
23 @Inject 49 @Inject
24 private ProblemDesugarer desugarer; 50 private ProblemDesugarer desugarer;
25 51
52 @Inject
53 private SemanticsUtils semanticsUtils;
54
55 private Problem problem;
56
57 private ModelStoreBuilder storeBuilder;
58
59 private BuiltinSymbols builtinSymbols;
60
61 private PartialRelation nodeRelation;
62
26 private final MutableObjectIntMap<Node> nodeTrace = ObjectIntMaps.mutable.empty(); 63 private final MutableObjectIntMap<Node> nodeTrace = ObjectIntMaps.mutable.empty();
27 64
28 private final Map<tools.refinery.language.model.problem.Relation, Symbol<TruthValue>> relationTrace = 65 private final Map<Relation, RelationInfo> relationInfoMap = new LinkedHashMap<>();
29 new HashMap<>(); 66
67 private final Map<PartialRelation, RelationInfo> partialRelationInfoMap = new HashMap<>();
68
69 private final Map<AnyPartialSymbol, Relation> inverseTrace = new HashMap<>();
70
71 private Map<Relation, PartialRelation> relationTrace;
72
73 private final MetamodelBuilder metamodelBuilder = Metamodel.builder();
74
75 private Metamodel metamodel;
76
77 private final Map<Tuple, CardinalityInterval> countSeed = new LinkedHashMap<>();
78
79 private ScopePropagator scopePropagator;
80
81 private ModelSeed modelSeed;
82
83 public Problem getProblem() {
84 return problem;
85 }
86
87 public int getNodeCount() {
88 return nodeTrace.size();
89 }
90
91 public MutableObjectIntMap<Node> getNodeTrace() {
92 return nodeTrace;
93 }
94
95 public Map<Relation, PartialRelation> getRelationTrace() {
96 return relationTrace;
97 }
30 98
31 private int nodeCount = 0; 99 public Relation getInverseTrace(AnyPartialSymbol partialRelation) {
100 return inverseTrace.get(partialRelation);
101 }
102
103 public Metamodel getMetamodel() {
104 return metamodel;
105 }
32 106
33 public void createModel(Problem problem) { 107 public ModelSeed createModel(Problem problem, ModelStoreBuilder storeBuilder) {
34 var builtinSymbols = desugarer.getBuiltinSymbols(problem).orElseThrow(() -> new IllegalArgumentException( 108 this.problem = problem;
109 this.storeBuilder = storeBuilder;
110 builtinSymbols = desugarer.getBuiltinSymbols(problem).orElseThrow(() -> new IllegalArgumentException(
35 "Problem has no builtin library")); 111 "Problem has no builtin library"));
36 var collectedSymbols = desugarer.collectSymbols(problem); 112 var nodeInfo = collectPartialRelation(builtinSymbols.node(), 1, TruthValue.TRUE, TruthValue.TRUE);
37 for (var node : collectedSymbols.nodes().keySet()) { 113 nodeRelation = nodeInfo.partialRelation();
38 nodeTrace.put(node, nodeCount); 114 metamodelBuilder.type(nodeRelation);
39 nodeCount += 1; 115 putRelationInfo(builtinSymbols.exists(), new RelationInfo(ReasoningAdapter.EXISTS_SYMBOL, null,
40 } 116 TruthValue.TRUE));
41 for (var pair : collectedSymbols.relations().entrySet()) { 117 putRelationInfo(builtinSymbols.equals(), new RelationInfo(ReasoningAdapter.EQUALS_SYMBOL,
42 var relation = pair.getKey(); 118 (TruthValue) null,
43 var relationInfo = pair.getValue(); 119 null));
44 var isEqualsRelation = relation == builtinSymbols.equals(); 120 putRelationInfo(builtinSymbols.contained(), new RelationInfo(ContainmentHierarchyTranslator.CONTAINED_SYMBOL,
45 var decisionTree = mergeAssertions(relationInfo, isEqualsRelation); 121 null, TruthValue.UNKNOWN));
46 var defaultValue = isEqualsRelation ? TruthValue.FALSE : TruthValue.UNKNOWN; 122 putRelationInfo(builtinSymbols.contains(), new RelationInfo(ContainmentHierarchyTranslator.CONTAINS_SYMBOL,
47 relationTrace.put(relation, Symbol.of( 123 null, TruthValue.UNKNOWN));
48 relationInfo.name(), relationInfo.arity(), TruthValue.class, defaultValue)); 124 putRelationInfo(builtinSymbols.invalidContainer(),
49 } 125 new RelationInfo(ContainmentHierarchyTranslator.INVALID_CONTAINER, TruthValue.FALSE,
50 } 126 TruthValue.FALSE));
51 127 collectNodes();
52 private DecisionTree mergeAssertions(RelationInfo relationInfo, boolean isEqualsRelation) { 128 collectPartialSymbols();
53 var arity = relationInfo.arity(); 129 collectMetamodel();
54 var defaultAssertions = new DecisionTree(arity, isEqualsRelation ? null : TruthValue.UNKNOWN); 130 metamodel = metamodelBuilder.build();
55 var assertions = new DecisionTree(arity); 131 collectAssertions();
56 for (var assertion : relationInfo.assertions()) { 132 storeBuilder.with(new MultiObjectTranslator());
57 var tuple = getTuple(assertion); 133 storeBuilder.with(new MetamodelTranslator(metamodel));
58 var value = getTruthValue(assertion.getValue()); 134 relationTrace = new LinkedHashMap<>(relationInfoMap.size());
59 if (assertion.isDefault()) { 135 int nodeCount = getNodeCount();
60 defaultAssertions.mergeValue(tuple, value); 136 var modelSeedBuilder = ModelSeed.builder(nodeCount);
137 for (var entry : relationInfoMap.entrySet()) {
138 var relation = entry.getKey();
139 var info = entry.getValue();
140 var partialRelation = info.partialRelation();
141 relationTrace.put(relation, partialRelation);
142 modelSeedBuilder.seed(partialRelation, info.toSeed(nodeCount));
143 }
144 collectScopes();
145 if (scopePropagator != null) {
146 if (storeBuilder.tryGetAdapter(PropagationBuilder.class).isEmpty()) {
147 throw new TracedException(problem, "Type scopes require a PropagationBuilder");
148 }
149 storeBuilder.with(scopePropagator);
150 }
151 modelSeedBuilder.seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
152 .reducedValue(CardinalityIntervals.SET)
153 .putAll(countSeed));
154 modelSeed = modelSeedBuilder.build();
155 collectPredicates();
156 return modelSeed;
157 }
158
159 private void collectNodes() {
160 for (var statement : problem.getStatements()) {
161 if (statement instanceof IndividualDeclaration individualDeclaration) {
162 for (var individual : individualDeclaration.getNodes()) {
163 collectNode(individual);
164 }
165 } else if (statement instanceof ClassDeclaration classDeclaration) {
166 var newNode = classDeclaration.getNewNode();
167 if (newNode != null) {
168 collectNode(newNode);
169 }
170 } else if (statement instanceof EnumDeclaration enumDeclaration) {
171 for (var literal : enumDeclaration.getLiterals()) {
172 collectNode(literal);
173 }
174 }
175 }
176 for (var node : problem.getNodes()) {
177 collectNode(node);
178 }
179 }
180
181 private void collectNode(Node node) {
182 nodeTrace.getIfAbsentPut(node, this::getNodeCount);
183 }
184
185 private void collectPartialSymbols() {
186 for (var statement : problem.getStatements()) {
187 if (statement instanceof ClassDeclaration classDeclaration) {
188 collectClassDeclarationSymbols(classDeclaration);
189 } else if (statement instanceof EnumDeclaration enumDeclaration) {
190 collectPartialRelation(enumDeclaration, 1, TruthValue.FALSE, TruthValue.FALSE);
191 } else if (statement instanceof PredicateDefinition predicateDefinition) {
192 collectPredicateDefinitionSymbol(predicateDefinition);
193 }
194 }
195 }
196
197 private void collectClassDeclarationSymbols(ClassDeclaration classDeclaration) {
198 collectPartialRelation(classDeclaration, 1, null, TruthValue.UNKNOWN);
199 for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) {
200 if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) {
201 collectPartialRelation(referenceDeclaration, 2, null, TruthValue.UNKNOWN);
202 var invalidMultiplicityConstraint = referenceDeclaration.getInvalidMultiplicity();
203 if (invalidMultiplicityConstraint != null) {
204 collectPartialRelation(invalidMultiplicityConstraint, 1, TruthValue.FALSE, TruthValue.FALSE);
205 }
61 } else { 206 } else {
62 assertions.mergeValue(tuple, value); 207 throw new TracedException(featureDeclaration, "Unknown feature declaration");
208 }
209 }
210 }
211
212 private void collectPredicateDefinitionSymbol(PredicateDefinition predicateDefinition) {
213 int arity = predicateDefinition.getParameters().size();
214 if (predicateDefinition.isError()) {
215 collectPartialRelation(predicateDefinition, arity, TruthValue.FALSE, TruthValue.FALSE);
216 } else {
217 collectPartialRelation(predicateDefinition, arity, null, TruthValue.UNKNOWN);
218 }
219 }
220
221 private void putRelationInfo(Relation relation, RelationInfo info) {
222 relationInfoMap.put(relation, info);
223 partialRelationInfoMap.put(info.partialRelation(), info);
224 inverseTrace.put(info.partialRelation(), relation);
225 }
226
227 private RelationInfo collectPartialRelation(Relation relation, int arity, TruthValue value,
228 TruthValue defaultValue) {
229 return relationInfoMap.computeIfAbsent(relation, key -> {
230 var name = getName(relation);
231 var info = new RelationInfo(name, arity, value, defaultValue);
232 partialRelationInfoMap.put(info.partialRelation(), info);
233 inverseTrace.put(info.partialRelation(), relation);
234 return info;
235 });
236 }
237
238 private String getName(Relation relation) {
239 return semanticsUtils.getName(relation).orElseGet(() -> "::" + relationInfoMap.size());
240 }
241
242 private void collectMetamodel() {
243 for (var statement : problem.getStatements()) {
244 if (statement instanceof ClassDeclaration classDeclaration) {
245 collectClassDeclarationMetamodel(classDeclaration);
246 } else if (statement instanceof EnumDeclaration enumDeclaration) {
247 collectEnumMetamodel(enumDeclaration);
248 }
249 }
250 }
251
252 private void collectEnumMetamodel(EnumDeclaration enumDeclaration) {
253 try {
254 metamodelBuilder.type(getPartialRelation(enumDeclaration), nodeRelation);
255 } catch (RuntimeException e) {
256 throw TracedException.addTrace(enumDeclaration, e);
257 }
258 }
259
260 private void collectClassDeclarationMetamodel(ClassDeclaration classDeclaration) {
261 var superTypes = classDeclaration.getSuperTypes();
262 var partialSuperTypes = new ArrayList<PartialRelation>(superTypes.size() + 1);
263 partialSuperTypes.add(nodeRelation);
264 for (var superType : superTypes) {
265 partialSuperTypes.add(getPartialRelation(superType));
266 }
267 try {
268 metamodelBuilder.type(getPartialRelation(classDeclaration), classDeclaration.isAbstract(),
269 partialSuperTypes);
270 } catch (RuntimeException e) {
271 throw TracedException.addTrace(classDeclaration, e);
272 }
273 for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) {
274 if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) {
275 collectReferenceDeclarationMetamodel(classDeclaration, referenceDeclaration);
63 } 276 }
64 } 277 }
65 defaultAssertions.overwriteValues(assertions); 278 }
66 if (isEqualsRelation) { 279
67 for (int i = 0; i < nodeCount; i++) { 280 private void collectReferenceDeclarationMetamodel(ClassDeclaration classDeclaration,
68 defaultAssertions.setIfMissing(Tuple.of(i, i), TruthValue.TRUE); 281 ReferenceDeclaration referenceDeclaration) {
282 var relation = getPartialRelation(referenceDeclaration);
283 var source = getPartialRelation(classDeclaration);
284 var target = getPartialRelation(referenceDeclaration.getReferenceType());
285 boolean containment = referenceDeclaration.getKind() == ReferenceKind.CONTAINMENT;
286 var opposite = referenceDeclaration.getOpposite();
287 PartialRelation oppositeRelation = null;
288 if (opposite != null) {
289 oppositeRelation = getPartialRelation(opposite);
290 }
291 var multiplicity = getMultiplicityConstraint(referenceDeclaration);
292 try {
293 metamodelBuilder.reference(relation, source, containment, multiplicity, target, oppositeRelation);
294 } catch (RuntimeException e) {
295 throw TracedException.addTrace(classDeclaration, e);
296 }
297 }
298
299 private Multiplicity getMultiplicityConstraint(ReferenceDeclaration referenceDeclaration) {
300 if (!ProblemUtil.hasMultiplicityConstraint(referenceDeclaration)) {
301 return UnconstrainedMultiplicity.INSTANCE;
302 }
303 var problemMultiplicity = referenceDeclaration.getMultiplicity();
304 CardinalityInterval interval;
305 if (problemMultiplicity == null) {
306 interval = CardinalityIntervals.LONE;
307 } else {
308 interval = getCardinalityInterval(problemMultiplicity);
309 }
310 var constraint = getRelationInfo(referenceDeclaration.getInvalidMultiplicity()).partialRelation();
311 return ConstrainedMultiplicity.of(interval, constraint);
312 }
313
314 private static CardinalityInterval getCardinalityInterval(
315 tools.refinery.language.model.problem.Multiplicity problemMultiplicity) {
316 if (problemMultiplicity instanceof ExactMultiplicity exactMultiplicity) {
317 return CardinalityIntervals.exactly(exactMultiplicity.getExactValue());
318 } else if (problemMultiplicity instanceof RangeMultiplicity rangeMultiplicity) {
319 var upperBound = rangeMultiplicity.getUpperBound();
320 return CardinalityIntervals.between(rangeMultiplicity.getLowerBound(),
321 upperBound < 0 ? UpperCardinalities.UNBOUNDED : UpperCardinalities.atMost(upperBound));
322 } else {
323 throw new TracedException(problemMultiplicity, "Unknown multiplicity");
324 }
325 }
326
327 private void collectAssertions() {
328 for (var statement : problem.getStatements()) {
329 if (statement instanceof ClassDeclaration classDeclaration) {
330 collectClassDeclarationAssertions(classDeclaration);
331 } else if (statement instanceof EnumDeclaration enumDeclaration) {
332 collectEnumAssertions(enumDeclaration);
333 } else if (statement instanceof IndividualDeclaration individualDeclaration) {
334 for (var individual : individualDeclaration.getNodes()) {
335 collectIndividualAssertions(individual);
336 }
337 } else if (statement instanceof Assertion assertion) {
338 collectAssertion(assertion);
69 } 339 }
70 defaultAssertions.setAllMissing(TruthValue.FALSE);
71 } 340 }
72 return defaultAssertions; 341 }
342
343 private void collectClassDeclarationAssertions(ClassDeclaration classDeclaration) {
344 var newNode = classDeclaration.getNewNode();
345 if (newNode == null) {
346 return;
347 }
348 var newNodeId = getNodeId(newNode);
349 collectCardinalityAssertions(newNodeId, TruthValue.UNKNOWN);
350 var tuple = Tuple.of(newNodeId);
351 mergeValue(classDeclaration, tuple, TruthValue.TRUE);
352 var typeInfo = metamodel.typeHierarchy().getAnalysisResult(getPartialRelation(classDeclaration));
353 for (var subType : typeInfo.getDirectSubtypes()) {
354 partialRelationInfoMap.get(subType).assertions().mergeValue(tuple, TruthValue.FALSE);
355 }
356 }
357
358 private void collectEnumAssertions(EnumDeclaration enumDeclaration) {
359 var overlay = MutableSeed.of(1, null);
360 for (var literal : enumDeclaration.getLiterals()) {
361 collectIndividualAssertions(literal);
362 var nodeId = getNodeId(literal);
363 overlay.mergeValue(Tuple.of(nodeId), TruthValue.TRUE);
364 }
365 var info = getRelationInfo(enumDeclaration);
366 info.assertions().overwriteValues(overlay);
367 }
368
369 private void collectIndividualAssertions(Node node) {
370 var nodeId = getNodeId(node);
371 collectCardinalityAssertions(nodeId, TruthValue.TRUE);
372 }
373
374 private void collectCardinalityAssertions(int nodeId, TruthValue value) {
375 mergeValue(builtinSymbols.exists(), Tuple.of(nodeId), value);
376 mergeValue(builtinSymbols.equals(), Tuple.of(nodeId, nodeId), value);
377 }
378
379 private void collectAssertion(Assertion assertion) {
380 var tuple = getTuple(assertion);
381 var value = getTruthValue(assertion.getValue());
382 var relation = assertion.getRelation();
383 var info = getRelationInfo(relation);
384 var partialRelation = info.partialRelation();
385 if (partialRelation.arity() != tuple.getSize()) {
386 throw new TracedException(assertion, "Expected %d arguments for %s, got %d instead"
387 .formatted(partialRelation.arity(), partialRelation, tuple.getSize()));
388 }
389 if (assertion.isDefault()) {
390 info.defaultAssertions().mergeValue(tuple, value);
391 } else {
392 info.assertions().mergeValue(tuple, value);
393 }
394 }
395
396 private void mergeValue(Relation relation, Tuple key, TruthValue value) {
397 getRelationInfo(relation).assertions().mergeValue(key, value);
398 }
399
400 private RelationInfo getRelationInfo(Relation relation) {
401 var info = relationInfoMap.get(relation);
402 if (info == null) {
403 throw new IllegalArgumentException("Unknown relation: " + relation);
404 }
405 return info;
406 }
407
408 private PartialRelation getPartialRelation(Relation relation) {
409 return getRelationInfo(relation).partialRelation();
410 }
411
412 private int getNodeId(Node node) {
413 return nodeTrace.getOrThrow(node);
73 } 414 }
74 415
75 private Tuple getTuple(Assertion assertion) { 416 private Tuple getTuple(Assertion assertion) {
@@ -79,11 +420,11 @@ public class ModelInitializer {
79 for (int i = 0; i < arity; i++) { 420 for (int i = 0; i < arity; i++) {
80 var argument = arguments.get(i); 421 var argument = arguments.get(i);
81 if (argument instanceof NodeAssertionArgument nodeArgument) { 422 if (argument instanceof NodeAssertionArgument nodeArgument) {
82 nodes[i] = nodeTrace.getOrThrow(nodeArgument.getNode()); 423 nodes[i] = getNodeId(nodeArgument.getNode());
83 } else if (argument instanceof WildcardAssertionArgument) { 424 } else if (argument instanceof WildcardAssertionArgument) {
84 nodes[i] = -1; 425 nodes[i] = -1;
85 } else { 426 } else {
86 throw new IllegalArgumentException("Unknown assertion argument: " + argument); 427 throw new TracedException(argument, "Unsupported assertion argument");
87 } 428 }
88 } 429 }
89 return Tuple.of(nodes); 430 return Tuple.of(nodes);
@@ -100,4 +441,249 @@ public class ModelInitializer {
100 case ERROR -> TruthValue.ERROR; 441 case ERROR -> TruthValue.ERROR;
101 }; 442 };
102 } 443 }
444
445 private void collectPredicates() {
446 for (var statement : problem.getStatements()) {
447 if (statement instanceof PredicateDefinition predicateDefinition) {
448 collectPredicateDefinitionTraced(predicateDefinition);
449 }
450 }
451 }
452
453 private void collectPredicateDefinitionTraced(PredicateDefinition predicateDefinition) {
454 try {
455 collectPredicateDefinition(predicateDefinition);
456 } catch (InvalidClauseException e) {
457 int clauseIndex = e.getClauseIndex();
458 var bodies = predicateDefinition.getBodies();
459 if (clauseIndex < bodies.size()) {
460 throw new TracedException(bodies.get(clauseIndex), e);
461 } else {
462 throw new TracedException(predicateDefinition, e);
463 }
464 } catch (RuntimeException e) {
465 throw TracedException.addTrace(predicateDefinition, e);
466 }
467 }
468
469 private void collectPredicateDefinition(PredicateDefinition predicateDefinition) {
470 var partialRelation = getPartialRelation(predicateDefinition);
471 var query = toQuery(partialRelation.name(), predicateDefinition);
472 boolean mutable;
473 TruthValue defaultValue;
474 if (predicateDefinition.isError()) {
475 mutable = false;
476 defaultValue = TruthValue.FALSE;
477 } else {
478 var seed = modelSeed.getSeed(partialRelation);
479 defaultValue = seed.reducedValue() == TruthValue.FALSE ? TruthValue.FALSE : TruthValue.UNKNOWN;
480 var cursor = seed.getCursor(defaultValue, getNodeCount());
481 // The symbol should be mutable if there is at least one non-default entry in the seed.
482 mutable = cursor.move();
483 }
484 var translator = new PredicateTranslator(partialRelation, query, mutable, defaultValue);
485 storeBuilder.with(translator);
486 }
487
488 private RelationalQuery toQuery(String name, PredicateDefinition predicateDefinition) {
489 var problemParameters = predicateDefinition.getParameters();
490 int arity = problemParameters.size();
491 var parameters = new NodeVariable[arity];
492 var parameterMap = new HashMap<tools.refinery.language.model.problem.Variable, Variable>(arity);
493 var commonLiterals = new ArrayList<Literal>();
494 for (int i = 0; i < arity; i++) {
495 var problemParameter = problemParameters.get(i);
496 var parameter = Variable.of(problemParameter.getName());
497 parameters[i] = parameter;
498 parameterMap.put(problemParameter, parameter);
499 var parameterType = problemParameter.getParameterType();
500 if (parameterType != null) {
501 var partialType = getPartialRelation(parameterType);
502 commonLiterals.add(partialType.call(parameter));
503 }
504 }
505 var builder = Query.builder(name).parameters(parameters);
506 for (var body : predicateDefinition.getBodies()) {
507 try {
508 var localScope = extendScope(parameterMap, body.getImplicitVariables());
509 var problemLiterals = body.getLiterals();
510 var literals = new ArrayList<>(commonLiterals);
511 for (var problemLiteral : problemLiterals) {
512 toLiteralsTraced(problemLiteral, localScope, literals);
513 }
514 builder.clause(literals);
515 } catch (RuntimeException e) {
516 throw TracedException.addTrace(body, e);
517 }
518 }
519 return builder.build();
520 }
521
522 private Map<tools.refinery.language.model.problem.Variable, Variable> extendScope(
523 Map<tools.refinery.language.model.problem.Variable, Variable> existing,
524 Collection<? extends tools.refinery.language.model.problem.Variable> newVariables) {
525 if (newVariables.isEmpty()) {
526 return existing;
527 }
528 int localScopeSize = existing.size() + newVariables.size();
529 var localScope = new HashMap<tools.refinery.language.model.problem.Variable, Variable>(localScopeSize);
530 localScope.putAll(existing);
531 for (var newVariable : newVariables) {
532 localScope.put(newVariable, Variable.of(newVariable.getName()));
533 }
534 return localScope;
535 }
536
537 private void toLiteralsTraced(Expr expr, Map<tools.refinery.language.model.problem.Variable, Variable> localScope,
538 List<Literal> literals) {
539 try {
540 toLiterals(expr, localScope, literals);
541 } catch (RuntimeException e) {
542 throw TracedException.addTrace(expr, e);
543 }
544 }
545
546 private void toLiterals(Expr expr, Map<tools.refinery.language.model.problem.Variable, Variable> localScope,
547 List<Literal> literals) {
548 if (expr instanceof LogicConstant logicConstant) {
549 switch (logicConstant.getLogicValue()) {
550 case TRUE -> literals.add(BooleanLiteral.TRUE);
551 case FALSE -> literals.add(BooleanLiteral.FALSE);
552 default -> throw new TracedException(logicConstant, "Unsupported literal");
553 }
554 } else if (expr instanceof Atom atom) {
555 var target = getPartialRelation(atom.getRelation());
556 var polarity = atom.isTransitiveClosure() ? CallPolarity.TRANSITIVE : CallPolarity.POSITIVE;
557 var argumentList = toArgumentList(atom.getArguments(), localScope, literals);
558 literals.add(target.call(polarity, argumentList));
559 } else if (expr instanceof NegationExpr negationExpr) {
560 var body = negationExpr.getBody();
561 if (!(body instanceof Atom atom)) {
562 throw new TracedException(body, "Cannot negate literal");
563 }
564 var target = getPartialRelation(atom.getRelation());
565 Constraint constraint;
566 if (atom.isTransitiveClosure()) {
567 constraint = Query.of(target.name() + "#transitive", (builder, p1, p2) -> builder.clause(
568 target.callTransitive(p1, p2)
569 )).getDnf();
570 } else {
571 constraint = target;
572 }
573 var negatedScope = extendScope(localScope, negationExpr.getImplicitVariables());
574 var argumentList = toArgumentList(atom.getArguments(), negatedScope, literals);
575 literals.add(constraint.call(CallPolarity.NEGATIVE, argumentList));
576 } else if (expr instanceof ComparisonExpr comparisonExpr) {
577 var argumentList = toArgumentList(List.of(comparisonExpr.getLeft(), comparisonExpr.getRight()),
578 localScope, literals);
579 boolean positive = switch (comparisonExpr.getOp()) {
580 case EQ -> true;
581 case NOT_EQ -> false;
582 default -> throw new TracedException(
583 comparisonExpr, "Unsupported operator");
584 };
585 literals.add(new EquivalenceLiteral(positive, argumentList.get(0), argumentList.get(1)));
586 } else {
587 throw new TracedException(expr, "Unsupported literal");
588 }
589 }
590
591 private List<Variable> toArgumentList(
592 List<Expr> expressions, Map<tools.refinery.language.model.problem.Variable, Variable> localScope,
593 List<Literal> literals) {
594 var argumentList = new ArrayList<Variable>(expressions.size());
595 for (var expr : expressions) {
596 if (!(expr instanceof VariableOrNodeExpr variableOrNodeExpr)) {
597 throw new TracedException(expr, "Unsupported argument");
598 }
599 var variableOrNode = variableOrNodeExpr.getVariableOrNode();
600 if (variableOrNode instanceof Node node) {
601 int nodeId = getNodeId(node);
602 var tempVariable = Variable.of(semanticsUtils.getName(node).orElse("_" + nodeId));
603 literals.add(new ConstantLiteral(tempVariable, nodeId));
604 argumentList.add(tempVariable);
605 } else if (variableOrNode instanceof tools.refinery.language.model.problem.Variable problemVariable) {
606 if (variableOrNodeExpr.getSingletonVariable() == problemVariable) {
607 argumentList.add(Variable.of(problemVariable.getName()));
608 } else {
609 var variable = localScope.get(problemVariable);
610 if (variable == null) {
611 throw new TracedException(variableOrNode, "Unknown variable: " + problemVariable.getName());
612 }
613 argumentList.add(variable);
614 }
615 } else {
616 throw new TracedException(variableOrNode, "Unknown argument");
617 }
618 }
619 return argumentList;
620 }
621
622 private void collectScopes() {
623 for (var statement : problem.getStatements()) {
624 if (statement instanceof ScopeDeclaration scopeDeclaration) {
625 for (var typeScope : scopeDeclaration.getTypeScopes()) {
626 if (typeScope.isIncrement()) {
627 collectTypeScopeIncrement(typeScope);
628 } else {
629 collectTypeScope(typeScope);
630 }
631 }
632 }
633 }
634 }
635
636 private void collectTypeScopeIncrement(TypeScope typeScope) {
637 if (!(typeScope.getTargetType() instanceof ClassDeclaration classDeclaration)) {
638 throw new TracedException(typeScope, "Target of incremental type scope must be a class declaration");
639 }
640 var newNode = classDeclaration.getNewNode();
641 if (newNode == null) {
642 throw new TracedException(typeScope, "Target of incremental type scope must be concrete class");
643 }
644 int newNodeId = nodeTrace.get(newNode);
645 var type = relationTrace.get(classDeclaration);
646 var typeInfo = metamodel.typeHierarchy().getAnalysisResult(type);
647 if (!typeInfo.getDirectSubtypes().isEmpty()) {
648 throw new TracedException(typeScope, "Target of incremental type scope cannot have any subclasses");
649 }
650 var interval = getCardinalityInterval(typeScope.getMultiplicity());
651 countSeed.compute(Tuple.of(newNodeId), (key, oldValue) ->
652 oldValue == null ? interval : oldValue.meet(interval));
653 }
654
655 private void collectTypeScope(TypeScope typeScope) {
656 var type = relationTrace.get(typeScope.getTargetType());
657 if (type == null) {
658 throw new TracedException(typeScope, "Unknown target type");
659 }
660 var interval = getCardinalityInterval(typeScope.getMultiplicity());
661 if (scopePropagator == null) {
662 scopePropagator = new ScopePropagator();
663 }
664 scopePropagator.scope(type, interval);
665 }
666
667 private record RelationInfo(PartialRelation partialRelation, MutableSeed<TruthValue> assertions,
668 MutableSeed<TruthValue> defaultAssertions) {
669 public RelationInfo(String name, int arity, TruthValue value, TruthValue defaultValue) {
670 this(new PartialRelation(name, arity), value, defaultValue);
671 }
672
673 public RelationInfo(PartialRelation partialRelation, TruthValue value, TruthValue defaultValue) {
674 this(partialRelation, MutableSeed.of(partialRelation.arity(), value),
675 MutableSeed.of(partialRelation.arity(), defaultValue));
676 }
677
678 public Seed<TruthValue> toSeed(int nodeCount) {
679 defaultAssertions.overwriteValues(assertions);
680 if (partialRelation.equals(ReasoningAdapter.EQUALS_SYMBOL)) {
681 for (int i = 0; i < nodeCount; i++) {
682 defaultAssertions.setIfMissing(Tuple.of(i, i), TruthValue.TRUE);
683 }
684 defaultAssertions.setAllMissing(TruthValue.FALSE);
685 }
686 return defaultAssertions;
687 }
688 }
103} 689}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/SemanticsUtils.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/SemanticsUtils.java
new file mode 100644
index 00000000..47c89e9b
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/SemanticsUtils.java
@@ -0,0 +1,31 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.model;
7
8import com.google.inject.Inject;
9import com.google.inject.Singleton;
10import org.eclipse.emf.ecore.EObject;
11import org.eclipse.xtext.naming.IQualifiedNameConverter;
12import org.eclipse.xtext.naming.IQualifiedNameProvider;
13
14import java.util.Optional;
15
16@Singleton
17public class SemanticsUtils {
18 @Inject
19 private IQualifiedNameProvider qualifiedNameProvider;
20
21 @Inject
22 private IQualifiedNameConverter qualifiedNameConverter;
23
24 public Optional<String> getName(EObject eObject) {
25 var qualifiedName = qualifiedNameProvider.getFullyQualifiedName(eObject);
26 if (qualifiedName == null) {
27 return Optional.empty();
28 }
29 return Optional.of(qualifiedNameConverter.toString(qualifiedName));
30 }
31}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/TracedException.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/TracedException.java
new file mode 100644
index 00000000..38fd8a67
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/TracedException.java
@@ -0,0 +1,51 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.model;
7
8import org.eclipse.emf.ecore.EObject;
9
10public class TracedException extends RuntimeException {
11 private final transient EObject sourceElement;
12
13 public TracedException(EObject sourceElement) {
14 this.sourceElement = sourceElement;
15 }
16
17 public TracedException(EObject sourceElement, String message) {
18 super(message);
19 this.sourceElement = sourceElement;
20 }
21
22 public TracedException(EObject sourceElement, String message, Throwable cause) {
23 super(message, cause);
24 this.sourceElement = sourceElement;
25 }
26
27 public TracedException(EObject sourceElement, Throwable cause) {
28 super(cause);
29 this.sourceElement = sourceElement;
30 }
31
32 public EObject getSourceElement() {
33 return sourceElement;
34 }
35
36 @Override
37 public String getMessage() {
38 var message = super.getMessage();
39 if (message == null) {
40 return "Internal error";
41 }
42 return message;
43 }
44
45 public static TracedException addTrace(EObject sourceElement, Throwable cause) {
46 if (cause instanceof TracedException tracedException && tracedException.sourceElement != null) {
47 return tracedException;
48 }
49 return new TracedException(sourceElement, cause);
50 }
51}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTree.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTree.java
index c1afecf9..32112e61 100644
--- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTree.java
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTree.java
@@ -7,10 +7,10 @@ package tools.refinery.language.semantics.model.internal;
7 7
8import org.eclipse.collections.api.factory.primitive.IntObjectMaps; 8import org.eclipse.collections.api.factory.primitive.IntObjectMaps;
9import tools.refinery.store.map.Cursor; 9import tools.refinery.store.map.Cursor;
10import tools.refinery.store.tuple.Tuple;
11import tools.refinery.store.representation.TruthValue; 10import tools.refinery.store.representation.TruthValue;
11import tools.refinery.store.tuple.Tuple;
12 12
13public class DecisionTree { 13class DecisionTree implements MutableSeed<TruthValue> {
14 private final int levels; 14 private final int levels;
15 15
16 private final DecisionTreeNode root; 16 private final DecisionTreeNode root;
@@ -29,30 +29,53 @@ public class DecisionTree {
29 this(levels, null); 29 this(levels, null);
30 } 30 }
31 31
32 @Override
33 public int arity() {
34 return levels;
35 }
36
37 @Override
38 public Class<TruthValue> valueType() {
39 return TruthValue.class;
40 }
41
42 @Override
43 public TruthValue reducedValue() {
44 return root.getOtherwiseReducedValue().getTruthValue();
45 }
46
47 @Override
32 public TruthValue get(Tuple tuple) { 48 public TruthValue get(Tuple tuple) {
33 return root.getValue(levels - 1, tuple).getTruthValue(); 49 return root.getValue(levels - 1, tuple).getTruthValue();
34 } 50 }
35 51
52 @Override
36 public void mergeValue(Tuple tuple, TruthValue truthValue) { 53 public void mergeValue(Tuple tuple, TruthValue truthValue) {
37 if (truthValue != null) { 54 if (truthValue != null) {
38 root.mergeValue(levels - 1, tuple, truthValue); 55 root.mergeValue(levels - 1, tuple, truthValue);
39 } 56 }
40 } 57 }
41 58
59 @Override
42 public void setIfMissing(Tuple tuple, TruthValue truthValue) { 60 public void setIfMissing(Tuple tuple, TruthValue truthValue) {
43 if (truthValue != null) { 61 if (truthValue != null) {
44 root.setIfMissing(levels - 1, tuple, truthValue); 62 root.setIfMissing(levels - 1, tuple, truthValue);
45 } 63 }
46 } 64 }
47 65
66 @Override
48 public void setAllMissing(TruthValue truthValue) { 67 public void setAllMissing(TruthValue truthValue) {
49 if (truthValue != null) { 68 if (truthValue != null) {
50 root.setAllMissing(truthValue); 69 root.setAllMissing(truthValue);
51 } 70 }
52 } 71 }
53 72
54 public void overwriteValues(DecisionTree values) { 73 @Override
55 root.overwriteValues(values.root); 74 public void overwriteValues(MutableSeed<TruthValue> values) {
75 if (!(values instanceof DecisionTree decisionTree)) {
76 throw new IllegalArgumentException("Incompatible overwrite: " + values);
77 }
78 root.overwriteValues(decisionTree.root);
56 } 79 }
57 80
58 public TruthValue getReducedValue() { 81 public TruthValue getReducedValue() {
@@ -60,6 +83,7 @@ public class DecisionTree {
60 return reducedValue == null ? null : reducedValue.getTruthValue(); 83 return reducedValue == null ? null : reducedValue.getTruthValue();
61 } 84 }
62 85
86 @Override
63 public Cursor<Tuple, TruthValue> getCursor(TruthValue defaultValue, int nodeCount) { 87 public Cursor<Tuple, TruthValue> getCursor(TruthValue defaultValue, int nodeCount) {
64 return new DecisionTreeCursor(levels, defaultValue, nodeCount, root); 88 return new DecisionTreeCursor(levels, defaultValue, nodeCount, root);
65 } 89 }
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTreeCursor.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTreeCursor.java
index 9a1e15a3..a9fc644a 100644
--- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTreeCursor.java
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/DecisionTreeCursor.java
@@ -67,6 +67,15 @@ class DecisionTreeCursor implements Cursor<Tuple, TruthValue> {
67 67
68 @Override 68 @Override
69 public boolean move() { 69 public boolean move() {
70 while (moveOne()) {
71 if (!value.equals(defaultValue)) {
72 return true;
73 }
74 }
75 return false;
76 }
77
78 private boolean moveOne() {
70 boolean found = false; 79 boolean found = false;
71 if (path.isEmpty() && !terminated) { 80 if (path.isEmpty() && !terminated) {
72 found = root.moveNext(levels - 1, this); 81 found = root.moveNext(levels - 1, this);
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/MutableSeed.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/MutableSeed.java
new file mode 100644
index 00000000..99019e2a
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/MutableSeed.java
@@ -0,0 +1,28 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.model.internal;
7
8import tools.refinery.store.reasoning.seed.Seed;
9import tools.refinery.store.representation.TruthValue;
10import tools.refinery.store.tuple.Tuple;
11
12public interface MutableSeed<T> extends Seed<T> {
13 void mergeValue(Tuple tuple, T value);
14
15 void setIfMissing(Tuple tuple, T value);
16
17 void setAllMissing(T value);
18
19 void overwriteValues(MutableSeed<T> other);
20
21 static MutableSeed<TruthValue> of(int levels, TruthValue initialValue) {
22 if (levels == 0) {
23 return new NullaryMutableSeed(initialValue);
24 } else {
25 return new DecisionTree(levels, initialValue);
26 }
27 }
28}
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/NullaryMutableSeed.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/NullaryMutableSeed.java
new file mode 100644
index 00000000..80644b1f
--- /dev/null
+++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/internal/NullaryMutableSeed.java
@@ -0,0 +1,83 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.model.internal;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.map.Cursors;
10import tools.refinery.store.representation.TruthValue;
11import tools.refinery.store.tuple.Tuple;
12
13class NullaryMutableSeed implements MutableSeed<TruthValue> {
14 private DecisionTreeValue value;
15
16 public NullaryMutableSeed(TruthValue reducedValue) {
17
18 value = DecisionTreeValue.fromTruthValue(reducedValue);
19 }
20
21 @Override
22 public int arity() {
23 return 0;
24 }
25
26 @Override
27 public Class<TruthValue> valueType() {
28 return TruthValue.class;
29 }
30
31 @Override
32 public TruthValue reducedValue() {
33 return value.getTruthValue();
34 }
35
36 @Override
37 public TruthValue get(Tuple key) {
38 validateKey(key);
39 return reducedValue();
40 }
41
42 private static void validateKey(Tuple key) {
43 if (key.getSize() > 0) {
44 throw new IllegalArgumentException("Invalid key: " + key);
45 }
46 }
47
48 @Override
49 public Cursor<Tuple, TruthValue> getCursor(TruthValue defaultValue, int nodeCount) {
50 if (value == DecisionTreeValue.UNSET || value.getTruthValue() == defaultValue) {
51 return Cursors.empty();
52 }
53 return Cursors.singleton(Tuple.of(), value.getTruthValue());
54 }
55
56 @Override
57 public void mergeValue(Tuple tuple, TruthValue value) {
58 this.value = DecisionTreeValue.fromTruthValue(this.value.merge(value));
59 }
60
61 @Override
62 public void setIfMissing(Tuple tuple, TruthValue value) {
63 validateKey(tuple);
64 setAllMissing(value);
65 }
66
67 @Override
68 public void setAllMissing(TruthValue value) {
69 if (this.value == DecisionTreeValue.UNSET) {
70 this.value = DecisionTreeValue.fromTruthValue(value);
71 }
72 }
73
74 @Override
75 public void overwriteValues(MutableSeed<TruthValue> other) {
76 if (!(other instanceof NullaryMutableSeed nullaryMutableSeed)) {
77 throw new IllegalArgumentException("Incompatible overwrite: " + other);
78 }
79 if (nullaryMutableSeed.value != DecisionTreeValue.UNSET) {
80 value = nullaryMutableSeed.value;
81 }
82 }
83}
diff --git a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/CountPropagationTest.java b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/CountPropagationTest.java
new file mode 100644
index 00000000..eee2c4ae
--- /dev/null
+++ b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/CountPropagationTest.java
@@ -0,0 +1,79 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.model;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.dse.propagation.PropagationAdapter;
10import tools.refinery.store.dse.propagation.PropagationResult;
11import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter;
12import tools.refinery.store.model.ModelStore;
13import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
14import tools.refinery.store.reasoning.ReasoningAdapter;
15import tools.refinery.store.reasoning.ReasoningStoreAdapter;
16import tools.refinery.store.reasoning.representation.PartialRelation;
17import tools.refinery.store.reasoning.scope.ScopePropagator;
18import tools.refinery.store.reasoning.seed.ModelSeed;
19import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
20import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchy;
21import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator;
22import tools.refinery.store.representation.TruthValue;
23import tools.refinery.store.representation.cardinality.CardinalityIntervals;
24import tools.refinery.store.tuple.Tuple;
25
26import static org.hamcrest.MatcherAssert.assertThat;
27import static org.hamcrest.Matchers.is;
28
29class CountPropagationTest {
30 @Test
31 void countPropagationTest() {
32 var a1 = new PartialRelation("A1", 1);
33 var c1 = new PartialRelation("C1", 1);
34 var c2 = new PartialRelation("C2", 1);
35
36 var typeHierarchy = TypeHierarchy.builder()
37 .type(a1, true)
38 .type(c1, a1)
39 .type(c2, a1)
40 .build();
41
42 var store = ModelStore.builder()
43 .with(ViatraModelQueryAdapter.builder())
44 .with(PropagationAdapter.builder())
45 .with(DesignSpaceExplorationAdapter.builder())
46 .with(ReasoningAdapter.builder())
47 .with(new MultiObjectTranslator())
48 .with(new TypeHierarchyTranslator(typeHierarchy))
49 .with(new ScopePropagator()
50 .scope(a1, CardinalityIntervals.between(1000, 1100))
51 .scope(c1, CardinalityIntervals.between(100, 150)))
52 .build();
53
54 var modelSeed = ModelSeed.builder(4)
55 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
56 .reducedValue(CardinalityIntervals.ONE)
57 .put(Tuple.of(0), CardinalityIntervals.SET)
58 .put(Tuple.of(1), CardinalityIntervals.SET))
59 .seed(a1, builder -> builder.reducedValue(TruthValue.UNKNOWN))
60 .seed(c1, builder -> builder
61 .reducedValue(TruthValue.FALSE)
62 .put(Tuple.of(0), TruthValue.TRUE)
63 .put(Tuple.of(2), TruthValue.TRUE))
64 .seed(c2, builder -> builder
65 .reducedValue(TruthValue.FALSE)
66 .put(Tuple.of(1), TruthValue.TRUE)
67 .put(Tuple.of(3), TruthValue.TRUE))
68 .build();
69
70 var initialModel = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
71 var initialState = initialModel.commit();
72
73 var model = store.createModelForState(initialState);
74 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
75 var propagationAdapter = model.getAdapter(PropagationAdapter.class);
76 reasoningAdapter.split(0);
77 assertThat(propagationAdapter.propagate(), is(PropagationResult.UNCHANGED));
78 }
79}
diff --git a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/ModelGenerationTest.java b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/ModelGenerationTest.java
new file mode 100644
index 00000000..d756099c
--- /dev/null
+++ b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/ModelGenerationTest.java
@@ -0,0 +1,339 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.semantics.model;
7
8import com.google.inject.Inject;
9import org.eclipse.xtext.testing.InjectWith;
10import org.eclipse.xtext.testing.extensions.InjectionExtension;
11import org.junit.jupiter.api.Disabled;
12import org.junit.jupiter.api.Test;
13import org.junit.jupiter.api.extension.ExtendWith;
14import tools.refinery.language.ProblemStandaloneSetup;
15import tools.refinery.language.model.tests.utils.ProblemParseHelper;
16import tools.refinery.language.tests.ProblemInjectorProvider;
17import tools.refinery.store.dse.propagation.PropagationAdapter;
18import tools.refinery.store.dse.strategy.BestFirstStoreManager;
19import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter;
20import tools.refinery.store.model.ModelStore;
21import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
22import tools.refinery.store.reasoning.ReasoningAdapter;
23import tools.refinery.store.reasoning.ReasoningStoreAdapter;
24import tools.refinery.store.reasoning.literal.Concreteness;
25import tools.refinery.store.reasoning.representation.PartialRelation;
26import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator;
27import tools.refinery.store.statecoding.StateCoderAdapter;
28import tools.refinery.visualization.ModelVisualizerAdapter;
29import tools.refinery.visualization.internal.FileFormat;
30
31import java.util.LinkedHashMap;
32
33import static org.hamcrest.MatcherAssert.assertThat;
34import static org.hamcrest.Matchers.empty;
35
36@ExtendWith(InjectionExtension.class)
37@InjectWith(ProblemInjectorProvider.class)
38@Disabled("For debugging purposes only")
39class ModelGenerationTest {
40 @Inject
41 private ProblemParseHelper parseHelper;
42
43 @Inject
44 private ModelInitializer modelInitializer;
45
46 @Test
47 void socialNetworkTest() {
48 var parsedProblem = parseHelper.parse("""
49 % Metamodel
50 class Person {
51 contains Post posts opposite author
52 Person friend opposite friend
53 }
54
55 class Post {
56 container Person[0..1] author opposite posts
57 Post replyTo
58 }
59
60 % Constraints
61 error replyToNotFriend(Post x, Post y) <->
62 replyTo(x, y),
63 author(x, xAuthor),
64 author(y, yAuthor),
65 xAuthor != yAuthor,
66 !friend(xAuthor, yAuthor).
67
68 error replyToCycle(Post x) <-> replyTo+(x, x).
69
70 % Instance model
71 !friend(a, b).
72 author(p1, a).
73 author(p2, b).
74
75 !author(Post::new, a).
76
77 % Scope
78 scope Post = 5, Person = 5.
79 """);
80 assertThat(parsedProblem.errors(), empty());
81 var problem = parsedProblem.problem();
82
83 var storeBuilder = ModelStore.builder()
84 .with(ViatraModelQueryAdapter.builder())
85 .with(ModelVisualizerAdapter.builder()
86 .withOutputPath("test_output")
87 .withFormat(FileFormat.DOT)
88 .withFormat(FileFormat.SVG)
89// .saveStates()
90 .saveDesignSpace())
91 .with(PropagationAdapter.builder())
92 .with(StateCoderAdapter.builder())
93 .with(DesignSpaceExplorationAdapter.builder())
94 .with(ReasoningAdapter.builder());
95
96 var modelSeed = modelInitializer.createModel(problem, storeBuilder);
97
98 var store = storeBuilder.build();
99
100 var initialModel = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
101
102 var initialVersion = initialModel.commit();
103
104 var bestFirst = new BestFirstStoreManager(store, 1);
105 bestFirst.startExploration(initialVersion);
106 var resultStore = bestFirst.getSolutionStore();
107 System.out.println("states size: " + resultStore.getSolutions().size());
108// initialModel.getAdapter(ModelVisualizerAdapter.class).visualize(bestFirst.getVisualizationStore());
109 }
110
111 @Test
112 void statechartTest() {
113 var parsedProblem = parseHelper.parse("""
114 // Metamodel
115 abstract class CompositeElement {
116 contains Region[] regions
117 }
118
119 class Region {
120 contains Vertex[] vertices opposite region
121 }
122
123 abstract class Vertex {
124 container Region[0..1] region opposite vertices
125 contains Transition[] outgoingTransition opposite source
126 Transition[] incomingTransition opposite target
127 }
128
129 class Transition {
130 container Vertex[0..1] source opposite outgoingTransition
131 Vertex target opposite incomingTransition
132 }
133
134 abstract class Pseudostate extends Vertex.
135
136 abstract class RegularState extends Vertex.
137
138 class Entry extends Pseudostate.
139
140 class Exit extends Pseudostate.
141
142 class Choice extends Pseudostate.
143
144 class FinalState extends RegularState.
145
146 class State extends RegularState, CompositeElement.
147
148 class Statechart extends CompositeElement.
149
150 // Constraints
151
152 /////////
153 // Entry
154 /////////
155
156 pred entryInRegion(Region r, Entry e) <->
157 vertices(r, e).
158
159 error noEntryInRegion(Region r) <->
160 !entryInRegion(r, _).
161
162 error multipleEntryInRegion(Region r) <->
163 entryInRegion(r, e1),
164 entryInRegion(r, e2),
165 e1 != e2.
166
167 error incomingToEntry(Transition t, Entry e) <->
168 target(t, e).
169
170 error noOutgoingTransitionFromEntry(Entry e) <->
171 !source(_, e).
172
173 error multipleTransitionFromEntry(Entry e, Transition t1, Transition t2) <->
174 outgoingTransition(e, t1),
175 outgoingTransition(e, t2),
176 t1 != t2.
177
178 /////////
179 // Exit
180 /////////
181
182 error outgoingFromExit(Transition t, Exit e) <->
183 source(t, e).
184
185 /////////
186 // Final
187 /////////
188
189 error outgoingFromFinal(Transition t, FinalState e) <->
190 source(t, e).
191
192 /////////
193 // State vs Region
194 /////////
195
196 pred stateInRegion(Region r, State s) <->
197 vertices(r, s).
198
199 error noStateInRegion(Region r) <->
200 !stateInRegion(r, _).
201
202 /////////
203 // Choice
204 /////////
205
206 error choiceHasNoOutgoing(Choice c) <->
207 !source(_, c).
208
209 error choiceHasNoIncoming(Choice c) <->
210 !target(_, c).
211
212 scope node = 200..210, Region = 10..*, Choice = 1..*, Statechart = 1.
213 """);
214 assertThat(parsedProblem.errors(), empty());
215 var problem = parsedProblem.problem();
216
217 var storeBuilder = ModelStore.builder()
218 .with(ViatraModelQueryAdapter.builder())
219// .with(ModelVisualizerAdapter.builder()
220// .withOutputPath("test_output")
221// .withFormat(FileFormat.DOT)
222// .withFormat(FileFormat.SVG)
223// .saveStates()
224// .saveDesignSpace())
225 .with(PropagationAdapter.builder())
226 .with(StateCoderAdapter.builder())
227 .with(DesignSpaceExplorationAdapter.builder())
228 .with(ReasoningAdapter.builder());
229
230 var modelSeed = modelInitializer.createModel(problem, storeBuilder);
231
232 var store = storeBuilder.build();
233
234 var initialModel = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
235
236 var initialVersion = initialModel.commit();
237
238 var bestFirst = new BestFirstStoreManager(store, 1);
239 bestFirst.startExploration(initialVersion);
240 var resultStore = bestFirst.getSolutionStore();
241 System.out.println("states size: " + resultStore.getSolutions().size());
242
243 var model = store.createModelForState(resultStore.getSolutions().get(0).version());
244 var interpretation = model.getAdapter(ReasoningAdapter.class)
245 .getPartialInterpretation(Concreteness.CANDIDATE, ReasoningAdapter.EXISTS_SYMBOL);
246 var cursor = interpretation.getAll();
247 int max = -1;
248 var types = new LinkedHashMap<PartialRelation, Integer>();
249 var typeInterpretation = model.getInterpretation(TypeHierarchyTranslator.TYPE_SYMBOL);
250 while (cursor.move()) {
251 max = Math.max(max, cursor.getKey().get(0));
252 var type = typeInterpretation.get(cursor.getKey());
253 if (type != null) {
254 types.compute(type.candidateType(), (ignoredKey, oldValue) -> oldValue == null ? 1 : oldValue + 1);
255 }
256 }
257 System.out.println("Model size: " + (max + 1));
258 System.out.println(types);
259// initialModel.getAdapter(ModelVisualizerAdapter.class).visualize(bestFirst.getVisualizationStore());
260 }
261
262 @Test
263 void filesystemTest() {
264 var parsedProblem = parseHelper.parse("""
265 class Filesystem {
266 contains Entry root
267 }
268
269 abstract class Entry.
270
271 class Directory extends Entry {
272 contains Entry[] entries
273 }
274
275 class File extends Entry.
276
277 Filesystem(fs).
278
279 scope Filesystem += 0, Entry = 100.
280 """);
281 assertThat(parsedProblem.errors(), empty());
282 var problem = parsedProblem.problem();
283
284 var storeBuilder = ModelStore.builder()
285 .with(ViatraModelQueryAdapter.builder())
286// .with(ModelVisualizerAdapter.builder()
287// .withOutputPath("test_output")
288// .withFormat(FileFormat.DOT)
289// .withFormat(FileFormat.SVG)
290// .saveStates()
291// .saveDesignSpace())
292 .with(PropagationAdapter.builder())
293 .with(StateCoderAdapter.builder())
294 .with(DesignSpaceExplorationAdapter.builder())
295 .with(ReasoningAdapter.builder());
296
297 var modelSeed = modelInitializer.createModel(problem, storeBuilder);
298
299 var store = storeBuilder.build();
300
301 var initialModel = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
302
303 var initialVersion = initialModel.commit();
304
305 var bestFirst = new BestFirstStoreManager(store, 1);
306 bestFirst.startExploration(initialVersion);
307 var resultStore = bestFirst.getSolutionStore();
308 System.out.println("states size: " + resultStore.getSolutions().size());
309
310 var model = store.createModelForState(resultStore.getSolutions().get(0).version());
311 var interpretation = model.getAdapter(ReasoningAdapter.class)
312 .getPartialInterpretation(Concreteness.CANDIDATE, ReasoningAdapter.EXISTS_SYMBOL);
313 var cursor = interpretation.getAll();
314 int max = -1;
315 var types = new LinkedHashMap<PartialRelation, Integer>();
316 var typeInterpretation = model.getInterpretation(TypeHierarchyTranslator.TYPE_SYMBOL);
317 while (cursor.move()) {
318 max = Math.max(max, cursor.getKey().get(0));
319 var type = typeInterpretation.get(cursor.getKey());
320 if (type != null) {
321 types.compute(type.candidateType(), (ignoredKey, oldValue) -> oldValue == null ? 1 : oldValue + 1);
322 }
323 }
324 System.out.println("Model size: " + (max + 1));
325 System.out.println(types);
326// initialModel.getAdapter(ModelVisualizerAdapter.class).visualize(bestFirst.getVisualizationStore());
327 }
328
329 public static void main(String[] args) {
330 ProblemStandaloneSetup.doSetup();
331 var injector = new ProblemStandaloneSetup().createInjectorAndDoEMFRegistration();
332 var test = injector.getInstance(ModelGenerationTest.class);
333 try {
334 test.statechartTest();
335 } catch (Throwable e) {
336 e.printStackTrace();
337 }
338 }
339}
diff --git a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/tests/DecisionTreeTests.java b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/internal/DecisionTreeTests.java
index b3fcbabb..5d039308 100644
--- a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/tests/DecisionTreeTests.java
+++ b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/model/internal/DecisionTreeTests.java
@@ -3,10 +3,9 @@
3 * 3 *
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6package tools.refinery.language.semantics.model.tests; 6package tools.refinery.language.semantics.model.internal;
7 7
8import org.junit.jupiter.api.Test; 8import org.junit.jupiter.api.Test;
9import tools.refinery.language.semantics.model.internal.DecisionTree;
10import tools.refinery.store.representation.TruthValue; 9import tools.refinery.store.representation.TruthValue;
11import tools.refinery.store.tuple.Tuple; 10import tools.refinery.store.tuple.Tuple;
12 11
@@ -134,6 +133,17 @@ class DecisionTreeTests {
134 } 133 }
135 134
136 @Test 135 @Test
136 void overwriteIterationTest() {
137 var sut = new DecisionTree(1, TruthValue.TRUE);
138 var overwrite = new DecisionTree(1, null);
139 overwrite.mergeValue(Tuple.of(0), TruthValue.UNKNOWN);
140 sut.overwriteValues(overwrite);
141 var map = iterateAll(sut, TruthValue.UNKNOWN, 2);
142 assertThat(map.keySet(), hasSize(1));
143 assertThat(map, hasEntry(Tuple.of(1), TruthValue.TRUE));
144 }
145
146 @Test
137 void overwriteNothingTest() { 147 void overwriteNothingTest() {
138 var sut = new DecisionTree(2, TruthValue.UNKNOWN); 148 var sut = new DecisionTree(2, TruthValue.UNKNOWN);
139 var values = new DecisionTree(2, null); 149 var values = new DecisionTree(2, null);
diff --git a/subprojects/language-web/build.gradle.kts b/subprojects/language-web/build.gradle.kts
index 562a1bd9..88dccdf3 100644
--- a/subprojects/language-web/build.gradle.kts
+++ b/subprojects/language-web/build.gradle.kts
@@ -17,6 +17,10 @@ val webapp: Configuration by configurations.creating {
17dependencies { 17dependencies {
18 implementation(project(":refinery-language")) 18 implementation(project(":refinery-language"))
19 implementation(project(":refinery-language-ide")) 19 implementation(project(":refinery-language-ide"))
20 implementation(project(":refinery-language-semantics"))
21 implementation(project(":refinery-store-query-viatra"))
22 implementation(project(":refinery-store-reasoning-scope"))
23 implementation(libs.gson)
20 implementation(libs.jetty.server) 24 implementation(libs.jetty.server)
21 implementation(libs.jetty.servlet) 25 implementation(libs.jetty.servlet)
22 implementation(libs.jetty.websocket.api) 26 implementation(libs.jetty.websocket.api)
@@ -60,9 +64,18 @@ tasks {
60 classpath(mainRuntimeClasspath) 64 classpath(mainRuntimeClasspath)
61 mainClass.set(application.mainClass) 65 mainClass.set(application.mainClass)
62 standardInput = System.`in` 66 standardInput = System.`in`
63 val baseResource = webapp.incoming.artifacts.artifactFiles.first() 67 environment("REFINERY_BASE_RESOURCE", webapp.singleFile)
64 environment("BASE_RESOURCE", baseResource)
65 group = "run" 68 group = "run"
66 description = "Start a Jetty web server serving the Xtex API and assets." 69 description = "Start a Jetty web server serving the Xtext API and assets."
70 }
71
72 register<JavaExec>("serveBackendOnly") {
73 val mainRuntimeClasspath = sourceSets.main.map { it.runtimeClasspath }
74 dependsOn(mainRuntimeClasspath)
75 classpath(mainRuntimeClasspath)
76 mainClass.set(application.mainClass)
77 standardInput = System.`in`
78 group = "run"
79 description = "Start a Jetty web server serving the Xtext API without assets."
67 } 80 }
68} 81}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java
index b0197c01..6a6e0107 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java
@@ -9,11 +9,13 @@
9 */ 9 */
10package tools.refinery.language.web; 10package tools.refinery.language.web;
11 11
12import org.eclipse.xtext.ide.ExecutorServiceProvider;
12import org.eclipse.xtext.web.server.XtextServiceDispatcher; 13import org.eclipse.xtext.web.server.XtextServiceDispatcher;
13import org.eclipse.xtext.web.server.model.IWebDocumentProvider; 14import org.eclipse.xtext.web.server.model.IWebDocumentProvider;
14import org.eclipse.xtext.web.server.model.XtextWebDocumentAccess; 15import org.eclipse.xtext.web.server.model.XtextWebDocumentAccess;
15import org.eclipse.xtext.web.server.occurrences.OccurrencesService; 16import org.eclipse.xtext.web.server.occurrences.OccurrencesService;
16import tools.refinery.language.web.occurrences.ProblemOccurrencesService; 17import tools.refinery.language.web.occurrences.ProblemOccurrencesService;
18import tools.refinery.language.web.xtext.server.ThreadPoolExecutorServiceProvider;
17import tools.refinery.language.web.xtext.server.push.PushServiceDispatcher; 19import tools.refinery.language.web.xtext.server.push.PushServiceDispatcher;
18import tools.refinery.language.web.xtext.server.push.PushWebDocumentAccess; 20import tools.refinery.language.web.xtext.server.push.PushWebDocumentAccess;
19import tools.refinery.language.web.xtext.server.push.PushWebDocumentProvider; 21import tools.refinery.language.web.xtext.server.push.PushWebDocumentProvider;
@@ -37,4 +39,8 @@ public class ProblemWebModule extends AbstractProblemWebModule {
37 public Class<? extends OccurrencesService> bindOccurrencesService() { 39 public Class<? extends OccurrencesService> bindOccurrencesService() {
38 return ProblemOccurrencesService.class; 40 return ProblemOccurrencesService.class;
39 } 41 }
42
43 public Class<? extends ExecutorServiceProvider> bindExecutorServiceProvider() {
44 return ThreadPoolExecutorServiceProvider.class;
45 }
40} 46}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebSocketServlet.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebSocketServlet.java
index 7b48cde8..e98d115e 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebSocketServlet.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/ProblemWebSocketServlet.java
@@ -10,8 +10,10 @@ import org.eclipse.xtext.util.DisposableRegistry;
10import jakarta.servlet.ServletException; 10import jakarta.servlet.ServletException;
11import tools.refinery.language.web.xtext.servlet.XtextWebSocketServlet; 11import tools.refinery.language.web.xtext.servlet.XtextWebSocketServlet;
12 12
13public class ProblemWebSocketServlet extends XtextWebSocketServlet { 13import java.io.Serial;
14 14
15public class ProblemWebSocketServlet extends XtextWebSocketServlet {
16 @Serial
15 private static final long serialVersionUID = -7040955470384797008L; 17 private static final long serialVersionUID = -7040955470384797008L;
16 18
17 private transient DisposableRegistry disposableRegistry; 19 private transient DisposableRegistry disposableRegistry;
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/SecurityHeadersFilter.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/SecurityHeadersFilter.java
index 7b094fde..fab94689 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/SecurityHeadersFilter.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/SecurityHeadersFilter.java
@@ -16,7 +16,7 @@ public class SecurityHeadersFilter implements Filter {
16 ServletException { 16 ServletException {
17 if (response instanceof HttpServletResponse httpResponse) { 17 if (response instanceof HttpServletResponse httpResponse) {
18 httpResponse.setHeader("Content-Security-Policy", "default-src 'none'; " + 18 httpResponse.setHeader("Content-Security-Policy", "default-src 'none'; " +
19 "script-src 'self'; " + 19 "script-src 'self' 'wasm-unsafe-eval'; " +
20 // CodeMirror needs inline styles, see e.g., 20 // CodeMirror needs inline styles, see e.g.,
21 // https://discuss.codemirror.net/t/inline-styles-and-content-security-policy/1311/2 21 // https://discuss.codemirror.net/t/inline-styles-and-content-security-policy/1311/2
22 "style-src 'self' 'unsafe-inline'; " + 22 "style-src 'self' 'unsafe-inline'; " +
@@ -25,7 +25,7 @@ public class SecurityHeadersFilter implements Filter {
25 "font-src 'self'; " + 25 "font-src 'self'; " +
26 "connect-src 'self'; " + 26 "connect-src 'self'; " +
27 "manifest-src 'self'; " + 27 "manifest-src 'self'; " +
28 "worker-src 'self';"); 28 "worker-src 'self' blob:;");
29 httpResponse.setHeader("X-Content-Type-Options", "nosniff"); 29 httpResponse.setHeader("X-Content-Type-Options", "nosniff");
30 httpResponse.setHeader("X-Frame-Options", "DENY"); 30 httpResponse.setHeader("X-Frame-Options", "DENY");
31 httpResponse.setHeader("Referrer-Policy", "strict-origin"); 31 httpResponse.setHeader("Referrer-Policy", "strict-origin");
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/ServerLauncher.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/ServerLauncher.java
index ad19e77d..155efc6f 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/ServerLauncher.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/ServerLauncher.java
@@ -33,7 +33,7 @@ import java.util.EnumSet;
33import java.util.Set; 33import java.util.Set;
34 34
35public class ServerLauncher { 35public class ServerLauncher {
36 public static final String DEFAULT_LISTEN_ADDRESS = "localhost"; 36 public static final String DEFAULT_LISTEN_HOST = "localhost";
37 37
38 public static final int DEFAULT_LISTEN_PORT = 1312; 38 public static final int DEFAULT_LISTEN_PORT = 1312;
39 39
@@ -105,7 +105,7 @@ public class ServerLauncher {
105 105
106 private Resource getBaseResource() { 106 private Resource getBaseResource() {
107 var factory = ResourceFactory.of(server); 107 var factory = ResourceFactory.of(server);
108 var baseResourceOverride = System.getenv("BASE_RESOURCE"); 108 var baseResourceOverride = System.getenv("REFINERY_BASE_RESOURCE");
109 if (baseResourceOverride != null) { 109 if (baseResourceOverride != null) {
110 // If a user override is provided, use it. 110 // If a user override is provided, use it.
111 return factory.newResource(baseResourceOverride); 111 return factory.newResource(baseResourceOverride);
@@ -115,7 +115,10 @@ public class ServerLauncher {
115 // If the app is packaged in the jar, serve it. 115 // If the app is packaged in the jar, serve it.
116 URI webRootUri; 116 URI webRootUri;
117 try { 117 try {
118 webRootUri = URI.create(indexUrlInJar.toURI().toASCIIString().replaceFirst("/index.html$", "/")); 118 webRootUri = URI.create(indexUrlInJar.toURI().toASCIIString()
119 .replaceFirst("/index.html$", "/")
120 // Enable running without warnings from a jar.
121 .replaceFirst("^jar:file:", "jar:file://"));
119 } catch (URISyntaxException e) { 122 } catch (URISyntaxException e) {
120 throw new IllegalStateException("Jar has invalid base resource URI", e); 123 throw new IllegalStateException("Jar has invalid base resource URI", e);
121 } 124 }
@@ -152,17 +155,17 @@ public class ServerLauncher {
152 } 155 }
153 156
154 private static String getListenAddress() { 157 private static String getListenAddress() {
155 var listenAddress = System.getenv("LISTEN_ADDRESS"); 158 var listenAddress = System.getenv("REFINERY_LISTEN_HOST");
156 if (listenAddress == null) { 159 if (listenAddress == null) {
157 return DEFAULT_LISTEN_ADDRESS; 160 return DEFAULT_LISTEN_HOST;
158 } 161 }
159 return listenAddress; 162 return listenAddress;
160 } 163 }
161 164
162 private static int getListenPort() { 165 private static int getListenPort() {
163 var portStr = System.getenv("LISTEN_PORT"); 166 var portStr = System.getenv("REFINERY_LISTEN_PORT");
164 if (portStr != null) { 167 if (portStr != null) {
165 return Integer.parseInt(portStr); 168 return Integer.parseUnsignedInt(portStr);
166 } 169 }
167 return DEFAULT_LISTEN_PORT; 170 return DEFAULT_LISTEN_PORT;
168 } 171 }
@@ -174,7 +177,7 @@ public class ServerLauncher {
174 } 177 }
175 178
176 private static String getPublicHost() { 179 private static String getPublicHost() {
177 var publicHost = System.getenv("PUBLIC_HOST"); 180 var publicHost = System.getenv("REFINERY_PUBLIC_HOST");
178 if (publicHost != null) { 181 if (publicHost != null) {
179 return publicHost.toLowerCase(); 182 return publicHost.toLowerCase();
180 } 183 }
@@ -182,15 +185,15 @@ public class ServerLauncher {
182 } 185 }
183 186
184 private static int getPublicPort() { 187 private static int getPublicPort() {
185 var portStr = System.getenv("PUBLIC_PORT"); 188 var portStr = System.getenv("REFINERY_PUBLIC_PORT");
186 if (portStr != null) { 189 if (portStr != null) {
187 return Integer.parseInt(portStr); 190 return Integer.parseUnsignedInt(portStr);
188 } 191 }
189 return DEFAULT_PUBLIC_PORT; 192 return DEFAULT_PUBLIC_PORT;
190 } 193 }
191 194
192 private static String[] getAllowedOrigins() { 195 private static String[] getAllowedOrigins() {
193 var allowedOrigins = System.getenv("ALLOWED_ORIGINS"); 196 var allowedOrigins = System.getenv("REFINERY_ALLOWED_ORIGINS");
194 if (allowedOrigins != null) { 197 if (allowedOrigins != null) {
195 return allowedOrigins.split(ALLOWED_ORIGINS_SEPARATOR); 198 return allowedOrigins.split(ALLOWED_ORIGINS_SEPARATOR);
196 } 199 }
@@ -219,12 +222,10 @@ public class ServerLauncher {
219 int port; 222 int port;
220 var publicHost = getPublicHost(); 223 var publicHost = getPublicHost();
221 if (publicHost == null) { 224 if (publicHost == null) {
222 host = getListenAddress(); 225 return null;
223 port = getListenPort();
224 } else {
225 host = publicHost;
226 port = getPublicPort();
227 } 226 }
227 host = publicHost;
228 port = getPublicPort();
228 var scheme = port == HTTPS_DEFAULT_PORT ? "wss" : "ws"; 229 var scheme = port == HTTPS_DEFAULT_PORT ? "wss" : "ws";
229 return String.format("%s://%s:%d/xtext-service", scheme, host, port); 230 return String.format("%s://%s:%d/xtext-service", scheme, host, port);
230 } 231 }
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/config/BackendConfigServlet.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/config/BackendConfigServlet.java
index a2f04e34..7d0a5122 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/config/BackendConfigServlet.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/config/BackendConfigServlet.java
@@ -25,9 +25,6 @@ public class BackendConfigServlet extends HttpServlet {
25 public void init(ServletConfig config) throws ServletException { 25 public void init(ServletConfig config) throws ServletException {
26 super.init(config); 26 super.init(config);
27 var webSocketUrl = config.getInitParameter(WEBSOCKET_URL_INIT_PARAM); 27 var webSocketUrl = config.getInitParameter(WEBSOCKET_URL_INIT_PARAM);
28 if (webSocketUrl == null) {
29 throw new IllegalArgumentException("Init parameter " + WEBSOCKET_URL_INIT_PARAM + " is mandatory");
30 }
31 var backendConfig = new BackendConfig(webSocketUrl); 28 var backendConfig = new BackendConfig(webSocketUrl);
32 var gson = new Gson(); 29 var gson = new Gson();
33 serializedConfig = gson.toJson(backendConfig); 30 serializedConfig = gson.toJson(backendConfig);
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationCancelledResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationCancelledResult.java
new file mode 100644
index 00000000..fc06fd2e
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationCancelledResult.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import org.eclipse.xtext.web.server.IServiceResult;
9
10public record ModelGenerationCancelledResult() implements IServiceResult {
11}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationErrorResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationErrorResult.java
new file mode 100644
index 00000000..bedaeb35
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationErrorResult.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import java.util.UUID;
9
10public record ModelGenerationErrorResult(UUID uuid, String error) implements ModelGenerationResult {
11}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationManager.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationManager.java
new file mode 100644
index 00000000..b0a1912c
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationManager.java
@@ -0,0 +1,41 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import org.eclipse.xtext.util.CancelIndicator;
9
10public class ModelGenerationManager {
11 private final Object lockObject = new Object();
12 private ModelGenerationWorker worker;
13 private boolean disposed;
14
15 boolean setActiveModelGenerationWorker(ModelGenerationWorker worker, CancelIndicator cancelIndicator) {
16 synchronized (lockObject) {
17 cancel();
18 if (disposed || cancelIndicator.isCanceled()) {
19 return true;
20 }
21 this.worker = worker;
22 }
23 return false;
24 }
25
26 public void cancel() {
27 synchronized (lockObject) {
28 if (worker != null) {
29 worker.cancel();
30 worker = null;
31 }
32 }
33 }
34
35 public void dispose() {
36 synchronized (lockObject) {
37 disposed = true;
38 cancel();
39 }
40 }
41}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationResult.java
new file mode 100644
index 00000000..cf06f447
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationResult.java
@@ -0,0 +1,15 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import org.eclipse.xtext.web.server.IServiceResult;
9
10import java.util.UUID;
11
12public sealed interface ModelGenerationResult extends IServiceResult permits ModelGenerationSuccessResult,
13 ModelGenerationErrorResult, ModelGenerationStatusResult {
14 UUID uuid();
15}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationService.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationService.java
new file mode 100644
index 00000000..9f72e462
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationService.java
@@ -0,0 +1,60 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import com.google.inject.Inject;
9import com.google.inject.Provider;
10import com.google.inject.Singleton;
11import org.eclipse.xtext.service.OperationCanceledManager;
12import org.eclipse.xtext.util.CancelIndicator;
13import org.eclipse.xtext.util.concurrent.CancelableUnitOfWork;
14import org.eclipse.xtext.web.server.model.IXtextWebDocument;
15import tools.refinery.language.web.semantics.SemanticsService;
16import tools.refinery.language.web.xtext.server.push.PushWebDocument;
17import tools.refinery.language.web.xtext.server.push.PushWebDocumentAccess;
18
19@Singleton
20public class ModelGenerationService {
21 public static final String SERVICE_NAME = "modelGeneration";
22 public static final String MODEL_GENERATION_EXECUTOR = "modelGeneration";
23 public static final String MODEL_GENERATION_TIMEOUT_EXECUTOR = "modelGenerationTimeout";
24
25 @Inject
26 private OperationCanceledManager operationCanceledManager;
27
28 @Inject
29 private Provider<ModelGenerationWorker> workerProvider;
30
31 private final long timeoutSec;
32
33 public ModelGenerationService() {
34 timeoutSec = SemanticsService.getTimeout("REFINERY_MODEL_GENERATION_TIMEOUT_SEC").orElse(600L);
35 }
36
37 public ModelGenerationStartedResult generateModel(PushWebDocumentAccess document, int randomSeed) {
38 return document.modify(new CancelableUnitOfWork<>() {
39 @Override
40 public ModelGenerationStartedResult exec(IXtextWebDocument state, CancelIndicator cancelIndicator) {
41 var pushState = (PushWebDocument) state;
42 var worker = workerProvider.get();
43 worker.setState(pushState, randomSeed, timeoutSec);
44 var manager = pushState.getModelGenerationManager();
45 worker.start();
46 boolean canceled = manager.setActiveModelGenerationWorker(worker, cancelIndicator);
47 if (canceled) {
48 worker.cancel();
49 operationCanceledManager.throwOperationCanceledException();
50 }
51 return new ModelGenerationStartedResult(worker.getUuid());
52 }
53 });
54 }
55
56 public ModelGenerationCancelledResult cancelModelGeneration(PushWebDocumentAccess document) {
57 document.cancelModelGeneration();
58 return new ModelGenerationCancelledResult();
59 }
60}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStartedResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStartedResult.java
new file mode 100644
index 00000000..8c0e73c7
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStartedResult.java
@@ -0,0 +1,13 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import org.eclipse.xtext.web.server.IServiceResult;
9
10import java.util.UUID;
11
12public record ModelGenerationStartedResult(UUID uuid) implements IServiceResult {
13}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStatusResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStatusResult.java
new file mode 100644
index 00000000..a6589870
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationStatusResult.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import java.util.UUID;
9
10public record ModelGenerationStatusResult(UUID uuid, String status) implements ModelGenerationResult {
11}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationSuccessResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationSuccessResult.java
new file mode 100644
index 00000000..21be4e08
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationSuccessResult.java
@@ -0,0 +1,17 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import com.google.gson.JsonObject;
9import tools.refinery.language.semantics.metadata.NodeMetadata;
10import tools.refinery.language.semantics.metadata.RelationMetadata;
11
12import java.util.List;
13import java.util.UUID;
14
15public record ModelGenerationSuccessResult(UUID uuid, List<NodeMetadata> nodes, List<RelationMetadata> relations,
16 JsonObject partialInterpretation) implements ModelGenerationResult {
17}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationWorker.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationWorker.java
new file mode 100644
index 00000000..9ee74207
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/generator/ModelGenerationWorker.java
@@ -0,0 +1,233 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.generator;
7
8import com.google.inject.Inject;
9import com.google.inject.Provider;
10import org.eclipse.emf.common.util.URI;
11import org.eclipse.xtext.diagnostics.Severity;
12import org.eclipse.xtext.resource.IResourceFactory;
13import org.eclipse.xtext.resource.XtextResourceSet;
14import org.eclipse.xtext.service.OperationCanceledManager;
15import org.eclipse.xtext.util.LazyStringInputStream;
16import org.eclipse.xtext.validation.CheckMode;
17import org.eclipse.xtext.validation.IResourceValidator;
18import org.slf4j.Logger;
19import org.slf4j.LoggerFactory;
20import tools.refinery.language.model.problem.Problem;
21import tools.refinery.language.semantics.metadata.MetadataCreator;
22import tools.refinery.language.semantics.model.ModelInitializer;
23import tools.refinery.language.web.semantics.PartialInterpretation2Json;
24import tools.refinery.language.web.xtext.server.ThreadPoolExecutorServiceProvider;
25import tools.refinery.language.web.xtext.server.push.PushWebDocument;
26import tools.refinery.store.dse.propagation.PropagationAdapter;
27import tools.refinery.store.dse.strategy.BestFirstStoreManager;
28import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter;
29import tools.refinery.store.model.ModelStore;
30import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
31import tools.refinery.store.reasoning.ReasoningAdapter;
32import tools.refinery.store.reasoning.ReasoningStoreAdapter;
33import tools.refinery.store.reasoning.literal.Concreteness;
34import tools.refinery.store.statecoding.StateCoderAdapter;
35import tools.refinery.store.util.CancellationToken;
36
37import java.io.IOException;
38import java.util.Map;
39import java.util.UUID;
40import java.util.concurrent.*;
41
42public class ModelGenerationWorker implements Runnable {
43 private static final Logger LOG = LoggerFactory.getLogger(ModelGenerationWorker.class);
44
45 private final UUID uuid = UUID.randomUUID();
46
47 private PushWebDocument state;
48
49 private String text;
50
51 private volatile boolean timedOut;
52
53 private volatile boolean cancelled;
54
55 @Inject
56 private OperationCanceledManager operationCanceledManager;
57
58 @Inject
59 private Provider<XtextResourceSet> resourceSetProvider;
60
61 @Inject
62 private IResourceFactory resourceFactory;
63
64 @Inject
65 private IResourceValidator resourceValidator;
66
67 @Inject
68 private ModelInitializer initializer;
69
70 @Inject
71 private MetadataCreator metadataCreator;
72
73 @Inject
74 private PartialInterpretation2Json partialInterpretation2Json;
75
76 private final Object lockObject = new Object();
77
78 private ExecutorService executorService;
79
80 private ScheduledExecutorService scheduledExecutorService;
81
82 private int randomSeed;
83
84 private long timeoutSec;
85
86 private Future<?> future;
87
88 private ScheduledFuture<?> timeoutFuture;
89
90 private final CancellationToken cancellationToken = () -> {
91 if (cancelled || Thread.interrupted()) {
92 operationCanceledManager.throwOperationCanceledException();
93 }
94 };
95
96 @Inject
97 public void setExecutorServiceProvider(ThreadPoolExecutorServiceProvider provider) {
98 executorService = provider.get(ModelGenerationService.MODEL_GENERATION_EXECUTOR);
99 scheduledExecutorService = provider.getScheduled(ModelGenerationService.MODEL_GENERATION_TIMEOUT_EXECUTOR);
100 }
101
102 public void setState(PushWebDocument state, int randomSeed, long timeoutSec) {
103 this.state = state;
104 this.randomSeed = randomSeed;
105 this.timeoutSec = timeoutSec;
106 text = state.getText();
107 }
108
109 public UUID getUuid() {
110 return uuid;
111 }
112
113 public void start() {
114 synchronized (lockObject) {
115 LOG.debug("Enqueueing model generation: {}", uuid);
116 future = executorService.submit(this);
117 }
118 }
119
120 public void startTimeout() {
121 synchronized (lockObject) {
122 LOG.debug("Starting model generation: {}", uuid);
123 cancellationToken.checkCancelled();
124 timeoutFuture = scheduledExecutorService.schedule(() -> cancel(true), timeoutSec, TimeUnit.SECONDS);
125 }
126 }
127
128 // We catch {@code Throwable} to handle {@code OperationCancelledError}, but we rethrow fatal JVM errors.
129 @SuppressWarnings("squid:S1181")
130 @Override
131 public void run() {
132 startTimeout();
133 notifyResult(new ModelGenerationStatusResult(uuid, "Initializing model generator"));
134 ModelGenerationResult result;
135 try {
136 result = doRun();
137 } catch (Throwable e) {
138 if (operationCanceledManager.isOperationCanceledException(e)) {
139 var message = timedOut ? "Model generation timed out" : "Model generation cancelled";
140 LOG.debug("{}: {}", message, uuid);
141 notifyResult(new ModelGenerationErrorResult(uuid, message));
142 } else if (e instanceof Error error) {
143 // Make sure we don't try to recover from any fatal JVM errors.
144 throw error;
145 } else {
146 LOG.debug("Model generation error", e);
147 notifyResult(new ModelGenerationErrorResult(uuid, e.toString()));
148 }
149 return;
150 }
151 notifyResult(result);
152 }
153
154 private void notifyResult(ModelGenerationResult result) {
155 state.notifyPrecomputationListeners(ModelGenerationService.SERVICE_NAME, result);
156 }
157
158 public ModelGenerationResult doRun() throws IOException {
159 cancellationToken.checkCancelled();
160 var resourceSet = resourceSetProvider.get();
161 var uri = URI.createURI("__synthetic_" + uuid + ".problem");
162 var resource = resourceFactory.createResource(uri);
163 resourceSet.getResources().add(resource);
164 var inputStream = new LazyStringInputStream(text);
165 resource.load(inputStream, Map.of());
166 cancellationToken.checkCancelled();
167 var issues = resourceValidator.validate(resource, CheckMode.ALL, () -> cancelled || Thread.interrupted());
168 cancellationToken.checkCancelled();
169 for (var issue : issues) {
170 if (issue.getSeverity() == Severity.ERROR) {
171 return new ModelGenerationErrorResult(uuid, "Validation error: " + issue.getMessage());
172 }
173 }
174 if (resource.getContents().isEmpty() || !(resource.getContents().get(0) instanceof Problem problem)) {
175 return new ModelGenerationErrorResult(uuid, "Model generation problem not found");
176 }
177 cancellationToken.checkCancelled();
178 var storeBuilder = ModelStore.builder()
179 .cancellationToken(cancellationToken)
180 .with(ViatraModelQueryAdapter.builder())
181 .with(PropagationAdapter.builder())
182 .with(StateCoderAdapter.builder())
183 .with(DesignSpaceExplorationAdapter.builder())
184 .with(ReasoningAdapter.builder()
185 .requiredInterpretations(Concreteness.CANDIDATE));
186 var modelSeed = initializer.createModel(problem, storeBuilder);
187 var store = storeBuilder.build();
188 cancellationToken.checkCancelled();
189 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
190 var initialVersion = model.commit();
191 cancellationToken.checkCancelled();
192 notifyResult(new ModelGenerationStatusResult(uuid, "Generating model"));
193 var bestFirst = new BestFirstStoreManager(store, 1);
194 bestFirst.startExploration(initialVersion, randomSeed);
195 cancellationToken.checkCancelled();
196 var solutionStore = bestFirst.getSolutionStore();
197 if (solutionStore.getSolutions().isEmpty()) {
198 return new ModelGenerationErrorResult(uuid, "Problem is unsatisfiable");
199 }
200 notifyResult(new ModelGenerationStatusResult(uuid, "Saving generated model"));
201 model.restore(solutionStore.getSolutions().get(0).version());
202 cancellationToken.checkCancelled();
203 metadataCreator.setInitializer(initializer);
204 var nodesMetadata = metadataCreator.getNodesMetadata(model.getAdapter(ReasoningAdapter.class).getNodeCount(),
205 false);
206 cancellationToken.checkCancelled();
207 var relationsMetadata = metadataCreator.getRelationsMetadata();
208 cancellationToken.checkCancelled();
209 var partialInterpretation = partialInterpretation2Json.getPartialInterpretation(initializer, model,
210 Concreteness.CANDIDATE, cancellationToken);
211 return new ModelGenerationSuccessResult(uuid, nodesMetadata, relationsMetadata, partialInterpretation);
212 }
213
214 public void cancel() {
215 cancel(false);
216 }
217
218 public void cancel(boolean timedOut) {
219 synchronized (lockObject) {
220 LOG.trace("Cancelling model generation: {}", uuid);
221 this.timedOut = timedOut;
222 cancelled = true;
223 if (future != null) {
224 future.cancel(true);
225 future = null;
226 }
227 if (timeoutFuture != null) {
228 timeoutFuture.cancel(true);
229 timeoutFuture = null;
230 }
231 }
232 }
233}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/PartialInterpretation2Json.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/PartialInterpretation2Json.java
new file mode 100644
index 00000000..5d5da8fe
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/PartialInterpretation2Json.java
@@ -0,0 +1,81 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.semantics;
7
8import com.google.gson.JsonArray;
9import com.google.gson.JsonObject;
10import com.google.inject.Inject;
11import com.google.inject.Singleton;
12import tools.refinery.language.semantics.model.ModelInitializer;
13import tools.refinery.language.semantics.model.SemanticsUtils;
14import tools.refinery.store.map.Cursor;
15import tools.refinery.store.model.Model;
16import tools.refinery.store.reasoning.ReasoningAdapter;
17import tools.refinery.store.reasoning.literal.Concreteness;
18import tools.refinery.store.reasoning.representation.PartialRelation;
19import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
20import tools.refinery.store.tuple.Tuple;
21import tools.refinery.store.util.CancellationToken;
22
23import java.util.TreeMap;
24
25@Singleton
26public class PartialInterpretation2Json {
27 @Inject
28 private SemanticsUtils semanticsUtils;
29
30 public JsonObject getPartialInterpretation(ModelInitializer initializer, Model model, Concreteness concreteness,
31 CancellationToken cancellationToken) {
32 var adapter = model.getAdapter(ReasoningAdapter.class);
33 var json = new JsonObject();
34 for (var entry : initializer.getRelationTrace().entrySet()) {
35 var relation = entry.getKey();
36 var partialSymbol = entry.getValue();
37 var tuples = getTuplesJson(adapter, concreteness, partialSymbol);
38 var name = semanticsUtils.getName(relation).orElse(partialSymbol.name());
39 json.add(name, tuples);
40 cancellationToken.checkCancelled();
41 }
42 json.add("builtin::count", getCountJson(model));
43 return json;
44 }
45
46 private static JsonArray getTuplesJson(ReasoningAdapter adapter, Concreteness concreteness,
47 PartialRelation partialSymbol) {
48 var interpretation = adapter.getPartialInterpretation(concreteness, partialSymbol);
49 var cursor = interpretation.getAll();
50 return getTuplesJson(cursor);
51 }
52
53 private static JsonArray getTuplesJson(Cursor<Tuple, ?> cursor) {
54 var map = new TreeMap<Tuple, Object>();
55 while (cursor.move()) {
56 map.put(cursor.getKey(), cursor.getValue());
57 }
58 var tuples = new JsonArray();
59 for (var entry : map.entrySet()) {
60 tuples.add(toArray(entry.getKey(), entry.getValue()));
61 }
62 return tuples;
63 }
64
65 private static JsonArray toArray(Tuple tuple, Object value) {
66 int arity = tuple.getSize();
67 var json = new JsonArray(arity + 1);
68 for (int i = 0; i < arity; i++) {
69 json.add(tuple.get(i));
70 }
71 json.add(value.toString());
72 return json;
73 }
74
75 private static JsonArray getCountJson(Model model) {
76 var interpretation = model.getInterpretation(MultiObjectTranslator.COUNT_STORAGE);
77 var cursor = interpretation.getAll();
78 return getTuplesJson(cursor);
79
80 }
81}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsInternalErrorResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsInternalErrorResult.java
new file mode 100644
index 00000000..ff592e93
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsInternalErrorResult.java
@@ -0,0 +1,9 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.semantics;
7
8public record SemanticsInternalErrorResult(String error) implements SemanticsResult {
9}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsIssuesResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsIssuesResult.java
new file mode 100644
index 00000000..644bd179
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsIssuesResult.java
@@ -0,0 +1,13 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.semantics;
7
8import org.eclipse.xtext.web.server.validation.ValidationResult;
9
10import java.util.List;
11
12public record SemanticsIssuesResult(List<ValidationResult.Issue> issues) implements SemanticsResult {
13}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsResult.java
new file mode 100644
index 00000000..a2e19a2f
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsResult.java
@@ -0,0 +1,12 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.semantics;
7
8import org.eclipse.xtext.web.server.IServiceResult;
9
10public sealed interface SemanticsResult extends IServiceResult permits SemanticsSuccessResult,
11 SemanticsInternalErrorResult, SemanticsIssuesResult {
12}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java
new file mode 100644
index 00000000..331ef84b
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsService.java
@@ -0,0 +1,142 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.semantics;
7
8import com.google.gson.JsonObject;
9import com.google.inject.Inject;
10import com.google.inject.Provider;
11import com.google.inject.Singleton;
12import org.eclipse.xtext.ide.ExecutorServiceProvider;
13import org.eclipse.xtext.service.OperationCanceledManager;
14import org.eclipse.xtext.util.CancelIndicator;
15import org.eclipse.xtext.web.server.model.AbstractCachedService;
16import org.eclipse.xtext.web.server.model.IXtextWebDocument;
17import org.eclipse.xtext.web.server.validation.ValidationService;
18import org.jetbrains.annotations.Nullable;
19import org.slf4j.Logger;
20import org.slf4j.LoggerFactory;
21import tools.refinery.language.model.problem.Problem;
22import tools.refinery.language.web.xtext.server.push.PushWebDocument;
23
24import java.util.List;
25import java.util.Optional;
26import java.util.concurrent.*;
27import java.util.concurrent.atomic.AtomicBoolean;
28
29@Singleton
30public class SemanticsService extends AbstractCachedService<SemanticsResult> {
31 public static final String SEMANTICS_EXECUTOR = "semantics";
32
33 private static final Logger LOG = LoggerFactory.getLogger(SemanticsService.class);
34
35 @Inject
36 private Provider<SemanticsWorker> workerProvider;
37
38 @Inject
39 private OperationCanceledManager operationCanceledManager;
40
41 @Inject
42 private ValidationService validationService;
43
44 private ExecutorService executorService;
45
46 private final long timeoutMs;
47
48 private final long warmupTimeoutMs;
49
50 private final AtomicBoolean warmedUp = new AtomicBoolean(false);
51
52 public SemanticsService() {
53 timeoutMs = getTimeout("REFINERY_SEMANTICS_TIMEOUT_MS").orElse(1000L);
54 warmupTimeoutMs = getTimeout("REFINERY_SEMANTICS_WARMUP_TIMEOUT_MS").orElse(timeoutMs * 2);
55 }
56
57 public static Optional<Long> getTimeout(String name) {
58 return Optional.ofNullable(System.getenv(name)).map(Long::parseUnsignedLong);
59 }
60
61 @Inject
62 public void setExecutorServiceProvider(ExecutorServiceProvider provider) {
63 executorService = provider.get(SEMANTICS_EXECUTOR);
64 }
65
66 @Override
67 public SemanticsResult compute(IXtextWebDocument doc, CancelIndicator cancelIndicator) {
68 long start = 0;
69 if (LOG.isTraceEnabled()) {
70 start = System.currentTimeMillis();
71 }
72 if (hasError(doc, cancelIndicator)) {
73 return null;
74 }
75 var problem = getProblem(doc);
76 if (problem == null) {
77 return new SemanticsSuccessResult(List.of(), List.of(), new JsonObject());
78 }
79 var worker = workerProvider.get();
80 worker.setProblem(problem, cancelIndicator);
81 var future = executorService.submit(worker);
82 boolean warmedUpCurrently = warmedUp.get();
83 long timeout = warmedUpCurrently ? timeoutMs : warmupTimeoutMs;
84 SemanticsResult result = null;
85 try {
86 result = future.get(timeout, TimeUnit.MILLISECONDS);
87 if (!warmedUpCurrently) {
88 warmedUp.set(true);
89 }
90 } catch (InterruptedException e) {
91 future.cancel(true);
92 LOG.error("Semantics service interrupted", e);
93 Thread.currentThread().interrupt();
94 } catch (ExecutionException e) {
95 operationCanceledManager.propagateAsErrorIfCancelException(e.getCause());
96 LOG.debug("Error while computing semantics", e);
97 if (e.getCause() instanceof Error error) {
98 throw error;
99 }
100 String message = e.getMessage();
101 if (message == null) {
102 message = "Partial interpretation error";
103 }
104 return new SemanticsInternalErrorResult(message);
105 } catch (TimeoutException e) {
106 future.cancel(true);
107 if (!warmedUpCurrently) {
108 warmedUp.set(true);
109 }
110 LOG.trace("Semantics service timeout", e);
111 return new SemanticsInternalErrorResult("Partial interpretation timed out");
112 }
113 if (LOG.isTraceEnabled()) {
114 long end = System.currentTimeMillis();
115 LOG.trace("Computed semantics for {} ({}) in {}ms", doc.getResourceId(), doc.getStateId(),
116 end - start);
117 }
118 return result;
119 }
120
121 private boolean hasError(IXtextWebDocument doc, CancelIndicator cancelIndicator) {
122 if (!(doc instanceof PushWebDocument pushDoc)) {
123 throw new IllegalArgumentException("Unexpected IXtextWebDocument: " + doc);
124 }
125 var validationResult = pushDoc.getCachedServiceResult(validationService, cancelIndicator, true);
126 return validationResult.getIssues().stream()
127 .anyMatch(issue -> "error".equals(issue.getSeverity()));
128 }
129
130 @Nullable
131 private Problem getProblem(IXtextWebDocument doc) {
132 var contents = doc.getResource().getContents();
133 if (contents.isEmpty()) {
134 return null;
135 }
136 var model = contents.get(0);
137 if (!(model instanceof Problem problem)) {
138 return null;
139 }
140 return problem;
141 }
142}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsSuccessResult.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsSuccessResult.java
new file mode 100644
index 00000000..350b0b2b
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsSuccessResult.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.semantics;
7
8import com.google.gson.JsonObject;
9import tools.refinery.language.semantics.metadata.NodeMetadata;
10import tools.refinery.language.semantics.metadata.RelationMetadata;
11
12import java.util.List;
13
14public record SemanticsSuccessResult(List<NodeMetadata> nodes, List<RelationMetadata> relations,
15 JsonObject partialInterpretation) implements SemanticsResult {
16}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsWorker.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsWorker.java
new file mode 100644
index 00000000..512c2778
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/semantics/SemanticsWorker.java
@@ -0,0 +1,113 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.semantics;
7
8import com.google.inject.Inject;
9import org.eclipse.emf.common.util.Diagnostic;
10import org.eclipse.emf.ecore.EObject;
11import org.eclipse.xtext.service.OperationCanceledManager;
12import org.eclipse.xtext.util.CancelIndicator;
13import org.eclipse.xtext.validation.CheckType;
14import org.eclipse.xtext.validation.FeatureBasedDiagnostic;
15import org.eclipse.xtext.validation.IDiagnosticConverter;
16import org.eclipse.xtext.validation.Issue;
17import org.eclipse.xtext.web.server.validation.ValidationResult;
18import tools.refinery.language.model.problem.Problem;
19import tools.refinery.language.semantics.metadata.MetadataCreator;
20import tools.refinery.language.semantics.model.ModelInitializer;
21import tools.refinery.language.semantics.model.TracedException;
22import tools.refinery.store.dse.propagation.PropagationAdapter;
23import tools.refinery.store.model.ModelStore;
24import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
25import tools.refinery.store.reasoning.ReasoningAdapter;
26import tools.refinery.store.reasoning.ReasoningStoreAdapter;
27import tools.refinery.store.reasoning.literal.Concreteness;
28import tools.refinery.store.reasoning.translator.TranslationException;
29import tools.refinery.store.util.CancellationToken;
30
31import java.util.ArrayList;
32import java.util.concurrent.Callable;
33
34class SemanticsWorker implements Callable<SemanticsResult> {
35 private static final String DIAGNOSTIC_ID = "tools.refinery.language.semantics.SemanticError";
36
37 @Inject
38 private PartialInterpretation2Json partialInterpretation2Json;
39
40 @Inject
41 private OperationCanceledManager operationCanceledManager;
42
43 @Inject
44 private IDiagnosticConverter diagnosticConverter;
45
46 @Inject
47 private ModelInitializer initializer;
48
49 @Inject
50 private MetadataCreator metadataCreator;
51
52 private Problem problem;
53
54 private CancellationToken cancellationToken;
55
56 public void setProblem(Problem problem, CancelIndicator parentIndicator) {
57 this.problem = problem;
58 cancellationToken = () -> {
59 if (Thread.interrupted() || parentIndicator.isCanceled()) {
60 operationCanceledManager.throwOperationCanceledException();
61 }
62 };
63 }
64
65 @Override
66 public SemanticsResult call() {
67 var builder = ModelStore.builder()
68 .cancellationToken(cancellationToken)
69 .with(ViatraModelQueryAdapter.builder())
70 .with(PropagationAdapter.builder())
71 .with(ReasoningAdapter.builder()
72 .requiredInterpretations(Concreteness.PARTIAL));
73 cancellationToken.checkCancelled();
74 try {
75 var modelSeed = initializer.createModel(problem, builder);
76 cancellationToken.checkCancelled();
77 metadataCreator.setInitializer(initializer);
78 cancellationToken.checkCancelled();
79 var nodesMetadata = metadataCreator.getNodesMetadata();
80 cancellationToken.checkCancelled();
81 var relationsMetadata = metadataCreator.getRelationsMetadata();
82 cancellationToken.checkCancelled();
83 var store = builder.build();
84 cancellationToken.checkCancelled();
85 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
86 cancellationToken.checkCancelled();
87 var partialInterpretation = partialInterpretation2Json.getPartialInterpretation(initializer, model,
88 Concreteness.PARTIAL, cancellationToken);
89
90 return new SemanticsSuccessResult(nodesMetadata, relationsMetadata, partialInterpretation);
91 } catch (TracedException e) {
92 return getTracedErrorResult(e.getSourceElement(), e.getMessage());
93 } catch (TranslationException e) {
94 var sourceElement = initializer.getInverseTrace(e.getPartialSymbol());
95 return getTracedErrorResult(sourceElement, e.getMessage());
96 }
97 }
98
99 private SemanticsResult getTracedErrorResult(EObject sourceElement, String message) {
100 if (sourceElement == null || !problem.eResource().equals(sourceElement.eResource())) {
101 return new SemanticsInternalErrorResult(message);
102 }
103 var diagnostic = new FeatureBasedDiagnostic(Diagnostic.ERROR, message, sourceElement, null, 0,
104 CheckType.EXPENSIVE, DIAGNOSTIC_ID);
105 var xtextIssues = new ArrayList<Issue>();
106 diagnosticConverter.convertValidatorDiagnostic(diagnostic, xtextIssues::add);
107 var issues = xtextIssues.stream()
108 .map(issue -> new ValidationResult.Issue(issue.getMessage(), "error", issue.getLineNumber(),
109 issue.getColumn(), issue.getOffset(), issue.getLength()))
110 .toList();
111 return new SemanticsIssuesResult(issues);
112 }
113}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/ThreadPoolExecutorServiceProvider.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/ThreadPoolExecutorServiceProvider.java
new file mode 100644
index 00000000..ff8f4943
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/ThreadPoolExecutorServiceProvider.java
@@ -0,0 +1,158 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.web.xtext.server;
7
8import com.google.inject.Singleton;
9import org.eclipse.xtext.ide.ExecutorServiceProvider;
10import org.eclipse.xtext.web.server.model.XtextWebDocumentAccess;
11import org.jetbrains.annotations.NotNull;
12import org.slf4j.Logger;
13import org.slf4j.LoggerFactory;
14import tools.refinery.language.web.generator.ModelGenerationService;
15import tools.refinery.language.web.semantics.SemanticsService;
16
17import java.lang.invoke.MethodHandle;
18import java.lang.invoke.MethodHandles;
19import java.util.Collections;
20import java.util.HashMap;
21import java.util.Map;
22import java.util.Optional;
23import java.util.concurrent.ExecutorService;
24import java.util.concurrent.Executors;
25import java.util.concurrent.ScheduledExecutorService;
26import java.util.concurrent.ThreadFactory;
27import java.util.concurrent.atomic.AtomicInteger;
28
29@Singleton
30public class ThreadPoolExecutorServiceProvider extends ExecutorServiceProvider {
31 private static final Logger LOG = LoggerFactory.getLogger(ThreadPoolExecutorServiceProvider.class);
32 private static final String DOCUMENT_LOCK_EXECUTOR;
33 private static final AtomicInteger POOL_ID = new AtomicInteger(1);
34
35 private final Map<String, ScheduledExecutorService> scheduledInstanceCache =
36 Collections.synchronizedMap(new HashMap<>());
37 private final int executorThreadCount;
38 private final int lockExecutorThreadCount;
39 private final int semanticsExecutorThreadCount;
40 private final int generatorExecutorThreadCount;
41
42 static {
43 var lookup = MethodHandles.lookup();
44 MethodHandle getter;
45 try {
46 var privateLookup = MethodHandles.privateLookupIn(XtextWebDocumentAccess.class, lookup);
47 getter = privateLookup.findStaticGetter(XtextWebDocumentAccess.class, "DOCUMENT_LOCK_EXECUTOR",
48 String.class);
49 } catch (IllegalAccessException | NoSuchFieldException e) {
50 throw new IllegalStateException("Failed to find getter", e);
51 }
52 try {
53 DOCUMENT_LOCK_EXECUTOR = (String) getter.invokeExact();
54 } catch (Error e) {
55 // Rethrow JVM errors.
56 throw e;
57 } catch (Throwable e) {
58 throw new IllegalStateException("Failed to get DOCUMENT_LOCK_EXECUTOR", e);
59 }
60 }
61
62 public ThreadPoolExecutorServiceProvider() {
63 executorThreadCount = getCount("REFINERY_XTEXT_THREAD_COUNT").orElse(0);
64 lockExecutorThreadCount = getCount("REFINERY_XTEXT_LOCKING_THREAD_COUNT").orElse(executorThreadCount);
65 int semanticsCount = getCount("REFINERY_XTEXT_SEMANTICS_THREAD_COUNT").orElse(0);
66 if (semanticsCount == 0 || executorThreadCount == 0) {
67 semanticsExecutorThreadCount = 0;
68 } else {
69 semanticsExecutorThreadCount = Math.max(semanticsCount, executorThreadCount);
70 }
71 if (semanticsExecutorThreadCount != semanticsCount) {
72 LOG.warn("Setting REFINERY_XTEXT_SEMANTICS_THREAD_COUNT to {} to avoid deadlock. This value must be " +
73 "either 0 or at least as large as REFINERY_XTEXT_THREAD_COUNT to avoid lock contention.",
74 semanticsExecutorThreadCount);
75 }
76 generatorExecutorThreadCount = getCount("REFINERY_MODEL_GENERATION_THREAD_COUNT").orElse(executorThreadCount);
77 }
78
79 private static Optional<Integer> getCount(String name) {
80 return Optional.ofNullable(System.getenv(name)).map(Integer::parseUnsignedInt);
81 }
82
83 public ScheduledExecutorService getScheduled(String key) {
84 return scheduledInstanceCache.computeIfAbsent(key, this::createScheduledInstance);
85 }
86
87 @Override
88 protected ExecutorService createInstance(String key) {
89 String name = "xtext-" + POOL_ID.getAndIncrement();
90 if (key != null) {
91 name = name + "-" + key;
92 }
93 var threadFactory = new Factory(name, 5);
94 int size = getSize(key);
95 if (size == 0) {
96 return Executors.newCachedThreadPool(threadFactory);
97 }
98 return Executors.newFixedThreadPool(size, threadFactory);
99 }
100
101 protected ScheduledExecutorService createScheduledInstance(String key) {
102 String name = "xtext-scheduled-" + POOL_ID.getAndIncrement();
103 if (key != null) {
104 name = name + "-" + key;
105 }
106 var threadFactory = new Factory(name, 5);
107 return Executors.newScheduledThreadPool(1, threadFactory);
108 }
109
110 private int getSize(String key) {
111 if (SemanticsService.SEMANTICS_EXECUTOR.equals(key)) {
112 return semanticsExecutorThreadCount;
113 } else if (ModelGenerationService.MODEL_GENERATION_EXECUTOR.equals(key)) {
114 return generatorExecutorThreadCount;
115 } else if (DOCUMENT_LOCK_EXECUTOR.equals(key)) {
116 return lockExecutorThreadCount;
117 } else {
118 return executorThreadCount;
119 }
120 }
121
122 @Override
123 public void dispose() {
124 super.dispose();
125 synchronized (scheduledInstanceCache) {
126 for (var instance : scheduledInstanceCache.values()) {
127 instance.shutdown();
128 }
129 scheduledInstanceCache.clear();
130 }
131 }
132
133 private static class Factory implements ThreadFactory {
134 // We have to explicitly store the {@link ThreadGroup} to create a {@link ThreadFactory}.
135 @SuppressWarnings("squid:S3014")
136 private final ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
137 private final AtomicInteger threadId = new AtomicInteger(1);
138 private final String namePrefix;
139 private final int priority;
140
141 public Factory(String name, int priority) {
142 namePrefix = name + "-thread-";
143 this.priority = priority;
144 }
145
146 @Override
147 public Thread newThread(@NotNull Runnable runnable) {
148 var thread = new Thread(threadGroup, runnable, namePrefix + threadId.getAndIncrement());
149 if (thread.isDaemon()) {
150 thread.setDaemon(false);
151 }
152 if (thread.getPriority() != priority) {
153 thread.setPriority(priority);
154 }
155 return thread;
156 }
157 }
158}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/TransactionExecutor.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/TransactionExecutor.java
index 0135d8f5..a3792bac 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/TransactionExecutor.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/TransactionExecutor.java
@@ -42,6 +42,8 @@ public class TransactionExecutor implements IDisposable, PrecomputationListener
42 42
43 private final List<XtextWebPushMessage> pendingPushMessages = new ArrayList<>(); 43 private final List<XtextWebPushMessage> pendingPushMessages = new ArrayList<>();
44 44
45 private volatile boolean disposed;
46
45 public TransactionExecutor(ISession session, IResourceServiceProvider.Registry resourceServiceProviderRegistry) { 47 public TransactionExecutor(ISession session, IResourceServiceProvider.Registry resourceServiceProviderRegistry) {
46 this.session = session; 48 this.session = session;
47 this.resourceServiceProviderRegistry = resourceServiceProviderRegistry; 49 this.resourceServiceProviderRegistry = resourceServiceProviderRegistry;
@@ -52,10 +54,13 @@ public class TransactionExecutor implements IDisposable, PrecomputationListener
52 } 54 }
53 55
54 public void handleRequest(XtextWebRequest request) throws ResponseHandlerException { 56 public void handleRequest(XtextWebRequest request) throws ResponseHandlerException {
57 if (disposed) {
58 return;
59 }
55 var serviceContext = new SimpleServiceContext(session, request.getRequestData()); 60 var serviceContext = new SimpleServiceContext(session, request.getRequestData());
56 var ping = serviceContext.getParameter("ping"); 61 var ping = serviceContext.getParameter("ping");
57 if (ping != null) { 62 if (ping != null) {
58 responseHandler.onResponse(new XtextWebOkResponse(request, new PongResult(ping))); 63 onResponse(new XtextWebOkResponse(request, new PongResult(ping)));
59 return; 64 return;
60 } 65 }
61 synchronized (callPendingLock) { 66 synchronized (callPendingLock) {
@@ -72,23 +77,36 @@ public class TransactionExecutor implements IDisposable, PrecomputationListener
72 var serviceDispatcher = injector.getInstance(XtextServiceDispatcher.class); 77 var serviceDispatcher = injector.getInstance(XtextServiceDispatcher.class);
73 var service = serviceDispatcher.getService(new SubscribingServiceContext(serviceContext, this)); 78 var service = serviceDispatcher.getService(new SubscribingServiceContext(serviceContext, this));
74 var serviceResult = service.getService().apply(); 79 var serviceResult = service.getService().apply();
75 responseHandler.onResponse(new XtextWebOkResponse(request, serviceResult)); 80 onResponse(new XtextWebOkResponse(request, serviceResult));
76 } catch (InvalidRequestException e) { 81 } catch (InvalidRequestException e) {
77 responseHandler.onResponse(new XtextWebErrorResponse(request, XtextWebErrorKind.REQUEST_ERROR, e)); 82 onResponse(new XtextWebErrorResponse(request, XtextWebErrorKind.REQUEST_ERROR, e));
78 } catch (RuntimeException e) { 83 } catch (RuntimeException e) {
79 responseHandler.onResponse(new XtextWebErrorResponse(request, XtextWebErrorKind.SERVER_ERROR, e)); 84 onResponse(new XtextWebErrorResponse(request, XtextWebErrorKind.SERVER_ERROR, e));
80 } finally { 85 } finally {
81 synchronized (callPendingLock) { 86 flushPendingPushMessages();
82 for (var message : pendingPushMessages) { 87 }
83 try { 88 }
84 responseHandler.onResponse(message); 89
85 } catch (ResponseHandlerException | RuntimeException e) { 90 private void onResponse(XtextWebResponse response) throws ResponseHandlerException {
86 LOG.error("Error while flushing push message", e); 91 if (!disposed) {
87 } 92 responseHandler.onResponse(response);
93 }
94 }
95
96 private void flushPendingPushMessages() {
97 synchronized (callPendingLock) {
98 for (var message : pendingPushMessages) {
99 if (disposed) {
100 return;
101 }
102 try {
103 responseHandler.onResponse(message);
104 } catch (ResponseHandlerException | RuntimeException e) {
105 LOG.error("Error while flushing push message", e);
88 } 106 }
89 pendingPushMessages.clear();
90 callPending = false;
91 } 107 }
108 pendingPushMessages.clear();
109 callPending = false;
92 } 110 }
93 } 111 }
94 112
@@ -134,7 +152,7 @@ public class TransactionExecutor implements IDisposable, PrecomputationListener
134 * @throws UnknownLanguageException if the Xtext language cannot be determined 152 * @throws UnknownLanguageException if the Xtext language cannot be determined
135 */ 153 */
136 protected Injector getInjector(IServiceContext context) { 154 protected Injector getInjector(IServiceContext context) {
137 IResourceServiceProvider resourceServiceProvider = null; 155 IResourceServiceProvider resourceServiceProvider;
138 var resourceName = context.getParameter("resource"); 156 var resourceName = context.getParameter("resource");
139 if (resourceName == null) { 157 if (resourceName == null) {
140 resourceName = ""; 158 resourceName = "";
@@ -164,10 +182,12 @@ public class TransactionExecutor implements IDisposable, PrecomputationListener
164 182
165 @Override 183 @Override
166 public void dispose() { 184 public void dispose() {
185 disposed = true;
167 for (var subscription : subscriptions.values()) { 186 for (var subscription : subscriptions.values()) {
168 var document = subscription.get(); 187 var document = subscription.get();
169 if (document != null) { 188 if (document != null) {
170 document.removePrecomputationListener(this); 189 document.removePrecomputationListener(this);
190 document.dispose();
171 } 191 }
172 } 192 }
173 } 193 }
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebOkResponse.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebOkResponse.java
index 73527ee5..c3379329 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebOkResponse.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebOkResponse.java
@@ -5,12 +5,11 @@
5 */ 5 */
6package tools.refinery.language.web.xtext.server.message; 6package tools.refinery.language.web.xtext.server.message;
7 7
8import java.util.Objects; 8import com.google.gson.annotations.SerializedName;
9
10import org.eclipse.xtext.web.server.IServiceResult; 9import org.eclipse.xtext.web.server.IServiceResult;
11import org.eclipse.xtext.web.server.IUnwrappableServiceResult; 10import org.eclipse.xtext.web.server.IUnwrappableServiceResult;
12 11
13import com.google.gson.annotations.SerializedName; 12import java.util.Objects;
14 13
15public final class XtextWebOkResponse implements XtextWebResponse { 14public final class XtextWebOkResponse implements XtextWebResponse {
16 private String id; 15 private String id;
@@ -19,7 +18,6 @@ public final class XtextWebOkResponse implements XtextWebResponse {
19 private Object responseData; 18 private Object responseData;
20 19
21 public XtextWebOkResponse(String id, Object responseData) { 20 public XtextWebOkResponse(String id, Object responseData) {
22 super();
23 this.id = id; 21 this.id = id;
24 this.responseData = responseData; 22 this.responseData = responseData;
25 } 23 }
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebRequest.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebRequest.java
index ff788e94..7c4562bf 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebRequest.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebRequest.java
@@ -5,19 +5,22 @@
5 */ 5 */
6package tools.refinery.language.web.xtext.server.message; 6package tools.refinery.language.web.xtext.server.message;
7 7
8import com.google.gson.annotations.SerializedName;
9
8import java.util.Map; 10import java.util.Map;
9import java.util.Objects; 11import java.util.Objects;
10 12
11import com.google.gson.annotations.SerializedName;
12
13public class XtextWebRequest { 13public class XtextWebRequest {
14 private String id; 14 private String id;
15 15
16 @SerializedName("request") 16 @SerializedName("request")
17 private Map<String, String> requestData; 17 private Map<String, String> requestData;
18 18
19 public XtextWebRequest() {
20 this(null, null);
21 }
22
19 public XtextWebRequest(String id, Map<String, String> requestData) { 23 public XtextWebRequest(String id, Map<String, String> requestData) {
20 super();
21 this.id = id; 24 this.id = id;
22 this.requestData = requestData; 25 this.requestData = requestData;
23 } 26 }
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebResponse.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebResponse.java
index 61444c99..c370fb56 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebResponse.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/message/XtextWebResponse.java
@@ -5,5 +5,5 @@
5 */ 5 */
6package tools.refinery.language.web.xtext.server.message; 6package tools.refinery.language.web.xtext.server.message;
7 7
8public sealed interface XtextWebResponse permits XtextWebOkResponse,XtextWebErrorResponse,XtextWebPushMessage { 8public sealed interface XtextWebResponse permits XtextWebOkResponse, XtextWebErrorResponse, XtextWebPushMessage {
9} 9}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushServiceDispatcher.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushServiceDispatcher.java
index 4c9135c8..e1d00d8f 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushServiceDispatcher.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushServiceDispatcher.java
@@ -5,16 +5,34 @@
5 */ 5 */
6package tools.refinery.language.web.xtext.server.push; 6package tools.refinery.language.web.xtext.server.push;
7 7
8import com.google.common.base.Optional;
9import com.google.inject.Inject;
8import org.eclipse.xtext.web.server.IServiceContext; 10import org.eclipse.xtext.web.server.IServiceContext;
11import org.eclipse.xtext.web.server.InvalidRequestException;
9import org.eclipse.xtext.web.server.XtextServiceDispatcher; 12import org.eclipse.xtext.web.server.XtextServiceDispatcher;
13import org.eclipse.xtext.web.server.model.PrecomputedServiceRegistry;
10import org.eclipse.xtext.web.server.model.XtextWebDocument; 14import org.eclipse.xtext.web.server.model.XtextWebDocument;
11 15
12import com.google.inject.Singleton; 16import com.google.inject.Singleton;
13 17
18import tools.refinery.language.web.generator.ModelGenerationService;
19import tools.refinery.language.web.semantics.SemanticsService;
14import tools.refinery.language.web.xtext.server.SubscribingServiceContext; 20import tools.refinery.language.web.xtext.server.SubscribingServiceContext;
15 21
16@Singleton 22@Singleton
17public class PushServiceDispatcher extends XtextServiceDispatcher { 23public class PushServiceDispatcher extends XtextServiceDispatcher {
24 @Inject
25 private SemanticsService semanticsService;
26
27 @Inject
28 private ModelGenerationService modelGenerationService;
29
30 @Override
31 @Inject
32 protected void registerPreComputedServices(PrecomputedServiceRegistry registry) {
33 super.registerPreComputedServices(registry);
34 registry.addPrecomputedService(semanticsService);
35 }
18 36
19 @Override 37 @Override
20 protected XtextWebDocument getFullTextDocument(String fullText, String resourceId, IServiceContext context) { 38 protected XtextWebDocument getFullTextDocument(String fullText, String resourceId, IServiceContext context) {
@@ -25,4 +43,39 @@ public class PushServiceDispatcher extends XtextServiceDispatcher {
25 } 43 }
26 return document; 44 return document;
27 } 45 }
46
47 @Override
48 protected ServiceDescriptor createServiceDescriptor(String serviceType, IServiceContext context) {
49 if (ModelGenerationService.SERVICE_NAME.equals(serviceType)) {
50 return getModelGenerationService(context);
51 }
52 return super.createServiceDescriptor(serviceType, context);
53 }
54
55 protected ServiceDescriptor getModelGenerationService(IServiceContext context) throws InvalidRequestException {
56 var document = (PushWebDocumentAccess) getDocumentAccess(context);
57 // Using legacy Guava methods because of the Xtext dependency.
58 @SuppressWarnings({"Guava", "squid:S4738"})
59 boolean start = getBoolean(context, "start", Optional.of(false));
60 @SuppressWarnings({"Guava", "squid:S4738"})
61 boolean cancel = getBoolean(context, "cancel", Optional.of(false));
62 if (!start && !cancel) {
63 throw new InvalidRequestException("Either start of cancel must be specified");
64 }
65 @SuppressWarnings({"squid:S4738"})
66 int randomSeed = start ? getInt(context, "randomSeed", Optional.absent()) : 0;
67 var descriptor = new ServiceDescriptor();
68 descriptor.setService(() -> {
69 try {
70 if (start) {
71 return modelGenerationService.generateModel(document, randomSeed);
72 } else {
73 return modelGenerationService.cancelModelGeneration(document);
74 }
75 } catch (RuntimeException e) {
76 return handleError(descriptor, e);
77 }
78 });
79 return descriptor;
80 }
28} 81}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocument.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocument.java
index 56fd12c9..ca97147a 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocument.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocument.java
@@ -5,11 +5,7 @@
5 */ 5 */
6package tools.refinery.language.web.xtext.server.push; 6package tools.refinery.language.web.xtext.server.push;
7 7
8import java.util.ArrayList; 8import com.google.common.collect.ImmutableList;
9import java.util.HashMap;
10import java.util.List;
11import java.util.Map;
12
13import org.eclipse.xtext.util.CancelIndicator; 9import org.eclipse.xtext.util.CancelIndicator;
14import org.eclipse.xtext.web.server.IServiceResult; 10import org.eclipse.xtext.web.server.IServiceResult;
15import org.eclipse.xtext.web.server.model.AbstractCachedService; 11import org.eclipse.xtext.web.server.model.AbstractCachedService;
@@ -17,60 +13,59 @@ import org.eclipse.xtext.web.server.model.DocumentSynchronizer;
17import org.eclipse.xtext.web.server.model.XtextWebDocument; 13import org.eclipse.xtext.web.server.model.XtextWebDocument;
18import org.slf4j.Logger; 14import org.slf4j.Logger;
19import org.slf4j.LoggerFactory; 15import org.slf4j.LoggerFactory;
20 16import tools.refinery.language.web.generator.ModelGenerationManager;
21import com.google.common.collect.ImmutableList;
22
23import tools.refinery.language.web.xtext.server.ResponseHandlerException; 17import tools.refinery.language.web.xtext.server.ResponseHandlerException;
24 18
19import java.util.ArrayList;
20import java.util.List;
21
25public class PushWebDocument extends XtextWebDocument { 22public class PushWebDocument extends XtextWebDocument {
26 private static final Logger LOG = LoggerFactory.getLogger(PushWebDocument.class); 23 private static final Logger LOG = LoggerFactory.getLogger(PushWebDocument.class);
27 24
28 private final List<PrecomputationListener> precomputationListeners = new ArrayList<>(); 25 private final List<PrecomputationListener> precomputationListeners = new ArrayList<>();
29 26
30 private final Map<Class<?>, IServiceResult> precomputedServices = new HashMap<>(); 27 private final ModelGenerationManager modelGenerationManager = new ModelGenerationManager();
28
29 private final DocumentSynchronizer synchronizer;
31 30
32 public PushWebDocument(String resourceId, DocumentSynchronizer synchronizer) { 31 public PushWebDocument(String resourceId, DocumentSynchronizer synchronizer) {
33 super(resourceId, synchronizer); 32 super(resourceId, synchronizer);
34 if (resourceId == null) { 33 this.synchronizer = synchronizer;
35 throw new IllegalArgumentException("resourceId must not be null");
36 }
37 } 34 }
38 35
39 public boolean addPrecomputationListener(PrecomputationListener listener) { 36 public ModelGenerationManager getModelGenerationManager() {
37 return modelGenerationManager;
38 }
39
40 public void addPrecomputationListener(PrecomputationListener listener) {
40 synchronized (precomputationListeners) { 41 synchronized (precomputationListeners) {
41 if (precomputationListeners.contains(listener)) { 42 if (precomputationListeners.contains(listener)) {
42 return false; 43 return;
43 } 44 }
44 precomputationListeners.add(listener); 45 precomputationListeners.add(listener);
45 listener.onSubscribeToPrecomputationEvents(getResourceId(), this); 46 listener.onSubscribeToPrecomputationEvents(getResourceId(), this);
46 return true;
47 } 47 }
48 } 48 }
49 49
50 public boolean removePrecomputationListener(PrecomputationListener listener) { 50 public void removePrecomputationListener(PrecomputationListener listener) {
51 synchronized (precomputationListeners) { 51 synchronized (precomputationListeners) {
52 return precomputationListeners.remove(listener); 52 precomputationListeners.remove(listener);
53 } 53 }
54 } 54 }
55 55
56 public <T extends IServiceResult> void precomputeServiceResult(AbstractCachedService<T> service, String serviceName, 56 public <T extends IServiceResult> void precomputeServiceResult(AbstractCachedService<T> service, String serviceName,
57 CancelIndicator cancelIndicator, boolean logCacheMiss) { 57 CancelIndicator cancelIndicator, boolean logCacheMiss) {
58 var result = getCachedServiceResult(service, cancelIndicator, logCacheMiss); 58 var result = getCachedServiceResult(service, cancelIndicator, logCacheMiss);
59 if (result == null) { 59 if (result != null) {
60 LOG.error("{} service returned null result", serviceName); 60 notifyPrecomputationListeners(serviceName, result);
61 return;
62 } 61 }
63 var serviceClass = service.getClass();
64 var previousResult = precomputedServices.get(serviceClass);
65 if (previousResult != null && previousResult.equals(result)) {
66 return;
67 }
68 precomputedServices.put(serviceClass, result);
69 notifyPrecomputationListeners(serviceName, result);
70 } 62 }
71 63
72 private <T extends IServiceResult> void notifyPrecomputationListeners(String serviceName, T result) { 64 public <T extends IServiceResult> void notifyPrecomputationListeners(String serviceName, T result) {
73 var resourceId = getResourceId(); 65 var resourceId = getResourceId();
66 if (resourceId == null) {
67 return;
68 }
74 var stateId = getStateId(); 69 var stateId = getStateId();
75 List<PrecomputationListener> copyOfListeners; 70 List<PrecomputationListener> copyOfListeners;
76 synchronized (precomputationListeners) { 71 synchronized (precomputationListeners) {
@@ -91,4 +86,13 @@ public class PushWebDocument extends XtextWebDocument {
91 } 86 }
92 } 87 }
93 } 88 }
89
90 public void cancelModelGeneration() {
91 modelGenerationManager.cancel();
92 }
93
94 public void dispose() {
95 synchronizer.setCanceled(true);
96 modelGenerationManager.dispose();
97 }
94} 98}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentAccess.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentAccess.java
index d9e548cd..1e68b244 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentAccess.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentAccess.java
@@ -18,6 +18,7 @@ import org.eclipse.xtext.web.server.syntaxcoloring.HighlightingService;
18import org.eclipse.xtext.web.server.validation.ValidationService; 18import org.eclipse.xtext.web.server.validation.ValidationService;
19 19
20import com.google.inject.Inject; 20import com.google.inject.Inject;
21import tools.refinery.language.web.semantics.SemanticsService;
21 22
22public class PushWebDocumentAccess extends XtextWebDocumentAccess { 23public class PushWebDocumentAccess extends XtextWebDocumentAccess {
23 24
@@ -49,7 +50,7 @@ public class PushWebDocumentAccess extends XtextWebDocumentAccess {
49 precomputeServiceResult(service, false); 50 precomputeServiceResult(service, false);
50 } 51 }
51 } 52 }
52 53
53 protected <T extends IServiceResult> void precomputeServiceResult(AbstractCachedService<T> service, boolean logCacheMiss) { 54 protected <T extends IServiceResult> void precomputeServiceResult(AbstractCachedService<T> service, boolean logCacheMiss) {
54 var serviceName = getPrecomputedServiceName(service); 55 var serviceName = getPrecomputedServiceName(service);
55 readOnly(new CancelableUnitOfWork<Void, IXtextWebDocument>() { 56 readOnly(new CancelableUnitOfWork<Void, IXtextWebDocument>() {
@@ -60,7 +61,7 @@ public class PushWebDocumentAccess extends XtextWebDocumentAccess {
60 } 61 }
61 }); 62 });
62 } 63 }
63 64
64 protected String getPrecomputedServiceName(AbstractCachedService<? extends IServiceResult> service) { 65 protected String getPrecomputedServiceName(AbstractCachedService<? extends IServiceResult> service) {
65 if (service instanceof ValidationService) { 66 if (service instanceof ValidationService) {
66 return "validate"; 67 return "validate";
@@ -68,6 +69,13 @@ public class PushWebDocumentAccess extends XtextWebDocumentAccess {
68 if (service instanceof HighlightingService) { 69 if (service instanceof HighlightingService) {
69 return "highlight"; 70 return "highlight";
70 } 71 }
72 if (service instanceof SemanticsService) {
73 return "semantics";
74 }
71 throw new IllegalArgumentException("Unknown precomputed service: " + service); 75 throw new IllegalArgumentException("Unknown precomputed service: " + service);
72 } 76 }
77
78 public void cancelModelGeneration() {
79 pushDocument.cancelModelGeneration();
80 }
73} 81}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentProvider.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentProvider.java
index b6f4fb43..ec6204ef 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentProvider.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/server/push/PushWebDocumentProvider.java
@@ -27,12 +27,7 @@ public class PushWebDocumentProvider implements IWebDocumentProvider {
27 27
28 @Override 28 @Override
29 public XtextWebDocument get(String resourceId, IServiceContext serviceContext) { 29 public XtextWebDocument get(String resourceId, IServiceContext serviceContext) {
30 if (resourceId == null) { 30 return new PushWebDocument(resourceId,
31 return new XtextWebDocument(null, synchronizerProvider.get()); 31 serviceContext.getSession().get(DocumentSynchronizer.class, () -> this.synchronizerProvider.get()));
32 } else {
33 // We only need to send push messages if a resourceId is specified.
34 return new PushWebDocument(resourceId,
35 serviceContext.getSession().get(DocumentSynchronizer.class, () -> this.synchronizerProvider.get()));
36 }
37 } 32 }
38} 33}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/RuntimeTypeAdapterFactory.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/RuntimeTypeAdapterFactory.java
new file mode 100644
index 00000000..b16cf7df
--- /dev/null
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/RuntimeTypeAdapterFactory.java
@@ -0,0 +1,304 @@
1/*
2 * Copyright (C) 2011 Google Inc.
3 * Copyright (C) 2023 The Refinery Authors <https://refinery.tools/>
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * This file was copied into Refinery according to upstream instructions at
20 * https://github.com/google/gson/issues/1104#issuecomment-309582470.
21 * However, we changed the package name below to avoid potential clashes
22 * with other jars on the classpath.
23 */
24package tools.refinery.language.web.xtext.servlet;
25
26import com.google.errorprone.annotations.CanIgnoreReturnValue;
27import com.google.gson.Gson;
28import com.google.gson.JsonElement;
29import com.google.gson.JsonObject;
30import com.google.gson.JsonParseException;
31import com.google.gson.JsonPrimitive;
32import com.google.gson.TypeAdapter;
33import com.google.gson.TypeAdapterFactory;
34import com.google.gson.reflect.TypeToken;
35import com.google.gson.stream.JsonReader;
36import com.google.gson.stream.JsonWriter;
37import java.io.IOException;
38import java.util.LinkedHashMap;
39import java.util.Map;
40
41/**
42 * Adapts values whose runtime type may differ from their declaration type. This
43 * is necessary when a field's type is not the same type that GSON should create
44 * when deserializing that field. For example, consider these types:
45 * <pre> {@code
46 * abstract class Shape {
47 * int x;
48 * int y;
49 * }
50 * class Circle extends Shape {
51 * int radius;
52 * }
53 * class Rectangle extends Shape {
54 * int width;
55 * int height;
56 * }
57 * class Diamond extends Shape {
58 * int width;
59 * int height;
60 * }
61 * class Drawing {
62 * Shape bottomShape;
63 * Shape topShape;
64 * }
65 * }</pre>
66 * <p>Without additional type information, the serialized JSON is ambiguous. Is
67 * the bottom shape in this drawing a rectangle or a diamond? <pre> {@code
68 * {
69 * "bottomShape": {
70 * "width": 10,
71 * "height": 5,
72 * "x": 0,
73 * "y": 0
74 * },
75 * "topShape": {
76 * "radius": 2,
77 * "x": 4,
78 * "y": 1
79 * }
80 * }}</pre>
81 * This class addresses this problem by adding type information to the
82 * serialized JSON and honoring that type information when the JSON is
83 * deserialized: <pre> {@code
84 * {
85 * "bottomShape": {
86 * "type": "Diamond",
87 * "width": 10,
88 * "height": 5,
89 * "x": 0,
90 * "y": 0
91 * },
92 * "topShape": {
93 * "type": "Circle",
94 * "radius": 2,
95 * "x": 4,
96 * "y": 1
97 * }
98 * }}</pre>
99 * Both the type field name ({@code "type"}) and the type labels ({@code
100 * "Rectangle"}) are configurable.
101 *
102 * <h2>Registering Types</h2>
103 * Create a {@code RuntimeTypeAdapterFactory} by passing the base type and type field
104 * name to the {@link #of} factory method. If you don't supply an explicit type
105 * field name, {@code "type"} will be used. <pre> {@code
106 * RuntimeTypeAdapterFactory<Shape> shapeAdapterFactory
107 * = RuntimeTypeAdapterFactory.of(Shape.class, "type");
108 * }</pre>
109 * Next register all of your subtypes. Every subtype must be explicitly
110 * registered. This protects your application from injection attacks. If you
111 * don't supply an explicit type label, the type's simple name will be used.
112 * <pre> {@code
113 * shapeAdapterFactory.registerSubtype(Rectangle.class, "Rectangle");
114 * shapeAdapterFactory.registerSubtype(Circle.class, "Circle");
115 * shapeAdapterFactory.registerSubtype(Diamond.class, "Diamond");
116 * }</pre>
117 * Finally, register the type adapter factory in your application's GSON builder:
118 * <pre> {@code
119 * Gson gson = new GsonBuilder()
120 * .registerTypeAdapterFactory(shapeAdapterFactory)
121 * .create();
122 * }</pre>
123 * Like {@code GsonBuilder}, this API supports chaining: <pre> {@code
124 * RuntimeTypeAdapterFactory<Shape> shapeAdapterFactory = RuntimeTypeAdapterFactory.of(Shape.class)
125 * .registerSubtype(Rectangle.class)
126 * .registerSubtype(Circle.class)
127 * .registerSubtype(Diamond.class);
128 * }</pre>
129 *
130 * <h2>Serialization and deserialization</h2>
131 * In order to serialize and deserialize a polymorphic object,
132 * you must specify the base type explicitly.
133 * <pre> {@code
134 * Diamond diamond = new Diamond();
135 * String json = gson.toJson(diamond, Shape.class);
136 * }</pre>
137 * And then:
138 * <pre> {@code
139 * Shape shape = gson.fromJson(json, Shape.class);
140 * }</pre>
141 */
142public final class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory {
143 private final Class<?> baseType;
144 private final String typeFieldName;
145 private final Map<String, Class<?>> labelToSubtype = new LinkedHashMap<>();
146 private final Map<Class<?>, String> subtypeToLabel = new LinkedHashMap<>();
147 private final boolean maintainType;
148 private boolean recognizeSubtypes;
149
150 private RuntimeTypeAdapterFactory(
151 Class<?> baseType, String typeFieldName, boolean maintainType) {
152 if (typeFieldName == null || baseType == null) {
153 throw new NullPointerException();
154 }
155 this.baseType = baseType;
156 this.typeFieldName = typeFieldName;
157 this.maintainType = maintainType;
158 }
159
160 /**
161 * Creates a new runtime type adapter using for {@code baseType} using {@code
162 * typeFieldName} as the type field name. Type field names are case sensitive.
163 *
164 * @param maintainType true if the type field should be included in deserialized objects
165 */
166 public static <T> RuntimeTypeAdapterFactory<T> of(Class<T> baseType, String typeFieldName, boolean maintainType) {
167 return new RuntimeTypeAdapterFactory<>(baseType, typeFieldName, maintainType);
168 }
169
170 /**
171 * Creates a new runtime type adapter using for {@code baseType} using {@code
172 * typeFieldName} as the type field name. Type field names are case sensitive.
173 */
174 public static <T> RuntimeTypeAdapterFactory<T> of(Class<T> baseType, String typeFieldName) {
175 return new RuntimeTypeAdapterFactory<>(baseType, typeFieldName, false);
176 }
177
178 /**
179 * Creates a new runtime type adapter for {@code baseType} using {@code "type"} as
180 * the type field name.
181 */
182 public static <T> RuntimeTypeAdapterFactory<T> of(Class<T> baseType) {
183 return new RuntimeTypeAdapterFactory<>(baseType, "type", false);
184 }
185
186 /**
187 * Ensures that this factory will handle not just the given {@code baseType}, but any subtype
188 * of that type.
189 */
190 @CanIgnoreReturnValue
191 public RuntimeTypeAdapterFactory<T> recognizeSubtypes() {
192 this.recognizeSubtypes = true;
193 return this;
194 }
195
196 /**
197 * Registers {@code type} identified by {@code label}. Labels are case
198 * sensitive.
199 *
200 * @throws IllegalArgumentException if either {@code type} or {@code label}
201 * have already been registered on this type adapter.
202 */
203 @CanIgnoreReturnValue
204 public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type, String label) {
205 if (type == null || label == null) {
206 throw new NullPointerException();
207 }
208 if (subtypeToLabel.containsKey(type) || labelToSubtype.containsKey(label)) {
209 throw new IllegalArgumentException("types and labels must be unique");
210 }
211 labelToSubtype.put(label, type);
212 subtypeToLabel.put(type, label);
213 return this;
214 }
215
216 /**
217 * Registers {@code type} identified by its {@link Class#getSimpleName simple
218 * name}. Labels are case sensitive.
219 *
220 * @throws IllegalArgumentException if either {@code type} or its simple name
221 * have already been registered on this type adapter.
222 */
223 @CanIgnoreReturnValue
224 public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type) {
225 return registerSubtype(type, type.getSimpleName());
226 }
227
228 @Override
229 public <R> TypeAdapter<R> create(Gson gson, TypeToken<R> type) {
230 if (type == null) {
231 return null;
232 }
233 Class<?> rawType = type.getRawType();
234 boolean handle =
235 recognizeSubtypes ? baseType.isAssignableFrom(rawType) : baseType.equals(rawType);
236 if (!handle) {
237 return null;
238 }
239
240 final TypeAdapter<JsonElement> jsonElementAdapter = gson.getAdapter(JsonElement.class);
241 final Map<String, TypeAdapter<?>> labelToDelegate = new LinkedHashMap<>();
242 final Map<Class<?>, TypeAdapter<?>> subtypeToDelegate = new LinkedHashMap<>();
243 for (Map.Entry<String, Class<?>> entry : labelToSubtype.entrySet()) {
244 TypeAdapter<?> delegate = gson.getDelegateAdapter(this, TypeToken.get(entry.getValue()));
245 labelToDelegate.put(entry.getKey(), delegate);
246 subtypeToDelegate.put(entry.getValue(), delegate);
247 }
248
249 return new TypeAdapter<R>() {
250 @Override public R read(JsonReader in) throws IOException {
251 JsonElement jsonElement = jsonElementAdapter.read(in);
252 JsonElement labelJsonElement;
253 if (maintainType) {
254 labelJsonElement = jsonElement.getAsJsonObject().get(typeFieldName);
255 } else {
256 labelJsonElement = jsonElement.getAsJsonObject().remove(typeFieldName);
257 }
258
259 if (labelJsonElement == null) {
260 throw new JsonParseException("cannot deserialize " + baseType
261 + " because it does not define a field named " + typeFieldName);
262 }
263 String label = labelJsonElement.getAsString();
264 @SuppressWarnings("unchecked") // registration requires that subtype extends T
265 TypeAdapter<R> delegate = (TypeAdapter<R>) labelToDelegate.get(label);
266 if (delegate == null) {
267 throw new JsonParseException("cannot deserialize " + baseType + " subtype named "
268 + label + "; did you forget to register a subtype?");
269 }
270 return delegate.fromJsonTree(jsonElement);
271 }
272
273 @Override public void write(JsonWriter out, R value) throws IOException {
274 Class<?> srcType = value.getClass();
275 String label = subtypeToLabel.get(srcType);
276 @SuppressWarnings("unchecked") // registration requires that subtype extends T
277 TypeAdapter<R> delegate = (TypeAdapter<R>) subtypeToDelegate.get(srcType);
278 if (delegate == null) {
279 throw new JsonParseException("cannot serialize " + srcType.getName()
280 + "; did you forget to register a subtype?");
281 }
282 JsonObject jsonObject = delegate.toJsonTree(value).getAsJsonObject();
283
284 if (maintainType) {
285 jsonElementAdapter.write(out, jsonObject);
286 return;
287 }
288
289 JsonObject clone = new JsonObject();
290
291 if (jsonObject.has(typeFieldName)) {
292 throw new JsonParseException("cannot serialize " + srcType.getName()
293 + " because it already defines a field named " + typeFieldName);
294 }
295 clone.add(typeFieldName, new JsonPrimitive(label));
296
297 for (Map.Entry<String, JsonElement> e : jsonObject.entrySet()) {
298 clone.add(e.getKey(), e.getValue());
299 }
300 jsonElementAdapter.write(out, clone);
301 }
302 }.nullSafe();
303 }
304}
diff --git a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/XtextWebSocket.java b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/XtextWebSocket.java
index 043d318c..1fde1be5 100644
--- a/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/XtextWebSocket.java
+++ b/subprojects/language-web/src/main/java/tools/refinery/language/web/xtext/servlet/XtextWebSocket.java
@@ -6,6 +6,7 @@
6package tools.refinery.language.web.xtext.servlet; 6package tools.refinery.language.web.xtext.servlet;
7 7
8import com.google.gson.Gson; 8import com.google.gson.Gson;
9import com.google.gson.GsonBuilder;
9import com.google.gson.JsonIOException; 10import com.google.gson.JsonIOException;
10import com.google.gson.JsonParseException; 11import com.google.gson.JsonParseException;
11import org.eclipse.jetty.websocket.api.Callback; 12import org.eclipse.jetty.websocket.api.Callback;
@@ -16,6 +17,7 @@ import org.eclipse.xtext.resource.IResourceServiceProvider;
16import org.eclipse.xtext.web.server.ISession; 17import org.eclipse.xtext.web.server.ISession;
17import org.slf4j.Logger; 18import org.slf4j.Logger;
18import org.slf4j.LoggerFactory; 19import org.slf4j.LoggerFactory;
20import tools.refinery.language.semantics.metadata.*;
19import tools.refinery.language.web.xtext.server.ResponseHandler; 21import tools.refinery.language.web.xtext.server.ResponseHandler;
20import tools.refinery.language.web.xtext.server.ResponseHandlerException; 22import tools.refinery.language.web.xtext.server.ResponseHandlerException;
21import tools.refinery.language.web.xtext.server.TransactionExecutor; 23import tools.refinery.language.web.xtext.server.TransactionExecutor;
@@ -28,7 +30,15 @@ import java.io.Reader;
28public class XtextWebSocket implements ResponseHandler { 30public class XtextWebSocket implements ResponseHandler {
29 private static final Logger LOG = LoggerFactory.getLogger(XtextWebSocket.class); 31 private static final Logger LOG = LoggerFactory.getLogger(XtextWebSocket.class);
30 32
31 private final Gson gson = new Gson(); 33 private final Gson gson = new GsonBuilder()
34 .disableJdkUnsafe()
35 .registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(RelationDetail.class, "type")
36 .registerSubtype(ClassDetail.class, "class")
37 .registerSubtype(ReferenceDetail.class, "reference")
38 .registerSubtype(OppositeReferenceDetail.class, "opposite")
39 .registerSubtype(PredicateDetail.class, "predicate")
40 .registerSubtype(BuiltInDetail.class, "builtin"))
41 .create();
32 42
33 private final TransactionExecutor executor; 43 private final TransactionExecutor executor;
34 44
@@ -70,10 +80,11 @@ public class XtextWebSocket implements ResponseHandler {
70 80
71 @OnWebSocketError 81 @OnWebSocketError
72 public void onError(Throwable error) { 82 public void onError(Throwable error) {
83 executor.dispose();
73 if (webSocketSession == null) { 84 if (webSocketSession == null) {
74 return; 85 return;
75 } 86 }
76 LOG.error("Internal websocket error in connection from" + webSocketSession.getRemoteSocketAddress(), error); 87 LOG.error("Internal websocket error in connection from " + webSocketSession.getRemoteSocketAddress(), error);
77 } 88 }
78 89
79 @OnWebSocketMessage 90 @OnWebSocketMessage
@@ -86,14 +97,18 @@ public class XtextWebSocket implements ResponseHandler {
86 try { 97 try {
87 request = gson.fromJson(reader, XtextWebRequest.class); 98 request = gson.fromJson(reader, XtextWebRequest.class);
88 } catch (JsonIOException e) { 99 } catch (JsonIOException e) {
89 LOG.error("Cannot read from websocket from" + webSocketSession.getRemoteSocketAddress(), e); 100 LOG.error("Cannot read from websocket from " + webSocketSession.getRemoteSocketAddress(), e);
90 if (webSocketSession.isOpen()) { 101 if (webSocketSession.isOpen()) {
102 executor.dispose();
91 webSocketSession.close(StatusCode.SERVER_ERROR, "Cannot read payload", Callback.NOOP); 103 webSocketSession.close(StatusCode.SERVER_ERROR, "Cannot read payload", Callback.NOOP);
92 } 104 }
93 return; 105 return;
94 } catch (JsonParseException e) { 106 } catch (JsonParseException e) {
95 LOG.warn("Malformed websocket request from" + webSocketSession.getRemoteSocketAddress(), e); 107 LOG.warn("Malformed websocket request from " + webSocketSession.getRemoteSocketAddress(), e);
96 webSocketSession.close(XtextStatusCode.INVALID_JSON, "Invalid JSON payload", Callback.NOOP); 108 if (webSocketSession.isOpen()) {
109 executor.dispose();
110 webSocketSession.close(XtextStatusCode.INVALID_JSON, "Invalid JSON payload", Callback.NOOP);
111 }
97 return; 112 return;
98 } 113 }
99 try { 114 try {
@@ -101,6 +116,7 @@ public class XtextWebSocket implements ResponseHandler {
101 } catch (ResponseHandlerException e) { 116 } catch (ResponseHandlerException e) {
102 LOG.warn("Cannot write websocket response", e); 117 LOG.warn("Cannot write websocket response", e);
103 if (webSocketSession.isOpen()) { 118 if (webSocketSession.isOpen()) {
119 executor.dispose();
104 webSocketSession.close(StatusCode.SERVER_ERROR, "Cannot write response", Callback.NOOP); 120 webSocketSession.close(StatusCode.SERVER_ERROR, "Cannot write response", Callback.NOOP);
105 } 121 }
106 } 122 }
diff --git a/subprojects/language-web/src/test/java/tools/refinery/language/web/ProblemWebSocketServletIntegrationTest.java b/subprojects/language-web/src/test/java/tools/refinery/language/web/ProblemWebSocketServletIntegrationTest.java
index 927eeab1..889a55cb 100644
--- a/subprojects/language-web/src/test/java/tools/refinery/language/web/ProblemWebSocketServletIntegrationTest.java
+++ b/subprojects/language-web/src/test/java/tools/refinery/language/web/ProblemWebSocketServletIntegrationTest.java
@@ -93,7 +93,7 @@ class ProblemWebSocketServletIntegrationTest {
93 clientSocket.waitForTestResult(); 93 clientSocket.waitForTestResult();
94 assertThat(clientSocket.getCloseStatusCode(), equalTo(StatusCode.NORMAL)); 94 assertThat(clientSocket.getCloseStatusCode(), equalTo(StatusCode.NORMAL));
95 var responses = clientSocket.getResponses(); 95 var responses = clientSocket.getResponses();
96 assertThat(responses, hasSize(5)); 96 assertThat(responses, hasSize(8));
97 assertThat(responses.get(0), equalTo("{\"id\":\"foo\",\"response\":{\"stateId\":\"-80000000\"}}")); 97 assertThat(responses.get(0), equalTo("{\"id\":\"foo\",\"response\":{\"stateId\":\"-80000000\"}}"));
98 assertThat(responses.get(1), startsWith( 98 assertThat(responses.get(1), startsWith(
99 "{\"resource\":\"test.problem\",\"stateId\":\"-80000000\",\"service\":\"highlight\"," + 99 "{\"resource\":\"test.problem\",\"stateId\":\"-80000000\",\"service\":\"highlight\"," +
@@ -101,10 +101,19 @@ class ProblemWebSocketServletIntegrationTest {
101 assertThat(responses.get(2), equalTo( 101 assertThat(responses.get(2), equalTo(
102 "{\"resource\":\"test.problem\",\"stateId\":\"-80000000\",\"service\":\"validate\"," + 102 "{\"resource\":\"test.problem\",\"stateId\":\"-80000000\",\"service\":\"validate\"," +
103 "\"push\":{\"issues\":[]}}")); 103 "\"push\":{\"issues\":[]}}"));
104 assertThat(responses.get(3), equalTo("{\"id\":\"bar\",\"response\":{\"stateId\":\"-7fffffff\"}}")); 104 assertThat(responses.get(3), startsWith(
105 assertThat(responses.get(4), startsWith( 105 "{\"resource\":\"test.problem\",\"stateId\":\"-80000000\",\"service\":\"semantics\"," +
106 "\"push\":{"));
107 assertThat(responses.get(4), equalTo("{\"id\":\"bar\",\"response\":{\"stateId\":\"-7fffffff\"}}"));
108 assertThat(responses.get(5), startsWith(
106 "{\"resource\":\"test.problem\",\"stateId\":\"-7fffffff\",\"service\":\"highlight\"," + 109 "{\"resource\":\"test.problem\",\"stateId\":\"-7fffffff\",\"service\":\"highlight\"," +
107 "\"push\":{\"regions\":[")); 110 "\"push\":{\"regions\":["));
111 assertThat(responses.get(6), equalTo(
112 "{\"resource\":\"test.problem\",\"stateId\":\"-7fffffff\",\"service\":\"validate\"," +
113 "\"push\":{\"issues\":[]}}"));
114 assertThat(responses.get(7), startsWith(
115 "{\"resource\":\"test.problem\",\"stateId\":\"-7fffffff\",\"service\":\"semantics\"," +
116 "\"push\":{"));
108 } 117 }
109 118
110 @WebSocket 119 @WebSocket
@@ -117,14 +126,14 @@ class ProblemWebSocketServletIntegrationTest {
117 "\"fullText\":\"class Person.\n\"}}", 126 "\"fullText\":\"class Person.\n\"}}",
118 Callback.NOOP 127 Callback.NOOP
119 ); 128 );
120 case 3 -> //noinspection TextBlockMigration 129 case 4 -> //noinspection TextBlockMigration
121 session.sendText( 130 session.sendText(
122 "{\"id\":\"bar\",\"request\":{\"resource\":\"test.problem\",\"serviceType\":\"update\"," + 131 "{\"id\":\"bar\",\"request\":{\"resource\":\"test.problem\",\"serviceType\":\"update\"," +
123 "\"requiredStateId\":\"-80000000\",\"deltaText\":\"indiv q.\nnode(q).\n\"," + 132 "\"requiredStateId\":\"-80000000\",\"deltaText\":\"indiv q.\nnode(q).\n\"," +
124 "\"deltaOffset\":\"0\",\"deltaReplaceLength\":\"0\"}}", 133 "\"deltaOffset\":\"0\",\"deltaReplaceLength\":\"0\"}}",
125 Callback.NOOP 134 Callback.NOOP
126 ); 135 );
127 case 5 -> session.close(); 136 case 8 -> session.close();
128 } 137 }
129 } 138 }
130 } 139 }
diff --git a/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/ProblemWebInjectorProvider.java b/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/ProblemWebInjectorProvider.java
index 4a5eed95..e9d889c4 100644
--- a/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/ProblemWebInjectorProvider.java
+++ b/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/ProblemWebInjectorProvider.java
@@ -34,6 +34,7 @@ public class ProblemWebInjectorProvider extends ProblemInjectorProvider {
34 // the tasks in the service and the {@link 34 // the tasks in the service and the {@link
35 // org.eclipse.xtext.testing.extensions.InjectionExtension}. 35 // org.eclipse.xtext.testing.extensions.InjectionExtension}.
36 return new ProblemWebModule() { 36 return new ProblemWebModule() {
37 @Override
37 @SuppressWarnings("unused") 38 @SuppressWarnings("unused")
38 public Class<? extends ExecutorServiceProvider> bindExecutorServiceProvider() { 39 public Class<? extends ExecutorServiceProvider> bindExecutorServiceProvider() {
39 return AwaitTerminationExecutorServiceProvider.class; 40 return AwaitTerminationExecutorServiceProvider.class;
diff --git a/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/RestartableCachedThreadPool.java b/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/RestartableCachedThreadPool.java
index 09079aa8..991ff114 100644
--- a/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/RestartableCachedThreadPool.java
+++ b/subprojects/language-web/src/test/java/tools/refinery/language/web/tests/RestartableCachedThreadPool.java
@@ -35,7 +35,7 @@ public class RestartableCachedThreadPool implements ExecutorService {
35 public void waitForTermination() { 35 public void waitForTermination() {
36 boolean result = false; 36 boolean result = false;
37 try { 37 try {
38 result = delegate.awaitTermination(1, TimeUnit.SECONDS); 38 result = delegate.awaitTermination(10, TimeUnit.SECONDS);
39 } catch (InterruptedException e) { 39 } catch (InterruptedException e) {
40 LOG.warn("Interrupted while waiting for delegate executor to stop", e); 40 LOG.warn("Interrupted while waiting for delegate executor to stop", e);
41 } 41 }
diff --git a/subprojects/language-web/src/test/java/tools/refinery/language/web/xtext/servlet/TransactionExecutorTest.java b/subprojects/language-web/src/test/java/tools/refinery/language/web/xtext/servlet/TransactionExecutorTest.java
index 841bacd3..22ce1b47 100644
--- a/subprojects/language-web/src/test/java/tools/refinery/language/web/xtext/servlet/TransactionExecutorTest.java
+++ b/subprojects/language-web/src/test/java/tools/refinery/language/web/xtext/servlet/TransactionExecutorTest.java
@@ -18,6 +18,7 @@ import org.junit.jupiter.api.Test;
18import org.junit.jupiter.api.extension.ExtendWith; 18import org.junit.jupiter.api.extension.ExtendWith;
19import org.mockito.ArgumentCaptor; 19import org.mockito.ArgumentCaptor;
20import org.mockito.junit.jupiter.MockitoExtension; 20import org.mockito.junit.jupiter.MockitoExtension;
21import tools.refinery.language.web.semantics.SemanticsService;
21import tools.refinery.language.web.tests.AwaitTerminationExecutorServiceProvider; 22import tools.refinery.language.web.tests.AwaitTerminationExecutorServiceProvider;
22import tools.refinery.language.web.tests.ProblemWebInjectorProvider; 23import tools.refinery.language.web.tests.ProblemWebInjectorProvider;
23import tools.refinery.language.web.xtext.server.ResponseHandler; 24import tools.refinery.language.web.xtext.server.ResponseHandler;
@@ -59,11 +60,16 @@ class TransactionExecutorTest {
59 @Inject 60 @Inject
60 private AwaitTerminationExecutorServiceProvider executorServices; 61 private AwaitTerminationExecutorServiceProvider executorServices;
61 62
63 @Inject
64 private SemanticsService semanticsService;
65
62 private TransactionExecutor transactionExecutor; 66 private TransactionExecutor transactionExecutor;
63 67
64 @BeforeEach 68 @BeforeEach
65 void beforeEach() { 69 void beforeEach() {
66 transactionExecutor = new TransactionExecutor(new SimpleSession(), resourceServiceProviderRegistry); 70 transactionExecutor = new TransactionExecutor(new SimpleSession(), resourceServiceProviderRegistry);
71 // Manually re-create the semantics analysis thread pool if it was disposed by the previous test.
72 semanticsService.setExecutorServiceProvider(executorServices);
67 } 73 }
68 74
69 @Test 75 @Test
@@ -95,7 +101,7 @@ class TransactionExecutorTest {
95 "0"))); 101 "0")));
96 102
97 var captor = newCaptor(); 103 var captor = newCaptor();
98 verify(responseHandler, times(2)).onResponse(captor.capture()); 104 verify(responseHandler, times(4)).onResponse(captor.capture());
99 var newStateId = getStateId("bar", captor.getAllValues().get(0)); 105 var newStateId = getStateId("bar", captor.getAllValues().get(0));
100 assertHighlightingResponse(newStateId, captor.getAllValues().get(1)); 106 assertHighlightingResponse(newStateId, captor.getAllValues().get(1));
101 } 107 }
@@ -126,7 +132,7 @@ class TransactionExecutorTest {
126 private String updateFullText(ArgumentCaptor<XtextWebResponse> captor) throws ResponseHandlerException { 132 private String updateFullText(ArgumentCaptor<XtextWebResponse> captor) throws ResponseHandlerException {
127 var responseHandler = sendRequestAndWaitForAllResponses(new XtextWebRequest("foo", UPDATE_FULL_TEXT_PARAMS)); 133 var responseHandler = sendRequestAndWaitForAllResponses(new XtextWebRequest("foo", UPDATE_FULL_TEXT_PARAMS));
128 134
129 verify(responseHandler, times(3)).onResponse(captor.capture()); 135 verify(responseHandler, times(4)).onResponse(captor.capture());
130 return getStateId("foo", captor.getAllValues().get(0)); 136 return getStateId("foo", captor.getAllValues().get(0));
131 } 137 }
132 138
diff --git a/subprojects/language/build.gradle.kts b/subprojects/language/build.gradle.kts
index bac1e586..a6324e03 100644
--- a/subprojects/language/build.gradle.kts
+++ b/subprojects/language/build.gradle.kts
@@ -51,8 +51,8 @@ val generateXtextLanguage by tasks.registering(JavaExec::class) {
51 inputs.file("../language-model/src/main/resources/model/problem.genmodel") 51 inputs.file("../language-model/src/main/resources/model/problem.genmodel")
52 outputs.dir("src/main/xtext-gen") 52 outputs.dir("src/main/xtext-gen")
53 outputs.dir("src/testFixtures/xtext-gen") 53 outputs.dir("src/testFixtures/xtext-gen")
54 outputs.dir("$buildDir/generated/sources/xtext/ide") 54 outputs.dir(layout.buildDirectory.dir("generated/sources/xtext/ide"))
55 outputs.dir("$buildDir/generated/sources/xtext/web") 55 outputs.dir(layout.buildDirectory.dir("generated/sources/xtext/web"))
56 args("src/main/java/tools/refinery/language/GenerateProblem.mwe2", "-p", "rootPath=/$projectDir/..") 56 args("src/main/java/tools/refinery/language/GenerateProblem.mwe2", "-p", "rootPath=/$projectDir/..")
57} 57}
58 58
@@ -85,11 +85,11 @@ tasks {
85} 85}
86 86
87artifacts { 87artifacts {
88 add(generatedIdeSources.name, file("$buildDir/generated/sources/xtext/ide")) { 88 add(generatedIdeSources.name, layout.buildDirectory.dir("generated/sources/xtext/ide")) {
89 builtBy(generateXtextLanguage) 89 builtBy(generateXtextLanguage)
90 } 90 }
91 91
92 add(generatedWebSources.name, file("$buildDir/generated/sources/xtext/web")) { 92 add(generatedWebSources.name, layout.buildDirectory.dir("generated/sources/xtext/web")) {
93 builtBy(generateXtextLanguage) 93 builtBy(generateXtextLanguage)
94 } 94 }
95} 95}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext b/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext
index 9e330347..0a91178b 100644
--- a/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext
+++ b/subprojects/language/src/main/java/tools/refinery/language/Problem.xtext
@@ -14,7 +14,7 @@ Problem:
14 14
15Statement: 15Statement:
16 Assertion | ClassDeclaration | EnumDeclaration | 16 Assertion | ClassDeclaration | EnumDeclaration |
17 PredicateDefinition | FunctionDefinition | /* RuleDefinition | */ 17 PredicateDefinition | /* FunctionDefinition | RuleDefinition | */
18 ScopeDeclaration | IndividualDeclaration; 18 ScopeDeclaration | IndividualDeclaration;
19 19
20ClassDeclaration: 20ClassDeclaration:
@@ -32,7 +32,7 @@ EnumLiteral returns Node:
32 name=Identifier; 32 name=Identifier;
33 33
34FeatureDeclaration: 34FeatureDeclaration:
35 ReferenceDeclaration | AttributeDeclaration | FlagDeclaration; 35 ReferenceDeclaration /* | AttributeDeclaration | FlagDeclaration */;
36 36
37enum ReferenceKind: 37enum ReferenceKind:
38 REFERENCE="refers" | CONTAINMENT="contains" | CONTAINER="container"; 38 REFERENCE="refers" | CONTAINMENT="contains" | CONTAINER="container";
@@ -44,23 +44,17 @@ ReferenceDeclaration:
44 name=Identifier 44 name=Identifier
45 ("opposite" opposite=[ReferenceDeclaration|QualifiedName])?; 45 ("opposite" opposite=[ReferenceDeclaration|QualifiedName])?;
46 46
47enum PrimitiveType: 47//enum PrimitiveType:
48 INT="int" | REAL="real" | STRING="string"; 48// INT="int" | REAL="real" | STRING="string";
49 49//
50AttributeDeclaration: 50//AttributeDeclaration:
51 attributeType=PrimitiveType name=Identifier; 51// attributeType=PrimitiveType name=Identifier;
52 52//
53FlagDeclaration: 53//FlagDeclaration:
54 "bool" name=Identifier; 54// "bool" name=Identifier;
55
56enum ErrorKind returns PredicateKind:
57 ERROR="error";
58
59enum PredicateKind:
60 ERROR="error" | CONTAINED="contained" | CONTAINMENT="containment";
61 55
62PredicateDefinition: 56PredicateDefinition:
63 (kind=ErrorKind | kind=PredicateKind? "pred") 57 ("pred" | error?="error" "pred"?)
64 name=Identifier 58 name=Identifier
65 "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" 59 "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")"
66 ("<->" bodies+=Conjunction (";" bodies+=Conjunction)*)? 60 ("<->" bodies+=Conjunction (";" bodies+=Conjunction)*)?
@@ -69,14 +63,14 @@ PredicateDefinition:
69Conjunction: 63Conjunction:
70 literals+=Expr ("," literals+=Expr)*; 64 literals+=Expr ("," literals+=Expr)*;
71 65
72FunctionDefinition: 66//FunctionDefinition:
73 "fn" functionType=PrimitiveType name=Identifier 67// "fn" functionType=PrimitiveType name=Identifier
74 "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")" 68// "(" (parameters+=Parameter ("," parameters+=Parameter)*)? ")"
75 ("=" cases+=Case (";" cases+=Case)*)? 69// ("=" cases+=Case (";" cases+=Case)*)?
76 "."; 70// ".";
77 71//
78Case: 72//Case:
79 Conjunction ({Match.condition=current} "->" value=Expr)?; 73// Conjunction ({Match.condition=current} "->" value=Expr)?;
80 74
81//RuleDefinition: 75//RuleDefinition:
82// "rule" 76// "rule"
@@ -87,7 +81,7 @@ Case:
87// "."; 81// ".";
88 82
89Parameter: 83Parameter:
90 (modality=Modality? parameterType=[Relation|QualifiedName])? name=Identifier; 84 parameterType=[Relation|QualifiedName]? name=Identifier;
91 85
92//Consequent: 86//Consequent:
93// actions+=Action ("," actions+=Action)*; 87// actions+=Action ("," actions+=Action)*;
@@ -268,7 +262,7 @@ NonContainmentQualifiedName hidden():
268 NonContainmentIdentifier ("::" Identifier)*; 262 NonContainmentIdentifier ("::" Identifier)*;
269 263
270Identifier: 264Identifier:
271 NonContainmentIdentifier | "contains"; 265 NonContainmentIdentifier | "contains" | "container";
272 266
273NonContainmentIdentifier: 267NonContainmentIdentifier:
274 ID | "contained" | "sum" | "prod" | "min" | "max"; 268 ID | "contained" | "sum" | "prod" | "min" | "max";
diff --git a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemDerivedStateComputer.java b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemDerivedStateComputer.java
index b145ef27..31eb55a6 100644
--- a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemDerivedStateComputer.java
+++ b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemDerivedStateComputer.java
@@ -18,6 +18,7 @@ import org.eclipse.xtext.resource.DerivedStateAwareResource;
18import org.eclipse.xtext.resource.IDerivedStateComputer; 18import org.eclipse.xtext.resource.IDerivedStateComputer;
19import org.eclipse.xtext.resource.XtextResource; 19import org.eclipse.xtext.resource.XtextResource;
20import tools.refinery.language.model.problem.*; 20import tools.refinery.language.model.problem.*;
21import tools.refinery.language.utils.ProblemUtil;
21 22
22import java.util.*; 23import java.util.*;
23import java.util.function.Function; 24import java.util.function.Function;
@@ -58,7 +59,7 @@ public class ProblemDerivedStateComputer implements IDerivedStateComputer {
58 } 59 }
59 60
60 protected void installDerivedProblemState(Problem problem, Adapter adapter, boolean preLinkingPhase) { 61 protected void installDerivedProblemState(Problem problem, Adapter adapter, boolean preLinkingPhase) {
61 installNewNodes(problem, adapter); 62 installDerivedClassDeclarationState(problem, adapter);
62 if (preLinkingPhase) { 63 if (preLinkingPhase) {
63 return; 64 return;
64 } 65 }
@@ -66,24 +67,67 @@ public class ProblemDerivedStateComputer implements IDerivedStateComputer {
66 derivedVariableComputer.installDerivedVariables(problem, nodeNames); 67 derivedVariableComputer.installDerivedVariables(problem, nodeNames);
67 } 68 }
68 69
69 protected void installNewNodes(Problem problem, Adapter adapter) { 70 protected void installDerivedClassDeclarationState(Problem problem, Adapter adapter) {
70 for (Statement statement : problem.getStatements()) { 71 for (var statement : problem.getStatements()) {
71 if (statement instanceof ClassDeclaration declaration && !declaration.isAbstract() 72 if (statement instanceof ClassDeclaration classDeclaration) {
72 && declaration.getNewNode() == null) { 73 installOrRemoveNewNode(adapter, classDeclaration);
74 for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) {
75 if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) {
76 installOrRemoveInvalidMultiplicityPredicate(adapter, classDeclaration, referenceDeclaration);
77 }
78 }
79 }
80 }
81 }
82
83 protected void installOrRemoveNewNode(Adapter adapter, ClassDeclaration declaration) {
84 if (declaration.isAbstract()) {
85 var newNode = declaration.getNewNode();
86 if (newNode != null) {
87 declaration.setNewNode(null);
88 adapter.removeNewNode(declaration);
89 }
90 } else {
91 if (declaration.getNewNode() == null) {
73 var newNode = adapter.createNewNodeIfAbsent(declaration, key -> createNode(NEW_NODE)); 92 var newNode = adapter.createNewNodeIfAbsent(declaration, key -> createNode(NEW_NODE));
74 declaration.setNewNode(newNode); 93 declaration.setNewNode(newNode);
75 } 94 }
76 } 95 }
77 } 96 }
78 97
98 protected void installOrRemoveInvalidMultiplicityPredicate(
99 Adapter adapter, ClassDeclaration containingClassDeclaration, ReferenceDeclaration declaration) {
100 if (ProblemUtil.hasMultiplicityConstraint(declaration)) {
101 if (declaration.getInvalidMultiplicity() == null) {
102 var invalidMultiplicity = adapter.createInvalidMultiplicityPredicateIfAbsent(declaration, key -> {
103 var predicate = ProblemFactory.eINSTANCE.createPredicateDefinition();
104 predicate.setError(true);
105 predicate.setName("invalidMultiplicity");
106 var parameter = ProblemFactory.eINSTANCE.createParameter();
107 parameter.setParameterType(containingClassDeclaration);
108 parameter.setName("node");
109 predicate.getParameters().add(parameter);
110 return predicate;
111 });
112 declaration.setInvalidMultiplicity(invalidMultiplicity);
113 }
114 } else {
115 var invalidMultiplicity = declaration.getInvalidMultiplicity();
116 if (invalidMultiplicity != null) {
117 declaration.setInvalidMultiplicity(null);
118 adapter.removeInvalidMultiplicityPredicate(declaration);
119 }
120 }
121 }
122
79 protected Set<String> installDerivedNodes(Problem problem) { 123 protected Set<String> installDerivedNodes(Problem problem) {
80 var collector = nodeNameCollectorProvider.get(); 124 var collector = nodeNameCollectorProvider.get();
81 collector.collectNodeNames(problem); 125 collector.collectNodeNames(problem);
82 Set<String> nodeNames = collector.getNodeNames(); 126 Set<String> nodeNames = collector.getNodeNames();
83 List<Node> grapNodes = problem.getNodes(); 127 List<Node> graphNodes = problem.getNodes();
84 for (String nodeName : nodeNames) { 128 for (String nodeName : nodeNames) {
85 var graphNode = createNode(nodeName); 129 var graphNode = createNode(nodeName);
86 grapNodes.add(graphNode); 130 graphNodes.add(graphNode);
87 } 131 }
88 return nodeNames; 132 return nodeNames;
89 } 133 }
@@ -104,15 +148,24 @@ public class ProblemDerivedStateComputer implements IDerivedStateComputer {
104 } 148 }
105 149
106 protected void discardDerivedProblemState(Problem problem, Adapter adapter) { 150 protected void discardDerivedProblemState(Problem problem, Adapter adapter) {
107 Set<ClassDeclaration> classDeclarations = new HashSet<>(); 151 var abstractClassDeclarations = new HashSet<ClassDeclaration>();
152 var referenceDeclarationsWithMultiplicity = new HashSet<ReferenceDeclaration>();
108 problem.getNodes().clear(); 153 problem.getNodes().clear();
109 for (var statement : problem.getStatements()) { 154 for (var statement : problem.getStatements()) {
110 if (statement instanceof ClassDeclaration classDeclaration) { 155 if (statement instanceof ClassDeclaration classDeclaration) {
111 classDeclaration.setNewNode(null); 156 classDeclaration.setNewNode(null);
112 classDeclarations.add(classDeclaration); 157 if (classDeclaration.isAbstract()) {
158 abstractClassDeclarations.add(classDeclaration);
159 }
160 for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) {
161 if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration &&
162 ProblemUtil.hasMultiplicityConstraint(referenceDeclaration)) {
163 referenceDeclarationsWithMultiplicity.add(referenceDeclaration);
164 }
165 }
113 } 166 }
114 } 167 }
115 adapter.retainAll(classDeclarations); 168 adapter.retainAll(abstractClassDeclarations, referenceDeclarationsWithMultiplicity);
116 derivedVariableComputer.discardDerivedVariables(problem); 169 derivedVariableComputer.discardDerivedVariables(problem);
117 } 170 }
118 171
@@ -134,14 +187,31 @@ public class ProblemDerivedStateComputer implements IDerivedStateComputer {
134 187
135 protected static class Adapter extends AdapterImpl { 188 protected static class Adapter extends AdapterImpl {
136 private final Map<ClassDeclaration, Node> newNodes = new HashMap<>(); 189 private final Map<ClassDeclaration, Node> newNodes = new HashMap<>();
190 private final Map<ReferenceDeclaration, PredicateDefinition> invalidMultiplicityPredicates = new HashMap<>();
137 191
138 public Node createNewNodeIfAbsent(ClassDeclaration classDeclaration, 192 public Node createNewNodeIfAbsent(ClassDeclaration classDeclaration,
139 Function<ClassDeclaration, Node> createNode) { 193 Function<ClassDeclaration, Node> createNode) {
140 return newNodes.computeIfAbsent(classDeclaration, createNode); 194 return newNodes.computeIfAbsent(classDeclaration, createNode);
141 } 195 }
142 196
143 public void retainAll(Collection<ClassDeclaration> classDeclarations) { 197 public void removeNewNode(ClassDeclaration classDeclaration) {
144 newNodes.keySet().retainAll(classDeclarations); 198 newNodes.remove(classDeclaration);
199 }
200
201 public PredicateDefinition createInvalidMultiplicityPredicateIfAbsent(
202 ReferenceDeclaration referenceDeclaration,
203 Function<ReferenceDeclaration, PredicateDefinition> createPredicate) {
204 return invalidMultiplicityPredicates.computeIfAbsent(referenceDeclaration, createPredicate);
205 }
206
207 public void removeInvalidMultiplicityPredicate(ReferenceDeclaration referenceDeclaration) {
208 invalidMultiplicityPredicates.remove(referenceDeclaration);
209 }
210
211 public void retainAll(Collection<ClassDeclaration> abstractClassDeclarations,
212 Collection<ReferenceDeclaration> referenceDeclarationsWithMultiplicity) {
213 newNodes.keySet().retainAll(abstractClassDeclarations);
214 invalidMultiplicityPredicates.keySet().retainAll(referenceDeclarationsWithMultiplicity);
145 } 215 }
146 216
147 @Override 217 @Override
diff --git a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemLocationInFileProvider.java b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemLocationInFileProvider.java
index 1fe2df89..29eaad84 100644
--- a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemLocationInFileProvider.java
+++ b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemLocationInFileProvider.java
@@ -8,7 +8,6 @@ package tools.refinery.language.resource;
8import org.eclipse.emf.ecore.EObject; 8import org.eclipse.emf.ecore.EObject;
9import org.eclipse.xtext.resource.DefaultLocationInFileProvider; 9import org.eclipse.xtext.resource.DefaultLocationInFileProvider;
10import org.eclipse.xtext.util.ITextRegion; 10import org.eclipse.xtext.util.ITextRegion;
11
12import tools.refinery.language.model.problem.ImplicitVariable; 11import tools.refinery.language.model.problem.ImplicitVariable;
13import tools.refinery.language.model.problem.Node; 12import tools.refinery.language.model.problem.Node;
14import tools.refinery.language.utils.ProblemUtil; 13import tools.refinery.language.utils.ProblemUtil;
diff --git a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java
index 630be379..a16f77eb 100644
--- a/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java
+++ b/subprojects/language/src/main/java/tools/refinery/language/resource/ProblemResourceDescriptionStrategy.java
@@ -5,6 +5,9 @@
5 */ 5 */
6package tools.refinery.language.resource; 6package tools.refinery.language.resource;
7 7
8import com.google.common.collect.ImmutableMap;
9import com.google.inject.Inject;
10import com.google.inject.Singleton;
8import org.eclipse.emf.ecore.EObject; 11import org.eclipse.emf.ecore.EObject;
9import org.eclipse.xtext.EcoreUtil2; 12import org.eclipse.xtext.EcoreUtil2;
10import org.eclipse.xtext.naming.IQualifiedNameConverter; 13import org.eclipse.xtext.naming.IQualifiedNameConverter;
@@ -13,19 +16,18 @@ import org.eclipse.xtext.resource.EObjectDescription;
13import org.eclipse.xtext.resource.IEObjectDescription; 16import org.eclipse.xtext.resource.IEObjectDescription;
14import org.eclipse.xtext.resource.impl.DefaultResourceDescriptionStrategy; 17import org.eclipse.xtext.resource.impl.DefaultResourceDescriptionStrategy;
15import org.eclipse.xtext.util.IAcceptor; 18import org.eclipse.xtext.util.IAcceptor;
16 19import tools.refinery.language.model.problem.*;
17import com.google.inject.Inject;
18import com.google.inject.Singleton;
19
20import tools.refinery.language.model.problem.NamedElement;
21import tools.refinery.language.model.problem.Node;
22import tools.refinery.language.model.problem.Problem;
23import tools.refinery.language.model.problem.Variable;
24import tools.refinery.language.naming.NamingUtil; 20import tools.refinery.language.naming.NamingUtil;
25import tools.refinery.language.utils.ProblemUtil; 21import tools.refinery.language.utils.ProblemUtil;
26 22
23import java.util.Map;
24
27@Singleton 25@Singleton
28public class ProblemResourceDescriptionStrategy extends DefaultResourceDescriptionStrategy { 26public class ProblemResourceDescriptionStrategy extends DefaultResourceDescriptionStrategy {
27 public static final String ERROR_PREDICATE = "tools.refinery.language.resource" +
28 ".ProblemResourceDescriptionStrategy.ERROR_PREDICATE";
29 public static final String ERROR_PREDICATE_TRUE = "true";
30
29 @Inject 31 @Inject
30 private IQualifiedNameConverter qualifiedNameConverter; 32 private IQualifiedNameConverter qualifiedNameConverter;
31 33
@@ -40,9 +42,10 @@ public class ProblemResourceDescriptionStrategy extends DefaultResourceDescripti
40 } 42 }
41 var problem = EcoreUtil2.getContainerOfType(eObject, Problem.class); 43 var problem = EcoreUtil2.getContainerOfType(eObject, Problem.class);
42 var problemQualifiedName = getNameAsQualifiedName(problem); 44 var problemQualifiedName = getNameAsQualifiedName(problem);
45 var userData = getUserData(eObject);
43 boolean nameExported; 46 boolean nameExported;
44 if (shouldExportSimpleName(eObject)) { 47 if (shouldExportSimpleName(eObject)) {
45 acceptEObjectDescription(eObject, problemQualifiedName, qualifiedName, acceptor); 48 acceptEObjectDescription(eObject, problemQualifiedName, qualifiedName, userData, acceptor);
46 nameExported = true; 49 nameExported = true;
47 } else { 50 } else {
48 nameExported = false; 51 nameExported = false;
@@ -56,7 +59,7 @@ public class ProblemResourceDescriptionStrategy extends DefaultResourceDescripti
56 } 59 }
57 qualifiedName = parentQualifiedName.append(qualifiedName); 60 qualifiedName = parentQualifiedName.append(qualifiedName);
58 if (shouldExportSimpleName(parent)) { 61 if (shouldExportSimpleName(parent)) {
59 acceptEObjectDescription(eObject, problemQualifiedName, qualifiedName, acceptor); 62 acceptEObjectDescription(eObject, problemQualifiedName, qualifiedName, userData, acceptor);
60 nameExported = true; 63 nameExported = true;
61 } else { 64 } else {
62 nameExported = false; 65 nameExported = false;
@@ -64,16 +67,15 @@ public class ProblemResourceDescriptionStrategy extends DefaultResourceDescripti
64 parent = parent.eContainer(); 67 parent = parent.eContainer();
65 } 68 }
66 if (!nameExported) { 69 if (!nameExported) {
67 acceptEObjectDescription(eObject, problemQualifiedName, qualifiedName, acceptor); 70 acceptEObjectDescription(eObject, problemQualifiedName, qualifiedName, userData, acceptor);
68 } 71 }
69 return true; 72 return true;
70 } 73 }
71 74
72 protected QualifiedName getNameAsQualifiedName(EObject eObject) { 75 protected QualifiedName getNameAsQualifiedName(EObject eObject) {
73 if (!(eObject instanceof NamedElement)) { 76 if (!(eObject instanceof NamedElement namedElement)) {
74 return null; 77 return null;
75 } 78 }
76 var namedElement = (NamedElement) eObject;
77 var name = namedElement.getName(); 79 var name = namedElement.getName();
78 if (NamingUtil.isNullOrEmpty(name)) { 80 if (NamingUtil.isNullOrEmpty(name)) {
79 return null; 81 return null;
@@ -93,16 +95,28 @@ public class ProblemResourceDescriptionStrategy extends DefaultResourceDescripti
93 return true; 95 return true;
94 } 96 }
95 97
98 protected Map<String, String> getUserData(EObject eObject) {
99 var builder = ImmutableMap.<String, String>builder();
100 if (eObject instanceof PredicateDefinition predicateDefinition && predicateDefinition.isError()) {
101 builder.put(ERROR_PREDICATE, ERROR_PREDICATE_TRUE);
102 }
103 return builder.build();
104 }
105
96 protected boolean shouldExportSimpleName(EObject eObject) { 106 protected boolean shouldExportSimpleName(EObject eObject) {
97 if (eObject instanceof Node node) { 107 if (eObject instanceof Node node) {
98 return !ProblemUtil.isNewNode(node); 108 return !ProblemUtil.isNewNode(node);
99 } 109 }
110 if (eObject instanceof PredicateDefinition predicateDefinition) {
111 return !ProblemUtil.isInvalidMultiplicityConstraint(predicateDefinition);
112 }
100 return true; 113 return true;
101 } 114 }
102 115
103 private void acceptEObjectDescription(EObject eObject, QualifiedName prefix, QualifiedName qualifiedName, 116 private void acceptEObjectDescription(EObject eObject, QualifiedName prefix, QualifiedName qualifiedName,
104 IAcceptor<IEObjectDescription> acceptor) { 117 Map<String, String> userData, IAcceptor<IEObjectDescription> acceptor) {
105 var qualifiedNameWithPrefix = prefix == null ? qualifiedName : prefix.append(qualifiedName); 118 var qualifiedNameWithPrefix = prefix == null ? qualifiedName : prefix.append(qualifiedName);
106 acceptor.accept(EObjectDescription.create(qualifiedNameWithPrefix, eObject)); 119 var description = EObjectDescription.create(qualifiedNameWithPrefix, eObject, userData);
120 acceptor.accept(description);
107 } 121 }
108} 122}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java b/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java
index c8c7fd4a..c87fa044 100644
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java
+++ b/subprojects/language/src/main/java/tools/refinery/language/utils/BuiltinSymbols.java
@@ -7,7 +7,7 @@ package tools.refinery.language.utils;
7 7
8import tools.refinery.language.model.problem.*; 8import tools.refinery.language.model.problem.*;
9 9
10public record BuiltinSymbols(Problem problem, ClassDeclaration node, ReferenceDeclaration equals, 10public record BuiltinSymbols(Problem problem, ClassDeclaration node, PredicateDefinition equals,
11 PredicateDefinition exists, PredicateDefinition contained, PredicateDefinition contains, 11 PredicateDefinition exists, ClassDeclaration contained, PredicateDefinition contains,
12 PredicateDefinition root) { 12 PredicateDefinition invalidContainer) {
13} 13}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/CollectedSymbols.java b/subprojects/language/src/main/java/tools/refinery/language/utils/CollectedSymbols.java
deleted file mode 100644
index e4e4d07a..00000000
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/CollectedSymbols.java
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.utils;
7
8import java.util.Map;
9
10import tools.refinery.language.model.problem.Node;
11import tools.refinery.language.model.problem.Relation;
12
13public record CollectedSymbols(Map<Node, NodeInfo> nodes, Map<Relation, RelationInfo> relations) {
14
15}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/ContainmentRole.java b/subprojects/language/src/main/java/tools/refinery/language/utils/ContainmentRole.java
deleted file mode 100644
index a43c7dfe..00000000
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/ContainmentRole.java
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.utils;
7
8import tools.refinery.language.model.problem.PredicateKind;
9
10public enum ContainmentRole {
11 NONE,
12 CONTAINED,
13 CONTAINMENT;
14
15 public static ContainmentRole fromPredicateKind(PredicateKind predicateKind) {
16 return switch (predicateKind) {
17 case CONTAINED -> CONTAINED;
18 case CONTAINMENT -> CONTAINMENT;
19 default -> NONE;
20 };
21 }
22}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/NodeInfo.java b/subprojects/language/src/main/java/tools/refinery/language/utils/NodeInfo.java
deleted file mode 100644
index 0fa7a454..00000000
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/NodeInfo.java
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.utils;
7
8public record NodeInfo(String name, boolean individual) {
9}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java
index 738a0896..59e26561 100644
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java
+++ b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemDesugarer.java
@@ -6,7 +6,6 @@
6package tools.refinery.language.utils; 6package tools.refinery.language.utils;
7 7
8import com.google.inject.Inject; 8import com.google.inject.Inject;
9import com.google.inject.Provider;
10import com.google.inject.Singleton; 9import com.google.inject.Singleton;
11import org.eclipse.emf.ecore.EObject; 10import org.eclipse.emf.ecore.EObject;
12import org.eclipse.emf.ecore.resource.Resource; 11import org.eclipse.emf.ecore.resource.Resource;
@@ -21,9 +20,6 @@ public class ProblemDesugarer {
21 @Inject 20 @Inject
22 private IResourceScopeCache cache = IResourceScopeCache.NullImpl.INSTANCE; 21 private IResourceScopeCache cache = IResourceScopeCache.NullImpl.INSTANCE;
23 22
24 @Inject
25 private Provider<SymbolCollector> symbolCollectorProvider;
26
27 public Optional<Problem> getBuiltinProblem(EObject context) { 23 public Optional<Problem> getBuiltinProblem(EObject context) {
28 return Optional.ofNullable(context).map(EObject::eResource).flatMap(resource -> 24 return Optional.ofNullable(context).map(EObject::eResource).flatMap(resource ->
29 cache.get("builtinProblem", resource, () -> doGetBuiltinProblem(resource))); 25 cache.get("builtinProblem", resource, () -> doGetBuiltinProblem(resource)));
@@ -43,12 +39,12 @@ public class ProblemDesugarer {
43 39
44 private BuiltinSymbols doGetBuiltinSymbols(Problem builtin) { 40 private BuiltinSymbols doGetBuiltinSymbols(Problem builtin) {
45 var node = doGetDeclaration(builtin, ClassDeclaration.class, "node"); 41 var node = doGetDeclaration(builtin, ClassDeclaration.class, "node");
46 var equals = doGetEqualsReference(node); 42 var equals = doGetDeclaration(builtin, PredicateDefinition.class, "equals");
47 var exists = doGetDeclaration(builtin, PredicateDefinition.class, "exists"); 43 var exists = doGetDeclaration(builtin, PredicateDefinition.class, "exists");
48 var contained = doGetDeclaration(builtin, PredicateDefinition.class, "contained"); 44 var contained = doGetDeclaration(builtin, ClassDeclaration.class, "contained");
49 var contains = doGetDeclaration(builtin, PredicateDefinition.class, "contains"); 45 var contains = doGetDeclaration(builtin, PredicateDefinition.class, "contains");
50 var root = doGetDeclaration(builtin, PredicateDefinition.class, "root"); 46 var invalidContainer = doGetDeclaration(builtin, PredicateDefinition.class, "invalidContainer");
51 return new BuiltinSymbols(builtin, node, equals, exists, contained, contains, root); 47 return new BuiltinSymbols(builtin, node, equals, exists, contained, contains, invalidContainer);
52 } 48 }
53 49
54 private <T extends Statement & NamedElement> T doGetDeclaration(Problem builtin, Class<T> type, String name) { 50 private <T extends Statement & NamedElement> T doGetDeclaration(Problem builtin, Class<T> type, String name) {
@@ -57,13 +53,6 @@ public class ProblemDesugarer {
57 .orElseThrow(() -> new IllegalArgumentException("Built-in declaration " + name + " was not found")); 53 .orElseThrow(() -> new IllegalArgumentException("Built-in declaration " + name + " was not found"));
58 } 54 }
59 55
60 private ReferenceDeclaration doGetEqualsReference(ClassDeclaration nodeClassDeclaration) {
61 return (ReferenceDeclaration) nodeClassDeclaration.getFeatureDeclarations().stream()
62 .filter(reference -> reference instanceof ReferenceDeclaration &&
63 "equals".equals(reference.getName())).findFirst()
64 .orElseThrow(() -> new IllegalArgumentException("Reference " + "equals" + " not found"));
65 }
66
67 public Collection<ClassDeclaration> getSuperclassesAndSelf(ClassDeclaration classDeclaration) { 56 public Collection<ClassDeclaration> getSuperclassesAndSelf(ClassDeclaration classDeclaration) {
68 return cache.get(Tuples.create(classDeclaration, "superclassesAndSelf"), classDeclaration.eResource(), 57 return cache.get(Tuples.create(classDeclaration, "superclassesAndSelf"), classDeclaration.eResource(),
69 () -> doGetSuperclassesAndSelf(classDeclaration)); 58 () -> doGetSuperclassesAndSelf(classDeclaration));
@@ -109,9 +98,4 @@ public class ProblemDesugarer {
109 public boolean isContainmentReference(ReferenceDeclaration referenceDeclaration) { 98 public boolean isContainmentReference(ReferenceDeclaration referenceDeclaration) {
110 return referenceDeclaration.getKind() == ReferenceKind.CONTAINMENT; 99 return referenceDeclaration.getKind() == ReferenceKind.CONTAINMENT;
111 } 100 }
112
113 public CollectedSymbols collectSymbols(Problem problem) {
114 return cache.get(Tuples.create(problem, "collectedSymbols"), problem.eResource(),
115 () -> symbolCollectorProvider.get().collectSymbols(problem));
116 }
117} 101}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java
index 9486dc2a..a9efc4bb 100644
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java
+++ b/subprojects/language/src/main/java/tools/refinery/language/utils/ProblemUtil.java
@@ -7,33 +7,12 @@ package tools.refinery.language.utils;
7 7
8import org.eclipse.emf.common.util.URI; 8import org.eclipse.emf.common.util.URI;
9import org.eclipse.emf.ecore.EObject; 9import org.eclipse.emf.ecore.EObject;
10 10import tools.refinery.language.model.problem.*;
11import tools.refinery.language.model.problem.ImplicitVariable;
12import tools.refinery.language.model.problem.Node;
13import tools.refinery.language.model.problem.ProblemPackage;
14import tools.refinery.language.model.problem.Variable;
15 11
16public final class ProblemUtil { 12public final class ProblemUtil {
17 public static final String BUILTIN_LIBRARY_NAME = "builtin"; 13 public static final String BUILTIN_LIBRARY_NAME = "builtin";
18
19 public static final URI BUILTIN_LIBRARY_URI = getLibraryUri(BUILTIN_LIBRARY_NAME); 14 public static final URI BUILTIN_LIBRARY_URI = getLibraryUri(BUILTIN_LIBRARY_NAME);
20 15
21 public static final String NODE_CLASS_NAME = "node";
22
23 public static final String DOMAIN_CLASS_NAME = "domain";
24
25 public static final String DATA_CLASS_NAME = "data";
26
27 public static final String INT_CLASS_NAME = "int";
28
29 public static final String REAL_CLASS_NAME = "real";
30
31 public static final String STRING_CLASS_NAME = "string";
32
33 public static final String EQUALS_RELATION_NAME = "equals";
34
35 public static final String EXISTS_PREDICATE_NAME = "exists";
36
37 private ProblemUtil() { 16 private ProblemUtil() {
38 throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); 17 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
39 } 18 }
@@ -70,6 +49,10 @@ public final class ProblemUtil {
70 } 49 }
71 } 50 }
72 51
52 public static boolean isError(EObject eObject) {
53 return eObject instanceof PredicateDefinition predicateDefinition && predicateDefinition.isError();
54 }
55
73 public static boolean isIndividualNode(Node node) { 56 public static boolean isIndividualNode(Node node) {
74 var containingFeature = node.eContainingFeature(); 57 var containingFeature = node.eContainingFeature();
75 return containingFeature == ProblemPackage.Literals.INDIVIDUAL_DECLARATION__NODES 58 return containingFeature == ProblemPackage.Literals.INDIVIDUAL_DECLARATION__NODES
@@ -80,6 +63,26 @@ public final class ProblemUtil {
80 return node.eContainingFeature() == ProblemPackage.Literals.CLASS_DECLARATION__NEW_NODE; 63 return node.eContainingFeature() == ProblemPackage.Literals.CLASS_DECLARATION__NEW_NODE;
81 } 64 }
82 65
66 public static boolean isInvalidMultiplicityConstraint(PredicateDefinition predicateDefinition) {
67 return predicateDefinition.eContainingFeature() ==
68 ProblemPackage.Literals.REFERENCE_DECLARATION__INVALID_MULTIPLICITY;
69 }
70
71 public static boolean hasMultiplicityConstraint(ReferenceDeclaration referenceDeclaration) {
72 var opposite = referenceDeclaration.getOpposite();
73 if (opposite != null && opposite.getKind() == ReferenceKind.CONTAINMENT) {
74 return false;
75 }
76 var multiplicity = referenceDeclaration.getMultiplicity();
77 if (multiplicity instanceof UnboundedMultiplicity) {
78 return false;
79 }
80 if (multiplicity instanceof RangeMultiplicity rangeMultiplicity) {
81 return rangeMultiplicity.getLowerBound() > 0 || rangeMultiplicity.getUpperBound() >= 0;
82 }
83 return true;
84 }
85
83 private static URI getLibraryUri(String libraryName) { 86 private static URI getLibraryUri(String libraryName) {
84 return URI.createURI(ProblemUtil.class.getClassLoader() 87 return URI.createURI(ProblemUtil.class.getClassLoader()
85 .getResource("tools/refinery/language/%s.problem".formatted(libraryName)).toString()); 88 .getResource("tools/refinery/language/%s.problem".formatted(libraryName)).toString());
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/RelationInfo.java b/subprojects/language/src/main/java/tools/refinery/language/utils/RelationInfo.java
deleted file mode 100644
index 1c46fe72..00000000
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/RelationInfo.java
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.utils;
7
8import tools.refinery.language.model.problem.*;
9
10import java.util.ArrayList;
11import java.util.Collection;
12import java.util.List;
13
14public record RelationInfo(String name, ContainmentRole containmentRole, List<Parameter> parameters,
15 Multiplicity multiplicity, Relation opposite, Collection<Conjunction> bodies,
16 Collection<Assertion> assertions, Collection<TypeScope> typeScopes) {
17 public RelationInfo(String name, ContainmentRole containmentRole, List<Parameter> parameters,
18 Multiplicity multiplicity, Relation opposite, Collection<Conjunction> bodies) {
19 this(name, containmentRole, parameters, multiplicity, opposite, bodies, new ArrayList<>(), new ArrayList<>());
20 }
21
22 public boolean hasDefinition() {
23 return bodies != null && !bodies.isEmpty();
24 }
25
26 public int arity() {
27 return parameters.size();
28 }
29}
diff --git a/subprojects/language/src/main/java/tools/refinery/language/utils/SymbolCollector.java b/subprojects/language/src/main/java/tools/refinery/language/utils/SymbolCollector.java
deleted file mode 100644
index a4ea1113..00000000
--- a/subprojects/language/src/main/java/tools/refinery/language/utils/SymbolCollector.java
+++ /dev/null
@@ -1,255 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.utils;
7
8import com.google.inject.Inject;
9import org.eclipse.emf.ecore.EObject;
10import org.eclipse.xtext.naming.IQualifiedNameConverter;
11import org.eclipse.xtext.naming.IQualifiedNameProvider;
12import tools.refinery.language.model.problem.*;
13
14import java.util.LinkedHashMap;
15import java.util.List;
16import java.util.Map;
17
18class SymbolCollector {
19 @Inject
20 private IQualifiedNameProvider qualifiedNameProvider;
21
22 @Inject
23 private IQualifiedNameConverter qualifiedNameConverter;
24
25 @Inject
26 private ProblemDesugarer desugarer;
27
28 private BuiltinSymbols builtinSymbols;
29
30 private final Map<Node, NodeInfo> nodes = new LinkedHashMap<>();
31
32 private final Map<Relation, RelationInfo> relations = new LinkedHashMap<>();
33
34 public CollectedSymbols collectSymbols(Problem problem) {
35 builtinSymbols = desugarer.getBuiltinSymbols(problem).orElseThrow(() -> new IllegalArgumentException(
36 "Problem has no associated built-in library"));
37 collectOwnSymbols(builtinSymbols.problem());
38 collectOwnSymbols(problem);
39 return new CollectedSymbols(nodes, relations);
40 }
41
42 public void collectOwnSymbols(Problem problem) {
43 collectOwnRelations(problem);
44 collectOwnNodes(problem);
45 collectOwnAssertions(problem);
46 }
47
48 private void collectOwnRelations(Problem problem) {
49 for (var statement : problem.getStatements()) {
50 if (statement instanceof PredicateDefinition predicateDefinition) {
51 collectPredicate(predicateDefinition);
52 } else if (statement instanceof ClassDeclaration classDeclaration) {
53 collectClass(classDeclaration);
54 } else if (statement instanceof EnumDeclaration enumDeclaration) {
55 collectEnum(enumDeclaration);
56 } else if (statement instanceof RuleDefinition) {
57 throw new UnsupportedOperationException("Rules are not currently supported");
58 }
59 }
60 }
61
62 private void collectPredicate(PredicateDefinition predicateDefinition) {
63 var predicateKind = predicateDefinition.getKind();
64 var info = new RelationInfo(getQualifiedNameString(predicateDefinition),
65 ContainmentRole.fromPredicateKind(predicateKind), predicateDefinition.getParameters(), null, null,
66 predicateDefinition.getBodies());
67 relations.put(predicateDefinition, info);
68 }
69
70 private void collectClass(ClassDeclaration classDeclaration) {
71 var contained = classDeclaration != builtinSymbols.node();
72 var containmentRole = contained ? ContainmentRole.CONTAINED : ContainmentRole.NONE;
73 var instanceParameter = ProblemFactory.eINSTANCE.createParameter();
74 instanceParameter.setName("instance");
75 var classInfo = new RelationInfo(getQualifiedNameString(classDeclaration), containmentRole,
76 List.of(instanceParameter), null, null, List.of());
77 relations.put(classDeclaration, classInfo);
78 collectFeatures(classDeclaration);
79 }
80
81 private void collectFeatures(ClassDeclaration classDeclaration) {
82 for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) {
83 if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) {
84 collectReference(classDeclaration, referenceDeclaration);
85 } else if (featureDeclaration instanceof AttributeDeclaration attributeDeclaration) {
86 collectAttribute(classDeclaration, attributeDeclaration);
87 } else if (featureDeclaration instanceof FlagDeclaration flagDeclaration) {
88 collectFlag(classDeclaration, flagDeclaration);
89 } else {
90 throw new IllegalArgumentException("Unknown FeatureDeclaration: " + featureDeclaration);
91 }
92 }
93 }
94
95 private void collectReference(ClassDeclaration classDeclaration, ReferenceDeclaration referenceDeclaration) {
96 var referenceRole = desugarer.isContainmentReference(referenceDeclaration) ?
97 ContainmentRole.CONTAINMENT :
98 ContainmentRole.NONE;
99 var sourceParameter = ProblemFactory.eINSTANCE.createParameter();
100 sourceParameter.setName("source");
101 sourceParameter.setParameterType(classDeclaration);
102 var targetParameter = ProblemFactory.eINSTANCE.createParameter();
103 targetParameter.setName("target");
104 var multiplicity = referenceDeclaration.getMultiplicity();
105 if (multiplicity == null) {
106 var exactMultiplicity = ProblemFactory.eINSTANCE.createExactMultiplicity();
107 exactMultiplicity.setExactValue(1);
108 multiplicity = exactMultiplicity;
109 }
110 targetParameter.setParameterType(referenceDeclaration.getReferenceType());
111 var referenceInfo = new RelationInfo(getQualifiedNameString(referenceDeclaration), referenceRole,
112 List.of(sourceParameter, targetParameter), multiplicity, referenceDeclaration.getOpposite(),
113 List.of());
114 this.relations.put(referenceDeclaration, referenceInfo);
115 }
116
117 private void collectAttribute(ClassDeclaration classDeclaration, AttributeDeclaration attributeDeclaration) {
118 // TODO Implement attribute handling.
119 }
120
121 private void collectFlag(ClassDeclaration classDeclaration, FlagDeclaration flagDeclaration) {
122 var parameter = ProblemFactory.eINSTANCE.createParameter();
123 parameter.setName("object");
124 parameter.setParameterType(classDeclaration);
125 var referenceInfo = new RelationInfo(getQualifiedNameString(flagDeclaration), ContainmentRole.NONE,
126 List.of(parameter), null, null, List.of());
127 this.relations.put(flagDeclaration, referenceInfo);
128 }
129
130 private void collectEnum(EnumDeclaration enumDeclaration) {
131 var instanceParameter = ProblemFactory.eINSTANCE.createParameter();
132 instanceParameter.setName("instance");
133 var info = new RelationInfo(getQualifiedNameString(enumDeclaration), ContainmentRole.NONE,
134 List.of(instanceParameter), null, null, List.of());
135 this.relations.put(enumDeclaration, info);
136 }
137
138 private void collectOwnNodes(Problem problem) {
139 for (var statement : problem.getStatements()) {
140 if (statement instanceof IndividualDeclaration individualDeclaration) {
141 collectIndividuals(individualDeclaration);
142 } else if (statement instanceof ClassDeclaration classDeclaration) {
143 collectNewNode(classDeclaration);
144 } else if (statement instanceof EnumDeclaration enumDeclaration) {
145 collectEnumLiterals(enumDeclaration);
146 }
147 }
148 for (var node : problem.getNodes()) {
149 addNode(node, false);
150 }
151 }
152
153 private void collectIndividuals(IndividualDeclaration individualDeclaration) {
154 for (var individual : individualDeclaration.getNodes()) {
155 addNode(individual, true);
156 }
157 }
158
159 private void collectNewNode(ClassDeclaration classDeclaration) {
160 var newNode = classDeclaration.getNewNode();
161 if (newNode != null) {
162 addNode(newNode, false);
163 }
164 }
165
166 private void collectEnumLiterals(EnumDeclaration enumDeclaration) {
167 for (var literal : enumDeclaration.getLiterals()) {
168 addNode(literal, true);
169 }
170 }
171
172 private void addNode(Node node, boolean individual) {
173 var info = new NodeInfo(getQualifiedNameString(node), individual);
174 this.nodes.put(node, info);
175 }
176
177 private String getQualifiedNameString(EObject eObject) {
178 var qualifiedName = qualifiedNameProvider.getFullyQualifiedName(eObject);
179 if (qualifiedName == null) {
180 return null;
181 }
182 return qualifiedNameConverter.toString(qualifiedName);
183 }
184
185 private void collectOwnAssertions(Problem problem) {
186 for (var statement : problem.getStatements()) {
187 if (statement instanceof Assertion assertion) {
188 collectAssertion(assertion);
189 } else if (statement instanceof PredicateDefinition predicateDefinition) {
190 collectPredicateAssertion(predicateDefinition);
191 } else if (statement instanceof ClassDeclaration classDeclaration) {
192 collectClassAssertion(classDeclaration);
193 } else if (statement instanceof EnumDeclaration enumDeclaration) {
194 collectEnumAssertions(enumDeclaration);
195 }
196 }
197 }
198
199 private void collectAssertion(Assertion assertion) {
200 var relationInfo = this.relations.get(assertion.getRelation());
201 if (relationInfo == null) {
202 throw new IllegalStateException("Assertion refers to unknown relation");
203 }
204 if (assertion.getArguments().size() != relationInfo.parameters().size()) {
205 // Silently ignoring assertions of invalid arity helps when SymbolCollector is called on an invalid
206 // Problem during editing. The errors can still be detected by the Problem validator.
207 return;
208 }
209 relationInfo.assertions().add(assertion);
210 }
211
212 private void collectPredicateAssertion(PredicateDefinition predicateDefinition) {
213 if (predicateDefinition.getKind() != PredicateKind.ERROR) {
214 return;
215 }
216 int arity = predicateDefinition.getParameters().size();
217 addAssertion(predicateDefinition, LogicValue.FALSE, new Node[arity]);
218 }
219
220 private void collectClassAssertion(ClassDeclaration classDeclaration) {
221 var node = classDeclaration.getNewNode();
222 if (node == null) {
223 return;
224 }
225 addAssertion(classDeclaration, LogicValue.TRUE, node);
226 addAssertion(builtinSymbols.exists(), LogicValue.UNKNOWN, node);
227 addAssertion(builtinSymbols.equals(), LogicValue.UNKNOWN, node, node);
228 }
229
230 private void collectEnumAssertions(EnumDeclaration enumDeclaration) {
231 for (var literal : enumDeclaration.getLiterals()) {
232 addAssertion(enumDeclaration, LogicValue.TRUE, literal);
233 }
234 }
235
236 private void addAssertion(Relation relation, LogicValue logicValue, Node... nodes) {
237 var assertion = ProblemFactory.eINSTANCE.createAssertion();
238 assertion.setRelation(relation);
239 for (var node : nodes) {
240 AssertionArgument argument;
241 if (node == null) {
242 argument = ProblemFactory.eINSTANCE.createWildcardAssertionArgument();
243 } else {
244 var nodeArgument = ProblemFactory.eINSTANCE.createNodeAssertionArgument();
245 nodeArgument.setNode(node);
246 argument = nodeArgument;
247 }
248 assertion.getArguments().add(argument);
249 }
250 var value = ProblemFactory.eINSTANCE.createLogicConstant();
251 value.setLogicValue(logicValue);
252 assertion.setValue(value);
253 collectAssertion(assertion);
254 }
255}
diff --git a/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem b/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem
index 9c1d7669..022c3167 100644
--- a/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem
+++ b/subprojects/language/src/main/resources/tools/refinery/language/builtin.problem
@@ -3,43 +3,14 @@
3% SPDX-License-Identifier: EPL-2.0 3% SPDX-License-Identifier: EPL-2.0
4problem builtin. 4problem builtin.
5 5
6abstract class node { 6abstract class node.
7 refers node[] equals opposite equals
8}
9 7
10pred exists(node node). 8pred exists(node).
11 9
12% class Integer { 10pred equals(left, right).
13% int intValue
14% }
15%
16% class Real {
17% real realValue
18% }
19%
20% class String {
21% string stringValue
22% }
23%
24% enum Boolean {
25% TRUE, FALSE
26% }
27 11
28pred contained(node node). 12abstract class contained extends node.
29 13
30pred contains(node container, node contained). 14pred contains(container, contained contained).
31 15
32pred root(node node). 16error invalidContainer(contained contained).
33
34% error missingContainer(contained node) <->
35% !contains(node, _), !root(node).
36%
37% error tooManyContainers(contained node) <->
38% #contains(_, node) > 1
39% ;
40% contains(_, node), root(node)
41% ;
42% contains(_, node), !contained(node).
43%
44% error containmentCycle(node node) <->
45% contains+(node, node).
diff --git a/subprojects/language/src/test/java/tools/refinery/language/tests/ProblemParsingTest.java b/subprojects/language/src/test/java/tools/refinery/language/tests/ProblemParsingTest.java
index c7952369..96e7cf9c 100644
--- a/subprojects/language/src/test/java/tools/refinery/language/tests/ProblemParsingTest.java
+++ b/subprojects/language/src/test/java/tools/refinery/language/tests/ProblemParsingTest.java
@@ -31,7 +31,6 @@ class ProblemParsingTest {
31 class Person { 31 class Person {
32 Person[0..*] children opposite parent 32 Person[0..*] children opposite parent
33 Person[0..1] parent opposite children 33 Person[0..1] parent opposite children
34 int age
35 TaxStatus taxStatus 34 TaxStatus taxStatus
36 } 35 }
37 36
@@ -51,8 +50,6 @@ class ProblemParsingTest {
51 children(anne, ciri). 50 children(anne, ciri).
52 ?children(bob, ciri). 51 ?children(bob, ciri).
53 taxStatus(anne, ADULT). 52 taxStatus(anne, ADULT).
54 age(bob): 21..35.
55 age(ciri): 10.
56 """); 53 """);
57 assertThat(problem.errors(), empty()); 54 assertThat(problem.errors(), empty());
58 } 55 }
diff --git a/subprojects/language/src/test/java/tools/refinery/language/tests/parser/antlr/TransitiveClosureParserTest.java b/subprojects/language/src/test/java/tools/refinery/language/tests/parser/antlr/TransitiveClosureParserTest.java
index 1180d131..ed193e90 100644
--- a/subprojects/language/src/test/java/tools/refinery/language/tests/parser/antlr/TransitiveClosureParserTest.java
+++ b/subprojects/language/src/test/java/tools/refinery/language/tests/parser/antlr/TransitiveClosureParserTest.java
@@ -29,9 +29,7 @@ class TransitiveClosureParserTest {
29 @Test 29 @Test
30 void binaryAddOperatorTest() { 30 void binaryAddOperatorTest() {
31 var problem = parseHelper.parse(""" 31 var problem = parseHelper.parse("""
32 fn int a(). 32 pred foo(a, b) <-> a + (b) > 10.
33 fn int b().
34 pred foo() <-> a() + (b()) > 10.
35 """); 33 """);
36 assertThat(problem.errors(), empty()); 34 assertThat(problem.errors(), empty());
37 var literal = problem.pred("foo").conj(0).lit(0).get(); 35 var literal = problem.pred("foo").conj(0).lit(0).get();
diff --git a/subprojects/language/src/test/java/tools/refinery/language/tests/serializer/ProblemSerializerTest.java b/subprojects/language/src/test/java/tools/refinery/language/tests/serializer/ProblemSerializerTest.java
index 3f3a081f..9f4f2bbf 100644
--- a/subprojects/language/src/test/java/tools/refinery/language/tests/serializer/ProblemSerializerTest.java
+++ b/subprojects/language/src/test/java/tools/refinery/language/tests/serializer/ProblemSerializerTest.java
@@ -178,7 +178,7 @@ class ProblemSerializerTest {
178 var variable = ProblemFactory.eINSTANCE.createImplicitVariable(); 178 var variable = ProblemFactory.eINSTANCE.createImplicitVariable();
179 variable.setName("q"); 179 variable.setName("q");
180 conjunction.getImplicitVariables().add(variable); 180 conjunction.getImplicitVariables().add(variable);
181 var equals = nodeType.feature("equals"); 181 var equals = builtin.pred("equals").get();
182 conjunction.getLiterals().add(createAtom(equals, parameter1, variable)); 182 conjunction.getLiterals().add(createAtom(equals, parameter1, variable));
183 conjunction.getLiterals().add(createAtom(equals, variable, parameter2)); 183 conjunction.getLiterals().add(createAtom(equals, variable, parameter2));
184 pred.getBodies().add(conjunction); 184 pred.getBodies().add(conjunction);
@@ -212,7 +212,7 @@ class ProblemSerializerTest {
212 pred.getParameters().add(parameter); 212 pred.getParameters().add(parameter);
213 var conjunction = ProblemFactory.eINSTANCE.createConjunction(); 213 var conjunction = ProblemFactory.eINSTANCE.createConjunction();
214 var atom = ProblemFactory.eINSTANCE.createAtom(); 214 var atom = ProblemFactory.eINSTANCE.createAtom();
215 var equals = nodeType.feature("equals"); 215 var equals = builtin.pred("equals").get();
216 atom.setRelation(equals); 216 atom.setRelation(equals);
217 var arg1 = ProblemFactory.eINSTANCE.createVariableOrNodeExpr(); 217 var arg1 = ProblemFactory.eINSTANCE.createVariableOrNodeExpr();
218 arg1.setVariableOrNode(parameter); 218 arg1.setVariableOrNode(parameter);
diff --git a/subprojects/language/src/test/java/tools/refinery/language/tests/utils/SymbolCollectorTest.java b/subprojects/language/src/test/java/tools/refinery/language/tests/utils/SymbolCollectorTest.java
deleted file mode 100644
index d200eeff..00000000
--- a/subprojects/language/src/test/java/tools/refinery/language/tests/utils/SymbolCollectorTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.language.tests.utils;
7
8import com.google.inject.Inject;
9import org.eclipse.xtext.testing.InjectWith;
10import org.eclipse.xtext.testing.extensions.InjectionExtension;
11import org.hamcrest.Matcher;
12import org.junit.jupiter.api.Disabled;
13import org.junit.jupiter.api.Test;
14import org.junit.jupiter.api.extension.ExtendWith;
15import org.junit.jupiter.params.ParameterizedTest;
16import org.junit.jupiter.params.provider.Arguments;
17import org.junit.jupiter.params.provider.MethodSource;
18import tools.refinery.language.model.problem.*;
19import tools.refinery.language.model.tests.utils.ProblemParseHelper;
20import tools.refinery.language.tests.ProblemInjectorProvider;
21import tools.refinery.language.utils.ContainmentRole;
22import tools.refinery.language.utils.ProblemDesugarer;
23
24import java.util.stream.Stream;
25
26import static org.hamcrest.MatcherAssert.assertThat;
27import static org.hamcrest.Matchers.*;
28import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
29
30@ExtendWith(InjectionExtension.class)
31@InjectWith(ProblemInjectorProvider.class)
32class SymbolCollectorTest {
33 @Inject
34 private ProblemParseHelper parseHelper;
35
36 @Inject
37 private ProblemDesugarer desugarer;
38
39 @Test
40 void implicitNodeTest() {
41 var problem = parseHelper.parse("""
42 exists(a).
43 """);
44 var collectedSymbols = desugarer.collectSymbols(problem.get());
45 var node = problem.node("a");
46 assertThat(collectedSymbols.nodes(), hasKey(node));
47 assertThat(collectedSymbols.nodes().get(node).individual(), is(false));
48 }
49
50 @Test
51 void individualNodeTest() {
52 var problem = parseHelper.parse("""
53 indiv a.
54 """);
55 var collectedSymbols = desugarer.collectSymbols(problem.get());
56 var node = problem.individualNode("a");
57 assertThat(collectedSymbols.nodes(), hasKey(node));
58 assertThat(collectedSymbols.nodes().get(node).individual(), is(true));
59 }
60
61 @Test
62 void classTest() {
63 var problem = parseHelper.parse("""
64 class Foo.
65 """);
66 var collectedSymbols = desugarer.collectSymbols(problem.get());
67 var classDeclaration = problem.findClass("Foo").get();
68 assertThat(collectedSymbols.relations(), hasKey(classDeclaration));
69 var classInfo = collectedSymbols.relations().get(classDeclaration);
70 assertThat(classInfo.parameters(), hasSize(1));
71 assertThat(classInfo.containmentRole(), is(ContainmentRole.CONTAINED));
72 assertThat(classInfo.hasDefinition(), is(false));
73 var newNode = classDeclaration.getNewNode();
74 assertThat(collectedSymbols.nodes(), hasKey(newNode));
75 assertThat(collectedSymbols.nodes().get(newNode).individual(), is(false));
76 assertThat(classInfo.assertions(), assertsNode(newNode, LogicValue.TRUE));
77 assertThat(collectedSymbols.relations().get(problem.builtinSymbols().exists()).assertions(),
78 assertsNode(newNode, LogicValue.UNKNOWN));
79 assertThat(collectedSymbols.relations().get(problem.builtinSymbols().equals()).assertions(),
80 assertsNode(newNode, LogicValue.UNKNOWN));
81 }
82
83 @Test
84 void abstractClassTest() {
85 var problem = parseHelper.parse("""
86 abstract class Foo.
87 """);
88 var collectedSymbols = desugarer.collectSymbols(problem.get());
89 assertThat(collectedSymbols.relations().get(problem.findClass("Foo").get()).assertions(), hasSize(0));
90 }
91
92 @Test
93 void referenceTest() {
94 var problem = parseHelper.parse("""
95 class Foo {
96 refers Foo[] bar opposite quux
97 refers Foo quux opposite bar
98 }
99 """);
100 var collectedSymbols = desugarer.collectSymbols(problem.get());
101 var fooClass = problem.findClass("Foo");
102 var barReference = fooClass.feature("bar");
103 var barInfo = collectedSymbols.relations().get(barReference);
104 var quuxReference = fooClass.feature("quux");
105 var quuxInfo = collectedSymbols.relations().get(quuxReference);
106 assertThat(barInfo.containmentRole(), is(ContainmentRole.NONE));
107 assertThat(barInfo.opposite(), is(quuxReference));
108 assertThat(barInfo.multiplicity(), is(instanceOf(UnboundedMultiplicity.class)));
109 assertThat(barInfo.hasDefinition(), is(false));
110 assertThat(quuxInfo.containmentRole(), is(ContainmentRole.NONE));
111 assertThat(quuxInfo.opposite(), is(barReference));
112 assertThat(quuxInfo.multiplicity(), is(instanceOf(ExactMultiplicity.class)));
113 assertThat(quuxInfo.multiplicity(), hasProperty("exactValue", is(1)));
114 assertThat(quuxInfo.hasDefinition(), is(false));
115 }
116
117 @Test
118 void containmentReferenceTest() {
119 var problem = parseHelper.parse("""
120 class Foo {
121 contains Foo[] bar
122 }
123 """);
124 var collectedSymbols = desugarer.collectSymbols(problem.get());
125 assertThat(collectedSymbols.relations().get(problem.findClass("Foo").feature("bar")).containmentRole(),
126 is(ContainmentRole.CONTAINMENT));
127 }
128
129 @Disabled("TODO: Rework numerical references")
130 @Test
131 void dataReferenceTest() {
132 var problem = parseHelper.parse("""
133 class Foo {
134 int bar
135 }
136 """);
137 var collectedSymbols = desugarer.collectSymbols(problem.get());
138 assertThat(collectedSymbols.relations().get(problem.findClass("Foo").feature("bar")).containmentRole(),
139 is(ContainmentRole.CONTAINMENT));
140 }
141
142 @Test
143 void enumTest() {
144 var problem = parseHelper.parse("""
145 enum Foo {
146 bar, quux
147 }
148 """);
149 var collectedSymbols = desugarer.collectSymbols(problem.get());
150 var enumDeclaration = problem.findEnum("Foo");
151 var enumInfo = collectedSymbols.relations().get(enumDeclaration.get());
152 assertThat(enumInfo.containmentRole(), is(ContainmentRole.NONE));
153 assertThat(enumInfo.assertions(), assertsNode(enumDeclaration.literal("bar"), LogicValue.TRUE));
154 assertThat(enumInfo.assertions(), assertsNode(enumDeclaration.literal("quux"), LogicValue.TRUE));
155 }
156
157 @ParameterizedTest
158 @MethodSource
159 void predicateTest(String keyword, ContainmentRole containmentRole) {
160 var problem = parseHelper.parse(keyword + " foo(node x) <-> domain(x); data(x).");
161 var collectedSymbols = desugarer.collectSymbols(problem.get());
162 var predicateInfo = collectedSymbols.relations().get(problem.pred("foo").get());
163 assertThat(predicateInfo.containmentRole(), is(containmentRole));
164 assertThat(predicateInfo.parameters(), hasSize(1));
165 assertThat(predicateInfo.bodies(), hasSize(2));
166 assertThat(predicateInfo.hasDefinition(), is(true));
167 }
168
169 static Stream<Arguments> predicateTest() {
170 return Stream.of(Arguments.of("pred", ContainmentRole.NONE), Arguments.of("error", ContainmentRole.NONE),
171 Arguments.of("contained pred", ContainmentRole.CONTAINED), Arguments.of("containment pred",
172 ContainmentRole.CONTAINMENT));
173 }
174
175 @ParameterizedTest
176 @MethodSource("logicValues")
177 void assertionTest(String keyword, LogicValue value) {
178 var problem = parseHelper.parse("""
179 pred foo(node x).
180 foo(a): %s.
181 """.formatted(keyword));
182 var collectedSymbols = desugarer.collectSymbols(problem.get());
183 assertThat(collectedSymbols.relations().get(problem.pred("foo").get()).assertions(),
184 assertsNode(problem.node("a"), value));
185 }
186
187 @ParameterizedTest
188 @MethodSource("logicValues")
189 void defaultAssertionTest(String keyword, LogicValue value) {
190 var problem = parseHelper.parse("""
191 pred foo(node x).
192 default foo(a): %s.
193 """.formatted(keyword));
194 var collectedSymbols = desugarer.collectSymbols(problem.get());
195 assertThat(collectedSymbols.relations().get(problem.pred("foo").get()).assertions(),
196 assertsNode(problem.node("a"), value));
197 }
198
199 static Stream<Arguments> logicValues() {
200 return Stream.of(Arguments.of("true", LogicValue.TRUE), Arguments.of("false", LogicValue.FALSE),
201 Arguments.of("unknown", LogicValue.UNKNOWN), Arguments.of("error", LogicValue.ERROR));
202 }
203
204 @Test
205 void invalidAssertionArityTest() {
206 var problem = parseHelper.parse("""
207 pred foo(node x).
208 foo(a, b).
209 """);
210 var collectedSymbols = desugarer.collectSymbols(problem.get());
211 assertThat(collectedSymbols.relations().get(problem.pred("foo").get()).assertions(), hasSize(0));
212 }
213
214 @Test
215 void invalidProblemTest() {
216 var problem = parseHelper.parse("""
217 class Foo {
218 bar[] opposite quux
219 Foo quux opposite bar
220 }
221 """).get();
222 assertDoesNotThrow(() -> desugarer.collectSymbols(problem));
223 }
224
225 @Test
226 void errorAssertionTest() {
227 var problem = parseHelper.parse("""
228 error foo(node a, node b) <-> equals(a, b).
229 """);
230 var collectedSymbols = desugarer.collectSymbols(problem.get());
231 var fooInfo = collectedSymbols.relations().get(problem.pred("foo").get());
232 assertThat(fooInfo.assertions(), hasSize(1));
233 var assertion = fooInfo.assertions().stream().findFirst().orElseThrow();
234 assertThat(assertion.getValue(), hasProperty("logicValue", is(LogicValue.FALSE)));
235 assertThat(assertion.getArguments(), hasSize(2));
236 assertThat(assertion.getArguments(), everyItem(instanceOf(WildcardAssertionArgument.class)));
237 }
238
239 private static Matcher<Iterable<? super Assertion>> assertsNode(Node node, LogicValue value) {
240 return hasItem(allOf(hasProperty("arguments", hasItem(hasProperty("node", is(node)))), hasProperty("value",
241 hasProperty("logicValue", is(value)))));
242 }
243}
diff --git a/subprojects/visualization/build.gradle.kts b/subprojects/store-dse-visualization/build.gradle.kts
index abad0491..abad0491 100644
--- a/subprojects/visualization/build.gradle.kts
+++ b/subprojects/store-dse-visualization/build.gradle.kts
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerAdapter.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerAdapter.java
index ae87d8ac..ad80bbc6 100644
--- a/subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerAdapter.java
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerAdapter.java
@@ -9,6 +9,7 @@ import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.map.Version; 9import tools.refinery.store.map.Version;
10import tools.refinery.store.tuple.Tuple; 10import tools.refinery.store.tuple.Tuple;
11import tools.refinery.visualization.internal.ModelVisualizerBuilderImpl; 11import tools.refinery.visualization.internal.ModelVisualizerBuilderImpl;
12import tools.refinery.visualization.statespace.VisualizationStore;
12 13
13import java.util.Collection; 14import java.util.Collection;
14 15
@@ -18,15 +19,5 @@ public interface ModelVisualizerAdapter extends ModelAdapter {
18 static ModelVisualizerBuilder builder() { 19 static ModelVisualizerBuilder builder() {
19 return new ModelVisualizerBuilderImpl(); 20 return new ModelVisualizerBuilderImpl();
20 } 21 }
21 22 void visualize(VisualizationStore visualizationStore);
22 public void addTransition(Version from, Version to, String action);
23
24
25 public void addTransition(Version from, Version to, String action, Tuple activation);
26 public void addState(Version state);
27 public void addState(Version state, Collection<Double> fitness);
28 public void addState(Version state, String label);
29 public void addSolution(Version state);
30 public void visualize();
31
32} 23}
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerBuilder.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerBuilder.java
index 592f5fcf..1ee41cc3 100644
--- a/subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerBuilder.java
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerBuilder.java
@@ -9,7 +9,7 @@ import tools.refinery.store.adapter.ModelAdapterBuilder;
9import tools.refinery.visualization.internal.FileFormat; 9import tools.refinery.visualization.internal.FileFormat;
10 10
11public interface ModelVisualizerBuilder extends ModelAdapterBuilder { 11public interface ModelVisualizerBuilder extends ModelAdapterBuilder {
12 ModelVisualizerBuilder withOutputpath(String outputpath); 12 ModelVisualizerBuilder withOutputPath(String outputPath);
13 ModelVisualizerBuilder withFormat(FileFormat format); 13 ModelVisualizerBuilder withFormat(FileFormat format);
14 ModelVisualizerBuilder saveDesignSpace(); 14 ModelVisualizerBuilder saveDesignSpace();
15 ModelVisualizerBuilder saveStates(); 15 ModelVisualizerBuilder saveStates();
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerStoreAdapter.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerStoreAdapter.java
index 46663b2a..46663b2a 100644
--- a/subprojects/visualization/src/main/java/tools/refinery/visualization/ModelVisualizerStoreAdapter.java
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/ModelVisualizerStoreAdapter.java
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/FileFormat.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/FileFormat.java
index c5dffeb2..c5dffeb2 100644
--- a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/FileFormat.java
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/FileFormat.java
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java
index 04be22d6..04be22d6 100644
--- a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java
index e60ae4b7..a6a3dc69 100644
--- a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerAdapterImpl.java
@@ -13,6 +13,7 @@ import tools.refinery.store.representation.TruthValue;
13import tools.refinery.store.tuple.Tuple; 13import tools.refinery.store.tuple.Tuple;
14import tools.refinery.visualization.ModelVisualizerAdapter; 14import tools.refinery.visualization.ModelVisualizerAdapter;
15import tools.refinery.visualization.ModelVisualizerStoreAdapter; 15import tools.refinery.visualization.ModelVisualizerStoreAdapter;
16import tools.refinery.visualization.statespace.VisualizationStore;
16 17
17import java.io.*; 18import java.io.*;
18import java.util.*; 19import java.util.*;
@@ -282,62 +283,6 @@ public class ModelVisualizerAdapterImpl implements ModelVisualizerAdapter {
282 return true; 283 return true;
283 } 284 }
284 285
285 @Override
286 public void addTransition(Version from, Version to, String action) {
287 designSpaceBuilder.append(states.get(from)).append(" -> ").append(states.get(to))
288 .append(" [label=\"").append(transitionCounter++).append(": ").append(action).append("\"]\n");
289 }
290
291 @Override
292 public void addTransition(Version from, Version to, String action, Tuple activation) {
293 designSpaceBuilder.append(states.get(from)).append(" -> ").append(states.get(to))
294 .append(" [label=\"").append(transitionCounter++).append(": ").append(action).append(" / ");
295
296
297 for (int i = 0; i < activation.getSize(); i++) {
298 designSpaceBuilder.append(activation.get(i));
299 if (i < activation.getSize() - 1) {
300 designSpaceBuilder.append(", ");
301 }
302 }
303 designSpaceBuilder.append("\"]\n");
304 }
305
306 @Override
307 public void addState(Version state) {
308 if (states.containsKey(state)) {
309 return;
310 }
311 states.put(state, numberOfStates++);
312 designSpaceBuilder.append(states.get(state)).append(" [URL=\"./").append(states.get(state)).append(".svg\"]\n");
313 }
314
315 @Override
316 public void addState(Version state, Collection<Double> fitness) {
317 var labelBuilder = new StringBuilder();
318 for (var f : fitness) {
319 labelBuilder.append(f).append(", ");
320 }
321 addState(state, labelBuilder.toString());
322 }
323
324 @Override
325 public void addState(Version state, String label) {
326 if (states.containsKey(state)) {
327 return;
328 }
329 states.put(state, numberOfStates++);
330 designSpaceBuilder.append(states.get(state)).append(" [label = \"").append(states.get(state)).append(" (");
331 designSpaceBuilder.append(label);
332 designSpaceBuilder.append(")\"\n").append("URL=\"./").append(states.get(state)).append(".svg\"]\n");
333 }
334
335 @Override
336 public void addSolution(Version state) {
337 addState(state);
338 designSpaceBuilder.append(states.get(state)).append(" [shape = doublecircle]\n");
339 }
340
341 private String buildDesignSpaceDot() { 286 private String buildDesignSpaceDot() {
342 designSpaceBuilder.append("}"); 287 designSpaceBuilder.append("}");
343 return designSpaceBuilder.toString(); 288 return designSpaceBuilder.toString();
@@ -382,7 +327,9 @@ public class ModelVisualizerAdapterImpl implements ModelVisualizerAdapter {
382 } 327 }
383 328
384 @Override 329 @Override
385 public void visualize() { 330 public void visualize(VisualizationStore visualizationStore) {
331 this.designSpaceBuilder.append(visualizationStore.getDesignSpaceStringBuilder());
332 this.states.putAll(visualizationStore.getStates());
386 renderDesignSpace(outputPath, formats); 333 renderDesignSpace(outputPath, formats);
387 } 334 }
388} 335}
diff --git a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerBuilderImpl.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerBuilderImpl.java
index e4d801d8..9ba2abe8 100644
--- a/subprojects/visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerBuilderImpl.java
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizerBuilderImpl.java
@@ -18,7 +18,7 @@ public class ModelVisualizerBuilderImpl
18 private String outputPath; 18 private String outputPath;
19 private boolean saveDesignSpace = false; 19 private boolean saveDesignSpace = false;
20 private boolean saveStates = false; 20 private boolean saveStates = false;
21 private Set<FileFormat> formats = new LinkedHashSet<>(); 21 private final Set<FileFormat> formats = new LinkedHashSet<>();
22 22
23 @Override 23 @Override
24 protected ModelVisualizeStoreAdapterImpl doBuild(ModelStore store) { 24 protected ModelVisualizeStoreAdapterImpl doBuild(ModelStore store) {
@@ -26,9 +26,9 @@ public class ModelVisualizerBuilderImpl
26 } 26 }
27 27
28 @Override 28 @Override
29 public ModelVisualizerBuilder withOutputpath(String outputpath) { 29 public ModelVisualizerBuilder withOutputPath(String outputPath) {
30 checkNotConfigured(); 30 checkNotConfigured();
31 this.outputPath = outputpath; 31 this.outputPath = outputPath;
32 return this; 32 return this;
33 } 33 }
34 34
diff --git a/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/VisualizationStore.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/VisualizationStore.java
new file mode 100644
index 00000000..414ef737
--- /dev/null
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/VisualizationStore.java
@@ -0,0 +1,18 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.visualization.statespace;
7
8import tools.refinery.store.map.Version;
9
10import java.util.Map;
11
12public interface VisualizationStore {
13 void addState(Version state, String label);
14 void addSolution(Version state);
15 void addTransition(Version from, Version to, String label);
16 StringBuilder getDesignSpaceStringBuilder();
17 Map<Version, Integer> getStates();
18}
diff --git a/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/internal/VisualizationStoreImpl.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/internal/VisualizationStoreImpl.java
new file mode 100644
index 00000000..08a69cb4
--- /dev/null
+++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/statespace/internal/VisualizationStoreImpl.java
@@ -0,0 +1,51 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.visualization.statespace.internal;
7
8import tools.refinery.store.map.Version;
9import tools.refinery.visualization.statespace.VisualizationStore;
10
11import java.util.HashMap;
12import java.util.Map;
13
14public class VisualizationStoreImpl implements VisualizationStore {
15
16 private final Map<Version, Integer> states = new HashMap<>();
17 private int transitionCounter = 0;
18 private Integer numberOfStates = 0;
19 private final StringBuilder designSpaceBuilder = new StringBuilder();
20
21 @Override
22 public synchronized void addState(Version state, String label) {
23 if (states.containsKey(state)) {
24 return;
25 }
26 states.put(state, numberOfStates++);
27 designSpaceBuilder.append(states.get(state)).append(" [label = \"").append(states.get(state)).append(" (");
28 designSpaceBuilder.append(label);
29 designSpaceBuilder.append(")\"\n").append("URL=\"./").append(states.get(state)).append(".svg\"]\n");
30 }
31
32 @Override
33 public synchronized void addSolution(Version state) {
34 designSpaceBuilder.append(states.get(state)).append(" [peripheries = 2]\n");
35 }
36
37 @Override
38 public synchronized void addTransition(Version from, Version to, String label) {
39 designSpaceBuilder.append(states.get(from)).append(" -> ").append(states.get(to))
40 .append(" [label=\"").append(transitionCounter++).append(": ").append(label).append("\"]\n");
41 }
42
43 public synchronized StringBuilder getDesignSpaceStringBuilder() {
44 return designSpaceBuilder;
45 }
46
47 @Override
48 public Map<Version, Integer> getStates() {
49 return states;
50 }
51}
diff --git a/subprojects/store-dse/build.gradle.kts b/subprojects/store-dse/build.gradle.kts
index bb1dee7d..5517e189 100644
--- a/subprojects/store-dse/build.gradle.kts
+++ b/subprojects/store-dse/build.gradle.kts
@@ -10,7 +10,8 @@ plugins {
10 10
11dependencies { 11dependencies {
12 api(project(":refinery-store-query")) 12 api(project(":refinery-store-query"))
13 api(project(":refinery-store-query-viatra")) 13 implementation(project(":refinery-store-dse-visualization"))
14 api(project(":refinery-store-reasoning")) 14 implementation(libs.eclipseCollections.api)
15 api(project(":refinery-visualization")) 15 runtimeOnly(libs.eclipseCollections)
16 testImplementation(project(":refinery-store-query-viatra"))
16} 17}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/ActionFactory.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/ActionFactory.java
deleted file mode 100644
index 524c2f55..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/ActionFactory.java
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8import org.eclipse.collections.api.block.procedure.Procedure;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.tuple.Tuple;
11
12public interface ActionFactory {
13 Procedure<Tuple> prepare(Model model);
14}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationAdapter.java
deleted file mode 100644
index ab87ddd5..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationAdapter.java
+++ /dev/null
@@ -1,71 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.dse.internal.TransformationRule;
10import tools.refinery.store.map.Version;
11import tools.refinery.store.dse.internal.Activation;
12import tools.refinery.store.dse.internal.DesignSpaceExplorationBuilderImpl;
13import tools.refinery.store.dse.objectives.Fitness;
14import tools.refinery.store.dse.objectives.ObjectiveComparatorHelper;
15import tools.refinery.store.tuple.Tuple;
16import tools.refinery.store.tuple.Tuple1;
17
18import java.util.Collection;
19import java.util.List;
20import java.util.Random;
21
22public interface DesignSpaceExplorationAdapter extends ModelAdapter {
23 @Override
24 DesignSpaceExplorationStoreAdapter getStoreAdapter();
25
26 static DesignSpaceExplorationBuilder builder() {
27 return new DesignSpaceExplorationBuilderImpl();
28 }
29
30 Collection<Version> explore();
31
32 public int getModelSize();
33
34 public Tuple1 createObject();
35
36 public Tuple deleteObject(Tuple tuple);
37
38 public boolean checkGlobalConstraints();
39
40 public boolean backtrack();
41
42 public boolean backtrack(String reason);
43
44 public Fitness getFitness();
45
46 public void newSolution();
47
48 public int getDepth();
49
50 public Collection<Activation> getUntraversedActivations();
51
52 public boolean fireActivation(Activation activation);
53
54 public boolean fireRandomActivation();
55
56 public List<Version> getTrajectory();
57
58 public boolean isCurrentStateAlreadyTraversed();
59
60 public ObjectiveComparatorHelper getObjectiveComparatorHelper();
61
62 public void restoreTrajectory(List<Version> trajectory);
63
64 public void setRandom(Random random);
65
66 public void setRandom(long seed);
67
68 public List<Version> getSolutions();
69
70 void addTransformationRule(TransformationRule transformationRule);
71}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationBuilder.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationBuilder.java
deleted file mode 100644
index 4def5cb2..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationBuilder.java
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8import tools.refinery.store.adapter.ModelAdapterBuilder;
9import tools.refinery.store.query.dnf.RelationalQuery;
10import tools.refinery.store.dse.internal.TransformationRule;
11import tools.refinery.store.dse.objectives.Objective;
12
13import java.util.Collection;
14import java.util.List;
15
16public interface DesignSpaceExplorationBuilder extends ModelAdapterBuilder {
17 default DesignSpaceExplorationBuilder transformations(TransformationRule... transformationRules) {
18 return transformations(List.of(transformationRules));
19 }
20
21 default DesignSpaceExplorationBuilder transformations(Collection<? extends TransformationRule> transformationRules) {
22 transformationRules.forEach(this::transformation);
23 return this;
24 }
25
26 default DesignSpaceExplorationBuilder globalConstraints(RelationalQuery... globalConstraints) {
27 return globalConstraints(List.of(globalConstraints));
28 }
29
30 default DesignSpaceExplorationBuilder globalConstraints(Collection<RelationalQuery> globalConstraints) {
31 globalConstraints.forEach(this::globalConstraint);
32 return this;
33 }
34
35 default DesignSpaceExplorationBuilder objectives(Objective... objectives) {
36 return objectives(List.of(objectives));
37 }
38
39 default DesignSpaceExplorationBuilder objectives(Collection<? extends Objective> objectives) {
40 objectives.forEach(this::objective);
41 return this;
42 }
43
44 DesignSpaceExplorationBuilder transformation(TransformationRule transformationRule);
45 DesignSpaceExplorationBuilder globalConstraint(RelationalQuery globalConstraint);
46 DesignSpaceExplorationBuilder objective(Objective objective);
47 DesignSpaceExplorationBuilder strategy(Strategy strategy);
48}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationStoreAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationStoreAdapter.java
deleted file mode 100644
index 0252748d..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/DesignSpaceExplorationStoreAdapter.java
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8import tools.refinery.store.adapter.ModelStoreAdapter;
9import tools.refinery.store.dse.internal.TransformationRule;
10import tools.refinery.store.dse.objectives.Objective;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.query.dnf.RelationalQuery;
13
14import java.util.List;
15import java.util.Set;
16
17public interface DesignSpaceExplorationStoreAdapter extends ModelStoreAdapter {
18
19 @Override
20 DesignSpaceExplorationAdapter createModelAdapter(Model model);
21
22 Set<TransformationRule> getTransformationSpecifications();
23
24 Set<RelationalQuery> getGlobalConstraints();
25
26 List<Objective> getObjectives();
27
28 Strategy getStrategy();
29}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/Strategy.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/Strategy.java
deleted file mode 100644
index c60a4410..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/Strategy.java
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8public interface Strategy {
9
10 void initialize(DesignSpaceExplorationAdapter designSpaceExplorationAdapter);
11
12 void explore();
13}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/Activation.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/Activation.java
deleted file mode 100644
index 1893ce2e..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/Activation.java
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal;
7
8import tools.refinery.store.tuple.Tuple;
9
10public record Activation(TransformationRule transformationRule, Tuple activation) {
11 public boolean fire() {
12 return transformationRule.fireActivation(activation);
13 }
14}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java
deleted file mode 100644
index 1ae09916..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationAdapterImpl.java
+++ /dev/null
@@ -1,303 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Miklos Foldenyi, Andras Szabolcs Nagy, Abel Hegedus, Akos Horvath, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.internal;
11
12import tools.refinery.store.map.Version;
13import tools.refinery.store.model.Interpretation;
14import tools.refinery.store.model.Model;
15import tools.refinery.store.query.ModelQueryAdapter;
16import tools.refinery.store.query.dnf.Query;
17import tools.refinery.store.query.dnf.RelationalQuery;
18import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
19import tools.refinery.store.dse.DesignSpaceExplorationStoreAdapter;
20import tools.refinery.store.dse.Strategy;
21import tools.refinery.store.dse.objectives.Fitness;
22import tools.refinery.store.dse.objectives.Objective;
23import tools.refinery.store.dse.objectives.ObjectiveComparatorHelper;
24import tools.refinery.store.query.resultset.ResultSet;
25import tools.refinery.store.representation.Symbol;
26import tools.refinery.store.tuple.Tuple;
27import tools.refinery.store.tuple.Tuple1;
28import tools.refinery.visualization.ModelVisualizerAdapter;
29
30import java.util.*;
31
32public class DesignSpaceExplorationAdapterImpl implements DesignSpaceExplorationAdapter {
33 static final Symbol<Integer> NODE_COUNT_SYMBOL = Symbol.of("MODEL_SIZE", 0, Integer.class, 0);
34 private final Model model;
35 private final ModelQueryAdapter queryEngine;
36 private final DesignSpaceExplorationStoreAdapterImpl storeAdapter;
37 private final Set<TransformationRule> transformationRules;
38 private final Set<RelationalQuery> globalConstraints;
39 private final List<Objective> objectives;
40 private final LinkedHashSet<ResultSet<Boolean>> globalConstraintResultSets = new LinkedHashSet<>();
41 private final Interpretation<Integer> sizeInterpretation;
42 private final Strategy strategy;
43
44 private ObjectiveComparatorHelper objectiveComparatorHelper;
45 private List<Version> trajectory = new ArrayList<>();
46 private Map<Version, Version> parents = new HashMap<>();
47 private final List<Version> solutions = new ArrayList<>();
48 private Map<Version, List<Activation>> statesAndTraversedActivations;
49 @SuppressWarnings("squid:S2245")
50 private Random random = new Random();
51 private boolean isNewState = false;
52 private final boolean isVisualizationEnabled;
53 private final ModelVisualizerAdapter modelVisualizerAdapter;
54
55 private final Map<Version, Fitness> fitnessCache = new HashMap<>();
56
57 public DesignSpaceExplorationAdapterImpl(Model model, DesignSpaceExplorationStoreAdapterImpl storeAdapter) {
58 this.model = model;
59 this.storeAdapter = storeAdapter;
60 this.sizeInterpretation = model.getInterpretation(NODE_COUNT_SYMBOL);
61 queryEngine = model.getAdapter(ModelQueryAdapter.class);
62
63 globalConstraints = storeAdapter.getGlobalConstraints();
64 for (var constraint : globalConstraints) {
65 globalConstraintResultSets.add(queryEngine.getResultSet(constraint));
66 }
67
68 transformationRules = storeAdapter.getTransformationSpecifications();
69 for (var rule : transformationRules) {
70 rule.prepare(model, queryEngine);
71 }
72
73 objectives = storeAdapter.getObjectives();
74 statesAndTraversedActivations = new HashMap<>();
75 strategy = storeAdapter.getStrategy();
76 strategy.initialize(this);
77 modelVisualizerAdapter = model.tryGetAdapter(ModelVisualizerAdapter.class).orElse(null);
78 isVisualizationEnabled = modelVisualizerAdapter != null;
79
80 }
81
82 @Override
83 public void addTransformationRule(TransformationRule rule) {
84 transformationRules.add(rule);
85 rule.prepare(model, queryEngine);
86 }
87
88 public List<Version> getTrajectory() {
89 return new ArrayList<>(trajectory);
90 }
91
92 @Override
93 public Model getModel() {
94 return model;
95 }
96
97 @Override
98 public DesignSpaceExplorationStoreAdapter getStoreAdapter() {
99 return storeAdapter;
100 }
101
102 @Override
103 public List<Version> explore() {
104 var state = model.commit();
105 trajectory.add(state);
106 strategy.explore();
107 if (isVisualizationEnabled) {
108 modelVisualizerAdapter.visualize();
109 }
110 return solutions;
111 }
112
113 @Override
114 public int getModelSize() {
115 return sizeInterpretation.get(Tuple.of());
116 }
117
118 @Override
119 public Tuple1 createObject() {
120 var newNodeId = getModelSize();
121 sizeInterpretation.put(Tuple.of(), newNodeId + 1);
122 return Tuple.of(newNodeId);
123 }
124
125 @Override
126 public Tuple deleteObject(Tuple tuple) {
127 if (tuple.getSize() != 1) {
128 throw new IllegalArgumentException("Tuple size must be 1");
129 }
130// TODO: implement more efficient deletion
131// if (tuple.get(0) == getModelSize() - 1) {
132// sizeInterpretation.put(Tuple.of(), getModelSize() - 1);
133// }
134 return tuple;
135 }
136
137 @Override
138 public boolean checkGlobalConstraints() {
139 for (var resultSet : globalConstraintResultSets) {
140 if (resultSet.size() > 0) {
141 return false;
142 }
143 }
144 return true;
145 }
146
147 @Override
148 public boolean backtrack() {
149 return backtrack("");
150 }
151 @Override
152 public boolean backtrack(String reason) {
153 if (trajectory.size() < 2) {
154 return false;
155 }
156 var currentState = model.getState();
157 if (!parents.containsKey(currentState)) {
158 return false;
159 }
160 if (isVisualizationEnabled) {
161 modelVisualizerAdapter.addTransition(trajectory.get(trajectory.size() - 1),
162 trajectory.get(trajectory.size() - 2), "backtrack(" + reason + ")");
163 }
164 model.restore(parents.get(model.getState()));
165 trajectory.remove(trajectory.size() - 1);
166 return true;
167 }
168
169 @Override
170 public void restoreTrajectory(List<Version> trajectory) {
171 model.restore(trajectory.get(trajectory.size() - 1));
172// if (isVisualizationEnabled) {
173// modelVisualizerAdapter.addTransition(this.trajectory.get(trajectory.size() - 1),
174// trajectory.get(trajectory.size() - 1), "restore");
175// }
176 this.trajectory = new ArrayList<>(trajectory);
177
178 }
179
180 @Override
181 public void setRandom(Random random) {
182 this.random = random;
183 }
184
185 @Override
186 @SuppressWarnings("squid:S2245")
187 public void setRandom(long seed) {
188 this.random = new Random(seed);
189 }
190
191 @Override
192 public List<Version> getSolutions() {
193 return solutions;
194 }
195
196 @Override
197 public Fitness getFitness() {
198 return fitnessCache.computeIfAbsent(model.getState(), s -> calculateFitness());
199 }
200
201 private Fitness calculateFitness() {
202 Fitness result = new Fitness();
203 boolean satisfiesHardObjectives = true;
204 for (Objective objective : objectives) {
205 var fitness = objective.getFitness(this);
206 result.put(objective.getName(), fitness);
207 if (objective.isHardObjective() && !objective.satisfiesHardObjective(fitness)) {
208 satisfiesHardObjectives = false;
209 }
210 }
211 result.setSatisfiesHardObjectives(satisfiesHardObjectives);
212
213 return result;
214 }
215
216 @Override
217 public void newSolution() {
218 var state = model.getState();
219 solutions.add(state);
220 if (isVisualizationEnabled) {
221 modelVisualizerAdapter.addSolution(state);
222 }
223 }
224
225 @Override
226 public int getDepth() {
227 return trajectory.size() - 1;
228 }
229
230 public LinkedHashSet<Activation> getUntraversedActivations() {
231 var traversedActivations = statesAndTraversedActivations.get(model.getState());
232 if (traversedActivations == null) {
233 return new LinkedHashSet<>(getAllActivations());
234 }
235 else {
236 LinkedHashSet<Activation> untraversedActivations = new LinkedHashSet<>();
237 for (Activation activation : getAllActivations()) {
238 if (!traversedActivations.contains(activation)) {
239 untraversedActivations.add(activation);
240 }
241 }
242 return untraversedActivations;
243 }
244 }
245
246 @Override
247 public boolean fireActivation(Activation activation) {
248 if (activation == null) {
249 return false;
250 }
251 var previousState = model.getState();
252 if (!activation.fire()) {
253 return false;
254 }
255 statesAndTraversedActivations.computeIfAbsent(previousState, s -> new ArrayList<>()).add(activation);
256 var newState = model.commit();
257 trajectory.add(newState);
258 parents.put(newState, previousState);
259 isNewState = !statesAndTraversedActivations.containsKey(newState);
260 if (isVisualizationEnabled) {
261 if (isNewState) {
262 modelVisualizerAdapter.addState(newState, getFitness().values());
263 }
264 modelVisualizerAdapter.addTransition(previousState, newState, activation.transformationRule().getName(),
265 activation.activation());
266 }
267 return true;
268 }
269
270 @Override
271 public boolean fireRandomActivation() {
272 var activations = getUntraversedActivations();
273 if (activations.isEmpty()) {
274 return false;
275 }
276 int index = random.nextInt(activations.size());
277 var iterator = activations.iterator();
278 while (index-- > 0) {
279 iterator.next();
280 }
281 var activationId = iterator.next();
282 return fireActivation(activationId);
283 }
284
285 public List<Activation> getAllActivations() {
286 List<Activation> result = new LinkedList<>();
287 for (var rule : transformationRules) {
288 result.addAll(rule.getAllActivationsAsList());
289 }
290 return result;
291 }
292
293 public boolean isCurrentStateAlreadyTraversed() {
294 return !isNewState;
295 }
296
297 public ObjectiveComparatorHelper getObjectiveComparatorHelper() {
298 if (objectiveComparatorHelper == null) {
299 objectiveComparatorHelper = new ObjectiveComparatorHelper(objectives);
300 }
301 return objectiveComparatorHelper;
302 }
303}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java
deleted file mode 100644
index 8f7056f2..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationBuilderImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal;
7
8import tools.refinery.store.adapter.AbstractModelAdapterBuilder;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.query.dnf.RelationalQuery;
12import tools.refinery.store.dse.DesignSpaceExplorationBuilder;
13import tools.refinery.store.dse.Strategy;
14import tools.refinery.store.dse.objectives.Objective;
15
16import java.util.LinkedHashSet;
17import java.util.LinkedList;
18import java.util.List;
19
20public class DesignSpaceExplorationBuilderImpl
21 extends AbstractModelAdapterBuilder<DesignSpaceExplorationStoreAdapterImpl>
22 implements DesignSpaceExplorationBuilder {
23 private final LinkedHashSet<TransformationRule> transformationSpecifications = new LinkedHashSet<>();
24 private final LinkedHashSet<RelationalQuery> globalConstraints = new LinkedHashSet<>();
25 private final List<Objective> objectives = new LinkedList<>();
26 private Strategy strategy;
27
28 @Override
29 protected DesignSpaceExplorationStoreAdapterImpl doBuild(ModelStore store) {
30 return new DesignSpaceExplorationStoreAdapterImpl(store, transformationSpecifications, globalConstraints,
31 objectives, strategy);
32 }
33
34 @Override
35 public DesignSpaceExplorationBuilder transformation(TransformationRule transformationRule) {
36 checkNotConfigured();
37 transformationSpecifications.add(transformationRule);
38 return this;
39 }
40
41 @Override
42 public DesignSpaceExplorationBuilder globalConstraint(RelationalQuery globalConstraint) {
43 checkNotConfigured();
44 globalConstraints.add(globalConstraint);
45 return this;
46 }
47
48 @Override
49 public DesignSpaceExplorationBuilder objective(Objective objective) {
50 checkNotConfigured();
51 objectives.add(objective);
52 return this;
53 }
54
55 @Override
56 public DesignSpaceExplorationBuilder strategy(Strategy strategy) {
57 checkNotConfigured();
58 this.strategy = strategy;
59 return this;
60 }
61
62 @Override
63 protected void doConfigure(ModelStoreBuilder storeBuilder) {
64 storeBuilder.symbols(DesignSpaceExplorationAdapterImpl.NODE_COUNT_SYMBOL);
65 super.doConfigure(storeBuilder);
66 }
67}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationStoreAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationStoreAdapterImpl.java
deleted file mode 100644
index fea39886..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/DesignSpaceExplorationStoreAdapterImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal;
7
8import tools.refinery.store.dse.DesignSpaceExplorationStoreAdapter;
9import tools.refinery.store.dse.Strategy;
10import tools.refinery.store.dse.objectives.Objective;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.model.ModelStore;
13import tools.refinery.store.query.dnf.RelationalQuery;
14
15import java.util.List;
16import java.util.Set;
17
18public class DesignSpaceExplorationStoreAdapterImpl implements DesignSpaceExplorationStoreAdapter {
19 private final ModelStore store;
20 private final Set<TransformationRule> transformationSpecifications;
21 private final Set<RelationalQuery> globalConstraints;
22 private final List<Objective> objectives;
23 private final Strategy strategy;
24
25 public DesignSpaceExplorationStoreAdapterImpl(ModelStore store,
26 Set<TransformationRule> transformationSpecifications,
27 Set<RelationalQuery> globalConstraints,
28 List<Objective> objectives, Strategy strategy) {
29 this.store = store;
30 this.transformationSpecifications = transformationSpecifications;
31 this.globalConstraints = globalConstraints;
32 this.objectives = objectives;
33 this.strategy = strategy;
34 }
35
36 @Override
37 public ModelStore getStore() {
38 return store;
39 }
40
41 @Override
42 public DesignSpaceExplorationAdapterImpl createModelAdapter(Model model) {
43 return new DesignSpaceExplorationAdapterImpl(model, this);
44 }
45
46 @Override
47 public Set<TransformationRule> getTransformationSpecifications() {
48 return transformationSpecifications;
49 }
50
51 @Override
52 public Set<RelationalQuery> getGlobalConstraints() {
53 return globalConstraints;
54 }
55
56 @Override
57 public List<Objective> getObjectives() {
58 return objectives;
59 }
60
61 @Override
62 public Strategy getStrategy() {
63 return strategy;
64 }
65}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java
deleted file mode 100644
index 37117164..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/TransformationRule.java
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal;
7
8import org.eclipse.collections.api.block.procedure.Procedure;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.dnf.RelationalQuery;
12import tools.refinery.store.dse.ActionFactory;
13import tools.refinery.store.query.resultset.OrderedResultSet;
14import tools.refinery.store.query.resultset.ResultSet;
15import tools.refinery.store.tuple.Tuple;
16
17import java.util.*;
18
19public class TransformationRule {
20
21 private final String name;
22 private final RelationalQuery precondition;
23 private final ActionFactory actionFactory;
24 private Procedure<Tuple> action;
25 private OrderedResultSet<Boolean> activations;
26 private Random random;
27 private ModelQueryAdapter queryEngine;
28
29 @SuppressWarnings("squid:S2245")
30 public TransformationRule(String name, RelationalQuery precondition, ActionFactory actionFactory) {
31 this(name, precondition, actionFactory, new Random());
32 }
33
34 @SuppressWarnings("squid:S2245")
35 public TransformationRule(String name, RelationalQuery precondition, ActionFactory actionFactory, long seed) {
36 this(name, precondition, actionFactory, new Random(seed));
37 }
38
39 public TransformationRule(String name, RelationalQuery precondition, ActionFactory actionFactory, Random random) {
40 this.name = name;
41 this.precondition = precondition;
42 this.actionFactory = actionFactory;
43 this.random = random;
44 }
45 public boolean prepare(Model model, ModelQueryAdapter queryEngine) {
46 action = actionFactory.prepare(model);
47 this.queryEngine = queryEngine;
48 activations = new OrderedResultSet<>(queryEngine.getResultSet(precondition));
49 return true;
50 }
51
52 public boolean fireActivation(Tuple activation) {
53 action.accept(activation);
54 queryEngine.flushChanges();
55 return true;
56 }
57
58 public boolean fireRandomActivation() {
59 return getRandomActivation().fire();
60 }
61
62 public String getName() {
63 return name;
64 }
65
66 public RelationalQuery getPrecondition() {
67 return precondition;
68 }
69
70 public ResultSet<Boolean> getAllActivationsAsResultSet() {
71 return activations;
72 }
73
74 public Set<Activation> getAllActivations() {
75 var result = new LinkedHashSet<Activation>();
76 var cursor = activations.getAll();
77 while (cursor.move()) {
78 result.add(new Activation(this, cursor.getKey()));
79 }
80 return result;
81 }
82
83 public List<Activation> getAllActivationsAsList() {
84 var result = new ArrayList<Activation>();
85 var cursor = activations.getAll();
86 while (cursor.move()) {
87 result.add(new Activation(this, cursor.getKey()));
88 }
89 return result;
90 }
91
92 public Activation getRandomActivation() {
93 return new Activation(this, activations.getKey(random.nextInt(activations.size())));
94 }
95
96 public Activation getActivation(int index) {
97 return new Activation(this, activations.getKey(index));
98 }
99}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActionVariable.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActionVariable.java
deleted file mode 100644
index 92de565d..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActionVariable.java
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal.action;
7
8import tools.refinery.store.tuple.Tuple;
9
10public interface ActionVariable extends AtomicAction {
11 Tuple getValue();
12}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActivationVariable.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActivationVariable.java
deleted file mode 100644
index 6b4c6340..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/ActivationVariable.java
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal.action;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.tuple.Tuple;
10
11public class ActivationVariable implements ActionVariable {
12
13 private final int index;
14 private Tuple value;
15
16 public ActivationVariable() {
17 this(0);
18 }
19
20 public ActivationVariable(int index) {
21 this.index = index;
22 }
23
24 @Override
25 public void fire(Tuple activation) {
26 value = Tuple.of(activation.get(index));
27 }
28
29 @Override
30 public ActivationVariable prepare(Model model) {
31 return this;
32 }
33
34 @Override
35 public Tuple getValue() {
36 return value;
37 }
38
39 @Override
40 public boolean equalsWithSubstitution(AtomicAction other) {
41 if (other == null || getClass() != other.getClass()) {
42 return false;
43 }
44 var otherAction = (ActivationVariable) other;
45
46 if (index != otherAction.index) {
47 return false;
48 }
49 if (value == null) {
50 return otherAction.value == null;
51 }
52 return value.equals(otherAction.value);
53 }
54}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/AtomicAction.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/AtomicAction.java
deleted file mode 100644
index a8f10bca..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/AtomicAction.java
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal.action;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.tuple.Tuple;
10
11public interface AtomicAction {
12
13 void fire(Tuple activation);
14
15 AtomicAction prepare(Model model);
16
17 boolean equalsWithSubstitution(AtomicAction other);
18}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java
deleted file mode 100644
index 9900390f..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal.action;
7
8import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.tuple.Tuple;
11
12public class DeleteAction implements AtomicAction {
13
14 private final ActionVariable variable;
15 private DesignSpaceExplorationAdapter dseAdapter;
16
17 public DeleteAction(ActionVariable variable) {
18 this.variable = variable;
19 }
20
21 @Override
22 public void fire(Tuple activation) {
23 dseAdapter.deleteObject(variable.getValue());
24 }
25
26 @Override
27 public DeleteAction prepare(Model model) {
28 dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
29 return this;
30 }
31
32 @Override
33 public boolean equalsWithSubstitution(AtomicAction other) {
34 if (other == null || getClass() != other.getClass()) {
35 return false;
36 }
37 var otherAction = (DeleteAction) other;
38 return this.variable.getClass() == otherAction.variable.getClass();
39 }
40}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/InsertAction.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/InsertAction.java
deleted file mode 100644
index 90fcc5ac..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/InsertAction.java
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal.action;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.tuple.Tuple;
11import tools.refinery.store.tuple.Tuple0;
12
13import java.util.Arrays;
14
15public class InsertAction<T> implements AtomicAction {
16
17 private final Interpretation<T> interpretation;
18 private final T value;
19 private final int arity;
20 private final ActionVariable[] variables;
21
22 public InsertAction(Interpretation<T> interpretation, T value, ActionVariable... variables) {
23 this.interpretation = interpretation;
24 this.value = value;
25 this.variables = variables;
26 this.arity = interpretation.getSymbol().arity();
27 if (variables.length != arity) {
28 throw new IllegalArgumentException("Expected " + arity + " variables, but got " + variables.length);
29 }
30 }
31
32 @Override
33 public void fire(Tuple activation) {
34 Tuple tuple;
35 if (arity == 0) {
36 tuple = Tuple0.INSTANCE;
37 }
38 else if (arity == 1) {
39 tuple = variables[0].getValue();
40 }
41 else if (arity == 2) {
42 tuple = Tuple.of(variables[0].getValue().get(0), variables[1].getValue().get(0));
43 }
44 else if (arity == 3) {
45 tuple = Tuple.of(variables[0].getValue().get(0), variables[1].getValue().get(0), variables[2].getValue().get(0));
46 }
47 else {
48 tuple = Tuple.of(Arrays.stream(variables).map(variable -> variable.getValue().get(0))
49 .mapToInt(Integer::intValue).toArray());
50 }
51 interpretation.put(tuple, value);
52 }
53
54 public void put(Tuple tuple) {
55 interpretation.put(tuple, value);
56 }
57
58 @Override
59 public InsertAction<T> prepare(Model model) {
60 return this;
61 }
62
63 public ActionVariable[] getVariables() {
64 return variables;
65 }
66
67 @Override
68 public boolean equalsWithSubstitution(AtomicAction other) {
69 if (other == null || getClass() != other.getClass()) {
70 return false;
71 }
72 var otherAction = (InsertAction<?>) other;
73 if (variables.length != otherAction.variables.length) {
74 return false;
75 }
76 if (!interpretation.equals(otherAction.interpretation)) {
77 return false;
78 }
79 if (value == null) {
80 if (otherAction.value != null) {
81 return false;
82 }
83 }
84 else if (!value.equals(otherAction.value)) {
85 return false;
86 }
87 for (var i = 0; i < variables.length; i++) {
88 if (!variables[i].equalsWithSubstitution(otherAction.variables[i])) {
89 return false;
90 }
91 }
92 return true;
93 }
94}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/NewItemVariable.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/NewItemVariable.java
deleted file mode 100644
index cbb9697e..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/NewItemVariable.java
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal.action;
7
8import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.tuple.Tuple;
11import tools.refinery.store.tuple.Tuple1;
12
13public class NewItemVariable implements ActionVariable {
14 private DesignSpaceExplorationAdapter dseAdapter;
15 private Tuple1 value;
16
17 @Override
18 public void fire(Tuple activation) {
19 value = dseAdapter.createObject();
20 }
21
22 @Override
23 public NewItemVariable prepare(Model model) {
24 dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
25 return this;
26 }
27
28 @Override
29 public Tuple1 getValue() {
30 return value;
31 }
32
33 @Override
34 public boolean equalsWithSubstitution(AtomicAction other) {
35 if (other == null || getClass() != other.getClass()) {
36 return false;
37 }
38 var otherAction = (NewItemVariable) other;
39 if (value == null) {
40 return otherAction.value == null;
41 }
42 return value.equals(otherAction.value);
43
44 }
45}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/TransformationAction.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/TransformationAction.java
deleted file mode 100644
index adc4df9e..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/TransformationAction.java
+++ /dev/null
@@ -1,129 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.internal.action;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.tuple.Tuple;
10import tools.refinery.store.tuple.Tuple2;
11
12import java.util.*;
13
14public class TransformationAction {
15 private final List<ActionVariable> actionVariables = new ArrayList<>();
16 private final List<InsertAction<?>> insertActions = new ArrayList<>();
17 private final List<DeleteAction> deleteActions = new ArrayList<>();
18 private boolean configured = false;
19 private final Map<Integer, List<Tuple2>> actionVariableUsageMap = new LinkedHashMap<>();
20
21 public TransformationAction add(ActionVariable action) {
22 checkConfigured();
23 actionVariables.add(action);
24 return this;
25 }
26
27 public TransformationAction add(InsertAction<?> action) {
28 checkConfigured();
29 insertActions.add(action);
30 return this;
31 }
32
33 public TransformationAction add(DeleteAction action) {
34 checkConfigured();
35 deleteActions.add(action);
36 return this;
37 }
38
39 private void checkConfigured() {
40 if (configured) {
41 throw new IllegalStateException("Action already configured.");
42 }
43 }
44
45 public TransformationAction prepare(Model model) {
46 for (ActionVariable action : actionVariables) {
47 action.prepare(model);
48 }
49 for (InsertAction<?> action : insertActions) {
50 action.prepare(model);
51 }
52 for (DeleteAction action : deleteActions) {
53 action.prepare(model);
54 }
55
56 for (var insertAction : insertActions) {
57 var actionIndex = insertActions.indexOf(insertAction);
58 var variables = insertAction.getVariables();
59 for (var i = 0; i < variables.length; i++) {
60 var variablelGlobalIndex = actionVariables.indexOf(variables[i]);
61 actionVariableUsageMap.computeIfAbsent(variablelGlobalIndex, k -> new ArrayList<>());
62 actionVariableUsageMap.get(variablelGlobalIndex).add(Tuple.of(actionIndex, i));
63 }
64 }
65
66 configured = true;
67 return this;
68 }
69
70 public boolean fire(Tuple activation) {
71 for (ActionVariable action : actionVariables) {
72 action.fire(activation);
73 }
74 for (InsertAction<?> action : insertActions) {
75 action.fire(activation);
76 }
77 for (DeleteAction action : deleteActions) {
78 action.fire(activation);
79 }
80 return true;
81 }
82
83 // Returns true if ActionVariables and InsertActions are inserted in same order, ActionVariables are equal (they
84 // have the same index for getting the value from the activation Tuple) and InsertActions are equal (they have
85 // the same arity and value to be set).
86 public boolean equalsWithSubstitution(TransformationAction other) {
87 if (other == this) {
88 return true;
89 }
90
91 if (actionVariables.size() != other.actionVariables.size()) {
92 return false;
93 }
94
95 if (insertActions.size() != other.insertActions.size()) {
96 return false;
97 }
98
99 if (deleteActions.size() != other.deleteActions.size()) {
100 return false;
101 }
102
103 for (var i = 0; i < actionVariables.size(); i++) {
104 var variable = actionVariables.get(i);
105 var otherVariable = other.actionVariables.get(i);
106 if (!variable.equalsWithSubstitution(otherVariable)) {
107 return false;
108 }
109 }
110
111 for (var i = 0; i < insertActions.size(); i++) {
112 var insertAction = insertActions.get(i);
113 var otherInsertAction = other.insertActions.get(i);
114 if (!insertAction.equalsWithSubstitution(otherInsertAction)) {
115 return false;
116 }
117 }
118
119 for (var i = 0; i < deleteActions.size(); i++) {
120 var deleteAction = deleteActions.get(i);
121 var otherDeleteAction = other.deleteActions.get(i);
122 if (!deleteAction.equalsWithSubstitution(otherDeleteAction)) {
123 return false;
124 }
125 }
126 return this.actionVariableUsageMap.equals(other.actionVariableUsageMap);
127
128 }
129}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/DanglingEdges.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/DanglingEdges.java
new file mode 100644
index 00000000..ac9d125b
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/DanglingEdges.java
@@ -0,0 +1,12 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification;
7
8public enum DanglingEdges {
9 IGNORE,
10 DELETE,
11 FAIL
12}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationAdapter.java
new file mode 100644
index 00000000..58b60499
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationAdapter.java
@@ -0,0 +1,24 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification;
7
8import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.dse.modification.internal.ModificationBuilderImpl;
10import tools.refinery.store.tuple.Tuple;
11import tools.refinery.store.tuple.Tuple1;
12
13public interface ModificationAdapter extends ModelAdapter {
14
15 int getModelSize();
16
17 Tuple1 createObject();
18
19 boolean deleteObject(Tuple tuple, DanglingEdges danglingEdges);
20
21 static ModificationBuilder builder() {
22 return new ModificationBuilderImpl();
23 }
24}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationBuilder.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationBuilder.java
new file mode 100644
index 00000000..48c22bdf
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationBuilder.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification;
7
8import tools.refinery.store.adapter.ModelAdapterBuilder;
9
10public interface ModificationBuilder extends ModelAdapterBuilder {
11}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationStoreAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationStoreAdapter.java
new file mode 100644
index 00000000..144c4d05
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/ModificationStoreAdapter.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification;
7
8import tools.refinery.store.adapter.ModelStoreAdapter;
9
10public interface ModificationStoreAdapter extends ModelStoreAdapter {
11}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java
new file mode 100644
index 00000000..5b86a5e1
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/CreateActionLiteral.java
@@ -0,0 +1,43 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification.actions;
7
8import tools.refinery.store.dse.modification.ModificationAdapter;
9import tools.refinery.store.dse.transition.actions.AbstractActionLiteral;
10import tools.refinery.store.dse.transition.actions.BoundActionLiteral;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.query.term.NodeVariable;
13
14import java.util.List;
15
16public class CreateActionLiteral extends AbstractActionLiteral {
17 private final NodeVariable variable;
18
19 public CreateActionLiteral(NodeVariable variable) {
20
21 this.variable = variable;
22 }
23
24 public NodeVariable getVariable() {
25 return variable;
26 }
27
28 @Override
29 public List<NodeVariable> getInputVariables() {
30 return List.of();
31 }
32
33 @Override
34 public List<NodeVariable> getOutputVariables() {
35 return List.of(variable);
36 }
37
38 @Override
39 public BoundActionLiteral bindToModel(Model model) {
40 var adapter = model.getAdapter(ModificationAdapter.class);
41 return ignoredTuple -> adapter.createObject();
42 }
43}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java
new file mode 100644
index 00000000..18ad2b9d
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/DeleteActionLiteral.java
@@ -0,0 +1,51 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification.actions;
7
8import tools.refinery.store.dse.modification.DanglingEdges;
9import tools.refinery.store.dse.modification.ModificationAdapter;
10import tools.refinery.store.dse.transition.actions.AbstractActionLiteral;
11import tools.refinery.store.dse.transition.actions.BoundActionLiteral;
12import tools.refinery.store.model.Model;
13import tools.refinery.store.query.term.NodeVariable;
14import tools.refinery.store.tuple.Tuple;
15
16import java.util.List;
17
18public class DeleteActionLiteral extends AbstractActionLiteral {
19 private final NodeVariable variable;
20 private final DanglingEdges danglingEdges;
21
22 public DeleteActionLiteral(NodeVariable variable, DanglingEdges danglingEdges) {
23
24 this.variable = variable;
25 this.danglingEdges = danglingEdges;
26 }
27
28 public NodeVariable getVariable() {
29 return variable;
30 }
31
32 public DanglingEdges getDanglingEdges() {
33 return danglingEdges;
34 }
35
36 @Override
37 public List<NodeVariable> getInputVariables() {
38 return List.of(variable);
39 }
40
41 @Override
42 public List<NodeVariable> getOutputVariables() {
43 return List.of();
44 }
45
46 @Override
47 public BoundActionLiteral bindToModel(Model model) {
48 var adapter = model.getAdapter(ModificationAdapter.class);
49 return tuple -> adapter.deleteObject(tuple, danglingEdges) ? Tuple.of() : null;
50 }
51}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java
new file mode 100644
index 00000000..31f50ac7
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/actions/ModificationActionLiterals.java
@@ -0,0 +1,23 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification.actions;
7
8import tools.refinery.store.dse.modification.DanglingEdges;
9import tools.refinery.store.query.term.NodeVariable;
10
11public class ModificationActionLiterals {
12 private ModificationActionLiterals() {
13 throw new IllegalArgumentException("This is a static utility class and should not be instantiated directly");
14 }
15
16 public static CreateActionLiteral create(NodeVariable variable) {
17 return new CreateActionLiteral(variable);
18 }
19
20 public static DeleteActionLiteral delete(NodeVariable variable, DanglingEdges danglingEdges) {
21 return new DeleteActionLiteral(variable, danglingEdges);
22 }
23}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationAdapterImpl.java
new file mode 100644
index 00000000..4e77c462
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationAdapterImpl.java
@@ -0,0 +1,107 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification.internal;
7
8import tools.refinery.store.adapter.ModelStoreAdapter;
9import tools.refinery.store.dse.modification.DanglingEdges;
10import tools.refinery.store.dse.modification.ModificationAdapter;
11import tools.refinery.store.model.Interpretation;
12import tools.refinery.store.model.Model;
13import tools.refinery.store.representation.Symbol;
14import tools.refinery.store.tuple.Tuple;
15import tools.refinery.store.tuple.Tuple1;
16
17import java.util.HashSet;
18
19public class ModificationAdapterImpl implements ModificationAdapter {
20 static final Symbol<Integer> NEXT_ID = Symbol.of("NEXT_ID", 0, Integer.class, 0);
21
22 final ModelStoreAdapter storeAdapter;
23 final Model model;
24 Interpretation<Integer> nodeCountInterpretation;
25
26 ModificationAdapterImpl(ModelStoreAdapter storeAdapter, Model model) {
27 this.storeAdapter = storeAdapter;
28 this.model = model;
29 this.nodeCountInterpretation = model.getInterpretation(NEXT_ID);
30 }
31
32 @Override
33 public Model getModel() {
34 return model;
35 }
36
37 @Override
38 public ModelStoreAdapter getStoreAdapter() {
39 return storeAdapter;
40 }
41
42 @Override
43 public int getModelSize() {
44 return nodeCountInterpretation.get(Tuple.of());
45 }
46
47 @Override
48 public Tuple1 createObject() {
49 var newNodeId = getModelSize();
50 nodeCountInterpretation.put(Tuple.of(), newNodeId + 1);
51 return Tuple.of(newNodeId);
52 }
53
54 @Override
55 public boolean deleteObject(Tuple tuple, DanglingEdges danglingEdges) {
56 if (tuple.getSize() != 1) {
57 throw new IllegalArgumentException("Tuple size must be 1");
58 }
59 int objectId = tuple.get(0);
60 if (danglingEdges == DanglingEdges.DELETE) {
61 deleteDanglingEdges(objectId);
62 } else if (danglingEdges == DanglingEdges.FAIL && hasDanglingEdges(objectId)) {
63 return false;
64
65 }
66 int modelSize = getModelSize();
67 if (objectId == modelSize - 1) {
68 nodeCountInterpretation.put(Tuple.of(), modelSize - 1);
69 }
70 return true;
71 }
72
73 private void deleteDanglingEdges(int objectId) {
74 for (var symbol : model.getStore().getSymbols()) {
75 deleteDanglingEdges(objectId, (Symbol<?>) symbol);
76 }
77 }
78
79 private <T> void deleteDanglingEdges(int objectId, Symbol<T> symbol) {
80 var interpretation = model.getInterpretation(symbol);
81 var toDelete = new HashSet<Tuple>();
82 int arity = symbol.arity();
83 for (int i = 0; i < arity; i++) {
84 var cursor = interpretation.getAdjacent(i, objectId);
85 while (cursor.move()) {
86 toDelete.add(cursor.getKey());
87 }
88 }
89 var defaultValue = symbol.defaultValue();
90 for (var tuple : toDelete) {
91 interpretation.put(tuple, defaultValue);
92 }
93 }
94
95 private boolean hasDanglingEdges(int objectId) {
96 for (var symbol : model.getStore().getSymbols()) {
97 var interpretation = model.getInterpretation(symbol);
98 int arity = symbol.arity();
99 for (int i = 0; i < arity; i++) {
100 if (interpretation.getAdjacentSize(i, objectId) > 0) {
101 return true;
102 }
103 }
104 }
105 return false;
106 }
107}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationBuilderImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationBuilderImpl.java
new file mode 100644
index 00000000..c4d38d22
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationBuilderImpl.java
@@ -0,0 +1,29 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification.internal;
7
8import tools.refinery.store.adapter.AbstractModelAdapterBuilder;
9import tools.refinery.store.dse.modification.ModificationBuilder;
10import tools.refinery.store.dse.modification.ModificationStoreAdapter;
11import tools.refinery.store.model.ModelStore;
12import tools.refinery.store.model.ModelStoreBuilder;
13import tools.refinery.store.statecoding.StateCoderBuilder;
14
15public class ModificationBuilderImpl extends AbstractModelAdapterBuilder<ModificationStoreAdapter> implements ModificationBuilder {
16
17 @Override
18 protected void doConfigure(ModelStoreBuilder storeBuilder) {
19 storeBuilder.symbols(ModificationAdapterImpl.NEXT_ID);
20 storeBuilder.tryGetAdapter(StateCoderBuilder.class).ifPresent(
21 coderBuilder -> coderBuilder.exclude(ModificationAdapterImpl.NEXT_ID));
22 super.doConfigure(storeBuilder);
23 }
24
25 @Override
26 protected ModificationStoreAdapter doBuild(ModelStore store) {
27 return new ModificationStoreAdapterImpl(store);
28 }
29}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationStoreAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationStoreAdapterImpl.java
new file mode 100644
index 00000000..62e4227b
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/modification/internal/ModificationStoreAdapterImpl.java
@@ -0,0 +1,29 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.modification.internal;
7
8import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.dse.modification.ModificationStoreAdapter;
10import tools.refinery.store.model.Model;
11import tools.refinery.store.model.ModelStore;
12
13public class ModificationStoreAdapterImpl implements ModificationStoreAdapter {
14 ModelStore store;
15
16 ModificationStoreAdapterImpl(ModelStore store) {
17 this.store = store;
18 }
19
20 @Override
21 public ModelStore getStore() {
22 return store;
23 }
24
25 @Override
26 public ModelAdapter createModelAdapter(Model model) {
27 return new ModificationAdapterImpl(this, model);
28 }
29}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedDummyHardObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedDummyHardObjective.java
deleted file mode 100644
index afed75fd..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedDummyHardObjective.java
+++ /dev/null
@@ -1,52 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Andras Szabolcs Nagy, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.objectives;
11
12import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
13
14/**
15 * This hard objective is fulfilled in any circumstances. Use it if all states should be regarded as a valid solution.
16 *
17 * @author Andras Szabolcs Nagy
18 *
19 */
20public class AlwaysSatisfiedDummyHardObjective extends BaseObjective {
21
22 private static final String DEFAULT_NAME = "AlwaysSatisfiedDummyHardObjective";
23
24 public AlwaysSatisfiedDummyHardObjective() {
25 super(DEFAULT_NAME);
26 }
27
28 public AlwaysSatisfiedDummyHardObjective(String name) {
29 super(name);
30 }
31
32 @Override
33 public Double getFitness(DesignSpaceExplorationAdapter context) {
34 return 0d;
35 }
36
37 @Override
38 public boolean isHardObjective() {
39 return true;
40 }
41
42 @Override
43 public boolean satisfiesHardObjective(Double fitness) {
44 return true;
45 }
46
47 @Override
48 public Objective createNew() {
49 return this;
50 }
51
52}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java
deleted file mode 100644
index cdd1754f..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/AlwaysSatisfiedRandomHardObjective.java
+++ /dev/null
@@ -1,57 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Andras Szabolcs Nagy, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.objectives;
11
12import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
13
14import java.util.Random;
15
16/**
17 * This hard objective is fulfilled in any circumstances. Use it if all states should be regarded as a valid solution.
18 *
19 * @author Andras Szabolcs Nagy
20 *
21 */
22public class AlwaysSatisfiedRandomHardObjective extends BaseObjective {
23
24 private static final String DEFAULT_NAME = "AlwaysSatisfiedDummyHardObjective";
25 @SuppressWarnings("squid:S2245")
26 private static final Random random = new Random(0);
27
28 public AlwaysSatisfiedRandomHardObjective() {
29 super(DEFAULT_NAME);
30 }
31
32 public AlwaysSatisfiedRandomHardObjective(String name) {
33 super(name);
34 }
35
36 @Override
37 public Double getFitness(DesignSpaceExplorationAdapter context) {
38// return 0d;
39 return random.nextDouble();
40 }
41
42 @Override
43 public boolean isHardObjective() {
44 return true;
45 }
46
47 @Override
48 public boolean satisfiesHardObjective(Double fitness) {
49 return true;
50 }
51
52 @Override
53 public Objective createNew() {
54 return this;
55 }
56
57}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/BaseObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/BaseObjective.java
deleted file mode 100644
index b76598fb..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/BaseObjective.java
+++ /dev/null
@@ -1,132 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Andras Szabolcs Nagy, Abel Hegedus, Akos Horvath, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.objectives;
11
12import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
13
14import java.util.Comparator;
15import java.util.Objects;
16
17/**
18 * This abstract class implements the basic functionality of an objective ({@link Objective} namely its name,
19 * comparator, level and fitness hard constraint.
20 *
21 * @author Andras Szabolcs Nagy
22 *
23 */
24public abstract class BaseObjective implements Objective {
25
26 protected final String name;
27 protected Comparator<Double> comparator = Comparators.HIGHER_IS_BETTER;
28
29 protected double fitnessConstraint;
30 protected boolean isThereFitnessConstraint = false;
31 protected Comparator<Double> fitnessConstraintComparator;
32
33 protected BaseObjective(String name) {
34 Objects.requireNonNull(name, "Name of the objective cannot be null.");
35 this.name = name;
36 }
37
38 @Override
39 public String getName() {
40 return name;
41 }
42
43 @Override
44 public void setComparator(Comparator<Double> comparator) {
45 this.comparator = comparator;
46 }
47
48 @Override
49 public Comparator<Double> getComparator() {
50 return comparator;
51 }
52
53 public BaseObjective withComparator(Comparator<Double> comparator) {
54 setComparator(comparator);
55 return this;
56 }
57
58 /**
59 * Adds a hard constraint on the fitness value. For example, the fitness value must be better than 10 to accept the
60 * current state as a solution.
61 *
62 * @param fitnessConstraint
63 * Solutions should be better than this value.
64 * @param fitnessConstraintComparator
65 * {@link Comparator} to determine if the current state is better than the given value.
66 * @return The actual instance to enable builder pattern like usage.
67 */
68 public BaseObjective withHardConstraintOnFitness(double fitnessConstraint,
69 Comparator<Double> fitnessConstraintComparator) {
70 this.fitnessConstraint = fitnessConstraint;
71 this.fitnessConstraintComparator = fitnessConstraintComparator;
72 this.isThereFitnessConstraint = true;
73 return this;
74 }
75
76 /**
77 * Adds a hard constraint on the fitness value. For example, the fitness value must be better than 10 to accept the
78 * current state as a solution. The provided comparator will be used.
79 *
80 * @param fitnessConstraint
81 * Solutions should be better than this value.
82 * @return The actual instance to enable builder pattern like usage.
83 */
84 public BaseObjective withHardConstraintOnFitness(double fitnessConstraint) {
85 return withHardConstraintOnFitness(fitnessConstraint, null);
86 }
87
88 @Override
89 public void init(DesignSpaceExplorationAdapter context) {
90 if (fitnessConstraintComparator == null) {
91 fitnessConstraintComparator = comparator;
92 }
93 }
94
95 @Override
96 public boolean isHardObjective() {
97 return isThereFitnessConstraint;
98 }
99
100 @Override
101 public boolean satisfiesHardObjective(Double fitness) {
102 if (isThereFitnessConstraint) {
103 int compare = fitnessConstraintComparator.compare(fitness, fitnessConstraint);
104 if (compare < 0) {
105 return false;
106 }
107 }
108 return true;
109 }
110
111 @Override
112 public int hashCode() {
113 return name.hashCode();
114 }
115
116 @Override
117 public boolean equals(Object obj) {
118 if (this == obj) {
119 return true;
120 }
121 if (obj instanceof BaseObjective baseObjective) {
122 return name.equals(baseObjective.getName());
123 }
124 return false;
125 }
126
127 @Override
128 public String toString() {
129 return name;
130 }
131
132}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Comparators.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Comparators.java
deleted file mode 100644
index 181397b3..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Comparators.java
+++ /dev/null
@@ -1,26 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Andras Szabolcs Nagy, Abel Hegedus, Akos Horvath, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.objectives;
11
12import java.util.Comparator;
13
14public class Comparators {
15
16 private Comparators() { /*Utility class constructor*/ }
17
18 public static final Comparator<Double> HIGHER_IS_BETTER = Double::compareTo;
19
20 public static final Comparator<Double> LOWER_IS_BETTER = (o1, o2) -> o2.compareTo(o1);
21
22 private static final Double ZERO = (double) 0;
23
24 public static final Comparator<Double> DIFFERENCE_TO_ZERO_IS_BETTER = (o1, o2) -> ZERO.compareTo(Math.abs(o1)-Math.abs(o2));
25
26}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java
deleted file mode 100644
index b1dc4442..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java
+++ /dev/null
@@ -1,46 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Miklos Foldenyi, Andras Szabolcs Nagy, Abel Hegedus, Akos Horvath, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.objectives;
11
12import java.util.HashMap;
13
14public class Fitness extends HashMap<String, Double> {
15
16 private boolean satisfiesHardObjectives;
17
18 public boolean isSatisfiesHardObjectives() {
19 return satisfiesHardObjectives;
20 }
21
22 public void setSatisfiesHardObjectives(boolean satisfiesHardObjectives) {
23 this.satisfiesHardObjectives = satisfiesHardObjectives;
24 }
25
26 @Override
27 public String toString() {
28 return super.toString() + " hardObjectives=" + satisfiesHardObjectives;
29 }
30
31 @Override
32 public boolean equals(Object other) {
33 if (other == null) return false;
34 if (getClass() != other.getClass()) return false;
35 if (!super.equals(other)) return false;
36 return satisfiesHardObjectives == ((Fitness) other).satisfiesHardObjectives;
37 }
38
39 @Override
40 public int hashCode() {
41 int h = super.hashCode();
42 h = h * 31 + (satisfiesHardObjectives ? 1 : 0);
43 return h;
44 }
45
46}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Objective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Objective.java
deleted file mode 100644
index c7313622..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Objective.java
+++ /dev/null
@@ -1,101 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Miklos Foldenyi, Andras Szabolcs Nagy, Abel Hegedus, Akos Horvath, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.objectives;
11
12import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
13
14import java.util.Comparator;
15
16/**
17 *
18 * Implementation of this interface represents a single objective of the DSE problem, which can assess a solution
19 * (trajectory) in a single number. It has a name and a comparator which orders two solution based on the calculated
20 * value.
21 * <p>
22 * Objectives can be either hard or soft objectives. Hard objectives can be satisfied or unsatisfied. If all of the hard
23 * objectives are satisfied on a single solution, then it is considered to be a valid (or goal) solution.
24 * <p>
25 * Certain objectives can have inner state for calculating the fitness value. In this case a new instance is necessary
26 * for every new thread, and the {@code createNew} method should not return the same instance more than once.
27 *
28 * @author Andras Szabolcs Nagy
29 *
30 */
31public interface Objective {
32
33 /**
34 * Returns the name of the objective.
35 *
36 * @return The name of the objective.
37 */
38 String getName();
39
40 /**
41 * Sets the {@link Comparator} which is used to compare fitness (doubles). It determines whether the objective is to
42 * minimize or maximize (or minimize or maximize a delta from a given number).
43 *
44 * @param comparator The comparator.
45 */
46 void setComparator(Comparator<Double> comparator);
47
48 /**
49 * Returns a {@link Comparator} which is used to compare fitness (doubles). It determines whether the objective is
50 * to minimize or maximize (or minimize or maximize a delta from a given number).
51 *
52 * @return The comparator.
53 */
54 Comparator<Double> getComparator();
55
56 /**
57 * Calculates the value of the objective on a given solution (trajectory).
58 *
59 * @param context
60 * The {@link DesignSpaceExplorationAdapter}
61 * @return The objective value in double.
62 */
63 Double getFitness(DesignSpaceExplorationAdapter context);
64
65 /**
66 * Initializes the objective. It is called exactly once for every thread starts.
67 *
68 * @param context
69 * The {@link DesignSpaceExplorationAdapter}.
70 */
71 void init(DesignSpaceExplorationAdapter context);
72
73 /**
74 * Returns an instance of the {@link Objective}. If it returns the same instance, all the methods has to be thread
75 * save as they are called concurrently.
76 *
77 * @return An instance of the objective.
78 */
79 Objective createNew();
80
81 /**
82 * Returns true if the objective is a hard objective. In such a case the method
83 * {@link Objective#satisfiesHardObjective(Double)} is called.
84 *
85 * @return True if the objective is a hard objective.
86 * @see Objective#satisfiesHardObjective(Double)
87 * @see Objective
88 */
89 boolean isHardObjective();
90
91 /**
92 * Determines if the given fitness value satisfies the hard objective.
93 *
94 * @param fitness
95 * The fitness value of a solution.
96 * @return True if it satisfies the hard objective or it is a soft constraint.
97 * @see Objective
98 */
99 boolean satisfiesHardObjective(Double fitness);
100
101}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/ObjectiveComparatorHelper.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/ObjectiveComparatorHelper.java
deleted file mode 100644
index eb03eeaf..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/ObjectiveComparatorHelper.java
+++ /dev/null
@@ -1,60 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Andras Szabolcs Nagy, Abel Hegedus, Akos Horvath, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.objectives;
11
12import java.util.List;
13
14/**
15 * This class is responsible to compare and sort fitness values.
16 *
17 * @author András Szabolcs Nagy
18 */
19public class ObjectiveComparatorHelper {
20
21 private final List<Objective> objectives;
22
23 public ObjectiveComparatorHelper(List<Objective> objectives) {
24 this.objectives = objectives;
25 }
26
27 /**
28 * Compares two fitnesses based on dominance. Returns -1 if the second parameter {@code o2} is a better
29 * solution ({@code o2} dominates {@code o1}), 1 if the first parameter {@code o1} is better ({@code o1} dominates
30 * {@code o2}) and returns 0 if they are non-dominating each other.
31 */
32 public int compare(Fitness o1, Fitness o2) {
33
34 boolean o1HasBetterFitness = false;
35 boolean o2HasBetterFitness = false;
36
37 for (Objective objective : objectives) {
38 String objectiveName = objective.getName();
39 int sgn = objective.getComparator().compare(o1.get(objectiveName), o2.get(objectiveName));
40
41 if (sgn < 0) {
42 o2HasBetterFitness = true;
43 }
44 if (sgn > 0) {
45 o1HasBetterFitness = true;
46 }
47 if (o1HasBetterFitness && o2HasBetterFitness) {
48 break;
49 }
50 }
51 if (o2HasBetterFitness) {
52 return -1;
53 } else if (o1HasBetterFitness) {
54 return 1;
55 }
56
57 return 0;
58
59 }
60}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/BoundPropagator.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/BoundPropagator.java
new file mode 100644
index 00000000..5ad61463
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/BoundPropagator.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation;
7
8@FunctionalInterface
9public interface BoundPropagator {
10 PropagationResult propagateOne();
11}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationAdapter.java
new file mode 100644
index 00000000..3ea5a75f
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationAdapter.java
@@ -0,0 +1,20 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation;
7
8import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.dse.propagation.impl.PropagationBuilderImpl;
10
11public interface PropagationAdapter extends ModelAdapter {
12 @Override
13 PropagationStoreAdapter getStoreAdapter();
14
15 PropagationResult propagate();
16
17 static PropagationBuilder builder() {
18 return new PropagationBuilderImpl();
19 }
20}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationBuilder.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationBuilder.java
new file mode 100644
index 00000000..f8a89b30
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationBuilder.java
@@ -0,0 +1,32 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation;
7
8import tools.refinery.store.adapter.ModelAdapterBuilder;
9import tools.refinery.store.dse.transition.Rule;
10import tools.refinery.store.model.ModelStore;
11
12import java.util.Collection;
13import java.util.List;
14
15@SuppressWarnings("UnusedReturnValue")
16public interface PropagationBuilder extends ModelAdapterBuilder {
17 PropagationBuilder rule(Rule propagationRule);
18
19 default PropagationBuilder rules(Rule... propagationRules) {
20 return rules(List.of(propagationRules));
21 }
22
23 default PropagationBuilder rules(Collection<Rule> propagationRules) {
24 propagationRules.forEach(this::rule);
25 return this;
26 }
27
28 PropagationBuilder propagator(Propagator propagator);
29
30 @Override
31 PropagationStoreAdapter build(ModelStore store);
32}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationResult.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationResult.java
new file mode 100644
index 00000000..ea56653a
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationResult.java
@@ -0,0 +1,28 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation;
7
8public enum PropagationResult {
9 UNCHANGED,
10 PROPAGATED,
11 REJECTED;
12
13 public PropagationResult andThen(PropagationResult next) {
14 return switch (this) {
15 case UNCHANGED -> next;
16 case PROPAGATED -> next == REJECTED ? REJECTED : PROPAGATED;
17 case REJECTED -> REJECTED;
18 };
19 }
20
21 public boolean isRejected() {
22 return this == REJECTED;
23 }
24
25 public boolean isChanged() {
26 return this == PROPAGATED;
27 }
28}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationStoreAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationStoreAdapter.java
new file mode 100644
index 00000000..82cba909
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/PropagationStoreAdapter.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation;
7
8import tools.refinery.store.adapter.ModelStoreAdapter;
9import tools.refinery.store.model.Model;
10
11public interface PropagationStoreAdapter extends ModelStoreAdapter {
12 @Override
13 PropagationAdapter createModelAdapter(Model model);
14}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/Propagator.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/Propagator.java
new file mode 100644
index 00000000..c6b4e1c9
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/Propagator.java
@@ -0,0 +1,17 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStoreBuilder;
10
11@FunctionalInterface
12public interface Propagator {
13 default void configure(ModelStoreBuilder storeBuilder) {
14 }
15
16 BoundPropagator bindToModel(Model model);
17}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationAdapterImpl.java
new file mode 100644
index 00000000..fdd19217
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationAdapterImpl.java
@@ -0,0 +1,75 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation.impl;
7
8import tools.refinery.store.dse.propagation.BoundPropagator;
9import tools.refinery.store.dse.propagation.PropagationAdapter;
10import tools.refinery.store.dse.propagation.PropagationResult;
11import tools.refinery.store.dse.propagation.PropagationStoreAdapter;
12import tools.refinery.store.model.Model;
13
14class PropagationAdapterImpl implements PropagationAdapter {
15 private final Model model;
16 private final PropagationStoreAdapterImpl storeAdapter;
17 private final BoundPropagator[] boundPropagators;
18
19 public PropagationAdapterImpl(Model model, PropagationStoreAdapterImpl storeAdapter) {
20 this.model = model;
21 this.storeAdapter = storeAdapter;
22 var propagators = storeAdapter.getPropagators();
23 boundPropagators = new BoundPropagator[propagators.size()];
24 for (int i = 0; i < boundPropagators.length; i++) {
25 boundPropagators[i] = propagators.get(i).bindToModel(model);
26 }
27 }
28
29 @Override
30 public PropagationResult propagate() {
31 PropagationResult result = PropagationResult.UNCHANGED;
32 PropagationResult lastResult;
33 do {
34 model.checkCancelled();
35 lastResult = propagateOne();
36 result = result.andThen(lastResult);
37 } while (lastResult.isChanged());
38 return result;
39 }
40
41 private PropagationResult propagateOne() {
42 PropagationResult result = PropagationResult.UNCHANGED;
43 for (int i = 0; i < boundPropagators.length; i++) {
44 model.checkCancelled();
45 var lastResult = propagateUntilFixedPoint(i);
46 result = result.andThen(lastResult);
47 if (result.isRejected()) {
48 break;
49 }
50 }
51 return result;
52 }
53
54 private PropagationResult propagateUntilFixedPoint(int propagatorIndex) {
55 var propagator = boundPropagators[propagatorIndex];
56 PropagationResult result = PropagationResult.UNCHANGED;
57 PropagationResult lastResult;
58 do {
59 model.checkCancelled();
60 lastResult = propagator.propagateOne();
61 result = result.andThen(lastResult);
62 } while (lastResult.isChanged());
63 return result;
64 }
65
66 @Override
67 public Model getModel() {
68 return model;
69 }
70
71 @Override
72 public PropagationStoreAdapter getStoreAdapter() {
73 return storeAdapter;
74 }
75}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationBuilderImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationBuilderImpl.java
new file mode 100644
index 00000000..c844a89f
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationBuilderImpl.java
@@ -0,0 +1,53 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation.impl;
7
8import tools.refinery.store.adapter.AbstractModelAdapterBuilder;
9import tools.refinery.store.dse.propagation.PropagationBuilder;
10import tools.refinery.store.dse.propagation.PropagationStoreAdapter;
11import tools.refinery.store.dse.propagation.Propagator;
12import tools.refinery.store.dse.propagation.impl.rule.RuleBasedPropagator;
13import tools.refinery.store.dse.transition.Rule;
14import tools.refinery.store.model.ModelStore;
15import tools.refinery.store.model.ModelStoreBuilder;
16
17import java.util.*;
18
19public class PropagationBuilderImpl extends AbstractModelAdapterBuilder<PropagationStoreAdapter>
20 implements PropagationBuilder {
21 private final Set<Rule> propagationRules = new LinkedHashSet<>();
22 private final Deque<Propagator> propagators = new ArrayDeque<>();
23
24 @Override
25 public PropagationBuilder rule(Rule propagationRule) {
26 checkNotConfigured();
27 propagationRules.add(propagationRule);
28 return this;
29 }
30
31 @Override
32 public PropagationBuilder propagator(Propagator propagator) {
33 checkNotConfigured();
34 propagators.addFirst(propagator);
35 return this;
36 }
37
38 @Override
39 protected void doConfigure(ModelStoreBuilder storeBuilder) {
40 super.doConfigure(storeBuilder);
41 if (!propagationRules.isEmpty()) {
42 propagators.addFirst(new RuleBasedPropagator(List.copyOf(propagationRules)));
43 }
44 for (var propagator : propagators) {
45 propagator.configure(storeBuilder);
46 }
47 }
48
49 @Override
50 protected PropagationStoreAdapter doBuild(ModelStore store) {
51 return new PropagationStoreAdapterImpl(store, List.copyOf(propagators));
52 }
53}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationStoreAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationStoreAdapterImpl.java
new file mode 100644
index 00000000..a223caed
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/PropagationStoreAdapterImpl.java
@@ -0,0 +1,38 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation.impl;
7
8import tools.refinery.store.dse.propagation.PropagationAdapter;
9import tools.refinery.store.dse.propagation.PropagationStoreAdapter;
10import tools.refinery.store.dse.propagation.Propagator;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.model.ModelStore;
13
14import java.util.List;
15
16class PropagationStoreAdapterImpl implements PropagationStoreAdapter {
17 private final ModelStore store;
18 private final List<Propagator> propagators;
19
20 PropagationStoreAdapterImpl(ModelStore store, List<Propagator> propagators) {
21 this.store = store;
22 this.propagators = propagators;
23 }
24
25 @Override
26 public ModelStore getStore() {
27 return store;
28 }
29
30 @Override
31 public PropagationAdapter createModelAdapter(Model model) {
32 return new PropagationAdapterImpl(model, this);
33 }
34
35 List<Propagator> getPropagators() {
36 return propagators;
37 }
38}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java
new file mode 100644
index 00000000..a70292ad
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java
@@ -0,0 +1,40 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation.impl.rule;
7
8import tools.refinery.store.dse.propagation.PropagationResult;
9import tools.refinery.store.dse.transition.Rule;
10import tools.refinery.store.dse.transition.actions.BoundAction;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.query.ModelQueryAdapter;
13import tools.refinery.store.query.resultset.ResultSet;
14
15class BoundPropagationRule {
16 private final Model model;
17 private final ResultSet<Boolean> resultSet;
18 private final BoundAction action;
19
20 public BoundPropagationRule(Model model, Rule rule) {
21 this.model = model;
22 resultSet = model.getAdapter(ModelQueryAdapter.class).getResultSet(rule.getPrecondition());
23 action = rule.createAction(model);
24 }
25
26 public PropagationResult fireAll() {
27 if (resultSet.size() == 0) {
28 return PropagationResult.UNCHANGED;
29 }
30 var cursor = resultSet.getAll();
31 while (cursor.move()) {
32 model.checkCancelled();
33 var result = action.fire(cursor.getKey());
34 if (!result) {
35 return PropagationResult.REJECTED;
36 }
37 }
38 return PropagationResult.PROPAGATED;
39 }
40}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundRuleBasedPropagator.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundRuleBasedPropagator.java
new file mode 100644
index 00000000..bd03f923
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundRuleBasedPropagator.java
@@ -0,0 +1,43 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation.impl.rule;
7
8import tools.refinery.store.dse.propagation.BoundPropagator;
9import tools.refinery.store.dse.propagation.PropagationResult;
10import tools.refinery.store.dse.transition.Rule;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.query.ModelQueryAdapter;
13
14import java.util.List;
15
16public class BoundRuleBasedPropagator implements BoundPropagator {
17 private final ModelQueryAdapter queryEngine;
18 private final BoundPropagationRule[] boundRules;
19
20 public BoundRuleBasedPropagator(Model model, List<Rule> propagationRules) {
21 queryEngine = model.getAdapter(ModelQueryAdapter.class);
22 boundRules = new BoundPropagationRule[propagationRules.size()];
23 for (int i = 0; i < boundRules.length; i++) {
24 boundRules[i] = new BoundPropagationRule(model, propagationRules.get(i));
25 }
26 }
27
28 @Override
29 public PropagationResult propagateOne() {
30 queryEngine.flushChanges();
31 PropagationResult result = PropagationResult.UNCHANGED;
32 // Use a classic for loop to avoid allocating an iterator.
33 //noinspection ForLoopReplaceableByForEach
34 for (int i = 0; i < boundRules.length; i++) {
35 var lastResult = boundRules[i].fireAll();
36 result = result.andThen(lastResult);
37 if (result.isRejected()) {
38 break;
39 }
40 }
41 return result;
42 }
43}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/RuleBasedPropagator.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/RuleBasedPropagator.java
new file mode 100644
index 00000000..709b2416
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/RuleBasedPropagator.java
@@ -0,0 +1,36 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.propagation.impl.rule;
7
8import tools.refinery.store.dse.propagation.BoundPropagator;
9import tools.refinery.store.dse.propagation.Propagator;
10import tools.refinery.store.dse.transition.Rule;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.model.ModelStoreBuilder;
13import tools.refinery.store.query.ModelQueryBuilder;
14
15import java.util.List;
16
17public class RuleBasedPropagator implements Propagator {
18 private final List<Rule> propagationRules;
19
20 public RuleBasedPropagator(List<Rule> propagationRules) {
21 this.propagationRules = propagationRules;
22 }
23
24 @Override
25 public void configure(ModelStoreBuilder storeBuilder) {
26 var queryBuilder = storeBuilder.getAdapter(ModelQueryBuilder.class);
27 for (var propagationRule : propagationRules) {
28 queryBuilder.query(propagationRule.getPrecondition());
29 }
30 }
31
32 @Override
33 public BoundPropagator bindToModel(Model model) {
34 return new BoundRuleBasedPropagator(model, propagationRules);
35 }
36}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstExplorer.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstExplorer.java
new file mode 100644
index 00000000..5e2f8fa9
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstExplorer.java
@@ -0,0 +1,65 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.strategy;
7
8import tools.refinery.store.model.Model;
9
10import java.util.Random;
11
12public class BestFirstExplorer extends BestFirstWorker {
13 final int id;
14 Random random;
15
16 public BestFirstExplorer(BestFirstStoreManager storeManager, Model model, int id) {
17 super(storeManager, model);
18 this.id = id;
19 this.random = new Random(id);
20 }
21
22 private boolean shouldRun() {
23 model.checkCancelled();
24 return !hasEnoughSolution();
25 }
26
27 public void explore() {
28 var lastBest = submit().newVersion();
29 while (shouldRun()) {
30 if (lastBest == null) {
31 if (random.nextInt(10) == 0) {
32 lastBest = restoreToRandom(random);
33 } else {
34 lastBest = restoreToBest();
35 }
36 if (lastBest == null) {
37 return;
38 }
39 }
40 boolean tryActivation = true;
41 while (tryActivation && shouldRun()) {
42 var randomVisitResult = this.visitRandomUnvisited(random);
43 tryActivation = randomVisitResult.shouldRetry();
44 var newSubmit = randomVisitResult.submitResult();
45 if (newSubmit != null) {
46 if (!newSubmit.include()) {
47 restoreToLast();
48 } else {
49 var newVisit = newSubmit.newVersion();
50 int compareResult = compare(lastBest, newVisit);
51 if (compareResult >= 0) {
52 lastBest = newVisit;
53 } else {
54 lastBest = null;
55 }
56 break;
57 }
58 } else {
59 lastBest = null;
60 break;
61 }
62 }
63 }
64 }
65}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStoreManager.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStoreManager.java
new file mode 100644
index 00000000..3d32f84c
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStoreManager.java
@@ -0,0 +1,87 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.strategy;
7
8import tools.refinery.store.dse.transition.DesignSpaceExplorationStoreAdapter;
9import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
10import tools.refinery.store.dse.transition.statespace.ActivationStore;
11import tools.refinery.store.dse.transition.statespace.EquivalenceClassStore;
12import tools.refinery.store.dse.transition.statespace.ObjectivePriorityQueue;
13import tools.refinery.store.dse.transition.statespace.SolutionStore;
14import tools.refinery.store.dse.transition.statespace.internal.ActivationStoreImpl;
15import tools.refinery.store.dse.transition.statespace.internal.FastEquivalenceClassStore;
16import tools.refinery.store.dse.transition.statespace.internal.ObjectivePriorityQueueImpl;
17import tools.refinery.store.dse.transition.statespace.internal.SolutionStoreImpl;
18import tools.refinery.store.map.Version;
19import tools.refinery.store.model.ModelStore;
20import tools.refinery.store.statecoding.StateCoderStoreAdapter;
21import tools.refinery.visualization.statespace.VisualizationStore;
22import tools.refinery.visualization.statespace.internal.VisualizationStoreImpl;
23
24import java.util.function.Consumer;
25
26public class BestFirstStoreManager {
27
28 ModelStore modelStore;
29 ObjectivePriorityQueue objectiveStore;
30 ActivationStore activationStore;
31 SolutionStore solutionStore;
32 EquivalenceClassStore equivalenceClassStore;
33 VisualizationStore visualizationStore;
34
35 public BestFirstStoreManager(ModelStore modelStore, int maxNumberOfSolutions) {
36 this.modelStore = modelStore;
37 DesignSpaceExplorationStoreAdapter storeAdapter =
38 modelStore.getAdapter(DesignSpaceExplorationStoreAdapter.class);
39
40 objectiveStore = new ObjectivePriorityQueueImpl(storeAdapter.getObjectives());
41 Consumer<VersionWithObjectiveValue> whenAllActivationsVisited = x -> objectiveStore.remove(x);
42 activationStore = new ActivationStoreImpl(storeAdapter.getTransformations().size(), whenAllActivationsVisited);
43 solutionStore = new SolutionStoreImpl(maxNumberOfSolutions);
44 equivalenceClassStore = new FastEquivalenceClassStore(modelStore.getAdapter(StateCoderStoreAdapter.class)) {
45 @Override
46 protected void delegate(VersionWithObjectiveValue version, int[] emptyActivations, boolean accept) {
47 throw new UnsupportedOperationException("This equivalence storage is not prepared to resolve " +
48 "symmetries!");
49 }
50 };
51 visualizationStore = new VisualizationStoreImpl();
52 }
53
54 public ModelStore getModelStore() {
55 return modelStore;
56 }
57
58 ObjectivePriorityQueue getObjectiveStore() {
59 return objectiveStore;
60 }
61
62 ActivationStore getActivationStore() {
63 return activationStore;
64 }
65
66 public SolutionStore getSolutionStore() {
67 return solutionStore;
68 }
69
70 EquivalenceClassStore getEquivalenceClassStore() {
71 return equivalenceClassStore;
72 }
73
74 public VisualizationStore getVisualizationStore() {
75 return visualizationStore;
76 }
77
78 public void startExploration(Version initial) {
79 startExploration(initial, 1);
80 }
81
82 public void startExploration(Version initial, int randomSeed) {
83 BestFirstExplorer bestFirstExplorer = new BestFirstExplorer(this, modelStore.createModelForState(initial),
84 randomSeed);
85 bestFirstExplorer.explore();
86 }
87}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStrategy.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStrategy.java
deleted file mode 100644
index 92d878ce..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstStrategy.java
+++ /dev/null
@@ -1,203 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Andras Szabolcs Nagy, Zoltan Ujhelyi and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.store.dse.strategy;
11
12import tools.refinery.store.map.Version;
13import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
14import tools.refinery.store.dse.Strategy;
15import tools.refinery.store.dse.internal.Activation;
16import tools.refinery.store.dse.objectives.Fitness;
17import tools.refinery.store.dse.objectives.ObjectiveComparatorHelper;
18
19import java.util.*;
20
21public class BestFirstStrategy implements Strategy {
22
23 private DesignSpaceExplorationAdapter dseAdapter;
24
25 private int maxDepth = Integer.MAX_VALUE;
26 private int maxSolutions = Integer.MAX_VALUE;
27 private boolean backTrackIfSolution = true;
28 private boolean onlyBetterFirst = false;
29
30 private PriorityQueue<TrajectoryWithFitness> trajectoriesToExplore;
31
32 private record TrajectoryWithFitness(List<Version> trajectory, Fitness fitness) {
33 @Override
34 public String toString() {
35 return trajectory.toString() + fitness.toString();
36 }
37
38 @Override
39 public int hashCode() {
40 return trajectory.get(trajectory.size() - 1).hashCode();
41 }
42
43 @Override
44 public boolean equals(Object obj) {
45 if (obj instanceof TrajectoryWithFitness other) {
46 return Objects.equals(trajectory.get(trajectory.size() - 1), other.trajectory.get(other.trajectory.size() - 1));
47// return trajectory.equals(((TrajectoryWithFitness) obj).trajectory);
48 }
49 return false;
50 }
51 }
52
53 public BestFirstStrategy withDepthLimit(int maxDepth) {
54 if (maxDepth >= 0) {
55 this.maxDepth = maxDepth;
56 }
57 return this;
58 }
59
60 public BestFirstStrategy withSolutionLimit(int maxSolutions) {
61 if (maxSolutions >= 0) {
62 this.maxSolutions = maxSolutions;
63 }
64 return this;
65 }
66
67 public BestFirstStrategy continueIfHardObjectivesFulfilled() {
68 backTrackIfSolution = false;
69 return this;
70 }
71
72 public BestFirstStrategy goOnOnlyIfFitnessIsBetter() {
73 onlyBetterFirst = true;
74 return this;
75 }
76
77 @Override
78 public void initialize(DesignSpaceExplorationAdapter designSpaceExplorationAdapter) {
79 this.dseAdapter = designSpaceExplorationAdapter;
80 final ObjectiveComparatorHelper objectiveComparatorHelper = dseAdapter.getObjectiveComparatorHelper();
81
82 trajectoriesToExplore = new PriorityQueue<>(11,
83 (o1, o2) -> objectiveComparatorHelper.compare(o2.fitness, o1.fitness));
84 }
85
86 @Override
87 public void explore() {
88 if (maxSolutions == 0) {
89 return;
90 }
91 final ObjectiveComparatorHelper objectiveComparatorHelper = dseAdapter.getObjectiveComparatorHelper();
92
93 boolean globalConstraintsAreSatisfied = dseAdapter.checkGlobalConstraints();
94 if (!globalConstraintsAreSatisfied) {
95 // Global constraint is not satisfied in the first state. Terminate.
96 return;
97 }
98
99 final Fitness firstFitness = dseAdapter.getFitness();
100 if (firstFitness.isSatisfiesHardObjectives()) {
101 dseAdapter.newSolution();
102 // First state is a solution. Terminate.
103 if (backTrackIfSolution) {
104 return;
105 }
106 }
107
108 if (maxDepth == 0) {
109 return;
110 }
111
112
113 var firstTrajectoryWithFitness = new TrajectoryWithFitness(dseAdapter.getTrajectory(), firstFitness);
114 trajectoriesToExplore.add(firstTrajectoryWithFitness);
115 TrajectoryWithFitness currentTrajectoryWithFitness = null;
116
117 mainLoop: while (true) {
118
119 if (currentTrajectoryWithFitness == null) {
120 if (trajectoriesToExplore.isEmpty()) {
121 // State space is fully traversed.
122 return;
123 } else {
124 currentTrajectoryWithFitness = trajectoriesToExplore.element();
125 // New trajectory is chosen: " + currentTrajectoryWithFitness
126 dseAdapter.restoreTrajectory(currentTrajectoryWithFitness.trajectory);
127 }
128 }
129
130 Collection<Activation> activations = dseAdapter.getUntraversedActivations();
131 Iterator<Activation> iterator = activations.iterator();
132
133
134
135 while (iterator.hasNext()) {
136 final Activation nextActivation = iterator.next();
137 if (!iterator.hasNext()) {
138 // Last untraversed activation of the state.
139 trajectoriesToExplore.remove(currentTrajectoryWithFitness);
140 }
141
142 // Executing new activation
143 dseAdapter.fireActivation(nextActivation);
144 if (dseAdapter.isCurrentStateAlreadyTraversed()) {
145 // The new state is already visited.
146 dseAdapter.backtrack();
147 } else if (!dseAdapter.checkGlobalConstraints()) {
148 // Global constraint is not satisfied.
149 dseAdapter.backtrack();
150 } else {
151 final Fitness nextFitness = dseAdapter.getFitness();
152 if (nextFitness.isSatisfiesHardObjectives()) {
153 dseAdapter.newSolution();
154 var solutions = dseAdapter.getSolutions().size();
155 if (solutions >= maxSolutions) {
156 return;
157 }
158 // Found a solution.
159 if (backTrackIfSolution) {
160 dseAdapter.backtrack();
161 continue;
162 }
163 }
164 if (dseAdapter.getDepth() >= maxDepth) {
165 // Reached max depth.
166 dseAdapter.backtrack();
167 continue;
168 }
169
170 TrajectoryWithFitness nextTrajectoryWithFitness = new TrajectoryWithFitness(
171 dseAdapter.getTrajectory(), nextFitness);
172 trajectoriesToExplore.add(nextTrajectoryWithFitness);
173
174 int compare = objectiveComparatorHelper.compare(currentTrajectoryWithFitness.fitness,
175 nextTrajectoryWithFitness.fitness);
176 if (compare < 0) {
177 // Better fitness, moving on
178 currentTrajectoryWithFitness = nextTrajectoryWithFitness;
179 continue mainLoop;
180 } else if (compare == 0) {
181 if (onlyBetterFirst) {
182 // Equally good fitness, backtrack
183 dseAdapter.backtrack();
184 } else {
185 // Equally good fitness, moving on
186 currentTrajectoryWithFitness = nextTrajectoryWithFitness;
187 continue mainLoop;
188 }
189 } else {
190 //"Worse fitness
191 currentTrajectoryWithFitness = null;
192 continue mainLoop;
193 }
194 }
195 }
196
197 // State is fully traversed.
198 currentTrajectoryWithFitness = null;
199
200 }
201 // Interrupted.
202 }
203}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstWorker.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstWorker.java
new file mode 100644
index 00000000..aca800a3
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/BestFirstWorker.java
@@ -0,0 +1,164 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.strategy;
7
8import org.jetbrains.annotations.Nullable;
9import tools.refinery.store.dse.propagation.PropagationAdapter;
10import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter;
11import tools.refinery.store.dse.transition.ObjectiveValue;
12import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
13import tools.refinery.store.dse.transition.statespace.internal.ActivationStoreWorker;
14import tools.refinery.store.map.Version;
15import tools.refinery.store.model.Model;
16import tools.refinery.store.query.ModelQueryAdapter;
17import tools.refinery.store.statecoding.StateCoderAdapter;
18import tools.refinery.visualization.statespace.VisualizationStore;
19
20import java.util.Random;
21
22public class BestFirstWorker {
23 final BestFirstStoreManager storeManager;
24 final Model model;
25 final ActivationStoreWorker activationStoreWorker;
26 final StateCoderAdapter stateCoderAdapter;
27 final DesignSpaceExplorationAdapter explorationAdapter;
28 final ModelQueryAdapter queryAdapter;
29 final @Nullable PropagationAdapter propagationAdapter;
30 final VisualizationStore visualizationStore;
31 final boolean isVisualizationEnabled;
32
33 public BestFirstWorker(BestFirstStoreManager storeManager, Model model) {
34 this.storeManager = storeManager;
35 this.model = model;
36
37 explorationAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
38 stateCoderAdapter = model.getAdapter(StateCoderAdapter.class);
39 queryAdapter = model.getAdapter(ModelQueryAdapter.class);
40 propagationAdapter = model.tryGetAdapter(PropagationAdapter.class).orElse(null);
41 activationStoreWorker = new ActivationStoreWorker(storeManager.getActivationStore(),
42 explorationAdapter.getTransformations());
43 visualizationStore = storeManager.getVisualizationStore();
44 isVisualizationEnabled = visualizationStore != null;
45 }
46
47 protected VersionWithObjectiveValue last = null;
48
49 public SubmitResult submit() {
50 checkSynchronized();
51 if (queryAdapter.hasPendingChanges()) {
52 throw new AssertionError("Pending changes detected before model submission");
53 }
54 if (explorationAdapter.checkExclude()) {
55 return new SubmitResult(false, false, null, null);
56 }
57
58 var code = stateCoderAdapter.calculateStateCode();
59
60 boolean isNew = storeManager.getEquivalenceClassStore().submit(code);
61 if (isNew) {
62 Version version = model.commit();
63 ObjectiveValue objectiveValue = explorationAdapter.getObjectiveValue();
64 var versionWithObjectiveValue = new VersionWithObjectiveValue(version, objectiveValue);
65 last = versionWithObjectiveValue;
66 var accepted = explorationAdapter.checkAccept();
67
68 storeManager.getObjectiveStore().submit(versionWithObjectiveValue);
69 storeManager.getActivationStore().markNewAsVisited(versionWithObjectiveValue, activationStoreWorker.calculateEmptyActivationSize());
70 if(accepted) {
71 storeManager.solutionStore.submit(versionWithObjectiveValue);
72 }
73
74 if (isVisualizationEnabled) {
75 visualizationStore.addState(last.version(), last.objectiveValue().toString());
76 if (accepted) {
77 visualizationStore.addSolution(last.version());
78 }
79 }
80
81 return new SubmitResult(true, accepted, objectiveValue, last);
82 }
83
84 return new SubmitResult(false, false, null, null);
85 }
86
87 public void restoreToLast() {
88 if (explorationAdapter.getModel().hasUncommittedChanges()) {
89 explorationAdapter.getModel().restore(last.version());
90 }
91 }
92
93 public VersionWithObjectiveValue restoreToBest() {
94 var bestVersion = storeManager.getObjectiveStore().getBest();
95 last = bestVersion;
96 if (bestVersion != null) {
97 this.model.restore(bestVersion.version());
98 }
99 return last;
100 }
101
102 public VersionWithObjectiveValue restoreToRandom(Random random) {
103 var objectiveStore = storeManager.getObjectiveStore();
104 if (objectiveStore.getSize() == 0) {
105 return null;
106 }
107 var randomVersion = objectiveStore.getRandom(random);
108 last = randomVersion;
109 if (randomVersion != null) {
110 this.model.restore(randomVersion.version());
111 }
112 return last;
113 }
114
115 public int compare(VersionWithObjectiveValue s1, VersionWithObjectiveValue s2) {
116 return storeManager.getObjectiveStore().getComparator().compare(s1, s2);
117 }
118
119 public record RandomVisitResult(SubmitResult submitResult, boolean shouldRetry) {
120 }
121
122 public RandomVisitResult visitRandomUnvisited(Random random) {
123 checkSynchronized();
124 if (model.hasUncommittedChanges()) {
125 throw new IllegalStateException("The model has uncommitted changes!");
126 }
127
128 var visitResult = activationStoreWorker.fireRandomActivation(this.last, random);
129
130 if (!visitResult.successfulVisit()) {
131 return new RandomVisitResult(null, visitResult.mayHaveMore());
132 }
133
134 if (propagationAdapter != null) {
135 var propagationResult = propagationAdapter.propagate();
136 if (propagationResult.isRejected()) {
137 return new RandomVisitResult(null, visitResult.mayHaveMore());
138 }
139 }
140 queryAdapter.flushChanges();
141
142 Version oldVersion = null;
143 if (isVisualizationEnabled) {
144 oldVersion = last.version();
145 }
146 var submitResult = submit();
147 if (isVisualizationEnabled && submitResult.newVersion() != null) {
148 var newVersion = submitResult.newVersion().version();
149 visualizationStore.addTransition(oldVersion, newVersion,
150 "fire: " + visitResult.transformation() + ", " + visitResult.activation());
151 }
152 return new RandomVisitResult(submitResult, visitResult.mayHaveMore());
153 }
154
155 public boolean hasEnoughSolution() {
156 return storeManager.solutionStore.hasEnoughSolution();
157 }
158
159 private void checkSynchronized() {
160 if (last != null && !last.version().equals(model.getState())) {
161 throw new AssertionError("Worker is not synchronized with model state");
162 }
163 }
164}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/DepthFirstStrategy.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/DepthFirstStrategy.java
deleted file mode 100644
index 0a0caa7e..00000000
--- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/DepthFirstStrategy.java
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.strategy;
7
8import tools.refinery.store.dse.DesignSpaceExplorationAdapter;
9import tools.refinery.store.dse.Strategy;
10import tools.refinery.store.dse.objectives.Fitness;
11
12public class DepthFirstStrategy implements Strategy {
13
14 private DesignSpaceExplorationAdapter dseAdapter;
15
16 private int maxDepth = Integer.MAX_VALUE;
17 private int maxSolutions = Integer.MAX_VALUE;
18 private boolean backtrackFromSolution = true;
19
20 public DepthFirstStrategy withDepthLimit(int maxDepth) {
21 if (maxDepth >= 0) {
22 this.maxDepth = maxDepth;
23 }
24 return this;
25 }
26
27 public DepthFirstStrategy withSolutionLimit(int maxSolutions) {
28 if (maxSolutions >= 0) {
29 this.maxSolutions = maxSolutions;
30 }
31 return this;
32 }
33
34 public DepthFirstStrategy continueIfHardObjectivesFulfilled() {
35 backtrackFromSolution = false;
36 return this;
37 }
38
39 @Override
40 public void initialize(DesignSpaceExplorationAdapter designSpaceExplorationAdapter) {
41 this.dseAdapter = designSpaceExplorationAdapter;
42 }
43
44 @Override
45 public void explore() {
46 if (maxSolutions == 0) {
47 return;
48 }
49 while (dseAdapter.getSolutions().size() < maxSolutions) {
50 if (!checkAndHandleGlobalConstraints()) {
51 return;
52 }
53
54 Fitness fitness = dseAdapter.getFitness();
55 if (fitness.isSatisfiesHardObjectives()) {
56 dseAdapter.newSolution();
57 if (backtrackFromSolution && !dseAdapter.backtrack()) {
58 return;
59 }
60 }
61
62 if (!checkAndHandleDepth()) {
63 return;
64 }
65
66 if (!backtrackToLastUntraversed()) {
67 return;
68 }
69
70 if (!dseAdapter.fireRandomActivation()) {
71 return;
72 }
73 }
74 }
75
76 private boolean checkAndHandleGlobalConstraints() {
77 return dseAdapter.checkGlobalConstraints() || dseAdapter.backtrack();
78 }
79
80 private boolean checkAndHandleDepth() {
81 return dseAdapter.getDepth() < maxDepth || dseAdapter.backtrack();
82 }
83
84 private boolean backtrackToLastUntraversed() {
85 while (dseAdapter.getUntraversedActivations().isEmpty()) {
86 if (!dseAdapter.backtrack()) {
87 return false;
88 }
89 }
90 return true;
91 }
92}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/SubmitResult.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/SubmitResult.java
new file mode 100644
index 00000000..37d548d7
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/strategy/SubmitResult.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.strategy;
7
8import tools.refinery.store.dse.transition.ObjectiveValue;
9import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
10import tools.refinery.store.map.Version;
11
12public record SubmitResult(boolean include, boolean accepted, ObjectiveValue objective, VersionWithObjectiveValue newVersion) {
13
14 }
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationAdapter.java
new file mode 100644
index 00000000..d326f1dd
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationAdapter.java
@@ -0,0 +1,28 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.dse.transition.internal.DesignSpaceExplorationBuilderImpl;
10
11import java.util.List;
12
13public interface DesignSpaceExplorationAdapter extends ModelAdapter {
14 @Override
15 DesignSpaceExplorationStoreAdapter getStoreAdapter();
16
17 static DesignSpaceExplorationBuilder builder() {
18 return new DesignSpaceExplorationBuilderImpl();
19 }
20
21 List<Transformation> getTransformations();
22
23 boolean checkAccept();
24
25 boolean checkExclude();
26
27 ObjectiveValue getObjectiveValue();
28}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationBuilder.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationBuilder.java
new file mode 100644
index 00000000..800cf8f7
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationBuilder.java
@@ -0,0 +1,61 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import tools.refinery.store.adapter.ModelAdapterBuilder;
9import tools.refinery.store.dse.transition.objectives.Criterion;
10import tools.refinery.store.dse.transition.objectives.Objective;
11
12import java.util.Collection;
13import java.util.List;
14
15// Builder pattern with methods returning {@code this} for convenience.
16@SuppressWarnings("UnusedReturnValue")
17public interface DesignSpaceExplorationBuilder extends ModelAdapterBuilder {
18 DesignSpaceExplorationBuilder transformation(Rule transformationRuleDefinition);
19
20 default DesignSpaceExplorationBuilder transformations(Rule... transformationRuleDefinitions) {
21 return transformations(List.of(transformationRuleDefinitions));
22 }
23
24 default DesignSpaceExplorationBuilder transformations(Collection<? extends Rule> transformationRules) {
25 transformationRules.forEach(this::transformation);
26 return this;
27 }
28
29 DesignSpaceExplorationBuilder accept(Criterion criteria);
30
31 default DesignSpaceExplorationBuilder accept(Criterion... criteria) {
32 return accept(List.of(criteria));
33 }
34
35 default DesignSpaceExplorationBuilder accept(Collection<Criterion> criteria) {
36 criteria.forEach(this::accept);
37 return this;
38 }
39
40 DesignSpaceExplorationBuilder exclude(Criterion criteria);
41
42 default DesignSpaceExplorationBuilder exclude(Criterion... criteria) {
43 return exclude(List.of(criteria));
44 }
45
46 default DesignSpaceExplorationBuilder exclude(Collection<Criterion> criteria) {
47 criteria.forEach(this::exclude);
48 return this;
49 }
50
51 DesignSpaceExplorationBuilder objective(Objective objective);
52
53 default DesignSpaceExplorationBuilder objectives(Objective... objectives) {
54 return objectives(List.of(objectives));
55 }
56
57 default DesignSpaceExplorationBuilder objectives(Collection<? extends Objective> objectives) {
58 objectives.forEach(this::objective);
59 return this;
60 }
61}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationStoreAdapter.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationStoreAdapter.java
new file mode 100644
index 00000000..fb082fae
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/DesignSpaceExplorationStoreAdapter.java
@@ -0,0 +1,27 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import tools.refinery.store.adapter.ModelStoreAdapter;
9import tools.refinery.store.dse.transition.objectives.Criterion;
10import tools.refinery.store.dse.transition.objectives.Objective;
11import tools.refinery.store.model.Model;
12
13import java.util.List;
14
15public interface DesignSpaceExplorationStoreAdapter extends ModelStoreAdapter
16{
17 @Override
18 DesignSpaceExplorationAdapter createModelAdapter(Model model);
19
20 List<Rule> getTransformations();
21
22 List<Criterion> getAccepts();
23
24 List<Criterion> getExcludes();
25
26 List<Objective> getObjectives();
27}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValue.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValue.java
new file mode 100644
index 00000000..89ee61c8
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValue.java
@@ -0,0 +1,24 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8public interface ObjectiveValue {
9 double get(int index);
10 int getSize();
11
12 static ObjectiveValue of(double v1) {
13 return new ObjectiveValues.ObjectiveValue1(v1);
14 }
15
16 static ObjectiveValue of(double v1, double v2) {
17 return new ObjectiveValues.ObjectiveValue2(v1,v2);
18 }
19
20 static ObjectiveValue of(double[] v) {
21 return new ObjectiveValues.ObjectiveValueN(v);
22 }
23
24}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValues.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValues.java
new file mode 100644
index 00000000..60913ff3
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/ObjectiveValues.java
@@ -0,0 +1,69 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import java.util.Arrays;
9
10public interface ObjectiveValues {
11 public record ObjectiveValue1(double value0) implements ObjectiveValue {
12 @Override
13 public double get(int index) {
14 if(index == 0) return value0;
15 else throw new IllegalArgumentException("No value at " + index);
16 }
17
18 @Override
19 public int getSize() {
20 return 1;
21 }
22 }
23 public record ObjectiveValue2(double value0, double value1) implements ObjectiveValue {
24 @Override
25 public double get(int index) {
26 if(index == 0) return value0;
27 else if(index == 1) return value1;
28 else throw new IllegalArgumentException("No value at " + index);
29 }
30
31 @Override
32 public int getSize() {
33 return 2;
34 }
35 }
36 public record ObjectiveValueN(double[] values) implements ObjectiveValue {
37 @Override
38 public double get(int index) {
39 return values[index];
40 }
41
42 @Override
43 public int getSize() {
44 return values().length;
45 }
46
47 @Override
48 public boolean equals(Object o) {
49 if (this == o) return true;
50 if (o == null || getClass() != o.getClass()) return false;
51
52 ObjectiveValueN that = (ObjectiveValueN) o;
53
54 return Arrays.equals(values, that.values);
55 }
56
57 @Override
58 public int hashCode() {
59 return Arrays.hashCode(values);
60 }
61
62 @Override
63 public String toString() {
64 return "ObjectiveValueN{" +
65 "values=" + Arrays.toString(values) +
66 '}';
67 }
68 }
69}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java
new file mode 100644
index 00000000..ff45ed3e
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Rule.java
@@ -0,0 +1,99 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import tools.refinery.store.dse.transition.actions.Action;
9import tools.refinery.store.dse.transition.actions.BoundAction;
10import tools.refinery.store.dse.transition.callback.*;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.query.dnf.RelationalQuery;
13
14public class Rule {
15 private final String name;
16 private final RelationalQuery precondition;
17 private final Action action;
18
19 public Rule(String name, RelationalQuery precondition, Action action) {
20 if (precondition.arity() != action.getArity()) {
21 throw new IllegalArgumentException("Expected an action clause with %d parameters, got %d instead"
22 .formatted(precondition.arity(), action.getArity()));
23 }
24 this.name = name;
25 this.precondition = precondition;
26 this.action = action;
27 }
28
29 public String getName() {
30 return name;
31 }
32
33 public RelationalQuery getPrecondition() {
34 return precondition;
35 }
36
37 public BoundAction createAction(Model model) {
38 return action.bindToModel(model);
39 }
40
41 public static RuleBuilder builder(String name) {
42 return new RuleBuilder(name);
43 }
44
45 public static RuleBuilder builder() {
46 return builder(null);
47 }
48
49 public static Rule of(String name, RuleCallback0 callback) {
50 var builder = builder(name);
51 callback.accept(builder);
52 return builder.build();
53 }
54
55 public static Rule of(RuleCallback0 callback) {
56 return of(null, callback);
57 }
58
59 public static Rule of(String name, RuleCallback1 callback) {
60 var builder = builder(name);
61 callback.accept(builder, builder.parameter("p1"));
62 return builder.build();
63 }
64
65 public static Rule of(RuleCallback1 callback) {
66 return of(null, callback);
67 }
68
69 public static Rule of(String name, RuleCallback2 callback) {
70 var builder = builder(name);
71 callback.accept(builder, builder.parameter("p1"), builder.parameter("p2"));
72 return builder.build();
73 }
74
75 public static Rule of(RuleCallback2 callback) {
76 return of(null, callback);
77 }
78
79 public static Rule of(String name, RuleCallback3 callback) {
80 var builder = builder(name);
81 callback.accept(builder, builder.parameter("p1"), builder.parameter("p2"), builder.parameter("p3"));
82 return builder.build();
83 }
84
85 public static Rule of(RuleCallback3 callback) {
86 return of(null, callback);
87 }
88
89 public static Rule of(String name, RuleCallback4 callback) {
90 var builder = builder(name);
91 callback.accept(builder, builder.parameter("p1"), builder.parameter("p2"), builder.parameter("p3"),
92 builder.parameter("p4"));
93 return builder.build();
94 }
95
96 public static Rule of(RuleCallback4 callback) {
97 return of(null, callback);
98 }
99}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java
new file mode 100644
index 00000000..865ac369
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/RuleBuilder.java
@@ -0,0 +1,71 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import tools.refinery.store.dse.transition.actions.Action;
9import tools.refinery.store.dse.transition.actions.ActionLiteral;
10import tools.refinery.store.dse.transition.callback.*;
11import tools.refinery.store.query.dnf.AbstractQueryBuilder;
12import tools.refinery.store.query.dnf.Dnf;
13import tools.refinery.store.query.term.Variable;
14
15import java.util.List;
16
17public class RuleBuilder extends AbstractQueryBuilder<RuleBuilder> {
18 private final String name;
19 private List<ActionLiteral> action;
20
21 RuleBuilder(String name) {
22 super(Dnf.builder(name == null ? null : name + "#precondition"));
23 this.name = name;
24 }
25
26 @Override
27 protected RuleBuilder self() {
28 return this;
29 }
30
31 public RuleBuilder action(ActionLiteral... literals) {
32 return action(List.of(literals));
33 }
34
35 public RuleBuilder action(List<? extends ActionLiteral> literals) {
36 if (this.action != null) {
37 throw new IllegalStateException("Actions have already been set");
38 }
39 this.action = List.copyOf(literals);
40 return this;
41 }
42
43 public RuleBuilder action(Action action) {
44 return action(action.getActionLiterals());
45 }
46
47 public RuleBuilder action(ActionCallback0 callback) {
48 return action(callback.toLiterals());
49 }
50
51 public RuleBuilder action(ActionCallback1 callback) {
52 return action(callback.toLiterals(Variable.of("v1")));
53 }
54
55 public RuleBuilder action(ActionCallback2 callback) {
56 return action(callback.toLiterals(Variable.of("v1"), Variable.of("v2")));
57 }
58
59 public RuleBuilder action(ActionCallback3 callback) {
60 return action(callback.toLiterals(Variable.of("v1"), Variable.of("v2"), Variable.of("v3")));
61 }
62
63 public RuleBuilder action(ActionCallback4 callback) {
64 return action(callback.toLiterals(Variable.of("v1"), Variable.of("v2"), Variable.of("v3"), Variable.of("v4")));
65 }
66
67 public Rule build() {
68 var precondition = dnfBuilder.build().asRelation();
69 return new Rule(name, precondition, Action.ofPrecondition(precondition, action));
70 }
71}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Transformation.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Transformation.java
new file mode 100644
index 00000000..0eeccbdf
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/Transformation.java
@@ -0,0 +1,43 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import tools.refinery.store.dse.transition.actions.BoundAction;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.resultset.OrderedResultSet;
12import tools.refinery.store.query.resultset.ResultSet;
13import tools.refinery.store.tuple.Tuple;
14
15public class Transformation {
16 private final Rule definition;
17 private final OrderedResultSet<Boolean> activations;
18 private final BoundAction action;
19
20 public Transformation(Model model, Rule definition) {
21 this.definition = definition;
22 var precondition = definition.getPrecondition();
23 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
24 activations = new OrderedResultSet<>(queryEngine.getResultSet(precondition));
25 action = definition.createAction(model);
26 }
27
28 public Rule getDefinition() {
29 return definition;
30 }
31
32 public ResultSet<Boolean> getAllActivationsAsResultSet() {
33 return activations;
34 }
35
36 public Tuple getActivation(int index) {
37 return activations.getKey(index);
38 }
39
40 public boolean fireActivation(Tuple activation) {
41 return action.fire(activation);
42 }
43}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/VersionWithObjectiveValue.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/VersionWithObjectiveValue.java
new file mode 100644
index 00000000..ca28e27f
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/VersionWithObjectiveValue.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import tools.refinery.store.map.Version;
9
10public record VersionWithObjectiveValue(Version version, ObjectiveValue objectiveValue) {
11}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/AbstractActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/AbstractActionLiteral.java
new file mode 100644
index 00000000..e30f06bb
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/AbstractActionLiteral.java
@@ -0,0 +1,9 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.actions;
7
8public abstract class AbstractActionLiteral implements ActionLiteral {
9}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java
new file mode 100644
index 00000000..d63ddfdd
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/Action.java
@@ -0,0 +1,132 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.actions;
7
8import org.eclipse.collections.api.factory.primitive.ObjectIntMaps;
9import org.eclipse.collections.api.map.primitive.MutableObjectIntMap;
10import org.jetbrains.annotations.Nullable;
11import tools.refinery.store.model.Model;
12import tools.refinery.store.query.dnf.RelationalQuery;
13import tools.refinery.store.query.dnf.SymbolicParameter;
14import tools.refinery.store.query.term.NodeVariable;
15
16import java.util.*;
17
18public class Action {
19 private final List<NodeVariable> parameters;
20 private final Set<NodeVariable> localVariables;
21 private final List<ActionLiteral> actionLiterals;
22 private final int[] @Nullable [] inputAllocations;
23 private final int[] @Nullable [] outputAllocations;
24
25 public Action(List<NodeVariable> parameters, List<? extends ActionLiteral> actionLiterals) {
26 this.parameters = List.copyOf(parameters);
27 this.actionLiterals = List.copyOf(actionLiterals);
28 var allocation = ObjectIntMaps.mutable.<NodeVariable>empty();
29 int arity = parameters.size();
30 for (int i = 0; i < arity; i++) {
31 allocation.put(parameters.get(i), i);
32 }
33 var mutableLocalVariables = new LinkedHashSet<NodeVariable>();
34 int size = actionLiterals.size();
35 inputAllocations = new int[size][];
36 outputAllocations = new int[size][];
37 for (int i = 0; i < size; i++) {
38 computeInputAllocation(i, parameters, allocation);
39 computeOutputAllocation(i, mutableLocalVariables, allocation);
40 }
41 this.localVariables = Collections.unmodifiableSet(mutableLocalVariables);
42 }
43
44 private void computeInputAllocation(int actionIndex, List<NodeVariable> parameters,
45 MutableObjectIntMap<NodeVariable> allocation) {
46 var actionLiteral = actionLiterals.get(actionIndex);
47 var inputVariables = actionLiteral.getInputVariables();
48 if (inputVariables.equals(parameters)) {
49 // Identity mappings use a {@code null} allocation to pass the activation tuple unchanged.
50 return;
51 }
52 var inputs = new int[inputVariables.size()];
53 for (int i = 0; i < inputs.length; i++) {
54 var variable = inputVariables.get(i);
55 if (!allocation.containsKey(variable)) {
56 throw new IllegalArgumentException("Unbound input variable %s of action literal %s"
57 .formatted(variable, actionLiteral));
58 }
59 inputs[i] = allocation.get(variable);
60 }
61 inputAllocations[actionIndex] = inputs;
62 }
63
64 private void computeOutputAllocation(int actionIndex, Set<NodeVariable> mutableLocalVariable,
65 MutableObjectIntMap<NodeVariable> allocation) {
66 var actionLiteral = actionLiterals.get(actionIndex);
67 var outputVariables = actionLiteral.getOutputVariables();
68 int size = outputVariables.size();
69 if (size == 0) {
70 // Identity mappings use a {@code null} allocation to avoid iterating over the output tuple.
71 return;
72 }
73 if (size >= 2 && new HashSet<>(outputVariables).size() != size) {
74 throw new IllegalArgumentException("Action literal %s has duplicate output variables %s"
75 .formatted(actionLiteral, outputVariables));
76 }
77 int arity = parameters.size();
78 var outputs = new int[size];
79 for (int i = 0; i < size; i++) {
80 var variable = outputVariables.get(i);
81 if (allocation.containsKey(variable)) {
82 throw new IllegalArgumentException("Output variable %s of action literal %s was already assigned"
83 .formatted(variable, actionLiteral));
84 }
85 int variableId = mutableLocalVariable.size();
86 allocation.put(variable, arity + variableId);
87 outputs[i] = variableId;
88 mutableLocalVariable.add(variable);
89 }
90 outputAllocations[actionIndex] = outputs;
91 }
92
93 public List<NodeVariable> getParameters() {
94 return parameters;
95 }
96
97 public int getArity() {
98 return parameters.size();
99 }
100
101 public Set<NodeVariable> getLocalVariables() {
102 return localVariables;
103 }
104
105 public List<ActionLiteral> getActionLiterals() {
106 return actionLiterals;
107 }
108
109 int @Nullable [] getInputAllocation(int actionIndex) {
110 return inputAllocations[actionIndex];
111 }
112
113 int @Nullable [] getOutputAllocation(int actionIndex) {
114 return outputAllocations[actionIndex];
115 }
116
117 public BoundAction bindToModel(Model model) {
118 return new BoundAction(this, model);
119 }
120
121 public static Action ofSymbolicParameters(List<SymbolicParameter> symbolicParameters,
122 List<? extends ActionLiteral> actionLiterals) {
123 var nodeVariables = symbolicParameters.stream()
124 .map(symbolicParameter -> symbolicParameter.getVariable().asNodeVariable())
125 .toList();
126 return new Action(nodeVariables, actionLiterals);
127 }
128
129 public static Action ofPrecondition(RelationalQuery precondition, List<? extends ActionLiteral> actionLiterals) {
130 return ofSymbolicParameters(precondition.getDnf().getSymbolicParameters(), actionLiterals);
131 }
132}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java
new file mode 100644
index 00000000..a721ef73
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiteral.java
@@ -0,0 +1,19 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.actions;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.query.term.NodeVariable;
10
11import java.util.List;
12
13public interface ActionLiteral {
14 List<NodeVariable> getInputVariables();
15
16 List<NodeVariable> getOutputVariables();
17
18 BoundActionLiteral bindToModel(Model model);
19}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java
new file mode 100644
index 00000000..275e1e25
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/ActionLiterals.java
@@ -0,0 +1,33 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.actions;
7
8import tools.refinery.store.query.term.NodeVariable;
9import tools.refinery.store.representation.Symbol;
10
11import java.util.List;
12import java.util.Objects;
13
14public final class ActionLiterals {
15 private ActionLiterals() {
16 throw new IllegalArgumentException("This is a static utility class and should not be instantiated directly");
17 }
18
19 public static <T> PutActionLiteral<T> put(Symbol<T> symbol, T value, NodeVariable... parameters) {
20 return new PutActionLiteral<>(symbol, value, List.of(parameters));
21 }
22
23 public static PutActionLiteral<Boolean> add(Symbol<Boolean> symbol, NodeVariable... parameters) {
24 if (!Objects.equals(symbol.defaultValue(), false)) {
25 throw new IllegalArgumentException("Use put to add a value to symbols other than two-valued logic");
26 }
27 return put(symbol, true, parameters);
28 }
29
30 public static <T> PutActionLiteral<T> remove(Symbol<T> symbol, NodeVariable... parameters) {
31 return put(symbol, symbol.defaultValue(), parameters);
32 }
33}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundAction.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundAction.java
new file mode 100644
index 00000000..4da609fa
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundAction.java
@@ -0,0 +1,119 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.actions;
7
8import org.jetbrains.annotations.Nullable;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.tuple.Tuple;
11
12public class BoundAction {
13 private final Action action;
14 private final Model model;
15 private BoundActionLiteral @Nullable [] boundLiterals;
16 private Tuple activation;
17 private final int[] localVariables;
18
19 BoundAction(Action action, Model model) {
20 this.action = action;
21 this.model = model;
22 localVariables = new int[action.getLocalVariables().size()];
23 }
24
25 public boolean fire(Tuple activation) {
26 model.checkCancelled();
27 if (this.activation != null) {
28 throw new IllegalStateException("Reentrant firing is not allowed");
29 }
30 this.activation = activation;
31 if (boundLiterals == null) {
32 boundLiterals = bindLiterals();
33 }
34 try {
35 int size = boundLiterals.length;
36 for (int i = 0; i < size; i++) {
37 var inputAllocation = action.getInputAllocation(i);
38 var boundLiteral = boundLiterals[i];
39 var input = getInputTuple(inputAllocation);
40 var output = boundLiteral.fire(input);
41 if (output == null) {
42 return false;
43 }
44 var outputAllocation = this.action.getOutputAllocation(i);
45 setOutputTuple(outputAllocation, output);
46 }
47 } finally {
48 this.activation = null;
49 }
50 return true;
51 }
52
53 private BoundActionLiteral[] bindLiterals() {
54 var actionLiterals = action.getActionLiterals();
55 int size = actionLiterals.size();
56 var boundLiteralsArray = new BoundActionLiteral[size];
57 for (int i = 0; i < size; i++) {
58 boundLiteralsArray[i] = actionLiterals.get(i).bindToModel(model);
59 }
60 return boundLiteralsArray;
61 }
62
63 private Tuple getInputTuple(int @Nullable [] inputAllocation) {
64 if (inputAllocation == null) {
65 // Identity allocation.
66 return activation;
67 }
68 return switch (inputAllocation.length) {
69 case 0 -> Tuple.of();
70 case 1 -> Tuple.of(getInput(inputAllocation[0]));
71 case 2 -> Tuple.of(getInput(inputAllocation[0]), getInput(inputAllocation[1]));
72 case 3 -> Tuple.of(getInput(inputAllocation[0]), getInput(inputAllocation[1]),
73 getInput(inputAllocation[2]));
74 case 4 -> Tuple.of(getInput(inputAllocation[0]), getInput(inputAllocation[1]),
75 getInput(inputAllocation[2]), getInput(inputAllocation[3]));
76 default -> {
77 var elements = new int[inputAllocation.length];
78 for (var i = 0; i < inputAllocation.length; i++) {
79 elements[i] = getInput(inputAllocation[i]);
80 }
81 yield Tuple.of(elements);
82 }
83 };
84 }
85
86 private int getInput(int index) {
87 int arity = action.getArity();
88 return index < arity ? activation.get(index) : localVariables[index - arity];
89 }
90
91 private void setOutputTuple(int @Nullable [] outputAllocation, Tuple output) {
92 if (outputAllocation == null || outputAllocation.length == 0) {
93 return;
94 }
95 switch (outputAllocation.length) {
96 case 1 -> localVariables[outputAllocation[0]] = output.get(0);
97 case 2 -> {
98 localVariables[outputAllocation[0]] = output.get(0);
99 localVariables[outputAllocation[1]] = output.get(1);
100 }
101 case 3 -> {
102 localVariables[outputAllocation[0]] = output.get(0);
103 localVariables[outputAllocation[1]] = output.get(1);
104 localVariables[outputAllocation[2]] = output.get(2);
105 }
106 case 4 -> {
107 localVariables[outputAllocation[0]] = output.get(0);
108 localVariables[outputAllocation[1]] = output.get(1);
109 localVariables[outputAllocation[2]] = output.get(2);
110 localVariables[outputAllocation[3]] = output.get(3);
111 }
112 default -> {
113 for (int i = 0; i < outputAllocation.length; i++) {
114 localVariables[outputAllocation[i]] = output.get(i);
115 }
116 }
117 }
118 }
119}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundActionLiteral.java
new file mode 100644
index 00000000..09c3c58c
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/BoundActionLiteral.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.actions;
7
8import org.jetbrains.annotations.NotNull;
9import org.jetbrains.annotations.Nullable;
10import tools.refinery.store.tuple.Tuple;
11
12@FunctionalInterface
13public interface BoundActionLiteral {
14 @Nullable
15 Tuple fire(@NotNull Tuple tuple);
16}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java
new file mode 100644
index 00000000..86288921
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/actions/PutActionLiteral.java
@@ -0,0 +1,64 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.actions;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.query.term.NodeVariable;
10import tools.refinery.store.representation.Symbol;
11import tools.refinery.store.tuple.Tuple;
12
13import java.util.List;
14
15public class PutActionLiteral<T> extends AbstractActionLiteral {
16 private final Symbol<T> symbol;
17 private final List<NodeVariable> parameters;
18 private final T value;
19
20 public PutActionLiteral(Symbol<T> symbol, T value, List<NodeVariable> parameters) {
21 if (symbol.arity() != parameters.size()) {
22 throw new IllegalArgumentException("Expected %d parameters for symbol %s, got %d instead"
23 .formatted(symbol.arity(), symbol, parameters.size()));
24 }
25 if (value != null && !symbol.valueType().isInstance(value)) {
26 throw new IllegalArgumentException("Expected value of type %s for symbol %s, got %s of type %s instead"
27 .formatted(symbol.valueType().getName(), symbol, value, value.getClass().getName()));
28 }
29 this.symbol = symbol;
30 this.parameters = List.copyOf(parameters);
31 this.value = value;
32 }
33
34 public Symbol<T> getSymbol() {
35 return symbol;
36 }
37
38 public List<NodeVariable> getParameters() {
39 return parameters;
40 }
41
42 public T getValue() {
43 return value;
44 }
45
46 @Override
47 public List<NodeVariable> getInputVariables() {
48 return getParameters();
49 }
50
51 @Override
52 public List<NodeVariable> getOutputVariables() {
53 return List.of();
54 }
55
56 @Override
57 public BoundActionLiteral bindToModel(Model model) {
58 var interpretation = model.getInterpretation(symbol);
59 return tuple -> {
60 interpretation.put(tuple, value);
61 return Tuple.of();
62 };
63 }
64}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback0.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback0.java
new file mode 100644
index 00000000..1190fdeb
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback0.java
@@ -0,0 +1,15 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.actions.ActionLiteral;
9
10import java.util.List;
11
12@FunctionalInterface
13public interface ActionCallback0 {
14 List<ActionLiteral> toLiterals();
15}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java
new file mode 100644
index 00000000..869f1a96
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback1.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.actions.ActionLiteral;
9import tools.refinery.store.query.term.NodeVariable;
10
11import java.util.List;
12
13@FunctionalInterface
14public interface ActionCallback1 {
15 List<ActionLiteral> toLiterals(NodeVariable v1);
16}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java
new file mode 100644
index 00000000..a648fc93
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback2.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.actions.ActionLiteral;
9import tools.refinery.store.query.term.NodeVariable;
10
11import java.util.List;
12
13@FunctionalInterface
14public interface ActionCallback2 {
15 List<ActionLiteral> toLiterals(NodeVariable v1, NodeVariable v2);
16}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java
new file mode 100644
index 00000000..a9b1d334
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback3.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.actions.ActionLiteral;
9import tools.refinery.store.query.term.NodeVariable;
10
11import java.util.List;
12
13@FunctionalInterface
14public interface ActionCallback3 {
15 List<ActionLiteral> toLiterals(NodeVariable v1, NodeVariable v2, NodeVariable v3);
16}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java
new file mode 100644
index 00000000..aef1351c
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/ActionCallback4.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.actions.ActionLiteral;
9import tools.refinery.store.query.term.NodeVariable;
10
11import java.util.List;
12
13@FunctionalInterface
14public interface ActionCallback4 {
15 List<ActionLiteral> toLiterals(NodeVariable v1, NodeVariable v2, NodeVariable v3, NodeVariable v4);
16}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback0.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback0.java
new file mode 100644
index 00000000..538c23ba
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback0.java
@@ -0,0 +1,13 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.RuleBuilder;
9
10@FunctionalInterface
11public interface RuleCallback0 {
12 void accept(RuleBuilder builder);
13}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java
new file mode 100644
index 00000000..bd7bf4f5
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback1.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.RuleBuilder;
9import tools.refinery.store.query.term.NodeVariable;
10
11@FunctionalInterface
12public interface RuleCallback1 {
13 void accept(RuleBuilder builder, NodeVariable p1);
14}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java
new file mode 100644
index 00000000..7b02b68a
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback2.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.RuleBuilder;
9import tools.refinery.store.query.term.NodeVariable;
10
11@FunctionalInterface
12public interface RuleCallback2 {
13 void accept(RuleBuilder builder, NodeVariable p1, NodeVariable p2);
14}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java
new file mode 100644
index 00000000..6f112d48
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback3.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.RuleBuilder;
9import tools.refinery.store.query.term.NodeVariable;
10
11@FunctionalInterface
12public interface RuleCallback3 {
13 void accept(RuleBuilder builder, NodeVariable p1, NodeVariable p2, NodeVariable p3);
14}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java
new file mode 100644
index 00000000..dbcf8567
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/callback/RuleCallback4.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.callback;
7
8import tools.refinery.store.dse.transition.RuleBuilder;
9import tools.refinery.store.query.term.NodeVariable;
10
11@FunctionalInterface
12public interface RuleCallback4 {
13 void accept(RuleBuilder builder, NodeVariable p1, NodeVariable p2, NodeVariable p3, NodeVariable p4);
14}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationAdapterImpl.java
new file mode 100644
index 00000000..23325a1f
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationAdapterImpl.java
@@ -0,0 +1,94 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.internal;
7
8import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter;
9import tools.refinery.store.dse.transition.DesignSpaceExplorationStoreAdapter;
10import tools.refinery.store.dse.transition.ObjectiveValue;
11import tools.refinery.store.dse.transition.Transformation;
12import tools.refinery.store.dse.transition.objectives.CriterionCalculator;
13import tools.refinery.store.dse.transition.objectives.ObjectiveCalculator;
14import tools.refinery.store.model.Model;
15
16import java.util.List;
17
18public class DesignSpaceExplorationAdapterImpl implements DesignSpaceExplorationAdapter {
19 final Model model;
20 final DesignSpaceExplorationStoreAdapter designSpaceExplorationStoreAdapter;
21
22 final List<Transformation> transformations;
23 final List<CriterionCalculator> accepts;
24 final List<CriterionCalculator> excludes;
25 final List<ObjectiveCalculator> objectives;
26
27 public DesignSpaceExplorationAdapterImpl(Model model,
28 DesignSpaceExplorationStoreAdapter designSpaceExplorationStoreAdapter,
29 List<Transformation> transformations,
30 List<CriterionCalculator> accepts,
31 List<CriterionCalculator> excludes,
32 List<ObjectiveCalculator> objectives) {
33 this.model = model;
34 this.designSpaceExplorationStoreAdapter = designSpaceExplorationStoreAdapter;
35
36 this.transformations = transformations;
37 this.accepts = accepts;
38 this.excludes = excludes;
39 this.objectives = objectives;
40 }
41
42 @Override
43 public Model getModel() {
44 return model;
45 }
46
47 @Override
48 public DesignSpaceExplorationStoreAdapter getStoreAdapter() {
49 return designSpaceExplorationStoreAdapter;
50 }
51
52 public List<Transformation> getTransformations() {
53 return transformations;
54 }
55
56 @Override
57 public boolean checkAccept() {
58 for (var accept : this.accepts) {
59 model.checkCancelled();
60 if (!accept.isSatisfied()) {
61 return false;
62 }
63 }
64 return true;
65 }
66
67 @Override
68 public boolean checkExclude() {
69 for (var exclude : this.excludes) {
70 model.checkCancelled();
71 if (exclude.isSatisfied()) {
72 return true;
73 }
74 }
75 return false;
76 }
77
78 @Override
79 public ObjectiveValue getObjectiveValue() {
80 model.checkCancelled();
81 if (objectives.size() == 1) {
82 return ObjectiveValue.of(objectives.get(0).getValue());
83 } else if (objectives.size() == 2) {
84 return ObjectiveValue.of(objectives.get(0).getValue(), objectives.get(1).getValue());
85 } else {
86 double[] res = new double[objectives.size()];
87 for (int i = 0; i < objectives.size(); i++) {
88 model.checkCancelled();
89 res[i] = objectives.get(i).getValue();
90 }
91 return ObjectiveValue.of(res);
92 }
93 }
94}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationBuilderImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationBuilderImpl.java
new file mode 100644
index 00000000..a91f6870
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationBuilderImpl.java
@@ -0,0 +1,75 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.internal;
7
8import tools.refinery.store.adapter.AbstractModelAdapterBuilder;
9import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder;
10import tools.refinery.store.dse.transition.Rule;
11import tools.refinery.store.dse.transition.objectives.Criterion;
12import tools.refinery.store.dse.transition.objectives.Objective;
13import tools.refinery.store.model.ModelStore;
14import tools.refinery.store.model.ModelStoreBuilder;
15import tools.refinery.store.query.ModelQueryBuilder;
16
17import java.util.LinkedHashSet;
18import java.util.List;
19
20public class DesignSpaceExplorationBuilderImpl
21 extends AbstractModelAdapterBuilder<DesignSpaceExplorationStoreAdapterImpl>
22 implements DesignSpaceExplorationBuilder {
23
24 LinkedHashSet<Rule> transformationRuleDefinitions = new LinkedHashSet<>();
25 LinkedHashSet<Criterion> accepts = new LinkedHashSet<>();
26 LinkedHashSet<Criterion> excludes = new LinkedHashSet<>();
27 LinkedHashSet<Objective> objectives = new LinkedHashSet<>();
28
29 @Override
30 public DesignSpaceExplorationBuilder transformation(Rule transformationRuleDefinition) {
31 transformationRuleDefinitions.add(transformationRuleDefinition);
32 return this;
33 }
34
35 @Override
36 public DesignSpaceExplorationBuilder accept(Criterion criteria) {
37 accepts.add(criteria);
38 return this;
39 }
40
41 @Override
42 public DesignSpaceExplorationBuilder exclude(Criterion criteria) {
43 excludes.add(criteria);
44 return this;
45 }
46
47
48 @Override
49 public DesignSpaceExplorationBuilder objective(Objective objective) {
50 objectives.add(objective);
51 return this;
52 }
53
54 @Override
55 protected void doConfigure(ModelStoreBuilder storeBuilder) {
56 var queryEngine = storeBuilder.getAdapter(ModelQueryBuilder.class);
57 transformationRuleDefinitions.forEach(x -> queryEngine.query(x.getPrecondition()));
58 accepts.forEach(x -> x.configure(storeBuilder));
59 excludes.forEach(x -> x.configure(storeBuilder));
60 objectives.forEach(x -> x.configure(storeBuilder));
61
62 super.doConfigure(storeBuilder);
63 }
64
65 @Override
66 protected DesignSpaceExplorationStoreAdapterImpl doBuild(ModelStore store) {
67 List<Rule> transformationRuleDefinitionsList = List.copyOf(transformationRuleDefinitions);
68 List<Criterion> acceptsList = List.copyOf(accepts);
69 List<Criterion> excludesList = List.copyOf(excludes);
70 List<Objective> objectivesList = List.copyOf(objectives);
71
72 return new DesignSpaceExplorationStoreAdapterImpl(store, transformationRuleDefinitionsList, acceptsList,
73 excludesList, objectivesList);
74 }
75}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationStoreAdapterImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationStoreAdapterImpl.java
new file mode 100644
index 00000000..bd85e7a6
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/internal/DesignSpaceExplorationStoreAdapterImpl.java
@@ -0,0 +1,74 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.internal;
7
8import tools.refinery.store.dse.transition.DesignSpaceExplorationStoreAdapter;
9import tools.refinery.store.dse.transition.Transformation;
10import tools.refinery.store.dse.transition.Rule;
11import tools.refinery.store.dse.transition.objectives.Criterion;
12import tools.refinery.store.dse.transition.objectives.CriterionCalculator;
13import tools.refinery.store.dse.transition.objectives.Objective;
14import tools.refinery.store.dse.transition.objectives.ObjectiveCalculator;
15import tools.refinery.store.model.Model;
16import tools.refinery.store.model.ModelStore;
17
18import java.util.List;
19
20public class DesignSpaceExplorationStoreAdapterImpl implements DesignSpaceExplorationStoreAdapter {
21 protected final ModelStore store;
22
23 protected final List<Rule> ruleDefinitions;
24 protected final List<Criterion> accepts;
25 protected final List<Criterion> excludes;
26 protected final List<Objective> objectives;
27
28 public DesignSpaceExplorationStoreAdapterImpl(
29 ModelStore store, List<Rule> ruleDefinitions, List<Criterion> accepts, List<Criterion> excludes,
30 List<Objective> objectives) {
31 this.store = store;
32 this.ruleDefinitions = ruleDefinitions;
33 this.accepts = accepts;
34 this.excludes = excludes;
35 this.objectives = objectives;
36 }
37
38 @Override
39 public ModelStore getStore() {
40 return store;
41 }
42
43 @Override
44 public DesignSpaceExplorationAdapterImpl createModelAdapter(Model model) {
45 final List<Transformation> t = this.ruleDefinitions.stream()
46 .map(x -> new Transformation(model, x))
47 .toList();
48 final List<CriterionCalculator> a = this.accepts.stream().map(x -> x.createCalculator(model)).toList();
49 final List<CriterionCalculator> e = this.excludes.stream().map(x -> x.createCalculator(model)).toList();
50 final List<ObjectiveCalculator> o = this.objectives.stream().map(x -> x.createCalculator(model)).toList();
51
52 return new DesignSpaceExplorationAdapterImpl(model, this, t, a, e, o);
53 }
54
55 @Override
56 public List<Rule> getTransformations() {
57 return ruleDefinitions;
58 }
59
60 @Override
61 public List<Criterion> getAccepts() {
62 return accepts;
63 }
64
65 @Override
66 public List<Criterion> getExcludes() {
67 return excludes;
68 }
69
70 @Override
71 public List<Objective> getObjectives() {
72 return objectives;
73 }
74}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java
new file mode 100644
index 00000000..0ad2b7a4
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/AndCriterion.java
@@ -0,0 +1,53 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.literal.Reduction;
11
12import java.util.ArrayList;
13import java.util.Collection;
14
15public final class AndCriterion extends CompositeCriterion {
16 AndCriterion(Collection<? extends Criterion> criteria) {
17 super(criteria);
18 }
19
20 @Override
21 public Reduction getReduction(ModelStore store) {
22 for (var criterion : getCriteria()) {
23 var reduction = criterion.getReduction(store);
24 if (reduction == Reduction.ALWAYS_FALSE) {
25 return Reduction.ALWAYS_FALSE;
26 } else if (reduction == Reduction.NOT_REDUCIBLE) {
27 return Reduction.NOT_REDUCIBLE;
28 }
29 }
30 return Reduction.ALWAYS_TRUE;
31 }
32
33 @Override
34 public CriterionCalculator createCalculator(Model model) {
35 var calculators = new ArrayList<CriterionCalculator>();
36 for (var criterion : getCriteria()) {
37 var reduction = criterion.getReduction(model.getStore());
38 if (reduction == Reduction.ALWAYS_FALSE) {
39 return () -> false;
40 } else if (reduction == Reduction.NOT_REDUCIBLE) {
41 calculators.add(criterion.createCalculator(model));
42 }
43 }
44 return () -> {
45 for (var calculator : calculators) {
46 if (!calculator.isSatisfied()) {
47 return false;
48 }
49 }
50 return true;
51 };
52 }
53}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java
new file mode 100644
index 00000000..5746cc7e
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeCriterion.java
@@ -0,0 +1,43 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.ModelStore;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.query.literal.Reduction;
11
12import java.util.*;
13
14public abstract sealed class CompositeCriterion implements Criterion permits AndCriterion, OrCriterion {
15 private final List<Criterion> criteria;
16
17 protected CompositeCriterion(Collection<? extends Criterion> criteria) {
18 var deDuplicatedCriteria = new LinkedHashSet<Criterion>();
19 for (var criterion : criteria) {
20 if (criterion.getClass() == this.getClass()) {
21 var childCriteria = ((CompositeCriterion) criterion).getCriteria();
22 deDuplicatedCriteria.addAll(childCriteria);
23 } else {
24 deDuplicatedCriteria.add(criterion);
25 }
26 }
27 this.criteria = List.copyOf(deDuplicatedCriteria);
28 }
29
30 public List<Criterion> getCriteria() {
31 return criteria;
32 }
33
34 @Override
35 public abstract Reduction getReduction(ModelStore store);
36
37 @Override
38 public void configure(ModelStoreBuilder storeBuilder) {
39 for (var criterion : criteria) {
40 criterion.configure(storeBuilder);
41 }
42 }
43}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeObjective.java
new file mode 100644
index 00000000..192a824b
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CompositeObjective.java
@@ -0,0 +1,69 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.model.ModelStoreBuilder;
11
12import java.util.ArrayList;
13import java.util.Collection;
14import java.util.Collections;
15import java.util.List;
16
17public class CompositeObjective implements Objective {
18 private final List<Objective> objectives;
19
20 CompositeObjective(Collection<? extends Objective> objectives) {
21 var unwrappedObjectives = new ArrayList<Objective>();
22 for (var objective : objectives) {
23 if (objective instanceof CompositeObjective compositeObjective) {
24 unwrappedObjectives.addAll(compositeObjective.getObjectives());
25 } else {
26 unwrappedObjectives.add(objective);
27 }
28 }
29 this.objectives = Collections.unmodifiableList(unwrappedObjectives);
30 }
31
32 public List<Objective> getObjectives() {
33 return objectives;
34 }
35
36 @Override
37 public boolean isAlwaysZero(ModelStore store) {
38 for (var objective : objectives) {
39 if (!objective.isAlwaysZero(store)) {
40 return false;
41 }
42 }
43 return true;
44 }
45
46 @Override
47 public ObjectiveCalculator createCalculator(Model model) {
48 var calculators = new ArrayList<ObjectiveCalculator>();
49 for (var objective : objectives) {
50 if (!objective.isAlwaysZero(model.getStore())) {
51 calculators.add(objective.createCalculator(model));
52 }
53 }
54 return () -> {
55 double value = 0;
56 for (var calculator : calculators) {
57 value += calculator.getValue();
58 }
59 return value;
60 };
61 }
62
63 @Override
64 public void configure(ModelStoreBuilder storeBuilder) {
65 for (var objective : objectives) {
66 objective.configure(storeBuilder);
67 }
68 }
69}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java
new file mode 100644
index 00000000..fbd05ded
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CountObjective.java
@@ -0,0 +1,47 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.query.ModelQueryAdapter;
12import tools.refinery.store.query.ModelQueryBuilder;
13import tools.refinery.store.query.ModelQueryStoreAdapter;
14import tools.refinery.store.query.dnf.RelationalQuery;
15import tools.refinery.store.query.literal.Reduction;
16
17public class CountObjective implements Objective {
18 private final RelationalQuery query;
19 private final double weight;
20
21 public CountObjective(RelationalQuery query) {
22 this(query, 1);
23 }
24
25 public CountObjective(RelationalQuery query, double weight) {
26 this.query = query;
27 this.weight = weight;
28 }
29
30 @Override
31 public boolean isAlwaysZero(ModelStore store) {
32 var queryStore = store.getAdapter(ModelQueryStoreAdapter.class);
33 var canonicalQuery = queryStore.getCanonicalQuery(query);
34 return canonicalQuery.getDnf().getReduction() == Reduction.ALWAYS_FALSE;
35 }
36
37 @Override
38 public ObjectiveCalculator createCalculator(Model model) {
39 var resultSet = model.getAdapter(ModelQueryAdapter.class).getResultSet(query);
40 return () -> resultSet.size() * weight;
41 }
42
43 @Override
44 public void configure(ModelStoreBuilder storeBuilder) {
45 storeBuilder.getAdapter(ModelQueryBuilder.class).query(query);
46 }
47}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java
new file mode 100644
index 00000000..0e4ec5c9
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criteria.java
@@ -0,0 +1,47 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.query.dnf.AnyQuery;
9
10import java.util.Collection;
11import java.util.List;
12
13public final class Criteria {
14 private Criteria() {
15 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
16 }
17
18 public static QueryCriterion whenHasMatch(AnyQuery query) {
19 return new QueryCriterion(query, true);
20 }
21
22 public static QueryCriterion whenNoMatch(AnyQuery query) {
23 return new QueryCriterion(query, false);
24 }
25
26 public static Criterion and(Criterion... criteria) {
27 return and(List.of(criteria));
28 }
29
30 public static Criterion and(Collection<? extends Criterion> criteria) {
31 if (criteria.size() == 1) {
32 return criteria.iterator().next();
33 }
34 return new AndCriterion(criteria);
35 }
36
37 public static Criterion or(Criterion... criteria) {
38 return or(List.of(criteria));
39 }
40
41 public static Criterion or(Collection<? extends Criterion> criteria) {
42 if (criteria.size() == 1) {
43 return criteria.iterator().next();
44 }
45 return new OrCriterion(criteria);
46 }
47}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java
new file mode 100644
index 00000000..c827f20e
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Criterion.java
@@ -0,0 +1,22 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.query.literal.Reduction;
12
13public interface Criterion {
14 default void configure(ModelStoreBuilder storeBuilder) {
15 }
16
17 default Reduction getReduction(ModelStore store) {
18 return Reduction.NOT_REDUCIBLE;
19 }
20
21 CriterionCalculator createCalculator(Model model);
22}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CriterionCalculator.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CriterionCalculator.java
new file mode 100644
index 00000000..944ffed6
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/CriterionCalculator.java
@@ -0,0 +1,10 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8public interface CriterionCalculator {
9 boolean isSatisfied();
10}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objective.java
new file mode 100644
index 00000000..49c34d87
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objective.java
@@ -0,0 +1,23 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.model.ModelStoreBuilder;
11
12public interface Objective {
13 default void configure(ModelStoreBuilder storeBuilder) {
14 }
15
16 // The name {@code isAlwaysZero} is more straightforward than something like {@code canBeNonZero}.
17 @SuppressWarnings("BooleanMethodIsAlwaysInverted")
18 default boolean isAlwaysZero(ModelStore store) {
19 return false;
20 }
21
22 ObjectiveCalculator createCalculator(Model model);
23}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/ObjectiveCalculator.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/ObjectiveCalculator.java
new file mode 100644
index 00000000..f01b8de9
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/ObjectiveCalculator.java
@@ -0,0 +1,10 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8public interface ObjectiveCalculator {
9 double getValue();
10}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java
new file mode 100644
index 00000000..e552d14c
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/Objectives.java
@@ -0,0 +1,41 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.query.dnf.FunctionalQuery;
9import tools.refinery.store.query.dnf.RelationalQuery;
10
11import java.util.Collection;
12import java.util.List;
13
14public final class Objectives {
15 private Objectives() {
16 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
17 }
18
19 public static CountObjective count(RelationalQuery query, double weight) {
20 return new CountObjective(query, weight);
21 }
22
23 public static CountObjective count(RelationalQuery query) {
24 return new CountObjective(query);
25 }
26
27 public static QueryObjective value(FunctionalQuery<? extends Number> query) {
28 return new QueryObjective(query);
29 }
30
31 public static Objective sum(Objective... objectives) {
32 return sum(List.of(objectives));
33 }
34
35 public static Objective sum(Collection<? extends Objective> objectives) {
36 if (objectives.size() == 1) {
37 return objectives.iterator().next();
38 }
39 return new CompositeObjective(objectives);
40 }
41}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java
new file mode 100644
index 00000000..7a8d7778
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/OrCriterion.java
@@ -0,0 +1,53 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.literal.Reduction;
11
12import java.util.ArrayList;
13import java.util.Collection;
14
15public final class OrCriterion extends CompositeCriterion {
16 OrCriterion(Collection<? extends Criterion> criteria) {
17 super(criteria);
18 }
19
20 @Override
21 public Reduction getReduction(ModelStore store) {
22 for (var criterion : getCriteria()) {
23 var reduction = criterion.getReduction(store);
24 if (reduction == Reduction.ALWAYS_TRUE) {
25 return Reduction.ALWAYS_TRUE;
26 } else if (reduction == Reduction.NOT_REDUCIBLE) {
27 return Reduction.NOT_REDUCIBLE;
28 }
29 }
30 return Reduction.ALWAYS_FALSE;
31 }
32
33 @Override
34 public CriterionCalculator createCalculator(Model model) {
35 var calculators = new ArrayList<CriterionCalculator>();
36 for (var criterion : getCriteria()) {
37 var reduction = criterion.getReduction(model.getStore());
38 if (reduction == Reduction.ALWAYS_TRUE) {
39 return () -> true;
40 } else if (reduction == Reduction.NOT_REDUCIBLE) {
41 calculators.add(criterion.createCalculator(model));
42 }
43 }
44 return () -> {
45 for (var calculator : calculators) {
46 if (calculator.isSatisfied()) {
47 return true;
48 }
49 }
50 return false;
51 };
52 }
53}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java
new file mode 100644
index 00000000..e15e4e41
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryCriterion.java
@@ -0,0 +1,59 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.query.ModelQueryAdapter;
12import tools.refinery.store.query.ModelQueryBuilder;
13import tools.refinery.store.query.ModelQueryStoreAdapter;
14import tools.refinery.store.query.dnf.AnyQuery;
15import tools.refinery.store.query.literal.Reduction;
16
17public class QueryCriterion implements Criterion {
18 protected final boolean satisfiedIfHasMatch;
19 protected final AnyQuery query;
20
21 /**
22 * Criteria based on the existence of matches evaluated on the model.
23 *
24 * @param query The query evaluated on the model.
25 * @param satisfiedIfHasMatch If true, the criteria satisfied if the query has any match on the model. Otherwise,
26 * the criteria satisfied if the query has no match on the model.
27 */
28 public QueryCriterion(AnyQuery query, boolean satisfiedIfHasMatch) {
29 this.query = query;
30 this.satisfiedIfHasMatch = satisfiedIfHasMatch;
31 }
32
33 @Override
34 public Reduction getReduction(ModelStore store) {
35 var queryStore = store.getAdapter(ModelQueryStoreAdapter.class);
36 var canonicalQuery = queryStore.getCanonicalQuery(query);
37 var reduction = canonicalQuery.getDnf().getReduction();
38 if (satisfiedIfHasMatch) {
39 return reduction;
40 }
41 return reduction.negate();
42 }
43
44 @Override
45 public CriterionCalculator createCalculator(Model model) {
46 var resultSet = model.getAdapter(ModelQueryAdapter.class).getResultSet(query);
47 if (satisfiedIfHasMatch) {
48 return () -> resultSet.size() > 0;
49 } else {
50 return () -> resultSet.size() == 0;
51 }
52 }
53
54 @Override
55 public void configure(ModelStoreBuilder storeBuilder) {
56 Criterion.super.configure(storeBuilder);
57 storeBuilder.getAdapter(ModelQueryBuilder.class).query(query);
58 }
59}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java
new file mode 100644
index 00000000..5a7ba8f4
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/objectives/QueryObjective.java
@@ -0,0 +1,41 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.objectives;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.ModelQueryBuilder;
12import tools.refinery.store.query.dnf.FunctionalQuery;
13
14public class QueryObjective implements Objective {
15 protected final FunctionalQuery<? extends Number> objectiveFunction;
16
17 public QueryObjective(FunctionalQuery<? extends Number> objectiveFunction) {
18 if (objectiveFunction.arity() != 0) {
19 throw new IllegalArgumentException("Objective functions must have 0 parameters, got %d instead"
20 .formatted(objectiveFunction.arity()));
21 }
22 this.objectiveFunction = objectiveFunction;
23 }
24
25 @Override
26 public ObjectiveCalculator createCalculator(Model model) {
27 var resultSet = model.getAdapter(ModelQueryAdapter.class).getResultSet(objectiveFunction);
28 return () -> {
29 var cursor = resultSet.getAll();
30 if (!cursor.move()) {
31 return 0;
32 }
33 return Math.max(cursor.getValue().doubleValue(), 0);
34 };
35 }
36
37 @Override
38 public void configure(ModelStoreBuilder storeBuilder) {
39 storeBuilder.getAdapter(ModelQueryBuilder.class).query(objectiveFunction);
40 }
41}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ActivationStore.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ActivationStore.java
new file mode 100644
index 00000000..52e0611d
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ActivationStore.java
@@ -0,0 +1,18 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace;
7
8import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
9import tools.refinery.store.map.Version;
10
11import java.util.Random;
12
13public interface ActivationStore {
14 record VisitResult(boolean successfulVisit, boolean mayHaveMore, int transformation, int activation) { }
15 VisitResult markNewAsVisited(VersionWithObjectiveValue to, int[] emptyEntrySizes);
16 boolean hasUnmarkedActivation(VersionWithObjectiveValue version);
17 VisitResult getRandomAndMarkAsVisited(VersionWithObjectiveValue version, Random random);
18}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/EquivalenceClassStore.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/EquivalenceClassStore.java
new file mode 100644
index 00000000..28d1488b
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/EquivalenceClassStore.java
@@ -0,0 +1,17 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace;
7
8import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
9import tools.refinery.store.statecoding.StateCoderResult;
10
11public interface EquivalenceClassStore {
12 boolean submit(VersionWithObjectiveValue version, StateCoderResult stateCoderResult, int[] emptyActivations, boolean accept);
13 boolean submit(StateCoderResult stateCoderResult);
14 boolean hasUnresolvedSymmetry();
15 void resolveOneSymmetry();
16 int getNumberOfUnresolvedSymmetries();
17}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ObjectivePriorityQueue.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ObjectivePriorityQueue.java
new file mode 100644
index 00000000..df72c343
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/ObjectivePriorityQueue.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace;
7
8import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
9import tools.refinery.store.map.Version;
10
11import java.util.Comparator;
12import java.util.Random;
13
14public interface ObjectivePriorityQueue {
15 Comparator<VersionWithObjectiveValue> getComparator();
16 void submit(VersionWithObjectiveValue versionWithObjectiveValue);
17 void remove(VersionWithObjectiveValue versionWithObjectiveValue);
18 int getSize();
19 VersionWithObjectiveValue getBest();
20 VersionWithObjectiveValue getRandom(Random random);
21}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/SolutionStore.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/SolutionStore.java
new file mode 100644
index 00000000..d1bfaa79
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/SolutionStore.java
@@ -0,0 +1,17 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace;
7
8import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
9
10import java.util.List;
11import java.util.concurrent.Future;
12
13public interface SolutionStore {
14 boolean submit(VersionWithObjectiveValue version);
15 List<VersionWithObjectiveValue> getSolutions();
16 boolean hasEnoughSolution();
17}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/AbstractEquivalenceClassStore.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/AbstractEquivalenceClassStore.java
new file mode 100644
index 00000000..b5087e86
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/AbstractEquivalenceClassStore.java
@@ -0,0 +1,54 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
9import tools.refinery.store.dse.transition.statespace.EquivalenceClassStore;
10import tools.refinery.store.statecoding.StateCoderResult;
11import tools.refinery.store.statecoding.StateCoderStoreAdapter;
12
13public abstract class AbstractEquivalenceClassStore implements EquivalenceClassStore {
14 protected final StateCoderStoreAdapter stateCoderStoreAdapter;
15 AbstractEquivalenceClassStore(StateCoderStoreAdapter stateCoderStoreAdapter) {
16 this.stateCoderStoreAdapter = stateCoderStoreAdapter;
17 }
18
19 protected int numberOfUnresolvedSymmetries = 0;
20
21 protected abstract void delegate(VersionWithObjectiveValue version, int[] emptyActivations, boolean accept);
22 protected abstract boolean tryToAdd(StateCoderResult stateCoderResult, VersionWithObjectiveValue newVersion,
23 int[] emptyActivations, boolean accept);
24
25 public abstract boolean tryToAdd(StateCoderResult stateCoderResult);
26
27 @Override
28 public boolean submit(StateCoderResult stateCoderResult) {
29 return tryToAdd(stateCoderResult);
30 }
31
32 @Override
33 public synchronized boolean submit(VersionWithObjectiveValue version, StateCoderResult stateCoderResult,
34 int[] emptyActivations, boolean accept) {
35 boolean hasNewVersion = tryToAdd(stateCoderResult, version, emptyActivations, accept);
36 if (hasNewVersion) {
37 delegate(version, emptyActivations, accept);
38 return true;
39 } else {
40 numberOfUnresolvedSymmetries++;
41 return false;
42 }
43 }
44
45 @Override
46 public boolean hasUnresolvedSymmetry() {
47 return numberOfUnresolvedSymmetries > 0;
48 }
49
50 @Override
51 public int getNumberOfUnresolvedSymmetries() {
52 return numberOfUnresolvedSymmetries;
53 }
54}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreBitVectorEntry.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreBitVectorEntry.java
new file mode 100644
index 00000000..c204ae35
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreBitVectorEntry.java
@@ -0,0 +1,50 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8public class ActivationStoreBitVectorEntry extends ActivationStoreEntry {
9 final int[] selected;
10
11 ActivationStoreBitVectorEntry(int numberOfActivations) {
12 super(numberOfActivations);
13 this.selected = new int[(numberOfActivations / Integer.SIZE) + 1];
14 }
15
16 @Override
17 public int getNumberOfVisitedActivations() {
18 int visited = 0;
19 // Use indexed for loop to avoid allocating an iterator.
20 //noinspection ForLoopReplaceableByForEach
21 for (int i = 0; i < selected.length; i++) {
22 visited += Integer.bitCount(selected[i]);
23 }
24 return visited;
25 }
26
27 private static final int ELEMENT_POSITION = 5; // size of Integer.SIZE
28 private static final int ELEMENT_BITMASK = (1 << ELEMENT_POSITION) - 1;
29
30 @Override
31 public int getAndAddActivationAfter(int index) {
32 int position = index;
33 do {
34 final int selectedElement = position >> ELEMENT_POSITION;
35 final int selectedBit = 1 << (position & ELEMENT_BITMASK);
36
37 if ((selected[selectedElement] & selectedBit) == 0) {
38 selected[selectedElement] |= selectedBit;
39 return position;
40 } else {
41 if (position < this.numberOfActivations - 1) {
42 position++;
43 } else {
44 position = 0;
45 }
46 }
47 } while (position != index);
48 throw new IllegalArgumentException("There is are no unvisited activations!");
49 }
50}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreEntry.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreEntry.java
new file mode 100644
index 00000000..7249751c
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreEntry.java
@@ -0,0 +1,37 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8public abstract class ActivationStoreEntry {
9 protected final int numberOfActivations;
10
11 ActivationStoreEntry(int numberOfActivations) {
12 this.numberOfActivations = numberOfActivations;
13 }
14
15 public abstract int getNumberOfVisitedActivations();
16
17 public int getNumberOfUnvisitedActivations() {
18 return numberOfActivations - getNumberOfVisitedActivations();
19 }
20
21 public int getNumberOfActivations() {
22 return numberOfActivations;
23 }
24
25 public abstract int getAndAddActivationAfter(int index);
26
27 // public abstract boolean contains(int activation)
28 // public abstract boolean add(int activation)
29
30 public static ActivationStoreEntry create(int size) {
31 if(size <= Integer.SIZE*6) {
32 return new ActivationStoreBitVectorEntry(size);
33 } else {
34 return new ActivationStoreListEntry(size);
35 }
36 }
37}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreImpl.java
new file mode 100644
index 00000000..82f89db7
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreImpl.java
@@ -0,0 +1,138 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
9import tools.refinery.store.dse.transition.statespace.ActivationStore;
10
11import java.util.*;
12import java.util.function.Consumer;
13
14public class ActivationStoreImpl implements ActivationStore {
15 final int numberOfTransformations;
16 final Consumer<VersionWithObjectiveValue> actionWhenAllActivationVisited;
17 final Map<VersionWithObjectiveValue, List<ActivationStoreEntry>> versionToActivations;
18
19 public ActivationStoreImpl(final int numberOfTransformations,
20 Consumer<VersionWithObjectiveValue> actionWhenAllActivationVisited) {
21 this.numberOfTransformations = numberOfTransformations;
22 this.actionWhenAllActivationVisited = actionWhenAllActivationVisited;
23 versionToActivations = new HashMap<>();
24 }
25
26 public synchronized VisitResult markNewAsVisited(VersionWithObjectiveValue to, int[] emptyEntrySizes) {
27 boolean[] successful = new boolean[]{false};
28 var entries = versionToActivations.computeIfAbsent(to, x -> {
29 successful[0] = true;
30 List<ActivationStoreEntry> result = new ArrayList<>(emptyEntrySizes.length);
31 for (int emptyEntrySize : emptyEntrySizes) {
32 result.add(ActivationStoreEntry.create(emptyEntrySize));
33 }
34 return result;
35 });
36 boolean hasMore = false;
37 for (var entry : entries) {
38 if (entry.getNumberOfUnvisitedActivations() > 0) {
39 hasMore = true;
40 break;
41 }
42 }
43 if (!hasMore) {
44 actionWhenAllActivationVisited.accept(to);
45 }
46 return new VisitResult(successful[0], hasMore, -1, -1);
47 }
48
49 public synchronized VisitResult visitActivation(VersionWithObjectiveValue from, int transformationIndex,
50 int activationIndex) {
51 var entries = versionToActivations.get(from);
52 var entry = entries.get(transformationIndex);
53 final int unvisited = entry.getNumberOfUnvisitedActivations();
54
55 final boolean successfulVisit = unvisited > 0;
56 final boolean hasMoreInActivation = unvisited > 1;
57 final boolean hasMore;
58 final int transformation;
59 final int activation;
60
61 if (successfulVisit) {
62 transformation = transformationIndex;
63 activation = entry.getAndAddActivationAfter(activationIndex);
64
65 } else {
66 transformation = -1;
67 activation = -1;
68 }
69
70 if (!hasMoreInActivation) {
71 boolean hasMoreInOtherTransformation = false;
72 for (var e : entries) {
73 if (e != entry && e.getNumberOfUnvisitedActivations() > 0) {
74 hasMoreInOtherTransformation = true;
75 break;
76 }
77 }
78 hasMore = hasMoreInOtherTransformation;
79 } else {
80 hasMore = true;
81 }
82
83 if (!hasMore) {
84 actionWhenAllActivationVisited.accept(from);
85 }
86
87 return new VisitResult(successfulVisit, hasMore, transformation, activation);
88 }
89
90 @Override
91 public synchronized boolean hasUnmarkedActivation(VersionWithObjectiveValue version) {
92 var entries = versionToActivations.get(version);
93 boolean hasMore = false;
94 for (var entry : entries) {
95 if (entry.getNumberOfUnvisitedActivations() > 0) {
96 hasMore = true;
97 break;
98 }
99 }
100 return hasMore;
101 }
102
103 @Override
104 public synchronized VisitResult getRandomAndMarkAsVisited(VersionWithObjectiveValue version, Random random) {
105 var entries = versionToActivations.get(version);
106
107 var weights = new double[entries.size()];
108 double totalWeight = 0;
109 int numberOfAllUnvisitedActivations = 0;
110 for (int i = 0; i < weights.length; i++) {
111 var entry = entries.get(i);
112 int unvisited = entry.getNumberOfUnvisitedActivations();
113 double weight = unvisited == 0 ? 0 : unvisited; //(Math.log(unvisited) + 1.0);
114 weights[i] = weight;
115 totalWeight += weight;
116 numberOfAllUnvisitedActivations += unvisited;
117 }
118
119 if (numberOfAllUnvisitedActivations == 0) {
120 this.actionWhenAllActivationVisited.accept(version);
121 return new VisitResult(false, false, -1, -1);
122 }
123
124 double offset = random.nextDouble(totalWeight);
125 int transformation = 0;
126 for (; transformation < entries.size(); transformation++) {
127 double weight = weights[transformation];
128 if (weight > 0 && offset < weight) {
129 var entry = entries.get(transformation);
130 int activation = random.nextInt(entry.getNumberOfActivations());
131 return this.visitActivation(version, transformation, activation);
132 }
133 offset -= weight;
134 }
135
136 throw new AssertionError("Unvisited activation %f not found".formatted(offset));
137 }
138}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreListEntry.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreListEntry.java
new file mode 100644
index 00000000..14298bee
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreListEntry.java
@@ -0,0 +1,104 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import org.eclipse.collections.api.factory.primitive.IntLists;
9import org.eclipse.collections.api.list.primitive.MutableIntList;
10
11public class ActivationStoreListEntry extends ActivationStoreEntry {
12 private final MutableIntList visitedActivations = IntLists.mutable.empty();
13
14 ActivationStoreListEntry(int numberOfActivations) {
15 super(numberOfActivations);
16 }
17
18 @Override
19 public int getNumberOfVisitedActivations() {
20 return visitedActivations.size();
21 }
22
23 @Override
24 public int getAndAddActivationAfter(int index) {
25 // If it is empty, just add it.
26 if(this.visitedActivations.isEmpty()) {
27 this.visitedActivations.add(index);
28 return index;
29 }
30 final int positionInSearch = getPosition(index);
31 int position = positionInSearch;
32
33 // if the position is after the last, we can insert it at the end of the list
34 if(position == this.visitedActivations.size()) {
35 this.visitedActivations.add(index);
36 return index;
37 } else if(this.visitedActivations.get(position) != index) {
38 // If the index is not in the position, one can insert it
39
40 this.visitedActivations.addAtIndex(position,index);
41 return index;
42 }
43
44 // Otherwise, get the next empty space between two elements
45 while(position + 1 < this.visitedActivations.size()) {
46 if(this.visitedActivations.get(position+1)-this.visitedActivations.get(position) > 1) {
47 int newElement = this.visitedActivations.get(position)+1;
48 this.visitedActivations.addAtIndex(position+1, newElement);
49 return newElement;
50 }
51 position++;
52 }
53
54 // Otherwise, try to add to the last space
55 int last = this.visitedActivations.get(this.visitedActivations.size()-1);
56 if(last<this.numberOfActivations-1) {
57 this.visitedActivations.add(last+1);
58 return last+1;
59 }
60
61 // Otherwise, try to put to the beginning
62 if(this.visitedActivations.get(0) > 0) {
63 this.visitedActivations.addAtIndex(0,0);
64 return 0;
65 }
66
67 // Otherwise, get the next empty space between two elements
68 position = 0;
69 while(position < positionInSearch) {
70 if(this.visitedActivations.get(position+1)-this.visitedActivations.get(position) > 1) {
71 int newElement = this.visitedActivations.get(position)+1;
72 this.visitedActivations.addAtIndex(position+1, newElement);
73 return newElement;
74 }
75 position++;
76 }
77
78 throw new IllegalArgumentException("There is are no unvisited activations!");
79 }
80
81 /**
82 * Returns the position of an index in the {@code visitedActivations}. If the collection contains the index, in
83 * returns its position, otherwise, it returns the position where the index need to be put.
84 *
85 * @param index Index of an activation.
86 * @return The position of the index.
87 */
88 private int getPosition(int index) {
89 int left = 0;
90 int right = this.visitedActivations.size() - 1;
91 while (left <= right) {
92 final int middle = (right - left) / 2 + left;
93 final int middleElement = visitedActivations.get(middle);
94 if(middleElement == index) {
95 return middle;
96 } else if(middleElement < index) {
97 left = middle +1;
98 } else{
99 right = middle-1;
100 }
101 }
102 return right+1;
103 }
104}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreWorker.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreWorker.java
new file mode 100644
index 00000000..1d7c5ce5
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ActivationStoreWorker.java
@@ -0,0 +1,55 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import tools.refinery.store.dse.transition.Transformation;
9import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
10import tools.refinery.store.dse.transition.statespace.ActivationStore;
11
12import java.util.List;
13import java.util.Random;
14
15public class ActivationStoreWorker {
16 final ActivationStore store;
17 final List<Transformation> transformations;
18
19 public ActivationStoreWorker(ActivationStore store, List<Transformation> transformations) {
20 this.store = store;
21 this.transformations = transformations;
22 }
23
24 public int[] calculateEmptyActivationSize() {
25 int[] result = new int[transformations.size()];
26 for (int i = 0; i < result.length; i++) {
27 result[i] = transformations.get(i).getAllActivationsAsResultSet().size();
28 }
29 return result;
30 }
31
32
33 public ActivationStore.VisitResult fireRandomActivation(VersionWithObjectiveValue thisVersion, Random random) {
34 var result = store.getRandomAndMarkAsVisited(thisVersion, random);
35 if (result.successfulVisit()) {
36 int selectedTransformation = result.transformation();
37 int selectedActivation = result.activation();
38
39 Transformation transformation = transformations.get(selectedTransformation);
40 var tuple = transformation.getActivation(selectedActivation);
41
42 boolean success = transformation.fireActivation(tuple);
43 if (success) {
44 return result;
45 } else {
46 return new ActivationStore.VisitResult(
47 false,
48 result.mayHaveMore(),
49 selectedTransformation,
50 selectedActivation);
51 }
52 }
53 return result;
54 }
55}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/CompleteEquivalenceClassStore.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/CompleteEquivalenceClassStore.java
new file mode 100644
index 00000000..20a026b6
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/CompleteEquivalenceClassStore.java
@@ -0,0 +1,104 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import org.eclipse.collections.api.factory.primitive.IntObjectMaps;
9import org.eclipse.collections.api.map.primitive.MutableIntObjectMap;
10import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
11import tools.refinery.store.dse.transition.statespace.EquivalenceClassStore;
12import tools.refinery.store.statecoding.StateCoderResult;
13import tools.refinery.store.statecoding.StateCoderStoreAdapter;
14import tools.refinery.store.statecoding.StateEquivalenceChecker;
15
16import java.util.ArrayList;
17
18public abstract class CompleteEquivalenceClassStore extends AbstractEquivalenceClassStore implements EquivalenceClassStore {
19
20 static class SymmetryStoreArray extends ArrayList<VersionWithObjectiveValue> {
21 final int[] activationSizes;
22 final boolean accept;
23
24 SymmetryStoreArray(int[] activationSizes, boolean accept) {
25 super();
26 this.activationSizes = activationSizes;
27 this.accept = accept;
28 }
29 }
30
31 private final MutableIntObjectMap<Object> modelCode2Versions = IntObjectMaps.mutable.empty();
32
33 protected CompleteEquivalenceClassStore(StateCoderStoreAdapter stateCoderStoreAdapter) {
34 super(stateCoderStoreAdapter);
35 }
36
37 @Override
38 protected boolean tryToAdd(StateCoderResult stateCoderResult, VersionWithObjectiveValue newVersion,
39 int[] emptyActivations, boolean accept) {
40 int modelCode = stateCoderResult.modelCode();
41 Object old = modelCode2Versions.updateValue(
42 modelCode,
43 () -> newVersion,
44 x -> {
45 if (x instanceof SymmetryStoreArray array) {
46 if(array.accept != accept || array.activationSizes != emptyActivations) {
47 this.delegate(newVersion,emptyActivations,accept);
48 return x;
49 }
50 array.add(newVersion);
51 return array;
52 } else {
53 SymmetryStoreArray result = new SymmetryStoreArray(emptyActivations, accept);
54 result.add((VersionWithObjectiveValue) x);
55 result.add(newVersion);
56 return result;
57 }
58 });
59 return old == null;
60 }
61
62 @Override
63 public void resolveOneSymmetry() {
64 var unresolvedSimilarity = getOneUnresolvedSymmetry();
65 if (unresolvedSimilarity == null) {
66 return;
67 }
68 var outcome = this.stateCoderStoreAdapter.checkEquivalence(unresolvedSimilarity.get(0).version(),
69 unresolvedSimilarity.get(1).version());
70 if (outcome != StateEquivalenceChecker.EquivalenceResult.ISOMORPHIC) {
71 delegate(unresolvedSimilarity.get(1), unresolvedSimilarity.activationSizes, unresolvedSimilarity.accept);
72 }
73 }
74
75 //record UnresolvedSymmetryResult
76
77 private synchronized SymmetryStoreArray getOneUnresolvedSymmetry() {
78 if (numberOfUnresolvedSymmetries <= 0) {
79 return null;
80 }
81
82 for (var entry : modelCode2Versions.keyValuesView()) {
83 int hash = entry.getOne();
84 var value = entry.getTwo();
85 if (value instanceof SymmetryStoreArray array) {
86 int size = array.size();
87 var representative = array.get(0);
88 var similar = array.get(size - 1);
89 array.remove(size - 1);
90
91 if (size <= 2) {
92 modelCode2Versions.put(hash, representative);
93 }
94
95 var result = new SymmetryStoreArray(array.activationSizes, array.accept);
96 result.add(representative);
97 result.add(similar);
98 return result;
99 }
100 }
101
102 return null;
103 }
104}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/FastEquivalenceClassStore.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/FastEquivalenceClassStore.java
new file mode 100644
index 00000000..6d028124
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/FastEquivalenceClassStore.java
@@ -0,0 +1,37 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import org.eclipse.collections.api.factory.primitive.IntSets;
9import org.eclipse.collections.api.set.primitive.MutableIntSet;
10import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
11import tools.refinery.store.dse.transition.statespace.EquivalenceClassStore;
12import tools.refinery.store.statecoding.StateCoderResult;
13import tools.refinery.store.statecoding.StateCoderStoreAdapter;
14
15public abstract class FastEquivalenceClassStore extends AbstractEquivalenceClassStore implements EquivalenceClassStore {
16
17 private final MutableIntSet codes = IntSets.mutable.empty();
18
19 protected FastEquivalenceClassStore(StateCoderStoreAdapter stateCoderStoreAdapter) {
20 super(stateCoderStoreAdapter);
21 }
22
23 @Override
24 protected synchronized boolean tryToAdd(StateCoderResult stateCoderResult, VersionWithObjectiveValue newVersion,
25 int[] emptyActivations, boolean accept) {
26 return this.codes.add(stateCoderResult.modelCode());
27 }
28
29 public synchronized boolean tryToAdd(StateCoderResult stateCoderResult) {
30 return this.codes.add(stateCoderResult.modelCode());
31 }
32
33 @Override
34 public void resolveOneSymmetry() {
35 throw new IllegalArgumentException("This equivalence storage is not prepared to resolve symmetries!");
36 }
37}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ObjectivePriorityQueueImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ObjectivePriorityQueueImpl.java
new file mode 100644
index 00000000..2f3e142a
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/ObjectivePriorityQueueImpl.java
@@ -0,0 +1,68 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import tools.refinery.store.dse.transition.ObjectiveValues;
9import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
10import tools.refinery.store.dse.transition.objectives.Objective;
11import tools.refinery.store.dse.transition.statespace.ObjectivePriorityQueue;
12
13import java.util.Comparator;
14import java.util.List;
15import java.util.PriorityQueue;
16import java.util.Random;
17
18public class ObjectivePriorityQueueImpl implements ObjectivePriorityQueue {
19 public static final Comparator<VersionWithObjectiveValue> c1 = (o1, o2) -> Double.compare(
20 ((ObjectiveValues.ObjectiveValue1) o1.objectiveValue()).value0(),
21 ((ObjectiveValues.ObjectiveValue1) o2.objectiveValue()).value0());
22 // TODO: support multi objective!
23 final PriorityQueue<VersionWithObjectiveValue> priorityQueue;
24
25 public ObjectivePriorityQueueImpl(List<Objective> objectives) {
26
27 if(objectives.size() == 1) {
28 this.priorityQueue = new PriorityQueue<>(c1);
29 } else {
30 throw new UnsupportedOperationException("Only single objective comparator is implemented currently!");
31 }
32 }
33 @Override
34 public Comparator<VersionWithObjectiveValue> getComparator() {
35 return c1;
36 }
37
38 @Override
39 public synchronized void submit(VersionWithObjectiveValue versionWithObjectiveValue) {
40 priorityQueue.add(versionWithObjectiveValue);
41 }
42
43 @Override
44 public synchronized void remove(VersionWithObjectiveValue versionWithObjectiveValue) {
45 priorityQueue.remove(versionWithObjectiveValue);
46 }
47
48 @Override
49 public synchronized int getSize() {
50 return priorityQueue.size();
51 }
52
53 @Override
54 public synchronized VersionWithObjectiveValue getBest() {
55 return priorityQueue.peek();
56 }
57
58 @Override
59 public synchronized VersionWithObjectiveValue getRandom(Random random) {
60 int randomPosition = random.nextInt(getSize());
61 for (VersionWithObjectiveValue entry : this.priorityQueue) {
62 if (randomPosition-- == 0) {
63 return entry;
64 }
65 }
66 throw new IllegalStateException("The priority queue is inconsistent!");
67 }
68}
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/SolutionStoreImpl.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/SolutionStoreImpl.java
new file mode 100644
index 00000000..43548eaa
--- /dev/null
+++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/transition/statespace/internal/SolutionStoreImpl.java
@@ -0,0 +1,52 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import tools.refinery.store.dse.transition.VersionWithObjectiveValue;
9import tools.refinery.store.dse.transition.statespace.SolutionStore;
10
11import java.util.ArrayList;
12import java.util.List;
13import java.util.PriorityQueue;
14
15
16public class SolutionStoreImpl implements SolutionStore {
17 final int maxNumberSolutions;
18 public static final int UNLIMITED = -1;
19 final PriorityQueue<VersionWithObjectiveValue> solutions;
20
21 public SolutionStoreImpl(int maxNumberSolutions) {
22 this.maxNumberSolutions = maxNumberSolutions;
23 solutions = new PriorityQueue<>(ObjectivePriorityQueueImpl.c1.reversed());
24 }
25
26
27 @Override
28 public synchronized boolean submit(VersionWithObjectiveValue version) {
29 boolean removeLast = hasEnoughSolution();
30 solutions.add(version);
31 if(removeLast) {
32 var last = solutions.poll();
33 return last != version;
34 } else {
35 return true;
36 }
37 }
38
39 @Override
40 public List<VersionWithObjectiveValue> getSolutions() {
41 return new ArrayList<>(solutions);
42 }
43
44 @Override
45 public boolean hasEnoughSolution() {
46 if (maxNumberSolutions == UNLIMITED) {
47 return false;
48 } else {
49 return solutions.size() >= maxNumberSolutions;
50 }
51 }
52}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/ActionEqualsTest.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/ActionEqualsTest.java
deleted file mode 100644
index d4a05d12..00000000
--- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/ActionEqualsTest.java
+++ /dev/null
@@ -1,629 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8import org.junit.jupiter.api.BeforeAll;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.dse.internal.action.*;
11import tools.refinery.store.dse.strategy.DepthFirstStrategy;
12import tools.refinery.store.model.Model;
13import tools.refinery.store.model.ModelStore;
14import tools.refinery.store.query.dnf.Query;
15import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
16import tools.refinery.store.query.view.KeyOnlyView;
17import tools.refinery.store.representation.Symbol;
18
19import static org.junit.jupiter.api.Assertions.assertFalse;
20import static org.junit.jupiter.api.Assertions.assertTrue;
21
22public class ActionEqualsTest {
23
24 private static Model model;
25 private static Symbol<Boolean> type1;
26 private static Symbol<Boolean> relation1;
27 private static Symbol<Boolean> relation2;
28
29 @BeforeAll
30 public static void init() {
31 type1 = Symbol.of("type1", 1);
32 relation1 = Symbol.of("relation1", 2);
33 relation2 = Symbol.of("relation2", 2);
34 var type1View = new KeyOnlyView<>(type1);
35 var precondition1 = Query.of("CreateClassPrecondition",
36 (builder, model) -> builder.clause(
37 type1View.call(model)
38 ));
39
40 var precondition2 = Query.of("CreateFeaturePrecondition",
41 (builder, model) -> builder.clause(
42 type1View.call(model)
43 ));
44 var store = ModelStore.builder()
45 .symbols(type1, relation2, relation1)
46 .with(ViatraModelQueryAdapter.builder()
47 .queries(precondition1, precondition2))
48 .with(DesignSpaceExplorationAdapter.builder()
49 .strategy(new DepthFirstStrategy()))
50 .build();
51
52
53 model = store.createEmptyModel();
54 }
55
56 @Test
57 void emptyActionEqualsTest() {
58 var action1 = new TransformationAction();
59 var action2 = new TransformationAction();
60
61 assertTrue(action1.equalsWithSubstitution(action1));
62 assertTrue(action2.equalsWithSubstitution(action2));
63 assertTrue(action1.equalsWithSubstitution(action2));
64 }
65
66 @Test
67 void actionTrivialTest() {
68 var newItemSymbol1 = new NewItemVariable();
69 var activationSymbol = new ActivationVariable();
70 var insertAction1 = new InsertAction<>(model.getInterpretation(type1), true, newItemSymbol1);
71 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
72 activationSymbol);
73 var insertAction3 = new InsertAction<>(model.getInterpretation(type1), true, newItemSymbol1);
74 var insertAction4 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
75 activationSymbol);
76
77 var action1 = new TransformationAction();
78 action1.add(newItemSymbol1);
79 action1.add(activationSymbol);
80 action1.add(insertAction1);
81 action1.add(insertAction2);
82 action1.prepare(model);
83
84 var action2 = new TransformationAction();
85 action2.add(newItemSymbol1);
86 action2.add(activationSymbol);
87 action2.add(insertAction3);
88 action2.add(insertAction4);
89 action2.prepare(model);
90
91 assertTrue(action1.equalsWithSubstitution(action2));
92 }
93
94 @Test
95 void actionIdenticalTest() {
96 var newItemSymbol1 = new NewItemVariable();
97 var activationSymbol1 = new ActivationVariable();
98 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
99 activationSymbol1);
100
101 var action1 = new TransformationAction();
102 action1.add(newItemSymbol1);
103 action1.add(activationSymbol1);
104 action1.add(insertAction1);
105 action1.prepare(model);
106
107 var newItemSymbol2 = new NewItemVariable();
108 var activationSymbol2 = new ActivationVariable();
109 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
110 activationSymbol2);
111
112 var action2 = new TransformationAction();
113 action2.add(newItemSymbol2);
114 action2.add(activationSymbol2);
115 action2.add(insertAction2);
116 action2.prepare(model);
117
118 assertTrue(action1.equalsWithSubstitution(action2));
119 }
120
121 @Test
122 void actionSymbolGlobalOrderTest() {
123 var newItemSymbol1 = new NewItemVariable();
124 var activationSymbol1 = new ActivationVariable();
125 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
126 activationSymbol1);
127
128 var action1 = new TransformationAction();
129 action1.add(newItemSymbol1);
130 action1.add(activationSymbol1);
131 action1.add(insertAction1);
132 action1.prepare(model);
133
134 var newItemSymbol2 = new NewItemVariable();
135 var activationSymbol2 = new ActivationVariable();
136 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
137 activationSymbol2);
138
139 var action2 = new TransformationAction();
140 action2.add(activationSymbol2);
141 action2.add(newItemSymbol2);
142 action2.add(insertAction2);
143 action2.prepare(model);
144
145 assertFalse(action1.equalsWithSubstitution(action2));
146 }
147
148 @Test
149 void actionSymbolRepeatedInInsertActionTest() {
150 var newItemSymbol1 = new NewItemVariable();
151 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
152 newItemSymbol1);
153
154 var action1 = new TransformationAction();
155 action1.add(newItemSymbol1);
156 action1.add(insertAction1);
157 action1.prepare(model);
158
159 var newItemSymbol2 = new NewItemVariable();
160 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
161 newItemSymbol2);
162
163 var action2 = new TransformationAction();
164 action2.add(newItemSymbol2);
165 action2.add(insertAction2);
166 action2.prepare(model);
167
168 assertTrue(action1.equalsWithSubstitution(action2));
169 }
170
171 @Test
172 void identicalInsertActionInDifferentOrderTest() {
173 var newItemSymbol1 = new NewItemVariable();
174 var activationSymbol1 = new ActivationVariable();
175 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
176 activationSymbol1);
177 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
178 activationSymbol1);
179
180 var action1 = new TransformationAction();
181 action1.add(newItemSymbol1);
182 action1.add(activationSymbol1);
183 action1.add(insertAction1);
184 action1.add(insertAction2);
185 action1.prepare(model);
186
187 var action2 = new TransformationAction();
188 action2.add(newItemSymbol1);
189 action2.add(activationSymbol1);
190 action2.add(insertAction2);
191 action2.add(insertAction1);
192 action2.prepare(model);
193
194 assertTrue(action1.equalsWithSubstitution(action2));
195 }
196
197 @Test
198 void identicalActionAndSymbolDifferentOrderTest() {
199 var newItemSymbol1 = new NewItemVariable();
200 var newItemSymbol2 = new NewItemVariable();
201 var activationSymbol1 = new ActivationVariable();
202 var activationSymbol2 = new ActivationVariable();
203
204 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
205 activationSymbol1);
206
207 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
208 activationSymbol2);
209
210 var action1 = new TransformationAction();
211 action1.add(newItemSymbol1);
212 action1.add(newItemSymbol2);
213 action1.add(activationSymbol1);
214 action1.add(activationSymbol2);
215 action1.add(insertAction1);
216 action1.add(insertAction2);
217 action1.prepare(model);
218
219 var action2 = new TransformationAction();
220 action2.add(newItemSymbol2);
221 action2.add(newItemSymbol1);
222 action2.add(activationSymbol2);
223 action2.add(activationSymbol1);
224 action2.add(insertAction2);
225 action2.add(insertAction1);
226 action2.prepare(model);
227
228 assertTrue(action1.equalsWithSubstitution(action2));
229 }
230
231 @Test
232 void identicalActionAndSymbolMixedOrderTest() {
233 var newItemSymbol1 = new NewItemVariable();
234 var activationSymbol1 = new ActivationVariable();
235 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
236 activationSymbol1);
237
238 var newItemSymbol2 = new NewItemVariable();
239 var activationSymbol2 = new ActivationVariable();
240 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
241 activationSymbol2);
242
243 var action1 = new TransformationAction();
244 action1.add(newItemSymbol1);
245 action1.add(newItemSymbol2);
246 action1.add(activationSymbol1);
247 action1.add(activationSymbol2);
248 action1.add(insertAction1);
249 action1.add(insertAction2);
250 action1.prepare(model);
251
252 var action2 = new TransformationAction();
253 action2.add(insertAction1);
254 action2.add(newItemSymbol1);
255 action2.add(newItemSymbol2);
256 action2.add(activationSymbol1);
257 action2.add(insertAction2);
258 action2.add(activationSymbol2);
259 action2.prepare(model);
260
261 assertTrue(action1.equalsWithSubstitution(action2));
262 }
263
264 @Test
265 void insertActionInterpretationTest() {
266 var newItemSymbol1 = new NewItemVariable();
267 var activationSymbol1 = new ActivationVariable();
268 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
269 activationSymbol1);
270 var insertAction2 = new InsertAction<>(model.getInterpretation(relation2), true, newItemSymbol1,
271 activationSymbol1);
272
273 var action1 = new TransformationAction();
274 action1.add(newItemSymbol1);
275 action1.add(activationSymbol1);
276 action1.add(insertAction1);
277 action1.prepare(model);
278
279 var action2 = new TransformationAction();
280 action2.add(newItemSymbol1);
281 action2.add(activationSymbol1);
282 action2.add(insertAction2);
283 action2.prepare(model);
284
285 assertFalse(action1.equalsWithSubstitution(action2));
286 }
287
288 @Test
289 void insertActionValueTest() {
290 var newItemSymbol1 = new NewItemVariable();
291 var activationSymbol1 = new ActivationVariable();
292 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
293 activationSymbol1);
294 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), false, newItemSymbol1,
295 activationSymbol1);
296
297 var action1 = new TransformationAction();
298 action1.add(newItemSymbol1);
299 action1.add(activationSymbol1);
300 action1.add(insertAction1);
301 action1.prepare(model);
302
303 var action2 = new TransformationAction();
304 action2.add(newItemSymbol1);
305 action2.add(activationSymbol1);
306 action2.add(insertAction2);
307 action2.prepare(model);
308
309 assertFalse(action1.equalsWithSubstitution(action2));
310 }
311
312 @Test
313 void newItemSymbolDuplicateTest() {
314 var newItemSymbol1 = new NewItemVariable();
315 var newItemSymbol2 = new NewItemVariable();
316 var activationSymbol1 = new ActivationVariable();
317 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
318 activationSymbol1);
319 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
320 activationSymbol1);
321
322 var action1 = new TransformationAction();
323 action1.add(newItemSymbol1);
324 action1.add(activationSymbol1);
325 action1.add(insertAction1);
326 action1.prepare(model);
327
328 var action2 = new TransformationAction();
329 action2.add(newItemSymbol2);
330 action2.add(activationSymbol1);
331 action2.add(insertAction2);
332 action2.prepare(model);
333
334 assertTrue(action1.equalsWithSubstitution(action2));
335 }
336
337 @Test
338 void activationSymbolDuplicateTest() {
339 var newItemSymbol1 = new NewItemVariable();
340 var activationSymbol1 = new ActivationVariable();
341 var activationSymbol2 = new ActivationVariable();
342 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
343 activationSymbol1);
344 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
345 activationSymbol2);
346
347 var action1 = new TransformationAction();
348 action1.add(newItemSymbol1);
349 action1.add(activationSymbol1);
350 action1.add(insertAction1);
351 action1.prepare(model);
352
353 var action2 = new TransformationAction();
354 action2.add(newItemSymbol1);
355 action2.add(activationSymbol2);
356 action2.add(insertAction2);
357 action2.prepare(model);
358
359 assertTrue(action1.equalsWithSubstitution(action2));
360 }
361
362 @Test
363 void activationSymbolIndexTest() {
364 var newItemSymbol1 = new NewItemVariable();
365 var activationSymbol1 = new ActivationVariable(0);
366 var activationSymbol2 = new ActivationVariable(1);
367 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
368 activationSymbol1);
369 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
370 activationSymbol2);
371
372 var action1 = new TransformationAction();
373 action1.add(newItemSymbol1);
374 action1.add(activationSymbol1);
375 action1.add(insertAction1);
376 action1.prepare(model);
377
378 var action2 = new TransformationAction();
379 action2.add(newItemSymbol1);
380 action2.add(activationSymbol2);
381 action2.add(insertAction2);
382 action2.prepare(model);
383
384 assertFalse(action1.equalsWithSubstitution(action2));
385 }
386
387 @Test
388 void deleteActionTest() {
389 var newItemSymbol = new NewItemVariable();
390 var activationSymbol = new ActivationVariable(0);
391 var insertAction = new InsertAction<>(model.getInterpretation(relation1), false, newItemSymbol,
392 activationSymbol);
393 var deleteAction = new DeleteAction(activationSymbol);
394
395 var action1 = new TransformationAction();
396 action1.add(newItemSymbol);
397 action1.add(activationSymbol);
398 action1.add(insertAction);
399 action1.add(deleteAction);
400 action1.prepare(model);
401
402 var action2 = new TransformationAction();
403 action2.add(newItemSymbol);
404 action2.add(activationSymbol);
405 action2.add(insertAction);
406 action2.add(deleteAction);
407 action2.prepare(model);
408
409 assertTrue(action1.equalsWithSubstitution(action2));
410 }
411
412 @Test
413 void deleteActionMissingTest() {
414 var newItemSymbol = new NewItemVariable();
415 var activationSymbol = new ActivationVariable(0);
416 var insertAction = new InsertAction<>(model.getInterpretation(relation1), false, newItemSymbol,
417 activationSymbol);
418 var deleteAction = new DeleteAction(activationSymbol);
419
420 var action1 = new TransformationAction();
421 action1.add(newItemSymbol);
422 action1.add(activationSymbol);
423 action1.add(insertAction);
424 action1.add(deleteAction);
425 action1.prepare(model);
426
427 var action2 = new TransformationAction();
428 action2.add(newItemSymbol);
429 action2.add(activationSymbol);
430 action2.add(insertAction);
431 action2.prepare(model);
432
433 assertFalse(action1.equalsWithSubstitution(action2));
434 }
435
436 @Test
437 void deleteActionIdenticalTest() {
438 var newItemSymbol = new NewItemVariable();
439 var activationSymbol = new ActivationVariable(0);
440 var insertAction = new InsertAction<>(model.getInterpretation(relation1), false, newItemSymbol,
441 activationSymbol);
442 var deleteAction1 = new DeleteAction(activationSymbol);
443 var deleteAction2 = new DeleteAction(activationSymbol);
444
445 var action1 = new TransformationAction();
446 action1.add(newItemSymbol);
447 action1.add(activationSymbol);
448 action1.add(insertAction);
449 action1.add(deleteAction1);
450 action1.prepare(model);
451
452 var action2 = new TransformationAction();
453 action2.add(newItemSymbol);
454 action2.add(activationSymbol);
455 action2.add(insertAction);
456 action2.add(deleteAction2);
457 action2.prepare(model);
458
459 assertTrue(action1.equalsWithSubstitution(action2));
460 }
461
462 @Test
463 void deleteActionSymbolTypeTest() {
464 var newItemSymbol = new NewItemVariable();
465 var activationSymbol = new ActivationVariable(0);
466 var insertAction = new InsertAction<>(model.getInterpretation(relation1), false, newItemSymbol,
467 activationSymbol);
468 var deleteAction1 = new DeleteAction(activationSymbol);
469 var deleteAction2 = new DeleteAction(newItemSymbol);
470
471 var action1 = new TransformationAction();
472 action1.add(newItemSymbol);
473 action1.add(activationSymbol);
474 action1.add(insertAction);
475 action1.add(deleteAction1);
476 action1.prepare(model);
477
478 var action2 = new TransformationAction();
479 action2.add(newItemSymbol);
480 action2.add(activationSymbol);
481 action2.add(insertAction);
482 action2.add(deleteAction2);
483 action2.prepare(model);
484
485 assertFalse(action1.equalsWithSubstitution(action2));
486 }
487
488 @Test
489 void deleteActionOrderTest() {
490 var newItemSymbol = new NewItemVariable();
491 var activationSymbol = new ActivationVariable(0);
492 var insertAction = new InsertAction<>(model.getInterpretation(relation1), false, newItemSymbol,
493 activationSymbol);
494 var deleteAction1 = new DeleteAction(activationSymbol);
495 var deleteAction2 = new DeleteAction(newItemSymbol);
496
497 var action1 = new TransformationAction();
498 action1.add(newItemSymbol);
499 action1.add(activationSymbol);
500 action1.add(insertAction);
501 action1.add(deleteAction1);
502 action1.add(deleteAction2);
503 action1.prepare(model);
504
505 var action2 = new TransformationAction();
506 action2.add(newItemSymbol);
507 action2.add(activationSymbol);
508 action2.add(insertAction);
509 action2.add(deleteAction2);
510 action2.add(deleteAction1);
511 action2.prepare(model);
512
513 assertFalse(action1.equalsWithSubstitution(action2));
514 }
515
516 @Test
517 void actionsMixedOrderTest() {
518 var newItemSymbol1 = new NewItemVariable();
519 var activationSymbol1 = new ActivationVariable();
520 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
521 activationSymbol1);
522 var deleteAction1 = new DeleteAction(newItemSymbol1);
523
524 var newItemSymbol2 = new NewItemVariable();
525 var activationSymbol2 = new ActivationVariable();
526 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
527 activationSymbol2);
528 var deleteAction2 = new DeleteAction(activationSymbol2);
529
530 var action1 = new TransformationAction();
531 action1.add(newItemSymbol1);
532 action1.add(newItemSymbol2);
533 action1.add(activationSymbol1);
534 action1.add(activationSymbol2);
535 action1.add(insertAction1);
536 action1.add(insertAction2);
537 action1.add(deleteAction1);
538 action1.add(deleteAction2);
539 action1.prepare(model);
540
541 var action2 = new TransformationAction();
542 action2.add(deleteAction1);
543 action2.add(newItemSymbol1);
544 action2.add(insertAction1);
545 action2.add(newItemSymbol2);
546 action2.add(deleteAction2);
547 action2.add(activationSymbol1);
548 action2.add(insertAction2);
549 action2.add(activationSymbol2);
550 action2.prepare(model);
551
552 assertTrue(action1.equalsWithSubstitution(action2));
553 }
554
555 @Test
556 void twoUnpreparedActionsTest() {
557 var newItemSymbol1 = new NewItemVariable();
558 var activationSymbol1 = new ActivationVariable();
559 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
560 activationSymbol1);
561 var deleteAction1 = new DeleteAction(newItemSymbol1);
562
563 var newItemSymbol2 = new NewItemVariable();
564 var activationSymbol2 = new ActivationVariable();
565 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
566 activationSymbol2);
567 var deleteAction2 = new DeleteAction(activationSymbol2);
568
569 var action1 = new TransformationAction();
570 action1.add(newItemSymbol1);
571 action1.add(newItemSymbol2);
572 action1.add(activationSymbol1);
573 action1.add(activationSymbol2);
574 action1.add(insertAction1);
575 action1.add(insertAction2);
576 action1.add(deleteAction1);
577 action1.add(deleteAction2);
578
579 var action2 = new TransformationAction();
580 action2.add(deleteAction1);
581 action2.add(newItemSymbol1);
582 action2.add(insertAction1);
583 action2.add(newItemSymbol2);
584 action2.add(deleteAction2);
585 action2.add(activationSymbol1);
586 action2.add(insertAction2);
587 action2.add(activationSymbol2);
588
589 assertTrue(action1.equalsWithSubstitution(action2));
590 }
591
592 @Test
593 void oneUnpreparedActionTest() {
594 var newItemSymbol1 = new NewItemVariable();
595 var activationSymbol1 = new ActivationVariable();
596 var insertAction1 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol1,
597 activationSymbol1);
598 var deleteAction1 = new DeleteAction(newItemSymbol1);
599
600 var newItemSymbol2 = new NewItemVariable();
601 var activationSymbol2 = new ActivationVariable();
602 var insertAction2 = new InsertAction<>(model.getInterpretation(relation1), true, newItemSymbol2,
603 activationSymbol2);
604 var deleteAction2 = new DeleteAction(activationSymbol2);
605
606 var action1 = new TransformationAction();
607 action1.add(newItemSymbol1);
608 action1.add(newItemSymbol2);
609 action1.add(activationSymbol1);
610 action1.add(activationSymbol2);
611 action1.add(insertAction1);
612 action1.add(insertAction2);
613 action1.add(deleteAction1);
614 action1.add(deleteAction2);
615 action1.prepare(model);
616
617 var action2 = new TransformationAction();
618 action2.add(deleteAction1);
619 action2.add(newItemSymbol1);
620 action2.add(insertAction1);
621 action2.add(newItemSymbol2);
622 action2.add(deleteAction2);
623 action2.add(activationSymbol1);
624 action2.add(insertAction2);
625 action2.add(activationSymbol2);
626
627 assertFalse(action1.equalsWithSubstitution(action2));
628 }
629}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java
index 225de32e..63da6cc3 100644
--- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/CRAExamplesTest.java
@@ -7,236 +7,161 @@ package tools.refinery.store.dse;
7 7
8import org.junit.jupiter.api.Disabled; 8import org.junit.jupiter.api.Disabled;
9import org.junit.jupiter.api.Test; 9import org.junit.jupiter.api.Test;
10import tools.refinery.store.dse.objectives.AlwaysSatisfiedRandomHardObjective; 10import tools.refinery.store.dse.modification.DanglingEdges;
11import tools.refinery.store.dse.modification.ModificationAdapter;
12import tools.refinery.store.dse.strategy.BestFirstStoreManager;
13import tools.refinery.store.dse.tests.DummyCriterion;
14import tools.refinery.store.dse.tests.DummyRandomObjective;
15import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter;
16import tools.refinery.store.dse.transition.Rule;
17import tools.refinery.store.dse.transition.objectives.Criteria;
18import tools.refinery.store.dse.transition.objectives.Objectives;
11import tools.refinery.store.model.ModelStore; 19import tools.refinery.store.model.ModelStore;
12import tools.refinery.store.query.ModelQueryAdapter; 20import tools.refinery.store.query.ModelQueryAdapter;
13import tools.refinery.store.query.dnf.Query; 21import tools.refinery.store.query.dnf.Query;
14import tools.refinery.store.query.dnf.RelationalQuery; 22import tools.refinery.store.query.dnf.RelationalQuery;
15import tools.refinery.store.dse.internal.TransformationRule; 23import tools.refinery.store.query.term.Variable;
16import tools.refinery.store.dse.strategy.BestFirstStrategy;
17import tools.refinery.store.dse.strategy.DepthFirstStrategy;
18import tools.refinery.store.query.viatra.ViatraModelQueryAdapter; 24import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
19import tools.refinery.store.query.view.AnySymbolView; 25import tools.refinery.store.query.view.AnySymbolView;
20import tools.refinery.store.query.view.KeyOnlyView; 26import tools.refinery.store.query.view.KeyOnlyView;
21import tools.refinery.store.representation.Symbol; 27import tools.refinery.store.representation.Symbol;
28import tools.refinery.store.statecoding.StateCoderAdapter;
22import tools.refinery.store.tuple.Tuple; 29import tools.refinery.store.tuple.Tuple;
23import tools.refinery.visualization.ModelVisualizerAdapter; 30import tools.refinery.visualization.ModelVisualizerAdapter;
24import tools.refinery.visualization.internal.FileFormat; 31import tools.refinery.visualization.internal.FileFormat;
25 32
26import java.util.List; 33import java.util.List;
27 34
35import static tools.refinery.store.dse.modification.actions.ModificationActionLiterals.create;
36import static tools.refinery.store.dse.modification.actions.ModificationActionLiterals.delete;
37import static tools.refinery.store.dse.transition.actions.ActionLiterals.add;
38import static tools.refinery.store.dse.transition.actions.ActionLiterals.remove;
28import static tools.refinery.store.query.literal.Literals.not; 39import static tools.refinery.store.query.literal.Literals.not;
29 40
30class CRAExamplesTest { 41class CRAExamplesTest {
31 private static final Symbol<String> name = Symbol.of("Name", 1, String.class); 42 private static final Symbol<String> name = Symbol.of("Name", 1, String.class);
32
33// private static final Symbol<Boolean> classModel = Symbol.of("ClassModel", 1);
34 private static final Symbol<Boolean> classElement = Symbol.of("ClassElement", 1); 43 private static final Symbol<Boolean> classElement = Symbol.of("ClassElement", 1);
35// private static final Symbol<Boolean> feature = Symbol.of("Feature", 1);
36 private static final Symbol<Boolean> attribute = Symbol.of("Attribute", 1); 44 private static final Symbol<Boolean> attribute = Symbol.of("Attribute", 1);
37 private static final Symbol<Boolean> method = Symbol.of("Method", 1); 45 private static final Symbol<Boolean> method = Symbol.of("Method", 1);
38
39// private static final Symbol<Boolean> isEncapsulatedBy = Symbol.of("IsEncapsulatedBy", 2);
40 private static final Symbol<Boolean> encapsulates = Symbol.of("Encapsulates", 2); 46 private static final Symbol<Boolean> encapsulates = Symbol.of("Encapsulates", 2);
41 private static final Symbol<Boolean> dataDependency = Symbol.of("DataDependency", 2); 47 private static final Symbol<Boolean> dataDependency = Symbol.of("DataDependency", 2);
42 private static final Symbol<Boolean> functionalDependency = Symbol.of("FunctionalDependency", 2); 48 private static final Symbol<Boolean> functionalDependency = Symbol.of("FunctionalDependency", 2);
43 49
44 private static final Symbol<Boolean> features = Symbol.of("Features", 2);
45 private static final Symbol<Boolean> classes = Symbol.of("Classes", 2);
46
47// private static final AnySymbolView classModelView = new KeyOnlyView<>(classModel);
48 private static final AnySymbolView classElementView = new KeyOnlyView<>(classElement); 50 private static final AnySymbolView classElementView = new KeyOnlyView<>(classElement);
49// private static final AnySymbolView featureView = new KeyOnlyView<>(feature);
50 private static final AnySymbolView attributeView = new KeyOnlyView<>(attribute); 51 private static final AnySymbolView attributeView = new KeyOnlyView<>(attribute);
51 private static final AnySymbolView methodView = new KeyOnlyView<>(method); 52 private static final AnySymbolView methodView = new KeyOnlyView<>(method);
52// private static final AnySymbolView isEncapsulatedByView = new KeyOnlyView<>(isEncapsulatedBy);
53 private static final AnySymbolView encapsulatesView = new KeyOnlyView<>(encapsulates); 53 private static final AnySymbolView encapsulatesView = new KeyOnlyView<>(encapsulates);
54 private static final AnySymbolView dataDependencyView = new KeyOnlyView<>(dataDependency);
55 private static final AnySymbolView functionalDependencyView = new KeyOnlyView<>(functionalDependency);
56 private static final AnySymbolView featuresView = new KeyOnlyView<>(features);
57 private static final AnySymbolView classesView = new KeyOnlyView<>(classes);
58 54
59 /*Example Transformation rules*/ 55 private static final RelationalQuery feature = Query.of("Feature", (builder, f) -> builder
60 private static final RelationalQuery feature = Query.of("Feature",
61 (builder, f) -> builder.clause(
62 attributeView.call(f))
63 .clause( 56 .clause(
64 methodView.call(f)) 57 attributeView.call(f)
65 ); 58 )
59 .clause(
60 methodView.call(f)
61 ));
66 62
67 private static final RelationalQuery assignFeaturePreconditionHelper = Query.of("AssignFeaturePreconditionHelper", 63 private static final RelationalQuery unEncapsulatedFeature = Query.of("unEncapsulatedFeature",
68 (builder, c, f) -> builder.clause( 64 (builder, f) -> builder.clause(
69 classElementView.call(c), 65 feature.call(f),
70// classesView.call(model, c), 66 not(encapsulatesView.call(Variable.of(), f))
71 encapsulatesView.call(c, f)
72 )); 67 ));
73 68
74 private static final RelationalQuery assignFeaturePrecondition = Query.of("AssignFeaturePrecondition", 69 private static final Rule assignFeatureRule = Rule.of("AssignFeature", (builder, f, c1) -> builder
75 (builder, f, c1) -> builder.clause((c2) -> List.of( 70 .clause(
76// classModelView.call(model),
77 feature.call(f), 71 feature.call(f),
78 classElementView.call(c1), 72 classElementView.call(c1),
79// featuresView.call(model, f), 73 not(encapsulatesView.call(Variable.of(), f))
80 not(assignFeaturePreconditionHelper.call(c2, f)), 74 )
81 not(encapsulatesView.call(c1, f)) 75 .action(
82 ))); 76 add(encapsulates, c1, f)
83 77 ));
84 private static final RelationalQuery deleteEmptyClassPrecondition = Query.of("DeleteEmptyClassPrecondition",
85 (builder, c) -> builder.clause((f) -> List.of(
86// classModelView.call(model),
87 classElementView.call(c),
88// featuresView.call(model, f),
89 not(encapsulatesView.call(c, f))
90 )));
91 78
92 private static final RelationalQuery createClassPreconditionHelper = Query.of("CreateClassPreconditionHelper", 79 private static final Rule deleteEmptyClassRule = Rule.of("DeleteEmptyClass", (builder, c) -> builder
93 (builder, f, c) -> builder.clause( 80 .clause(
94 classElementView.call(c), 81 classElementView.call(c),
95// classesView.call(model, c), 82 not(encapsulatesView.call(c, Variable.of()))
96 encapsulatesView.call(c, f) 83 )
84 .action(
85 remove(classElement, c),
86 delete(c, DanglingEdges.IGNORE)
97 )); 87 ));
98 88
99 private static final RelationalQuery createClassPrecondition = Query.of("CreateClassPrecondition", 89 private static final Rule createClassRule = Rule.of("CreateClass", (builder, f) -> builder
100 (builder, f) -> builder.clause((c) -> List.of( 90 .clause(
101// classModelView.call(model),
102 feature.call(f), 91 feature.call(f),
103 not(createClassPreconditionHelper.call(f, c)) 92 not(encapsulatesView.call(Variable.of(), f))
93 )
94 .action((newClass) -> List.of(
95 create(newClass),
96 add(classElement, newClass),
97 add(encapsulates, newClass, f)
104 ))); 98 )));
105 99
106 private static final RelationalQuery moveFeaturePrecondition = Query.of("MoveFeature", 100 private static final Rule moveFeatureRule = Rule.of("MoveFeature", (builder, c1, c2, f) -> builder
107 (builder, c1, c2, f) -> builder.clause( 101 .clause(
108// classModelView.call(model),
109 classElementView.call(c1), 102 classElementView.call(c1),
110 classElementView.call(c2), 103 classElementView.call(c2),
111 c1.notEquivalent(c2), 104 c1.notEquivalent(c2),
112 feature.call(f), 105 feature.call(f),
113// classesView.call(model, c1),
114// classesView.call(model, c2),
115// featuresView.call(model, f),
116 encapsulatesView.call(c1, f) 106 encapsulatesView.call(c1, f)
107 )
108 .action(
109 remove(encapsulates, c1, f),
110 add(encapsulates, c2, f)
117 )); 111 ));
118 112
119 private static final TransformationRule assignFeatureRule = new TransformationRule("AssignFeature",
120 assignFeaturePrecondition,
121 (model) -> {
122// var isEncapsulatedByInterpretation = model.getInterpretation(isEncapsulatedBy);
123 var encapsulatesInterpretation = model.getInterpretation(encapsulates);
124 return ((Tuple activation) -> {
125 var feature = activation.get(0);
126 var classElement = activation.get(1);
127
128// isEncapsulatedByInterpretation.put(Tuple.of(feature, classElement), true);
129 encapsulatesInterpretation.put(Tuple.of(classElement, feature), true);
130 });
131 });
132
133 private static final TransformationRule deleteEmptyClassRule = new TransformationRule("DeleteEmptyClass",
134 deleteEmptyClassPrecondition,
135 (model) -> {
136// var classesInterpretation = model.getInterpretation(classes);
137 var classElementInterpretation = model.getInterpretation(classElement);
138 return ((Tuple activation) -> {
139 // TODO: can we move dseAdapter outside?
140 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
141// var modelElement = activation.get(0);
142 var classElement = activation.get(0);
143
144// classesInterpretation.put(Tuple.of(modelElement, classElement), false);
145 classElementInterpretation.put(Tuple.of(classElement), false);
146 dseAdapter.deleteObject(Tuple.of(classElement));
147 });
148 });
149
150 private static final TransformationRule createClassRule = new TransformationRule("CreateClass",
151 createClassPrecondition,
152 (model) -> {
153 var classElementInterpretation = model.getInterpretation(classElement);
154// var classesInterpretation = model.getInterpretation(classes);
155 var encapsulatesInterpretation = model.getInterpretation(encapsulates);
156 return ((Tuple activation) -> {
157 // TODO: can we move dseAdapter outside?
158 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
159// var modelElement = activation.get(0);
160 var feature = activation.get(0);
161
162 var newClassElement = dseAdapter.createObject();
163 var newClassElementId = newClassElement.get(0);
164 classElementInterpretation.put(newClassElement, true);
165// classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
166 encapsulatesInterpretation.put(Tuple.of(newClassElementId, feature), true);
167 });
168 });
169
170 private static final TransformationRule moveFeatureRule = new TransformationRule("MoveFeature",
171 moveFeaturePrecondition,
172 (model) -> {
173 var encapsulatesInterpretation = model.getInterpretation(encapsulates);
174 return ((Tuple activation) -> {
175 var classElement1 = activation.get(0);
176 var classElement2 = activation.get(1);
177 var feature = activation.get(2);
178
179 encapsulatesInterpretation.put(Tuple.of(classElement1, feature), false);
180 encapsulatesInterpretation.put(Tuple.of(classElement2, feature), true);
181 });
182 });
183
184 @Test 113 @Test
185 @Disabled("This test is only for debugging purposes") 114 @Disabled("This test is only for debugging purposes")
186 void craTest() { 115 void craTest() {
187 var store = ModelStore.builder() 116 var store = ModelStore.builder()
188 .symbols(classElement, encapsulates, classes, features, attribute, method, dataDependency, 117 .symbols(classElement, encapsulates, attribute, method, dataDependency, functionalDependency, name)
189 functionalDependency, name) 118 .with(ViatraModelQueryAdapter.builder())
190 .with(ViatraModelQueryAdapter.builder()
191 .queries(feature, assignFeaturePreconditionHelper, assignFeaturePrecondition,
192 deleteEmptyClassPrecondition, createClassPreconditionHelper, createClassPrecondition,
193 moveFeaturePrecondition))
194 .with(ModelVisualizerAdapter.builder() 119 .with(ModelVisualizerAdapter.builder()
195 .withOutputpath("test_output") 120 .withOutputPath("test_output")
196 .withFormat(FileFormat.DOT) 121 .withFormat(FileFormat.DOT)
197 .withFormat(FileFormat.SVG) 122 .withFormat(FileFormat.SVG)
198 .saveStates() 123 .saveStates()
199 .saveDesignSpace() 124 .saveDesignSpace())
200 ) 125 .with(StateCoderAdapter.builder())
126 .with(ModificationAdapter.builder())
201 .with(DesignSpaceExplorationAdapter.builder() 127 .with(DesignSpaceExplorationAdapter.builder()
202 .transformations(assignFeatureRule, deleteEmptyClassRule, createClassRule, moveFeatureRule) 128 .transformations(assignFeatureRule, deleteEmptyClassRule, createClassRule, moveFeatureRule)
203 .objectives(new AlwaysSatisfiedRandomHardObjective()) 129 .objectives(Objectives.sum(
204// .strategy(new DepthFirstStrategy().withDepthLimit(3).continueIfHardObjectivesFulfilled() 130 new DummyRandomObjective(),
205 .strategy(new BestFirstStrategy().withDepthLimit(6).continueIfHardObjectivesFulfilled() 131 Objectives.count(unEncapsulatedFeature)
206// .goOnOnlyIfFitnessIsBetter()
207 )) 132 ))
133 .accept(Criteria.whenNoMatch(unEncapsulatedFeature))
134 .exclude(new DummyCriterion(false)))
208 .build(); 135 .build();
209 136
210 var model = store.createEmptyModel(); 137 var model = store.createEmptyModel();
211 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
212// dseAdapter.setRandom(1);
213 var queryEngine = model.getAdapter(ModelQueryAdapter.class); 138 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
214 139
215// var modelInterpretation = model.getInterpretation(classModel);
216 var nameInterpretation = model.getInterpretation(name); 140 var nameInterpretation = model.getInterpretation(name);
217 var methodInterpretation = model.getInterpretation(method); 141 var methodInterpretation = model.getInterpretation(method);
218 var attributeInterpretation = model.getInterpretation(attribute); 142 var attributeInterpretation = model.getInterpretation(attribute);
219 var dataDependencyInterpretation = model.getInterpretation(dataDependency); 143 var dataDependencyInterpretation = model.getInterpretation(dataDependency);
220 var functionalDependencyInterpretation = model.getInterpretation(functionalDependency); 144 var functionalDependencyInterpretation = model.getInterpretation(functionalDependency);
221 145
222// var modelElement = dseAdapter.createObject(); 146 var modificationAdapter = model.getAdapter(ModificationAdapter.class);
223 var method1 = dseAdapter.createObject(); 147
148 var method1 = modificationAdapter.createObject();
224 var method1Id = method1.get(0); 149 var method1Id = method1.get(0);
225 var method2 = dseAdapter.createObject(); 150 var method2 = modificationAdapter.createObject();
226 var method2Id = method2.get(0); 151 var method2Id = method2.get(0);
227 var method3 = dseAdapter.createObject(); 152 var method3 = modificationAdapter.createObject();
228 var method3Id = method3.get(0); 153 var method3Id = method3.get(0);
229 var method4 = dseAdapter.createObject(); 154 var method4 = modificationAdapter.createObject();
230 var method4Id = method4.get(0); 155 var method4Id = method4.get(0);
231 var attribute1 = dseAdapter.createObject(); 156 var attribute1 = modificationAdapter.createObject();
232 var attribute1Id = attribute1.get(0); 157 var attribute1Id = attribute1.get(0);
233 var attribute2 = dseAdapter.createObject(); 158 var attribute2 = modificationAdapter.createObject();
234 var attribute2Id = attribute2.get(0); 159 var attribute2Id = attribute2.get(0);
235 var attribute3 = dseAdapter.createObject(); 160 var attribute3 = modificationAdapter.createObject();
236 var attribute3Id = attribute3.get(0); 161 var attribute3Id = attribute3.get(0);
237 var attribute4 = dseAdapter.createObject(); 162 var attribute4 = modificationAdapter.createObject();
238 var attribute4Id = attribute4.get(0); 163 var attribute4Id = attribute4.get(0);
239 var attribute5 = dseAdapter.createObject(); 164 var attribute5 = modificationAdapter.createObject();
240 var attribute5Id = attribute5.get(0); 165 var attribute5Id = attribute5.get(0);
241 166
242 nameInterpretation.put(method1, "M1"); 167 nameInterpretation.put(method1, "M1");
@@ -249,9 +174,6 @@ class CRAExamplesTest {
249 nameInterpretation.put(attribute4, "A4"); 174 nameInterpretation.put(attribute4, "A4");
250 nameInterpretation.put(attribute5, "A5"); 175 nameInterpretation.put(attribute5, "A5");
251 176
252
253
254// modelInterpretation.put(modelElement, true);
255 methodInterpretation.put(method1, true); 177 methodInterpretation.put(method1, true);
256 methodInterpretation.put(method2, true); 178 methodInterpretation.put(method2, true);
257 methodInterpretation.put(method3, true); 179 methodInterpretation.put(method3, true);
@@ -277,10 +199,13 @@ class CRAExamplesTest {
277 functionalDependencyInterpretation.put(Tuple.of(method3Id, attribute4Id), true); 199 functionalDependencyInterpretation.put(Tuple.of(method3Id, attribute4Id), true);
278 functionalDependencyInterpretation.put(Tuple.of(method4Id, attribute2Id), true); 200 functionalDependencyInterpretation.put(Tuple.of(method4Id, attribute2Id), true);
279 201
202 var initialVersion = model.commit();
280 queryEngine.flushChanges(); 203 queryEngine.flushChanges();
281 204
282 var states = dseAdapter.explore(); 205 var bestFirst = new BestFirstStoreManager(store, 50);
283 System.out.println("states size: " + states.size()); 206 bestFirst.startExploration(initialVersion);
207 var resultStore = bestFirst.getSolutionStore();
208 System.out.println("states size: " + resultStore.getSolutions().size());
209 model.getAdapter(ModelVisualizerAdapter.class).visualize(bestFirst.getVisualizationStore());
284 } 210 }
285
286} 211}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/DebugTest.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/DebugTest.java
index c6da896c..b912eba3 100644
--- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/DebugTest.java
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/DebugTest.java
@@ -7,110 +7,79 @@ package tools.refinery.store.dse;
7 7
8import org.junit.jupiter.api.Disabled; 8import org.junit.jupiter.api.Disabled;
9import org.junit.jupiter.api.Test; 9import org.junit.jupiter.api.Test;
10import tools.refinery.store.dse.objectives.AlwaysSatisfiedRandomHardObjective; 10import tools.refinery.store.dse.modification.ModificationAdapter;
11import tools.refinery.store.dse.strategy.BestFirstStoreManager;
12import tools.refinery.store.dse.tests.DummyRandomCriterion;
13import tools.refinery.store.dse.tests.DummyRandomObjective;
14import tools.refinery.store.dse.transition.DesignSpaceExplorationAdapter;
15import tools.refinery.store.dse.transition.Rule;
11import tools.refinery.store.model.ModelStore; 16import tools.refinery.store.model.ModelStore;
12import tools.refinery.store.query.ModelQueryAdapter; 17import tools.refinery.store.query.ModelQueryAdapter;
13import tools.refinery.store.query.dnf.Query;
14import tools.refinery.store.dse.internal.TransformationRule;
15import tools.refinery.store.dse.strategy.BestFirstStrategy;
16import tools.refinery.store.dse.strategy.DepthFirstStrategy;
17import tools.refinery.store.query.viatra.ViatraModelQueryAdapter; 18import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
18import tools.refinery.store.query.view.AnySymbolView; 19import tools.refinery.store.query.view.AnySymbolView;
19import tools.refinery.store.query.view.KeyOnlyView; 20import tools.refinery.store.query.view.KeyOnlyView;
20import tools.refinery.store.representation.Symbol; 21import tools.refinery.store.representation.Symbol;
21import tools.refinery.store.tuple.Tuple; 22import tools.refinery.store.statecoding.StateCoderAdapter;
22import tools.refinery.visualization.ModelVisualizerAdapter; 23import tools.refinery.visualization.ModelVisualizerAdapter;
23import tools.refinery.visualization.internal.FileFormat; 24import tools.refinery.visualization.internal.FileFormat;
24 25
26import java.util.List;
27
28import static tools.refinery.store.dse.modification.actions.ModificationActionLiterals.create;
29import static tools.refinery.store.dse.transition.actions.ActionLiterals.add;
30
25class DebugTest { 31class DebugTest {
26 private static final Symbol<Boolean> classModel = Symbol.of("ClassModel", 1); 32 private static final Symbol<Boolean> classModel = Symbol.of("ClassModel", 1);
27 private static final Symbol<Boolean> classElement = Symbol.of("ClassElement", 1); 33 private static final Symbol<Boolean> classElement = Symbol.of("ClassElement", 1);
28 private static final Symbol<Boolean> feature = Symbol.of("Feature", 1); 34 private static final Symbol<Boolean> feature = Symbol.of("Feature", 1);
29
30 private static final Symbol<Boolean> isEncapsulatedBy = Symbol.of("IsEncapsulatedBy", 2);
31 private static final Symbol<Boolean> encapsulates = Symbol.of("Encapsulates", 2);
32
33 private static final Symbol<Boolean> features = Symbol.of("Features", 2); 35 private static final Symbol<Boolean> features = Symbol.of("Features", 2);
34 private static final Symbol<Boolean> classes = Symbol.of("Classes", 2); 36 private static final Symbol<Boolean> classes = Symbol.of("Classes", 2);
35 37
36 private static final AnySymbolView classModelView = new KeyOnlyView<>(classModel); 38 private static final AnySymbolView classModelView = new KeyOnlyView<>(classModel);
37 private static final AnySymbolView classElementView = new KeyOnlyView<>(classElement);
38 private static final AnySymbolView featureView = new KeyOnlyView<>(feature);
39 private static final AnySymbolView isEncapsulatedByView = new KeyOnlyView<>(isEncapsulatedBy);
40 private static final AnySymbolView encapsulatesView = new KeyOnlyView<>(encapsulates);
41 private static final AnySymbolView featuresView = new KeyOnlyView<>(features);
42 private static final AnySymbolView classesView = new KeyOnlyView<>(classes);
43
44 39
45 @Test 40 @Test
46 @Disabled("This test is only for debugging purposes") 41 @Disabled("This test is only for debugging purposes")
47 void BFSTest() { 42 void BFSTest() {
48 var createClassPrecondition = Query.of("CreateClassPrecondition", 43 var createClassRule = Rule.of("CreateClass", (builder, model) -> builder
49 (builder, model) -> builder.clause( 44 .clause(
50 classModelView.call(model) 45 classModelView.call(model)
51 )); 46 )
52 47 .action((newClassElement) -> List.of(
53 var createClassRule = new TransformationRule("CreateClass", 48 create(newClassElement),
54 createClassPrecondition, 49 add(classElement, newClassElement),
55 (model) -> { 50 add(classes, model, newClassElement)
56 var classesInterpretation = model.getInterpretation(classes); 51 )));
57 var classElementInterpretation = model.getInterpretation(classElement); 52
58 return ((Tuple activation) -> { 53 var createFeatureRule = Rule.of("CreateFeature", (builder, model) -> builder
59 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class); 54 .clause(
60 var modelElement = activation.get(0);
61
62 var newClassElement = dseAdapter.createObject();
63 var newClassElementId = newClassElement.get(0);
64
65 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
66 classElementInterpretation.put(Tuple.of(newClassElementId), true);
67 });
68 });
69
70 var createFeaturePrecondition = Query.of("CreateFeaturePrecondition",
71 (builder, model) -> builder.clause(
72 classModelView.call(model) 55 classModelView.call(model)
73 )); 56 )
74 57 .action((newFeature) -> List.of(
75 var createFeatureRule = new TransformationRule("CreateFeature", 58 create(newFeature),
76 createFeaturePrecondition, 59 add(feature, newFeature),
77 (model) -> { 60 add(features, model, newFeature)
78 var featuresInterpretation = model.getInterpretation(features); 61 )));
79 var featureInterpretation = model.getInterpretation(feature);
80 return ((Tuple activation) -> {
81 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
82 var modelElement = activation.get(0);
83
84 var newClassElement = dseAdapter.createObject();
85 var newClassElementId = newClassElement.get(0);
86
87 featuresInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
88 featureInterpretation.put(Tuple.of(newClassElementId), true);
89 });
90 });
91 62
92 var store = ModelStore.builder() 63 var store = ModelStore.builder()
93 .symbols(classModel, classElement, feature, isEncapsulatedBy, encapsulates, classes, features) 64 .symbols(classModel, classElement, feature, classes, features)
94 .with(ViatraModelQueryAdapter.builder() 65 .with(ViatraModelQueryAdapter.builder())
95 .queries(createClassPrecondition, createFeaturePrecondition))
96 .with(ModelVisualizerAdapter.builder() 66 .with(ModelVisualizerAdapter.builder()
97 .withOutputpath("test_output") 67 .withOutputPath("test_output")
98 .withFormat(FileFormat.DOT) 68 .withFormat(FileFormat.DOT)
99 .withFormat(FileFormat.SVG) 69 .withFormat(FileFormat.SVG)
100 .saveStates() 70 .saveStates()
101 .saveDesignSpace() 71 .saveDesignSpace())
102 ) 72 .with(StateCoderAdapter.builder())
73 .with(ModificationAdapter.builder())
103 .with(DesignSpaceExplorationAdapter.builder() 74 .with(DesignSpaceExplorationAdapter.builder()
104 .transformations(createClassRule, createFeatureRule) 75 .transformations(createClassRule, createFeatureRule)
105 .objectives(new AlwaysSatisfiedRandomHardObjective()) 76 .objectives(new DummyRandomObjective())
106 .strategy(new DepthFirstStrategy().withDepthLimit(4).continueIfHardObjectivesFulfilled() 77 .accept(new DummyRandomCriterion())
107// .strategy(new BestFirstStrategy().withDepthLimit(4).continueIfHardObjectivesFulfilled() 78 .exclude(new DummyRandomCriterion()))
108// .goOnOnlyIfFitnessIsBetter()
109 ))
110 .build(); 79 .build();
111 80
112 var model = store.createEmptyModel(); 81 var model = store.createEmptyModel();
113 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class); 82 var dseAdapter = model.getAdapter(ModificationAdapter.class);
114// dseAdapter.setRandom(1); 83// dseAdapter.setRandom(1);
115 var queryEngine = model.getAdapter(ModelQueryAdapter.class); 84 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
116 85
@@ -119,11 +88,12 @@ class DebugTest {
119 var modelElement = dseAdapter.createObject(); 88 var modelElement = dseAdapter.createObject();
120 modelElementInterpretation.put(modelElement, true); 89 modelElementInterpretation.put(modelElement, true);
121 classElementInterpretation.put(modelElement, true); 90 classElementInterpretation.put(modelElement, true);
91 var initialVersion = model.commit();
122 queryEngine.flushChanges(); 92 queryEngine.flushChanges();
123 93
124 94 var bestFirst = new BestFirstStoreManager(store, 50);
125 var states = dseAdapter.explore(); 95 bestFirst.startExploration(initialVersion);
126 System.out.println("states size: " + states.size()); 96 var resultStore = bestFirst.getSolutionStore();
127 97 System.out.println("states size: " + resultStore.getSolutions().size());
128 } 98 }
129} 99}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/DesignSpaceExplorationTest.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/DesignSpaceExplorationTest.java
deleted file mode 100644
index 91e33f4a..00000000
--- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/DesignSpaceExplorationTest.java
+++ /dev/null
@@ -1,607 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.dse.internal.TransformationRule;
13import tools.refinery.store.dse.strategy.BestFirstStrategy;
14import tools.refinery.store.dse.strategy.DepthFirstStrategy;
15import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
16import tools.refinery.store.query.view.AnySymbolView;
17import tools.refinery.store.query.view.KeyOnlyView;
18import tools.refinery.store.representation.Symbol;
19import tools.refinery.store.tuple.Tuple;
20
21import static org.junit.jupiter.api.Assertions.assertEquals;
22
23class DesignSpaceExplorationTest {
24// private static final Symbol<Boolean> namedElement = Symbol.of("NamedElement", 1);
25// private static final Symbol<Boolean> attribute = Symbol.of("Attribute", 1);
26// private static final Symbol<Boolean> method = Symbol.of("Method", 1);
27// private static final Symbol<Boolean> dataDependency = Symbol.of("DataDependency", 2);
28// private static final Symbol<Boolean> functionalDependency = Symbol.of("FunctionalDependency", 2);
29
30 private static final Symbol<Boolean> classModel = Symbol.of("ClassModel", 1);
31 private static final Symbol<Boolean> classElement = Symbol.of("ClassElement", 1);
32 private static final Symbol<Boolean> feature = Symbol.of("Feature", 1);
33
34 private static final Symbol<Boolean> isEncapsulatedBy = Symbol.of("IsEncapsulatedBy", 2);
35 private static final Symbol<Boolean> encapsulates = Symbol.of("Encapsulates", 2);
36
37 private static final Symbol<Boolean> features = Symbol.of("Features", 2);
38 private static final Symbol<Boolean> classes = Symbol.of("Classes", 2);
39
40 private static final AnySymbolView classModelView = new KeyOnlyView<>(classModel);
41 private static final AnySymbolView classElementView = new KeyOnlyView<>(classElement);
42 private static final AnySymbolView featureView = new KeyOnlyView<>(feature);
43 private static final AnySymbolView isEncapsulatedByView = new KeyOnlyView<>(isEncapsulatedBy);
44 private static final AnySymbolView encapsulatesView = new KeyOnlyView<>(encapsulates);
45 private static final AnySymbolView featuresView = new KeyOnlyView<>(features);
46 private static final AnySymbolView classesView = new KeyOnlyView<>(classes);
47
48 @Test
49 void createObjectTest() {
50 var store = ModelStore.builder()
51 .with(ViatraModelQueryAdapter.builder())
52 .with(DesignSpaceExplorationAdapter.builder()
53 .strategy(new DepthFirstStrategy().withDepthLimit(0)))
54 .build();
55
56 var model = store.createEmptyModel();
57 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
58
59 assertEquals(0, dseAdapter.getModelSize());
60
61 var newModel = dseAdapter.createObject();
62 var newModelId = newModel.get(0);
63 var newClass1 = dseAdapter.createObject();
64 var newClass1Id = newClass1.get(0);
65 var newClass2 = dseAdapter.createObject();
66 var newClass2Id = newClass2.get(0);
67 var newField = dseAdapter.createObject();
68 var newFieldId = newField.get(0);
69
70 assertEquals(0, newModelId);
71 assertEquals(1, newClass1Id);
72 assertEquals(2, newClass2Id);
73 assertEquals(3, newFieldId);
74 assertEquals(4, dseAdapter.getModelSize());
75 }
76
77 @Test
78 void deleteMiddleObjectTest() {
79 var store = ModelStore.builder()
80 .with(ViatraModelQueryAdapter.builder())
81 .with(DesignSpaceExplorationAdapter.builder()
82 .strategy(new DepthFirstStrategy()))
83 .build();
84
85 var model = store.createEmptyModel();
86 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
87
88 assertEquals(0, dseAdapter.getModelSize());
89
90 var newObject0 = dseAdapter.createObject();
91 var newObject0Id = newObject0.get(0);
92 var newObject1 = dseAdapter.createObject();
93 var newObject1Id = newObject1.get(0);
94 var newObject2 = dseAdapter.createObject();
95 var newObject2Id = newObject2.get(0);
96 var newObject3 = dseAdapter.createObject();
97 var newObject3Id = newObject3.get(0);
98
99 assertEquals(0, newObject0Id);
100 assertEquals(1, newObject1Id);
101 assertEquals(2, newObject2Id);
102 assertEquals(3, newObject3Id);
103 assertEquals(4, dseAdapter.getModelSize());
104
105 dseAdapter.deleteObject(newObject1);
106 assertEquals(4, dseAdapter.getModelSize());
107
108 var newObject4 = dseAdapter.createObject();
109 var newObject4Id = newObject4.get(0);
110 assertEquals(4, newObject4Id);
111 assertEquals(5, dseAdapter.getModelSize());
112
113 dseAdapter.deleteObject(newObject4);
114 assertEquals(5, dseAdapter.getModelSize());
115 }
116
117 @Test
118 void DFSTrivialTest() {
119 var store = ModelStore.builder()
120 .symbols(classModel)
121 .with(ViatraModelQueryAdapter.builder())
122 .with(DesignSpaceExplorationAdapter.builder()
123 .strategy(new DepthFirstStrategy().withDepthLimit(0)))
124 .build();
125
126 var model = store.createEmptyModel();
127 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
128
129 var states = dseAdapter.explore();
130 assertEquals(1, states.size());
131 }
132
133 @Test
134 void DFSOneRuleTest() {
135 var createClassPrecondition = Query.of("CreateClassPrecondition",
136 (builder, model) -> builder.clause(
137 classModelView.call(model)
138 ));
139
140 var createClassRule = new TransformationRule("CreateClass",
141 createClassPrecondition,
142 (model) -> {
143 var classesInterpretation = model.getInterpretation(classes);
144 var classElementInterpretation = model.getInterpretation(classElement);
145 return ((Tuple activation) -> {
146 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
147 var modelElement = activation.get(0);
148
149 var newClassElement = dseAdapter.createObject();
150 var newClassElementId = newClassElement.get(0);
151
152 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
153 classElementInterpretation.put(Tuple.of(newClassElementId), true);
154 });
155 });
156
157 var store = ModelStore.builder()
158 .symbols(classModel, classElement, classes)
159 .with(ViatraModelQueryAdapter.builder()
160 .queries(createClassPrecondition))
161 .with(DesignSpaceExplorationAdapter.builder()
162 .transformations(createClassRule)
163 .strategy(new DepthFirstStrategy().withDepthLimit(0)
164 ))
165 .build();
166
167 var model = store.createEmptyModel();
168 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
169 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
170
171 var modelElementInterpretation = model.getInterpretation(classModel);
172 modelElementInterpretation.put(dseAdapter.createObject(), true);
173 queryEngine.flushChanges();
174
175 var states = dseAdapter.explore();
176 assertEquals(1, states.size());
177 }
178
179 @Test
180 void DFSContinueTest() {
181 var createClassPrecondition = Query.of("CreateClassPrecondition",
182 (builder, model) -> builder.clause(
183 classModelView.call(model)
184 ));
185
186 var createClassRule = new TransformationRule("CreateClass",
187 createClassPrecondition,
188 (model) -> {
189 var classesInterpretation = model.getInterpretation(classes);
190 var classElementInterpretation = model.getInterpretation(classElement);
191 return ((Tuple activation) -> {
192 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
193 var modelElement = activation.get(0);
194
195 var newClassElement = dseAdapter.createObject();
196 var newClassElementId = newClassElement.get(0);
197
198 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
199 classElementInterpretation.put(Tuple.of(newClassElementId), true);
200 });
201 });
202
203 var store = ModelStore.builder()
204 .symbols(classModel, classElement, classes)
205 .with(ViatraModelQueryAdapter.builder()
206 .queries(createClassPrecondition))
207 .with(DesignSpaceExplorationAdapter.builder()
208 .transformations(createClassRule)
209 .strategy(new DepthFirstStrategy().withDepthLimit(4).continueIfHardObjectivesFulfilled()
210 ))
211 .build();
212
213 var model = store.createEmptyModel();
214 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
215 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
216
217 var modelElementInterpretation = model.getInterpretation(classModel);
218 modelElementInterpretation.put(dseAdapter.createObject(), true);
219 queryEngine.flushChanges();
220
221 var states = dseAdapter.explore();
222 assertEquals(5, states.size());
223 }
224
225 @Test
226 void DFSCompletenessTest() {
227 var createClassPrecondition = Query.of("CreateClassPrecondition",
228 (builder, model) -> builder.clause(
229 classModelView.call(model)
230 ));
231
232 var createClassRule = new TransformationRule("CreateClass",
233 createClassPrecondition,
234 (model) -> {
235 var classesInterpretation = model.getInterpretation(classes);
236 var classElementInterpretation = model.getInterpretation(classElement);
237 return ((Tuple activation) -> {
238 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
239 var modelElement = activation.get(0);
240
241 var newClassElement = dseAdapter.createObject();
242 var newClassElementId = newClassElement.get(0);
243
244 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
245 classElementInterpretation.put(Tuple.of(newClassElementId), true);
246 });
247 });
248
249 var createFeaturePrecondition = Query.of("CreateFeaturePrecondition",
250 (builder, model) -> builder.clause(
251 classModelView.call(model)
252 ));
253
254 var createFeatureRule = new TransformationRule("CreateFeature",
255 createFeaturePrecondition,
256 (model) -> {
257 var featuresInterpretation = model.getInterpretation(features);
258 var featureInterpretation = model.getInterpretation(feature);
259 return ((Tuple activation) -> {
260 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
261 var modelElement = activation.get(0);
262
263 var newClassElement = dseAdapter.createObject();
264 var newClassElementId = newClassElement.get(0);
265
266 featuresInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
267 featureInterpretation.put(Tuple.of(newClassElementId), true);
268 });
269 });
270
271 var store = ModelStore.builder()
272 .symbols(classModel, classElement, classes, feature, features, isEncapsulatedBy, encapsulates)
273 .with(ViatraModelQueryAdapter.builder()
274 .queries(createClassPrecondition, createFeaturePrecondition))
275 .with(DesignSpaceExplorationAdapter.builder()
276 .transformations(createClassRule, createFeatureRule)
277 .strategy(new DepthFirstStrategy().withDepthLimit(10).continueIfHardObjectivesFulfilled()
278 ))
279 .build();
280
281 var model = store.createEmptyModel();
282 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
283 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
284
285 var modelElementInterpretation = model.getInterpretation(classModel);
286 modelElementInterpretation.put(dseAdapter.createObject(), true);
287 queryEngine.flushChanges();
288
289 var states = dseAdapter.explore();
290 assertEquals(2047, states.size());
291 }
292
293 @Test
294 void DFSSolutionLimitTest() {
295 var createClassPrecondition = Query.of("CreateClassPrecondition",
296 (builder, model) -> builder.clause(
297 classModelView.call(model)
298 ));
299
300 var createClassRule = new TransformationRule("CreateClass",
301 createClassPrecondition,
302 (model) -> {
303 var classesInterpretation = model.getInterpretation(classes);
304 var classElementInterpretation = model.getInterpretation(classElement);
305 return ((Tuple activation) -> {
306 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
307 var modelElement = activation.get(0);
308
309 var newClassElement = dseAdapter.createObject();
310 var newClassElementId = newClassElement.get(0);
311
312 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
313 classElementInterpretation.put(Tuple.of(newClassElementId), true);
314 });
315 });
316
317 var createFeaturePrecondition = Query.of("CreateFeaturePrecondition",
318 (builder, model) -> builder.clause(
319 classModelView.call(model)
320 ));
321
322 var createFeatureRule = new TransformationRule("CreateFeature",
323 createFeaturePrecondition,
324 (model) -> {
325 var featuresInterpretation = model.getInterpretation(features);
326 var featureInterpretation = model.getInterpretation(feature);
327 return ((Tuple activation) -> {
328 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
329 var modelElement = activation.get(0);
330
331 var newClassElement = dseAdapter.createObject();
332 var newClassElementId = newClassElement.get(0);
333
334 featuresInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
335 featureInterpretation.put(Tuple.of(newClassElementId), true);
336 });
337 });
338
339 var store = ModelStore.builder()
340 .symbols(classModel, classElement, classes, feature, features, isEncapsulatedBy, encapsulates)
341 .with(ViatraModelQueryAdapter.builder()
342 .queries(createClassPrecondition, createFeaturePrecondition))
343 .with(DesignSpaceExplorationAdapter.builder()
344 .transformations(createClassRule, createFeatureRule)
345 .strategy(new DepthFirstStrategy().withSolutionLimit(222)
346 .continueIfHardObjectivesFulfilled()
347 ))
348 .build();
349
350 var model = store.createEmptyModel();
351 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
352 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
353
354 var modelElementInterpretation = model.getInterpretation(classModel);
355 modelElementInterpretation.put(dseAdapter.createObject(), true);
356 queryEngine.flushChanges();
357
358 var states = dseAdapter.explore();
359 assertEquals(222, states.size());
360 }
361
362 @Test
363 void BeFSTrivialTest() {
364 var store = ModelStore.builder()
365 .symbols(classModel)
366 .with(ViatraModelQueryAdapter.builder())
367 .with(DesignSpaceExplorationAdapter.builder()
368 .strategy(new BestFirstStrategy().withDepthLimit(0)))
369 .build();
370
371 var model = store.createEmptyModel();
372 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
373
374 var states = dseAdapter.explore();
375 assertEquals(1, states.size());
376 }
377
378 @Test
379 void BeFSOneRuleTest() {
380 var createClassPrecondition = Query.of("CreateClassPrecondition",
381 (builder, model) -> builder.clause(
382 classModelView.call(model)
383 ));
384
385 var createClassRule = new TransformationRule("CreateClass",
386 createClassPrecondition,
387 (model) -> {
388 var classesInterpretation = model.getInterpretation(classes);
389 var classElementInterpretation = model.getInterpretation(classElement);
390 return ((Tuple activation) -> {
391 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
392 var modelElement = activation.get(0);
393
394 var newClassElement = dseAdapter.createObject();
395 var newClassElementId = newClassElement.get(0);
396
397 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
398 classElementInterpretation.put(Tuple.of(newClassElementId), true);
399 });
400 });
401
402 var store = ModelStore.builder()
403 .symbols(classModel, classElement, classes)
404 .with(ViatraModelQueryAdapter.builder()
405 .queries(createClassPrecondition))
406 .with(DesignSpaceExplorationAdapter.builder()
407 .transformations(createClassRule)
408 .strategy(new BestFirstStrategy().withDepthLimit(4)
409 ))
410 .build();
411
412 var model = store.createEmptyModel();
413 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
414 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
415
416 var modelElementInterpretation = model.getInterpretation(classModel);
417 modelElementInterpretation.put(dseAdapter.createObject(), true);
418 queryEngine.flushChanges();
419
420 var states = dseAdapter.explore();
421 assertEquals(1, states.size());
422 }
423
424 @Test
425 void BeFSContinueTest() {
426 var createClassPrecondition = Query.of("CreateClassPrecondition",
427 (builder, model) -> builder.clause(
428 classModelView.call(model)
429 ));
430
431 var createClassRule = new TransformationRule("CreateClass",
432 createClassPrecondition,
433 (model) -> {
434 var classesInterpretation = model.getInterpretation(classes);
435 var classElementInterpretation = model.getInterpretation(classElement);
436 return ((Tuple activation) -> {
437 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
438 var modelElement = activation.get(0);
439
440 var newClassElement = dseAdapter.createObject();
441 var newClassElementId = newClassElement.get(0);
442
443 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
444 classElementInterpretation.put(Tuple.of(newClassElementId), true);
445 });
446 });
447
448 var store = ModelStore.builder()
449 .symbols(classModel, classElement, classes)
450 .with(ViatraModelQueryAdapter.builder()
451 .queries(createClassPrecondition))
452 .with(DesignSpaceExplorationAdapter.builder()
453 .transformations(createClassRule)
454 .strategy(new BestFirstStrategy().withDepthLimit(4).continueIfHardObjectivesFulfilled()
455 ))
456 .build();
457
458 var model = store.createEmptyModel();
459 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
460 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
461
462 var modelElementInterpretation = model.getInterpretation(classModel);
463 modelElementInterpretation.put(dseAdapter.createObject(), true);
464 queryEngine.flushChanges();
465
466 var states = dseAdapter.explore();
467 assertEquals(5, states.size());
468 }
469
470 @Test
471 void BeFSCompletenessTest() {
472 var createClassPrecondition = Query.of("CreateClassPrecondition",
473 (builder, model) -> builder.clause(
474 classModelView.call(model)
475 ));
476
477 var createClassRule = new TransformationRule("CreateClass",
478 createClassPrecondition,
479 (model) -> {
480 var classesInterpretation = model.getInterpretation(classes);
481 var classElementInterpretation = model.getInterpretation(classElement);
482 return ((Tuple activation) -> {
483 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
484 var modelElement = activation.get(0);
485
486 var newClassElement = dseAdapter.createObject();
487 var newClassElementId = newClassElement.get(0);
488
489 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
490 classElementInterpretation.put(Tuple.of(newClassElementId), true);
491 });
492 });
493
494 var createFeaturePrecondition = Query.of("CreateFeaturePrecondition",
495 (builder, model) -> builder.clause(
496 classModelView.call(model)
497 ));
498
499 var createFeatureRule = new TransformationRule("CreateFeature",
500 createFeaturePrecondition,
501 (model) -> {
502 var featuresInterpretation = model.getInterpretation(features);
503 var featureInterpretation = model.getInterpretation(feature);
504 return ((Tuple activation) -> {
505 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
506 var modelElement = activation.get(0);
507
508 var newClassElement = dseAdapter.createObject();
509 var newClassElementId = newClassElement.get(0);
510
511 featuresInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
512 featureInterpretation.put(Tuple.of(newClassElementId), true);
513 });
514 });
515
516 var store = ModelStore.builder()
517 .symbols(classModel, classElement, classes, feature, features, isEncapsulatedBy, encapsulates)
518 .with(ViatraModelQueryAdapter.builder()
519 .queries(createClassPrecondition, createFeaturePrecondition))
520 .with(DesignSpaceExplorationAdapter.builder()
521 .transformations(createClassRule, createFeatureRule)
522 .strategy(new BestFirstStrategy().withDepthLimit(10).continueIfHardObjectivesFulfilled()
523 ))
524 .build();
525
526 var model = store.createEmptyModel();
527 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
528 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
529
530 var modelElementInterpretation = model.getInterpretation(classModel);
531 modelElementInterpretation.put(dseAdapter.createObject(), true);
532 queryEngine.flushChanges();
533
534 var states = dseAdapter.explore();
535 assertEquals(2047, states.size());
536 }
537
538 @Test
539 void BeFSSolutionLimitTest() {
540 var createClassPrecondition = Query.of("CreateClassPrecondition",
541 (builder, model) -> builder.clause(
542 classModelView.call(model)
543 ));
544
545 var createClassRule = new TransformationRule("CreateClass",
546 createClassPrecondition,
547 (model) -> {
548 var classesInterpretation = model.getInterpretation(classes);
549 var classElementInterpretation = model.getInterpretation(classElement);
550 return ((Tuple activation) -> {
551 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
552 var modelElement = activation.get(0);
553
554 var newClassElement = dseAdapter.createObject();
555 var newClassElementId = newClassElement.get(0);
556
557 classesInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
558 classElementInterpretation.put(Tuple.of(newClassElementId), true);
559 });
560 });
561
562 var createFeaturePrecondition = Query.of("CreateFeaturePrecondition",
563 (builder, model) -> builder.clause(
564 classModelView.call(model)
565 ));
566
567 var createFeatureRule = new TransformationRule("CreateFeature",
568 createFeaturePrecondition,
569 (model) -> {
570 var featuresInterpretation = model.getInterpretation(features);
571 var featureInterpretation = model.getInterpretation(feature);
572 return ((Tuple activation) -> {
573 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
574 var modelElement = activation.get(0);
575
576 var newClassElement = dseAdapter.createObject();
577 var newClassElementId = newClassElement.get(0);
578
579 featuresInterpretation.put(Tuple.of(modelElement, newClassElementId), true);
580 featureInterpretation.put(Tuple.of(newClassElementId), true);
581 });
582 });
583
584 var store = ModelStore.builder()
585 .symbols(classModel, classElement, classes, feature, features, isEncapsulatedBy, encapsulates)
586 .with(ViatraModelQueryAdapter.builder()
587 .queries(createClassPrecondition, createFeaturePrecondition))
588 .with(DesignSpaceExplorationAdapter.builder()
589 .transformations(createClassRule, createFeatureRule)
590 .strategy(new BestFirstStrategy().withSolutionLimit(222)
591 .continueIfHardObjectivesFulfilled()
592 ))
593 .build();
594
595 var model = store.createEmptyModel();
596 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
597 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
598
599 var modelElementInterpretation = model.getInterpretation(classModel);
600 modelElementInterpretation.put(dseAdapter.createObject(), true);
601 queryEngine.flushChanges();
602
603 var states = dseAdapter.explore();
604 assertEquals(222, states.size());
605 }
606
607}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/TransformationRuleTest.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/TransformationRuleTest.java
deleted file mode 100644
index 5d24d712..00000000
--- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/TransformationRuleTest.java
+++ /dev/null
@@ -1,413 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.dse.strategy.DepthFirstStrategy;
10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.ModelQueryAdapter;
12import tools.refinery.store.query.dnf.Query;
13import tools.refinery.store.dse.internal.TransformationRule;
14import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
15import tools.refinery.store.query.view.AnySymbolView;
16import tools.refinery.store.query.view.KeyOnlyView;
17import tools.refinery.store.representation.Symbol;
18import tools.refinery.store.tuple.Tuple;
19
20import java.util.List;
21import java.util.Map;
22
23import static org.junit.jupiter.api.Assertions.assertEquals;
24import static tools.refinery.store.query.literal.Literals.not;
25import static tools.refinery.store.dse.tests.QueryAssertions.assertResults;
26
27class TransformationRuleTest {
28
29 private static final Symbol<Boolean> classModel = Symbol.of("ClassModel", 1);
30 private static final Symbol<Boolean> classElement = Symbol.of("ClassElement", 1);
31 private static final Symbol<Boolean> feature = Symbol.of("Feature", 1);
32
33 private static final Symbol<Boolean> isEncapsulatedBy = Symbol.of("IsEncapsulatedBy", 2);
34 private static final Symbol<Boolean> encapsulates = Symbol.of("Encapsulates", 2);
35
36 private static final Symbol<Boolean> features = Symbol.of("Features", 2);
37 private static final Symbol<Boolean> classes = Symbol.of("Classes", 2);
38
39 private static final AnySymbolView classModelView = new KeyOnlyView<>(classModel);
40 private static final AnySymbolView classElementView = new KeyOnlyView<>(classElement);
41 private static final AnySymbolView featureView = new KeyOnlyView<>(feature);
42 private static final AnySymbolView isEncapsulatedByView = new KeyOnlyView<>(isEncapsulatedBy);
43 private static final AnySymbolView encapsulatesView = new KeyOnlyView<>(encapsulates);
44 private static final AnySymbolView featuresView = new KeyOnlyView<>(features);
45 private static final AnySymbolView classesView = new KeyOnlyView<>(classes);
46
47 @Test
48 void activationsTest() {
49 var assignFeaturePreconditionHelper = Query.of("AssignFeaturePreconditionHelper",
50 (builder, model, c, f) -> builder.clause(
51 classElementView.call(c),
52 classesView.call(model, c),
53 encapsulatesView.call(c, f)
54 ));
55
56 var assignFeaturePrecondition = Query.of("AssignFeaturePrecondition", (builder, c2, f)
57 -> builder.clause((model, c1) -> List.of(
58 classModelView.call(model),
59 featureView.call(f),
60 classElementView.call(c2),
61 featuresView.call(model, f),
62 classesView.call(model, c1),
63 not(assignFeaturePreconditionHelper.call(model, c2, f)),
64 not(encapsulatesView.call(c2, f))
65 )));
66
67 var deleteEmptyClassPrecondition = Query.of("DeleteEmptyClassPrecondition",
68 (builder, model, c) -> builder.clause((f) -> List.of(
69 classModelView.call(model),
70 classElementView.call(c),
71 featuresView.call(model, f),
72 not(encapsulatesView.call(c, f))
73 )));
74
75 TransformationRule assignFeatureRule = new TransformationRule("AssignFeature",
76 assignFeaturePrecondition,
77 (model) -> {
78 var isEncapsulatedByInterpretation = model.getInterpretation(isEncapsulatedBy);
79 return ((Tuple activation) -> {
80 var feature = activation.get(0);
81 var classElement = activation.get(1);
82
83 isEncapsulatedByInterpretation.put(Tuple.of(feature, classElement), true);
84 });
85 });
86
87 TransformationRule deleteEmptyClassRule = new TransformationRule("DeleteEmptyClass",
88 deleteEmptyClassPrecondition,
89 (model) -> {
90 var classesInterpretation = model.getInterpretation(classes);
91 var classElementInterpretation = model.getInterpretation(classElement);
92 return ((Tuple activation) -> {
93 var modelElement = activation.get(0);
94 var classElement = activation.get(1);
95
96 classesInterpretation.put(Tuple.of(modelElement, classElement), false);
97 classElementInterpretation.put(Tuple.of(classElement), false);
98 });
99 });
100
101
102 var store = ModelStore.builder()
103 .symbols(classModel, classElement, feature, isEncapsulatedBy, encapsulates, classes, features)
104 .with(ViatraModelQueryAdapter.builder()
105 .queries(assignFeaturePrecondition, assignFeaturePreconditionHelper,
106 deleteEmptyClassPrecondition))
107 .with(DesignSpaceExplorationAdapter.builder()
108 .strategy(new DepthFirstStrategy().withDepthLimit(0)))
109 .build();
110
111 var model = store.createEmptyModel();
112 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
113 assignFeatureRule.prepare(model, queryEngine);
114 deleteEmptyClassRule.prepare(model, queryEngine);
115
116 var classModelInterpretation = model.getInterpretation(classModel);
117 var classElementInterpretation = model.getInterpretation(classElement);
118 var featureInterpretation = model.getInterpretation(feature);
119 var featuresInterpretation = model.getInterpretation(features);
120 var classesInterpretation = model.getInterpretation(classes);
121
122 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
123 var newModel = dseAdapter.createObject();
124 var newModelId = newModel.get(0);
125 var newClass1 = dseAdapter.createObject();
126 var newClass1Id = newClass1.get(0);
127 var newClass2 = dseAdapter.createObject();
128 var newClass2Id = newClass2.get(0);
129 var newField = dseAdapter.createObject();
130 var newFieldId = newField.get(0);
131
132 classModelInterpretation.put(newModel, true);
133 classElementInterpretation.put(newClass1, true);
134 classElementInterpretation.put(newClass2, true);
135 featureInterpretation.put(newField, true);
136 classesInterpretation.put(Tuple.of(newModelId, newClass1Id), true);
137 classesInterpretation.put(Tuple.of(newModelId, newClass2Id), true);
138 featuresInterpretation.put(Tuple.of(newModelId, newFieldId), true);
139
140 queryEngine.flushChanges();
141
142 var assignFeatureRuleActivations = assignFeatureRule.getAllActivationsAsResultSet();
143 var deleteEmptyClassRuleActivations = deleteEmptyClassRule.getAllActivationsAsResultSet();
144
145 assertResults(Map.of(
146 Tuple.of(newClass1Id, newFieldId), true,
147 Tuple.of(newClass2Id, newFieldId), true
148 ), assignFeatureRuleActivations);
149
150 assertResults(Map.of(
151 Tuple.of(newModelId, newClass1Id), true,
152 Tuple.of(newModelId, newClass2Id), true
153 ), deleteEmptyClassRuleActivations);
154 }
155
156 @Test
157 void randomActivationTest() {
158 var deleteEmptyClassPrecondition = Query.of("DeleteEmptyClassPrecondition",
159 (builder, model, c) -> builder.clause((f) -> List.of(
160 classModelView.call(model),
161 classElementView.call(c),
162 featuresView.call(model, f),
163 not(encapsulatesView.call(c, f))
164 )));
165
166 TransformationRule deleteEmptyClassRule0 = new TransformationRule("DeleteEmptyClass0",
167 deleteEmptyClassPrecondition,
168 (model) -> {
169 var classesInterpretation = model.getInterpretation(classes);
170 var classElementInterpretation = model.getInterpretation(classElement);
171 return ((Tuple activation) -> {
172 var modelElement = activation.get(0);
173 var classElement = activation.get(1);
174
175 classesInterpretation.put(Tuple.of(modelElement, classElement), false);
176 classElementInterpretation.put(Tuple.of(classElement), false);
177 });
178 },
179 0L);
180
181 TransformationRule deleteEmptyClassRule1 = new TransformationRule("DeleteEmptyClass1",
182 deleteEmptyClassPrecondition,
183 (model) -> {
184 var classesInterpretation = model.getInterpretation(classes);
185 var classElementInterpretation = model.getInterpretation(classElement);
186 return ((Tuple activation) -> {
187 var modelElement = activation.get(0);
188 var classElement = activation.get(1);
189
190 classesInterpretation.put(Tuple.of(modelElement, classElement), false);
191 classElementInterpretation.put(Tuple.of(classElement), false);
192 });
193 },
194 78634L);
195
196 var store = ModelStore.builder()
197 .symbols(classModel, classElement, feature, isEncapsulatedBy, encapsulates, classes, features)
198 .with(ViatraModelQueryAdapter.builder()
199 .queries(deleteEmptyClassPrecondition))
200 .with(DesignSpaceExplorationAdapter.builder()
201 .strategy(new DepthFirstStrategy().withDepthLimit(0)))
202 .build();
203
204 var model = store.createEmptyModel();
205 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
206 deleteEmptyClassRule0.prepare(model, queryEngine);
207 deleteEmptyClassRule1.prepare(model, queryEngine);
208
209 var classModelInterpretation = model.getInterpretation(classModel);
210 var classElementInterpretation = model.getInterpretation(classElement);
211 var featureInterpretation = model.getInterpretation(feature);
212 var featuresInterpretation = model.getInterpretation(features);
213 var classesInterpretation = model.getInterpretation(classes);
214
215 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
216 var newModel = dseAdapter.createObject();
217 var newModelId = newModel.get(0);
218 var newClass1 = dseAdapter.createObject();
219 var newClass1Id = newClass1.get(0);
220 var newClass2 = dseAdapter.createObject();
221 var newClass2Id = newClass2.get(0);
222 var newField = dseAdapter.createObject();
223 var newFieldId = newField.get(0);
224
225 classModelInterpretation.put(newModel, true);
226 classElementInterpretation.put(newClass1, true);
227 classElementInterpretation.put(newClass2, true);
228 featureInterpretation.put(newField, true);
229 classesInterpretation.put(Tuple.of(newModelId, newClass1Id), true);
230 classesInterpretation.put(Tuple.of(newModelId, newClass2Id), true);
231 featuresInterpretation.put(Tuple.of(newModelId, newFieldId), true);
232
233 queryEngine.flushChanges();
234
235
236 var activation0 = deleteEmptyClassRule0.getRandomActivation().activation();
237 var activation1 = deleteEmptyClassRule1.getRandomActivation().activation();
238
239 assertResults(Map.of(
240 Tuple.of(newModelId, newClass1Id), true,
241 Tuple.of(newModelId, newClass2Id), true
242 ), deleteEmptyClassRule0.getAllActivationsAsResultSet());
243
244 assertResults(Map.of(
245 Tuple.of(newModelId, newClass1Id), true,
246 Tuple.of(newModelId, newClass2Id), true
247 ), deleteEmptyClassRule1.getAllActivationsAsResultSet());
248
249 assertEquals(Tuple.of(newModelId, newClass2Id), activation0);
250 assertEquals(Tuple.of(newModelId, newClass1Id), activation1);
251
252 }
253
254 @Test
255 void fireTest() {
256 var deleteEmptyClassPrecondition = Query.of("DeleteEmptyClassPrecondition",
257 (builder, model, c) -> builder.clause((f) -> List.of(
258 classModelView.call(model),
259 classElementView.call(c),
260 featuresView.call(model, f),
261 not(encapsulatesView.call(c, f))
262 )));
263
264 TransformationRule deleteEmptyClassRule = new TransformationRule("DeleteEmptyClass",
265 deleteEmptyClassPrecondition,
266 (model) -> {
267 var classesInterpretation = model.getInterpretation(classes);
268 var classElementInterpretation = model.getInterpretation(classElement);
269 return ((Tuple activation) -> {
270 var modelElement = activation.get(0);
271 var classElement = activation.get(1);
272
273 classesInterpretation.put(Tuple.of(modelElement, classElement), false);
274 classElementInterpretation.put(Tuple.of(classElement), false);
275 });
276 });
277
278 var store = ModelStore.builder()
279 .symbols(classModel, classElement, feature, isEncapsulatedBy, encapsulates, classes, features)
280 .with(ViatraModelQueryAdapter.builder()
281 .queries(deleteEmptyClassPrecondition))
282 .with(DesignSpaceExplorationAdapter.builder()
283 .strategy(new DepthFirstStrategy().withDepthLimit(0)))
284 .build();
285
286 var model = store.createEmptyModel();
287 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
288 deleteEmptyClassRule.prepare(model, queryEngine);
289
290 var classModelInterpretation = model.getInterpretation(classModel);
291 var classElementInterpretation = model.getInterpretation(classElement);
292 var featureInterpretation = model.getInterpretation(feature);
293 var featuresInterpretation = model.getInterpretation(features);
294 var classesInterpretation = model.getInterpretation(classes);
295
296 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
297 var newModel = dseAdapter.createObject();
298 var newModelId = newModel.get(0);
299 var newClass1 = dseAdapter.createObject();
300 var newClass1Id = newClass1.get(0);
301 var newClass2 = dseAdapter.createObject();
302 var newClass2Id = newClass2.get(0);
303 var newField = dseAdapter.createObject();
304 var newFieldId = newField.get(0);
305
306 classModelInterpretation.put(newModel, true);
307 classElementInterpretation.put(newClass1, true);
308 classElementInterpretation.put(newClass2, true);
309 featureInterpretation.put(newField, true);
310 classesInterpretation.put(Tuple.of(newModelId, newClass1Id), true);
311 classesInterpretation.put(Tuple.of(newModelId, newClass2Id), true);
312 featuresInterpretation.put(Tuple.of(newModelId, newFieldId), true);
313
314 queryEngine.flushChanges();
315
316 assertResults(Map.of(
317 Tuple.of(newModelId, newClass1Id), true,
318 Tuple.of(newModelId, newClass2Id), true
319 ), deleteEmptyClassRule.getAllActivationsAsResultSet());
320
321
322 deleteEmptyClassRule.fireActivation(Tuple.of(0, 1));
323
324 assertResults(Map.of(
325 Tuple.of(newModelId, newClass1Id), false,
326 Tuple.of(newModelId, newClass2Id), true
327 ), deleteEmptyClassRule.getAllActivationsAsResultSet());
328 }
329
330 @Test
331 void randomFireTest() {
332 var deleteEmptyClassPrecondition = Query.of("DeleteEmptyClassPrecondition",
333 (builder, model, c) -> builder.clause((f) -> List.of(
334 classModelView.call(model),
335 classElementView.call(c),
336 featuresView.call(model, f),
337 not(encapsulatesView.call(c, f))
338 )));
339
340 TransformationRule deleteEmptyClassRule = new TransformationRule("DeleteEmptyClass0",
341 deleteEmptyClassPrecondition,
342 (model) -> {
343 var classesInterpretation = model.getInterpretation(classes);
344 var classElementInterpretation = model.getInterpretation(classElement);
345 return ((Tuple activation) -> {
346 var modelElement = activation.get(0);
347 var classElement = activation.get(1);
348
349 classesInterpretation.put(Tuple.of(modelElement, classElement), false);
350 classElementInterpretation.put(Tuple.of(classElement), false);
351 });
352 },
353 0L);
354
355 var store = ModelStore.builder()
356 .symbols(classModel, classElement, feature, isEncapsulatedBy, encapsulates, classes, features)
357 .with(ViatraModelQueryAdapter.builder()
358 .queries(deleteEmptyClassPrecondition))
359 .with(DesignSpaceExplorationAdapter.builder()
360 .strategy(new DepthFirstStrategy().withDepthLimit(0)))
361 .build();
362
363 var model = store.createEmptyModel();
364 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
365 deleteEmptyClassRule.prepare(model, queryEngine);
366
367 var classModelInterpretation = model.getInterpretation(classModel);
368 var classElementInterpretation = model.getInterpretation(classElement);
369 var featureInterpretation = model.getInterpretation(feature);
370 var featuresInterpretation = model.getInterpretation(features);
371 var classesInterpretation = model.getInterpretation(classes);
372
373 var dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class);
374 var newModel = dseAdapter.createObject();
375 var newModelId = newModel.get(0);
376 var newClass1 = dseAdapter.createObject();
377 var newClass1Id = newClass1.get(0);
378 var newClass2 = dseAdapter.createObject();
379 var newClass2Id = newClass2.get(0);
380 var newField = dseAdapter.createObject();
381 var newFieldId = newField.get(0);
382
383 classModelInterpretation.put(newModel, true);
384 classElementInterpretation.put(newClass1, true);
385 classElementInterpretation.put(newClass2, true);
386 featureInterpretation.put(newField, true);
387 classesInterpretation.put(Tuple.of(newModelId, newClass1Id), true);
388 classesInterpretation.put(Tuple.of(newModelId, newClass2Id), true);
389 featuresInterpretation.put(Tuple.of(newModelId, newFieldId), true);
390
391 queryEngine.flushChanges();
392
393 assertResults(Map.of(
394 Tuple.of(newModelId, newClass1Id), true,
395 Tuple.of(newModelId, newClass2Id), true
396 ), deleteEmptyClassRule.getAllActivationsAsResultSet());
397
398 deleteEmptyClassRule.fireRandomActivation();
399
400 assertResults(Map.of(
401 Tuple.of(newModelId, newClass1Id), true,
402 Tuple.of(newModelId, newClass2Id), false
403 ), deleteEmptyClassRule.getAllActivationsAsResultSet());
404
405 deleteEmptyClassRule.fireRandomActivation();
406
407 assertResults(Map.of(
408 Tuple.of(newModelId, newClass1Id), false,
409 Tuple.of(newModelId, newClass2Id), false
410 ), deleteEmptyClassRule.getAllActivationsAsResultSet());
411
412 }
413}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyCriterion.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyCriterion.java
new file mode 100644
index 00000000..2d5a0f36
--- /dev/null
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyCriterion.java
@@ -0,0 +1,22 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.tests;
7
8import tools.refinery.store.dse.transition.objectives.Criterion;
9import tools.refinery.store.dse.transition.objectives.CriterionCalculator;
10import tools.refinery.store.model.Model;
11
12public class DummyCriterion implements Criterion {
13 protected final boolean returnValue;
14 public DummyCriterion(boolean returnValue) {
15 this.returnValue = returnValue;
16 }
17
18 @Override
19 public CriterionCalculator createCalculator(Model model) {
20 return () -> returnValue;
21 }
22}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyObjective.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyObjective.java
new file mode 100644
index 00000000..f5d281aa
--- /dev/null
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyObjective.java
@@ -0,0 +1,18 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.tests;
7
8import tools.refinery.store.dse.transition.objectives.Objective;
9import tools.refinery.store.dse.transition.objectives.ObjectiveCalculator;
10import tools.refinery.store.model.Model;
11
12public class DummyObjective implements Objective {
13
14 @Override
15 public ObjectiveCalculator createCalculator(Model model) {
16 return () -> {return 0d;};
17 }
18}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomCriterion.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomCriterion.java
new file mode 100644
index 00000000..71fd4403
--- /dev/null
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomCriterion.java
@@ -0,0 +1,25 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.tests;
7
8import tools.refinery.store.dse.transition.objectives.Criterion;
9import tools.refinery.store.dse.transition.objectives.CriterionCalculator;
10import tools.refinery.store.model.Model;
11
12import java.util.Random;
13
14public class DummyRandomCriterion implements Criterion {
15
16 @SuppressWarnings("squid:S2245")
17 private static final Random random = new Random(9856654);
18 public DummyRandomCriterion() {
19 }
20
21 @Override
22 public CriterionCalculator createCalculator(Model model) {
23 return random::nextBoolean;
24 }
25}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomObjective.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomObjective.java
new file mode 100644
index 00000000..219e74c6
--- /dev/null
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/DummyRandomObjective.java
@@ -0,0 +1,23 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.tests;
7
8import tools.refinery.store.dse.transition.objectives.Objective;
9import tools.refinery.store.dse.transition.objectives.ObjectiveCalculator;
10import tools.refinery.store.model.Model;
11
12import java.util.Random;
13
14public class DummyRandomObjective implements Objective {
15
16 @SuppressWarnings("squid:S2245")
17 private static final Random random = new Random(9856654);
18
19 @Override
20 public ObjectiveCalculator createCalculator(Model model) {
21 return random::nextDouble;
22 }
23}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/QueryAssertions.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/QueryAssertions.java
index be514eaf..f0a20720 100644
--- a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/QueryAssertions.java
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/tests/QueryAssertions.java
@@ -30,7 +30,7 @@ public final class QueryAssertions {
30 } 30 }
31 31
32 public static <T> void assertResults(Map<Tuple, T> expected, ResultSet<T> resultSet) { 32 public static <T> void assertResults(Map<Tuple, T> expected, ResultSet<T> resultSet) {
33 var defaultValue = resultSet.getQuery().defaultValue(); 33 var defaultValue = resultSet.getCanonicalQuery().defaultValue();
34 var filteredExpected = new LinkedHashMap<Tuple, T>(); 34 var filteredExpected = new LinkedHashMap<Tuple, T>();
35 var executables = new ArrayList<Executable>(); 35 var executables = new ArrayList<Executable>();
36 for (var entry : expected.entrySet()) { 36 for (var entry : expected.entrySet()) {
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java
new file mode 100644
index 00000000..42a0f89b
--- /dev/null
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/TransitionTests.java
@@ -0,0 +1,149 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.dse.modification.ModificationAdapter;
10import tools.refinery.store.dse.transition.objectives.Criteria;
11import tools.refinery.store.dse.transition.objectives.Objectives;
12import tools.refinery.store.model.Model;
13import tools.refinery.store.model.ModelStore;
14import tools.refinery.store.query.ModelQueryAdapter;
15import tools.refinery.store.query.dnf.FunctionalQuery;
16import tools.refinery.store.query.dnf.Query;
17import tools.refinery.store.query.dnf.RelationalQuery;
18import tools.refinery.store.query.term.Variable;
19import tools.refinery.store.query.term.int_.IntTerms;
20import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
21import tools.refinery.store.query.view.AnySymbolView;
22import tools.refinery.store.query.view.KeyOnlyView;
23import tools.refinery.store.representation.Symbol;
24import tools.refinery.store.statecoding.StateCoderAdapter;
25import tools.refinery.store.tuple.Tuple;
26
27import java.util.List;
28
29import static org.junit.jupiter.api.Assertions.*;
30import static tools.refinery.store.query.literal.Literals.check;
31import static tools.refinery.store.query.literal.Literals.not;
32
33class TransitionBuildTests {
34 Symbol<Boolean> person = new Symbol<>("Person", 1, Boolean.class, false);
35 Symbol<Boolean> friend = new Symbol<>("friend", 2, Boolean.class, false);
36
37 AnySymbolView personView = new KeyOnlyView<>(person);
38 AnySymbolView friendView = new KeyOnlyView<>(friend);
39
40 RelationalQuery moreThan3Friends = Query.of("moreThan3Friends", (builder, tooMuchFriends) -> builder
41 .clause(Integer.class, (numberOfFriends) -> List.of(
42 numberOfFriends.assign(friendView.count(tooMuchFriends, Variable.of())),
43 check(IntTerms.less(IntTerms.constant(3), numberOfFriends)),
44 personView.call(tooMuchFriends)
45 )));
46
47 RelationalQuery somebodyHasNoFriend = Query.of("somebodyHasNoFriend", (builder, lonely) -> builder
48 .clause(
49 personView.call(lonely),
50 not(friendView.call(lonely, Variable.of()))
51 ));
52
53 FunctionalQuery<Integer> numberOfFriends = Query.of(Integer.class, (builder, output) -> builder
54 .clause(
55 output.assign(friendView.count(Variable.of(), Variable.of()))
56 ));
57
58 @Test
59 void acceptTest() {
60 Model model = getModel();
61
62 var dse = model.getAdapter(DesignSpaceExplorationAdapter.class);
63 var query = model.getAdapter(ModelQueryAdapter.class);
64 var personI = model.getInterpretation(person);
65 var friendI = model.getInterpretation(friend);
66
67 assertTrue(dse.checkAccept());
68 personI.put(Tuple.of(1), true);
69 personI.put(Tuple.of(2), true);
70
71 query.flushChanges();
72
73 assertFalse(dse.checkAccept());
74 friendI.put(Tuple.of(1, 2), true);
75 friendI.put(Tuple.of(2, 1), true);
76
77 query.flushChanges();
78
79 assertTrue(dse.checkAccept());
80 }
81
82 @Test
83 void includeTest() {
84 Model model = getModel();
85
86 var dse = model.getAdapter(DesignSpaceExplorationAdapter.class);
87 var query = model.getAdapter(ModelQueryAdapter.class);
88 var personI = model.getInterpretation(person);
89 var friendI = model.getInterpretation(friend);
90
91 assertFalse(dse.checkExclude());
92
93 personI.put(Tuple.of(1), true);
94 friendI.put(Tuple.of(1, 2), true);
95 friendI.put(Tuple.of(1, 3), true);
96 friendI.put(Tuple.of(1, 4), true);
97
98 query.flushChanges();
99 assertFalse(dse.checkExclude());
100
101 personI.put(Tuple.of(5), true);
102 friendI.put(Tuple.of(1, 5), true);
103
104 query.flushChanges();
105 assertTrue(dse.checkExclude());
106
107 friendI.put(Tuple.of(1, 2), false);
108
109 query.flushChanges();
110 assertFalse(dse.checkExclude());
111 }
112
113 @Test
114 void objectiveTest() {
115 Model model = getModel();
116
117 var dse = model.getAdapter(DesignSpaceExplorationAdapter.class);
118 var query = model.getAdapter(ModelQueryAdapter.class);
119 var friendI = model.getInterpretation(friend);
120
121 assertEquals(0.0, dse.getObjectiveValue().get(0), 0.01);
122
123 friendI.put(Tuple.of(1, 2), true);
124
125 query.flushChanges();
126 assertEquals(1.0, dse.getObjectiveValue().get(0), 0.01);
127
128 friendI.put(Tuple.of(1, 3), true);
129 friendI.put(Tuple.of(1, 4), true);
130
131 query.flushChanges();
132 assertEquals(3.0, dse.getObjectiveValue().get(0), 0.01);
133 }
134
135 private Model getModel() {
136 var store = ModelStore.builder()
137 .symbols(person, friend)
138 .with(ViatraModelQueryAdapter.builder())
139 .with(StateCoderAdapter.builder())
140 .with(ModificationAdapter.builder())
141 .with(DesignSpaceExplorationAdapter.builder()
142 .objective(Objectives.value(numberOfFriends))
143 .exclude(Criteria.whenHasMatch(moreThan3Friends))
144 .accept(Criteria.whenNoMatch(somebodyHasNoFriend)))
145 .build();
146
147 return store.createEmptyModel();
148 }
149}
diff --git a/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/statespace/internal/ActivationUnitTest.java b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/statespace/internal/ActivationUnitTest.java
new file mode 100644
index 00000000..3a672b18
--- /dev/null
+++ b/subprojects/store-dse/src/test/java/tools/refinery/store/dse/transition/statespace/internal/ActivationUnitTest.java
@@ -0,0 +1,131 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.dse.transition.statespace.internal;
7
8import org.junit.jupiter.api.Assertions;
9import org.junit.jupiter.params.ParameterizedTest;
10import org.junit.jupiter.params.provider.MethodSource;
11
12import java.util.ArrayList;
13import java.util.Collections;
14import java.util.List;
15import java.util.Random;
16import java.util.function.Supplier;
17import java.util.stream.Stream;
18
19class ActivationUnitTest {
20 private final static int SMALL_SIZE = 5;
21
22 private static Stream<ActivationStoreEntry> entries() {
23 return Stream.of(
24 new ActivationStoreBitVectorEntry(SMALL_SIZE),
25 new ActivationStoreListEntry(SMALL_SIZE)
26 );
27 }
28
29 void addTest(ActivationStoreEntry entry, int elementsAdded) {
30 Assertions.assertEquals(elementsAdded, entry.getNumberOfVisitedActivations());
31 Assertions.assertEquals(SMALL_SIZE - elementsAdded, entry.getNumberOfUnvisitedActivations());
32 }
33
34 @ParameterizedTest
35 @MethodSource("entries")
36 void testDifferent(ActivationStoreEntry entry) {
37 int elementsAdded = 0;
38 addTest(entry, elementsAdded);
39 Assertions.assertEquals(2, entry.getAndAddActivationAfter(2));
40 addTest(entry, ++elementsAdded);
41 Assertions.assertEquals(3, entry.getAndAddActivationAfter(3));
42 addTest(entry, ++elementsAdded);
43 Assertions.assertEquals(1, entry.getAndAddActivationAfter(1));
44 addTest(entry, ++elementsAdded);
45 Assertions.assertEquals(4, entry.getAndAddActivationAfter(4));
46 addTest(entry, ++elementsAdded);
47 Assertions.assertEquals(0, entry.getAndAddActivationAfter(0));
48 addTest(entry, ++elementsAdded);
49 }
50
51
52 @ParameterizedTest
53 @MethodSource("entries")
54 void testSame(ActivationStoreEntry entry) {
55 int elementsAdded = 0;
56 addTest(entry, 0);
57 entry.getAndAddActivationAfter(2);
58 addTest(entry, ++elementsAdded);
59 entry.getAndAddActivationAfter(2);
60 addTest(entry, ++elementsAdded);
61 entry.getAndAddActivationAfter(2);
62 addTest(entry, ++elementsAdded);
63 entry.getAndAddActivationAfter(2);
64 addTest(entry, ++elementsAdded);
65 entry.getAndAddActivationAfter(2);
66 addTest(entry, ++elementsAdded);
67 }
68
69 @ParameterizedTest
70 @MethodSource("entries")
71 void testFilling(ActivationStoreEntry entry) {
72 int elementsAdded = 0;
73 while (elementsAdded < SMALL_SIZE) {
74 entry.getAndAddActivationAfter(2);
75 elementsAdded++;
76 }
77 Assertions.assertThrows(IllegalArgumentException.class, () -> entry.getAndAddActivationAfter(2));
78 }
79
80 void randomDifferentTestCase(ActivationStoreEntry entry, int seed) {
81 List<Integer> elements = new ArrayList<>(SMALL_SIZE);
82 for (int i = 0; i < SMALL_SIZE; i++) {
83 elements.add(i);
84 }
85 @SuppressWarnings("squid:S2245")
86 var random = new Random(seed);
87 Collections.shuffle(elements, random);
88
89 for (int element : elements) {
90 entry.getAndAddActivationAfter(element);
91 }
92 Assertions.assertThrows(IllegalArgumentException.class, () -> entry.getAndAddActivationAfter(2));
93 }
94
95 private static final int fuzzNumber = 20;
96
97 @ParameterizedTest
98 @MethodSource("entryFactories")
99 void randomDifferentTest(Supplier<ActivationStoreEntry> entry) {
100 for (int i = 0; i < fuzzNumber; i++) {
101 randomDifferentTestCase(entry.get(), i);
102 }
103 }
104
105 void randomSameTestCase(ActivationStoreEntry entry, int seed) {
106
107 @SuppressWarnings("squid:S2245")
108 var random = new Random(seed);
109
110 for (int i = 0; i < SMALL_SIZE; i++) {
111 entry.getAndAddActivationAfter(random.nextInt(SMALL_SIZE));
112 }
113
114 Assertions.assertThrows(IllegalArgumentException.class, () -> entry.getAndAddActivationAfter(2));
115 }
116
117 @ParameterizedTest
118 @MethodSource("entryFactories")
119 void randomSameTest(Supplier<ActivationStoreEntry> entry) {
120 for (int i = 0; i < fuzzNumber; i++) {
121 randomSameTestCase(entry.get(), i);
122 }
123 }
124
125 private static Stream<Supplier<ActivationStoreEntry>> entryFactories() {
126 return Stream.of(
127 () -> new ActivationStoreBitVectorEntry(SMALL_SIZE),
128 () -> new ActivationStoreListEntry(SMALL_SIZE)
129 );
130 }
131}
diff --git a/subprojects/store-query-viatra/build.gradle.kts b/subprojects/store-query-viatra/build.gradle.kts
index ef73e10a..fa1c1da3 100644
--- a/subprojects/store-query-viatra/build.gradle.kts
+++ b/subprojects/store-query-viatra/build.gradle.kts
@@ -9,9 +9,11 @@ plugins {
9} 9}
10 10
11dependencies { 11dependencies {
12 implementation(libs.ecore) 12 api(project(":refinery-viatra-runtime"))
13 api(libs.viatra) 13 api(project(":refinery-viatra-runtime-localsearch"))
14 api(project(":refinery-viatra-runtime-rete"))
15 api(project(":refinery-viatra-runtime-rete-recipes"))
14 api(project(":refinery-store-query")) 16 api(project(":refinery-store-query"))
15 api(project(":refinery-store-reasoning")) 17 implementation(libs.ecore)
16 api(project(":refinery-visualization")) 18 implementation(libs.slf4j.log4j)
17} 19}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryBuilder.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryBuilder.java
index 931a07aa..d19c3bb4 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryBuilder.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryBuilder.java
@@ -5,13 +5,14 @@
5 */ 5 */
6package tools.refinery.store.query.viatra; 6package tools.refinery.store.query.viatra;
7 7
8import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions;
9import org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory;
10import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
11import tools.refinery.store.model.ModelStore; 8import tools.refinery.store.model.ModelStore;
9import tools.refinery.store.query.ModelQueryBuilder;
12import tools.refinery.store.query.dnf.AnyQuery; 10import tools.refinery.store.query.dnf.AnyQuery;
13import tools.refinery.store.query.dnf.Dnf; 11import tools.refinery.store.query.dnf.Dnf;
14import tools.refinery.store.query.ModelQueryBuilder; 12import tools.refinery.store.query.rewriter.DnfRewriter;
13import tools.refinery.viatra.runtime.api.ViatraQueryEngineOptions;
14import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
15import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
15 16
16import java.util.Collection; 17import java.util.Collection;
17import java.util.function.Function; 18import java.util.function.Function;
@@ -43,12 +44,11 @@ public interface ViatraModelQueryBuilder extends ModelQueryBuilder {
43 @Override 44 @Override
44 ViatraModelQueryBuilder query(AnyQuery query); 45 ViatraModelQueryBuilder query(AnyQuery query);
45 46
46 ViatraModelQueryBuilder query(AnyQuery query, QueryEvaluationHint queryEvaluationHint); 47 @Override
48 ViatraModelQueryBuilder rewriter(DnfRewriter rewriter);
47 49
48 ViatraModelQueryBuilder computeHint(Function<Dnf, QueryEvaluationHint> computeHint); 50 ViatraModelQueryBuilder computeHint(Function<Dnf, QueryEvaluationHint> computeHint);
49 51
50 ViatraModelQueryBuilder hint(Dnf dnf, QueryEvaluationHint queryEvaluationHint);
51
52 @Override 52 @Override
53 ViatraModelQueryStoreAdapter build(ModelStore store); 53 ViatraModelQueryStoreAdapter build(ModelStore store);
54} 54}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryStoreAdapter.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryStoreAdapter.java
index da6d7bd5..588c00d4 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryStoreAdapter.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/ViatraModelQueryStoreAdapter.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra; 6package tools.refinery.store.query.viatra;
7 7
8import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions; 8import tools.refinery.viatra.runtime.api.ViatraQueryEngineOptions;
9import tools.refinery.store.model.Model; 9import tools.refinery.store.model.Model;
10import tools.refinery.store.query.ModelQueryStoreAdapter; 10import tools.refinery.store.query.ModelQueryStoreAdapter;
11 11
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/RelationalScope.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/RelationalScope.java
index d1a65a89..9303cae6 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/RelationalScope.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/RelationalScope.java
@@ -6,10 +6,10 @@
6package tools.refinery.store.query.viatra.internal; 6package tools.refinery.store.query.viatra.internal;
7 7
8import org.apache.log4j.Logger; 8import org.apache.log4j.Logger;
9import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; 9import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
10import org.eclipse.viatra.query.runtime.api.scope.IEngineContext; 10import tools.refinery.viatra.runtime.api.scope.IEngineContext;
11import org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener; 11import tools.refinery.viatra.runtime.api.scope.IIndexingErrorListener;
12import org.eclipse.viatra.query.runtime.api.scope.QueryScope; 12import tools.refinery.viatra.runtime.api.scope.QueryScope;
13import tools.refinery.store.query.viatra.internal.context.RelationalEngineContext; 13import tools.refinery.store.query.viatra.internal.context.RelationalEngineContext;
14 14
15public class RelationalScope extends QueryScope { 15public class RelationalScope extends QueryScope {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryAdapterImpl.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryAdapterImpl.java
index 5f3e86b4..ad754988 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryAdapterImpl.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryAdapterImpl.java
@@ -5,69 +5,47 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal; 6package tools.refinery.store.query.viatra.internal;
7 7
8import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine;
9import org.eclipse.viatra.query.runtime.api.GenericQueryGroup;
10import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
11import org.eclipse.viatra.query.runtime.internal.apiimpl.ViatraQueryEngineImpl;
12import org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackend;
13import org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory;
14import tools.refinery.store.model.Model; 8import tools.refinery.store.model.Model;
15import tools.refinery.store.model.ModelListener; 9import tools.refinery.store.model.ModelListener;
16import tools.refinery.store.query.resultset.AnyResultSet;
17import tools.refinery.store.query.resultset.EmptyResultSet;
18import tools.refinery.store.query.resultset.ResultSet;
19import tools.refinery.store.query.dnf.AnyQuery; 10import tools.refinery.store.query.dnf.AnyQuery;
20import tools.refinery.store.query.dnf.FunctionalQuery; 11import tools.refinery.store.query.dnf.FunctionalQuery;
21import tools.refinery.store.query.dnf.Query; 12import tools.refinery.store.query.dnf.Query;
22import tools.refinery.store.query.dnf.RelationalQuery; 13import tools.refinery.store.query.dnf.RelationalQuery;
14import tools.refinery.store.query.resultset.AnyResultSet;
15import tools.refinery.store.query.resultset.EmptyResultSet;
16import tools.refinery.store.query.resultset.ResultSet;
23import tools.refinery.store.query.viatra.ViatraModelQueryAdapter; 17import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
24import tools.refinery.store.query.viatra.internal.matcher.FunctionalViatraMatcher; 18import tools.refinery.store.query.viatra.internal.matcher.FunctionalViatraMatcher;
25import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher; 19import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher;
26import tools.refinery.store.query.viatra.internal.matcher.RelationalViatraMatcher; 20import tools.refinery.store.query.viatra.internal.matcher.RelationalViatraMatcher;
21import tools.refinery.viatra.runtime.CancellationToken;
22import tools.refinery.viatra.runtime.api.AdvancedViatraQueryEngine;
23import tools.refinery.viatra.runtime.api.GenericQueryGroup;
24import tools.refinery.viatra.runtime.api.IQuerySpecification;
27 25
28import java.lang.invoke.MethodHandle;
29import java.lang.invoke.MethodHandles;
30import java.util.Collection;
31import java.util.Collections; 26import java.util.Collections;
32import java.util.LinkedHashMap; 27import java.util.LinkedHashMap;
33import java.util.Map; 28import java.util.Map;
34 29
35public class ViatraModelQueryAdapterImpl implements ViatraModelQueryAdapter, ModelListener { 30public class ViatraModelQueryAdapterImpl implements ViatraModelQueryAdapter, ModelListener {
36 private static final String DELAY_MESSAGE_DELIVERY_FIELD_NAME = "delayMessageDelivery";
37 private static final MethodHandle SET_UPDATE_PROPAGATION_DELAYED_HANDLE;
38 private static final String QUERY_BACKENDS_FIELD_NAME = "queryBackends";
39 private static final MethodHandle GET_QUERY_BACKENDS_HANDLE;
40
41 private final Model model; 31 private final Model model;
42 private final ViatraModelQueryStoreAdapterImpl storeAdapter; 32 private final ViatraModelQueryStoreAdapterImpl storeAdapter;
43 private final ViatraQueryEngineImpl queryEngine; 33 private final AdvancedViatraQueryEngine queryEngine;
44 private final Map<AnyQuery, AnyResultSet> resultSets; 34 private final Map<AnyQuery, AnyResultSet> resultSets;
45 private boolean pendingChanges; 35 private boolean pendingChanges;
46 36
47 static {
48 try {
49 var lookup = MethodHandles.privateLookupIn(ViatraQueryEngineImpl.class, MethodHandles.lookup());
50 SET_UPDATE_PROPAGATION_DELAYED_HANDLE = lookup.findSetter(ViatraQueryEngineImpl.class,
51 DELAY_MESSAGE_DELIVERY_FIELD_NAME, Boolean.TYPE);
52 GET_QUERY_BACKENDS_HANDLE = lookup.findGetter(ViatraQueryEngineImpl.class, QUERY_BACKENDS_FIELD_NAME,
53 Map.class);
54 } catch (IllegalAccessException | NoSuchFieldException e) {
55 throw new IllegalStateException("Cannot access private members of %s"
56 .formatted(ViatraQueryEngineImpl.class.getName()), e);
57 }
58 }
59
60 ViatraModelQueryAdapterImpl(Model model, ViatraModelQueryStoreAdapterImpl storeAdapter) { 37 ViatraModelQueryAdapterImpl(Model model, ViatraModelQueryStoreAdapterImpl storeAdapter) {
61 this.model = model; 38 this.model = model;
62 this.storeAdapter = storeAdapter; 39 this.storeAdapter = storeAdapter;
63 var scope = new RelationalScope(this); 40 var scope = new RelationalScope(this);
64 queryEngine = (ViatraQueryEngineImpl) AdvancedViatraQueryEngine.createUnmanagedEngine(scope, 41 queryEngine = AdvancedViatraQueryEngine.createUnmanagedEngine(scope,
65 storeAdapter.getEngineOptions()); 42 storeAdapter.getEngineOptions());
66 43
67 var querySpecifications = storeAdapter.getQuerySpecifications(); 44 var querySpecifications = storeAdapter.getQuerySpecifications();
68 GenericQueryGroup.of( 45 GenericQueryGroup.of(
69 Collections.<IQuerySpecification<?>>unmodifiableCollection(querySpecifications.values()).stream() 46 Collections.<IQuerySpecification<?>>unmodifiableCollection(querySpecifications.values()).stream()
70 ).prepare(queryEngine); 47 ).prepare(queryEngine);
48 queryEngine.flushChanges();
71 var vacuousQueries = storeAdapter.getVacuousQueries(); 49 var vacuousQueries = storeAdapter.getVacuousQueries();
72 resultSets = new LinkedHashMap<>(querySpecifications.size() + vacuousQueries.size()); 50 resultSets = new LinkedHashMap<>(querySpecifications.size() + vacuousQueries.size());
73 for (var entry : querySpecifications.entrySet()) { 51 for (var entry : querySpecifications.entrySet()) {
@@ -79,7 +57,6 @@ public class ViatraModelQueryAdapterImpl implements ViatraModelQueryAdapter, Mod
79 resultSets.put(vacuousQuery, new EmptyResultSet<>(this, (Query<?>) vacuousQuery)); 57 resultSets.put(vacuousQuery, new EmptyResultSet<>(this, (Query<?>) vacuousQuery));
80 } 58 }
81 59
82 setUpdatePropagationDelayed(true);
83 model.addListener(this); 60 model.addListener(this);
84 } 61 }
85 62
@@ -95,30 +72,6 @@ public class ViatraModelQueryAdapterImpl implements ViatraModelQueryAdapter, Mod
95 } 72 }
96 } 73 }
97 74
98 private void setUpdatePropagationDelayed(boolean value) {
99 try {
100 SET_UPDATE_PROPAGATION_DELAYED_HANDLE.invokeExact(queryEngine, value);
101 } catch (Error e) {
102 // Fatal JVM errors should not be wrapped.
103 throw e;
104 } catch (Throwable e) {
105 throw new IllegalStateException("Cannot set %s".formatted(DELAY_MESSAGE_DELIVERY_FIELD_NAME), e);
106 }
107 }
108
109 private Collection<IQueryBackend> getQueryBackends() {
110 try {
111 @SuppressWarnings("unchecked")
112 var backendMap = (Map<IQueryBackendFactory, IQueryBackend>) GET_QUERY_BACKENDS_HANDLE.invokeExact(queryEngine);
113 return backendMap.values();
114 } catch (Error e) {
115 // Fatal JVM errors should not be wrapped.
116 throw e;
117 } catch (Throwable e) {
118 throw new IllegalStateException("Cannot get %s".formatted(QUERY_BACKENDS_FIELD_NAME), e);
119 }
120 }
121
122 @Override 75 @Override
123 public Model getModel() { 76 public Model getModel() {
124 return model; 77 return model;
@@ -129,9 +82,14 @@ public class ViatraModelQueryAdapterImpl implements ViatraModelQueryAdapter, Mod
129 return storeAdapter; 82 return storeAdapter;
130 } 83 }
131 84
85 public CancellationToken getCancellationToken() {
86 return storeAdapter.getCancellationToken();
87 }
88
132 @Override 89 @Override
133 public <T> ResultSet<T> getResultSet(Query<T> query) { 90 public <T> ResultSet<T> getResultSet(Query<T> query) {
134 var resultSet = resultSets.get(query); 91 var canonicalQuery = storeAdapter.getCanonicalQuery(query);
92 var resultSet = resultSets.get(canonicalQuery);
135 if (resultSet == null) { 93 if (resultSet == null) {
136 throw new IllegalArgumentException("No matcher for query %s in model".formatted(query.name())); 94 throw new IllegalArgumentException("No matcher for query %s in model".formatted(query.name()));
137 } 95 }
@@ -153,20 +111,7 @@ public class ViatraModelQueryAdapterImpl implements ViatraModelQueryAdapter, Mod
153 111
154 @Override 112 @Override
155 public void flushChanges() { 113 public void flushChanges() {
156 if (!queryEngine.isUpdatePropagationDelayed()) { 114 queryEngine.flushChanges();
157 throw new IllegalStateException("Trying to flush changes while changes are already being flushed");
158 }
159 if (!pendingChanges) {
160 return;
161 }
162 setUpdatePropagationDelayed(false);
163 try {
164 for (var queryBackend : getQueryBackends()) {
165 queryBackend.flushUpdates();
166 }
167 } finally {
168 setUpdatePropagationDelayed(true);
169 }
170 pendingChanges = false; 115 pendingChanges = false;
171 } 116 }
172 117
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryBuilderImpl.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryBuilderImpl.java
index ce2467b4..c68152e3 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryBuilderImpl.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryBuilderImpl.java
@@ -5,22 +5,25 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal; 6package tools.refinery.store.query.viatra.internal;
7 7
8import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
9import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions;
10import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchHintOptions;
11import org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory;
12import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
13import org.eclipse.viatra.query.runtime.rete.matcher.ReteBackendFactory;
14import tools.refinery.store.adapter.AbstractModelAdapterBuilder; 8import tools.refinery.store.adapter.AbstractModelAdapterBuilder;
15import tools.refinery.store.model.ModelStore; 9import tools.refinery.store.model.ModelStore;
16import tools.refinery.store.model.ModelStoreBuilder;
17import tools.refinery.store.query.dnf.AnyQuery; 10import tools.refinery.store.query.dnf.AnyQuery;
18import tools.refinery.store.query.dnf.Dnf; 11import tools.refinery.store.query.dnf.Dnf;
12import tools.refinery.store.query.rewriter.CompositeRewriter;
13import tools.refinery.store.query.rewriter.DnfRewriter;
14import tools.refinery.store.query.rewriter.DuplicateDnfRemover;
15import tools.refinery.store.query.rewriter.InputParameterResolver;
19import tools.refinery.store.query.viatra.ViatraModelQueryBuilder; 16import tools.refinery.store.query.viatra.ViatraModelQueryBuilder;
20import tools.refinery.store.query.viatra.internal.localsearch.FlatCostFunction; 17import tools.refinery.store.query.viatra.internal.localsearch.FlatCostFunction;
21import tools.refinery.store.query.viatra.internal.localsearch.RelationalLocalSearchBackendFactory;
22import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher; 18import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher;
23import tools.refinery.store.query.viatra.internal.pquery.Dnf2PQuery; 19import tools.refinery.store.query.viatra.internal.pquery.Dnf2PQuery;
20import tools.refinery.viatra.runtime.api.IQuerySpecification;
21import tools.refinery.viatra.runtime.api.ViatraQueryEngineOptions;
22import tools.refinery.viatra.runtime.localsearch.matcher.integration.LocalSearchGenericBackendFactory;
23import tools.refinery.viatra.runtime.localsearch.matcher.integration.LocalSearchHintOptions;
24import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
25import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
26import tools.refinery.viatra.runtime.rete.matcher.ReteBackendFactory;
24 27
25import java.util.*; 28import java.util.*;
26import java.util.function.Function; 29import java.util.function.Function;
@@ -32,15 +35,18 @@ public class ViatraModelQueryBuilderImpl extends AbstractModelAdapterBuilder<Via
32 // Use a cost function that ignores the initial (empty) model but allows higher arity input keys. 35 // Use a cost function that ignores the initial (empty) model but allows higher arity input keys.
33 LocalSearchHintOptions.PLANNER_COST_FUNCTION, new FlatCostFunction() 36 LocalSearchHintOptions.PLANNER_COST_FUNCTION, new FlatCostFunction()
34 ), (IQueryBackendFactory) null); 37 ), (IQueryBackendFactory) null);
38 private final CompositeRewriter rewriter;
35 private final Dnf2PQuery dnf2PQuery = new Dnf2PQuery(); 39 private final Dnf2PQuery dnf2PQuery = new Dnf2PQuery();
36 private final Set<AnyQuery> vacuousQueries = new LinkedHashSet<>(); 40 private final Set<AnyQuery> queries = new LinkedHashSet<>();
37 private final Map<AnyQuery, IQuerySpecification<RawPatternMatcher>> querySpecifications = new LinkedHashMap<>();
38 41
39 public ViatraModelQueryBuilderImpl() { 42 public ViatraModelQueryBuilderImpl() {
40 engineOptionsBuilder = new ViatraQueryEngineOptions.Builder() 43 engineOptionsBuilder = new ViatraQueryEngineOptions.Builder()
41 .withDefaultBackend(ReteBackendFactory.INSTANCE) 44 .withDefaultBackend(ReteBackendFactory.INSTANCE)
42 .withDefaultCachingBackend(ReteBackendFactory.INSTANCE) 45 .withDefaultCachingBackend(ReteBackendFactory.INSTANCE)
43 .withDefaultSearchBackend(RelationalLocalSearchBackendFactory.INSTANCE); 46 .withDefaultSearchBackend(LocalSearchGenericBackendFactory.INSTANCE);
47 rewriter = new CompositeRewriter();
48 rewriter.addFirst(new DuplicateDnfRemover());
49 rewriter.addFirst(new InputParameterResolver());
44 } 50 }
45 51
46 @Override 52 @Override
@@ -79,58 +85,58 @@ public class ViatraModelQueryBuilderImpl extends AbstractModelAdapterBuilder<Via
79 } 85 }
80 86
81 @Override 87 @Override
82 public ViatraModelQueryBuilder query(AnyQuery query) { 88 public ViatraModelQueryBuilder queries(Collection<? extends AnyQuery> queries) {
83 checkNotConfigured(); 89 checkNotConfigured();
84 if (querySpecifications.containsKey(query) || vacuousQueries.contains(query)) { 90 this.queries.addAll(queries);
85 // Ignore duplicate queries.
86 return this;
87 }
88 var dnf = query.getDnf();
89 var reduction = dnf.getReduction();
90 switch (reduction) {
91 case NOT_REDUCIBLE -> {
92 var pQuery = dnf2PQuery.translate(dnf);
93 querySpecifications.put(query, pQuery.build());
94 }
95 case ALWAYS_FALSE -> vacuousQueries.add(query);
96 case ALWAYS_TRUE -> throw new IllegalArgumentException(
97 "Query %s is relationally unsafe (it matches every tuple)".formatted(query.name()));
98 default -> throw new IllegalArgumentException("Unknown reduction: " + reduction);
99 }
100 return this; 91 return this;
101 } 92 }
102 93
103 @Override 94 @Override
104 public ViatraModelQueryBuilder query(AnyQuery query, QueryEvaluationHint queryEvaluationHint) { 95 public ViatraModelQueryBuilder query(AnyQuery query) {
105 hint(query.getDnf(), queryEvaluationHint); 96 checkNotConfigured();
106 query(query); 97 queries.add(query);
107 return this; 98 return this;
108 } 99 }
109 100
110 @Override 101 @Override
111 public ViatraModelQueryBuilder computeHint(Function<Dnf, QueryEvaluationHint> computeHint) { 102 public ViatraModelQueryBuilder rewriter(DnfRewriter rewriter) {
112 checkNotConfigured(); 103 this.rewriter.addFirst(rewriter);
113 dnf2PQuery.setComputeHint(computeHint);
114 return this; 104 return this;
115 } 105 }
116 106
117 @Override 107 @Override
118 public ViatraModelQueryBuilder hint(Dnf dnf, QueryEvaluationHint queryEvaluationHint) { 108 public ViatraModelQueryBuilder computeHint(Function<Dnf, QueryEvaluationHint> computeHint) {
119 checkNotConfigured(); 109 checkNotConfigured();
120 dnf2PQuery.hint(dnf, queryEvaluationHint); 110 dnf2PQuery.setComputeHint(computeHint);
121 return this; 111 return this;
122 } 112 }
123 113
124 @Override 114 @Override
125 public void doConfigure(ModelStoreBuilder storeBuilder) {
126 dnf2PQuery.assertNoUnusedHints();
127 }
128
129 @Override
130 public ViatraModelQueryStoreAdapterImpl doBuild(ModelStore store) { 115 public ViatraModelQueryStoreAdapterImpl doBuild(ModelStore store) {
116 var canonicalQueryMap = new HashMap<AnyQuery, AnyQuery>();
117 var querySpecifications = new LinkedHashMap<AnyQuery, IQuerySpecification<RawPatternMatcher>>();
118 var vacuousQueries = new LinkedHashSet<AnyQuery>();
119 for (var query : queries) {
120 var canonicalQuery = rewriter.rewrite(query);
121 canonicalQueryMap.put(query, canonicalQuery);
122 var dnf = canonicalQuery.getDnf();
123 var reduction = dnf.getReduction();
124 switch (reduction) {
125 case NOT_REDUCIBLE -> {
126 var pQuery = dnf2PQuery.translate(dnf);
127 querySpecifications.put(canonicalQuery, pQuery.build());
128 }
129 case ALWAYS_FALSE -> vacuousQueries.add(canonicalQuery);
130 case ALWAYS_TRUE -> throw new IllegalArgumentException(
131 "Query %s is relationally unsafe (it matches every tuple)".formatted(query.name()));
132 default -> throw new IllegalArgumentException("Unknown reduction: " + reduction);
133 }
134 }
135
131 validateSymbols(store); 136 validateSymbols(store);
132 return new ViatraModelQueryStoreAdapterImpl(store, buildEngineOptions(), dnf2PQuery.getSymbolViews(), 137 return new ViatraModelQueryStoreAdapterImpl(store, buildEngineOptions(), dnf2PQuery.getSymbolViews(),
133 Collections.unmodifiableMap(querySpecifications), Collections.unmodifiableSet(vacuousQueries)); 138 Collections.unmodifiableMap(canonicalQueryMap), Collections.unmodifiableMap(querySpecifications),
139 Collections.unmodifiableSet(vacuousQueries), store::checkCancelled);
134 } 140 }
135 141
136 private ViatraQueryEngineOptions buildEngineOptions() { 142 private ViatraQueryEngineOptions buildEngineOptions() {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryStoreAdapterImpl.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryStoreAdapterImpl.java
index 11a3c7fd..f32e1cc6 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryStoreAdapterImpl.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/ViatraModelQueryStoreAdapterImpl.java
@@ -5,12 +5,14 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal; 6package tools.refinery.store.query.viatra.internal;
7 7
8import org.eclipse.viatra.query.runtime.api.IQuerySpecification; 8import tools.refinery.viatra.runtime.CancellationToken;
9import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions; 9import tools.refinery.viatra.runtime.api.IQuerySpecification;
10import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 10import tools.refinery.viatra.runtime.api.ViatraQueryEngineOptions;
11import tools.refinery.viatra.runtime.matchers.context.IInputKey;
11import tools.refinery.store.model.Model; 12import tools.refinery.store.model.Model;
12import tools.refinery.store.model.ModelStore; 13import tools.refinery.store.model.ModelStore;
13import tools.refinery.store.query.dnf.AnyQuery; 14import tools.refinery.store.query.dnf.AnyQuery;
15import tools.refinery.store.query.dnf.Query;
14import tools.refinery.store.query.viatra.ViatraModelQueryStoreAdapter; 16import tools.refinery.store.query.viatra.ViatraModelQueryStoreAdapter;
15import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher; 17import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher;
16import tools.refinery.store.query.view.AnySymbolView; 18import tools.refinery.store.query.view.AnySymbolView;
@@ -21,19 +23,24 @@ public class ViatraModelQueryStoreAdapterImpl implements ViatraModelQueryStoreAd
21 private final ModelStore store; 23 private final ModelStore store;
22 private final ViatraQueryEngineOptions engineOptions; 24 private final ViatraQueryEngineOptions engineOptions;
23 private final Map<AnySymbolView, IInputKey> inputKeys; 25 private final Map<AnySymbolView, IInputKey> inputKeys;
26 private final Map<AnyQuery, AnyQuery> canonicalQueryMap;
24 private final Map<AnyQuery, IQuerySpecification<RawPatternMatcher>> querySpecifications; 27 private final Map<AnyQuery, IQuerySpecification<RawPatternMatcher>> querySpecifications;
25 private final Set<AnyQuery> vacuousQueries; 28 private final Set<AnyQuery> vacuousQueries;
26 private final Set<AnyQuery> allQueries; 29 private final Set<AnyQuery> allQueries;
30 private final CancellationToken cancellationToken;
27 31
28 ViatraModelQueryStoreAdapterImpl(ModelStore store, ViatraQueryEngineOptions engineOptions, 32 ViatraModelQueryStoreAdapterImpl(ModelStore store, ViatraQueryEngineOptions engineOptions,
29 Map<AnySymbolView, IInputKey> inputKeys, 33 Map<AnySymbolView, IInputKey> inputKeys,
34 Map<AnyQuery, AnyQuery> canonicalQueryMap,
30 Map<AnyQuery, IQuerySpecification<RawPatternMatcher>> querySpecifications, 35 Map<AnyQuery, IQuerySpecification<RawPatternMatcher>> querySpecifications,
31 Set<AnyQuery> vacuousQueries) { 36 Set<AnyQuery> vacuousQueries, CancellationToken cancellationToken) {
32 this.store = store; 37 this.store = store;
33 this.engineOptions = engineOptions; 38 this.engineOptions = engineOptions;
34 this.inputKeys = inputKeys; 39 this.inputKeys = inputKeys;
40 this.canonicalQueryMap = canonicalQueryMap;
35 this.querySpecifications = querySpecifications; 41 this.querySpecifications = querySpecifications;
36 this.vacuousQueries = vacuousQueries; 42 this.vacuousQueries = vacuousQueries;
43 this.cancellationToken = cancellationToken;
37 var mutableAllQueries = new LinkedHashSet<AnyQuery>(querySpecifications.size() + vacuousQueries.size()); 44 var mutableAllQueries = new LinkedHashSet<AnyQuery>(querySpecifications.size() + vacuousQueries.size());
38 mutableAllQueries.addAll(querySpecifications.keySet()); 45 mutableAllQueries.addAll(querySpecifications.keySet());
39 mutableAllQueries.addAll(vacuousQueries); 46 mutableAllQueries.addAll(vacuousQueries);
@@ -58,6 +65,21 @@ public class ViatraModelQueryStoreAdapterImpl implements ViatraModelQueryStoreAd
58 return allQueries; 65 return allQueries;
59 } 66 }
60 67
68 public CancellationToken getCancellationToken() {
69 return cancellationToken;
70 }
71
72 @Override
73 public <T> Query<T> getCanonicalQuery(Query<T> query) {
74 // We know that canonical forms of queries do not change output types.
75 @SuppressWarnings("unchecked")
76 var canonicalQuery = (Query<T>) canonicalQueryMap.get(query);
77 if (canonicalQuery == null) {
78 throw new IllegalArgumentException("Unknown query: " + query);
79 }
80 return canonicalQuery;
81 }
82
61 Map<AnyQuery, IQuerySpecification<RawPatternMatcher>> getQuerySpecifications() { 83 Map<AnyQuery, IQuerySpecification<RawPatternMatcher>> getQuerySpecifications() {
62 return querySpecifications; 84 return querySpecifications;
63 } 85 }
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/DummyBaseIndexer.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/DummyBaseIndexer.java
index 8cb199d2..64d98258 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/DummyBaseIndexer.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/DummyBaseIndexer.java
@@ -5,16 +5,16 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.context; 6package tools.refinery.store.query.viatra.internal.context;
7 7
8import org.eclipse.viatra.query.runtime.api.scope.IBaseIndex; 8import tools.refinery.viatra.runtime.api.scope.IBaseIndex;
9import org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener; 9import tools.refinery.viatra.runtime.api.scope.IIndexingErrorListener;
10import org.eclipse.viatra.query.runtime.api.scope.IInstanceObserver; 10import tools.refinery.viatra.runtime.api.scope.IInstanceObserver;
11import org.eclipse.viatra.query.runtime.api.scope.ViatraBaseIndexChangeListener; 11import tools.refinery.viatra.runtime.api.scope.ViatraBaseIndexChangeListener;
12 12
13import java.lang.reflect.InvocationTargetException; 13import java.lang.reflect.InvocationTargetException;
14import java.util.concurrent.Callable; 14import java.util.concurrent.Callable;
15 15
16/** 16/**
17 * Copied from <code>org.eclipse.viatra.query.runtime.tabular.TabularEngineContext</code> 17 * Copied from <code>tools.refinery.viatra.runtime.tabular.TabularEngineContext</code>
18 */ 18 */
19public class DummyBaseIndexer implements IBaseIndex { 19public class DummyBaseIndexer implements IBaseIndex {
20 DummyBaseIndexer() { 20 DummyBaseIndexer() {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalEngineContext.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalEngineContext.java
index 7220f8ca..f7d323ff 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalEngineContext.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalEngineContext.java
@@ -5,9 +5,9 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.context; 6package tools.refinery.store.query.viatra.internal.context;
7 7
8import org.eclipse.viatra.query.runtime.api.scope.IBaseIndex; 8import tools.refinery.viatra.runtime.api.scope.IBaseIndex;
9import org.eclipse.viatra.query.runtime.api.scope.IEngineContext; 9import tools.refinery.viatra.runtime.api.scope.IEngineContext;
10import org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext; 10import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
11import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 11import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
12 12
13public class RelationalEngineContext implements IEngineContext { 13public class RelationalEngineContext implements IEngineContext {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalQueryMetaContext.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalQueryMetaContext.java
index 211eacb4..77d86a1c 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalQueryMetaContext.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalQueryMetaContext.java
@@ -5,10 +5,10 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.context; 6package tools.refinery.store.query.viatra.internal.context;
7 7
8import org.eclipse.viatra.query.runtime.matchers.context.AbstractQueryMetaContext; 8import tools.refinery.viatra.runtime.matchers.context.AbstractQueryMetaContext;
9import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 9import tools.refinery.viatra.runtime.matchers.context.IInputKey;
10import org.eclipse.viatra.query.runtime.matchers.context.InputKeyImplication; 10import tools.refinery.viatra.runtime.matchers.context.InputKeyImplication;
11import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey; 11import tools.refinery.viatra.runtime.matchers.context.common.JavaTransitiveInstancesKey;
12import tools.refinery.store.query.viatra.internal.pquery.SymbolViewWrapper; 12import tools.refinery.store.query.viatra.internal.pquery.SymbolViewWrapper;
13import tools.refinery.store.query.view.AnySymbolView; 13import tools.refinery.store.query.view.AnySymbolView;
14 14
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalRuntimeContext.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalRuntimeContext.java
index 0f2daca8..dadab5dd 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalRuntimeContext.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/context/RelationalRuntimeContext.java
@@ -5,12 +5,13 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.context; 6package tools.refinery.store.query.viatra.internal.context;
7 7
8import org.eclipse.viatra.query.runtime.matchers.context.*; 8import tools.refinery.viatra.runtime.CancellationToken;
9import org.eclipse.viatra.query.runtime.matchers.tuple.ITuple; 9import tools.refinery.viatra.runtime.matchers.context.*;
10import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; 10import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
11import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask; 11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; 12import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
13import org.eclipse.viatra.query.runtime.matchers.util.Accuracy; 13import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
14import tools.refinery.viatra.runtime.matchers.util.Accuracy;
14import tools.refinery.store.model.Model; 15import tools.refinery.store.model.Model;
15import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 16import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
16import tools.refinery.store.query.viatra.internal.pquery.SymbolViewWrapper; 17import tools.refinery.store.query.viatra.internal.pquery.SymbolViewWrapper;
@@ -32,10 +33,13 @@ public class RelationalRuntimeContext implements IQueryRuntimeContext {
32 33
33 private final Model model; 34 private final Model model;
34 35
36 private final CancellationToken cancellationToken;
37
35 RelationalRuntimeContext(ViatraModelQueryAdapterImpl adapter) { 38 RelationalRuntimeContext(ViatraModelQueryAdapterImpl adapter) {
36 model = adapter.getModel(); 39 model = adapter.getModel();
37 metaContext = new RelationalQueryMetaContext(adapter.getStoreAdapter().getInputKeys()); 40 metaContext = new RelationalQueryMetaContext(adapter.getStoreAdapter().getInputKeys());
38 modelUpdateListener = new ModelUpdateListener(adapter); 41 modelUpdateListener = new ModelUpdateListener(adapter);
42 cancellationToken = adapter.getCancellationToken();
39 } 43 }
40 44
41 @Override 45 @Override
@@ -119,10 +123,20 @@ public class RelationalRuntimeContext implements IQueryRuntimeContext {
119 123
120 private Iterable<Object[]> enumerate(IInputKey key, TupleMask seedMask, ITuple seed) { 124 private Iterable<Object[]> enumerate(IInputKey key, TupleMask seedMask, ITuple seed) {
121 var relationViewKey = checkKey(key); 125 var relationViewKey = checkKey(key);
122 Iterable<Object[]> allObjects = relationViewKey.getAll(model); 126 Iterable<Object[]> allObjects = getAllObjects(relationViewKey, seedMask, seed);
123 return filter(allObjects, objectArray -> isMatching(objectArray, seedMask, seed)); 127 return filter(allObjects, objectArray -> isMatching(objectArray, seedMask, seed));
124 } 128 }
125 129
130 private Iterable<Object[]> getAllObjects(AnySymbolView key, TupleMask seedMask, ITuple seed) {
131 for (int i = 0; i < seedMask.indices.length; i++) {
132 int slot = seedMask.indices[i];
133 if (key.canIndexSlot(slot)) {
134 return key.getAdjacent(model, slot, seed.get(i));
135 }
136 }
137 return key.getAll(model);
138 }
139
126 private static boolean isMatching(Object[] tuple, TupleMask seedMask, ITuple seed) { 140 private static boolean isMatching(Object[] tuple, TupleMask seedMask, ITuple seed) {
127 for (int i = 0; i < seedMask.indices.length; i++) { 141 for (int i = 0; i < seedMask.indices.length; i++) {
128 final Object seedElement = seed.get(i); 142 final Object seedElement = seed.get(i);
@@ -182,4 +196,9 @@ public class RelationalRuntimeContext implements IQueryRuntimeContext {
182 public void executeAfterTraversal(Runnable runnable) { 196 public void executeAfterTraversal(Runnable runnable) {
183 runnable.run(); 197 runnable.run();
184 } 198 }
199
200 @Override
201 public CancellationToken getCancellationToken() {
202 return cancellationToken;
203 }
185} 204}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/FlatCostFunction.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/FlatCostFunction.java
index cc906f22..ce2a75bd 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/FlatCostFunction.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/FlatCostFunction.java
@@ -5,12 +5,12 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.localsearch; 6package tools.refinery.store.query.viatra.internal.localsearch;
7 7
8import org.eclipse.viatra.query.runtime.localsearch.planner.cost.IConstraintEvaluationContext; 8import tools.refinery.viatra.runtime.localsearch.planner.cost.IConstraintEvaluationContext;
9import org.eclipse.viatra.query.runtime.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction; 9import tools.refinery.viatra.runtime.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction;
10import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 10import tools.refinery.viatra.runtime.matchers.context.IInputKey;
11import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 11import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
12import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask; 12import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
13import org.eclipse.viatra.query.runtime.matchers.util.Accuracy; 13import tools.refinery.viatra.runtime.matchers.util.Accuracy;
14 14
15import java.util.Optional; 15import java.util.Optional;
16 16
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchBackendFactory.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchBackendFactory.java
deleted file mode 100644
index 0c77f587..00000000
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchBackendFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.viatra.internal.localsearch;
7
8import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.AbstractLocalSearchResultProvider;
9import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchBackend;
10import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchHints;
11import org.eclipse.viatra.query.runtime.localsearch.plan.IPlanProvider;
12import org.eclipse.viatra.query.runtime.localsearch.plan.SimplePlanProvider;
13import org.eclipse.viatra.query.runtime.matchers.backend.IMatcherCapability;
14import org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackend;
15import org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory;
16import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
17import org.eclipse.viatra.query.runtime.matchers.context.IQueryBackendContext;
18import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery;
19
20public class RelationalLocalSearchBackendFactory implements IQueryBackendFactory {
21 public static final RelationalLocalSearchBackendFactory INSTANCE = new RelationalLocalSearchBackendFactory();
22
23 private RelationalLocalSearchBackendFactory() {
24 }
25
26 @Override
27 public IQueryBackend create(IQueryBackendContext context) {
28 return new LocalSearchBackend(context) {
29 // Create a new {@link IPlanProvider}, because the original {@link LocalSearchBackend#planProvider} is not
30 // accessible.
31 private final IPlanProvider planProvider = new SimplePlanProvider(context.getLogger());
32
33 @Override
34 protected AbstractLocalSearchResultProvider initializeResultProvider(PQuery query,
35 QueryEvaluationHint hints) {
36 return new RelationalLocalSearchResultProvider(this, context, query, planProvider, hints);
37 }
38
39 @Override
40 public IQueryBackendFactory getFactory() {
41 return RelationalLocalSearchBackendFactory.this;
42 }
43 };
44 }
45
46 @Override
47 public Class<? extends IQueryBackend> getBackendClass() {
48 return LocalSearchBackend.class;
49 }
50
51 @Override
52 public IMatcherCapability calculateRequiredCapability(PQuery pQuery, QueryEvaluationHint queryEvaluationHint) {
53 return LocalSearchHints.parse(queryEvaluationHint);
54 }
55
56 @Override
57 public boolean isCaching() {
58 return false;
59 }
60}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchResultProvider.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchResultProvider.java
deleted file mode 100644
index da37be14..00000000
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalLocalSearchResultProvider.java
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.viatra.internal.localsearch;
7
8import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.AbstractLocalSearchResultProvider;
9import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchBackend;
10import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchHints;
11import org.eclipse.viatra.query.runtime.localsearch.plan.IPlanProvider;
12import org.eclipse.viatra.query.runtime.localsearch.planner.compiler.IOperationCompiler;
13import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
14import org.eclipse.viatra.query.runtime.matchers.context.IQueryBackendContext;
15import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery;
16
17class RelationalLocalSearchResultProvider extends AbstractLocalSearchResultProvider {
18 public RelationalLocalSearchResultProvider(LocalSearchBackend backend, IQueryBackendContext context, PQuery query,
19 IPlanProvider planProvider, QueryEvaluationHint userHints) {
20 super(backend, context, query, planProvider, userHints);
21 }
22
23 @Override
24 protected IOperationCompiler getOperationCompiler(IQueryBackendContext backendContext,
25 LocalSearchHints configuration) {
26 return new RelationalOperationCompiler(runtimeContext);
27 }
28}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalOperationCompiler.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalOperationCompiler.java
deleted file mode 100644
index f76ef486..00000000
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/RelationalOperationCompiler.java
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.viatra.internal.localsearch;
7
8import org.eclipse.viatra.query.runtime.localsearch.operations.generic.GenericTypeExtendSingleValue;
9import org.eclipse.viatra.query.runtime.localsearch.operations.util.CallInformation;
10import org.eclipse.viatra.query.runtime.localsearch.planner.compiler.GenericOperationCompiler;
11import org.eclipse.viatra.query.runtime.matchers.context.IInputKey;
12import org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext;
13import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
14import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
15import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
16import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
17import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask;
18
19import java.util.*;
20
21public class RelationalOperationCompiler extends GenericOperationCompiler {
22 public RelationalOperationCompiler(IQueryRuntimeContext runtimeContext) {
23 super(runtimeContext);
24 }
25
26 @Override
27 protected void createExtend(TypeConstraint typeConstraint, Map<PVariable, Integer> variableMapping) {
28 IInputKey inputKey = typeConstraint.getSupplierKey();
29 Tuple tuple = typeConstraint.getVariablesTuple();
30
31 int[] positions = new int[tuple.getSize()];
32 List<Integer> boundVariableIndices = new ArrayList<>();
33 List<Integer> boundVariables = new ArrayList<>();
34 Set<Integer> unboundVariables = new HashSet<>();
35 for (int i = 0; i < tuple.getSize(); i++) {
36 PVariable variable = (PVariable) tuple.get(i);
37 Integer position = variableMapping.get(variable);
38 positions[i] = position;
39 if (variableBindings.get(typeConstraint).contains(position)) {
40 boundVariableIndices.add(i);
41 boundVariables.add(position);
42 } else {
43 unboundVariables.add(position);
44 }
45 }
46 TupleMask indexerMask = TupleMask.fromSelectedIndices(inputKey.getArity(), boundVariableIndices);
47 TupleMask callMask = TupleMask.fromSelectedIndices(variableMapping.size(), boundVariables);
48 // If multiple tuple elements from the indexer should be bound to the same variable, we must use a
49 // {@link GenericTypeExtend} check whether the tuple elements have the same value.
50 if (unboundVariables.size() == 1 && indexerMask.getSize() + 1 == indexerMask.getSourceWidth()) {
51 operations.add(new GenericTypeExtendSingleValue(inputKey, positions, callMask, indexerMask,
52 unboundVariables.iterator().next()));
53 } else {
54 // Use a fixed version of
55 // {@code org.eclipse.viatra.query.runtime.localsearch.operations.generic.GenericTypeExtend} that handles
56 // failed unification of variables correctly.
57 operations.add(new GenericTypeExtend(inputKey, positions, callMask, indexerMask, unboundVariables));
58 }
59 }
60
61 @Override
62 protected void createExtend(PositivePatternCall pCall, Map<PVariable, Integer> variableMapping) {
63 CallInformation information = CallInformation.create(pCall, variableMapping, variableBindings.get(pCall));
64 // Use a fixed version of
65 // {@code org.eclipse.viatra.query.runtime.localsearch.operations.extend.ExtendPositivePatternCall} that handles
66 // failed unification of variables correctly.
67 operations.add(new ExtendPositivePatternCall(information));
68 dependencies.add(information.getCallWithAdornment());
69 }
70}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/AbstractViatraMatcher.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/AbstractViatraMatcher.java
index 99b0a3d8..c4a5a236 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/AbstractViatraMatcher.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/AbstractViatraMatcher.java
@@ -5,8 +5,8 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.IQueryResultProvider; 8import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
9import org.eclipse.viatra.query.runtime.matchers.backend.IUpdateable; 9import tools.refinery.viatra.runtime.matchers.backend.IUpdateable;
10import tools.refinery.store.query.dnf.Query; 10import tools.refinery.store.query.dnf.Query;
11import tools.refinery.store.query.resultset.AbstractResultSet; 11import tools.refinery.store.query.resultset.AbstractResultSet;
12import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 12import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalCursor.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalCursor.java
index 47efb2aa..44038669 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalCursor.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalCursor.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.rete.index.IterableIndexer; 8import tools.refinery.viatra.runtime.rete.index.IterableIndexer;
9import tools.refinery.store.map.Cursor; 9import tools.refinery.store.map.Cursor;
10import tools.refinery.store.tuple.Tuple; 10import tools.refinery.store.tuple.Tuple;
11 11
@@ -13,7 +13,7 @@ import java.util.Iterator;
13 13
14class FunctionalCursor<T> implements Cursor<Tuple, T> { 14class FunctionalCursor<T> implements Cursor<Tuple, T> {
15 private final IterableIndexer indexer; 15 private final IterableIndexer indexer;
16 private final Iterator<org.eclipse.viatra.query.runtime.matchers.tuple.Tuple> iterator; 16 private final Iterator<tools.refinery.viatra.runtime.matchers.tuple.Tuple> iterator;
17 private boolean terminated; 17 private boolean terminated;
18 private Tuple key; 18 private Tuple key;
19 private T value; 19 private T value;
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalViatraMatcher.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalViatraMatcher.java
index db4740cd..fb9e4df6 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalViatraMatcher.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/FunctionalViatraMatcher.java
@@ -5,10 +5,10 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask; 8import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
9import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; 9import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
10import org.eclipse.viatra.query.runtime.rete.index.IterableIndexer; 10import tools.refinery.viatra.runtime.rete.index.IterableIndexer;
11import org.eclipse.viatra.query.runtime.rete.matcher.RetePatternMatcher; 11import tools.refinery.viatra.runtime.rete.matcher.RetePatternMatcher;
12import tools.refinery.store.map.Cursor; 12import tools.refinery.store.map.Cursor;
13import tools.refinery.store.query.dnf.FunctionalQuery; 13import tools.refinery.store.query.dnf.FunctionalQuery;
14import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 14import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
@@ -17,9 +17,9 @@ import tools.refinery.store.tuple.Tuple;
17/** 17/**
18 * Directly access the tuples inside a VIATRA pattern matcher.<p> 18 * Directly access the tuples inside a VIATRA pattern matcher.<p>
19 * This class neglects calling 19 * This class neglects calling
20 * {@link org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext#wrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)} 20 * {@link tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext#wrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)}
21 * and 21 * and
22 * {@link org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext#unwrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)}, 22 * {@link tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext#unwrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)},
23 * because {@link tools.refinery.store.query.viatra.internal.context.RelationalRuntimeContext} provides a trivial 23 * because {@link tools.refinery.store.query.viatra.internal.context.RelationalRuntimeContext} provides a trivial
24 * implementation for these methods. 24 * implementation for these methods.
25 * Using this class with any other runtime context may lead to undefined behavior. 25 * Using this class with any other runtime context may lead to undefined behavior.
@@ -37,7 +37,7 @@ public class FunctionalViatraMatcher<T> extends AbstractViatraMatcher<T> {
37 emptyMask = TupleMask.empty(arityWithOutput); 37 emptyMask = TupleMask.empty(arityWithOutput);
38 omitOutputMask = TupleMask.omit(arity, arityWithOutput); 38 omitOutputMask = TupleMask.omit(arity, arityWithOutput);
39 if (backend instanceof RetePatternMatcher reteBackend) { 39 if (backend instanceof RetePatternMatcher reteBackend) {
40 var maybeIterableOmitOutputIndexer = IndexerUtils.getIndexer(reteBackend, omitOutputMask); 40 var maybeIterableOmitOutputIndexer = reteBackend.getInternalIndexer(omitOutputMask);
41 if (maybeIterableOmitOutputIndexer instanceof IterableIndexer iterableOmitOutputIndexer) { 41 if (maybeIterableOmitOutputIndexer instanceof IterableIndexer iterableOmitOutputIndexer) {
42 omitOutputIndexer = iterableOmitOutputIndexer; 42 omitOutputIndexer = iterableOmitOutputIndexer;
43 } else { 43 } else {
@@ -76,7 +76,7 @@ public class FunctionalViatraMatcher<T> extends AbstractViatraMatcher<T> {
76 } 76 }
77 77
78 @Override 78 @Override
79 public void update(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple updateElement, boolean isInsertion) { 79 public void update(tools.refinery.viatra.runtime.matchers.tuple.Tuple updateElement, boolean isInsertion) {
80 var key = MatcherUtils.keyToRefineryTuple(updateElement); 80 var key = MatcherUtils.keyToRefineryTuple(updateElement);
81 var value = MatcherUtils.<T>getValue(updateElement); 81 var value = MatcherUtils.<T>getValue(updateElement);
82 if (isInsertion) { 82 if (isInsertion) {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/IndexerUtils.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/IndexerUtils.java
deleted file mode 100644
index 15f00b2d..00000000
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/IndexerUtils.java
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.viatra.internal.matcher;
7
8import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask;
9import org.eclipse.viatra.query.runtime.rete.index.Indexer;
10import org.eclipse.viatra.query.runtime.rete.matcher.ReteEngine;
11import org.eclipse.viatra.query.runtime.rete.matcher.RetePatternMatcher;
12import org.eclipse.viatra.query.runtime.rete.traceability.RecipeTraceInfo;
13
14import java.lang.invoke.MethodHandle;
15import java.lang.invoke.MethodHandles;
16import java.lang.invoke.MethodType;
17
18final class IndexerUtils {
19 private static final MethodHandle GET_ENGINE_HANDLE;
20 private static final MethodHandle GET_PRODUCTION_NODE_TRACE_HANDLE;
21 private static final MethodHandle ACCESS_PROJECTION_HANDLE;
22
23 static {
24 try {
25 var lookup = MethodHandles.privateLookupIn(RetePatternMatcher.class, MethodHandles.lookup());
26 GET_ENGINE_HANDLE = lookup.findGetter(RetePatternMatcher.class, "engine", ReteEngine.class);
27 GET_PRODUCTION_NODE_TRACE_HANDLE = lookup.findGetter(RetePatternMatcher.class, "productionNodeTrace",
28 RecipeTraceInfo.class);
29 ACCESS_PROJECTION_HANDLE = lookup.findVirtual(ReteEngine.class, "accessProjection",
30 MethodType.methodType(Indexer.class, RecipeTraceInfo.class, TupleMask.class));
31 } catch (IllegalAccessException | NoSuchFieldException | NoSuchMethodException e) {
32 throw new IllegalStateException("Cannot access private members of %s"
33 .formatted(RetePatternMatcher.class.getPackageName()), e);
34 }
35 }
36
37 private IndexerUtils() {
38 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
39 }
40
41 public static Indexer getIndexer(RetePatternMatcher backend, TupleMask mask) {
42 try {
43 var engine = (ReteEngine) GET_ENGINE_HANDLE.invokeExact(backend);
44 var trace = (RecipeTraceInfo) GET_PRODUCTION_NODE_TRACE_HANDLE.invokeExact(backend);
45 return (Indexer) ACCESS_PROJECTION_HANDLE.invokeExact(engine, trace, mask);
46 } catch (Error e) {
47 // Fatal JVM errors should not be wrapped.
48 throw e;
49 } catch (Throwable e) {
50 throw new IllegalStateException("Cannot access matcher for mask " + mask, e);
51 }
52 }
53}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtils.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtils.java
index 6e24812a..6cda23cd 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtils.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtils.java
@@ -5,8 +5,8 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.ITuple; 8import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
9import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; 9import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
10import org.jetbrains.annotations.Nullable; 10import org.jetbrains.annotations.Nullable;
11import tools.refinery.store.tuple.*; 11import tools.refinery.store.tuple.*;
12 12
@@ -17,7 +17,7 @@ final class MatcherUtils {
17 throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); 17 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
18 } 18 }
19 19
20 public static org.eclipse.viatra.query.runtime.matchers.tuple.Tuple toViatraTuple(Tuple refineryTuple) { 20 public static tools.refinery.viatra.runtime.matchers.tuple.Tuple toViatraTuple(Tuple refineryTuple) {
21 if (refineryTuple instanceof Tuple0) { 21 if (refineryTuple instanceof Tuple0) {
22 return Tuples.staticArityFlatTupleOf(); 22 return Tuples.staticArityFlatTupleOf();
23 } else if (refineryTuple instanceof Tuple1) { 23 } else if (refineryTuple instanceof Tuple1) {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RawPatternMatcher.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RawPatternMatcher.java
index 5b82c4b7..c0be70ba 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RawPatternMatcher.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RawPatternMatcher.java
@@ -5,9 +5,9 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.api.GenericPatternMatcher; 8import tools.refinery.viatra.runtime.api.GenericPatternMatcher;
9import org.eclipse.viatra.query.runtime.api.GenericQuerySpecification; 9import tools.refinery.viatra.runtime.api.GenericQuerySpecification;
10import org.eclipse.viatra.query.runtime.matchers.backend.IQueryResultProvider; 10import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
11 11
12public class RawPatternMatcher extends GenericPatternMatcher { 12public class RawPatternMatcher extends GenericPatternMatcher {
13 public RawPatternMatcher(GenericQuerySpecification<? extends GenericPatternMatcher> specification) { 13 public RawPatternMatcher(GenericQuerySpecification<? extends GenericPatternMatcher> specification) {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalCursor.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalCursor.java
index 1dc8f5db..53475218 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalCursor.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalCursor.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.ITuple; 8import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
9import tools.refinery.store.map.Cursor; 9import tools.refinery.store.map.Cursor;
10import tools.refinery.store.tuple.Tuple; 10import tools.refinery.store.tuple.Tuple;
11 11
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalViatraMatcher.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalViatraMatcher.java
index ac95dcc0..da75e864 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalViatraMatcher.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/RelationalViatraMatcher.java
@@ -5,10 +5,10 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask; 8import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
9import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; 9import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
10import org.eclipse.viatra.query.runtime.rete.index.Indexer; 10import tools.refinery.viatra.runtime.rete.index.Indexer;
11import org.eclipse.viatra.query.runtime.rete.matcher.RetePatternMatcher; 11import tools.refinery.viatra.runtime.rete.matcher.RetePatternMatcher;
12import tools.refinery.store.map.Cursor; 12import tools.refinery.store.map.Cursor;
13import tools.refinery.store.map.Cursors; 13import tools.refinery.store.map.Cursors;
14import tools.refinery.store.query.dnf.RelationalQuery; 14import tools.refinery.store.query.dnf.RelationalQuery;
@@ -18,9 +18,9 @@ import tools.refinery.store.tuple.Tuple;
18/** 18/**
19 * Directly access the tuples inside a VIATRA pattern matcher.<p> 19 * Directly access the tuples inside a VIATRA pattern matcher.<p>
20 * This class neglects calling 20 * This class neglects calling
21 * {@link org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext#wrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)} 21 * {@link tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext#wrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)}
22 * and 22 * and
23 * {@link org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext#unwrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)}, 23 * {@link tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext#unwrapTuple(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple)},
24 * because {@link tools.refinery.store.query.viatra.internal.context.RelationalRuntimeContext} provides a trivial 24 * because {@link tools.refinery.store.query.viatra.internal.context.RelationalRuntimeContext} provides a trivial
25 * implementation for these methods. 25 * implementation for these methods.
26 * Using this class with any other runtime context may lead to undefined behavior. 26 * Using this class with any other runtime context may lead to undefined behavior.
@@ -37,7 +37,7 @@ public class RelationalViatraMatcher extends AbstractViatraMatcher<Boolean> {
37 emptyMask = TupleMask.empty(arity); 37 emptyMask = TupleMask.empty(arity);
38 identityMask = TupleMask.identity(arity); 38 identityMask = TupleMask.identity(arity);
39 if (backend instanceof RetePatternMatcher reteBackend) { 39 if (backend instanceof RetePatternMatcher reteBackend) {
40 emptyMaskIndexer = IndexerUtils.getIndexer(reteBackend, emptyMask); 40 emptyMaskIndexer = reteBackend.getInternalIndexer(emptyMask);
41 } else { 41 } else {
42 emptyMaskIndexer = null; 42 emptyMaskIndexer = null;
43 } 43 }
@@ -73,7 +73,7 @@ public class RelationalViatraMatcher extends AbstractViatraMatcher<Boolean> {
73 } 73 }
74 74
75 @Override 75 @Override
76 public void update(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple updateElement, boolean isInsertion) { 76 public void update(tools.refinery.viatra.runtime.matchers.tuple.Tuple updateElement, boolean isInsertion) {
77 var key = MatcherUtils.toRefineryTuple(updateElement); 77 var key = MatcherUtils.toRefineryTuple(updateElement);
78 notifyChange(key, !isInsertion, isInsertion); 78 notifyChange(key, !isInsertion, isInsertion);
79 } 79 }
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/UnsafeFunctionalCursor.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/UnsafeFunctionalCursor.java
index b0b507fe..093ade96 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/UnsafeFunctionalCursor.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/matcher/UnsafeFunctionalCursor.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.ITuple; 8import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
9import tools.refinery.store.map.Cursor; 9import tools.refinery.store.map.Cursor;
10import tools.refinery.store.tuple.Tuple; 10import tools.refinery.store.tuple.Tuple;
11 11
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/AssumptionEvaluator.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/CheckEvaluator.java
index cf127291..ada154d4 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/AssumptionEvaluator.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/CheckEvaluator.java
@@ -5,11 +5,11 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; 8import tools.refinery.viatra.runtime.matchers.psystem.IValueProvider;
9import tools.refinery.store.query.term.Term; 9import tools.refinery.store.query.term.Term;
10 10
11class AssumptionEvaluator extends TermEvaluator<Boolean> { 11class CheckEvaluator extends TermEvaluator<Boolean> {
12 public AssumptionEvaluator(Term<Boolean> term) { 12 public CheckEvaluator(Term<Boolean> term) {
13 super(term); 13 super(term);
14 } 14 }
15 15
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/Dnf2PQuery.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/Dnf2PQuery.java
index 5b0ea61d..492bd054 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/Dnf2PQuery.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/Dnf2PQuery.java
@@ -5,24 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory; 8import tools.refinery.store.query.Constraint;
9import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
10import org.eclipse.viatra.query.runtime.matchers.context.IInputKey;
11import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
12import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
13import org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.BoundAggregator;
14import org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
15import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
16import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.*;
17import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
18import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
19import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
21import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
22import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
23import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery;
24import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
25import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
26import tools.refinery.store.query.dnf.Dnf; 9import tools.refinery.store.query.dnf.Dnf;
27import tools.refinery.store.query.dnf.DnfClause; 10import tools.refinery.store.query.dnf.DnfClause;
28import tools.refinery.store.query.dnf.SymbolicParameter; 11import tools.refinery.store.query.dnf.SymbolicParameter;
@@ -33,17 +16,33 @@ import tools.refinery.store.query.term.StatelessAggregator;
33import tools.refinery.store.query.term.Variable; 16import tools.refinery.store.query.term.Variable;
34import tools.refinery.store.query.view.AnySymbolView; 17import tools.refinery.store.query.view.AnySymbolView;
35import tools.refinery.store.util.CycleDetectingMapper; 18import tools.refinery.store.util.CycleDetectingMapper;
36 19import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
37import java.util.*; 20import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
21import tools.refinery.viatra.runtime.matchers.context.IInputKey;
22import tools.refinery.viatra.runtime.matchers.psystem.PBody;
23import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
24import tools.refinery.viatra.runtime.matchers.psystem.aggregations.BoundAggregator;
25import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
26import tools.refinery.viatra.runtime.matchers.psystem.annotations.PAnnotation;
27import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.*;
28import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.*;
29import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.Connectivity;
30import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
31import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameterDirection;
32import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
33import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
34import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
35
36import java.util.ArrayList;
37import java.util.HashMap;
38import java.util.List;
39import java.util.Map;
38import java.util.function.Function; 40import java.util.function.Function;
39import java.util.stream.Collectors;
40 41
41public class Dnf2PQuery { 42public class Dnf2PQuery {
42 private static final Object P_CONSTRAINT_LOCK = new Object();
43 private final CycleDetectingMapper<Dnf, RawPQuery> mapper = new CycleDetectingMapper<>(Dnf::name, 43 private final CycleDetectingMapper<Dnf, RawPQuery> mapper = new CycleDetectingMapper<>(Dnf::name,
44 this::doTranslate); 44 this::doTranslate);
45 private final QueryWrapperFactory wrapperFactory = new QueryWrapperFactory(this); 45 private final QueryWrapperFactory wrapperFactory = new QueryWrapperFactory(this);
46 private final Map<Dnf, QueryEvaluationHint> hintOverrides = new LinkedHashMap<>();
47 private Function<Dnf, QueryEvaluationHint> computeHint = dnf -> new QueryEvaluationHint(null, 46 private Function<Dnf, QueryEvaluationHint> computeHint = dnf -> new QueryEvaluationHint(null,
48 (IQueryBackendFactory) null); 47 (IQueryBackendFactory) null);
49 48
@@ -59,36 +58,15 @@ public class Dnf2PQuery {
59 return wrapperFactory.getSymbolViews(); 58 return wrapperFactory.getSymbolViews();
60 } 59 }
61 60
62 public void hint(Dnf dnf, QueryEvaluationHint hint) {
63 hintOverrides.compute(dnf, (ignoredKey, existingHint) ->
64 existingHint == null ? hint : existingHint.overrideBy(hint));
65 }
66
67 private QueryEvaluationHint consumeHint(Dnf dnf) {
68 var defaultHint = computeHint.apply(dnf);
69 var existingHint = hintOverrides.remove(dnf);
70 return defaultHint.overrideBy(existingHint);
71 }
72
73 public void assertNoUnusedHints() {
74 if (hintOverrides.isEmpty()) {
75 return;
76 }
77 var unusedHints = hintOverrides.keySet().stream().map(Dnf::name).collect(Collectors.joining(", "));
78 throw new IllegalStateException(
79 "Unused query evaluation hints for %s. Hints must be set before a query is added to the engine"
80 .formatted(unusedHints));
81 }
82
83 private RawPQuery doTranslate(Dnf dnfQuery) { 61 private RawPQuery doTranslate(Dnf dnfQuery) {
84 var pQuery = new RawPQuery(dnfQuery.getUniqueName()); 62 var pQuery = new RawPQuery(dnfQuery.getUniqueName());
85 pQuery.setEvaluationHints(consumeHint(dnfQuery)); 63 pQuery.setEvaluationHints(computeHint.apply(dnfQuery));
86 64
87 Map<SymbolicParameter, PParameter> parameters = new HashMap<>(); 65 Map<SymbolicParameter, PParameter> parameters = new HashMap<>();
88 List<PParameter> parameterList = new ArrayList<>(); 66 List<PParameter> parameterList = new ArrayList<>();
89 for (var parameter : dnfQuery.getSymbolicParameters()) { 67 for (var parameter : dnfQuery.getSymbolicParameters()) {
90 var direction = switch (parameter.getDirection()) { 68 var direction = switch (parameter.getDirection()) {
91 case OUT -> parameter.isUnifiable() ? PParameterDirection.INOUT : PParameterDirection.OUT; 69 case OUT -> PParameterDirection.INOUT;
92 case IN -> throw new IllegalArgumentException("Query %s with input parameter %s is not supported" 70 case IN -> throw new IllegalArgumentException("Query %s with input parameter %s is not supported"
93 .formatted(dnfQuery, parameter.getVariable())); 71 .formatted(dnfQuery, parameter.getVariable()));
94 }; 72 };
@@ -110,22 +88,17 @@ public class Dnf2PQuery {
110 pQuery.addAnnotation(functionalDependencyAnnotation); 88 pQuery.addAnnotation(functionalDependencyAnnotation);
111 } 89 }
112 90
113 // The constructor of {@link org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint} mutates 91 for (DnfClause clause : dnfQuery.getClauses()) {
114 // global static state (<code>nextID</code>) without locking. Therefore, we need to synchronize before creating 92 PBody body = new PBody(pQuery);
115 // any query literals to avoid a data race. 93 List<ExportedParameter> parameterExports = new ArrayList<>();
116 synchronized (P_CONSTRAINT_LOCK) { 94 for (var parameter : dnfQuery.getSymbolicParameters()) {
117 for (DnfClause clause : dnfQuery.getClauses()) { 95 PVariable pVar = body.getOrCreateVariableByName(parameter.getVariable().getUniqueName());
118 PBody body = new PBody(pQuery); 96 parameterExports.add(new ExportedParameter(body, pVar, parameters.get(parameter)));
119 List<ExportedParameter> parameterExports = new ArrayList<>(); 97 }
120 for (var parameter : dnfQuery.getSymbolicParameters()) { 98 body.setSymbolicParameters(parameterExports);
121 PVariable pVar = body.getOrCreateVariableByName(parameter.getVariable().getUniqueName()); 99 pQuery.addBody(body);
122 parameterExports.add(new ExportedParameter(body, pVar, parameters.get(parameter))); 100 for (Literal literal : clause.literals()) {
123 } 101 translateLiteral(literal, body);
124 body.setSymbolicParameters(parameterExports);
125 pQuery.addBody(body);
126 for (Literal literal : clause.literals()) {
127 translateLiteral(literal, body);
128 }
129 } 102 }
130 } 103 }
131 104
@@ -141,21 +114,23 @@ public class Dnf2PQuery {
141 translateConstantLiteral(constantLiteral, body); 114 translateConstantLiteral(constantLiteral, body);
142 } else if (literal instanceof AssignLiteral<?> assignLiteral) { 115 } else if (literal instanceof AssignLiteral<?> assignLiteral) {
143 translateAssignLiteral(assignLiteral, body); 116 translateAssignLiteral(assignLiteral, body);
144 } else if (literal instanceof AssumeLiteral assumeLiteral) { 117 } else if (literal instanceof CheckLiteral checkLiteral) {
145 translateAssumeLiteral(assumeLiteral, body); 118 translateCheckLiteral(checkLiteral, body);
146 } else if (literal instanceof CountLiteral countLiteral) { 119 } else if (literal instanceof CountLiteral countLiteral) {
147 translateCountLiteral(countLiteral, body); 120 translateCountLiteral(countLiteral, body);
148 } else if (literal instanceof AggregationLiteral<?, ?> aggregationLiteral) { 121 } else if (literal instanceof AggregationLiteral<?, ?> aggregationLiteral) {
149 translateAggregationLiteral(aggregationLiteral, body); 122 translateAggregationLiteral(aggregationLiteral, body);
123 } else if (literal instanceof RepresentativeElectionLiteral representativeElectionLiteral) {
124 translateRepresentativeElectionLiteral(representativeElectionLiteral, body);
150 } else { 125 } else {
151 throw new IllegalArgumentException("Unknown literal: " + literal.toString()); 126 throw new IllegalArgumentException("Unknown literal: " + literal.toString());
152 } 127 }
153 } 128 }
154 129
155 private void translateEquivalenceLiteral(EquivalenceLiteral equivalenceLiteral, PBody body) { 130 private void translateEquivalenceLiteral(EquivalenceLiteral equivalenceLiteral, PBody body) {
156 PVariable varSource = body.getOrCreateVariableByName(equivalenceLiteral.left().getUniqueName()); 131 PVariable varSource = body.getOrCreateVariableByName(equivalenceLiteral.getLeft().getUniqueName());
157 PVariable varTarget = body.getOrCreateVariableByName(equivalenceLiteral.right().getUniqueName()); 132 PVariable varTarget = body.getOrCreateVariableByName(equivalenceLiteral.getRight().getUniqueName());
158 if (equivalenceLiteral.positive()) { 133 if (equivalenceLiteral.isPositive()) {
159 new Equality(body, varSource, varTarget); 134 new Equality(body, varSource, varTarget);
160 } else { 135 } else {
161 new Inequality(body, varSource, varTarget); 136 new Inequality(body, varSource, varTarget);
@@ -180,15 +155,7 @@ public class Dnf2PQuery {
180 } 155 }
181 case TRANSITIVE -> { 156 case TRANSITIVE -> {
182 var substitution = translateSubstitution(callLiteral.getArguments(), body); 157 var substitution = translateSubstitution(callLiteral.getArguments(), body);
183 var constraint = callLiteral.getTarget(); 158 var pattern = wrapConstraintWithIdentityArguments(callLiteral.getTarget());
184 PQuery pattern;
185 if (constraint instanceof Dnf dnf) {
186 pattern = translate(dnf);
187 } else if (constraint instanceof AnySymbolView symbolView) {
188 pattern = wrapperFactory.wrapSymbolViewIdentityArguments(symbolView);
189 } else {
190 throw new IllegalArgumentException("Unknown Constraint: " + constraint);
191 }
192 new BinaryTransitiveClosure(body, substitution, pattern); 159 new BinaryTransitiveClosure(body, substitution, pattern);
193 } 160 }
194 case NEGATIVE -> { 161 case NEGATIVE -> {
@@ -201,6 +168,16 @@ public class Dnf2PQuery {
201 } 168 }
202 } 169 }
203 170
171 private PQuery wrapConstraintWithIdentityArguments(Constraint constraint) {
172 if (constraint instanceof Dnf dnf) {
173 return translate(dnf);
174 } else if (constraint instanceof AnySymbolView symbolView) {
175 return wrapperFactory.wrapSymbolViewIdentityArguments(symbolView);
176 } else {
177 throw new IllegalArgumentException("Unknown Constraint: " + constraint);
178 }
179 }
180
204 private static Tuple translateSubstitution(List<Variable> substitution, PBody body) { 181 private static Tuple translateSubstitution(List<Variable> substitution, PBody body) {
205 int arity = substitution.size(); 182 int arity = substitution.size();
206 Object[] variables = new Object[arity]; 183 Object[] variables = new Object[arity];
@@ -212,13 +189,13 @@ public class Dnf2PQuery {
212 } 189 }
213 190
214 private void translateConstantLiteral(ConstantLiteral constantLiteral, PBody body) { 191 private void translateConstantLiteral(ConstantLiteral constantLiteral, PBody body) {
215 var variable = body.getOrCreateVariableByName(constantLiteral.variable().getUniqueName()); 192 var variable = body.getOrCreateVariableByName(constantLiteral.getVariable().getUniqueName());
216 new ConstantValue(body, variable, constantLiteral.nodeId()); 193 new ConstantValue(body, variable, tools.refinery.store.tuple.Tuple.of(constantLiteral.getNodeId()));
217 } 194 }
218 195
219 private <T> void translateAssignLiteral(AssignLiteral<T> assignLiteral, PBody body) { 196 private <T> void translateAssignLiteral(AssignLiteral<T> assignLiteral, PBody body) {
220 var variable = body.getOrCreateVariableByName(assignLiteral.variable().getUniqueName()); 197 var variable = body.getOrCreateVariableByName(assignLiteral.getVariable().getUniqueName());
221 var term = assignLiteral.term(); 198 var term = assignLiteral.getTerm();
222 if (term instanceof ConstantTerm<T> constantTerm) { 199 if (term instanceof ConstantTerm<T> constantTerm) {
223 new ConstantValue(body, variable, constantTerm.getValue()); 200 new ConstantValue(body, variable, constantTerm.getValue());
224 } else { 201 } else {
@@ -227,8 +204,8 @@ public class Dnf2PQuery {
227 } 204 }
228 } 205 }
229 206
230 private void translateAssumeLiteral(AssumeLiteral assumeLiteral, PBody body) { 207 private void translateCheckLiteral(CheckLiteral checkLiteral, PBody body) {
231 var evaluator = new AssumptionEvaluator(assumeLiteral.term()); 208 var evaluator = new CheckEvaluator(checkLiteral.getTerm());
232 new ExpressionEvaluation(body, evaluator, null); 209 new ExpressionEvaluation(body, evaluator, null);
233 } 210 }
234 211
@@ -263,4 +240,14 @@ public class Dnf2PQuery {
263 new AggregatorConstraint(boundAggregator, body, substitution, wrappedCall.pattern(), resultVariable, 240 new AggregatorConstraint(boundAggregator, body, substitution, wrappedCall.pattern(), resultVariable,
264 aggregatedColumn); 241 aggregatedColumn);
265 } 242 }
243
244 private void translateRepresentativeElectionLiteral(RepresentativeElectionLiteral literal, PBody body) {
245 var substitution = translateSubstitution(literal.getArguments(), body);
246 var pattern = wrapConstraintWithIdentityArguments(literal.getTarget());
247 var connectivity = switch (literal.getConnectivity()) {
248 case WEAK -> Connectivity.WEAK;
249 case STRONG -> Connectivity.STRONG;
250 };
251 new RepresentativeElectionConstraint(body, substitution, pattern, connectivity);
252 }
266} 253}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/QueryWrapperFactory.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/QueryWrapperFactory.java
index 2b7280f2..d21131e5 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/QueryWrapperFactory.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/QueryWrapperFactory.java
@@ -5,17 +5,17 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 8import tools.refinery.viatra.runtime.matchers.context.IInputKey;
9import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; 9import tools.refinery.viatra.runtime.matchers.psystem.PBody;
10import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; 10import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
11import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; 11import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
12import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; 12import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
13import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 13import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
14import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 14import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
15import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery; 15import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
16import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; 16import tools.refinery.viatra.runtime.matchers.psystem.queries.PVisibility;
17import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; 17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; 18import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
19import tools.refinery.store.query.Constraint; 19import tools.refinery.store.query.Constraint;
20import tools.refinery.store.query.dnf.Dnf; 20import tools.refinery.store.query.dnf.Dnf;
21import tools.refinery.store.query.dnf.DnfUtils; 21import tools.refinery.store.query.dnf.DnfUtils;
@@ -33,7 +33,7 @@ class QueryWrapperFactory {
33 private final Dnf2PQuery dnf2PQuery; 33 private final Dnf2PQuery dnf2PQuery;
34 private final Map<AnySymbolView, SymbolViewWrapper> view2WrapperMap = new LinkedHashMap<>(); 34 private final Map<AnySymbolView, SymbolViewWrapper> view2WrapperMap = new LinkedHashMap<>();
35 private final CycleDetectingMapper<RemappedConstraint, RawPQuery> wrapConstraint = new CycleDetectingMapper<>( 35 private final CycleDetectingMapper<RemappedConstraint, RawPQuery> wrapConstraint = new CycleDetectingMapper<>(
36 RemappedConstraint::toString, this::doWrapConstraint); 36 this::doWrapConstraint);
37 37
38 QueryWrapperFactory(Dnf2PQuery dnf2PQuery) { 38 QueryWrapperFactory(Dnf2PQuery dnf2PQuery) {
39 this.dnf2PQuery = dnf2PQuery; 39 this.dnf2PQuery = dnf2PQuery;
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/RawPQuery.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/RawPQuery.java
index 255738c5..06644bf2 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/RawPQuery.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/RawPQuery.java
@@ -5,14 +5,14 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.api.GenericQuerySpecification; 8import tools.refinery.viatra.runtime.api.GenericQuerySpecification;
9import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; 9import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
10import org.eclipse.viatra.query.runtime.api.scope.QueryScope; 10import tools.refinery.viatra.runtime.api.scope.QueryScope;
11import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; 11import tools.refinery.viatra.runtime.matchers.psystem.PBody;
12import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; 12import tools.refinery.viatra.runtime.matchers.psystem.annotations.PAnnotation;
13import org.eclipse.viatra.query.runtime.matchers.psystem.queries.BasePQuery; 13import tools.refinery.viatra.runtime.matchers.psystem.queries.BasePQuery;
14import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 14import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
15import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; 15import tools.refinery.viatra.runtime.matchers.psystem.queries.PVisibility;
16import tools.refinery.store.query.viatra.internal.RelationalScope; 16import tools.refinery.store.query.viatra.internal.RelationalScope;
17import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher; 17import tools.refinery.store.query.viatra.internal.matcher.RawPatternMatcher;
18 18
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatefulMultisetAggregator.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatefulMultisetAggregator.java
index 461416f7..ba99cf9a 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatefulMultisetAggregator.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatefulMultisetAggregator.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator; 8import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
9import tools.refinery.store.query.term.StatefulAggregate; 9import tools.refinery.store.query.term.StatefulAggregate;
10import tools.refinery.store.query.term.StatefulAggregator; 10import tools.refinery.store.query.term.StatefulAggregator;
11 11
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatelessMultisetAggregator.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatelessMultisetAggregator.java
index 49175d75..bf2c2f4f 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatelessMultisetAggregator.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/StatelessMultisetAggregator.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator; 8import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
9import tools.refinery.store.query.term.StatelessAggregator; 9import tools.refinery.store.query.term.StatelessAggregator;
10 10
11import java.util.stream.Stream; 11import java.util.stream.Stream;
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/SymbolViewWrapper.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/SymbolViewWrapper.java
index a777613e..a774404e 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/SymbolViewWrapper.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/SymbolViewWrapper.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.context.common.BaseInputKeyWrapper; 8import tools.refinery.viatra.runtime.matchers.context.common.BaseInputKeyWrapper;
9import tools.refinery.store.query.view.AnySymbolView; 9import tools.refinery.store.query.view.AnySymbolView;
10 10
11public class SymbolViewWrapper extends BaseInputKeyWrapper<AnySymbolView> { 11public class SymbolViewWrapper extends BaseInputKeyWrapper<AnySymbolView> {
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/TermEvaluator.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/TermEvaluator.java
index 1187f57a..d064ff2c 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/TermEvaluator.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/TermEvaluator.java
@@ -5,10 +5,10 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
9import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
10import tools.refinery.store.query.term.Term; 8import tools.refinery.store.query.term.Term;
11import tools.refinery.store.query.term.Variable; 9import tools.refinery.store.query.term.Variable;
10import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
11import tools.refinery.viatra.runtime.matchers.psystem.IValueProvider;
12 12
13import java.util.stream.Collectors; 13import java.util.stream.Collectors;
14 14
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/ValueProviderBasedValuation.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/ValueProviderBasedValuation.java
index 62cb8b3a..b9ae8ab2 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/ValueProviderBasedValuation.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/pquery/ValueProviderBasedValuation.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.pquery; 6package tools.refinery.store.query.viatra.internal.pquery;
7 7
8import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; 8import tools.refinery.viatra.runtime.matchers.psystem.IValueProvider;
9import tools.refinery.store.query.term.DataVariable; 9import tools.refinery.store.query.term.DataVariable;
10import tools.refinery.store.query.valuation.Valuation; 10import tools.refinery.store.query.valuation.Valuation;
11 11
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/ModelUpdateListener.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/ModelUpdateListener.java
index 986bb0b1..e1bc9efc 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/ModelUpdateListener.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/ModelUpdateListener.java
@@ -5,9 +5,9 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.update; 6package tools.refinery.store.query.viatra.internal.update;
7 7
8import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 8import tools.refinery.viatra.runtime.matchers.context.IInputKey;
9import org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContextListener; 9import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContextListener;
10import org.eclipse.viatra.query.runtime.matchers.tuple.ITuple; 10import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
11import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 11import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
12import tools.refinery.store.query.view.AnySymbolView; 12import tools.refinery.store.query.view.AnySymbolView;
13import tools.refinery.store.query.view.SymbolView; 13import tools.refinery.store.query.view.SymbolView;
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/RelationViewFilter.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/RelationViewFilter.java
index efdbfcbe..73c4a3f9 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/RelationViewFilter.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/RelationViewFilter.java
@@ -5,10 +5,10 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.update; 6package tools.refinery.store.query.viatra.internal.update;
7 7
8import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 8import tools.refinery.viatra.runtime.matchers.context.IInputKey;
9import org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContextListener; 9import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContextListener;
10import org.eclipse.viatra.query.runtime.matchers.tuple.ITuple; 10import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
11import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; 11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12 12
13import java.util.Arrays; 13import java.util.Arrays;
14import java.util.Objects; 14import java.util.Objects;
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/SymbolViewUpdateListener.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/SymbolViewUpdateListener.java
index f1a2ac7c..d0cdda72 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/SymbolViewUpdateListener.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/SymbolViewUpdateListener.java
@@ -5,10 +5,10 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.update; 6package tools.refinery.store.query.viatra.internal.update;
7 7
8import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 8import tools.refinery.viatra.runtime.matchers.context.IInputKey;
9import org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContextListener; 9import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContextListener;
10import org.eclipse.viatra.query.runtime.matchers.tuple.ITuple; 10import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
11import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; 11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12import tools.refinery.store.model.Interpretation; 12import tools.refinery.store.model.Interpretation;
13import tools.refinery.store.model.InterpretationListener; 13import tools.refinery.store.model.InterpretationListener;
14import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 14import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TupleChangingViewUpdateListener.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TupleChangingViewUpdateListener.java
index 45d35571..5577faa3 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TupleChangingViewUpdateListener.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TupleChangingViewUpdateListener.java
@@ -5,11 +5,11 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.update; 6package tools.refinery.store.query.viatra.internal.update;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
9import tools.refinery.store.model.Interpretation; 8import tools.refinery.store.model.Interpretation;
10import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 9import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
11import tools.refinery.store.query.view.SymbolView; 10import tools.refinery.store.query.view.SymbolView;
12import tools.refinery.store.tuple.Tuple; 11import tools.refinery.store.tuple.Tuple;
12import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
13 13
14import java.util.Arrays; 14import java.util.Arrays;
15 15
@@ -27,18 +27,19 @@ public class TupleChangingViewUpdateListener<T> extends SymbolViewUpdateListener
27 boolean fromPresent = view.filter(key, fromValue); 27 boolean fromPresent = view.filter(key, fromValue);
28 boolean toPresent = view.filter(key, toValue); 28 boolean toPresent = view.filter(key, toValue);
29 if (fromPresent) { 29 if (fromPresent) {
30 var fromArray = view.forwardMap(key, fromValue);
30 if (toPresent) { // value change 31 if (toPresent) { // value change
31 var fromArray = view.forwardMap(key, fromValue);
32 var toArray = view.forwardMap(key, toValue); 32 var toArray = view.forwardMap(key, toValue);
33 if (!Arrays.equals(fromArray, toArray)) { 33 if (!Arrays.equals(fromArray, toArray)) {
34 processUpdate(Tuples.flatTupleOf(fromArray), false); 34 processUpdate(Tuples.flatTupleOf(fromArray), false);
35 processUpdate(Tuples.flatTupleOf(toArray), true); 35 processUpdate(Tuples.flatTupleOf(toArray), true);
36 } 36 }
37 } else { // fromValue disappears 37 } else { // fromValue disappears
38 processUpdate(Tuples.flatTupleOf(view.forwardMap(key, fromValue)), false); 38 processUpdate(Tuples.flatTupleOf(fromArray), false);
39 } 39 }
40 } else if (toPresent) { // toValue appears 40 } else if (toPresent) { // toValue appears
41 processUpdate(Tuples.flatTupleOf(view.forwardMap(key, toValue)), true); 41 var toArray = view.forwardMap(key, toValue);
42 processUpdate(Tuples.flatTupleOf(toArray), true);
42 } 43 }
43 } 44 }
44} 45}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TuplePreservingViewUpdateListener.java b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TuplePreservingViewUpdateListener.java
index c18dbafb..7dbd50b3 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TuplePreservingViewUpdateListener.java
+++ b/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/update/TuplePreservingViewUpdateListener.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.update; 6package tools.refinery.store.query.viatra.internal.update;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; 8import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
9import tools.refinery.store.model.Interpretation; 9import tools.refinery.store.model.Interpretation;
10import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl; 10import tools.refinery.store.query.viatra.internal.ViatraModelQueryAdapterImpl;
11import tools.refinery.store.query.view.TuplePreservingView; 11import tools.refinery.store.query.view.TuplePreservingView;
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/DiagonalQueryTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/DiagonalQueryTest.java
index 6aae2ebe..85bdc204 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/DiagonalQueryTest.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/DiagonalQueryTest.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra; 6package tools.refinery.store.query.viatra;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 8import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
9import tools.refinery.store.model.ModelStore; 9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.ModelQueryAdapter; 10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.dnf.Dnf; 11import tools.refinery.store.query.dnf.Dnf;
@@ -98,6 +98,7 @@ class DiagonalQueryTest {
98 .build(); 98 .build();
99 99
100 var model = store.createEmptyModel(); 100 var model = store.createEmptyModel();
101
101 var personInterpretation = model.getInterpretation(person); 102 var personInterpretation = model.getInterpretation(person);
102 var symbolInterpretation = model.getInterpretation(symbol); 103 var symbolInterpretation = model.getInterpretation(symbol);
103 var queryEngine = model.getAdapter(ModelQueryAdapter.class); 104 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/FunctionalQueryTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/FunctionalQueryTest.java
index 258127e7..7190d8f1 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/FunctionalQueryTest.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/FunctionalQueryTest.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra; 6package tools.refinery.store.query.viatra;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 8import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
9import tools.refinery.store.map.Cursor; 9import tools.refinery.store.map.Cursor;
10import tools.refinery.store.model.ModelStore; 10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.ModelQueryAdapter; 11import tools.refinery.store.query.ModelQueryAdapter;
@@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.is;
29import static org.hamcrest.Matchers.nullValue; 29import static org.hamcrest.Matchers.nullValue;
30import static org.junit.jupiter.api.Assertions.assertAll; 30import static org.junit.jupiter.api.Assertions.assertAll;
31import static org.junit.jupiter.api.Assertions.assertThrows; 31import static org.junit.jupiter.api.Assertions.assertThrows;
32import static tools.refinery.store.query.literal.Literals.assume; 32import static tools.refinery.store.query.literal.Literals.check;
33import static tools.refinery.store.query.term.int_.IntTerms.*; 33import static tools.refinery.store.query.term.int_.IntTerms.*;
34import static tools.refinery.store.query.viatra.tests.QueryAssertions.assertNullableResults; 34import static tools.refinery.store.query.viatra.tests.QueryAssertions.assertNullableResults;
35import static tools.refinery.store.query.viatra.tests.QueryAssertions.assertResults; 35import static tools.refinery.store.query.viatra.tests.QueryAssertions.assertResults;
@@ -390,7 +390,7 @@ class FunctionalQueryTest {
390 var query = Query.of("InvalidAssume", (builder, p1) -> builder.clause(Integer.class, (x) -> List.of( 390 var query = Query.of("InvalidAssume", (builder, p1) -> builder.clause(Integer.class, (x) -> List.of(
391 personView.call(p1), 391 personView.call(p1),
392 ageView.call(p1, x), 392 ageView.call(p1, x),
393 assume(lessEq(div(constant(120), x), constant(5))) 393 check(lessEq(div(constant(120), x), constant(5)))
394 ))); 394 )));
395 395
396 var store = ModelStore.builder() 396 var store = ModelStore.builder()
@@ -424,6 +424,42 @@ class FunctionalQueryTest {
424 } 424 }
425 425
426 @QueryEngineTest 426 @QueryEngineTest
427 void multipleAssignmentTest(QueryEvaluationHint hint) {
428 var query = Query.of("MultipleAssignment", Integer.class, (builder, p1, p2, output) -> builder
429 .clause(Integer.class, Integer.class, (x1, x2) -> List.of(
430 ageView.call(p1, x1),
431 ageView.call(p2, x2),
432 output.assign(mul(x1, constant(2))),
433 output.assign(mul(x2, constant(3)))
434 )));
435
436 var store = ModelStore.builder()
437 .symbols(age)
438 .with(ViatraModelQueryAdapter.builder()
439 .defaultHint(hint)
440 .queries(query))
441 .build();
442
443 var model = store.createEmptyModel();
444 var ageInterpretation = model.getInterpretation(age);
445 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
446 var queryResultSet = queryEngine.getResultSet(query);
447
448 ageInterpretation.put(Tuple.of(0), 3);
449 ageInterpretation.put(Tuple.of(1), 2);
450 ageInterpretation.put(Tuple.of(2), 15);
451 ageInterpretation.put(Tuple.of(3), 10);
452
453 queryEngine.flushChanges();
454 assertNullableResults(Map.of(
455 Tuple.of(0, 1), Optional.of(6),
456 Tuple.of(1, 0), Optional.empty(),
457 Tuple.of(2, 3), Optional.of(30),
458 Tuple.of(3, 2), Optional.empty()
459 ), queryResultSet);
460 }
461
462 @QueryEngineTest
427 void notFunctionalTest(QueryEvaluationHint hint) { 463 void notFunctionalTest(QueryEvaluationHint hint) {
428 var query = Query.of("NotFunctional", Integer.class, (builder, p1, output) -> builder.clause((p2) -> List.of( 464 var query = Query.of("NotFunctional", Integer.class, (builder, p1, output) -> builder.clause((p2) -> List.of(
429 personView.call(p1), 465 personView.call(p1),
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTest.java
index 25bcb0dc..ce403e3a 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTest.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTest.java
@@ -5,11 +5,13 @@
5 */ 5 */
6package tools.refinery.store.query.viatra; 6package tools.refinery.store.query.viatra;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 8import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
9import org.junit.jupiter.api.Test; 9import org.junit.jupiter.api.Test;
10import tools.refinery.store.model.ModelStore; 10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.ModelQueryAdapter; 11import tools.refinery.store.query.ModelQueryAdapter;
12import tools.refinery.store.query.dnf.Dnf;
12import tools.refinery.store.query.dnf.Query; 13import tools.refinery.store.query.dnf.Query;
14import tools.refinery.store.query.term.ParameterDirection;
13import tools.refinery.store.query.term.Variable; 15import tools.refinery.store.query.term.Variable;
14import tools.refinery.store.query.viatra.tests.QueryEngineTest; 16import tools.refinery.store.query.viatra.tests.QueryEngineTest;
15import tools.refinery.store.query.view.AnySymbolView; 17import tools.refinery.store.query.view.AnySymbolView;
@@ -23,7 +25,7 @@ import tools.refinery.store.tuple.Tuple;
23import java.util.List; 25import java.util.List;
24import java.util.Map; 26import java.util.Map;
25 27
26import static tools.refinery.store.query.literal.Literals.assume; 28import static tools.refinery.store.query.literal.Literals.check;
27import static tools.refinery.store.query.literal.Literals.not; 29import static tools.refinery.store.query.literal.Literals.not;
28import static tools.refinery.store.query.term.int_.IntTerms.constant; 30import static tools.refinery.store.query.term.int_.IntTerms.constant;
29import static tools.refinery.store.query.term.int_.IntTerms.greaterEq; 31import static tools.refinery.store.query.term.int_.IntTerms.greaterEq;
@@ -108,6 +110,44 @@ class QueryTest {
108 } 110 }
109 111
110 @QueryEngineTest 112 @QueryEngineTest
113 void isConstantTest(QueryEvaluationHint hint) {
114 var predicate = Query.of("RelationConstraint", (builder, p1, p2) -> builder.clause(
115 personView.call(p1),
116 p1.isConstant(1),
117 friendMustView.call(p1, p2)
118 ));
119
120 var store = ModelStore.builder()
121 .symbols(person, friend)
122 .with(ViatraModelQueryAdapter.builder()
123 .defaultHint(hint)
124 .queries(predicate))
125 .build();
126
127 var model = store.createEmptyModel();
128 var personInterpretation = model.getInterpretation(person);
129 var friendInterpretation = model.getInterpretation(friend);
130 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
131 var predicateResultSet = queryEngine.getResultSet(predicate);
132
133 personInterpretation.put(Tuple.of(0), true);
134 personInterpretation.put(Tuple.of(1), true);
135 personInterpretation.put(Tuple.of(2), true);
136
137 friendInterpretation.put(Tuple.of(0, 1), TruthValue.TRUE);
138 friendInterpretation.put(Tuple.of(1, 0), TruthValue.TRUE);
139 friendInterpretation.put(Tuple.of(1, 2), TruthValue.TRUE);
140
141 queryEngine.flushChanges();
142 assertResults(Map.of(
143 Tuple.of(0, 1), false,
144 Tuple.of(1, 0), true,
145 Tuple.of(1, 2), true,
146 Tuple.of(2, 1), false
147 ), predicateResultSet);
148 }
149
150 @QueryEngineTest
111 void existTest(QueryEvaluationHint hint) { 151 void existTest(QueryEvaluationHint hint) {
112 var predicate = Query.of("Exists", (builder, p1) -> builder.clause((p2) -> List.of( 152 var predicate = Query.of("Exists", (builder, p1) -> builder.clause((p2) -> List.of(
113 personView.call(p1), 153 personView.call(p1),
@@ -312,6 +352,53 @@ class QueryTest {
312 } 352 }
313 353
314 @QueryEngineTest 354 @QueryEngineTest
355 void patternCallInputArgumentTest(QueryEvaluationHint hint) {
356 var friendPredicate = Dnf.of("Friend", builder -> {
357 var p1 = builder.parameter("p1", ParameterDirection.IN);
358 var p2 = builder.parameter("p2", ParameterDirection.IN);
359 builder.clause(
360 personView.call(p1),
361 personView.call(p2),
362 friendMustView.call(p1, p2)
363 );
364 });
365 var predicate = Query.of("PositivePatternCall", (builder, p3, p4) -> builder.clause(
366 personView.call(p3),
367 personView.call(p4),
368 friendPredicate.call(p3, p4)
369 ));
370
371 var store = ModelStore.builder()
372 .symbols(person, friend)
373 .with(ViatraModelQueryAdapter.builder()
374 .defaultHint(hint)
375 .queries(predicate))
376 .build();
377
378 var model = store.createEmptyModel();
379 var personInterpretation = model.getInterpretation(person);
380 var friendInterpretation = model.getInterpretation(friend);
381 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
382 var predicateResultSet = queryEngine.getResultSet(predicate);
383
384 personInterpretation.put(Tuple.of(0), true);
385 personInterpretation.put(Tuple.of(1), true);
386 personInterpretation.put(Tuple.of(2), true);
387
388 friendInterpretation.put(Tuple.of(0, 1), TruthValue.TRUE);
389 friendInterpretation.put(Tuple.of(1, 0), TruthValue.TRUE);
390 friendInterpretation.put(Tuple.of(1, 2), TruthValue.TRUE);
391
392 queryEngine.flushChanges();
393 assertResults(Map.of(
394 Tuple.of(0, 1), true,
395 Tuple.of(1, 0), true,
396 Tuple.of(1, 2), true,
397 Tuple.of(2, 1), false
398 ), predicateResultSet);
399 }
400
401 @QueryEngineTest
315 void negativeRelationViewTest(QueryEvaluationHint hint) { 402 void negativeRelationViewTest(QueryEvaluationHint hint) {
316 var predicate = Query.of("NegativePatternCall", (builder, p1, p2) -> builder.clause( 403 var predicate = Query.of("NegativePatternCall", (builder, p1, p2) -> builder.clause(
317 personView.call(p1), 404 personView.call(p1),
@@ -652,7 +739,7 @@ class QueryTest {
652 var query = Query.of("Constraint", (builder, p1) -> builder.clause(Integer.class, (x) -> List.of( 739 var query = Query.of("Constraint", (builder, p1) -> builder.clause(Integer.class, (x) -> List.of(
653 personView.call(p1), 740 personView.call(p1),
654 ageView.call(p1, x), 741 ageView.call(p1, x),
655 assume(greaterEq(x, constant(18))) 742 check(greaterEq(x, constant(18)))
656 ))); 743 )));
657 744
658 var store = ModelStore.builder() 745 var store = ModelStore.builder()
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTransactionTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTransactionTest.java
index 32f51cf0..3f8c060a 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTransactionTest.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/QueryTransactionTest.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra; 6package tools.refinery.store.query.viatra;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 8import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
9import org.junit.jupiter.api.Test; 9import org.junit.jupiter.api.Test;
10import tools.refinery.store.model.ModelStore; 10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.ModelQueryAdapter; 11import tools.refinery.store.query.ModelQueryAdapter;
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/StronglyConnectedComponentsTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/StronglyConnectedComponentsTest.java
new file mode 100644
index 00000000..37795ff3
--- /dev/null
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/StronglyConnectedComponentsTest.java
@@ -0,0 +1,261 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.viatra;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.literal.Connectivity;
13import tools.refinery.store.query.literal.RepresentativeElectionLiteral;
14import tools.refinery.store.query.view.AnySymbolView;
15import tools.refinery.store.query.view.KeyOnlyView;
16import tools.refinery.store.representation.Symbol;
17import tools.refinery.store.tuple.Tuple;
18
19import java.util.List;
20import java.util.Map;
21
22import static org.hamcrest.MatcherAssert.assertThat;
23import static org.hamcrest.Matchers.is;
24import static tools.refinery.store.query.viatra.tests.QueryAssertions.assertResults;
25
26class StronglyConnectedComponentsTest {
27 private static final Symbol<Boolean> friend = Symbol.of("friend", 2);
28 private static final AnySymbolView friendView = new KeyOnlyView<>(friend);
29
30 @Test
31 void symbolViewTest() {
32 var query = Query.of("SymbolViewRepresentative", (builder, p1, p2) -> builder
33 .clause(v1 -> List.of(
34 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p1, v1),
35 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p2, v1)
36 )));
37
38 var store = ModelStore.builder()
39 .symbols(friend)
40 .with(ViatraModelQueryAdapter.builder()
41 .queries(query))
42 .build();
43
44 var model = store.createEmptyModel();
45 var friendInterpretation = model.getInterpretation(friend);
46 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
47 var resultSet = queryEngine.getResultSet(query);
48
49 friendInterpretation.put(Tuple.of(0, 1), true);
50 friendInterpretation.put(Tuple.of(1, 0), true);
51 friendInterpretation.put(Tuple.of(1, 2), true);
52 queryEngine.flushChanges();
53
54 assertResults(Map.of(
55 Tuple.of(0, 0), true,
56 Tuple.of(0, 1), true,
57 Tuple.of(1, 0), true,
58 Tuple.of(1, 1), true,
59 Tuple.of(2, 2), true
60 ), resultSet);
61 }
62
63 @Test
64 void symbolViewInsertTest() {
65 var query = Query.of("SymbolViewRepresentative", (builder, p1, p2) -> builder
66 .clause(v1 -> List.of(
67 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p1, v1),
68 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p2, v1)
69 )));
70
71 var store = ModelStore.builder()
72 .symbols(friend)
73 .with(ViatraModelQueryAdapter.builder()
74 .queries(query))
75 .build();
76
77 var model = store.createEmptyModel();
78 var friendInterpretation = model.getInterpretation(friend);
79 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
80 var resultSet = queryEngine.getResultSet(query);
81
82 friendInterpretation.put(Tuple.of(0, 1), true);
83 friendInterpretation.put(Tuple.of(1, 0), true);
84 friendInterpretation.put(Tuple.of(1, 2), true);
85 queryEngine.flushChanges();
86
87 friendInterpretation.put(Tuple.of(2, 0), true);
88 friendInterpretation.put(Tuple.of(0, 3), true);
89 queryEngine.flushChanges();
90
91 assertResults(Map.of(
92 Tuple.of(0, 0), true,
93 Tuple.of(0, 1), true,
94 Tuple.of(0, 2), true,
95 Tuple.of(1, 1), true,
96 Tuple.of(1, 0), true,
97 Tuple.of(1, 2), true,
98 Tuple.of(2, 0), true,
99 Tuple.of(2, 1), true,
100 Tuple.of(2, 2), true,
101 Tuple.of(3, 3), true
102 ), resultSet);
103 }
104
105 @Test
106 void symbolViewDeleteTest() {
107 var query = Query.of("SymbolViewRepresentative", (builder, p1, p2) -> builder
108 .clause(v1 -> List.of(
109 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p1, v1),
110 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p2, v1)
111 )));
112
113 var store = ModelStore.builder()
114 .symbols(friend)
115 .with(ViatraModelQueryAdapter.builder()
116 .queries(query))
117 .build();
118
119 var model = store.createEmptyModel();
120 var friendInterpretation = model.getInterpretation(friend);
121 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
122 var resultSet = queryEngine.getResultSet(query);
123
124 friendInterpretation.put(Tuple.of(0, 1), true);
125 friendInterpretation.put(Tuple.of(1, 0), true);
126 friendInterpretation.put(Tuple.of(1, 2), true);
127 queryEngine.flushChanges();
128
129 friendInterpretation.put(Tuple.of(1, 0), false);
130 friendInterpretation.put(Tuple.of(1, 2), false);
131 queryEngine.flushChanges();
132
133 assertResults(Map.of(
134 Tuple.of(0, 0), true,
135 Tuple.of(1, 1), true
136 ), resultSet);
137 }
138
139 @Test
140 void diagonalSymbolViewTest() {
141 var person = Symbol.of("Person", 1);
142 var personView = new KeyOnlyView<>(person);
143
144 var query = Query.of("SymbolViewRepresentative", (builder, p1) -> builder
145 .clause(
146 personView.call(p1),
147 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p1, p1)
148 ));
149
150 var store = ModelStore.builder()
151 .symbols(person, friend)
152 .with(ViatraModelQueryAdapter.builder()
153 .queries(query))
154 .build();
155
156 var model = store.createEmptyModel();
157 var personInterpretation = model.getInterpretation(person);
158 var friendInterpretation = model.getInterpretation(friend);
159 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
160 var resultSet = queryEngine.getResultSet(query);
161
162 personInterpretation.put(Tuple.of(0), true);
163 personInterpretation.put(Tuple.of(1), true);
164 personInterpretation.put(Tuple.of(2), true);
165
166 friendInterpretation.put(Tuple.of(0, 1), true);
167 friendInterpretation.put(Tuple.of(1, 0), true);
168 friendInterpretation.put(Tuple.of(1, 2), true);
169 queryEngine.flushChanges();
170
171 assertThat(resultSet.size(), is(2));
172 assertThat(resultSet.get(Tuple.of(2)), is(true));
173 }
174
175 @Test
176 void diagonalDnfTest() {
177 var person = Symbol.of("Person", 1);
178 var personView = new KeyOnlyView<>(person);
179
180 var subQuery = Query.of("SubQuery", (builder, p1, p2) -> builder
181 .clause(
182 personView.call(p1),
183 personView.call(p2),
184 friendView.call(p1, p2)
185 ))
186 .getDnf();
187 var query = Query.of("SymbolViewRepresentative", (builder, p1) -> builder
188 .clause(
189 personView.call(p1),
190 new RepresentativeElectionLiteral(Connectivity.STRONG, subQuery, p1, p1)
191 ));
192
193 var store = ModelStore.builder()
194 .symbols(person, friend)
195 .with(ViatraModelQueryAdapter.builder()
196 .queries(query))
197 .build();
198
199 var model = store.createEmptyModel();
200 var personInterpretation = model.getInterpretation(person);
201 var friendInterpretation = model.getInterpretation(friend);
202 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
203 var resultSet = queryEngine.getResultSet(query);
204
205 personInterpretation.put(Tuple.of(0), true);
206 personInterpretation.put(Tuple.of(1), true);
207 personInterpretation.put(Tuple.of(2), true);
208
209 friendInterpretation.put(Tuple.of(0, 1), true);
210 friendInterpretation.put(Tuple.of(1, 0), true);
211 friendInterpretation.put(Tuple.of(1, 2), true);
212 queryEngine.flushChanges();
213
214 assertThat(resultSet.size(), is(2));
215 assertThat(resultSet.get(Tuple.of(2)), is(true));
216 }
217
218 @Test
219 void loopTest() {
220 var query = Query.of("SymbolViewRepresentative", (builder, p1, p2) -> builder
221 .clause(v1 -> List.of(
222 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p1, v1),
223 new RepresentativeElectionLiteral(Connectivity.STRONG, friendView, p2, v1)
224 )));
225
226 var store = ModelStore.builder()
227 .symbols(friend)
228 .with(ViatraModelQueryAdapter.builder()
229 .queries(query))
230 .build();
231
232 var model = store.createEmptyModel();
233 var friendInterpretation = model.getInterpretation(friend);
234 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
235 var resultSet = queryEngine.getResultSet(query);
236
237 friendInterpretation.put(Tuple.of(0, 1), true);
238 friendInterpretation.put(Tuple.of(1, 2), true);
239 friendInterpretation.put(Tuple.of(2, 3), true);
240 friendInterpretation.put(Tuple.of(3, 0), true);
241 friendInterpretation.put(Tuple.of(3, 4), true);
242 queryEngine.flushChanges();
243
244 assertThat(resultSet.get(Tuple.of(0, 1)), is(true));
245 assertThat(resultSet.get(Tuple.of(1, 2)), is(true));
246 assertThat(resultSet.get(Tuple.of(2, 3)), is(true));
247 assertThat(resultSet.get(Tuple.of(3, 0)), is(true));
248 assertThat(resultSet.get(Tuple.of(3, 4)), is(false));
249
250 friendInterpretation.put(Tuple.of(2, 3), false);
251 queryEngine.flushChanges();
252
253 assertThat(resultSet.get(Tuple.of(0, 1)), is(false));
254 assertThat(resultSet.get(Tuple.of(0, 2)), is(false));
255 assertThat(resultSet.get(Tuple.of(0, 3)), is(false));
256 assertThat(resultSet.get(Tuple.of(1, 2)), is(false));
257 assertThat(resultSet.get(Tuple.of(2, 3)), is(false));
258 assertThat(resultSet.get(Tuple.of(3, 0)), is(false));
259 assertThat(resultSet.get(Tuple.of(3, 4)), is(false));
260 }
261}
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/WeaklyConnectedComponentsTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/WeaklyConnectedComponentsTest.java
new file mode 100644
index 00000000..613d4284
--- /dev/null
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/WeaklyConnectedComponentsTest.java
@@ -0,0 +1,188 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.viatra;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.literal.Connectivity;
13import tools.refinery.store.query.literal.RepresentativeElectionLiteral;
14import tools.refinery.store.query.view.AnySymbolView;
15import tools.refinery.store.query.view.KeyOnlyView;
16import tools.refinery.store.representation.Symbol;
17import tools.refinery.store.tuple.Tuple;
18
19import java.util.List;
20import java.util.Map;
21
22import static org.hamcrest.MatcherAssert.assertThat;
23import static org.hamcrest.Matchers.is;
24import static tools.refinery.store.query.viatra.tests.QueryAssertions.assertResults;
25
26class WeaklyConnectedComponentsTest {
27 private static final Symbol<Boolean> friend = Symbol.of("friend", 2);
28 private static final AnySymbolView friendView = new KeyOnlyView<>(friend);
29
30 @Test
31 void symbolViewTest() {
32 var query = Query.of("SymbolViewRepresentative", (builder, p1, p2) -> builder
33 .clause(v1 -> List.of(
34 new RepresentativeElectionLiteral(Connectivity.WEAK, friendView, p1, v1),
35 new RepresentativeElectionLiteral(Connectivity.WEAK, friendView, p2, v1)
36 )));
37
38 var store = ModelStore.builder()
39 .symbols(friend)
40 .with(ViatraModelQueryAdapter.builder()
41 .queries(query))
42 .build();
43
44 var model = store.createEmptyModel();
45 var friendInterpretation = model.getInterpretation(friend);
46 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
47 var resultSet = queryEngine.getResultSet(query);
48
49 friendInterpretation.put(Tuple.of(0, 1), true);
50 friendInterpretation.put(Tuple.of(1, 0), true);
51 friendInterpretation.put(Tuple.of(2, 3), true);
52 queryEngine.flushChanges();
53
54 assertResults(Map.of(
55 Tuple.of(0, 0), true,
56 Tuple.of(0, 1), true,
57 Tuple.of(1, 0), true,
58 Tuple.of(1, 1), true,
59 Tuple.of(2, 2), true,
60 Tuple.of(2, 3), true,
61 Tuple.of(3, 2), true,
62 Tuple.of(3, 3), true
63 ), resultSet);
64 }
65
66 @Test
67 void symbolViewUpdateTest() {
68 var query = Query.of("SymbolViewRepresentative", (builder, p1, p2) -> builder
69 .clause(v1 -> List.of(
70 new RepresentativeElectionLiteral(Connectivity.WEAK, friendView, p1, v1),
71 new RepresentativeElectionLiteral(Connectivity.WEAK, friendView, p2, v1)
72 )));
73
74 var store = ModelStore.builder()
75 .symbols(friend)
76 .with(ViatraModelQueryAdapter.builder()
77 .queries(query))
78 .build();
79
80 var model = store.createEmptyModel();
81 var friendInterpretation = model.getInterpretation(friend);
82 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
83 var resultSet = queryEngine.getResultSet(query);
84
85 friendInterpretation.put(Tuple.of(0, 1), true);
86 friendInterpretation.put(Tuple.of(1, 0), true);
87 friendInterpretation.put(Tuple.of(2, 3), true);
88 queryEngine.flushChanges();
89
90 friendInterpretation.put(Tuple.of(2, 3), false);
91 friendInterpretation.put(Tuple.of(1, 0), false);
92 friendInterpretation.put(Tuple.of(1, 2), true);
93 queryEngine.flushChanges();
94
95 assertResults(Map.of(
96 Tuple.of(0, 0), true,
97 Tuple.of(0, 1), true,
98 Tuple.of(0, 2), true,
99 Tuple.of(1, 0), true,
100 Tuple.of(1, 1), true,
101 Tuple.of(1, 2), true,
102 Tuple.of(2, 0), true,
103 Tuple.of(2, 1), true,
104 Tuple.of(2, 2), true
105 ), resultSet);
106 }
107
108 @Test
109 void diagonalSymbolViewTest() {
110 var person = Symbol.of("Person", 1);
111 var personView = new KeyOnlyView<>(person);
112
113 var query = Query.of("SymbolViewRepresentative", (builder, p1) -> builder
114 .clause(
115 personView.call(p1),
116 new RepresentativeElectionLiteral(Connectivity.WEAK, friendView, p1, p1)
117 ));
118
119 var store = ModelStore.builder()
120 .symbols(person, friend)
121 .with(ViatraModelQueryAdapter.builder()
122 .queries(query))
123 .build();
124
125 var model = store.createEmptyModel();
126 var personInterpretation = model.getInterpretation(person);
127 var friendInterpretation = model.getInterpretation(friend);
128 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
129 var resultSet = queryEngine.getResultSet(query);
130
131 personInterpretation.put(Tuple.of(0), true);
132 personInterpretation.put(Tuple.of(1), true);
133 personInterpretation.put(Tuple.of(2), true);
134 personInterpretation.put(Tuple.of(3), true);
135
136 friendInterpretation.put(Tuple.of(0, 1), true);
137 friendInterpretation.put(Tuple.of(1, 0), true);
138 friendInterpretation.put(Tuple.of(2, 3), true);
139 queryEngine.flushChanges();
140
141 assertThat(resultSet.size(), is(2));
142 assertThat(resultSet.get(Tuple.of(2)), is(true));
143 }
144
145 @Test
146 void diagonalDnfTest() {
147 var person = Symbol.of("Person", 1);
148 var personView = new KeyOnlyView<>(person);
149
150 var subQuery = Query.of("SubQuery", (builder, p1, p2) -> builder
151 .clause(
152 personView.call(p1),
153 personView.call(p2),
154 friendView.call(p1, p2)
155 ))
156 .getDnf();
157 var query = Query.of("SymbolViewRepresentative", (builder, p1) -> builder
158 .clause(
159 personView.call(p1),
160 new RepresentativeElectionLiteral(Connectivity.WEAK, subQuery, p1, p1)
161 ));
162
163 var store = ModelStore.builder()
164 .symbols(person, friend)
165 .with(ViatraModelQueryAdapter.builder()
166 .queries(query))
167 .build();
168
169 var model = store.createEmptyModel();
170 var personInterpretation = model.getInterpretation(person);
171 var friendInterpretation = model.getInterpretation(friend);
172 var queryEngine = model.getAdapter(ModelQueryAdapter.class);
173 var resultSet = queryEngine.getResultSet(query);
174
175 personInterpretation.put(Tuple.of(0), true);
176 personInterpretation.put(Tuple.of(1), true);
177 personInterpretation.put(Tuple.of(2), true);
178 personInterpretation.put(Tuple.of(3), true);
179
180 friendInterpretation.put(Tuple.of(0, 1), true);
181 friendInterpretation.put(Tuple.of(1, 0), true);
182 friendInterpretation.put(Tuple.of(2, 3), true);
183 queryEngine.flushChanges();
184
185 assertThat(resultSet.size(), is(2));
186 assertThat(resultSet.get(Tuple.of(2)), is(true));
187 }
188}
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtilsTest.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtilsTest.java
index 968c6c5e..319797a0 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtilsTest.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/internal/matcher/MatcherUtilsTest.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.internal.matcher; 6package tools.refinery.store.query.viatra.internal.matcher;
7 7
8import org.eclipse.viatra.query.runtime.matchers.tuple.*; 8import tools.refinery.viatra.runtime.matchers.tuple.*;
9import org.junit.jupiter.api.Test; 9import org.junit.jupiter.api.Test;
10import tools.refinery.store.tuple.Tuple; 10import tools.refinery.store.tuple.Tuple;
11import tools.refinery.store.tuple.*; 11import tools.refinery.store.tuple.*;
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryAssertions.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryAssertions.java
index ca089a9d..5c1c4fc1 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryAssertions.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryAssertions.java
@@ -30,7 +30,7 @@ public final class QueryAssertions {
30 } 30 }
31 31
32 public static <T> void assertResults(Map<Tuple, T> expected, ResultSet<T> resultSet) { 32 public static <T> void assertResults(Map<Tuple, T> expected, ResultSet<T> resultSet) {
33 var defaultValue = resultSet.getQuery().defaultValue(); 33 var defaultValue = resultSet.getCanonicalQuery().defaultValue();
34 var filteredExpected = new LinkedHashMap<Tuple, T>(); 34 var filteredExpected = new LinkedHashMap<Tuple, T>();
35 var executables = new ArrayList<Executable>(); 35 var executables = new ArrayList<Executable>();
36 for (var entry : expected.entrySet()) { 36 for (var entry : expected.entrySet()) {
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryBackendHint.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryBackendHint.java
index dc0e92c8..5f88e04b 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryBackendHint.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryBackendHint.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.tests; 6package tools.refinery.store.query.viatra.tests;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 8import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
9 9
10/** 10/**
11 * Overrides {@link QueryEvaluationHint#toString()} for pretty names in parametric test names. 11 * Overrides {@link QueryEvaluationHint#toString()} for pretty names in parametric test names.
diff --git a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryEvaluationHintSource.java b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryEvaluationHintSource.java
index 9e75d5f3..ed356eeb 100644
--- a/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryEvaluationHintSource.java
+++ b/subprojects/store-query-viatra/src/test/java/tools/refinery/store/query/viatra/tests/QueryEvaluationHintSource.java
@@ -5,7 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.viatra.tests; 6package tools.refinery.store.query.viatra.tests;
7 7
8import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 8import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
9import org.junit.jupiter.api.extension.ExtensionContext; 9import org.junit.jupiter.api.extension.ExtensionContext;
10import org.junit.jupiter.params.provider.Arguments; 10import org.junit.jupiter.params.provider.Arguments;
11import org.junit.jupiter.params.provider.ArgumentsProvider; 11import org.junit.jupiter.params.provider.ArgumentsProvider;
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/InvalidQueryException.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/InvalidQueryException.java
new file mode 100644
index 00000000..c39277a0
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/InvalidQueryException.java
@@ -0,0 +1,23 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query;
7
8public class InvalidQueryException extends RuntimeException {
9 public InvalidQueryException() {
10 }
11
12 public InvalidQueryException(String message) {
13 super(message);
14 }
15
16 public InvalidQueryException(String message, Throwable cause) {
17 super(message, cause);
18 }
19
20 public InvalidQueryException(Throwable cause) {
21 super(cause);
22 }
23}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java
index c62a95b5..332e6381 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryBuilder.java
@@ -8,6 +8,7 @@ package tools.refinery.store.query;
8import tools.refinery.store.adapter.ModelAdapterBuilder; 8import tools.refinery.store.adapter.ModelAdapterBuilder;
9import tools.refinery.store.model.ModelStore; 9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.dnf.AnyQuery; 10import tools.refinery.store.query.dnf.AnyQuery;
11import tools.refinery.store.query.rewriter.DnfRewriter;
11 12
12import java.util.Collection; 13import java.util.Collection;
13import java.util.List; 14import java.util.List;
@@ -25,6 +26,8 @@ public interface ModelQueryBuilder extends ModelAdapterBuilder {
25 26
26 ModelQueryBuilder query(AnyQuery query); 27 ModelQueryBuilder query(AnyQuery query);
27 28
29 ModelQueryBuilder rewriter(DnfRewriter rewriter);
30
28 @Override 31 @Override
29 ModelQueryStoreAdapter build(ModelStore store); 32 ModelQueryStoreAdapter build(ModelStore store);
30} 33}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java
index f0a950a6..8b67c5c1 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/ModelQueryStoreAdapter.java
@@ -8,6 +8,7 @@ package tools.refinery.store.query;
8import tools.refinery.store.adapter.ModelStoreAdapter; 8import tools.refinery.store.adapter.ModelStoreAdapter;
9import tools.refinery.store.model.Model; 9import tools.refinery.store.model.Model;
10import tools.refinery.store.query.dnf.AnyQuery; 10import tools.refinery.store.query.dnf.AnyQuery;
11import tools.refinery.store.query.dnf.Query;
11import tools.refinery.store.query.view.AnySymbolView; 12import tools.refinery.store.query.view.AnySymbolView;
12 13
13import java.util.Collection; 14import java.util.Collection;
@@ -17,6 +18,12 @@ public interface ModelQueryStoreAdapter extends ModelStoreAdapter {
17 18
18 Collection<AnyQuery> getQueries(); 19 Collection<AnyQuery> getQueries();
19 20
21 default AnyQuery getCanonicalQuery(AnyQuery query) {
22 return getCanonicalQuery((Query<?>) query);
23 }
24
25 <T> Query<T> getCanonicalQuery(Query<T> query);
26
20 @Override 27 @Override
21 ModelQueryAdapter createModelAdapter(Model model); 28 ModelQueryAdapter createModelAdapter(Model model);
22} 29}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/ClausePostProcessor.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/ClausePostProcessor.java
index b5e7092b..8800a155 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/ClausePostProcessor.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/ClausePostProcessor.java
@@ -6,13 +6,12 @@
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import org.jetbrains.annotations.NotNull; 8import org.jetbrains.annotations.NotNull;
9import tools.refinery.store.query.literal.BooleanLiteral; 9import tools.refinery.store.query.Constraint;
10import tools.refinery.store.query.literal.EquivalenceLiteral; 10import tools.refinery.store.query.InvalidQueryException;
11import tools.refinery.store.query.literal.Literal; 11import tools.refinery.store.query.literal.*;
12import tools.refinery.store.query.substitution.MapBasedSubstitution; 12import tools.refinery.store.query.substitution.MapBasedSubstitution;
13import tools.refinery.store.query.substitution.StatelessSubstitution; 13import tools.refinery.store.query.substitution.StatelessSubstitution;
14import tools.refinery.store.query.substitution.Substitution; 14import tools.refinery.store.query.substitution.Substitution;
15import tools.refinery.store.query.term.NodeVariable;
16import tools.refinery.store.query.term.ParameterDirection; 15import tools.refinery.store.query.term.ParameterDirection;
17import tools.refinery.store.query.term.Variable; 16import tools.refinery.store.query.term.Variable;
18 17
@@ -22,8 +21,8 @@ import java.util.function.Function;
22class ClausePostProcessor { 21class ClausePostProcessor {
23 private final Map<Variable, ParameterInfo> parameters; 22 private final Map<Variable, ParameterInfo> parameters;
24 private final List<Literal> literals; 23 private final List<Literal> literals;
25 private final Map<NodeVariable, NodeVariable> representatives = new LinkedHashMap<>(); 24 private final Map<Variable, Variable> representatives = new LinkedHashMap<>();
26 private final Map<NodeVariable, Set<NodeVariable>> equivalencePartition = new HashMap<>(); 25 private final Map<Variable, Set<Variable>> equivalencePartition = new HashMap<>();
27 private List<Literal> substitutedLiterals; 26 private List<Literal> substitutedLiterals;
28 private final Set<Variable> existentiallyQuantifiedVariables = new LinkedHashSet<>(); 27 private final Set<Variable> existentiallyQuantifiedVariables = new LinkedHashSet<>();
29 private Set<Variable> positiveVariables; 28 private Set<Variable> positiveVariables;
@@ -58,6 +57,9 @@ class ClausePostProcessor {
58 if (filteredLiterals.isEmpty()) { 57 if (filteredLiterals.isEmpty()) {
59 return ConstantResult.ALWAYS_TRUE; 58 return ConstantResult.ALWAYS_TRUE;
60 } 59 }
60 if (hasContradictoryCall(filteredLiterals)) {
61 return ConstantResult.ALWAYS_FALSE;
62 }
61 var clause = new DnfClause(Collections.unmodifiableSet(positiveVariables), 63 var clause = new DnfClause(Collections.unmodifiableSet(positiveVariables),
62 Collections.unmodifiableList(filteredLiterals)); 64 Collections.unmodifiableList(filteredLiterals));
63 return new ClauseResult(clause); 65 return new ClauseResult(clause);
@@ -67,16 +69,16 @@ class ClausePostProcessor {
67 for (var literal : literals) { 69 for (var literal : literals) {
68 if (isPositiveEquivalence(literal)) { 70 if (isPositiveEquivalence(literal)) {
69 var equivalenceLiteral = (EquivalenceLiteral) literal; 71 var equivalenceLiteral = (EquivalenceLiteral) literal;
70 mergeVariables(equivalenceLiteral.left(), equivalenceLiteral.right()); 72 mergeVariables(equivalenceLiteral.getLeft(), equivalenceLiteral.getRight());
71 } 73 }
72 } 74 }
73 } 75 }
74 76
75 private static boolean isPositiveEquivalence(Literal literal) { 77 private static boolean isPositiveEquivalence(Literal literal) {
76 return literal instanceof EquivalenceLiteral equivalenceLiteral && equivalenceLiteral.positive(); 78 return literal instanceof EquivalenceLiteral equivalenceLiteral && equivalenceLiteral.isPositive();
77 } 79 }
78 80
79 private void mergeVariables(NodeVariable left, NodeVariable right) { 81 private void mergeVariables(Variable left, Variable right) {
80 var leftRepresentative = getRepresentative(left); 82 var leftRepresentative = getRepresentative(left);
81 var rightRepresentative = getRepresentative(right); 83 var rightRepresentative = getRepresentative(right);
82 var leftInfo = parameters.get(leftRepresentative); 84 var leftInfo = parameters.get(leftRepresentative);
@@ -89,7 +91,7 @@ class ClausePostProcessor {
89 } 91 }
90 } 92 }
91 93
92 private void doMergeVariables(NodeVariable parentRepresentative, NodeVariable newChildRepresentative) { 94 private void doMergeVariables(Variable parentRepresentative, Variable newChildRepresentative) {
93 var parentSet = getEquivalentVariables(parentRepresentative); 95 var parentSet = getEquivalentVariables(parentRepresentative);
94 var childSet = getEquivalentVariables(newChildRepresentative); 96 var childSet = getEquivalentVariables(newChildRepresentative);
95 parentSet.addAll(childSet); 97 parentSet.addAll(childSet);
@@ -99,18 +101,18 @@ class ClausePostProcessor {
99 } 101 }
100 } 102 }
101 103
102 private NodeVariable getRepresentative(NodeVariable variable) { 104 private Variable getRepresentative(Variable variable) {
103 return representatives.computeIfAbsent(variable, Function.identity()); 105 return representatives.computeIfAbsent(variable, Function.identity());
104 } 106 }
105 107
106 private Set<NodeVariable> getEquivalentVariables(NodeVariable variable) { 108 private Set<Variable> getEquivalentVariables(Variable variable) {
107 var representative = getRepresentative(variable); 109 var representative = getRepresentative(variable);
108 if (!representative.equals(variable)) { 110 if (!representative.equals(variable)) {
109 throw new AssertionError("NodeVariable %s already has a representative %s" 111 throw new AssertionError("NodeVariable %s already has a representative %s"
110 .formatted(variable, representative)); 112 .formatted(variable, representative));
111 } 113 }
112 return equivalencePartition.computeIfAbsent(variable, key -> { 114 return equivalencePartition.computeIfAbsent(variable, key -> {
113 var set = new HashSet<NodeVariable>(1); 115 var set = new HashSet<Variable>(1);
114 set.add(key); 116 set.add(key);
115 return set; 117 return set;
116 }); 118 });
@@ -121,7 +123,7 @@ class ClausePostProcessor {
121 var left = pair.getKey(); 123 var left = pair.getKey();
122 var right = pair.getValue(); 124 var right = pair.getValue();
123 if (!left.equals(right) && parameters.containsKey(left) && parameters.containsKey(right)) { 125 if (!left.equals(right) && parameters.containsKey(left) && parameters.containsKey(right)) {
124 substitutedLiterals.add(left.isEquivalent(right)); 126 substitutedLiterals.add(new EquivalenceLiteral(true, left, right));
125 } 127 }
126 } 128 }
127 } 129 }
@@ -147,20 +149,7 @@ class ClausePostProcessor {
147 149
148 private void computeExistentiallyQuantifiedVariables() { 150 private void computeExistentiallyQuantifiedVariables() {
149 for (var literal : substitutedLiterals) { 151 for (var literal : substitutedLiterals) {
150 for (var variable : literal.getOutputVariables()) { 152 existentiallyQuantifiedVariables.addAll(literal.getOutputVariables());
151 boolean added = existentiallyQuantifiedVariables.add(variable);
152 if (!variable.isUnifiable()) {
153 var parameterInfo = parameters.get(variable);
154 if (parameterInfo != null && parameterInfo.direction() == ParameterDirection.IN) {
155 throw new IllegalArgumentException("Trying to bind %s parameter %s"
156 .formatted(ParameterDirection.IN, variable));
157 }
158 if (!added) {
159 throw new IllegalArgumentException("Variable %s has multiple assigned values"
160 .formatted(variable));
161 }
162 }
163 }
164 } 153 }
165 } 154 }
166 155
@@ -172,7 +161,7 @@ class ClausePostProcessor {
172 // Inputs count as positive, because they are already bound when we evaluate literals. 161 // Inputs count as positive, because they are already bound when we evaluate literals.
173 positiveVariables.add(variable); 162 positiveVariables.add(variable);
174 } else if (!existentiallyQuantifiedVariables.contains(variable)) { 163 } else if (!existentiallyQuantifiedVariables.contains(variable)) {
175 throw new IllegalArgumentException("Unbound %s parameter %s" 164 throw new InvalidQueryException("Unbound %s parameter %s"
176 .formatted(ParameterDirection.OUT, variable)); 165 .formatted(ParameterDirection.OUT, variable));
177 } 166 }
178 } 167 }
@@ -184,7 +173,7 @@ class ClausePostProcessor {
184 var representative = pair.getKey(); 173 var representative = pair.getKey();
185 if (!positiveVariables.contains(representative)) { 174 if (!positiveVariables.contains(representative)) {
186 var variableSet = pair.getValue(); 175 var variableSet = pair.getValue();
187 throw new IllegalArgumentException("Variables %s were merged by equivalence but are not bound" 176 throw new InvalidQueryException("Variables %s were merged by equivalence but are not bound"
188 .formatted(variableSet)); 177 .formatted(variableSet));
189 } 178 }
190 } 179 }
@@ -196,7 +185,7 @@ class ClausePostProcessor {
196 for (var variable : literal.getPrivateVariables(positiveVariables)) { 185 for (var variable : literal.getPrivateVariables(positiveVariables)) {
197 var oldLiteral = negativeVariablesMap.put(variable, literal); 186 var oldLiteral = negativeVariablesMap.put(variable, literal);
198 if (oldLiteral != null) { 187 if (oldLiteral != null) {
199 throw new IllegalArgumentException("Unbound variable %s appears in multiple literals %s and %s" 188 throw new InvalidQueryException("Unbound variable %s appears in multiple literals %s and %s"
200 .formatted(variable, oldLiteral, literal)); 189 .formatted(variable, oldLiteral, literal));
201 } 190 }
202 } 191 }
@@ -218,11 +207,60 @@ class ClausePostProcessor {
218 variable.addToSortedLiterals(); 207 variable.addToSortedLiterals();
219 } 208 }
220 if (!variableToLiteralInputMap.isEmpty()) { 209 if (!variableToLiteralInputMap.isEmpty()) {
221 throw new IllegalArgumentException("Unbound input variables %s" 210 throw new InvalidQueryException("Unbound input variables %s"
222 .formatted(variableToLiteralInputMap.keySet())); 211 .formatted(variableToLiteralInputMap.keySet()));
223 } 212 }
224 } 213 }
225 214
215 private boolean hasContradictoryCall(Collection<Literal> filteredLiterals) {
216 var positiveCalls = new HashMap<Constraint, Set<CallLiteral>>();
217 for (var literal : filteredLiterals) {
218 if (literal instanceof CallLiteral callLiteral && callLiteral.getPolarity() == CallPolarity.POSITIVE) {
219 var callsOfTarget = positiveCalls.computeIfAbsent(callLiteral.getTarget(), key -> new HashSet<>());
220 callsOfTarget.add(callLiteral);
221 }
222 }
223 for (var literal : filteredLiterals) {
224 if (literal instanceof CallLiteral callLiteral && callLiteral.getPolarity() == CallPolarity.NEGATIVE) {
225 var callsOfTarget = positiveCalls.get(callLiteral.getTarget());
226 if (contradicts(callLiteral, callsOfTarget)) {
227 return true;
228 }
229 }
230 }
231 return false;
232 }
233
234 private boolean contradicts(CallLiteral negativeCall, Collection<CallLiteral> positiveCalls) {
235 if (positiveCalls == null) {
236 return false;
237 }
238 for (var positiveCall : positiveCalls) {
239 if (contradicts(negativeCall, positiveCall)) {
240 return true;
241 }
242 }
243 return false;
244 }
245
246 private boolean contradicts(CallLiteral negativeCall, CallLiteral positiveCall) {
247 var privateVariables = negativeCall.getPrivateVariables(positiveVariables);
248 var negativeArguments = negativeCall.getArguments();
249 var positiveArguments = positiveCall.getArguments();
250 int arity = negativeArguments.size();
251 for (int i = 0; i < arity; i++) {
252 var negativeArgument = negativeArguments.get(i);
253 if (privateVariables.contains(negativeArgument)) {
254 continue;
255 }
256 var positiveArgument = positiveArguments.get(i);
257 if (!negativeArgument.equals(positiveArgument)) {
258 return false;
259 }
260 }
261 return true;
262 }
263
226 private class SortableLiteral implements Comparable<SortableLiteral> { 264 private class SortableLiteral implements Comparable<SortableLiteral> {
227 private final int index; 265 private final int index;
228 private final Literal literal; 266 private final Literal literal;
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Dnf.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Dnf.java
index 50b245f7..86a1b6b2 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Dnf.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Dnf.java
@@ -6,9 +6,12 @@
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import tools.refinery.store.query.Constraint; 8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.literal.Reduction; 9import tools.refinery.store.query.InvalidQueryException;
10import tools.refinery.store.query.equality.DnfEqualityChecker; 10import tools.refinery.store.query.equality.DnfEqualityChecker;
11import tools.refinery.store.query.equality.LiteralEqualityHelper; 11import tools.refinery.store.query.equality.LiteralEqualityHelper;
12import tools.refinery.store.query.equality.SubstitutingLiteralEqualityHelper;
13import tools.refinery.store.query.equality.SubstitutingLiteralHashCodeHelper;
14import tools.refinery.store.query.literal.Reduction;
12import tools.refinery.store.query.term.Parameter; 15import tools.refinery.store.query.term.Parameter;
13import tools.refinery.store.query.term.Variable; 16import tools.refinery.store.query.term.Variable;
14 17
@@ -53,7 +56,7 @@ public final class Dnf implements Constraint {
53 FunctionalDependency<Variable> functionalDependency) { 56 FunctionalDependency<Variable> functionalDependency) {
54 for (var variable : toValidate) { 57 for (var variable : toValidate) {
55 if (!parameterSet.contains(variable)) { 58 if (!parameterSet.contains(variable)) {
56 throw new IllegalArgumentException( 59 throw new InvalidQueryException(
57 "Variable %s of functional dependency %s does not appear in the parameter list %s" 60 "Variable %s of functional dependency %s does not appear in the parameter list %s"
58 .formatted(variable, functionalDependency, symbolicParameters)); 61 .formatted(variable, functionalDependency, symbolicParameters));
59 } 62 }
@@ -66,7 +69,7 @@ public final class Dnf implements Constraint {
66 } 69 }
67 70
68 public boolean isExplicitlyNamed() { 71 public boolean isExplicitlyNamed() {
69 return name == null; 72 return name != null;
70 } 73 }
71 74
72 public String getUniqueName() { 75 public String getUniqueName() {
@@ -129,7 +132,7 @@ public final class Dnf implements Constraint {
129 return false; 132 return false;
130 } 133 }
131 for (int i = 0; i < numClauses; i++) { 134 for (int i = 0; i < numClauses; i++) {
132 var literalEqualityHelper = new LiteralEqualityHelper(callEqualityChecker, symbolicParameters, 135 var literalEqualityHelper = new SubstitutingLiteralEqualityHelper(callEqualityChecker, symbolicParameters,
133 other.symbolicParameters); 136 other.symbolicParameters);
134 if (!clauses.get(i).equalsWithSubstitution(literalEqualityHelper, other.clauses.get(i))) { 137 if (!clauses.get(i).equalsWithSubstitution(literalEqualityHelper, other.clauses.get(i))) {
135 return false; 138 return false;
@@ -146,6 +149,18 @@ public final class Dnf implements Constraint {
146 return false; 149 return false;
147 } 150 }
148 151
152 public int hashCodeWithSubstitution() {
153 var helper = new SubstitutingLiteralHashCodeHelper();
154 int result = 0;
155 for (var symbolicParameter : symbolicParameters) {
156 result = result * 31 + symbolicParameter.hashCodeWithSubstitution(helper);
157 }
158 for (var clause : clauses) {
159 result = result * 31 + clause.hashCodeWithSubstitution(helper);
160 }
161 return result;
162 }
163
149 @Override 164 @Override
150 public String toString() { 165 public String toString() {
151 return "%s/%d".formatted(name(), arity()); 166 return "%s/%d".formatted(name(), arity());
@@ -201,6 +216,13 @@ public final class Dnf implements Constraint {
201 return new DnfBuilder(name); 216 return new DnfBuilder(name);
202 } 217 }
203 218
219 public static DnfBuilder builderFrom(Dnf original) {
220 var builder = builder(original.name());
221 builder.symbolicParameters(original.getSymbolicParameters());
222 builder.functionalDependencies(original.getFunctionalDependencies());
223 return builder;
224 }
225
204 public static Dnf of(Consumer<DnfBuilder> callback) { 226 public static Dnf of(Consumer<DnfBuilder> callback) {
205 return of(null, callback); 227 return of(null, callback);
206 } 228 }
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfBuilder.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfBuilder.java
index 8e38ca6b..0f9fd366 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfBuilder.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfBuilder.java
@@ -5,12 +5,10 @@
5 */ 5 */
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.dnf.callback.*; 9import tools.refinery.store.query.dnf.callback.*;
9import tools.refinery.store.query.literal.Literal; 10import tools.refinery.store.query.literal.Literal;
10import tools.refinery.store.query.term.DataVariable; 11import tools.refinery.store.query.term.*;
11import tools.refinery.store.query.term.NodeVariable;
12import tools.refinery.store.query.term.ParameterDirection;
13import tools.refinery.store.query.term.Variable;
14 12
15import java.util.*; 13import java.util.*;
16 14
@@ -62,6 +60,18 @@ public final class DnfBuilder {
62 return variable; 60 return variable;
63 } 61 }
64 62
63 public Variable parameter(Parameter parameter) {
64 return parameter(null, parameter);
65 }
66
67 public Variable parameter(String name, Parameter parameter) {
68 var type = parameter.tryGetType();
69 if (type.isPresent()) {
70 return parameter(name, type.get(), parameter.getDirection());
71 }
72 return parameter(name, parameter.getDirection());
73 }
74
65 public DnfBuilder parameter(Variable variable) { 75 public DnfBuilder parameter(Variable variable) {
66 return parameter(variable, ParameterDirection.OUT); 76 return parameter(variable, ParameterDirection.OUT);
67 } 77 }
@@ -88,7 +98,7 @@ public final class DnfBuilder {
88 public DnfBuilder symbolicParameter(SymbolicParameter symbolicParameter) { 98 public DnfBuilder symbolicParameter(SymbolicParameter symbolicParameter) {
89 var variable = symbolicParameter.getVariable(); 99 var variable = symbolicParameter.getVariable();
90 if (!parameterVariables.add(variable)) { 100 if (!parameterVariables.add(variable)) {
91 throw new IllegalArgumentException("Variable %s is already on the parameter list %s" 101 throw new InvalidQueryException("Variable %s is already on the parameter list %s"
92 .formatted(variable, parameters)); 102 .formatted(variable, parameters));
93 } 103 }
94 parameters.add(symbolicParameter); 104 parameters.add(symbolicParameter);
@@ -129,7 +139,7 @@ public final class DnfBuilder {
129 } 139 }
130 140
131 public <T> DnfBuilder clause(Class<T> type1, ClauseCallback1Data1<T> callback) { 141 public <T> DnfBuilder clause(Class<T> type1, ClauseCallback1Data1<T> callback) {
132 return clause(callback.toLiterals(Variable.of("v1", type1))); 142 return clause(callback.toLiterals(Variable.of("d1", type1)));
133 } 143 }
134 144
135 public DnfBuilder clause(ClauseCallback2Data0 callback) { 145 public DnfBuilder clause(ClauseCallback2Data0 callback) {
@@ -206,57 +216,10 @@ public final class DnfBuilder {
206 } 216 }
207 217
208 public Dnf build() { 218 public Dnf build() {
209 var postProcessedClauses = postProcessClauses(); 219 var postProcessor = new DnfPostProcessor(parameters, clauses);
220 var postProcessedClauses = postProcessor.postProcessClauses();
210 return new Dnf(name, Collections.unmodifiableList(parameters), 221 return new Dnf(name, Collections.unmodifiableList(parameters),
211 Collections.unmodifiableList(functionalDependencies), 222 Collections.unmodifiableList(functionalDependencies),
212 Collections.unmodifiableList(postProcessedClauses)); 223 Collections.unmodifiableList(postProcessedClauses));
213 } 224 }
214
215 private List<DnfClause> postProcessClauses() {
216 var parameterInfoMap = getParameterInfoMap();
217 var postProcessedClauses = new ArrayList<DnfClause>(clauses.size());
218 for (var literals : clauses) {
219 var postProcessor = new ClausePostProcessor(parameterInfoMap, literals);
220 var result = postProcessor.postProcessClause();
221 if (result instanceof ClausePostProcessor.ClauseResult clauseResult) {
222 postProcessedClauses.add(clauseResult.clause());
223 } else if (result instanceof ClausePostProcessor.ConstantResult constantResult) {
224 switch (constantResult) {
225 case ALWAYS_TRUE -> {
226 var inputVariables = getInputVariables();
227 return List.of(new DnfClause(inputVariables, List.of()));
228 }
229 case ALWAYS_FALSE -> {
230 // Skip this clause because it can never match.
231 }
232 default -> throw new IllegalStateException("Unexpected ClausePostProcessor.ConstantResult: " +
233 constantResult);
234 }
235 } else {
236 throw new IllegalStateException("Unexpected ClausePostProcessor.Result: " + result);
237 }
238 }
239 return postProcessedClauses;
240 }
241
242 private Map<Variable, ClausePostProcessor.ParameterInfo> getParameterInfoMap() {
243 var mutableParameterInfoMap = new LinkedHashMap<Variable, ClausePostProcessor.ParameterInfo>();
244 int arity = parameters.size();
245 for (int i = 0; i < arity; i++) {
246 var parameter = parameters.get(i);
247 mutableParameterInfoMap.put(parameter.getVariable(),
248 new ClausePostProcessor.ParameterInfo(parameter.getDirection(), i));
249 }
250 return Collections.unmodifiableMap(mutableParameterInfoMap);
251 }
252
253 private Set<Variable> getInputVariables() {
254 var inputParameters = new LinkedHashSet<Variable>();
255 for (var parameter : parameters) {
256 if (parameter.getDirection() == ParameterDirection.IN) {
257 inputParameters.add(parameter.getVariable());
258 }
259 }
260 return Collections.unmodifiableSet(inputParameters);
261 }
262} 225}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfClause.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfClause.java
index fdd0d47c..94327bad 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfClause.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfClause.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 8import tools.refinery.store.query.equality.LiteralEqualityHelper;
9import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.literal.Literal; 10import tools.refinery.store.query.literal.Literal;
10import tools.refinery.store.query.term.Variable; 11import tools.refinery.store.query.term.Variable;
11 12
@@ -25,4 +26,12 @@ public record DnfClause(Set<Variable> positiveVariables, List<Literal> literals)
25 } 26 }
26 return true; 27 return true;
27 } 28 }
29
30 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
31 int result = 0;
32 for (var literal : literals) {
33 result = result * 31 + literal.hashCodeWithSubstitution(helper);
34 }
35 return result;
36 }
28} 37}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfPostProcessor.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfPostProcessor.java
new file mode 100644
index 00000000..50236642
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/DnfPostProcessor.java
@@ -0,0 +1,112 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.dnf;
7
8import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.equality.DnfEqualityChecker;
10import tools.refinery.store.query.equality.SubstitutingLiteralEqualityHelper;
11import tools.refinery.store.query.equality.SubstitutingLiteralHashCodeHelper;
12import tools.refinery.store.query.literal.Literal;
13import tools.refinery.store.query.term.ParameterDirection;
14import tools.refinery.store.query.term.Variable;
15
16import java.util.*;
17
18class DnfPostProcessor {
19 private final List<SymbolicParameter> parameters;
20 private final List<List<Literal>> clauses;
21
22 public DnfPostProcessor(List<SymbolicParameter> parameters, List<List<Literal>> clauses) {
23 this.parameters = parameters;
24 this.clauses = clauses;
25 }
26
27 public List<DnfClause> postProcessClauses() {
28 var parameterInfoMap = getParameterInfoMap();
29 var postProcessedClauses = new LinkedHashSet<CanonicalClause>(clauses.size());
30 int index = 0;
31 for (var literals : clauses) {
32 var postProcessor = new ClausePostProcessor(parameterInfoMap, literals);
33 ClausePostProcessor.Result result;
34 try {
35 result = postProcessor.postProcessClause();
36 } catch (InvalidQueryException e) {
37 throw new InvalidClauseException(index, e);
38 }
39 if (result instanceof ClausePostProcessor.ClauseResult clauseResult) {
40 postProcessedClauses.add(new CanonicalClause(clauseResult.clause()));
41 } else if (result instanceof ClausePostProcessor.ConstantResult constantResult) {
42 switch (constantResult) {
43 case ALWAYS_TRUE -> {
44 var inputVariables = getInputVariables();
45 return List.of(new DnfClause(inputVariables, List.of()));
46 }
47 case ALWAYS_FALSE -> {
48 // Skip this clause because it can never match.
49 }
50 default -> throw new IllegalStateException("Unexpected ClausePostProcessor.ConstantResult: " +
51 constantResult);
52 }
53 } else {
54 throw new IllegalStateException("Unexpected ClausePostProcessor.Result: " + result);
55 }
56 index++;
57 }
58 return postProcessedClauses.stream().map(CanonicalClause::getDnfClause).toList();
59 }
60
61 private Map<Variable, ClausePostProcessor.ParameterInfo> getParameterInfoMap() {
62 var mutableParameterInfoMap = new LinkedHashMap<Variable, ClausePostProcessor.ParameterInfo>();
63 int arity = parameters.size();
64 for (int i = 0; i < arity; i++) {
65 var parameter = parameters.get(i);
66 mutableParameterInfoMap.put(parameter.getVariable(),
67 new ClausePostProcessor.ParameterInfo(parameter.getDirection(), i));
68 }
69 return Collections.unmodifiableMap(mutableParameterInfoMap);
70 }
71
72 private Set<Variable> getInputVariables() {
73 var inputParameters = new LinkedHashSet<Variable>();
74 for (var parameter : parameters) {
75 if (parameter.getDirection() == ParameterDirection.IN) {
76 inputParameters.add(parameter.getVariable());
77 }
78 }
79 return Collections.unmodifiableSet(inputParameters);
80 }
81
82 private class CanonicalClause {
83 private final DnfClause dnfClause;
84
85 public CanonicalClause(DnfClause dnfClause) {
86 this.dnfClause = dnfClause;
87 }
88
89 public DnfClause getDnfClause() {
90 return dnfClause;
91 }
92
93 @Override
94 public boolean equals(Object obj) {
95 if (this == obj) {
96 return true;
97 }
98 if (obj == null || getClass() != obj.getClass()) {
99 return false;
100 }
101 var otherCanonicalClause = (CanonicalClause) obj;
102 var helper = new SubstitutingLiteralEqualityHelper(DnfEqualityChecker.DEFAULT, parameters, parameters);
103 return dnfClause.equalsWithSubstitution(helper, otherCanonicalClause.dnfClause);
104 }
105
106 @Override
107 public int hashCode() {
108 var helper = new SubstitutingLiteralHashCodeHelper(parameters);
109 return dnfClause.hashCodeWithSubstitution(helper);
110 }
111 }
112}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalDependency.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalDependency.java
index b00b2cb7..aef07ee3 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalDependency.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalDependency.java
@@ -5,6 +5,8 @@
5 */ 5 */
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import tools.refinery.store.query.InvalidQueryException;
9
8import java.util.HashSet; 10import java.util.HashSet;
9import java.util.Set; 11import java.util.Set;
10 12
@@ -13,7 +15,7 @@ public record FunctionalDependency<T>(Set<T> forEach, Set<T> unique) {
13 var uniqueForEach = new HashSet<>(unique); 15 var uniqueForEach = new HashSet<>(unique);
14 uniqueForEach.retainAll(forEach); 16 uniqueForEach.retainAll(forEach);
15 if (!uniqueForEach.isEmpty()) { 17 if (!uniqueForEach.isEmpty()) {
16 throw new IllegalArgumentException("Variables %s appear on both sides of the functional dependency" 18 throw new InvalidQueryException("Variables %s appear on both sides of the functional dependency"
17 .formatted(uniqueForEach)); 19 .formatted(uniqueForEach));
18 } 20 }
19 } 21 }
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQuery.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQuery.java
index 5a32b1ba..225f6844 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQuery.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/FunctionalQuery.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.literal.CallPolarity; 9import tools.refinery.store.query.literal.CallPolarity;
9import tools.refinery.store.query.term.Aggregator; 10import tools.refinery.store.query.term.Aggregator;
10import tools.refinery.store.query.term.AssignedValue; 11import tools.refinery.store.query.term.AssignedValue;
@@ -26,14 +27,14 @@ public final class FunctionalQuery<T> extends Query<T> {
26 var parameter = parameters.get(i); 27 var parameter = parameters.get(i);
27 var parameterType = parameter.tryGetType(); 28 var parameterType = parameter.tryGetType();
28 if (parameterType.isPresent()) { 29 if (parameterType.isPresent()) {
29 throw new IllegalArgumentException("Expected parameter %s of %s to be a node variable, got %s instead" 30 throw new InvalidQueryException("Expected parameter %s of %s to be a node variable, got %s instead"
30 .formatted(parameter, dnf, parameterType.get().getName())); 31 .formatted(parameter, dnf, parameterType.get().getName()));
31 } 32 }
32 } 33 }
33 var outputParameter = parameters.get(outputIndex); 34 var outputParameter = parameters.get(outputIndex);
34 var outputParameterType = outputParameter.tryGetType(); 35 var outputParameterType = outputParameter.tryGetType();
35 if (outputParameterType.isEmpty() || !outputParameterType.get().equals(type)) { 36 if (outputParameterType.isEmpty() || !outputParameterType.get().equals(type)) {
36 throw new IllegalArgumentException("Expected parameter %s of %s to be %s, but got %s instead".formatted( 37 throw new InvalidQueryException("Expected parameter %s of %s to be %s, but got %s instead".formatted(
37 outputParameter, dnf, type, outputParameterType.map(Class::getName).orElse("node"))); 38 outputParameter, dnf, type, outputParameterType.map(Class::getName).orElse("node")));
38 } 39 }
39 this.type = type; 40 this.type = type;
@@ -54,6 +55,16 @@ public final class FunctionalQuery<T> extends Query<T> {
54 return null; 55 return null;
55 } 56 }
56 57
58 @Override
59 protected FunctionalQuery<T> withDnfInternal(Dnf newDnf) {
60 return newDnf.asFunction(type);
61 }
62
63 @Override
64 public FunctionalQuery<T> withDnf(Dnf newDnf) {
65 return (FunctionalQuery<T>) super.withDnf(newDnf);
66 }
67
57 public AssignedValue<T> call(List<NodeVariable> arguments) { 68 public AssignedValue<T> call(List<NodeVariable> arguments) {
58 return targetVariable -> { 69 return targetVariable -> {
59 var argumentsWithTarget = new ArrayList<Variable>(arguments.size() + 1); 70 var argumentsWithTarget = new ArrayList<Variable>(arguments.size() + 1);
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/InvalidClauseException.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/InvalidClauseException.java
new file mode 100644
index 00000000..747574b9
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/InvalidClauseException.java
@@ -0,0 +1,35 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.dnf;
7
8import tools.refinery.store.query.InvalidQueryException;
9
10public class InvalidClauseException extends InvalidQueryException {
11 private final int clauseIndex;
12
13 public InvalidClauseException(int clauseIndex) {
14 this.clauseIndex = clauseIndex;
15 }
16
17 public InvalidClauseException(int clauseIndex, String message) {
18 super(message);
19 this.clauseIndex = clauseIndex;
20 }
21
22 public InvalidClauseException(int clauseIndex, String message, Throwable cause) {
23 super(message, cause);
24 this.clauseIndex = clauseIndex;
25 }
26
27 public InvalidClauseException(int clauseIndex, Throwable cause) {
28 super(cause);
29 this.clauseIndex = clauseIndex;
30 }
31
32 public int getClauseIndex() {
33 return clauseIndex;
34 }
35}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Query.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Query.java
index aaa52ce6..83fe6ccd 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Query.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/Query.java
@@ -43,6 +43,29 @@ public abstract sealed class Query<T> implements AnyQuery permits FunctionalQuer
43 43
44 public abstract T defaultValue(); 44 public abstract T defaultValue();
45 45
46 public Query<T> withDnf(Dnf newDnf) {
47 if (dnf.equals(newDnf)) {
48 return this;
49 }
50 int arity = dnf.arity();
51 if (newDnf.arity() != arity) {
52 throw new IllegalArgumentException("Arity of %s and %s do not match".formatted(dnf, newDnf));
53 }
54 var parameters = dnf.getParameters();
55 var newParameters = newDnf.getParameters();
56 for (int i = 0; i < arity; i++) {
57 var parameter = parameters.get(i);
58 var newParameter = newParameters.get(i);
59 if (!parameter.matches(newParameter)) {
60 throw new IllegalArgumentException("Parameter #%d mismatch: %s does not match %s"
61 .formatted(i, parameter, newParameter));
62 }
63 }
64 return withDnfInternal(newDnf);
65 }
66
67 protected abstract Query<T> withDnfInternal(Dnf newDnf);
68
46 @Override 69 @Override
47 public boolean equals(Object o) { 70 public boolean equals(Object o) {
48 if (this == o) return true; 71 if (this == o) return true;
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/RelationalQuery.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/RelationalQuery.java
index d34a7ace..98f71e11 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/RelationalQuery.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/RelationalQuery.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.literal.CallLiteral; 9import tools.refinery.store.query.literal.CallLiteral;
9import tools.refinery.store.query.literal.CallPolarity; 10import tools.refinery.store.query.literal.CallPolarity;
10import tools.refinery.store.query.term.AssignedValue; 11import tools.refinery.store.query.term.AssignedValue;
@@ -19,7 +20,7 @@ public final class RelationalQuery extends Query<Boolean> {
19 for (var parameter : dnf.getSymbolicParameters()) { 20 for (var parameter : dnf.getSymbolicParameters()) {
20 var parameterType = parameter.tryGetType(); 21 var parameterType = parameter.tryGetType();
21 if (parameterType.isPresent()) { 22 if (parameterType.isPresent()) {
22 throw new IllegalArgumentException("Expected parameter %s of %s to be a node variable, got %s instead" 23 throw new InvalidQueryException("Expected parameter %s of %s to be a node variable, got %s instead"
23 .formatted(parameter, dnf, parameterType.get().getName())); 24 .formatted(parameter, dnf, parameterType.get().getName()));
24 } 25 }
25 } 26 }
@@ -40,6 +41,16 @@ public final class RelationalQuery extends Query<Boolean> {
40 return false; 41 return false;
41 } 42 }
42 43
44 @Override
45 protected RelationalQuery withDnfInternal(Dnf newDnf) {
46 return newDnf.asRelation();
47 }
48
49 @Override
50 public RelationalQuery withDnf(Dnf newDnf) {
51 return (RelationalQuery) super.withDnf(newDnf);
52 }
53
43 public CallLiteral call(CallPolarity polarity, List<NodeVariable> arguments) { 54 public CallLiteral call(CallPolarity polarity, List<NodeVariable> arguments) {
44 return getDnf().call(polarity, Collections.unmodifiableList(arguments)); 55 return getDnf().call(polarity, Collections.unmodifiableList(arguments));
45 } 56 }
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/SymbolicParameter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/SymbolicParameter.java
index e0d3ba1f..fe9cefcc 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/SymbolicParameter.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/dnf/SymbolicParameter.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import tools.refinery.store.query.equality.LiteralHashCodeHelper;
8import tools.refinery.store.query.term.Parameter; 9import tools.refinery.store.query.term.Parameter;
9import tools.refinery.store.query.term.ParameterDirection; 10import tools.refinery.store.query.term.ParameterDirection;
10import tools.refinery.store.query.term.Variable; 11import tools.refinery.store.query.term.Variable;
@@ -23,8 +24,8 @@ public final class SymbolicParameter extends Parameter {
23 return variable; 24 return variable;
24 } 25 }
25 26
26 public boolean isUnifiable() { 27 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
27 return variable.isUnifiable(); 28 return Objects.hash(super.hashCode(), helper.getVariableHashCode(variable));
28 } 29 }
29 30
30 @Override 31 @Override
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DeepDnfEqualityChecker.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DeepDnfEqualityChecker.java
index 1eeb5723..d6171314 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DeepDnfEqualityChecker.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DeepDnfEqualityChecker.java
@@ -14,8 +14,7 @@ import tools.refinery.store.util.CycleDetectingMapper;
14import java.util.List; 14import java.util.List;
15 15
16public class DeepDnfEqualityChecker implements DnfEqualityChecker { 16public class DeepDnfEqualityChecker implements DnfEqualityChecker {
17 private final CycleDetectingMapper<Pair, Boolean> mapper = new CycleDetectingMapper<>(Pair::toString, 17 private final CycleDetectingMapper<Pair, Boolean> mapper = new CycleDetectingMapper<>(this::doCheckEqual);
18 this::doCheckEqual);
19 18
20 @Override 19 @Override
21 public boolean dnfEqual(Dnf left, Dnf right) { 20 public boolean dnfEqual(Dnf left, Dnf right) {
@@ -38,7 +37,7 @@ public class DeepDnfEqualityChecker implements DnfEqualityChecker {
38 return false; 37 return false;
39 } 38 }
40 for (int i = 0; i < numClauses; i++) { 39 for (int i = 0; i < numClauses; i++) {
41 var literalEqualityHelper = new LiteralEqualityHelper(this, symbolicParameters, 40 var literalEqualityHelper = new SubstitutingLiteralEqualityHelper(this, symbolicParameters,
42 other.getSymbolicParameters()); 41 other.getSymbolicParameters());
43 if (!equalsWithSubstitutionRaw(literalEqualityHelper, clauses.get(i), other.getClauses().get(i))) { 42 if (!equalsWithSubstitutionRaw(literalEqualityHelper, clauses.get(i), other.getClauses().get(i))) {
44 return false; 43 return false;
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DnfEqualityChecker.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DnfEqualityChecker.java
index 4a8bee3b..e2cfd79b 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DnfEqualityChecker.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/DnfEqualityChecker.java
@@ -7,7 +7,11 @@ package tools.refinery.store.query.equality;
7 7
8import tools.refinery.store.query.dnf.Dnf; 8import tools.refinery.store.query.dnf.Dnf;
9 9
10import java.util.Objects;
11
10@FunctionalInterface 12@FunctionalInterface
11public interface DnfEqualityChecker { 13public interface DnfEqualityChecker {
14 DnfEqualityChecker DEFAULT = Objects::equals;
15
12 boolean dnfEqual(Dnf left, Dnf right); 16 boolean dnfEqual(Dnf left, Dnf right);
13} 17}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralEqualityHelper.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralEqualityHelper.java
index 9315fb30..5abc76ce 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralEqualityHelper.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralEqualityHelper.java
@@ -6,49 +6,22 @@
6package tools.refinery.store.query.equality; 6package tools.refinery.store.query.equality;
7 7
8import tools.refinery.store.query.dnf.Dnf; 8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.query.dnf.SymbolicParameter;
10import tools.refinery.store.query.term.Variable; 9import tools.refinery.store.query.term.Variable;
11 10
12import java.util.HashMap; 11import java.util.Objects;
13import java.util.List;
14import java.util.Map;
15 12
16public class LiteralEqualityHelper { 13public interface LiteralEqualityHelper extends DnfEqualityChecker {
17 private final DnfEqualityChecker dnfEqualityChecker; 14 LiteralEqualityHelper DEFAULT = new LiteralEqualityHelper() {
18 private final Map<Variable, Variable> leftToRight; 15 @Override
19 private final Map<Variable, Variable> rightToLeft; 16 public boolean variableEqual(Variable left, Variable right) {
20 17 return Objects.equals(left, right);
21 public LiteralEqualityHelper(DnfEqualityChecker dnfEqualityChecker, List<SymbolicParameter> leftParameters,
22 List<SymbolicParameter> rightParameters) {
23 this.dnfEqualityChecker = dnfEqualityChecker;
24 var arity = leftParameters.size();
25 if (arity != rightParameters.size()) {
26 throw new IllegalArgumentException("Parameter lists have unequal length");
27 }
28 leftToRight = new HashMap<>(arity);
29 rightToLeft = new HashMap<>(arity);
30 for (int i = 0; i < arity; i++) {
31 if (!variableEqual(leftParameters.get(i).getVariable(), rightParameters.get(i).getVariable())) {
32 throw new IllegalArgumentException("Parameter lists cannot be unified: duplicate parameter " + i);
33 }
34 } 18 }
35 }
36
37 public boolean dnfEqual(Dnf left, Dnf right) {
38 return dnfEqualityChecker.dnfEqual(left, right);
39 }
40 19
41 public boolean variableEqual(Variable left, Variable right) { 20 @Override
42 if (checkMapping(leftToRight, left, right) && checkMapping(rightToLeft, right, left)) { 21 public boolean dnfEqual(Dnf left, Dnf right) {
43 leftToRight.put(left, right); 22 return DnfEqualityChecker.DEFAULT.dnfEqual(left, right);
44 rightToLeft.put(right, left);
45 return true;
46 } 23 }
47 return false; 24 };
48 }
49 25
50 private static boolean checkMapping(Map<Variable, Variable> map, Variable key, Variable expectedValue) { 26 boolean variableEqual(Variable left, Variable right);
51 var currentValue = map.get(key);
52 return currentValue == null || currentValue.equals(expectedValue);
53 }
54} 27}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralHashCodeHelper.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralHashCodeHelper.java
new file mode 100644
index 00000000..5495160a
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/LiteralHashCodeHelper.java
@@ -0,0 +1,17 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.equality;
7
8import tools.refinery.store.query.term.Variable;
9
10import java.util.Objects;
11
12@FunctionalInterface
13public interface LiteralHashCodeHelper {
14 LiteralHashCodeHelper DEFAULT = Objects::hashCode;
15
16 int getVariableHashCode(Variable variable);
17}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralEqualityHelper.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralEqualityHelper.java
new file mode 100644
index 00000000..50a79e07
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralEqualityHelper.java
@@ -0,0 +1,59 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.equality;
7
8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.query.dnf.SymbolicParameter;
10import tools.refinery.store.query.term.Variable;
11
12import java.util.HashMap;
13import java.util.List;
14import java.util.Map;
15
16public class SubstitutingLiteralEqualityHelper implements LiteralEqualityHelper {
17 private final DnfEqualityChecker dnfEqualityChecker;
18 private final Map<Variable, Variable> leftToRight;
19 private final Map<Variable, Variable> rightToLeft;
20
21 public SubstitutingLiteralEqualityHelper(DnfEqualityChecker dnfEqualityChecker,
22 List<SymbolicParameter> leftParameters,
23 List<SymbolicParameter> rightParameters) {
24 this.dnfEqualityChecker = dnfEqualityChecker;
25 var arity = leftParameters.size();
26 if (arity != rightParameters.size()) {
27 throw new IllegalArgumentException("Parameter lists have unequal length");
28 }
29 leftToRight = new HashMap<>(arity);
30 rightToLeft = new HashMap<>(arity);
31 for (int i = 0; i < arity; i++) {
32 if (!variableEqual(leftParameters.get(i).getVariable(), rightParameters.get(i).getVariable())) {
33 throw new IllegalArgumentException("Parameter lists cannot be unified: duplicate parameter " + i);
34 }
35 }
36 }
37
38 @Override
39 public boolean dnfEqual(Dnf left, Dnf right) {
40 return dnfEqualityChecker.dnfEqual(left, right);
41 }
42
43 @Override
44 public boolean variableEqual(Variable left, Variable right) {
45 if (left.tryGetType().equals(right.tryGetType()) &&
46 checkMapping(leftToRight, left, right) &&
47 checkMapping(rightToLeft, right, left)) {
48 leftToRight.put(left, right);
49 rightToLeft.put(right, left);
50 return true;
51 }
52 return false;
53 }
54
55 private static boolean checkMapping(Map<Variable, Variable> map, Variable key, Variable expectedValue) {
56 var currentValue = map.get(key);
57 return currentValue == null || currentValue.equals(expectedValue);
58 }
59}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralHashCodeHelper.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralHashCodeHelper.java
new file mode 100644
index 00000000..754f6976
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/equality/SubstitutingLiteralHashCodeHelper.java
@@ -0,0 +1,42 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.equality;
7
8import tools.refinery.store.query.dnf.SymbolicParameter;
9import tools.refinery.store.query.term.Variable;
10
11import java.util.LinkedHashMap;
12import java.util.List;
13import java.util.Map;
14
15public class SubstitutingLiteralHashCodeHelper implements LiteralHashCodeHelper {
16 private final Map<Variable, Integer> assignedHashCodes = new LinkedHashMap<>();
17
18 // 0 is for {@code null}, so we start with 1.
19 private int next = 1;
20
21 public SubstitutingLiteralHashCodeHelper() {
22 this(List.of());
23 }
24
25 public SubstitutingLiteralHashCodeHelper(List<SymbolicParameter> parameters) {
26 for (var parameter : parameters) {
27 getVariableHashCode(parameter.getVariable());
28 }
29 }
30
31 @Override
32 public int getVariableHashCode(Variable variable) {
33 if (variable == null) {
34 return 0;
35 }
36 return assignedHashCodes.computeIfAbsent(variable, key -> {
37 int sequenceNumber = next;
38 next++;
39 return variable.hashCodeWithSubstitution(sequenceNumber);
40 });
41 }
42}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCallLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCallLiteral.java
index 8ef8e8b4..0e99d441 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCallLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCallLiteral.java
@@ -6,14 +6,18 @@
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.Constraint; 8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.equality.LiteralEqualityHelper; 10import tools.refinery.store.query.equality.LiteralEqualityHelper;
11import tools.refinery.store.query.equality.LiteralHashCodeHelper;
10import tools.refinery.store.query.substitution.Substitution; 12import tools.refinery.store.query.substitution.Substitution;
11import tools.refinery.store.query.term.ParameterDirection; 13import tools.refinery.store.query.term.ParameterDirection;
12import tools.refinery.store.query.term.Variable; 14import tools.refinery.store.query.term.Variable;
13 15
14import java.util.*; 16import java.util.*;
15 17
16public abstract class AbstractCallLiteral implements Literal { 18// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
19@SuppressWarnings("squid:S2160")
20public abstract class AbstractCallLiteral extends AbstractLiteral {
17 private final Constraint target; 21 private final Constraint target;
18 private final List<Variable> arguments; 22 private final List<Variable> arguments;
19 private final Set<Variable> inArguments; 23 private final Set<Variable> inArguments;
@@ -24,7 +28,7 @@ public abstract class AbstractCallLiteral implements Literal {
24 protected AbstractCallLiteral(Constraint target, List<Variable> arguments) { 28 protected AbstractCallLiteral(Constraint target, List<Variable> arguments) {
25 int arity = target.arity(); 29 int arity = target.arity();
26 if (arguments.size() != arity) { 30 if (arguments.size() != arity) {
27 throw new IllegalArgumentException("%s needs %d arguments, but got %s".formatted(target.name(), 31 throw new InvalidQueryException("%s needs %d arguments, but got %s".formatted(target.name(),
28 target.arity(), arguments.size())); 32 target.arity(), arguments.size()));
29 } 33 }
30 this.target = target; 34 this.target = target;
@@ -36,21 +40,17 @@ public abstract class AbstractCallLiteral implements Literal {
36 var argument = arguments.get(i); 40 var argument = arguments.get(i);
37 var parameter = parameters.get(i); 41 var parameter = parameters.get(i);
38 if (!parameter.isAssignable(argument)) { 42 if (!parameter.isAssignable(argument)) {
39 throw new IllegalArgumentException("Argument %d of %s is not assignable to parameter %s" 43 throw new InvalidQueryException("Argument %d of %s is not assignable to parameter %s"
40 .formatted(i, target, parameter)); 44 .formatted(i, target, parameter));
41 } 45 }
42 switch (parameter.getDirection()) { 46 switch (parameter.getDirection()) {
43 case IN -> { 47 case IN -> {
44 if (mutableOutArguments.remove(argument)) { 48 mutableOutArguments.remove(argument);
45 checkInOutUnifiable(argument);
46 }
47 mutableInArguments.add(argument); 49 mutableInArguments.add(argument);
48 } 50 }
49 case OUT -> { 51 case OUT -> {
50 if (mutableInArguments.contains(argument)) { 52 if (!mutableInArguments.contains(argument)) {
51 checkInOutUnifiable(argument); 53 mutableOutArguments.add(argument);
52 } else if (!mutableOutArguments.add(argument)) {
53 checkDuplicateOutUnifiable(argument);
54 } 54 }
55 } 55 }
56 } 56 }
@@ -59,19 +59,6 @@ public abstract class AbstractCallLiteral implements Literal {
59 outArguments = Collections.unmodifiableSet(mutableOutArguments); 59 outArguments = Collections.unmodifiableSet(mutableOutArguments);
60 } 60 }
61 61
62 private static void checkInOutUnifiable(Variable argument) {
63 if (!argument.isUnifiable()) {
64 throw new IllegalArgumentException("Argument %s cannot appear with both %s and %s direction"
65 .formatted(argument, ParameterDirection.IN, ParameterDirection.OUT));
66 }
67 }
68
69 private static void checkDuplicateOutUnifiable(Variable argument) {
70 if (!argument.isUnifiable()) {
71 throw new IllegalArgumentException("Argument %s cannot be bound multiple times".formatted(argument));
72 }
73 }
74
75 public Constraint getTarget() { 62 public Constraint getTarget() {
76 return target; 63 return target;
77 } 64 }
@@ -110,9 +97,18 @@ public abstract class AbstractCallLiteral implements Literal {
110 97
111 protected abstract Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments); 98 protected abstract Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments);
112 99
100 public AbstractCallLiteral withTarget(Constraint newTarget) {
101 if (Objects.equals(target, newTarget)) {
102 return this;
103 }
104 return withArguments(newTarget, arguments);
105 }
106
107 public abstract AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments);
108
113 @Override 109 @Override
114 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) { 110 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) {
115 if (other == null || getClass() != other.getClass()) { 111 if (!super.equalsWithSubstitution(helper, other)) {
116 return false; 112 return false;
117 } 113 }
118 var otherCallLiteral = (AbstractCallLiteral) other; 114 var otherCallLiteral = (AbstractCallLiteral) other;
@@ -129,15 +125,11 @@ public abstract class AbstractCallLiteral implements Literal {
129 } 125 }
130 126
131 @Override 127 @Override
132 public boolean equals(Object o) { 128 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
133 if (this == o) return true; 129 int result = super.hashCodeWithSubstitution(helper) * 31 + target.hashCode();
134 if (o == null || getClass() != o.getClass()) return false; 130 for (var argument : arguments) {
135 AbstractCallLiteral that = (AbstractCallLiteral) o; 131 result = result * 31 + helper.getVariableHashCode(argument);
136 return target.equals(that.target) && arguments.equals(that.arguments); 132 }
137 } 133 return result;
138
139 @Override
140 public int hashCode() {
141 return Objects.hash(getClass(), target, arguments);
142 } 134 }
143} 135}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCountLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCountLiteral.java
new file mode 100644
index 00000000..9bb572c0
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractCountLiteral.java
@@ -0,0 +1,107 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.literal;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.InvalidQueryException;
10import tools.refinery.store.query.equality.LiteralEqualityHelper;
11import tools.refinery.store.query.equality.LiteralHashCodeHelper;
12import tools.refinery.store.query.term.ConstantTerm;
13import tools.refinery.store.query.term.DataVariable;
14import tools.refinery.store.query.term.Variable;
15
16import java.util.List;
17import java.util.Objects;
18import java.util.Set;
19
20// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
21@SuppressWarnings("squid:S2160")
22public abstract class AbstractCountLiteral<T> extends AbstractCallLiteral {
23 private final Class<T> resultType;
24 private final DataVariable<T> resultVariable;
25
26 protected AbstractCountLiteral(Class<T> resultType, DataVariable<T> resultVariable, Constraint target,
27 List<Variable> arguments) {
28 super(target, arguments);
29 if (!resultVariable.getType().equals(resultType)) {
30 throw new InvalidQueryException("Count result variable %s must be of type %s, got %s instead".formatted(
31 resultVariable, resultType, resultVariable.getType().getName()));
32 }
33 if (arguments.contains(resultVariable)) {
34 throw new InvalidQueryException("Count result variable %s must not appear in the argument list"
35 .formatted(resultVariable));
36 }
37 this.resultType = resultType;
38 this.resultVariable = resultVariable;
39 }
40
41 public Class<T> getResultType() {
42 return resultType;
43 }
44
45 public DataVariable<T> getResultVariable() {
46 return resultVariable;
47 }
48
49 @Override
50 public Set<Variable> getOutputVariables() {
51 return Set.of(resultVariable);
52 }
53
54 protected abstract T zero();
55
56 protected abstract T one();
57
58 @Override
59 public Literal reduce() {
60 var reduction = getTarget().getReduction();
61 return switch (reduction) {
62 case ALWAYS_FALSE -> getResultVariable().assign(new ConstantTerm<>(resultType, zero()));
63 // The only way a constant {@code true} predicate can be called in a negative position is to have all of
64 // its arguments bound as input variables. Thus, there will only be a single match.
65 case ALWAYS_TRUE -> getResultVariable().assign(new ConstantTerm<>(resultType, one()));
66 case NOT_REDUCIBLE -> this;
67 };
68 }
69
70 @Override
71 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) {
72 if (!super.equalsWithSubstitution(helper, other)) {
73 return false;
74 }
75 var otherCountLiteral = (AbstractCountLiteral<?>) other;
76 return Objects.equals(resultType, otherCountLiteral.resultType) &&
77 helper.variableEqual(resultVariable, otherCountLiteral.resultVariable);
78 }
79
80 @Override
81 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
82 return Objects.hash(super.hashCodeWithSubstitution(helper), resultType,
83 helper.getVariableHashCode(resultVariable));
84 }
85
86 protected abstract String operatorName();
87
88 @Override
89 public String toString() {
90 var builder = new StringBuilder();
91 builder.append(resultVariable);
92 builder.append(" is ");
93 builder.append(operatorName());
94 builder.append(' ');
95 builder.append(getTarget().toReferenceString());
96 builder.append('(');
97 var argumentIterator = getArguments().iterator();
98 if (argumentIterator.hasNext()) {
99 builder.append(argumentIterator.next());
100 while (argumentIterator.hasNext()) {
101 builder.append(", ").append(argumentIterator.next());
102 }
103 }
104 builder.append(')');
105 return builder.toString();
106 }
107}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractLiteral.java
new file mode 100644
index 00000000..7d3cabd7
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AbstractLiteral.java
@@ -0,0 +1,34 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.literal;
7
8import tools.refinery.store.query.equality.LiteralEqualityHelper;
9import tools.refinery.store.query.equality.LiteralHashCodeHelper;
10
11public abstract class AbstractLiteral implements Literal {
12 @Override
13 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) {
14 return other != null && getClass() == other.getClass();
15 }
16
17 @Override
18 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
19 return getClass().hashCode();
20 }
21
22 @Override
23 public boolean equals(Object o) {
24 if (this == o) return true;
25 if (o == null || getClass() != o.getClass()) return false;
26 AbstractLiteral that = (AbstractLiteral) o;
27 return equalsWithSubstitution(LiteralEqualityHelper.DEFAULT, that);
28 }
29
30 @Override
31 public int hashCode() {
32 return hashCodeWithSubstitution(LiteralHashCodeHelper.DEFAULT);
33 }
34}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AggregationLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AggregationLiteral.java
index 3a5eb5c7..e3acfacc 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AggregationLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AggregationLiteral.java
@@ -6,7 +6,9 @@
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.Constraint; 8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.equality.LiteralEqualityHelper; 10import tools.refinery.store.query.equality.LiteralEqualityHelper;
11import tools.refinery.store.query.equality.LiteralHashCodeHelper;
10import tools.refinery.store.query.substitution.Substitution; 12import tools.refinery.store.query.substitution.Substitution;
11import tools.refinery.store.query.term.*; 13import tools.refinery.store.query.term.*;
12 14
@@ -14,6 +16,8 @@ import java.util.List;
14import java.util.Objects; 16import java.util.Objects;
15import java.util.Set; 17import java.util.Set;
16 18
19// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
20@SuppressWarnings("squid:S2160")
17public class AggregationLiteral<R, T> extends AbstractCallLiteral { 21public class AggregationLiteral<R, T> extends AbstractCallLiteral {
18 private final DataVariable<R> resultVariable; 22 private final DataVariable<R> resultVariable;
19 private final DataVariable<T> inputVariable; 23 private final DataVariable<T> inputVariable;
@@ -23,19 +27,19 @@ public class AggregationLiteral<R, T> extends AbstractCallLiteral {
23 DataVariable<T> inputVariable, Constraint target, List<Variable> arguments) { 27 DataVariable<T> inputVariable, Constraint target, List<Variable> arguments) {
24 super(target, arguments); 28 super(target, arguments);
25 if (!inputVariable.getType().equals(aggregator.getInputType())) { 29 if (!inputVariable.getType().equals(aggregator.getInputType())) {
26 throw new IllegalArgumentException("Input variable %s must of type %s, got %s instead".formatted( 30 throw new InvalidQueryException("Input variable %s must of type %s, got %s instead".formatted(
27 inputVariable, aggregator.getInputType().getName(), inputVariable.getType().getName())); 31 inputVariable, aggregator.getInputType().getName(), inputVariable.getType().getName()));
28 } 32 }
29 if (!getArgumentsOfDirection(ParameterDirection.OUT).contains(inputVariable)) { 33 if (!getArgumentsOfDirection(ParameterDirection.OUT).contains(inputVariable)) {
30 throw new IllegalArgumentException("Input variable %s must be bound with direction %s in the argument list" 34 throw new InvalidQueryException("Input variable %s must be bound with direction %s in the argument list"
31 .formatted(inputVariable, ParameterDirection.OUT)); 35 .formatted(inputVariable, ParameterDirection.OUT));
32 } 36 }
33 if (!resultVariable.getType().equals(aggregator.getResultType())) { 37 if (!resultVariable.getType().equals(aggregator.getResultType())) {
34 throw new IllegalArgumentException("Result variable %s must of type %s, got %s instead".formatted( 38 throw new InvalidQueryException("Result variable %s must of type %s, got %s instead".formatted(
35 resultVariable, aggregator.getResultType().getName(), resultVariable.getType().getName())); 39 resultVariable, aggregator.getResultType().getName(), resultVariable.getType().getName()));
36 } 40 }
37 if (arguments.contains(resultVariable)) { 41 if (arguments.contains(resultVariable)) {
38 throw new IllegalArgumentException("Result variable %s must not appear in the argument list".formatted( 42 throw new InvalidQueryException("Result variable %s must not appear in the argument list".formatted(
39 resultVariable)); 43 resultVariable));
40 } 44 }
41 this.resultVariable = resultVariable; 45 this.resultVariable = resultVariable;
@@ -63,7 +67,7 @@ public class AggregationLiteral<R, T> extends AbstractCallLiteral {
63 @Override 67 @Override
64 public Set<Variable> getInputVariables(Set<? extends Variable> positiveVariablesInClause) { 68 public Set<Variable> getInputVariables(Set<? extends Variable> positiveVariablesInClause) {
65 if (positiveVariablesInClause.contains(inputVariable)) { 69 if (positiveVariablesInClause.contains(inputVariable)) {
66 throw new IllegalArgumentException("Aggregation variable %s must not be bound".formatted(inputVariable)); 70 throw new InvalidQueryException("Aggregation variable %s must not be bound".formatted(inputVariable));
67 } 71 }
68 return super.getInputVariables(positiveVariablesInClause); 72 return super.getInputVariables(positiveVariablesInClause);
69 } 73 }
@@ -77,7 +81,7 @@ public class AggregationLiteral<R, T> extends AbstractCallLiteral {
77 yield emptyValue == null ? BooleanLiteral.FALSE : 81 yield emptyValue == null ? BooleanLiteral.FALSE :
78 resultVariable.assign(new ConstantTerm<>(resultVariable.getType(), emptyValue)); 82 resultVariable.assign(new ConstantTerm<>(resultVariable.getType(), emptyValue));
79 } 83 }
80 case ALWAYS_TRUE -> throw new IllegalArgumentException("Trying to aggregate over an infinite set"); 84 case ALWAYS_TRUE -> throw new InvalidQueryException("Trying to aggregate over an infinite set");
81 case NOT_REDUCIBLE -> this; 85 case NOT_REDUCIBLE -> this;
82 }; 86 };
83 } 87 }
@@ -89,6 +93,11 @@ public class AggregationLiteral<R, T> extends AbstractCallLiteral {
89 } 93 }
90 94
91 @Override 95 @Override
96 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
97 return new AggregationLiteral<>(resultVariable, aggregator, inputVariable, newTarget, newArguments);
98 }
99
100 @Override
92 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) { 101 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) {
93 if (!super.equalsWithSubstitution(helper, other)) { 102 if (!super.equalsWithSubstitution(helper, other)) {
94 return false; 103 return false;
@@ -100,18 +109,9 @@ public class AggregationLiteral<R, T> extends AbstractCallLiteral {
100 } 109 }
101 110
102 @Override 111 @Override
103 public boolean equals(Object o) { 112 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
104 if (this == o) return true; 113 return Objects.hash(super.hashCodeWithSubstitution(helper), helper.getVariableHashCode(resultVariable),
105 if (o == null || getClass() != o.getClass()) return false; 114 helper.getVariableHashCode(inputVariable), aggregator);
106 if (!super.equals(o)) return false;
107 AggregationLiteral<?, ?> that = (AggregationLiteral<?, ?>) o;
108 return resultVariable.equals(that.resultVariable) && inputVariable.equals(that.inputVariable) &&
109 aggregator.equals(that.aggregator);
110 }
111
112 @Override
113 public int hashCode() {
114 return Objects.hash(super.hashCode(), resultVariable, inputVariable, aggregator);
115 } 115 }
116 116
117 @Override 117 @Override
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssignLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssignLiteral.java
index dbf999a2..dadf487f 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssignLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssignLiteral.java
@@ -5,7 +5,9 @@
5 */ 5 */
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 9import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 11import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.term.DataVariable; 12import tools.refinery.store.query.term.DataVariable;
11import tools.refinery.store.query.term.Term; 13import tools.refinery.store.query.term.Term;
@@ -15,17 +17,32 @@ import java.util.Collections;
15import java.util.Objects; 17import java.util.Objects;
16import java.util.Set; 18import java.util.Set;
17 19
18public record AssignLiteral<T>(DataVariable<T> variable, Term<T> term) implements Literal { 20// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
19 public AssignLiteral { 21@SuppressWarnings("squid:S2160")
22public class AssignLiteral<T> extends AbstractLiteral {
23 private final DataVariable<T> variable;
24 private final Term<T> term;
25
26 public AssignLiteral(DataVariable<T> variable, Term<T> term) {
20 if (!term.getType().equals(variable.getType())) { 27 if (!term.getType().equals(variable.getType())) {
21 throw new IllegalArgumentException("Term %s must be of type %s, got %s instead".formatted( 28 throw new InvalidQueryException("Term %s must be of type %s, got %s instead".formatted(
22 term, variable.getType().getName(), term.getType().getName())); 29 term, variable.getType().getName(), term.getType().getName()));
23 } 30 }
24 var inputVariables = term.getInputVariables(); 31 var inputVariables = term.getInputVariables();
25 if (inputVariables.contains(variable)) { 32 if (inputVariables.contains(variable)) {
26 throw new IllegalArgumentException("Result variable %s must not appear in the term %s".formatted( 33 throw new InvalidQueryException("Result variable %s must not appear in the term %s".formatted(
27 variable, term)); 34 variable, term));
28 } 35 }
36 this.variable = variable;
37 this.term = term;
38 }
39
40 public DataVariable<T> getVariable() {
41 return variable;
42 }
43
44 public Term<T> getTerm() {
45 return term;
29 } 46 }
30 47
31 @Override 48 @Override
@@ -53,27 +70,19 @@ public record AssignLiteral<T>(DataVariable<T> variable, Term<T> term) implement
53 if (other == null || getClass() != other.getClass()) { 70 if (other == null || getClass() != other.getClass()) {
54 return false; 71 return false;
55 } 72 }
56 var otherLetLiteral = (AssignLiteral<?>) other; 73 var otherAssignLiteral = (AssignLiteral<?>) other;
57 return helper.variableEqual(variable, otherLetLiteral.variable) && term.equalsWithSubstitution(helper, 74 return helper.variableEqual(variable, otherAssignLiteral.variable) &&
58 otherLetLiteral.term); 75 term.equalsWithSubstitution(helper, otherAssignLiteral.term);
59 }
60
61 @Override
62 public String toString() {
63 return "%s is (%s)".formatted(variable, term);
64 } 76 }
65 77
66 @Override 78 @Override
67 public boolean equals(Object obj) { 79 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
68 if (obj == this) return true; 80 return Objects.hash(super.hashCodeWithSubstitution(helper), helper.getVariableHashCode(variable),
69 if (obj == null || obj.getClass() != this.getClass()) return false; 81 term.hashCodeWithSubstitution(helper));
70 var that = (AssignLiteral<?>) obj;
71 return Objects.equals(this.variable, that.variable) &&
72 Objects.equals(this.term, that.term);
73 } 82 }
74 83
75 @Override 84 @Override
76 public int hashCode() { 85 public String toString() {
77 return Objects.hash(getClass(), variable, term); 86 return "%s is (%s)".formatted(variable, term);
78 } 87 }
79} 88}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/BooleanLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/BooleanLiteral.java
index f312d202..6cd320da 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/BooleanLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/BooleanLiteral.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 8import tools.refinery.store.query.equality.LiteralEqualityHelper;
9import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 10import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.term.Variable; 11import tools.refinery.store.query.term.Variable;
11 12
@@ -53,6 +54,11 @@ public enum BooleanLiteral implements CanNegate<BooleanLiteral> {
53 } 54 }
54 55
55 @Override 56 @Override
57 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
58 return hashCode();
59 }
60
61 @Override
56 public String toString() { 62 public String toString() {
57 return Boolean.toString(value); 63 return Boolean.toString(value);
58 } 64 }
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallLiteral.java
index 29772aee..2d0e4e97 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallLiteral.java
@@ -6,13 +6,17 @@
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.Constraint; 8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.equality.LiteralEqualityHelper; 10import tools.refinery.store.query.equality.LiteralEqualityHelper;
11import tools.refinery.store.query.equality.LiteralHashCodeHelper;
10import tools.refinery.store.query.substitution.Substitution; 12import tools.refinery.store.query.substitution.Substitution;
11import tools.refinery.store.query.term.ParameterDirection; 13import tools.refinery.store.query.term.ParameterDirection;
12import tools.refinery.store.query.term.Variable; 14import tools.refinery.store.query.term.Variable;
13 15
14import java.util.*; 16import java.util.*;
15 17
18// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
19@SuppressWarnings("squid:S2160")
16public final class CallLiteral extends AbstractCallLiteral implements CanNegate<CallLiteral> { 20public final class CallLiteral extends AbstractCallLiteral implements CanNegate<CallLiteral> {
17 private final CallPolarity polarity; 21 private final CallPolarity polarity;
18 22
@@ -22,10 +26,14 @@ public final class CallLiteral extends AbstractCallLiteral implements CanNegate<
22 int arity = target.arity(); 26 int arity = target.arity();
23 if (polarity.isTransitive()) { 27 if (polarity.isTransitive()) {
24 if (arity != 2) { 28 if (arity != 2) {
25 throw new IllegalArgumentException("Transitive closures can only take binary relations"); 29 throw new InvalidQueryException("Transitive closures can only take binary relations");
26 } 30 }
27 if (parameters.get(0).isDataVariable() || parameters.get(1).isDataVariable()) { 31 if (parameters.get(0).isDataVariable() || parameters.get(1).isDataVariable()) {
28 throw new IllegalArgumentException("Transitive closures can only be computed over nodes"); 32 throw new InvalidQueryException("Transitive closures can only be computed over nodes");
33 }
34 if (parameters.get(0).getDirection() != ParameterDirection.OUT ||
35 parameters.get(1).getDirection() != ParameterDirection.OUT) {
36 throw new InvalidQueryException("Transitive closures cannot take input parameters");
29 } 37 }
30 } 38 }
31 this.polarity = polarity; 39 this.polarity = polarity;
@@ -85,22 +93,18 @@ public final class CallLiteral extends AbstractCallLiteral implements CanNegate<
85 } 93 }
86 94
87 @Override 95 @Override
88 public CallLiteral negate() { 96 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
89 return new CallLiteral(polarity.negate(), getTarget(), getArguments()); 97 return Objects.hash(super.hashCodeWithSubstitution(helper), polarity);
90 } 98 }
91 99
92 @Override 100 @Override
93 public boolean equals(Object o) { 101 public CallLiteral negate() {
94 if (this == o) return true; 102 return new CallLiteral(polarity.negate(), getTarget(), getArguments());
95 if (o == null || getClass() != o.getClass()) return false;
96 if (!super.equals(o)) return false;
97 CallLiteral that = (CallLiteral) o;
98 return polarity == that.polarity;
99 } 103 }
100 104
101 @Override 105 @Override
102 public int hashCode() { 106 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
103 return Objects.hash(super.hashCode(), polarity); 107 return new CallLiteral(polarity, newTarget, newArguments);
104 } 108 }
105 109
106 @Override 110 @Override
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallPolarity.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallPolarity.java
index ca70b0fd..716c7109 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallPolarity.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CallPolarity.java
@@ -5,6 +5,8 @@
5 */ 5 */
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.InvalidQueryException;
9
8public enum CallPolarity { 10public enum CallPolarity {
9 POSITIVE(true, false), 11 POSITIVE(true, false),
10 NEGATIVE(false, false), 12 NEGATIVE(false, false),
@@ -31,7 +33,7 @@ public enum CallPolarity {
31 return switch (this) { 33 return switch (this) {
32 case POSITIVE -> NEGATIVE; 34 case POSITIVE -> NEGATIVE;
33 case NEGATIVE -> POSITIVE; 35 case NEGATIVE -> POSITIVE;
34 case TRANSITIVE -> throw new IllegalArgumentException("Transitive polarity cannot be negated"); 36 case TRANSITIVE -> throw new InvalidQueryException("Transitive polarity cannot be negated");
35 }; 37 };
36 } 38 }
37} 39}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssumeLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CheckLiteral.java
index 1ca04c77..dfedd2cb 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/AssumeLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CheckLiteral.java
@@ -5,22 +5,35 @@
5 */ 5 */
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 9import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 11import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.term.ConstantTerm; 12import tools.refinery.store.query.term.ConstantTerm;
11import tools.refinery.store.query.term.Term; 13import tools.refinery.store.query.term.Term;
12import tools.refinery.store.query.term.Variable; 14import tools.refinery.store.query.term.Variable;
15import tools.refinery.store.query.term.bool.BoolNotTerm;
16import tools.refinery.store.query.term.bool.BoolTerms;
13 17
14import java.util.Collections; 18import java.util.Collections;
15import java.util.Objects; 19import java.util.Objects;
16import java.util.Set; 20import java.util.Set;
17 21
18public record AssumeLiteral(Term<Boolean> term) implements Literal { 22// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
19 public AssumeLiteral { 23@SuppressWarnings("squid:S2160")
24public class CheckLiteral extends AbstractLiteral implements CanNegate<CheckLiteral> {
25 private final Term<Boolean> term;
26
27 public CheckLiteral(Term<Boolean> term) {
20 if (!term.getType().equals(Boolean.class)) { 28 if (!term.getType().equals(Boolean.class)) {
21 throw new IllegalArgumentException("Term %s must be of type %s, got %s instead".formatted( 29 throw new InvalidQueryException("Term %s must be of type %s, got %s instead".formatted(
22 term, Boolean.class.getName(), term.getType().getName())); 30 term, Boolean.class.getName(), term.getType().getName()));
23 } 31 }
32 this.term = term;
33 }
34
35 public Term<Boolean> getTerm() {
36 return term;
24 } 37 }
25 38
26 @Override 39 @Override
@@ -38,10 +51,17 @@ public record AssumeLiteral(Term<Boolean> term) implements Literal {
38 return Set.of(); 51 return Set.of();
39 } 52 }
40 53
41
42 @Override 54 @Override
43 public Literal substitute(Substitution substitution) { 55 public Literal substitute(Substitution substitution) {
44 return new AssumeLiteral(term.substitute(substitution)); 56 return new CheckLiteral(term.substitute(substitution));
57 }
58
59 @Override
60 public CheckLiteral negate() {
61 if (term instanceof BoolNotTerm notTerm) {
62 return new CheckLiteral(notTerm.getBody());
63 }
64 return new CheckLiteral(BoolTerms.not(term));
45 } 65 }
46 66
47 @Override 67 @Override
@@ -49,11 +69,16 @@ public record AssumeLiteral(Term<Boolean> term) implements Literal {
49 if (other == null || getClass() != other.getClass()) { 69 if (other == null || getClass() != other.getClass()) {
50 return false; 70 return false;
51 } 71 }
52 var otherAssumeLiteral = (AssumeLiteral) other; 72 var otherAssumeLiteral = (CheckLiteral) other;
53 return term.equalsWithSubstitution(helper, otherAssumeLiteral.term); 73 return term.equalsWithSubstitution(helper, otherAssumeLiteral.term);
54 } 74 }
55 75
56 @Override 76 @Override
77 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
78 return Objects.hash(super.hashCodeWithSubstitution(helper), term.hashCodeWithSubstitution(helper));
79 }
80
81 @Override
57 public Literal reduce() { 82 public Literal reduce() {
58 if (term instanceof ConstantTerm<Boolean> constantTerm) { 83 if (term instanceof ConstantTerm<Boolean> constantTerm) {
59 // Return {@link BooleanLiteral#FALSE} for {@code false} or {@code null} literals. 84 // Return {@link BooleanLiteral#FALSE} for {@code false} or {@code null} literals.
@@ -67,17 +92,4 @@ public record AssumeLiteral(Term<Boolean> term) implements Literal {
67 public String toString() { 92 public String toString() {
68 return "(%s)".formatted(term); 93 return "(%s)".formatted(term);
69 } 94 }
70
71 @Override
72 public boolean equals(Object obj) {
73 if (obj == this) return true;
74 if (obj == null || obj.getClass() != this.getClass()) return false;
75 var that = (AssumeLiteral) obj;
76 return Objects.equals(this.term, that.term);
77 }
78
79 @Override
80 public int hashCode() {
81 return Objects.hash(getClass(), term);
82 }
83} 95}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Connectivity.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Connectivity.java
new file mode 100644
index 00000000..a058094d
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Connectivity.java
@@ -0,0 +1,18 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.literal;
7
8import java.util.Locale;
9
10public enum Connectivity {
11 WEAK,
12 STRONG;
13
14 @Override
15 public String toString() {
16 return name().toLowerCase(Locale.ROOT);
17 }
18}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/ConstantLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/ConstantLiteral.java
index 73545620..d83bd584 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/ConstantLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/ConstantLiteral.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 8import tools.refinery.store.query.equality.LiteralEqualityHelper;
9import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 10import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.term.NodeVariable; 11import tools.refinery.store.query.term.NodeVariable;
11import tools.refinery.store.query.term.Variable; 12import tools.refinery.store.query.term.Variable;
@@ -13,7 +14,24 @@ import tools.refinery.store.query.term.Variable;
13import java.util.Objects; 14import java.util.Objects;
14import java.util.Set; 15import java.util.Set;
15 16
16public record ConstantLiteral(NodeVariable variable, int nodeId) implements Literal { 17public class ConstantLiteral extends AbstractLiteral {
18 private final NodeVariable variable;
19 private final int nodeId;
20
21 public ConstantLiteral(NodeVariable variable, int nodeId) {
22 this.variable = variable;
23 this.nodeId = nodeId;
24 }
25
26 public NodeVariable getVariable() {
27 return variable;
28 }
29
30 public int getNodeId() {
31 return nodeId;
32 }
33
34
17 @Override 35 @Override
18 public Set<Variable> getOutputVariables() { 36 public Set<Variable> getOutputVariables() {
19 return Set.of(variable); 37 return Set.of(variable);
@@ -43,23 +61,13 @@ public record ConstantLiteral(NodeVariable variable, int nodeId) implements Lite
43 return helper.variableEqual(variable, otherConstantLiteral.variable) && nodeId == otherConstantLiteral.nodeId; 61 return helper.variableEqual(variable, otherConstantLiteral.variable) && nodeId == otherConstantLiteral.nodeId;
44 } 62 }
45 63
46
47 @Override
48 public String toString() {
49 return "%s === @Constant %d".formatted(variable, nodeId);
50 }
51
52 @Override 64 @Override
53 public boolean equals(Object obj) { 65 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
54 if (obj == this) return true; 66 return Objects.hash(super.hashCodeWithSubstitution(helper), helper.getVariableHashCode(variable), nodeId);
55 if (obj == null || obj.getClass() != this.getClass()) return false;
56 var that = (ConstantLiteral) obj;
57 return Objects.equals(this.variable, that.variable) &&
58 this.nodeId == that.nodeId;
59 } 67 }
60 68
61 @Override 69 @Override
62 public int hashCode() { 70 public String toString() {
63 return Objects.hash(getClass(), variable, nodeId); 71 return "%s === @Constant %d".formatted(variable, nodeId);
64 } 72 }
65} 73}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CountLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CountLiteral.java
index 4d4749c8..3d078d89 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CountLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/CountLiteral.java
@@ -6,96 +6,40 @@
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.Constraint; 8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.substitution.Substitution; 9import tools.refinery.store.query.substitution.Substitution;
11import tools.refinery.store.query.term.DataVariable; 10import tools.refinery.store.query.term.DataVariable;
12import tools.refinery.store.query.term.Variable; 11import tools.refinery.store.query.term.Variable;
13import tools.refinery.store.query.term.int_.IntTerms;
14 12
15import java.util.List; 13import java.util.List;
16import java.util.Objects;
17import java.util.Set;
18
19public class CountLiteral extends AbstractCallLiteral {
20 private final DataVariable<Integer> resultVariable;
21 14
15public class CountLiteral extends AbstractCountLiteral<Integer> {
22 public CountLiteral(DataVariable<Integer> resultVariable, Constraint target, List<Variable> arguments) { 16 public CountLiteral(DataVariable<Integer> resultVariable, Constraint target, List<Variable> arguments) {
23 super(target, arguments); 17 super(Integer.class, resultVariable, target, arguments);
24 if (!resultVariable.getType().equals(Integer.class)) {
25 throw new IllegalArgumentException("Count result variable %s must be of type %s, got %s instead".formatted(
26 resultVariable, Integer.class.getName(), resultVariable.getType().getName()));
27 }
28 if (arguments.contains(resultVariable)) {
29 throw new IllegalArgumentException("Count result variable %s must not appear in the argument list"
30 .formatted(resultVariable));
31 }
32 this.resultVariable = resultVariable;
33 }
34
35 public DataVariable<Integer> getResultVariable() {
36 return resultVariable;
37 } 18 }
38 19
39 @Override 20 @Override
40 public Set<Variable> getOutputVariables() { 21 protected Integer zero() {
41 return Set.of(resultVariable); 22 return 0;
42 } 23 }
43 24
44 @Override 25 @Override
45 public Literal reduce() { 26 protected Integer one() {
46 var reduction = getTarget().getReduction(); 27 return 1;
47 return switch (reduction) {
48 case ALWAYS_FALSE -> getResultVariable().assign(IntTerms.constant(0));
49 // The only way a constant {@code true} predicate can be called in a negative position is to have all of
50 // its arguments bound as input variables. Thus, there will only be a single match.
51 case ALWAYS_TRUE -> getResultVariable().assign(IntTerms.constant(1));
52 case NOT_REDUCIBLE -> this;
53 };
54 } 28 }
55 29
56 @Override 30 @Override
57 protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) { 31 protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) {
58 return new CountLiteral(substitution.getTypeSafeSubstitute(resultVariable), getTarget(), substitutedArguments); 32 return new CountLiteral(substitution.getTypeSafeSubstitute(getResultVariable()), getTarget(),
59 } 33 substitutedArguments);
60
61 @Override
62 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) {
63 if (!super.equalsWithSubstitution(helper, other)) {
64 return false;
65 }
66 var otherCountLiteral = (CountLiteral) other;
67 return helper.variableEqual(resultVariable, otherCountLiteral.resultVariable);
68 }
69
70 @Override
71 public boolean equals(Object o) {
72 if (this == o) return true;
73 if (o == null || getClass() != o.getClass()) return false;
74 if (!super.equals(o)) return false;
75 CountLiteral that = (CountLiteral) o;
76 return resultVariable.equals(that.resultVariable);
77 } 34 }
78 35
79 @Override 36 @Override
80 public int hashCode() { 37 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
81 return Objects.hash(super.hashCode(), resultVariable); 38 return new CountLiteral(getResultVariable(), newTarget, newArguments);
82 } 39 }
83 40
84 @Override 41 @Override
85 public String toString() { 42 protected String operatorName() {
86 var builder = new StringBuilder(); 43 return "count";
87 builder.append(resultVariable);
88 builder.append(" is count ");
89 builder.append(getTarget().toReferenceString());
90 builder.append("(");
91 var argumentIterator = getArguments().iterator();
92 if (argumentIterator.hasNext()) {
93 builder.append(argumentIterator.next());
94 while (argumentIterator.hasNext()) {
95 builder.append(", ").append(argumentIterator.next());
96 }
97 }
98 builder.append(")");
99 return builder.toString();
100 } 44 }
101} 45}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/EquivalenceLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/EquivalenceLiteral.java
index 28ba7625..7343f709 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/EquivalenceLiteral.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/EquivalenceLiteral.java
@@ -5,16 +5,44 @@
5 */ 5 */
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 9import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 11import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.term.NodeVariable;
11import tools.refinery.store.query.term.Variable; 12import tools.refinery.store.query.term.Variable;
12 13
13import java.util.Objects; 14import java.util.Objects;
14import java.util.Set; 15import java.util.Set;
15 16
16public record EquivalenceLiteral(boolean positive, NodeVariable left, NodeVariable right) 17// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
17 implements CanNegate<EquivalenceLiteral> { 18@SuppressWarnings("squid:S2160")
19public final class EquivalenceLiteral extends AbstractLiteral implements CanNegate<EquivalenceLiteral> {
20 private final boolean positive;
21 private final Variable left;
22 private final Variable right;
23
24 public EquivalenceLiteral(boolean positive, Variable left, Variable right) {
25 if (!left.tryGetType().equals(right.tryGetType())) {
26 throw new InvalidQueryException("Variables %s and %s of different type cannot be equivalent"
27 .formatted(left, right));
28 }
29 this.positive = positive;
30 this.left = left;
31 this.right = right;
32 }
33
34 public boolean isPositive() {
35 return positive;
36 }
37
38 public Variable getLeft() {
39 return left;
40 }
41
42 public Variable getRight() {
43 return right;
44 }
45
18 @Override 46 @Override
19 public Set<Variable> getOutputVariables() { 47 public Set<Variable> getOutputVariables() {
20 return Set.of(left); 48 return Set.of(left);
@@ -37,8 +65,8 @@ public record EquivalenceLiteral(boolean positive, NodeVariable left, NodeVariab
37 65
38 @Override 66 @Override
39 public EquivalenceLiteral substitute(Substitution substitution) { 67 public EquivalenceLiteral substitute(Substitution substitution) {
40 return new EquivalenceLiteral(positive, substitution.getTypeSafeSubstitute(left), 68 return new EquivalenceLiteral(positive, substitution.getSubstitute(left),
41 substitution.getTypeSafeSubstitute(right)); 69 substitution.getSubstitute(right));
42 } 70 }
43 71
44 @Override 72 @Override
@@ -55,27 +83,18 @@ public record EquivalenceLiteral(boolean positive, NodeVariable left, NodeVariab
55 return false; 83 return false;
56 } 84 }
57 var otherEquivalenceLiteral = (EquivalenceLiteral) other; 85 var otherEquivalenceLiteral = (EquivalenceLiteral) other;
58 return helper.variableEqual(left, otherEquivalenceLiteral.left) && helper.variableEqual(right, 86 return helper.variableEqual(left, otherEquivalenceLiteral.left) &&
59 otherEquivalenceLiteral.right); 87 helper.variableEqual(right, otherEquivalenceLiteral.right);
60 }
61
62 @Override
63 public String toString() {
64 return "%s %s %s".formatted(left, positive ? "===" : "!==", right);
65 } 88 }
66 89
67 @Override 90 @Override
68 public boolean equals(Object obj) { 91 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
69 if (obj == this) return true; 92 return Objects.hash(super.hashCodeWithSubstitution(helper), helper.getVariableHashCode(left),
70 if (obj == null || obj.getClass() != this.getClass()) return false; 93 helper.getVariableHashCode(right));
71 var that = (EquivalenceLiteral) obj;
72 return this.positive == that.positive &&
73 Objects.equals(this.left, that.left) &&
74 Objects.equals(this.right, that.right);
75 } 94 }
76 95
77 @Override 96 @Override
78 public int hashCode() { 97 public String toString() {
79 return Objects.hash(getClass(), positive, left, right); 98 return "%s %s %s".formatted(left, positive ? "===" : "!==", right);
80 } 99 }
81} 100}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literal.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literal.java
index ce6c11fe..cb16ab00 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literal.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literal.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.literal; 6package tools.refinery.store.query.literal;
7 7
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 8import tools.refinery.store.query.equality.LiteralEqualityHelper;
9import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 10import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.term.Variable; 11import tools.refinery.store.query.term.Variable;
11 12
@@ -26,4 +27,6 @@ public interface Literal {
26 27
27 @SuppressWarnings("BooleanMethodIsAlwaysInverted") 28 @SuppressWarnings("BooleanMethodIsAlwaysInverted")
28 boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other); 29 boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other);
30
31 int hashCodeWithSubstitution(LiteralHashCodeHelper helper);
29} 32}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literals.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literals.java
index b3a87811..6056da45 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literals.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/Literals.java
@@ -16,7 +16,7 @@ public final class Literals {
16 return literal.negate(); 16 return literal.negate();
17 } 17 }
18 18
19 public static AssumeLiteral assume(Term<Boolean> term) { 19 public static CheckLiteral check(Term<Boolean> term) {
20 return new AssumeLiteral(term); 20 return new CheckLiteral(term);
21 } 21 }
22} 22}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java
new file mode 100644
index 00000000..f7323947
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java
@@ -0,0 +1,119 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.literal;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.InvalidQueryException;
10import tools.refinery.store.query.equality.LiteralEqualityHelper;
11import tools.refinery.store.query.equality.LiteralHashCodeHelper;
12import tools.refinery.store.query.substitution.Substitution;
13import tools.refinery.store.query.term.NodeVariable;
14import tools.refinery.store.query.term.ParameterDirection;
15import tools.refinery.store.query.term.Variable;
16
17import java.util.List;
18import java.util.Set;
19
20// {@link Object#equals(Object)} is implemented by {@link AbstractLiteral}.
21@SuppressWarnings("squid:S2160")
22public class RepresentativeElectionLiteral extends AbstractCallLiteral {
23 private final Connectivity connectivity;
24
25 public RepresentativeElectionLiteral(Connectivity connectivity, Constraint target, NodeVariable specific,
26 NodeVariable representative) {
27 this(connectivity, target, List.of(specific, representative));
28 }
29
30 private RepresentativeElectionLiteral(Connectivity connectivity, Constraint target, List<Variable> arguments) {
31 super(target, arguments);
32 this.connectivity = connectivity;
33 var parameters = target.getParameters();
34 int arity = target.arity();
35 if (arity != 2) {
36 throw new InvalidQueryException("SCCs can only take binary relations");
37 }
38 if (parameters.get(0).isDataVariable() || parameters.get(1).isDataVariable()) {
39 throw new InvalidQueryException("SCCs can only be computed over nodes");
40 }
41 if (parameters.get(0).getDirection() != ParameterDirection.OUT ||
42 parameters.get(1).getDirection() != ParameterDirection.OUT) {
43 throw new InvalidQueryException("SCCs cannot take input parameters");
44 }
45 }
46
47 public Connectivity getConnectivity() {
48 return connectivity;
49 }
50
51 @Override
52 protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) {
53 return new RepresentativeElectionLiteral(connectivity, getTarget(), substitutedArguments);
54 }
55
56 @Override
57 public Set<Variable> getOutputVariables() {
58 return getArgumentsOfDirection(ParameterDirection.OUT);
59 }
60
61 @Override
62 public Set<Variable> getInputVariables(Set<? extends Variable> positiveVariablesInClause) {
63 return Set.of();
64 }
65
66 @Override
67 public Set<Variable> getPrivateVariables(Set<? extends Variable> positiveVariablesInClause) {
68 return Set.of();
69 }
70
71 @Override
72 public Literal reduce() {
73 var reduction = getTarget().getReduction();
74 return switch (reduction) {
75 case ALWAYS_FALSE -> BooleanLiteral.FALSE;
76 case ALWAYS_TRUE -> throw new InvalidQueryException(
77 "Trying to elect representatives over an infinite set");
78 case NOT_REDUCIBLE -> this;
79 };
80 }
81
82 @Override
83 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
84 return new RepresentativeElectionLiteral(connectivity, newTarget, newArguments);
85 }
86
87 @Override
88 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) {
89 if (!super.equalsWithSubstitution(helper, other)) {
90 return false;
91 }
92 var otherRepresentativeElectionLiteral = (RepresentativeElectionLiteral) other;
93 return connectivity.equals(otherRepresentativeElectionLiteral.connectivity);
94 }
95
96 @Override
97 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
98 return super.hashCodeWithSubstitution(helper) * 31 + connectivity.hashCode();
99 }
100
101 @Override
102 public String toString() {
103 var builder = new StringBuilder();
104 builder.append("@Representative(\"");
105 builder.append(connectivity);
106 builder.append("\") ");
107 builder.append(getTarget().toReferenceString());
108 builder.append("(");
109 var argumentIterator = getArguments().iterator();
110 if (argumentIterator.hasNext()) {
111 builder.append(argumentIterator.next());
112 while (argumentIterator.hasNext()) {
113 builder.append(", ").append(argumentIterator.next());
114 }
115 }
116 builder.append(")");
117 return builder.toString();
118 }
119}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java
index a710c64d..dcfe6cc5 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AbstractResultSet.java
@@ -28,7 +28,7 @@ public abstract class AbstractResultSet<T> implements ResultSet<T> {
28 } 28 }
29 29
30 @Override 30 @Override
31 public Query<T> getQuery() { 31 public Query<T> getCanonicalQuery() {
32 return query; 32 return query;
33 } 33 }
34 34
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java
index 02809477..5b75b103 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/AnyResultSet.java
@@ -11,7 +11,7 @@ import tools.refinery.store.query.dnf.AnyQuery;
11public sealed interface AnyResultSet permits ResultSet { 11public sealed interface AnyResultSet permits ResultSet {
12 ModelQueryAdapter getAdapter(); 12 ModelQueryAdapter getAdapter();
13 13
14 AnyQuery getQuery(); 14 AnyQuery getCanonicalQuery();
15 15
16 int size(); 16 int size();
17} 17}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java
index 2795a44b..991b1e32 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/EmptyResultSet.java
@@ -18,7 +18,7 @@ public record EmptyResultSet<T>(ModelQueryAdapter adapter, Query<T> query) imple
18 } 18 }
19 19
20 @Override 20 @Override
21 public Query<T> getQuery() { 21 public Query<T> getCanonicalQuery() {
22 return query; 22 return query;
23 } 23 }
24 24
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java
index 39006d65..df12b967 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/OrderedResultSet.java
@@ -17,7 +17,7 @@ public class OrderedResultSet<T> implements AutoCloseable, ResultSet<T> {
17 private final ResultSet<T> resultSet; 17 private final ResultSet<T> resultSet;
18 private final OrderStatisticTree<Tuple> tree = new OrderStatisticTree<>(); 18 private final OrderStatisticTree<Tuple> tree = new OrderStatisticTree<>();
19 private final ResultSetListener<T> listener = (key, fromValue, toValue) -> { 19 private final ResultSetListener<T> listener = (key, fromValue, toValue) -> {
20 var defaultValue = getQuery().defaultValue(); 20 var defaultValue = getCanonicalQuery().defaultValue();
21 if (Objects.equals(defaultValue, toValue)) { 21 if (Objects.equals(defaultValue, toValue)) {
22 tree.remove(key); 22 tree.remove(key);
23 } else { 23 } else {
@@ -45,8 +45,8 @@ public class OrderedResultSet<T> implements AutoCloseable, ResultSet<T> {
45 } 45 }
46 46
47 @Override 47 @Override
48 public Query<T> getQuery() { 48 public Query<T> getCanonicalQuery() {
49 return resultSet.getQuery(); 49 return resultSet.getCanonicalQuery();
50 } 50 }
51 51
52 @Override 52 @Override
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java
index 33d1ea95..a6e99784 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/resultset/ResultSet.java
@@ -10,7 +10,7 @@ import tools.refinery.store.query.dnf.Query;
10import tools.refinery.store.tuple.Tuple; 10import tools.refinery.store.tuple.Tuple;
11 11
12public non-sealed interface ResultSet<T> extends AnyResultSet { 12public non-sealed interface ResultSet<T> extends AnyResultSet {
13 Query<T> getQuery(); 13 Query<T> getCanonicalQuery();
14 14
15 T get(Tuple parameters); 15 T get(Tuple parameters);
16 16
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/AbstractRecursiveRewriter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/AbstractRecursiveRewriter.java
new file mode 100644
index 00000000..fb4c14a7
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/AbstractRecursiveRewriter.java
@@ -0,0 +1,26 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.query.equality.DnfEqualityChecker;
10import tools.refinery.store.util.CycleDetectingMapper;
11
12public abstract class AbstractRecursiveRewriter implements DnfRewriter {
13 private final CycleDetectingMapper<Dnf, Dnf> mapper = new CycleDetectingMapper<>(Dnf::name, this::map);
14
15 @Override
16 public Dnf rewrite(Dnf dnf) {
17 return mapper.map(dnf);
18 }
19
20 protected Dnf map(Dnf dnf) {
21 var result = doRewrite(dnf);
22 return dnf.equalsWithSubstitution(DnfEqualityChecker.DEFAULT, result) ? dnf : result;
23 }
24
25 protected abstract Dnf doRewrite(Dnf dnf);
26}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/ClauseInputParameterResolver.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/ClauseInputParameterResolver.java
new file mode 100644
index 00000000..aa06a05a
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/ClauseInputParameterResolver.java
@@ -0,0 +1,160 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.query.dnf.DnfClause;
10import tools.refinery.store.query.literal.*;
11import tools.refinery.store.query.substitution.Substitution;
12import tools.refinery.store.query.term.ParameterDirection;
13import tools.refinery.store.query.term.Variable;
14
15import java.util.*;
16
17class ClauseInputParameterResolver {
18 private final InputParameterResolver rewriter;
19 private final String dnfName;
20 private final int clauseIndex;
21 private final Set<Variable> positiveVariables = new LinkedHashSet<>();
22 private final List<Literal> inlinedLiterals = new ArrayList<>();
23 private final Deque<Literal> workList;
24 private int helperIndex = 0;
25
26 public ClauseInputParameterResolver(InputParameterResolver rewriter, List<Literal> context, DnfClause clause,
27 String dnfName, int clauseIndex) {
28 this.rewriter = rewriter;
29 this.dnfName = dnfName;
30 this.clauseIndex = clauseIndex;
31 workList = new ArrayDeque<>(clause.literals().size() + context.size());
32 for (var literal : context) {
33 workList.addLast(literal);
34 }
35 for (var literal : clause.literals()) {
36 workList.addLast(literal);
37 }
38 }
39
40 public List<Literal> rewriteClause() {
41 while (!workList.isEmpty()) {
42 var literal = workList.removeFirst();
43 processLiteral(literal);
44 }
45 return inlinedLiterals;
46 }
47
48 private void processLiteral(Literal literal) {
49 if (!(literal instanceof AbstractCallLiteral abstractCallLiteral) ||
50 !(abstractCallLiteral.getTarget() instanceof Dnf targetDnf)) {
51 markAsDone(literal);
52 return;
53 }
54 boolean hasInputParameter = hasInputParameter(targetDnf);
55 if (!hasInputParameter) {
56 targetDnf = rewriter.rewrite(targetDnf);
57 }
58 if (inlinePositiveClause(abstractCallLiteral, targetDnf)) {
59 return;
60 }
61 if (eliminateDoubleNegation(abstractCallLiteral, targetDnf)) {
62 return;
63 }
64 if (hasInputParameter) {
65 rewriteWithCurrentContext(abstractCallLiteral, targetDnf);
66 return;
67 }
68 markAsDone(abstractCallLiteral.withTarget(targetDnf));
69 }
70
71 private void markAsDone(Literal literal) {
72 positiveVariables.addAll(literal.getOutputVariables());
73 inlinedLiterals.add(literal);
74 }
75
76 private boolean inlinePositiveClause(AbstractCallLiteral abstractCallLiteral, Dnf targetDnf) {
77 var targetLiteral = getSingleLiteral(abstractCallLiteral, targetDnf, CallPolarity.POSITIVE);
78 if (targetLiteral == null) {
79 return false;
80 }
81 var substitution = asSubstitution(abstractCallLiteral, targetDnf);
82 var substitutedLiteral = targetLiteral.substitute(substitution);
83 workList.addFirst(substitutedLiteral);
84 return true;
85 }
86
87 private boolean eliminateDoubleNegation(AbstractCallLiteral abstractCallLiteral, Dnf targetDnf) {
88 var targetLiteral = getSingleLiteral(abstractCallLiteral, targetDnf, CallPolarity.NEGATIVE);
89 if (!(targetLiteral instanceof CallLiteral targetCallLiteral) ||
90 targetCallLiteral.getPolarity() != CallPolarity.NEGATIVE) {
91 return false;
92 }
93 var substitution = asSubstitution(abstractCallLiteral, targetDnf);
94 var substitutedLiteral = (CallLiteral) targetCallLiteral.substitute(substitution);
95 workList.addFirst(substitutedLiteral.negate());
96 return true;
97 }
98
99 private void rewriteWithCurrentContext(AbstractCallLiteral abstractCallLiteral, Dnf targetDnf) {
100 var contextBuilder = Dnf.builder("%s#clause%d#helper%d".formatted(dnfName, clauseIndex, helperIndex));
101 helperIndex++;
102 contextBuilder.parameters(positiveVariables, ParameterDirection.OUT);
103 contextBuilder.clause(inlinedLiterals);
104 var contextDnf = contextBuilder.build();
105 var contextCall = new CallLiteral(CallPolarity.POSITIVE, contextDnf, List.copyOf(positiveVariables));
106 inlinedLiterals.clear();
107 var substitution = Substitution.builder().renewing().build();
108 var context = new ArrayList<Literal>();
109 context.add(contextCall.substitute(substitution));
110 int arity = targetDnf.arity();
111 for (int i = 0; i < arity; i++) {
112 var parameter = targetDnf.getSymbolicParameters().get(i).getVariable();
113 var argument = abstractCallLiteral.getArguments().get(i);
114 context.add(new EquivalenceLiteral(true, parameter, substitution.getSubstitute(argument)));
115 }
116 var rewrittenDnf = rewriter.rewriteWithContext(context, targetDnf);
117 workList.addFirst(abstractCallLiteral.withTarget(rewrittenDnf));
118 workList.addFirst(contextCall);
119 }
120
121 private static boolean hasInputParameter(Dnf targetDnf) {
122 for (var parameter : targetDnf.getParameters()) {
123 if (parameter.getDirection() != ParameterDirection.OUT) {
124 return true;
125 }
126 }
127 return false;
128 }
129
130 private static Literal getSingleLiteral(AbstractCallLiteral abstractCallLiteral, Dnf targetDnf,
131 CallPolarity polarity) {
132 if (!(abstractCallLiteral instanceof CallLiteral callLiteral) ||
133 callLiteral.getPolarity() != polarity) {
134 return null;
135 }
136 var clauses = targetDnf.getClauses();
137 if (clauses.size() != 1) {
138 return null;
139 }
140 var targetLiterals = clauses.get(0).literals();
141 if (targetLiterals.size() != 1) {
142 return null;
143 }
144 return targetLiterals.get(0);
145 }
146
147 private static Substitution asSubstitution(AbstractCallLiteral callLiteral, Dnf targetDnf) {
148 var builder = Substitution.builder().renewing();
149 var arguments = callLiteral.getArguments();
150 var parameters = targetDnf.getSymbolicParameters();
151 int arity = arguments.size();
152 if (parameters.size() != arity) {
153 throw new IllegalArgumentException("Call %s of %s arity mismatch".formatted(callLiteral, targetDnf));
154 }
155 for (int i = 0; i < arity; i++) {
156 builder.putChecked(parameters.get(i).getVariable(), arguments.get(i));
157 }
158 return builder.build();
159 }
160}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/CompositeRewriter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/CompositeRewriter.java
new file mode 100644
index 00000000..5b4f65e5
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/CompositeRewriter.java
@@ -0,0 +1,29 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import tools.refinery.store.query.dnf.Dnf;
9
10import java.util.ArrayList;
11import java.util.List;
12
13public class CompositeRewriter implements DnfRewriter {
14 private final List<DnfRewriter> rewriterList = new ArrayList<>();
15
16 public void addFirst(DnfRewriter rewriter) {
17 rewriterList.add(rewriter);
18 }
19
20 @Override
21 public Dnf rewrite(Dnf dnf) {
22 Dnf rewrittenDnf = dnf;
23 for (int i = rewriterList.size() - 1; i >= 0; i--) {
24 var rewriter = rewriterList.get(i);
25 rewrittenDnf = rewriter.rewrite(rewrittenDnf);
26 }
27 return rewrittenDnf;
28 }
29}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DnfRewriter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DnfRewriter.java
new file mode 100644
index 00000000..5d8359d1
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DnfRewriter.java
@@ -0,0 +1,24 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import tools.refinery.store.query.dnf.AnyQuery;
9import tools.refinery.store.query.dnf.Dnf;
10import tools.refinery.store.query.dnf.Query;
11
12@FunctionalInterface
13public interface DnfRewriter {
14 Dnf rewrite(Dnf dnf);
15
16 default AnyQuery rewrite(AnyQuery query) {
17 return rewrite((Query<?>) query);
18 }
19
20 default <T> Query<T> rewrite(Query<T> query) {
21 var rewrittenDnf = rewrite(query.getDnf());
22 return query.withDnf(rewrittenDnf);
23 }
24}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DuplicateDnfRemover.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DuplicateDnfRemover.java
new file mode 100644
index 00000000..0c786470
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/DuplicateDnfRemover.java
@@ -0,0 +1,98 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.query.dnf.DnfClause;
10import tools.refinery.store.query.dnf.Query;
11import tools.refinery.store.query.equality.DnfEqualityChecker;
12import tools.refinery.store.query.literal.AbstractCallLiteral;
13import tools.refinery.store.query.literal.Literal;
14
15import java.util.ArrayList;
16import java.util.HashMap;
17import java.util.List;
18import java.util.Map;
19
20public class DuplicateDnfRemover extends AbstractRecursiveRewriter {
21 private final Map<CanonicalDnf, Dnf> dnfCache = new HashMap<>();
22 private final Map<Dnf, Query<?>> queryCache = new HashMap<>();
23
24 @Override
25 protected Dnf map(Dnf dnf) {
26 var result = super.map(dnf);
27 return dnfCache.computeIfAbsent(new CanonicalDnf(result), CanonicalDnf::getDnf);
28 }
29
30 @Override
31 protected Dnf doRewrite(Dnf dnf) {
32 var builder = Dnf.builderFrom(dnf);
33 for (var clause : dnf.getClauses()) {
34 builder.clause(rewriteClause(clause));
35 }
36 return builder.build();
37 }
38
39 private List<Literal> rewriteClause(DnfClause clause) {
40 var originalLiterals = clause.literals();
41 var literals = new ArrayList<Literal>(originalLiterals.size());
42 for (var literal : originalLiterals) {
43 var rewrittenLiteral = literal;
44 if (literal instanceof AbstractCallLiteral abstractCallLiteral &&
45 abstractCallLiteral.getTarget() instanceof Dnf targetDnf) {
46 var rewrittenTarget = rewrite(targetDnf);
47 rewrittenLiteral = abstractCallLiteral.withTarget(rewrittenTarget);
48 }
49 literals.add(rewrittenLiteral);
50 }
51 return literals;
52 }
53
54 @Override
55 public <T> Query<T> rewrite(Query<T> query) {
56 var rewrittenDnf = rewrite(query.getDnf());
57 // {@code withDnf} will always return the appropriate type.
58 @SuppressWarnings("unchecked")
59 var rewrittenQuery = (Query<T>) queryCache.computeIfAbsent(rewrittenDnf, query::withDnf);
60 return rewrittenQuery;
61 }
62
63 private static class CanonicalDnf {
64 private final Dnf dnf;
65 private final int hash;
66
67 public CanonicalDnf(Dnf dnf) {
68 this.dnf = dnf;
69 hash = dnf.hashCodeWithSubstitution();
70 }
71
72 public Dnf getDnf() {
73 return dnf;
74 }
75
76 @Override
77 public boolean equals(Object obj) {
78 if (this == obj) {
79 return true;
80 }
81 if (obj == null || getClass() != obj.getClass()) {
82 return false;
83 }
84 var otherCanonicalDnf = (CanonicalDnf) obj;
85 return dnf.equalsWithSubstitution(DnfEqualityChecker.DEFAULT, otherCanonicalDnf.dnf);
86 }
87
88 @Override
89 public int hashCode() {
90 return hash;
91 }
92
93 @Override
94 public String toString() {
95 return dnf.name();
96 }
97 }
98}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/InputParameterResolver.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/InputParameterResolver.java
new file mode 100644
index 00000000..cd8a2e7d
--- /dev/null
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/rewriter/InputParameterResolver.java
@@ -0,0 +1,51 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.query.dnf.DnfBuilder;
10import tools.refinery.store.query.literal.Literal;
11import tools.refinery.store.query.term.ParameterDirection;
12import tools.refinery.store.query.term.Variable;
13
14import java.util.HashSet;
15import java.util.List;
16
17public class InputParameterResolver extends AbstractRecursiveRewriter {
18 @Override
19 protected Dnf doRewrite(Dnf dnf) {
20 return rewriteWithContext(List.of(), dnf);
21 }
22
23 Dnf rewriteWithContext(List<Literal> context, Dnf dnf) {
24 var dnfName = dnf.name();
25 var builder = Dnf.builder(dnfName);
26 createSymbolicParameters(context, dnf, builder);
27 builder.functionalDependencies(dnf.getFunctionalDependencies());
28 var clauses = dnf.getClauses();
29 int clauseCount = clauses.size();
30 for (int i = 0; i < clauseCount; i++) {
31 var clause = clauses.get(i);
32 var clauseRewriter = new ClauseInputParameterResolver(this, context, clause, dnfName, i);
33 builder.clause(clauseRewriter.rewriteClause());
34 }
35 return builder.build();
36 }
37
38 private static void createSymbolicParameters(List<Literal> context, Dnf dnf, DnfBuilder builder) {
39 var positiveInContext = new HashSet<Variable>();
40 for (var literal : context) {
41 positiveInContext.addAll(literal.getOutputVariables());
42 }
43 for (var symbolicParameter : dnf.getSymbolicParameters()) {
44 var variable = symbolicParameter.getVariable();
45 var isOutput = symbolicParameter.getDirection() == ParameterDirection.OUT ||
46 positiveInContext.contains(variable);
47 var direction = isOutput ? ParameterDirection.OUT : ParameterDirection.IN;
48 builder.parameter(variable, direction);
49 }
50 }
51}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AbstractTerm.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AbstractTerm.java
index d0ae3c12..5cecc35b 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AbstractTerm.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AbstractTerm.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 8import tools.refinery.store.query.equality.LiteralEqualityHelper;
9import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9 10
10import java.util.Objects; 11import java.util.Objects;
11 12
@@ -17,13 +18,18 @@ public abstract class AbstractTerm<T> implements Term<T> {
17 } 18 }
18 19
19 @Override 20 @Override
21 public Class<T> getType() {
22 return type;
23 }
24
25 @Override
20 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, AnyTerm other) { 26 public boolean equalsWithSubstitution(LiteralEqualityHelper helper, AnyTerm other) {
21 return getClass().equals(other.getClass()) && type.equals(other.getType()); 27 return other != null && getClass() == other.getClass() && type.equals(other.getType());
22 } 28 }
23 29
24 @Override 30 @Override
25 public Class<T> getType() { 31 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
26 return type; 32 return Objects.hash(getClass(), type);
27 } 33 }
28 34
29 @Override 35 @Override
@@ -31,11 +37,11 @@ public abstract class AbstractTerm<T> implements Term<T> {
31 if (this == o) return true; 37 if (this == o) return true;
32 if (o == null || getClass() != o.getClass()) return false; 38 if (o == null || getClass() != o.getClass()) return false;
33 AbstractTerm<?> that = (AbstractTerm<?>) o; 39 AbstractTerm<?> that = (AbstractTerm<?>) o;
34 return type.equals(that.type); 40 return equalsWithSubstitution(LiteralEqualityHelper.DEFAULT, that);
35 } 41 }
36 42
37 @Override 43 @Override
38 public int hashCode() { 44 public int hashCode() {
39 return Objects.hash(getClass(), type); 45 return hashCodeWithSubstitution(LiteralHashCodeHelper.DEFAULT);
40 } 46 }
41} 47}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyDataVariable.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyDataVariable.java
index 192c39c5..3801bc11 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyDataVariable.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyDataVariable.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import org.jetbrains.annotations.Nullable; 8import org.jetbrains.annotations.Nullable;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.equality.LiteralEqualityHelper; 10import tools.refinery.store.query.equality.LiteralEqualityHelper;
10 11
11import java.util.Optional; 12import java.util.Optional;
@@ -22,8 +23,18 @@ public abstract sealed class AnyDataVariable extends Variable implements AnyTerm
22 } 23 }
23 24
24 @Override 25 @Override
26 public boolean isNodeVariable() {
27 return false;
28 }
29
30 @Override
31 public boolean isDataVariable() {
32 return true;
33 }
34
35 @Override
25 public NodeVariable asNodeVariable() { 36 public NodeVariable asNodeVariable() {
26 throw new IllegalStateException("%s is a data variable".formatted(this)); 37 throw new InvalidQueryException("%s is a data variable".formatted(this));
27 } 38 }
28 39
29 @Override 40 @Override
@@ -37,11 +48,6 @@ public abstract sealed class AnyDataVariable extends Variable implements AnyTerm
37 } 48 }
38 49
39 @Override 50 @Override
40 public boolean isUnifiable() {
41 return false;
42 }
43
44 @Override
45 public abstract AnyDataVariable renew(@Nullable String name); 51 public abstract AnyDataVariable renew(@Nullable String name);
46 52
47 @Override 53 @Override
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyTerm.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyTerm.java
index c12c0166..f136b68d 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyTerm.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/AnyTerm.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 8import tools.refinery.store.query.equality.LiteralEqualityHelper;
9import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 10import tools.refinery.store.query.substitution.Substitution;
10 11
11import java.util.Set; 12import java.util.Set;
@@ -17,5 +18,7 @@ public sealed interface AnyTerm permits AnyDataVariable, Term {
17 18
18 boolean equalsWithSubstitution(LiteralEqualityHelper helper, AnyTerm other); 19 boolean equalsWithSubstitution(LiteralEqualityHelper helper, AnyTerm other);
19 20
21 int hashCodeWithSubstitution(LiteralHashCodeHelper helper);
22
20 Set<AnyDataVariable> getInputVariables(); 23 Set<AnyDataVariable> getInputVariables();
21} 24}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/BinaryTerm.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/BinaryTerm.java
index 8ad17839..cdbf592a 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/BinaryTerm.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/BinaryTerm.java
@@ -5,7 +5,9 @@
5 */ 5 */
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 9import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 11import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.valuation.Valuation; 12import tools.refinery.store.query.valuation.Valuation;
11 13
@@ -14,6 +16,8 @@ import java.util.HashSet;
14import java.util.Objects; 16import java.util.Objects;
15import java.util.Set; 17import java.util.Set;
16 18
19// {@link Object#equals(Object)} is implemented by {@link AbstractTerm}.
20@SuppressWarnings("squid:S2160")
17public abstract class BinaryTerm<R, T1, T2> extends AbstractTerm<R> { 21public abstract class BinaryTerm<R, T1, T2> extends AbstractTerm<R> {
18 private final Class<T1> leftType; 22 private final Class<T1> leftType;
19 private final Class<T2> rightType; 23 private final Class<T2> rightType;
@@ -23,11 +27,11 @@ public abstract class BinaryTerm<R, T1, T2> extends AbstractTerm<R> {
23 protected BinaryTerm(Class<R> type, Class<T1> leftType, Class<T2> rightType, Term<T1> left, Term<T2> right) { 27 protected BinaryTerm(Class<R> type, Class<T1> leftType, Class<T2> rightType, Term<T1> left, Term<T2> right) {
24 super(type); 28 super(type);
25 if (!left.getType().equals(leftType)) { 29 if (!left.getType().equals(leftType)) {
26 throw new IllegalArgumentException("Expected left %s to be of type %s, got %s instead".formatted( 30 throw new InvalidQueryException("Expected left %s to be of type %s, got %s instead".formatted(
27 left, leftType.getName(), left.getType().getName())); 31 left, leftType.getName(), left.getType().getName()));
28 } 32 }
29 if (!right.getType().equals(rightType)) { 33 if (!right.getType().equals(rightType)) {
30 throw new IllegalArgumentException("Expected right %s to be of type %s, got %s instead".formatted( 34 throw new InvalidQueryException("Expected right %s to be of type %s, got %s instead".formatted(
31 right, rightType.getName(), right.getType().getName())); 35 right, rightType.getName(), right.getType().getName()));
32 } 36 }
33 this.leftType = leftType; 37 this.leftType = leftType;
@@ -80,6 +84,12 @@ public abstract class BinaryTerm<R, T1, T2> extends AbstractTerm<R> {
80 } 84 }
81 85
82 @Override 86 @Override
87 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
88 return Objects.hash(super.hashCodeWithSubstitution(helper), leftType.hashCode(), rightType.hashCode(),
89 left.hashCodeWithSubstitution(helper), right.hashCodeWithSubstitution(helper));
90 }
91
92 @Override
83 public Term<R> substitute(Substitution substitution) { 93 public Term<R> substitute(Substitution substitution) {
84 return doSubstitute(substitution, left.substitute(substitution), right.substitute(substitution)); 94 return doSubstitute(substitution, left.substitute(substitution), right.substitute(substitution));
85 } 95 }
@@ -93,21 +103,4 @@ public abstract class BinaryTerm<R, T1, T2> extends AbstractTerm<R> {
93 inputVariables.addAll(right.getInputVariables()); 103 inputVariables.addAll(right.getInputVariables());
94 return Collections.unmodifiableSet(inputVariables); 104 return Collections.unmodifiableSet(inputVariables);
95 } 105 }
96
97 @Override
98 public boolean equals(Object o) {
99 if (this == o) return true;
100 if (o == null || getClass() != o.getClass()) return false;
101 if (!super.equals(o)) return false;
102 BinaryTerm<?, ?, ?> that = (BinaryTerm<?, ?, ?>) o;
103 return Objects.equals(leftType, that.leftType) &&
104 Objects.equals(rightType, that.rightType) &&
105 Objects.equals(left, that.left) &&
106 Objects.equals(right, that.right);
107 }
108
109 @Override
110 public int hashCode() {
111 return Objects.hash(super.hashCode(), leftType, rightType, left, right);
112 }
113} 106}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ConstantTerm.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ConstantTerm.java
index 2f6c56d1..415ae286 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ConstantTerm.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ConstantTerm.java
@@ -5,20 +5,24 @@
5 */ 5 */
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 9import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 11import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.valuation.Valuation; 12import tools.refinery.store.query.valuation.Valuation;
11 13
12import java.util.Objects; 14import java.util.Objects;
13import java.util.Set; 15import java.util.Set;
14 16
17// {@link Object#equals(Object)} is implemented by {@link AbstractTerm}.
18@SuppressWarnings("squid:S2160")
15public final class ConstantTerm<T> extends AbstractTerm<T> { 19public final class ConstantTerm<T> extends AbstractTerm<T> {
16 private final T value; 20 private final T value;
17 21
18 public ConstantTerm(Class<T> type, T value) { 22 public ConstantTerm(Class<T> type, T value) {
19 super(type); 23 super(type);
20 if (value != null && !type.isInstance(value)) { 24 if (value != null && !type.isInstance(value)) {
21 throw new IllegalArgumentException("Value %s is not an instance of %s".formatted(value, type.getName())); 25 throw new InvalidQueryException("Value %s is not an instance of %s".formatted(value, type.getName()));
22 } 26 }
23 this.value = value; 27 this.value = value;
24 } 28 }
@@ -47,6 +51,11 @@ public final class ConstantTerm<T> extends AbstractTerm<T> {
47 } 51 }
48 52
49 @Override 53 @Override
54 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
55 return Objects.hash(super.hashCodeWithSubstitution(helper), Objects.hash(value));
56 }
57
58 @Override
50 public Set<AnyDataVariable> getInputVariables() { 59 public Set<AnyDataVariable> getInputVariables() {
51 return Set.of(); 60 return Set.of();
52 } 61 }
@@ -55,17 +64,4 @@ public final class ConstantTerm<T> extends AbstractTerm<T> {
55 public String toString() { 64 public String toString() {
56 return value.toString(); 65 return value.toString();
57 } 66 }
58
59 @Override
60 public boolean equals(Object o) {
61 if (this == o) return true;
62 if (o == null || getClass() != o.getClass()) return false;
63 ConstantTerm<?> that = (ConstantTerm<?>) o;
64 return Objects.equals(value, that.value);
65 }
66
67 @Override
68 public int hashCode() {
69 return Objects.hash(value);
70 }
71} 67}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/DataVariable.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/DataVariable.java
index 00950360..2206b522 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/DataVariable.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/DataVariable.java
@@ -6,7 +6,10 @@
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import org.jetbrains.annotations.Nullable; 8import org.jetbrains.annotations.Nullable;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.equality.LiteralEqualityHelper; 10import tools.refinery.store.query.equality.LiteralEqualityHelper;
11import tools.refinery.store.query.equality.LiteralHashCodeHelper;
12import tools.refinery.store.query.literal.EquivalenceLiteral;
10import tools.refinery.store.query.literal.Literal; 13import tools.refinery.store.query.literal.Literal;
11import tools.refinery.store.query.substitution.Substitution; 14import tools.refinery.store.query.substitution.Substitution;
12import tools.refinery.store.query.valuation.Valuation; 15import tools.refinery.store.query.valuation.Valuation;
@@ -39,8 +42,8 @@ public final class DataVariable<T> extends AnyDataVariable implements Term<T> {
39 @Override 42 @Override
40 public <U> DataVariable<U> asDataVariable(Class<U> newType) { 43 public <U> DataVariable<U> asDataVariable(Class<U> newType) {
41 if (!getType().equals(newType)) { 44 if (!getType().equals(newType)) {
42 throw new IllegalStateException("%s is not of type %s but of type %s".formatted(this, newType.getName(), 45 throw new InvalidQueryException("%s is not of type %s but of type %s"
43 getType().getName())); 46 .formatted(this, newType.getName(), getType().getName()));
44 } 47 }
45 @SuppressWarnings("unchecked") 48 @SuppressWarnings("unchecked")
46 var result = (DataVariable<U>) this; 49 var result = (DataVariable<U>) this;
@@ -62,6 +65,16 @@ public final class DataVariable<T> extends AnyDataVariable implements Term<T> {
62 return other instanceof DataVariable<?> dataVariable && helper.variableEqual(this, dataVariable); 65 return other instanceof DataVariable<?> dataVariable && helper.variableEqual(this, dataVariable);
63 } 66 }
64 67
68 @Override
69 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
70 return helper.getVariableHashCode(this);
71 }
72
73 @Override
74 public int hashCodeWithSubstitution(int sequenceNumber) {
75 return Objects.hash(type, sequenceNumber);
76 }
77
65 public Literal assign(AssignedValue<T> value) { 78 public Literal assign(AssignedValue<T> value) {
66 return value.toLiteral(this); 79 return value.toLiteral(this);
67 } 80 }
@@ -79,4 +92,12 @@ public final class DataVariable<T> extends AnyDataVariable implements Term<T> {
79 public int hashCode() { 92 public int hashCode() {
80 return Objects.hash(super.hashCode(), type); 93 return Objects.hash(super.hashCode(), type);
81 } 94 }
95
96 public EquivalenceLiteral isEquivalent(DataVariable<T> other) {
97 return new EquivalenceLiteral(true, this, other);
98 }
99
100 public EquivalenceLiteral notEquivalent(DataVariable<T> other) {
101 return new EquivalenceLiteral(false, this, other);
102 }
82} 103}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/NodeVariable.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/NodeVariable.java
index a2f3261f..53c32e20 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/NodeVariable.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/NodeVariable.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import org.jetbrains.annotations.Nullable; 8import org.jetbrains.annotations.Nullable;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.literal.ConstantLiteral; 10import tools.refinery.store.query.literal.ConstantLiteral;
10import tools.refinery.store.query.literal.EquivalenceLiteral; 11import tools.refinery.store.query.literal.EquivalenceLiteral;
11 12
@@ -22,11 +23,6 @@ public final class NodeVariable extends Variable {
22 } 23 }
23 24
24 @Override 25 @Override
25 public boolean isUnifiable() {
26 return true;
27 }
28
29 @Override
30 public NodeVariable renew(@Nullable String name) { 26 public NodeVariable renew(@Nullable String name) {
31 return Variable.of(name); 27 return Variable.of(name);
32 } 28 }
@@ -37,13 +33,28 @@ public final class NodeVariable extends Variable {
37 } 33 }
38 34
39 @Override 35 @Override
36 public boolean isNodeVariable() {
37 return true;
38 }
39
40 @Override
41 public boolean isDataVariable() {
42 return false;
43 }
44
45 @Override
40 public NodeVariable asNodeVariable() { 46 public NodeVariable asNodeVariable() {
41 return this; 47 return this;
42 } 48 }
43 49
44 @Override 50 @Override
45 public <T> DataVariable<T> asDataVariable(Class<T> type) { 51 public <T> DataVariable<T> asDataVariable(Class<T> type) {
46 throw new IllegalStateException("%s is a node variable".formatted(this)); 52 throw new InvalidQueryException("%s is a node variable".formatted(this));
53 }
54
55 @Override
56 public int hashCodeWithSubstitution(int sequenceNumber) {
57 return sequenceNumber;
47 } 58 }
48 59
49 public ConstantLiteral isConstant(int value) { 60 public ConstantLiteral isConstant(int value) {
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Parameter.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Parameter.java
index e5a0cdf1..577ac6e0 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Parameter.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Parameter.java
@@ -9,11 +9,15 @@ import java.util.Objects;
9import java.util.Optional; 9import java.util.Optional;
10 10
11public class Parameter { 11public class Parameter {
12 public static final Parameter NODE_OUT = new Parameter(null, ParameterDirection.OUT); 12 public static final Parameter NODE_OUT = new Parameter(null);
13 13
14 private final Class<?> dataType; 14 private final Class<?> dataType;
15 private final ParameterDirection direction; 15 private final ParameterDirection direction;
16 16
17 public Parameter(Class<?> dataType) {
18 this(dataType, ParameterDirection.OUT);
19 }
20
17 public Parameter(Class<?> dataType, ParameterDirection direction) { 21 public Parameter(Class<?> dataType, ParameterDirection direction) {
18 this.dataType = dataType; 22 this.dataType = dataType;
19 this.direction = direction; 23 this.direction = direction;
@@ -35,6 +39,10 @@ public class Parameter {
35 return direction; 39 return direction;
36 } 40 }
37 41
42 public boolean matches(Parameter other) {
43 return Objects.equals(dataType, other.dataType) && direction == other.direction;
44 }
45
38 public boolean isAssignable(Variable variable) { 46 public boolean isAssignable(Variable variable) {
39 if (variable instanceof AnyDataVariable dataVariable) { 47 if (variable instanceof AnyDataVariable dataVariable) {
40 return dataVariable.getType().equals(dataType); 48 return dataVariable.getType().equals(dataType);
@@ -50,7 +58,7 @@ public class Parameter {
50 if (this == o) return true; 58 if (this == o) return true;
51 if (o == null || getClass() != o.getClass()) return false; 59 if (o == null || getClass() != o.getClass()) return false;
52 Parameter parameter = (Parameter) o; 60 Parameter parameter = (Parameter) o;
53 return Objects.equals(dataType, parameter.dataType) && direction == parameter.direction; 61 return matches(parameter);
54 } 62 }
55 63
56 @Override 64 @Override
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ParameterDirection.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ParameterDirection.java
index cd0739be..da83f3c3 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ParameterDirection.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/ParameterDirection.java
@@ -6,8 +6,8 @@
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8public enum ParameterDirection { 8public enum ParameterDirection {
9 OUT("@Out"), 9 OUT("out"),
10 IN("@In"); 10 IN("in");
11 11
12 private final String name; 12 private final String name;
13 13
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/UnaryTerm.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/UnaryTerm.java
index a46ebe31..a464ece5 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/UnaryTerm.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/UnaryTerm.java
@@ -5,13 +5,17 @@
5 */ 5 */
6package tools.refinery.store.query.term; 6package tools.refinery.store.query.term;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.equality.LiteralEqualityHelper; 9import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.equality.LiteralHashCodeHelper;
9import tools.refinery.store.query.substitution.Substitution; 11import tools.refinery.store.query.substitution.Substitution;
10import tools.refinery.store.query.valuation.Valuation; 12import tools.refinery.store.query.valuation.Valuation;
11 13
12import java.util.Objects; 14import java.util.Objects;
13import java.util.Set; 15import java.util.Set;
14 16
17// {@link Object#equals(Object)} is implemented by {@link AbstractTerm}.
18@SuppressWarnings("squid:S2160")
15public abstract class UnaryTerm<R, T> extends AbstractTerm<R> { 19public abstract class UnaryTerm<R, T> extends AbstractTerm<R> {
16 private final Class<T> bodyType; 20 private final Class<T> bodyType;
17 private final Term<T> body; 21 private final Term<T> body;
@@ -19,7 +23,7 @@ public abstract class UnaryTerm<R, T> extends AbstractTerm<R> {
19 protected UnaryTerm(Class<R> type, Class<T> bodyType, Term<T> body) { 23 protected UnaryTerm(Class<R> type, Class<T> bodyType, Term<T> body) {
20 super(type); 24 super(type);
21 if (!body.getType().equals(bodyType)) { 25 if (!body.getType().equals(bodyType)) {
22 throw new IllegalArgumentException("Expected body %s to be of type %s, got %s instead".formatted(body, 26 throw new InvalidQueryException("Expected body %s to be of type %s, got %s instead".formatted(body,
23 bodyType.getName(), body.getType().getName())); 27 bodyType.getName(), body.getType().getName()));
24 } 28 }
25 this.bodyType = bodyType; 29 this.bodyType = bodyType;
@@ -52,6 +56,11 @@ public abstract class UnaryTerm<R, T> extends AbstractTerm<R> {
52 } 56 }
53 57
54 @Override 58 @Override
59 public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) {
60 return Objects.hash(super.hashCodeWithSubstitution(helper), bodyType, body.hashCodeWithSubstitution(helper));
61 }
62
63 @Override
55 public Term<R> substitute(Substitution substitution) { 64 public Term<R> substitute(Substitution substitution) {
56 return doSubstitute(substitution, body.substitute(substitution)); 65 return doSubstitute(substitution, body.substitute(substitution));
57 } 66 }
@@ -62,18 +71,4 @@ public abstract class UnaryTerm<R, T> extends AbstractTerm<R> {
62 public Set<AnyDataVariable> getInputVariables() { 71 public Set<AnyDataVariable> getInputVariables() {
63 return body.getInputVariables(); 72 return body.getInputVariables();
64 } 73 }
65
66 @Override
67 public boolean equals(Object o) {
68 if (this == o) return true;
69 if (o == null || getClass() != o.getClass()) return false;
70 if (!super.equals(o)) return false;
71 UnaryTerm<?, ?> unaryTerm = (UnaryTerm<?, ?>) o;
72 return Objects.equals(bodyType, unaryTerm.bodyType) && Objects.equals(body, unaryTerm.body);
73 }
74
75 @Override
76 public int hashCode() {
77 return Objects.hash(super.hashCode(), bodyType, body);
78 }
79} 74}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Variable.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Variable.java
index a0268c8e..1b553704 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Variable.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/Variable.java
@@ -38,16 +38,20 @@ public abstract sealed class Variable permits AnyDataVariable, NodeVariable {
38 return uniqueName; 38 return uniqueName;
39 } 39 }
40 40
41 public abstract boolean isUnifiable();
42
43 public abstract Variable renew(@Nullable String name); 41 public abstract Variable renew(@Nullable String name);
44 42
45 public abstract Variable renew(); 43 public abstract Variable renew();
46 44
45 public abstract boolean isNodeVariable();
46
47 public abstract boolean isDataVariable();
48
47 public abstract NodeVariable asNodeVariable(); 49 public abstract NodeVariable asNodeVariable();
48 50
49 public abstract <T> DataVariable<T> asDataVariable(Class<T> type); 51 public abstract <T> DataVariable<T> asDataVariable(Class<T> type);
50 52
53 public abstract int hashCodeWithSubstitution(int sequenceNumber);
54
51 @Override 55 @Override
52 public String toString() { 56 public String toString() {
53 return getName(); 57 return getName();
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregator.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregator.java
index 5bbd3081..d31f00a2 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregator.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/term/uppercardinality/UpperCardinalitySumAggregator.java
@@ -70,7 +70,7 @@ public class UpperCardinalitySumAggregator implements StatefulAggregator<UpperCa
70 70
71 @Override 71 @Override
72 public UpperCardinality getResult() { 72 public UpperCardinality getResult() {
73 return countUnbounded > 0 ? UpperCardinalities.UNBOUNDED : UpperCardinalities.valueOf(sumFiniteUpperBounds); 73 return countUnbounded > 0 ? UpperCardinalities.UNBOUNDED : UpperCardinalities.atMost(sumFiniteUpperBounds);
74 } 74 }
75 75
76 @Override 76 @Override
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/utils/OrderStatisticTree.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/utils/OrderStatisticTree.java
index b568b99d..2d8a10d1 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/utils/OrderStatisticTree.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/utils/OrderStatisticTree.java
@@ -2,7 +2,7 @@
2 * Copyright (c) 2021 Rodion Efremov 2 * Copyright (c) 2021 Rodion Efremov
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/> 3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * 4 *
5 * SPDX-License-Identifier: MIT OR EPL-2.0 5 * SPDX-License-Identifier: MIT
6 */ 6 */
7package tools.refinery.store.query.utils; 7package tools.refinery.store.query.utils;
8 8
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java
index fd37604e..f130fa59 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AbstractFunctionView.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.view; 6package tools.refinery.store.query.view;
7 7
8import tools.refinery.store.map.CursorAsIterator;
8import tools.refinery.store.model.Model; 9import tools.refinery.store.model.Model;
9import tools.refinery.store.query.dnf.FunctionalDependency; 10import tools.refinery.store.query.dnf.FunctionalDependency;
10import tools.refinery.store.query.term.Parameter; 11import tools.refinery.store.query.term.Parameter;
@@ -83,6 +84,20 @@ public abstract class AbstractFunctionView<T> extends SymbolView<T> {
83 } 84 }
84 85
85 @Override 86 @Override
87 public boolean canIndexSlot(int slot) {
88 return slot >= 0 && slot < getSymbol().arity();
89 }
90
91 @Override
92 public Iterable<Object[]> getAdjacent(Model model, int slot, Object value) {
93 if (!(value instanceof Tuple1 tuple1)) {
94 return Set.of();
95 }
96 return (() -> new CursorAsIterator<>(model.getInterpretation(getSymbol()).getAdjacent(slot, tuple1.get(0)),
97 this::forwardMap, this::filter));
98 }
99
100 @Override
86 public List<Parameter> getParameters() { 101 public List<Parameter> getParameters() {
87 return parameters; 102 return parameters;
88 } 103 }
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java
index 90b27ebb..7e9bf6df 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/AnySymbolView.java
@@ -28,4 +28,12 @@ public sealed interface AnySymbolView extends Constraint permits SymbolView {
28 boolean get(Model model, Object[] tuple); 28 boolean get(Model model, Object[] tuple);
29 29
30 Iterable<Object[]> getAll(Model model); 30 Iterable<Object[]> getAll(Model model);
31
32 default Iterable<Object[]> getAdjacent(Model model, int slot, Object value) {
33 throw new IllegalArgumentException("Cannot index slot " + slot);
34 }
35
36 default boolean canIndexSlot(int slot) {
37 return false;
38 }
31} 39}
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java
index abae6e5c..924277ed 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/FilteredView.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.view; 6package tools.refinery.store.query.view;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.tuple.Tuple; 9import tools.refinery.store.tuple.Tuple;
9import tools.refinery.store.representation.Symbol; 10import tools.refinery.store.representation.Symbol;
10 11
@@ -66,7 +67,7 @@ public class FilteredView<T> extends TuplePreservingView<T> {
66 // The predicate doesn't need to handle the default value if it is null. 67 // The predicate doesn't need to handle the default value if it is null.
67 } 68 }
68 if (matchesDefaultValue) { 69 if (matchesDefaultValue) {
69 throw new IllegalArgumentException("Tuples with default value %s cannot be enumerated in %s" 70 throw new InvalidQueryException("Tuples with default value %s cannot be enumerated in %s"
70 .formatted(defaultValue, getSymbol())); 71 .formatted(defaultValue, getSymbol()));
71 } 72 }
72 } 73 }
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java
index 6bc5a708..ed12cd9d 100644
--- a/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java
+++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/view/TuplePreservingView.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.query.view; 6package tools.refinery.store.query.view;
7 7
8import tools.refinery.store.map.CursorAsIterator;
8import tools.refinery.store.model.Model; 9import tools.refinery.store.model.Model;
9import tools.refinery.store.query.term.Parameter; 10import tools.refinery.store.query.term.Parameter;
10import tools.refinery.store.representation.Symbol; 11import tools.refinery.store.representation.Symbol;
@@ -14,6 +15,7 @@ import tools.refinery.store.tuple.Tuple1;
14import java.util.Arrays; 15import java.util.Arrays;
15import java.util.List; 16import java.util.List;
16import java.util.Objects; 17import java.util.Objects;
18import java.util.Set;
17 19
18public abstract class TuplePreservingView<T> extends SymbolView<T> { 20public abstract class TuplePreservingView<T> extends SymbolView<T> {
19 private final List<Parameter> parameters; 21 private final List<Parameter> parameters;
@@ -56,6 +58,20 @@ public abstract class TuplePreservingView<T> extends SymbolView<T> {
56 } 58 }
57 59
58 @Override 60 @Override
61 public boolean canIndexSlot(int slot) {
62 return slot >= 0 && slot < getSymbol().arity();
63 }
64
65 @Override
66 public Iterable<Object[]> getAdjacent(Model model, int slot, Object value) {
67 if (!(value instanceof Tuple1 tuple1)) {
68 return Set.of();
69 }
70 return (() -> new CursorAsIterator<>(model.getInterpretation(getSymbol()).getAdjacent(slot, tuple1.get(0)),
71 this::forwardMap, this::filter));
72 }
73
74 @Override
59 public List<Parameter> getParameters() { 75 public List<Parameter> getParameters() {
60 return parameters; 76 return parameters;
61 } 77 }
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderLiteralEliminationTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderLiteralEliminationTest.java
index e17496e3..6a2dc0c7 100644
--- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderLiteralEliminationTest.java
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfBuilderLiteralEliminationTest.java
@@ -20,7 +20,7 @@ import tools.refinery.store.representation.Symbol;
20import java.util.List; 20import java.util.List;
21 21
22import static org.hamcrest.MatcherAssert.assertThat; 22import static org.hamcrest.MatcherAssert.assertThat;
23import static tools.refinery.store.query.literal.Literals.assume; 23import static tools.refinery.store.query.literal.Literals.check;
24import static tools.refinery.store.query.literal.Literals.not; 24import static tools.refinery.store.query.literal.Literals.not;
25import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo; 25import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo;
26 26
@@ -47,7 +47,7 @@ class DnfBuilderLiteralEliminationTest {
47 void eliminateTrueAssumptionTest() { 47 void eliminateTrueAssumptionTest() {
48 var actual = Dnf.builder() 48 var actual = Dnf.builder()
49 .parameters(p, q) 49 .parameters(p, q)
50 .clause(assume(BoolTerms.constant(true)), friendView.call(p, q)) 50 .clause(check(BoolTerms.constant(true)), friendView.call(p, q))
51 .build(); 51 .build();
52 var expected = Dnf.builder().parameters(p, q).clause(friendView.call(p, q)).build(); 52 var expected = Dnf.builder().parameters(p, q).clause(friendView.call(p, q)).build();
53 53
@@ -75,7 +75,7 @@ class DnfBuilderLiteralEliminationTest {
75 var actual = Dnf.builder() 75 var actual = Dnf.builder()
76 .parameters(p, q) 76 .parameters(p, q)
77 .clause(friendView.call(p, q)) 77 .clause(friendView.call(p, q))
78 .clause(friendView.call(q, p), assume(BoolTerms.constant(value))) 78 .clause(friendView.call(q, p), check(BoolTerms.constant(value)))
79 .build(); 79 .build();
80 var expected = Dnf.builder().parameters(p, q).clause(friendView.call(p, q)).build(); 80 var expected = Dnf.builder().parameters(p, q).clause(friendView.call(p, q)).build();
81 81
@@ -207,4 +207,53 @@ class DnfBuilderLiteralEliminationTest {
207 207
208 assertThat(actual, structurallyEqualTo(expected)); 208 assertThat(actual, structurallyEqualTo(expected));
209 } 209 }
210
211 @Test
212 void removeContradictoryTest() {
213 var actual = Dnf.of(builder -> builder.clause((p, q) -> List.of(
214 friendView.call(p, q),
215 not(friendView.call(p, q))
216 )));
217 var expected = Dnf.builder().build();
218
219 assertThat(actual, structurallyEqualTo(expected));
220 }
221
222 @Test
223 void removeContradictoryUniversalTest() {
224 var actual = Dnf.of(builder -> builder.clause((p, q) -> List.of(
225 friendView.call(q, q),
226 friendView.call(p, q),
227 not(friendView.call(p, Variable.of()))
228 )));
229 var expected = Dnf.builder().build();
230
231 assertThat(actual, structurallyEqualTo(expected));
232 }
233
234 @Test
235 void removeContradictoryExistentialUniversalTest() {
236 var actual = Dnf.of(builder -> builder.clause((p) -> List.of(
237 friendView.call(p, Variable.of()),
238 not(friendView.call(p, Variable.of()))
239 )));
240 var expected = Dnf.builder().build();
241
242 assertThat(actual, structurallyEqualTo(expected));
243 }
244
245 @Test
246 void removeContradictoryUniversalParameterTest() {
247 var actual = Dnf.of(builder -> {
248 var p = builder.parameter("p");
249 builder.clause((q) -> List.of(
250 friendView.call(q, q),
251 friendView.call(p, q),
252 not(friendView.call(p, Variable.of()))
253 ));
254 });
255 var expected = Dnf.builder().parameter(p).build();
256
257 assertThat(actual, structurallyEqualTo(expected));
258 }
210} 259}
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfToDefinitionStringTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfToDefinitionStringTest.java
index d75d7f17..12cfaa4e 100644
--- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfToDefinitionStringTest.java
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/DnfToDefinitionStringTest.java
@@ -50,7 +50,7 @@ class DnfToDefinitionStringTest {
50 var dnf = Dnf.builder("Example").parameter(p, ParameterDirection.IN).clause().build(); 50 var dnf = Dnf.builder("Example").parameter(p, ParameterDirection.IN).clause().build();
51 51
52 assertThat(dnf.toDefinitionString(), is(""" 52 assertThat(dnf.toDefinitionString(), is("""
53 pred Example(@In p) <-> 53 pred Example(in p) <->
54 <empty>. 54 <empty>.
55 """)); 55 """));
56 } 56 }
@@ -73,7 +73,7 @@ class DnfToDefinitionStringTest {
73 .build(); 73 .build();
74 74
75 assertThat(dnf.toDefinitionString(), is(""" 75 assertThat(dnf.toDefinitionString(), is("""
76 pred Example(@In p) <-> 76 pred Example(in p) <->
77 !(@RelationView("key") friend(p, q)). 77 !(@RelationView("key") friend(p, q)).
78 """)); 78 """));
79 } 79 }
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/HashCodeTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/HashCodeTest.java
new file mode 100644
index 00000000..0c8eaeed
--- /dev/null
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/HashCodeTest.java
@@ -0,0 +1,67 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.dnf;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.query.term.NodeVariable;
10import tools.refinery.store.query.term.Variable;
11import tools.refinery.store.query.view.AnySymbolView;
12import tools.refinery.store.query.view.KeyOnlyView;
13import tools.refinery.store.representation.Symbol;
14
15import static org.hamcrest.MatcherAssert.assertThat;
16import static org.hamcrest.Matchers.is;
17import static org.hamcrest.Matchers.not;
18
19class HashCodeTest {
20 private static final Symbol<Boolean> person = Symbol.of("Person", 1);
21 private static final Symbol<Boolean> friend = Symbol.of("friend", 2);
22 private static final AnySymbolView personView = new KeyOnlyView<>(person);
23 private static final AnySymbolView friendView = new KeyOnlyView<>(friend);
24 private static final NodeVariable p = Variable.of("p");
25 private static final NodeVariable q = Variable.of("q");
26
27 @Test
28 void flatEqualsTest() {
29 var expected = Dnf.builder("Expected").parameters(q).clause(personView.call(q)).build();
30 var actual = Dnf.builder("Actual").parameters(p).clause(personView.call(p)).build();
31
32 assertThat(actual.hashCodeWithSubstitution(), is(expected.hashCodeWithSubstitution()));
33 }
34
35 @Test
36 void flatNotEqualsTest() {
37 var expected = Dnf.builder("Expected").parameters(q).clause(friendView.call(q, q)).build();
38 var actual = Dnf.builder("Actual").parameters(p).clause(friendView.call(p, q)).build();
39
40 assertThat(actual.hashCodeWithSubstitution(), not(expected.hashCodeWithSubstitution()));
41 }
42
43 @Test
44 void deepEqualsTest() {
45 var expected2 = Dnf.builder("Expected2").parameters(p).clause(personView.call(p)).build();
46 var expected = Dnf.builder("Expected").parameters(q).clause(
47 expected2.call(q)
48 ).build();
49 var actual = Dnf.builder("Actual").parameters(q).clause(
50 expected2.call(q)
51 ).build();
52
53 assertThat(actual.hashCodeWithSubstitution(), is(expected.hashCodeWithSubstitution()));
54 }
55
56 @Test
57 void deepNotEqualsTest() {
58 var expected = Dnf.builder("Expected").parameters(q).clause(
59 Dnf.builder("Expected2").parameters(p).clause(personView.call(p)).build().call(q)
60 ).build();
61 var actual = Dnf.builder("Actual").parameters(q).clause(
62 Dnf.builder("Actual2").parameters(p).clause(personView.call(p)).build().call(q)
63 ).build();
64
65 assertThat(actual.hashCodeWithSubstitution(), not(expected.hashCodeWithSubstitution()));
66 }
67}
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/TopologicalSortTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/TopologicalSortTest.java
index e22dbb21..854bd469 100644
--- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/TopologicalSortTest.java
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/TopologicalSortTest.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.query.dnf; 6package tools.refinery.store.query.dnf;
7 7
8import org.junit.jupiter.api.Test; 8import org.junit.jupiter.api.Test;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.term.NodeVariable; 10import tools.refinery.store.query.term.NodeVariable;
10import tools.refinery.store.query.term.ParameterDirection; 11import tools.refinery.store.query.term.ParameterDirection;
11import tools.refinery.store.query.term.Variable; 12import tools.refinery.store.query.term.Variable;
@@ -80,7 +81,7 @@ class TopologicalSortTest {
80 example.call(r, t, q, s), 81 example.call(r, t, q, s),
81 friendView.call(r, t) 82 friendView.call(r, t)
82 ); 83 );
83 assertThrows(IllegalArgumentException.class, builder::build); 84 assertThrows(InvalidQueryException.class, builder::build);
84 } 85 }
85 86
86 @Test 87 @Test
@@ -93,7 +94,7 @@ class TopologicalSortTest {
93 example.call(p, q, r, s), 94 example.call(p, q, r, s),
94 example.call(r, t, q, s) 95 example.call(r, t, q, s)
95 ); 96 );
96 assertThrows(IllegalArgumentException.class, builder::build); 97 assertThrows(InvalidQueryException.class, builder::build);
97 } 98 }
98 99
99 @Test 100 @Test
@@ -107,6 +108,6 @@ class TopologicalSortTest {
107 example.call(r, t, q, s), 108 example.call(r, t, q, s),
108 example.call(p, q, r, t) 109 example.call(p, q, r, t)
109 ); 110 );
110 assertThrows(IllegalArgumentException.class, builder::build); 111 assertThrows(InvalidQueryException.class, builder::build);
111 } 112 }
112} 113}
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/VariableDirectionTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/VariableDirectionTest.java
index c52d26b2..fc3f5d48 100644
--- a/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/VariableDirectionTest.java
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/dnf/VariableDirectionTest.java
@@ -28,9 +28,8 @@ import static org.hamcrest.Matchers.hasItem;
28import static org.hamcrest.Matchers.not; 28import static org.hamcrest.Matchers.not;
29import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; 29import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
30import static org.junit.jupiter.api.Assertions.assertThrows; 30import static org.junit.jupiter.api.Assertions.assertThrows;
31import static tools.refinery.store.query.literal.Literals.assume;
32import static tools.refinery.store.query.literal.Literals.not; 31import static tools.refinery.store.query.literal.Literals.not;
33import static tools.refinery.store.query.term.int_.IntTerms.*; 32import static tools.refinery.store.query.term.int_.IntTerms.INT_SUM;
34 33
35class VariableDirectionTest { 34class VariableDirectionTest {
36 private static final Symbol<Boolean> person = Symbol.of("Person", 1); 35 private static final Symbol<Boolean> person = Symbol.of("Person", 1);
@@ -49,7 +48,7 @@ class VariableDirectionTest {
49 @MethodSource("clausesWithVariableInput") 48 @MethodSource("clausesWithVariableInput")
50 void unboundOutVariableTest(List<? extends Literal> clause) { 49 void unboundOutVariableTest(List<? extends Literal> clause) {
51 var builder = Dnf.builder().parameter(p, ParameterDirection.OUT).clause(clause); 50 var builder = Dnf.builder().parameter(p, ParameterDirection.OUT).clause(clause);
52 assertThrows(IllegalArgumentException.class, builder::build); 51 assertThrows(InvalidClauseException.class, builder::build);
53 } 52 }
54 53
55 @ParameterizedTest 54 @ParameterizedTest
@@ -101,7 +100,7 @@ class VariableDirectionTest {
101 var clauseWithEquivalence = new ArrayList<Literal>(clause); 100 var clauseWithEquivalence = new ArrayList<Literal>(clause);
102 clauseWithEquivalence.add(r.isEquivalent(p)); 101 clauseWithEquivalence.add(r.isEquivalent(p));
103 var builder = Dnf.builder().clause(clauseWithEquivalence); 102 var builder = Dnf.builder().clause(clauseWithEquivalence);
104 assertThrows(IllegalArgumentException.class, builder::build); 103 assertThrows(InvalidClauseException.class, builder::build);
105 } 104 }
106 105
107 static Stream<Arguments> clausesNotBindingVariable() { 106 static Stream<Arguments> clausesNotBindingVariable() {
@@ -119,7 +118,7 @@ class VariableDirectionTest {
119 @MethodSource("literalsWithPrivateVariable") 118 @MethodSource("literalsWithPrivateVariable")
120 void unboundTwicePrivateVariableTest(Literal literal) { 119 void unboundTwicePrivateVariableTest(Literal literal) {
121 var builder = Dnf.builder().clause(not(personView.call(p)), literal); 120 var builder = Dnf.builder().clause(not(personView.call(p)), literal);
122 assertThrows(IllegalArgumentException.class, builder::build); 121 assertThrows(InvalidClauseException.class, builder::build);
123 } 122 }
124 123
125 @ParameterizedTest 124 @ParameterizedTest
@@ -127,7 +126,7 @@ class VariableDirectionTest {
127 void unboundTwiceByEquivalencePrivateVariableTest(Literal literal) { 126 void unboundTwiceByEquivalencePrivateVariableTest(Literal literal) {
128 var r = Variable.of("r"); 127 var r = Variable.of("r");
129 var builder = Dnf.builder().clause(not(personView.call(r)), r.isEquivalent(p), literal); 128 var builder = Dnf.builder().clause(not(personView.call(r)), r.isEquivalent(p), literal);
130 assertThrows(IllegalArgumentException.class, builder::build); 129 assertThrows(InvalidClauseException.class, builder::build);
131 } 130 }
132 131
133 static Stream<Arguments> literalsWithPrivateVariable() { 132 static Stream<Arguments> literalsWithPrivateVariable() {
@@ -160,7 +159,7 @@ class VariableDirectionTest {
160 @MethodSource("literalsWithRequiredVariableInput") 159 @MethodSource("literalsWithRequiredVariableInput")
161 void unboundPrivateVariableTest(Literal literal) { 160 void unboundPrivateVariableTest(Literal literal) {
162 var builder = Dnf.builder().clause(literal); 161 var builder = Dnf.builder().clause(literal);
163 assertThrows(IllegalArgumentException.class, builder::build); 162 assertThrows(InvalidClauseException.class, builder::build);
164 } 163 }
165 164
166 @ParameterizedTest 165 @ParameterizedTest
@@ -246,182 +245,6 @@ class VariableDirectionTest {
246 ); 245 );
247 } 246 }
248 247
249 @ParameterizedTest
250 @MethodSource("clausesWithDataVariableInput")
251 void unboundOutDataVariableTest(List<? extends Literal> clause) {
252 var builder = Dnf.builder().parameter(x, ParameterDirection.OUT).clause(clause);
253 assertThrows(IllegalArgumentException.class, builder::build);
254 }
255
256 @ParameterizedTest
257 @MethodSource("clausesWithDataVariableInput")
258 void unboundInDataVariableTest(List<? extends Literal> clause) {
259 var builder = Dnf.builder().parameter(x, ParameterDirection.IN).clause(clause);
260 var dnf = assertDoesNotThrow(builder::build);
261 var clauses = dnf.getClauses();
262 if (clauses.size() > 0) {
263 assertThat(clauses.get(0).positiveVariables(), hasItem(x));
264 }
265 }
266
267 @ParameterizedTest
268 @MethodSource("clausesWithDataVariableInput")
269 void boundPrivateDataVariableTest(List<? extends Literal> clause) {
270 var clauseWithBinding = new ArrayList<Literal>(clause);
271 clauseWithBinding.add(x.assign(constant(27)));
272 var builder = Dnf.builder().clause(clauseWithBinding);
273 var dnf = assertDoesNotThrow(builder::build);
274 var clauses = dnf.getClauses();
275 if (clauses.size() > 0) {
276 assertThat(clauses.get(0).positiveVariables(), hasItem(x));
277 }
278 }
279
280 static Stream<Arguments> clausesWithDataVariableInput() {
281 return Stream.concat(
282 clausesNotBindingDataVariable(),
283 literalToClauseArgumentStream(literalsWithRequiredDataVariableInput())
284 );
285 }
286
287 @ParameterizedTest
288 @MethodSource("clausesNotBindingDataVariable")
289 void unboundPrivateDataVariableTest(List<? extends Literal> clause) {
290 var builder = Dnf.builder().clause(clause);
291 var dnf = assertDoesNotThrow(builder::build);
292 var clauses = dnf.getClauses();
293 if (clauses.size() > 0) {
294 assertThat(clauses.get(0).positiveVariables(), not(hasItem(x)));
295 }
296 }
297
298 static Stream<Arguments> clausesNotBindingDataVariable() {
299 return Stream.concat(
300 Stream.of(
301 Arguments.of(List.of()),
302 Arguments.of(List.of(BooleanLiteral.TRUE)),
303 Arguments.of(List.of(BooleanLiteral.FALSE))
304 ),
305 literalToClauseArgumentStream(literalsWithPrivateDataVariable())
306 );
307 }
308
309 @ParameterizedTest
310 @MethodSource("literalsWithPrivateDataVariable")
311 void unboundTwicePrivateDataVariableTest(Literal literal) {
312 var builder = Dnf.builder().clause(not(ageView.call(p, x)), literal);
313 assertThrows(IllegalArgumentException.class, builder::build);
314 }
315
316 static Stream<Arguments> literalsWithPrivateDataVariable() {
317 var dnfWithOutput = Dnf.builder("WithDataOutput")
318 .parameter(y, ParameterDirection.OUT)
319 .parameter(q, ParameterDirection.OUT)
320 .clause(ageView.call(q, y))
321 .build();
322
323 return Stream.of(
324 Arguments.of(not(ageView.call(q, x))),
325 Arguments.of(y.assign(ageView.count(q, x))),
326 Arguments.of(not(dnfWithOutput.call(x, q)))
327 );
328 }
329
330 @ParameterizedTest
331 @MethodSource("literalsWithRequiredDataVariableInput")
332 void unboundPrivateDataVariableTest(Literal literal) {
333 var builder = Dnf.builder().clause(literal);
334 assertThrows(IllegalArgumentException.class, builder::build);
335 }
336
337 static Stream<Arguments> literalsWithRequiredDataVariableInput() {
338 var dnfWithInput = Dnf.builder("WithDataInput")
339 .parameter(y, ParameterDirection.IN)
340 .parameter(q, ParameterDirection.OUT)
341 .clause(ageView.call(q, x))
342 .build();
343 // We are passing {@code y} to the parameter named {@code right} of {@code greaterEq}.
344 @SuppressWarnings("SuspiciousNameCombination")
345 var dnfWithInputToAggregate = Dnf.builder("WithDataInputToAggregate")
346 .parameter(y, ParameterDirection.IN)
347 .parameter(q, ParameterDirection.OUT)
348 .parameter(x, ParameterDirection.OUT)
349 .clause(
350 friendView.call(p, q),
351 ageView.call(q, x),
352 assume(greaterEq(x, y))
353 )
354 .build();
355
356 return Stream.of(
357 Arguments.of(dnfWithInput.call(x, q)),
358 Arguments.of(not(dnfWithInput.call(x, q))),
359 Arguments.of(y.assign(dnfWithInput.count(x, q))),
360 Arguments.of(y.assign(dnfWithInputToAggregate.aggregateBy(z, INT_SUM, x, q, z)))
361 );
362 }
363
364 @ParameterizedTest
365 @MethodSource("literalsWithDataVariableOutput")
366 void boundDataParameterTest(Literal literal) {
367 var builder = Dnf.builder().parameter(x, ParameterDirection.OUT).clause(literal);
368 var dnf = assertDoesNotThrow(builder::build);
369 assertThat(dnf.getClauses().get(0).positiveVariables(), hasItem(x));
370 }
371
372 @ParameterizedTest
373 @MethodSource("literalsWithDataVariableOutput")
374 void boundTwiceDataParameterTest(Literal literal) {
375 var builder = Dnf.builder().parameter(x, ParameterDirection.IN).clause(literal);
376 assertThrows(IllegalArgumentException.class, builder::build);
377 }
378
379 @ParameterizedTest
380 @MethodSource("literalsWithDataVariableOutput")
381 void boundPrivateDataVariableOutputTest(Literal literal) {
382 var dnfWithInput = Dnf.builder("WithInput")
383 .parameter(x, ParameterDirection.IN)
384 .clause(assume(greaterEq(x, constant(24))))
385 .build();
386 var builder = Dnf.builder().clause(dnfWithInput.call(x), literal);
387 var dnf = assertDoesNotThrow(builder::build);
388 assertThat(dnf.getClauses().get(0).positiveVariables(), hasItem(x));
389 }
390
391 @ParameterizedTest
392 @MethodSource("literalsWithDataVariableOutput")
393 void boundTwicePrivateDataVariableOutputTest(Literal literal) {
394 var builder = Dnf.builder().clause(x.assign(constant(27)), literal);
395 assertThrows(IllegalArgumentException.class, builder::build);
396 }
397
398 static Stream<Arguments> literalsWithDataVariableOutput() {
399 var dnfWithOutput = Dnf.builder("WithOutput")
400 .parameter(q, ParameterDirection.OUT)
401 .clause(personView.call(q))
402 .build();
403 var dnfWithDataOutput = Dnf.builder("WithDataOutput")
404 .parameter(y, ParameterDirection.OUT)
405 .parameter(q, ParameterDirection.OUT)
406 .clause(ageView.call(q, y))
407 .build();
408 var dnfWithOutputToAggregate = Dnf.builder("WithDataOutputToAggregate")
409 .parameter(q, ParameterDirection.OUT)
410 .parameter(y, ParameterDirection.OUT)
411 .clause(ageView.call(q, y))
412 .build();
413
414 return Stream.of(
415 Arguments.of(x.assign(constant(24))),
416 Arguments.of(ageView.call(q, x)),
417 Arguments.of(x.assign(personView.count(q))),
418 Arguments.of(x.assign(ageView.aggregate(INT_SUM, q))),
419 Arguments.of(dnfWithDataOutput.call(x, q)),
420 Arguments.of(x.assign(dnfWithOutput.count(q))),
421 Arguments.of(x.assign(dnfWithOutputToAggregate.aggregateBy(z, INT_SUM, q, z)))
422 );
423 }
424
425 private static Stream<Arguments> literalToClauseArgumentStream(Stream<Arguments> literalArgumentsStream) { 248 private static Stream<Arguments> literalToClauseArgumentStream(Stream<Arguments> literalArgumentsStream) {
426 return literalArgumentsStream.map(arguments -> Arguments.of(List.of(arguments.get()[0]))); 249 return literalArgumentsStream.map(arguments -> Arguments.of(List.of(arguments.get()[0])));
427 } 250 }
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java
index 35910e08..ddd57e96 100644
--- a/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/literal/AggregationLiteralTest.java
@@ -7,15 +7,16 @@ package tools.refinery.store.query.literal;
7 7
8import org.junit.jupiter.api.Test; 8import org.junit.jupiter.api.Test;
9import tools.refinery.store.query.Constraint; 9import tools.refinery.store.query.Constraint;
10import tools.refinery.store.query.InvalidQueryException;
10import tools.refinery.store.query.dnf.Dnf; 11import tools.refinery.store.query.dnf.Dnf;
12import tools.refinery.store.query.dnf.InvalidClauseException;
11import tools.refinery.store.query.term.*; 13import tools.refinery.store.query.term.*;
12 14
13import java.util.List; 15import java.util.List;
14import java.util.Set; 16import java.util.Set;
15 17
16import static org.hamcrest.MatcherAssert.assertThat; 18import static org.hamcrest.MatcherAssert.assertThat;
17import static org.hamcrest.Matchers.containsInAnyOrder; 19import static org.hamcrest.Matchers.*;
18import static org.hamcrest.Matchers.empty;
19import static org.junit.jupiter.api.Assertions.assertAll; 20import static org.junit.jupiter.api.Assertions.assertAll;
20import static org.junit.jupiter.api.Assertions.assertThrows; 21import static org.junit.jupiter.api.Assertions.assertThrows;
21import static tools.refinery.store.query.literal.Literals.not; 22import static tools.refinery.store.query.literal.Literals.not;
@@ -57,13 +58,13 @@ class AggregationLiteralTest {
57 @Test 58 @Test
58 void missingAggregationVariableTest() { 59 void missingAggregationVariableTest() {
59 var aggregation = fakeConstraint.aggregateBy(y, INT_SUM, p, z); 60 var aggregation = fakeConstraint.aggregateBy(y, INT_SUM, p, z);
60 assertThrows(IllegalArgumentException.class, () -> x.assign(aggregation)); 61 assertThrows(InvalidQueryException.class, () -> x.assign(aggregation));
61 } 62 }
62 63
63 @Test 64 @Test
64 void circularAggregationVariableTest() { 65 void circularAggregationVariableTest() {
65 var aggregation = fakeConstraint.aggregateBy(x, INT_SUM, p, x); 66 var aggregation = fakeConstraint.aggregateBy(x, INT_SUM, p, x);
66 assertThrows(IllegalArgumentException.class, () -> x.assign(aggregation)); 67 assertThrows(InvalidQueryException.class, () -> x.assign(aggregation));
67 } 68 }
68 69
69 @Test 70 @Test
@@ -73,7 +74,7 @@ class AggregationLiteralTest {
73 not(fakeConstraint.call(p, y)), 74 not(fakeConstraint.call(p, y)),
74 x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y)) 75 x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y))
75 ); 76 );
76 assertThrows(IllegalArgumentException.class, builder::build); 77 assertThrows(InvalidClauseException.class, builder::build);
77 } 78 }
78 79
79 @Test 80 @Test
@@ -83,6 +84,6 @@ class AggregationLiteralTest {
83 y.assign(constant(27)), 84 y.assign(constant(27)),
84 x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y)) 85 x.assign(fakeConstraint.aggregateBy(y, INT_SUM, p, y))
85 ); 86 );
86 assertThrows(IllegalArgumentException.class, builder::build); 87 assertThrows(InvalidClauseException.class, builder::build);
87 } 88 }
88} 89}
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/DuplicateDnfRemoverTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/DuplicateDnfRemoverTest.java
new file mode 100644
index 00000000..ebb24ab5
--- /dev/null
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/DuplicateDnfRemoverTest.java
@@ -0,0 +1,164 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.query.dnf.Query;
11import tools.refinery.store.query.literal.AbstractCallLiteral;
12import tools.refinery.store.query.literal.Reduction;
13import tools.refinery.store.query.term.Variable;
14import tools.refinery.store.query.view.AnySymbolView;
15import tools.refinery.store.query.view.KeyOnlyView;
16import tools.refinery.store.representation.Symbol;
17
18import java.util.List;
19
20import static org.hamcrest.MatcherAssert.assertThat;
21import static org.hamcrest.Matchers.is;
22import static org.hamcrest.Matchers.not;
23import static tools.refinery.store.query.literal.Literals.not;
24
25class DuplicateDnfRemoverTest {
26 private final static Symbol<Boolean> friend = Symbol.of("friend", 2);
27 private final static AnySymbolView friendView = new KeyOnlyView<>(friend);
28
29 private DuplicateDnfRemover sut;
30
31 @BeforeEach
32 void beforeEach() {
33 sut = new DuplicateDnfRemover();
34 }
35
36 @Test
37 void removeDuplicateSimpleTest() {
38 var one = Query.of("One", (builder, x, y) -> builder.clause(
39 friendView.call(x, y),
40 friendView.call(y, x)
41 ));
42 var two = Query.of("Two", (builder, x, y) -> builder.clause(
43 friendView.call(x, y),
44 friendView.call(y, x)
45 ));
46
47 var oneResult = sut.rewrite(one);
48 var twoResult = sut.rewrite(two);
49
50 assertThat(oneResult, is(twoResult));
51 assertThat(one, is(oneResult));
52 }
53
54 @Test
55 void notDuplicateSimpleTest() {
56 var one = Query.of("One", (builder, x, y) -> builder.clause(
57 friendView.call(x, y),
58 friendView.call(y, x)
59 ));
60 var two = Query.of("Two", (builder, x, y) -> builder.clause((z) -> List.of(
61 friendView.call(x, y),
62 friendView.call(y, z)
63 )));
64
65 var oneResult = sut.rewrite(one);
66 var twoResult = sut.rewrite(two);
67
68 assertThat(one, is(oneResult));
69 assertThat(two, is(twoResult));
70 }
71
72 @Test
73 void removeDuplicateRecursiveTest() {
74 var oneSubQuery = Query.of("OneSubQuery", (builder, x, y) -> builder.clause(
75 friendView.call(x, y),
76 friendView.call(y, x)
77 ));
78 var one = Query.of("One", (builder, x) -> builder.clause(
79 oneSubQuery.call(x, Variable.of())
80 ));
81 var twoSubQuery = Query.of("TwoSubQuery", (builder, x, y) -> builder.clause(
82 friendView.call(x, y),
83 friendView.call(y, x)
84 ));
85 var two = Query.of("Two", (builder, x) -> builder.clause(
86 twoSubQuery.call(x, Variable.of())
87 ));
88
89 var oneResult = sut.rewrite(one);
90 var twoResult = sut.rewrite(two);
91
92 assertThat(oneResult, is(twoResult));
93 assertThat(one, is(oneResult));
94 }
95
96 @Test
97 void notDuplicateRecursiveTest() {
98 var oneSubQuery = Query.of("OneSubQuery", (builder, x, y) -> builder.clause(
99 friendView.call(x, y),
100 friendView.call(y, x)
101 ));
102 var one = Query.of("One", (builder, x) -> builder.clause(
103 oneSubQuery.call(x, Variable.of())
104 ));
105 var twoSubQuery = Query.of("TwoSubQuery", (builder, x, y) -> builder.clause(
106 friendView.call(x, y),
107 friendView.call(y, x)
108 ));
109 var two = Query.of("Two", (builder, x) -> builder.clause(
110 twoSubQuery.call(Variable.of(), x)
111 ));
112
113 var oneResult = sut.rewrite(one);
114 var twoResult = sut.rewrite(two);
115
116 assertThat(one, is(oneResult));
117 assertThat(oneResult, is(not(twoResult)));
118
119 var oneCall = (AbstractCallLiteral) oneResult.getDnf().getClauses().get(0).literals().get(0);
120 var twoCall = (AbstractCallLiteral) twoResult.getDnf().getClauses().get(0).literals().get(0);
121
122 assertThat(oneCall.getTarget(), is(twoCall.getTarget()));
123 }
124
125 @Test
126 void removeContradictionTest() {
127 var oneSubQuery = Query.of("OneSubQuery", (builder, x, y) -> builder.clause(
128 friendView.call(x, y),
129 friendView.call(y, x)
130 ));
131 var twoSubQuery = Query.of("TwoSubQuery", (builder, x, y) -> builder.clause(
132 friendView.call(x, y),
133 friendView.call(y, x)
134 ));
135 var query = Query.of("Contradiction", (builder, x, y) -> builder.clause(
136 oneSubQuery.call(x, y),
137 not(twoSubQuery.call(x, y))
138 ));
139
140 var result = sut.rewrite(query);
141
142 assertThat(result.getDnf().getReduction(), is(Reduction.ALWAYS_FALSE));
143 }
144
145 @Test
146 void removeQuantifiedContradictionTest() {
147 var oneSubQuery = Query.of("OneSubQuery", (builder, x, y) -> builder.clause(
148 friendView.call(x, y),
149 friendView.call(y, x)
150 ));
151 var twoSubQuery = Query.of("TwoSubQuery", (builder, x, y) -> builder.clause(
152 friendView.call(x, y),
153 friendView.call(y, x)
154 ));
155 var query = Query.of("Contradiction", (builder, x) -> builder.clause(
156 oneSubQuery.call(x, Variable.of()),
157 not(twoSubQuery.call(x, Variable.of()))
158 ));
159
160 var result = sut.rewrite(query);
161
162 assertThat(result.getDnf().getReduction(), is(Reduction.ALWAYS_FALSE));
163 }
164}
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/InputParameterResolverTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/InputParameterResolverTest.java
new file mode 100644
index 00000000..ef0077e4
--- /dev/null
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/rewriter/InputParameterResolverTest.java
@@ -0,0 +1,228 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.query.rewriter;
7
8import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.query.dnf.Dnf;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.term.ParameterDirection;
13import tools.refinery.store.query.term.Variable;
14import tools.refinery.store.query.view.AnySymbolView;
15import tools.refinery.store.query.view.KeyOnlyView;
16import tools.refinery.store.representation.Symbol;
17
18import java.util.List;
19
20import static org.hamcrest.MatcherAssert.assertThat;
21import static org.hamcrest.Matchers.is;
22import static tools.refinery.store.query.literal.Literals.not;
23import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo;
24
25class InputParameterResolverTest {
26 private final static Symbol<Boolean> person = Symbol.of("Person", 1);
27 private final static Symbol<Boolean> friend = Symbol.of("friend", 2);
28 private final static AnySymbolView personView = new KeyOnlyView<>(person);
29 private final static AnySymbolView friendView = new KeyOnlyView<>(friend);
30
31 private InputParameterResolver sut;
32
33 @BeforeEach
34 void beforeEach() {
35 sut = new InputParameterResolver();
36 }
37
38 @Test
39 void inlineSingleClauseTest() {
40 var dnf = Dnf.of("SubQuery", builder -> {
41 var x = builder.parameter("x", ParameterDirection.OUT);
42 builder.clause(friendView.call(x, Variable.of()));
43 });
44 var query = Query.of("Actual", (builder, x) -> builder.clause(
45 dnf.call(x),
46 personView.call(x)
47 ));
48
49 var actual = sut.rewrite(query);
50
51 var expected = Query.of("Expected", (builder, x) -> builder.clause(
52 friendView.call(x, Variable.of()),
53 personView.call(x)
54 ));
55
56 assertThat(actual.getDnf(), structurallyEqualTo(expected.getDnf()));
57 }
58
59 @Test
60 void inlineSingleClauseWIthInputTest() {
61 var dnf = Dnf.of("SubQuery", builder -> {
62 var x = builder.parameter("x", ParameterDirection.IN);
63 builder.clause(not(friendView.call(x, Variable.of())));
64 });
65 var query = Query.of("Actual", (builder, x) -> builder.clause(
66 dnf.call(x),
67 personView.call(x)
68 ));
69
70 var actual = sut.rewrite(query);
71
72 var expected = Query.of("Expected", (builder, x) -> builder.clause(
73 personView.call(x),
74 not(friendView.call(x, Variable.of()))
75 ));
76
77 assertThat(actual.getDnf(), structurallyEqualTo(expected.getDnf()));
78 }
79
80 @Test
81 void singleLiteralDemandSetTest() {
82 var dnf = Dnf.of("SubQuery", builder -> {
83 var x = builder.parameter("x", ParameterDirection.IN);
84 builder.clause(not(friendView.call(x, Variable.of())));
85 builder.clause(not(friendView.call(Variable.of(), x)));
86 });
87 var query = Query.of("Actual", (builder, x) -> builder.clause(
88 dnf.call(x),
89 personView.call(x)
90 ));
91
92 var actual = sut.rewrite(query);
93
94 var expectedSubQuery = Dnf.of("ExpectedSubQuery", builder -> {
95 var x = builder.parameter("x", ParameterDirection.OUT);
96 builder.clause(
97 personView.call(x),
98 not(friendView.call(x, Variable.of()))
99 );
100 builder.clause(
101 personView.call(x),
102 not(friendView.call(Variable.of(), x))
103 );
104 });
105 var expected = Query.of("Expected", (builder, x) -> builder.clause(
106 personView.call(x),
107 expectedSubQuery.call(x)
108 ));
109
110 assertThat(actual.getDnf(), structurallyEqualTo(expected.getDnf()));
111 }
112
113 @Test
114 void multipleLiteralDemandSetTest() {
115 var dnf = Dnf.of("SubQuery", builder -> {
116 var x = builder.parameter("x", ParameterDirection.IN);
117 var y = builder.parameter("y", ParameterDirection.IN);
118 builder.clause(not(friendView.call(x, y)));
119 builder.clause(not(friendView.call(y, x)));
120 });
121 var query = Query.of("Actual", (builder, p1) -> builder.clause(p2 -> List.of(
122 not(dnf.call(p1, p2)),
123 personView.call(p1),
124 personView.call(p2)
125 )));
126
127 var actual = sut.rewrite(query);
128
129 var context = Dnf.of("Context", builder -> {
130 var x = builder.parameter("x", ParameterDirection.OUT);
131 var y = builder.parameter("y", ParameterDirection.OUT);
132 builder.clause(
133 personView.call(x),
134 personView.call(y)
135 );
136 });
137 var expectedSubQuery = Dnf.of("ExpectedSubQuery", builder -> {
138 var x = builder.parameter("x", ParameterDirection.OUT);
139 var y = builder.parameter("x", ParameterDirection.OUT);
140 builder.clause(
141 context.call(x, y),
142 not(friendView.call(x, y))
143 );
144 builder.clause(
145 context.call(x, y),
146 not(friendView.call(y, x))
147 );
148 });
149 var expected = Query.of("Expected", (builder, p1) -> builder.clause(p2 -> List.of(
150 context.call(p1, p2),
151 not(expectedSubQuery.call(p1, p2))
152 )));
153
154 assertThat(actual.getDnf(), structurallyEqualTo(expected.getDnf()));
155 }
156
157 @Test
158 void multipleParameterDemandSetTest() {
159 var dnf = Dnf.of("SubQuery", builder -> {
160 var x = builder.parameter("x", ParameterDirection.IN);
161 var y = builder.parameter("y", ParameterDirection.IN);
162 builder.clause(not(friendView.call(x, y)));
163 builder.clause(not(friendView.call(y, x)));
164 });
165 var query = Query.of("Actual", (builder, p1) -> builder.clause(
166 not(dnf.call(p1, p1)),
167 personView.call(p1)
168 ));
169
170 var actual = sut.rewrite(query);
171
172 var expectedSubQuery = Dnf.of("ExpectedSubQuery", builder -> {
173 var x = builder.parameter("x", ParameterDirection.OUT);
174 var y = builder.parameter("y", ParameterDirection.OUT);
175 builder.clause(
176 y.isEquivalent(x),
177 personView.call(x),
178 not(friendView.call(x, x))
179 );
180 });
181 var expected = Query.of("Expected", (builder, p1) -> builder.clause(
182 personView.call(p1),
183 not(expectedSubQuery.call(p1, p1))
184 ));
185
186 assertThat(actual.getDnf(), structurallyEqualTo(expected.getDnf()));
187 }
188
189 @Test
190 void eliminateDoubleNegationTest() {
191 var dnf = Dnf.of("SubQuery", builder -> {
192 var x = builder.parameter("x", ParameterDirection.IN);
193 builder.clause(not(friendView.call(x, Variable.of())));
194 });
195 var query = Query.of("Actual", (builder, p1) -> builder.clause(
196 personView.call(p1),
197 not(dnf.call(p1))
198 ));
199
200 var actual = sut.rewrite(query);
201
202 var expected = Query.of("Actual", (builder, p1) -> builder.clause(
203 personView.call(p1),
204 friendView.call(p1, Variable.of())
205 ));
206
207 assertThat(actual.getDnf(), structurallyEqualTo(expected.getDnf()));
208 }
209
210 @Test
211 void identityWhenNoWorkToDoTest() {
212 var dnf = Dnf.of("SubQuery", builder -> {
213 var x = builder.parameter("x", ParameterDirection.OUT);
214 builder.clause(
215 personView.call(x),
216 not(friendView.call(x, Variable.of()))
217 );
218 });
219 var query = Query.of("Actual", (builder, p1) -> builder.clause(
220 personView.call(p1),
221 not(dnf.call(p1))
222 ));
223
224 var actual = sut.rewrite(query);
225
226 assertThat(actual, is(query));
227 }
228}
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/TermSubstitutionTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/term/TermSubstitutionTest.java
index 1cbc101a..1fae2492 100644
--- a/subprojects/store-query/src/test/java/tools/refinery/store/query/term/TermSubstitutionTest.java
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/term/TermSubstitutionTest.java
@@ -9,8 +9,8 @@ import org.junit.jupiter.api.Assertions;
9import org.junit.jupiter.params.ParameterizedTest; 9import org.junit.jupiter.params.ParameterizedTest;
10import org.junit.jupiter.params.provider.Arguments; 10import org.junit.jupiter.params.provider.Arguments;
11import org.junit.jupiter.params.provider.MethodSource; 11import org.junit.jupiter.params.provider.MethodSource;
12import tools.refinery.store.query.dnf.Dnf; 12import tools.refinery.store.query.equality.DnfEqualityChecker;
13import tools.refinery.store.query.equality.LiteralEqualityHelper; 13import tools.refinery.store.query.equality.SubstitutingLiteralEqualityHelper;
14import tools.refinery.store.query.substitution.Substitution; 14import tools.refinery.store.query.substitution.Substitution;
15import tools.refinery.store.query.term.bool.BoolTerms; 15import tools.refinery.store.query.term.bool.BoolTerms;
16import tools.refinery.store.query.term.int_.IntTerms; 16import tools.refinery.store.query.term.int_.IntTerms;
@@ -48,7 +48,7 @@ class TermSubstitutionTest {
48 void substitutionTest(AnyTerm term) { 48 void substitutionTest(AnyTerm term) {
49 var substitutedTerm1 = term.substitute(substitution); 49 var substitutedTerm1 = term.substitute(substitution);
50 Assertions.assertNotEquals(term, substitutedTerm1, "Original term is not equal to substituted term"); 50 Assertions.assertNotEquals(term, substitutedTerm1, "Original term is not equal to substituted term");
51 var helper = new LiteralEqualityHelper(Dnf::equals, List.of(), List.of()); 51 var helper = new SubstitutingLiteralEqualityHelper(DnfEqualityChecker.DEFAULT, List.of(), List.of());
52 Assertions.assertTrue(term.equalsWithSubstitution(helper, substitutedTerm1), "Terms are equal by helper"); 52 Assertions.assertTrue(term.equalsWithSubstitution(helper, substitutedTerm1), "Terms are equal by helper");
53 // The {@link #substitution} is its own inverse. 53 // The {@link #substitution} is its own inverse.
54 var substitutedTerm2 = substitutedTerm1.substitute(substitution); 54 var substitutedTerm2 = substitutedTerm1.substitute(substitution);
diff --git a/subprojects/store-query/src/test/java/tools/refinery/store/query/utils/OrderStatisticTreeTest.java b/subprojects/store-query/src/test/java/tools/refinery/store/query/utils/OrderStatisticTreeTest.java
index cbb48603..0ac88ed7 100644
--- a/subprojects/store-query/src/test/java/tools/refinery/store/query/utils/OrderStatisticTreeTest.java
+++ b/subprojects/store-query/src/test/java/tools/refinery/store/query/utils/OrderStatisticTreeTest.java
@@ -2,7 +2,7 @@
2 * Copyright (c) 2021 Rodion Efremov 2 * Copyright (c) 2021 Rodion Efremov
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/> 3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * 4 *
5 * SPDX-License-Identifier: MIT OR EPL-2.0 5 * SPDX-License-Identifier: MIT
6 */ 6 */
7package tools.refinery.store.query.utils; 7package tools.refinery.store.query.utils;
8 8
diff --git a/subprojects/store-reasoning-scope/build.gradle.kts b/subprojects/store-reasoning-scope/build.gradle.kts
new file mode 100644
index 00000000..6e41dc8e
--- /dev/null
+++ b/subprojects/store-reasoning-scope/build.gradle.kts
@@ -0,0 +1,17 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7plugins {
8 id("tools.refinery.gradle.java-library")
9}
10
11dependencies {
12 api(project(":refinery-store-reasoning"))
13 implementation(libs.eclipseCollections.api)
14 implementation(libs.ortools)
15 runtimeOnly(libs.eclipseCollections)
16 testImplementation(project(":refinery-store-query-viatra"))
17}
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java
new file mode 100644
index 00000000..ecca6117
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/BoundScopePropagator.java
@@ -0,0 +1,240 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import com.google.ortools.linearsolver.MPConstraint;
9import com.google.ortools.linearsolver.MPObjective;
10import com.google.ortools.linearsolver.MPSolver;
11import com.google.ortools.linearsolver.MPVariable;
12import org.eclipse.collections.api.factory.primitive.IntObjectMaps;
13import org.eclipse.collections.api.factory.primitive.IntSets;
14import org.eclipse.collections.api.map.primitive.MutableIntObjectMap;
15import org.eclipse.collections.api.set.primitive.MutableIntSet;
16import tools.refinery.store.dse.propagation.BoundPropagator;
17import tools.refinery.store.dse.propagation.PropagationResult;
18import tools.refinery.store.model.Interpretation;
19import tools.refinery.store.model.Model;
20import tools.refinery.store.query.ModelQueryAdapter;
21import tools.refinery.store.representation.cardinality.*;
22import tools.refinery.store.tuple.Tuple;
23
24class BoundScopePropagator implements BoundPropagator {
25 private final Model model;
26 private final ModelQueryAdapter queryEngine;
27 private final Interpretation<CardinalityInterval> countInterpretation;
28 private final MPSolver solver;
29 private final MPObjective objective;
30 private final MutableIntObjectMap<MPVariable> variables = IntObjectMaps.mutable.empty();
31 private final MutableIntSet activeVariables = IntSets.mutable.empty();
32 private final TypeScopePropagator[] propagators;
33 private boolean changed = true;
34
35 public BoundScopePropagator(Model model, ScopePropagator storeAdapter) {
36 this.model = model;
37 queryEngine = model.getAdapter(ModelQueryAdapter.class);
38 countInterpretation = model.getInterpretation(storeAdapter.getCountSymbol());
39 solver = MPSolver.createSolver("GLOP");
40 solver.suppressOutput();
41 objective = solver.objective();
42 initializeVariables();
43 countInterpretation.addListener(this::countChanged, true);
44 var propagatorFactories = storeAdapter.getTypeScopePropagatorFactories();
45 propagators = new TypeScopePropagator[propagatorFactories.size()];
46 for (int i = 0; i < propagators.length; i++) {
47 model.checkCancelled();
48 propagators[i] = propagatorFactories.get(i).createPropagator(this);
49 }
50 }
51
52 ModelQueryAdapter getQueryEngine() {
53 return queryEngine;
54 }
55
56 private void initializeVariables() {
57 var cursor = countInterpretation.getAll();
58 while (cursor.move()) {
59 var interval = cursor.getValue();
60 if (!interval.equals(CardinalityIntervals.ONE)) {
61 int nodeId = cursor.getKey().get(0);
62 createVariable(nodeId, interval);
63 activeVariables.add(nodeId);
64 }
65 }
66 }
67
68 private MPVariable createVariable(int nodeId, CardinalityInterval interval) {
69 double lowerBound = interval.lowerBound();
70 double upperBound = getUpperBound(interval);
71 var variable = solver.makeNumVar(lowerBound, upperBound, "x" + nodeId);
72 variables.put(nodeId, variable);
73 return variable;
74 }
75
76 private void countChanged(Tuple key, CardinalityInterval fromValue, CardinalityInterval toValue,
77 boolean ignoredRestoring) {
78 int nodeId = key.get(0);
79 if ((toValue == null || toValue.equals(CardinalityIntervals.ONE))) {
80 if (fromValue != null && !fromValue.equals(CardinalityIntervals.ONE)) {
81 removeActiveVariable(toValue, nodeId);
82 }
83 return;
84 }
85 if (fromValue == null || fromValue.equals(CardinalityIntervals.ONE)) {
86 activeVariables.add(nodeId);
87 }
88 var variable = variables.get(nodeId);
89 if (variable == null) {
90 createVariable(nodeId, toValue);
91 markAsChanged();
92 return;
93 }
94 double lowerBound = toValue.lowerBound();
95 double upperBound = getUpperBound(toValue);
96 if (variable.lb() != lowerBound) {
97 variable.setLb(lowerBound);
98 markAsChanged();
99 }
100 if (variable.ub() != upperBound) {
101 variable.setUb(upperBound);
102 markAsChanged();
103 }
104 }
105
106 private void removeActiveVariable(CardinalityInterval toValue, int nodeId) {
107 var variable = variables.get(nodeId);
108 if (variable == null || !activeVariables.remove(nodeId)) {
109 throw new AssertionError("Variable not active: " + nodeId);
110 }
111 if (toValue == null) {
112 variable.setBounds(0, 0);
113 } else {
114 // Until queries are flushed and the constraints can be properly updated,
115 // the variable corresponding to the (previous) multi-object has to stand in for a single object.
116 variable.setBounds(1, 1);
117 }
118 markAsChanged();
119 }
120
121 MPConstraint makeConstraint() {
122 return solver.makeConstraint();
123 }
124
125 MPVariable getVariable(int nodeId) {
126 var variable = variables.get(nodeId);
127 if (variable != null) {
128 return variable;
129 }
130 var interval = countInterpretation.get(Tuple.of(nodeId));
131 if (interval == null || interval.equals(CardinalityIntervals.ONE)) {
132 interval = CardinalityIntervals.NONE;
133 } else {
134 activeVariables.add(nodeId);
135 markAsChanged();
136 }
137 return createVariable(nodeId, interval);
138 }
139
140 void markAsChanged() {
141 changed = true;
142 }
143
144 @Override
145 public PropagationResult propagateOne() {
146 queryEngine.flushChanges();
147 if (!changed) {
148 return PropagationResult.UNCHANGED;
149 }
150 changed = false;
151 for (var propagator : propagators) {
152 model.checkCancelled();
153 if (!propagator.updateBounds()) {
154 // Avoid logging GLOP error to console by checking for inconsistent constraints in advance.
155 return PropagationResult.REJECTED;
156 }
157 }
158 var result = PropagationResult.UNCHANGED;
159 if (activeVariables.isEmpty()) {
160 return checkEmptiness();
161 }
162 var iterator = activeVariables.intIterator();
163 while (iterator.hasNext()) {
164 int nodeId = iterator.next();
165 var variable = variables.get(nodeId);
166 if (variable == null) {
167 throw new AssertionError("Missing active variable: " + nodeId);
168 }
169 result = result.andThen(propagateNode(nodeId, variable));
170 if (result.isRejected()) {
171 return result;
172 }
173 }
174 return result;
175 }
176
177 private PropagationResult checkEmptiness() {
178 model.checkCancelled();
179 var emptinessCheckingResult = solver.solve();
180 return switch (emptinessCheckingResult) {
181 case OPTIMAL, UNBOUNDED -> PropagationResult.UNCHANGED;
182 case INFEASIBLE -> PropagationResult.REJECTED;
183 default -> throw new IllegalStateException("Failed to check for consistency: " + emptinessCheckingResult);
184 };
185 }
186
187 private PropagationResult propagateNode(int nodeId, MPVariable variable) {
188 objective.setCoefficient(variable, 1);
189 try {
190 model.checkCancelled();
191 objective.setMinimization();
192 var minimizationResult = solver.solve();
193 int lowerBound;
194 switch (minimizationResult) {
195 case OPTIMAL -> lowerBound = RoundingUtil.roundUp(objective.value());
196 case UNBOUNDED -> lowerBound = 0;
197 case INFEASIBLE -> {
198 return PropagationResult.REJECTED;
199 }
200 default -> throw new IllegalStateException("Failed to solve for minimum of %s: %s"
201 .formatted(variable, minimizationResult));
202 }
203
204 model.checkCancelled();
205 objective.setMaximization();
206 var maximizationResult = solver.solve();
207 UpperCardinality upperBound;
208 switch (maximizationResult) {
209 case OPTIMAL -> upperBound = UpperCardinalities.atMost(RoundingUtil.roundDown(objective.value()));
210 // Problem was feasible when minimizing, the only possible source of {@code UNBOUNDED_OR_INFEASIBLE} is
211 // an unbounded maximization problem. See https://github.com/google/or-tools/issues/3319
212 case UNBOUNDED, INFEASIBLE -> upperBound = UpperCardinalities.UNBOUNDED;
213 default -> throw new IllegalStateException("Failed to solve for maximum of %s: %s"
214 .formatted(variable, minimizationResult));
215 }
216
217 var newInterval = CardinalityIntervals.between(lowerBound, upperBound);
218 var oldInterval = countInterpretation.put(Tuple.of(nodeId), newInterval);
219 if (newInterval.lowerBound() < oldInterval.lowerBound() ||
220 newInterval.upperBound().compareTo(oldInterval.upperBound()) > 0) {
221 throw new IllegalArgumentException("Failed to refine multiplicity %s of node %d to %s"
222 .formatted(oldInterval, nodeId, newInterval));
223 }
224 return newInterval.equals(oldInterval) ? PropagationResult.UNCHANGED : PropagationResult.PROPAGATED;
225 } finally {
226 objective.setCoefficient(variable, 0);
227 }
228 }
229
230 private static double getUpperBound(CardinalityInterval interval) {
231 var upperBound = interval.upperBound();
232 if (upperBound instanceof FiniteUpperCardinality finiteUpperCardinality) {
233 return finiteUpperCardinality.finiteUpperBound();
234 } else if (upperBound instanceof UnboundedUpperCardinality) {
235 return Double.POSITIVE_INFINITY;
236 } else {
237 throw new IllegalArgumentException("Unknown upper bound: " + upperBound);
238 }
239 }
240}
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java
new file mode 100644
index 00000000..2be92464
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/LowerTypeScopePropagator.java
@@ -0,0 +1,86 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder;
9import tools.refinery.store.dse.transition.objectives.Criteria;
10import tools.refinery.store.dse.transition.objectives.Objectives;
11import tools.refinery.store.model.ModelStoreBuilder;
12import tools.refinery.store.query.dnf.AnyQuery;
13import tools.refinery.store.query.dnf.Query;
14import tools.refinery.store.query.dnf.RelationalQuery;
15import tools.refinery.store.query.term.Variable;
16import tools.refinery.store.reasoning.ReasoningBuilder;
17import tools.refinery.store.reasoning.literal.CountCandidateLowerBoundLiteral;
18import tools.refinery.store.reasoning.representation.PartialRelation;
19
20import java.util.Collection;
21import java.util.List;
22
23import static tools.refinery.store.query.literal.Literals.check;
24import static tools.refinery.store.query.term.int_.IntTerms.*;
25import static tools.refinery.store.reasoning.literal.PartialLiterals.may;
26import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW;
27
28class LowerTypeScopePropagator extends TypeScopePropagator {
29 private final int lowerBound;
30
31 private LowerTypeScopePropagator(BoundScopePropagator adapter, int lowerBound, RelationalQuery allQuery,
32 RelationalQuery multiQuery) {
33 super(adapter, allQuery, multiQuery);
34 this.lowerBound = lowerBound;
35 }
36
37 @Override
38 protected void doUpdateBounds() {
39 constraint.setLb((lowerBound - getSingleCount()));
40 }
41
42 public static class Factory extends TypeScopePropagator.Factory {
43 private final PartialRelation type;
44 private final int lowerBound;
45 private final RelationalQuery allMay;
46 private final RelationalQuery multiMay;
47
48 public Factory(PartialRelation type, int lowerBound) {
49 this.type = type;
50 this.lowerBound = lowerBound;
51 allMay = Query.of(type.name() + "#may", (builder, instance) -> builder.clause(
52 may(type.call(instance))
53 ));
54 multiMay = Query.of(type.name() + "#multiMay", (builder, instance) -> builder.clause(
55 may(type.call(instance)),
56 MULTI_VIEW.call(instance)
57 ));
58 }
59
60 @Override
61 public TypeScopePropagator createPropagator(BoundScopePropagator adapter) {
62 return new LowerTypeScopePropagator(adapter, lowerBound, allMay, multiMay);
63 }
64
65 @Override
66 protected Collection<AnyQuery> getQueries() {
67 return List.of(allMay, multiMay);
68 }
69
70 @Override
71 public void configure(ModelStoreBuilder storeBuilder) {
72 super.configure(storeBuilder);
73
74 var requiredObjects = Query.of(type.name() + "#required", Integer.class, (builder, output) -> builder
75 .clause(Integer.class, candidateLowerBound -> List.of(
76 new CountCandidateLowerBoundLiteral(candidateLowerBound, type, List.of(Variable.of())),
77 output.assign(sub(constant(lowerBound), candidateLowerBound)),
78 check(greater(output, constant(0)))
79 )));
80
81 storeBuilder.getAdapter(ReasoningBuilder.class).objective(Objectives.value(requiredObjects));
82 storeBuilder.tryGetAdapter(DesignSpaceExplorationBuilder.class).ifPresent(dseBuilder ->
83 dseBuilder.accept(Criteria.whenNoMatch(requiredObjects)));
84 }
85 }
86}
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/RoundingUtil.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/RoundingUtil.java
new file mode 100644
index 00000000..986771a1
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/RoundingUtil.java
@@ -0,0 +1,26 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8final class RoundingUtil {
9 private static final double TOLERANCE = 0.01;
10
11 private RoundingUtil() {
12 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
13 }
14
15 public static int roundUp(double value) {
16 double ceil = Math.ceil(value - TOLERANCE);
17 int intCeil = (int) ceil;
18 return Math.max(intCeil, 0);
19 }
20
21 public static int roundDown(double value) {
22 double floor = Math.floor(value + TOLERANCE);
23 int intFloor = (int) floor;
24 return Math.max(intFloor, 0);
25 }
26}
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java
new file mode 100644
index 00000000..25b1966c
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/ScopePropagator.java
@@ -0,0 +1,102 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import com.google.ortools.Loader;
9import tools.refinery.store.dse.propagation.PropagationBuilder;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.model.ModelStoreConfiguration;
12import tools.refinery.store.reasoning.representation.PartialRelation;
13import tools.refinery.store.reasoning.translator.TranslationException;
14import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
15import tools.refinery.store.representation.Symbol;
16import tools.refinery.store.representation.cardinality.CardinalityInterval;
17import tools.refinery.store.representation.cardinality.FiniteUpperCardinality;
18
19import java.util.*;
20
21public class ScopePropagator implements ModelStoreConfiguration {
22 private final Symbol<CardinalityInterval> countSymbol;
23 private final Map<PartialRelation, CardinalityInterval> scopes = new LinkedHashMap<>();
24 private final List<TypeScopePropagator.Factory> typeScopePropagatorFactories = new ArrayList<>();
25
26 public ScopePropagator() {
27 this(MultiObjectTranslator.COUNT_STORAGE);
28 }
29
30 public ScopePropagator(Symbol<CardinalityInterval> countSymbol) {
31 if (countSymbol.arity() != 1) {
32 throw new IllegalArgumentException("Count symbol must have arty 1, got %s with arity %d instead"
33 .formatted(countSymbol, countSymbol.arity()));
34 }
35 if (!countSymbol.valueType().equals(CardinalityInterval.class)) {
36 throw new IllegalArgumentException("Count symbol must have CardinalityInterval values");
37 }
38 if (countSymbol.defaultValue() != null) {
39 throw new IllegalArgumentException("Count symbol must default value null");
40 }
41 this.countSymbol = countSymbol;
42 }
43
44 public ScopePropagator scope(PartialRelation type, CardinalityInterval interval) {
45 if (type.arity() != 1) {
46 throw new TranslationException(type, "Only types with arity 1 may have scopes, got %s with arity %d"
47 .formatted(type, type.arity()));
48 }
49 var newValue = scopes.compute(type, (ignoredKey, oldValue) ->
50 oldValue == null ? interval : oldValue.meet(interval));
51 if (newValue.isEmpty()) {
52 throw new TranslationException(type, "Unsatisfiable scope for type %s".formatted(type));
53 }
54 return this;
55 }
56
57 public ScopePropagator scopes(Map<PartialRelation, CardinalityInterval> scopes) {
58 return scopes(scopes.entrySet());
59 }
60
61 public ScopePropagator scopes(Collection<Map.Entry<PartialRelation, CardinalityInterval>> scopes) {
62 for (var entry : scopes) {
63 scope(entry.getKey(), entry.getValue());
64 }
65 return this;
66 }
67
68 @Override
69 public void apply(ModelStoreBuilder storeBuilder) {
70 createTypeScopePropagatorFactories();
71 Loader.loadNativeLibraries();
72 for (var factory : typeScopePropagatorFactories) {
73 factory.configure(storeBuilder);
74 }
75 storeBuilder.getAdapter(PropagationBuilder.class)
76 .propagator(model -> new BoundScopePropagator(model, this));
77 }
78
79 private void createTypeScopePropagatorFactories() {
80 for (var entry : scopes.entrySet()) {
81 var type = entry.getKey();
82 var bounds = entry.getValue();
83 if (bounds.lowerBound() > 0) {
84 var lowerFactory = new LowerTypeScopePropagator.Factory(type, bounds.lowerBound());
85 typeScopePropagatorFactories.add(lowerFactory);
86 }
87 if (bounds.upperBound() instanceof FiniteUpperCardinality finiteUpperCardinality) {
88 var upperFactory = new UpperTypeScopePropagator.Factory(type,
89 finiteUpperCardinality.finiteUpperBound());
90 typeScopePropagatorFactories.add(upperFactory);
91 }
92 }
93 }
94
95 Symbol<CardinalityInterval> getCountSymbol() {
96 return countSymbol;
97 }
98
99 List<TypeScopePropagator.Factory> getTypeScopePropagatorFactories() {
100 return typeScopePropagatorFactories;
101 }
102}
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java
new file mode 100644
index 00000000..bb50656b
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/TypeScopePropagator.java
@@ -0,0 +1,71 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import com.google.ortools.linearsolver.MPConstraint;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.query.ModelQueryBuilder;
11import tools.refinery.store.query.dnf.AnyQuery;
12import tools.refinery.store.query.dnf.RelationalQuery;
13import tools.refinery.store.query.resultset.ResultSet;
14import tools.refinery.store.tuple.Tuple;
15
16import java.util.Collection;
17
18abstract class TypeScopePropagator {
19 private final BoundScopePropagator adapter;
20 private final ResultSet<Boolean> allNodes;
21 private final ResultSet<Boolean> multiNodes;
22 protected final MPConstraint constraint;
23
24 protected TypeScopePropagator(BoundScopePropagator adapter, RelationalQuery allQuery,
25 RelationalQuery multiQuery) {
26 this.adapter = adapter;
27 var queryEngine = adapter.getQueryEngine();
28 allNodes = queryEngine.getResultSet(allQuery);
29 multiNodes = queryEngine.getResultSet(multiQuery);
30 constraint = adapter.makeConstraint();
31 constraint.setBounds(0, Double.POSITIVE_INFINITY);
32 var cursor = multiNodes.getAll();
33 while (cursor.move()) {
34 var variable = adapter.getVariable(cursor.getKey().get(0));
35 constraint.setCoefficient(variable, 1);
36 }
37 allNodes.addListener(this::allChanged);
38 multiNodes.addListener(this::multiChanged);
39 }
40
41 protected abstract void doUpdateBounds();
42
43 public boolean updateBounds() {
44 doUpdateBounds();
45 return constraint.lb() <= constraint.ub();
46 }
47
48 protected int getSingleCount() {
49 return allNodes.size() - multiNodes.size();
50 }
51
52 private void allChanged(Tuple ignoredKey, Boolean ignoredOldValue, Boolean ignoredNewValue) {
53 adapter.markAsChanged();
54 }
55
56 private void multiChanged(Tuple key, Boolean ignoredOldValue, Boolean newValue) {
57 var variable = adapter.getVariable(key.get(0));
58 constraint.setCoefficient(variable, Boolean.TRUE.equals(newValue) ? 1 : 0);
59 adapter.markAsChanged();
60 }
61
62 public abstract static class Factory {
63 public abstract TypeScopePropagator createPropagator(BoundScopePropagator adapter);
64
65 protected abstract Collection<AnyQuery> getQueries();
66
67 public void configure(ModelStoreBuilder storeBuilder) {
68 storeBuilder.getAdapter(ModelQueryBuilder.class).queries(getQueries());
69 }
70 }
71}
diff --git a/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java
new file mode 100644
index 00000000..4aba5aac
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/main/java/tools/refinery/store/reasoning/scope/UpperTypeScopePropagator.java
@@ -0,0 +1,59 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import tools.refinery.store.query.dnf.AnyQuery;
9import tools.refinery.store.query.dnf.Query;
10import tools.refinery.store.query.dnf.RelationalQuery;
11import tools.refinery.store.reasoning.representation.PartialRelation;
12
13import java.util.Collection;
14import java.util.List;
15
16import static tools.refinery.store.reasoning.literal.PartialLiterals.must;
17import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW;
18
19class UpperTypeScopePropagator extends TypeScopePropagator {
20 private final int upperBound;
21
22 private UpperTypeScopePropagator(BoundScopePropagator adapter, int upperBound, RelationalQuery allQuery,
23 RelationalQuery multiQuery) {
24 super(adapter, allQuery, multiQuery);
25 this.upperBound = upperBound;
26 }
27
28 @Override
29 protected void doUpdateBounds() {
30 constraint.setUb((upperBound - getSingleCount()));
31 }
32
33 public static class Factory extends TypeScopePropagator.Factory {
34 private final int upperBound;
35 private final RelationalQuery allMust;
36 private final RelationalQuery multiMust;
37
38 public Factory(PartialRelation type, int upperBound) {
39 this.upperBound = upperBound;
40 allMust = Query.of(type.name() + "#must", (builder, instance) -> builder.clause(
41 must(type.call(instance))
42 ));
43 multiMust = Query.of(type.name() + "#multiMust", (builder, instance) -> builder.clause(
44 must(type.call(instance)),
45 MULTI_VIEW.call(instance)
46 ));
47 }
48
49 @Override
50 public TypeScopePropagator createPropagator(BoundScopePropagator adapter) {
51 return new UpperTypeScopePropagator(adapter, upperBound, allMust, multiMust);
52 }
53
54 @Override
55 protected Collection<AnyQuery> getQueries() {
56 return List.of(allMust, multiMust);
57 }
58 }
59}
diff --git a/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MPSolverTest.java b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MPSolverTest.java
new file mode 100644
index 00000000..95c4ac68
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MPSolverTest.java
@@ -0,0 +1,83 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import com.google.ortools.Loader;
9import com.google.ortools.linearsolver.MPSolver;
10import org.junit.jupiter.api.BeforeAll;
11import org.junit.jupiter.api.Test;
12
13import static org.hamcrest.MatcherAssert.assertThat;
14import static org.hamcrest.Matchers.closeTo;
15import static org.hamcrest.Matchers.is;
16
17class MPSolverTest {
18 @BeforeAll
19 static void beforeAll() {
20 Loader.loadNativeLibraries();
21 }
22
23 @Test
24 void updateProblemTest() {
25 var solver = MPSolver.createSolver("GLOP");
26 var x = solver.makeNumVar(0, Double.POSITIVE_INFINITY, "x");
27 var y = solver.makeNumVar(0, 1, "y");
28 var constraint = solver.makeConstraint(5, 5);
29 constraint.setCoefficient(x, 1);
30 constraint.setCoefficient(y, 1);
31 var objective = solver.objective();
32
33 objective.setCoefficient(x, 1);
34 objective.setMinimization();
35 assertThat(solver.solve(), is(MPSolver.ResultStatus.OPTIMAL));
36 assertThat(objective.value(), closeTo(4, 0.01));
37
38 objective.setMaximization();
39 assertThat(solver.solve(), is(MPSolver.ResultStatus.OPTIMAL));
40 assertThat(objective.value(), closeTo(5, 0.01));
41
42 objective.setCoefficient(x, 0);
43 objective.setCoefficient(y, 1);
44 objective.setMinimization();
45 assertThat(solver.solve(), is(MPSolver.ResultStatus.OPTIMAL));
46 assertThat(objective.value(), closeTo(0, 0.01));
47
48 objective.setMaximization();
49 assertThat(solver.solve(), is(MPSolver.ResultStatus.OPTIMAL));
50 assertThat(objective.value(), closeTo(1, 0.01));
51 }
52
53 @Test
54 void unboundedIsInfeasibleTest() {
55 var solver = MPSolver.createSolver("GLOP");
56 var x = solver.makeNumVar(0, Double.POSITIVE_INFINITY, "x");
57 var objective = solver.objective();
58 objective.setCoefficient(x, 1);
59
60 objective.setMinimization();
61 assertThat(solver.solve(), is(MPSolver.ResultStatus.OPTIMAL));
62 assertThat(objective.value(), closeTo(0, 0.01));
63
64 objective.setMaximization();
65 assertThat(solver.solve(), is(MPSolver.ResultStatus.INFEASIBLE));
66 }
67
68 @Test
69 void constantTest() {
70 var solver = MPSolver.createSolver("GLOP");
71 var x = solver.makeNumVar(1, 1, "x");
72 var objective = solver.objective();
73 objective.setCoefficient(x, 1);
74
75 objective.setMinimization();
76 assertThat(solver.solve(), is(MPSolver.ResultStatus.OPTIMAL));
77 assertThat(objective.value(), closeTo(1, 0.01));
78
79 objective.setMaximization();
80 assertThat(solver.solve(), is(MPSolver.ResultStatus.OPTIMAL));
81 assertThat(objective.value(), closeTo(1, 0.01));
82 }
83}
diff --git a/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java
new file mode 100644
index 00000000..0132b3f9
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/MultiObjectTest.java
@@ -0,0 +1,206 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.dse.propagation.PropagationAdapter;
11import tools.refinery.store.dse.propagation.PropagationResult;
12import tools.refinery.store.model.Interpretation;
13import tools.refinery.store.model.Model;
14import tools.refinery.store.model.ModelStore;
15import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
16import tools.refinery.store.reasoning.ReasoningAdapter;
17import tools.refinery.store.reasoning.ReasoningStoreAdapter;
18import tools.refinery.store.reasoning.representation.PartialRelation;
19import tools.refinery.store.reasoning.seed.ModelSeed;
20import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
21import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
22import tools.refinery.store.representation.Symbol;
23import tools.refinery.store.representation.TruthValue;
24import tools.refinery.store.representation.cardinality.CardinalityInterval;
25import tools.refinery.store.representation.cardinality.CardinalityIntervals;
26import tools.refinery.store.tuple.Tuple;
27
28import static org.hamcrest.MatcherAssert.assertThat;
29import static org.hamcrest.Matchers.is;
30import static org.junit.jupiter.api.Assertions.assertThrows;
31
32class MultiObjectTest {
33 private static final PartialRelation person = new PartialRelation("Person", 1);
34
35 private ModelStore store;
36 private ReasoningStoreAdapter reasoningStoreAdapter;
37 private Model model;
38 private Interpretation<CardinalityInterval> countStorage;
39
40 @BeforeEach
41 void beforeEach() {
42 store = ModelStore.builder()
43 .with(ViatraModelQueryAdapter.builder())
44 .with(PropagationAdapter.builder())
45 .with(ReasoningAdapter.builder())
46 .with(new MultiObjectTranslator())
47 .with(PartialRelationTranslator.of(person)
48 .symbol(Symbol.of("Person", 1, TruthValue.class, TruthValue.FALSE)))
49 .with(new ScopePropagator()
50 .scope(person, CardinalityIntervals.between(5, 15)))
51 .build();
52 reasoningStoreAdapter = store.getAdapter(ReasoningStoreAdapter.class);
53 model = null;
54 countStorage = null;
55 }
56
57 @Test
58 void oneMultiObjectSatisfiableTest() {
59 createModel(ModelSeed.builder(4)
60 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
61 .reducedValue(CardinalityIntervals.ONE)
62 .put(Tuple.of(0), CardinalityIntervals.SET))
63 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
64 .build());
65 assertThat(countStorage.get(Tuple.of(0)), is(CardinalityIntervals.between(2, 12)));
66 }
67
68 @Test
69 void oneMultiObjectExistingBoundSatisfiableTest() {
70 createModel(ModelSeed.builder(4)
71 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
72 .reducedValue(CardinalityIntervals.ONE)
73 .put(Tuple.of(0), CardinalityIntervals.between(5, 20)))
74 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
75 .build());
76 assertThat(countStorage.get(Tuple.of(0)), is(CardinalityIntervals.between(5, 12)));
77 }
78
79 @Test
80 void oneMultiObjectUnsatisfiableUpperTest() {
81 var seed = ModelSeed.builder(21)
82 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
83 .reducedValue(CardinalityIntervals.ONE)
84 .put(Tuple.of(0), CardinalityIntervals.SET))
85 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
86 .build();
87 assertThrows(IllegalArgumentException.class, () -> reasoningStoreAdapter.createInitialModel(seed));
88 }
89
90 @Test
91 void noMultiObjectSatisfiableTest() {
92 createModel(ModelSeed.builder(10)
93 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder.reducedValue(CardinalityIntervals.ONE))
94 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
95 .build());
96 assertThat(propagate(), is(PropagationResult.UNCHANGED));
97 }
98
99 @Test
100 void noMultiObjectUnsatisfiableTest() {
101 var seed = ModelSeed.builder(2)
102 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder.reducedValue(CardinalityIntervals.ONE))
103 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
104 .build();
105 assertThrows(IllegalArgumentException.class, () -> reasoningStoreAdapter.createInitialModel(seed));
106 }
107
108 @Test
109 void oneMultiObjectExistingBoundUnsatisfiableLowerTest() {
110 var seed = ModelSeed.builder(4)
111 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
112 .reducedValue(CardinalityIntervals.ONE)
113 .put(Tuple.of(0), CardinalityIntervals.atLeast(20)))
114 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
115 .build();
116 assertThrows(IllegalArgumentException.class, () -> reasoningStoreAdapter.createInitialModel(seed));
117 }
118
119 @Test
120 void oneMultiObjectExistingBoundUnsatisfiableUpperTest() {
121 var seed = ModelSeed.builder(4)
122 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
123 .reducedValue(CardinalityIntervals.ONE)
124 .put(Tuple.of(0), CardinalityIntervals.atMost(1)))
125 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
126 .build();
127 assertThrows(IllegalArgumentException.class, () -> reasoningStoreAdapter.createInitialModel(seed));
128 }
129
130 @Test
131 void twoMultiObjectsSatisfiableTest() {
132 createModel(ModelSeed.builder(5)
133 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
134 .reducedValue(CardinalityIntervals.ONE)
135 .put(Tuple.of(0), CardinalityIntervals.SET)
136 .put(Tuple.of(1), CardinalityIntervals.SET))
137 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
138 .build());
139 assertThat(countStorage.get(Tuple.of(0)), is(CardinalityIntervals.atMost(12)));
140 assertThat(countStorage.get(Tuple.of(1)), is(CardinalityIntervals.atMost(12)));
141 }
142
143 @Test
144 void twoMultiObjectsExistingBoundSatisfiableTest() {
145 createModel(ModelSeed.builder(5)
146 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
147 .reducedValue(CardinalityIntervals.ONE)
148 .put(Tuple.of(0), CardinalityIntervals.between(7, 20))
149 .put(Tuple.of(1), CardinalityIntervals.atMost(11)))
150 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
151 .build());
152 assertThat(countStorage.get(Tuple.of(0)), is(CardinalityIntervals.between(7, 12)));
153 assertThat(countStorage.get(Tuple.of(1)), is(CardinalityIntervals.atMost(5)));
154 }
155
156 @Test
157 void twoMultiObjectsExistingBoundUnsatisfiableUpperTest() {
158 var seed = ModelSeed.builder(5)
159 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
160 .reducedValue(CardinalityIntervals.ONE)
161 .put(Tuple.of(0), CardinalityIntervals.between(7, 20))
162 .put(Tuple.of(1), CardinalityIntervals.exactly(11)))
163 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
164 .build();
165 assertThrows(IllegalArgumentException.class, () -> reasoningStoreAdapter.createInitialModel(seed));
166 }
167
168 @Test
169 void twoMultiObjectsExistingBoundUnsatisfiableLowerTest() {
170 var seed = ModelSeed.builder(3)
171 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
172 .reducedValue(CardinalityIntervals.ONE)
173 .put(Tuple.of(0), CardinalityIntervals.LONE)
174 .put(Tuple.of(1), CardinalityIntervals.atMost(2)))
175 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
176 .build();
177 assertThrows(IllegalArgumentException.class, () -> reasoningStoreAdapter.createInitialModel(seed));
178 }
179
180 @Test
181 void multiToSingleTest() {
182 createModel(ModelSeed.builder(5)
183 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
184 .reducedValue(CardinalityIntervals.ONE)
185 .put(Tuple.of(0), CardinalityIntervals.LONE)
186 .put(Tuple.of(1), CardinalityIntervals.SET))
187 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
188 .build());
189 assertThat(countStorage.get(Tuple.of(0)), is(CardinalityIntervals.LONE));
190 assertThat(countStorage.get(Tuple.of(1)), is(CardinalityIntervals.between(1, 12)));
191 countStorage.put(Tuple.of(0), CardinalityIntervals.ONE);
192 assertThat(propagate(), is(PropagationResult.PROPAGATED));
193 assertThat(countStorage.get(Tuple.of(1)), is(CardinalityIntervals.between(1, 11)));
194 countStorage.put(Tuple.of(1), CardinalityIntervals.ONE);
195 assertThat(propagate(), is(PropagationResult.UNCHANGED));
196 }
197
198 private void createModel(ModelSeed modelSeed) {
199 model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
200 countStorage = model.getInterpretation(MultiObjectTranslator.COUNT_STORAGE);
201 }
202
203 private PropagationResult propagate() {
204 return model.getAdapter(PropagationAdapter.class).propagate();
205 }
206}
diff --git a/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/RoundingUtilTest.java b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/RoundingUtilTest.java
new file mode 100644
index 00000000..e697298e
--- /dev/null
+++ b/subprojects/store-reasoning-scope/src/test/java/tools/refinery/store/reasoning/scope/RoundingUtilTest.java
@@ -0,0 +1,69 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.scope;
7
8import org.junit.jupiter.params.ParameterizedTest;
9import org.junit.jupiter.params.provider.Arguments;
10import org.junit.jupiter.params.provider.MethodSource;
11
12import java.util.stream.Stream;
13
14import static org.hamcrest.MatcherAssert.assertThat;
15import static org.hamcrest.Matchers.is;
16
17class RoundingUtilTest {
18 @ParameterizedTest
19 @MethodSource
20 void roundUpTest(double value, int expected) {
21 int actual = RoundingUtil.roundUp(value);
22 assertThat(actual, is(expected));
23 }
24
25 static Stream<Arguments> roundUpTest() {
26 return Stream.of(
27 Arguments.of(0.0, 0),
28 Arguments.of(-0.0, 0),
29 Arguments.of(-0.9, 0),
30 Arguments.of(-2, 0),
31 Arguments.of(0.009, 0),
32 Arguments.of(0.011, 1),
33 Arguments.of(0.1, 1),
34 Arguments.of(0.991, 1),
35 Arguments.of(1, 1),
36 Arguments.of(1.009, 1),
37 Arguments.of(1.011, 2),
38 Arguments.of(1.5, 2),
39 Arguments.of(2, 2),
40 Arguments.of(100.5, 101)
41 );
42 }
43
44 @ParameterizedTest
45 @MethodSource
46 void roundDownTest(double value, int expected) {
47 int actual = RoundingUtil.roundDown(value);
48 assertThat(actual, is(expected));
49 }
50
51 static Stream<Arguments> roundDownTest() {
52 return Stream.of(
53 Arguments.of(0.0, 0),
54 Arguments.of(-0.0, 0),
55 Arguments.of(-0.9, 0),
56 Arguments.of(-2, 0),
57 Arguments.of(0.989, 0),
58 Arguments.of(0.991, 1),
59 Arguments.of(1, 1),
60 Arguments.of(1.5, 1),
61 Arguments.of(1.009, 1),
62 Arguments.of(1.989, 1),
63 Arguments.of(1.991, 2),
64 Arguments.of(2, 2),
65 Arguments.of(2.009, 2),
66 Arguments.of(100.5, 100)
67 );
68 }
69}
diff --git a/subprojects/store-reasoning/build.gradle.kts b/subprojects/store-reasoning/build.gradle.kts
index abad0491..ed8355f3 100644
--- a/subprojects/store-reasoning/build.gradle.kts
+++ b/subprojects/store-reasoning/build.gradle.kts
@@ -9,5 +9,7 @@ plugins {
9} 9}
10 10
11dependencies { 11dependencies {
12 api(project(":refinery-store-query")) 12 api(project(":refinery-store-dse"))
13 testImplementation(testFixtures(project(":refinery-store-query")))
14 testImplementation(project(":refinery-store-query-viatra"))
13} 15}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/MergeResult.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/MergeResult.java
deleted file mode 100644
index d3a216d8..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/MergeResult.java
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning;
7
8public enum MergeResult {
9 UNCHANGED,
10 REFINED,
11 REJECTED;
12
13 public MergeResult andAlso(MergeResult other) {
14 return switch (this) {
15 case UNCHANGED -> other;
16 case REFINED -> other == REJECTED ? REJECTED : REFINED;
17 case REJECTED -> REJECTED;
18 };
19 }
20}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/PartialInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/PartialInterpretation.java
deleted file mode 100644
index 4140d640..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/PartialInterpretation.java
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning;
7
8import tools.refinery.store.reasoning.representation.PartialSymbol;
9import tools.refinery.store.map.Cursor;
10import tools.refinery.store.tuple.Tuple;
11
12public non-sealed interface PartialInterpretation<A, C> extends AnyPartialInterpretation {
13 @Override
14 PartialSymbol<A, C> getPartialSymbol();
15
16 A get(Tuple key);
17
18 Cursor<Tuple, A> getAll();
19
20 MergeResult merge(Tuple key, A value);
21
22 C getConcrete(Tuple key);
23
24 Cursor<Tuple, C> getAllConcrete();
25}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java
index 6d5d6f89..7f0ef8b4 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java
@@ -5,26 +5,51 @@
5 */ 5 */
6package tools.refinery.store.reasoning; 6package tools.refinery.store.reasoning;
7 7
8import org.jetbrains.annotations.Nullable;
8import tools.refinery.store.adapter.ModelAdapter; 9import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.query.resultset.ResultSet; 10import tools.refinery.store.reasoning.internal.ReasoningBuilderImpl;
10import tools.refinery.store.query.dnf.Dnf; 11import tools.refinery.store.reasoning.interpretation.AnyPartialInterpretation;
12import tools.refinery.store.reasoning.interpretation.PartialInterpretation;
13import tools.refinery.store.reasoning.literal.Concreteness;
14import tools.refinery.store.reasoning.refinement.AnyPartialInterpretationRefiner;
15import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
11import tools.refinery.store.reasoning.representation.AnyPartialSymbol; 16import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
12import tools.refinery.store.reasoning.representation.PartialRelation; 17import tools.refinery.store.reasoning.representation.PartialRelation;
13import tools.refinery.store.reasoning.representation.PartialSymbol; 18import tools.refinery.store.reasoning.representation.PartialSymbol;
19import tools.refinery.store.tuple.Tuple1;
14 20
15public interface ReasoningAdapter extends ModelAdapter { 21public interface ReasoningAdapter extends ModelAdapter {
16 PartialRelation EXISTS = new PartialRelation("exists", 1); 22 PartialRelation EXISTS_SYMBOL = PartialSymbol.of("exists", 1);
23 PartialRelation EQUALS_SYMBOL = PartialSymbol.of("equals", 2);
17 24
18 @Override 25 @Override
19 ReasoningStoreAdapter getStoreAdapter(); 26 ReasoningStoreAdapter getStoreAdapter();
20 27
21 default AnyPartialInterpretation getPartialInterpretation(AnyPartialSymbol partialSymbol) { 28 default AnyPartialInterpretation getPartialInterpretation(Concreteness concreteness,
22 // Cast to disambiguate overloads. 29 AnyPartialSymbol partialSymbol) {
23 var typedPartialSymbol = (PartialSymbol<?, ?>) partialSymbol; 30 return getPartialInterpretation(concreteness, (PartialSymbol<?, ?>) partialSymbol);
24 return getPartialInterpretation(typedPartialSymbol);
25 } 31 }
26 32
27 <A, C> PartialInterpretation<A, C> getPartialInterpretation(PartialSymbol<A, C> partialSymbol); 33 <A, C> PartialInterpretation<A, C> getPartialInterpretation(Concreteness concreteness,
34 PartialSymbol<A, C> partialSymbol);
28 35
29 ResultSet<Boolean> getLiftedResultSet(Dnf query); 36 default AnyPartialInterpretationRefiner getRefiner(AnyPartialSymbol partialSymbol) {
37 return getRefiner((PartialSymbol<?, ?>) partialSymbol);
38 }
39
40 <A, C> PartialInterpretationRefiner<A, C> getRefiner(PartialSymbol<A, C> partialSymbol);
41
42 @Nullable
43 Tuple1 split(int parentMultiObject);
44
45 @Nullable
46 Tuple1 focus(int parentObject);
47
48 boolean cleanup(int nodeToDelete);
49
50 int getNodeCount();
51
52 static ReasoningBuilder builder() {
53 return new ReasoningBuilderImpl();
54 }
30} 55}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java
index d3a337e8..79bce33e 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningBuilder.java
@@ -6,27 +6,54 @@
6package tools.refinery.store.reasoning; 6package tools.refinery.store.reasoning;
7 7
8import tools.refinery.store.adapter.ModelAdapterBuilder; 8import tools.refinery.store.adapter.ModelAdapterBuilder;
9import tools.refinery.store.dse.transition.objectives.Objective;
9import tools.refinery.store.model.ModelStore; 10import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.reasoning.literal.Modality;
11import tools.refinery.store.query.dnf.Dnf; 11import tools.refinery.store.query.dnf.Dnf;
12import tools.refinery.store.query.dnf.FunctionalQuery;
13import tools.refinery.store.query.dnf.Query;
14import tools.refinery.store.query.dnf.RelationalQuery;
15import tools.refinery.store.reasoning.literal.Concreteness;
16import tools.refinery.store.reasoning.literal.Modality;
17import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
18import tools.refinery.store.reasoning.refinement.StorageRefiner;
19import tools.refinery.store.reasoning.translator.AnyPartialSymbolTranslator;
20import tools.refinery.store.representation.Symbol;
12 21
13import java.util.Collection; 22import java.util.Collection;
14import java.util.List; 23import java.util.List;
15 24
16@SuppressWarnings("UnusedReturnValue") 25@SuppressWarnings("UnusedReturnValue")
17public interface ReasoningBuilder extends ModelAdapterBuilder { 26public interface ReasoningBuilder extends ModelAdapterBuilder {
18 default ReasoningBuilder liftedQueries(Dnf... liftedQueries) { 27 ReasoningBuilder requiredInterpretations(Collection<Concreteness> requiredInterpretations);
19 return liftedQueries(List.of(liftedQueries)); 28
29 default ReasoningBuilder requiredInterpretations(Concreteness... requiredInterpretations) {
30 return requiredInterpretations(List.of(requiredInterpretations));
20 } 31 }
21 32
22 default ReasoningBuilder liftedQueries(Collection<Dnf> liftedQueries) { 33 ReasoningBuilder partialSymbol(AnyPartialSymbolTranslator translator);
23 liftedQueries.forEach(this::liftedQuery); 34
35 <T> ReasoningBuilder storageRefiner(Symbol<T> symbol, StorageRefiner.Factory<T> refiner);
36
37 ReasoningBuilder initializer(PartialModelInitializer initializer);
38
39 ReasoningBuilder objective(Objective objective);
40
41 default ReasoningBuilder objectives(Objective... objectives) {
42 return objectives(List.of(objectives));
43 }
44
45 default ReasoningBuilder objectives(Collection<Objective> objectives) {
46 objectives.forEach(this::objective);
24 return this; 47 return this;
25 } 48 }
26 49
27 ReasoningBuilder liftedQuery(Dnf liftedQuery); 50 <T> Query<T> lift(Modality modality, Concreteness concreteness, Query<T> query);
51
52 RelationalQuery lift(Modality modality, Concreteness concreteness, RelationalQuery query);
53
54 <T> FunctionalQuery<T> lift(Modality modality, Concreteness concreteness, FunctionalQuery<T> query);
28 55
29 Dnf lift(Modality modality, Dnf query); 56 Dnf lift(Modality modality, Concreteness concreteness, Dnf dnf);
30 57
31 @Override 58 @Override
32 ReasoningStoreAdapter build(ModelStore store); 59 ReasoningStoreAdapter build(ModelStore store);
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningStoreAdapter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningStoreAdapter.java
index c9795255..fe3cc3ea 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningStoreAdapter.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningStoreAdapter.java
@@ -7,15 +7,21 @@ package tools.refinery.store.reasoning;
7 7
8import tools.refinery.store.adapter.ModelStoreAdapter; 8import tools.refinery.store.adapter.ModelStoreAdapter;
9import tools.refinery.store.model.Model; 9import tools.refinery.store.model.Model;
10import tools.refinery.store.reasoning.literal.Concreteness;
10import tools.refinery.store.reasoning.representation.AnyPartialSymbol; 11import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
11import tools.refinery.store.query.dnf.Dnf; 12import tools.refinery.store.reasoning.seed.ModelSeed;
12 13
13import java.util.Collection; 14import java.util.Collection;
15import java.util.Set;
14 16
15public interface ReasoningStoreAdapter extends ModelStoreAdapter { 17public interface ReasoningStoreAdapter extends ModelStoreAdapter {
16 Collection<AnyPartialSymbol> getPartialSymbols(); 18 Collection<AnyPartialSymbol> getPartialSymbols();
17 19
18 Collection<Dnf> getLiftedQueries(); 20 Collection<AnyPartialSymbol> getRefinablePartialSymbols();
21
22 Set<Concreteness> getSupportedInterpretations();
23
24 Model createInitialModel(ModelSeed modelSeed);
19 25
20 @Override 26 @Override
21 ReasoningAdapter createModelAdapter(Model model); 27 ReasoningAdapter createModelAdapter(Model model);
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java
new file mode 100644
index 00000000..62c35cee
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/CleanupActionLiteral.java
@@ -0,0 +1,43 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.actions;
7
8import tools.refinery.store.dse.transition.actions.AbstractActionLiteral;
9import tools.refinery.store.dse.transition.actions.BoundActionLiteral;
10import tools.refinery.store.model.Model;
11import tools.refinery.store.query.term.NodeVariable;
12import tools.refinery.store.reasoning.ReasoningAdapter;
13import tools.refinery.store.tuple.Tuple;
14
15import java.util.List;
16
17public class CleanupActionLiteral extends AbstractActionLiteral {
18 private final NodeVariable node;
19
20 public CleanupActionLiteral(NodeVariable node) {
21 this.node = node;
22 }
23
24 public NodeVariable getNode() {
25 return node;
26 }
27
28 @Override
29 public List<NodeVariable> getInputVariables() {
30 return List.of(node);
31 }
32
33 @Override
34 public List<NodeVariable> getOutputVariables() {
35 return List.of();
36 }
37
38 @Override
39 public BoundActionLiteral bindToModel(Model model) {
40 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
41 return tuple -> reasoningAdapter.cleanup(tuple.get(0)) ? Tuple.of() : null;
42 }
43}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java
new file mode 100644
index 00000000..5a6f22d2
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/FocusActionLiteral.java
@@ -0,0 +1,48 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.actions;
7
8import tools.refinery.store.dse.transition.actions.AbstractActionLiteral;
9import tools.refinery.store.dse.transition.actions.BoundActionLiteral;
10import tools.refinery.store.model.Model;
11import tools.refinery.store.query.term.NodeVariable;
12import tools.refinery.store.reasoning.ReasoningAdapter;
13
14import java.util.List;
15
16public class FocusActionLiteral extends AbstractActionLiteral {
17 private final NodeVariable parentNode;
18 private final NodeVariable childNode;
19
20 public FocusActionLiteral(NodeVariable parentNode, NodeVariable childNode) {
21 this.parentNode = parentNode;
22 this.childNode = childNode;
23 }
24
25 public NodeVariable getParentNode() {
26 return parentNode;
27 }
28
29 public NodeVariable getChildNode() {
30 return childNode;
31 }
32
33 @Override
34 public List<NodeVariable> getInputVariables() {
35 return List.of(parentNode);
36 }
37
38 @Override
39 public List<NodeVariable> getOutputVariables() {
40 return List.of(childNode);
41 }
42
43 @Override
44 public BoundActionLiteral bindToModel(Model model) {
45 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
46 return tuple -> reasoningAdapter.focus(tuple.get(0));
47 }
48}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java
new file mode 100644
index 00000000..8d0d7961
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/MergeActionLiteral.java
@@ -0,0 +1,60 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.actions;
7
8import tools.refinery.store.dse.transition.actions.AbstractActionLiteral;
9import tools.refinery.store.dse.transition.actions.BoundActionLiteral;
10import tools.refinery.store.model.Model;
11import tools.refinery.store.query.term.NodeVariable;
12import tools.refinery.store.reasoning.ReasoningAdapter;
13import tools.refinery.store.reasoning.representation.PartialSymbol;
14import tools.refinery.store.tuple.Tuple;
15
16import java.util.List;
17
18public class MergeActionLiteral<A, C> extends AbstractActionLiteral {
19 private final PartialSymbol<A, C> partialSymbol;
20 private final List<NodeVariable> parameters;
21 private final A value;
22
23 public MergeActionLiteral(PartialSymbol<A, C> partialSymbol, A value, List<NodeVariable> parameters) {
24 if (partialSymbol.arity() != parameters.size()) {
25 throw new IllegalArgumentException("Expected %d parameters for partial symbol %s, got %d instead"
26 .formatted(partialSymbol.arity(), partialSymbol, parameters.size()));
27 }
28 this.partialSymbol = partialSymbol;
29 this.parameters = parameters;
30 this.value = value;
31 }
32
33 public PartialSymbol<A, C> getPartialSymbol() {
34 return partialSymbol;
35 }
36
37 public List<NodeVariable> getParameters() {
38 return parameters;
39 }
40
41 public A getValue() {
42 return value;
43 }
44
45 @Override
46 public List<NodeVariable> getInputVariables() {
47 return getParameters();
48 }
49
50 @Override
51 public List<NodeVariable> getOutputVariables() {
52 return List.of();
53 }
54
55 @Override
56 public BoundActionLiteral bindToModel(Model model) {
57 var refiner = model.getAdapter(ReasoningAdapter.class).getRefiner(partialSymbol);
58 return tuple -> refiner.merge(tuple, value) ? Tuple.of() : null;
59 }
60}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java
new file mode 100644
index 00000000..f36fde44
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/actions/PartialActionLiterals.java
@@ -0,0 +1,42 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.actions;
7
8import tools.refinery.store.query.term.NodeVariable;
9import tools.refinery.store.reasoning.representation.PartialRelation;
10import tools.refinery.store.reasoning.representation.PartialSymbol;
11import tools.refinery.store.representation.TruthValue;
12
13import java.util.List;
14
15public final class PartialActionLiterals {
16 private PartialActionLiterals() {
17 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
18 }
19
20 public static <A, C> MergeActionLiteral<A, C> merge(PartialSymbol<A, C> partialSymbol, A value,
21 NodeVariable... parameters) {
22 return new MergeActionLiteral<>(partialSymbol, value, List.of(parameters));
23 }
24
25 public static MergeActionLiteral<TruthValue, Boolean> add(PartialRelation partialRelation,
26 NodeVariable... parameters) {
27 return merge(partialRelation, TruthValue.TRUE, parameters);
28 }
29
30 public static MergeActionLiteral<TruthValue, Boolean> remove(PartialRelation partialRelation,
31 NodeVariable... parameters) {
32 return merge(partialRelation, TruthValue.FALSE, parameters);
33 }
34
35 public static FocusActionLiteral focus(NodeVariable parent, NodeVariable child) {
36 return new FocusActionLiteral(parent, child);
37 }
38
39 public static CleanupActionLiteral cleanup(NodeVariable node) {
40 return new CleanupActionLiteral(node);
41 }
42}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java
new file mode 100644
index 00000000..40993235
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialClauseRewriter.java
@@ -0,0 +1,223 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.internal;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.dnf.Dnf;
10import tools.refinery.store.query.dnf.DnfBuilder;
11import tools.refinery.store.query.dnf.DnfClause;
12import tools.refinery.store.query.literal.AbstractCallLiteral;
13import tools.refinery.store.query.literal.AbstractCountLiteral;
14import tools.refinery.store.query.literal.CallPolarity;
15import tools.refinery.store.query.literal.Literal;
16import tools.refinery.store.query.term.Aggregator;
17import tools.refinery.store.query.term.ConstantTerm;
18import tools.refinery.store.query.term.Term;
19import tools.refinery.store.query.term.Variable;
20import tools.refinery.store.query.term.int_.IntTerms;
21import tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms;
22import tools.refinery.store.reasoning.ReasoningAdapter;
23import tools.refinery.store.reasoning.literal.*;
24import tools.refinery.store.reasoning.representation.PartialRelation;
25import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
26import tools.refinery.store.representation.cardinality.UpperCardinalities;
27
28import java.util.*;
29import java.util.function.BinaryOperator;
30
31class PartialClauseRewriter {
32 private final PartialQueryRewriter rewriter;
33 private final List<Literal> completedLiterals = new ArrayList<>();
34 private final Deque<Literal> workList = new ArrayDeque<>();
35 private final Set<Variable> positiveVariables = new LinkedHashSet<>();
36 private final Set<Variable> unmodifiablePositiveVariables = Collections.unmodifiableSet(positiveVariables);
37
38 public PartialClauseRewriter(PartialQueryRewriter rewriter) {
39 this.rewriter = rewriter;
40 }
41
42 public List<Literal> rewriteClause(DnfClause clause) {
43 workList.addAll(clause.literals());
44 while (!workList.isEmpty()) {
45 var literal = workList.removeFirst();
46 rewrite(literal);
47 }
48 return completedLiterals;
49 }
50
51 private void rewrite(Literal literal) {
52 if (!(literal instanceof AbstractCallLiteral callLiteral)) {
53 markAsDone(literal);
54 return;
55 }
56 if (callLiteral instanceof CountLowerBoundLiteral countLowerBoundLiteral) {
57 rewriteCountLowerBound(countLowerBoundLiteral);
58 return;
59 }
60 if (callLiteral instanceof CountUpperBoundLiteral countUpperBoundLiteral) {
61 rewriteCountUpperBound(countUpperBoundLiteral);
62 return;
63 }
64 if (callLiteral instanceof CountCandidateLowerBoundLiteral countCandidateLowerBoundLiteral) {
65 rewriteCountCandidateLowerBound(countCandidateLowerBoundLiteral);
66 return;
67 }
68 if (callLiteral instanceof CountCandidateUpperBoundLiteral countCandidateUpperBoundLiteral) {
69 rewriteCountCandidateUpperBound(countCandidateUpperBoundLiteral);
70 return;
71 }
72 var target = callLiteral.getTarget();
73 if (target instanceof Dnf dnf) {
74 rewriteRecursively(callLiteral, dnf);
75 } else if (target instanceof ModalConstraint modalConstraint) {
76 var modality = modalConstraint.modality();
77 var concreteness = modalConstraint.concreteness();
78 var constraint = modalConstraint.constraint();
79 if (constraint instanceof Dnf dnf) {
80 rewriteRecursively(callLiteral, modality, concreteness, dnf);
81 } else if (constraint instanceof PartialRelation partialRelation) {
82 rewrite(callLiteral, modality, concreteness, partialRelation);
83 } else {
84 throw new IllegalArgumentException("Cannot interpret modal constraint: " + modalConstraint);
85 }
86 } else {
87 markAsDone(literal);
88 }
89 }
90
91 private void rewriteCountLowerBound(CountLowerBoundLiteral literal) {
92 rewritePartialCount(literal, "lower", Modality.MUST, MultiObjectTranslator.LOWER_CARDINALITY_VIEW, 1,
93 IntTerms::mul, IntTerms.INT_SUM);
94 }
95
96 private void rewriteCountUpperBound(CountUpperBoundLiteral literal) {
97 rewritePartialCount(literal, "upper", Modality.MAY, MultiObjectTranslator.UPPER_CARDINALITY_VIEW,
98 UpperCardinalities.ONE, UpperCardinalityTerms::mul, UpperCardinalityTerms.UPPER_CARDINALITY_SUM);
99 }
100
101 private <T> void rewritePartialCount(AbstractCountLiteral<T> literal, String name, Modality modality,
102 Constraint view, T one, BinaryOperator<Term<T>> mul, Aggregator<T, T> sum) {
103 var type = literal.getResultType();
104 var countResult = computeCountVariables(literal, Concreteness.PARTIAL, name);
105 var builder = countResult.builder();
106 var outputVariable = builder.parameter(type);
107 var variablesToCount = countResult.variablesToCount();
108
109 var literals = new ArrayList<Literal>();
110 literals.add(new ModalConstraint(modality, Concreteness.PARTIAL, literal.getTarget())
111 .call(CallPolarity.POSITIVE, countResult.rewrittenArguments()));
112 switch (variablesToCount.size()) {
113 case 0 -> literals.add(outputVariable.assign(new ConstantTerm<>(type, one)));
114 case 1 -> literals.add(view.call(variablesToCount.get(0),
115 outputVariable));
116 default -> {
117 var firstCount = Variable.of(type);
118 literals.add(view.call(variablesToCount.get(0), firstCount));
119 int length = variablesToCount.size();
120 Term<T> accumulator = firstCount;
121 for (int i = 1; i < length; i++) {
122 var countVariable = Variable.of(type);
123 literals.add(view.call(variablesToCount.get(i), countVariable));
124 accumulator = mul.apply(accumulator, countVariable);
125 }
126 literals.add(outputVariable.assign(accumulator));
127 }
128 }
129 builder.clause(literals);
130
131 var helperQuery = builder.build();
132 var aggregationVariable = Variable.of(type);
133 var helperArguments = countResult.helperArguments();
134 helperArguments.add(aggregationVariable);
135 workList.addFirst(literal.getResultVariable().assign(helperQuery.aggregateBy(aggregationVariable, sum,
136 helperArguments)));
137 }
138
139 private void rewriteCountCandidateLowerBound(CountCandidateLowerBoundLiteral literal) {
140 rewriteCandidateCount(literal, "lower", Modality.MAY);
141 }
142
143 private void rewriteCountCandidateUpperBound(CountCandidateUpperBoundLiteral literal) {
144 rewriteCandidateCount(literal, "upper", Modality.MUST);
145 }
146
147 private void rewriteCandidateCount(AbstractCountLiteral<Integer> literal, String name, Modality modality) {
148 var countResult = computeCountVariables(literal, Concreteness.CANDIDATE, name);
149 var builder = countResult.builder();
150
151 var literals = new ArrayList<Literal>();
152 literals.add(new ModalConstraint(modality, Concreteness.CANDIDATE, literal.getTarget())
153 .call(CallPolarity.POSITIVE, countResult.rewrittenArguments()));
154 for (var variable : countResult.variablesToCount()) {
155 literals.add(new ModalConstraint(modality, Concreteness.CANDIDATE, ReasoningAdapter.EXISTS_SYMBOL)
156 .call(variable));
157 }
158 builder.clause(literals);
159
160 var helperQuery = builder.build();
161 workList.addFirst(literal.getResultVariable().assign(helperQuery.count(countResult.helperArguments())));
162 }
163
164 private CountResult computeCountVariables(AbstractCountLiteral<?> literal, Concreteness concreteness,
165 String name) {
166 var target = literal.getTarget();
167 int arity = target.arity();
168 var parameters = target.getParameters();
169 var literalArguments = literal.getArguments();
170 var privateVariables = literal.getPrivateVariables(positiveVariables);
171 var builder = Dnf.builder("%s#%s#%s".formatted(target.name(), concreteness, name));
172 var rewrittenArguments = new ArrayList<Variable>(parameters.size());
173 var variablesToCount = new ArrayList<Variable>();
174 var helperArguments = new ArrayList<Variable>();
175 var literalToRewrittenArgumentMap = new HashMap<Variable, Variable>();
176 for (int i = 0; i < arity; i++) {
177 var literalArgument = literalArguments.get(i);
178 var parameter = parameters.get(i);
179 var rewrittenArgument = literalToRewrittenArgumentMap.computeIfAbsent(literalArgument, key -> {
180 helperArguments.add(key);
181 var newArgument = builder.parameter(parameter);
182 if (privateVariables.contains(key)) {
183 variablesToCount.add(newArgument);
184 }
185 return newArgument;
186 });
187 rewrittenArguments.add(rewrittenArgument);
188 }
189 return new CountResult(builder, rewrittenArguments, helperArguments, variablesToCount);
190 }
191
192 private void markAsDone(Literal literal) {
193 completedLiterals.add(literal);
194 positiveVariables.addAll(literal.getOutputVariables());
195 }
196
197 private void rewriteRecursively(AbstractCallLiteral callLiteral, Modality modality, Concreteness concreteness,
198 Dnf dnf) {
199 var liftedDnf = rewriter.getLifter().lift(modality, concreteness, dnf);
200 rewriteRecursively(callLiteral, liftedDnf);
201 }
202
203 private void rewriteRecursively(AbstractCallLiteral callLiteral, Dnf dnf) {
204 var rewrittenDnf = rewriter.rewrite(dnf);
205 var rewrittenLiteral = callLiteral.withTarget(rewrittenDnf);
206 markAsDone(rewrittenLiteral);
207 }
208
209 private void rewrite(AbstractCallLiteral callLiteral, Modality modality, Concreteness concreteness,
210 PartialRelation partialRelation) {
211 var relationRewriter = rewriter.getRelationRewriter(partialRelation);
212 var literals = relationRewriter.rewriteLiteral(
213 unmodifiablePositiveVariables, callLiteral, modality, concreteness);
214 int length = literals.size();
215 for (int i = length - 1; i >= 0; i--) {
216 workList.addFirst(literals.get(i));
217 }
218 }
219
220 private record CountResult(DnfBuilder builder, List<Variable> rewrittenArguments, List<Variable> helperArguments,
221 List<Variable> variablesToCount) {
222 }
223}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java
new file mode 100644
index 00000000..79cba263
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/PartialQueryRewriter.java
@@ -0,0 +1,53 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.internal;
7
8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.query.rewriter.AbstractRecursiveRewriter;
10import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter;
11import tools.refinery.store.reasoning.lifting.DnfLifter;
12import tools.refinery.store.reasoning.representation.PartialRelation;
13
14import java.util.HashMap;
15import java.util.Map;
16
17class PartialQueryRewriter extends AbstractRecursiveRewriter {
18 private final DnfLifter lifter;
19 private final Map<PartialRelation, PartialRelationRewriter> relationRewriterMap = new HashMap<>();
20
21 PartialQueryRewriter(DnfLifter lifter) {
22 this.lifter = lifter;
23 }
24
25 DnfLifter getLifter() {
26 return lifter;
27 }
28
29 PartialRelationRewriter getRelationRewriter(PartialRelation partialRelation) {
30 var rewriter = relationRewriterMap.get(partialRelation);
31 if (rewriter == null) {
32 throw new IllegalArgumentException("Do not know how to interpret partial relation: " + partialRelation);
33 }
34 return rewriter;
35 }
36
37 public void addRelationRewriter(PartialRelation partialRelation, PartialRelationRewriter interpreter) {
38 if (relationRewriterMap.put(partialRelation, interpreter) != null) {
39 throw new IllegalArgumentException("Duplicate partial relation: " + partialRelation);
40 }
41 }
42
43 @Override
44 protected Dnf doRewrite(Dnf dnf) {
45 var builder = Dnf.builderFrom(dnf);
46 for (var clause : dnf.getClauses()) {
47 var clauseRewriter = new PartialClauseRewriter(this);
48 var rewrittenClauses = clauseRewriter.rewriteClause(clause);
49 builder.clause(rewrittenClauses);
50 }
51 return builder.build();
52 }
53}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java
index 1bd3ad2e..bd16bdfa 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java
@@ -5,20 +5,114 @@
5 */ 5 */
6package tools.refinery.store.reasoning.internal; 6package tools.refinery.store.reasoning.internal;
7 7
8import org.jetbrains.annotations.Nullable;
9import tools.refinery.store.model.Interpretation;
8import tools.refinery.store.model.Model; 10import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.ReasoningAdapter; 11import tools.refinery.store.reasoning.ReasoningAdapter;
10import tools.refinery.store.reasoning.PartialInterpretation; 12import tools.refinery.store.reasoning.interpretation.AnyPartialInterpretation;
13import tools.refinery.store.reasoning.interpretation.PartialInterpretation;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.refinement.AnyPartialInterpretationRefiner;
16import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
17import tools.refinery.store.reasoning.refinement.StorageRefiner;
18import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
11import tools.refinery.store.reasoning.representation.PartialSymbol; 19import tools.refinery.store.reasoning.representation.PartialSymbol;
12import tools.refinery.store.query.dnf.Dnf; 20import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
13import tools.refinery.store.query.resultset.ResultSet; 21import tools.refinery.store.representation.Symbol;
22import tools.refinery.store.representation.cardinality.CardinalityInterval;
23import tools.refinery.store.representation.cardinality.CardinalityIntervals;
24import tools.refinery.store.tuple.Tuple;
25import tools.refinery.store.tuple.Tuple1;
14 26
15public class ReasoningAdapterImpl implements ReasoningAdapter { 27import java.util.HashMap;
28import java.util.Map;
29
30class ReasoningAdapterImpl implements ReasoningAdapter {
31 static final Symbol<Integer> NODE_COUNT_SYMBOL = Symbol.of("MODEL_SIZE", 0, Integer.class, 0);
16 private final Model model; 32 private final Model model;
17 private final ReasoningStoreAdapterImpl storeAdapter; 33 private final ReasoningStoreAdapterImpl storeAdapter;
34 private final Map<AnyPartialSymbol, AnyPartialInterpretation>[] partialInterpretations;
35 private final Map<AnyPartialSymbol, AnyPartialInterpretationRefiner> refiners;
36 private final StorageRefiner[] storageRefiners;
37 private final Interpretation<Integer> nodeCountInterpretation;
38 private final Interpretation<CardinalityInterval> countInterpretation;
18 39
19 ReasoningAdapterImpl(Model model, ReasoningStoreAdapterImpl storeAdapter) { 40 ReasoningAdapterImpl(Model model, ReasoningStoreAdapterImpl storeAdapter) {
20 this.model = model; 41 this.model = model;
21 this.storeAdapter = storeAdapter; 42 this.storeAdapter = storeAdapter;
43
44 int concretenessLength = Concreteness.values().length;
45 // Creation of a generic array.
46 @SuppressWarnings({"unchecked", "squid:S1905"})
47 var interpretationsArray = (Map<AnyPartialSymbol, AnyPartialInterpretation>[]) new Map[concretenessLength];
48 partialInterpretations = interpretationsArray;
49 createPartialInterpretations();
50
51 var refinerFactories = storeAdapter.getSymbolRefiners();
52 refiners = new HashMap<>(refinerFactories.size());
53 createRefiners();
54
55 storageRefiners = storeAdapter.createStorageRefiner(model);
56
57 nodeCountInterpretation = model.getInterpretation(NODE_COUNT_SYMBOL);
58 if (model.getStore().getSymbols().contains(MultiObjectTranslator.COUNT_STORAGE)) {
59 countInterpretation = model.getInterpretation(MultiObjectTranslator.COUNT_STORAGE);
60 } else {
61 countInterpretation = null;
62 }
63 }
64
65 private void createPartialInterpretations() {
66 var supportedInterpretations = storeAdapter.getSupportedInterpretations();
67 int concretenessLength = Concreteness.values().length;
68 var interpretationFactories = storeAdapter.getSymbolInterpreters();
69 for (int i = 0; i < concretenessLength; i++) {
70 var concreteness = Concreteness.values()[i];
71 if (supportedInterpretations.contains(concreteness)) {
72 partialInterpretations[i] = new HashMap<>(interpretationFactories.size());
73 }
74 }
75 // Create the partial interpretations in order so that factories may refer to interpretations of symbols
76 // preceding them in the ordered {@code interpretationFactories} map, e.g., for opposite interpretations.
77 for (var entry : interpretationFactories.entrySet()) {
78 var partialSymbol = entry.getKey();
79 var factory = entry.getValue();
80 for (int i = 0; i < concretenessLength; i++) {
81 if (partialInterpretations[i] != null) {
82 var concreteness = Concreteness.values()[i];
83 var interpretation = createPartialInterpretation(concreteness, factory, partialSymbol);
84 partialInterpretations[i].put(partialSymbol, interpretation);
85 }
86 }
87 }
88 }
89
90 private <A, C> PartialInterpretation<A, C> createPartialInterpretation(
91 Concreteness concreteness, PartialInterpretation.Factory<A, C> interpreter, AnyPartialSymbol symbol) {
92 // The builder only allows well-typed assignment of interpreters to symbols.
93 @SuppressWarnings("unchecked")
94 var typedSymbol = (PartialSymbol<A, C>) symbol;
95 return interpreter.create(this, concreteness, typedSymbol);
96 }
97
98 private void createRefiners() {
99 var refinerFactories = storeAdapter.getSymbolRefiners();
100 // Create the partial interpretations refiners in order so that factories may refer to refiners of symbols
101 // preceding them in the ordered {@code interpretationFactories} map, e.g., for opposite interpretations.
102 for (var entry : refinerFactories.entrySet()) {
103 var partialSymbol = entry.getKey();
104 var factory = entry.getValue();
105 var refiner = createRefiner(factory, partialSymbol);
106 refiners.put(partialSymbol, refiner);
107 }
108 }
109
110 private <A, C> PartialInterpretationRefiner<A, C> createRefiner(
111 PartialInterpretationRefiner.Factory<A, C> factory, AnyPartialSymbol symbol) {
112 // The builder only allows well-typed assignment of interpreters to symbols.
113 @SuppressWarnings("unchecked")
114 var typedSymbol = (PartialSymbol<A, C>) symbol;
115 return factory.create(this, typedSymbol);
22 } 116 }
23 117
24 @Override 118 @Override
@@ -32,12 +126,88 @@ public class ReasoningAdapterImpl implements ReasoningAdapter {
32 } 126 }
33 127
34 @Override 128 @Override
35 public <A, C> PartialInterpretation<A, C> getPartialInterpretation(PartialSymbol<A, C> partialSymbol) { 129 public <A, C> PartialInterpretation<A, C> getPartialInterpretation(Concreteness concreteness,
36 return null; 130 PartialSymbol<A, C> partialSymbol) {
131 var map = partialInterpretations[concreteness.ordinal()];
132 if (map == null) {
133 throw new IllegalArgumentException("No interpretation for concreteness: " + concreteness);
134 }
135 var interpretation = map.get(partialSymbol);
136 if (interpretation == null) {
137 throw new IllegalArgumentException("No interpretation for partial symbol: " + partialSymbol);
138 }
139 // The builder only allows well-typed assignment of interpreters to symbols.
140 @SuppressWarnings("unchecked")
141 var typedInterpretation = (PartialInterpretation<A, C>) interpretation;
142 return typedInterpretation;
143 }
144
145 @Override
146 public <A, C> PartialInterpretationRefiner<A, C> getRefiner(PartialSymbol<A, C> partialSymbol) {
147 var refiner = refiners.get(partialSymbol);
148 if (refiner == null) {
149 throw new IllegalArgumentException("No refiner for partial symbol: " + partialSymbol);
150 }
151 // The builder only allows well-typed assignment of refiners to symbols.
152 @SuppressWarnings("unchecked")
153 var typedRefiner = (PartialInterpretationRefiner<A, C>) refiner;
154 return typedRefiner;
155 }
156
157 @Override
158 @Nullable
159 public Tuple1 split(int parentNode) {
160 int newNodeId = nodeCountInterpretation.get(Tuple.of());
161 nodeCountInterpretation.put(Tuple.of(), newNodeId + 1);
162 // Avoid creating an iterator object.
163 //noinspection ForLoopReplaceableByForEach
164 for (int i = 0; i < storageRefiners.length; i++) {
165 if (!storageRefiners[i].split(parentNode, newNodeId)) {
166 return null;
167 }
168 }
169 return Tuple.of(newNodeId);
170 }
171
172 @Override
173 public @Nullable Tuple1 focus(int parentObject) {
174 if (countInterpretation == null) {
175 throw new IllegalStateException("Cannot focus without " + MultiObjectTranslator.class.getSimpleName());
176 }
177 var tuple = Tuple.of(parentObject);
178 var count = countInterpretation.get(tuple);
179 if (CardinalityIntervals.ONE.equals(count)) {
180 return tuple;
181 }
182 if (CardinalityIntervals.LONE.equals(count)) {
183 countInterpretation.put(tuple, CardinalityIntervals.ONE);
184 return tuple;
185 }
186 if (CardinalityIntervals.NONE.equals(count)) {
187 return null;
188 }
189 return split(parentObject);
190 }
191
192 @Override
193 public boolean cleanup(int nodeToDelete) {
194 // Avoid creating an iterator object.
195 //noinspection ForLoopReplaceableByForEach
196 for (int i = 0; i < storageRefiners.length; i++) {
197 if (!storageRefiners[i].cleanup(nodeToDelete)) {
198 return false;
199 }
200 }
201 int currentModelSize = nodeCountInterpretation.get(Tuple.of());
202 if (nodeToDelete == currentModelSize - 1) {
203 nodeCountInterpretation.put(Tuple.of(), nodeToDelete);
204 }
205 return true;
37 } 206 }
38 207
39 @Override 208 @Override
40 public ResultSet<Boolean> getLiftedResultSet(Dnf query) { 209 public int getNodeCount() {
41 return null; 210 Integer nodeCount = nodeCountInterpretation.get(Tuple.of());
211 return nodeCount == null ? 0 : nodeCount;
42 } 212 }
43} 213}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java
index aa71496c..722458c8 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningBuilderImpl.java
@@ -6,26 +6,169 @@
6package tools.refinery.store.reasoning.internal; 6package tools.refinery.store.reasoning.internal;
7 7
8import tools.refinery.store.adapter.AbstractModelAdapterBuilder; 8import tools.refinery.store.adapter.AbstractModelAdapterBuilder;
9import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder;
10import tools.refinery.store.dse.transition.objectives.Objective;
11import tools.refinery.store.dse.transition.objectives.Objectives;
9import tools.refinery.store.model.ModelStore; 12import tools.refinery.store.model.ModelStore;
13import tools.refinery.store.model.ModelStoreBuilder;
14import tools.refinery.store.query.ModelQueryBuilder;
10import tools.refinery.store.query.dnf.Dnf; 15import tools.refinery.store.query.dnf.Dnf;
16import tools.refinery.store.query.dnf.FunctionalQuery;
17import tools.refinery.store.query.dnf.Query;
18import tools.refinery.store.query.dnf.RelationalQuery;
11import tools.refinery.store.reasoning.ReasoningBuilder; 19import tools.refinery.store.reasoning.ReasoningBuilder;
20import tools.refinery.store.reasoning.interpretation.PartialInterpretation;
21import tools.refinery.store.reasoning.lifting.DnfLifter;
22import tools.refinery.store.reasoning.literal.Concreteness;
12import tools.refinery.store.reasoning.literal.Modality; 23import tools.refinery.store.reasoning.literal.Modality;
24import tools.refinery.store.reasoning.refinement.DefaultStorageRefiner;
25import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
26import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
27import tools.refinery.store.reasoning.refinement.StorageRefiner;
28import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
29import tools.refinery.store.reasoning.translator.AnyPartialSymbolTranslator;
30import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
31import tools.refinery.store.representation.AnySymbol;
32import tools.refinery.store.representation.Symbol;
33import tools.refinery.store.statecoding.StateCoderBuilder;
34
35import java.util.*;
13 36
14public class ReasoningBuilderImpl extends AbstractModelAdapterBuilder<ReasoningStoreAdapterImpl> 37public class ReasoningBuilderImpl extends AbstractModelAdapterBuilder<ReasoningStoreAdapterImpl>
15 implements ReasoningBuilder { 38 implements ReasoningBuilder {
39 private final DnfLifter lifter = new DnfLifter();
40 private final PartialQueryRewriter queryRewriter = new PartialQueryRewriter(lifter);
41 private Set<Concreteness> requiredInterpretations = Set.of(Concreteness.values());
42 private final Map<AnyPartialSymbol, AnyPartialSymbolTranslator> translators = new LinkedHashMap<>();
43 private final Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> symbolInterpreters =
44 new LinkedHashMap<>();
45 private final Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> symbolRefiners =
46 new LinkedHashMap<>();
47 private final Map<AnySymbol, StorageRefiner.Factory<?>> registeredStorageRefiners = new LinkedHashMap<>();
48 private final List<PartialModelInitializer> initializers = new ArrayList<>();
49 private final List<Objective> objectives = new ArrayList<>();
50
51 @Override
52 public ReasoningBuilder requiredInterpretations(Collection<Concreteness> requiredInterpretations) {
53 this.requiredInterpretations = Set.copyOf(requiredInterpretations);
54 return this;
55 }
56
57 @Override
58 public ReasoningBuilder partialSymbol(AnyPartialSymbolTranslator translator) {
59 var partialSymbol = translator.getPartialSymbol();
60 var oldConfiguration = translators.put(partialSymbol, translator);
61 if (oldConfiguration != null && oldConfiguration != translator) {
62 throw new IllegalArgumentException("Duplicate configuration for symbol: " + partialSymbol);
63 }
64 return this;
65 }
66
16 @Override 67 @Override
17 public ReasoningBuilder liftedQuery(Dnf liftedQuery) { 68 public <T> ReasoningBuilder storageRefiner(Symbol<T> symbol, StorageRefiner.Factory<T> refiner) {
18 return null; 69 checkNotConfigured();
70 if (registeredStorageRefiners.put(symbol, refiner) != null) {
71 throw new IllegalArgumentException("Duplicate representation refiner for symbol: " + symbol);
72 }
73 return this;
74 }
75
76 @Override
77 public ReasoningBuilder initializer(PartialModelInitializer initializer) {
78 checkNotConfigured();
79 initializers.add(initializer);
80 return this;
19 } 81 }
20 82
21 @Override 83 @Override
22 public Dnf lift(Modality modality, Dnf query) { 84 public ReasoningBuilder objective(Objective objective) {
23 checkNotConfigured(); 85 checkNotConfigured();
24 return null; 86 objectives.add(objective);
87 return this;
88 }
89
90 @Override
91 public <T> Query<T> lift(Modality modality, Concreteness concreteness, Query<T> query) {
92 return lifter.lift(modality, concreteness, query);
93 }
94
95 @Override
96 public RelationalQuery lift(Modality modality, Concreteness concreteness, RelationalQuery query) {
97 return lifter.lift(modality, concreteness, query);
98 }
99
100 @Override
101 public <T> FunctionalQuery<T> lift(Modality modality, Concreteness concreteness, FunctionalQuery<T> query) {
102 return lifter.lift(modality, concreteness, query);
103 }
104
105 @Override
106 public Dnf lift(Modality modality, Concreteness concreteness, Dnf dnf) {
107 return lifter.lift(modality, concreteness, dnf);
108 }
109
110 @Override
111 protected void doConfigure(ModelStoreBuilder storeBuilder) {
112 storeBuilder.symbols(ReasoningAdapterImpl.NODE_COUNT_SYMBOL);
113 storeBuilder.tryGetAdapter(StateCoderBuilder.class)
114 .ifPresent(stateCoderBuilder -> stateCoderBuilder.exclude(ReasoningAdapterImpl.NODE_COUNT_SYMBOL));
115 for (var translator : translators.values()) {
116 translator.configure(storeBuilder);
117 if (translator instanceof PartialRelationTranslator relationConfiguration) {
118 doConfigure(storeBuilder, relationConfiguration);
119 } else {
120 throw new IllegalArgumentException("Unknown partial symbol translator %s for partial symbol %s"
121 .formatted(translator, translator.getPartialSymbol()));
122 }
123 }
124 storeBuilder.symbols(registeredStorageRefiners.keySet());
125 var queryBuilder = storeBuilder.getAdapter(ModelQueryBuilder.class);
126 queryBuilder.rewriter(queryRewriter);
127 if (!objectives.isEmpty()) {
128 storeBuilder.tryGetAdapter(DesignSpaceExplorationBuilder.class)
129 .ifPresent(dseBuilder -> dseBuilder.objective(Objectives.sum(objectives)));
130 }
131 }
132
133 private void doConfigure(ModelStoreBuilder storeBuilder, PartialRelationTranslator relationConfiguration) {
134 var partialRelation = relationConfiguration.getPartialRelation();
135 queryRewriter.addRelationRewriter(partialRelation, relationConfiguration.getRewriter());
136 var interpretationFactory = relationConfiguration.getInterpretationFactory();
137 interpretationFactory.configure(storeBuilder, requiredInterpretations);
138 symbolInterpreters.put(partialRelation, interpretationFactory);
139 var refiner = relationConfiguration.getInterpretationRefiner();
140 if (refiner != null) {
141 symbolRefiners.put(partialRelation, refiner);
142 }
25 } 143 }
26 144
27 @Override 145 @Override
28 public ReasoningStoreAdapterImpl doBuild(ModelStore store) { 146 public ReasoningStoreAdapterImpl doBuild(ModelStore store) {
29 return null; 147 return new ReasoningStoreAdapterImpl(store, requiredInterpretations,
148 Collections.unmodifiableMap(symbolInterpreters), Collections.unmodifiableMap(symbolRefiners),
149 getStorageRefiners(store), Collections.unmodifiableList(initializers));
150 }
151
152 private Map<AnySymbol, StorageRefiner.Factory<?>> getStorageRefiners(ModelStore store) {
153 var symbols = store.getSymbols();
154 var storageRefiners = new LinkedHashMap<AnySymbol, StorageRefiner.Factory<?>>(symbols.size());
155 for (var symbol : symbols) {
156 var refiner = registeredStorageRefiners.remove(symbol);
157 if (refiner == null) {
158 if (symbol.arity() == 0) {
159 // Arity-0 symbols don't need a default refiner, because they are unaffected by object
160 // creation/removal. Only a custom refiner ({@code refiner != null}) might need to update them.
161 continue;
162 }
163 // By default, copy over all affected tuples on object creation and remove all affected tuples on
164 // object removal.
165 refiner = DefaultStorageRefiner.factory();
166 }
167 storageRefiners.put(symbol, refiner);
168 }
169 if (!registeredStorageRefiners.isEmpty()) {
170 throw new IllegalArgumentException("Unused storage refiners: " + registeredStorageRefiners.keySet());
171 }
172 return Collections.unmodifiableMap(storageRefiners);
30 } 173 }
31} 174}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java
index cdddd8d6..9ef6fb16 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java
@@ -5,19 +5,46 @@
5 */ 5 */
6package tools.refinery.store.reasoning.internal; 6package tools.refinery.store.reasoning.internal;
7 7
8import tools.refinery.store.reasoning.ReasoningStoreAdapter; 8import tools.refinery.store.dse.propagation.PropagationAdapter;
9import tools.refinery.store.model.Model; 9import tools.refinery.store.model.Model;
10import tools.refinery.store.model.ModelStore; 10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.ModelQueryAdapter;
12import tools.refinery.store.reasoning.ReasoningStoreAdapter;
13import tools.refinery.store.reasoning.interpretation.PartialInterpretation;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
16import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
17import tools.refinery.store.reasoning.refinement.StorageRefiner;
11import tools.refinery.store.reasoning.representation.AnyPartialSymbol; 18import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
12import tools.refinery.store.query.dnf.Dnf; 19import tools.refinery.store.reasoning.seed.ModelSeed;
20import tools.refinery.store.representation.AnySymbol;
21import tools.refinery.store.representation.Symbol;
22import tools.refinery.store.tuple.Tuple;
13 23
14import java.util.Collection; 24import java.util.Collection;
25import java.util.List;
26import java.util.Map;
27import java.util.Set;
15 28
16public class ReasoningStoreAdapterImpl implements ReasoningStoreAdapter { 29class ReasoningStoreAdapterImpl implements ReasoningStoreAdapter {
17 private final ModelStore store; 30 private final ModelStore store;
31 private final Set<Concreteness> supportedInterpretations;
32 private final Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> symbolInterpreters;
33 private final Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> symbolRefiners;
34 private final Map<AnySymbol, StorageRefiner.Factory<?>> storageRefiners;
35 private final List<PartialModelInitializer> initializers;
18 36
19 ReasoningStoreAdapterImpl(ModelStore store) { 37 ReasoningStoreAdapterImpl(ModelStore store, Set<Concreteness> supportedInterpretations,
38 Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> symbolInterpreters,
39 Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> symbolRefiners,
40 Map<AnySymbol, StorageRefiner.Factory<?>> storageRefiners,
41 List<PartialModelInitializer> initializers) {
20 this.store = store; 42 this.store = store;
43 this.supportedInterpretations = supportedInterpretations;
44 this.symbolInterpreters = symbolInterpreters;
45 this.symbolRefiners = symbolRefiners;
46 this.storageRefiners = storageRefiners;
47 this.initializers = initializers;
21 } 48 }
22 49
23 @Override 50 @Override
@@ -26,13 +53,64 @@ public class ReasoningStoreAdapterImpl implements ReasoningStoreAdapter {
26 } 53 }
27 54
28 @Override 55 @Override
56 public Set<Concreteness> getSupportedInterpretations() {
57 return supportedInterpretations;
58 }
59
60 @Override
29 public Collection<AnyPartialSymbol> getPartialSymbols() { 61 public Collection<AnyPartialSymbol> getPartialSymbols() {
30 return null; 62 return symbolInterpreters.keySet();
31 } 63 }
32 64
33 @Override 65 @Override
34 public Collection<Dnf> getLiftedQueries() { 66 public Collection<AnyPartialSymbol> getRefinablePartialSymbols() {
35 return null; 67 return symbolRefiners.keySet();
68 }
69
70 // Use of wildcard return value only in internal method not exposed as API, so there is less chance of confusion.
71 @SuppressWarnings("squid:S1452")
72 Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> getSymbolInterpreters() {
73 return symbolInterpreters;
74 }
75
76 // Use of wildcard return value only in internal method not exposed as API, so there is less chance of confusion.
77 @SuppressWarnings("squid:S1452")
78 Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> getSymbolRefiners() {
79 return symbolRefiners;
80 }
81
82 StorageRefiner[] createStorageRefiner(Model model) {
83 var refiners = new StorageRefiner[storageRefiners.size()];
84 int i = 0;
85 for (var entry : storageRefiners.entrySet()) {
86 var symbol = entry.getKey();
87 var factory = entry.getValue();
88 refiners[i] = createStorageRefiner(factory, model, symbol);
89 i++;
90 }
91 return refiners;
92 }
93
94 private <T> StorageRefiner createStorageRefiner(StorageRefiner.Factory<T> factory, Model model, AnySymbol symbol) {
95 // The builder only allows well-typed assignment of refiners to symbols.
96 @SuppressWarnings("unchecked")
97 var typedSymbol = (Symbol<T>) symbol;
98 return factory.create(typedSymbol, model);
99 }
100
101 public Model createInitialModel(ModelSeed modelSeed) {
102 var model = store.createEmptyModel();
103 model.getInterpretation(ReasoningAdapterImpl.NODE_COUNT_SYMBOL).put(Tuple.of(), modelSeed.getNodeCount());
104 for (var initializer : initializers) {
105 initializer.initialize(model, modelSeed);
106 }
107 model.tryGetAdapter(PropagationAdapter.class).ifPresent(propagationAdapter -> {
108 if (propagationAdapter.propagate().isRejected()) {
109 throw new IllegalArgumentException("Inconsistent initial mode: propagation failed");
110 }
111 });
112 model.getAdapter(ModelQueryAdapter.class).flushChanges();
113 return model;
36 } 114 }
37 115
38 @Override 116 @Override
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java
new file mode 100644
index 00000000..ed291eac
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AbstractPartialInterpretation.java
@@ -0,0 +1,38 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.interpretation;
7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.literal.Concreteness;
10import tools.refinery.store.reasoning.representation.PartialSymbol;
11
12public abstract class AbstractPartialInterpretation<A, C> implements PartialInterpretation<A, C> {
13 private final ReasoningAdapter adapter;
14 private final PartialSymbol<A, C> partialSymbol;
15 private final Concreteness concreteness;
16
17 protected AbstractPartialInterpretation(ReasoningAdapter adapter, Concreteness concreteness,
18 PartialSymbol<A, C> partialSymbol) {
19 this.adapter = adapter;
20 this.partialSymbol = partialSymbol;
21 this.concreteness = concreteness;
22 }
23
24 @Override
25 public ReasoningAdapter getAdapter() {
26 return adapter;
27 }
28
29 @Override
30 public PartialSymbol<A, C> getPartialSymbol() {
31 return partialSymbol;
32 }
33
34 @Override
35 public Concreteness getConcreteness() {
36 return concreteness;
37 }
38}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/AnyPartialInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AnyPartialInterpretation.java
index 000171a1..cd709bc4 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/AnyPartialInterpretation.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/AnyPartialInterpretation.java
@@ -3,8 +3,10 @@
3 * 3 *
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6package tools.refinery.store.reasoning; 6package tools.refinery.store.reasoning.interpretation;
7 7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.literal.Concreteness;
8import tools.refinery.store.reasoning.representation.AnyPartialSymbol; 10import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
9 11
10public sealed interface AnyPartialInterpretation permits PartialInterpretation { 12public sealed interface AnyPartialInterpretation permits PartialInterpretation {
@@ -12,7 +14,5 @@ public sealed interface AnyPartialInterpretation permits PartialInterpretation {
12 14
13 AnyPartialSymbol getPartialSymbol(); 15 AnyPartialSymbol getPartialSymbol();
14 16
15 int countUnfinished(); 17 Concreteness getConcreteness();
16
17 int countErrors();
18} 18}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java
new file mode 100644
index 00000000..86ffe751
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialInterpretation.java
@@ -0,0 +1,34 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.interpretation;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.reasoning.ReasoningAdapter;
11import tools.refinery.store.reasoning.literal.Concreteness;
12import tools.refinery.store.reasoning.representation.PartialSymbol;
13import tools.refinery.store.tuple.Tuple;
14
15import java.util.Set;
16
17public non-sealed interface PartialInterpretation<A, C> extends AnyPartialInterpretation {
18 @Override
19 PartialSymbol<A, C> getPartialSymbol();
20
21 A get(Tuple key);
22
23 Cursor<Tuple, A> getAll();
24
25 @FunctionalInterface
26 interface Factory<A, C> {
27 PartialInterpretation<A, C> create(ReasoningAdapter adapter, Concreteness concreteness,
28 PartialSymbol<A, C> partialSymbol);
29
30 default void configure(ModelStoreBuilder storeBuilder, Set<Concreteness> requiredInterpretations) {
31 // Nothing to configure by default.
32 }
33 }
34}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java
new file mode 100644
index 00000000..6ad35c20
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/PartialRelationRewriter.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.interpretation;
7
8import tools.refinery.store.query.literal.AbstractCallLiteral;
9import tools.refinery.store.query.literal.Literal;
10import tools.refinery.store.query.term.Variable;
11import tools.refinery.store.reasoning.literal.Concreteness;
12import tools.refinery.store.reasoning.literal.Modality;
13
14import java.util.List;
15import java.util.Set;
16
17@FunctionalInterface
18public interface PartialRelationRewriter {
19 List<Literal> rewriteLiteral(Set<Variable> positiveVariables, AbstractCallLiteral literal, Modality modality,
20 Concreteness concreteness);
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java
new file mode 100644
index 00000000..5cdaa185
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationInterpretationFactory.java
@@ -0,0 +1,195 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.interpretation;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.ModelQueryBuilder;
12import tools.refinery.store.query.dnf.Query;
13import tools.refinery.store.query.resultset.ResultSet;
14import tools.refinery.store.reasoning.ReasoningAdapter;
15import tools.refinery.store.reasoning.literal.Concreteness;
16import tools.refinery.store.reasoning.representation.PartialSymbol;
17import tools.refinery.store.representation.TruthValue;
18import tools.refinery.store.tuple.Tuple;
19
20import java.util.Set;
21
22public class QueryBasedRelationInterpretationFactory implements PartialInterpretation.Factory<TruthValue, Boolean> {
23 private final Query<Boolean> may;
24 private final Query<Boolean> must;
25 private final Query<Boolean> candidateMay;
26 private final Query<Boolean> candidateMust;
27
28 public QueryBasedRelationInterpretationFactory(
29 Query<Boolean> may, Query<Boolean> must, Query<Boolean> candidateMay, Query<Boolean> candidateMust) {
30 this.may = may;
31 this.must = must;
32 this.candidateMay = candidateMay;
33 this.candidateMust = candidateMust;
34 }
35
36 @Override
37 public PartialInterpretation<TruthValue, Boolean> create(
38 ReasoningAdapter adapter, Concreteness concreteness, PartialSymbol<TruthValue, Boolean> partialSymbol) {
39 var queryEngine = adapter.getModel().getAdapter(ModelQueryAdapter.class);
40 ResultSet<Boolean> mayResultSet;
41 ResultSet<Boolean> mustResultSet;
42 switch (concreteness) {
43 case PARTIAL -> {
44 mayResultSet = queryEngine.getResultSet(may);
45 mustResultSet = queryEngine.getResultSet(must);
46 }
47 case CANDIDATE -> {
48 mayResultSet = queryEngine.getResultSet(candidateMay);
49 mustResultSet = queryEngine.getResultSet(candidateMust);
50 }
51 default -> throw new IllegalArgumentException("Unknown concreteness: " + concreteness);
52 }
53 if (mayResultSet.equals(mustResultSet)) {
54 return new TwoValuedInterpretation(adapter, concreteness, partialSymbol, mustResultSet);
55 } else {
56 return new FourValuedInterpretation(
57 adapter, concreteness, partialSymbol, mayResultSet, mustResultSet);
58 }
59 }
60
61 @Override
62 public void configure(ModelStoreBuilder storeBuilder, Set<Concreteness> requiredInterpretations) {
63 var queryBuilder = storeBuilder.getAdapter(ModelQueryBuilder.class);
64 if (requiredInterpretations.contains(Concreteness.PARTIAL)) {
65 queryBuilder.queries(may, must);
66 }
67 if (requiredInterpretations.contains(Concreteness.CANDIDATE)) {
68 queryBuilder.queries(candidateMay, candidateMust);
69 }
70 }
71
72 private static class TwoValuedInterpretation extends AbstractPartialInterpretation<TruthValue, Boolean> {
73 private final ResultSet<Boolean> resultSet;
74
75 protected TwoValuedInterpretation(
76 ReasoningAdapter adapter, Concreteness concreteness, PartialSymbol<TruthValue, Boolean> partialSymbol,
77 ResultSet<Boolean> resultSet) {
78 super(adapter, concreteness, partialSymbol);
79 this.resultSet = resultSet;
80 }
81
82 @Override
83 public TruthValue get(Tuple key) {
84 return TruthValue.toTruthValue(resultSet.get(key));
85 }
86
87 @Override
88 public Cursor<Tuple, TruthValue> getAll() {
89 return new TwoValuedCursor(resultSet.getAll());
90 }
91
92 private record TwoValuedCursor(Cursor<Tuple, Boolean> cursor) implements Cursor<Tuple, TruthValue> {
93 @Override
94 public Tuple getKey() {
95 return cursor.getKey();
96 }
97
98 @Override
99 public TruthValue getValue() {
100 return TruthValue.toTruthValue(cursor.getValue());
101 }
102
103 @Override
104 public boolean isTerminated() {
105 return cursor.isTerminated();
106 }
107
108 @Override
109 public boolean move() {
110 return cursor.move();
111 }
112 }
113 }
114
115 private static class FourValuedInterpretation extends AbstractPartialInterpretation<TruthValue, Boolean> {
116 private final ResultSet<Boolean> mayResultSet;
117 private final ResultSet<Boolean> mustResultSet;
118
119 public FourValuedInterpretation(
120 ReasoningAdapter adapter, Concreteness concreteness, PartialSymbol<TruthValue, Boolean> partialSymbol,
121 ResultSet<Boolean> mayResultSet, ResultSet<Boolean> mustResultSet) {
122 super(adapter, concreteness, partialSymbol);
123 this.mayResultSet = mayResultSet;
124 this.mustResultSet = mustResultSet;
125 }
126
127 @Override
128 public TruthValue get(Tuple key) {
129 boolean isMay = mayResultSet.get(key);
130 boolean isMust = mustResultSet.get(key);
131 if (isMust) {
132 return isMay ? TruthValue.TRUE : TruthValue.ERROR;
133 } else {
134 return isMay ? TruthValue.UNKNOWN : TruthValue.FALSE;
135 }
136 }
137
138 @Override
139 public Cursor<Tuple, TruthValue> getAll() {
140 return new FourValuedCursor();
141 }
142
143 private final class FourValuedCursor implements Cursor<Tuple, TruthValue> {
144 private final Cursor<Tuple, Boolean> mayCursor;
145 private Cursor<Tuple, Boolean> mustCursor;
146
147 private FourValuedCursor() {
148 this.mayCursor = mayResultSet.getAll();
149 }
150
151 @Override
152 public Tuple getKey() {
153 return mustCursor == null ? mayCursor.getKey() : mustCursor.getKey();
154 }
155
156 @Override
157 public TruthValue getValue() {
158 if (mustCursor != null) {
159 return TruthValue.ERROR;
160 }
161 if (Boolean.TRUE.equals(mustResultSet.get(mayCursor.getKey()))) {
162 return TruthValue.TRUE;
163 }
164 return TruthValue.UNKNOWN;
165 }
166
167 @Override
168 public boolean isTerminated() {
169 return mustCursor != null && mustCursor.isTerminated();
170 }
171
172 @Override
173 public boolean move() {
174 if (mayCursor.isTerminated()) {
175 return moveMust();
176 }
177 if (mayCursor.move()) {
178 return true;
179 }
180 mustCursor = mustResultSet.getAll();
181 return moveMust();
182 }
183
184 private boolean moveMust() {
185 while (mustCursor.move()) {
186 // We already iterated over {@code TRUE} truth values with {@code mayCursor}.
187 if (!Boolean.TRUE.equals(mayResultSet.get(mustCursor.getKey()))) {
188 return true;
189 }
190 }
191 return false;
192 }
193 }
194 }
195}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java
new file mode 100644
index 00000000..78fdbb89
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/interpretation/QueryBasedRelationRewriter.java
@@ -0,0 +1,63 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.interpretation;
7
8import tools.refinery.store.query.dnf.RelationalQuery;
9import tools.refinery.store.query.literal.AbstractCallLiteral;
10import tools.refinery.store.query.literal.Literal;
11import tools.refinery.store.query.term.Variable;
12import tools.refinery.store.reasoning.literal.Concreteness;
13import tools.refinery.store.reasoning.literal.Modality;
14
15import java.util.List;
16import java.util.Set;
17
18public class QueryBasedRelationRewriter implements PartialRelationRewriter {
19 private final RelationalQuery may;
20 private final RelationalQuery must;
21 private final RelationalQuery candidateMay;
22 private final RelationalQuery candidateMust;
23
24 public QueryBasedRelationRewriter(RelationalQuery may, RelationalQuery must, RelationalQuery candidateMay,
25 RelationalQuery candidateMust) {
26 this.may = may;
27 this.must = must;
28 this.candidateMay = candidateMay;
29 this.candidateMust = candidateMust;
30 }
31
32 public RelationalQuery getMay() {
33 return may;
34 }
35
36 public RelationalQuery getMust() {
37 return must;
38 }
39
40 public RelationalQuery getCandidateMay() {
41 return candidateMay;
42 }
43
44 public RelationalQuery getCandidateMust() {
45 return candidateMust;
46 }
47
48 @Override
49 public List<Literal> rewriteLiteral(Set<Variable> positiveVariables, AbstractCallLiteral literal,
50 Modality modality, Concreteness concreteness) {
51 var query = switch (concreteness) {
52 case PARTIAL -> switch (modality) {
53 case MAY -> may;
54 case MUST -> must;
55 };
56 case CANDIDATE -> switch (modality) {
57 case MAY -> candidateMay;
58 case MUST -> candidateMust;
59 };
60 };
61 return List.of(literal.withTarget(query.getDnf()));
62 }
63}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java
new file mode 100644
index 00000000..17916c02
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ClauseLifter.java
@@ -0,0 +1,182 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.lifting;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.dnf.Dnf;
10import tools.refinery.store.query.dnf.DnfClause;
11import tools.refinery.store.query.literal.*;
12import tools.refinery.store.query.term.NodeVariable;
13import tools.refinery.store.query.term.ParameterDirection;
14import tools.refinery.store.query.term.Variable;
15import tools.refinery.store.reasoning.ReasoningAdapter;
16import tools.refinery.store.reasoning.literal.Concreteness;
17import tools.refinery.store.reasoning.literal.ModalConstraint;
18import tools.refinery.store.reasoning.literal.Modality;
19
20import java.util.*;
21import java.util.stream.Collectors;
22
23class ClauseLifter {
24 private final Modality modality;
25 private final Concreteness concreteness;
26 private final DnfClause clause;
27 private final Set<NodeVariable> quantifiedVariables;
28 private final Set<NodeVariable> existentialQuantifiersToAdd;
29
30 public ClauseLifter(Modality modality, Concreteness concreteness, Dnf dnf, DnfClause clause) {
31 this.modality = modality;
32 this.concreteness = concreteness;
33 this.clause = clause;
34 quantifiedVariables = getQuantifiedNodeVariables(dnf, clause);
35 existentialQuantifiersToAdd = new LinkedHashSet<>(quantifiedVariables);
36 }
37
38 private static Set<NodeVariable> getQuantifiedNodeVariables(Dnf dnf, DnfClause clause) {
39 var quantifiedVariables = clause.positiveVariables().stream()
40 .filter(Variable::isNodeVariable)
41 .map(Variable::asNodeVariable)
42 .collect(Collectors.toCollection(LinkedHashSet::new));
43 for (var symbolicParameter : dnf.getSymbolicParameters()) {
44 if (symbolicParameter.getVariable() instanceof NodeVariable nodeParameter) {
45 quantifiedVariables.remove(nodeParameter);
46 }
47 }
48 return Collections.unmodifiableSet(quantifiedVariables);
49 }
50
51 public List<Literal> liftClause() {
52 var liftedLiterals = new ArrayList<Literal>();
53 for (var literal : clause.literals()) {
54 var liftedLiteral = liftLiteral(literal);
55 liftedLiterals.add(liftedLiteral);
56 }
57 var existsConstraint = ModalConstraint.of(modality, concreteness, ReasoningAdapter.EXISTS_SYMBOL);
58 for (var quantifiedVariable : existentialQuantifiersToAdd) {
59 liftedLiterals.add(existsConstraint.call(quantifiedVariable));
60 }
61 return liftedLiterals;
62 }
63
64 private Literal liftLiteral(Literal literal) {
65 if (literal instanceof CallLiteral callLiteral) {
66 return liftCallLiteral(callLiteral);
67 } else if (literal instanceof EquivalenceLiteral equivalenceLiteral) {
68 return liftEquivalenceLiteral(equivalenceLiteral);
69 } else if (literal instanceof ConstantLiteral ||
70 literal instanceof AssignLiteral<?> ||
71 literal instanceof CheckLiteral) {
72 return literal;
73 } else if (literal instanceof AbstractCountLiteral<?>) {
74 throw new IllegalArgumentException("Count literal %s cannot be lifted".formatted(literal));
75 } else if (literal instanceof AggregationLiteral<?, ?>) {
76 throw new IllegalArgumentException("Aggregation literal %s cannot be lifted".formatted(literal));
77 } else if (literal instanceof RepresentativeElectionLiteral) {
78 throw new IllegalArgumentException("SCC literal %s cannot be lifted".formatted(literal));
79 } else {
80 throw new IllegalArgumentException("Unknown literal to lift: " + literal);
81 }
82 }
83
84 private Literal liftCallLiteral(CallLiteral callLiteral) {
85 var polarity = callLiteral.getPolarity();
86 return switch (polarity) {
87 case POSITIVE -> {
88 Constraint target = callLiteral.getTarget();
89 var arguments = callLiteral.getArguments();
90 yield ModalConstraint.of(modality, concreteness, target).call(CallPolarity.POSITIVE, arguments);
91 }
92 case NEGATIVE -> callNegationHelper(callLiteral);
93 case TRANSITIVE -> callTransitiveHelper(callLiteral);
94 };
95 }
96
97 private Literal callNegationHelper(CallLiteral callLiteral) {
98 var target = callLiteral.getTarget();
99 var originalArguments = callLiteral.getArguments();
100 var negatedModality = modality.negate();
101 var privateVariables = callLiteral.getPrivateVariables(clause.positiveVariables());
102 if (privateVariables.isEmpty()) {
103 // If there is no universal quantification, we may directly call the original Dnf.
104 return ModalConstraint.of(negatedModality, concreteness, target)
105 .call(CallPolarity.NEGATIVE, originalArguments);
106 }
107
108 var builder = Dnf.builder("%s#negation#%s#%s#%s"
109 .formatted(target.name(), modality, concreteness, privateVariables));
110 var uniqueOriginalArguments = List.copyOf(new LinkedHashSet<>(originalArguments));
111
112 var alwaysInputVariables = callLiteral.getInputVariables(Set.of());
113 for (var variable : uniqueOriginalArguments) {
114 var direction = alwaysInputVariables.contains(variable) ? ParameterDirection.IN : ParameterDirection.OUT;
115 builder.parameter(variable, direction);
116 }
117
118 var literals = new ArrayList<Literal>();
119 var liftedConstraint = ModalConstraint.of(negatedModality, concreteness, target);
120 literals.add(liftedConstraint.call(CallPolarity.POSITIVE, originalArguments));
121
122 var existsConstraint = ModalConstraint.of(negatedModality, concreteness, ReasoningAdapter.EXISTS_SYMBOL);
123 for (var variable : uniqueOriginalArguments) {
124 if (privateVariables.contains(variable)) {
125 literals.add(existsConstraint.call(variable));
126 }
127 }
128
129 builder.clause(literals);
130 var liftedTarget = builder.build();
131 return liftedTarget.call(CallPolarity.NEGATIVE, uniqueOriginalArguments);
132 }
133
134 private Literal callTransitiveHelper(CallLiteral callLiteral) {
135 var target = callLiteral.getTarget();
136 var originalArguments = callLiteral.getArguments();
137 var liftedTarget = ModalConstraint.of(modality, concreteness, target);
138
139 var existsConstraint = ModalConstraint.of(modality, concreteness, ReasoningAdapter.EXISTS_SYMBOL);
140 var existingEndHelperName = "%s#exisitingEnd#%s#%s".formatted(target.name(), modality, concreteness);
141 var existingEndHelper = Dnf.of(existingEndHelperName, builder -> {
142 var start = builder.parameter("start");
143 var end = builder.parameter("end");
144 builder.clause(
145 liftedTarget.call(start, end),
146 existsConstraint.call(end)
147 );
148 });
149
150 // The start and end of a transitive path is always a node.
151 var pathEnd = (NodeVariable) originalArguments.get(1);
152 if (quantifiedVariables.contains(pathEnd)) {
153 // The end of the path needs existential quantification anyway, so we don't need a second helper.
154 // We replace the call to EXISTS with the transitive path call.
155 existentialQuantifiersToAdd.remove(pathEnd);
156 return existingEndHelper.call(CallPolarity.TRANSITIVE, originalArguments);
157 }
158
159 var transitiveHelperName = "%s#transitive#%s#%s".formatted(target.name(), modality, concreteness);
160 var transitiveHelper = Dnf.of(transitiveHelperName, builder -> {
161 var start = builder.parameter("start");
162 var end = builder.parameter("end");
163 // Make sure the end of the path is not existentially quantified.
164 builder.clause(liftedTarget.call(start, end));
165 builder.clause(middle -> List.of(
166 existingEndHelper.callTransitive(start, middle),
167 liftedTarget.call(middle, end)
168 ));
169 });
170
171 return transitiveHelper.call(CallPolarity.POSITIVE, originalArguments);
172 }
173
174 private Literal liftEquivalenceLiteral(EquivalenceLiteral equivalenceLiteral) {
175 if (equivalenceLiteral.isPositive()) {
176 return ModalConstraint.of(modality, concreteness, ReasoningAdapter.EQUALS_SYMBOL)
177 .call(CallPolarity.POSITIVE, equivalenceLiteral.getLeft(), equivalenceLiteral.getRight());
178 }
179 return ModalConstraint.of(modality.negate(), concreteness, ReasoningAdapter.EQUALS_SYMBOL)
180 .call(CallPolarity.NEGATIVE, equivalenceLiteral.getLeft(), equivalenceLiteral.getRight());
181 }
182}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java
index ac41d170..889f595f 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/DnfLifter.java
@@ -5,124 +5,68 @@
5 */ 5 */
6package tools.refinery.store.reasoning.lifting; 6package tools.refinery.store.reasoning.lifting;
7 7
8import org.jetbrains.annotations.Nullable; 8import tools.refinery.store.query.dnf.*;
9import tools.refinery.store.query.dnf.Dnf; 9import tools.refinery.store.query.equality.DnfEqualityChecker;
10import tools.refinery.store.query.dnf.DnfBuilder;
11import tools.refinery.store.query.dnf.DnfClause;
12import tools.refinery.store.query.literal.CallLiteral;
13import tools.refinery.store.query.literal.CallPolarity;
14import tools.refinery.store.query.literal.Literal; 10import tools.refinery.store.query.literal.Literal;
15import tools.refinery.store.query.term.NodeVariable; 11import tools.refinery.store.reasoning.literal.Concreteness;
16import tools.refinery.store.query.term.Variable;
17import tools.refinery.store.reasoning.ReasoningAdapter;
18import tools.refinery.store.reasoning.literal.ModalConstraint;
19import tools.refinery.store.reasoning.literal.Modality; 12import tools.refinery.store.reasoning.literal.Modality;
20import tools.refinery.store.reasoning.literal.PartialLiterals;
21import tools.refinery.store.util.CycleDetectingMapper;
22 13
23import java.util.ArrayList; 14import java.util.HashMap;
24import java.util.LinkedHashSet;
25import java.util.List; 15import java.util.List;
16import java.util.Map;
26 17
27public class DnfLifter { 18public class DnfLifter {
28 private final CycleDetectingMapper<ModalDnf, Dnf> mapper = new CycleDetectingMapper<>(ModalDnf::toString, 19 private final Map<ModalDnf, Dnf> cache = new HashMap<>();
29 this::doLift);
30 20
31 public Dnf lift(Modality modality, Dnf query) { 21 public <T> Query<T> lift(Modality modality, Concreteness concreteness, Query<T> query) {
32 return mapper.map(new ModalDnf(modality, query)); 22 var liftedDnf = lift(modality, concreteness, query.getDnf());
23 return query.withDnf(liftedDnf);
24 }
25
26 public RelationalQuery lift(Modality modality, Concreteness concreteness, RelationalQuery query) {
27 var liftedDnf = lift(modality, concreteness, query.getDnf());
28 return query.withDnf(liftedDnf);
29 }
30
31 public <T> FunctionalQuery<T> lift(Modality modality, Concreteness concreteness, FunctionalQuery<T> query) {
32 var liftedDnf = lift(modality, concreteness, query.getDnf());
33 return query.withDnf(liftedDnf);
34 }
35
36 public Dnf lift(Modality modality, Concreteness concreteness, Dnf dnf) {
37 return cache.computeIfAbsent(new ModalDnf(modality, concreteness, dnf), this::doLift);
33 } 38 }
34 39
35 private Dnf doLift(ModalDnf modalDnf) { 40 private Dnf doLift(ModalDnf modalDnf) {
36 var modality = modalDnf.modality(); 41 var modality = modalDnf.modality();
42 var concreteness = modalDnf.concreteness();
37 var dnf = modalDnf.dnf(); 43 var dnf = modalDnf.dnf();
38 var builder = Dnf.builder(); 44 var builder = Dnf.builder(decorateName(dnf.name(), modality, concreteness));
39 builder.symbolicParameters(dnf.getSymbolicParameters()); 45 builder.symbolicParameters(dnf.getSymbolicParameters());
40 boolean changed = false; 46 builder.functionalDependencies(dnf.getFunctionalDependencies());
41 for (var clause : dnf.getClauses()) { 47 for (var clause : dnf.getClauses()) {
42 if (liftClause(modality, dnf, clause, builder)) { 48 builder.clause(liftClause(modality, concreteness, dnf, clause));
43 changed = true;
44 }
45 } 49 }
46 if (changed) { 50 var liftedDnf = builder.build();
47 return builder.build(); 51 if (dnf.equalsWithSubstitution(DnfEqualityChecker.DEFAULT, liftedDnf)) {
52 return dnf;
48 } 53 }
49 return dnf; 54 return liftedDnf;
50 } 55 }
51 56
52 private boolean liftClause(Modality modality, Dnf originalDnf, DnfClause clause, DnfBuilder builder) { 57 private List<Literal> liftClause(Modality modality, Concreteness concreteness, Dnf dnf, DnfClause clause) {
53 boolean changed = false; 58 var lifter = new ClauseLifter(modality, concreteness, dnf, clause);
54 var quantifiedVariables = getQuantifiedDataVariables(originalDnf, clause); 59 return lifter.liftClause();
55 var literals = clause.literals();
56 var liftedLiterals = new ArrayList<Literal>(literals.size());
57 for (var literal : literals) {
58 Literal liftedLiteral = liftLiteral(modality, literal);
59 if (liftedLiteral == null) {
60 liftedLiteral = literal;
61 } else {
62 changed = true;
63 }
64 liftedLiterals.add(liftedLiteral);
65 var variable = isExistsLiteralForVariable(modality, liftedLiteral);
66 if (variable != null) {
67 // If we already quantify over the existence of the variable with the expected modality,
68 // we don't need to insert quantification manually.
69 quantifiedVariables.remove(variable);
70 }
71 }
72 for (var quantifiedVariable : quantifiedVariables) {
73 // Quantify over data variables that are not already quantified with the expected modality.
74 liftedLiterals.add(new CallLiteral(CallPolarity.POSITIVE,
75 new ModalConstraint(modality, ReasoningAdapter.EXISTS), List.of(quantifiedVariable)));
76 }
77 builder.clause(liftedLiterals);
78 return changed || !quantifiedVariables.isEmpty();
79 }
80
81 private static LinkedHashSet<Variable> getQuantifiedDataVariables(Dnf originalDnf, DnfClause clause) {
82 var quantifiedVariables = new LinkedHashSet<>(clause.positiveVariables());
83 for (var symbolicParameter : originalDnf.getSymbolicParameters()) {
84 // The existence of parameters will be checked outside this DNF.
85 quantifiedVariables.remove(symbolicParameter.getVariable());
86 }
87 quantifiedVariables.removeIf(variable -> !(variable instanceof NodeVariable));
88 return quantifiedVariables;
89 } 60 }
90 61
91 @Nullable 62 private record ModalDnf(Modality modality, Concreteness concreteness, Dnf dnf) {
92 private Variable isExistsLiteralForVariable(Modality modality, Literal literal) { 63 @Override
93 if (literal instanceof CallLiteral callLiteral && 64 public String toString() {
94 callLiteral.getPolarity() == CallPolarity.POSITIVE && 65 return "%s %s %s".formatted(modality, concreteness, dnf.name());
95 callLiteral.getTarget() instanceof ModalConstraint modalConstraint &&
96 modalConstraint.modality() == modality &&
97 modalConstraint.constraint().equals(ReasoningAdapter.EXISTS)) {
98 return callLiteral.getArguments().get(0);
99 } 66 }
100 return null;
101 } 67 }
102 68
103 @Nullable 69 public static String decorateName(String name, Modality modality, Concreteness concreteness) {
104 private Literal liftLiteral(Modality modality, Literal literal) { 70 return "%s#%s#%s".formatted(name, modality, concreteness);
105 if (!(literal instanceof CallLiteral callLiteral)) {
106 return null;
107 }
108 var target = callLiteral.getTarget();
109 if (target instanceof ModalConstraint modalTarget) {
110 var actualTarget = modalTarget.constraint();
111 if (actualTarget instanceof Dnf dnf) {
112 var targetModality = modalTarget.modality();
113 var liftedTarget = lift(targetModality, dnf);
114 return new CallLiteral(callLiteral.getPolarity(), liftedTarget, callLiteral.getArguments());
115 }
116 // No more lifting to be done, pass any modal call to a partial symbol through.
117 return null;
118 } else if (target instanceof Dnf dnf) {
119 var polarity = callLiteral.getPolarity();
120 var liftedTarget = lift(modality.commute(polarity), dnf);
121 // Use == instead of equals(), because lift will return the same object by reference is there are no
122 // changes made during lifting.
123 return liftedTarget == target ? null : new CallLiteral(polarity, liftedTarget, callLiteral.getArguments());
124 } else {
125 return PartialLiterals.addModality(callLiteral, modality);
126 }
127 } 71 }
128} 72}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ModalDnf.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ModalDnf.java
deleted file mode 100644
index 16fb8fbf..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/lifting/ModalDnf.java
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.lifting;
7
8import tools.refinery.store.query.dnf.Dnf;
9import tools.refinery.store.reasoning.literal.Modality;
10
11record ModalDnf(Modality modality, Dnf dnf) {
12 @Override
13 public String toString() {
14 return "%s %s".formatted(modality, dnf.name());
15 }
16}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Concreteness.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Concreteness.java
new file mode 100644
index 00000000..43ac5904
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Concreteness.java
@@ -0,0 +1,18 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.literal;
7
8import java.util.Locale;
9
10public enum Concreteness {
11 PARTIAL,
12 CANDIDATE;
13
14 @Override
15 public String toString() {
16 return name().toLowerCase(Locale.ROOT);
17 }
18}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java
new file mode 100644
index 00000000..91dd2b72
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateLowerBoundLiteral.java
@@ -0,0 +1,49 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.literal;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.literal.AbstractCallLiteral;
10import tools.refinery.store.query.literal.AbstractCountLiteral;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.query.substitution.Substitution;
13import tools.refinery.store.query.term.DataVariable;
14import tools.refinery.store.query.term.Variable;
15
16import java.util.List;
17
18public class CountCandidateLowerBoundLiteral extends AbstractCountLiteral<Integer> {
19 public CountCandidateLowerBoundLiteral(DataVariable<Integer> resultVariable, Constraint target,
20 List<Variable> arguments) {
21 super(Integer.class, resultVariable, target, arguments);
22 }
23
24 @Override
25 protected Integer zero() {
26 return 0;
27 }
28
29 @Override
30 protected Integer one() {
31 return 1;
32 }
33
34 @Override
35 protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) {
36 return new CountCandidateLowerBoundLiteral(substitution.getTypeSafeSubstitute(getResultVariable()), getTarget(),
37 substitutedArguments);
38 }
39
40 @Override
41 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
42 return new CountCandidateLowerBoundLiteral(getResultVariable(), newTarget, newArguments);
43 }
44
45 @Override
46 protected String operatorName() {
47 return "@LowerBound(\"candidate\") count";
48 }
49}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java
new file mode 100644
index 00000000..94c9399d
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountCandidateUpperBoundLiteral.java
@@ -0,0 +1,49 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.literal;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.literal.AbstractCallLiteral;
10import tools.refinery.store.query.literal.AbstractCountLiteral;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.query.substitution.Substitution;
13import tools.refinery.store.query.term.DataVariable;
14import tools.refinery.store.query.term.Variable;
15
16import java.util.List;
17
18public class CountCandidateUpperBoundLiteral extends AbstractCountLiteral<Integer> {
19 public CountCandidateUpperBoundLiteral(DataVariable<Integer> resultVariable, Constraint target,
20 List<Variable> arguments) {
21 super(Integer.class, resultVariable, target, arguments);
22 }
23
24 @Override
25 protected Integer zero() {
26 return 0;
27 }
28
29 @Override
30 protected Integer one() {
31 return 1;
32 }
33
34 @Override
35 protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) {
36 return new CountCandidateUpperBoundLiteral(substitution.getTypeSafeSubstitute(getResultVariable()), getTarget(),
37 substitutedArguments);
38 }
39
40 @Override
41 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
42 return new CountCandidateUpperBoundLiteral(getResultVariable(), newTarget, newArguments);
43 }
44
45 @Override
46 protected String operatorName() {
47 return "@UpperBound(\"candidate\") count";
48 }
49}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java
new file mode 100644
index 00000000..b75b0cab
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountLowerBoundLiteral.java
@@ -0,0 +1,49 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.literal;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.literal.AbstractCallLiteral;
10import tools.refinery.store.query.literal.AbstractCountLiteral;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.query.substitution.Substitution;
13import tools.refinery.store.query.term.DataVariable;
14import tools.refinery.store.query.term.Variable;
15
16import java.util.List;
17
18public class CountLowerBoundLiteral extends AbstractCountLiteral<Integer> {
19 public CountLowerBoundLiteral(DataVariable<Integer> resultVariable, Constraint target,
20 List<Variable> arguments) {
21 super(Integer.class, resultVariable, target, arguments);
22 }
23
24 @Override
25 protected Integer zero() {
26 return 0;
27 }
28
29 @Override
30 protected Integer one() {
31 return 1;
32 }
33
34 @Override
35 protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) {
36 return new CountLowerBoundLiteral(substitution.getTypeSafeSubstitute(getResultVariable()), getTarget(),
37 substitutedArguments);
38 }
39
40 @Override
41 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
42 return new CountLowerBoundLiteral(getResultVariable(), newTarget, newArguments);
43 }
44
45 @Override
46 protected String operatorName() {
47 return "@LowerBound(\"partial\") count";
48 }
49}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java
new file mode 100644
index 00000000..03842143
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/CountUpperBoundLiteral.java
@@ -0,0 +1,51 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.literal;
7
8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.literal.AbstractCallLiteral;
10import tools.refinery.store.query.literal.AbstractCountLiteral;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.query.substitution.Substitution;
13import tools.refinery.store.query.term.DataVariable;
14import tools.refinery.store.query.term.Variable;
15import tools.refinery.store.representation.cardinality.UpperCardinalities;
16import tools.refinery.store.representation.cardinality.UpperCardinality;
17
18import java.util.List;
19
20public class CountUpperBoundLiteral extends AbstractCountLiteral<UpperCardinality> {
21 public CountUpperBoundLiteral(DataVariable<UpperCardinality> resultVariable, Constraint target,
22 List<Variable> arguments) {
23 super(UpperCardinality.class, resultVariable, target, arguments);
24 }
25
26 @Override
27 protected UpperCardinality zero() {
28 return UpperCardinalities.ZERO;
29 }
30
31 @Override
32 protected UpperCardinality one() {
33 return UpperCardinalities.UNBOUNDED;
34 }
35
36 @Override
37 protected Literal doSubstitute(Substitution substitution, List<Variable> substitutedArguments) {
38 return new CountUpperBoundLiteral(substitution.getTypeSafeSubstitute(getResultVariable()), getTarget(),
39 substitutedArguments);
40 }
41
42 @Override
43 public AbstractCallLiteral withArguments(Constraint newTarget, List<Variable> newArguments) {
44 return new CountUpperBoundLiteral(getResultVariable(), newTarget, newArguments);
45 }
46
47 @Override
48 protected String operatorName() {
49 return "@UpperBound(\"partial\") count";
50 }
51}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java
index 4e5a6099..2235a95d 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java
@@ -6,18 +6,29 @@
6package tools.refinery.store.reasoning.literal; 6package tools.refinery.store.reasoning.literal;
7 7
8import tools.refinery.store.query.Constraint; 8import tools.refinery.store.query.Constraint;
9import tools.refinery.store.query.InvalidQueryException;
9import tools.refinery.store.query.equality.LiteralEqualityHelper; 10import tools.refinery.store.query.equality.LiteralEqualityHelper;
10import tools.refinery.store.query.literal.Reduction; 11import tools.refinery.store.query.literal.Reduction;
11import tools.refinery.store.query.term.Parameter; 12import tools.refinery.store.query.term.Parameter;
13import tools.refinery.store.query.view.AnySymbolView;
12 14
13import java.util.List; 15import java.util.List;
14 16
15public record ModalConstraint(Modality modality, Constraint constraint) implements Constraint { 17public record ModalConstraint(Modality modality, Concreteness concreteness, Constraint constraint)
16 private static final String FORMAT = "%s %s"; 18 implements Constraint {
19 public ModalConstraint {
20 if (constraint instanceof AnySymbolView || constraint instanceof ModalConstraint) {
21 throw new InvalidQueryException("Already concrete constraints cannot be abstracted");
22 }
23 }
24
25 public ModalConstraint(Modality modality, Constraint constraint) {
26 this(modality, Concreteness.PARTIAL, constraint);
27 }
17 28
18 @Override 29 @Override
19 public String name() { 30 public String name() {
20 return FORMAT.formatted(modality, constraint.name()); 31 return formatName(constraint.name());
21 } 32 }
22 33
23 @Override 34 @Override
@@ -36,16 +47,33 @@ public record ModalConstraint(Modality modality, Constraint constraint) implemen
36 return false; 47 return false;
37 } 48 }
38 var otherModalConstraint = (ModalConstraint) other; 49 var otherModalConstraint = (ModalConstraint) other;
39 return modality == otherModalConstraint.modality && constraint.equals(helper, otherModalConstraint.constraint); 50 return modality == otherModalConstraint.modality &&
51 concreteness == otherModalConstraint.concreteness &&
52 constraint.equals(helper, otherModalConstraint.constraint);
40 } 53 }
41 54
42 @Override 55 @Override
43 public String toReferenceString() { 56 public String toReferenceString() {
44 return FORMAT.formatted(modality, constraint.toReferenceString()); 57 return formatName(constraint.toReferenceString());
45 } 58 }
46 59
47 @Override 60 @Override
48 public String toString() { 61 public String toString() {
49 return FORMAT.formatted(modality, constraint); 62 return formatName(constraint.toString());
63 }
64
65 private String formatName(String constraintName) {
66 if (concreteness == Concreteness.PARTIAL) {
67 return "%s %s".formatted(modality, constraintName);
68 }
69 return "%s %s %s".formatted(modality, concreteness, constraintName);
70 }
71
72 public static Constraint of(Modality modality, Concreteness concreteness, Constraint constraint) {
73 if (constraint instanceof AnySymbolView || constraint instanceof ModalConstraint) {
74 // Symbol views and lifted constraints are already concrete. Thus, they cannot be abstracted at all.
75 return constraint;
76 }
77 return new ModalConstraint(modality, concreteness, constraint);
50 } 78 }
51} 79}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java
index 96466d5c..c99a0399 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/Modality.java
@@ -11,14 +11,12 @@ import java.util.Locale;
11 11
12public enum Modality { 12public enum Modality {
13 MUST, 13 MUST,
14 MAY, 14 MAY;
15 CURRENT;
16 15
17 public Modality negate() { 16 public Modality negate() {
18 return switch(this) { 17 return switch(this) {
19 case MUST -> MAY; 18 case MUST -> MAY;
20 case MAY -> MUST; 19 case MAY -> MUST;
21 case CURRENT -> CURRENT;
22 }; 20 };
23 } 21 }
24 22
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java
index 0e46a795..2614c26e 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/PartialLiterals.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.reasoning.literal; 6package tools.refinery.store.reasoning.literal;
7 7
8import tools.refinery.store.query.InvalidQueryException;
8import tools.refinery.store.query.literal.CallLiteral; 9import tools.refinery.store.query.literal.CallLiteral;
9 10
10public final class PartialLiterals { 11public final class PartialLiterals {
@@ -13,24 +14,28 @@ public final class PartialLiterals {
13 } 14 }
14 15
15 public static CallLiteral may(CallLiteral literal) { 16 public static CallLiteral may(CallLiteral literal) {
16 return addModality(literal, Modality.MAY); 17 return addModality(literal, Modality.MAY, Concreteness.PARTIAL);
17 } 18 }
18 19
19 public static CallLiteral must(CallLiteral literal) { 20 public static CallLiteral must(CallLiteral literal) {
20 return addModality(literal, Modality.MUST); 21 return addModality(literal, Modality.MUST, Concreteness.PARTIAL);
21 } 22 }
22 23
23 public static CallLiteral current(CallLiteral literal) { 24 public static CallLiteral candidateMay(CallLiteral literal) {
24 return addModality(literal, Modality.CURRENT); 25 return addModality(literal, Modality.MAY, Concreteness.CANDIDATE);
25 } 26 }
26 27
27 public static CallLiteral addModality(CallLiteral literal, Modality modality) { 28 public static CallLiteral candidateMust(CallLiteral literal) {
29 return addModality(literal, Modality.MUST, Concreteness.CANDIDATE);
30 }
31
32 public static CallLiteral addModality(CallLiteral literal, Modality modality, Concreteness concreteness) {
28 var target = literal.getTarget(); 33 var target = literal.getTarget();
29 if (target instanceof ModalConstraint) { 34 if (target instanceof ModalConstraint) {
30 throw new IllegalArgumentException("Literal %s already has modality".formatted(literal)); 35 throw new InvalidQueryException("Literal %s already has modality".formatted(literal));
31 } 36 }
32 var polarity = literal.getPolarity(); 37 var polarity = literal.getPolarity();
33 var modalTarget = new ModalConstraint(modality.commute(polarity), target); 38 var modalTarget = new ModalConstraint(modality.commute(polarity), concreteness, target);
34 return new CallLiteral(polarity, modalTarget, literal.getArguments()); 39 return new CallLiteral(polarity, modalTarget, literal.getArguments());
35 } 40 }
36} 41}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java
new file mode 100644
index 00000000..a7fc5b7e
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AbstractPartialInterpretationRefiner.java
@@ -0,0 +1,29 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.representation.PartialSymbol;
10
11public abstract class AbstractPartialInterpretationRefiner<A, C> implements PartialInterpretationRefiner<A, C> {
12 private final ReasoningAdapter adapter;
13 private final PartialSymbol<A, C> partialSymbol;
14
15 protected AbstractPartialInterpretationRefiner(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol) {
16 this.adapter = adapter;
17 this.partialSymbol = partialSymbol;
18 }
19
20 @Override
21 public ReasoningAdapter getAdapter() {
22 return adapter;
23 }
24
25 @Override
26 public PartialSymbol<A, C> getPartialSymbol() {
27 return partialSymbol;
28 }
29}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AnyPartialInterpretationRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AnyPartialInterpretationRefiner.java
new file mode 100644
index 00000000..6c381511
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/AnyPartialInterpretationRefiner.java
@@ -0,0 +1,15 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
10
11public sealed interface AnyPartialInterpretationRefiner permits PartialInterpretationRefiner {
12 ReasoningAdapter getAdapter();
13
14 AnyPartialSymbol getPartialSymbol();
15}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java
new file mode 100644
index 00000000..ebb9b824
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/ConcreteSymbolRefiner.java
@@ -0,0 +1,38 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.reasoning.ReasoningAdapter;
10import tools.refinery.store.reasoning.representation.PartialSymbol;
11import tools.refinery.store.representation.Symbol;
12import tools.refinery.store.tuple.Tuple;
13
14import java.util.Objects;
15
16public class ConcreteSymbolRefiner<A, C> extends AbstractPartialInterpretationRefiner<A, C> {
17 private final Interpretation<A> interpretation;
18
19 public ConcreteSymbolRefiner(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol,
20 Symbol<A> concreteSymbol) {
21 super(adapter, partialSymbol);
22 interpretation = adapter.getModel().getInterpretation(concreteSymbol);
23 }
24
25 @Override
26 public boolean merge(Tuple key, A value) {
27 var currentValue = interpretation.get(key);
28 var mergedValue = getPartialSymbol().abstractDomain().commonRefinement(currentValue, value);
29 if (!Objects.equals(currentValue, mergedValue)) {
30 interpretation.put(key, mergedValue);
31 }
32 return true;
33 }
34
35 public static <A1, C1> Factory<A1, C1> of(Symbol<A1> concreteSymbol) {
36 return (adapter, partialSymbol) -> new ConcreteSymbolRefiner<>(adapter, partialSymbol, concreteSymbol);
37 }
38}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/DefaultStorageRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/DefaultStorageRefiner.java
new file mode 100644
index 00000000..d4ec2e8b
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/DefaultStorageRefiner.java
@@ -0,0 +1,79 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.representation.Symbol;
11import tools.refinery.store.tuple.Tuple;
12
13public class DefaultStorageRefiner<T> implements StorageRefiner {
14 private static final StorageRefiner.Factory<Object> FACTORY = DefaultStorageRefiner::new;
15
16 private final Interpretation<T> interpretation;
17
18 public DefaultStorageRefiner(Symbol<T> symbol, Model model) {
19 interpretation = model.getInterpretation(symbol);
20 }
21
22 @Override
23 public boolean split(int parentNode, int childNode) {
24 var symbol = interpretation.getSymbol();
25 int arity = symbol.arity();
26 for (int i = 0; i < arity; i++) {
27 int adjacentSize = interpretation.getAdjacentSize(i, parentNode);
28 if (adjacentSize == 0) {
29 continue;
30 }
31 var toSetKeys = new Tuple[adjacentSize];
32 // This is safe, because we won't pass the array to the outside.
33 @SuppressWarnings("unchecked")
34 var toSetValues = (T[]) new Object[adjacentSize];
35 var cursor = interpretation.getAdjacent(i, parentNode);
36 int j = 0;
37 while (cursor.move()) {
38 toSetKeys[j] = cursor.getKey().set(i, childNode);
39 toSetValues[j] = cursor.getValue();
40 j++;
41 }
42 for (j = 0; j < adjacentSize; j++) {
43 interpretation.put(toSetKeys[j], toSetValues[j]);
44 }
45 }
46 return true;
47 }
48
49 @Override
50 public boolean cleanup(int nodeToDelete) {
51 var symbol = interpretation.getSymbol();
52 int arity = symbol.arity();
53 var defaultValue = symbol.defaultValue();
54 for (int i = 0; i < arity; i++) {
55 int adjacentSize = interpretation.getAdjacentSize(i, nodeToDelete);
56 if (adjacentSize == 0) {
57 continue;
58 }
59 var toDelete = new Tuple[adjacentSize];
60 var cursor = interpretation.getAdjacent(i, nodeToDelete);
61 int j = 0;
62 while (cursor.move()) {
63 toDelete[j] = cursor.getKey();
64 j++;
65 }
66 for (j = 0; j < adjacentSize; j++) {
67 interpretation.put(toDelete[j], defaultValue);
68 }
69 }
70 return true;
71 }
72
73 public static <T> StorageRefiner.Factory<T> factory() {
74 // This is safe, because {@code FACTORY} doesn't depend on {@code T} at all.
75 @SuppressWarnings("unchecked")
76 var typedFactory = (StorageRefiner.Factory<T>) FACTORY;
77 return typedFactory;
78 }
79}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java
new file mode 100644
index 00000000..f48d1d1f
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialInterpretationRefiner.java
@@ -0,0 +1,22 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.representation.PartialSymbol;
10import tools.refinery.store.tuple.Tuple;
11
12public non-sealed interface PartialInterpretationRefiner<A, C> extends AnyPartialInterpretationRefiner {
13 @Override
14 PartialSymbol<A, C> getPartialSymbol();
15
16 boolean merge(Tuple key, A value);
17
18 @FunctionalInterface
19 interface Factory<A, C> {
20 PartialInterpretationRefiner<A, C> create(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol);
21 }
22}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialModelInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialModelInitializer.java
new file mode 100644
index 00000000..0c82695c
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/PartialModelInitializer.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.seed.ModelSeed;
10
11@FunctionalInterface
12public interface PartialModelInitializer {
13 void initialize(Model model, ModelSeed modelSeed);
14}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java
new file mode 100644
index 00000000..b6bccb01
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/RefinementBasedInitializer.java
@@ -0,0 +1,34 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.ReasoningAdapter;
10import tools.refinery.store.reasoning.representation.PartialSymbol;
11import tools.refinery.store.reasoning.seed.ModelSeed;
12
13public class RefinementBasedInitializer<A, C> implements PartialModelInitializer {
14 private final PartialSymbol<A, C> partialSymbol;
15
16 public RefinementBasedInitializer(PartialSymbol<A, C> partialSymbol) {
17 this.partialSymbol = partialSymbol;
18 }
19
20 @Override
21 public void initialize(Model model, ModelSeed modelSeed) {
22 var refiner = model.getAdapter(ReasoningAdapter.class).getRefiner(partialSymbol);
23 var defaultValue = partialSymbol.abstractDomain().unknown();
24 var cursor = modelSeed.getCursor(partialSymbol, defaultValue);
25 while (cursor.move()) {
26 var key = cursor.getKey();
27 var value = cursor.getValue();
28 if (!refiner.merge(key, value)) {
29 throw new IllegalArgumentException("Failed to merge value %s for key %s into %s"
30 .formatted(value, key, partialSymbol));
31 }
32 }
33 }
34}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/StorageRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/StorageRefiner.java
new file mode 100644
index 00000000..004696fd
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/refinement/StorageRefiner.java
@@ -0,0 +1,20 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.refinement;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.representation.Symbol;
10
11public interface StorageRefiner {
12 boolean split(int parentNode, int childNode);
13
14 boolean cleanup(int nodeToDelete);
15
16 @FunctionalInterface
17 interface Factory<T> {
18 StorageRefiner create(Symbol<T> symbol, Model model);
19 }
20}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java
index d58d026f..e59c8af8 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialFunction.java
@@ -15,11 +15,6 @@ public record PartialFunction<A, C>(String name, int arity, AbstractDomain<A, C>
15 } 15 }
16 16
17 @Override 17 @Override
18 public C defaultConcreteValue() {
19 return null;
20 }
21
22 @Override
23 public boolean equals(Object o) { 18 public boolean equals(Object o) {
24 return this == o; 19 return this == o;
25 } 20 }
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java
index 6b2f050b..4ccb7033 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialRelation.java
@@ -26,11 +26,6 @@ public record PartialRelation(String name, int arity) implements PartialSymbol<T
26 } 26 }
27 27
28 @Override 28 @Override
29 public Boolean defaultConcreteValue() {
30 return false;
31 }
32
33 @Override
34 public List<Parameter> getParameters() { 29 public List<Parameter> getParameters() {
35 var parameters = new Parameter[arity]; 30 var parameters = new Parameter[arity];
36 Arrays.fill(parameters, Parameter.NODE_OUT); 31 Arrays.fill(parameters, Parameter.NODE_OUT);
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java
index 3a08bdd8..38b2e466 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/representation/PartialSymbol.java
@@ -13,5 +13,11 @@ public sealed interface PartialSymbol<A, C> extends AnyPartialSymbol permits Par
13 13
14 A defaultValue(); 14 A defaultValue();
15 15
16 C defaultConcreteValue(); 16 static PartialRelation of(String name, int arity) {
17 return new PartialRelation(name, arity);
18 }
19
20 static <A, C> PartialFunction<A, C> of(String name, int arity, AbstractDomain<A, C> abstractDomain) {
21 return new PartialFunction<>(name, arity, abstractDomain);
22 }
17} 23}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/MapBasedSeed.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/MapBasedSeed.java
new file mode 100644
index 00000000..8b1c3bb3
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/MapBasedSeed.java
@@ -0,0 +1,111 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.seed;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.map.Cursors;
10import tools.refinery.store.tuple.Tuple;
11
12import java.util.Map;
13import java.util.Objects;
14
15record MapBasedSeed<T>(int arity, Class<T> valueType, T reducedValue, Map<Tuple, T> map) implements Seed<T> {
16 @Override
17 public T get(Tuple key) {
18 var value = map.get(key);
19 return value == null ? reducedValue : value;
20 }
21
22 @Override
23 public Cursor<Tuple, T> getCursor(T defaultValue, int nodeCount) {
24 if (Objects.equals(defaultValue, reducedValue)) {
25 return Cursors.of(map);
26 }
27 return new CartesianProductCursor<>(arity, nodeCount, reducedValue, defaultValue, map);
28 }
29
30 private static class CartesianProductCursor<T> implements Cursor<Tuple, T> {
31 private final int nodeCount;
32 private final T reducedValue;
33 private final T defaultValue;
34 private final Map<Tuple, T> map;
35 private final int[] counter;
36 private State state = State.INITIAL;
37 private Tuple key;
38 private T value;
39
40 private CartesianProductCursor(int arity, int nodeCount, T reducedValue, T defaultValue, Map<Tuple, T> map) {
41 this.nodeCount = nodeCount;
42 this.reducedValue = reducedValue;
43 this.defaultValue = defaultValue;
44 this.map = map;
45 counter = new int[arity];
46 }
47
48 @Override
49 public Tuple getKey() {
50 return key;
51 }
52
53 @Override
54 public T getValue() {
55 return value;
56 }
57
58 @Override
59 public boolean isTerminated() {
60 return state == State.TERMINATED;
61 }
62
63 @Override
64 public boolean move() {
65 return switch (state) {
66 case INITIAL -> {
67 state = State.STARTED;
68 yield checkValue() || moveToNext();
69 }
70 case STARTED -> moveToNext();
71 case TERMINATED -> false;
72 };
73 }
74
75 private boolean moveToNext() {
76 do {
77 increment();
78 } while (state != State.TERMINATED && !checkValue());
79 return state != State.TERMINATED;
80 }
81
82 private void increment() {
83 int i = counter.length - 1;
84 while (i >= 0) {
85 counter[i]++;
86 if (counter[i] < nodeCount) {
87 return;
88 }
89 counter[i] = 0;
90 i--;
91 }
92 state = State.TERMINATED;
93 }
94
95 private boolean checkValue() {
96 key = Tuple.of(counter);
97 var valueInMap = map.get(key);
98 if (Objects.equals(valueInMap, defaultValue)) {
99 return false;
100 }
101 value = valueInMap == null ? reducedValue : valueInMap;
102 return true;
103 }
104
105 private enum State {
106 INITIAL,
107 STARTED,
108 TERMINATED
109 }
110 }
111}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java
new file mode 100644
index 00000000..e6b3eaf9
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/ModelSeed.java
@@ -0,0 +1,95 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.seed;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
10import tools.refinery.store.reasoning.representation.PartialSymbol;
11import tools.refinery.store.tuple.Tuple;
12
13import java.util.Collections;
14import java.util.LinkedHashMap;
15import java.util.Map;
16import java.util.Set;
17import java.util.function.Consumer;
18
19public class ModelSeed {
20 private final int nodeCount;
21 private final Map<AnyPartialSymbol, Seed<?>> seeds;
22
23 private ModelSeed(int nodeCount, Map<AnyPartialSymbol, Seed<?>> seeds) {
24 this.nodeCount = nodeCount;
25 this.seeds = seeds;
26 }
27
28 public int getNodeCount() {
29 return nodeCount;
30 }
31
32 public <A> Seed<A> getSeed(PartialSymbol<A, ?> partialSymbol) {
33 var seed = seeds.get(partialSymbol);
34 if (seed == null) {
35 throw new IllegalArgumentException("No seed for partial symbol " + partialSymbol);
36 }
37 // The builder makes sure only well-typed seeds can be added.
38 @SuppressWarnings("unchecked")
39 var typedSeed = (Seed<A>) seed;
40 return typedSeed;
41 }
42
43 public boolean containsSeed(AnyPartialSymbol symbol) {
44 return seeds.containsKey(symbol);
45 }
46
47 public Set<AnyPartialSymbol> getSeededSymbols() {
48 return Collections.unmodifiableSet(seeds.keySet());
49 }
50
51 public <A> Cursor<Tuple, A> getCursor(PartialSymbol<A, ?> partialSymbol, A defaultValue) {
52 return getSeed(partialSymbol).getCursor(defaultValue, nodeCount);
53 }
54
55 public static Builder builder(int nodeCount) {
56 return new Builder(nodeCount);
57 }
58
59 public static class Builder {
60 private final int nodeCount;
61 private final Map<AnyPartialSymbol, Seed<?>> seeds = new LinkedHashMap<>();
62
63 private Builder(int nodeCount) {
64 if (nodeCount < 0) {
65 throw new IllegalArgumentException("Node count must not be negative");
66 }
67 this.nodeCount = nodeCount;
68 }
69
70 public <A> Builder seed(PartialSymbol<A, ?> partialSymbol, Seed<A> seed) {
71 if (seed.arity() != partialSymbol.arity()) {
72 throw new IllegalStateException("Expected seed of arity %d for partial symbol %s, but got %d instead"
73 .formatted(partialSymbol.arity(), partialSymbol, seed.arity()));
74 }
75 if (!seed.valueType().equals(partialSymbol.abstractDomain().abstractType())) {
76 throw new IllegalStateException("Expected seed of type %s for partial symbol %s, but got %s instead"
77 .formatted(partialSymbol.abstractDomain().abstractType(), partialSymbol, seed.valueType()));
78 }
79 if (seeds.put(partialSymbol, seed) != null) {
80 throw new IllegalArgumentException("Duplicate seed for partial symbol " + partialSymbol);
81 }
82 return this;
83 }
84
85 public <A> Builder seed(PartialSymbol<A, ?> partialSymbol, Consumer<Seed.Builder<A>> callback) {
86 var builder = Seed.builder(partialSymbol);
87 callback.accept(builder);
88 return seed(partialSymbol, builder.build());
89 }
90
91 public ModelSeed build() {
92 return new ModelSeed(nodeCount, Collections.unmodifiableMap(seeds));
93 }
94 }
95}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java
index 08079f12..732efbcc 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java
@@ -6,14 +6,73 @@
6package tools.refinery.store.reasoning.seed; 6package tools.refinery.store.reasoning.seed;
7 7
8import tools.refinery.store.map.Cursor; 8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.reasoning.representation.PartialSymbol;
10import tools.refinery.store.representation.Symbol;
9import tools.refinery.store.tuple.Tuple; 11import tools.refinery.store.tuple.Tuple;
10 12
13import java.util.Collections;
14import java.util.LinkedHashMap;
15import java.util.Map;
16
11public interface Seed<T> { 17public interface Seed<T> {
12 int arity(); 18 int arity();
13 19
20 Class<T> valueType();
21
14 T reducedValue(); 22 T reducedValue();
15 23
16 T get(Tuple key); 24 T get(Tuple key);
17 25
18 Cursor<Tuple, T> getCursor(T defaultValue, int nodeCount); 26 Cursor<Tuple, T> getCursor(T defaultValue, int nodeCount);
27
28 static <T> Builder<T> builder(int arity, Class<T> valueType, T reducedValue) {
29 return new Builder<>(arity, valueType, reducedValue);
30 }
31
32 static <T> Builder<T> builder(Symbol<T> symbol) {
33 return builder(symbol.arity(), symbol.valueType(), symbol.defaultValue());
34 }
35
36 static <T> Builder<T> builder(PartialSymbol<T, ?> partialSymbol) {
37 return builder(partialSymbol.arity(), partialSymbol.abstractDomain().abstractType(),
38 partialSymbol.defaultValue());
39 }
40
41 @SuppressWarnings("UnusedReturnValue")
42 class Builder<T> {
43 private final int arity;
44 private final Class<T> valueType;
45 private T reducedValue;
46 private final Map<Tuple, T> map = new LinkedHashMap<>();
47
48 private Builder(int arity, Class<T> valueType, T reducedValue) {
49 this.arity = arity;
50 this.valueType = valueType;
51 this.reducedValue = reducedValue;
52 }
53
54 public Builder<T> reducedValue(T reducedValue) {
55 this.reducedValue = reducedValue;
56 return this;
57 }
58
59 public Builder<T> put(Tuple key, T value) {
60 if (key.getSize() != arity) {
61 throw new IllegalArgumentException("Expected %s to have %d elements".formatted(key, arity));
62 }
63 map.put(key, value);
64 return this;
65 }
66
67 public Builder<T> putAll(Map<Tuple, T> map) {
68 for (var entry : map.entrySet()) {
69 put(entry.getKey(), entry.getValue());
70 }
71 return this;
72 }
73
74 public Seed<T> build() {
75 return new MapBasedSeed<>(arity, valueType, reducedValue, Collections.unmodifiableMap(map));
76 }
77 }
19} 78}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java
new file mode 100644
index 00000000..9af457d8
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/SeedInitializer.java
@@ -0,0 +1,28 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.seed;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
10import tools.refinery.store.reasoning.representation.PartialSymbol;
11import tools.refinery.store.representation.Symbol;
12
13public class SeedInitializer<T> implements PartialModelInitializer {
14 private final Symbol<T> symbol;
15 private final PartialSymbol<T, ?> partialSymbol;
16
17 public SeedInitializer(Symbol<T> symbol, PartialSymbol<T, ?> partialSymbol) {
18 this.symbol = symbol;
19 this.partialSymbol = partialSymbol;
20 }
21
22 @Override
23 public void initialize(Model model, ModelSeed modelSeed) {
24 var interpretation = model.getInterpretation(symbol);
25 var cursor = modelSeed.getCursor(partialSymbol, symbol.defaultValue());
26 interpretation.putAll(cursor);
27 }
28}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/UniformSeed.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/UniformSeed.java
deleted file mode 100644
index 451d1513..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/UniformSeed.java
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.seed;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.tuple.Tuple;
10
11public record UniformSeed<T>(int arity, T reducedValue) implements Seed<T> {
12 public UniformSeed {
13 if (arity < 0) {
14 throw new IllegalArgumentException("Arity must not be negative");
15 }
16 }
17
18 @Override
19 public T get(Tuple key) {
20 return reducedValue;
21 }
22
23 @Override
24 public Cursor<Tuple, T> getCursor(T defaultValue, int nodeCount) {
25 return null;
26 }
27}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/Advice.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/Advice.java
deleted file mode 100644
index d6a9e02c..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/Advice.java
+++ /dev/null
@@ -1,159 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import tools.refinery.store.query.substitution.Substitution;
9import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
10import tools.refinery.store.reasoning.representation.PartialRelation;
11import tools.refinery.store.query.term.Variable;
12import tools.refinery.store.query.literal.Literal;
13
14import java.util.*;
15
16public final class Advice {
17 private final AnyPartialSymbol source;
18 private final PartialRelation target;
19 private final AdviceSlot slot;
20 private final boolean mandatory;
21 private final List<Variable> parameters;
22 private final List<Literal> literals;
23 private boolean processed;
24
25 public Advice(AnyPartialSymbol source, PartialRelation target, AdviceSlot slot, boolean mandatory, List<Variable> parameters, List<Literal> literals) {
26 if (mandatory && !slot.isMonotonic()) {
27 throw new IllegalArgumentException("Only monotonic advice can be mandatory");
28 }
29 this.source = source;
30 this.target = target;
31 this.slot = slot;
32 this.mandatory = mandatory;
33 checkArity(parameters);
34 this.parameters = parameters;
35 this.literals = literals;
36 }
37
38 public AnyPartialSymbol source() {
39 return source;
40 }
41
42 public PartialRelation target() {
43 return target;
44 }
45
46 public AdviceSlot slot() {
47 return slot;
48 }
49
50 public boolean mandatory() {
51 return mandatory;
52 }
53
54 public List<Variable> parameters() {
55 return parameters;
56 }
57
58 public List<Literal> literals() {
59 return literals;
60 }
61
62 public boolean processed() {
63 return processed;
64 }
65
66 public List<Literal> substitute(List<Variable> substituteParameters) {
67 checkArity(substituteParameters);
68 markProcessed();
69 // Use a renewing substitution to remove any non-parameter variables and avoid clashed between variables
70 // coming from different advice in the same clause.
71 var substitution = Substitution.builder().putManyChecked(parameters, substituteParameters).renewing().build();
72 return literals.stream().map(literal -> literal.substitute(substitution)).toList();
73 }
74
75 private void markProcessed() {
76 processed = true;
77 }
78
79 public void checkProcessed() {
80 if (mandatory && !processed) {
81 throw new IllegalStateException("Mandatory advice %s was not processed".formatted(this));
82 }
83 }
84
85 private void checkArity(List<Variable> toCheck) {
86 if (toCheck.size() != target.arity()) {
87 throw new IllegalArgumentException("%s needs %d parameters, but got %s".formatted(target.name(),
88 target.arity(), parameters.size()));
89 }
90 }
91
92 public static Builder builderFor(AnyPartialSymbol source, PartialRelation target, AdviceSlot slot) {
93 return new Builder(source, target, slot);
94 }
95
96
97 @Override
98 public String toString() {
99 return "Advice[source=%s, target=%s, slot=%s, mandatory=%s, parameters=%s, literals=%s]".formatted(source,
100 target, slot, mandatory, parameters, literals);
101 }
102
103 public static class Builder {
104 private final AnyPartialSymbol source;
105 private final PartialRelation target;
106 private final AdviceSlot slot;
107 private boolean mandatory;
108 private final List<Variable> parameters = new ArrayList<>();
109 private final List<Literal> literals = new ArrayList<>();
110
111 private Builder(AnyPartialSymbol source, PartialRelation target, AdviceSlot slot) {
112 this.source = source;
113 this.target = target;
114 this.slot = slot;
115 }
116
117 public Builder mandatory(boolean mandatory) {
118 this.mandatory = mandatory;
119 return this;
120 }
121
122 public Builder mandatory() {
123 return mandatory(false);
124 }
125
126 public Builder parameters(List<Variable> variables) {
127 parameters.addAll(variables);
128 return this;
129 }
130
131 public Builder parameters(Variable... variables) {
132 return parameters(List.of(variables));
133 }
134
135 public Builder parameter(Variable variable) {
136 parameters.add(variable);
137 return this;
138 }
139
140 public Builder literals(Collection<Literal> literals) {
141 this.literals.addAll(literals);
142 return this;
143 }
144
145 public Builder literals(Literal... literals) {
146 return literals(List.of(literals));
147 }
148
149 public Builder literal(Literal literal) {
150 literals.add(literal);
151 return this;
152 }
153
154 public Advice build() {
155 return new Advice(source, target, slot, mandatory, Collections.unmodifiableList(parameters),
156 Collections.unmodifiableList(literals));
157 }
158 }
159}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AdviceSlot.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AdviceSlot.java
deleted file mode 100644
index bab20340..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AdviceSlot.java
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import tools.refinery.store.representation.TruthValue;
9
10public enum AdviceSlot {
11 EXTEND_MUST(true),
12
13 RESTRICT_MAY(true),
14
15 /**
16 * Same as {@link #RESTRICT_MAY}, but only active if the value of the relation is not {@link TruthValue#TRUE} or
17 * {@link TruthValue#ERROR}.
18 */
19 RESTRICT_NEW(false);
20
21 private final boolean monotonic;
22
23 AdviceSlot(boolean monotonic) {
24 this.monotonic = monotonic;
25 }
26
27 public boolean isMonotonic() {
28 return monotonic;
29 }
30}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AnyPartialSymbolTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AnyPartialSymbolTranslator.java
new file mode 100644
index 00000000..48c84348
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/AnyPartialSymbolTranslator.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import tools.refinery.store.model.ModelStoreBuilder;
9import tools.refinery.store.model.ModelStoreConfiguration;
10import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
11
12public sealed interface AnyPartialSymbolTranslator extends ModelStoreConfiguration permits PartialSymbolTranslator {
13 AnyPartialSymbol getPartialSymbol();
14
15 void configure(ModelStoreBuilder storeBuilder);
16}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java
new file mode 100644
index 00000000..c2039afc
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialRelationTranslator.java
@@ -0,0 +1,390 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import tools.refinery.store.dse.transition.Rule;
9import tools.refinery.store.dse.transition.objectives.Criteria;
10import tools.refinery.store.dse.transition.objectives.Criterion;
11import tools.refinery.store.dse.transition.objectives.Objective;
12import tools.refinery.store.dse.transition.objectives.Objectives;
13import tools.refinery.store.model.ModelStoreBuilder;
14import tools.refinery.store.query.Constraint;
15import tools.refinery.store.query.dnf.Query;
16import tools.refinery.store.query.dnf.QueryBuilder;
17import tools.refinery.store.query.dnf.RelationalQuery;
18import tools.refinery.store.query.literal.Literal;
19import tools.refinery.store.query.term.NodeVariable;
20import tools.refinery.store.query.view.MayView;
21import tools.refinery.store.query.view.MustView;
22import tools.refinery.store.reasoning.ReasoningAdapter;
23import tools.refinery.store.reasoning.ReasoningBuilder;
24import tools.refinery.store.reasoning.interpretation.PartialInterpretation;
25import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter;
26import tools.refinery.store.reasoning.interpretation.QueryBasedRelationInterpretationFactory;
27import tools.refinery.store.reasoning.interpretation.QueryBasedRelationRewriter;
28import tools.refinery.store.reasoning.lifting.DnfLifter;
29import tools.refinery.store.reasoning.literal.Concreteness;
30import tools.refinery.store.reasoning.literal.Modality;
31import tools.refinery.store.reasoning.literal.PartialLiterals;
32import tools.refinery.store.reasoning.refinement.ConcreteSymbolRefiner;
33import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
34import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
35import tools.refinery.store.reasoning.refinement.StorageRefiner;
36import tools.refinery.store.reasoning.representation.PartialRelation;
37import tools.refinery.store.representation.AnySymbol;
38import tools.refinery.store.representation.Symbol;
39import tools.refinery.store.representation.TruthValue;
40
41import java.util.ArrayList;
42import java.util.function.BiConsumer;
43
44import static tools.refinery.store.query.literal.Literals.not;
45
46@SuppressWarnings("UnusedReturnValue")
47public final class PartialRelationTranslator extends PartialSymbolTranslator<TruthValue, Boolean> {
48 private final PartialRelation partialRelation;
49 private PartialRelationRewriter rewriter;
50 private RelationalQuery query;
51 private RelationalQuery may;
52 private RelationalQuery must;
53 private RelationalQuery candidateMay;
54 private RelationalQuery candidateMust;
55 private RoundingMode roundingMode;
56
57 private PartialRelationTranslator(PartialRelation partialRelation) {
58 super(partialRelation);
59 this.partialRelation = partialRelation;
60 }
61
62 public PartialRelation getPartialRelation() {
63 return partialRelation;
64 }
65
66 @Override
67 public PartialRelationTranslator symbol(AnySymbol storageSymbol) {
68 super.symbol(storageSymbol);
69 return this;
70 }
71
72 @Override
73 public <T> PartialRelationTranslator symbol(Symbol<T> storageSymbol,
74 StorageRefiner.Factory<T> storageRefiner) {
75 super.symbol(storageSymbol, storageRefiner);
76 return this;
77 }
78
79 @Override
80 public PartialRelationTranslator interpretation(
81 PartialInterpretation.Factory<TruthValue, Boolean> interpretationFactory) {
82 super.interpretation(interpretationFactory);
83 return this;
84 }
85
86 @Override
87 public PartialRelationTranslator refiner(
88 PartialInterpretationRefiner.Factory<TruthValue, Boolean> interpretationRefiner) {
89 super.refiner(interpretationRefiner);
90 return this;
91 }
92
93 public PartialRelationTranslator rewriter(PartialRelationRewriter rewriter) {
94 checkNotConfigured();
95 if (this.rewriter != null) {
96 throw new IllegalArgumentException("Rewriter was already set");
97 }
98 this.rewriter = rewriter;
99 return this;
100 }
101
102 @Override
103 public PartialRelationTranslator initializer(PartialModelInitializer initializer) {
104 super.initializer(initializer);
105 return this;
106 }
107
108 @Override
109 public PartialRelationTranslator decision(Rule decisionRule) {
110 super.decision(decisionRule);
111 return this;
112 }
113
114 @Override
115 public PartialRelationTranslator accept(Criterion acceptanceCriterion) {
116 super.accept(acceptanceCriterion);
117 return this;
118 }
119
120 @Override
121 public PartialRelationTranslator exclude(Criterion exclusionCriterion) {
122 super.exclude(exclusionCriterion);
123 return this;
124 }
125
126 @Override
127 public PartialRelationTranslator objective(Objective objective) {
128 super.objective(objective);
129 return this;
130 }
131
132 public PartialRelationTranslator query(RelationalQuery query) {
133 checkNotConfigured();
134 if (this.query != null) {
135 throw new IllegalArgumentException("Query was already set");
136 }
137 this.query = query;
138 return this;
139 }
140
141 public PartialRelationTranslator may(RelationalQuery may) {
142 checkNotConfigured();
143 if (this.may != null) {
144 throw new IllegalArgumentException("May query was already set");
145 }
146 this.may = may;
147 return this;
148 }
149
150 public PartialRelationTranslator mayNever() {
151 var never = createQuery(partialRelation.name() + "#never", (builder, parameters) -> {});
152 may(never);
153 return this;
154 }
155
156 public PartialRelationTranslator must(RelationalQuery must) {
157 checkNotConfigured();
158 if (this.must != null) {
159 throw new IllegalArgumentException("Must query was already set");
160 }
161 this.must = must;
162 return this;
163 }
164
165 public PartialRelationTranslator candidate(RelationalQuery candidate) {
166 candidateMay(candidate);
167 candidateMust(candidate);
168 return this;
169 }
170
171 public PartialRelationTranslator candidateMay(RelationalQuery candidateMay) {
172 checkNotConfigured();
173 if (this.candidateMay != null) {
174 throw new IllegalArgumentException("Candidate may query was already set");
175 }
176 this.candidateMay = candidateMay;
177 return this;
178 }
179
180 public PartialRelationTranslator candidateMust(RelationalQuery candidateMust) {
181 checkNotConfigured();
182 if (this.candidateMust != null) {
183 throw new IllegalArgumentException("Candidate must query was already set");
184 }
185 this.candidateMust = candidateMust;
186 return this;
187 }
188
189 public PartialRelationTranslator roundingMode(RoundingMode roundingMode) {
190 checkNotConfigured();
191 if (this.roundingMode != null) {
192 throw new IllegalArgumentException("Rounding mode was already set");
193 }
194 this.roundingMode = roundingMode;
195 return this;
196 }
197
198 @Override
199 protected void doConfigure(ModelStoreBuilder storeBuilder) {
200 setFallbackRoundingMode();
201 createFallbackQueryFromRewriter();
202 liftQueries(storeBuilder);
203 createFallbackQueriesFromSymbol();
204 setFallbackCandidateQueries();
205 createFallbackRewriter();
206 createFallbackInterpretation();
207 createFallbackRefiner();
208 createFallbackExclude();
209 createFallbackObjective();
210 super.doConfigure(storeBuilder);
211 }
212
213 private void setFallbackRoundingMode() {
214 if (roundingMode == null) {
215 roundingMode = query == null && storageSymbol != null ? RoundingMode.PREFER_FALSE : RoundingMode.NONE;
216 }
217 }
218
219 private RelationalQuery createQuery(String name, BiConsumer<QueryBuilder, NodeVariable[]> callback) {
220 int arity = partialRelation.arity();
221 var queryBuilder = Query.builder(name);
222 var parameters = new NodeVariable[arity];
223 for (int i = 0; i < arity; i++) {
224 parameters[i] = queryBuilder.parameter("p" + 1);
225 }
226 callback.accept(queryBuilder, parameters);
227 return queryBuilder.build();
228 }
229
230 private RelationalQuery createQuery(String name, Constraint constraint) {
231 return createQuery(name, (builder, parameters) -> builder.clause(constraint.call(parameters)));
232 }
233
234 private void createFallbackQueryFromRewriter() {
235 if (rewriter != null && query == null) {
236 query = createQuery(partialRelation.name(), partialRelation);
237 }
238 }
239
240 private void createFallbackQueriesFromSymbol() {
241 if (storageSymbol == null || storageSymbol.valueType() != TruthValue.class) {
242 return;
243 }
244 // We checked in the guard clause that this is safe.
245 @SuppressWarnings("unchecked")
246 var typedStorageSymbol = (Symbol<TruthValue>) storageSymbol;
247 var defaultValue = typedStorageSymbol.defaultValue();
248 if (may == null && !defaultValue.may()) {
249 may = createQuery(DnfLifter.decorateName(partialRelation.name(), Modality.MAY, Concreteness.PARTIAL),
250 new MayView(typedStorageSymbol));
251 }
252 if (must == null && !defaultValue.must()) {
253 must = createQuery(DnfLifter.decorateName(partialRelation.name(), Modality.MUST, Concreteness.PARTIAL),
254 new MustView(typedStorageSymbol));
255 }
256 }
257
258 private void liftQueries(ModelStoreBuilder storeBuilder) {
259 if (rewriter instanceof QueryBasedRelationRewriter queryBasedRelationRewriter) {
260 liftQueriesFromQueryBasedRewriter(queryBasedRelationRewriter);
261 } else if (query != null) {
262 liftQueriesFromFourValuedQuery(storeBuilder);
263 }
264 }
265
266 private void liftQueriesFromQueryBasedRewriter(QueryBasedRelationRewriter queryBasedRelationRewriter) {
267 if (may == null) {
268 may = queryBasedRelationRewriter.getMay();
269 }
270 if (must == null) {
271 must = queryBasedRelationRewriter.getMust();
272 }
273 if (candidateMay == null) {
274 candidateMay = queryBasedRelationRewriter.getCandidateMay();
275 }
276 if (candidateMust == null) {
277 candidateMust = queryBasedRelationRewriter.getCandidateMust();
278 }
279 }
280
281 private void liftQueriesFromFourValuedQuery(ModelStoreBuilder storeBuilder) {
282 var reasoningBuilder = storeBuilder.getAdapter(ReasoningBuilder.class);
283 if (may == null) {
284 may = reasoningBuilder.lift(Modality.MAY, Concreteness.PARTIAL, query);
285 }
286 if (must == null) {
287 must = reasoningBuilder.lift(Modality.MUST, Concreteness.PARTIAL, query);
288 }
289 if (candidateMay == null) {
290 candidateMay = reasoningBuilder.lift(Modality.MAY, Concreteness.CANDIDATE, query);
291 }
292 if (candidateMust == null) {
293 candidateMust = reasoningBuilder.lift(Modality.MAY, Concreteness.CANDIDATE, query);
294 }
295 }
296
297 private void setFallbackCandidateQueries() {
298 if (candidateMay == null) {
299 candidateMay = switch (roundingMode) {
300 case NONE, PREFER_TRUE -> may;
301 case PREFER_FALSE -> must;
302 };
303 }
304 if (candidateMust == null) {
305 candidateMust = switch (roundingMode) {
306 case NONE, PREFER_FALSE -> must;
307 case PREFER_TRUE -> may;
308 };
309 }
310 }
311
312 private void createFallbackRewriter() {
313 if (rewriter == null) {
314 rewriter = new QueryBasedRelationRewriter(may, must, candidateMay, candidateMust);
315 }
316 }
317
318 private void createFallbackInterpretation() {
319 if (interpretationFactory == null) {
320 interpretationFactory = new QueryBasedRelationInterpretationFactory(may, must, candidateMay, candidateMust);
321 }
322 }
323
324 private void createFallbackRefiner() {
325 if (interpretationRefiner == null && storageSymbol != null && storageSymbol.valueType() == TruthValue.class) {
326 // We checked in the condition that this is safe.
327 @SuppressWarnings("unchecked")
328 var typedStorageSymbol = (Symbol<TruthValue>) storageSymbol;
329 interpretationRefiner = ConcreteSymbolRefiner.of(typedStorageSymbol);
330 }
331 }
332
333 private void createFallbackExclude() {
334 if (excludeWasSet) {
335 return;
336 }
337 var excludeQuery = createQuery("exclude", (builder, parameters) -> {
338 var literals = new ArrayList<Literal>(parameters.length + 2);
339 literals.add(PartialLiterals.must(partialRelation.call(parameters)));
340 literals.add(not(PartialLiterals.may(partialRelation.call(parameters))));
341 for (var parameter : parameters) {
342 literals.add(PartialLiterals.must(ReasoningAdapter.EXISTS_SYMBOL.call(parameter)));
343 }
344 builder.clause(literals);
345 });
346 exclude = Criteria.whenHasMatch(excludeQuery);
347 }
348
349 private void createFallbackObjective() {
350 if (acceptWasSet && objectiveWasSet) {
351 return;
352 }
353 var invalidCandidate = createQuery("invalidCandidate", (builder, parameters) -> builder
354 .clause(
355 PartialLiterals.candidateMust(partialRelation.call(parameters)),
356 not(PartialLiterals.candidateMay(partialRelation.call(parameters)))
357 )
358 .clause(
359 PartialLiterals.candidateMust(partialRelation.call(parameters)),
360 not(PartialLiterals.may(partialRelation.call(parameters)))
361 )
362 .clause(
363 PartialLiterals.must(partialRelation.call(parameters)),
364 not(PartialLiterals.candidateMay(partialRelation.call(parameters)))
365 ));
366 var reject = createQuery("reject", (builder, parameters) -> {
367 var literals = new ArrayList<Literal>(parameters.length + 1);
368 literals.add(invalidCandidate.call(parameters));
369 for (var parameter : parameters) {
370 literals.add(PartialLiterals.candidateMust(ReasoningAdapter.EXISTS_SYMBOL.call(parameter)));
371 }
372 builder.clause(literals);
373 });
374 if (!acceptWasSet) {
375 accept = Criteria.whenNoMatch(reject);
376 }
377 if (!objectiveWasSet) {
378 objective = Objectives.count(reject);
379 }
380 }
381
382 public PartialRelationRewriter getRewriter() {
383 checkConfigured();
384 return rewriter;
385 }
386
387 public static PartialRelationTranslator of(PartialRelation relation) {
388 return new PartialRelationTranslator(relation);
389 }
390}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java
new file mode 100644
index 00000000..6cdb287d
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/PartialSymbolTranslator.java
@@ -0,0 +1,212 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import org.jetbrains.annotations.Nullable;
9import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder;
10import tools.refinery.store.dse.transition.Rule;
11import tools.refinery.store.dse.transition.objectives.Criterion;
12import tools.refinery.store.dse.transition.objectives.Objective;
13import tools.refinery.store.model.ModelStoreBuilder;
14import tools.refinery.store.reasoning.ReasoningBuilder;
15import tools.refinery.store.reasoning.interpretation.PartialInterpretation;
16import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
17import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
18import tools.refinery.store.reasoning.refinement.StorageRefiner;
19import tools.refinery.store.reasoning.representation.PartialSymbol;
20import tools.refinery.store.reasoning.seed.SeedInitializer;
21import tools.refinery.store.representation.AnySymbol;
22import tools.refinery.store.representation.Symbol;
23
24import java.util.ArrayList;
25import java.util.List;
26
27@SuppressWarnings("UnusedReturnValue")
28public abstract sealed class PartialSymbolTranslator<A, C> implements AnyPartialSymbolTranslator
29 permits PartialRelationTranslator {
30 private final PartialSymbol<A, C> partialSymbol;
31 private boolean configured = false;
32 protected PartialInterpretationRefiner.Factory<A, C> interpretationRefiner;
33 protected AnySymbol storageSymbol;
34 protected StorageRefiner.Factory<?> storageRefiner;
35 protected PartialInterpretation.Factory<A, C> interpretationFactory;
36 protected PartialModelInitializer initializer;
37 protected List<Rule> decisionRules = new ArrayList<>();
38 protected boolean acceptWasSet;
39 protected @Nullable Criterion accept;
40 protected boolean excludeWasSet;
41 protected @Nullable Criterion exclude;
42 protected boolean objectiveWasSet;
43 protected @Nullable Objective objective;
44
45 PartialSymbolTranslator(PartialSymbol<A, C> partialSymbol) {
46 this.partialSymbol = partialSymbol;
47 }
48
49 @Override
50 public PartialSymbol<A, C> getPartialSymbol() {
51 return partialSymbol;
52 }
53
54 @Override
55 public void apply(ModelStoreBuilder storeBuilder) {
56 storeBuilder.getAdapter(ReasoningBuilder.class).partialSymbol(this);
57 }
58
59 public boolean isConfigured() {
60 return configured;
61 }
62
63 protected void checkConfigured() {
64 if (!configured) {
65 throw new IllegalStateException("Partial symbol was not configured");
66 }
67 }
68
69 protected void checkNotConfigured() {
70 if (configured) {
71 throw new IllegalStateException("Partial symbol was already configured");
72 }
73 }
74
75 public PartialSymbolTranslator<A, C> symbol(AnySymbol storageSymbol) {
76 return symbol((Symbol<?>) storageSymbol, null);
77 }
78
79 public <T> PartialSymbolTranslator<A, C> symbol(Symbol<T> storageSymbol,
80 StorageRefiner.Factory<T> storageRefiner) {
81 checkNotConfigured();
82 if (this.storageSymbol != null) {
83 throw new IllegalStateException("Representation symbol was already set");
84 }
85 this.storageSymbol = storageSymbol;
86 this.storageRefiner = storageRefiner;
87 return this;
88 }
89
90 public PartialSymbolTranslator<A, C> interpretation(PartialInterpretation.Factory<A, C> interpretationFactory) {
91 checkNotConfigured();
92 if (this.interpretationFactory != null) {
93 throw new IllegalStateException("Interpretation factory was already set");
94 }
95 this.interpretationFactory = interpretationFactory;
96 return this;
97 }
98
99 public PartialSymbolTranslator<A, C> refiner(PartialInterpretationRefiner.Factory<A, C> interpretationRefiner) {
100 checkNotConfigured();
101 if (this.interpretationRefiner != null) {
102 throw new IllegalStateException("Interpretation refiner was already set");
103 }
104 this.interpretationRefiner = interpretationRefiner;
105 return this;
106 }
107
108 public PartialSymbolTranslator<A, C> initializer(PartialModelInitializer initializer) {
109 checkNotConfigured();
110 if (this.initializer != null) {
111 throw new IllegalStateException("Initializer was already set");
112 }
113 this.initializer = initializer;
114 return this;
115 }
116
117 public PartialSymbolTranslator<A, C> decision(Rule decisionRule) {
118 decisionRules.add(decisionRule);
119 return this;
120 }
121
122 public PartialSymbolTranslator<A, C> accept(@Nullable Criterion acceptanceCriterion) {
123 if (acceptWasSet) {
124 throw new IllegalStateException("Accept was already set");
125 }
126 this.accept = acceptanceCriterion;
127 acceptWasSet = true;
128 return this;
129 }
130
131 public PartialSymbolTranslator<A, C> exclude(@Nullable Criterion exclusionCriterion) {
132 if (excludeWasSet) {
133 throw new IllegalStateException("Exclude was already set");
134 }
135 this.exclude = exclusionCriterion;
136 excludeWasSet = true;
137 return this;
138 }
139
140 public PartialSymbolTranslator<A, C> objective(Objective objective) {
141 if (objectiveWasSet) {
142 throw new IllegalStateException("Objective was already set");
143 }
144 this.objective = objective;
145 objectiveWasSet = true;
146 return this;
147 }
148
149 @Override
150 public void configure(ModelStoreBuilder storeBuilder) {
151 checkNotConfigured();
152 doConfigure(storeBuilder);
153 configured = true;
154 }
155
156 protected void doConfigure(ModelStoreBuilder storeBuilder) {
157 if (interpretationFactory == null) {
158 throw new IllegalArgumentException("Interpretation factory must be set");
159 }
160 var reasoningBuilder = storeBuilder.getAdapter(ReasoningBuilder.class);
161 if (storageSymbol != null) {
162 storeBuilder.symbol(storageSymbol);
163 if (storageRefiner != null) {
164 registerStorageRefiner(reasoningBuilder, storageRefiner);
165 }
166 }
167 createFallbackInitializer();
168 if (initializer != null) {
169 reasoningBuilder.initializer(initializer);
170 }
171 storeBuilder.tryGetAdapter(DesignSpaceExplorationBuilder.class).ifPresent(dseBuilder -> {
172 dseBuilder.transformations(decisionRules);
173 if (accept != null) {
174 dseBuilder.accept(accept);
175 }
176 if (exclude != null) {
177 dseBuilder.exclude(exclude);
178 }
179 });
180 if (objective != null) {
181 reasoningBuilder.objective(objective);
182 }
183 }
184
185 private <T> void registerStorageRefiner(ReasoningBuilder reasoningBuilder, StorageRefiner.Factory<T> factory) {
186 // The builder only allows setting a well-typed representation refiner.
187 @SuppressWarnings("unchecked")
188 var typedStorageSymbol = (Symbol<T>) storageSymbol;
189 reasoningBuilder.storageRefiner(typedStorageSymbol, factory);
190 }
191
192 private void createFallbackInitializer() {
193 if (initializer == null &&
194 storageSymbol != null &&
195 storageSymbol.valueType().equals(partialSymbol.abstractDomain().abstractType())) {
196 // The guard clause makes this safe.
197 @SuppressWarnings("unchecked")
198 var typedStorageSymbol = (Symbol<A>) storageSymbol;
199 initializer = new SeedInitializer<>(typedStorageSymbol, partialSymbol);
200 }
201 }
202
203 public PartialInterpretation.Factory<A, C> getInterpretationFactory() {
204 checkConfigured();
205 return interpretationFactory;
206 }
207
208 public PartialInterpretationRefiner.Factory<A, C> getInterpretationRefiner() {
209 checkConfigured();
210 return interpretationRefiner;
211 }
212}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/RoundingMode.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/RoundingMode.java
new file mode 100644
index 00000000..dd956a50
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/RoundingMode.java
@@ -0,0 +1,12 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8public enum RoundingMode {
9 NONE,
10 PREFER_TRUE,
11 PREFER_FALSE
12}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslatedRelation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslatedRelation.java
deleted file mode 100644
index 4a5a8843..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslatedRelation.java
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.query.term.Variable;
10import tools.refinery.store.query.literal.CallPolarity;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.reasoning.PartialInterpretation;
13import tools.refinery.store.reasoning.literal.Modality;
14import tools.refinery.store.reasoning.representation.PartialRelation;
15import tools.refinery.store.representation.TruthValue;
16
17import java.util.List;
18
19public interface TranslatedRelation {
20 PartialRelation getSource();
21
22 void configure(List<Advice> advices);
23
24 List<Literal> call(CallPolarity polarity, Modality modality, List<Variable> arguments);
25
26 PartialInterpretation<TruthValue, Boolean> createPartialInterpretation(Model model);
27}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationException.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationException.java
new file mode 100644
index 00000000..edb886ba
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationException.java
@@ -0,0 +1,35 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import tools.refinery.store.reasoning.representation.AnyPartialSymbol;
9
10public class TranslationException extends RuntimeException {
11 private final transient AnyPartialSymbol partialSymbol;
12
13 public TranslationException(AnyPartialSymbol partialSymbol) {
14 this.partialSymbol = partialSymbol;
15 }
16
17 public TranslationException(AnyPartialSymbol partialSymbol, String message) {
18 super(message);
19 this.partialSymbol = partialSymbol;
20 }
21
22 public TranslationException(AnyPartialSymbol partialSymbol, String message, Throwable cause) {
23 super(message, cause);
24 this.partialSymbol = partialSymbol;
25 }
26
27 public TranslationException(AnyPartialSymbol partialSymbol, Throwable cause) {
28 super(cause);
29 this.partialSymbol = partialSymbol;
30 }
31
32 public AnyPartialSymbol getPartialSymbol() {
33 return partialSymbol;
34 }
35}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationUnit.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationUnit.java
deleted file mode 100644
index 6e44a7d7..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/TranslationUnit.java
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.ReasoningBuilder;
10
11import java.util.Collection;
12
13public abstract class TranslationUnit {
14 private ReasoningBuilder reasoningBuilder;
15
16 protected ReasoningBuilder getReasoningBuilder() {
17 return reasoningBuilder;
18 }
19
20 public void setPartialInterpretationBuilder(ReasoningBuilder reasoningBuilder) {
21 this.reasoningBuilder = reasoningBuilder;
22 configureReasoningBuilder();
23 }
24
25 protected void configureReasoningBuilder() {
26 // Nothing to configure by default.
27 }
28
29 public abstract Collection<TranslatedRelation> getTranslatedRelations();
30
31 public abstract void initializeModel(Model model, int nodeCount);
32}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java
deleted file mode 100644
index 2a151aa2..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.base;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.model.Interpretation;
10import tools.refinery.store.query.resultset.ResultSet;
11import tools.refinery.store.reasoning.MergeResult;
12import tools.refinery.store.reasoning.PartialInterpretation;
13import tools.refinery.store.reasoning.ReasoningAdapter;
14import tools.refinery.store.reasoning.representation.PartialRelation;
15import tools.refinery.store.representation.TruthValue;
16import tools.refinery.store.tuple.Tuple;
17
18public class BaseDecisionInterpretation implements PartialInterpretation<TruthValue, Boolean> {
19 private final ReasoningAdapter reasoningAdapter;
20 private PartialRelation partialRelation;
21 private final ResultSet<Boolean> mustResultSet;
22 private final ResultSet<Boolean> mayResultSet;
23 private final ResultSet<Boolean> errorResultSet;
24 private final ResultSet<Boolean> currentResultSet;
25 private final Interpretation<TruthValue> interpretation;
26
27 public BaseDecisionInterpretation(ReasoningAdapter reasoningAdapter, ResultSet<Boolean> mustResultSet,
28 ResultSet<Boolean> mayResultSet, ResultSet<Boolean> errorResultSet,
29 ResultSet<Boolean> currentResultSet, Interpretation<TruthValue> interpretation) {
30 this.reasoningAdapter = reasoningAdapter;
31 this.mustResultSet = mustResultSet;
32 this.mayResultSet = mayResultSet;
33 this.errorResultSet = errorResultSet;
34 this.currentResultSet = currentResultSet;
35 this.interpretation = interpretation;
36 }
37
38 @Override
39 public ReasoningAdapter getAdapter() {
40 return reasoningAdapter;
41 }
42
43 @Override
44 public int countUnfinished() {
45 return 0;
46 }
47
48 @Override
49 public int countErrors() {
50 return errorResultSet.size();
51 }
52
53 @Override
54 public PartialRelation getPartialSymbol() {
55 return partialRelation;
56 }
57
58 @Override
59 public TruthValue get(Tuple key) {
60 return null;
61 }
62
63 @Override
64 public Cursor<Tuple, TruthValue> getAll() {
65 return null;
66 }
67
68 @Override
69 public MergeResult merge(Tuple key, TruthValue value) {
70 TruthValue newValue;
71 switch (value) {
72 case UNKNOWN -> {
73 return MergeResult.UNCHANGED;
74 }
75 case TRUE -> newValue = mayResultSet.get(key) ? TruthValue.TRUE : TruthValue.ERROR;
76 case FALSE -> newValue = mustResultSet.get(key) ? TruthValue.ERROR : TruthValue.FALSE;
77 case ERROR -> newValue = TruthValue.ERROR;
78 default -> throw new IllegalArgumentException("Unknown truth value: " + value);
79 }
80 var oldValue = interpretation.put(key, newValue);
81 return oldValue == TruthValue.ERROR ? MergeResult.UNCHANGED : MergeResult.REFINED;
82 }
83
84 @Override
85 public Boolean getConcrete(Tuple key) {
86 return currentResultSet.get(key);
87 }
88
89 @Override
90 public Cursor<Tuple, Boolean> getAllConcrete() {
91 return null;
92 }
93}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionTranslationUnit.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionTranslationUnit.java
deleted file mode 100644
index a1e4b816..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionTranslationUnit.java
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.base;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.representation.PartialRelation;
10import tools.refinery.store.reasoning.seed.Seed;
11import tools.refinery.store.reasoning.seed.UniformSeed;
12import tools.refinery.store.reasoning.translator.TranslatedRelation;
13import tools.refinery.store.reasoning.translator.TranslationUnit;
14import tools.refinery.store.representation.Symbol;
15import tools.refinery.store.representation.TruthValue;
16
17import java.util.Collection;
18import java.util.List;
19
20public class BaseDecisionTranslationUnit extends TranslationUnit {
21 private final PartialRelation partialRelation;
22 private final Seed<TruthValue> seed;
23 private final Symbol<TruthValue> symbol;
24
25 public BaseDecisionTranslationUnit(PartialRelation partialRelation, Seed<TruthValue> seed) {
26 if (seed.arity() != partialRelation.arity()) {
27 throw new IllegalArgumentException("Expected seed with arity %d for %s, got arity %s"
28 .formatted(partialRelation.arity(), partialRelation, seed.arity()));
29 }
30 this.partialRelation = partialRelation;
31 this.seed = seed;
32 symbol = Symbol.of(partialRelation.name(), partialRelation.arity(), TruthValue.class, TruthValue.UNKNOWN);
33 }
34
35 public BaseDecisionTranslationUnit(PartialRelation partialRelation) {
36 this(partialRelation, new UniformSeed<>(partialRelation.arity(), TruthValue.UNKNOWN));
37 }
38
39 @Override
40 public Collection<TranslatedRelation> getTranslatedRelations() {
41 return List.of(new TranslatedBaseDecision(getReasoningBuilder(), partialRelation, symbol));
42 }
43
44 @Override
45 public void initializeModel(Model model, int nodeCount) {
46 var interpretation = model.getInterpretation(symbol);
47 interpretation.putAll(seed.getCursor(TruthValue.UNKNOWN, nodeCount));
48 }
49}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/TranslatedBaseDecision.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/TranslatedBaseDecision.java
deleted file mode 100644
index 4782eb46..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/TranslatedBaseDecision.java
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.base;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.query.term.Variable;
10import tools.refinery.store.query.literal.CallPolarity;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.reasoning.PartialInterpretation;
13import tools.refinery.store.reasoning.ReasoningBuilder;
14import tools.refinery.store.reasoning.literal.Modality;
15import tools.refinery.store.reasoning.representation.PartialRelation;
16import tools.refinery.store.reasoning.translator.Advice;
17import tools.refinery.store.reasoning.translator.TranslatedRelation;
18import tools.refinery.store.representation.Symbol;
19import tools.refinery.store.representation.TruthValue;
20
21import java.util.List;
22
23class TranslatedBaseDecision implements TranslatedRelation {
24 private final ReasoningBuilder reasoningBuilder;
25 private final PartialRelation partialRelation;
26 private final Symbol<TruthValue> symbol;
27
28 public TranslatedBaseDecision(ReasoningBuilder reasoningBuilder, PartialRelation partialRelation,
29 Symbol<TruthValue> symbol) {
30 this.reasoningBuilder = reasoningBuilder;
31 this.partialRelation = partialRelation;
32 this.symbol = symbol;
33 }
34
35 @Override
36 public PartialRelation getSource() {
37 return partialRelation;
38 }
39
40 @Override
41 public void configure(List<Advice> advices) {
42
43 }
44
45 @Override
46 public List<Literal> call(CallPolarity polarity, Modality modality, List<Variable> arguments) {
47 return null;
48 }
49
50 @Override
51 public PartialInterpretation<TruthValue, Boolean> createPartialInterpretation(Model model) {
52 return null;
53 }
54}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java
new file mode 100644
index 00000000..61037be3
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslator.java
@@ -0,0 +1,255 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.dse.transition.DesignSpaceExplorationBuilder;
9import tools.refinery.store.dse.transition.Rule;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.model.ModelStoreConfiguration;
12import tools.refinery.store.query.dnf.Query;
13import tools.refinery.store.query.dnf.RelationalQuery;
14import tools.refinery.store.query.literal.Connectivity;
15import tools.refinery.store.query.literal.Literal;
16import tools.refinery.store.query.literal.RepresentativeElectionLiteral;
17import tools.refinery.store.query.term.Variable;
18import tools.refinery.store.query.view.AnySymbolView;
19import tools.refinery.store.reasoning.lifting.DnfLifter;
20import tools.refinery.store.reasoning.literal.Concreteness;
21import tools.refinery.store.reasoning.literal.CountLowerBoundLiteral;
22import tools.refinery.store.reasoning.literal.Modality;
23import tools.refinery.store.reasoning.refinement.RefinementBasedInitializer;
24import tools.refinery.store.reasoning.representation.PartialRelation;
25import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
26import tools.refinery.store.reasoning.translator.RoundingMode;
27import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
28import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity;
29import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator;
30import tools.refinery.store.representation.Symbol;
31import tools.refinery.store.representation.cardinality.CardinalityIntervals;
32import tools.refinery.store.representation.cardinality.FiniteUpperCardinality;
33
34import java.util.ArrayList;
35import java.util.List;
36import java.util.Map;
37
38import static tools.refinery.store.query.literal.Literals.check;
39import static tools.refinery.store.query.literal.Literals.not;
40import static tools.refinery.store.query.term.int_.IntTerms.constant;
41import static tools.refinery.store.query.term.int_.IntTerms.less;
42import static tools.refinery.store.reasoning.ReasoningAdapter.EXISTS_SYMBOL;
43import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add;
44import static tools.refinery.store.reasoning.actions.PartialActionLiterals.focus;
45import static tools.refinery.store.reasoning.literal.PartialLiterals.*;
46
47public class ContainmentHierarchyTranslator implements ModelStoreConfiguration {
48 public static final PartialRelation CONTAINED_SYMBOL = new PartialRelation("contained", 1);
49 public static final PartialRelation INVALID_CONTAINER = new PartialRelation("invalidContainer",
50 1);
51 public static final PartialRelation CONTAINS_SYMBOL = new PartialRelation("contains", 2);
52
53 private final Symbol<InferredContainment> containsStorage = Symbol.of("CONTAINS", 2, InferredContainment.class,
54 InferredContainment.UNKNOWN);
55 private final AnySymbolView forbiddenContainsView = new ForbiddenContainsView(containsStorage);
56 private final RelationalQuery containsMayNewTargetHelper;
57 private final RelationalQuery containsMayExistingHelper;
58 private final RelationalQuery weakComponents;
59 private final RelationalQuery strongComponents;
60 private final Map<PartialRelation, ContainmentInfo> containmentInfoMap;
61
62 public ContainmentHierarchyTranslator(Map<PartialRelation, ContainmentInfo> containmentInfoMap) {
63 this.containmentInfoMap = containmentInfoMap;
64
65 var name = CONTAINS_SYMBOL.name();
66
67 containsMayNewTargetHelper = Query.of(name + "#mayNewTargetHelper", (builder, child) -> builder
68 .clause(Integer.class, existingContainers -> List.of(
69 may(CONTAINED_SYMBOL.call(child)),
70 new CountLowerBoundLiteral(existingContainers, CONTAINS_SYMBOL, List.of(Variable.of(), child)),
71 check(less(existingContainers, constant(1)))
72 )));
73
74 containsMayExistingHelper = Query.of(name + "#mayExistingHelper", (builder, parent, child) -> builder
75 .clause(Integer.class, existingContainers -> List.of(
76 must(CONTAINS_SYMBOL.call(parent, child)),
77 not(forbiddenContainsView.call(parent, child))
78 // Violation of monotonicity:
79 // Containment edges violating upper multiplicity will not be marked as {@code ERROR}, but the
80 // {@code invalidNumberOfContainers} error pattern will already mark the node as invalid.
81 )));
82
83 var mustExistBothContains = Query.of(name + "#mustExistBoth", (builder, parent, child) -> builder.clause(
84 must(CONTAINS_SYMBOL.call(parent, child)),
85 must(EXISTS_SYMBOL.call(parent)),
86 must(EXISTS_SYMBOL.call(child))
87 ));
88
89 weakComponents = Query.of(name + "#weakComponents", (builder, node, representative) -> builder.clause(
90 new RepresentativeElectionLiteral(Connectivity.WEAK, mustExistBothContains.getDnf(), node,
91 representative)
92 ));
93
94 strongComponents = Query.of(name + "#strongComponents", (builder, node, representative) -> builder.clause(
95 new RepresentativeElectionLiteral(Connectivity.STRONG, mustExistBothContains.getDnf(), node,
96 representative)
97 ));
98 }
99
100 @Override
101 public void apply(ModelStoreBuilder storeBuilder) {
102 storeBuilder.symbol(containsStorage);
103 translateContains(storeBuilder);
104 translateInvalidContainer(storeBuilder);
105 for (var entry : containmentInfoMap.entrySet()) {
106 var linkType = entry.getKey();
107 var info = entry.getValue();
108 translateContainmentLinkType(storeBuilder, linkType, info);
109 translateInvalidMultiplicity(storeBuilder, linkType, info);
110 }
111 translateFocusNotContained(storeBuilder);
112 }
113
114 private void translateContainmentLinkType(ModelStoreBuilder storeBuilder, PartialRelation linkType,
115 ContainmentInfo info) {
116 var name = linkType.name();
117 var sourceType = info.sourceType();
118 var targetType = info.targetType();
119 var upperCardinality = info.multiplicity().multiplicity().upperBound();
120
121 var mayNewSourceHelper = Query.of(name + "#mayNewSourceHelper", (builder, parent) -> {
122 var literals = new ArrayList<Literal>();
123 literals.add(may(sourceType.call(parent)));
124 if (upperCardinality instanceof FiniteUpperCardinality finiteUpperCardinality) {
125 var existingCount = Variable.of("existingCount", Integer.class);
126 literals.add(new CountLowerBoundLiteral(existingCount, linkType, List.of(parent, Variable.of())));
127 literals.add(check(less(existingCount, constant(finiteUpperCardinality.finiteUpperBound()))));
128 }
129 builder.clause(literals);
130 });
131
132 var mayNewTargetHelper = Query.of(name + "#mayNewTargetHelper", (builder, child) -> builder.clause(
133 containsMayNewTargetHelper.call(child),
134 may(targetType.call(child))
135 ));
136
137 var forbiddenLinkView = new ForbiddenContainmentLinkView(containsStorage, linkType);
138
139 var mayNewHelper = Query.of(name + "#mayNewHelper", (builder, parent, child) -> builder.clause(
140 mayNewSourceHelper.call(parent),
141 mayNewTargetHelper.call(child),
142 not(must(CONTAINS_SYMBOL.call(parent, child))),
143 not(forbiddenLinkView.call(parent, child))
144 ));
145
146 var mayExistingHelper = Query.of(name + "#mayExistingHelper", (builder, parent, child) -> builder.clause(
147 must(linkType.call(parent, child)),
148 containsMayExistingHelper.call(parent, child),
149 may(sourceType.call(parent)),
150 may(targetType.call(child)),
151 not(forbiddenLinkView.call(parent, child))
152 // Violation of monotonicity:
153 // Containment edges violating upper multiplicity will not be marked as {@code ERROR}, but the
154 // {@code invalidNumberOfContainers} error pattern will already mark the node as invalid.
155 ));
156
157 var may = Query.of(name + "#may", (builder, parent, child) -> builder
158 .clause(
159 mayNewHelper.call(parent, child),
160 not(weakComponents.call(parent, Variable.of()))
161 )
162 .clause(representative -> List.of(
163 mayNewHelper.call(parent, child),
164 weakComponents.call(parent, representative),
165 // Violation of para-consistency:
166 // If there is a surely existing node with at least two containers, its (transitive) containers
167 // will end up in the same weakly connected component, and we will spuriously mark the
168 // containment edge between the (transitive) containers as {@code FALSE}. However, such
169 // models can never be finished.
170 //
171 // Violation of monotonicity:
172 // if the a {@code TRUE} value is added to the representation in the previous situation,
173 // we'll check strongly connected components instead of weakly connected ones. Therefore, the
174 // view for the partial symbol will change from {@code FALSE} to {@code TRUE}. This doesn't
175 // affect the overall inconsistency of the partial model (due to the surely existing node
176 // with multiple containers).
177 not(weakComponents.call(child, representative))
178 ))
179 .clause(
180 mayExistingHelper.call(parent, child),
181 not(strongComponents.call(parent, Variable.of()))
182 )
183 .clause(representative -> List.of(
184 mayExistingHelper.call(parent, child),
185 strongComponents.call(parent, representative),
186 not(strongComponents.call(child, representative))
187 )));
188
189 storeBuilder.with(PartialRelationTranslator.of(linkType)
190 .may(may)
191 .must(Query.of(name + "#must", (builder, parent, child) -> builder.clause(
192 new MustContainmentLinkView(containsStorage, linkType).call(parent, child)
193 )))
194 .roundingMode(RoundingMode.PREFER_FALSE)
195 .refiner(ContainmentLinkRefiner.of(linkType, containsStorage, info.sourceType(), info.targetType()))
196 .initializer(new RefinementBasedInitializer<>(linkType))
197 .decision(Rule.of(linkType.name(), (builder, source, target) -> builder
198 .clause(
199 may(linkType.call(source, target)),
200 not(candidateMust(linkType.call(source, target))),
201 not(MultiObjectTranslator.MULTI_VIEW.call(source))
202 )
203 .action(focusedTarget -> List.of(
204 focus(target, focusedTarget),
205 add(linkType, source, focusedTarget)
206 )))));
207 }
208
209 private void translateInvalidMultiplicity(ModelStoreBuilder storeBuilder, PartialRelation linkType,
210 ContainmentInfo info) {
211 storeBuilder.with(new InvalidMultiplicityErrorTranslator(info.sourceType(), linkType, false,
212 info.multiplicity()));
213 }
214
215 private void translateContains(ModelStoreBuilder storeBuilder) {
216 var name = CONTAINS_SYMBOL.name();
217 var mustName = DnfLifter.decorateName(name, Modality.MUST, Concreteness.PARTIAL);
218
219 storeBuilder.with(PartialRelationTranslator.of(CONTAINS_SYMBOL)
220 .query(Query.of(name, (builder, parent, child) -> {
221 for (var linkType : containmentInfoMap.keySet()) {
222 builder.clause(linkType.call(parent, child));
223 }
224 }))
225 .must(Query.of(mustName, (builder, parent, child) -> builder.clause(
226 new MustContainsView(containsStorage).call(parent, child)
227 ))));
228 }
229
230 private void translateInvalidContainer(ModelStoreBuilder storeBuilder) {
231 storeBuilder.with(new InvalidMultiplicityErrorTranslator(CONTAINED_SYMBOL, CONTAINS_SYMBOL, true,
232 ConstrainedMultiplicity.of(CardinalityIntervals.ONE, INVALID_CONTAINER)));
233 }
234
235 private void translateFocusNotContained(ModelStoreBuilder storeBuilder) {
236 var dseBuilderOption = storeBuilder.tryGetAdapter(DesignSpaceExplorationBuilder.class);
237 if (dseBuilderOption.isEmpty()) {
238 return;
239 }
240 var dseBuilder = dseBuilderOption.get();
241 dseBuilder.transformation(Rule.of("NOT_CONTAINED", (builder, multi) -> builder
242 .clause(
243 MultiObjectTranslator.MULTI_VIEW.call(multi),
244 not(may(CONTAINED_SYMBOL.call(multi)))
245 )
246 .clause(container -> List.of(
247 MultiObjectTranslator.MULTI_VIEW.call(multi),
248 must(CONTAINS_SYMBOL.call(container, multi)),
249 not(MultiObjectTranslator.MULTI_VIEW.call(container))
250 ))
251 .action(
252 focus(multi, Variable.of())
253 )));
254 }
255}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentInfo.java
new file mode 100644
index 00000000..e3457fa7
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentInfo.java
@@ -0,0 +1,24 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.TranslationException;
10import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
11
12public record ContainmentInfo(PartialRelation sourceType, Multiplicity multiplicity,
13 PartialRelation targetType) {
14 public ContainmentInfo {
15 if (sourceType.arity() != 1) {
16 throw new TranslationException(sourceType, "Expected source type %s to be of arity 1, got %d instead"
17 .formatted(sourceType, sourceType.arity()));
18 }
19 if (targetType.arity() != 1) {
20 throw new TranslationException(targetType, "Expected target type %s to be of arity 1, got %d instead"
21 .formatted(targetType, targetType.arity()));
22 }
23 }
24}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java
new file mode 100644
index 00000000..497ed98f
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ContainmentLinkRefiner.java
@@ -0,0 +1,128 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.reasoning.ReasoningAdapter;
10import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner;
11import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
12import tools.refinery.store.reasoning.representation.PartialRelation;
13import tools.refinery.store.reasoning.representation.PartialSymbol;
14import tools.refinery.store.representation.Symbol;
15import tools.refinery.store.representation.TruthValue;
16import tools.refinery.store.tuple.Tuple;
17
18import java.util.ArrayList;
19import java.util.Set;
20
21class ContainmentLinkRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> {
22 private final Factory factory;
23 private final Interpretation<InferredContainment> interpretation;
24 private final PartialInterpretationRefiner<TruthValue, Boolean> sourceRefiner;
25 private final PartialInterpretationRefiner<TruthValue, Boolean> targetRefiner;
26
27 public ContainmentLinkRefiner(ReasoningAdapter adapter, PartialSymbol<TruthValue, Boolean> partialSymbol,
28 Factory factory) {
29 super(adapter, partialSymbol);
30 this.factory = factory;
31 interpretation = adapter.getModel().getInterpretation(factory.symbol);
32 sourceRefiner = adapter.getRefiner(factory.sourceType);
33 targetRefiner = adapter.getRefiner(factory.targetType);
34 }
35
36 @Override
37 public boolean merge(Tuple key, TruthValue value) {
38 var oldValue = interpretation.get(key);
39 var newValue = mergeLink(oldValue, value);
40 if (oldValue != newValue) {
41 interpretation.put(key, newValue);
42 }
43 if (value.must()) {
44 return sourceRefiner.merge(Tuple.of(key.get(0)), TruthValue.TRUE) &&
45 targetRefiner.merge(Tuple.of(key.get(1)), TruthValue.TRUE);
46 }
47 return true;
48 }
49
50 public InferredContainment mergeLink(InferredContainment oldValue, TruthValue toMerge) {
51 return switch (toMerge) {
52 case UNKNOWN -> oldValue;
53 case TRUE -> mustLink(oldValue);
54 case FALSE -> forbidLink(oldValue);
55 case ERROR -> errorLink(oldValue);
56 };
57 }
58
59 public InferredContainment mustLink(InferredContainment oldValue) {
60 var mustLinks = oldValue.mustLinks();
61 if (oldValue.contains().may() && mustLinks.isEmpty() && oldValue.forbiddenLinks().isEmpty()) {
62 return factory.trueLink;
63 }
64 if (mustLinks.contains(factory.linkType)) {
65 return oldValue;
66 }
67 return new InferredContainment(oldValue.contains().merge(TruthValue.TRUE),
68 addToSet(mustLinks, factory.linkType), oldValue.forbiddenLinks());
69 }
70
71 public InferredContainment forbidLink(InferredContainment oldValue) {
72 var forbiddenLinks = oldValue.forbiddenLinks();
73 if (oldValue.contains() == TruthValue.UNKNOWN && oldValue.mustLinks().isEmpty() && forbiddenLinks.isEmpty()) {
74 return factory.falseLinkUnknownContains;
75 }
76 if (forbiddenLinks.contains(factory.linkType)) {
77 return oldValue;
78 }
79 return new InferredContainment(oldValue.contains(), oldValue.mustLinks(),
80 addToSet(forbiddenLinks, factory.linkType));
81 }
82
83 public InferredContainment errorLink(InferredContainment oldValue) {
84 return new InferredContainment(TruthValue.ERROR, addToSet(oldValue.mustLinks(), factory.linkType),
85 addToSet(oldValue.forbiddenLinks(), factory.linkType));
86 }
87
88 private static Set<PartialRelation> addToSet(Set<PartialRelation> oldSet, PartialRelation linkType) {
89 if (oldSet.isEmpty()) {
90 return Set.of(linkType);
91 }
92 var newElements = new ArrayList<PartialRelation>(oldSet.size() + 1);
93 newElements.addAll(oldSet);
94 newElements.add(linkType);
95 return Set.copyOf(newElements);
96 }
97
98 public static PartialInterpretationRefiner.Factory<TruthValue, Boolean> of(
99 PartialRelation linkType, Symbol<InferredContainment> symbol, PartialRelation sourceType,
100 PartialRelation targetType) {
101 return new Factory(linkType, symbol, sourceType, targetType);
102 }
103
104 private static class Factory implements PartialInterpretationRefiner.Factory<TruthValue, Boolean> {
105 public final PartialRelation linkType;
106 public final Symbol<InferredContainment> symbol;
107 public final PartialRelation targetType;
108 public final PartialRelation sourceType;
109 public final InferredContainment trueLink;
110 public final InferredContainment falseLinkUnknownContains;
111
112 public Factory(PartialRelation linkType, Symbol<InferredContainment> symbol, PartialRelation sourceType,
113 PartialRelation targetType) {
114 this.linkType = linkType;
115 this.symbol = symbol;
116 this.sourceType = sourceType;
117 this.targetType = targetType;
118 trueLink = new InferredContainment(TruthValue.TRUE, Set.of(linkType), Set.of());
119 falseLinkUnknownContains = new InferredContainment(TruthValue.FALSE, Set.of(), Set.of(linkType));
120 }
121
122 @Override
123 public PartialInterpretationRefiner<TruthValue, Boolean> create(
124 ReasoningAdapter adapter, PartialSymbol<TruthValue, Boolean> partialSymbol) {
125 return new ContainmentLinkRefiner(adapter, partialSymbol, this);
126 }
127 }
128}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainmentLinkView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainmentLinkView.java
new file mode 100644
index 00000000..cf0e2971
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainmentLinkView.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.tuple.Tuple;
11
12class ForbiddenContainmentLinkView extends InferredContainmentLinkView {
13 public ForbiddenContainmentLinkView(Symbol<InferredContainment> symbol, PartialRelation link) {
14 super(symbol, "must", link);
15 }
16
17 @Override
18 protected boolean doFilter(Tuple key, InferredContainment value) {
19 return value.forbiddenLinks().contains(link);
20 }
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainsView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainsView.java
new file mode 100644
index 00000000..efe674f1
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/ForbiddenContainsView.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.query.view.TuplePreservingView;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.tuple.Tuple;
11
12class ForbiddenContainsView extends TuplePreservingView<InferredContainment> {
13 public ForbiddenContainsView(Symbol<InferredContainment> symbol) {
14 super(symbol, "contains#forbidden");
15 }
16
17 @Override
18 protected boolean doFilter(Tuple key, InferredContainment value) {
19 return !value.contains().may();
20 }
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java
new file mode 100644
index 00000000..8df23d9a
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainment.java
@@ -0,0 +1,77 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.TruthValue;
10
11import java.util.Objects;
12import java.util.Set;
13
14final class InferredContainment {
15 public static final InferredContainment UNKNOWN = new InferredContainment(
16 TruthValue.UNKNOWN, Set.of(), Set.of());
17 private final TruthValue contains;
18 private final Set<PartialRelation> mustLinks;
19 private final Set<PartialRelation> forbiddenLinks;
20 private final int hashCode;
21
22 public InferredContainment(TruthValue contains, Set<PartialRelation> mustLinks,
23 Set<PartialRelation> forbiddenLinks) {
24 this.contains = adjustContains(contains, mustLinks, forbiddenLinks);
25 this.mustLinks = mustLinks;
26 this.forbiddenLinks = forbiddenLinks;
27 hashCode = Objects.hash(contains, mustLinks, forbiddenLinks);
28 }
29
30 private static TruthValue adjustContains(TruthValue contains, Set<PartialRelation> mustLinks,
31 Set<PartialRelation> forbiddenLinks) {
32 var result = contains;
33 if (!mustLinks.isEmpty()) {
34 result = result.merge(TruthValue.TRUE);
35 }
36 boolean hasErrorLink = mustLinks.stream().anyMatch(forbiddenLinks::contains);
37 if (mustLinks.size() >= 2 || hasErrorLink) {
38 result = result.merge(TruthValue.ERROR);
39 }
40 return result;
41 }
42
43 public TruthValue contains() {
44 return contains;
45 }
46
47 public Set<PartialRelation> mustLinks() {
48 return mustLinks;
49 }
50
51 public Set<PartialRelation> forbiddenLinks() {
52 return forbiddenLinks;
53 }
54
55 @Override
56 public boolean equals(Object obj) {
57 if (obj == this) return true;
58 if (obj == null || obj.getClass() != this.getClass()) return false;
59 var that = (InferredContainment) obj;
60 return Objects.equals(this.contains, that.contains) &&
61 Objects.equals(this.mustLinks, that.mustLinks) &&
62 Objects.equals(this.forbiddenLinks, that.forbiddenLinks);
63 }
64
65 @Override
66 public int hashCode() {
67 return hashCode;
68 }
69
70 @Override
71 public String toString() {
72 return "InferredContainment[" +
73 "contains=" + contains + ", " +
74 "mustLinks=" + mustLinks + ", " +
75 "forbiddenLinks=" + forbiddenLinks + ']';
76 }
77}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainmentLinkView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainmentLinkView.java
new file mode 100644
index 00000000..d187ad91
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/InferredContainmentLinkView.java
@@ -0,0 +1,35 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.query.view.TuplePreservingView;
9import tools.refinery.store.reasoning.representation.PartialRelation;
10import tools.refinery.store.representation.Symbol;
11
12import java.util.Objects;
13
14abstract class InferredContainmentLinkView extends TuplePreservingView<InferredContainment> {
15 protected final PartialRelation link;
16
17 protected InferredContainmentLinkView(Symbol<InferredContainment> symbol, String name, PartialRelation link) {
18 super(symbol, link.name() + "#" + name);
19 this.link = link;
20 }
21
22 @Override
23 public boolean equals(Object o) {
24 if (this == o) return true;
25 if (o == null || getClass() != o.getClass()) return false;
26 if (!super.equals(o)) return false;
27 InferredContainmentLinkView that = (InferredContainmentLinkView) o;
28 return Objects.equals(link, that.link);
29 }
30
31 @Override
32 public int hashCode() {
33 return Objects.hash(super.hashCode(), link);
34 }
35}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainmentLinkView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainmentLinkView.java
new file mode 100644
index 00000000..474942d6
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainmentLinkView.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.tuple.Tuple;
11
12class MustContainmentLinkView extends InferredContainmentLinkView {
13 public MustContainmentLinkView(Symbol<InferredContainment> symbol, PartialRelation link) {
14 super(symbol, "must", link);
15 }
16
17 @Override
18 protected boolean doFilter(Tuple key, InferredContainment value) {
19 return value.mustLinks().contains(link);
20 }
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainsView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainsView.java
new file mode 100644
index 00000000..6bc62a59
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/containment/MustContainsView.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import tools.refinery.store.query.view.TuplePreservingView;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.tuple.Tuple;
11
12class MustContainsView extends TuplePreservingView<InferredContainment> {
13 public MustContainsView(Symbol<InferredContainment> symbol) {
14 super(symbol, "contains#must");
15 }
16
17 @Override
18 protected boolean doFilter(Tuple key, InferredContainment value) {
19 return value.contains().must();
20 }
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java
new file mode 100644
index 00000000..c4a2f2b3
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/CrossReferenceUtils.java
@@ -0,0 +1,57 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.crossreference;
7
8import tools.refinery.store.query.dnf.Query;
9import tools.refinery.store.query.dnf.RelationalQuery;
10import tools.refinery.store.query.literal.Literal;
11import tools.refinery.store.query.term.NodeVariable;
12import tools.refinery.store.query.term.Variable;
13import tools.refinery.store.reasoning.literal.CountLowerBoundLiteral;
14import tools.refinery.store.reasoning.representation.PartialRelation;
15import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
16import tools.refinery.store.representation.cardinality.FiniteUpperCardinality;
17
18import java.util.ArrayList;
19import java.util.List;
20
21import static tools.refinery.store.query.literal.Literals.check;
22import static tools.refinery.store.query.term.int_.IntTerms.constant;
23import static tools.refinery.store.query.term.int_.IntTerms.less;
24import static tools.refinery.store.reasoning.literal.PartialLiterals.may;
25
26class CrossReferenceUtils {
27 private CrossReferenceUtils() {
28 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
29 }
30
31 public static RelationalQuery createMayHelper(PartialRelation linkType, PartialRelation type,
32 Multiplicity multiplicity, boolean inverse) {
33 String name;
34 NodeVariable variable;
35 List<Variable> arguments;
36 if (inverse) {
37 name = "Target";
38 variable = Variable.of("target");
39 arguments = List.of(Variable.of("source"), variable);
40 } else {
41 name = "Source";
42 variable = Variable.of("source");
43 arguments = List.of(variable, Variable.of("target"));
44 }
45 var builder = Query.builder(linkType.name() + "#mayNew" + name);
46 builder.parameter(variable);
47 var literals = new ArrayList<Literal>();
48 literals.add(may(type.call(variable)));
49 if (multiplicity.multiplicity().upperBound() instanceof FiniteUpperCardinality finiteUpperCardinality) {
50 var existingLinks = Variable.of("existingLinks", Integer.class);
51 literals.add(new CountLowerBoundLiteral(existingLinks, linkType, arguments));
52 literals.add(check(less(existingLinks, constant(finiteUpperCardinality.finiteUpperBound()))));
53 }
54 builder.clause(literals);
55 return builder.build();
56 }
57}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java
new file mode 100644
index 00000000..d8c6a5ea
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceInfo.java
@@ -0,0 +1,16 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.crossreference;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
10
11public record DirectedCrossReferenceInfo(PartialRelation sourceType, Multiplicity sourceMultiplicity,
12 PartialRelation targetType, Multiplicity targetMultiplicity) {
13 public boolean isConstrained() {
14 return sourceMultiplicity.isConstrained() || targetMultiplicity.isConstrained();
15 }
16}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java
new file mode 100644
index 00000000..0700f9f7
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceRefiner.java
@@ -0,0 +1,46 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.crossreference;
7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.refinement.ConcreteSymbolRefiner;
10import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
11import tools.refinery.store.reasoning.representation.PartialRelation;
12import tools.refinery.store.reasoning.representation.PartialSymbol;
13import tools.refinery.store.representation.Symbol;
14import tools.refinery.store.representation.TruthValue;
15import tools.refinery.store.tuple.Tuple;
16
17class DirectedCrossReferenceRefiner extends ConcreteSymbolRefiner<TruthValue, Boolean> {
18 private final PartialInterpretationRefiner<TruthValue, Boolean> sourceRefiner;
19 private final PartialInterpretationRefiner<TruthValue, Boolean> targetRefiner;
20
21 public DirectedCrossReferenceRefiner(ReasoningAdapter adapter, PartialSymbol<TruthValue, Boolean> partialSymbol,
22 Symbol<TruthValue> concreteSymbol, PartialRelation sourceType,
23 PartialRelation targetType) {
24 super(adapter, partialSymbol, concreteSymbol);
25 sourceRefiner = adapter.getRefiner(sourceType);
26 targetRefiner = adapter.getRefiner(targetType);
27 }
28
29 @Override
30 public boolean merge(Tuple key, TruthValue value) {
31 if (!super.merge(key, value)) {
32 return false;
33 }
34 if (value.must()) {
35 return sourceRefiner.merge(Tuple.of(key.get(0)), TruthValue.TRUE) &&
36 targetRefiner.merge(Tuple.of(key.get(1)), TruthValue.TRUE);
37 }
38 return true;
39 }
40
41 public static Factory<TruthValue, Boolean> of(Symbol<TruthValue> concreteSymbol, PartialRelation sourceType,
42 PartialRelation targetType) {
43 return (adapter, partialSymbol) -> new DirectedCrossReferenceRefiner(adapter, partialSymbol, concreteSymbol,
44 sourceType, targetType);
45 }
46}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java
new file mode 100644
index 00000000..9028337c
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/DirectedCrossReferenceTranslator.java
@@ -0,0 +1,94 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.crossreference;
7
8import tools.refinery.store.dse.transition.Rule;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.model.ModelStoreConfiguration;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.dnf.RelationalQuery;
13import tools.refinery.store.query.view.ForbiddenView;
14import tools.refinery.store.reasoning.lifting.DnfLifter;
15import tools.refinery.store.reasoning.literal.Concreteness;
16import tools.refinery.store.reasoning.literal.Modality;
17import tools.refinery.store.reasoning.refinement.RefinementBasedInitializer;
18import tools.refinery.store.reasoning.representation.PartialRelation;
19import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
20import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator;
21import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
22import tools.refinery.store.representation.Symbol;
23import tools.refinery.store.representation.TruthValue;
24
25import static tools.refinery.store.query.literal.Literals.not;
26import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add;
27import static tools.refinery.store.reasoning.literal.PartialLiterals.*;
28import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW;
29
30public class DirectedCrossReferenceTranslator implements ModelStoreConfiguration {
31 private final PartialRelation linkType;
32 private final DirectedCrossReferenceInfo info;
33 private final Symbol<TruthValue> symbol;
34
35 public DirectedCrossReferenceTranslator(PartialRelation linkType, DirectedCrossReferenceInfo info) {
36 this.linkType = linkType;
37 this.info = info;
38 symbol = Symbol.of(linkType.name(), 2, TruthValue.class, TruthValue.UNKNOWN);
39 }
40
41 @Override
42 public void apply(ModelStoreBuilder storeBuilder) {
43 var name = linkType.name();
44 var sourceType = info.sourceType();
45 var targetType = info.targetType();
46 var mayNewSource = createMayHelper(sourceType, info.sourceMultiplicity(), false);
47 var mayNewTarget = createMayHelper(targetType, info.targetMultiplicity(), true);
48 var forbiddenView = new ForbiddenView(symbol);
49 var mayName = DnfLifter.decorateName(name, Modality.MAY, Concreteness.PARTIAL);
50
51 storeBuilder.with(PartialRelationTranslator.of(linkType)
52 .symbol(symbol)
53 .may(Query.of(mayName, (builder, source, target) -> {
54 builder.clause(
55 mayNewSource.call(source),
56 mayNewTarget.call(target),
57 not(forbiddenView.call(source, target))
58 );
59 if (info.isConstrained()) {
60 // Violation of monotonicity:
61 // Edges violating upper multiplicity will not be marked as {@code ERROR}, but the
62 // corresponding error pattern will already mark the node as invalid.
63 builder.clause(
64 must(linkType.call(source, target)),
65 not(forbiddenView.call(source, target)),
66 may(sourceType.call(source)),
67 may(targetType.call(target))
68 );
69 }
70 }))
71 .refiner(DirectedCrossReferenceRefiner.of(symbol, sourceType, targetType))
72 .initializer(new RefinementBasedInitializer<>(linkType))
73 .decision(Rule.of(linkType.name(), (builder, source, target) -> builder
74 .clause(
75 may(linkType.call(source, target)),
76 not(candidateMust(linkType.call(source, target))),
77 not(MULTI_VIEW.call(source)),
78 not(MULTI_VIEW.call(target))
79 )
80 .action(
81 add(linkType, source, target)
82 ))));
83
84 storeBuilder.with(new InvalidMultiplicityErrorTranslator(sourceType, linkType, false,
85 info.sourceMultiplicity()));
86
87 storeBuilder.with(new InvalidMultiplicityErrorTranslator(targetType, linkType, true,
88 info.targetMultiplicity()));
89 }
90
91 private RelationalQuery createMayHelper(PartialRelation type, Multiplicity multiplicity, boolean inverse) {
92 return CrossReferenceUtils.createMayHelper(linkType, type, multiplicity, inverse);
93 }
94}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java
new file mode 100644
index 00000000..fe99bc54
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceInfo.java
@@ -0,0 +1,15 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.crossreference;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
10
11public record UndirectedCrossReferenceInfo(PartialRelation type, Multiplicity multiplicity) {
12 public boolean isConstrained() {
13 return multiplicity.isConstrained();
14 }
15}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java
new file mode 100644
index 00000000..43c1462b
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceRefiner.java
@@ -0,0 +1,44 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.crossreference;
7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.refinement.ConcreteSymbolRefiner;
10import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
11import tools.refinery.store.reasoning.representation.PartialRelation;
12import tools.refinery.store.reasoning.representation.PartialSymbol;
13import tools.refinery.store.representation.Symbol;
14import tools.refinery.store.representation.TruthValue;
15import tools.refinery.store.tuple.Tuple;
16
17class UndirectedCrossReferenceRefiner extends ConcreteSymbolRefiner<TruthValue, Boolean> {
18 private final PartialInterpretationRefiner<TruthValue, Boolean> sourceRefiner;
19
20 public UndirectedCrossReferenceRefiner(ReasoningAdapter adapter, PartialSymbol<TruthValue, Boolean> partialSymbol,
21 Symbol<TruthValue> concreteSymbol, PartialRelation sourceType) {
22 super(adapter, partialSymbol, concreteSymbol);
23 sourceRefiner = adapter.getRefiner(sourceType);
24 }
25
26 @Override
27 public boolean merge(Tuple key, TruthValue value) {
28 int source = key.get(0);
29 int target = key.get(1);
30 if (!super.merge(key, value) || !super.merge(Tuple.of(target, source), value)) {
31 return false;
32 }
33 if (value.must()) {
34 return sourceRefiner.merge(Tuple.of(source), TruthValue.TRUE) &&
35 sourceRefiner.merge(Tuple.of(target), TruthValue.TRUE);
36 }
37 return true;
38 }
39
40 public static Factory<TruthValue, Boolean> of(Symbol<TruthValue> concreteSymbol, PartialRelation sourceType) {
41 return (adapter, partialSymbol) -> new UndirectedCrossReferenceRefiner(adapter, partialSymbol, concreteSymbol,
42 sourceType);
43 }
44}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java
new file mode 100644
index 00000000..c554e2a4
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/crossreference/UndirectedCrossReferenceTranslator.java
@@ -0,0 +1,83 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.crossreference;
7
8import tools.refinery.store.dse.transition.Rule;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.model.ModelStoreConfiguration;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.view.ForbiddenView;
13import tools.refinery.store.reasoning.lifting.DnfLifter;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.literal.Modality;
16import tools.refinery.store.reasoning.refinement.RefinementBasedInitializer;
17import tools.refinery.store.reasoning.representation.PartialRelation;
18import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
19import tools.refinery.store.reasoning.translator.multiplicity.InvalidMultiplicityErrorTranslator;
20import tools.refinery.store.representation.Symbol;
21import tools.refinery.store.representation.TruthValue;
22
23import static tools.refinery.store.query.literal.Literals.not;
24import static tools.refinery.store.reasoning.actions.PartialActionLiterals.add;
25import static tools.refinery.store.reasoning.literal.PartialLiterals.*;
26import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.MULTI_VIEW;
27
28public class UndirectedCrossReferenceTranslator implements ModelStoreConfiguration {
29 private final PartialRelation linkType;
30 private final UndirectedCrossReferenceInfo info;
31 private final Symbol<TruthValue> symbol;
32
33 public UndirectedCrossReferenceTranslator(PartialRelation linkType, UndirectedCrossReferenceInfo info) {
34 this.linkType = linkType;
35 this.info = info;
36 symbol = Symbol.of(linkType.name(), 2, TruthValue.class, TruthValue.UNKNOWN);
37 }
38
39 @Override
40 public void apply(ModelStoreBuilder storeBuilder) {
41 var name = linkType.name();
42 var type = info.type();
43 var forbiddenView = new ForbiddenView(symbol);
44 var mayName = DnfLifter.decorateName(name, Modality.MAY, Concreteness.PARTIAL);
45
46 var mayNewSource = CrossReferenceUtils.createMayHelper(linkType, type, info.multiplicity(), false);
47
48 storeBuilder.with(PartialRelationTranslator.of(linkType)
49 .symbol(symbol)
50 .may(Query.of(mayName, (builder, source, target) -> {
51 builder.clause(
52 mayNewSource.call(source),
53 mayNewSource.call(target),
54 not(forbiddenView.call(source, target))
55 );
56 if (info.isConstrained()) {
57 // Violation of monotonicity:
58 // Edges violating upper multiplicity will not be marked as {@code ERROR}, but the
59 // corresponding error pattern will already mark the node as invalid.
60 builder.clause(
61 must(linkType.call(source, target)),
62 not(forbiddenView.call(source, target)),
63 may(type.call(source)),
64 may(type.call(target))
65 );
66 }
67 }))
68 .refiner(UndirectedCrossReferenceRefiner.of(symbol, type))
69 .initializer(new RefinementBasedInitializer<>(linkType))
70 .decision(Rule.of(linkType.name(), (builder, source, target) -> builder
71 .clause(
72 may(linkType.call(source, target)),
73 not(candidateMust(linkType.call(source, target))),
74 not(MULTI_VIEW.call(source)),
75 not(MULTI_VIEW.call(target))
76 )
77 .action(
78 add(linkType, source, target)
79 ))));
80
81 storeBuilder.with(new InvalidMultiplicityErrorTranslator(type, linkType, false, info.multiplicity()));
82 }
83}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ContainedTypeHierarchyBuilder.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ContainedTypeHierarchyBuilder.java
new file mode 100644
index 00000000..a21da3d4
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ContainedTypeHierarchyBuilder.java
@@ -0,0 +1,33 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.metamodel;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.TranslationException;
10import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator;
11import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyBuilder;
12
13import java.util.Collection;
14
15public class ContainedTypeHierarchyBuilder extends TypeHierarchyBuilder {
16 ContainedTypeHierarchyBuilder() {
17 }
18
19 boolean isInvalidType(PartialRelation type) {
20 return !typeInfoMap.containsKey(type);
21 }
22
23 void setContainedTypes(Collection<PartialRelation> containedTypes) {
24 for (var containedType : containedTypes) {
25 var currentInfo = typeInfoMap.get(containedType);
26 if (currentInfo == null) {
27 throw new TranslationException(containedType, "Invalid contained type: " + containedType);
28 }
29 var newInfo = currentInfo.addSupertype(ContainmentHierarchyTranslator.CONTAINED_SYMBOL);
30 typeInfoMap.put(containedType, newInfo);
31 }
32 }
33}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/Metamodel.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/Metamodel.java
new file mode 100644
index 00000000..72b836ff
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/Metamodel.java
@@ -0,0 +1,23 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.metamodel;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.containment.ContainmentInfo;
10import tools.refinery.store.reasoning.translator.crossreference.DirectedCrossReferenceInfo;
11import tools.refinery.store.reasoning.translator.crossreference.UndirectedCrossReferenceInfo;
12import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchy;
13
14import java.util.Map;
15
16public record Metamodel(TypeHierarchy typeHierarchy, Map<PartialRelation, ContainmentInfo> containmentHierarchy,
17 Map<PartialRelation, DirectedCrossReferenceInfo> directedCrossReferences,
18 Map<PartialRelation, UndirectedCrossReferenceInfo> undirectedCrossReferences,
19 Map<PartialRelation, PartialRelation> oppositeReferences) {
20 public static MetamodelBuilder builder() {
21 return new MetamodelBuilder();
22 }
23}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java
new file mode 100644
index 00000000..ad0288ed
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilder.java
@@ -0,0 +1,225 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.metamodel;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.TranslationException;
10import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator;
11import tools.refinery.store.reasoning.translator.containment.ContainmentInfo;
12import tools.refinery.store.reasoning.translator.crossreference.DirectedCrossReferenceInfo;
13import tools.refinery.store.reasoning.translator.crossreference.UndirectedCrossReferenceInfo;
14import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
15import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity;
16import tools.refinery.store.reasoning.translator.typehierarchy.TypeInfo;
17
18import java.util.*;
19
20public class MetamodelBuilder {
21 private final ContainedTypeHierarchyBuilder typeHierarchyBuilder = new ContainedTypeHierarchyBuilder();
22 private final Map<PartialRelation, ReferenceInfo> referenceInfoMap = new LinkedHashMap<>();
23 private final Set<PartialRelation> containedTypes = new HashSet<>();
24 private final Map<PartialRelation, ContainmentInfo> containmentHierarchy = new LinkedHashMap<>();
25 private final Map<PartialRelation, DirectedCrossReferenceInfo> directedCrossReferences = new LinkedHashMap<>();
26 private final Map<PartialRelation, UndirectedCrossReferenceInfo> undirectedCrossReferences = new LinkedHashMap<>();
27 private final Map<PartialRelation, PartialRelation> oppositeReferences = new LinkedHashMap<>();
28
29 MetamodelBuilder() {
30 typeHierarchyBuilder.type(ContainmentHierarchyTranslator.CONTAINED_SYMBOL, true);
31 }
32
33 public MetamodelBuilder type(PartialRelation partialRelation, TypeInfo typeInfo) {
34 typeHierarchyBuilder.type(partialRelation, typeInfo);
35 return this;
36
37 }
38
39 public MetamodelBuilder type(PartialRelation partialRelation, boolean abstractType,
40 PartialRelation... supertypes) {
41 typeHierarchyBuilder.type(partialRelation, abstractType, supertypes);
42 return this;
43 }
44
45 public MetamodelBuilder type(PartialRelation partialRelation, boolean abstractType,
46 Collection<PartialRelation> supertypes) {
47 typeHierarchyBuilder.type(partialRelation, abstractType, supertypes);
48 return this;
49 }
50
51 public MetamodelBuilder type(PartialRelation partialRelation, PartialRelation... supertypes) {
52 typeHierarchyBuilder.type(partialRelation, supertypes);
53 return this;
54 }
55
56 public MetamodelBuilder type(PartialRelation partialRelation, Collection<PartialRelation> supertypes) {
57 typeHierarchyBuilder.type(partialRelation, supertypes);
58 return this;
59 }
60
61 public MetamodelBuilder types(Collection<Map.Entry<PartialRelation, TypeInfo>> entries) {
62 typeHierarchyBuilder.types(entries);
63 return this;
64 }
65
66 public MetamodelBuilder types(Map<PartialRelation, TypeInfo> map) {
67 typeHierarchyBuilder.types(map);
68 return this;
69 }
70
71 public MetamodelBuilder reference(PartialRelation linkType, ReferenceInfo info) {
72 if (linkType.arity() != 2) {
73 throw new TranslationException(linkType,
74 "Only references of arity 2 are supported, got %s with %d instead".formatted(
75 linkType, linkType.arity()));
76 }
77 var putResult = referenceInfoMap.put(linkType, info);
78 if (putResult != null && !putResult.equals(info)) {
79 throw new TranslationException(linkType, "Duplicate reference info for partial relation: " + linkType);
80 }
81 return this;
82 }
83
84 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType, boolean containment,
85 Multiplicity multiplicity, PartialRelation targetType,
86 PartialRelation opposite) {
87 return reference(linkType, new ReferenceInfo(containment, sourceType, multiplicity, targetType, opposite));
88 }
89
90 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType, Multiplicity multiplicity,
91 PartialRelation targetType, PartialRelation opposite) {
92 return reference(linkType, sourceType, false, multiplicity, targetType, opposite);
93 }
94
95 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType,
96 boolean containment, PartialRelation targetType, PartialRelation opposite) {
97 return reference(linkType, sourceType, containment, UnconstrainedMultiplicity.INSTANCE, targetType, opposite);
98 }
99
100 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType, PartialRelation targetType,
101 PartialRelation opposite) {
102 return reference(linkType, sourceType, UnconstrainedMultiplicity.INSTANCE, targetType, opposite);
103 }
104
105 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType, boolean containment,
106 Multiplicity multiplicity, PartialRelation targetType) {
107 return reference(linkType, sourceType, containment, multiplicity, targetType, null);
108 }
109
110 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType, Multiplicity multiplicity,
111 PartialRelation targetType) {
112 return reference(linkType, sourceType, multiplicity, targetType, null);
113 }
114
115 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType, boolean containment,
116 PartialRelation targetType) {
117 return reference(linkType, sourceType, containment, targetType, null);
118 }
119
120 public MetamodelBuilder reference(PartialRelation linkType, PartialRelation sourceType,
121 PartialRelation targetType) {
122 return reference(linkType, sourceType, targetType, null);
123 }
124
125 public MetamodelBuilder references(Collection<Map.Entry<PartialRelation, ReferenceInfo>> entries) {
126 for (var entry : entries) {
127 reference(entry.getKey(), entry.getValue());
128 }
129 return this;
130 }
131
132 public MetamodelBuilder references(Map<PartialRelation, ReferenceInfo> map) {
133 return references(map.entrySet());
134 }
135
136 public Metamodel build() {
137 for (var entry : referenceInfoMap.entrySet()) {
138 var linkType = entry.getKey();
139 var info = entry.getValue();
140 processReferenceInfo(linkType, info);
141 }
142 typeHierarchyBuilder.setContainedTypes(containedTypes);
143 var typeHierarchy = typeHierarchyBuilder.build();
144 return new Metamodel(typeHierarchy, Collections.unmodifiableMap(containmentHierarchy),
145 Collections.unmodifiableMap(directedCrossReferences),
146 Collections.unmodifiableMap(undirectedCrossReferences),
147 Collections.unmodifiableMap(oppositeReferences));
148 }
149
150 private void processReferenceInfo(PartialRelation linkType, ReferenceInfo info) {
151 if (oppositeReferences.containsKey(linkType) || containmentHierarchy.containsKey(linkType)) {
152 // We already processed this reference while processing its opposite.
153 return;
154 }
155 var sourceType = info.sourceType();
156 var targetType = info.targetType();
157 if (typeHierarchyBuilder.isInvalidType(sourceType)) {
158 throw new TranslationException(linkType, "Source type %s of %s is not in type hierarchy"
159 .formatted(sourceType, linkType));
160 }
161 if (typeHierarchyBuilder.isInvalidType(targetType)) {
162 throw new TranslationException(linkType, "Target type %s of %s is not in type hierarchy"
163 .formatted(targetType, linkType));
164 }
165 var opposite = info.opposite();
166 Multiplicity targetMultiplicity = UnconstrainedMultiplicity.INSTANCE;
167 if (opposite != null) {
168 var oppositeInfo = referenceInfoMap.get(opposite);
169 validateOpposite(linkType, info, opposite, oppositeInfo);
170 targetMultiplicity = oppositeInfo.multiplicity();
171 if (oppositeInfo.containment()) {
172 // Skip processing this reference and process it once we encounter its containment opposite.
173 return;
174 }
175 if (opposite.equals(linkType)) {
176 if (!sourceType.equals(targetType)) {
177 throw new TranslationException(linkType,
178 "Target %s of undirected reference %s differs from source %s".formatted(
179 targetType, linkType, sourceType));
180 }
181 undirectedCrossReferences.put(linkType, new UndirectedCrossReferenceInfo(sourceType,
182 info.multiplicity()));
183 return;
184 }
185 oppositeReferences.put(opposite, linkType);
186 }
187 if (info.containment()) {
188 if (!UnconstrainedMultiplicity.INSTANCE.equals(targetMultiplicity)) {
189 throw new TranslationException(opposite, "Invalid opposite %s with multiplicity %s of containment %s"
190 .formatted(opposite, targetMultiplicity, linkType));
191 }
192 containedTypes.add(targetType);
193 containmentHierarchy.put(linkType, new ContainmentInfo(sourceType, info.multiplicity(), targetType));
194 return;
195 }
196 directedCrossReferences.put(linkType, new DirectedCrossReferenceInfo(sourceType, info.multiplicity(),
197 targetType, targetMultiplicity));
198 }
199
200 private static void validateOpposite(PartialRelation linkType, ReferenceInfo info, PartialRelation opposite,
201 ReferenceInfo oppositeInfo) {
202 var sourceType = info.sourceType();
203 var targetType = info.targetType();
204 if (oppositeInfo == null) {
205 throw new TranslationException(linkType, "Opposite %s of %s is not defined"
206 .formatted(opposite, linkType));
207 }
208 if (!linkType.equals(oppositeInfo.opposite())) {
209 throw new TranslationException(opposite, "Expected %s to have opposite %s, got %s instead"
210 .formatted(opposite, linkType, oppositeInfo.opposite()));
211 }
212 if (!targetType.equals(oppositeInfo.sourceType())) {
213 throw new TranslationException(linkType, "Expected %s to have source type %s, got %s instead"
214 .formatted(opposite, targetType, oppositeInfo.sourceType()));
215 }
216 if (!sourceType.equals(oppositeInfo.targetType())) {
217 throw new TranslationException(linkType, "Expected %s to have target type %s, got %s instead"
218 .formatted(opposite, sourceType, oppositeInfo.targetType()));
219 }
220 if (oppositeInfo.containment() && info.containment()) {
221 throw new TranslationException(opposite, "Opposite %s of containment %s cannot be containment"
222 .formatted(opposite, linkType));
223 }
224 }
225}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTranslator.java
new file mode 100644
index 00000000..5afa58f2
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTranslator.java
@@ -0,0 +1,37 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.metamodel;
7
8import tools.refinery.store.model.ModelStoreBuilder;
9import tools.refinery.store.model.ModelStoreConfiguration;
10import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator;
11import tools.refinery.store.reasoning.translator.crossreference.DirectedCrossReferenceTranslator;
12import tools.refinery.store.reasoning.translator.crossreference.UndirectedCrossReferenceTranslator;
13import tools.refinery.store.reasoning.translator.opposite.OppositeRelationTranslator;
14import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator;
15
16public class MetamodelTranslator implements ModelStoreConfiguration {
17 private final Metamodel metamodel;
18
19 public MetamodelTranslator(Metamodel metamodel) {
20 this.metamodel = metamodel;
21 }
22
23 @Override
24 public void apply(ModelStoreBuilder storeBuilder) {
25 storeBuilder.with(new TypeHierarchyTranslator(metamodel.typeHierarchy()));
26 storeBuilder.with(new ContainmentHierarchyTranslator(metamodel.containmentHierarchy()));
27 for (var entry : metamodel.directedCrossReferences().entrySet()) {
28 storeBuilder.with(new DirectedCrossReferenceTranslator(entry.getKey(), entry.getValue()));
29 }
30 for (var entry : metamodel.undirectedCrossReferences().entrySet()) {
31 storeBuilder.with(new UndirectedCrossReferenceTranslator(entry.getKey(), entry.getValue()));
32 }
33 for (var entry : metamodel.oppositeReferences().entrySet()) {
34 storeBuilder.with(new OppositeRelationTranslator(entry.getKey(), entry.getValue()));
35 }
36 }
37}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java
new file mode 100644
index 00000000..9a6b4012
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/metamodel/ReferenceInfo.java
@@ -0,0 +1,13 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.metamodel;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity;
10
11public record ReferenceInfo(boolean containment, PartialRelation sourceType, Multiplicity multiplicity,
12 PartialRelation targetType, PartialRelation opposite) {
13}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java
new file mode 100644
index 00000000..d8db4ec4
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRefiner.java
@@ -0,0 +1,64 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.reasoning.ReasoningAdapter;
10import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner;
11import tools.refinery.store.reasoning.representation.PartialSymbol;
12import tools.refinery.store.representation.Symbol;
13import tools.refinery.store.representation.TruthValue;
14import tools.refinery.store.representation.cardinality.CardinalityInterval;
15import tools.refinery.store.representation.cardinality.CardinalityIntervals;
16import tools.refinery.store.tuple.Tuple;
17
18public class EqualsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> {
19 private final Interpretation<CardinalityInterval> countInterpretation;
20
21 private EqualsRefiner(ReasoningAdapter adapter, PartialSymbol<TruthValue, Boolean> partialSymbol,
22 Symbol<CardinalityInterval> countSymbol) {
23 super(adapter, partialSymbol);
24 countInterpretation = adapter.getModel().getInterpretation(countSymbol);
25 }
26
27 @Override
28 public boolean merge(Tuple key, TruthValue value) {
29 if (value == TruthValue.UNKNOWN) {
30 return true;
31 }
32 if (value == TruthValue.ERROR) {
33 return false;
34 }
35 int left = key.get(0);
36 int right = key.get(1);
37 boolean isDiagonal = left == right;
38 if (isDiagonal && value == TruthValue.FALSE) {
39 return false;
40 }
41 if (!isDiagonal) {
42 return !value.may();
43 }
44 if (value != TruthValue.TRUE) {
45 throw new IllegalArgumentException("Unknown TruthValue: " + value);
46 }
47 // {@code isDiagonal} is true, so this could be {@code left} or {@code right}.
48 var unaryKey = Tuple.of(left);
49 var currentCount = countInterpretation.get(unaryKey);
50 if (currentCount == null) {
51 return false;
52 }
53 var newCount = currentCount.meet(CardinalityIntervals.LONE);
54 if (newCount.isEmpty()) {
55 return false;
56 }
57 countInterpretation.put(unaryKey, newCount);
58 return true;
59 }
60
61 public static Factory<TruthValue, Boolean> of(Symbol<CardinalityInterval> countSymbol) {
62 return (adapter, partialSymbol) -> new EqualsRefiner(adapter, partialSymbol, countSymbol);
63 }
64}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java
new file mode 100644
index 00000000..61b9488c
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/EqualsRelationRewriter.java
@@ -0,0 +1,85 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.query.dnf.Query;
9import tools.refinery.store.query.dnf.RelationalQuery;
10import tools.refinery.store.query.literal.AbstractCallLiteral;
11import tools.refinery.store.query.literal.CallLiteral;
12import tools.refinery.store.query.literal.Literal;
13import tools.refinery.store.query.term.Variable;
14import tools.refinery.store.query.view.AnySymbolView;
15import tools.refinery.store.reasoning.interpretation.QueryBasedRelationRewriter;
16import tools.refinery.store.reasoning.literal.Concreteness;
17import tools.refinery.store.reasoning.literal.Modality;
18import tools.refinery.store.representation.cardinality.UpperCardinalities;
19import tools.refinery.store.representation.cardinality.UpperCardinality;
20
21import java.util.List;
22import java.util.Set;
23
24import static tools.refinery.store.query.literal.Literals.check;
25import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.constant;
26import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.lessEq;
27
28class EqualsRelationRewriter extends QueryBasedRelationRewriter {
29 private EqualsRelationRewriter(RelationalQuery may, RelationalQuery must) {
30 super(may, must, may, may);
31 }
32
33 @Override
34 public List<Literal> rewriteLiteral(Set<Variable> positiveVariables, AbstractCallLiteral literal,
35 Modality modality, Concreteness concreteness) {
36 if (!(literal instanceof CallLiteral callLiteral)) {
37 return super.rewriteLiteral(positiveVariables, literal, modality, concreteness);
38 }
39 var left = callLiteral.getArguments().get(0).asNodeVariable();
40 var right = callLiteral.getArguments().get(1).asNodeVariable();
41 boolean useMay = modality == Modality.MAY || concreteness == Concreteness.CANDIDATE;
42 return switch (callLiteral.getPolarity()) {
43 case POSITIVE, TRANSITIVE -> {
44 if (useMay) {
45 if (positiveVariables.contains(left) || positiveVariables.contains(right)) {
46 // No need to enumerate arguments if at least one is already bound, since they will be unified.
47 yield List.of(left.isEquivalent(right));
48 } else {
49 yield List.of(
50 left.isEquivalent(right),
51 getMay().call(left, right)
52 );
53 }
54 } else {
55 yield List.of(
56 left.isEquivalent(right),
57 getMust().call(left, right)
58 );
59 }
60 }
61 case NEGATIVE -> {
62 if (useMay) {
63 yield List.of(left.notEquivalent(right));
64 } else {
65 yield super.rewriteLiteral(positiveVariables, literal, modality, concreteness);
66 }
67 }
68 };
69 }
70
71 public static EqualsRelationRewriter of(AnySymbolView upperCardinalityView) {
72 var may = Query.of("equals#may", (builder, p1, p2) -> builder
73 .clause(
74 p1.isEquivalent(p2),
75 upperCardinalityView.call(p1, Variable.of(UpperCardinality.class))
76 ));
77 var must = Query.of("equals#must", (builder, p1, p2) -> builder
78 .clause(UpperCardinality.class, upper -> List.of(
79 p1.isEquivalent(p2),
80 upperCardinalityView.call(p1, upper),
81 check(lessEq(upper, constant(UpperCardinalities.ONE)))
82 )));
83 return new EqualsRelationRewriter(may, must);
84 }
85}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java
new file mode 100644
index 00000000..f134fe92
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/ExistsRefiner.java
@@ -0,0 +1,55 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.reasoning.ReasoningAdapter;
10import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner;
11import tools.refinery.store.reasoning.representation.PartialSymbol;
12import tools.refinery.store.representation.Symbol;
13import tools.refinery.store.representation.TruthValue;
14import tools.refinery.store.representation.cardinality.CardinalityInterval;
15import tools.refinery.store.representation.cardinality.CardinalityIntervals;
16import tools.refinery.store.tuple.Tuple;
17
18public class ExistsRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> {
19 private final Interpretation<CardinalityInterval> countInterpretation;
20
21 private ExistsRefiner(ReasoningAdapter adapter, PartialSymbol<TruthValue, Boolean> partialSymbol,
22 Symbol<CardinalityInterval> countSymbol) {
23 super(adapter, partialSymbol);
24 countInterpretation = adapter.getModel().getInterpretation(countSymbol);
25 }
26
27 @Override
28 public boolean merge(Tuple key, TruthValue value) {
29 var currentCount = countInterpretation.get(key);
30 if (currentCount == null) {
31 return false;
32 }
33 CardinalityInterval newCount;
34 switch (value) {
35 case UNKNOWN -> {
36 return true;
37 }
38 case TRUE -> newCount = currentCount.meet(CardinalityIntervals.SOME);
39 case FALSE -> newCount = currentCount.meet(CardinalityIntervals.NONE);
40 case ERROR -> {
41 return false;
42 }
43 default -> throw new IllegalArgumentException("Unknown TruthValue: " + value);
44 }
45 if (newCount.isEmpty()) {
46 return false;
47 }
48 countInterpretation.put(key, newCount);
49 return true;
50 }
51
52 public static Factory<TruthValue, Boolean> of(Symbol<CardinalityInterval> countSymbol) {
53 return (adapter, partialSymbol) -> new ExistsRefiner(adapter, partialSymbol, countSymbol);
54 }
55}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java
new file mode 100644
index 00000000..9873888c
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/LowerCardinalityView.java
@@ -0,0 +1,22 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.query.term.Parameter;
9import tools.refinery.store.query.view.AbstractFunctionView;
10import tools.refinery.store.representation.Symbol;
11import tools.refinery.store.representation.cardinality.CardinalityInterval;
12
13class LowerCardinalityView extends AbstractFunctionView<CardinalityInterval> {
14 public LowerCardinalityView(Symbol<CardinalityInterval> symbol) {
15 super(symbol, "lower", new Parameter(Integer.class));
16 }
17
18 @Override
19 protected Object forwardMapValue(CardinalityInterval value) {
20 return value.lowerBound();
21 }
22}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java
new file mode 100644
index 00000000..89918155
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectInitializer.java
@@ -0,0 +1,135 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import org.jetbrains.annotations.NotNull;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.reasoning.ReasoningAdapter;
11import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
12import tools.refinery.store.reasoning.seed.ModelSeed;
13import tools.refinery.store.reasoning.translator.TranslationException;
14import tools.refinery.store.representation.Symbol;
15import tools.refinery.store.representation.TruthValue;
16import tools.refinery.store.representation.cardinality.CardinalityInterval;
17import tools.refinery.store.representation.cardinality.CardinalityIntervals;
18import tools.refinery.store.tuple.Tuple;
19
20import java.util.Arrays;
21import java.util.HashMap;
22import java.util.function.Function;
23
24class MultiObjectInitializer implements PartialModelInitializer {
25 private final Symbol<CardinalityInterval> countSymbol;
26
27 public MultiObjectInitializer(Symbol<CardinalityInterval> countSymbol) {
28 this.countSymbol = countSymbol;
29 }
30
31 @Override
32 public void initialize(Model model, ModelSeed modelSeed) {
33 var intervals = initializeIntervals(model, modelSeed);
34 initializeExists(intervals, model, modelSeed);
35 initializeEquals(intervals, model, modelSeed);
36 var countInterpretation = model.getInterpretation(countSymbol);
37 var uniqueTable = new HashMap<CardinalityInterval, CardinalityInterval>();
38 for (int i = 0; i < intervals.length; i++) {
39 var interval = intervals[i];
40 if (interval.isEmpty()) {
41 throw new TranslationException(ReasoningAdapter.EXISTS_SYMBOL,
42 "Inconsistent existence or equality for node " + i);
43 }
44 var uniqueInterval = uniqueTable.computeIfAbsent(intervals[i], Function.identity());
45 countInterpretation.put(Tuple.of(i), uniqueInterval);
46 }
47 }
48
49 @NotNull
50 private CardinalityInterval[] initializeIntervals(Model model, ModelSeed modelSeed) {
51 var intervals = new CardinalityInterval[modelSeed.getNodeCount()];
52 if (modelSeed.containsSeed(MultiObjectTranslator.COUNT_SYMBOL)) {
53 Arrays.fill(intervals, CardinalityIntervals.ONE);
54 var cursor = modelSeed.getCursor(MultiObjectTranslator.COUNT_SYMBOL, CardinalityIntervals.ONE);
55 while (cursor.move()) {
56 model.checkCancelled();
57 int i = cursor.getKey().get(0);
58 checkNodeId(intervals, i);
59 intervals[i] = cursor.getValue();
60 }
61 } else {
62 Arrays.fill(intervals, CardinalityIntervals.SET);
63 if (!modelSeed.containsSeed(ReasoningAdapter.EXISTS_SYMBOL) ||
64 !modelSeed.containsSeed(ReasoningAdapter.EQUALS_SYMBOL)) {
65 throw new TranslationException(MultiObjectTranslator.COUNT_SYMBOL,
66 "Seed for %s and %s is required if there is no seed for %s".formatted(
67 ReasoningAdapter.EXISTS_SYMBOL, ReasoningAdapter.EQUALS_SYMBOL,
68 MultiObjectTranslator.COUNT_SYMBOL));
69 }
70 }
71 return intervals;
72 }
73
74 private void initializeExists(CardinalityInterval[] intervals, Model model, ModelSeed modelSeed) {
75 if (!modelSeed.containsSeed(ReasoningAdapter.EXISTS_SYMBOL)) {
76 return;
77 }
78 var cursor = modelSeed.getCursor(ReasoningAdapter.EXISTS_SYMBOL, TruthValue.UNKNOWN);
79 while (cursor.move()) {
80 model.checkCancelled();
81 int i = cursor.getKey().get(0);
82 checkNodeId(intervals, i);
83 switch (cursor.getValue()) {
84 case TRUE -> intervals[i] = intervals[i].meet(CardinalityIntervals.SOME);
85 case FALSE -> intervals[i] = intervals[i].meet(CardinalityIntervals.NONE);
86 case ERROR -> throw new TranslationException(ReasoningAdapter.EXISTS_SYMBOL,
87 "Inconsistent existence for node " + i);
88 default -> throw new TranslationException(ReasoningAdapter.EXISTS_SYMBOL,
89 "Invalid existence truth value %s for node %d".formatted(cursor.getValue(), i));
90 }
91 }
92 }
93
94 private void initializeEquals(CardinalityInterval[] intervals, Model model, ModelSeed modelSeed) {
95 if (!modelSeed.containsSeed(ReasoningAdapter.EQUALS_SYMBOL)) {
96 return;
97 }
98 var seed = modelSeed.getSeed(ReasoningAdapter.EQUALS_SYMBOL);
99 var cursor = seed.getCursor(TruthValue.FALSE, modelSeed.getNodeCount());
100 while (cursor.move()) {
101 model.checkCancelled();
102 var key = cursor.getKey();
103 int i = key.get(0);
104 int otherIndex = key.get(1);
105 if (i != otherIndex) {
106 throw new TranslationException(ReasoningAdapter.EQUALS_SYMBOL,
107 "Off-diagonal equivalence (%d, %d) is not permitted".formatted(i, otherIndex));
108 }
109 checkNodeId(intervals, i);
110 switch (cursor.getValue()) {
111 case TRUE -> intervals[i] = intervals[i].meet(CardinalityIntervals.LONE);
112 case UNKNOWN -> {
113 // Nothing do to, {@code intervals} is initialized with unknown equality.
114 }
115 case ERROR -> throw new TranslationException(ReasoningAdapter.EQUALS_SYMBOL,
116 "Inconsistent equality for node " + i);
117 default -> throw new TranslationException(ReasoningAdapter.EQUALS_SYMBOL,
118 "Invalid equality truth value %s for node %d".formatted(cursor.getValue(), i));
119 }
120 }
121 for (int i = 0; i < intervals.length; i++) {
122 model.checkCancelled();
123 if (seed.get(Tuple.of(i, i)) == TruthValue.FALSE) {
124 throw new TranslationException(ReasoningAdapter.EQUALS_SYMBOL, "Inconsistent equality for node " + i);
125 }
126 }
127 }
128
129 private void checkNodeId(CardinalityInterval[] intervals, int nodeId) {
130 if (nodeId < 0 || nodeId >= intervals.length) {
131 throw new IllegalArgumentException("Expected node id %d to be lower than model size %d"
132 .formatted(nodeId, intervals.length));
133 }
134 }
135}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java
new file mode 100644
index 00000000..e48934d8
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectStorageRefiner.java
@@ -0,0 +1,45 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.reasoning.refinement.StorageRefiner;
11import tools.refinery.store.representation.Symbol;
12import tools.refinery.store.representation.cardinality.CardinalityInterval;
13import tools.refinery.store.representation.cardinality.CardinalityIntervals;
14import tools.refinery.store.tuple.Tuple;
15
16class MultiObjectStorageRefiner implements StorageRefiner {
17 private final Interpretation<CardinalityInterval> countInterpretation;
18
19 public MultiObjectStorageRefiner(Symbol<CardinalityInterval> countSymbol, Model model) {
20 countInterpretation = model.getInterpretation(countSymbol);
21 }
22
23 @Override
24 public boolean split(int parentNode, int childNode) {
25 var parentKey = Tuple.of(parentNode);
26 var parentCount = countInterpretation.get(parentKey);
27 if (parentCount == null) {
28 return false;
29 }
30 var newParentCount = parentCount.take(1);
31 if (newParentCount.isEmpty()) {
32 return false;
33 }
34 var childKey = Tuple.of(childNode);
35 countInterpretation.put(parentKey, newParentCount);
36 countInterpretation.put(childKey, CardinalityIntervals.ONE);
37 return true;
38 }
39
40 @Override
41 public boolean cleanup(int nodeToDelete) {
42 var previousCount = countInterpretation.put(Tuple.of(nodeToDelete), null);
43 return previousCount.lowerBound() == 0;
44 }
45}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java
new file mode 100644
index 00000000..97fda9d5
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java
@@ -0,0 +1,107 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.dse.propagation.PropagationBuilder;
9import tools.refinery.store.dse.transition.Rule;
10import tools.refinery.store.dse.transition.objectives.Criteria;
11import tools.refinery.store.dse.transition.objectives.Objectives;
12import tools.refinery.store.model.ModelStoreBuilder;
13import tools.refinery.store.model.ModelStoreConfiguration;
14import tools.refinery.store.query.dnf.Query;
15import tools.refinery.store.query.literal.Literals;
16import tools.refinery.store.query.term.Variable;
17import tools.refinery.store.query.term.int_.IntTerms;
18import tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms;
19import tools.refinery.store.query.view.AnySymbolView;
20import tools.refinery.store.reasoning.ReasoningAdapter;
21import tools.refinery.store.reasoning.ReasoningBuilder;
22import tools.refinery.store.reasoning.actions.PartialActionLiterals;
23import tools.refinery.store.reasoning.representation.PartialFunction;
24import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
25import tools.refinery.store.reasoning.translator.RoundingMode;
26import tools.refinery.store.representation.Symbol;
27import tools.refinery.store.representation.cardinality.CardinalityDomain;
28import tools.refinery.store.representation.cardinality.CardinalityInterval;
29import tools.refinery.store.representation.cardinality.UpperCardinalities;
30import tools.refinery.store.representation.cardinality.UpperCardinality;
31
32import java.util.List;
33
34import static tools.refinery.store.query.literal.Literals.check;
35import static tools.refinery.store.query.term.int_.IntTerms.*;
36
37public class MultiObjectTranslator implements ModelStoreConfiguration {
38 public static final Symbol<CardinalityInterval> COUNT_STORAGE = Symbol.of("COUNT", 1, CardinalityInterval.class,
39 null);
40 public static final AnySymbolView LOWER_CARDINALITY_VIEW = new LowerCardinalityView(COUNT_STORAGE);
41 public static final AnySymbolView UPPER_CARDINALITY_VIEW = new UpperCardinalityView(COUNT_STORAGE);
42 public static final AnySymbolView MULTI_VIEW = new MultiView(COUNT_STORAGE);
43 public static final PartialFunction<CardinalityInterval, Integer> COUNT_SYMBOL = new PartialFunction<>("COUNT", 1,
44 CardinalityDomain.INSTANCE);
45
46 @Override
47 public void apply(ModelStoreBuilder storeBuilder) {
48 storeBuilder.symbol(COUNT_STORAGE);
49
50 var aboveLowerBound = Query.of("count#aboveLowerBound", Integer.class, (builder, node, output) -> builder
51 .clause(
52 MULTI_VIEW.call(node),
53 LOWER_CARDINALITY_VIEW.call(node, output),
54 check(greater(output, IntTerms.constant(0)))
55 ));
56 var missingCardinality = Query.of("count#missing", Integer.class, (builder, output) -> builder
57 .clause(
58 output.assign(aboveLowerBound.aggregate(INT_SUM, Variable.of()))
59 ));
60
61 storeBuilder.with(PartialRelationTranslator.of(ReasoningAdapter.EXISTS_SYMBOL)
62 .may(Query.of("exists#may", (builder, p1) -> builder
63 .clause(UpperCardinality.class, upper -> List.of(
64 UPPER_CARDINALITY_VIEW.call(p1, upper),
65 check(UpperCardinalityTerms.greaterEq(upper,
66 UpperCardinalityTerms.constant(UpperCardinalities.ONE)))
67 ))))
68 .must(Query.of("exists#must", (builder, p1) -> builder
69 .clause(Integer.class, lower -> List.of(
70 LOWER_CARDINALITY_VIEW.call(p1, lower),
71 check(greaterEq(lower, constant(1)))
72 ))))
73 .candidate(Query.of("exists#candidate", (builder, p1) -> builder
74 .clause(
75 LOWER_CARDINALITY_VIEW.call(p1, Variable.of(Integer.class)),
76 Literals.not(MULTI_VIEW.call(p1))
77 )))
78 .roundingMode(RoundingMode.PREFER_FALSE)
79 .refiner(ExistsRefiner.of(COUNT_STORAGE))
80 .exclude(null)
81 .accept(Criteria.whenNoMatch(aboveLowerBound))
82 .objective(Objectives.value(missingCardinality)));
83
84 storeBuilder.with(PartialRelationTranslator.of(ReasoningAdapter.EQUALS_SYMBOL)
85 .rewriter(EqualsRelationRewriter.of(UPPER_CARDINALITY_VIEW))
86 .refiner(EqualsRefiner.of(COUNT_STORAGE))
87 .exclude(null)
88 .accept(null)
89 .objective(null));
90
91 var reasoningBuilder = storeBuilder.getAdapter(ReasoningBuilder.class);
92 reasoningBuilder.initializer(new MultiObjectInitializer(COUNT_STORAGE));
93 reasoningBuilder.storageRefiner(COUNT_STORAGE, MultiObjectStorageRefiner::new);
94
95 storeBuilder.tryGetAdapter(PropagationBuilder.class)
96 .ifPresent(propagationBuilder -> propagationBuilder.rule(
97 Rule.of("exists#cleanup", (builder, node) -> builder
98 .clause(UpperCardinality.class, upper -> List.of(
99 UPPER_CARDINALITY_VIEW.call(node, upper),
100 check(UpperCardinalityTerms.less(upper,
101 UpperCardinalityTerms.constant(UpperCardinalities.ONE)))
102 ))
103 .action(
104 PartialActionLiterals.cleanup(node)
105 ))));
106 }
107}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java
new file mode 100644
index 00000000..498bcd83
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiView.java
@@ -0,0 +1,23 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.query.view.TuplePreservingView;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.representation.cardinality.CardinalityInterval;
11import tools.refinery.store.representation.cardinality.CardinalityIntervals;
12import tools.refinery.store.tuple.Tuple;
13
14class MultiView extends TuplePreservingView<CardinalityInterval> {
15 protected MultiView(Symbol<CardinalityInterval> symbol) {
16 super(symbol, "multi");
17 }
18
19 @Override
20 protected boolean doFilter(Tuple key, CardinalityInterval value) {
21 return !CardinalityIntervals.ONE.equals(value);
22 }
23}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java
new file mode 100644
index 00000000..6be6ae1b
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/UpperCardinalityView.java
@@ -0,0 +1,23 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import tools.refinery.store.query.term.Parameter;
9import tools.refinery.store.query.view.AbstractFunctionView;
10import tools.refinery.store.representation.Symbol;
11import tools.refinery.store.representation.cardinality.CardinalityInterval;
12import tools.refinery.store.representation.cardinality.UpperCardinality;
13
14class UpperCardinalityView extends AbstractFunctionView<CardinalityInterval> {
15 public UpperCardinalityView(Symbol<CardinalityInterval> symbol) {
16 super(symbol, "upper", new Parameter(UpperCardinality.class));
17 }
18
19 @Override
20 protected Object forwardMapValue(CardinalityInterval value) {
21 return value.upperBound();
22 }
23}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java
new file mode 100644
index 00000000..9db9cc96
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/ConstrainedMultiplicity.java
@@ -0,0 +1,37 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiplicity;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.TranslationException;
10import tools.refinery.store.representation.cardinality.CardinalityInterval;
11import tools.refinery.store.representation.cardinality.CardinalityIntervals;
12import tools.refinery.store.representation.cardinality.NonEmptyCardinalityInterval;
13
14public record ConstrainedMultiplicity(NonEmptyCardinalityInterval multiplicity, PartialRelation errorSymbol)
15 implements Multiplicity {
16 public ConstrainedMultiplicity {
17 if (multiplicity.equals(CardinalityIntervals.SET)) {
18 throw new TranslationException(errorSymbol, "Expected a constrained cardinality interval");
19 }
20 if (errorSymbol.arity() != 1) {
21 throw new TranslationException(errorSymbol, "Expected error symbol %s to have arity 1, got %d instead"
22 .formatted(errorSymbol, errorSymbol.arity()));
23 }
24 }
25
26 public static ConstrainedMultiplicity of(CardinalityInterval multiplicity, PartialRelation errorSymbol) {
27 if (!(multiplicity instanceof NonEmptyCardinalityInterval nonEmptyCardinalityInterval)) {
28 throw new TranslationException(errorSymbol, "Inconsistent multiplicity");
29 }
30 return new ConstrainedMultiplicity(nonEmptyCardinalityInterval, errorSymbol);
31 }
32
33 @Override
34 public boolean isConstrained() {
35 return true;
36 }
37}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java
new file mode 100644
index 00000000..ba208156
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/InvalidMultiplicityErrorTranslator.java
@@ -0,0 +1,141 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiplicity;
7
8import tools.refinery.store.dse.transition.objectives.Objectives;
9import tools.refinery.store.model.ModelStoreBuilder;
10import tools.refinery.store.model.ModelStoreConfiguration;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.term.Variable;
13import tools.refinery.store.query.term.int_.IntTerms;
14import tools.refinery.store.reasoning.ReasoningAdapter;
15import tools.refinery.store.reasoning.lifting.DnfLifter;
16import tools.refinery.store.reasoning.literal.*;
17import tools.refinery.store.reasoning.representation.PartialRelation;
18import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
19import tools.refinery.store.reasoning.translator.TranslationException;
20import tools.refinery.store.representation.cardinality.FiniteUpperCardinality;
21import tools.refinery.store.representation.cardinality.UpperCardinalities;
22import tools.refinery.store.representation.cardinality.UpperCardinality;
23
24import java.util.List;
25
26import static tools.refinery.store.query.literal.Literals.check;
27import static tools.refinery.store.query.term.int_.IntTerms.INT_SUM;
28import static tools.refinery.store.query.term.int_.IntTerms.constant;
29import static tools.refinery.store.query.term.int_.IntTerms.greater;
30import static tools.refinery.store.query.term.int_.IntTerms.sub;
31import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.constant;
32import static tools.refinery.store.query.term.uppercardinality.UpperCardinalityTerms.less;
33import static tools.refinery.store.reasoning.literal.PartialLiterals.candidateMust;
34import static tools.refinery.store.reasoning.literal.PartialLiterals.must;
35
36public class InvalidMultiplicityErrorTranslator implements ModelStoreConfiguration {
37 private final PartialRelation nodeType;
38 private final PartialRelation linkType;
39 private final boolean inverse;
40 private final Multiplicity multiplicity;
41
42 public InvalidMultiplicityErrorTranslator(PartialRelation nodeType, PartialRelation linkType,
43 boolean inverse, Multiplicity multiplicity) {
44 if (nodeType.arity() != 1) {
45 throw new TranslationException(linkType, "Node type must be of arity 1, got %s with arity %d instead"
46 .formatted(nodeType, nodeType.arity()));
47 }
48 if (linkType.arity() != 2) {
49 throw new TranslationException(linkType, "Link type must be of arity 2, got %s with arity %d instead"
50 .formatted(linkType, linkType.arity()));
51 }
52 this.nodeType = nodeType;
53 this.linkType = linkType;
54 this.inverse = inverse;
55 this.multiplicity = multiplicity;
56 }
57
58 @Override
59 public void apply(ModelStoreBuilder storeBuilder) {
60 if (!(multiplicity instanceof ConstrainedMultiplicity constrainedMultiplicity)) {
61 return;
62 }
63
64 var name = constrainedMultiplicity.errorSymbol().name();
65 var cardinalityInterval = constrainedMultiplicity.multiplicity();
66 var node = Variable.of("node");
67 var other = Variable.of("other");
68 List<Variable> arguments = inverse ? List.of(other, node) : List.of(node, other);
69 var mustBuilder = Query.builder(DnfLifter.decorateName(name, Modality.MUST, Concreteness.PARTIAL))
70 .parameter(node);
71 var candidateMayBuilder = Query.builder(DnfLifter.decorateName(name, Modality.MAY, Concreteness.PARTIAL))
72 .parameter(node);
73 var candidateMustBuilder = Query.builder(DnfLifter.decorateName(name, Modality.MUST, Concreteness.PARTIAL))
74 .parameter(node);
75 var missingOutput = Variable.of("missing", Integer.class);
76 var missingBuilder = Query.builder(name + "#missingMultiplicity").parameter(node).output(missingOutput);
77
78 int lowerBound = cardinalityInterval.lowerBound();
79 if (lowerBound > 0) {
80 var lowerBoundCardinality = UpperCardinalities.atMost(lowerBound);
81 mustBuilder.clause(UpperCardinality.class, existingContents -> List.of(
82 must(nodeType.call(node)),
83 new CountUpperBoundLiteral(existingContents, linkType, arguments),
84 check(less(existingContents, constant(lowerBoundCardinality)))
85 ));
86 candidateMayBuilder.clause(Integer.class, existingContents -> List.of(
87 candidateMust(nodeType.call(node)),
88 new CountCandidateLowerBoundLiteral(existingContents, linkType, arguments),
89 check(IntTerms.less(existingContents, constant(lowerBound)))
90 ));
91 candidateMustBuilder.clause(Integer.class, existingContents -> List.of(
92 candidateMust(nodeType.call(node)),
93 new CountCandidateUpperBoundLiteral(existingContents, linkType, arguments),
94 check(IntTerms.less(existingContents, constant(lowerBound)))
95 ));
96 missingBuilder.clause(Integer.class, existingContents -> List.of(
97 candidateMust(nodeType.call(node)),
98 new CountCandidateLowerBoundLiteral(existingContents, linkType, arguments),
99 missingOutput.assign(sub(constant(lowerBound), existingContents)),
100 check(greater(missingOutput, constant(0)))
101 ));
102 }
103
104 if (cardinalityInterval.upperBound() instanceof FiniteUpperCardinality finiteUpperCardinality) {
105 int upperBound = finiteUpperCardinality.finiteUpperBound();
106 mustBuilder.clause(Integer.class, existingContents -> List.of(
107 must(nodeType.call(node)),
108 new CountLowerBoundLiteral(existingContents, linkType, arguments),
109 check(greater(existingContents, constant(upperBound)))
110 ));
111 candidateMayBuilder.clause(Integer.class, existingContents -> List.of(
112 candidateMust(nodeType.call(node)),
113 new CountCandidateUpperBoundLiteral(existingContents, linkType, arguments),
114 check(greater(existingContents, constant(upperBound)))
115 ));
116 candidateMustBuilder.clause(Integer.class, existingContents -> List.of(
117 candidateMust(nodeType.call(node)),
118 new CountCandidateLowerBoundLiteral(existingContents, linkType, arguments),
119 check(greater(existingContents, constant(upperBound)))
120 ));
121 missingBuilder.clause(Integer.class, existingContents -> List.of(
122 candidateMust(nodeType.call(node)),
123 candidateMust(ReasoningAdapter.EXISTS_SYMBOL.call(node)),
124 new CountCandidateUpperBoundLiteral(existingContents, linkType, arguments),
125 missingOutput.assign(sub(existingContents, constant(upperBound))),
126 check(greater(missingOutput, constant(0)))
127 ));
128 }
129
130 var objective = Query.of(name + "#objective", Integer.class, (builder, output) -> builder.clause(
131 output.assign(missingBuilder.build().aggregate(INT_SUM, Variable.of()))
132 ));
133
134 storeBuilder.with(PartialRelationTranslator.of(constrainedMultiplicity.errorSymbol())
135 .mayNever()
136 .must(mustBuilder.build())
137 .candidateMay(candidateMayBuilder.build())
138 .candidateMust(candidateMustBuilder.build())
139 .objective(Objectives.value(objective)));
140 }
141}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java
new file mode 100644
index 00000000..d1d6dd1e
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/Multiplicity.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiplicity;
7
8import tools.refinery.store.representation.cardinality.CardinalityInterval;
9
10public sealed interface Multiplicity permits ConstrainedMultiplicity, UnconstrainedMultiplicity {
11 CardinalityInterval multiplicity();
12
13 boolean isConstrained();
14}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java
new file mode 100644
index 00000000..2159b88c
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiplicity/UnconstrainedMultiplicity.java
@@ -0,0 +1,28 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiplicity;
7
8import tools.refinery.store.representation.cardinality.CardinalityInterval;
9import tools.refinery.store.representation.cardinality.CardinalityIntervals;
10
11// Singleton implementation, because there is only a single complete interval.
12@SuppressWarnings("squid:S6548")
13public final class UnconstrainedMultiplicity implements Multiplicity {
14 public static final UnconstrainedMultiplicity INSTANCE = new UnconstrainedMultiplicity();
15
16 private UnconstrainedMultiplicity() {
17 }
18
19 @Override
20 public CardinalityInterval multiplicity() {
21 return CardinalityIntervals.SET;
22 }
23
24 @Override
25 public boolean isConstrained() {
26 return true;
27 }
28}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java
new file mode 100644
index 00000000..7290ab40
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeInterpretation.java
@@ -0,0 +1,77 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.opposite;
7
8
9import tools.refinery.store.map.AnyVersionedMap;
10import tools.refinery.store.map.Cursor;
11import tools.refinery.store.reasoning.ReasoningAdapter;
12import tools.refinery.store.reasoning.interpretation.AbstractPartialInterpretation;
13import tools.refinery.store.reasoning.interpretation.PartialInterpretation;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.representation.PartialSymbol;
16import tools.refinery.store.tuple.Tuple;
17
18import java.util.Set;
19
20class OppositeInterpretation<A, C> extends AbstractPartialInterpretation<A, C> {
21 private final PartialInterpretation<A, C> opposite;
22
23 private OppositeInterpretation(ReasoningAdapter adapter, Concreteness concreteness,
24 PartialSymbol<A, C> partialSymbol, PartialInterpretation<A, C> opposite) {
25 super(adapter, concreteness, partialSymbol);
26 this.opposite = opposite;
27 }
28
29 @Override
30 public A get(Tuple key) {
31 return opposite.get(OppositeUtils.flip(key));
32 }
33
34 @Override
35 public Cursor<Tuple, A> getAll() {
36 return new OppositeCursor<>(opposite.getAll());
37 }
38
39 public static <A1, C1> Factory<A1, C1> of(PartialSymbol<A1, C1> oppositeSymbol) {
40 return (adapter, concreteness, partialSymbol) -> {
41 var opposite = adapter.getPartialInterpretation(concreteness, oppositeSymbol);
42 return new OppositeInterpretation<>(adapter, concreteness, partialSymbol, opposite);
43 };
44 }
45
46 private record OppositeCursor<T>(Cursor<Tuple, T> opposite) implements Cursor<Tuple, T> {
47 @Override
48 public Tuple getKey() {
49 return OppositeUtils.flip(opposite.getKey());
50 }
51
52 @Override
53 public T getValue() {
54 return opposite.getValue();
55 }
56
57 @Override
58 public boolean isTerminated() {
59 return opposite.isTerminated();
60 }
61
62 @Override
63 public boolean move() {
64 return opposite.move();
65 }
66
67 @Override
68 public Set<AnyVersionedMap> getDependingMaps() {
69 return opposite.getDependingMaps();
70 }
71
72 @Override
73 public boolean isDirty() {
74 return opposite.isDirty();
75 }
76 }
77}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java
new file mode 100644
index 00000000..d09684df
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRefiner.java
@@ -0,0 +1,32 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.opposite;
7
8import tools.refinery.store.reasoning.ReasoningAdapter;
9import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner;
10import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner;
11import tools.refinery.store.reasoning.representation.PartialSymbol;
12import tools.refinery.store.tuple.Tuple;
13
14public class OppositeRefiner<A, C> extends AbstractPartialInterpretationRefiner<A, C> {
15 private final PartialInterpretationRefiner<A, C> opposite;
16
17 protected OppositeRefiner(ReasoningAdapter adapter, PartialSymbol<A, C> partialSymbol,
18 PartialSymbol<A, C> oppositeSymbol) {
19 super(adapter, partialSymbol);
20 opposite = adapter.getRefiner(oppositeSymbol);
21 }
22
23 @Override
24 public boolean merge(Tuple key, A value) {
25 var oppositeKey = OppositeUtils.flip(key);
26 return opposite.merge(oppositeKey, value);
27 }
28
29 public static <A1, C1> Factory<A1, C1> of(PartialSymbol<A1, C1> oppositeSymbol) {
30 return (adapter, partialSymbol) -> new OppositeRefiner<>(adapter, partialSymbol, oppositeSymbol);
31 }
32}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java
new file mode 100644
index 00000000..6e15a628
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeRelationTranslator.java
@@ -0,0 +1,62 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.opposite;
7
8import tools.refinery.store.model.ModelStoreBuilder;
9import tools.refinery.store.model.ModelStoreConfiguration;
10import tools.refinery.store.query.literal.AbstractCallLiteral;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.query.term.Variable;
13import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.literal.ModalConstraint;
16import tools.refinery.store.reasoning.literal.Modality;
17import tools.refinery.store.reasoning.refinement.RefinementBasedInitializer;
18import tools.refinery.store.reasoning.representation.PartialRelation;
19import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
20import tools.refinery.store.reasoning.translator.TranslationException;
21
22import java.util.List;
23import java.util.Set;
24
25public class OppositeRelationTranslator implements ModelStoreConfiguration, PartialRelationRewriter {
26 private final PartialRelation linkType;
27 private final PartialRelation opposite;
28
29 public OppositeRelationTranslator(PartialRelation linkType, PartialRelation opposite) {
30 if (linkType.arity() != 2) {
31 throw new TranslationException(linkType,
32 "Expected relation with opposite %s to have arity 2, got %d instead"
33 .formatted(linkType, linkType.arity()));
34 }
35 if (opposite.arity() != 2) {
36 throw new TranslationException(linkType,
37 "Expected opposite %s of %s to have arity 2, got %d instead"
38 .formatted(opposite, linkType, opposite.arity()));
39 }
40 this.linkType = linkType;
41 this.opposite = opposite;
42 }
43
44 @Override
45 public void apply(ModelStoreBuilder storeBuilder) {
46 storeBuilder.with(PartialRelationTranslator.of(linkType)
47 .rewriter(this)
48 .interpretation(OppositeInterpretation.of(opposite))
49 .refiner(OppositeRefiner.of(opposite))
50 .initializer(new RefinementBasedInitializer<>(linkType)));
51 }
52
53 @Override
54 public List<Literal> rewriteLiteral(Set<Variable> positiveVariables, AbstractCallLiteral literal,
55 Modality modality, Concreteness concreteness) {
56 var arguments = literal.getArguments();
57 var newArguments = List.of(arguments.get(1), arguments.get(0));
58 var modalOpposite = new ModalConstraint(modality, concreteness, opposite);
59 var oppositeLiteral = literal.withArguments(modalOpposite, newArguments);
60 return List.of(oppositeLiteral);
61 }
62}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeUtils.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeUtils.java
new file mode 100644
index 00000000..2a9e6b5d
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/opposite/OppositeUtils.java
@@ -0,0 +1,22 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.opposite;
7
8import tools.refinery.store.tuple.Tuple;
9import tools.refinery.store.tuple.Tuple2;
10
11final class OppositeUtils {
12 private OppositeUtils() {
13 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
14 }
15
16 public static Tuple flip(Tuple tuple) {
17 if (!(tuple instanceof Tuple2 tuple2)) {
18 throw new IllegalArgumentException("Cannot flip tuple: " + tuple);
19 }
20 return Tuple.of(tuple2.value1(), tuple2.value0());
21 }
22}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java
new file mode 100644
index 00000000..b401118e
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/predicate/PredicateTranslator.java
@@ -0,0 +1,93 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.predicate;
7
8import tools.refinery.store.model.ModelStoreBuilder;
9import tools.refinery.store.model.ModelStoreConfiguration;
10import tools.refinery.store.query.dnf.Query;
11import tools.refinery.store.query.dnf.RelationalQuery;
12import tools.refinery.store.query.literal.Literal;
13import tools.refinery.store.query.term.NodeVariable;
14import tools.refinery.store.query.term.Variable;
15import tools.refinery.store.query.view.ForbiddenView;
16import tools.refinery.store.query.view.MayView;
17import tools.refinery.store.query.view.MustView;
18import tools.refinery.store.reasoning.representation.PartialRelation;
19import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
20import tools.refinery.store.reasoning.translator.TranslationException;
21import tools.refinery.store.representation.Symbol;
22import tools.refinery.store.representation.TruthValue;
23
24import static tools.refinery.store.query.literal.Literals.not;
25import static tools.refinery.store.reasoning.literal.PartialLiterals.may;
26import static tools.refinery.store.reasoning.literal.PartialLiterals.must;
27
28public class PredicateTranslator implements ModelStoreConfiguration {
29 private final PartialRelation relation;
30 private final RelationalQuery query;
31 private final boolean mutable;
32 private final TruthValue defaultValue;
33
34 public PredicateTranslator(PartialRelation relation, RelationalQuery query, boolean mutable,
35 TruthValue defaultValue) {
36 if (relation.arity() != query.arity()) {
37 throw new TranslationException(relation, "Expected arity %d query for partial relation %s, got %d instead"
38 .formatted(relation.arity(), relation, query.arity()));
39 }
40 if (defaultValue.must()) {
41 throw new TranslationException(relation, "Default value must be UNKNOWN or FALSE");
42 }
43 this.relation = relation;
44 this.query = query;
45 this.mutable = mutable;
46 this.defaultValue = defaultValue;
47 }
48
49 @Override
50 public void apply(ModelStoreBuilder storeBuilder) {
51 var translator = PartialRelationTranslator.of(relation)
52 .query(query);
53 if (mutable) {
54 var symbol = Symbol.of(relation.name(), relation.arity(), TruthValue.class, defaultValue);
55 translator.symbol(symbol);
56
57 var parameters = new NodeVariable[relation.arity()];
58 for (int i = 0; i < parameters.length; i++) {
59 parameters[i] = Variable.of("p" + i);
60 }
61
62 var must = Query.builder()
63 .parameters(parameters)
64 .clause(must(query.call(parameters)))
65 .clause(new MustView(symbol).call(parameters))
66 .build();
67 translator.must(must);
68
69 var mayLiterals = new Literal[2];
70 mayLiterals[0] = may(query.call(parameters));
71 if (defaultValue.may()) {
72 mayLiterals[1] = not(new ForbiddenView(symbol).call(parameters));
73 } else {
74 mayLiterals[1] = new MayView(symbol).call(parameters);
75 }
76 var may = Query.builder()
77 .parameters(parameters)
78 .clause(mayLiterals)
79 .build();
80 translator.may(may);
81 } else if (defaultValue.may()) {
82 // If all values are permitted, we don't need to check for any forbidden values in the model.
83 // If the result of this predicate of {@code ERROR}, some other partial relation (that we check for)
84 // will be {@code ERROR} as well.
85 translator.exclude(null);
86 translator.accept(null);
87 translator.objective(null);
88 } else {
89 translator.mayNever();
90 }
91 storeBuilder.with(translator);
92 }
93}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java
new file mode 100644
index 00000000..45dc5bd2
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/proxy/PartialRelationTranslatorProxy.java
@@ -0,0 +1,52 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.proxy;
7
8import tools.refinery.store.model.ModelStoreBuilder;
9import tools.refinery.store.model.ModelStoreConfiguration;
10import tools.refinery.store.query.literal.AbstractCallLiteral;
11import tools.refinery.store.query.literal.Literal;
12import tools.refinery.store.query.term.Variable;
13import tools.refinery.store.reasoning.interpretation.PartialRelationRewriter;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.literal.ModalConstraint;
16import tools.refinery.store.reasoning.literal.Modality;
17import tools.refinery.store.reasoning.representation.PartialRelation;
18import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
19
20import java.util.List;
21import java.util.Set;
22
23public class PartialRelationTranslatorProxy implements ModelStoreConfiguration, PartialRelationRewriter {
24 private final PartialRelation partialRelation;
25 private final PartialRelation targetRelation;
26 private final boolean mutable;
27
28 public PartialRelationTranslatorProxy(PartialRelation partialRelation, PartialRelation targetRelation,
29 boolean mutable) {
30 this.partialRelation = partialRelation;
31 this.targetRelation = targetRelation;
32 this.mutable = mutable;
33 }
34
35 @Override
36 public void apply(ModelStoreBuilder storeBuilder) {
37 var translator = PartialRelationTranslator.of(partialRelation)
38 .interpretation(((adapter, concreteness, partialSymbol) ->
39 adapter.getPartialInterpretation(concreteness, targetRelation)))
40 .rewriter(this);
41 if (mutable) {
42 translator.refiner((adapter, partialSymbol) -> adapter.getRefiner(targetRelation));
43 }
44 storeBuilder.with(translator);
45 }
46
47 @Override
48 public List<Literal> rewriteLiteral(Set<Variable> positiveVariables, AbstractCallLiteral literal,
49 Modality modality, Concreteness concreteness) {
50 return List.of(literal.withTarget(ModalConstraint.of(modality, concreteness, targetRelation)));
51 }
52}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/CandidateTypeView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/CandidateTypeView.java
new file mode 100644
index 00000000..faf1b958
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/CandidateTypeView.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.tuple.Tuple;
11
12class CandidateTypeView extends InferredTypeView {
13 public CandidateTypeView(Symbol<InferredType> symbol, PartialRelation type) {
14 super(symbol, "candidate", type);
15 }
16
17 @Override
18 protected boolean doFilter(Tuple key, InferredType value) {
19 return type.equals(value.candidateType());
20 }
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/EliminatedType.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/EliminatedType.java
deleted file mode 100644
index 6e4728db..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/EliminatedType.java
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9
10record EliminatedType(PartialRelation replacement) implements TypeAnalysisResult {
11}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java
deleted file mode 100644
index 40de4644..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.query.view.TuplePreservingView;
10import tools.refinery.store.tuple.Tuple;
11
12import java.util.Objects;
13
14class InferredMayTypeView extends TuplePreservingView<InferredType> {
15 private final PartialRelation type;
16
17 InferredMayTypeView(PartialRelation type) {
18 super(TypeHierarchyTranslationUnit.INFERRED_TYPE_SYMBOL, "%s#may".formatted(type));
19 this.type = type;
20 }
21
22 @Override
23 protected boolean doFilter(Tuple key, InferredType value) {
24 return value.mayConcreteTypes().contains(type);
25 }
26
27 @Override
28 public boolean equals(Object o) {
29 if (this == o) return true;
30 if (o == null || getClass() != o.getClass()) return false;
31 if (!super.equals(o)) return false;
32 InferredMayTypeView that = (InferredMayTypeView) o;
33 return Objects.equals(type, that.type);
34 }
35
36 @Override
37 public int hashCode() {
38 return Objects.hash(super.hashCode(), type);
39 }
40}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredType.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredType.java
index fd05158b..9a0c2b0f 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredType.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredType.java
@@ -8,21 +8,26 @@ package tools.refinery.store.reasoning.translator.typehierarchy;
8import tools.refinery.store.reasoning.representation.PartialRelation; 8import tools.refinery.store.reasoning.representation.PartialRelation;
9 9
10import java.util.Collections; 10import java.util.Collections;
11import java.util.Objects;
11import java.util.Set; 12import java.util.Set;
12 13
13record InferredType(Set<PartialRelation> mustTypes, Set<PartialRelation> mayConcreteTypes, 14public final class InferredType {
14 PartialRelation currentType) {
15 public static final InferredType UNTYPED = new InferredType(Set.of(), Set.of(), null); 15 public static final InferredType UNTYPED = new InferredType(Set.of(), Set.of(), null);
16 private final Set<PartialRelation> mustTypes;
17 private final Set<PartialRelation> mayConcreteTypes;
18 private final PartialRelation candidateType;
19 private final int hashCode;
16 20
17 public InferredType(Set<PartialRelation> mustTypes, Set<PartialRelation> mayConcreteTypes, 21 public InferredType(Set<PartialRelation> mustTypes, Set<PartialRelation> mayConcreteTypes,
18 PartialRelation currentType) { 22 PartialRelation candidateType) {
19 this.mustTypes = Collections.unmodifiableSet(mustTypes); 23 this.mustTypes = Collections.unmodifiableSet(mustTypes);
20 this.mayConcreteTypes = Collections.unmodifiableSet(mayConcreteTypes); 24 this.mayConcreteTypes = Collections.unmodifiableSet(mayConcreteTypes);
21 this.currentType = currentType; 25 this.candidateType = candidateType;
26 hashCode = Objects.hash(mustTypes, mayConcreteTypes, candidateType);
22 } 27 }
23 28
24 public boolean isConsistent() { 29 public boolean isConsistent() {
25 return currentType != null || mustTypes.isEmpty(); 30 return candidateType != null || mustTypes.isEmpty();
26 } 31 }
27 32
28 public boolean isMust(PartialRelation partialRelation) { 33 public boolean isMust(PartialRelation partialRelation) {
@@ -32,4 +37,40 @@ record InferredType(Set<PartialRelation> mustTypes, Set<PartialRelation> mayConc
32 public boolean isMayConcrete(PartialRelation partialRelation) { 37 public boolean isMayConcrete(PartialRelation partialRelation) {
33 return mayConcreteTypes.contains(partialRelation); 38 return mayConcreteTypes.contains(partialRelation);
34 } 39 }
40
41
42 public Set<PartialRelation> mustTypes() {
43 return mustTypes;
44 }
45
46 public Set<PartialRelation> mayConcreteTypes() {
47 return mayConcreteTypes;
48 }
49
50 public PartialRelation candidateType() {
51 return candidateType;
52 }
53
54 @Override
55 public boolean equals(Object o) {
56 if (this == o) return true;
57 if (o == null || getClass() != o.getClass()) return false;
58 InferredType that = (InferredType) o;
59 return Objects.equals(mustTypes, that.mustTypes) &&
60 Objects.equals(mayConcreteTypes, that.mayConcreteTypes) &&
61 Objects.equals(candidateType, that.candidateType);
62 }
63
64 @Override
65 public int hashCode() {
66 return hashCode;
67 }
68
69 @Override
70 public String toString() {
71 return "InferredType[" +
72 "mustTypes=" + mustTypes + ", " +
73 "mayConcreteTypes=" + mayConcreteTypes + ", " +
74 "candidateType=" + candidateType + ']';
75 }
35} 76}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java
new file mode 100644
index 00000000..40a7b3fa
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeRefiner.java
@@ -0,0 +1,38 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.model.Interpretation;
9import tools.refinery.store.reasoning.ReasoningAdapter;
10import tools.refinery.store.reasoning.refinement.AbstractPartialInterpretationRefiner;
11import tools.refinery.store.reasoning.representation.PartialSymbol;
12import tools.refinery.store.representation.Symbol;
13import tools.refinery.store.representation.TruthValue;
14import tools.refinery.store.tuple.Tuple;
15
16class InferredTypeRefiner extends AbstractPartialInterpretationRefiner<TruthValue, Boolean> {
17 private final Interpretation<InferredType> interpretation;
18 private final TypeAnalysisResult result;
19
20 private InferredTypeRefiner(ReasoningAdapter adapter, PartialSymbol<TruthValue, Boolean> partialSymbol,
21 Symbol<InferredType> symbol, TypeAnalysisResult result) {
22 super(adapter, partialSymbol);
23 interpretation = adapter.getModel().getInterpretation(symbol);
24 this.result = result;
25 }
26
27 @Override
28 public boolean merge(Tuple key, TruthValue value) {
29 var currentType = interpretation.get(key);
30 var newType = result.merge(currentType, value);
31 interpretation.put(key, newType);
32 return true;
33 }
34
35 public static Factory<TruthValue, Boolean> of(Symbol<InferredType> symbol, TypeAnalysisResult result) {
36 return (adapter, partialSymbol) -> new InferredTypeRefiner(adapter, partialSymbol, symbol, result);
37 }
38}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMustTypeView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeView.java
index 1a121547..3c074df5 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMustTypeView.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredTypeView.java
@@ -1,35 +1,30 @@
1/* 1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> 2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 * 3 *
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6package tools.refinery.store.reasoning.translator.typehierarchy; 6package tools.refinery.store.reasoning.translator.typehierarchy;
7 7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.query.view.TuplePreservingView; 8import tools.refinery.store.query.view.TuplePreservingView;
10import tools.refinery.store.tuple.Tuple; 9import tools.refinery.store.reasoning.representation.PartialRelation;
10import tools.refinery.store.representation.Symbol;
11 11
12import java.util.Objects; 12import java.util.Objects;
13 13
14class InferredMustTypeView extends TuplePreservingView<InferredType> { 14abstract class InferredTypeView extends TuplePreservingView<InferredType> {
15 private final PartialRelation type; 15 protected final PartialRelation type;
16 16
17 InferredMustTypeView(PartialRelation type) { 17 protected InferredTypeView(Symbol<InferredType> symbol, String name, PartialRelation type) {
18 super(TypeHierarchyTranslationUnit.INFERRED_TYPE_SYMBOL, "%s#must".formatted(type)); 18 super(symbol, type.name() + "#" + name);
19 this.type = type; 19 this.type = type;
20 } 20 }
21 21
22 @Override 22 @Override
23 protected boolean doFilter(Tuple key, InferredType value) {
24 return value.mustTypes().contains(type);
25 }
26
27 @Override
28 public boolean equals(Object o) { 23 public boolean equals(Object o) {
29 if (this == o) return true; 24 if (this == o) return true;
30 if (o == null || getClass() != o.getClass()) return false; 25 if (o == null || getClass() != o.getClass()) return false;
31 if (!super.equals(o)) return false; 26 if (!super.equals(o)) return false;
32 InferredMustTypeView that = (InferredMustTypeView) o; 27 InferredTypeView that = (InferredTypeView) o;
33 return Objects.equals(type, that.type); 28 return Objects.equals(type, that.type);
34 } 29 }
35 30
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MayTypeView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MayTypeView.java
new file mode 100644
index 00000000..dcaf61c5
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MayTypeView.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.tuple.Tuple;
11
12class MayTypeView extends InferredTypeView {
13 public MayTypeView(Symbol<InferredType> symbol, PartialRelation type) {
14 super(symbol, "may", type);
15 }
16
17 @Override
18 protected boolean doFilter(Tuple key, InferredType value) {
19 return value.mayConcreteTypes().contains(type);
20 }
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MustTypeView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MustTypeView.java
new file mode 100644
index 00000000..833e1594
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/MustTypeView.java
@@ -0,0 +1,21 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.Symbol;
10import tools.refinery.store.tuple.Tuple;
11
12class MustTypeView extends InferredTypeView {
13 public MustTypeView(Symbol<InferredType> symbol, PartialRelation type) {
14 super(symbol, "must", type);
15 }
16
17 @Override
18 protected boolean doFilter(Tuple key, InferredType value) {
19 return value.mustTypes().contains(type);
20 }
21}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/PreservedType.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/PreservedType.java
deleted file mode 100644
index 0696f4c3..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/PreservedType.java
+++ /dev/null
@@ -1,141 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.TruthValue;
10
11import java.util.*;
12
13final class PreservedType implements TypeAnalysisResult {
14 private final ExtendedTypeInfo extendedTypeInfo;
15 private final List<PartialRelation> directSubtypes;
16 private final List<ExtendedTypeInfo> allExternalTypeInfoList;
17 private final InferredType inferredType;
18
19 public PreservedType(ExtendedTypeInfo extendedTypeInfo, List<ExtendedTypeInfo> allExternalTypeInfoList) {
20 this.extendedTypeInfo = extendedTypeInfo;
21 directSubtypes = List.copyOf(extendedTypeInfo.getDirectSubtypes());
22 this.allExternalTypeInfoList = allExternalTypeInfoList;
23 inferredType = propagateMust(extendedTypeInfo.getAllSupertypesAndSelf(),
24 extendedTypeInfo.getConcreteSubtypesAndSelf());
25 }
26
27 public PartialRelation type() {
28 return extendedTypeInfo.getType();
29 }
30
31 public List<PartialRelation> getDirectSubtypes() {
32 return directSubtypes;
33 }
34
35 public boolean isAbstractType() {
36 return extendedTypeInfo.isAbstractType();
37 }
38
39 public boolean isVacuous() {
40 return isAbstractType() && directSubtypes.isEmpty();
41 }
42
43 public InferredType asInferredType() {
44 return inferredType;
45 }
46
47 public InferredType merge(InferredType inferredType, TruthValue value) {
48 return switch (value) {
49 case UNKNOWN -> inferredType;
50 case TRUE -> addMust(inferredType);
51 case FALSE -> removeMay(inferredType);
52 case ERROR -> addError(inferredType);
53 };
54 }
55
56 private InferredType addMust(InferredType inferredType) {
57 var originalMustTypes = inferredType.mustTypes();
58 if (originalMustTypes.contains(type())) {
59 return inferredType;
60 }
61 var mustTypes = new HashSet<>(originalMustTypes);
62 extendedTypeInfo.addMust(mustTypes);
63 var originalMayConcreteTypes = inferredType.mayConcreteTypes();
64 var mayConcreteTypes = new LinkedHashSet<>(originalMayConcreteTypes);
65 Set<PartialRelation> mayConcreteTypesResult;
66 if (mayConcreteTypes.retainAll(extendedTypeInfo.getConcreteSubtypesAndSelf())) {
67 mayConcreteTypesResult = mayConcreteTypes;
68 } else {
69 mayConcreteTypesResult = originalMayConcreteTypes;
70 }
71 return propagateMust(mustTypes, mayConcreteTypesResult);
72 }
73
74 private InferredType removeMay(InferredType inferredType) {
75 var originalMayConcreteTypes = inferredType.mayConcreteTypes();
76 var mayConcreteTypes = new LinkedHashSet<>(originalMayConcreteTypes);
77 if (!mayConcreteTypes.removeAll(extendedTypeInfo.getConcreteSubtypesAndSelf())) {
78 return inferredType;
79 }
80 return propagateMust(inferredType.mustTypes(), mayConcreteTypes);
81 }
82
83 private InferredType addError(InferredType inferredType) {
84 var originalMustTypes = inferredType.mustTypes();
85 if (originalMustTypes.contains(type())) {
86 if (inferredType.mayConcreteTypes().isEmpty()) {
87 return inferredType;
88 }
89 return new InferredType(originalMustTypes, Set.of(), null);
90 }
91 var mustTypes = new HashSet<>(originalMustTypes);
92 extendedTypeInfo.addMust(mustTypes);
93 return new InferredType(mustTypes, Set.of(), null);
94 }
95
96 private InferredType propagateMust(Set<PartialRelation> originalMustTypes,
97 Set<PartialRelation> mayConcreteTypes) {
98 // It is possible that there is not type at all, do not force one by propagation.
99 var maybeUntyped = originalMustTypes.isEmpty();
100 // Para-consistent case, do not propagate must types to avoid logical explosion.
101 var paraConsistentOrSurelyUntyped = mayConcreteTypes.isEmpty();
102 if (maybeUntyped || paraConsistentOrSurelyUntyped) {
103 return new InferredType(originalMustTypes, mayConcreteTypes, null);
104 }
105 var currentType = computeCurrentType(mayConcreteTypes);
106 var mustTypes = new HashSet<>(originalMustTypes);
107 boolean changed = false;
108 for (var newMustExtendedTypeInfo : allExternalTypeInfoList) {
109 var newMustType = newMustExtendedTypeInfo.getType();
110 if (mustTypes.contains(newMustType)) {
111 continue;
112 }
113 if (newMustExtendedTypeInfo.allowsAllConcreteTypes(mayConcreteTypes)) {
114 newMustExtendedTypeInfo.addMust(mustTypes);
115 changed = true;
116 }
117 }
118 if (!changed) {
119 return new InferredType(originalMustTypes, mayConcreteTypes, currentType);
120 }
121 return new InferredType(mustTypes, mayConcreteTypes, currentType);
122 }
123
124 /**
125 * Returns a concrete type that is allowed by a (consistent, i.e., nonempty) set of <b>may</b> concrete types.
126 *
127 * @param mayConcreteTypes The set of allowed concrete types. Must not be empty.
128 * @return The first concrete type that is allowed by {@code matConcreteTypes}.
129 */
130 private PartialRelation computeCurrentType(Set<PartialRelation> mayConcreteTypes) {
131 for (var concreteExtendedTypeInfo : allExternalTypeInfoList) {
132 var concreteType = concreteExtendedTypeInfo.getType();
133 if (!concreteExtendedTypeInfo.isAbstractType() && mayConcreteTypes.contains(concreteType)) {
134 return concreteType;
135 }
136 }
137 // We have already filtered out the para-consistent case in {@link #propagateMust(Set<PartialRelation>,
138 // Set<PartialRelation>}.
139 throw new AssertionError("No concrete type in %s".formatted(mayConcreteTypes));
140 }
141}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java
index fbf8a7c9..ebe0d1b9 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisResult.java
@@ -5,5 +5,141 @@
5 */ 5 */
6package tools.refinery.store.reasoning.translator.typehierarchy; 6package tools.refinery.store.reasoning.translator.typehierarchy;
7 7
8sealed interface TypeAnalysisResult permits EliminatedType, PreservedType { 8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.representation.TruthValue;
10
11import java.util.*;
12
13public final class TypeAnalysisResult {
14 private final ExtendedTypeInfo extendedTypeInfo;
15 private final List<PartialRelation> directSubtypes;
16 private final List<ExtendedTypeInfo> allExternalTypeInfoList;
17 private final InferredType inferredType;
18
19 public TypeAnalysisResult(ExtendedTypeInfo extendedTypeInfo, List<ExtendedTypeInfo> allExternalTypeInfoList) {
20 this.extendedTypeInfo = extendedTypeInfo;
21 directSubtypes = List.copyOf(extendedTypeInfo.getDirectSubtypes());
22 this.allExternalTypeInfoList = allExternalTypeInfoList;
23 inferredType = propagateMust(extendedTypeInfo.getAllSupertypesAndSelf(),
24 extendedTypeInfo.getConcreteSubtypesAndSelf());
25 }
26
27 public PartialRelation type() {
28 return extendedTypeInfo.getType();
29 }
30
31 public List<PartialRelation> getDirectSubtypes() {
32 return directSubtypes;
33 }
34
35 public boolean isAbstractType() {
36 return extendedTypeInfo.isAbstractType();
37 }
38
39 public boolean isVacuous() {
40 return isAbstractType() && directSubtypes.isEmpty();
41 }
42
43 public InferredType asInferredType() {
44 return inferredType;
45 }
46
47 public boolean isSubtypeOf(TypeAnalysisResult other) {
48 return extendedTypeInfo.getAllSubtypes().contains(other.type());
49 }
50
51 public InferredType merge(InferredType inferredType, TruthValue value) {
52 return switch (value) {
53 case UNKNOWN -> inferredType;
54 case TRUE -> addMust(inferredType);
55 case FALSE -> removeMay(inferredType);
56 case ERROR -> addError(inferredType);
57 };
58 }
59
60 private InferredType addMust(InferredType inferredType) {
61 var originalMustTypes = inferredType.mustTypes();
62 if (originalMustTypes.contains(type())) {
63 return inferredType;
64 }
65 var mustTypes = new HashSet<>(originalMustTypes);
66 extendedTypeInfo.addMust(mustTypes);
67 var originalMayConcreteTypes = inferredType.mayConcreteTypes();
68 var mayConcreteTypes = new LinkedHashSet<>(originalMayConcreteTypes);
69 Set<PartialRelation> mayConcreteTypesResult;
70 if (mayConcreteTypes.retainAll(extendedTypeInfo.getConcreteSubtypesAndSelf())) {
71 mayConcreteTypesResult = mayConcreteTypes;
72 } else {
73 mayConcreteTypesResult = originalMayConcreteTypes;
74 }
75 return propagateMust(mustTypes, mayConcreteTypesResult);
76 }
77
78 private InferredType removeMay(InferredType inferredType) {
79 var originalMayConcreteTypes = inferredType.mayConcreteTypes();
80 var mayConcreteTypes = new LinkedHashSet<>(originalMayConcreteTypes);
81 if (!mayConcreteTypes.removeAll(extendedTypeInfo.getConcreteSubtypesAndSelf())) {
82 return inferredType;
83 }
84 return propagateMust(inferredType.mustTypes(), mayConcreteTypes);
85 }
86
87 private InferredType addError(InferredType inferredType) {
88 var originalMustTypes = inferredType.mustTypes();
89 if (originalMustTypes.contains(type())) {
90 if (inferredType.mayConcreteTypes().isEmpty()) {
91 return inferredType;
92 }
93 return new InferredType(originalMustTypes, Set.of(), null);
94 }
95 var mustTypes = new HashSet<>(originalMustTypes);
96 extendedTypeInfo.addMust(mustTypes);
97 return new InferredType(mustTypes, Set.of(), null);
98 }
99
100 private InferredType propagateMust(Set<PartialRelation> originalMustTypes,
101 Set<PartialRelation> mayConcreteTypes) {
102 // It is possible that there is not type at all, do not force one by propagation.
103 var maybeUntyped = originalMustTypes.isEmpty();
104 // Para-consistent case, do not propagate must types to avoid logical explosion.
105 var paraConsistentOrSurelyUntyped = mayConcreteTypes.isEmpty();
106 if (maybeUntyped || paraConsistentOrSurelyUntyped) {
107 return new InferredType(originalMustTypes, mayConcreteTypes, null);
108 }
109 var currentType = computeCurrentType(mayConcreteTypes);
110 var mustTypes = new HashSet<>(originalMustTypes);
111 boolean changed = false;
112 for (var newMustExtendedTypeInfo : allExternalTypeInfoList) {
113 var newMustType = newMustExtendedTypeInfo.getType();
114 if (mustTypes.contains(newMustType)) {
115 continue;
116 }
117 if (newMustExtendedTypeInfo.allowsAllConcreteTypes(mayConcreteTypes)) {
118 newMustExtendedTypeInfo.addMust(mustTypes);
119 changed = true;
120 }
121 }
122 if (!changed) {
123 return new InferredType(originalMustTypes, mayConcreteTypes, currentType);
124 }
125 return new InferredType(mustTypes, mayConcreteTypes, currentType);
126 }
127
128 /**
129 * Returns a concrete type that is allowed by a (consistent, i.e., nonempty) set of <b>may</b> concrete types.
130 *
131 * @param mayConcreteTypes The set of allowed concrete types. Must not be empty.
132 * @return The first concrete type that is allowed by {@code matConcreteTypes}.
133 */
134 private PartialRelation computeCurrentType(Set<PartialRelation> mayConcreteTypes) {
135 for (var concreteExtendedTypeInfo : allExternalTypeInfoList) {
136 var concreteType = concreteExtendedTypeInfo.getType();
137 if (!concreteExtendedTypeInfo.isAbstractType() && mayConcreteTypes.contains(concreteType)) {
138 return concreteType;
139 }
140 }
141 // We have already filtered out the para-consistent case in {@link #propagateMust(Set<PartialRelation>,
142 // Set<PartialRelation>}.
143 throw new AssertionError("No concrete type in %s".formatted(mayConcreteTypes));
144 }
9} 145}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchy.java
index e97ce954..3f918c97 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzer.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchy.java
@@ -6,17 +6,20 @@
6package tools.refinery.store.reasoning.translator.typehierarchy; 6package tools.refinery.store.reasoning.translator.typehierarchy;
7 7
8import tools.refinery.store.reasoning.representation.PartialRelation; 8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.TranslationException;
9 10
10import java.util.*; 11import java.util.*;
11 12
12class TypeAnalyzer { 13public class TypeHierarchy {
14 private final Set<PartialRelation> allTypes;
13 private final Map<PartialRelation, ExtendedTypeInfo> extendedTypeInfoMap; 15 private final Map<PartialRelation, ExtendedTypeInfo> extendedTypeInfoMap;
14 private final Map<PartialRelation, PartialRelation> replacements = new LinkedHashMap<>(); 16 private final Map<PartialRelation, PartialRelation> replacements = new LinkedHashMap<>();
15 private final InferredType unknownType; 17 private final InferredType unknownType;
16 private final Map<PartialRelation, TypeAnalysisResult> analysisResults; 18 private final Map<PartialRelation, TypeAnalysisResult> preservedTypes;
17 19
18 public TypeAnalyzer(Map<PartialRelation, TypeInfo> typeInfoMap) { 20 TypeHierarchy(Map<PartialRelation, TypeInfo> typeInfoMap) {
19 int size = typeInfoMap.size(); 21 int size = typeInfoMap.size();
22 allTypes = Collections.unmodifiableSet(new LinkedHashSet<>(typeInfoMap.keySet()));
20 extendedTypeInfoMap = new LinkedHashMap<>(size); 23 extendedTypeInfoMap = new LinkedHashMap<>(size);
21 var concreteTypes = new LinkedHashSet<PartialRelation>(); 24 var concreteTypes = new LinkedHashSet<PartialRelation>();
22 int index = 0; 25 int index = 0;
@@ -34,15 +37,39 @@ class TypeAnalyzer {
34 computeAllAndConcreteSubtypes(); 37 computeAllAndConcreteSubtypes();
35 computeDirectSubtypes(); 38 computeDirectSubtypes();
36 eliminateTrivialSupertypes(); 39 eliminateTrivialSupertypes();
37 analysisResults = computeAnalysisResults(); 40 preservedTypes = computeAnalysisResults();
41 }
42
43 public boolean isEmpty() {
44 return extendedTypeInfoMap.isEmpty();
38 } 45 }
39 46
40 public InferredType getUnknownType() { 47 public InferredType getUnknownType() {
41 return unknownType; 48 return unknownType;
42 } 49 }
43 50
44 public Map<PartialRelation, TypeAnalysisResult> getAnalysisResults() { 51 public Set<PartialRelation> getAllTypes() {
45 return analysisResults; 52 return allTypes;
53 }
54
55 public Map<PartialRelation, TypeAnalysisResult> getPreservedTypes() {
56 return preservedTypes;
57 }
58
59 public Map<PartialRelation, PartialRelation> getEliminatedTypes() {
60 return Collections.unmodifiableMap(replacements);
61 }
62
63 public TypeAnalysisResult getAnalysisResult(PartialRelation type) {
64 var preservedResult = preservedTypes.get(type);
65 if (preservedResult != null) {
66 return preservedResult;
67 }
68 var eliminatedResult = replacements.get(type);
69 if (eliminatedResult != null) {
70 return preservedTypes.get(eliminatedResult);
71 }
72 throw new IllegalArgumentException("Unknown type: " + type);
46 } 73 }
47 74
48 private void computeAllSupertypes() { 75 private void computeAllSupertypes() {
@@ -53,7 +80,13 @@ class TypeAnalyzer {
53 var found = new HashSet<PartialRelation>(); 80 var found = new HashSet<PartialRelation>();
54 var allSupertypes = extendedTypeInfo.getAllSupertypes(); 81 var allSupertypes = extendedTypeInfo.getAllSupertypes();
55 for (var supertype : allSupertypes) { 82 for (var supertype : allSupertypes) {
56 found.addAll(extendedTypeInfoMap.get(supertype).getAllSupertypes()); 83 var supertypeInfo = extendedTypeInfoMap.get(supertype);
84 if (supertypeInfo == null) {
85 throw new TranslationException(extendedTypeInfo.getType(),
86 "Supertype %s of %s is missing from the type hierarchy"
87 .formatted(supertype, extendedTypeInfo.getType()));
88 }
89 found.addAll(supertypeInfo.getAllSupertypes());
57 } 90 }
58 if (allSupertypes.addAll(found)) { 91 if (allSupertypes.addAll(found)) {
59 changed = true; 92 changed = true;
@@ -70,7 +103,7 @@ class TypeAnalyzer {
70 } 103 }
71 for (var supertype : extendedTypeInfo.getAllSupertypes()) { 104 for (var supertype : extendedTypeInfo.getAllSupertypes()) {
72 if (type.equals(supertype)) { 105 if (type.equals(supertype)) {
73 throw new IllegalArgumentException("%s cannot be a supertype of itself".formatted(type)); 106 throw new TranslationException(type, "%s cannot be a supertype of itself".formatted(type));
74 } 107 }
75 var supertypeInfo = extendedTypeInfoMap.get(supertype); 108 var supertypeInfo = extendedTypeInfoMap.get(supertype);
76 supertypeInfo.getAllSubtypes().add(type); 109 supertypeInfo.getAllSubtypes().add(type);
@@ -95,25 +128,37 @@ class TypeAnalyzer {
95 } 128 }
96 129
97 private void eliminateTrivialSupertypes() { 130 private void eliminateTrivialSupertypes() {
98 boolean changed; 131 Set<PartialRelation> toInspect = new HashSet<>(extendedTypeInfoMap.keySet());
99 do { 132 while (!toInspect.isEmpty()) {
100 var toRemove = new ArrayList<PartialRelation>(); 133 var toRemove = new ArrayList<PartialRelation>();
101 for (var entry : extendedTypeInfoMap.entrySet()) { 134 for (var partialRelation : toInspect) {
102 var extendedTypeInfo = entry.getValue(); 135 var extendedTypeInfo = extendedTypeInfoMap.get(partialRelation);
103 boolean isAbstract = extendedTypeInfo.isAbstractType(); 136 if (extendedTypeInfo != null && isTrivialSupertype(extendedTypeInfo)) {
104 // Do not eliminate abstract types with 0 subtypes, because they can be used para-consistently, i.e., 137 toRemove.add(partialRelation);
105 // an object determined to <b>must</b> have an abstract type with 0 subtypes <b>may not</b> ever exist.
106 boolean hasSingleDirectSubtype = extendedTypeInfo.getDirectSubtypes().size() == 1;
107 if (isAbstract && hasSingleDirectSubtype) {
108 toRemove.add(entry.getKey());
109 } 138 }
110 } 139 }
111 toRemove.forEach(this::removeTrivialType); 140 toInspect.clear();
112 changed = !toRemove.isEmpty(); 141 for (var partialRelation : toRemove) {
113 } while (changed); 142 removeTrivialType(partialRelation, toInspect);
143 }
144 }
145 }
146
147 private boolean isTrivialSupertype(ExtendedTypeInfo extendedTypeInfo) {
148 if (!extendedTypeInfo.isAbstractType()) {
149 return false;
150 }
151 var subtypeIterator = extendedTypeInfo.getDirectSubtypes().iterator();
152 if (!subtypeIterator.hasNext()) {
153 // Do not eliminate abstract types with 0 subtypes, because they can be used para-consistently, i.e.,
154 // an object determined to <b>must</b> have an abstract type with 0 subtypes <b>may not</b> ever exist.
155 return false;
156 }
157 var directSubtype = subtypeIterator.next();
158 return !extendedTypeInfoMap.get(directSubtype).isAbstractType() && !subtypeIterator.hasNext();
114 } 159 }
115 160
116 private void removeTrivialType(PartialRelation trivialType) { 161 private void removeTrivialType(PartialRelation trivialType, Set<PartialRelation> toInspect) {
117 var extendedTypeInfo = extendedTypeInfoMap.get(trivialType); 162 var extendedTypeInfo = extendedTypeInfoMap.get(trivialType);
118 var iterator = extendedTypeInfo.getDirectSubtypes().iterator(); 163 var iterator = extendedTypeInfo.getDirectSubtypes().iterator();
119 if (!iterator.hasNext()) { 164 if (!iterator.hasNext()) {
@@ -125,7 +170,6 @@ class TypeAnalyzer {
125 throw new AssertionError("Expected trivial supertype %s to have at most 1 direct subtype" 170 throw new AssertionError("Expected trivial supertype %s to have at most 1 direct subtype"
126 .formatted(trivialType)); 171 .formatted(trivialType));
127 } 172 }
128 replacements.put(trivialType, replacement);
129 for (var supertype : extendedTypeInfo.getAllSupertypes()) { 173 for (var supertype : extendedTypeInfo.getAllSupertypes()) {
130 var extendedSupertypeInfo = extendedTypeInfoMap.get(supertype); 174 var extendedSupertypeInfo = extendedTypeInfoMap.get(supertype);
131 if (!extendedSupertypeInfo.getAllSubtypes().remove(trivialType)) { 175 if (!extendedSupertypeInfo.getAllSubtypes().remove(trivialType)) {
@@ -134,6 +178,9 @@ class TypeAnalyzer {
134 var directSubtypes = extendedSupertypeInfo.getDirectSubtypes(); 178 var directSubtypes = extendedSupertypeInfo.getDirectSubtypes();
135 if (directSubtypes.remove(trivialType)) { 179 if (directSubtypes.remove(trivialType)) {
136 directSubtypes.add(replacement); 180 directSubtypes.add(replacement);
181 if (extendedSupertypeInfo.isAbstractType() && directSubtypes.size() == 1) {
182 toInspect.add(supertype);
183 }
137 } 184 }
138 } 185 }
139 for (var subtype : extendedTypeInfo.getAllSubtypes()) { 186 for (var subtype : extendedTypeInfo.getAllSubtypes()) {
@@ -156,17 +203,13 @@ class TypeAnalyzer {
156 203
157 private Map<PartialRelation, TypeAnalysisResult> computeAnalysisResults() { 204 private Map<PartialRelation, TypeAnalysisResult> computeAnalysisResults() {
158 var allExtendedTypeInfoList = sortTypes(); 205 var allExtendedTypeInfoList = sortTypes();
159 var results = new LinkedHashMap<PartialRelation, TypeAnalysisResult>( 206 var preservedResults = new LinkedHashMap<PartialRelation, TypeAnalysisResult>(
160 allExtendedTypeInfoList.size() + replacements.size()); 207 allExtendedTypeInfoList.size());
161 for (var extendedTypeInfo : allExtendedTypeInfoList) { 208 for (var extendedTypeInfo : allExtendedTypeInfoList) {
162 var type = extendedTypeInfo.getType(); 209 var type = extendedTypeInfo.getType();
163 results.put(type, new PreservedType(extendedTypeInfo, allExtendedTypeInfoList)); 210 preservedResults.put(type, new TypeAnalysisResult(extendedTypeInfo, allExtendedTypeInfoList));
164 }
165 for (var entry : replacements.entrySet()) {
166 var type = entry.getKey();
167 results.put(type, new EliminatedType(entry.getValue()));
168 } 211 }
169 return Collections.unmodifiableMap(results); 212 return Collections.unmodifiableMap(preservedResults);
170 } 213 }
171 214
172 private List<ExtendedTypeInfo> sortTypes() { 215 private List<ExtendedTypeInfo> sortTypes() {
@@ -204,4 +247,8 @@ class TypeAnalyzer {
204 } 247 }
205 return Collections.unmodifiableList(sorted); 248 return Collections.unmodifiableList(sorted);
206 } 249 }
250
251 public static TypeHierarchyBuilder builder() {
252 return new TypeHierarchyBuilder();
253 }
207} 254}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyBuilder.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyBuilder.java
new file mode 100644
index 00000000..ce8fda05
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyBuilder.java
@@ -0,0 +1,66 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.reasoning.representation.PartialRelation;
9import tools.refinery.store.reasoning.translator.TranslationException;
10
11import java.util.*;
12
13@SuppressWarnings("UnusedReturnValue")
14public class TypeHierarchyBuilder {
15 protected final Map<PartialRelation, TypeInfo> typeInfoMap = new LinkedHashMap<>();
16
17 protected TypeHierarchyBuilder() {
18 }
19
20 public TypeHierarchyBuilder type(PartialRelation partialRelation, TypeInfo typeInfo) {
21 if (partialRelation.arity() != 1) {
22 throw new TranslationException(partialRelation,
23 "Only types of arity 1 are supported, got %s with %d instead"
24 .formatted(partialRelation, partialRelation.arity()));
25 }
26 var putResult = typeInfoMap.put(partialRelation, typeInfo);
27 if (putResult != null && !putResult.equals(typeInfo)) {
28 throw new TranslationException(partialRelation,
29 "Duplicate type info for partial relation: " + partialRelation);
30 }
31 return this;
32 }
33
34 public TypeHierarchyBuilder type(PartialRelation partialRelation, boolean abstractType,
35 PartialRelation... supertypes) {
36 return type(partialRelation, abstractType, Set.of(supertypes));
37 }
38
39 public TypeHierarchyBuilder type(PartialRelation partialRelation, boolean abstractType,
40 Collection<PartialRelation> supertypes) {
41 return type(partialRelation, new TypeInfo(supertypes, abstractType));
42 }
43
44 public TypeHierarchyBuilder type(PartialRelation partialRelation, PartialRelation... supertypes) {
45 return type(partialRelation, List.of(supertypes));
46 }
47
48 public TypeHierarchyBuilder type(PartialRelation partialRelation, Collection<PartialRelation> supertypes) {
49 return type(partialRelation, false, supertypes);
50 }
51
52 public TypeHierarchyBuilder types(Collection<Map.Entry<PartialRelation, TypeInfo>> entries) {
53 for (var entry : entries) {
54 type(entry.getKey(), entry.getValue());
55 }
56 return this;
57 }
58
59 public TypeHierarchyBuilder types(Map<PartialRelation, TypeInfo> map) {
60 return types(map.entrySet());
61 }
62
63 public TypeHierarchy build() {
64 return new TypeHierarchy(typeInfoMap);
65 }
66}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java
new file mode 100644
index 00000000..233e43f0
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyInitializer.java
@@ -0,0 +1,64 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.refinement.PartialModelInitializer;
10import tools.refinery.store.reasoning.representation.PartialRelation;
11import tools.refinery.store.reasoning.seed.ModelSeed;
12import tools.refinery.store.representation.Symbol;
13import tools.refinery.store.representation.TruthValue;
14import tools.refinery.store.tuple.Tuple;
15
16import java.util.Arrays;
17import java.util.HashMap;
18import java.util.function.Function;
19
20public class TypeHierarchyInitializer implements PartialModelInitializer {
21 private final TypeHierarchy typeHierarchy;
22 private final Symbol<InferredType> typeSymbol;
23
24 public TypeHierarchyInitializer(TypeHierarchy typeHierarchy, Symbol<InferredType> typeSymbol) {
25 this.typeHierarchy = typeHierarchy;
26 this.typeSymbol = typeSymbol;
27 }
28
29 @Override
30 public void initialize(Model model, ModelSeed modelSeed) {
31 var inferredTypes = new InferredType[modelSeed.getNodeCount()];
32 Arrays.fill(inferredTypes, typeHierarchy.getUnknownType());
33 for (var type : typeHierarchy.getAllTypes()) {
34 model.checkCancelled();
35 initializeType(type, inferredTypes, model, modelSeed);
36 }
37 var typeInterpretation = model.getInterpretation(typeSymbol);
38 var uniqueTable = new HashMap<InferredType, InferredType>();
39 for (int i = 0; i < inferredTypes.length; i++) {
40 model.checkCancelled();
41 var uniqueType = uniqueTable.computeIfAbsent(inferredTypes[i], Function.identity());
42 typeInterpretation.put(Tuple.of(i), uniqueType);
43 }
44 }
45
46 private void initializeType(PartialRelation type, InferredType[] inferredTypes, Model model, ModelSeed modelSeed) {
47 var cursor = modelSeed.getCursor(type, TruthValue.UNKNOWN);
48 var analysisResult = typeHierarchy.getAnalysisResult(type);
49 while (cursor.move()) {
50 model.checkCancelled();
51 var i = cursor.getKey().get(0);
52 checkNodeId(inferredTypes, i);
53 var value = cursor.getValue();
54 inferredTypes[i] = analysisResult.merge(inferredTypes[i], value);
55 }
56 }
57
58 private void checkNodeId(InferredType[] inferredTypes, int nodeId) {
59 if (nodeId < 0 || nodeId >= inferredTypes.length) {
60 throw new IllegalArgumentException("Expected node id %d to be lower than model size %d"
61 .formatted(nodeId, inferredTypes.length));
62 }
63 }
64}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslationUnit.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslationUnit.java
deleted file mode 100644
index 06e3c05f..00000000
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslationUnit.java
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.model.Model;
9import tools.refinery.store.reasoning.representation.PartialRelation;
10import tools.refinery.store.reasoning.translator.TranslatedRelation;
11import tools.refinery.store.reasoning.translator.TranslationUnit;
12import tools.refinery.store.representation.Symbol;
13
14import java.util.Collection;
15import java.util.List;
16import java.util.Map;
17
18public class TypeHierarchyTranslationUnit extends TranslationUnit {
19 static final Symbol<InferredType> INFERRED_TYPE_SYMBOL = Symbol.of(
20 "inferredType", 1, InferredType.class, InferredType.UNTYPED);
21
22 private final TypeAnalyzer typeAnalyzer;
23
24 public TypeHierarchyTranslationUnit(Map<PartialRelation, TypeInfo> typeInfoMap) {
25 typeAnalyzer = new TypeAnalyzer(typeInfoMap);
26 }
27
28 @Override
29 public Collection<TranslatedRelation> getTranslatedRelations() {
30 return List.of();
31 }
32
33 @Override
34 public void initializeModel(Model model, int nodeCount) {
35
36 }
37}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java
new file mode 100644
index 00000000..37ea1448
--- /dev/null
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTranslator.java
@@ -0,0 +1,111 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import tools.refinery.store.dse.transition.Rule;
9import tools.refinery.store.dse.transition.actions.ActionLiteral;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.model.ModelStoreConfiguration;
12import tools.refinery.store.query.dnf.Query;
13import tools.refinery.store.reasoning.ReasoningBuilder;
14import tools.refinery.store.reasoning.actions.PartialActionLiterals;
15import tools.refinery.store.reasoning.literal.PartialLiterals;
16import tools.refinery.store.reasoning.representation.PartialRelation;
17import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
18import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
19import tools.refinery.store.reasoning.translator.proxy.PartialRelationTranslatorProxy;
20import tools.refinery.store.representation.Symbol;
21
22import java.util.ArrayList;
23
24import static tools.refinery.store.query.literal.Literals.not;
25import static tools.refinery.store.reasoning.literal.PartialLiterals.candidateMust;
26import static tools.refinery.store.reasoning.literal.PartialLiterals.may;
27
28public class TypeHierarchyTranslator implements ModelStoreConfiguration {
29 public static final Symbol<InferredType> TYPE_SYMBOL = Symbol.of("TYPE", 1, InferredType.class,
30 InferredType.UNTYPED);
31 private final TypeHierarchy typeHierarchy;
32
33 public TypeHierarchyTranslator(TypeHierarchy typeHierarchy) {
34 this.typeHierarchy = typeHierarchy;
35 }
36
37 @Override
38 public void apply(ModelStoreBuilder storeBuilder) {
39 if (typeHierarchy.isEmpty()) {
40 return;
41 }
42
43 storeBuilder.symbol(TYPE_SYMBOL);
44
45 for (var entry : typeHierarchy.getPreservedTypes().entrySet()) {
46 storeBuilder.with(createPreservedTypeTranslator(entry.getKey(), entry.getValue()));
47 }
48
49 for (var entry : typeHierarchy.getEliminatedTypes().entrySet()) {
50 storeBuilder.with(createEliminatedTypeTranslator(entry.getKey(), entry.getValue()));
51 }
52
53 var reasoningBuilder = storeBuilder.getAdapter(ReasoningBuilder.class);
54 reasoningBuilder.initializer(new TypeHierarchyInitializer(typeHierarchy, TYPE_SYMBOL));
55 }
56
57 private ModelStoreConfiguration createPreservedTypeTranslator(PartialRelation type, TypeAnalysisResult result) {
58 var may = Query.of(type.name() + "#partial#may", (builder, p1) -> {
59 if (!result.isAbstractType()) {
60 builder.clause(new MayTypeView(TYPE_SYMBOL, type).call(p1));
61 }
62 for (var subtype : result.getDirectSubtypes()) {
63 builder.clause(may(subtype.call(p1)));
64 }
65 });
66
67 var must = Query.of(type.name() + "#partial#must", (builder, p1) -> builder.clause(
68 new MustTypeView(TYPE_SYMBOL, type).call(p1)
69 ));
70
71 var candidate = Query.of(type.name() + "#candidate", (builder, p1) -> {
72 if (!result.isAbstractType()) {
73 builder.clause(new CandidateTypeView(TYPE_SYMBOL, type).call(p1));
74 }
75 for (var subtype : result.getDirectSubtypes()) {
76 builder.clause(PartialLiterals.candidateMust(subtype.call(p1)));
77 }
78 });
79
80 var translator = PartialRelationTranslator.of(type)
81 .may(may)
82 .must(must)
83 .candidate(candidate)
84 .refiner(InferredTypeRefiner.of(TYPE_SYMBOL, result));
85
86 if (!result.isAbstractType()) {
87 var decision = Rule.of(type.name(), (builder, instance) -> builder
88 .clause(
89 may(type.call(instance)),
90 not(candidateMust(type.call(instance))),
91 not(MultiObjectTranslator.MULTI_VIEW.call(instance))
92 )
93 .action(() -> {
94 var actionLiterals = new ArrayList<ActionLiteral>();
95 actionLiterals.add(PartialActionLiterals.add(type, instance));
96 for (var subtype : result.getDirectSubtypes()) {
97 actionLiterals.add(PartialActionLiterals.remove(subtype, instance));
98 }
99 return actionLiterals;
100 }));
101 translator.decision(decision);
102 }
103
104 return translator;
105 }
106
107 private ModelStoreConfiguration createEliminatedTypeTranslator(
108 PartialRelation type, PartialRelation replacement) {
109 return new PartialRelationTranslatorProxy(type, replacement, true);
110 }
111}
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeInfo.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeInfo.java
index 9f897e46..e6bdaff2 100644
--- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeInfo.java
+++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeInfo.java
@@ -9,43 +9,15 @@ import tools.refinery.store.reasoning.representation.PartialRelation;
9 9
10import java.util.*; 10import java.util.*;
11 11
12public record TypeInfo(Collection<PartialRelation> supertypes, boolean abstractType) { 12public record TypeInfo(Set<PartialRelation> supertypes, boolean abstractType) {
13 public static Builder builder() { 13 public TypeInfo(Collection<PartialRelation> supertypes, boolean abstractType) {
14 return new Builder(); 14 this(Set.copyOf(supertypes), abstractType);
15 } 15 }
16 16
17 public static class Builder { 17 public TypeInfo addSupertype(PartialRelation newSupertype) {
18 private final Set<PartialRelation> supertypes = new LinkedHashSet<>(); 18 var newSupertypes = new ArrayList<PartialRelation>(supertypes.size() + 1);
19 private boolean abstractType; 19 newSupertypes.addAll(supertypes);
20 20 newSupertypes.add(newSupertype);
21 private Builder() { 21 return new TypeInfo(newSupertypes, abstractType);
22 }
23
24 public Builder supertypes(Collection<PartialRelation> supertypes) {
25 this.supertypes.addAll(supertypes);
26 return this;
27 }
28
29 public Builder supertypes(PartialRelation... supertypes) {
30 return supertypes(List.of(supertypes));
31 }
32
33 public Builder supertype(PartialRelation supertype) {
34 supertypes.add(supertype);
35 return this;
36 }
37
38 public Builder abstractType(boolean abstractType) {
39 this.abstractType = abstractType;
40 return this;
41 }
42
43 public Builder abstractType() {
44 return abstractType(true);
45 }
46
47 public TypeInfo build() {
48 return new TypeInfo(Collections.unmodifiableSet(supertypes), abstractType);
49 }
50 } 22 }
51} 23}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java
new file mode 100644
index 00000000..77560a68
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/PartialModelTest.java
@@ -0,0 +1,108 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.term.Variable;
13import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
14import tools.refinery.store.query.view.ForbiddenView;
15import tools.refinery.store.reasoning.literal.Concreteness;
16import tools.refinery.store.reasoning.representation.PartialRelation;
17import tools.refinery.store.reasoning.seed.ModelSeed;
18import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
19import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
20import tools.refinery.store.representation.Symbol;
21import tools.refinery.store.representation.TruthValue;
22import tools.refinery.store.tuple.Tuple;
23
24import static org.hamcrest.MatcherAssert.assertThat;
25import static org.hamcrest.Matchers.is;
26import static org.hamcrest.Matchers.not;
27import static org.hamcrest.Matchers.nullValue;
28import static tools.refinery.store.query.literal.Literals.not;
29import static tools.refinery.store.reasoning.ReasoningAdapter.EQUALS_SYMBOL;
30import static tools.refinery.store.reasoning.ReasoningAdapter.EXISTS_SYMBOL;
31import static tools.refinery.store.reasoning.literal.PartialLiterals.may;
32import static tools.refinery.store.reasoning.literal.PartialLiterals.must;
33
34class PartialModelTest {
35 @Test
36 void partialModelTest() {
37 var person = new PartialRelation("Person", 1);
38 var friend = new PartialRelation("friend", 2);
39 var lonely = new PartialRelation("lonely", 1);
40
41 var personStorage = Symbol.of("Person", 1, TruthValue.class, TruthValue.FALSE);
42 var friendStorage = Symbol.of("friend", 2, TruthValue.class, TruthValue.UNKNOWN);
43
44 var store = ModelStore.builder()
45 .with(ViatraModelQueryAdapter.builder())
46 .with(ReasoningAdapter.builder())
47 .with(new MultiObjectTranslator())
48 .with(PartialRelationTranslator.of(person)
49 .symbol(personStorage))
50 .with(PartialRelationTranslator.of(friend)
51 .symbol(friendStorage)
52 .may(Query.of("mayFriend", (builder, p1, p2) -> builder.clause(
53 may(person.call(p1)),
54 may(person.call(p2)),
55 not(must(EQUALS_SYMBOL.call(p1, p2))),
56 not(new ForbiddenView(friendStorage).call(p1, p2))
57 ))))
58 .with(PartialRelationTranslator.of(lonely)
59 .query(Query.of("lonely", (builder, p1) -> builder.clause(
60 person.call(p1),
61 not(friend.call(p1, Variable.of())))
62 )))
63 .build();
64
65 var modelSeed = ModelSeed.builder(4)
66 .seed(EXISTS_SYMBOL, builder -> builder
67 .put(Tuple.of(0), TruthValue.TRUE)
68 .put(Tuple.of(1), TruthValue.UNKNOWN)
69 .put(Tuple.of(2), TruthValue.TRUE)
70 .put(Tuple.of(3), TruthValue.TRUE))
71 .seed(EQUALS_SYMBOL, builder -> builder
72 .put(Tuple.of(0, 0), TruthValue.TRUE)
73 .put(Tuple.of(1, 1), TruthValue.UNKNOWN)
74 .put(Tuple.of(2, 2), TruthValue.UNKNOWN)
75 .put(Tuple.of(3, 3), TruthValue.TRUE))
76 .seed(person, builder -> builder
77 .put(Tuple.of(0), TruthValue.TRUE)
78 .put(Tuple.of(1), TruthValue.TRUE)
79 .put(Tuple.of(2), TruthValue.UNKNOWN))
80 .seed(friend, builder -> builder
81 .reducedValue(TruthValue.UNKNOWN)
82 .put(Tuple.of(0, 1), TruthValue.TRUE)
83 .put(Tuple.of(1, 2), TruthValue.FALSE))
84 .build();
85 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
86
87 var queryAdapter = model.getAdapter(ModelQueryAdapter.class);
88 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
89 var friendInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, friend);
90 var friendRefiner = reasoningAdapter.getRefiner(friend);
91
92 assertThat(friendInterpretation.get(Tuple.of(0, 1)), is(TruthValue.TRUE));
93 assertThat(friendInterpretation.get(Tuple.of(1, 0)), is(TruthValue.UNKNOWN));
94 assertThat(friendInterpretation.get(Tuple.of(3, 0)), is(TruthValue.FALSE));
95
96 assertThat(friendRefiner.merge(Tuple.of(0, 1), TruthValue.FALSE), is(true));
97 assertThat(friendRefiner.merge(Tuple.of(1, 0), TruthValue.TRUE), is(true));
98 var splitResult = reasoningAdapter.split(1);
99 assertThat(splitResult, not(nullValue()));
100 var newPerson = splitResult.get(0);
101 queryAdapter.flushChanges();
102
103 assertThat(friendInterpretation.get(Tuple.of(0, 1)), is(TruthValue.ERROR));
104 assertThat(friendInterpretation.get(Tuple.of(1, 0)), is(TruthValue.TRUE));
105 assertThat(friendInterpretation.get(Tuple.of(0, newPerson)), is(TruthValue.ERROR));
106 assertThat(friendInterpretation.get(Tuple.of(newPerson, 0)), is(TruthValue.TRUE));
107 }
108}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java
new file mode 100644
index 00000000..793d1cec
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/lifting/DnfLifterTest.java
@@ -0,0 +1,395 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.lifting;
7
8import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.query.dnf.Dnf;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.term.ParameterDirection;
13import tools.refinery.store.query.view.AnySymbolView;
14import tools.refinery.store.query.view.FunctionView;
15import tools.refinery.store.query.view.MustView;
16import tools.refinery.store.reasoning.ReasoningAdapter;
17import tools.refinery.store.reasoning.literal.Concreteness;
18import tools.refinery.store.reasoning.literal.ModalConstraint;
19import tools.refinery.store.reasoning.literal.Modality;
20import tools.refinery.store.reasoning.representation.PartialRelation;
21import tools.refinery.store.reasoning.representation.PartialSymbol;
22import tools.refinery.store.representation.Symbol;
23import tools.refinery.store.representation.TruthValue;
24
25import java.util.List;
26
27import static org.hamcrest.MatcherAssert.assertThat;
28import static tools.refinery.store.query.literal.Literals.check;
29import static tools.refinery.store.query.literal.Literals.not;
30import static tools.refinery.store.query.term.int_.IntTerms.*;
31import static tools.refinery.store.query.tests.QueryMatchers.structurallyEqualTo;
32
33class DnfLifterTest {
34 private static final Symbol<TruthValue> friendSymbol = Symbol.of("friend", 2, TruthValue.class,
35 TruthValue.UNKNOWN);
36 private static final AnySymbolView friendMustView = new MustView(friendSymbol);
37 private static final Symbol<Integer> age = Symbol.of("age", 1, Integer.class);
38 private static final FunctionView<Integer> ageView = new FunctionView<>(age);
39 private static final PartialRelation person = PartialSymbol.of("Person", 1);
40 private static final PartialRelation friend = PartialSymbol.of("friend", 2);
41
42 private DnfLifter sut;
43
44 @BeforeEach
45 void beforeEach() {
46 sut = new DnfLifter();
47 }
48
49 @Test
50 void liftPartialRelationCallTest() {
51 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
52 friend.call(p1, v1)
53 ))).getDnf();
54 var actual = sut.lift(Modality.MUST, Concreteness.PARTIAL, input);
55
56 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
57 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, friend).call(p1, v1),
58 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(v1)
59 ))).getDnf();
60
61 assertThat(actual, structurallyEqualTo(expected));
62 }
63
64 @Test
65 void liftPartialDnfCallTest() {
66 var called = Query.of("Called", (builder, p1, p2) -> builder.clause(
67 friend.call(p1, p2),
68 friend.call(p2, p1)
69 ));
70 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
71 called.call(p1, v1)
72 ))).getDnf();
73 var actual = sut.lift(Modality.MUST, Concreteness.PARTIAL, input);
74
75 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
76 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, called.getDnf()).call(p1, v1),
77 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(v1)
78 ))).getDnf();
79
80 assertThat(actual, structurallyEqualTo(expected));
81 }
82
83 @Test
84 void liftSymbolViewCallTest() {
85 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
86 friendMustView.call(p1, v1)
87 ))).getDnf();
88 var actual = sut.lift(Modality.MUST, Concreteness.PARTIAL, input);
89
90 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
91 friendMustView.call(p1, v1),
92 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(v1)
93 ))).getDnf();
94
95 assertThat(actual, structurallyEqualTo(expected));
96 }
97
98 @Test
99 void liftPartialRelationNegativeCallTest() {
100 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
101 not(friend.call(p1, v1)),
102 friend.call(v1, p1)
103 ))).getDnf();
104 var actual = sut.lift(Modality.MUST, Concreteness.PARTIAL, input);
105
106 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
107 not(ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, v1)),
108 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, friend).call(v1, p1),
109 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(v1)
110 ))).getDnf();
111
112 assertThat(actual, structurallyEqualTo(expected));
113 }
114
115 @Test
116 void liftPartialRelationQuantifiedNegativeCallTest() {
117 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
118 person.call(p1),
119 not(friend.call(p1, v1))
120 ))).getDnf();
121 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
122
123 var helper = Query.of("Helper", (builder, p1, p2) -> builder.clause(
124 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, friend).call(p1, p2),
125 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
126 ));
127 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
128 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, person).call(p1),
129 not(helper.call(p1, v1))
130 ))).getDnf();
131
132 assertThat(actual, structurallyEqualTo(expected));
133 }
134
135 @Test
136 void liftSymbolViewQuantifiedNegativeCallTest() {
137 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
138 person.call(p1),
139 not(friendMustView.call(p1, v1))
140 ))).getDnf();
141 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
142
143 var helper = Query.of("Helper", (builder, p1, p2) -> builder.clause(
144 friendMustView.call(p1, p2),
145 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
146 ));
147 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
148 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, person).call(p1),
149 not(helper.call(p1, v1))
150 ))).getDnf();
151
152 assertThat(actual, structurallyEqualTo(expected));
153 }
154
155 @Test
156 void liftPartialRelationQuantifiedNegativeDiagonalCallTest() {
157 var input = Query.of("Actual", (builder) -> builder.clause((v1) -> List.of(
158 not(friend.call(v1, v1))
159 ))).getDnf();
160 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
161
162 var helper = Query.of("Helper", (builder, p1) -> builder.clause(
163 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, friend).call(p1, p1),
164 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p1)
165 ));
166 var expected = Query.of("Expected", (builder) -> builder.clause((v1) -> List.of(
167 not(helper.call(v1))
168 ))).getDnf();
169
170 assertThat(actual, structurallyEqualTo(expected));
171 }
172
173 @Test
174 void liftPartialDnfQuantifiedNegativeInputCallTest() {
175 var called = Dnf.of("Called", builder -> {
176 var p1 = builder.parameter("p1", ParameterDirection.IN);
177 var p2 = builder.parameter("p2", ParameterDirection.OUT);
178 builder.clause(
179 friend.call(p1, p2),
180 friend.call(p2, p1)
181 );
182 });
183 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
184 person.call(p1),
185 not(called.call(p1, v1))
186 ))).getDnf();
187 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
188
189 var helper = Dnf.of("Helper", builder -> {
190 var p1 = builder.parameter("p1", ParameterDirection.IN);
191 var p2 = builder.parameter("p2", ParameterDirection.OUT);
192 builder.clause(
193 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, called).call(p1, p2),
194 ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
195 );
196 });
197 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
198 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, person).call(p1),
199 not(helper.call(p1, v1))
200 ))).getDnf();
201
202 assertThat(actual, structurallyEqualTo(expected));
203 }
204
205 @Test
206 void liftPartialRelationTransitiveCallTest() {
207 var input = Query.of("Actual", (builder, p1, p2)-> builder.clause(
208 friend.callTransitive(p1, p2),
209 not(person.call(p2))
210 )).getDnf();
211 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
212
213 var helper = Query.of("Helper", (builder, p1, p2) -> builder.clause(
214 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, p2),
215 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
216 ));
217 var helper2 = Query.of("Helper2", (builder, p1, p2) -> {
218 builder.clause(
219 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, p2)
220 );
221 builder.clause((v1) -> List.of(
222 helper.callTransitive(p1, v1),
223 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(v1, p2)
224 ));
225 });
226 var expected = Query.of("Expected", (builder, p1, p2) -> builder.clause(
227 helper2.call(p1, p2),
228 not(ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, person).call(p2))
229 )).getDnf();
230
231 assertThat(actual, structurallyEqualTo(expected));
232 }
233
234 @Test
235 void liftPartialSymbolTransitiveCallTest() {
236 var input = Query.of("Actual", (builder, p1, p2)-> builder.clause(
237 friendMustView.callTransitive(p1, p2),
238 not(person.call(p2))
239 )).getDnf();
240 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
241
242 var endExistsHelper = Query.of("EndExistsHelper", (builder, p1, p2) -> builder.clause(
243 friendMustView.call(p1, p2),
244 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
245 ));
246 var transitiveHelper = Query.of("TransitiveHelper", (builder, p1, p2) -> {
247 builder.clause(
248 friendMustView.call(p1, p2)
249 );
250 builder.clause((v1) -> List.of(
251 endExistsHelper.callTransitive(p1, v1),
252 friendMustView.call(v1, p2)
253 ));
254 });
255 var expected = Query.of("Expected", (builder, p1, p2) -> builder.clause(
256 transitiveHelper.call(p1, p2),
257 not(ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, person).call(p2))
258 )).getDnf();
259
260 assertThat(actual, structurallyEqualTo(expected));
261 }
262
263 @Test
264 void liftPartialRelationTransitiveCallExistsTest() {
265 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
266 friend.callTransitive(p1, v1),
267 not(person.call(v1))
268 ))).getDnf();
269 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
270
271 var helper = Query.of("Helper", (builder, p1, p2) -> builder.clause(
272 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, p2),
273 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
274 ));
275 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
276 helper.callTransitive(p1, v1),
277 not(ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, person).call(v1))
278 ))).getDnf();
279
280 assertThat(actual, structurallyEqualTo(expected));
281 }
282
283 @Test
284 void liftMultipleTransitiveCallExistsTest() {
285 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
286 friend.callTransitive(p1, v1),
287 friendMustView.callTransitive(p1, v1),
288 not(person.call(v1))
289 ))).getDnf();
290 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
291
292 var helper = Query.of("Helper", (builder, p1, p2) -> builder.clause(
293 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, p2),
294 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
295 ));
296 var helper2 = Query.of("Helper2", (builder, p1, p2) -> builder.clause(
297 friendMustView.call(p1, p2),
298 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(p2)
299 ));
300 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
301 helper.callTransitive(p1, v1),
302 helper2.callTransitive(p1, v1),
303 not(ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, person).call(v1))
304 ))).getDnf();
305
306 assertThat(actual, structurallyEqualTo(expected));
307 }
308
309 @Test
310 void liftEquivalentTest() {
311 var input = Query.of("Actual", (builder, p1, p2) -> builder.clause(
312 p1.isEquivalent(p2),
313 person.call(p1)
314 )).getDnf();
315 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
316
317 var expected = Query.of("Expected", (builder, p1, p2) -> builder.clause(
318 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, person).call(p1),
319 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, ReasoningAdapter.EQUALS_SYMBOL).call(p2, p1)
320 )).getDnf();
321
322 assertThat(actual, structurallyEqualTo(expected));
323 }
324
325 @Test
326 void liftNotEquivalentTest() {
327 var input = Query.of("Actual", (builder, p1, p2) -> builder.clause(
328 not(p1.isEquivalent(p2)),
329 friend.call(p1, p2)
330 )).getDnf();
331 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
332
333 var expected = Query.of("Expected", (builder, p1, p2) -> builder.clause(
334 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(p1, p2),
335 not(ModalConstraint.of(Modality.MUST, Concreteness.PARTIAL, ReasoningAdapter.EQUALS_SYMBOL).call(p1, p2))
336 )).getDnf();
337
338 assertThat(actual, structurallyEqualTo(expected));
339 }
340
341 @Test
342 void liftConstantTest() {
343 var input = Query.of("Actual", (builder, p1) -> builder.clause((v1) -> List.of(
344 v1.isConstant(0),
345 friend.call(v1, p1)
346 ))).getDnf();
347 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
348
349 var expected = Query.of("Expected", (builder, p1) -> builder.clause((v1) -> List.of(
350 v1.isConstant(0),
351 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, friend).call(v1, p1),
352 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, ReasoningAdapter.EXISTS_SYMBOL).call(v1)
353 ))).getDnf();
354
355 assertThat(actual, structurallyEqualTo(expected));
356 }
357
358 @Test
359 void liftAssignTest() {
360 var input = Query.of("Actual", Integer.class, (builder, p1, output) -> builder
361 .clause(Integer.class, (d1) -> List.of(
362 person.call(p1),
363 ageView.call(p1, d1),
364 output.assign(mul(constant(2), d1))
365 ))).getDnf();
366 var actual = sut.lift(Modality.MAY, Concreteness.PARTIAL, input);
367
368 var expected = Query.of("Expected", Integer.class, (builder, p1, output) -> builder
369 .clause(Integer.class, (d1) -> List.of(
370 ModalConstraint.of(Modality.MAY, Concreteness.PARTIAL, person).call(p1),
371 ageView.call(p1, d1),
372 output.assign(mul(constant(2), d1))
373 ))).getDnf();
374
375 assertThat(actual, structurallyEqualTo(expected));
376 }
377
378 @Test
379 void liftCheckTest() {
380 var input = Query.of("Actual", (builder, p1) -> builder.clause(Integer.class, (d1) -> List.of(
381 person.call(p1),
382 ageView.call(p1, d1),
383 check(greaterEq(d1, constant(21)))
384 ))).getDnf();
385 var actual = sut.lift(Modality.MAY, Concreteness.CANDIDATE, input);
386
387 var expected = Query.of("Expected", (builder, p1) -> builder.clause(Integer.class, (d1) -> List.of(
388 ModalConstraint.of(Modality.MAY, Concreteness.CANDIDATE, person).call(p1),
389 ageView.call(p1, d1),
390 check(greaterEq(d1, constant(21)))
391 ))).getDnf();
392
393 assertThat(actual, structurallyEqualTo(expected));
394 }
395}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java
new file mode 100644
index 00000000..bbfaff84
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/containment/ContainmentHierarchyTranslatorTest.java
@@ -0,0 +1,128 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.containment;
7
8import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
12import tools.refinery.store.reasoning.ReasoningAdapter;
13import tools.refinery.store.reasoning.ReasoningStoreAdapter;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.representation.PartialRelation;
16import tools.refinery.store.reasoning.seed.ModelSeed;
17import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
18import tools.refinery.store.reasoning.translator.multiplicity.UnconstrainedMultiplicity;
19import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchy;
20import tools.refinery.store.reasoning.translator.typehierarchy.TypeHierarchyTranslator;
21import tools.refinery.store.representation.TruthValue;
22import tools.refinery.store.representation.cardinality.CardinalityIntervals;
23import tools.refinery.store.tuple.Tuple;
24
25import java.util.Map;
26
27import static org.hamcrest.MatcherAssert.assertThat;
28import static org.hamcrest.Matchers.is;
29import static tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator.CONTAINED_SYMBOL;
30import static tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator.CONTAINS_SYMBOL;
31import static tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator.COUNT_SYMBOL;
32
33class ContainmentHierarchyTranslatorTest {
34 private final PartialRelation c1 = new PartialRelation("C1", 1);
35 private final PartialRelation c2 = new PartialRelation("C2", 1);
36 private final PartialRelation entry = new PartialRelation("entry", 2);
37
38 private ModelStore store;
39
40 @BeforeEach
41 void beforeEach() {
42
43 var typeHierarchy = TypeHierarchy.builder()
44 .type(CONTAINED_SYMBOL, true)
45 .type(c1)
46 .type(c2, c1, CONTAINED_SYMBOL)
47 .build();
48
49 var containmentHierarchy = Map.of(
50 entry,
51 new ContainmentInfo(c1, UnconstrainedMultiplicity.INSTANCE, c2)
52 );
53
54 store = ModelStore.builder()
55 .with(ViatraModelQueryAdapter.builder())
56 .with(ReasoningAdapter.builder())
57 .with(new MultiObjectTranslator())
58 .with(new TypeHierarchyTranslator(typeHierarchy))
59 .with(new ContainmentHierarchyTranslator(containmentHierarchy))
60 .build();
61 }
62
63 @Test
64 void treeTest() {
65 var modelSeed = ModelSeed.builder(3)
66 .seed(COUNT_SYMBOL, builder -> builder.reducedValue(CardinalityIntervals.ONE))
67 .seed(CONTAINED_SYMBOL, builder -> builder.reducedValue(TruthValue.UNKNOWN))
68 .seed(CONTAINS_SYMBOL, builder -> builder.reducedValue(TruthValue.UNKNOWN))
69 .seed(c1, builder -> builder
70 .reducedValue(TruthValue.UNKNOWN)
71 .put(Tuple.of(0), TruthValue.TRUE))
72 .seed(c2, builder -> builder
73 .put(Tuple.of(1), TruthValue.TRUE)
74 .put(Tuple.of(2), TruthValue.TRUE))
75 .seed(entry, builder -> builder
76 .reducedValue(TruthValue.UNKNOWN)
77 .put(Tuple.of(0, 1), TruthValue.TRUE)
78 .put(Tuple.of(0, 2), TruthValue.TRUE))
79 .build();
80
81 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
82 var interpretation = model.getAdapter(ReasoningAdapter.class).getPartialInterpretation(Concreteness.PARTIAL,
83 entry);
84
85 assertThat(interpretation.get(Tuple.of(0, 0)), is(TruthValue.FALSE));
86 assertThat(interpretation.get(Tuple.of(0, 1)), is(TruthValue.TRUE));
87 assertThat(interpretation.get(Tuple.of(0, 2)), is(TruthValue.TRUE));
88 assertThat(interpretation.get(Tuple.of(1, 0)), is(TruthValue.FALSE));
89 assertThat(interpretation.get(Tuple.of(1, 1)), is(TruthValue.FALSE));
90 assertThat(interpretation.get(Tuple.of(1, 2)), is(TruthValue.FALSE));
91 assertThat(interpretation.get(Tuple.of(2, 0)), is(TruthValue.FALSE));
92 assertThat(interpretation.get(Tuple.of(2, 1)), is(TruthValue.FALSE));
93 assertThat(interpretation.get(Tuple.of(2, 2)), is(TruthValue.FALSE));
94 }
95
96 @Test
97 void loopTest() {
98 var modelSeed = ModelSeed.builder(3)
99 .seed(COUNT_SYMBOL, builder -> builder.reducedValue(CardinalityIntervals.ONE))
100 .seed(CONTAINED_SYMBOL, builder -> builder.reducedValue(TruthValue.UNKNOWN))
101 .seed(CONTAINS_SYMBOL, builder -> builder.reducedValue(TruthValue.UNKNOWN))
102 .seed(c1, builder -> builder.reducedValue(TruthValue.UNKNOWN))
103 .seed(c2, builder -> builder
104 .put(Tuple.of(0), TruthValue.TRUE)
105 .put(Tuple.of(1), TruthValue.TRUE)
106 .put(Tuple.of(2), TruthValue.TRUE))
107 .seed(entry, builder -> builder
108 .reducedValue(TruthValue.UNKNOWN)
109 .put(Tuple.of(0, 1), TruthValue.TRUE)
110 .put(Tuple.of(1, 2), TruthValue.TRUE)
111 .put(Tuple.of(2, 0), TruthValue.TRUE))
112 .build();
113
114 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
115 var interpretation = model.getAdapter(ReasoningAdapter.class).getPartialInterpretation(Concreteness.PARTIAL,
116 entry);
117
118 assertThat(interpretation.get(Tuple.of(0, 0)), is(TruthValue.FALSE));
119 assertThat(interpretation.get(Tuple.of(0, 1)), is(TruthValue.ERROR));
120 assertThat(interpretation.get(Tuple.of(0, 2)), is(TruthValue.FALSE));
121 assertThat(interpretation.get(Tuple.of(1, 0)), is(TruthValue.FALSE));
122 assertThat(interpretation.get(Tuple.of(1, 1)), is(TruthValue.FALSE));
123 assertThat(interpretation.get(Tuple.of(1, 2)), is(TruthValue.ERROR));
124 assertThat(interpretation.get(Tuple.of(2, 0)), is(TruthValue.ERROR));
125 assertThat(interpretation.get(Tuple.of(2, 1)), is(TruthValue.FALSE));
126 assertThat(interpretation.get(Tuple.of(2, 2)), is(TruthValue.FALSE));
127 }
128}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java
new file mode 100644
index 00000000..0f1a1006
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelBuilderTest.java
@@ -0,0 +1,58 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.metamodel;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.reasoning.representation.PartialRelation;
10import tools.refinery.store.reasoning.translator.TranslationException;
11import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity;
12import tools.refinery.store.representation.cardinality.CardinalityIntervals;
13
14import static org.junit.jupiter.api.Assertions.assertThrows;
15
16class MetamodelBuilderTest {
17 private final PartialRelation university = new PartialRelation("University", 1);
18 private final PartialRelation course = new PartialRelation("Course", 1);
19 private final PartialRelation courses = new PartialRelation("courses", 2);
20 private final PartialRelation location = new PartialRelation("location", 2);
21
22 @Test
23 void missingOppositeTest() {
24 var builder = Metamodel.builder()
25 .type(university)
26 .type(course)
27 .reference(courses, university, course, location)
28 .reference(location, course, university);
29
30 assertThrows(TranslationException.class, builder::build);
31 }
32
33 @Test
34 void invalidOppositeTypeTest() {
35 var builder = Metamodel.builder()
36 .type(university)
37 .type(course)
38 .reference(courses, university, course, location)
39 .reference(location, course, course, courses);
40
41 assertThrows(TranslationException.class, builder::build);
42 }
43
44 @Test
45 void invalidOppositeMultiplicityTest() {
46 var invalidMultiplicity = new PartialRelation("invalidMultiplicity", 1);
47
48 var builder = Metamodel.builder()
49 .type(university)
50 .type(course)
51 .reference(courses, university, true, course, location)
52 .reference(location, course,
53 ConstrainedMultiplicity.of(CardinalityIntervals.atLeast(2), invalidMultiplicity),
54 university, courses);
55
56 assertThrows(TranslationException.class, builder::build);
57 }
58}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java
new file mode 100644
index 00000000..eabbdffe
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/metamodel/MetamodelTest.java
@@ -0,0 +1,152 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.metamodel;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.model.Model;
10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
12import tools.refinery.store.reasoning.ReasoningAdapter;
13import tools.refinery.store.reasoning.ReasoningStoreAdapter;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.representation.PartialRelation;
16import tools.refinery.store.reasoning.seed.ModelSeed;
17import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator;
18import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator;
19import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity;
20import tools.refinery.store.representation.TruthValue;
21import tools.refinery.store.representation.cardinality.CardinalityIntervals;
22import tools.refinery.store.tuple.Tuple;
23
24import static org.hamcrest.MatcherAssert.assertThat;
25import static org.hamcrest.Matchers.is;
26
27class MetamodelTest {
28 private final PartialRelation person = new PartialRelation("Person", 1);
29 private final PartialRelation student = new PartialRelation("Student", 1);
30 private final PartialRelation teacher = new PartialRelation("Teacher", 1);
31 private final PartialRelation university = new PartialRelation("University", 1);
32 private final PartialRelation course = new PartialRelation("Course", 1);
33 private final PartialRelation courses = new PartialRelation("courses", 2);
34 private final PartialRelation location = new PartialRelation("location", 2);
35 private final PartialRelation lecturer = new PartialRelation("lecturer", 2);
36 private final PartialRelation invalidLecturerCount = new PartialRelation("invalidLecturerCount", 1);
37 private final PartialRelation enrolledStudents = new PartialRelation("enrolledStudents", 2);
38 private final PartialRelation invalidStudentCount = new PartialRelation("invalidStudentCount", 1);
39
40 @Test
41 void metamodelTest() {
42 var metamodel = Metamodel.builder()
43 .type(person, true)
44 .type(student, person)
45 .type(teacher, person)
46 .type(university)
47 .type(course)
48 .reference(courses, university, true, course, location)
49 .reference(location, course, university, courses)
50 .reference(lecturer, course,
51 ConstrainedMultiplicity.of(CardinalityIntervals.ONE, invalidLecturerCount), teacher)
52 .reference(enrolledStudents, course,
53 ConstrainedMultiplicity.of(CardinalityIntervals.SOME, invalidStudentCount), student)
54 .build();
55
56 var seed = ModelSeed.builder(5)
57 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
58 .reducedValue(CardinalityIntervals.ONE)
59 .put(Tuple.of(1), CardinalityIntervals.SET)
60 .put(Tuple.of(4), CardinalityIntervals.SET))
61 .seed(ContainmentHierarchyTranslator.CONTAINED_SYMBOL, builder -> builder
62 .reducedValue(TruthValue.UNKNOWN))
63 .seed(ContainmentHierarchyTranslator.CONTAINS_SYMBOL, builder -> builder
64 .reducedValue(TruthValue.UNKNOWN))
65 .seed(person, builder -> builder.reducedValue(TruthValue.UNKNOWN))
66 .seed(student, builder -> builder.reducedValue(TruthValue.UNKNOWN))
67 .seed(teacher, builder -> builder.reducedValue(TruthValue.UNKNOWN))
68 .seed(university, builder -> builder
69 .reducedValue(TruthValue.UNKNOWN)
70 .put(Tuple.of(0), TruthValue.TRUE))
71 .seed(course, builder -> builder
72 .reducedValue(TruthValue.UNKNOWN)
73 .put(Tuple.of(2), TruthValue.TRUE))
74 .seed(courses, builder -> builder.reducedValue(TruthValue.UNKNOWN))
75 .seed(location, builder -> builder
76 .reducedValue(TruthValue.UNKNOWN)
77 .put(Tuple.of(1, 0), TruthValue.TRUE))
78 .seed(lecturer, builder -> builder
79 .reducedValue(TruthValue.FALSE)
80 .put(Tuple.of(1, 3), TruthValue.TRUE))
81 .seed(enrolledStudents, builder -> builder.reducedValue(TruthValue.UNKNOWN))
82 .build();
83
84 var model = createModel(metamodel, seed);
85 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
86
87 var coursesInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, courses);
88 assertThat(coursesInterpretation.get(Tuple.of(0, 1)), is(TruthValue.TRUE));
89 assertThat(coursesInterpretation.get(Tuple.of(0, 2)), is(TruthValue.UNKNOWN));
90 assertThat(coursesInterpretation.get(Tuple.of(0, 3)), is(TruthValue.FALSE));
91
92 var invalidLecturerCountInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL,
93 invalidLecturerCount);
94 assertThat(invalidLecturerCountInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
95 assertThat(invalidLecturerCountInterpretation.get(Tuple.of(2)), is(TruthValue.ERROR));
96
97 var enrolledStudentsInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL,
98 enrolledStudents);
99 assertThat(enrolledStudentsInterpretation.get(Tuple.of(1, 3)), is(TruthValue.FALSE));
100 assertThat(enrolledStudentsInterpretation.get(Tuple.of(1, 4)), is(TruthValue.UNKNOWN));
101 }
102
103 @Test
104 void simpleContainmentTest() {
105 var metamodel = Metamodel.builder()
106 .type(university)
107 .type(course)
108 .reference(courses, university, true, course)
109 .build();
110
111
112 var seed = ModelSeed.builder(4)
113 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
114 .reducedValue(CardinalityIntervals.ONE)
115 .put(Tuple.of(0), CardinalityIntervals.SET)
116 .put(Tuple.of(1), CardinalityIntervals.SET))
117 .seed(ContainmentHierarchyTranslator.CONTAINED_SYMBOL, builder -> builder
118 .reducedValue(TruthValue.UNKNOWN))
119 .seed(ContainmentHierarchyTranslator.CONTAINS_SYMBOL, builder -> builder
120 .reducedValue(TruthValue.UNKNOWN))
121 .seed(university, builder -> builder
122 .reducedValue(TruthValue.UNKNOWN)
123 .put(Tuple.of(0), TruthValue.TRUE))
124 .seed(course, builder -> builder
125 .reducedValue(TruthValue.UNKNOWN)
126 .put(Tuple.of(1), TruthValue.TRUE))
127 .seed(courses, builder -> builder
128 .reducedValue(TruthValue.UNKNOWN)
129 .put(Tuple.of(2, 3), TruthValue.TRUE))
130 .build();
131
132 var model = createModel(metamodel, seed);
133 var coursesInterpretation = model.getAdapter(ReasoningAdapter.class)
134 .getPartialInterpretation(Concreteness.PARTIAL, courses);
135
136 assertThat(coursesInterpretation.get(Tuple.of(0, 1)), is(TruthValue.UNKNOWN));
137 assertThat(coursesInterpretation.get(Tuple.of(0, 3)), is(TruthValue.FALSE));
138 assertThat(coursesInterpretation.get(Tuple.of(2, 1)), is(TruthValue.UNKNOWN));
139 assertThat(coursesInterpretation.get(Tuple.of(2, 3)), is(TruthValue.TRUE));
140 }
141
142 private static Model createModel(Metamodel metamodel, ModelSeed seed) {
143 var store = ModelStore.builder()
144 .with(ViatraModelQueryAdapter.builder())
145 .with(ReasoningAdapter.builder())
146 .with(new MultiObjectTranslator())
147 .with(new MetamodelTranslator(metamodel))
148 .build();
149
150 return store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
151 }
152}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java
new file mode 100644
index 00000000..64230cf6
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/multiobject/PartialCountTest.java
@@ -0,0 +1,321 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.multiobject;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.query.ModelQueryAdapter;
11import tools.refinery.store.query.dnf.Query;
12import tools.refinery.store.query.resultset.ResultSet;
13import tools.refinery.store.query.term.Variable;
14import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
15import tools.refinery.store.reasoning.ReasoningAdapter;
16import tools.refinery.store.reasoning.ReasoningStoreAdapter;
17import tools.refinery.store.reasoning.literal.CountLowerBoundLiteral;
18import tools.refinery.store.reasoning.literal.CountUpperBoundLiteral;
19import tools.refinery.store.reasoning.representation.PartialRelation;
20import tools.refinery.store.reasoning.seed.ModelSeed;
21import tools.refinery.store.reasoning.translator.PartialRelationTranslator;
22import tools.refinery.store.representation.Symbol;
23import tools.refinery.store.representation.TruthValue;
24import tools.refinery.store.representation.cardinality.CardinalityIntervals;
25import tools.refinery.store.representation.cardinality.UpperCardinalities;
26import tools.refinery.store.representation.cardinality.UpperCardinality;
27import tools.refinery.store.tuple.Tuple;
28
29import java.util.List;
30
31import static org.hamcrest.MatcherAssert.assertThat;
32import static org.hamcrest.Matchers.is;
33import static tools.refinery.store.query.literal.Literals.not;
34import static tools.refinery.store.reasoning.literal.PartialLiterals.must;
35
36class PartialCountTest {
37 private static final PartialRelation person = new PartialRelation("Person", 1);
38 private static final PartialRelation friend = new PartialRelation("friend", 2);
39
40 @Test
41 void lowerBoundZeroTest() {
42 var query = Query.of("LowerBound", Integer.class, (builder, p1, p2, output) -> builder.clause(
43 must(person.call(p1)),
44 must(person.call(p2)),
45 new CountLowerBoundLiteral(output, friend, List.of(p1, p2))
46 ));
47
48 var modelSeed = ModelSeed.builder(2)
49 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
50 .put(Tuple.of(0), CardinalityIntervals.atLeast(3))
51 .put(Tuple.of(1), CardinalityIntervals.atMost(7)))
52 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
53 .seed(friend, builder -> builder
54 .put(Tuple.of(0, 1), TruthValue.TRUE)
55 .put(Tuple.of(1, 0), TruthValue.UNKNOWN)
56 .put(Tuple.of(1, 1), TruthValue.ERROR))
57 .build();
58
59 var resultSet = getResultSet(query, modelSeed);
60 assertThat(resultSet.get(Tuple.of(0, 0)), is(0));
61 assertThat(resultSet.get(Tuple.of(0, 1)), is(1));
62 assertThat(resultSet.get(Tuple.of(1, 0)), is(0));
63 assertThat(resultSet.get(Tuple.of(1, 1)), is(1));
64 }
65
66 @Test
67 void upperBoundZeroTest() {
68 var query = Query.of("UpperBound", UpperCardinality.class, (builder, p1, p2, output) -> builder.clause(
69 must(person.call(p1)),
70 must(person.call(p2)),
71 new CountUpperBoundLiteral(output, friend, List.of(p1, p2))
72 ));
73
74 var modelSeed = ModelSeed.builder(2)
75 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
76 .put(Tuple.of(0), CardinalityIntervals.atLeast(3))
77 .put(Tuple.of(1), CardinalityIntervals.atMost(7)))
78 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
79 .seed(friend, builder -> builder
80 .put(Tuple.of(0, 1), TruthValue.TRUE)
81 .put(Tuple.of(1, 0), TruthValue.UNKNOWN)
82 .put(Tuple.of(1, 1), TruthValue.ERROR))
83 .build();
84
85 var resultSet = getResultSet(query, modelSeed);
86 assertThat(resultSet.get(Tuple.of(0, 0)), is(UpperCardinalities.ZERO));
87 assertThat(resultSet.get(Tuple.of(0, 1)), is(UpperCardinalities.ONE));
88 assertThat(resultSet.get(Tuple.of(1, 0)), is(UpperCardinalities.ONE));
89 assertThat(resultSet.get(Tuple.of(1, 1)), is(UpperCardinalities.ZERO));
90 }
91
92 @Test
93 void lowerBoundOneTest() {
94 var query = Query.of("LowerBound", Integer.class, (builder, p1, output) -> builder.clause(
95 must(person.call(p1)),
96 new CountLowerBoundLiteral(output, friend, List.of(p1, Variable.of()))
97 ));
98
99 var modelSeed = ModelSeed.builder(4)
100 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
101 .reducedValue(CardinalityIntervals.ONE)
102 .put(Tuple.of(1), CardinalityIntervals.atLeast(3))
103 .put(Tuple.of(2), CardinalityIntervals.atMost(7)))
104 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
105 .seed(friend, builder -> builder
106 .put(Tuple.of(0, 1), TruthValue.TRUE)
107 .put(Tuple.of(0, 2), TruthValue.TRUE)
108 .put(Tuple.of(0, 3), TruthValue.TRUE)
109 .put(Tuple.of(1, 0), TruthValue.TRUE)
110 .put(Tuple.of(1, 2), TruthValue.UNKNOWN)
111 .put(Tuple.of(1, 3), TruthValue.UNKNOWN)
112 .put(Tuple.of(2, 0), TruthValue.TRUE)
113 .put(Tuple.of(2, 1), TruthValue.ERROR))
114 .build();
115
116 var resultSet = getResultSet(query, modelSeed);
117 assertThat(resultSet.get(Tuple.of(0)), is(4));
118 assertThat(resultSet.get(Tuple.of(1)), is(1));
119 assertThat(resultSet.get(Tuple.of(2)), is(4));
120 assertThat(resultSet.get(Tuple.of(3)), is(0));
121 }
122
123 @Test
124 void upperBoundOneTest() {
125 var query = Query.of("UpperBound", UpperCardinality.class, (builder, p1, output) -> builder.clause(
126 must(person.call(p1)),
127 new CountUpperBoundLiteral(output, friend, List.of(p1, Variable.of()))
128 ));
129
130 var modelSeed = ModelSeed.builder(4)
131 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
132 .reducedValue(CardinalityIntervals.ONE)
133 .put(Tuple.of(1), CardinalityIntervals.atLeast(3))
134 .put(Tuple.of(2), CardinalityIntervals.atMost(7)))
135 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
136 .seed(friend, builder -> builder
137 .put(Tuple.of(0, 1), TruthValue.TRUE)
138 .put(Tuple.of(0, 2), TruthValue.TRUE)
139 .put(Tuple.of(0, 3), TruthValue.TRUE)
140 .put(Tuple.of(1, 0), TruthValue.TRUE)
141 .put(Tuple.of(1, 2), TruthValue.UNKNOWN)
142 .put(Tuple.of(1, 3), TruthValue.UNKNOWN)
143 .put(Tuple.of(2, 0), TruthValue.TRUE)
144 .put(Tuple.of(2, 1), TruthValue.ERROR))
145 .build();
146
147 var resultSet = getResultSet(query, modelSeed);
148 assertThat(resultSet.get(Tuple.of(0)), is(UpperCardinalities.UNBOUNDED));
149 assertThat(resultSet.get(Tuple.of(1)), is(UpperCardinalities.atMost(9)));
150 assertThat(resultSet.get(Tuple.of(2)), is(UpperCardinalities.ONE));
151 assertThat(resultSet.get(Tuple.of(3)), is(UpperCardinalities.ZERO));
152 }
153
154 @Test
155 void lowerBoundTwoTest() {
156 var subQuery = Query.of("SubQuery", (builder, p1, p2, p3) -> builder.clause(
157 friend.call(p1, p2),
158 friend.call(p1, p3),
159 friend.call(p2, p3)
160 ));
161 var query = Query.of("LowerBound", Integer.class, (builder, p1, output) -> builder.clause(
162 must(person.call(p1)),
163 new CountLowerBoundLiteral(output, subQuery.getDnf(), List.of(p1, Variable.of(), Variable.of()))
164 ));
165
166 var modelSeed = ModelSeed.builder(4)
167 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
168 .reducedValue(CardinalityIntervals.ONE)
169 .put(Tuple.of(0), CardinalityIntervals.between(5, 9))
170 .put(Tuple.of(1), CardinalityIntervals.atLeast(3))
171 .put(Tuple.of(2), CardinalityIntervals.atMost(7)))
172 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
173 .seed(friend, builder -> builder
174 .put(Tuple.of(0, 1), TruthValue.TRUE)
175 .put(Tuple.of(0, 2), TruthValue.TRUE)
176 .put(Tuple.of(0, 3), TruthValue.TRUE)
177 .put(Tuple.of(1, 0), TruthValue.TRUE)
178 .put(Tuple.of(1, 2), TruthValue.TRUE)
179 .put(Tuple.of(1, 3), TruthValue.TRUE)
180 .put(Tuple.of(2, 0), TruthValue.TRUE)
181 .put(Tuple.of(2, 1), TruthValue.ERROR))
182 .build();
183
184 var resultSet = getResultSet(query, modelSeed);
185 assertThat(resultSet.get(Tuple.of(0)), is(3));
186 assertThat(resultSet.get(Tuple.of(1)), is(5));
187 assertThat(resultSet.get(Tuple.of(2)), is(30));
188 assertThat(resultSet.get(Tuple.of(3)), is(0));
189 }
190
191 @Test
192 void upperBoundTwoTest() {
193 var subQuery = Query.of("SubQuery", (builder, p1, p2, p3) -> builder.clause(
194 friend.call(p1, p2),
195 friend.call(p1, p3),
196 friend.call(p2, p3)
197 ));
198 var query = Query.of("UpperBound", UpperCardinality.class, (builder, p1, output) -> builder.clause(
199 must(person.call(p1)),
200 new CountUpperBoundLiteral(output, subQuery.getDnf(), List.of(p1, Variable.of(), Variable.of()))
201 ));
202
203 var modelSeed = ModelSeed.builder(4)
204 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
205 .reducedValue(CardinalityIntervals.ONE)
206 .put(Tuple.of(0), CardinalityIntervals.between(5, 9))
207 .put(Tuple.of(1), CardinalityIntervals.atLeast(3))
208 .put(Tuple.of(2), CardinalityIntervals.atMost(7)))
209 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
210 .seed(friend, builder -> builder
211 .put(Tuple.of(0, 1), TruthValue.TRUE)
212 .put(Tuple.of(0, 2), TruthValue.TRUE)
213 .put(Tuple.of(0, 3), TruthValue.TRUE)
214 .put(Tuple.of(1, 0), TruthValue.TRUE)
215 .put(Tuple.of(1, 2), TruthValue.UNKNOWN)
216 .put(Tuple.of(1, 3), TruthValue.UNKNOWN)
217 .put(Tuple.of(2, 0), TruthValue.TRUE)
218 .put(Tuple.of(2, 1), TruthValue.ERROR))
219 .build();
220
221 var resultSet = getResultSet(query, modelSeed);
222 assertThat(resultSet.get(Tuple.of(0)), is(UpperCardinalities.UNBOUNDED));
223 assertThat(resultSet.get(Tuple.of(1)), is(UpperCardinalities.atMost(135)));
224 assertThat(resultSet.get(Tuple.of(2)), is(UpperCardinalities.ZERO));
225 assertThat(resultSet.get(Tuple.of(3)), is(UpperCardinalities.ZERO));
226 }
227
228 @Test
229 void lowerBoundDiagonalTest() {
230 var subQuery = Query.of("SubQuery", (builder, p1, p2, p3) -> builder.clause(
231 friend.call(p1, p2),
232 friend.call(p1, p3),
233 not(friend.call(p2, p3))
234 ));
235 var query = Query.of("LowerBound", Integer.class, (builder, p1, output) -> builder.clause(v1 -> List.of(
236 must(person.call(p1)),
237 new CountLowerBoundLiteral(output, subQuery.getDnf(), List.of(p1, v1, v1))
238 )));
239
240 var modelSeed = ModelSeed.builder(4)
241 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
242 .reducedValue(CardinalityIntervals.ONE)
243 .put(Tuple.of(0), CardinalityIntervals.between(5, 9))
244 .put(Tuple.of(1), CardinalityIntervals.atLeast(3))
245 .put(Tuple.of(2), CardinalityIntervals.atMost(7)))
246 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
247 .seed(friend, builder -> builder
248 .put(Tuple.of(0, 1), TruthValue.TRUE)
249 .put(Tuple.of(0, 2), TruthValue.TRUE)
250 .put(Tuple.of(0, 3), TruthValue.TRUE)
251 .put(Tuple.of(1, 0), TruthValue.TRUE)
252 .put(Tuple.of(1, 2), TruthValue.UNKNOWN)
253 .put(Tuple.of(1, 3), TruthValue.UNKNOWN)
254 .put(Tuple.of(2, 0), TruthValue.TRUE)
255 .put(Tuple.of(2, 1), TruthValue.ERROR))
256 .build();
257
258 var resultSet = getResultSet(query, modelSeed);
259 assertThat(resultSet.get(Tuple.of(0)), is(4));
260 assertThat(resultSet.get(Tuple.of(1)), is(5));
261 assertThat(resultSet.get(Tuple.of(2)), is(8));
262 assertThat(resultSet.get(Tuple.of(3)), is(0));
263 }
264
265 @Test
266 void upperBoundDiagonalTest() {
267 var subQuery = Query.of("SubQuery", (builder, p1, p2, p3) -> builder.clause(
268 friend.call(p1, p2),
269 friend.call(p1, p3),
270 not(friend.call(p2, p3))
271 ));
272 var query = Query.of("UpperBound", UpperCardinality.class, (builder, p1, output) -> builder
273 .clause(v1 -> List.of(
274 must(person.call(p1)),
275 new CountUpperBoundLiteral(output, subQuery.getDnf(), List.of(p1, v1, v1))
276 )));
277
278 var modelSeed = ModelSeed.builder(4)
279 .seed(MultiObjectTranslator.COUNT_SYMBOL, builder -> builder
280 .reducedValue(CardinalityIntervals.ONE)
281 .put(Tuple.of(0), CardinalityIntervals.between(5, 9))
282 .put(Tuple.of(1), CardinalityIntervals.atLeast(3))
283 .put(Tuple.of(2), CardinalityIntervals.atMost(7)))
284 .seed(person, builder -> builder.reducedValue(TruthValue.TRUE))
285 .seed(friend, builder -> builder
286 .put(Tuple.of(0, 1), TruthValue.TRUE)
287 .put(Tuple.of(0, 2), TruthValue.TRUE)
288 .put(Tuple.of(0, 3), TruthValue.TRUE)
289 .put(Tuple.of(1, 0), TruthValue.TRUE)
290 .put(Tuple.of(1, 2), TruthValue.UNKNOWN)
291 .put(Tuple.of(1, 3), TruthValue.UNKNOWN)
292 .put(Tuple.of(2, 0), TruthValue.TRUE)
293 .put(Tuple.of(2, 1), TruthValue.ERROR))
294 .build();
295
296 var resultSet = getResultSet(query, modelSeed);
297 assertThat(resultSet.get(Tuple.of(0)), is(UpperCardinalities.UNBOUNDED));
298 assertThat(resultSet.get(Tuple.of(1)), is(UpperCardinalities.atMost(17)));
299 assertThat(resultSet.get(Tuple.of(2)), is(UpperCardinalities.atMost(9)));
300 assertThat(resultSet.get(Tuple.of(3)), is(UpperCardinalities.ZERO));
301 }
302
303 private static <T> ResultSet<T> getResultSet(Query<T> query, ModelSeed modelSeed) {
304 var personStorage = Symbol.of("Person", 1, TruthValue.class, TruthValue.FALSE);
305 var friendStorage = Symbol.of("friend", 2, TruthValue.class, TruthValue.FALSE);
306
307 var store = ModelStore.builder()
308 .with(ViatraModelQueryAdapter.builder()
309 .query(query))
310 .with(ReasoningAdapter.builder())
311 .with(new MultiObjectTranslator())
312 .with(PartialRelationTranslator.of(person)
313 .symbol(personStorage))
314 .with(PartialRelationTranslator.of(friend)
315 .symbol(friendStorage))
316 .build();
317
318 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(modelSeed);
319 return model.getAdapter(ModelQueryAdapter.class).getResultSet(query);
320 }
321}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java
new file mode 100644
index 00000000..3658d603
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/ConcreteSupertypeTest.java
@@ -0,0 +1,145 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.model.ModelStore;
11import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
12import tools.refinery.store.reasoning.ReasoningAdapter;
13import tools.refinery.store.reasoning.ReasoningStoreAdapter;
14import tools.refinery.store.reasoning.literal.Concreteness;
15import tools.refinery.store.reasoning.representation.PartialRelation;
16import tools.refinery.store.reasoning.seed.ModelSeed;
17import tools.refinery.store.representation.TruthValue;
18import tools.refinery.store.tuple.Tuple;
19
20import static org.hamcrest.MatcherAssert.assertThat;
21import static org.hamcrest.Matchers.is;
22
23class ConcreteSupertypeTest {
24 private final PartialRelation c1 = new PartialRelation("C1", 1);
25 private final PartialRelation c2 = new PartialRelation("C2", 1);
26
27 private ModelStore store;
28
29 @BeforeEach
30 void beforeEach() {
31 var typeHierarchy = TypeHierarchy.builder()
32 .type(c1)
33 .type(c2, c1)
34 .build();
35
36 store = ModelStore.builder()
37 .with(ViatraModelQueryAdapter.builder())
38 .with(ReasoningAdapter.builder())
39 .with(new TypeHierarchyTranslator(typeHierarchy))
40 .build();
41 }
42
43 @Test
44 void inheritedTypeTrueTest() {
45 var seed = ModelSeed.builder(1)
46 .seed(c1, builder -> builder.reducedValue(TruthValue.UNKNOWN))
47 .seed(c2, builder -> builder
48 .reducedValue(TruthValue.UNKNOWN)
49 .put(Tuple.of(0), TruthValue.TRUE))
50 .build();
51
52 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
53 var adapter = model.getAdapter(ReasoningAdapter.class);
54
55 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c1).get(Tuple.of(0)), is(TruthValue.TRUE));
56 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c2).get(Tuple.of(0)), is(TruthValue.TRUE));
57 }
58
59 @Test
60 void inheritedTypeFalseTest() {
61 var seed = ModelSeed.builder(1)
62 .seed(c1, builder -> builder.reducedValue(TruthValue.UNKNOWN))
63 .seed(c2, builder -> builder
64 .reducedValue(TruthValue.UNKNOWN)
65 .put(Tuple.of(0), TruthValue.FALSE))
66 .build();
67
68 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
69 var adapter = model.getAdapter(ReasoningAdapter.class);
70
71 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c1).get(Tuple.of(0)),
72 is(TruthValue.UNKNOWN));
73 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c2).get(Tuple.of(0)), is(TruthValue.FALSE));
74 }
75
76 @Test
77 void supertypeTrueTest() {
78 var seed = ModelSeed.builder(1)
79 .seed(c1, builder -> builder
80 .reducedValue(TruthValue.UNKNOWN)
81 .put(Tuple.of(0), TruthValue.TRUE))
82 .seed(c2, builder -> builder.reducedValue(TruthValue.UNKNOWN))
83 .build();
84
85 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
86 var adapter = model.getAdapter(ReasoningAdapter.class);
87
88 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c1).get(Tuple.of(0)), is(TruthValue.TRUE));
89 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c2).get(Tuple.of(0)),
90 is(TruthValue.UNKNOWN));
91 }
92
93 @Test
94 void supertypeFalseTest() {
95 var seed = ModelSeed.builder(1)
96 .seed(c1, builder -> builder
97 .reducedValue(TruthValue.UNKNOWN)
98 .put(Tuple.of(0), TruthValue.FALSE))
99 .seed(c2, builder -> builder.reducedValue(TruthValue.UNKNOWN))
100 .build();
101
102 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
103 var adapter = model.getAdapter(ReasoningAdapter.class);
104
105 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c1).get(Tuple.of(0)), is(TruthValue.FALSE));
106 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c2).get(Tuple.of(0)), is(TruthValue.FALSE));
107 }
108
109 @Test
110 void supertypeOnlyTest() {
111 var seed = ModelSeed.builder(1)
112 .seed(c1, builder -> builder
113 .reducedValue(TruthValue.UNKNOWN)
114 .put(Tuple.of(0), TruthValue.TRUE))
115 .seed(c2, builder -> builder
116 .reducedValue(TruthValue.UNKNOWN)
117 .put(Tuple.of(0), TruthValue.FALSE))
118 .build();
119
120 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
121 var adapter = model.getAdapter(ReasoningAdapter.class);
122
123 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c1).get(Tuple.of(0)), is(TruthValue.TRUE));
124 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c2).get(Tuple.of(0)), is(TruthValue.FALSE));
125 }
126
127
128 @Test
129 void inheritedTypeErrorTest() {
130 var seed = ModelSeed.builder(1)
131 .seed(c1, builder -> builder
132 .reducedValue(TruthValue.UNKNOWN)
133 .put(Tuple.of(0), TruthValue.FALSE))
134 .seed(c2, builder -> builder
135 .reducedValue(TruthValue.UNKNOWN)
136 .put(Tuple.of(0), TruthValue.TRUE))
137 .build();
138
139 var model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
140 var adapter = model.getAdapter(ReasoningAdapter.class);
141
142 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c1).get(Tuple.of(0)), is(TruthValue.ERROR));
143 assertThat(adapter.getPartialInterpretation(Concreteness.PARTIAL, c2).get(Tuple.of(0)), is(TruthValue.ERROR));
144 }
145}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerExampleHierarchyTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisExampleHierarchyTest.java
index 05a476c6..d9a5477e 100644
--- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerExampleHierarchyTest.java
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalysisExampleHierarchyTest.java
@@ -5,19 +5,19 @@
5 */ 5 */
6package tools.refinery.store.reasoning.translator.typehierarchy; 6package tools.refinery.store.reasoning.translator.typehierarchy;
7 7
8import org.hamcrest.Matchers;
8import org.junit.jupiter.api.BeforeEach; 9import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test; 10import org.junit.jupiter.api.Test;
10import tools.refinery.store.reasoning.representation.PartialRelation; 11import tools.refinery.store.reasoning.representation.PartialRelation;
11import tools.refinery.store.representation.TruthValue; 12import tools.refinery.store.representation.TruthValue;
12 13
13import java.util.LinkedHashMap;
14import java.util.Set; 14import java.util.Set;
15 15
16import static org.hamcrest.MatcherAssert.assertThat; 16import static org.hamcrest.MatcherAssert.assertThat;
17import static org.hamcrest.Matchers.is; 17import static org.hamcrest.Matchers.is;
18import static org.junit.jupiter.api.Assertions.assertAll; 18import static org.junit.jupiter.api.Assertions.assertAll;
19 19
20class TypeAnalyzerExampleHierarchyTest { 20class TypeAnalysisExampleHierarchyTest {
21 private final PartialRelation a1 = new PartialRelation("A1", 1); 21 private final PartialRelation a1 = new PartialRelation("A1", 1);
22 private final PartialRelation a2 = new PartialRelation("A2", 1); 22 private final PartialRelation a2 = new PartialRelation("A2", 1);
23 private final PartialRelation a3 = new PartialRelation("A3", 1); 23 private final PartialRelation a3 = new PartialRelation("A3", 1);
@@ -28,23 +28,23 @@ class TypeAnalyzerExampleHierarchyTest {
28 private final PartialRelation c3 = new PartialRelation("C3", 1); 28 private final PartialRelation c3 = new PartialRelation("C3", 1);
29 private final PartialRelation c4 = new PartialRelation("C4", 1); 29 private final PartialRelation c4 = new PartialRelation("C4", 1);
30 30
31 private TypeAnalyzer sut; 31 private TypeHierarchy sut;
32 private TypeAnalyzerTester tester; 32 private TypeHierarchyTester tester;
33 33
34 @BeforeEach 34 @BeforeEach
35 void beforeEach() { 35 void beforeEach() {
36 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>(); 36 sut = TypeHierarchy.builder()
37 typeInfoMap.put(a1, TypeInfo.builder().abstractType().build()); 37 .type(a1, true)
38 typeInfoMap.put(a2, TypeInfo.builder().abstractType().build()); 38 .type(a2, true)
39 typeInfoMap.put(a3, TypeInfo.builder().abstractType().build()); 39 .type(a3, true)
40 typeInfoMap.put(a4, TypeInfo.builder().abstractType().build()); 40 .type(a4, true)
41 typeInfoMap.put(a5, TypeInfo.builder().abstractType().build()); 41 .type(a5, true)
42 typeInfoMap.put(c1, TypeInfo.builder().supertypes(a1, a4).build()); 42 .type(c1, a1, a4)
43 typeInfoMap.put(c2, TypeInfo.builder().supertypes(a1, a2, a3, a4).build()); 43 .type(c2, a1, a2, a3, a4)
44 typeInfoMap.put(c3, TypeInfo.builder().supertype(a3).build()); 44 .type(c3, a3)
45 typeInfoMap.put(c4, TypeInfo.builder().supertype(a4).build()); 45 .type(c4, a4)
46 sut = new TypeAnalyzer(typeInfoMap); 46 .build();
47 tester = new TypeAnalyzerTester(sut); 47 tester = new TypeHierarchyTester(sut);
48 } 48 }
49 49
50 @Test 50 @Test
@@ -65,16 +65,16 @@ class TypeAnalyzerExampleHierarchyTest {
65 @Test 65 @Test
66 void inferredTypesTest() { 66 void inferredTypesTest() {
67 assertAll( 67 assertAll(
68 () -> assertThat(sut.getUnknownType(), is(new InferredType(Set.of(), Set.of(c1, c2, c3, c4), null))), 68 () -> assertThat(sut.getUnknownType(), Matchers.is(new InferredType(Set.of(), Set.of(c1, c2, c3, c4), null))),
69 () -> assertThat(tester.getInferredType(a1), is(new InferredType(Set.of(a1, a4), Set.of(c1, c2), c1))), 69 () -> assertThat(tester.getInferredType(a1), Matchers.is(new InferredType(Set.of(a1, a4), Set.of(c1, c2), c1))),
70 () -> assertThat(tester.getInferredType(a3), is(new InferredType(Set.of(a3), Set.of(c2, c3), c2))), 70 () -> assertThat(tester.getInferredType(a3), Matchers.is(new InferredType(Set.of(a3), Set.of(c2, c3), c2))),
71 () -> assertThat(tester.getInferredType(a4), is(new InferredType(Set.of(a4), Set.of(c1, c2, c4), c1))), 71 () -> assertThat(tester.getInferredType(a4), Matchers.is(new InferredType(Set.of(a4), Set.of(c1, c2, c4), c1))),
72 () -> assertThat(tester.getInferredType(a5), is(new InferredType(Set.of(a5), Set.of(), null))), 72 () -> assertThat(tester.getInferredType(a5), Matchers.is(new InferredType(Set.of(a5), Set.of(), null))),
73 () -> assertThat(tester.getInferredType(c1), is(new InferredType(Set.of(a1, a4, c1), Set.of(c1), c1))), 73 () -> assertThat(tester.getInferredType(c1), Matchers.is(new InferredType(Set.of(a1, a4, c1), Set.of(c1), c1))),
74 () -> assertThat(tester.getInferredType(c2), 74 () -> assertThat(tester.getInferredType(c2),
75 is(new InferredType(Set.of(a1, a3, a4, c2), Set.of(c2), c2))), 75 Matchers.is(new InferredType(Set.of(a1, a3, a4, c2), Set.of(c2), c2))),
76 () -> assertThat(tester.getInferredType(c3), is(new InferredType(Set.of(a3, c3), Set.of(c3), c3))), 76 () -> assertThat(tester.getInferredType(c3), Matchers.is(new InferredType(Set.of(a3, c3), Set.of(c3), c3))),
77 () -> assertThat(tester.getInferredType(c4), is(new InferredType(Set.of(a4, c4), Set.of(c4), c4))) 77 () -> assertThat(tester.getInferredType(c4), Matchers.is(new InferredType(Set.of(a4, c4), Set.of(c4), c4)))
78 ); 78 );
79 } 79 }
80 80
@@ -84,8 +84,8 @@ class TypeAnalyzerExampleHierarchyTest {
84 var a3Result = tester.getPreservedType(a3); 84 var a3Result = tester.getPreservedType(a3);
85 var expected = new InferredType(Set.of(a1, a3, a4, c2), Set.of(c2), c2); 85 var expected = new InferredType(Set.of(a1, a3, a4, c2), Set.of(c2), c2);
86 assertAll( 86 assertAll(
87 () -> assertThat(a1Result.merge(a3Result.asInferredType(), TruthValue.TRUE), is(expected)), 87 () -> assertThat(a1Result.merge(a3Result.asInferredType(), TruthValue.TRUE), Matchers.is(expected)),
88 () -> assertThat(a3Result.merge(a1Result.asInferredType(), TruthValue.TRUE), is(expected)), 88 () -> assertThat(a3Result.merge(a1Result.asInferredType(), TruthValue.TRUE), Matchers.is(expected)),
89 () -> assertThat(a1Result.merge(sut.getUnknownType(), TruthValue.TRUE), is(a1Result.asInferredType())), 89 () -> assertThat(a1Result.merge(sut.getUnknownType(), TruthValue.TRUE), is(a1Result.asInferredType())),
90 () -> assertThat(a3Result.merge(sut.getUnknownType(), TruthValue.TRUE), is(a3Result.asInferredType())), 90 () -> assertThat(a3Result.merge(sut.getUnknownType(), TruthValue.TRUE), is(a3Result.asInferredType())),
91 () -> assertThat(a1Result.merge(a1Result.asInferredType(), TruthValue.TRUE), 91 () -> assertThat(a1Result.merge(a1Result.asInferredType(), TruthValue.TRUE),
@@ -100,19 +100,19 @@ class TypeAnalyzerExampleHierarchyTest {
100 var a4Result = tester.getPreservedType(a4); 100 var a4Result = tester.getPreservedType(a4);
101 assertAll( 101 assertAll(
102 () -> assertThat(a1Result.merge(a3Result.asInferredType(), TruthValue.FALSE), 102 () -> assertThat(a1Result.merge(a3Result.asInferredType(), TruthValue.FALSE),
103 is(new InferredType(Set.of(a3, c3), Set.of(c3), c3))), 103 Matchers.is(new InferredType(Set.of(a3, c3), Set.of(c3), c3))),
104 () -> assertThat(a3Result.merge(a1Result.asInferredType(), TruthValue.FALSE), 104 () -> assertThat(a3Result.merge(a1Result.asInferredType(), TruthValue.FALSE),
105 is(new InferredType(Set.of(a1, a4, c1), Set.of(c1), c1))), 105 Matchers.is(new InferredType(Set.of(a1, a4, c1), Set.of(c1), c1))),
106 () -> assertThat(a4Result.merge(a3Result.asInferredType(), TruthValue.FALSE), 106 () -> assertThat(a4Result.merge(a3Result.asInferredType(), TruthValue.FALSE),
107 is(new InferredType(Set.of(a3, c3), Set.of(c3), c3))), 107 Matchers.is(new InferredType(Set.of(a3, c3), Set.of(c3), c3))),
108 () -> assertThat(a3Result.merge(a4Result.asInferredType(), TruthValue.FALSE), 108 () -> assertThat(a3Result.merge(a4Result.asInferredType(), TruthValue.FALSE),
109 is(new InferredType(Set.of(a4), Set.of(c1, c4), c1))), 109 Matchers.is(new InferredType(Set.of(a4), Set.of(c1, c4), c1))),
110 () -> assertThat(a1Result.merge(sut.getUnknownType(), TruthValue.FALSE), 110 () -> assertThat(a1Result.merge(sut.getUnknownType(), TruthValue.FALSE),
111 is(new InferredType(Set.of(), Set.of(c3, c4), null))), 111 Matchers.is(new InferredType(Set.of(), Set.of(c3, c4), null))),
112 () -> assertThat(a3Result.merge(sut.getUnknownType(), TruthValue.FALSE), 112 () -> assertThat(a3Result.merge(sut.getUnknownType(), TruthValue.FALSE),
113 is(new InferredType(Set.of(), Set.of(c1, c4), null))), 113 Matchers.is(new InferredType(Set.of(), Set.of(c1, c4), null))),
114 () -> assertThat(a4Result.merge(sut.getUnknownType(), TruthValue.FALSE), 114 () -> assertThat(a4Result.merge(sut.getUnknownType(), TruthValue.FALSE),
115 is(new InferredType(Set.of(), Set.of(c3), null))) 115 Matchers.is(new InferredType(Set.of(), Set.of(c3), null)))
116 ); 116 );
117 } 117 }
118 118
@@ -122,8 +122,8 @@ class TypeAnalyzerExampleHierarchyTest {
122 var a4Result = tester.getPreservedType(a4); 122 var a4Result = tester.getPreservedType(a4);
123 var expected = new InferredType(Set.of(c1, a1, a4), Set.of(), null); 123 var expected = new InferredType(Set.of(c1, a1, a4), Set.of(), null);
124 assertAll( 124 assertAll(
125 () -> assertThat(c1Result.merge(a4Result.asInferredType(), TruthValue.ERROR), is(expected)), 125 () -> assertThat(c1Result.merge(a4Result.asInferredType(), TruthValue.ERROR), Matchers.is(expected)),
126 () -> assertThat(a4Result.merge(c1Result.asInferredType(), TruthValue.ERROR), is(expected)) 126 () -> assertThat(a4Result.merge(c1Result.asInferredType(), TruthValue.ERROR), Matchers.is(expected))
127 ); 127 );
128 } 128 }
129 129
@@ -145,9 +145,9 @@ class TypeAnalyzerExampleHierarchyTest {
145 var c3Result = tester.getPreservedType(c3); 145 var c3Result = tester.getPreservedType(c3);
146 assertAll( 146 assertAll(
147 () -> assertThat(a1Result.merge(c3Result.asInferredType(), TruthValue.TRUE), 147 () -> assertThat(a1Result.merge(c3Result.asInferredType(), TruthValue.TRUE),
148 is(new InferredType(Set.of(a1, a3, c3), Set.of(), null))), 148 Matchers.is(new InferredType(Set.of(a1, a3, c3), Set.of(), null))),
149 () -> assertThat(c3Result.merge(a1Result.asInferredType(), TruthValue.TRUE), 149 () -> assertThat(c3Result.merge(a1Result.asInferredType(), TruthValue.TRUE),
150 is(new InferredType(Set.of(a1, a3, a4, c3), Set.of(), null))) 150 Matchers.is(new InferredType(Set.of(a1, a3, a4, c3), Set.of(), null)))
151 ); 151 );
152 } 152 }
153 153
@@ -158,13 +158,13 @@ class TypeAnalyzerExampleHierarchyTest {
158 var c1Result = tester.getPreservedType(c1); 158 var c1Result = tester.getPreservedType(c1);
159 assertAll( 159 assertAll(
160 () -> assertThat(a4Result.merge(a1Result.asInferredType(), TruthValue.FALSE), 160 () -> assertThat(a4Result.merge(a1Result.asInferredType(), TruthValue.FALSE),
161 is(new InferredType(Set.of(a1, a4), Set.of(), null))), 161 Matchers.is(new InferredType(Set.of(a1, a4), Set.of(), null))),
162 () -> assertThat(a1Result.merge(c1Result.asInferredType(), TruthValue.FALSE), 162 () -> assertThat(a1Result.merge(c1Result.asInferredType(), TruthValue.FALSE),
163 is(new InferredType(Set.of(a1, a4, c1), Set.of(), null))), 163 Matchers.is(new InferredType(Set.of(a1, a4, c1), Set.of(), null))),
164 () -> assertThat(a4Result.merge(c1Result.asInferredType(), TruthValue.FALSE), 164 () -> assertThat(a4Result.merge(c1Result.asInferredType(), TruthValue.FALSE),
165 is(new InferredType(Set.of(a1, a4, c1), Set.of(), null))), 165 Matchers.is(new InferredType(Set.of(a1, a4, c1), Set.of(), null))),
166 () -> assertThat(a1Result.merge(a1Result.asInferredType(), TruthValue.FALSE), 166 () -> assertThat(a1Result.merge(a1Result.asInferredType(), TruthValue.FALSE),
167 is(new InferredType(Set.of(a1, a4), Set.of(), null))) 167 Matchers.is(new InferredType(Set.of(a1, a4), Set.of(), null)))
168 ); 168 );
169 } 169 }
170 170
@@ -174,9 +174,9 @@ class TypeAnalyzerExampleHierarchyTest {
174 var a5Result = tester.getPreservedType(a5); 174 var a5Result = tester.getPreservedType(a5);
175 assertAll( 175 assertAll(
176 () -> assertThat(c1Result.merge(a5Result.asInferredType(), TruthValue.TRUE), 176 () -> assertThat(c1Result.merge(a5Result.asInferredType(), TruthValue.TRUE),
177 is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null))), 177 Matchers.is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null))),
178 () -> assertThat(a5Result.merge(c1Result.asInferredType(), TruthValue.TRUE), 178 () -> assertThat(a5Result.merge(c1Result.asInferredType(), TruthValue.TRUE),
179 is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null))) 179 Matchers.is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null)))
180 ); 180 );
181 } 181 }
182 182
@@ -198,9 +198,9 @@ class TypeAnalyzerExampleHierarchyTest {
198 var a5Result = tester.getPreservedType(a5); 198 var a5Result = tester.getPreservedType(a5);
199 assertAll( 199 assertAll(
200 () -> assertThat(c1Result.merge(a5Result.asInferredType(), TruthValue.ERROR), 200 () -> assertThat(c1Result.merge(a5Result.asInferredType(), TruthValue.ERROR),
201 is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null))), 201 Matchers.is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null))),
202 () -> assertThat(a5Result.merge(c1Result.asInferredType(), TruthValue.ERROR), 202 () -> assertThat(a5Result.merge(c1Result.asInferredType(), TruthValue.ERROR),
203 is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null))), 203 Matchers.is(new InferredType(Set.of(a1, a4, a5, c1), Set.of(), null))),
204 () -> assertThat(a5Result.merge(a5Result.asInferredType(), TruthValue.ERROR), 204 () -> assertThat(a5Result.merge(a5Result.asInferredType(), TruthValue.ERROR),
205 is(a5Result.asInferredType())) 205 is(a5Result.asInferredType()))
206 ); 206 );
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerTest.java
deleted file mode 100644
index d0ef9d57..00000000
--- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerTest.java
+++ /dev/null
@@ -1,205 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import org.junit.jupiter.api.Test;
9import tools.refinery.store.reasoning.representation.PartialRelation;
10import tools.refinery.store.representation.TruthValue;
11
12import java.util.LinkedHashMap;
13import java.util.Set;
14
15import static org.hamcrest.MatcherAssert.assertThat;
16import static org.hamcrest.Matchers.is;
17import static org.junit.jupiter.api.Assertions.assertAll;
18import static org.junit.jupiter.api.Assertions.assertThrows;
19
20class TypeAnalyzerTest {
21 @Test
22 void directSupertypesTest() {
23 var c1 = new PartialRelation("C1", 1);
24 var c2 = new PartialRelation("C2", 1);
25 var c3 = new PartialRelation("C3", 1);
26 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
27 typeInfoMap.put(c1, TypeInfo.builder().supertypes(c2, c3).build());
28 typeInfoMap.put(c2, TypeInfo.builder().supertype(c3).build());
29 typeInfoMap.put(c3, TypeInfo.builder().build());
30
31 var sut = new TypeAnalyzer(typeInfoMap);
32 var tester = new TypeAnalyzerTester(sut);
33
34 assertAll(
35 () -> tester.assertConcreteType(c1),
36 () -> tester.assertConcreteType(c2, c1),
37 () -> tester.assertConcreteType(c3, c2)
38 );
39 }
40
41 @Test
42 void typeEliminationAbstractToConcreteTest() {
43 var c1 = new PartialRelation("C1", 1);
44 var c2 = new PartialRelation("C2", 1);
45 var a11 = new PartialRelation("A11", 1);
46 var a12 = new PartialRelation("A12", 1);
47 var a21 = new PartialRelation("A21", 1);
48 var a22 = new PartialRelation("A22", 1);
49 var a3 = new PartialRelation("A3", 1);
50 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
51 typeInfoMap.put(a3, TypeInfo.builder().abstractType().build());
52 typeInfoMap.put(a21, TypeInfo.builder().abstractType().supertype(a3).build());
53 typeInfoMap.put(a22, TypeInfo.builder().abstractType().supertype(a3).build());
54 typeInfoMap.put(a11, TypeInfo.builder().abstractType().supertypes(a21, a22).build());
55 typeInfoMap.put(a12, TypeInfo.builder().abstractType().supertypes(a21, a22).build());
56 typeInfoMap.put(c1, TypeInfo.builder().supertypes(a11, a12).build());
57 typeInfoMap.put(c2, TypeInfo.builder().supertype(a3).build());
58
59 var sut = new TypeAnalyzer(typeInfoMap);
60 var tester = new TypeAnalyzerTester(sut);
61
62 assertAll(
63 () -> tester.assertConcreteType(c1),
64 () -> tester.assertConcreteType(c2),
65 () -> tester.assertEliminatedType(a11, c1),
66 () -> tester.assertEliminatedType(a12, c1),
67 () -> tester.assertEliminatedType(a21, c1),
68 () -> tester.assertEliminatedType(a22, c1),
69 () -> tester.assertAbstractType(a3, c1, c2)
70 );
71 }
72
73 @Test
74 void typeEliminationConcreteToAbstractTest() {
75 var c1 = new PartialRelation("C1", 1);
76 var c2 = new PartialRelation("C2", 1);
77 var a11 = new PartialRelation("A11", 1);
78 var a12 = new PartialRelation("A12", 1);
79 var a21 = new PartialRelation("A21", 1);
80 var a22 = new PartialRelation("A22", 1);
81 var a3 = new PartialRelation("A3", 1);
82 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
83 typeInfoMap.put(c1, TypeInfo.builder().supertypes(a11, a12).build());
84 typeInfoMap.put(c2, TypeInfo.builder().supertype(a3).build());
85 typeInfoMap.put(a11, TypeInfo.builder().abstractType().supertypes(a21, a22).build());
86 typeInfoMap.put(a12, TypeInfo.builder().abstractType().supertypes(a21, a22).build());
87 typeInfoMap.put(a21, TypeInfo.builder().abstractType().supertype(a3).build());
88 typeInfoMap.put(a22, TypeInfo.builder().abstractType().supertype(a3).build());
89 typeInfoMap.put(a3, TypeInfo.builder().abstractType().build());
90
91 var sut = new TypeAnalyzer(typeInfoMap);
92 var tester = new TypeAnalyzerTester(sut);
93
94 assertAll(
95 () -> tester.assertConcreteType(c1),
96 () -> tester.assertConcreteType(c2),
97 () -> tester.assertEliminatedType(a11, c1),
98 () -> tester.assertEliminatedType(a12, c1),
99 () -> tester.assertEliminatedType(a21, c1),
100 () -> tester.assertEliminatedType(a22, c1),
101 () -> tester.assertAbstractType(a3, c1, c2)
102 );
103 }
104
105 @Test
106 void preserveConcreteTypeTest() {
107 var c1 = new PartialRelation("C1", 1);
108 var a1 = new PartialRelation("A1", 1);
109 var c2 = new PartialRelation("C2", 1);
110 var a2 = new PartialRelation("A2", 1);
111 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
112 typeInfoMap.put(c1, TypeInfo.builder().supertype(a1).build());
113 typeInfoMap.put(a1, TypeInfo.builder().abstractType().supertype(c2).build());
114 typeInfoMap.put(c2, TypeInfo.builder().supertype(a2).build());
115 typeInfoMap.put(a2, TypeInfo.builder().abstractType().build());
116
117 var sut = new TypeAnalyzer(typeInfoMap);
118 var tester = new TypeAnalyzerTester(sut);
119
120 assertAll(
121 () -> tester.assertConcreteType(c1),
122 () -> tester.assertEliminatedType(a1, c1),
123 () -> tester.assertConcreteType(c2, c1),
124 () -> tester.assertEliminatedType(a2, c2)
125 );
126 }
127
128 @Test
129 void mostGeneralCurrentTypeTest() {
130 var c1 = new PartialRelation("C1", 1);
131 var c2 = new PartialRelation("C2", 1);
132 var c3 = new PartialRelation("C3", 1);
133 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
134 typeInfoMap.put(c1, TypeInfo.builder().supertype(c3).build());
135 typeInfoMap.put(c2, TypeInfo.builder().supertype(c3).build());
136 typeInfoMap.put(c3, TypeInfo.builder().build());
137
138 var sut = new TypeAnalyzer(typeInfoMap);
139 var tester = new TypeAnalyzerTester(sut);
140 var c3Result = tester.getPreservedType(c3);
141
142 var expected = new InferredType(Set.of(c3), Set.of(c1, c2, c3), c3);
143 assertAll(
144 () -> assertThat(tester.getInferredType(c3), is(expected)),
145 () -> assertThat(c3Result.merge(sut.getUnknownType(), TruthValue.TRUE), is(expected))
146 );
147 }
148
149 @Test
150 void preferFirstConcreteTypeTest() {
151 var a1 = new PartialRelation("A1", 1);
152 var c1 = new PartialRelation("C1", 1);
153 var c2 = new PartialRelation("C2", 1);
154 var c3 = new PartialRelation("C3", 1);
155 var c4 = new PartialRelation("C4", 1);
156 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
157 typeInfoMap.put(c1, TypeInfo.builder().supertype(a1).build());
158 typeInfoMap.put(c2, TypeInfo.builder().supertype(a1).build());
159 typeInfoMap.put(c3, TypeInfo.builder().supertype(a1).build());
160 typeInfoMap.put(c4, TypeInfo.builder().supertype(c3).build());
161 typeInfoMap.put(a1, TypeInfo.builder().abstractType().build());
162
163 var sut = new TypeAnalyzer(typeInfoMap);
164 var tester = new TypeAnalyzerTester(sut);
165 var c1Result = tester.getPreservedType(c1);
166 var a1Result = tester.getPreservedType(a1);
167
168 assertThat(c1Result.merge(a1Result.asInferredType(), TruthValue.FALSE),
169 is(new InferredType(Set.of(a1), Set.of(c2, c3, c4), c2)));
170 }
171
172 @Test
173 void preferFirstMostGeneralConcreteTypeTest() {
174 var a1 = new PartialRelation("A1", 1);
175 var c1 = new PartialRelation("C1", 1);
176 var c2 = new PartialRelation("C2", 1);
177 var c3 = new PartialRelation("C3", 1);
178 var c4 = new PartialRelation("C4", 1);
179 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
180 typeInfoMap.put(c4, TypeInfo.builder().supertype(c3).build());
181 typeInfoMap.put(c3, TypeInfo.builder().supertype(a1).build());
182 typeInfoMap.put(c2, TypeInfo.builder().supertype(a1).build());
183 typeInfoMap.put(c1, TypeInfo.builder().supertype(a1).build());
184 typeInfoMap.put(a1, TypeInfo.builder().abstractType().build());
185
186 var sut = new TypeAnalyzer(typeInfoMap);
187 var tester = new TypeAnalyzerTester(sut);
188 var c1Result = tester.getPreservedType(c1);
189 var a1Result = tester.getPreservedType(a1);
190
191 assertThat(c1Result.merge(a1Result.asInferredType(), TruthValue.FALSE),
192 is(new InferredType(Set.of(a1), Set.of(c2, c3, c4), c3)));
193 }
194
195 @Test
196 void circularTypeHierarchyTest() {
197 var c1 = new PartialRelation("C1", 1);
198 var c2 = new PartialRelation("C2", 1);
199 var typeInfoMap = new LinkedHashMap<PartialRelation, TypeInfo>();
200 typeInfoMap.put(c1, TypeInfo.builder().supertype(c2).build());
201 typeInfoMap.put(c2, TypeInfo.builder().supertype(c1).build());
202
203 assertThrows(IllegalArgumentException.class, () -> new TypeAnalyzer(typeInfoMap));
204 }
205}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java
new file mode 100644
index 00000000..cd9df19a
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java
@@ -0,0 +1,186 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import org.junit.jupiter.api.BeforeEach;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.model.Model;
11import tools.refinery.store.model.ModelStore;
12import tools.refinery.store.query.ModelQueryAdapter;
13import tools.refinery.store.query.viatra.ViatraModelQueryAdapter;
14import tools.refinery.store.reasoning.ReasoningAdapter;
15import tools.refinery.store.reasoning.ReasoningStoreAdapter;
16import tools.refinery.store.reasoning.literal.Concreteness;
17import tools.refinery.store.reasoning.representation.PartialRelation;
18import tools.refinery.store.reasoning.seed.ModelSeed;
19import tools.refinery.store.representation.TruthValue;
20import tools.refinery.store.tuple.Tuple;
21
22import static org.hamcrest.MatcherAssert.assertThat;
23import static org.hamcrest.Matchers.is;
24
25class TypeHierarchyPartialModelTest {
26 private final PartialRelation person = new PartialRelation("Person", 1);
27 private final PartialRelation member = new PartialRelation("Member", 1);
28 private final PartialRelation student = new PartialRelation("Student", 1);
29 private final PartialRelation teacher = new PartialRelation("Teacher", 1);
30 private final PartialRelation pet = new PartialRelation("Pet", 1);
31
32 private Model model;
33
34 @BeforeEach
35 void beforeEach() {
36 var typeHierarchy = TypeHierarchy.builder()
37 .type(person, true)
38 .type(member, true, person)
39 .type(student, member)
40 .type(teacher, member)
41 .type(pet)
42 .build();
43
44 var store = ModelStore.builder()
45 .with(ViatraModelQueryAdapter.builder())
46 .with(ReasoningAdapter.builder())
47 .with(new TypeHierarchyTranslator(typeHierarchy))
48 .build();
49
50 var seed = ModelSeed.builder(4)
51 .seed(person, builder -> builder
52 .reducedValue(TruthValue.UNKNOWN)
53 .put(Tuple.of(3), TruthValue.FALSE))
54 .seed(member, builder -> builder
55 .reducedValue(TruthValue.UNKNOWN)
56 .put(Tuple.of(1), TruthValue.TRUE)
57 .put(Tuple.of(2), TruthValue.TRUE))
58 .seed(student, builder -> builder
59 .reducedValue(TruthValue.UNKNOWN)
60 .put(Tuple.of(0), TruthValue.TRUE)
61 .put(Tuple.of(2), TruthValue.FALSE))
62 .seed(teacher, builder -> builder.reducedValue(TruthValue.UNKNOWN))
63 .seed(pet, builder -> builder.reducedValue(TruthValue.UNKNOWN))
64 .build();
65 model = store.getAdapter(ReasoningStoreAdapter.class).createInitialModel(seed);
66 }
67
68 @Test
69 void initialModelTest() {
70 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
71
72 var personInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, person);
73 assertThat(personInterpretation.get(Tuple.of(0)), is(TruthValue.TRUE));
74 assertThat(personInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
75 assertThat(personInterpretation.get(Tuple.of(2)), is(TruthValue.TRUE));
76 assertThat(personInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
77
78 var memberInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, member);
79 assertThat(memberInterpretation.get(Tuple.of(0)), is(TruthValue.TRUE));
80 assertThat(memberInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
81 assertThat(memberInterpretation.get(Tuple.of(2)), is(TruthValue.TRUE));
82 assertThat(memberInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
83
84 var studentInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, student);
85 assertThat(studentInterpretation.get(Tuple.of(0)), is(TruthValue.TRUE));
86 assertThat(studentInterpretation.get(Tuple.of(1)), is(TruthValue.UNKNOWN));
87 assertThat(studentInterpretation.get(Tuple.of(2)), is(TruthValue.FALSE));
88 assertThat(studentInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
89
90 var teacherInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, teacher);
91 assertThat(teacherInterpretation.get(Tuple.of(0)), is(TruthValue.FALSE));
92 assertThat(teacherInterpretation.get(Tuple.of(1)), is(TruthValue.UNKNOWN));
93 assertThat(teacherInterpretation.get(Tuple.of(2)), is(TruthValue.TRUE));
94 assertThat(teacherInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
95
96 var petInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, pet);
97 assertThat(petInterpretation.get(Tuple.of(0)), is(TruthValue.FALSE));
98 assertThat(petInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
99 assertThat(petInterpretation.get(Tuple.of(2)), is(TruthValue.FALSE));
100 assertThat(petInterpretation.get(Tuple.of(3)), is(TruthValue.UNKNOWN));
101 }
102
103 @Test
104 void initialModelCandidateTest() {
105 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
106
107 var personCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, person);
108 assertThat(personCandidateInterpretation.get(Tuple.of(0)), is(TruthValue.TRUE));
109 assertThat(personCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
110 assertThat(personCandidateInterpretation.get(Tuple.of(2)), is(TruthValue.TRUE));
111 assertThat(personCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
112
113 var memberCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, member);
114 assertThat(memberCandidateInterpretation.get(Tuple.of(0)), is(TruthValue.TRUE));
115 assertThat(memberCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
116 assertThat(memberCandidateInterpretation.get(Tuple.of(2)), is(TruthValue.TRUE));
117 assertThat(memberCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
118
119 var studentCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, student);
120 assertThat(studentCandidateInterpretation.get(Tuple.of(0)), is(TruthValue.TRUE));
121 assertThat(studentCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
122 assertThat(studentCandidateInterpretation.get(Tuple.of(2)), is(TruthValue.FALSE));
123 assertThat(studentCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
124
125 var teacherCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, teacher);
126 assertThat(teacherCandidateInterpretation.get(Tuple.of(0)), is(TruthValue.FALSE));
127 assertThat(teacherCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
128 assertThat(teacherCandidateInterpretation.get(Tuple.of(2)), is(TruthValue.TRUE));
129 assertThat(teacherCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
130
131 var petCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, pet);
132 assertThat(petCandidateInterpretation.get(Tuple.of(0)), is(TruthValue.FALSE));
133 assertThat(petCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
134 assertThat(petCandidateInterpretation.get(Tuple.of(2)), is(TruthValue.FALSE));
135 assertThat(petCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
136 }
137
138 @Test
139 void refinedModelTest() {
140 var reasoningAdapter = model.getAdapter(ReasoningAdapter.class);
141 var studentRefiner = reasoningAdapter.getRefiner(student);
142 studentRefiner.merge(Tuple.of(1), TruthValue.FALSE);
143 studentRefiner.merge(Tuple.of(3), TruthValue.TRUE);
144 model.getAdapter(ModelQueryAdapter.class).flushChanges();
145
146 var personInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, person);
147 assertThat(personInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
148 assertThat(personInterpretation.get(Tuple.of(3)), is(TruthValue.ERROR));
149
150 var personCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, person);
151 assertThat(personCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
152 assertThat(personCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
153
154 var memberInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, member);
155 assertThat(memberInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
156 assertThat(memberInterpretation.get(Tuple.of(3)), is(TruthValue.ERROR));
157
158 var memberCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, member);
159 assertThat(memberCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
160 assertThat(memberCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
161
162 var studentInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, student);
163 assertThat(studentInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
164 assertThat(studentInterpretation.get(Tuple.of(3)), is(TruthValue.ERROR));
165
166 var studentCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, student);
167 assertThat(studentCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
168 assertThat(studentCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
169
170 var teacherInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, teacher);
171 assertThat(teacherInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
172 assertThat(teacherInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
173
174 var teacherCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, teacher);
175 assertThat(teacherCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
176 assertThat(teacherCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
177
178 var petInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, pet);
179 assertThat(petInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
180 assertThat(petInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
181
182 var petCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, pet);
183 assertThat(petCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
184 assertThat(petCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE));
185 }
186}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java
new file mode 100644
index 00000000..931c62dd
--- /dev/null
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTest.java
@@ -0,0 +1,224 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.reasoning.translator.typehierarchy;
7
8import org.hamcrest.Matchers;
9import org.junit.jupiter.api.Test;
10import tools.refinery.store.reasoning.representation.PartialRelation;
11import tools.refinery.store.reasoning.translator.TranslationException;
12import tools.refinery.store.representation.TruthValue;
13
14import java.util.Set;
15
16import static org.hamcrest.MatcherAssert.assertThat;
17import static org.hamcrest.Matchers.hasEntry;
18import static org.junit.jupiter.api.Assertions.assertAll;
19import static org.junit.jupiter.api.Assertions.assertThrows;
20
21class TypeHierarchyTest {
22 @Test
23 void directSupertypesTest() {
24 var c1 = new PartialRelation("C1", 1);
25 var c2 = new PartialRelation("C2", 1);
26 var c3 = new PartialRelation("C3", 1);
27
28 var sut = TypeHierarchy.builder()
29 .type(c1, c2, c3)
30 .type(c2, c3)
31 .type(c3)
32 .build();
33 var tester = new TypeHierarchyTester(sut);
34
35 assertAll(
36 () -> tester.assertConcreteType(c1),
37 () -> tester.assertConcreteType(c2, c1),
38 () -> tester.assertConcreteType(c3, c2)
39 );
40 }
41
42 @Test
43 void typeEliminationAbstractToConcreteTest() {
44 var c1 = new PartialRelation("C1", 1);
45 var c2 = new PartialRelation("C2", 1);
46 var a11 = new PartialRelation("A11", 1);
47 var a12 = new PartialRelation("A12", 1);
48 var a21 = new PartialRelation("A21", 1);
49 var a22 = new PartialRelation("A22", 1);
50 var a3 = new PartialRelation("A3", 1);
51
52 var sut = TypeHierarchy.builder()
53 .type(a3, true)
54 .type(a21, true, a3)
55 .type(a22, true, a3)
56 .type(a11, true, a21, a22)
57 .type(a12, true, a21, a22)
58 .type(c1, a11, a12)
59 .type(c2, a3)
60 .build();
61 var tester = new TypeHierarchyTester(sut);
62
63 assertAll(
64 () -> tester.assertConcreteType(c1),
65 () -> tester.assertConcreteType(c2),
66 () -> tester.assertEliminatedType(a11, c1),
67 () -> tester.assertEliminatedType(a12, c1),
68 () -> tester.assertEliminatedType(a21, c1),
69 () -> tester.assertEliminatedType(a22, c1),
70 () -> tester.assertAbstractType(a3, c1, c2)
71 );
72 }
73
74 @Test
75 void typeEliminationConcreteToAbstractTest() {
76 var c1 = new PartialRelation("C1", 1);
77 var c2 = new PartialRelation("C2", 1);
78 var a11 = new PartialRelation("A11", 1);
79 var a12 = new PartialRelation("A12", 1);
80 var a21 = new PartialRelation("A21", 1);
81 var a22 = new PartialRelation("A22", 1);
82 var a3 = new PartialRelation("A3", 1);
83
84 var sut = TypeHierarchy.builder()
85 .type(c1, a11, a12)
86 .type(c2, a3)
87 .type(a11, true, a21, a22)
88 .type(a12, true, a21, a22)
89 .type(a21, true, a3)
90 .type(a22, true, a3)
91 .type(a3, true)
92 .build();
93 var tester = new TypeHierarchyTester(sut);
94
95 assertAll(
96 () -> tester.assertConcreteType(c1),
97 () -> tester.assertConcreteType(c2),
98 () -> tester.assertEliminatedType(a11, c1),
99 () -> tester.assertEliminatedType(a12, c1),
100 () -> tester.assertEliminatedType(a21, c1),
101 () -> tester.assertEliminatedType(a22, c1),
102 () -> tester.assertAbstractType(a3, c1, c2)
103 );
104 }
105
106 @Test
107 void preserveConcreteTypeTest() {
108 var c1 = new PartialRelation("C1", 1);
109 var a1 = new PartialRelation("A1", 1);
110 var c2 = new PartialRelation("C2", 1);
111 var a2 = new PartialRelation("A2", 1);
112
113 var sut = TypeHierarchy.builder()
114 .type(c1, a1)
115 .type(a1, true, c2)
116 .type(c2, a2)
117 .type(a2, true)
118 .build();
119 var tester = new TypeHierarchyTester(sut);
120
121 assertAll(
122 () -> tester.assertConcreteType(c1),
123 () -> tester.assertEliminatedType(a1, c1),
124 () -> tester.assertConcreteType(c2, c1),
125 () -> tester.assertEliminatedType(a2, c2)
126 );
127 }
128
129 @Test
130 void mostGeneralCurrentTypeTest() {
131 var c1 = new PartialRelation("C1", 1);
132 var c2 = new PartialRelation("C2", 1);
133 var c3 = new PartialRelation("C3", 1);
134
135 var sut = TypeHierarchy.builder()
136 .type(c1, c3)
137 .type(c2, c3)
138 .type(c3)
139 .build();
140 var tester = new TypeHierarchyTester(sut);
141 var c3Result = tester.getPreservedType(c3);
142
143 var expected = new InferredType(Set.of(c3), Set.of(c1, c2, c3), c3);
144 assertAll(
145 () -> assertThat(tester.getInferredType(c3), Matchers.is(expected)),
146 () -> assertThat(c3Result.merge(sut.getUnknownType(), TruthValue.TRUE), Matchers.is(expected))
147 );
148 }
149
150 @Test
151 void preferFirstConcreteTypeTest() {
152 var a1 = new PartialRelation("A1", 1);
153 var c1 = new PartialRelation("C1", 1);
154 var c2 = new PartialRelation("C2", 1);
155 var c3 = new PartialRelation("C3", 1);
156 var c4 = new PartialRelation("C4", 1);
157
158 var sut = TypeHierarchy.builder()
159 .type(c1, a1)
160 .type(c2, a1)
161 .type(c3, a1)
162 .type(c4, c3)
163 .type(a1, true)
164 .build();
165 var tester = new TypeHierarchyTester(sut);
166 var c1Result = tester.getPreservedType(c1);
167 var a1Result = tester.getPreservedType(a1);
168
169 assertThat(c1Result.merge(a1Result.asInferredType(), TruthValue.FALSE),
170 Matchers.is(new InferredType(Set.of(a1), Set.of(c2, c3, c4), c2)));
171 }
172
173 @Test
174 void preferFirstMostGeneralConcreteTypeTest() {
175 var a1 = new PartialRelation("A1", 1);
176 var c1 = new PartialRelation("C1", 1);
177 var c2 = new PartialRelation("C2", 1);
178 var c3 = new PartialRelation("C3", 1);
179 var c4 = new PartialRelation("C4", 1);
180
181 var sut = TypeHierarchy.builder()
182 .type(c4, c3)
183 .type(c3, a1)
184 .type(c2, a1)
185 .type(c1, a1)
186 .type(a1, true)
187 .build();
188 var tester = new TypeHierarchyTester(sut);
189 var c1Result = tester.getPreservedType(c1);
190 var a1Result = tester.getPreservedType(a1);
191
192 assertThat(c1Result.merge(a1Result.asInferredType(), TruthValue.FALSE),
193 Matchers.is(new InferredType(Set.of(a1), Set.of(c2, c3, c4), c3)));
194 }
195
196 @Test
197 void circularTypeHierarchyTest() {
198 var c1 = new PartialRelation("C1", 1);
199 var c2 = new PartialRelation("C2", 1);
200 var builder = TypeHierarchy.builder()
201 .type(c1, c2)
202 .type(c2, c1);
203
204 assertThrows(TranslationException.class, builder::build);
205 }
206
207 @Test
208 void chainedEliminationTest() {
209 var a1 = new PartialRelation("A1", 1);
210 var a2 = new PartialRelation("A2", 1);
211 var c1 = new PartialRelation("C1", 1);
212
213 var sut = TypeHierarchy.builder()
214 .type(a1, true)
215 .type(a2, true, a1)
216 .type(c1, a2)
217 .build();
218
219 assertAll(
220 () -> assertThat(sut.getEliminatedTypes(), hasEntry(a1, c1)),
221 () -> assertThat(sut.getEliminatedTypes(), hasEntry(a2, c1))
222 );
223 }
224}
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerTester.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTester.java
index 2924816e..647bd782 100644
--- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeAnalyzerTester.java
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyTester.java
@@ -11,10 +11,10 @@ import static org.hamcrest.MatcherAssert.assertThat;
11import static org.hamcrest.Matchers.*; 11import static org.hamcrest.Matchers.*;
12import static org.hamcrest.Matchers.is; 12import static org.hamcrest.Matchers.is;
13 13
14class TypeAnalyzerTester { 14class TypeHierarchyTester {
15 private final TypeAnalyzer sut; 15 private final TypeHierarchy sut;
16 16
17 public TypeAnalyzerTester(TypeAnalyzer sut) { 17 public TypeHierarchyTester(TypeHierarchy sut) {
18 this.sut = sut; 18 this.sut = sut;
19 } 19 }
20 20
@@ -32,22 +32,21 @@ class TypeAnalyzerTester {
32 32
33 private void assertPreservedType(PartialRelation partialRelation, boolean isAbstract, boolean isVacuous, 33 private void assertPreservedType(PartialRelation partialRelation, boolean isAbstract, boolean isVacuous,
34 PartialRelation... directSubtypes) { 34 PartialRelation... directSubtypes) {
35 var result = sut.getAnalysisResults().get(partialRelation); 35 var result = sut.getPreservedTypes().get(partialRelation);
36 assertThat(result, is(instanceOf(PreservedType.class))); 36 assertThat(result, not(nullValue()));
37 var preservedResult = (PreservedType) result; 37 assertThat(result.isAbstractType(), is(isAbstract));
38 assertThat(preservedResult.isAbstractType(), is(isAbstract)); 38 assertThat(result.isVacuous(), is(isVacuous));
39 assertThat(preservedResult.isVacuous(), is(isVacuous)); 39 assertThat(result.getDirectSubtypes(), hasItems(directSubtypes));
40 assertThat(preservedResult.getDirectSubtypes(), hasItems(directSubtypes));
41 } 40 }
42 41
43 public void assertEliminatedType(PartialRelation partialRelation, PartialRelation replacement) { 42 public void assertEliminatedType(PartialRelation partialRelation, PartialRelation replacement) {
44 var result = sut.getAnalysisResults().get(partialRelation); 43 var result = sut.getEliminatedTypes().get(partialRelation);
45 assertThat(result, is(instanceOf(EliminatedType.class))); 44 assertThat(result, not(nullValue()));
46 assertThat(((EliminatedType) result).replacement(), is(replacement)); 45 assertThat(result, is(replacement));
47 } 46 }
48 47
49 public PreservedType getPreservedType(PartialRelation partialRelation) { 48 public TypeAnalysisResult getPreservedType(PartialRelation partialRelation) {
50 return (PreservedType) sut.getAnalysisResults().get(partialRelation); 49 return sut.getPreservedTypes().get(partialRelation);
51 } 50 }
52 51
53 public InferredType getInferredType(PartialRelation partialRelation) { 52 public InferredType getInferredType(PartialRelation partialRelation) {
diff --git a/subprojects/store/build.gradle.kts b/subprojects/store/build.gradle.kts
index d653f01d..f96922a9 100644
--- a/subprojects/store/build.gradle.kts
+++ b/subprojects/store/build.gradle.kts
@@ -10,6 +10,6 @@ plugins {
10} 10}
11 11
12dependencies { 12dependencies {
13 implementation(libs.eclipseCollections)
14 implementation(libs.eclipseCollections.api) 13 implementation(libs.eclipseCollections.api)
14 runtimeOnly(libs.eclipseCollections)
15} 15}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/map/Cursors.java b/subprojects/store/src/main/java/tools/refinery/store/map/Cursors.java
index 0a94d449..5e69e7af 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/map/Cursors.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/map/Cursors.java
@@ -5,6 +5,9 @@
5 */ 5 */
6package tools.refinery.store.map; 6package tools.refinery.store.map;
7 7
8import java.util.Iterator;
9import java.util.Map;
10
8public final class Cursors { 11public final class Cursors {
9 private Cursors() { 12 private Cursors() {
10 throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); 13 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
@@ -14,6 +17,18 @@ public final class Cursors {
14 return new Empty<>(); 17 return new Empty<>();
15 } 18 }
16 19
20 public static <K, V> Cursor<K, V> singleton(K key, V value) {
21 return new Singleton<>(key, value);
22 }
23
24 public static <K, V> Cursor<K, V> of(Iterator<Map.Entry<K, V>> iterator) {
25 return new IteratorBasedCursor<>(iterator);
26 }
27
28 public static <K, V> Cursor<K, V> of(Map<K, V> map) {
29 return of(map.entrySet().iterator());
30 }
31
17 private static class Empty<K, V> implements Cursor<K, V> { 32 private static class Empty<K, V> implements Cursor<K, V> {
18 private boolean terminated = false; 33 private boolean terminated = false;
19 34
@@ -38,4 +53,53 @@ public final class Cursors {
38 return false; 53 return false;
39 } 54 }
40 } 55 }
56
57 private static class Singleton<K, V> implements Cursor<K, V> {
58 private State state = State.INITIAL;
59 private final K key;
60 private final V value;
61
62 public Singleton(K key, V value) {
63 this.key = key;
64 this.value = value;
65 }
66
67 @Override
68 public K getKey() {
69 if (state == State.STARTED) {
70 return key;
71 }
72 return null;
73 }
74
75 @Override
76 public V getValue() {
77 if (state == State.STARTED) {
78 return value;
79 }
80 return null;
81 }
82
83 @Override
84 public boolean isTerminated() {
85 return state == State.TERMINATED;
86 }
87
88 @Override
89 public boolean move() {
90 if (state == State.INITIAL) {
91 state = State.STARTED;
92 return true;
93 }
94 state = State.TERMINATED;
95 return false;
96 }
97
98
99 private enum State {
100 INITIAL,
101 STARTED,
102 TERMINATED
103 }
104 }
41} 105}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/map/IteratorBasedCursor.java b/subprojects/store/src/main/java/tools/refinery/store/map/IteratorBasedCursor.java
new file mode 100644
index 00000000..0ed9b730
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/map/IteratorBasedCursor.java
@@ -0,0 +1,44 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.map;
7
8import java.util.Iterator;
9import java.util.Map;
10
11public class IteratorBasedCursor<K, V> implements Cursor<K, V> {
12 private final Iterator<Map.Entry<K, V>> iterator;
13 private Map.Entry<K, V> entry;
14 private boolean terminated;
15
16 public IteratorBasedCursor(Iterator<Map.Entry<K, V>> iterator) {
17 this.iterator = iterator;
18 }
19
20 @Override
21 public K getKey() {
22 return entry.getKey();
23 }
24
25 @Override
26 public V getValue() {
27 return entry.getValue();
28 }
29
30 @Override
31 public boolean isTerminated() {
32 return terminated;
33 }
34
35 @Override
36 public boolean move() {
37 if (!terminated && iterator.hasNext()) {
38 entry = iterator.next();
39 return true;
40 }
41 terminated = true;
42 return false;
43 }
44}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/map/internal/delta/VersionedMapDeltaImpl.java b/subprojects/store/src/main/java/tools/refinery/store/map/internal/delta/VersionedMapDeltaImpl.java
index c19cc817..8be42712 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/map/internal/delta/VersionedMapDeltaImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/map/internal/delta/VersionedMapDeltaImpl.java
@@ -5,10 +5,9 @@
5 */ 5 */
6package tools.refinery.store.map.internal.delta; 6package tools.refinery.store.map.internal.delta;
7 7
8import java.util.*;
9
10import tools.refinery.store.map.*; 8import tools.refinery.store.map.*;
11import tools.refinery.store.map.IteratorAsCursor; 9
10import java.util.*;
12 11
13public class VersionedMapDeltaImpl<K, V> implements VersionedMap<K, V> { 12public class VersionedMapDeltaImpl<K, V> implements VersionedMap<K, V> {
14 protected final VersionedMapStoreDeltaImpl<K, V> store; 13 protected final VersionedMapStoreDeltaImpl<K, V> store;
@@ -24,7 +23,7 @@ public class VersionedMapDeltaImpl<K, V> implements VersionedMap<K, V> {
24 this.store = store; 23 this.store = store;
25 this.defaultValue = defaultValue; 24 this.defaultValue = defaultValue;
26 25
27 current = new HashMap<>(); 26 current = new LinkedHashMap<>();
28 if (summarizeChanges) { 27 if (summarizeChanges) {
29 this.uncommittedStore = new UncommittedDeltaMapStore<>(this); 28 this.uncommittedStore = new UncommittedDeltaMapStore<>(this);
30 } else { 29 } else {
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/AnyInterpretation.java b/subprojects/store/src/main/java/tools/refinery/store/model/AnyInterpretation.java
index f906b48a..d650bd06 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/AnyInterpretation.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/AnyInterpretation.java
@@ -13,4 +13,6 @@ public sealed interface AnyInterpretation permits Interpretation {
13 AnySymbol getSymbol(); 13 AnySymbol getSymbol();
14 14
15 long getSize(); 15 long getSize();
16
17 int getAdjacentSize(int slot, int node);
16} 18}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/Interpretation.java b/subprojects/store/src/main/java/tools/refinery/store/model/Interpretation.java
index 72f188d3..1b15e4cf 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/Interpretation.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/Interpretation.java
@@ -19,6 +19,8 @@ public non-sealed interface Interpretation<T> extends AnyInterpretation {
19 19
20 Cursor<Tuple, T> getAll(); 20 Cursor<Tuple, T> getAll();
21 21
22 Cursor<Tuple, T> getAdjacent(int slot, int node);
23
22 T put(Tuple key, T value); 24 T put(Tuple key, T value);
23 25
24 void putAll(Cursor<Tuple, T> cursor); 26 void putAll(Cursor<Tuple, T> cursor);
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/Model.java b/subprojects/store/src/main/java/tools/refinery/store/model/Model.java
index e2ab72e7..c4ce5207 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/Model.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/Model.java
@@ -8,11 +8,9 @@ package tools.refinery.store.model;
8import tools.refinery.store.adapter.ModelAdapter; 8import tools.refinery.store.adapter.ModelAdapter;
9import tools.refinery.store.map.Version; 9import tools.refinery.store.map.Version;
10import tools.refinery.store.map.Versioned; 10import tools.refinery.store.map.Versioned;
11import tools.refinery.store.model.internal.VersionedInterpretation;
12import tools.refinery.store.representation.AnySymbol; 11import tools.refinery.store.representation.AnySymbol;
13import tools.refinery.store.representation.Symbol; 12import tools.refinery.store.representation.Symbol;
14 13
15import java.util.Map;
16import java.util.Optional; 14import java.util.Optional;
17 15
18public interface Model extends Versioned { 16public interface Model extends Versioned {
@@ -38,4 +36,6 @@ public interface Model extends Versioned {
38 void addListener(ModelListener listener); 36 void addListener(ModelListener listener);
39 37
40 void removeListener(ModelListener listener); 38 void removeListener(ModelListener listener);
39
40 void checkCancelled();
41} 41}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/ModelStore.java b/subprojects/store/src/main/java/tools/refinery/store/model/ModelStore.java
index 89382b3a..61abf126 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/ModelStore.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/ModelStore.java
@@ -26,6 +26,8 @@ public interface ModelStore {
26 26
27 <T extends ModelStoreAdapter> T getAdapter(Class<T> adapterType); 27 <T extends ModelStoreAdapter> T getAdapter(Class<T> adapterType);
28 28
29 void checkCancelled();
30
29 static ModelStoreBuilder builder() { 31 static ModelStoreBuilder builder() {
30 return new ModelStoreBuilderImpl(); 32 return new ModelStoreBuilderImpl();
31 } 33 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreBuilder.java b/subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreBuilder.java
index 3a4024b5..9b2b38c3 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreBuilder.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreBuilder.java
@@ -8,12 +8,15 @@ package tools.refinery.store.model;
8import tools.refinery.store.adapter.ModelAdapterBuilder; 8import tools.refinery.store.adapter.ModelAdapterBuilder;
9import tools.refinery.store.representation.AnySymbol; 9import tools.refinery.store.representation.AnySymbol;
10import tools.refinery.store.representation.Symbol; 10import tools.refinery.store.representation.Symbol;
11import tools.refinery.store.util.CancellationToken;
11 12
12import java.util.Collection; 13import java.util.Collection;
13import java.util.List; 14import java.util.List;
14import java.util.Optional; 15import java.util.Optional;
15 16
16public interface ModelStoreBuilder { 17public interface ModelStoreBuilder {
18 ModelStoreBuilder cancellationToken(CancellationToken cancellationToken);
19
17 default ModelStoreBuilder symbols(AnySymbol... symbols) { 20 default ModelStoreBuilder symbols(AnySymbol... symbols) {
18 return symbols(List.of(symbols)); 21 return symbols(List.of(symbols));
19 } 22 }
@@ -29,7 +32,9 @@ public interface ModelStoreBuilder {
29 32
30 <T> ModelStoreBuilder symbol(Symbol<T> symbol); 33 <T> ModelStoreBuilder symbol(Symbol<T> symbol);
31 34
32 <T extends ModelAdapterBuilder> ModelStoreBuilder with(T adapterBuilder); 35 ModelStoreBuilder with(ModelAdapterBuilder adapterBuilder);
36
37 ModelStoreBuilder with(ModelStoreConfiguration configuration);
33 38
34 <T extends ModelAdapterBuilder> Optional<T> tryGetAdapter(Class<? extends T> adapterType); 39 <T extends ModelAdapterBuilder> Optional<T> tryGetAdapter(Class<? extends T> adapterType);
35 40
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreConfiguration.java b/subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreConfiguration.java
new file mode 100644
index 00000000..e94af5f8
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/ModelStoreConfiguration.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.model;
7
8@FunctionalInterface
9public interface ModelStoreConfiguration {
10 void apply(ModelStoreBuilder storeBuilder);
11}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/BaseIndexer.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/BaseIndexer.java
new file mode 100644
index 00000000..3d7f59d7
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/BaseIndexer.java
@@ -0,0 +1,102 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.model.internal;
7
8import org.eclipse.collections.api.factory.Maps;
9import org.eclipse.collections.api.factory.primitive.IntObjectMaps;
10import org.eclipse.collections.api.map.MutableMap;
11import org.eclipse.collections.api.map.primitive.MutableIntObjectMap;
12import tools.refinery.store.map.*;
13import tools.refinery.store.tuple.Tuple;
14
15import java.util.Set;
16
17class BaseIndexer<T> {
18 private final MutableIntObjectMap<MutableMap<Tuple, T>>[] maps;
19 private final VersionedMap<Tuple, T> versionedMap;
20
21 public BaseIndexer(int arity, VersionedMap<Tuple, T> map) {
22 if (arity < 2) {
23 throw new IllegalArgumentException("Only arity >= 2 symbols need to be indexed");
24 }
25 // There is no way in Java to create a generic array in a checked way.
26 @SuppressWarnings({"unchecked", "squid:S1905"})
27 var uncheckedMaps = (MutableIntObjectMap<MutableMap<Tuple, T>>[]) new MutableIntObjectMap[arity];
28 maps = uncheckedMaps;
29 for (int i = 0; i < arity; i++) {
30 maps[i] = IntObjectMaps.mutable.empty();
31 }
32 this.versionedMap = map;
33 if (map != null) {
34 var cursor = map.getAll();
35 while (cursor.move()) {
36 put(cursor.getKey(), cursor.getValue());
37 }
38 }
39 }
40
41 public void put(Tuple key, T value) {
42 for (int i = 0; i < maps.length; i++) {
43 var map = maps[i];
44 int element = key.get(i);
45 var adjacentTuples = map.getIfAbsentPut(element, Maps.mutable::empty);
46 adjacentTuples.put(key, value);
47 }
48 }
49
50 public void remove(Tuple key) {
51 for (int i = 0; i < maps.length; i++) {
52 var map = maps[i];
53 int element = key.get(i);
54 var adjacentTuples = map.get(element);
55 if (adjacentTuples == null) {
56 continue;
57 }
58 adjacentTuples.remove(key);
59 if (adjacentTuples.isEmpty()) {
60 map.remove(element);
61 }
62 }
63 }
64
65 private MutableMap<Tuple, T> getAdjacentMap(int slot, int node) {
66 if (slot < 0 || slot >= maps.length) {
67 throw new IllegalArgumentException("Invalid index: " + slot);
68 }
69 var map = maps[slot];
70 return map.get(node);
71 }
72
73 public int getAdjacentSize(int slot, int node) {
74 var adjacentTuples = getAdjacentMap(slot, node);
75 if (adjacentTuples == null) {
76 return 0;
77 }
78 return adjacentTuples.size();
79 }
80
81 public Cursor<Tuple, T> getAdjacent(int slot, int node) {
82 var adjacentTuples = getAdjacentMap(slot, node);
83 if (adjacentTuples == null) {
84 return Cursors.empty();
85 }
86 return new IndexCursor<>(adjacentTuples, versionedMap);
87 }
88
89 private static class IndexCursor<T> extends IteratorBasedCursor<Tuple, T> {
90 private final Set<AnyVersionedMap> dependingMaps;
91
92 public IndexCursor(MutableMap<Tuple, T> map, VersionedMap<Tuple, T> versionedMap) {
93 super(map.entrySet().iterator());
94 dependingMaps = versionedMap == null ? Set.of() : Set.of(versionedMap);
95 }
96
97 @Override
98 public Set<AnyVersionedMap> getDependingMaps() {
99 return dependingMaps;
100 }
101 }
102}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/IndexedVersionedInterpretation.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/IndexedVersionedInterpretation.java
new file mode 100644
index 00000000..0be16f77
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/IndexedVersionedInterpretation.java
@@ -0,0 +1,48 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.model.internal;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.map.VersionedMap;
10import tools.refinery.store.representation.Symbol;
11import tools.refinery.store.tuple.Tuple;
12
13import java.util.Objects;
14
15class IndexedVersionedInterpretation<T> extends VersionedInterpretation<T> {
16 private final BaseIndexer<T> indexer;
17
18 public IndexedVersionedInterpretation(ModelImpl model, Symbol<T> symbol, VersionedMap<Tuple, T> map) {
19 super(model, symbol, map);
20 indexer = new BaseIndexer<>(symbol.arity(), map);
21 }
22
23 @Override
24 public Cursor<Tuple, T> getAdjacent(int slot, int node) {
25 return indexer.getAdjacent(slot, node);
26 }
27
28 @Override
29 public int getAdjacentSize(int slot, int node) {
30 return indexer.getAdjacentSize(slot, node);
31 }
32
33 @Override
34 protected boolean shouldNotifyRestoreListeners() {
35 // Always call the {@code valueChanged} method to update the index.
36 return true;
37 }
38
39 @Override
40 protected void valueChanged(Tuple key, T fromValue, T toValue, boolean restoring) {
41 if (Objects.equals(toValue, getSymbol().defaultValue())) {
42 indexer.remove(key);
43 } else {
44 indexer.put(key, toValue);
45 }
46 super.valueChanged(key, fromValue, toValue, restoring);
47 }
48}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java
index 2b12d5a6..d11e431b 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java
@@ -13,23 +13,26 @@ import tools.refinery.store.model.*;
13import tools.refinery.store.representation.AnySymbol; 13import tools.refinery.store.representation.AnySymbol;
14import tools.refinery.store.representation.Symbol; 14import tools.refinery.store.representation.Symbol;
15import tools.refinery.store.tuple.Tuple; 15import tools.refinery.store.tuple.Tuple;
16import tools.refinery.store.util.CancellationToken;
16 17
17import java.util.*; 18import java.util.*;
18 19
19public class ModelImpl implements Model { 20public class ModelImpl implements Model {
20 private final ModelStore store; 21 private final ModelStoreImpl store;
21 private Version state; 22 private Version state;
22 private LinkedHashMap<? extends AnySymbol, ? extends VersionedInterpretation<?>> interpretations; 23 private LinkedHashMap<? extends AnySymbol, ? extends VersionedInterpretation<?>> interpretations;
23 private final List<ModelAdapter> adapters; 24 private final List<ModelAdapter> adapters;
24 private final List<ModelListener> listeners = new ArrayList<>(); 25 private final List<ModelListener> listeners = new ArrayList<>();
26 private final CancellationToken cancellationToken;
25 private boolean uncommittedChanges; 27 private boolean uncommittedChanges;
26 private ModelAction pendingAction = ModelAction.NONE; 28 private ModelAction pendingAction = ModelAction.NONE;
27 private Version restoringToState = null; 29 private Version restoringToState = null;
28 30
29 ModelImpl(ModelStore store, Version state, int adapterCount) { 31 ModelImpl(ModelStoreImpl store, Version state, int adapterCount) {
30 this.store = store; 32 this.store = store;
31 this.state = state; 33 this.state = state;
32 adapters = new ArrayList<>(adapterCount); 34 adapters = new ArrayList<>(adapterCount);
35 cancellationToken = store.getCancellationToken();
33 } 36 }
34 37
35 void setInterpretations(LinkedHashMap<? extends AnySymbol, ? extends VersionedInterpretation<?>> interpretations) { 38 void setInterpretations(LinkedHashMap<? extends AnySymbol, ? extends VersionedInterpretation<?>> interpretations) {
@@ -88,6 +91,7 @@ public class ModelImpl implements Model {
88 91
89 @Override 92 @Override
90 public Version commit() { 93 public Version commit() {
94 checkCancelled();
91 if (hasPendingAction()) { 95 if (hasPendingAction()) {
92 throw pendingActionError("commit"); 96 throw pendingActionError("commit");
93 } 97 }
@@ -106,6 +110,7 @@ public class ModelImpl implements Model {
106 Version[] interpretationVersions = new Version[interpretations.size()]; 110 Version[] interpretationVersions = new Version[interpretations.size()];
107 int j = 0; 111 int j = 0;
108 for (var interpretationEntry : interpretations.entrySet()) { 112 for (var interpretationEntry : interpretations.entrySet()) {
113 checkCancelled();
109 interpretationVersions[j++] = interpretationEntry.getValue().commit(); 114 interpretationVersions[j++] = interpretationEntry.getValue().commit();
110 } 115 }
111 ModelVersion modelVersion = new ModelVersion(interpretationVersions); 116 ModelVersion modelVersion = new ModelVersion(interpretationVersions);
@@ -125,6 +130,7 @@ public class ModelImpl implements Model {
125 130
126 @Override 131 @Override
127 public void restore(Version version) { 132 public void restore(Version version) {
133 checkCancelled();
128 if (hasPendingAction()) { 134 if (hasPendingAction()) {
129 throw pendingActionError("restore to %s".formatted(version)); 135 throw pendingActionError("restore to %s".formatted(version));
130 } 136 }
@@ -140,6 +146,7 @@ public class ModelImpl implements Model {
140 } 146 }
141 int j = 0; 147 int j = 0;
142 for (var interpretation : interpretations.values()) { 148 for (var interpretation : interpretations.values()) {
149 checkCancelled();
143 interpretation.restore(ModelVersion.getInternalVersion(version, j++)); 150 interpretation.restore(ModelVersion.getInternalVersion(version, j++));
144 } 151 }
145 152
@@ -187,4 +194,9 @@ public class ModelImpl implements Model {
187 public void removeListener(ModelListener listener) { 194 public void removeListener(ModelListener listener) {
188 listeners.remove(listener); 195 listeners.remove(listener);
189 } 196 }
197
198 @Override
199 public void checkCancelled() {
200 cancellationToken.checkCancelled();
201 }
190} 202}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java
index 2bd187a8..53ecde5e 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java
@@ -12,21 +12,37 @@ import tools.refinery.store.map.VersionedMapStoreFactory;
12import tools.refinery.store.map.VersionedMapStoreFactoryBuilder; 12import tools.refinery.store.map.VersionedMapStoreFactoryBuilder;
13import tools.refinery.store.model.ModelStore; 13import tools.refinery.store.model.ModelStore;
14import tools.refinery.store.model.ModelStoreBuilder; 14import tools.refinery.store.model.ModelStoreBuilder;
15import tools.refinery.store.model.ModelStoreConfiguration;
15import tools.refinery.store.representation.AnySymbol; 16import tools.refinery.store.representation.AnySymbol;
16import tools.refinery.store.representation.Symbol; 17import tools.refinery.store.representation.Symbol;
17import tools.refinery.store.tuple.Tuple; 18import tools.refinery.store.tuple.Tuple;
19import tools.refinery.store.util.CancellationToken;
18 20
19import java.util.*; 21import java.util.*;
20 22
21public class ModelStoreBuilderImpl implements ModelStoreBuilder { 23public class ModelStoreBuilderImpl implements ModelStoreBuilder {
24 private CancellationToken cancellationToken;
22 private final LinkedHashSet<AnySymbol> allSymbols = new LinkedHashSet<>(); 25 private final LinkedHashSet<AnySymbol> allSymbols = new LinkedHashSet<>();
23 private final LinkedHashMap<SymbolEquivalenceClass<?>, List<AnySymbol>> equivalenceClasses = new LinkedHashMap<>(); 26 private final LinkedHashMap<SymbolEquivalenceClass<?>, List<AnySymbol>> equivalenceClasses = new LinkedHashMap<>();
24 private final List<ModelAdapterBuilder> adapters = new ArrayList<>(); 27 private final List<ModelAdapterBuilder> adapters = new ArrayList<>();
25 28
26 @Override 29 @Override
30 public ModelStoreBuilder cancellationToken(CancellationToken cancellationToken) {
31 if (this.cancellationToken != null) {
32 throw new IllegalStateException("Cancellation token was already set");
33 }
34 if (cancellationToken == null) {
35 throw new IllegalStateException("Cancellation token must not be null");
36 }
37 this.cancellationToken = cancellationToken;
38 return this;
39 }
40
41 @Override
27 public <T> ModelStoreBuilder symbol(Symbol<T> symbol) { 42 public <T> ModelStoreBuilder symbol(Symbol<T> symbol) {
28 if (!allSymbols.add(symbol)) { 43 if (!allSymbols.add(symbol)) {
29 throw new IllegalArgumentException("Symbol %s already added".formatted(symbol)); 44 // No need to add symbol twice.
45 return this;
30 } 46 }
31 var equivalenceClass = new SymbolEquivalenceClass<>(symbol); 47 var equivalenceClass = new SymbolEquivalenceClass<>(symbol);
32 var symbolsInEquivalenceClass = equivalenceClasses.computeIfAbsent(equivalenceClass, 48 var symbolsInEquivalenceClass = equivalenceClasses.computeIfAbsent(equivalenceClass,
@@ -36,7 +52,7 @@ public class ModelStoreBuilderImpl implements ModelStoreBuilder {
36 } 52 }
37 53
38 @Override 54 @Override
39 public <T extends ModelAdapterBuilder> ModelStoreBuilder with(T adapterBuilder) { 55 public ModelStoreBuilder with(ModelAdapterBuilder adapterBuilder) {
40 for (var existingAdapter : adapters) { 56 for (var existingAdapter : adapters) {
41 if (existingAdapter.getClass().equals(adapterBuilder.getClass())) { 57 if (existingAdapter.getClass().equals(adapterBuilder.getClass())) {
42 throw new IllegalArgumentException("%s adapter was already configured for store builder" 58 throw new IllegalArgumentException("%s adapter was already configured for store builder"
@@ -48,6 +64,12 @@ public class ModelStoreBuilderImpl implements ModelStoreBuilder {
48 } 64 }
49 65
50 @Override 66 @Override
67 public ModelStoreBuilder with(ModelStoreConfiguration configuration) {
68 configuration.apply(this);
69 return this;
70 }
71
72 @Override
51 public <T extends ModelAdapterBuilder> Optional<T> tryGetAdapter(Class<? extends T> adapterType) { 73 public <T extends ModelAdapterBuilder> Optional<T> tryGetAdapter(Class<? extends T> adapterType) {
52 return AdapterUtils.tryGetAdapter(adapters, adapterType); 74 return AdapterUtils.tryGetAdapter(adapters, adapterType);
53 } 75 }
@@ -59,6 +81,7 @@ public class ModelStoreBuilderImpl implements ModelStoreBuilder {
59 81
60 @Override 82 @Override
61 public ModelStore build() { 83 public ModelStore build() {
84 // First configure adapters and let them register any symbols we don't know about yet.
62 for (int i = adapters.size() - 1; i >= 0; i--) { 85 for (int i = adapters.size() - 1; i >= 0; i--) {
63 adapters.get(i).configure(this); 86 adapters.get(i).configure(this);
64 } 87 }
@@ -66,7 +89,8 @@ public class ModelStoreBuilderImpl implements ModelStoreBuilder {
66 for (var entry : equivalenceClasses.entrySet()) { 89 for (var entry : equivalenceClasses.entrySet()) {
67 createStores(stores, entry.getKey(), entry.getValue()); 90 createStores(stores, entry.getKey(), entry.getValue());
68 } 91 }
69 var modelStore = new ModelStoreImpl(stores, adapters.size()); 92 var modelStore = new ModelStoreImpl(stores, adapters.size(), cancellationToken == null ?
93 CancellationToken.NONE : cancellationToken);
70 for (var adapterBuilder : adapters) { 94 for (var adapterBuilder : adapters) {
71 var storeAdapter = adapterBuilder.build(modelStore); 95 var storeAdapter = adapterBuilder.build(modelStore);
72 modelStore.addAdapter(storeAdapter); 96 modelStore.addAdapter(storeAdapter);
@@ -77,8 +101,8 @@ public class ModelStoreBuilderImpl implements ModelStoreBuilder {
77 private <T> void createStores(Map<AnySymbol, VersionedMapStore<Tuple, ?>> stores, 101 private <T> void createStores(Map<AnySymbol, VersionedMapStore<Tuple, ?>> stores,
78 SymbolEquivalenceClass<T> equivalenceClass, List<AnySymbol> symbols) { 102 SymbolEquivalenceClass<T> equivalenceClass, List<AnySymbol> symbols) {
79 int size = symbols.size(); 103 int size = symbols.size();
80 VersionedMapStoreFactory<Tuple,T> mapFactory = VersionedMapStore 104 VersionedMapStoreFactory<Tuple, T> mapFactory = VersionedMapStore
81 .<Tuple,T>builder() 105 .<Tuple, T>builder()
82 .strategy(VersionedMapStoreFactoryBuilder.StoreStrategy.DELTA) 106 .strategy(VersionedMapStoreFactoryBuilder.StoreStrategy.DELTA)
83 .defaultValue(equivalenceClass.defaultValue()) 107 .defaultValue(equivalenceClass.defaultValue())
84 .build(); 108 .build();
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreImpl.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreImpl.java
index a320a618..fd4cc160 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreImpl.java
@@ -14,16 +14,20 @@ import tools.refinery.store.model.ModelDiffCursor;
14import tools.refinery.store.model.ModelStore; 14import tools.refinery.store.model.ModelStore;
15import tools.refinery.store.representation.AnySymbol; 15import tools.refinery.store.representation.AnySymbol;
16import tools.refinery.store.tuple.Tuple; 16import tools.refinery.store.tuple.Tuple;
17import tools.refinery.store.util.CancellationToken;
17 18
18import java.util.*; 19import java.util.*;
19 20
20public class ModelStoreImpl implements ModelStore { 21public class ModelStoreImpl implements ModelStore {
21 private final LinkedHashMap<? extends AnySymbol, ? extends VersionedMapStore<Tuple, ?>> stores; 22 private final LinkedHashMap<? extends AnySymbol, ? extends VersionedMapStore<Tuple, ?>> stores;
22 private final List<ModelStoreAdapter> adapters; 23 private final List<ModelStoreAdapter> adapters;
24 private final CancellationToken cancellationToken;
23 25
24 ModelStoreImpl(LinkedHashMap<? extends AnySymbol, ? extends VersionedMapStore<Tuple, ?>> stores, int adapterCount) { 26 ModelStoreImpl(LinkedHashMap<? extends AnySymbol, ? extends VersionedMapStore<Tuple, ?>> stores, int adapterCount,
27 CancellationToken cancellationToken) {
25 this.stores = stores; 28 this.stores = stores;
26 adapters = new ArrayList<>(adapterCount); 29 adapters = new ArrayList<>(adapterCount);
30 this.cancellationToken = cancellationToken;
27 } 31 }
28 32
29 @Override 33 @Override
@@ -100,4 +104,13 @@ public class ModelStoreImpl implements ModelStore {
100 void addAdapter(ModelStoreAdapter adapter) { 104 void addAdapter(ModelStoreAdapter adapter) {
101 adapters.add(adapter); 105 adapters.add(adapter);
102 } 106 }
107
108 @Override
109 public void checkCancelled() {
110 cancellationToken.checkCancelled();
111 }
112
113 CancellationToken getCancellationToken() {
114 return cancellationToken;
115 }
103} 116}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelVersion.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelVersion.java
index f81386f1..c3e52084 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelVersion.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelVersion.java
@@ -11,11 +11,9 @@ import java.util.Arrays;
11 11
12public class ModelVersion implements Version { 12public class ModelVersion implements Version {
13 final Version[] mapVersions; 13 final Version[] mapVersions;
14 final int hash;
15 14
16 public ModelVersion(Version[] mapVersions) { 15 public ModelVersion(Version[] mapVersions) {
17 this.mapVersions = mapVersions; 16 this.mapVersions = mapVersions;
18 this.hash = Arrays.hashCode(mapVersions);
19 } 17 }
20 18
21 public static Version getInternalVersion(Version modelVersion, int interpretationIndex) { 19 public static Version getInternalVersion(Version modelVersion, int interpretationIndex) {
@@ -23,16 +21,6 @@ public class ModelVersion implements Version {
23 } 21 }
24 22
25 @Override 23 @Override
26 public int hashCode() {
27 return hash;
28 }
29
30 @Override
31 public boolean equals(Object obj) {
32 return super.equals(obj);
33 }
34
35 @Override
36 public String toString() { 24 public String toString() {
37 return "ModelVersion{" + 25 return "ModelVersion{" +
38 "mapVersions=" + Arrays.toString(mapVersions) + 26 "mapVersions=" + Arrays.toString(mapVersions) +
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/NullaryVersionedInterpretation.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/NullaryVersionedInterpretation.java
new file mode 100644
index 00000000..4a8e6752
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/NullaryVersionedInterpretation.java
@@ -0,0 +1,27 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.model.internal;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.map.VersionedMap;
10import tools.refinery.store.representation.Symbol;
11import tools.refinery.store.tuple.Tuple;
12
13class NullaryVersionedInterpretation<T> extends VersionedInterpretation<T> {
14 public NullaryVersionedInterpretation(ModelImpl model, Symbol<T> symbol, VersionedMap<Tuple, T> map) {
15 super(model, symbol, map);
16 }
17
18 @Override
19 public Cursor<Tuple, T> getAdjacent(int slot, int node) {
20 throw new IllegalArgumentException("Invalid index: " + slot);
21 }
22
23 @Override
24 public int getAdjacentSize(int slot, int node) {
25 throw new IllegalArgumentException("Invalid index: " + slot);
26 }
27}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/UnaryVersionedInterpretation.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/UnaryVersionedInterpretation.java
new file mode 100644
index 00000000..75946680
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/UnaryVersionedInterpretation.java
@@ -0,0 +1,48 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.model.internal;
7
8import tools.refinery.store.map.Cursor;
9import tools.refinery.store.map.Cursors;
10import tools.refinery.store.map.VersionedMap;
11import tools.refinery.store.representation.Symbol;
12import tools.refinery.store.tuple.Tuple;
13
14import java.util.Objects;
15
16class UnaryVersionedInterpretation<T> extends VersionedInterpretation<T> {
17 public UnaryVersionedInterpretation(ModelImpl model, Symbol<T> symbol, VersionedMap<Tuple, T> map) {
18 super(model, symbol, map);
19 }
20
21 private void validateSlot(int slot) {
22 if (slot != 0) {
23 throw new IllegalArgumentException("Invalid index: " + slot);
24 }
25 }
26
27 @Override
28 public Cursor<Tuple, T> getAdjacent(int slot, int node) {
29 validateSlot(slot);
30 var key = Tuple.of(node);
31 var value = get(key);
32 if (Objects.equals(value, getSymbol().defaultValue())) {
33 return Cursors.empty();
34 }
35 return Cursors.singleton(key, value);
36 }
37
38 @Override
39 public int getAdjacentSize(int slot, int node) {
40 validateSlot(slot);
41 var key = Tuple.of(node);
42 var value = get(key);
43 if (Objects.equals(value, getSymbol().defaultValue())) {
44 return 0;
45 }
46 return 1;
47 }
48}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/VersionedInterpretation.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/VersionedInterpretation.java
index 76e3baea..dcf0ad08 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/model/internal/VersionedInterpretation.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/VersionedInterpretation.java
@@ -16,14 +16,14 @@ import tools.refinery.store.tuple.Tuple;
16import java.util.ArrayList; 16import java.util.ArrayList;
17import java.util.List; 17import java.util.List;
18 18
19public class VersionedInterpretation<T> implements Interpretation<T> { 19public abstract class VersionedInterpretation<T> implements Interpretation<T> {
20 private final ModelImpl model; 20 private final ModelImpl model;
21 private final Symbol<T> symbol; 21 private final Symbol<T> symbol;
22 private final VersionedMap<Tuple, T> map; 22 private final VersionedMap<Tuple, T> map;
23 private final List<InterpretationListener<T>> listeners = new ArrayList<>(); 23 private final List<InterpretationListener<T>> listeners = new ArrayList<>();
24 private final List<InterpretationListener<T>> restoreListeners = new ArrayList<>(); 24 private final List<InterpretationListener<T>> restoreListeners = new ArrayList<>();
25 25
26 private VersionedInterpretation(ModelImpl model, Symbol<T> symbol, VersionedMap<Tuple, T> map) { 26 protected VersionedInterpretation(ModelImpl model, Symbol<T> symbol, VersionedMap<Tuple, T> map) {
27 this.model = model; 27 this.model = model;
28 this.symbol = symbol; 28 this.symbol = symbol;
29 this.map = map; 29 this.map = map;
@@ -50,6 +50,7 @@ public class VersionedInterpretation<T> implements Interpretation<T> {
50 .formatted(symbol, symbol.arity())); 50 .formatted(symbol, symbol.arity()));
51 } 51 }
52 } 52 }
53
53 @Override 54 @Override
54 public T get(Tuple key) { 55 public T get(Tuple key) {
55 checkKey(key); 56 checkKey(key);
@@ -61,7 +62,7 @@ public class VersionedInterpretation<T> implements Interpretation<T> {
61 return map.getAll(); 62 return map.getAll();
62 } 63 }
63 64
64 private void notifyListeners(Tuple key, T fromValue, T toValue, boolean restoring) { 65 protected void valueChanged(Tuple key, T fromValue, T toValue, boolean restoring) {
65 var listenerList = restoring ? restoreListeners : listeners; 66 var listenerList = restoring ? restoreListeners : listeners;
66 int listenerCount = listenerList.size(); 67 int listenerCount = listenerList.size();
67 // Use a for loop instead of a for-each loop to avoid <code>Iterator</code> allocation overhead. 68 // Use a for loop instead of a for-each loop to avoid <code>Iterator</code> allocation overhead.
@@ -74,23 +75,21 @@ public class VersionedInterpretation<T> implements Interpretation<T> {
74 @Override 75 @Override
75 public T put(Tuple key, T value) { 76 public T put(Tuple key, T value) {
76 checkKey(key); 77 checkKey(key);
78 model.checkCancelled();
77 model.markAsChanged(); 79 model.markAsChanged();
78 var oldValue = map.put(key, value); 80 var oldValue = map.put(key, value);
79 notifyListeners(key, oldValue, value, false); 81 valueChanged(key, oldValue, value, false);
80 return oldValue; 82 return oldValue;
81 } 83 }
82 84
83 @Override 85 @Override
84 public void putAll(Cursor<Tuple, T> cursor) { 86 public void putAll(Cursor<Tuple, T> cursor) {
85 if (listeners.isEmpty()) {
86 map.putAll(cursor);
87 return;
88 }
89 model.markAsChanged(); 87 model.markAsChanged();
90 if (cursor.getDependingMaps().contains(map)) { 88 if (cursor.getDependingMaps().contains(map)) {
91 List<Tuple> keys = new ArrayList<>(); 89 List<Tuple> keys = new ArrayList<>();
92 List<T> values = new ArrayList<>(); 90 List<T> values = new ArrayList<>();
93 while (cursor.move()) { 91 while (cursor.move()) {
92 model.checkCancelled();
94 keys.add(cursor.getKey()); 93 keys.add(cursor.getKey());
95 values.add(cursor.getValue()); 94 values.add(cursor.getValue());
96 } 95 }
@@ -114,11 +113,16 @@ public class VersionedInterpretation<T> implements Interpretation<T> {
114 Version commit() { 113 Version commit() {
115 return map.commit(); 114 return map.commit();
116 } 115 }
117 void restore(Version state) { 116
118 if (!restoreListeners.isEmpty()) { 117 protected boolean shouldNotifyRestoreListeners() {
118 return !restoreListeners.isEmpty();
119 }
120
121 public void restore(Version state) {
122 if (shouldNotifyRestoreListeners()) {
119 var diffCursor = getDiffCursor(state); 123 var diffCursor = getDiffCursor(state);
120 while (diffCursor.move()) { 124 while (diffCursor.move()) {
121 notifyListeners(diffCursor.getKey(), diffCursor.getFromValue(), diffCursor.getToValue(), true); 125 valueChanged(diffCursor.getKey(), diffCursor.getFromValue(), diffCursor.getToValue(), true);
122 } 126 }
123 } 127 }
124 map.restore(state); 128 map.restore(state);
@@ -142,7 +146,7 @@ public class VersionedInterpretation<T> implements Interpretation<T> {
142 @SuppressWarnings("unchecked") 146 @SuppressWarnings("unchecked")
143 var typedSymbol = (Symbol<T>) symbol; 147 var typedSymbol = (Symbol<T>) symbol;
144 var map = store.createMap(); 148 var map = store.createMap();
145 return new VersionedInterpretation<>(model, typedSymbol, map); 149 return of(model, typedSymbol, map);
146 } 150 }
147 151
148 static <T> VersionedInterpretation<T> of(ModelImpl model, AnySymbol symbol, VersionedMapStore<Tuple, T> store, 152 static <T> VersionedInterpretation<T> of(ModelImpl model, AnySymbol symbol, VersionedMapStore<Tuple, T> store,
@@ -150,6 +154,15 @@ public class VersionedInterpretation<T> implements Interpretation<T> {
150 @SuppressWarnings("unchecked") 154 @SuppressWarnings("unchecked")
151 var typedSymbol = (Symbol<T>) symbol; 155 var typedSymbol = (Symbol<T>) symbol;
152 var map = store.createMap(state); 156 var map = store.createMap(state);
153 return new VersionedInterpretation<>(model, typedSymbol, map); 157 return of(model, typedSymbol, map);
158 }
159
160 private static <T> VersionedInterpretation<T> of(ModelImpl model, Symbol<T> typedSymbol,
161 VersionedMap<Tuple, T> map) {
162 return switch (typedSymbol.arity()) {
163 case 0 -> new NullaryVersionedInterpretation<>(model, typedSymbol, map);
164 case 1 -> new UnaryVersionedInterpretation<>(model, typedSymbol, map);
165 default -> new IndexedVersionedInterpretation<>(model, typedSymbol, map);
166 };
154 } 167 }
155} 168}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java b/subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java
index 52c740e8..dfdb43bd 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/AbstractDomain.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.representation; 6package tools.refinery.store.representation;
7 7
8import java.util.Objects;
8import java.util.Optional; 9import java.util.Optional;
9 10
10public non-sealed interface AbstractDomain<A, C> extends AnyAbstractDomain { 11public non-sealed interface AbstractDomain<A, C> extends AnyAbstractDomain {
@@ -22,7 +23,9 @@ public non-sealed interface AbstractDomain<A, C> extends AnyAbstractDomain {
22 return toConcrete(abstractValue).isPresent(); 23 return toConcrete(abstractValue).isPresent();
23 } 24 }
24 25
25 boolean isRefinement(A originalValue, A refinedValue); 26 default boolean isRefinement(A originalValue, A refinedValue) {
27 return Objects.equals(commonRefinement(originalValue, refinedValue), refinedValue);
28 }
26 29
27 A commonRefinement(A leftValue, A rightValue); 30 A commonRefinement(A leftValue, A rightValue);
28 31
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValue.java b/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValue.java
index 40baf9a5..f81ee9a4 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValue.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValue.java
@@ -36,6 +36,10 @@ public enum TruthValue {
36 return this != UNKNOWN; 36 return this != UNKNOWN;
37 } 37 }
38 38
39 public boolean isConcrete() {
40 return this == TRUE || this == FALSE;
41 }
42
39 public boolean must() { 43 public boolean must() {
40 return this == TRUE || this == ERROR; 44 return this == TRUE || this == ERROR;
41 } 45 }
@@ -55,9 +59,18 @@ public enum TruthValue {
55 public TruthValue merge(TruthValue other) { 59 public TruthValue merge(TruthValue other) {
56 return switch (this) { 60 return switch (this) {
57 case TRUE -> other == UNKNOWN || other == TRUE ? TRUE : ERROR; 61 case TRUE -> other == UNKNOWN || other == TRUE ? TRUE : ERROR;
58 case FALSE -> other == TruthValue.UNKNOWN || other == TruthValue.FALSE ? FALSE : ERROR; 62 case FALSE -> other == UNKNOWN || other == FALSE ? FALSE : ERROR;
59 case UNKNOWN -> other; 63 case UNKNOWN -> other;
60 default -> ERROR; 64 case ERROR -> ERROR;
65 };
66 }
67
68 public TruthValue join(TruthValue other) {
69 return switch (this) {
70 case TRUE -> other == ERROR || other == TRUE ? TRUE : UNKNOWN;
71 case FALSE -> other == ERROR || other == FALSE ? FALSE : UNKNOWN;
72 case UNKNOWN -> UNKNOWN;
73 case ERROR -> other;
61 }; 74 };
62 } 75 }
63} 76}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java b/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java
index 89f8dd19..61696dca 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/TruthValueDomain.java
@@ -7,6 +7,8 @@ package tools.refinery.store.representation;
7 7
8import java.util.Optional; 8import java.util.Optional;
9 9
10// Singleton pattern, because there is only one domain for truth values.
11@SuppressWarnings("squid:S6548")
10public final class TruthValueDomain implements AbstractDomain<TruthValue, Boolean> { 12public final class TruthValueDomain implements AbstractDomain<TruthValue, Boolean> {
11 public static final TruthValueDomain INSTANCE = new TruthValueDomain(); 13 public static final TruthValueDomain INSTANCE = new TruthValueDomain();
12 14
@@ -15,51 +17,50 @@ public final class TruthValueDomain implements AbstractDomain<TruthValue, Boolea
15 17
16 @Override 18 @Override
17 public Class<TruthValue> abstractType() { 19 public Class<TruthValue> abstractType() {
18 return null; 20 return TruthValue.class;
19 } 21 }
20 22
21 @Override 23 @Override
22 public Class<Boolean> concreteType() { 24 public Class<Boolean> concreteType() {
23 return null; 25 return Boolean.class;
24 } 26 }
25 27
26 @Override 28 @Override
27 public TruthValue toAbstract(Boolean concreteValue) { 29 public TruthValue toAbstract(Boolean concreteValue) {
28 return null; 30 return TruthValue.toTruthValue(concreteValue);
29 } 31 }
30 32
31 @Override 33 @Override
32 public Optional<Boolean> toConcrete(TruthValue abstractValue) { 34 public Optional<Boolean> toConcrete(TruthValue abstractValue) {
33 return Optional.empty(); 35 return switch (abstractValue) {
36 case TRUE -> Optional.of(true);
37 case FALSE -> Optional.of(false);
38 default -> Optional.empty();
39 };
34 } 40 }
35 41
36 @Override 42 @Override
37 public boolean isConcrete(TruthValue abstractValue) { 43 public boolean isConcrete(TruthValue abstractValue) {
38 return AbstractDomain.super.isConcrete(abstractValue); 44 return abstractValue.isConcrete();
39 }
40
41 @Override
42 public boolean isRefinement(TruthValue originalValue, TruthValue refinedValue) {
43 return false;
44 } 45 }
45 46
46 @Override 47 @Override
47 public TruthValue commonRefinement(TruthValue leftValue, TruthValue rightValue) { 48 public TruthValue commonRefinement(TruthValue leftValue, TruthValue rightValue) {
48 return null; 49 return leftValue.merge(rightValue);
49 } 50 }
50 51
51 @Override 52 @Override
52 public TruthValue commonAncestor(TruthValue leftValue, TruthValue rightValue) { 53 public TruthValue commonAncestor(TruthValue leftValue, TruthValue rightValue) {
53 return null; 54 return leftValue.join(rightValue);
54 } 55 }
55 56
56 @Override 57 @Override
57 public TruthValue unknown() { 58 public TruthValue unknown() {
58 return null; 59 return TruthValue.UNKNOWN;
59 } 60 }
60 61
61 @Override 62 @Override
62 public boolean isError(TruthValue abstractValue) { 63 public boolean isError(TruthValue abstractValue) {
63 return false; 64 return !abstractValue.isConsistent();
64 } 65 }
65} 66}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityDomain.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityDomain.java
new file mode 100644
index 00000000..7ae2d935
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityDomain.java
@@ -0,0 +1,68 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.representation.cardinality;
7
8import tools.refinery.store.representation.AbstractDomain;
9
10import java.util.Optional;
11
12// Singleton pattern, because there is only one domain for truth values.
13@SuppressWarnings("squid:S6548")
14public class CardinalityDomain implements AbstractDomain<CardinalityInterval, Integer> {
15 public static final CardinalityDomain INSTANCE = new CardinalityDomain();
16
17 private CardinalityDomain() {
18 }
19
20 @Override
21 public Class<CardinalityInterval> abstractType() {
22 return CardinalityInterval.class;
23 }
24
25 @Override
26 public Class<Integer> concreteType() {
27 return Integer.class;
28 }
29
30 @Override
31 public CardinalityInterval toAbstract(Integer concreteValue) {
32 return CardinalityIntervals.exactly(concreteValue);
33 }
34
35 @Override
36 public Optional<Integer> toConcrete(CardinalityInterval abstractValue) {
37 return isConcrete(abstractValue) ? Optional.of(abstractValue.lowerBound()) : Optional.empty();
38 }
39
40 @Override
41 public boolean isConcrete(CardinalityInterval abstractValue) {
42 if (!(abstractValue instanceof NonEmptyCardinalityInterval nonEmptyValue) ||
43 !((nonEmptyValue.upperBound()) instanceof FiniteUpperCardinality finiteUpperCardinality)) {
44 return false;
45 }
46 return nonEmptyValue.lowerBound() == finiteUpperCardinality.finiteUpperBound();
47 }
48
49 @Override
50 public CardinalityInterval commonRefinement(CardinalityInterval leftValue, CardinalityInterval rightValue) {
51 return leftValue.meet(rightValue);
52 }
53
54 @Override
55 public CardinalityInterval commonAncestor(CardinalityInterval leftValue, CardinalityInterval rightValue) {
56 return leftValue.join(rightValue);
57 }
58
59 @Override
60 public CardinalityInterval unknown() {
61 return CardinalityIntervals.SET;
62 }
63
64 @Override
65 public boolean isError(CardinalityInterval abstractValue) {
66 return abstractValue.isEmpty();
67 }
68}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityInterval.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityInterval.java
index 704ca2fc..b20c685a 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityInterval.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityInterval.java
@@ -18,6 +18,8 @@ public sealed interface CardinalityInterval permits NonEmptyCardinalityInterval,
18 18
19 CardinalityInterval add(CardinalityInterval other); 19 CardinalityInterval add(CardinalityInterval other);
20 20
21 CardinalityInterval take(int count);
22
21 CardinalityInterval multiply(CardinalityInterval other); 23 CardinalityInterval multiply(CardinalityInterval other);
22 24
23 CardinalityInterval meet(CardinalityInterval other); 25 CardinalityInterval meet(CardinalityInterval other);
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityIntervals.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityIntervals.java
index ad16a3e8..855fd248 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityIntervals.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/CardinalityIntervals.java
@@ -30,7 +30,7 @@ public final class CardinalityIntervals {
30 } 30 }
31 31
32 public static CardinalityInterval between(int lowerBound, int upperBound) { 32 public static CardinalityInterval between(int lowerBound, int upperBound) {
33 return between(lowerBound, UpperCardinalities.valueOf(upperBound)); 33 return between(lowerBound, UpperCardinalities.atMost(upperBound));
34 } 34 }
35 35
36 public static CardinalityInterval atMost(UpperCardinality upperBound) { 36 public static CardinalityInterval atMost(UpperCardinality upperBound) {
@@ -38,7 +38,7 @@ public final class CardinalityIntervals {
38 } 38 }
39 39
40 public static CardinalityInterval atMost(int upperBound) { 40 public static CardinalityInterval atMost(int upperBound) {
41 return atMost(UpperCardinalities.valueOf(upperBound)); 41 return atMost(UpperCardinalities.atMost(upperBound));
42 } 42 }
43 43
44 public static CardinalityInterval atLeast(int lowerBound) { 44 public static CardinalityInterval atLeast(int lowerBound) {
@@ -46,6 +46,6 @@ public final class CardinalityIntervals {
46 } 46 }
47 47
48 public static CardinalityInterval exactly(int lowerBound) { 48 public static CardinalityInterval exactly(int lowerBound) {
49 return new NonEmptyCardinalityInterval(lowerBound, UpperCardinalities.valueOf(lowerBound)); 49 return new NonEmptyCardinalityInterval(lowerBound, UpperCardinalities.atMost(lowerBound));
50 } 50 }
51} 51}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/EmptyCardinalityInterval.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/EmptyCardinalityInterval.java
index 49911c29..9e371e21 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/EmptyCardinalityInterval.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/EmptyCardinalityInterval.java
@@ -5,6 +5,8 @@
5 */ 5 */
6package tools.refinery.store.representation.cardinality; 6package tools.refinery.store.representation.cardinality;
7 7
8// Singleton implementation, because there is only a single empty interval.
9@SuppressWarnings("squid:S6548")
8public final class EmptyCardinalityInterval implements CardinalityInterval { 10public final class EmptyCardinalityInterval implements CardinalityInterval {
9 static final EmptyCardinalityInterval INSTANCE = new EmptyCardinalityInterval(); 11 static final EmptyCardinalityInterval INSTANCE = new EmptyCardinalityInterval();
10 12
@@ -43,6 +45,11 @@ public final class EmptyCardinalityInterval implements CardinalityInterval {
43 } 45 }
44 46
45 @Override 47 @Override
48 public CardinalityInterval take(int count) {
49 return this;
50 }
51
52 @Override
46 public CardinalityInterval multiply(CardinalityInterval other) { 53 public CardinalityInterval multiply(CardinalityInterval other) {
47 return this; 54 return this;
48 } 55 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinality.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinality.java
index 82afdbbc..b63a8637 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinality.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/FiniteUpperCardinality.java
@@ -6,6 +6,7 @@
6package tools.refinery.store.representation.cardinality; 6package tools.refinery.store.representation.cardinality;
7 7
8import org.jetbrains.annotations.NotNull; 8import org.jetbrains.annotations.NotNull;
9import org.jetbrains.annotations.Nullable;
9 10
10import java.util.function.IntBinaryOperator; 11import java.util.function.IntBinaryOperator;
11 12
@@ -22,6 +23,15 @@ public record FiniteUpperCardinality(int finiteUpperBound) implements UpperCardi
22 } 23 }
23 24
24 @Override 25 @Override
26 @Nullable
27 public UpperCardinality take(int count) {
28 if (finiteUpperBound < count) {
29 return null;
30 }
31 return new FiniteUpperCardinality(finiteUpperBound - count);
32 }
33
34 @Override
25 public UpperCardinality multiply(UpperCardinality other) { 35 public UpperCardinality multiply(UpperCardinality other) {
26 return lift(other, (a, b) -> a * b); 36 return lift(other, (a, b) -> a * b);
27 } 37 }
@@ -49,7 +59,7 @@ public record FiniteUpperCardinality(int finiteUpperBound) implements UpperCardi
49 59
50 private UpperCardinality lift(@NotNull UpperCardinality other, IntBinaryOperator operator) { 60 private UpperCardinality lift(@NotNull UpperCardinality other, IntBinaryOperator operator) {
51 if (other instanceof FiniteUpperCardinality finiteUpperCardinality) { 61 if (other instanceof FiniteUpperCardinality finiteUpperCardinality) {
52 return UpperCardinalities.valueOf(operator.applyAsInt(finiteUpperBound, 62 return UpperCardinalities.atMost(operator.applyAsInt(finiteUpperBound,
53 finiteUpperCardinality.finiteUpperBound)); 63 finiteUpperCardinality.finiteUpperBound));
54 } 64 }
55 if (other instanceof UnboundedUpperCardinality) { 65 if (other instanceof UnboundedUpperCardinality) {
@@ -57,4 +67,17 @@ public record FiniteUpperCardinality(int finiteUpperBound) implements UpperCardi
57 } 67 }
58 throw new IllegalArgumentException("Unknown UpperCardinality: " + other); 68 throw new IllegalArgumentException("Unknown UpperCardinality: " + other);
59 } 69 }
70
71 @Override
72 public boolean equals(Object o) {
73 if (this == o) return true;
74 if (o == null || getClass() != o.getClass()) return false;
75 FiniteUpperCardinality that = (FiniteUpperCardinality) o;
76 return finiteUpperBound == that.finiteUpperBound;
77 }
78
79 @Override
80 public int hashCode() {
81 return finiteUpperBound;
82 }
60} 83}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java
index 38bd53bf..6bd66df7 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/NonEmptyCardinalityInterval.java
@@ -5,6 +5,7 @@
5 */ 5 */
6package tools.refinery.store.representation.cardinality; 6package tools.refinery.store.representation.cardinality;
7 7
8import java.util.Objects;
8import java.util.function.BinaryOperator; 9import java.util.function.BinaryOperator;
9import java.util.function.IntBinaryOperator; 10import java.util.function.IntBinaryOperator;
10 11
@@ -53,6 +54,16 @@ public record NonEmptyCardinalityInterval(int lowerBound, UpperCardinality upper
53 return lift(other, Math::min, UpperCardinality::max, this); 54 return lift(other, Math::min, UpperCardinality::max, this);
54 } 55 }
55 56
57 @Override
58 public CardinalityInterval take(int count) {
59 int newLowerBound = Math.max(lowerBound - count, 0);
60 var newUpperBound = upperBound.take(count);
61 if (newUpperBound == null) {
62 return CardinalityIntervals.ERROR;
63 }
64 return CardinalityIntervals.between(newLowerBound, newUpperBound);
65 }
66
56 private CardinalityInterval lift(CardinalityInterval other, IntBinaryOperator lowerOperator, 67 private CardinalityInterval lift(CardinalityInterval other, IntBinaryOperator lowerOperator,
57 BinaryOperator<UpperCardinality> upperOperator, 68 BinaryOperator<UpperCardinality> upperOperator,
58 CardinalityInterval whenEmpty) { 69 CardinalityInterval whenEmpty) {
@@ -73,7 +84,23 @@ public record NonEmptyCardinalityInterval(int lowerBound, UpperCardinality upper
73 84
74 @Override 85 @Override
75 public String toString() { 86 public String toString() {
76 var closeBracket = upperBound instanceof UnboundedUpperCardinality ? ")" : "]"; 87 if (upperBound instanceof FiniteUpperCardinality finiteUpperCardinality &&
77 return "[%d..%s%s".formatted(lowerBound, upperBound, closeBracket); 88 finiteUpperCardinality.finiteUpperBound() == lowerBound) {
89 return "[%d]".formatted(lowerBound);
90 }
91 return "[%d..%s]".formatted(lowerBound, upperBound);
92 }
93
94 @Override
95 public boolean equals(Object o) {
96 if (this == o) return true;
97 if (o == null || getClass() != o.getClass()) return false;
98 NonEmptyCardinalityInterval that = (NonEmptyCardinalityInterval) o;
99 return lowerBound == that.lowerBound && Objects.equals(upperBound, that.upperBound);
100 }
101
102 @Override
103 public int hashCode() {
104 return lowerBound * 31 + upperBound.hashCode();
78 } 105 }
79} 106}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UnboundedUpperCardinality.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UnboundedUpperCardinality.java
index a5634020..03c701ae 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UnboundedUpperCardinality.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UnboundedUpperCardinality.java
@@ -7,6 +7,8 @@ package tools.refinery.store.representation.cardinality;
7 7
8import org.jetbrains.annotations.NotNull; 8import org.jetbrains.annotations.NotNull;
9 9
10// Singleton implementation, because there is only a single countable infinity.
11@SuppressWarnings("squid:S6548")
10public final class UnboundedUpperCardinality implements UpperCardinality { 12public final class UnboundedUpperCardinality implements UpperCardinality {
11 static final UnboundedUpperCardinality INSTANCE = new UnboundedUpperCardinality(); 13 static final UnboundedUpperCardinality INSTANCE = new UnboundedUpperCardinality();
12 14
@@ -20,10 +22,17 @@ public final class UnboundedUpperCardinality implements UpperCardinality {
20 } 22 }
21 23
22 @Override 24 @Override
25 public UpperCardinality take(int count) {
26 return this;
27 }
28
29 @Override
23 public UpperCardinality multiply(UpperCardinality other) { 30 public UpperCardinality multiply(UpperCardinality other) {
24 return this; 31 return this;
25 } 32 }
26 33
34 // This should always be greater than any finite cardinality.
35 @SuppressWarnings("ComparatorMethodParameterNotUsed")
27 @Override 36 @Override
28 public int compareTo(@NotNull UpperCardinality upperCardinality) { 37 public int compareTo(@NotNull UpperCardinality upperCardinality) {
29 if (upperCardinality instanceof FiniteUpperCardinality) { 38 if (upperCardinality instanceof FiniteUpperCardinality) {
@@ -44,4 +53,14 @@ public final class UnboundedUpperCardinality implements UpperCardinality {
44 public String toString() { 53 public String toString() {
45 return "*"; 54 return "*";
46 } 55 }
56
57 @Override
58 public boolean equals(Object obj) {
59 return this == obj || (obj != null && getClass() == obj.getClass());
60 }
61
62 @Override
63 public int hashCode() {
64 return -1;
65 }
47} 66}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinalities.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinalities.java
index 1e18dde0..17d1b292 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinalities.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinalities.java
@@ -26,7 +26,7 @@ public final class UpperCardinalities {
26 throw new IllegalStateException("This is a static utility class and should not be instantiated directly"); 26 throw new IllegalStateException("This is a static utility class and should not be instantiated directly");
27 } 27 }
28 28
29 public static UpperCardinality valueOf(int upperBound) { 29 public static UpperCardinality atMost(int upperBound) {
30 if (upperBound < 0) { 30 if (upperBound < 0) {
31 return UNBOUNDED; 31 return UNBOUNDED;
32 } 32 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinality.java b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinality.java
index 5dbaa922..3f0db028 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinality.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/representation/cardinality/UpperCardinality.java
@@ -5,6 +5,8 @@
5 */ 5 */
6package tools.refinery.store.representation.cardinality; 6package tools.refinery.store.representation.cardinality;
7 7
8import org.jetbrains.annotations.Nullable;
9
8public sealed interface UpperCardinality extends Comparable<UpperCardinality> permits FiniteUpperCardinality, 10public sealed interface UpperCardinality extends Comparable<UpperCardinality> permits FiniteUpperCardinality,
9 UnboundedUpperCardinality { 11 UnboundedUpperCardinality {
10 default UpperCardinality min(UpperCardinality other) { 12 default UpperCardinality min(UpperCardinality other) {
@@ -17,11 +19,14 @@ public sealed interface UpperCardinality extends Comparable<UpperCardinality> pe
17 19
18 UpperCardinality add(UpperCardinality other); 20 UpperCardinality add(UpperCardinality other);
19 21
22 @Nullable
23 UpperCardinality take(int count);
24
20 UpperCardinality multiply(UpperCardinality other); 25 UpperCardinality multiply(UpperCardinality other);
21 26
22 int compareToInt(int value); 27 int compareToInt(int value);
23 28
24 static UpperCardinality of(int upperBound) { 29 static UpperCardinality of(int upperBound) {
25 return UpperCardinalities.valueOf(upperBound); 30 return UpperCardinalities.atMost(upperBound);
26 } 31 }
27} 32}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCodeCalculatorFactory.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCodeCalculatorFactory.java
index 04e17a13..809205e4 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCodeCalculatorFactory.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCodeCalculatorFactory.java
@@ -7,9 +7,10 @@ package tools.refinery.store.statecoding;
7 7
8import org.eclipse.collections.api.set.primitive.IntSet; 8import org.eclipse.collections.api.set.primitive.IntSet;
9import tools.refinery.store.model.Interpretation; 9import tools.refinery.store.model.Interpretation;
10import tools.refinery.store.model.Model;
10 11
11import java.util.List; 12import java.util.List;
12 13
13public interface StateCodeCalculatorFactory { 14public interface StateCodeCalculatorFactory {
14 StateCodeCalculator create(List<? extends Interpretation<?>> interpretations, IntSet individuals); 15 StateCodeCalculator create(Model model, List<? extends Interpretation<?>> interpretations, IntSet individuals);
15} 16}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderAdapter.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderAdapter.java
index 8cfd24d5..cb73d27e 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderAdapter.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderAdapter.java
@@ -17,7 +17,7 @@ public interface StateCoderAdapter extends ModelAdapter {
17 return calculateStateCode().objectCode(); 17 return calculateStateCode().objectCode();
18 } 18 }
19 19
20 static StateCoderBuilderImpl builder() { 20 static StateCoderBuilder builder() {
21 return new StateCoderBuilderImpl(); 21 return new StateCoderBuilderImpl();
22 } 22 }
23} 23}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateEquivalenceChecker.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateEquivalenceChecker.java
index 3fd8c8d8..0f0023ed 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateEquivalenceChecker.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateEquivalenceChecker.java
@@ -6,7 +6,7 @@
6package tools.refinery.store.statecoding; 6package tools.refinery.store.statecoding;
7 7
8import org.eclipse.collections.api.set.primitive.IntSet; 8import org.eclipse.collections.api.set.primitive.IntSet;
9import tools.refinery.store.model.Interpretation; 9import tools.refinery.store.model.AnyInterpretation;
10 10
11import java.util.List; 11import java.util.List;
12 12
@@ -16,9 +16,6 @@ public interface StateEquivalenceChecker {
16 } 16 }
17 17
18 EquivalenceResult constructMorphism( 18 EquivalenceResult constructMorphism(
19 IntSet individuals, 19 IntSet individuals, List<? extends AnyInterpretation> interpretations1, ObjectCode code1,
20 List<? extends Interpretation<?>> interpretations1, 20 List<? extends AnyInterpretation> interpretations2, ObjectCode code2);
21 ObjectCode code1, List<?
22 extends Interpretation<?>> interpretations2,
23 ObjectCode code2);
24} 21}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderBuilderImpl.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderBuilderImpl.java
index 05b47c52..eed591e7 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderBuilderImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderBuilderImpl.java
@@ -5,61 +5,61 @@
5 */ 5 */
6package tools.refinery.store.statecoding.internal; 6package tools.refinery.store.statecoding.internal;
7 7
8import org.eclipse.collections.impl.set.mutable.primitive.IntHashSet; 8import org.eclipse.collections.api.factory.primitive.IntSets;
9import org.eclipse.collections.api.set.primitive.MutableIntSet;
10import tools.refinery.store.adapter.AbstractModelAdapterBuilder;
9import tools.refinery.store.model.ModelStore; 11import tools.refinery.store.model.ModelStore;
10import tools.refinery.store.model.ModelStoreBuilder;
11import tools.refinery.store.representation.AnySymbol; 12import tools.refinery.store.representation.AnySymbol;
12import tools.refinery.store.representation.Symbol; 13import tools.refinery.store.representation.Symbol;
13import tools.refinery.store.statecoding.*; 14import tools.refinery.store.statecoding.StateCodeCalculatorFactory;
15import tools.refinery.store.statecoding.StateCoderBuilder;
16import tools.refinery.store.statecoding.StateCoderStoreAdapter;
17import tools.refinery.store.statecoding.StateEquivalenceChecker;
14import tools.refinery.store.statecoding.neighbourhood.NeighbourhoodCalculator; 18import tools.refinery.store.statecoding.neighbourhood.NeighbourhoodCalculator;
15import tools.refinery.store.statecoding.stateequivalence.StateEquivalenceCheckerImpl; 19import tools.refinery.store.statecoding.stateequivalence.StateEquivalenceCheckerImpl;
16import tools.refinery.store.tuple.Tuple1; 20import tools.refinery.store.tuple.Tuple1;
17 21
18import java.util.*; 22import java.util.HashSet;
23import java.util.LinkedHashSet;
24import java.util.Set;
19 25
20public class StateCoderBuilderImpl implements StateCoderBuilder { 26public class StateCoderBuilderImpl extends AbstractModelAdapterBuilder<StateCoderStoreAdapter>
21 Set<AnySymbol> excluded = new HashSet<>(); 27 implements StateCoderBuilder {
22 IntHashSet individuals = new IntHashSet(); 28 private final Set<AnySymbol> excluded = new HashSet<>();
23 29 private final MutableIntSet individuals = IntSets.mutable.empty();
24 StateCodeCalculatorFactory calculator = NeighbourhoodCalculator::new; 30 private StateCodeCalculatorFactory calculator = NeighbourhoodCalculator::new;
25 StateEquivalenceChecker checker = new StateEquivalenceCheckerImpl(); 31 private StateEquivalenceChecker checker = new StateEquivalenceCheckerImpl();
26 32
27 @Override 33 @Override
28 public StateCoderBuilder exclude(AnySymbol symbol) { 34 public StateCoderBuilder exclude(AnySymbol symbol) {
35 checkNotConfigured();
29 excluded.add(symbol); 36 excluded.add(symbol);
30 return this; 37 return this;
31 } 38 }
32 39
33 @Override 40 @Override
34 public StateCoderBuilder individual(Tuple1 tuple) { 41 public StateCoderBuilder individual(Tuple1 tuple) {
42 checkNotConfigured();
35 individuals.add(tuple.get(0)); 43 individuals.add(tuple.get(0));
36 return this; 44 return this;
37 } 45 }
38 46
39 @Override 47 @Override
40 public StateCoderBuilder stateEquivalenceChecker(StateEquivalenceChecker stateEquivalenceChecker) { 48 public StateCoderBuilder stateEquivalenceChecker(StateEquivalenceChecker stateEquivalenceChecker) {
49 checkNotConfigured();
41 this.checker = stateEquivalenceChecker; 50 this.checker = stateEquivalenceChecker;
42 return this; 51 return this;
43 } 52 }
44 53
45 @Override 54 @Override
46 public StateCoderBuilder stateCodeCalculatorFactory(StateCodeCalculatorFactory codeCalculatorFactory) { 55 public StateCoderBuilder stateCodeCalculatorFactory(StateCodeCalculatorFactory codeCalculatorFactory) {
56 checkNotConfigured();
47 this.calculator = codeCalculatorFactory; 57 this.calculator = codeCalculatorFactory;
48 return this; 58 return this;
49 } 59 }
50 60
51 @Override 61 @Override
52 public boolean isConfigured() { 62 protected StateCoderStoreAdapter doBuild(ModelStore store) {
53 return true;
54 }
55
56 @Override
57 public void configure(ModelStoreBuilder storeBuilder) {
58 // It does not modify the build process
59 }
60
61 @Override
62 public StateCoderStoreAdapter build(ModelStore store) {
63 Set<Symbol<?>> symbols = new LinkedHashSet<>(); 63 Set<Symbol<?>> symbols = new LinkedHashSet<>();
64 for (AnySymbol symbol : store.getSymbols()) { 64 for (AnySymbol symbol : store.getSymbols()) {
65 if (!excluded.contains(symbol) && (symbol instanceof Symbol<?> typed)) { 65 if (!excluded.contains(symbol) && (symbol instanceof Symbol<?> typed)) {
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderStoreAdapterImpl.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderStoreAdapterImpl.java
index 89586bfb..2cb6f3c1 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderStoreAdapterImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/internal/StateCoderStoreAdapterImpl.java
@@ -68,7 +68,7 @@ public class StateCoderStoreAdapterImpl implements StateCoderStoreAdapter {
68 @Override 68 @Override
69 public StateCoderAdapter createModelAdapter(Model model) { 69 public StateCoderAdapter createModelAdapter(Model model) {
70 var interpretations = symbols.stream().map(model::getInterpretation).toList(); 70 var interpretations = symbols.stream().map(model::getInterpretation).toList();
71 var coder = codeCalculatorFactory.create(interpretations, individuals); 71 var coder = codeCalculatorFactory.create(model, interpretations, individuals);
72 return new StateCoderAdapterImpl(this, coder, model); 72 return new StateCoderAdapterImpl(this, coder, model);
73 } 73 }
74} 74}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/AbstractNeighbourhoodCalculator.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/AbstractNeighbourhoodCalculator.java
index 0a40a19d..4cef6786 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/AbstractNeighbourhoodCalculator.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/AbstractNeighbourhoodCalculator.java
@@ -5,9 +5,12 @@
5 */ 5 */
6package tools.refinery.store.statecoding.neighbourhood; 6package tools.refinery.store.statecoding.neighbourhood;
7 7
8import org.eclipse.collections.api.factory.primitive.IntLongMaps;
9import org.eclipse.collections.api.map.primitive.MutableIntLongMap;
8import org.eclipse.collections.api.set.primitive.IntSet; 10import org.eclipse.collections.api.set.primitive.IntSet;
9import org.eclipse.collections.impl.map.mutable.primitive.IntLongHashMap; 11import tools.refinery.store.model.AnyInterpretation;
10import tools.refinery.store.model.Interpretation; 12import tools.refinery.store.model.Interpretation;
13import tools.refinery.store.model.Model;
11import tools.refinery.store.statecoding.ObjectCode; 14import tools.refinery.store.statecoding.ObjectCode;
12import tools.refinery.store.tuple.Tuple; 15import tools.refinery.store.tuple.Tuple;
13import tools.refinery.store.tuple.Tuple0; 16import tools.refinery.store.tuple.Tuple0;
@@ -15,25 +18,28 @@ import tools.refinery.store.tuple.Tuple0;
15import java.util.*; 18import java.util.*;
16 19
17public abstract class AbstractNeighbourhoodCalculator { 20public abstract class AbstractNeighbourhoodCalculator {
18 protected final List<Interpretation<?>> nullImpactValues; 21 protected final Model model;
19 protected final LinkedHashMap<Interpretation<?>, long[]> impactValues; 22 protected final List<AnyInterpretation> nullImpactValues;
20 protected final IntLongHashMap individualHashValues; 23 protected final LinkedHashMap<AnyInterpretation, long[]> impactValues;
24 protected final MutableIntLongMap individualHashValues = IntLongMaps.mutable.empty();
21 25
22 protected static final long PRIME = 31; 26 protected static final long PRIME = 31;
23 27
24 protected AbstractNeighbourhoodCalculator(List<? extends Interpretation<?>> interpretations, IntSet individuals) { 28 protected AbstractNeighbourhoodCalculator(Model model, List<? extends AnyInterpretation> interpretations,
29 IntSet individuals) {
30 this.model = model;
25 this.nullImpactValues = new ArrayList<>(); 31 this.nullImpactValues = new ArrayList<>();
26 this.impactValues = new LinkedHashMap<>(); 32 this.impactValues = new LinkedHashMap<>();
33 // Random isn't used for cryptographical purposes but just to assign distinguishable identifiers to symbols.
27 @SuppressWarnings("squid:S2245") 34 @SuppressWarnings("squid:S2245")
28 Random random = new Random(1); 35 Random random = new Random(1);
29 36
30 individualHashValues = new IntLongHashMap();
31 var individualsInOrder = individuals.toSortedList(Integer::compare); 37 var individualsInOrder = individuals.toSortedList(Integer::compare);
32 for(int i = 0; i<individualsInOrder.size(); i++) { 38 for(int i = 0; i<individualsInOrder.size(); i++) {
33 individualHashValues.put(individualsInOrder.get(i), random.nextLong()); 39 individualHashValues.put(individualsInOrder.get(i), random.nextLong());
34 } 40 }
35 41
36 for (Interpretation<?> interpretation : interpretations) { 42 for (AnyInterpretation interpretation : interpretations) {
37 int arity = interpretation.getSymbol().arity(); 43 int arity = interpretation.getSymbol().arity();
38 if (arity == 0) { 44 if (arity == 0) {
39 nullImpactValues.add(interpretation); 45 nullImpactValues.add(interpretation);
@@ -86,7 +92,7 @@ public abstract class AbstractNeighbourhoodCalculator {
86 protected long calculateModelCode(long lastSum) { 92 protected long calculateModelCode(long lastSum) {
87 long result = 0; 93 long result = 0;
88 for (var nullImpactValue : nullImpactValues) { 94 for (var nullImpactValue : nullImpactValues) {
89 result = result * PRIME + Objects.hashCode(nullImpactValue.get(Tuple0.INSTANCE)); 95 result = result * PRIME + Objects.hashCode(((Interpretation<?>) nullImpactValue).get(Tuple0.INSTANCE));
90 } 96 }
91 result += lastSum; 97 result += lastSum;
92 return result; 98 return result;
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/LazyNeighbourhoodCalculator.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/LazyNeighbourhoodCalculator.java
index 2ffbef5e..04335141 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/LazyNeighbourhoodCalculator.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/LazyNeighbourhoodCalculator.java
@@ -5,11 +5,14 @@
5 */ 5 */
6package tools.refinery.store.statecoding.neighbourhood; 6package tools.refinery.store.statecoding.neighbourhood;
7 7
8import org.eclipse.collections.api.factory.primitive.LongIntMaps;
8import org.eclipse.collections.api.map.primitive.LongIntMap; 9import org.eclipse.collections.api.map.primitive.LongIntMap;
10import org.eclipse.collections.api.map.primitive.MutableLongIntMap;
9import org.eclipse.collections.api.set.primitive.IntSet; 11import org.eclipse.collections.api.set.primitive.IntSet;
10import org.eclipse.collections.impl.map.mutable.primitive.LongIntHashMap;
11import tools.refinery.store.map.Cursor; 12import tools.refinery.store.map.Cursor;
13import tools.refinery.store.model.AnyInterpretation;
12import tools.refinery.store.model.Interpretation; 14import tools.refinery.store.model.Interpretation;
15import tools.refinery.store.model.Model;
13import tools.refinery.store.statecoding.StateCodeCalculator; 16import tools.refinery.store.statecoding.StateCodeCalculator;
14import tools.refinery.store.statecoding.StateCoderResult; 17import tools.refinery.store.statecoding.StateCoderResult;
15import tools.refinery.store.tuple.Tuple; 18import tools.refinery.store.tuple.Tuple;
@@ -17,13 +20,14 @@ import tools.refinery.store.tuple.Tuple;
17import java.util.List; 20import java.util.List;
18 21
19public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator implements StateCodeCalculator { 22public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator implements StateCodeCalculator {
20 public LazyNeighbourhoodCalculator(List<? extends Interpretation<?>> interpretations, IntSet individuals) { 23 public LazyNeighbourhoodCalculator(Model model, List<? extends AnyInterpretation> interpretations,
21 super(interpretations, individuals); 24 IntSet individuals) {
25 super(model, interpretations, individuals);
22 } 26 }
23 27
24 public StateCoderResult calculateCodes() { 28 public StateCoderResult calculateCodes() {
25 ObjectCodeImpl previousObjectCode = new ObjectCodeImpl(); 29 ObjectCodeImpl previousObjectCode = new ObjectCodeImpl();
26 LongIntHashMap prevHash2Amount = new LongIntHashMap(); 30 MutableLongIntMap prevHash2Amount = LongIntMaps.mutable.empty();
27 31
28 long lastSum; 32 long lastSum;
29 // All hash code is 0, except to the individuals. 33 // All hash code is 0, except to the individuals.
@@ -42,7 +46,7 @@ public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator
42 } 46 }
43 constructNextObjectCodes(previousObjectCode, nextObjectCode, prevHash2Amount); 47 constructNextObjectCodes(previousObjectCode, nextObjectCode, prevHash2Amount);
44 48
45 LongIntHashMap nextHash2Amount = new LongIntHashMap(); 49 MutableLongIntMap nextHash2Amount = LongIntMaps.mutable.empty();
46 lastSum = calculateLastSum(previousObjectCode, nextObjectCode, prevHash2Amount, nextHash2Amount); 50 lastSum = calculateLastSum(previousObjectCode, nextObjectCode, prevHash2Amount, nextHash2Amount);
47 51
48 int nextSize = nextHash2Amount.size(); 52 int nextSize = nextHash2Amount.size();
@@ -60,7 +64,7 @@ public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator
60 } 64 }
61 65
62 private long calculateLastSum(ObjectCodeImpl previous, ObjectCodeImpl next, LongIntMap hash2Amount, 66 private long calculateLastSum(ObjectCodeImpl previous, ObjectCodeImpl next, LongIntMap hash2Amount,
63 LongIntHashMap nextHash2Amount) { 67 MutableLongIntMap nextHash2Amount) {
64 long lastSum = 0; 68 long lastSum = 0;
65 for (int i = 0; i < next.getSize(); i++) { 69 for (int i = 0; i < next.getSize(); i++) {
66 final long hash; 70 final long hash;
@@ -84,7 +88,7 @@ public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator
84 88
85 private void constructNextObjectCodes(ObjectCodeImpl previous, ObjectCodeImpl next, LongIntMap hash2Amount) { 89 private void constructNextObjectCodes(ObjectCodeImpl previous, ObjectCodeImpl next, LongIntMap hash2Amount) {
86 for (var impactValueEntry : this.impactValues.entrySet()) { 90 for (var impactValueEntry : this.impactValues.entrySet()) {
87 Interpretation<?> interpretation = impactValueEntry.getKey(); 91 Interpretation<?> interpretation = (Interpretation<?>) impactValueEntry.getKey();
88 var cursor = interpretation.getAll(); 92 var cursor = interpretation.getAll();
89 int arity = interpretation.getSymbol().arity(); 93 int arity = interpretation.getSymbol().arity();
90 long[] impactValue = impactValueEntry.getValue(); 94 long[] impactValue = impactValueEntry.getValue();
@@ -114,7 +118,8 @@ public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator
114 return amount == 1; 118 return amount == 1;
115 } 119 }
116 120
117 private void lazyImpactCalculation1(LongIntMap hash2Amount, ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues, Cursor<Tuple, ?> cursor) { 121 private void lazyImpactCalculation1(LongIntMap hash2Amount, ObjectCodeImpl previous, ObjectCodeImpl next,
122 long[] impactValues, Cursor<Tuple, ?> cursor) {
118 123
119 Tuple tuple = cursor.getKey(); 124 Tuple tuple = cursor.getKey();
120 int o = tuple.get(0); 125 int o = tuple.get(0);
@@ -129,7 +134,8 @@ public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator
129 } 134 }
130 } 135 }
131 136
132 private void lazyImpactCalculation2(LongIntMap hash2Amount, ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues, Cursor<Tuple, ?> cursor) { 137 private void lazyImpactCalculation2(LongIntMap hash2Amount, ObjectCodeImpl previous, ObjectCodeImpl next,
138 long[] impactValues, Cursor<Tuple, ?> cursor) {
133 final Tuple tuple = cursor.getKey(); 139 final Tuple tuple = cursor.getKey();
134 final int o1 = tuple.get(0); 140 final int o1 = tuple.get(0);
135 final int o2 = tuple.get(1); 141 final int o2 = tuple.get(1);
@@ -155,7 +161,8 @@ public class LazyNeighbourhoodCalculator extends AbstractNeighbourhoodCalculator
155 } 161 }
156 } 162 }
157 163
158 private void lazyImpactCalculationN(LongIntMap hash2Amount, ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues, Cursor<Tuple, ?> cursor) { 164 private void lazyImpactCalculationN(LongIntMap hash2Amount, ObjectCodeImpl previous, ObjectCodeImpl next,
165 long[] impactValues, Cursor<Tuple, ?> cursor) {
159 final Tuple tuple = cursor.getKey(); 166 final Tuple tuple = cursor.getKey();
160 167
161 final boolean[] uniques = new boolean[tuple.getSize()]; 168 final boolean[] uniques = new boolean[tuple.getSize()];
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/NeighbourhoodCalculator.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/NeighbourhoodCalculator.java
index 5b3e5ea3..5e6de53b 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/NeighbourhoodCalculator.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/NeighbourhoodCalculator.java
@@ -8,6 +8,7 @@ package tools.refinery.store.statecoding.neighbourhood;
8import org.eclipse.collections.api.set.primitive.IntSet; 8import org.eclipse.collections.api.set.primitive.IntSet;
9import tools.refinery.store.map.Cursor; 9import tools.refinery.store.map.Cursor;
10import tools.refinery.store.model.Interpretation; 10import tools.refinery.store.model.Interpretation;
11import tools.refinery.store.model.Model;
11import tools.refinery.store.statecoding.ObjectCode; 12import tools.refinery.store.statecoding.ObjectCode;
12import tools.refinery.store.statecoding.StateCodeCalculator; 13import tools.refinery.store.statecoding.StateCodeCalculator;
13import tools.refinery.store.statecoding.StateCoderResult; 14import tools.refinery.store.statecoding.StateCoderResult;
@@ -18,21 +19,27 @@ import java.util.List;
18import java.util.Objects; 19import java.util.Objects;
19 20
20public class NeighbourhoodCalculator extends AbstractNeighbourhoodCalculator implements StateCodeCalculator { 21public class NeighbourhoodCalculator extends AbstractNeighbourhoodCalculator implements StateCodeCalculator {
21 public NeighbourhoodCalculator(List<? extends Interpretation<?>> interpretations, IntSet individuals) { 22 private ObjectCodeImpl previousObjectCode = new ObjectCodeImpl();
22 super(interpretations, individuals); 23 private ObjectCodeImpl nextObjectCode = new ObjectCodeImpl();
24
25 public NeighbourhoodCalculator(Model model, List<? extends Interpretation<?>> interpretations, IntSet individuals) {
26 super(model, interpretations, individuals);
23 } 27 }
24 28
25 public StateCoderResult calculateCodes() { 29 public StateCoderResult calculateCodes() {
26 ObjectCodeImpl previousObjectCode = new ObjectCodeImpl(); 30 model.checkCancelled();
31 previousObjectCode.clear();
32 nextObjectCode.clear();
27 initializeWithIndividuals(previousObjectCode); 33 initializeWithIndividuals(previousObjectCode);
28 34
29 int rounds = 0; 35 int rounds = 0;
30 do { 36 do {
31 final ObjectCodeImpl nextObjectCode = rounds == 0 ? new ObjectCodeImpl() : 37 model.checkCancelled();
32 new ObjectCodeImpl(previousObjectCode.getSize());
33
34 constructNextObjectCodes(previousObjectCode, nextObjectCode); 38 constructNextObjectCodes(previousObjectCode, nextObjectCode);
39 var tempObjectCode = previousObjectCode;
35 previousObjectCode = nextObjectCode; 40 previousObjectCode = nextObjectCode;
41 nextObjectCode = tempObjectCode;
42 nextObjectCode.clear();
36 rounds++; 43 rounds++;
37 } while (rounds <= 7 && rounds <= previousObjectCode.getEffectiveSize()); 44 } while (rounds <= 7 && rounds <= previousObjectCode.getEffectiveSize());
38 45
@@ -43,7 +50,7 @@ public class NeighbourhoodCalculator extends AbstractNeighbourhoodCalculator imp
43 private long calculateLastSum(ObjectCode codes) { 50 private long calculateLastSum(ObjectCode codes) {
44 long result = 0; 51 long result = 0;
45 for (var nullImpactValue : nullImpactValues) { 52 for (var nullImpactValue : nullImpactValues) {
46 result = result * 31 + Objects.hashCode(nullImpactValue.get(Tuple0.INSTANCE)); 53 result = result * PRIME + Objects.hashCode(((Interpretation<?>) nullImpactValue).get(Tuple0.INSTANCE));
47 } 54 }
48 55
49 for (int i = 0; i < codes.getSize(); i++) { 56 for (int i = 0; i < codes.getSize(); i++) {
@@ -56,7 +63,8 @@ public class NeighbourhoodCalculator extends AbstractNeighbourhoodCalculator imp
56 63
57 private void constructNextObjectCodes(ObjectCodeImpl previous, ObjectCodeImpl next) { 64 private void constructNextObjectCodes(ObjectCodeImpl previous, ObjectCodeImpl next) {
58 for (var impactValueEntry : this.impactValues.entrySet()) { 65 for (var impactValueEntry : this.impactValues.entrySet()) {
59 Interpretation<?> interpretation = impactValueEntry.getKey(); 66 model.checkCancelled();
67 Interpretation<?> interpretation = (Interpretation<?>) impactValueEntry.getKey();
60 var cursor = interpretation.getAll(); 68 var cursor = interpretation.getAll();
61 int arity = interpretation.getSymbol().arity(); 69 int arity = interpretation.getSymbol().arity();
62 long[] impactValue = impactValueEntry.getValue(); 70 long[] impactValue = impactValueEntry.getValue();
@@ -78,7 +86,8 @@ public class NeighbourhoodCalculator extends AbstractNeighbourhoodCalculator imp
78 } 86 }
79 87
80 88
81 private void impactCalculation1(ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues, Cursor<Tuple, ?> cursor) { 89 private void impactCalculation1(ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues,
90 Cursor<Tuple, ?> cursor) {
82 91
83 Tuple tuple = cursor.getKey(); 92 Tuple tuple = cursor.getKey();
84 int o = tuple.get(0); 93 int o = tuple.get(0);
@@ -87,7 +96,8 @@ public class NeighbourhoodCalculator extends AbstractNeighbourhoodCalculator imp
87 addHash(next, o, impactValues[0], tupleHash); 96 addHash(next, o, impactValues[0], tupleHash);
88 } 97 }
89 98
90 private void impactCalculation2(ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues, Cursor<Tuple, ?> cursor) { 99 private void impactCalculation2(ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues,
100 Cursor<Tuple, ?> cursor) {
91 final Tuple tuple = cursor.getKey(); 101 final Tuple tuple = cursor.getKey();
92 final int o1 = tuple.get(0); 102 final int o1 = tuple.get(0);
93 final int o2 = tuple.get(1); 103 final int o2 = tuple.get(1);
@@ -99,7 +109,8 @@ public class NeighbourhoodCalculator extends AbstractNeighbourhoodCalculator imp
99 addHash(next, o2, impactValues[1], tupleHash); 109 addHash(next, o2, impactValues[1], tupleHash);
100 } 110 }
101 111
102 private void impactCalculationN(ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues, Cursor<Tuple, ?> cursor) { 112 private void impactCalculationN(ObjectCodeImpl previous, ObjectCodeImpl next, long[] impactValues,
113 Cursor<Tuple, ?> cursor) {
103 final Tuple tuple = cursor.getKey(); 114 final Tuple tuple = cursor.getKey();
104 115
105 Object value = cursor.getValue(); 116 Object value = cursor.getValue();
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/ObjectCodeImpl.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/ObjectCodeImpl.java
index 0cd7ff58..422e1d73 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/ObjectCodeImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/neighbourhood/ObjectCodeImpl.java
@@ -32,6 +32,13 @@ public class ObjectCodeImpl implements ObjectCode {
32 effectiveSize = copy.effectiveSize; 32 effectiveSize = copy.effectiveSize;
33 } 33 }
34 34
35 public void clear() {
36 effectiveSize = 0;
37 for (int i = 0; i < size; i++) {
38 vector[i] = 0;
39 }
40 }
41
35 public void ensureSize(int object) { 42 public void ensureSize(int object) {
36 if (object >= size) { 43 if (object >= size) {
37 size = object + 1; 44 size = object + 1;
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairing.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairing.java
index decff1d5..0682e1a4 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairing.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairing.java
@@ -8,18 +8,14 @@ package tools.refinery.store.statecoding.stateequivalence;
8import org.eclipse.collections.api.factory.primitive.IntIntMaps; 8import org.eclipse.collections.api.factory.primitive.IntIntMaps;
9import org.eclipse.collections.api.map.primitive.IntIntMap; 9import org.eclipse.collections.api.map.primitive.IntIntMap;
10import org.eclipse.collections.api.set.primitive.IntSet; 10import org.eclipse.collections.api.set.primitive.IntSet;
11import org.eclipse.collections.impl.list.Interval;
12import org.eclipse.collections.impl.set.mutable.primitive.IntHashSet;
13 11
14import java.util.ArrayList; 12import java.util.*;
15import java.util.Arrays;
16import java.util.List;
17 13
18public class CombinationNodePairing implements NodePairing { 14public class CombinationNodePairing implements NodePairing {
19 private final int[] left; 15 private final int[] left;
20 private final int[] right; 16 private final int[] right;
21 17
22 CombinationNodePairing(IntSet left, IntHashSet right) { 18 CombinationNodePairing(IntSet left, IntSet right) {
23 this.left = left.toArray(); 19 this.left = left.toArray();
24 this.right = right.toArray(); 20 this.right = right.toArray();
25 21
@@ -32,59 +28,33 @@ public class CombinationNodePairing implements NodePairing {
32 return left.length; 28 return left.length;
33 } 29 }
34 30
35 static final int LIMIT = 5; 31 private static final int LIMIT = 5;
36 static final List<List<int[]>> permutations = new ArrayList<>(); 32 // Enum-based singleton used to delay generating all permutations until they are first needed.
37 33 @SuppressWarnings("squid:S6548")
38 /** 34 private enum PermutationsHolder {
39 * Generates and stores permutations up to a given size. If the number would be more than a limit, it provides a 35 INSTANCE;
40 * single permutation only. 36
41 * 37 final CombinationNodePairingPermutations permutations = new CombinationNodePairingPermutations(LIMIT);
42 * @param max The max number in the permutation
43 * @return A complete list of permutations of numbers 0...max, or a single permutation.
44 */
45 public static List<int[]> getPermutations(int max) {
46 if (max < permutations.size()) {
47 return permutations.get(max);
48 }
49 if (max == 0) {
50 List<int[]> result = new ArrayList<>();
51 result.add(new int[1]);
52 permutations.add(result);
53 return result;
54 }
55 List<int[]> result = new ArrayList<>();
56 List<int[]> previousPermutations = getPermutations(max - 1);
57 for (var permutation : previousPermutations) {
58 for (int pos = 0; pos <= max; pos++) {
59 int[] newPermutation = new int[max + 1];
60 System.arraycopy(permutation, 0, newPermutation, 0, pos);
61 newPermutation[pos] = max;
62 if (max - (pos + 1) >= 0)
63 System.arraycopy(permutation, pos + 1, newPermutation, pos + 1 + 1, max - (pos + 1));
64 result.add(newPermutation);
65 }
66 }
67 permutations.add(result);
68 return result;
69 } 38 }
70 39
71 @Override 40 @Override
72 public List<IntIntMap> permutations() { 41 public List<IntIntMap> permutations() {
73 final var interval = Interval.zeroTo(this.size() - 1); 42 int limit = this.size();
43 Iterable<Integer> interval = () -> new IntervalIterator(limit);
74 44
75 if (isComplete()) { 45 if (isComplete()) {
76 final List<int[]> p = getPermutations(this.size() - 1); 46 final List<int[]> p = PermutationsHolder.INSTANCE.permutations.getPermutations(this.size() - 1);
77 return p.stream().map(x -> constructPermutationMap(interval, x)).toList(); 47 return p.stream().map(x -> constructPermutationMap(interval, x)).toList();
78 } else { 48 } else {
79 return List.of(constructTrivialMap(interval)); 49 return List.of(constructTrivialMap(interval));
80 } 50 }
81 } 51 }
82 52
83 private IntIntMap constructTrivialMap(Interval interval) { 53 private IntIntMap constructTrivialMap(Iterable<Integer> interval) {
84 return IntIntMaps.immutable.from(interval, l -> left[l], r -> right[r]); 54 return IntIntMaps.immutable.from(interval, l -> left[l], r -> right[r]);
85 } 55 }
86 56
87 private IntIntMap constructPermutationMap(Interval interval, int[] permutation) { 57 private IntIntMap constructPermutationMap(Iterable<Integer> interval, int[] permutation) {
88 return IntIntMaps.immutable.from(interval, l -> left[l], r -> right[permutation[r]]); 58 return IntIntMaps.immutable.from(interval, l -> left[l], r -> right[permutation[r]]);
89 } 59 }
90 60
@@ -92,4 +62,28 @@ public class CombinationNodePairing implements NodePairing {
92 public boolean isComplete() { 62 public boolean isComplete() {
93 return this.size() <= LIMIT; 63 return this.size() <= LIMIT;
94 } 64 }
65
66 private static class IntervalIterator implements Iterator<Integer> {
67 private final int limit;
68 private int value = 0;
69
70 private IntervalIterator(int max) {
71 this.limit = max;
72 }
73
74 @Override
75 public boolean hasNext() {
76 return value < limit;
77 }
78
79 @Override
80 public Integer next() {
81 if (value >= limit) {
82 throw new NoSuchElementException("End of interval");
83 }
84 int next = value;
85 value++;
86 return next;
87 }
88 }
95} 89}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairingPermutations.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairingPermutations.java
new file mode 100644
index 00000000..eacd3a2a
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/CombinationNodePairingPermutations.java
@@ -0,0 +1,57 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.statecoding.stateequivalence;
7
8import java.util.ArrayList;
9import java.util.List;
10
11class CombinationNodePairingPermutations {
12 private final List<List<int[]>> permutations = new ArrayList<>();
13
14 public CombinationNodePairingPermutations(int max) {
15 initializePermutations(max);
16 }
17
18 public List<int[]> getPermutations(int max) {
19 if (max >= permutations.size()) {
20 throw new IllegalArgumentException("Only permutations up to %d elements are supported".formatted(max));
21 }
22 return permutations.get(max);
23 }
24
25 /**
26 * Generates and stores permutations up to a given size. If the number would be more than a limit, it provides a
27 * single permutation only.
28 *
29 * @param max The max number in the permutation
30 * @return A complete list of permutations of numbers 0...max, or a single permutation.
31 */
32 private List<int[]> initializePermutations(int max) {
33 if (max < permutations.size()) {
34 return permutations.get(max);
35 }
36 if (max == 0) {
37 List<int[]> result = new ArrayList<>();
38 result.add(new int[1]);
39 permutations.add(result);
40 return result;
41 }
42 List<int[]> result = new ArrayList<>();
43 List<int[]> previousPermutations = initializePermutations(max - 1);
44 for (var permutation : previousPermutations) {
45 for (int pos = 0; pos <= max; pos++) {
46 int[] newPermutation = new int[max + 1];
47 System.arraycopy(permutation, 0, newPermutation, 0, pos);
48 newPermutation[pos] = max;
49 if (max - (pos + 1) >= 0)
50 System.arraycopy(permutation, pos + 1, newPermutation, pos + 1 + 1, max - (pos + 1));
51 result.add(newPermutation);
52 }
53 }
54 permutations.add(result);
55 return result;
56 }
57}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/NodePairing.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/NodePairing.java
index 7e5db7a3..f45f0d2e 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/NodePairing.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/NodePairing.java
@@ -6,18 +6,18 @@
6package tools.refinery.store.statecoding.stateequivalence; 6package tools.refinery.store.statecoding.stateequivalence;
7 7
8import org.eclipse.collections.api.map.primitive.IntIntMap; 8import org.eclipse.collections.api.map.primitive.IntIntMap;
9import org.eclipse.collections.impl.set.mutable.primitive.IntHashSet; 9import org.eclipse.collections.api.set.primitive.IntSet;
10 10
11import java.util.List; 11import java.util.List;
12 12
13public interface NodePairing { 13public interface NodePairing {
14
15 int size(); 14 int size();
15
16 List<IntIntMap> permutations(); 16 List<IntIntMap> permutations();
17 17
18 boolean isComplete(); 18 boolean isComplete();
19 19
20 static NodePairing constructNodePairing(IntHashSet left, IntHashSet right){ 20 static NodePairing constructNodePairing(IntSet left, IntSet right){
21 if(left.size() != right.size()) { 21 if(left.size() != right.size()) {
22 return null; 22 return null;
23 } 23 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/PermutationMorphism.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/PermutationMorphism.java
index 6be0f3e7..bc4d723a 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/PermutationMorphism.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/PermutationMorphism.java
@@ -12,12 +12,12 @@ import java.util.List;
12 12
13public class PermutationMorphism implements Morphism { 13public class PermutationMorphism implements Morphism {
14 private final IntIntMap object2PermutationGroup; 14 private final IntIntMap object2PermutationGroup;
15 private final List<List<IntIntMap>> permutationsGroups; 15 private final List<? extends List<? extends IntIntMap>> permutationsGroups;
16 private final int[] selection; 16 private final int[] selection;
17 private boolean hasNext; 17 private boolean hasNext;
18 18
19 PermutationMorphism(IntIntMap object2PermutationGroup, 19 PermutationMorphism(IntIntMap object2PermutationGroup,
20 List<List<IntIntMap>> permutationsGroups) { 20 List<? extends List<? extends IntIntMap>> permutationsGroups) {
21 this.object2PermutationGroup = object2PermutationGroup; 21 this.object2PermutationGroup = object2PermutationGroup;
22 this.permutationsGroups = permutationsGroups; 22 this.permutationsGroups = permutationsGroups;
23 23
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/StateEquivalenceCheckerImpl.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/StateEquivalenceCheckerImpl.java
index ef0d76a7..5a62d8a0 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/StateEquivalenceCheckerImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/stateequivalence/StateEquivalenceCheckerImpl.java
@@ -6,11 +6,14 @@
6package tools.refinery.store.statecoding.stateequivalence; 6package tools.refinery.store.statecoding.stateequivalence;
7 7
8import org.eclipse.collections.api.factory.primitive.IntIntMaps; 8import org.eclipse.collections.api.factory.primitive.IntIntMaps;
9import org.eclipse.collections.api.factory.primitive.IntSets;
10import org.eclipse.collections.api.factory.primitive.LongObjectMaps;
9import org.eclipse.collections.api.map.primitive.IntIntMap; 11import org.eclipse.collections.api.map.primitive.IntIntMap;
12import org.eclipse.collections.api.map.primitive.MutableIntIntMap;
13import org.eclipse.collections.api.map.primitive.MutableLongObjectMap;
10import org.eclipse.collections.api.set.primitive.IntSet; 14import org.eclipse.collections.api.set.primitive.IntSet;
11import org.eclipse.collections.impl.map.mutable.primitive.IntIntHashMap; 15import org.eclipse.collections.api.set.primitive.MutableIntSet;
12import org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap; 16import tools.refinery.store.model.AnyInterpretation;
13import org.eclipse.collections.impl.set.mutable.primitive.IntHashSet;
14import tools.refinery.store.model.Interpretation; 17import tools.refinery.store.model.Interpretation;
15import tools.refinery.store.statecoding.Morphism; 18import tools.refinery.store.statecoding.Morphism;
16import tools.refinery.store.statecoding.ObjectCode; 19import tools.refinery.store.statecoding.ObjectCode;
@@ -26,12 +29,11 @@ public class StateEquivalenceCheckerImpl implements StateEquivalenceChecker {
26 29
27 @Override 30 @Override
28 public EquivalenceResult constructMorphism(IntSet individuals, 31 public EquivalenceResult constructMorphism(IntSet individuals,
29 List<? extends Interpretation<?>> interpretations1, 32 List<? extends AnyInterpretation> interpretations1,
30 ObjectCode code1, 33 ObjectCode code1,
31 List<? extends Interpretation<?>> interpretations2, 34 List<? extends AnyInterpretation> interpretations2,
32 ObjectCode code2) 35 ObjectCode code2) {
33 { 36 MutableIntIntMap object2PermutationGroup = IntIntMaps.mutable.empty();
34 IntIntHashMap object2PermutationGroup = new IntIntHashMap();
35 List<List<IntIntMap>> permutationsGroups = new ArrayList<>(); 37 List<List<IntIntMap>> permutationsGroups = new ArrayList<>();
36 38
37 final EquivalenceResult permutations = constructPermutationNavigation(individuals, 39 final EquivalenceResult permutations = constructPermutationNavigation(individuals,
@@ -50,7 +52,7 @@ public class StateEquivalenceCheckerImpl implements StateEquivalenceChecker {
50 return permutations; 52 return permutations;
51 } 53 }
52 54
53 if(tried >= LIMIT) { 55 if (tried >= LIMIT) {
54 return EquivalenceResult.UNKNOWN; 56 return EquivalenceResult.UNKNOWN;
55 } 57 }
56 58
@@ -58,22 +60,22 @@ public class StateEquivalenceCheckerImpl implements StateEquivalenceChecker {
58 tried++; 60 tried++;
59 } while (hasNext); 61 } while (hasNext);
60 62
61 if(permutations == EquivalenceResult.UNKNOWN) { 63 if (permutations == EquivalenceResult.UNKNOWN) {
62 return EquivalenceResult.UNKNOWN; 64 return EquivalenceResult.UNKNOWN;
63 } else { 65 } else {
64 return EquivalenceResult.DIFFERENT; 66 return EquivalenceResult.DIFFERENT;
65 } 67 }
66 } 68 }
67 69
68 private LongObjectHashMap<IntHashSet> indexByHash(ObjectCode code, IntSet individuals) { 70 private MutableLongObjectMap<MutableIntSet> indexByHash(ObjectCode code, IntSet individuals) {
69 LongObjectHashMap<IntHashSet> result = new LongObjectHashMap<>(); 71 MutableLongObjectMap<MutableIntSet> result = LongObjectMaps.mutable.empty();
70 for (int o = 0; o < code.getSize(); o++) { 72 for (int o = 0; o < code.getSize(); o++) {
71 if(! individuals.contains(o)){ 73 if (!individuals.contains(o)) {
72 long hash = code.get(o); 74 long hash = code.get(o);
73 if(hash != 0) { 75 if (hash != 0) {
74 var equivalenceClass = result.get(hash); 76 var equivalenceClass = result.get(hash);
75 if (equivalenceClass == null) { 77 if (equivalenceClass == null) {
76 equivalenceClass = new IntHashSet(); 78 equivalenceClass = IntSets.mutable.empty();
77 result.put(hash, equivalenceClass); 79 result.put(hash, equivalenceClass);
78 } 80 }
79 equivalenceClass.add(o); 81 equivalenceClass.add(o);
@@ -83,11 +85,9 @@ public class StateEquivalenceCheckerImpl implements StateEquivalenceChecker {
83 return result; 85 return result;
84 } 86 }
85 87
86 private EquivalenceResult constructPermutationNavigation(IntSet individuals, 88 private EquivalenceResult constructPermutationNavigation(
87 LongObjectHashMap<IntHashSet> map1, 89 IntSet individuals, MutableLongObjectMap<MutableIntSet> map1, MutableLongObjectMap<MutableIntSet> map2,
88 LongObjectHashMap<IntHashSet> map2, 90 MutableIntIntMap object2OptionIndex, List<List<IntIntMap>> listOfOptions) {
89 IntIntHashMap object2OptionIndex,
90 List<List<IntIntMap>> listOfOptions) {
91 if (map1.size() != map2.size()) { 91 if (map1.size() != map2.size()) {
92 return EquivalenceResult.DIFFERENT; 92 return EquivalenceResult.DIFFERENT;
93 } 93 }
@@ -116,27 +116,28 @@ public class StateEquivalenceCheckerImpl implements StateEquivalenceChecker {
116 listOfOptions.add(pairing.permutations()); 116 listOfOptions.add(pairing.permutations());
117 } 117 }
118 118
119 individuals.forEach(o -> listOfOptions.add(o,List.of(IntIntMaps.immutable.of(o,o)))); 119 individuals.forEach(o -> listOfOptions.add(o, List.of(IntIntMaps.immutable.of(o, o))));
120 120
121 if(allComplete) { 121 if (allComplete) {
122 return EquivalenceResult.ISOMORPHIC; 122 return EquivalenceResult.ISOMORPHIC;
123 } else { 123 } else {
124 return EquivalenceResult.UNKNOWN; 124 return EquivalenceResult.UNKNOWN;
125 } 125 }
126 } 126 }
127 127
128 private boolean testMorphism(List<? extends Interpretation<?>> s, List<? extends Interpretation<?>> t, Morphism m) { 128 private boolean testMorphism(List<? extends AnyInterpretation> s, List<? extends AnyInterpretation> t,
129 Morphism m) {
129 for (int interpretationIndex = 0; interpretationIndex < s.size(); interpretationIndex++) { 130 for (int interpretationIndex = 0; interpretationIndex < s.size(); interpretationIndex++) {
130 var sI = s.get(interpretationIndex); 131 var sI = s.get(interpretationIndex);
131 var tI = t.get(interpretationIndex); 132 var tI = t.get(interpretationIndex);
132 133
133 var cursor = sI.getAll(); 134 var cursor = ((Interpretation<?>) sI).getAll();
134 while (cursor.move()) { 135 while (cursor.move()) {
135 final Tuple sTuple = cursor.getKey(); 136 final Tuple sTuple = cursor.getKey();
136 final Object sValue = cursor.getValue(); 137 final Object sValue = cursor.getValue();
137 138
138 final Tuple tTuple = apply(sTuple, m); 139 final Tuple tTuple = apply(sTuple, m);
139 final Object tValue = tI.get(tTuple); 140 final Object tValue = ((Interpretation<?>) tI).get(tTuple);
140 141
141 if (!Objects.equals(sValue, tValue)) { 142 if (!Objects.equals(sValue, tValue)) {
142 return false; 143 return false;
diff --git a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple.java b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple.java
index aae7b344..e9761763 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple.java
@@ -12,6 +12,8 @@ public sealed interface Tuple extends Comparable<Tuple> permits Tuple0, Tuple1,
12 12
13 int get(int element); 13 int get(int element);
14 14
15 Tuple set(int element, int value);
16
15 @Override 17 @Override
16 default int compareTo(@NotNull Tuple other) { 18 default int compareTo(@NotNull Tuple other) {
17 int size = getSize(); 19 int size = getSize();
diff --git a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple0.java b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple0.java
index a9aa9bf2..5f525798 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple0.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple0.java
@@ -29,6 +29,11 @@ public final class Tuple0 implements Tuple {
29 } 29 }
30 30
31 @Override 31 @Override
32 public Tuple set(int element, int value) {
33 throw new IndexOutOfBoundsException(element);
34 }
35
36 @Override
32 public String toString() { 37 public String toString() {
33 return TUPLE_BEGIN + TUPLE_END; 38 return TUPLE_BEGIN + TUPLE_END;
34 } 39 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple1.java b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple1.java
index 388ee3a9..fb9497d2 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple1.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple1.java
@@ -38,6 +38,14 @@ public final class Tuple1 implements Tuple {
38 } 38 }
39 39
40 @Override 40 @Override
41 public Tuple set(int element, int value) {
42 if (element == 0) {
43 return Tuple.of(value);
44 }
45 throw new IndexOutOfBoundsException(element);
46 }
47
48 @Override
41 public String toString() { 49 public String toString() {
42 return TUPLE_BEGIN + value0 + TUPLE_END; 50 return TUPLE_BEGIN + value0 + TUPLE_END;
43 } 51 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple2.java b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple2.java
index 6d886fd3..2213df97 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple2.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple2.java
@@ -25,6 +25,15 @@ public record Tuple2(int value0, int value1) implements Tuple {
25 } 25 }
26 26
27 @Override 27 @Override
28 public Tuple set(int element, int value) {
29 return switch (element) {
30 case 0 -> Tuple.of(value, value1);
31 case 1 -> Tuple.of(value0, value);
32 default -> throw new ArrayIndexOutOfBoundsException(element);
33 };
34 }
35
36 @Override
28 public String toString() { 37 public String toString() {
29 return TUPLE_BEGIN + value0 + TUPLE_SEPARATOR + value1 + TUPLE_END; 38 return TUPLE_BEGIN + value0 + TUPLE_SEPARATOR + value1 + TUPLE_END;
30 } 39 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple3.java b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple3.java
index 734e45c2..417770e8 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple3.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple3.java
@@ -26,6 +26,16 @@ public record Tuple3(int value0, int value1, int value2) implements Tuple {
26 } 26 }
27 27
28 @Override 28 @Override
29 public Tuple set(int element, int value) {
30 return switch (element) {
31 case 0 -> Tuple.of(value, value1, value2);
32 case 1 -> Tuple.of(value0, value, value2);
33 case 2 -> Tuple.of(value0, value1, value);
34 default -> throw new ArrayIndexOutOfBoundsException(element);
35 };
36 }
37
38 @Override
29 public String toString() { 39 public String toString() {
30 return TUPLE_BEGIN + value0 + TUPLE_SEPARATOR + value1 + TUPLE_SEPARATOR + value2 + TUPLE_END; 40 return TUPLE_BEGIN + value0 + TUPLE_SEPARATOR + value1 + TUPLE_SEPARATOR + value2 + TUPLE_END;
31 } 41 }
diff --git a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple4.java b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple4.java
index e1b93e7b..c4915198 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple4.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/tuple/Tuple4.java
@@ -27,6 +27,17 @@ public record Tuple4(int value0, int value1, int value2, int value3) implements
27 } 27 }
28 28
29 @Override 29 @Override
30 public Tuple set(int element, int value) {
31 return switch (element) {
32 case 0 -> Tuple.of(value, value1, value2, value3);
33 case 1 -> Tuple.of(value0, value, value2, value3);
34 case 2 -> Tuple.of(value0, value1, value, value3);
35 case 3 -> Tuple.of(value0, value1, value2, value);
36 default -> throw new ArrayIndexOutOfBoundsException(element);
37 };
38 }
39
40 @Override
30 public String toString() { 41 public String toString() {
31 return TUPLE_BEGIN + value0 + TUPLE_SEPARATOR + value1 + TUPLE_SEPARATOR + value2 + TUPLE_SEPARATOR + value3 + 42 return TUPLE_BEGIN + value0 + TUPLE_SEPARATOR + value1 + TUPLE_SEPARATOR + value2 + TUPLE_SEPARATOR + value3 +
32 TUPLE_END; 43 TUPLE_END;
diff --git a/subprojects/store/src/main/java/tools/refinery/store/tuple/TupleN.java b/subprojects/store/src/main/java/tools/refinery/store/tuple/TupleN.java
index b66af491..b42b4b6a 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/tuple/TupleN.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/tuple/TupleN.java
@@ -32,6 +32,16 @@ public final class TupleN implements Tuple {
32 } 32 }
33 33
34 @Override 34 @Override
35 public Tuple set(int element, int value) {
36 int size = getSize();
37 var newValues = new int[size];
38 for (int i = 0; i < size; i++) {
39 newValues[i] = element == i ? value : values[i];
40 }
41 return Tuple.of(newValues);
42 }
43
44 @Override
35 public String toString() { 45 public String toString() {
36 var valuesString = Arrays.stream(values) 46 var valuesString = Arrays.stream(values)
37 .mapToObj(Integer::toString) 47 .mapToObj(Integer::toString)
diff --git a/subprojects/store/src/main/java/tools/refinery/store/util/CancellationToken.java b/subprojects/store/src/main/java/tools/refinery/store/util/CancellationToken.java
new file mode 100644
index 00000000..be294013
--- /dev/null
+++ b/subprojects/store/src/main/java/tools/refinery/store/util/CancellationToken.java
@@ -0,0 +1,13 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.store.util;
7
8@FunctionalInterface
9public interface CancellationToken {
10 CancellationToken NONE = () -> {};
11
12 void checkCancelled();
13}
diff --git a/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java b/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java
index 78ad2ad7..2e302663 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/util/CycleDetectingMapper.java
@@ -20,6 +20,10 @@ public class CycleDetectingMapper<T, R> {
20 20
21 private final Map<T, R> results = new HashMap<>(); 21 private final Map<T, R> results = new HashMap<>();
22 22
23 public CycleDetectingMapper(Function<T, R> doMap) {
24 this(Objects::toString, doMap);
25 }
26
23 public CycleDetectingMapper(Function<T, String> getName, Function<T, R> doMap) { 27 public CycleDetectingMapper(Function<T, String> getName, Function<T, R> doMap) {
24 this.getName = getName; 28 this.getName = getName;
25 this.doMap = doMap; 29 this.doMap = doMap;
diff --git a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java
index e61f7b36..e403eec2 100644
--- a/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java
+++ b/subprojects/store/src/test/java/tools/refinery/store/representation/cardinality/UpperCardinalitiesTest.java
@@ -8,9 +8,6 @@ package tools.refinery.store.representation.cardinality;
8import org.junit.jupiter.api.Test; 8import org.junit.jupiter.api.Test;
9import org.junit.jupiter.params.ParameterizedTest; 9import org.junit.jupiter.params.ParameterizedTest;
10import org.junit.jupiter.params.provider.ValueSource; 10import org.junit.jupiter.params.provider.ValueSource;
11import tools.refinery.store.representation.cardinality.FiniteUpperCardinality;
12import tools.refinery.store.representation.cardinality.UnboundedUpperCardinality;
13import tools.refinery.store.representation.cardinality.UpperCardinalities;
14 11
15import static org.hamcrest.MatcherAssert.assertThat; 12import static org.hamcrest.MatcherAssert.assertThat;
16import static org.hamcrest.Matchers.equalTo; 13import static org.hamcrest.Matchers.equalTo;
@@ -20,14 +17,14 @@ class UpperCardinalitiesTest {
20 @ParameterizedTest 17 @ParameterizedTest
21 @ValueSource(ints = {0, 1, 255, 256, 1000, Integer.MAX_VALUE}) 18 @ValueSource(ints = {0, 1, 255, 256, 1000, Integer.MAX_VALUE})
22 void valueOfBoundedTest(int value) { 19 void valueOfBoundedTest(int value) {
23 var upperCardinality = UpperCardinalities.valueOf(value); 20 var upperCardinality = UpperCardinalities.atMost(value);
24 assertThat(upperCardinality, instanceOf(FiniteUpperCardinality.class)); 21 assertThat(upperCardinality, instanceOf(FiniteUpperCardinality.class));
25 assertThat(((FiniteUpperCardinality) upperCardinality).finiteUpperBound(), equalTo(value)); 22 assertThat(((FiniteUpperCardinality) upperCardinality).finiteUpperBound(), equalTo(value));
26 } 23 }
27 24
28 @Test 25 @Test
29 void valueOfUnboundedTest() { 26 void valueOfUnboundedTest() {
30 var upperCardinality = UpperCardinalities.valueOf(-1); 27 var upperCardinality = UpperCardinalities.atMost(-1);
31 assertThat(upperCardinality, instanceOf(UnboundedUpperCardinality.class)); 28 assertThat(upperCardinality, instanceOf(UnboundedUpperCardinality.class));
32 } 29 }
33} 30}
diff --git a/subprojects/store/src/test/java/tools/refinery/store/statecoding/EquivalenceTest.java b/subprojects/store/src/test/java/tools/refinery/store/statecoding/EquivalenceTest.java
index 3c35849e..f2d2f7b5 100644
--- a/subprojects/store/src/test/java/tools/refinery/store/statecoding/EquivalenceTest.java
+++ b/subprojects/store/src/test/java/tools/refinery/store/statecoding/EquivalenceTest.java
@@ -192,7 +192,8 @@ class EquivalenceTest {
192 ModelStore store = ModelStore.builder() 192 ModelStore store = ModelStore.builder()
193 .symbols(person, age, friend, parents, population) 193 .symbols(person, age, friend, parents, population)
194 .with(StateCoderAdapter.builder() 194 .with(StateCoderAdapter.builder()
195 .stateCodeCalculatorFactory((p1, p2) -> calculator)) 195 .stateCodeCalculatorFactory((ignoredModel, ignoredInterpretations, ignoredIndividuals) ->
196 calculator))
196 .build(); 197 .build();
197 198
198 var stateCoder = store.getAdapter(StateCoderStoreAdapter.class); 199 var stateCoder = store.getAdapter(StateCoderStoreAdapter.class);
diff --git a/subprojects/store/src/test/java/tools/refinery/store/statecoding/ExperimentalSetupTest.java b/subprojects/store/src/test/java/tools/refinery/store/statecoding/ExperimentalSetupTest.java
index 25b5dca1..f5ffc18d 100644
--- a/subprojects/store/src/test/java/tools/refinery/store/statecoding/ExperimentalSetupTest.java
+++ b/subprojects/store/src/test/java/tools/refinery/store/statecoding/ExperimentalSetupTest.java
@@ -5,7 +5,8 @@
5 */ 5 */
6package tools.refinery.store.statecoding; 6package tools.refinery.store.statecoding;
7 7
8import org.eclipse.collections.impl.map.mutable.primitive.IntObjectHashMap; 8import org.eclipse.collections.api.factory.primitive.IntObjectMaps;
9import org.eclipse.collections.api.map.primitive.MutableIntObjectMap;
9import org.junit.jupiter.api.Tag; 10import org.junit.jupiter.api.Tag;
10import org.junit.jupiter.api.Test; 11import org.junit.jupiter.api.Test;
11import org.junit.jupiter.params.ParameterizedTest; 12import org.junit.jupiter.params.ParameterizedTest;
@@ -24,7 +25,6 @@ import java.util.Set;
24import static org.junit.jupiter.api.Assertions.assertEquals; 25import static org.junit.jupiter.api.Assertions.assertEquals;
25import static org.junit.jupiter.api.Assertions.assertTrue; 26import static org.junit.jupiter.api.Assertions.assertTrue;
26 27
27
28class ExperimentalSetupTest { 28class ExperimentalSetupTest {
29 static class ExperimentalSetupResult { 29 static class ExperimentalSetupResult {
30 int versions = 0; 30 int versions = 0;
@@ -61,7 +61,7 @@ class ExperimentalSetupTest {
61 .build(); 61 .build();
62 62
63 Set<Version> versions = new HashSet<>(); 63 Set<Version> versions = new HashSet<>();
64 IntObjectHashMap<List<Version>> codes = new IntObjectHashMap<>(); 64 MutableIntObjectMap<List<Version>> codes = IntObjectMaps.mutable.empty();
65 65
66 var empty = store.createEmptyModel(); 66 var empty = store.createEmptyModel();
67 if (!permuteTypes) { 67 if (!permuteTypes) {
@@ -123,8 +123,9 @@ class ExperimentalSetupTest {
123 return result; 123 return result;
124 } 124 }
125 125
126 private static void saveAsNewVersion(Set<Version> versions, IntObjectHashMap<List<Version>> codes, 126 private static void saveAsNewVersion(Set<Version> versions, MutableIntObjectMap<List<Version>> codes,
127 StateCoderStoreAdapter storeAdapter, ExperimentalSetupResult result, Model model) { 127 StateCoderStoreAdapter storeAdapter, ExperimentalSetupResult result,
128 Model model) {
128 Version version1 = model.commit(); 129 Version version1 = model.commit();
129 130
130 var stateCode = model.getAdapter(StateCoderAdapter.class).calculateStateCode(); 131 var stateCode = model.getAdapter(StateCoderAdapter.class).calculateStateCode();
diff --git a/subprojects/store/src/test/java/tools/refinery/store/statecoding/StateCoderBuildTest.java b/subprojects/store/src/test/java/tools/refinery/store/statecoding/StateCoderBuildTest.java
index 0b738005..0928aa8e 100644
--- a/subprojects/store/src/test/java/tools/refinery/store/statecoding/StateCoderBuildTest.java
+++ b/subprojects/store/src/test/java/tools/refinery/store/statecoding/StateCoderBuildTest.java
@@ -124,7 +124,8 @@ class StateCoderBuildTest {
124 var store = ModelStore.builder() 124 var store = ModelStore.builder()
125 .symbols(friend) 125 .symbols(friend)
126 .with(StateCoderAdapter.builder() 126 .with(StateCoderAdapter.builder()
127 .stateCodeCalculatorFactory((interpretations, individuals) -> mock)) 127 .stateCodeCalculatorFactory((ignoredModel, ignoredInterpretations, ignoredIndividuals) ->
128 mock))
128 .build(); 129 .build();
129 130
130 var model = store.createEmptyModel(); 131 var model = store.createEmptyModel();
diff --git a/subprojects/viatra-runtime-localsearch/about.html b/subprojects/viatra-runtime-localsearch/about.html
new file mode 100644
index 00000000..d1d5593a
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/about.html
@@ -0,0 +1,26 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3<!--
4 Copyright (c) 2017, Eclipse.org Foundation, Inc.
5
6 SPDX-License-Identifier: LicenseRef-EPL-Steward
7-->
8<head>
9<title>About</title>
10<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
11</head>
12<body lang="EN-US">
13<h2>About This Content</h2>
14
15<p>March 18, 2019</p>
16<h3>License</h3>
17
18<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
19Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/org/documents/epl-v20.php">http://www.eclipse.org/legal/epl-v20.html</a>.
20For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
21
22<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
23apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
24indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
25</body>
26</html>
diff --git a/subprojects/viatra-runtime-localsearch/build.gradle.kts b/subprojects/viatra-runtime-localsearch/build.gradle.kts
new file mode 100644
index 00000000..31c0c634
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/build.gradle.kts
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7plugins {
8 id("tools.refinery.gradle.java-library")
9}
10
11dependencies {
12 implementation(project(":refinery-viatra-runtime"))
13 implementation(libs.slf4j.log4j)
14}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/ExecutionLoggerAdapter.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/ExecutionLoggerAdapter.java
new file mode 100644
index 00000000..bfb76d9a
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/ExecutionLoggerAdapter.java
@@ -0,0 +1,83 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch;
10
11import tools.refinery.viatra.runtime.localsearch.matcher.ILocalSearchAdapter;
12import tools.refinery.viatra.runtime.localsearch.matcher.LocalSearchMatcher;
13import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
14import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
15import tools.refinery.viatra.runtime.localsearch.plan.SearchPlan;
16
17import java.util.Optional;
18import java.util.function.Consumer;
19
20/**
21 * @since 2.0
22 */
23public final class ExecutionLoggerAdapter implements ILocalSearchAdapter {
24
25 volatile String indentation = "";
26 private final Consumer<String> outputConsumer;
27
28 public ExecutionLoggerAdapter(Consumer<String> outputConsumer) {
29 this.outputConsumer = outputConsumer;
30 }
31
32 private void logMessage(String message) {
33 outputConsumer.accept(message);
34 }
35
36 private void logMessage(String message, Object...args) {
37 outputConsumer.accept(String.format(message, args));
38 }
39
40 @Override
41 public void patternMatchingStarted(LocalSearchMatcher lsMatcher) {
42 logMessage(indentation + "[ START] " + lsMatcher.getQuerySpecification().getFullyQualifiedName());
43 }
44
45 @Override
46 public void noMoreMatchesAvailable(LocalSearchMatcher lsMatcher) {
47 logMessage(indentation + "[FINISH] " + lsMatcher.getQuerySpecification().getFullyQualifiedName());
48 }
49
50 @Override
51 public void planChanged(Optional<SearchPlan> oldPlan, Optional<SearchPlan> newPlan) {
52 logMessage(indentation + "[ PLAN] " + newPlan.map(p -> p.getSourceBody().getPattern().getFullyQualifiedName()).orElse(""));
53 logMessage(indentation + newPlan.map(SearchPlan::toString).map(s -> s.replace("\n", "\n" + indentation)).orElse(""));
54 }
55
56 @Override
57 public void operationSelected(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isBacktrack) {
58 String category = isBacktrack ? "[ BACK] " : "[SELECT] ";
59 logMessage(indentation + category + operation.toString());
60 if (operation instanceof IPatternMatcherOperation) {
61 indentation = indentation + "\t";
62 }
63 }
64
65 @Override
66 public void operationExecuted(SearchPlan plan, ISearchOperation operation, MatchingFrame frame,
67 boolean isSuccessful) {
68 if (operation instanceof IPatternMatcherOperation && indentation.length() > 0) {
69 indentation = indentation.substring(1);
70 }
71 logMessage(indentation + "[ %s] %s %s", isSuccessful ? "OK" : "NO", operation.toString(), frame.toString());
72 }
73
74 @Override
75 public void matchFound(SearchPlan plan, MatchingFrame frame) {
76 logMessage(indentation + "[ MATCH] " + plan.getSourceBody().getPattern().getFullyQualifiedName() + " " + frame.toString());
77 }
78
79 @Override
80 public void duplicateMatchFound(MatchingFrame frame) {
81 logMessage(indentation + "[ DUPL.] " + frame.toString());
82 }
83}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/MatchingFrame.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/MatchingFrame.java
new file mode 100644
index 00000000..bdbc663c
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/MatchingFrame.java
@@ -0,0 +1,114 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro Zoltan Ujhelyi and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.localsearch;
11
12import tools.refinery.viatra.runtime.matchers.tuple.IModifiableTuple;
13import tools.refinery.viatra.runtime.matchers.tuple.VolatileTuple;
14import tools.refinery.viatra.runtime.matchers.util.Preconditions;
15
16import java.util.Arrays;
17import java.util.stream.Collectors;
18
19/**
20 * A MatchingFrame is a Volatile Tuple implementation used by the local search engine internally.
21 */
22public class MatchingFrame extends VolatileTuple implements IModifiableTuple {
23
24 /**
25 * The array that physically holds the values.
26 */
27 private Object[] frame;
28
29 /**
30 * @since 1.7
31 */
32 public MatchingFrame(int frameSize) {
33 this.frame = new Object[frameSize];
34 }
35
36 /**
37 * Creates a copy of another matching frame; the two frames can be updated separately
38 * @param other
39 * @since 1.7
40 */
41 public MatchingFrame(MatchingFrame other) {
42 this.frame = Arrays.copyOf(other.frame, other.frame.length);
43 }
44
45
46
47 /**
48 * Returns the value stored inside the matching frame.
49 *
50 * @param position
51 * @return the element stored in the selected position in the frame, or null if it is not yet set
52 * @throws IndexOutOfBoundsException
53 * if position is negative
54 * @throws IllegalArgumentException
55 * if the position is larger then the length of the frame
56 */
57 public Object getValue(int position) {
58 Preconditions.checkElementIndex(position, frame.length);
59 return frame[position];
60 }
61
62 /**
63 * Sets the value of the variable at the given position. For internal use in LS matching only.
64 *
65 * @param position the position of the variable within the frame
66 * @param value the value to be set for the variable
67 */
68 public void setValue(int position, Object value) {
69 Preconditions.checkElementIndex(position, frame.length);
70 frame[position] = value;
71 }
72
73 public boolean testAndSetValue(Integer position, Object value) {
74 Preconditions.checkElementIndex(position, frame.length);
75 if (frame[position] == null) {
76 frame[position] = value;
77 return true;
78 } else {
79 return frame[position].equals(value);
80 }
81 }
82
83 @Override
84 public String toString() {
85 return Arrays.stream(frame).map(this::stringRepresentation).collect(Collectors.joining(", ", "[", "]"));
86 }
87
88 private String stringRepresentation(Object obj) {
89 if (obj == null) {
90 return "_";
91 }
92 return obj.toString();
93 }
94
95 @Override
96 public int getSize() {
97 return frame.length;
98 }
99
100 @Override
101 public Object get(int index) {
102 return getValue(index);
103 }
104
105 @Override
106 public Object[] getElements() {
107 return Arrays.copyOf(frame, frame.length);
108 }
109
110 @Override
111 public void set(int index, Object value) {
112 frame[index] = value;
113 }
114}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/exceptions/LocalSearchException.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/exceptions/LocalSearchException.java
new file mode 100644
index 00000000..c239e766
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/exceptions/LocalSearchException.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.exceptions;
10
11import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
12
13/**
14 * @author Zoltan Ujhelyi, Akos Horvath
15 *
16 */
17public class LocalSearchException extends ViatraQueryRuntimeException {
18
19 private static final long serialVersionUID = -2585896573351435974L;
20
21 public static final String PLAN_EXECUTION_ERROR = "Error while executing search plan";
22 public static final String TYPE_ERROR = "Invalid type of variable";
23
24 public LocalSearchException(String description, Throwable rootException) {
25 super(description, rootException);
26 }
27
28 public LocalSearchException(String description) {
29 super(description);
30 }
31
32
33}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/CallWithAdornment.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/CallWithAdornment.java
new file mode 100644
index 00000000..0cabeb97
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/CallWithAdornment.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher;
10
11import java.util.HashSet;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
15import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
18
19/**
20 * Immutable data that represents the role of a pattern call within an LS query plan.
21 *
22 * <p> The call is expressed as the {@link PConstraint} {@link #call} (implementing {@link IQueryReference}),
23 * while the stored {@link #adornment} records the way it will be used within a search plan (specifically,
24 * pattern parameters within the adornment will have their values known at the point of evaluating the constraint).
25 *
26 *
27 * @author Gabor Bergmann
28 * @since 2.1
29 */
30public class CallWithAdornment {
31 private final IQueryReference call;
32 private final Set<PParameter> adornment;
33
34 public CallWithAdornment(IQueryReference call, Set<PParameter> adornment) {
35 this.call = call;
36 this.adornment = new HashSet<>(adornment);
37 }
38
39 public IQueryReference getCall() {
40 return call;
41 }
42
43 public Set<PParameter> getAdornment() {
44 return adornment;
45 }
46
47
48 public PQuery getReferredQuery() {
49 return call.getReferredQuery();
50 }
51
52 public MatcherReference getMatcherReference() {
53 return new MatcherReference(getReferredQuery(), adornment);
54 }
55}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdaptable.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdaptable.java
new file mode 100644
index 00000000..f4b28ed0
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdaptable.java
@@ -0,0 +1,29 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Peter Lunk, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher;
10
11import java.util.List;
12
13/**
14 * @author Zoltan Ujhelyi
15 *
16 */
17public interface ILocalSearchAdaptable {
18
19 List<ILocalSearchAdapter> getAdapters();
20
21 void addAdapter(ILocalSearchAdapter adapter);
22
23 void removeAdapter(ILocalSearchAdapter adapter);
24
25 void removeAdapters(List<ILocalSearchAdapter> adapter);
26
27 void addAdapters(List<ILocalSearchAdapter> adapter);
28
29} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdapter.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdapter.java
new file mode 100644
index 00000000..df64b5f1
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ILocalSearchAdapter.java
@@ -0,0 +1,120 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher;
10
11import java.util.Optional;
12
13import tools.refinery.viatra.runtime.localsearch.ExecutionLoggerAdapter;
14import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
15import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
16import tools.refinery.viatra.runtime.localsearch.plan.SearchPlan;
17import tools.refinery.viatra.runtime.localsearch.profiler.LocalSearchProfilerAdapter;
18
19
20/**
21 * A local search adapter allows external code to follow the internal executions of the local search matcher. Possible
22 * implementations of the interface include profilers and debuggers.
23 * <p>
24 * <strong>EXPERIMENTAL</strong>. A few shortcomings have been found for this interface late during the development
25 * lifecycle of version 2.0 whose solution might need breaking possible future implementors. Because of this, right now
26 * it is not recommended to provide implementations outside of VIATRA. If necessary, have a look at the built-in
27 * adapters that should fulfill most cases in the meantime. See bugs https://bugs.eclipse.org/bugs/show_bug.cgi?id=535101
28 * and https://bugs.eclipse.org/bugs/show_bug.cgi?id=535102 for details.
29 *
30 * @author Marton Bur
31 * @see ExecutionLoggerAdapter
32 * @see LocalSearchProfilerAdapter
33 *
34 */
35public interface ILocalSearchAdapter {
36
37 /**
38 *
39 * @since 1.2
40 */
41 default void adapterRegistered(ILocalSearchAdaptable adaptable) {};
42 /**
43 *
44 * @since 1.2
45 */
46 default void adapterUnregistered(ILocalSearchAdaptable adaptable) {};
47
48 /**
49 * Callback method to indicate the start of a matching process
50 *
51 * @param lsMatcher the local search matcher that starts the matching
52 */
53 default void patternMatchingStarted(LocalSearchMatcher lsMatcher) {};
54
55 /**
56 * Callback method to indicate the end of a matching process
57 * </p>
58 * <strong>WARNING</strong>: It is not guaranteed that this method will be called;
59 * it is possible that a match process will end after a match is found and no other matches are accessed.
60 *
61 * @param lsMatcher the local search matcher that finished
62 * @since 2.0
63 */
64 default void noMoreMatchesAvailable(LocalSearchMatcher lsMatcher) {};
65
66 /**
67 * Callback method to indicate switching to a new plan during the execution of a pattern matching
68 *
69 * @param oldPlan the plan that is finished. Value is null when the first plan is starting.
70 * @param newPlan the plan that will begin execution
71 * @since 2.0
72 */
73 default void planChanged(Optional<SearchPlan> oldPlan, Optional<SearchPlan> newPlan) {};
74
75 /**
76 * Callback method to indicate the selection of an operation to execute
77 *
78 * @param plan the current plan executor
79 * @param frame the current matching frame
80 * @param isBacktrack if true, the selected operation was reached via backtracking
81 * @since 2.0
82 */
83 default void operationSelected(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isBacktrack) {};
84
85 /**
86 * Callback method to indicate that an operation is executed
87 *
88 * @param plan the current plan
89 * @param frame the current matching frame
90 * @param isSuccessful if true, the operation executed successfully, or false if the execution failed and backtracking will happen
91 * @since 2.0
92 */
93 default void operationExecuted(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isSuccessful) {};
94
95 /**
96 * Callback that is used to indicate that a match has been found
97 *
98 * @param plan the search plan executor that found the match
99 * @param frame the frame that holds the substitutions of the variables that match
100 * @since 2.0
101 */
102 default void matchFound(SearchPlan plan, MatchingFrame frame) {};
103 /**
104 * Callback that is used to indicate that the previously reported match has been found as a duplicate, thus will be ignored from the match results.
105 *
106 * @param plan the search plan executor that found the match
107 * @param frame the frame that holds the substitutions of the variables that match
108 * @since 2.0
109 */
110 default void duplicateMatchFound(MatchingFrame frame) {};
111
112 /**
113 * Callback method to indicate that a search plan is initialized in an executor with the given frame and starting operation
114 *
115 * @param searchPlan
116 * @param frame
117 * @since 2.0
118 */
119 default void executorInitializing(SearchPlan searchPlan, MatchingFrame frame) {};
120}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ISearchContext.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ISearchContext.java
new file mode 100644
index 00000000..71aa4aac
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/ISearchContext.java
@@ -0,0 +1,120 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher;
10
11import org.apache.log4j.Logger;
12import tools.refinery.viatra.runtime.localsearch.matcher.integration.IAdornmentProvider;
13import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
14import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
15import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
16import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
17import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
18import tools.refinery.viatra.runtime.matchers.util.ICache;
19import tools.refinery.viatra.runtime.matchers.util.IProvider;
20
21import java.util.Collections;
22
23/**
24 * The {@link ISearchContext} interface allows search operations to reuse platform services such as the indexer.
25 *
26 * @author Zoltan Ujhelyi
27 * @noreference This interface is not intended to be referenced by clients.
28 * @noimplement This interface is not intended to be implemented by clients.
29 * @noextend This interface is not intended to be extended by clients.
30 *
31 */
32public interface ISearchContext {
33
34 /**
35 * Provides access to the generic query runtime context of the current engine
36 * @since 1.7
37 */
38 IQueryRuntimeContext getRuntimeContext();
39
40 /**
41 * Returns a matcher for a selected query specification.
42 *
43 * @throws ViatraQueryRuntimeException
44 * @since 1.5
45 */
46 IQueryResultProvider getMatcher(CallWithAdornment dependency);
47
48 /**
49 * Allows search operations to cache values through the entire lifecycle of the local search backend. The values are
50 * calculated if not cached before using the given provider, or returned from the cache accordingly.
51 *
52 * @since 1.7
53 */
54 <T> T accessBackendLevelCache(Object key, Class<? extends T> clazz, IProvider<T> valueProvider);
55
56 /**
57 * Returns the engine-specific logger
58 *
59 * @since 2.0
60 */
61 Logger getLogger();
62
63 /**
64 * @noreference This class is not intended to be referenced by clients.
65 * @noimplement This interface is not intended to be implemented by clients.
66 * @noextend This interface is not intended to be extended by clients.
67 */
68 public class SearchContext implements ISearchContext {
69
70 private final IQueryRuntimeContext runtimeContext;
71
72 private final ICache backendLevelCache;
73 private final Logger logger;
74 private final ResultProviderRequestor resultProviderRequestor;
75
76 /**
77 * Initializes a search context using an arbitrary backend context
78 */
79 public SearchContext(IQueryBackendContext backendContext, ICache backendLevelCache,
80 ResultProviderRequestor resultProviderRequestor) {
81 this.resultProviderRequestor = resultProviderRequestor;
82 this.runtimeContext = backendContext.getRuntimeContext();
83 this.logger = backendContext.getLogger();
84
85 this.backendLevelCache = backendLevelCache;
86 }
87
88 /**
89 * @throws ViatraQueryRuntimeException
90 * @since 2.1
91 */
92 @Override
93 public IQueryResultProvider getMatcher(CallWithAdornment dependency) {
94 // Inject adornment for referenced pattern
95 IAdornmentProvider adornmentProvider = query -> {
96 if (query.equals(dependency.getReferredQuery())){
97 return Collections.singleton(dependency.getAdornment());
98 }
99 return Collections.emptySet();
100 };
101 return resultProviderRequestor.requestResultProvider(dependency.getCall(),
102 IAdornmentProvider.toHint(adornmentProvider));
103 }
104
105 @Override
106 public <T> T accessBackendLevelCache(Object key, Class<? extends T> clazz, IProvider<T> valueProvider) {
107 return backendLevelCache.getValue(key, clazz, valueProvider);
108 }
109
110 public IQueryRuntimeContext getRuntimeContext() {
111 return runtimeContext;
112 }
113
114 @Override
115 public Logger getLogger() {
116 return logger;
117 }
118
119 }
120}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/LocalSearchMatcher.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/LocalSearchMatcher.java
new file mode 100644
index 00000000..e31d7b5c
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/LocalSearchMatcher.java
@@ -0,0 +1,301 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Marton Bur, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher;
10
11import java.util.ArrayList;
12import java.util.HashSet;
13import java.util.Iterator;
14import java.util.LinkedList;
15import java.util.List;
16import java.util.NoSuchElementException;
17import java.util.Objects;
18import java.util.Optional;
19import java.util.Set;
20import java.util.Spliterator;
21import java.util.Spliterators;
22import java.util.stream.Collectors;
23import java.util.stream.Stream;
24import java.util.stream.StreamSupport;
25
26import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
27import tools.refinery.viatra.runtime.localsearch.plan.IPlanDescriptor;
28import tools.refinery.viatra.runtime.localsearch.plan.SearchPlan;
29import tools.refinery.viatra.runtime.localsearch.plan.SearchPlanExecutor;
30import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
31import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
32import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
33import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
34import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
35import tools.refinery.viatra.runtime.matchers.util.Preconditions;
36
37/**
38 * @author Zoltan Ujhelyi
39 * @noinstantiate This class is not intended to be instantiated by clients.
40 */
41public final class LocalSearchMatcher implements ILocalSearchAdaptable {
42
43 private final List<SearchPlanExecutor> plan;
44 private final IPlanDescriptor planDescriptor;
45 private final List<ILocalSearchAdapter> adapters;
46
47 /**
48 * @since 2.0
49 */
50 public List<SearchPlanExecutor> getPlan() {
51 return plan;
52 }
53
54 @Override
55 public List<ILocalSearchAdapter> getAdapters() {
56 return new ArrayList<>(adapters);
57 }
58
59 private abstract class PlanExecutionIterator implements Iterator<Tuple> {
60
61 protected final Iterator<SearchPlanExecutor> planIterator;
62
63 protected SearchPlanExecutor currentPlan;
64 protected MatchingFrame frame;
65 protected final Set<ITuple> matchSet;
66 protected VolatileModifiableMaskedTuple parametersOfFrameView;
67 private boolean isNextMatchCalculated;
68
69 public PlanExecutionIterator(final Iterator<SearchPlanExecutor> planIterator) {
70 this.planIterator = planIterator;
71 isNextMatchCalculated = false;
72 matchSet = new HashSet<>();
73 }
74
75 protected boolean selectNextPlan() {
76 if(currentPlan != null) {
77 currentPlan.removeAdapters(adapters);
78 }
79 boolean validPlanSelected = false;
80
81 SearchPlanExecutor nextPlan = null;
82
83 while (!validPlanSelected && planIterator.hasNext()) {
84 nextPlan = planIterator.next();
85 nextPlan.addAdapters(adapters);
86 nextPlan.resetPlan();
87
88 validPlanSelected = initializeMatchingFrame(nextPlan);
89 }
90
91 if (validPlanSelected) {
92 for (ILocalSearchAdapter adapter : adapters) {
93 adapter.planChanged(Optional.ofNullable(currentPlan).map(SearchPlanExecutor::getSearchPlan),
94 Optional.ofNullable(nextPlan).map(SearchPlanExecutor::getSearchPlan));
95 }
96 currentPlan = nextPlan;
97 return true;
98 } else {
99 currentPlan = null;
100 return false;
101 }
102 }
103
104 protected abstract boolean initializeMatchingFrame(SearchPlanExecutor nextPlan);
105
106 private boolean findNextNewMatchInCurrentPlan() {
107 boolean foundMatch = currentPlan.execute(frame);
108 while (foundMatch && matchSet.contains(parametersOfFrameView)) {
109 for (ILocalSearchAdapter adapter : adapters) {
110 adapter.duplicateMatchFound(frame);
111 }
112 foundMatch = currentPlan.execute(frame);
113 }
114 return foundMatch;
115 }
116
117 @Override
118 public boolean hasNext() {
119 if (isNextMatchCalculated) {
120 return true;
121 }
122 if (currentPlan == null) {
123 return false;
124 }
125 boolean foundMatch = findNextNewMatchInCurrentPlan();
126
127 while (!foundMatch && planIterator.hasNext()) {
128 foundMatch = selectNextPlan() && findNextNewMatchInCurrentPlan();
129 }
130 if (!foundMatch) {
131 for (ILocalSearchAdapter adapter : adapters) {
132 adapter.noMoreMatchesAvailable(LocalSearchMatcher.this);
133 }
134 }
135 isNextMatchCalculated = foundMatch;
136 return foundMatch;
137 }
138
139 @Override
140 public Tuple next() {
141 if (!hasNext()) {
142 throw new NoSuchElementException("No more matches available.");
143 }
144 isNextMatchCalculated = false;
145 final Tuple match = parametersOfFrameView.toImmutable();
146 matchSet.add(match);
147 return match;
148 }
149 }
150
151 private class PlanExecutionIteratorWithArrayParameters extends PlanExecutionIterator {
152
153 private final Object[] parameterValues;
154
155 public PlanExecutionIteratorWithArrayParameters(Iterator<SearchPlanExecutor> planIterator, final Object[] parameterValues) {
156 super(planIterator);
157 this.parameterValues = parameterValues;
158 selectNextPlan();
159 }
160
161 protected boolean initializeMatchingFrame(SearchPlanExecutor nextPlan) {
162 frame = new MatchingFrame(nextPlan.getVariableMapping().size());
163 parametersOfFrameView = new VolatileModifiableMaskedTuple(frame, nextPlan.getParameterMask());
164 for (int i = 0; i < parameterValues.length; i++) {
165 Object valueToSet = parameterValues[i];
166 if (valueToSet != null) {
167 Object oldValue = parametersOfFrameView.get(i);
168 if (oldValue == null) {
169 parametersOfFrameView.set(i, valueToSet);
170 } else if (!Objects.equals(valueToSet, oldValue)) {
171 // Initial value setting resulted in contradictory values. This can happen because two parameter
172 // variables have been unified but the call provides different values for the parameters.
173 return false;
174 }
175 // If oldValue is not null but equal to newValue, the setting can be ignored
176 }
177 }
178
179 return true;
180 }
181 }
182 private class PlanExecutionIteratorWithTupleParameters extends PlanExecutionIterator {
183
184 private final ITuple parameterValues;
185 private final TupleMask parameterSeedMask;
186
187 public PlanExecutionIteratorWithTupleParameters(Iterator<SearchPlanExecutor> planIterator, final TupleMask parameterSeedMask, final ITuple parameterValues) {
188 super(planIterator);
189 this.parameterSeedMask = parameterSeedMask;
190 this.parameterValues = parameterValues;
191 selectNextPlan();
192 }
193
194 protected boolean initializeMatchingFrame(SearchPlanExecutor nextPlan) {
195 frame = new MatchingFrame(nextPlan.getVariableMapping().size());
196 parametersOfFrameView = new VolatileModifiableMaskedTuple(frame, nextPlan.getParameterMask());
197 for (int i = 0; i < parameterSeedMask.getSize(); i++) {
198 int index = parameterSeedMask.indices[i];
199 Object valueToSet = parameterValues.get(i);
200 if (valueToSet != null) {
201 Object oldValue = parametersOfFrameView.get(index);
202 if (oldValue == null) {
203 parametersOfFrameView.set(index, valueToSet);
204 } else if (!Objects.equals(valueToSet, oldValue)) {
205 // Initial value setting resulted in contradictory values. This can happen because two parameter
206 // variables have been unified but the call provides different values for the parameters.
207 return false;
208 }
209 // If oldValue is not null but equal to newValue, the setting can be ignored
210 }
211 }
212
213 return true;
214 }
215 }
216
217 /**
218 * @since 2.0
219 */
220 public LocalSearchMatcher(ISearchContext searchContext, IPlanDescriptor planDescriptor, List<SearchPlan> plan) {
221 Preconditions.checkArgument(planDescriptor != null, "Cannot initialize matcher with null query.");
222 this.planDescriptor = planDescriptor;
223 this.plan = plan.stream().map(p -> new SearchPlanExecutor(p, searchContext)).collect(Collectors.toList());
224 this.adapters = new LinkedList<>();
225 }
226
227 @Override
228 public void addAdapter(ILocalSearchAdapter adapter) {
229 this.adapters.add(adapter);
230 adapter.adapterRegistered(this);
231 }
232
233 @Override
234 public void removeAdapter(ILocalSearchAdapter adapter) {
235 this.adapters.remove(adapter);
236 adapter.adapterUnregistered(this);
237 }
238
239 @Override
240 public void addAdapters(List<ILocalSearchAdapter> adapters) {
241 this.adapters.addAll(adapters);
242 for (ILocalSearchAdapter adapter : adapters) {
243 adapter.adapterRegistered(this);
244 }
245 }
246
247 @Override
248 public void removeAdapters(List<ILocalSearchAdapter> adapters) {
249 this.adapters.removeAll(adapters);
250 for (ILocalSearchAdapter adapter : adapters) {
251 adapter.adapterUnregistered(this);
252 }
253 }
254
255 public int getParameterCount() {
256 return planDescriptor.getQuery().getParameters().size();
257 }
258
259 private void matchingStarted() {
260 for (ILocalSearchAdapter adapter : adapters) {
261 adapter.patternMatchingStarted(this);
262 }
263 }
264
265 /**
266 * @since 2.0
267 */
268 public Stream<Tuple> streamMatches(final Object[] parameterValues) {
269 matchingStarted();
270 PlanExecutionIterator it = new PlanExecutionIteratorWithArrayParameters(plan.iterator(), parameterValues);
271 return StreamSupport.stream(Spliterators.spliteratorUnknownSize(it,
272 Spliterator.IMMUTABLE | Spliterator.NONNULL | Spliterator.DISTINCT), false);
273 }
274
275 /**
276 * @since 2.0
277 */
278 public Stream<Tuple> streamMatches(TupleMask parameterSeedMask, final ITuple parameterValues) {
279 matchingStarted();
280 PlanExecutionIterator it = new PlanExecutionIteratorWithTupleParameters(
281 plan.iterator(), parameterSeedMask, parameterValues);
282 return StreamSupport.stream(Spliterators.spliteratorUnknownSize(it,
283 Spliterator.IMMUTABLE | Spliterator.NONNULL | Spliterator.DISTINCT), false);
284 }
285
286 /**
287 * Returns the query specification this matcher used as source for the implementation
288 * @return never null
289 */
290 public PQuery getQuerySpecification() {
291 return planDescriptor.getQuery();
292 }
293
294
295 /**
296 * @since 1.5
297 */
298 public IPlanDescriptor getPlanDescriptor() {
299 return planDescriptor;
300 }
301}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/MatcherReference.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/MatcherReference.java
new file mode 100644
index 00000000..6bf25192
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/MatcherReference.java
@@ -0,0 +1,97 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Zoltan Ujhelyi, Marton Bur, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher;
10
11import java.util.Set;
12
13import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
15import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
16
17public class MatcherReference {
18 final PQuery query;
19 final Set<PParameter> adornment;
20
21 /**
22 * Hints that can override the callee's own hints. This field is intentionally left out from hashCode and equals
23 */
24 final QueryEvaluationHint hints;
25
26 /**
27 * @since 1.4
28 */
29 public MatcherReference(PQuery query, Set<PParameter> adornment, QueryEvaluationHint hints) {
30 super();
31 this.query = query;
32 this.adornment = adornment;
33 this.hints = hints;
34 }
35
36 public MatcherReference(PQuery query, Set<PParameter> adornment){
37 this(query, adornment, null);
38 }
39
40 public PQuery getQuery() {
41 return query;
42 }
43 public Set<PParameter> getAdornment() {
44 return adornment;
45 }
46 @Override
47 public int hashCode() {
48 final int prime = 31;
49 int result = 1;
50
51 result = prime * result + ((adornment == null) ? 0 : adornment.hashCode());
52 result = prime * result + ((query == null) ? 0 : query.hashCode());
53 return result;
54 }
55 @Override
56 public boolean equals(Object obj) {
57 if (this == obj)
58 return true;
59 if (obj == null)
60 return false;
61 if (getClass() != obj.getClass())
62 return false;
63 MatcherReference other = (MatcherReference) obj;
64 if (adornment == null) {
65 if (other.adornment != null)
66 return false;
67 } else if (!adornment.equals(other.adornment))
68 return false;
69 if (query == null) {
70 if (other.query != null)
71 return false;
72 } else if (!query.equals(other.query))
73 return false;
74 return true;
75 }
76
77 /**
78 * @return the hints to override the called reference's own hints with. Can be null.
79 * @since 1.4
80 */
81 public QueryEvaluationHint getHints() {
82 return hints;
83 }
84
85 @Override
86 public String toString() {
87 StringBuilder sb = new StringBuilder();
88 sb.append(query.getFullyQualifiedName());
89 sb.append("(");
90 for(PParameter p : query.getParameters()){
91 sb.append(adornment.contains(p) ? "b" : "f");
92 }
93 sb.append(")");
94 return sb.toString();
95 }
96
97} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AbstractLocalSearchResultProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AbstractLocalSearchResultProvider.java
new file mode 100644
index 00000000..1ae24d2d
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AbstractLocalSearchResultProvider.java
@@ -0,0 +1,532 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import java.lang.reflect.InvocationTargetException;
12import java.util.ArrayList;
13import java.util.Collection;
14import java.util.Collections;
15import java.util.HashMap;
16import java.util.HashSet;
17import java.util.LinkedHashSet;
18import java.util.LinkedList;
19import java.util.List;
20import java.util.Map;
21import java.util.Objects;
22import java.util.Optional;
23import java.util.Queue;
24import java.util.Set;
25import java.util.concurrent.Callable;
26import java.util.stream.Collectors;
27import java.util.stream.IntStream;
28import java.util.stream.Stream;
29
30import tools.refinery.viatra.runtime.localsearch.exceptions.LocalSearchException;
31import tools.refinery.viatra.runtime.localsearch.matcher.CallWithAdornment;
32import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
33import tools.refinery.viatra.runtime.localsearch.matcher.LocalSearchMatcher;
34import tools.refinery.viatra.runtime.localsearch.matcher.MatcherReference;
35import tools.refinery.viatra.runtime.localsearch.plan.IPlanDescriptor;
36import tools.refinery.viatra.runtime.localsearch.plan.IPlanProvider;
37import tools.refinery.viatra.runtime.localsearch.plan.SearchPlan;
38import tools.refinery.viatra.runtime.localsearch.plan.SearchPlanForBody;
39import tools.refinery.viatra.runtime.localsearch.planner.compiler.IOperationCompiler;
40import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
41import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
42import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
43import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
44import tools.refinery.viatra.runtime.matchers.backend.IUpdateable;
45import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
46import tools.refinery.viatra.runtime.matchers.backend.QueryHintOption;
47import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
48import tools.refinery.viatra.runtime.matchers.context.IInputKey;
49import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
50import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
51import tools.refinery.viatra.runtime.matchers.context.IndexingService;
52import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
53import tools.refinery.viatra.runtime.matchers.planning.helpers.FunctionalDependencyHelper;
54import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
55import tools.refinery.viatra.runtime.matchers.psystem.PBody;
56import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
57import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
58import tools.refinery.viatra.runtime.matchers.psystem.queries.PQueries;
59import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
60import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IFlattenCallPredicate;
61import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
62import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
63import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
64import tools.refinery.viatra.runtime.matchers.util.Accuracy;
65
66/**
67 * @author Zoltan Ujhelyi
68 * @since 1.7
69 *
70 */
71public abstract class AbstractLocalSearchResultProvider implements IQueryResultProvider {
72
73 protected final LocalSearchBackend backend;
74 protected final IQueryBackendContext backendContext;
75 protected final IQueryRuntimeContext runtimeContext;
76 protected final PQuery query;
77 protected final QueryEvaluationHint userHints;
78 protected final Map<PQuery, LocalSearchHints> hintCache = new HashMap<>();
79 protected final IPlanProvider planProvider;
80 private static final String PLAN_CACHE_KEY = AbstractLocalSearchResultProvider.class.getName() + "#planCache";
81 private final Map<MatcherReference, IPlanDescriptor> planCache;
82 protected final ISearchContext searchContext;
83 /**
84 * @since 2.1
85 */
86 protected ResultProviderRequestor resultProviderRequestor;
87
88 /**
89 * @since 1.5
90 */
91 @SuppressWarnings({ "unchecked"})
92 public AbstractLocalSearchResultProvider(LocalSearchBackend backend, IQueryBackendContext context, PQuery query,
93 IPlanProvider planProvider, QueryEvaluationHint userHints) {
94 this.backend = backend;
95 this.backendContext = context;
96 this.query = query;
97
98 this.planProvider = planProvider;
99 this.userHints = userHints;
100 this.runtimeContext = context.getRuntimeContext();
101 this.resultProviderRequestor = backend.getResultProviderRequestor(query, userHints);
102 this.searchContext = new ISearchContext.SearchContext(backendContext, backend.getCache(), resultProviderRequestor);
103 this.planCache = backend.getCache().getValue(PLAN_CACHE_KEY, Map.class, HashMap::new);
104 }
105
106 protected abstract IOperationCompiler getOperationCompiler(IQueryBackendContext backendContext, LocalSearchHints configuration);
107
108 private IQueryRuntimeContext getRuntimeContext() {
109 return backend.getRuntimeContext();
110 }
111
112 private LocalSearchMatcher createMatcher(IPlanDescriptor plan, final ISearchContext searchContext) {
113 List<SearchPlan> executors = plan.getPlan().stream()
114 .map(input -> new SearchPlan(input.getBody(), input.getCompiledOperations(), input.calculateParameterMask(),
115 input.getVariableKeys()))
116 .collect(Collectors.toList());
117 return new LocalSearchMatcher(searchContext, plan, executors);
118 }
119
120 private IPlanDescriptor getOrCreatePlan(MatcherReference key, IQueryBackendContext backendContext, IOperationCompiler compiler, LocalSearchHints configuration, IPlanProvider planProvider) {
121 if (planCache.containsKey(key)){
122 return planCache.get(key);
123 } else {
124 IPlanDescriptor plan = planProvider.getPlan(backendContext, compiler,
125 resultProviderRequestor, configuration, key);
126 planCache.put(key, plan);
127 return plan;
128 }
129 }
130
131 private IPlanDescriptor getOrCreatePlan(MatcherReference key, IPlanProvider planProvider) {
132 if (planCache.containsKey(key)){
133 return planCache.get(key);
134 } else {
135 LocalSearchHints configuration = overrideDefaultHints(key.getQuery());
136 IOperationCompiler compiler = getOperationCompiler(backendContext, configuration);
137 IPlanDescriptor plan = planProvider.getPlan(backendContext, compiler,
138 resultProviderRequestor, configuration, key);
139 planCache.put(key, plan);
140 return plan;
141 }
142 }
143
144 private LocalSearchHints overrideDefaultHints(PQuery pQuery) {
145 if (hintCache.containsKey(pQuery)) {
146 return hintCache.get(pQuery);
147 } else {
148 LocalSearchHints hint = LocalSearchHints.getDefaultOverriddenBy(
149 computeOverridingHints(pQuery));
150 hintCache.put(pQuery, hint);
151 return hint;
152 }
153 }
154
155 /**
156 * Combine with {@link QueryHintOption#getValueOrDefault(QueryEvaluationHint)} to access
157 * hint settings not covered by {@link LocalSearchHints}
158 */
159 private QueryEvaluationHint computeOverridingHints(PQuery pQuery) {
160 return backendContext.getHintProvider().getQueryEvaluationHint(pQuery).overrideBy(userHints);
161 }
162
163 /**
164 * Prepare this result provider. This phase is separated from the constructor to allow the backend to cache its instance before
165 * requesting preparation for its dependencies.
166 * @since 1.5
167 */
168 public void prepare() {
169 try {
170 runtimeContext.coalesceTraversals(() -> {
171 LocalSearchHints configuration = overrideDefaultHints(query);
172 if (configuration.isUseBase()) {
173 indexInitializationBeforePlanning();
174 }
175 prepareDirectDependencies();
176 runtimeContext.executeAfterTraversal(AbstractLocalSearchResultProvider.this::preparePlansForExpectedAdornments);
177 return null;
178 });
179 } catch (InvocationTargetException e) {
180 throw new QueryProcessingException("Error while building required indexes: {1}", new String[]{e.getTargetException().getMessage()}, "Error while building required indexes.", query, e);
181 }
182 }
183
184 protected void preparePlansForExpectedAdornments() {
185 // Plan for possible adornments
186 for (Set<PParameter> adornment : overrideDefaultHints(query).getAdornmentProvider().getAdornments(query)) {
187 MatcherReference reference = new MatcherReference(query, adornment, userHints);
188 LocalSearchHints configuration = overrideDefaultHints(query);
189 IOperationCompiler compiler = getOperationCompiler(backendContext, configuration);
190 IPlanDescriptor plan = getOrCreatePlan(reference, backendContext, compiler, configuration, planProvider);
191 // Index keys
192 try {
193 if (configuration.isUseBase()) {
194 indexKeys(plan.getIteratedKeys());
195 }
196 } catch (InvocationTargetException e) {
197 throw new QueryProcessingException(e.getMessage(), null, e.getMessage(), query, e);
198 }
199 //Prepare dependencies
200 for(SearchPlanForBody body: plan.getPlan()){
201 for(CallWithAdornment dependency : body.getDependencies()){
202 searchContext.getMatcher(dependency);
203 }
204 }
205 }
206 }
207
208 protected void prepareDirectDependencies() {
209 // Do not prepare for any adornment at this point
210 IAdornmentProvider adornmentProvider = input -> Collections.emptySet();
211 QueryEvaluationHint adornmentHint = IAdornmentProvider.toHint(adornmentProvider);
212
213 for(IQueryReference call : getDirectDependencies()){
214 resultProviderRequestor.requestResultProvider(call, adornmentHint);
215 }
216 }
217
218 /**
219 * This method is called before planning start to allow indexing. It is important to note that this method is called
220 * inside a coalesceTraversals block, meaning (1) it is safe to add multiple registration requests as necessary, but
221 * (2) no value or statistics is available from the index.
222 *
223 * @throws ViatraQueryRuntimeException
224 */
225 protected void indexInitializationBeforePlanning() {
226 // By default, no indexing is necessary
227 }
228
229 /**
230 * Collects and indexes all types _directly_ referred by the PQuery {@link #query}. Types indirect
231 * @param requiredIndexingServices
232 */
233 protected void indexReferredTypesOfQuery(PQuery query, IndexingService requiredIndexingServices) {
234 PQueries.directlyRequiredTypesOfQuery(query, true /*only enumerables are considered for indexing */).forEach(
235 inputKey -> runtimeContext.ensureIndexed(inputKey, requiredIndexingServices)
236 );
237 }
238
239 private Set<IQueryReference> getDirectDependencies() {
240 IFlattenCallPredicate flattenPredicate = overrideDefaultHints(query).getFlattenCallPredicate();
241 Queue<PQuery> queue = new LinkedList<>();
242 Set<PQuery> visited = new HashSet<>();
243 Set<IQueryReference> result = new HashSet<>();
244 queue.add(query);
245
246 while(!queue.isEmpty()){
247 PQuery next = queue.poll();
248 visited.add(next);
249 for(PBody body : next.getDisjunctBodies().getBodies()){
250 for (IQueryReference call : body.getConstraintsOfType(IQueryReference.class)) {
251 if (call instanceof PositivePatternCall &&
252 flattenPredicate.shouldFlatten((PositivePatternCall) call))
253 {
254 PQuery dep = ((PositivePatternCall) call).getReferredQuery();
255 if (!visited.contains(dep)){
256 queue.add(dep);
257 }
258 } else {
259 result.add(call);
260 }
261 }
262 }
263 }
264 return result;
265 }
266
267 private LocalSearchMatcher initializeMatcher(Object[] parameters) {
268 return newLocalSearchMatcher(parameters);
269 }
270
271 private LocalSearchMatcher initializeMatcher(TupleMask parameterSeedMask) {
272 return newLocalSearchMatcher(parameterSeedMask.transformUnique(query.getParameters()));
273
274 }
275
276
277 /**
278 * @throws ViatraQueryRuntimeException
279 */
280 public LocalSearchMatcher newLocalSearchMatcher(ITuple parameters) {
281 final Set<PParameter> adornment = new HashSet<>();
282 for (int i = 0; i < parameters.getSize(); i++) {
283 if (parameters.get(i) != null) {
284 adornment.add(query.getParameters().get(i));
285 }
286 }
287
288 return newLocalSearchMatcher(adornment);
289 }
290
291 /**
292 * @throws ViatraQueryRuntimeException
293 */
294 public LocalSearchMatcher newLocalSearchMatcher(Object[] parameters) {
295 final Set<PParameter> adornment = new HashSet<>();
296 for (int i = 0; i < parameters.length; i++) {
297 if (parameters[i] != null) {
298 adornment.add(query.getParameters().get(i));
299 }
300 }
301
302 return newLocalSearchMatcher(adornment);
303 }
304
305 private LocalSearchMatcher newLocalSearchMatcher(final Set<PParameter> adornment) {
306 final MatcherReference reference = new MatcherReference(query, adornment, userHints);
307
308 IPlanDescriptor plan = getOrCreatePlan(reference, planProvider);
309 if (overrideDefaultHints(reference.getQuery()).isUseBase()){
310 try {
311 indexKeys(plan.getIteratedKeys());
312 } catch (InvocationTargetException e) {
313 throw new LocalSearchException("Could not index keys", e);
314 }
315 }
316
317 LocalSearchMatcher matcher = createMatcher(plan, searchContext);
318 matcher.addAdapters(backend.getAdapters());
319 return matcher;
320 }
321
322 private void indexKeys(final Iterable<IInputKey> keys) throws InvocationTargetException {
323 final IQueryRuntimeContext qrc = getRuntimeContext();
324 qrc.coalesceTraversals(new Callable<Void>() {
325
326 @Override
327 public Void call() throws Exception {
328 for(IInputKey key : keys){
329 if (key.isEnumerable()) {
330 qrc.ensureIndexed(key, IndexingService.INSTANCES);
331 }
332 }
333 return null;
334 }
335 });
336 }
337
338 @Override
339 public boolean hasMatch(Object[] parameters) {
340 final LocalSearchMatcher matcher = initializeMatcher(parameters);
341 return matcher.streamMatches(parameters).findAny().isPresent();
342 }
343
344 @Override
345 public boolean hasMatch(TupleMask parameterSeedMask, ITuple parameters) {
346 final LocalSearchMatcher matcher = initializeMatcher(parameterSeedMask);
347 return matcher.streamMatches(parameterSeedMask, parameters).findAny().isPresent();
348 }
349
350 @Override
351 public Optional<Tuple> getOneArbitraryMatch(Object[] parameters) {
352 final LocalSearchMatcher matcher = initializeMatcher(parameters);
353 return matcher.streamMatches(parameters).findAny();
354 }
355
356 @Override
357 public Optional<Tuple> getOneArbitraryMatch(TupleMask parameterSeedMask, ITuple parameters) {
358 final LocalSearchMatcher matcher = initializeMatcher(parameterSeedMask);
359 return matcher.streamMatches(parameterSeedMask, parameters).findAny();
360 }
361
362 @Override
363 public int countMatches(Object[] parameters) {
364 final LocalSearchMatcher matcher = initializeMatcher(parameters);
365 // Count returns long; casting to int - in case of integer overflow casting will throw the exception
366 return (int) matcher.streamMatches(parameters).count();
367 }
368
369 @Override
370 public int countMatches(TupleMask parameterSeedMask, ITuple parameters) {
371 final LocalSearchMatcher matcher = initializeMatcher(parameterSeedMask);
372 // Count returns long; casting to int - in case of integer overflow casting will throw the exception
373 return (int) matcher.streamMatches(parameterSeedMask, parameters).count();
374 }
375
376 private static final double ESTIMATE_CEILING = Long.MAX_VALUE / 16.0;
377
378 @Override
379 public Optional<Long> estimateCardinality(TupleMask groupMask, Accuracy requiredAccuracy) {
380 if (Accuracy.BEST_UPPER_BOUND.atLeastAsPreciseAs(requiredAccuracy)) { // approximate using parameter types
381 final List<PParameter> parameters = query.getParameters();
382 final Map<Set<Integer>, Set<Integer>> dependencies = backendContext.getQueryAnalyzer()
383 .getProjectedFunctionalDependencies(query, false);
384
385 List<Integer> projectionIndices = groupMask.getIndicesAsList();
386
387 return estimateParameterCombinations(requiredAccuracy, parameters, dependencies,
388 projectionIndices,
389 Collections.emptySet() /* No parameters with fixed value */).map(Double::longValue);
390 }
391 else return Optional.empty();
392 }
393
394 @Override
395 public Optional<Double> estimateAverageBucketSize(TupleMask groupMask, Accuracy requiredAccuracy) {
396 if (Accuracy.BEST_UPPER_BOUND.atLeastAsPreciseAs(requiredAccuracy)) { // approximate using parameter types
397 final List<PParameter> parameters = query.getParameters();
398 final Map<Set<Integer>, Set<Integer>> dependencies = backendContext.getQueryAnalyzer()
399 .getProjectedFunctionalDependencies(query, false);
400
401 // all parameters used for the estimation - determinized order
402 final List<Integer> allParameterIndices =
403 IntStream.range(0, parameters.size()).boxed().collect(Collectors.toList());
404
405 // some free parameters are functionally determined by bound parameters
406 final Set<Integer> boundOrImplied = FunctionalDependencyHelper.closureOf(groupMask.getIndicesAsList(),
407 dependencies);
408
409 return estimateParameterCombinations(requiredAccuracy, parameters, dependencies,
410 allParameterIndices,
411 boundOrImplied);
412 }
413 else return Optional.empty();
414 }
415
416 /**
417 * @since 2.1
418 * @noreference This method is not intended to be referenced by clients.
419 */
420 public double estimateCost(TupleMask inputBindingMask) {
421 // TODO this is currently an abstract cost, not really a branching factor
422
423 HashSet<PParameter> adornment = new HashSet<>(inputBindingMask.transform(query.getParameters()));
424 final MatcherReference reference = new MatcherReference(query, adornment, userHints);
425 IPlanDescriptor plan = getOrCreatePlan(reference, planProvider);
426
427 return plan.getPlan().stream().mapToDouble(SearchPlanForBody::getCost).sum();
428 }
429
430 /**
431 * Approximates using parameter types
432 */
433 private Optional<Double> estimateParameterCombinations(
434 Accuracy requiredAccuracy,
435 final List<PParameter> parameters,
436 final Map<Set<Integer>, Set<Integer>> functionalDependencies,
437 final Collection<Integer> parameterIndicesToEstimate,
438 final Set<Integer> otherDeterminingIndices)
439 {
440 // keep order deterministic
441 LinkedHashSet<Integer> freeParameterIndices = new LinkedHashSet<>(parameterIndicesToEstimate);
442
443 // determining indices are bound
444 freeParameterIndices.removeAll(otherDeterminingIndices);
445
446 // some free parameters are functionally determined by other free parameters
447 for (Integer candidateForRemoval : new ArrayList<>(freeParameterIndices)) {
448 List<Integer> others = Stream.concat(
449 otherDeterminingIndices.stream(),
450 freeParameterIndices.stream().filter(index -> !Objects.equals(index, candidateForRemoval))
451 ).collect(Collectors.toList());
452 Set<Integer> othersClosure = FunctionalDependencyHelper.closureOf(others, functionalDependencies);
453 if (othersClosure.contains(candidateForRemoval)) {
454 // other parameters functionally determine this mone, does not count towards estimate
455 freeParameterIndices.remove(candidateForRemoval);
456 }
457 }
458
459
460 Optional<Double> result = Optional.of(1.0);
461 // TODO this is currently works with declared types only. For better results, information from
462 // the Type inferrer should be included in the PSystem
463 for (int i = 0; (i < parameters.size()); i++) {
464 final IInputKey type = parameters.get(i).getDeclaredUnaryType();
465 if (freeParameterIndices.contains(i) && type != null) {
466 result = result.flatMap(accumulator ->
467 runtimeContext.estimateCardinality(type, TupleMask.identity(1), requiredAccuracy).map(multiplier ->
468 Math.min(accumulator * multiplier, ESTIMATE_CEILING /* avoid overflow */)
469 ));
470 }
471 }
472 // TODO better approximate cardinality based on plan, branching factors, etc.
473 return result;
474 }
475
476
477 @Override
478 public Stream<Tuple> getAllMatches(Object[] parameters) {
479 final LocalSearchMatcher matcher = initializeMatcher(parameters);
480 return matcher.streamMatches(parameters);
481 }
482
483 @Override
484 public Stream<Tuple> getAllMatches(TupleMask parameterSeedMask, ITuple parameters) {
485 final LocalSearchMatcher matcher = initializeMatcher(parameterSeedMask);
486 return matcher.streamMatches(parameterSeedMask, parameters);
487 }
488
489 @Override
490 public IQueryBackend getQueryBackend() {
491 return backend;
492 }
493
494 @Override
495 public void addUpdateListener(IUpdateable listener, Object listenerTag, boolean fireNow) {
496 // throw new UnsupportedOperationException(UPDATE_LISTENER_NOT_SUPPORTED);
497 }
498
499 @Override
500 public void removeUpdateListener(Object listenerTag) {
501 // throw new UnsupportedOperationException(UPDATE_LISTENER_NOT_SUPPORTED);
502 }
503
504 /**
505 * @since 1.4
506 */
507 public IMatcherCapability getCapabilites() {
508 LocalSearchHints configuration = overrideDefaultHints(query);
509 return configuration;
510 }
511
512 /**
513 * Forgets all stored plans in this result provider. If no plans are stored, nothing happens.
514 *
515 * @since 2.0
516 * @noreference This method is not intended to be referenced by clients; it should only used by {@link LocalSearchBackend}.
517 */
518 public void forgetAllPlans() {
519 planCache.clear();
520 }
521
522 /**
523 * Returns a search plan for a given adornment if exists
524 *
525 * @return a search plan for the pattern with the given adornment, or null if none exists
526 * @since 2.0
527 * @noreference This method is not intended to be referenced by clients; it should only used by {@link LocalSearchBackend}.
528 */
529 public IPlanDescriptor getSearchPlan(Set<PParameter> adornment) {
530 return planCache.get(new MatcherReference(query, adornment));
531 }
532} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AllValidAdornments.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AllValidAdornments.java
new file mode 100644
index 00000000..f801163e
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/AllValidAdornments.java
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import java.util.Set;
12import java.util.stream.Collectors;
13
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
15import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameterDirection;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PQueries;
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
18import tools.refinery.viatra.runtime.matchers.util.Sets;
19
20
21/**
22 * This implementation calculates all valid adornments for the given query, respecting the parameter direction constraints.
23 *
24 * @author Grill Balázs
25 * @since 1.5
26 */
27public class AllValidAdornments implements IAdornmentProvider {
28
29 @Override
30 public Iterable<Set<PParameter>> getAdornments(PQuery query) {
31 final Set<PParameter> ins = query.getParameters().stream().filter(PQueries.parameterDirectionPredicate(PParameterDirection.IN)).collect(Collectors.toSet());
32 Set<PParameter> inouts = query.getParameters().stream().filter(PQueries.parameterDirectionPredicate(PParameterDirection.INOUT)).collect(Collectors.toSet());
33 Set<? extends Set<PParameter>> possibleInouts = Sets.powerSet(inouts);
34 return possibleInouts.stream().map(input -> Sets.union(ins, input)).collect(Collectors.toSet());
35 }
36
37}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenDisjunctive.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenDisjunctive.java
new file mode 100644
index 00000000..bf1b61b5
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenDisjunctive.java
@@ -0,0 +1,29 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
12import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IFlattenCallPredicate;
13
14/**
15 * Forbids flattening of patterns that have more than one body.
16 *
17 * @since 2.1
18
19 * @author Gabor Bergmann
20 *
21 */
22public class DontFlattenDisjunctive implements IFlattenCallPredicate {
23
24 @Override
25 public boolean shouldFlatten(PositivePatternCall positivePatternCall) {
26 return 1 >= positivePatternCall.getReferredQuery().getDisjunctBodies().getBodies().size();
27 }
28
29}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenIncrementalPredicate.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenIncrementalPredicate.java
new file mode 100644
index 00000000..1b918528
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/DontFlattenIncrementalPredicate.java
@@ -0,0 +1,44 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
12import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint.BackendRequirement;
13import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
14import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IFlattenCallPredicate;
15
16/**
17 * This implementation forbids flattening of patterns marked to be executed with a caching / incremental backend.
18 * This makes is possible for the user to configure hybrid matching via using
19 * the 'search' and 'incremental keywords in the pattern definition file.
20 *
21 * @since 1.5
22 *
23 */
24public class DontFlattenIncrementalPredicate implements IFlattenCallPredicate {
25
26 @Override
27 public boolean shouldFlatten(PositivePatternCall positivePatternCall) {
28 QueryEvaluationHint evaluationHints = positivePatternCall.getReferredQuery().getEvaluationHints();
29 if (evaluationHints == null) return true;
30
31 BackendRequirement backendRequirementType = evaluationHints.getQueryBackendRequirementType();
32 switch(backendRequirementType) {
33 case DEFAULT_CACHING:
34 return false;
35 case SPECIFIC:
36 return !evaluationHints.getQueryBackendFactory().isCaching();
37 case UNSPECIFIED:
38 case DEFAULT_SEARCH:
39 default:
40 return true;
41 }
42 }
43
44}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/GenericLocalSearchResultProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/GenericLocalSearchResultProvider.java
new file mode 100644
index 00000000..ed6c1e5f
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/GenericLocalSearchResultProvider.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import tools.refinery.viatra.runtime.localsearch.plan.IPlanProvider;
12import tools.refinery.viatra.runtime.localsearch.planner.compiler.GenericOperationCompiler;
13import tools.refinery.viatra.runtime.localsearch.planner.compiler.IOperationCompiler;
14import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
15import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
16import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
17import tools.refinery.viatra.runtime.matchers.context.IndexingService;
18import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
19
20/**
21 * @author Zoltan Ujhelyi
22 * @since 1.7
23 *
24 */
25public class GenericLocalSearchResultProvider extends AbstractLocalSearchResultProvider {
26
27 /**
28 * @throws ViatraQueryRuntimeException
29 */
30 public GenericLocalSearchResultProvider(LocalSearchBackend backend, IQueryBackendContext context, PQuery query,
31 IPlanProvider planProvider, QueryEvaluationHint userHints) {
32 super(backend, context, query, planProvider, userHints);
33 }
34
35 @Override
36 protected void indexInitializationBeforePlanning() {
37 super.indexInitializationBeforePlanning();
38
39 indexReferredTypesOfQuery(query, IndexingService.INSTANCES);
40 indexReferredTypesOfQuery(query, IndexingService.STATISTICS);
41 }
42
43 @Override
44 protected IOperationCompiler getOperationCompiler(IQueryBackendContext backendContext,
45 LocalSearchHints configuration) {
46 return new GenericOperationCompiler(runtimeContext);
47 }
48
49}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/IAdornmentProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/IAdornmentProvider.java
new file mode 100644
index 00000000..86058be0
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/IAdornmentProvider.java
@@ -0,0 +1,72 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import java.util.Collections;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
15import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint.BackendRequirement;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
18
19/**
20 * An adornment provider is used to define the adornments the pattern matcher should prepare for.
21 *
22 * <p>A default implementation is available in {@link AllValidAdornments} that describes all
23 * adornments fulfilling the parameter direction declarations;
24 * another default option (with better performance but restricted applicability) is {@link LazyPlanningAdornments}.
25 *
26 * <br><br>
27 *
28 * Users may implement this interface to limit the number of prepared plans based on some runtime information:
29 *
30 * <pre>
31 * class SomeAdornments{
32 *
33 * public Iterable&lt;Set&lt;{@link PParameter}>> getAdornments({@link PQuery} query){
34 * if (SomeGeneratedQuerySpecification.instance().getInternalQueryRepresentation().equals(query)){
35 * return Collections.singleton(Sets.filter(Sets.newHashSet(query.getParameters()), new Predicate<PParameter>() {
36 *
37 * &#64;Override
38 * public boolean apply(PParameter input) {
39 * // Decide whether this particular parameter will be bound
40 * return false;
41 * }
42 * }));
43 * }
44 * // Returning an empty iterable is safe for unknown queries
45 * return Collections.emptySet();
46 * }
47 *
48 * }
49 * </pre>
50 *
51 * @author Grill Balázs
52 * @since 1.5
53 *
54 */
55public interface IAdornmentProvider {
56
57 /**
58 * The bound parameter sets
59 */
60 public Iterable<Set<PParameter>> getAdornments(PQuery query);
61
62 /**
63 * @return a simple hint that only overrides the adornment provider
64 * @since 2.1
65 */
66 public static QueryEvaluationHint toHint(IAdornmentProvider adornmentProvider) {
67 return new QueryEvaluationHint(
68 Collections.singletonMap(LocalSearchHintOptions.ADORNMENT_PROVIDER, adornmentProvider),
69 BackendRequirement.UNSPECIFIED);
70 }
71
72}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LazyPlanningAdornments.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LazyPlanningAdornments.java
new file mode 100644
index 00000000..30b3689f
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LazyPlanningAdornments.java
@@ -0,0 +1,41 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import java.util.Collections;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
15import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
16
17/**
18 * This adornment provider does not trigger the preparation of any plans.
19 * Actual query plans will be computed on demand, when the first actual match request is made with a given adornment.
20 *
21 * <p> Caution: this is a safe default adornment provider for {@link GenericLocalSearchResultProvider} only;
22 * do not use for the EMF-specific LS backend.
23 *
24 * <p> The benefits is in execution time: query planning costs for adornments are postponed until first usage
25 * or even entirely avoided (when adornment is never used in practice).
26 * However, query evaluation time may become less predictable, as the first matcher call (with a given adornment)
27 * will include the planning cost.
28 * For benchmarking or other purposes where this is not desirable, use an adornment provider that demands plan precomputation for all necessary adornments.
29 *
30 * @author Gabor Bergmann
31 * @since 2.1
32 *
33 */
34public class LazyPlanningAdornments implements IAdornmentProvider {
35
36 @Override
37 public Iterable<Set<PParameter>> getAdornments(PQuery query) {
38 return Collections.emptySet();
39 }
40
41}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchBackend.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchBackend.java
new file mode 100644
index 00000000..ae51e2b0
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchBackend.java
@@ -0,0 +1,259 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import java.lang.reflect.InvocationTargetException;
12import java.util.ArrayList;
13import java.util.Arrays;
14import java.util.Collection;
15import java.util.Collections;
16import java.util.HashSet;
17import java.util.List;
18import java.util.Map;
19import java.util.Set;
20import java.util.stream.Stream;
21
22import tools.refinery.viatra.runtime.localsearch.exceptions.LocalSearchException;
23import tools.refinery.viatra.runtime.localsearch.matcher.ILocalSearchAdapter;
24import tools.refinery.viatra.runtime.localsearch.plan.IPlanDescriptor;
25import tools.refinery.viatra.runtime.localsearch.plan.IPlanProvider;
26import tools.refinery.viatra.runtime.localsearch.plan.SimplePlanProvider;
27import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
28import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
29import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
30import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
31import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
32import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
33import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
34import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
35import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
36import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
37import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
38import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
39import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
40import tools.refinery.viatra.runtime.matchers.util.ICache;
41import tools.refinery.viatra.runtime.matchers.util.PurgableCache;
42
43/**
44 * @author Marton Bur, Zoltan Ujhelyi
45 * @noextend This class is not intended to be subclassed by clients.
46 */
47public abstract class LocalSearchBackend implements IQueryBackend {
48
49 IQueryBackendContext context;
50 IPlanProvider planProvider;
51 private final Set<ILocalSearchAdapter> adapters = new HashSet<>();
52
53 private final PurgableCache generalCache;
54
55 private final Map<PQuery, List<AbstractLocalSearchResultProvider>> resultProviderCache = CollectionsFactory.createMap();
56
57
58 /**
59 * @since 1.5
60 */
61 public LocalSearchBackend(IQueryBackendContext context) {
62 super();
63 this.context = context;
64 this.generalCache = new PurgableCache();
65 this.planProvider = new SimplePlanProvider(context.getLogger());
66 }
67
68 @Override
69 public void flushUpdates() {
70
71 }
72
73 @Override
74 public IQueryResultProvider getResultProvider(PQuery query) {
75 return getResultProvider(query, null);
76 }
77
78 /**
79 * @since 1.4
80 */
81 @Override
82 public IQueryResultProvider getResultProvider(PQuery query, QueryEvaluationHint hints) {
83
84 final QueryEvaluationHint callHints = getHintProvider().getQueryEvaluationHint(query).overrideBy(hints);
85 IMatcherCapability requestedCapability = context.getRequiredMatcherCapability(query, callHints);
86 for(AbstractLocalSearchResultProvider existingResultProvider : resultProviderCache.getOrDefault(query, Collections.emptyList())){
87 if (requestedCapability.canBeSubstitute(existingResultProvider.getCapabilites())){
88 return existingResultProvider;
89 }
90 }
91
92 AbstractLocalSearchResultProvider resultProvider = initializeResultProvider(query, hints);
93 resultProviderCache.computeIfAbsent(query, k->new ArrayList<>()).add(resultProvider);
94 resultProvider.prepare();
95 return resultProvider;
96 }
97
98 /**
99 * Returns a requestor that this backend uses while processing pattern calls <i>from</i> this query.
100 * @noreference This method is not intended to be referenced by clients.
101 * @since 2.1
102 */
103 public ResultProviderRequestor getResultProviderRequestor(PQuery query, QueryEvaluationHint userHints) {
104 QueryEvaluationHint hintOnQuery =
105 context.getHintProvider().getQueryEvaluationHint(query).overrideBy(userHints);
106 LocalSearchHints defaultsApplied = LocalSearchHints.getDefaultOverriddenBy(hintOnQuery);
107
108 return new ResultProviderRequestor(this,
109 context.getResultProviderAccess(),
110 context.getHintProvider(),
111 defaultsApplied.getCallDelegationStrategy(),
112 userHints,
113 /* no global overrides */ null);
114 }
115
116 /**
117 * @throws ViatraQueryRuntimeException
118 * @since 1.7
119 */
120 protected abstract AbstractLocalSearchResultProvider initializeResultProvider(PQuery query, QueryEvaluationHint hints);
121
122 @Override
123 public void dispose() {
124 resultProviderCache.clear();
125 generalCache.purge();
126 }
127
128 @Override
129 public boolean isCaching() {
130 return false;
131 }
132
133 /**
134 * @since 2.0
135 */
136 @Override
137 public AbstractLocalSearchResultProvider peekExistingResultProvider(PQuery query) {
138 return resultProviderCache.getOrDefault(query, Collections.emptyList()).stream().findAny().orElse(null);
139 }
140
141 /**
142 * @since 1.4
143 */
144 public IQueryRuntimeContext getRuntimeContext() {
145 return context.getRuntimeContext();
146 }
147
148
149 /**
150 * @since 1.5
151 */
152 public QueryAnalyzer getQueryAnalyzer() {
153 return context.getQueryAnalyzer();
154 }
155
156
157 /**
158 * @since 1.4
159 */
160 public IQueryBackendHintProvider getHintProvider() {
161 return context.getHintProvider();
162 }
163
164 /**
165 * @since 1.5
166 */
167 public void addAdapter(ILocalSearchAdapter adapter){
168 adapters.add(adapter);
169 }
170
171 /**
172 * @since 1.5
173 */
174 public void removeAdapter(ILocalSearchAdapter adapter){
175 adapters.remove(adapter);
176 }
177
178 /**
179 * Return a copy of the current adapters
180 * @since 1.7
181 */
182 public List<ILocalSearchAdapter> getAdapters() {
183 return new ArrayList<>(adapters);
184 }
185
186 /**
187 * @since 1.5
188 */
189 public IQueryBackendContext getBackendContext() {
190 return context;
191 }
192
193 /**
194 * Returns the internal cache of the backend
195 * @since 1.7
196 * @noreference This method is not intended to be referenced by clients.
197 */
198 public ICache getCache() {
199 return generalCache;
200 }
201
202 /**
203 * Updates the previously stored search plans for one or more given queries, computing a new set of plans if
204 * necessary. The new plans created are the same that would be created by executing prepare on the given query
205 * definitions.
206 *
207 * @since 2.0
208 */
209 public void recomputePlans(PQuery... queries) {
210 recomputePlans(Arrays.stream(queries).flatMap(query -> resultProviderCache.getOrDefault(query, Collections.emptyList()).stream()));
211 }
212
213 /**
214 * Updates the previously stored search plans for one or more given queries, computing a new set of plans if
215 * necessary The new plans created are the same that would be created by executing prepare on the given query
216 * definitions.
217 *
218 * @since 2.0
219 */
220 public void recomputePlans(Collection<PQuery> queries) {
221 recomputePlans(queries.stream().flatMap(query -> resultProviderCache.getOrDefault(query, Collections.emptyList()).stream()));
222 }
223
224 /**
225 * Updates the previously stored search plans for one or more given queries, computing a new set of plans if
226 * necessary The new plans created are the same that would be created by executing prepare on the given query
227 * definitions.
228 *
229 * @since 2.0
230 */
231 public void recomputePlans() {
232 recomputePlans(resultProviderCache.values().stream().flatMap(List::stream));
233 }
234
235 private void recomputePlans(Stream<AbstractLocalSearchResultProvider> resultProviders) {
236 try {
237 context.getRuntimeContext().coalesceTraversals(() -> {
238 resultProviders.forEach(resultProvider -> {
239 resultProvider.forgetAllPlans();
240 resultProvider.prepare();
241 });
242 return null;
243 });
244 } catch (InvocationTargetException e) {
245 throw new LocalSearchException("Error while rebuilding plans: " + e.getMessage(), e);
246 }
247 }
248
249 /**
250 * Returns a search plan for a given query and adornment if such plan is already calculated.
251 *
252 * @return a previously calculated search plan for the given query and adornment, or null if no such plan exists
253 * @since 2.0
254 */
255 public IPlanDescriptor getSearchPlan(PQuery query, Set<PParameter> adornment) {
256 final AbstractLocalSearchResultProvider resultProvider = peekExistingResultProvider(query);
257 return (resultProvider == null) ? null : resultProvider.getSearchPlan(adornment);
258 }
259}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactory.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactory.java
new file mode 100644
index 00000000..1dd08f98
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactory.java
@@ -0,0 +1,65 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
12import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
13import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
14import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
15import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
17
18/**
19 * @author Marton Bur, Zoltan Ujhelyi
20 * @since 1.7
21 *
22 */
23public enum LocalSearchGenericBackendFactory implements IQueryBackendFactory {
24
25 INSTANCE;
26
27 /**
28 * @since 1.5
29 */
30 @Override
31 public IQueryBackend create(IQueryBackendContext context) {
32 return new LocalSearchBackend(context) {
33
34 @Override
35 protected AbstractLocalSearchResultProvider initializeResultProvider(PQuery query, QueryEvaluationHint hints) {
36 return new GenericLocalSearchResultProvider(this, context, query, planProvider, hints);
37 }
38
39 @Override
40 public IQueryBackendFactory getFactory() {
41 return INSTANCE;
42 }
43
44 };
45 }
46
47 @Override
48 public Class<? extends IQueryBackend> getBackendClass() {
49 return LocalSearchBackend.class;
50 }
51
52 /**
53 * @since 1.4
54 */
55 @Override
56 public IMatcherCapability calculateRequiredCapability(PQuery query, QueryEvaluationHint hint) {
57 return LocalSearchHints.parse(hint);
58 }
59
60 @Override
61 public boolean isCaching() {
62 return false;
63 }
64
65}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactoryProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactoryProvider.java
new file mode 100644
index 00000000..ea422d91
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchGenericBackendFactoryProvider.java
@@ -0,0 +1,24 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
12import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactoryProvider;
13
14/**
15 * @since 2.0
16 */
17public class LocalSearchGenericBackendFactoryProvider implements IQueryBackendFactoryProvider {
18
19 @Override
20 public IQueryBackendFactory getFactory() {
21 return LocalSearchGenericBackendFactory.INSTANCE;
22 }
23
24} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHintOptions.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHintOptions.java
new file mode 100644
index 00000000..43462204
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHintOptions.java
@@ -0,0 +1,70 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import tools.refinery.viatra.runtime.localsearch.planner.cost.ICostFunction;
12import tools.refinery.viatra.runtime.localsearch.planner.cost.impl.IndexerBasedConstraintCostFunction;
13import tools.refinery.viatra.runtime.matchers.backend.ICallDelegationStrategy;
14import tools.refinery.viatra.runtime.matchers.backend.QueryHintOption;
15import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IFlattenCallPredicate;
16
17/**
18 *
19 * @author Gabor Bergmann
20 * @since 1.5
21 * @noinstantiate This class is not intended to be instantiated by clients.
22 */
23public final class LocalSearchHintOptions {
24
25 private LocalSearchHintOptions() {
26 // Private constructor for utility class
27 }
28
29 public static final QueryHintOption<Boolean> USE_BASE_INDEX =
30 hintOption("USE_BASE_INDEX", true);
31
32 // This key can be used to influence the core planner algorithm
33 public static final QueryHintOption<Integer> PLANNER_TABLE_ROW_COUNT =
34 hintOption("PLANNER_TABLE_ROW_COUNT", 4);
35 /**
36 * Cost function to be used by the planner. Must implement {@link ICostFunction}
37 * @since 1.4
38 */
39 public static final QueryHintOption<ICostFunction> PLANNER_COST_FUNCTION =
40 hintOption("PLANNER_COST_FUNCTION", new IndexerBasedConstraintCostFunction());
41 /**
42 * Predicate to decide whether to flatten specific positive pattern calls {@link IFlattenCallPredicate}
43 * @since 1.4
44 */
45 public static final QueryHintOption<IFlattenCallPredicate> FLATTEN_CALL_PREDICATE =
46 hintOption("FLATTEN_CALL_PREDICATE", new DontFlattenDisjunctive());
47 /**
48 * Strategy to decide how hints (most importantly, backend selection) propagate across pattern calls.
49 * Must implement {@link ICallDelegationStrategy}.
50 * @since 2.1
51 */
52 public static final QueryHintOption<ICallDelegationStrategy> CALL_DELEGATION_STRATEGY =
53 hintOption("CALL_DELEGATION_STRATEGY", ICallDelegationStrategy.FULL_BACKEND_ADHESION);
54
55 /**
56 * A provider of expected adornments {@link IAdornmentProvider}.
57 *
58 * The safe default is {@link AllValidAdornments};
59 * however, the generic backend variant may safely use {@link LazyPlanningAdornments} instead.
60 *
61 * @since 1.5
62 */
63 public static final QueryHintOption<IAdornmentProvider> ADORNMENT_PROVIDER =
64 hintOption("ADORNMENT_PROVIDER", new AllValidAdornments());
65
66 // internal helper for conciseness
67 private static <T, V extends T> QueryHintOption<T> hintOption(String hintKeyLocalName, V defaultValue) {
68 return new QueryHintOption<>(LocalSearchHintOptions.class, hintKeyLocalName, defaultValue);
69 }
70}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHints.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHints.java
new file mode 100644
index 00000000..5f3895be
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchHints.java
@@ -0,0 +1,306 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.matcher.integration;
10
11import tools.refinery.viatra.runtime.localsearch.planner.cost.ICostFunction;
12import tools.refinery.viatra.runtime.localsearch.planner.cost.impl.IndexerBasedConstraintCostFunction;
13import tools.refinery.viatra.runtime.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction;
14import tools.refinery.viatra.runtime.matchers.backend.*;
15import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IFlattenCallPredicate;
16import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IRewriterTraceCollector;
17import tools.refinery.viatra.runtime.matchers.psystem.rewriters.NopTraceCollector;
18
19import java.util.HashMap;
20import java.util.Map;
21import java.util.Objects;
22
23import static tools.refinery.viatra.runtime.localsearch.matcher.integration.LocalSearchHintOptions.*;
24import static tools.refinery.viatra.runtime.matchers.backend.CommonQueryHintOptions.normalizationTraceCollector;
25
26/**
27 * Type safe builder and extractor for Local search specific hints
28 *
29 * @author Grill Balázs
30 * @since 1.4
31 *
32 */
33public final class LocalSearchHints implements IMatcherCapability {
34
35 private Boolean useBase = null;
36
37 private Integer rowCount = null;
38
39 private ICostFunction costFunction = null;
40
41 private IFlattenCallPredicate flattenCallPredicate = null;
42
43 private ICallDelegationStrategy callDelegationStrategy = null;
44
45 private IAdornmentProvider adornmentProvider = null;
46
47 private IRewriterTraceCollector traceCollector = NopTraceCollector.INSTANCE;
48
49 private IQueryBackendFactory backendFactory = null;
50
51 private LocalSearchHints() {}
52
53 /**
54 * Return the default settings overridden by the given hints
55 */
56 public static LocalSearchHints getDefaultOverriddenBy(QueryEvaluationHint overridingHint){
57 return parse(getDefault().build(overridingHint));
58 }
59
60 /**
61 * Default settings which are considered the most safe, providing a reasonable performance for most of the cases. Assumes the availability of the base indexer.
62 */
63 public static LocalSearchHints getDefault(){
64 return getDefaultGeneric();
65 }
66
67 /**
68 * Initializes the generic (not EMF specific) search backend with the default settings
69 * @since 1.7
70 */
71 public static LocalSearchHints getDefaultGeneric(){
72 LocalSearchHints result = new LocalSearchHints();
73 result.useBase = true; // Should be unused; but a false value might cause surprises as an engine-default hint
74 result.rowCount = 4;
75 result.costFunction = new IndexerBasedConstraintCostFunction(StatisticsBasedConstraintCostFunction.INVERSE_NAVIGATION_PENALTY_GENERIC);
76 result.flattenCallPredicate = FLATTEN_CALL_PREDICATE.getDefaultValue();
77 result.callDelegationStrategy = ICallDelegationStrategy.FULL_BACKEND_ADHESION;
78 result.adornmentProvider = new LazyPlanningAdornments();
79 result.backendFactory = LocalSearchGenericBackendFactory.INSTANCE;
80 return result;
81 }
82
83 /**
84 * Initializes the default search backend with hybrid-enabled settings
85 * @since 2.1
86 */
87 public static LocalSearchHints getDefaultHybrid(){
88 LocalSearchHints result = getDefault();
89 result.callDelegationStrategy = ICallDelegationStrategy.PARTIAL_BACKEND_ADHESION;
90 result.flattenCallPredicate = new IFlattenCallPredicate.And(
91 new DontFlattenIncrementalPredicate(), new DontFlattenDisjunctive());
92 return result;
93 }
94
95 /**
96 * Initializes the generic (not EMF specific) search backend with hybrid-enabled settings
97 * @since 2.1
98 */
99 public static LocalSearchHints getDefaultGenericHybrid(){
100 LocalSearchHints result = getDefaultGeneric();
101 result.callDelegationStrategy = ICallDelegationStrategy.PARTIAL_BACKEND_ADHESION;
102 result.flattenCallPredicate = new IFlattenCallPredicate.And(
103 new DontFlattenIncrementalPredicate(), new DontFlattenDisjunctive());
104 return result;
105 }
106
107 public static LocalSearchHints parse(QueryEvaluationHint hint){
108 LocalSearchHints result = new LocalSearchHints();
109
110 result.useBase = USE_BASE_INDEX.getValueOrNull(hint);
111 result.rowCount = PLANNER_TABLE_ROW_COUNT.getValueOrNull(hint);
112 result.flattenCallPredicate = FLATTEN_CALL_PREDICATE.getValueOrNull(hint);
113 result.callDelegationStrategy = CALL_DELEGATION_STRATEGY.getValueOrNull(hint);
114 result.costFunction = PLANNER_COST_FUNCTION.getValueOrNull(hint);
115 result.adornmentProvider = ADORNMENT_PROVIDER.getValueOrNull(hint);
116 result.traceCollector = normalizationTraceCollector.getValueOrDefault(hint);
117
118 return result;
119 }
120
121
122 private Map<QueryHintOption<?>, Object> calculateHintMap() {
123 Map<QueryHintOption<?>, Object> map = new HashMap<>();
124 if (useBase != null){
125 USE_BASE_INDEX.insertOverridingValue(map, useBase);
126 }
127 if (rowCount != null){
128 PLANNER_TABLE_ROW_COUNT.insertOverridingValue(map, rowCount);
129 }
130 if (costFunction != null){
131 PLANNER_COST_FUNCTION.insertOverridingValue(map, costFunction);
132 }
133 if (flattenCallPredicate != null){
134 FLATTEN_CALL_PREDICATE.insertOverridingValue(map, flattenCallPredicate);
135 }
136 if (callDelegationStrategy != null){
137 CALL_DELEGATION_STRATEGY.insertOverridingValue(map, callDelegationStrategy);
138 }
139 if (adornmentProvider != null){
140 ADORNMENT_PROVIDER.insertOverridingValue(map, adornmentProvider);
141 }
142 if (traceCollector != null){
143 normalizationTraceCollector.insertOverridingValue(map, traceCollector);
144 }
145 return map;
146 }
147
148 public QueryEvaluationHint build(){
149 Map<QueryHintOption<?>, Object> map = calculateHintMap();
150 return new QueryEvaluationHint(map, backendFactory);
151 }
152
153 /**
154 * @since 1.7
155 */
156 public QueryEvaluationHint build(QueryEvaluationHint overridingHint) {
157 if (overridingHint == null)
158 return build();
159
160 IQueryBackendFactory factory = (overridingHint.getQueryBackendFactory() == null)
161 ? this.backendFactory
162 : overridingHint.getQueryBackendFactory();
163
164 Map<QueryHintOption<?>, Object> hints = calculateHintMap();
165 if (overridingHint.getBackendHintSettings() != null) {
166 hints.putAll(overridingHint.getBackendHintSettings());
167 }
168
169 return new QueryEvaluationHint(hints, factory);
170 }
171
172 public boolean isUseBase() {
173 return useBase;
174 }
175
176 public ICostFunction getCostFunction() {
177 return costFunction;
178 }
179
180 public IFlattenCallPredicate getFlattenCallPredicate() {
181 return flattenCallPredicate;
182 }
183
184 /**
185 * @since 2.1
186 */
187 public ICallDelegationStrategy getCallDelegationStrategy() {
188 return callDelegationStrategy;
189 }
190
191 public Integer getRowCount() {
192 return rowCount;
193 }
194
195 /**
196 * @since 1.5
197 */
198 public IAdornmentProvider getAdornmentProvider() {
199 return adornmentProvider;
200 }
201
202 /**
203 * @since 1.6
204 */
205 public IRewriterTraceCollector getTraceCollector() {
206 return traceCollector == null ? normalizationTraceCollector.getDefaultValue() : traceCollector;
207 }
208
209 public LocalSearchHints setUseBase(boolean useBase) {
210 this.useBase = useBase;
211 return this;
212 }
213
214 public LocalSearchHints setRowCount(int rowCount) {
215 this.rowCount = rowCount;
216 return this;
217 }
218
219 public LocalSearchHints setCostFunction(ICostFunction costFunction) {
220 this.costFunction = costFunction;
221 return this;
222 }
223
224 public LocalSearchHints setFlattenCallPredicate(IFlattenCallPredicate flattenCallPredicate) {
225 this.flattenCallPredicate = flattenCallPredicate;
226 return this;
227 }
228
229
230 /**
231 * @since 2.1
232 */
233 public LocalSearchHints setCallDelegationStrategy(ICallDelegationStrategy callDelegationStrategy) {
234 this.callDelegationStrategy = callDelegationStrategy;
235 return this;
236 }
237
238 /**
239 * @since 1.6
240 */
241 public LocalSearchHints setTraceCollector(IRewriterTraceCollector traceCollector) {
242 this.traceCollector = traceCollector;
243 return this;
244 }
245
246 /**
247 * @since 1.5
248 */
249 public LocalSearchHints setAdornmentProvider(IAdornmentProvider adornmentProvider) {
250 this.adornmentProvider = adornmentProvider;
251 return this;
252 }
253
254 public static LocalSearchHints customizeUseBase(boolean useBase){
255 return new LocalSearchHints().setUseBase(useBase);
256 }
257
258 public static LocalSearchHints customizeRowCount(int rowCount){
259 return new LocalSearchHints().setRowCount(rowCount);
260 }
261
262 public static LocalSearchHints customizeCostFunction(ICostFunction costFunction){
263 return new LocalSearchHints().setCostFunction(costFunction);
264 }
265
266 public static LocalSearchHints customizeFlattenCallPredicate(IFlattenCallPredicate predicate){
267 return new LocalSearchHints().setFlattenCallPredicate(predicate);
268 }
269
270 /**
271 * @since 2.1
272 */
273 public static LocalSearchHints customizeCallDelegationStrategy(ICallDelegationStrategy strategy){
274 return new LocalSearchHints().setCallDelegationStrategy(strategy);
275 }
276
277 /**
278 * @since 1.5
279 */
280 public static LocalSearchHints customizeAdornmentProvider(IAdornmentProvider adornmentProvider){
281 return new LocalSearchHints().setAdornmentProvider(adornmentProvider);
282 }
283
284 /**
285 * @since 1.6
286 */
287 public static LocalSearchHints customizeTraceCollector(IRewriterTraceCollector traceCollector){
288 return new LocalSearchHints().setTraceCollector(traceCollector);
289 }
290
291 @Override
292 public boolean canBeSubstitute(IMatcherCapability capability) {
293 if (capability instanceof LocalSearchHints){
294 LocalSearchHints other = (LocalSearchHints)capability;
295 /*
296 * We allow substitution of matchers if their functionally relevant settings are equal.
297 */
298 return Objects.equals(other.useBase, useBase);
299 }
300 /*
301 * For any other cases (e.g. for Rete), we cannot assume
302 * that matchers created by LS are functionally equivalent.
303 */
304 return false;
305 }
306}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/CheckOperationExecutor.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/CheckOperationExecutor.java
new file mode 100644
index 00000000..295ac110
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/CheckOperationExecutor.java
@@ -0,0 +1,50 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations;
10
11import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
12import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
13import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation.ISearchOperationExecutor;
14
15/**
16 * Abstract base class for search operations that check only the already set variables.
17 *
18 * @noextend This class is not intended to be subclassed by clients.
19 * @since 2.0
20 */
21public abstract class CheckOperationExecutor implements ISearchOperationExecutor {
22
23 /**
24 * The executed field ensures that the second call of the check always returns false, resulting in a quick
25 * backtracking.
26 */
27 private boolean executed;
28
29 @Override
30 public void onInitialize(MatchingFrame frame, ISearchContext context) {
31 executed = false;
32 }
33
34 @Override
35 public void onBacktrack(MatchingFrame frame, ISearchContext context) {
36 }
37
38 @Override
39 public boolean execute(MatchingFrame frame, ISearchContext context) {
40 executed = executed ? false : check(frame, context);
41 return executed;
42 }
43
44 /**
45 * Executes the checking operation
46 * @since 1.7
47 */
48 protected abstract boolean check(MatchingFrame frame, ISearchContext context) ;
49
50}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/ExtendOperationExecutor.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/ExtendOperationExecutor.java
index 37177cbf..a72c30dd 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/ExtendOperationExecutor.java
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/ExtendOperationExecutor.java
@@ -4,22 +4,24 @@
4 * This program and the accompanying materials are made available under the 4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at 5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html. 6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
7 * SPDX-License-Identifier: EPL-2.0 8 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/ 9 *******************************************************************************/
9package tools.refinery.store.query.viatra.internal.localsearch; 10package tools.refinery.viatra.runtime.localsearch.operations;
10 11
11import org.eclipse.viatra.query.runtime.localsearch.MatchingFrame; 12import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
12import org.eclipse.viatra.query.runtime.localsearch.matcher.ISearchContext; 13import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
13import org.eclipse.viatra.query.runtime.localsearch.operations.ISearchOperation.ISearchOperationExecutor; 14import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation.ISearchOperationExecutor;
14 15
15import java.util.Iterator; 16import java.util.Iterator;
16 17
17/** 18/**
18 * An operation that can be used to enumerate all possible values for a single position based on a constraint 19 * An operation that can be used to enumerate all possible values for a single position based on a constraint
19 * @author Zoltan Ujhelyi, Akos Horvath 20 * @author Zoltan Ujhelyi, Akos Horvath
21 * @noextend This class is not intended to be subclassed by clients.
20 * @since 2.0 22 * @since 2.0
21 */ 23 */
22abstract class ExtendOperationExecutor<T> implements ISearchOperationExecutor { 24public abstract class ExtendOperationExecutor<T> implements ISearchOperationExecutor {
23 25
24 private Iterator<? extends T> it; 26 private Iterator<? extends T> it;
25 27
@@ -27,7 +29,6 @@ abstract class ExtendOperationExecutor<T> implements ISearchOperationExecutor {
27 * Returns an iterator with the possible options from the current state 29 * Returns an iterator with the possible options from the current state
28 * @since 2.0 30 * @since 2.0
29 */ 31 */
30 @SuppressWarnings("squid:S1452")
31 protected abstract Iterator<? extends T> getIterator(MatchingFrame frame, ISearchContext context); 32 protected abstract Iterator<? extends T> getIterator(MatchingFrame frame, ISearchContext context);
32 /** 33 /**
33 * Updates the frame with the next element of the iterator. Called during {@link #execute(MatchingFrame, ISearchContext)}. 34 * Updates the frame with the next element of the iterator. Called during {@link #execute(MatchingFrame, ISearchContext)}.
@@ -57,14 +58,13 @@ abstract class ExtendOperationExecutor<T> implements ISearchOperationExecutor {
57 } 58 }
58 59
59 /** 60 /**
60 * Fixed version of {@link org.eclipse.viatra.query.runtime.localsearch.operations.ExtendOperationExecutor#execute} 61 * Fixed version that handles failed unification of variables correctly.
61 * that handles failed unification of variables correctly.
62 * @param frame The matching frame to extend. 62 * @param frame The matching frame to extend.
63 * @param context The search context. 63 * @param context The search context.
64 * @return {@code true} if an extension was found, {@code false} otherwise. 64 * @return {@code true} if an extension was found, {@code false} otherwise.
65 */ 65 */
66 @Override 66 @Override
67 public boolean execute(MatchingFrame frame, ISearchContext context) { 67 public boolean execute(MatchingFrame frame, ISearchContext context) {
68 while (it.hasNext()) { 68 while (it.hasNext()) {
69 var newValue = it.next(); 69 var newValue = it.next();
70 if (fillInValue(newValue, frame, context)) { 70 if (fillInValue(newValue, frame, context)) {
@@ -72,5 +72,6 @@ abstract class ExtendOperationExecutor<T> implements ISearchOperationExecutor {
72 } 72 }
73 } 73 }
74 return false; 74 return false;
75 } 75 }
76
76} 77}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IIteratingSearchOperation.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IIteratingSearchOperation.java
new file mode 100644
index 00000000..6fee0097
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IIteratingSearchOperation.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations;
10
11import tools.refinery.viatra.runtime.matchers.context.IInputKey;
12
13/**
14 * Denotes a {@link ISearchOperation} which involves iterating over an instances of an {@link IInputKey}
15 *
16 * @author Grill Balázs
17 * @since 1.4
18 *
19 */
20public interface IIteratingSearchOperation extends ISearchOperation{
21
22 /**
23 * Get the {@link IInputKey} which instances this operation iterates upon.
24 */
25 public IInputKey getIteratedInputKey();
26
27}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IPatternMatcherOperation.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IPatternMatcherOperation.java
new file mode 100644
index 00000000..d8106329
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/IPatternMatcherOperation.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations;
10
11import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
12
13/**
14 * Marker interface for pattern matcher call operations, such as positive and negative pattern calls or match aggregators.
15 *
16 * @author Zoltan Ujhelyi
17 * @since 1.7
18 */
19public interface IPatternMatcherOperation {
20
21 /**
22 * Returns the precomputed call information associated with the current operation
23 * @since 2.0
24 */
25 CallInformation getCallInformation();
26}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/ISearchOperation.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/ISearchOperation.java
new file mode 100644
index 00000000..eb6243ed
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/ISearchOperation.java
@@ -0,0 +1,88 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations;
10
11import java.util.List;
12import java.util.function.Function;
13
14import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
15import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
16import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
17
18/**
19 * Represents a search operation executable by the LS engine. It is expected that an operation can be shared among
20 * multiple LS matchers, but the created executors are not.
21 *
22 * @author Zoltan Ujhelyi
23 *
24 */
25public interface ISearchOperation {
26
27 /**
28 * Initializes a new operation executor for the given operation. Repeated calls must return different executor
29 * instances.
30 *
31 * @since 2.0
32 */
33 public ISearchOperationExecutor createExecutor();
34
35 /**
36 *
37 * @since 2.0
38 *
39 */
40 public interface ISearchOperationExecutor {
41
42 /**
43 * Returns the stateless operation this executor was initialized from
44 */
45 ISearchOperation getOperation();
46
47 /**
48 * During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of
49 * the operation may begin. Operations may use this method to initialize its internal data structures.
50 *
51 * @throws ViatraQueryRuntimeException
52 */
53 void onInitialize(MatchingFrame frame, ISearchContext context);
54
55 /**
56 * After the execution of the operation failed and {@link #execute(MatchingFrame, ISearchContext)} returns false, the onBacktrack
57 * callback is evaluated. Operations may use this method to clean up any temporary structures, and make the
58 * operation ready for a new execution.
59 *
60 * @throws ViatraQueryRuntimeException
61 */
62 void onBacktrack(MatchingFrame frame, ISearchContext context);
63
64 /**
65 *
66 * @param frame
67 * @param context
68 * @return true if successful, or false if backtracking needed
69 * @throws ViatraQueryRuntimeException
70 */
71 boolean execute(MatchingFrame frame, ISearchContext context);
72 }
73 /**
74 *
75 * @return the ordered list of the variable numbers that are affected by the search operation
76 */
77 List<Integer> getVariablePositions();
78
79 /**
80 * Creates a string representation of the search operation by replacing the variable numbers according to the
81 * parameter function. It is expected that the provided function does return a non-null value for each variable
82 * index that is returned by {@link #getVariablePositions()}; otherwise a {@link NullPointerException} will be
83 * thrown during the calculation of the string.
84 *
85 * @since 2.0
86 */
87 String toString(Function<Integer, String> variableMapping);
88}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/MatchingFrameValueProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/MatchingFrameValueProvider.java
new file mode 100644
index 00000000..38f62129
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/MatchingFrameValueProvider.java
@@ -0,0 +1,41 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations;
10
11import java.util.Map;
12
13import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
14import tools.refinery.viatra.runtime.matchers.psystem.IValueProvider;
15import tools.refinery.viatra.runtime.matchers.util.Preconditions;
16
17/**
18 *
19 *
20 * @author Zoltan Ujhelyi
21 *
22 */
23public class MatchingFrameValueProvider implements IValueProvider {
24
25 final Map<String, Integer> nameMap;
26 final MatchingFrame frame;
27
28 public MatchingFrameValueProvider(MatchingFrame frame, Map<String, Integer> nameMap) {
29 super();
30 this.frame = frame;
31 this.nameMap = nameMap;
32 }
33
34 @Override
35 public Object getValue(String variableName) {
36 Integer index = nameMap.get(variableName);
37 Preconditions.checkArgument(index != null, "Unknown parameter variable name");
38 return frame.get(index);
39 }
40
41}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/AggregatorCheck.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/AggregatorCheck.java
new file mode 100644
index 00000000..4d631635
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/AggregatorCheck.java
@@ -0,0 +1,116 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.Collections;
12import java.util.List;
13import java.util.Objects;
14import java.util.function.Function;
15import java.util.stream.Stream;
16
17import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
18import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
19import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
20import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
21import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
22import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
23import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
24import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
25import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
26import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
27
28/**
29 * Calculates the aggregated value of a column based on the given {@link AggregatorConstraint}
30 *
31 * @author Balázs Grill
32 * @since 1.4
33 * @noextend This class is not intended to be subclassed by clients.
34 */
35public class AggregatorCheck implements ISearchOperation, IPatternMatcherOperation {
36
37 private class Executor extends CheckOperationExecutor {
38
39 private final VolatileModifiableMaskedTuple maskedTuple;
40 private IQueryResultProvider matcher;
41
42 public Executor() {
43 super();
44 this.maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask());
45 }
46
47 @Override
48 public void onInitialize(MatchingFrame frame, ISearchContext context) {
49 super.onInitialize(frame, context);
50 maskedTuple.updateTuple(frame);
51 matcher = context.getMatcher(information.getCallWithAdornment());
52 }
53
54 @Override
55 protected boolean check(MatchingFrame frame, ISearchContext context) {
56 IMultisetAggregationOperator<?, ?, ?> operator = aggregator.getAggregator().getOperator();
57 Object result = aggregate(operator, aggregator.getAggregatedColumn(), frame);
58 return result == null ? false : Objects.equals(frame.getValue(position), result);
59 }
60
61 @SuppressWarnings("unchecked")
62 private <Domain, Accumulator, AggregateResult> AggregateResult aggregate(
63 IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator, int aggregatedColumn,
64 MatchingFrame initialFrame) {
65 maskedTuple.updateTuple(initialFrame);
66 final Stream<Domain> valueStream = matcher.getAllMatches(information.getParameterMask(), maskedTuple)
67 .map(match -> (Domain) match.get(aggregatedColumn));
68 return operator.aggregateStream(valueStream);
69 }
70
71 @Override
72 public ISearchOperation getOperation() {
73 return AggregatorCheck.this;
74 }
75 }
76
77 private final int position;
78 private final AggregatorConstraint aggregator;
79 private final CallInformation information;
80
81 /**
82 * @since 1.7
83 */
84 public AggregatorCheck(CallInformation information, AggregatorConstraint aggregator, int position) {
85 super();
86 this.information = information;
87 this.position = position;
88 this.aggregator = aggregator;
89 }
90
91 @Override
92 public ISearchOperationExecutor createExecutor() {
93 return new Executor();
94 }
95
96 @Override
97 public List<Integer> getVariablePositions() {
98 return Collections.singletonList(position);
99 }
100
101 @Override
102 public String toString() {
103 return toString(Object::toString);
104 }
105
106 @Override
107 public String toString(Function<Integer, String> variableMapping) {
108 return "check "+variableMapping.apply(position)+" = " + aggregator.getAggregator().getOperator().getName() + " find " + information.toString(variableMapping);
109 }
110
111 @Override
112 public CallInformation getCallInformation() {
113 return information;
114 }
115
116}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/BinaryTransitiveClosureCheck.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/BinaryTransitiveClosureCheck.java
new file mode 100644
index 00000000..8f818542
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/BinaryTransitiveClosureCheck.java
@@ -0,0 +1,135 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.Arrays;
12import java.util.HashSet;
13import java.util.LinkedList;
14import java.util.List;
15import java.util.Objects;
16import java.util.Queue;
17import java.util.Set;
18import java.util.function.Function;
19
20import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
21import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
22import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
23import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
24import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
25import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
26import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
27import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
28
29/**
30 * Checking for a transitive closure expressed as a local search pattern matcher. The matched pattern must have two
31 * parameters of the same model type.
32 *
33 * @author Zoltan Ujhelyi
34 * @noextend This class is not intended to be subclassed by clients.
35 * @noinstantiate This class is not intended to be instantiated by clients.
36 *
37 */
38public class BinaryTransitiveClosureCheck implements ISearchOperation, IPatternMatcherOperation {
39
40 private class Executor extends CheckOperationExecutor {
41
42 @Override
43 public void onInitialize(MatchingFrame frame, ISearchContext context) {
44 super.onInitialize(frame, context);
45 matcher = context.getMatcher(information.getCallWithAdornment());
46 // Note: second parameter is NOT bound during execution, but the first is
47 }
48
49 @Override
50 protected boolean check(MatchingFrame frame, ISearchContext context) {
51 if (checkReflexive(frame)) {
52 return true;
53 }
54
55 Object targetValue = frame.get(targetPosition);
56 Queue<Object> sourcesToEvaluate = new LinkedList<>();
57 sourcesToEvaluate.add(frame.get(sourcePosition));
58 Set<Object> sourceEvaluated = new HashSet<>();
59 final Object[] mappedFrame = new Object[] {null, null};
60 while (!sourcesToEvaluate.isEmpty()) {
61 Object currentValue = sourcesToEvaluate.poll();
62 sourceEvaluated.add(currentValue);
63 mappedFrame[0] = currentValue;
64 for (Tuple match : (Iterable<Tuple>) () -> matcher.getAllMatches(mappedFrame).iterator()) {
65 Object foundTarget = match.get(1);
66 if (targetValue.equals(foundTarget)) {
67 return true;
68 } else if (!sourceEvaluated.contains(foundTarget)) {
69 sourcesToEvaluate.add(foundTarget);
70 }
71 }
72 }
73 return false;
74 }
75
76 protected boolean checkReflexive(MatchingFrame frame) {
77 return reflexive && Objects.equals(frame.get(sourcePosition), frame.get(targetPosition));
78 }
79
80 @Override
81 public ISearchOperation getOperation() {
82 return BinaryTransitiveClosureCheck.this;
83 }
84 }
85
86 private final CallInformation information;
87 private IQueryResultProvider matcher;
88 private final int sourcePosition;
89 private final int targetPosition;
90 private final boolean reflexive;
91
92 /**
93 * The source position will be matched in the called pattern to the first parameter; while target to the second.
94 * </p>
95 * <strong>NOTE</strong>: the reflexive check call does not include the parameter type checks; appropriate type checks should be
96 * added as necessary by the operation compiler.
97 *
98 * @since 2.0
99 */
100 public BinaryTransitiveClosureCheck(CallInformation information, int sourcePosition, int targetPosition, boolean reflexive) {
101 super();
102 this.sourcePosition = sourcePosition;
103 this.targetPosition = targetPosition;
104 this.information = information;
105 this.reflexive = reflexive;
106 }
107
108 @Override
109 public ISearchOperationExecutor createExecutor() {
110 return new Executor();
111 }
112
113 @Override
114 public String toString() {
115 return toString(Object::toString);
116 }
117
118 @Override
119 public String toString(Function<Integer, String> variableMapping) {
120 String c = information.toString(variableMapping);
121 int p = c.indexOf('(');
122 String modifier = reflexive ? "*" : "+";
123 return "check find "+c.substring(0, p)+ modifier +c.substring(p);
124 }
125
126 @Override
127 public List<Integer> getVariablePositions() {
128 return Arrays.asList(sourcePosition, targetPosition);
129 }
130
131 @Override
132 public CallInformation getCallInformation() {
133 return information;
134 }
135}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckConstant.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckConstant.java
new file mode 100644
index 00000000..4ce48af0
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckConstant.java
@@ -0,0 +1,70 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.Collections;
12import java.util.List;
13import java.util.function.Function;
14
15import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
16import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
17import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
18import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
19
20/**
21 * This operation handles constants in search plans by checking if a variable is bound to a certain constant value. Such
22 * operations should be executed as early as possible during plan execution.
23 *
24 * @author Marton Bur
25 * @noextend This class is not intended to be subclassed by clients.
26 */
27public class CheckConstant implements ISearchOperation {
28
29 private class Executor extends CheckOperationExecutor {
30
31 @Override
32 protected boolean check(MatchingFrame frame, ISearchContext context) {
33 return frame.get(position).equals(value);
34 }
35
36 @Override
37 public ISearchOperation getOperation() {
38 return CheckConstant.this;
39 }
40 }
41
42 private int position;
43 private Object value;
44
45 public CheckConstant(int position, Object value) {
46 this.position = position;
47 this.value = value;
48 }
49
50 @Override
51 public ISearchOperationExecutor createExecutor() {
52 return new Executor();
53 }
54
55 @Override
56 public List<Integer> getVariablePositions() {
57 return Collections.singletonList(position);
58 }
59
60 @Override
61 public String toString() {
62 return toString(Object::toString);
63 }
64
65 @Override
66 public String toString(Function<Integer, String> variableMapping) {
67 return "check constant "+variableMapping.apply(position)+"='"+value+"'";
68 }
69
70}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckPositivePatternCall.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckPositivePatternCall.java
new file mode 100644
index 00000000..5f9b688a
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CheckPositivePatternCall.java
@@ -0,0 +1,96 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.List;
12import java.util.function.Function;
13
14import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
15import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
16import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
17import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
18import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
19import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
20import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
21import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
22
23/**
24 * @author Grill Balázs
25 * @since 1.4
26 * @noextend This class is not intended to be subclassed by clients.
27 */
28public class CheckPositivePatternCall implements ISearchOperation, IPatternMatcherOperation {
29
30 private class Executor extends CheckOperationExecutor {
31
32 private final VolatileModifiableMaskedTuple maskedTuple;
33 private IQueryResultProvider matcher;
34
35 public Executor() {
36 super();
37 this.maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask());
38 }
39
40 @Override
41 public void onInitialize(MatchingFrame frame, ISearchContext context) {
42 super.onInitialize(frame, context);
43 maskedTuple.updateTuple(frame);
44 matcher = context.getMatcher(information.getCallWithAdornment());
45 }
46
47 /**
48 * @since 1.5
49 */
50 protected boolean check(MatchingFrame frame, ISearchContext context) {
51 return matcher.hasMatch(information.getParameterMask(), maskedTuple);
52 }
53
54 @Override
55 public ISearchOperation getOperation() {
56 return CheckPositivePatternCall.this;
57 }
58 }
59
60 private final CallInformation information;
61
62
63 /**
64 * @since 1.7
65 */
66 public CheckPositivePatternCall(CallInformation information) {
67 super();
68 this.information = information;
69
70 }
71
72 @Override
73 public ISearchOperationExecutor createExecutor() {
74 return new Executor();
75 }
76
77 @Override
78 public List<Integer> getVariablePositions() {
79 return information.getVariablePositions();
80 }
81
82 @Override
83 public String toString() {
84 return toString(Object::toString);
85 }
86
87 @Override
88 public String toString(Function<Integer, String> variableMapping) {
89 return "check find "+information.toString(variableMapping);
90 }
91
92 @Override
93 public CallInformation getCallInformation() {
94 return information;
95 }
96}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CountCheck.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CountCheck.java
new file mode 100644
index 00000000..d74c1c6f
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/CountCheck.java
@@ -0,0 +1,92 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.Collections;
12import java.util.List;
13import java.util.function.Function;
14
15import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
16import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
17import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
18import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
19import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
20import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
21import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
22import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
23
24/**
25 * Calculates the count of matches for a called matcher
26 *
27 * @author Zoltan Ujhelyi
28 * @noextend This class is not intended to be subclassed by clients.
29 */
30public class CountCheck implements ISearchOperation, IPatternMatcherOperation {
31
32 private class Executor extends CheckOperationExecutor {
33
34 private final VolatileModifiableMaskedTuple maskedTuple;
35 private IQueryResultProvider matcher;
36
37 public Executor() {
38 maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask());
39 }
40
41 @Override
42 public void onInitialize(MatchingFrame frame, ISearchContext context) {
43 super.onInitialize(frame, context);
44 maskedTuple.updateTuple(frame);
45 matcher = context.getMatcher(information.getCallWithAdornment());
46 }
47
48 @Override
49 protected boolean check(MatchingFrame frame, ISearchContext context) {
50 int count = matcher.countMatches(information.getParameterMask(), maskedTuple);
51 return ((Integer)frame.getValue(position)) == count;
52 }
53
54 @Override
55 public ISearchOperation getOperation() {
56 return CountCheck.this;
57 }
58 }
59
60 private final int position;
61 private final CallInformation information;
62
63 /**
64 * @since 1.7
65 */
66 public CountCheck(CallInformation information, int position) {
67 super();
68 this.information = information;
69 this.position = position;
70 }
71
72
73 @Override
74 public ISearchOperationExecutor createExecutor() {
75 return new Executor();
76 }
77
78 @Override
79 public List<Integer> getVariablePositions() {
80 return Collections.singletonList(position);
81 }
82
83 @Override
84 public String toString(Function<Integer, String> variableMapping) {
85 return "check "+variableMapping.apply(position)+" = count find "+ information.toString(variableMapping);
86 }
87
88 @Override
89 public CallInformation getCallInformation() {
90 return information;
91 }
92}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionCheck.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionCheck.java
new file mode 100644
index 00000000..fc9efdca
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionCheck.java
@@ -0,0 +1,78 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.ArrayList;
12import java.util.List;
13import java.util.Map;
14import java.util.function.Function;
15
16import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
17import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
18import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
19import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
20import tools.refinery.viatra.runtime.localsearch.operations.MatchingFrameValueProvider;
21import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
22
23/**
24 * @author Zoltan Ujhelyi
25 * @noextend This class is not intended to be subclassed by clients.
26 */
27public class ExpressionCheck implements ISearchOperation {
28
29 private class Executor extends CheckOperationExecutor {
30
31 @Override
32 protected boolean check(MatchingFrame frame, ISearchContext context) {
33 try {
34 boolean result = (Boolean) evaluator.evaluateExpression(new MatchingFrameValueProvider(frame, nameMap));
35 return result;
36 } catch (Exception e) {
37 context.getLogger().warn("Error while evaluating expression", e);
38 return false;
39 }
40 }
41
42 @Override
43 public ISearchOperation getOperation() {
44 return ExpressionCheck.this;
45 }
46 }
47
48 IExpressionEvaluator evaluator;
49 Map<String, Integer> nameMap;
50
51 public ExpressionCheck(IExpressionEvaluator evaluator, Map<String, Integer> nameMap) {
52 super();
53 this.evaluator = evaluator;
54 this.nameMap = nameMap;
55 }
56
57 @Override
58 public ISearchOperationExecutor createExecutor() {
59 return new Executor();
60 }
61
62 @Override
63 public List<Integer> getVariablePositions() {
64 // XXX not sure if this is the correct implementation to get the affected variable indicies
65 return new ArrayList<>(nameMap.values());
66 }
67
68 @Override
69 public String toString() {
70 return toString(Object::toString);
71 }
72
73 @Override
74 public String toString(Function<Integer, String> variableMapping) {
75 return "check expression "+evaluator.getShortDescription();
76 }
77
78}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionEvalCheck.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionEvalCheck.java
new file mode 100644
index 00000000..5b1bca10
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/ExpressionEvalCheck.java
@@ -0,0 +1,95 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.ArrayList;
12import java.util.List;
13import java.util.Map;
14import java.util.Set;
15import java.util.function.Function;
16
17import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
18import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
19import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
20import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
21import tools.refinery.viatra.runtime.localsearch.operations.MatchingFrameValueProvider;
22import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
23
24/**
25 * @author Grill Balázs
26 * @since 1.3
27 * @noextend This class is not intended to be subclassed by clients.
28 */
29public class ExpressionEvalCheck implements ISearchOperation {
30
31 private class Executor extends CheckOperationExecutor {
32
33 @Override
34 protected boolean check(MatchingFrame frame, ISearchContext context) {
35 try {
36 Object result = evaluator.evaluateExpression(new MatchingFrameValueProvider(frame, nameMap));
37 if (!unwind && result != null) {
38 Object currentValue = frame.get(outputPosition);
39 return result.equals(currentValue);
40 } else if (unwind && result instanceof Set<?>) {
41 Object currentValue = frame.get(outputPosition);
42 return ((Set<?>)result).contains(currentValue);
43 }
44 } catch (Exception e) {
45 context.getLogger().warn("Error while evaluating expression", e);
46 }
47 return false;
48 }
49
50 @Override
51 public ISearchOperation getOperation() {
52 return ExpressionEvalCheck.this;
53 }
54 }
55
56 private final int outputPosition;
57 private final IExpressionEvaluator evaluator;
58 private final Map<String, Integer> nameMap;
59 private final boolean unwind;
60
61 public ExpressionEvalCheck(IExpressionEvaluator evaluator, Map<String, Integer> nameMap, int position) {
62 this(evaluator, nameMap, false, position);
63 }
64
65 /**
66 * @since 2.7
67 */
68 public ExpressionEvalCheck(IExpressionEvaluator evaluator, Map<String, Integer> nameMap, boolean unwind, int position) {
69 this.evaluator = evaluator;
70 this.nameMap = nameMap;
71 this.unwind = unwind;
72 this.outputPosition = position;
73 }
74
75 @Override
76 public ISearchOperationExecutor createExecutor() {
77 return new Executor();
78 }
79
80 @Override
81 public List<Integer> getVariablePositions() {
82 // XXX not sure if this is the correct implementation to get the affected variable indicies
83 return new ArrayList<>(nameMap.values());
84 }
85
86 @Override
87 public String toString() {
88 return toString(Object::toString);
89 }
90
91 @Override
92 public String toString(Function<Integer, String> variableMapping) {
93 return "check "+variableMapping.apply(outputPosition)+" = expression "+evaluator.getShortDescription();
94 }
95}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/InequalityCheck.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/InequalityCheck.java
new file mode 100644
index 00000000..3f30c3c4
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/InequalityCheck.java
@@ -0,0 +1,77 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.Arrays;
12import java.util.List;
13import java.util.function.Function;
14
15import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
16import tools.refinery.viatra.runtime.localsearch.exceptions.LocalSearchException;
17import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
18import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
19import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
20
21/**
22 * @author Zoltan Ujhelyi
23 * @noextend This class is not intended to be subclassed by clients.
24 */
25public class InequalityCheck implements ISearchOperation {
26
27 private class Executor extends CheckOperationExecutor {
28
29 @Override
30 protected boolean check(MatchingFrame frame, ISearchContext context) {
31 Object source = frame.getValue(sourceLocation);
32 Object target = frame.getValue(targetLocation);
33 if (source == null) {
34 throw new LocalSearchException("Source not bound.");
35 }
36 if (target == null) {
37 throw new LocalSearchException("Target not bound");
38 }
39 return !source.equals(target);
40 }
41
42 @Override
43 public ISearchOperation getOperation() {
44 return InequalityCheck.this;
45 }
46 }
47
48 int sourceLocation;
49 int targetLocation;
50
51 public InequalityCheck(int sourceLocation, int targetLocation) {
52 super();
53 this.sourceLocation = sourceLocation;
54 this.targetLocation = targetLocation;
55 }
56
57 @Override
58 public ISearchOperationExecutor createExecutor() {
59 return new Executor();
60 }
61
62 @Override
63 public String toString() {
64 return toString(Object::toString);
65 }
66
67 @Override
68 public String toString(Function<Integer, String> variableMapping) {
69 return "check "+variableMapping.apply(sourceLocation)+" != "+variableMapping.apply(targetLocation);
70 }
71
72 @Override
73 public List<Integer> getVariablePositions() {
74 return Arrays.asList(sourceLocation, targetLocation);
75 }
76
77}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/NACOperation.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/NACOperation.java
new file mode 100644
index 00000000..3759e1d1
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/check/NACOperation.java
@@ -0,0 +1,89 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.check;
10
11import java.util.List;
12import java.util.function.Function;
13
14import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
15import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
16import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
17import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
18import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
19import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
20import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
21import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
22
23/**
24 * @author Zoltan Ujhelyi
25 * @noextend This class is not intended to be subclassed by clients.
26 */
27public class NACOperation implements ISearchOperation, IPatternMatcherOperation {
28
29 private class Executor extends CheckOperationExecutor {
30 private final VolatileModifiableMaskedTuple maskedTuple;
31 private IQueryResultProvider matcher;
32
33 private Executor() {
34 this.maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask());
35 }
36
37 @Override
38 public void onInitialize(MatchingFrame frame, ISearchContext context) {
39 super.onInitialize(frame, context);
40 maskedTuple.updateTuple(frame);
41 matcher = context.getMatcher(information.getCallWithAdornment());
42 }
43
44 @Override
45 protected boolean check(MatchingFrame frame, ISearchContext context) {
46 return !matcher.hasMatch(information.getParameterMask(), maskedTuple);
47 }
48
49 @Override
50 public ISearchOperation getOperation() {
51 return NACOperation.this;
52 }
53 }
54
55 private final CallInformation information;
56
57 /**
58 * @since 1.7
59 */
60 public NACOperation(CallInformation information) {
61 super();
62 this.information = information;
63 }
64
65 @Override
66 public ISearchOperationExecutor createExecutor() {
67 return new Executor();
68 }
69
70 @Override
71 public String toString() {
72 return toString(Object::toString);
73 }
74
75 @Override
76 public String toString(Function<Integer, String> variableMapping) {
77 return "check neg find "+information.toString(variableMapping);
78 }
79
80 @Override
81 public List<Integer> getVariablePositions() {
82 return information.getVariablePositions();
83 }
84
85 @Override
86 public CallInformation getCallInformation() {
87 return information;
88 }
89}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/AggregatorExtend.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/AggregatorExtend.java
new file mode 100644
index 00000000..c2e75b7a
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/AggregatorExtend.java
@@ -0,0 +1,106 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.extend;
10
11import java.util.Arrays;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.List;
15import java.util.function.Function;
16import java.util.stream.Stream;
17
18import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
19import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
20import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
21import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
22import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
23import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
24import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
25import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
26import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
27
28/**
29 * Calculates the aggregated value of a column based on the given {@link AggregatorConstraint}
30 *
31 * @author Balázs Grill
32 * @since 1.4
33 */
34public class AggregatorExtend implements ISearchOperation, IPatternMatcherOperation{
35
36 private class Executor extends SingleValueExtendOperationExecutor<Object> {
37
38 private final VolatileModifiableMaskedTuple maskedTuple;
39 private IQueryResultProvider matcher;
40
41 public Executor(int position) {
42 super(position);
43 this.maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask());
44 }
45
46 @Override
47 public Iterator<?> getIterator(MatchingFrame frame, ISearchContext context) {
48 maskedTuple.updateTuple(frame);
49 matcher = context.getMatcher(information.getCallWithAdornment());
50 Object aggregate = aggregate(aggregator.getAggregator().getOperator(), aggregator.getAggregatedColumn());
51 return aggregate == null ? Collections.emptyIterator() : Collections.singletonList(aggregate).iterator();
52
53 }
54
55 @SuppressWarnings("unchecked")
56 private <Domain, Accumulator, AggregateResult> AggregateResult aggregate(
57 IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator, int aggregatedColumn) {
58 final Stream<Domain> valueStream = matcher.getAllMatches(information.getParameterMask(), maskedTuple)
59 .map(match -> (Domain) match.get(aggregatedColumn));
60 return operator.aggregateStream(valueStream);
61 }
62
63 @Override
64 public ISearchOperation getOperation() {
65 return AggregatorExtend.this;
66 }
67 }
68
69 private final AggregatorConstraint aggregator;
70 private final CallInformation information;
71 private final int position;
72
73 /**
74 * @since 1.7
75 */
76 public AggregatorExtend(CallInformation information, AggregatorConstraint aggregator, int position) {
77 this.aggregator = aggregator;
78 this.information = information;
79 this.position = position;
80 }
81
82 @Override
83 public ISearchOperationExecutor createExecutor() {
84 return new Executor(position);
85 }
86
87 @Override
88 public List<Integer> getVariablePositions() {
89 return Arrays.asList(position);
90 }
91
92 @Override
93 public String toString() {
94 return toString(Object::toString);
95 }
96
97 @Override
98 public String toString(Function<Integer, String> variableMapping) {
99 return "extend -"+variableMapping.apply(position)+" = " + aggregator.getAggregator().getOperator().getName()+" find " + information.toString(variableMapping);
100 }
101
102 @Override
103 public CallInformation getCallInformation() {
104 return information;
105 }
106}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/CountOperation.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/CountOperation.java
new file mode 100644
index 00000000..08ecc8d6
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/CountOperation.java
@@ -0,0 +1,88 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.extend;
10
11import java.util.Collections;
12import java.util.Iterator;
13import java.util.List;
14import java.util.function.Function;
15
16import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
17import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
18import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
19import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
20import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
21import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
22import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
23
24/**
25 * Calculates the count of matches for a called matcher
26 *
27 * @author Zoltan Ujhelyi
28 */
29public class CountOperation implements ISearchOperation, IPatternMatcherOperation{
30
31 private class Executor extends SingleValueExtendOperationExecutor<Integer> {
32 private final VolatileModifiableMaskedTuple maskedTuple;
33 private IQueryResultProvider matcher;
34
35 public Executor(int position) {
36 super(position);
37 maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask());
38 }
39
40 @Override
41 public Iterator<Integer> getIterator(MatchingFrame frame, ISearchContext context) {
42 matcher = context.getMatcher(information.getCallWithAdornment());
43 maskedTuple.updateTuple(frame);
44 return Collections.singletonList(matcher.countMatches(information.getParameterMask(), maskedTuple)).iterator();
45 }
46
47 @Override
48 public ISearchOperation getOperation() {
49 return CountOperation.this;
50 }
51 }
52
53 private final CallInformation information;
54 private final int position;
55
56 /**
57 * @since 1.7
58 */
59 public CountOperation(CallInformation information, int position) {
60 this.information = information;
61 this.position = position;
62 }
63
64 @Override
65 public ISearchOperationExecutor createExecutor() {
66 return new Executor(position);
67 }
68
69 @Override
70 public List<Integer> getVariablePositions() {
71 return information.getVariablePositions();
72 }
73
74 @Override
75 public String toString() {
76 return toString(Object::toString);
77 }
78
79 @Override
80 public String toString(Function<Integer, String> variableMapping) {
81 return "extend -"+variableMapping.apply(position)+" = count find " + information.toString(variableMapping);
82 }
83
84 @Override
85 public CallInformation getCallInformation() {
86 return information;
87 }
88}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExpressionEval.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExpressionEval.java
new file mode 100644
index 00000000..7186f4ac
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExpressionEval.java
@@ -0,0 +1,104 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.extend;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.List;
15import java.util.Map;
16import java.util.Set;
17import java.util.function.Function;
18
19import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
20import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
21import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
22import tools.refinery.viatra.runtime.localsearch.operations.MatchingFrameValueProvider;
23import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
24
25/**
26 * Calculates the result of an expression and stores it inside a variable for future reference.
27 *
28 * @author Zoltan Ujhelyi
29 *
30 */
31public class ExpressionEval implements ISearchOperation {
32
33 private class Executor extends SingleValueExtendOperationExecutor<Object> {
34
35 public Executor(int position) {
36 super(position);
37 }
38
39 @Override
40 public Iterator<?> getIterator(MatchingFrame frame, ISearchContext context) {
41 try {
42 Object result = evaluator.evaluateExpression(new MatchingFrameValueProvider(frame, nameMap));
43 if (!unwind && result != null){
44 return Collections.singletonList(result).iterator();
45 } else if (unwind && result instanceof Set<?>) {
46 return ((Set<?>)result).iterator();
47 } else {
48 return Collections.emptyIterator();
49 }
50 } catch (Exception e) {
51 context.getLogger().warn("Error while evaluating expression", e);
52 return Collections.emptyIterator();
53 }
54 }
55
56 @Override
57 public ISearchOperation getOperation() {
58 return ExpressionEval.this;
59 }
60 }
61
62 private final IExpressionEvaluator evaluator;
63 private final boolean unwind;
64 private final Map<String, Integer> nameMap;
65 private final int position;
66
67 public ExpressionEval(IExpressionEvaluator evaluator, Map<String, Integer> nameMap, int position) {
68 this(evaluator, nameMap, false, position);
69 }
70
71 /**
72 * @since 2.7
73 */
74 public ExpressionEval(IExpressionEvaluator evaluator, Map<String, Integer> nameMap, boolean unwind, int position) {
75 this.evaluator = evaluator;
76 this.nameMap = nameMap;
77 this.unwind = unwind;
78 this.position = position;
79 }
80
81 @Override
82 public String toString() {
83 return toString(Object::toString);
84 }
85
86 @Override
87 public String toString(Function<Integer, String> variableMapping) {
88 return "extend -"+variableMapping.apply(position)+" = expression "+evaluator.getShortDescription();
89 }
90
91 @Override
92 public ISearchOperationExecutor createExecutor() {
93 return new Executor(position);
94 }
95
96 @Override
97 public List<Integer> getVariablePositions() {
98 // XXX not sure if this is the correct implementation to get the affected variable indicies
99 List<Integer> variables = new ArrayList<>();
100 variables.addAll(nameMap.values());
101 return variables;
102 }
103
104}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendBinaryTransitiveClosure.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendBinaryTransitiveClosure.java
new file mode 100644
index 00000000..1250e84e
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendBinaryTransitiveClosure.java
@@ -0,0 +1,185 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.extend;
10
11import java.util.Arrays;
12import java.util.HashSet;
13import java.util.Iterator;
14import java.util.LinkedList;
15import java.util.List;
16import java.util.Queue;
17import java.util.Set;
18import java.util.function.Function;
19
20import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
21import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
22import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
23import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
24import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
25import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
26import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
27
28/**
29 * Checking for a transitive closure expressed as a local search pattern matcher. The matched pattern must have two
30 * parameters of the same model type.
31 *
32 * @author Zoltan Ujhelyi
33 * @since 1.7
34 *
35 */
36public abstract class ExtendBinaryTransitiveClosure implements ISearchOperation, IPatternMatcherOperation {
37
38 private class Executor extends SingleValueExtendOperationExecutor<Object> {
39
40 public Executor(int position) {
41 super(position);
42 }
43
44 @Override
45 public Iterator<?> getIterator(MatchingFrame frame, ISearchContext context) {
46 // Note: second parameter is NOT bound during execution, but the first is
47 IQueryResultProvider matcher = context.getMatcher(information.getCallWithAdornment());
48
49 Queue<Object> seedsToEvaluate = new LinkedList<>();
50 final Object seedValue = frame.get(seedPosition);
51 seedsToEvaluate.add(seedValue);
52 Set<Object> seedsEvaluated = new HashSet<>();
53 Set<Object> targetsFound = new HashSet<>();
54 if (reflexive) {
55 targetsFound.add(seedValue);
56 }
57
58 while(!seedsToEvaluate.isEmpty()) {
59 Object currentValue = seedsToEvaluate.poll();
60 seedsEvaluated.add(currentValue);
61 final Object[] mappedFrame = calculateCallFrame(currentValue);
62 matcher.getAllMatches(mappedFrame).forEach(match -> {
63 Object foundTarget = getTarget(match);
64 targetsFound.add(foundTarget);
65 if (!seedsEvaluated.contains(foundTarget)) {
66 seedsToEvaluate.add(foundTarget);
67 }
68 });
69 }
70
71 return targetsFound.iterator();
72 }
73
74 @Override
75 public ISearchOperation getOperation() {
76 return ExtendBinaryTransitiveClosure.this;
77 }
78 }
79
80 /**
81 * Calculates the transitive closure of a pattern match in a forward direction (first parameter bound, second
82 * unbound).
83 * </p>
84 * <strong>Note</strong>: In case the call is reflexive, it is expected that the bound parameter already matches the universe type of the call.
85 *
86 * @since 1.7
87 */
88 public static class Forward extends ExtendBinaryTransitiveClosure {
89
90 private Object[] seedFrame = new Object[2];
91
92 /**
93 * @since 2.0
94 */
95 public Forward(CallInformation information, int sourcePosition, int targetPosition, boolean reflexive) {
96 super(information, sourcePosition, targetPosition, reflexive);
97 }
98
99 protected Object[] calculateCallFrame(Object seed) {
100 seedFrame[0] = seed;
101 seedFrame[1] = null;
102 return seedFrame;
103 }
104
105 protected Object getTarget(Tuple frame) {
106 return frame.get(1);
107 }
108 }
109
110 /**
111 * Calculates the transitive closure of a pattern match in a backward direction (first parameter unbound, second
112 * bound)
113 * </p>
114 * <strong>Note</strong>: In case the call is reflexive, it is expected that the bound parameter already matches the universe type of the call.
115 *
116 * @since 2.0
117 */
118 public static class Backward extends ExtendBinaryTransitiveClosure {
119 private Object[] seedFrame = new Object[2];
120
121 /**
122 * @since 2.0
123 */
124 public Backward(CallInformation information, int sourcePosition, int targetPosition, boolean reflexive) {
125 super(information, targetPosition, sourcePosition, reflexive);
126 }
127
128 protected Object[] calculateCallFrame(Object seed) {
129 seedFrame[0] = null;
130 seedFrame[1] = seed;
131 return seedFrame;
132 }
133
134 protected Object getTarget(Tuple frame) {
135 return frame.get(0);
136 }
137 }
138
139 private final int seedPosition;
140 private final int targetPosition;
141 private final CallInformation information;
142 private final boolean reflexive;
143
144 /**
145 * The source position will be matched in the called pattern to the first parameter; while target to the second.
146 * @since 2.0
147 */
148 protected ExtendBinaryTransitiveClosure(CallInformation information, int seedPosition, int targetPosition, boolean reflexive) {
149 this.information = information;
150 this.seedPosition = seedPosition;
151 this.targetPosition = targetPosition;
152 this.reflexive = reflexive;
153 }
154
155 protected abstract Object[] calculateCallFrame(Object seed);
156
157 protected abstract Object getTarget(Tuple frame);
158
159 @Override
160 public ISearchOperationExecutor createExecutor() {
161 return new Executor(targetPosition);
162 }
163
164 @Override
165 public String toString() {
166 return toString(Object::toString);
167 }
168
169 @Override
170 public String toString(Function<Integer, String> variableMapping) {
171 String c = information.toString(variableMapping);
172 int p = c.indexOf('(');
173 return "extend find " + c.substring(0, p) + "+" + c.substring(p);
174 }
175
176 @Override
177 public List<Integer> getVariablePositions() {
178 return Arrays.asList(seedPosition, targetPosition);
179 }
180
181 @Override
182 public CallInformation getCallInformation() {
183 return information;
184 }
185}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendConstant.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendConstant.java
new file mode 100644
index 00000000..455236f3
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendConstant.java
@@ -0,0 +1,75 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.extend;
10
11import java.util.Arrays;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.List;
15import java.util.function.Function;
16
17import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
18import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
19import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
20
21/**
22 * This operation handles constants in search plans by binding a variable to a constant value. Such operations should be
23 * executed as early as possible during plan execution.
24 *
25 * @author Marton Bur
26 *
27 */
28public class ExtendConstant implements ISearchOperation {
29
30 private class Executor extends SingleValueExtendOperationExecutor<Object> {
31
32 public Executor(int position) {
33 super(position);
34 }
35
36 @Override
37 public Iterator<?> getIterator(MatchingFrame frame, ISearchContext context) {
38 return Collections.singletonList(value).iterator();
39 }
40
41 @Override
42 public ISearchOperation getOperation() {
43 return ExtendConstant.this;
44 }
45 }
46
47 private final Object value;
48 private final int position;
49
50 public ExtendConstant(int position, Object value) {
51 this.position = position;
52 this.value = value;
53 }
54
55 @Override
56 public ISearchOperationExecutor createExecutor() {
57 return new Executor(position);
58 }
59
60 @Override
61 public List<Integer> getVariablePositions() {
62 return Arrays.asList(position);
63 }
64
65 @Override
66 public String toString() {
67 return toString(Object::toString);
68 }
69
70 @Override
71 public String toString(Function<Integer, String> variableMapping) {
72 return "extend constant -"+variableMapping.apply(position)+"='"+value+"'";
73 }
74
75}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/ExtendPositivePatternCall.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendPositivePatternCall.java
index 9d48c785..690a3241 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/ExtendPositivePatternCall.java
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/ExtendPositivePatternCall.java
@@ -1,27 +1,28 @@
1/******************************************************************************* 1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs 2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the 3 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at 4 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html. 5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0 7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/ 8 *******************************************************************************/
9package tools.refinery.store.query.viatra.internal.localsearch; 9package tools.refinery.viatra.runtime.localsearch.operations.extend;
10
11import org.eclipse.viatra.query.runtime.localsearch.MatchingFrame;
12import org.eclipse.viatra.query.runtime.localsearch.matcher.ISearchContext;
13import org.eclipse.viatra.query.runtime.localsearch.operations.IPatternMatcherOperation;
14import org.eclipse.viatra.query.runtime.localsearch.operations.ISearchOperation;
15import org.eclipse.viatra.query.runtime.localsearch.operations.util.CallInformation;
16import org.eclipse.viatra.query.runtime.matchers.backend.IQueryResultProvider;
17import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
18import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask;
19import org.eclipse.viatra.query.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
20 10
21import java.util.Iterator; 11import java.util.Iterator;
22import java.util.List; 12import java.util.List;
23import java.util.function.Function; 13import java.util.function.Function;
24 14
15import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
16import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
17import tools.refinery.viatra.runtime.localsearch.operations.ExtendOperationExecutor;
18import tools.refinery.viatra.runtime.localsearch.operations.IPatternMatcherOperation;
19import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
20import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
21import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
22import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
23import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
24import tools.refinery.viatra.runtime.matchers.tuple.VolatileModifiableMaskedTuple;
25
25/** 26/**
26 * @author Grill Balázs 27 * @author Grill Balázs
27 * @since 1.4 28 * @since 1.4
@@ -31,25 +32,25 @@ public class ExtendPositivePatternCall implements ISearchOperation, IPatternMatc
31 32
32 private class Executor extends ExtendOperationExecutor<Tuple> { 33 private class Executor extends ExtendOperationExecutor<Tuple> {
33 private final VolatileModifiableMaskedTuple maskedTuple; 34 private final VolatileModifiableMaskedTuple maskedTuple;
34 35
35 public Executor() { 36 public Executor() {
36 maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask()); 37 maskedTuple = new VolatileModifiableMaskedTuple(information.getThinFrameMask());
37 } 38 }
38 39
39 @Override 40 @Override
40 protected Iterator<? extends Tuple> getIterator(MatchingFrame frame, ISearchContext context) { 41 protected Iterator<? extends Tuple> getIterator(MatchingFrame frame, ISearchContext context) {
41 maskedTuple.updateTuple(frame); 42 maskedTuple.updateTuple(frame);
42 IQueryResultProvider matcher = context.getMatcher(information.getCallWithAdornment()); 43 IQueryResultProvider matcher = context.getMatcher(information.getCallWithAdornment());
43 return matcher.getAllMatches(information.getParameterMask(), maskedTuple).iterator(); 44 return matcher.getAllMatches(information.getParameterMask(), maskedTuple).iterator();
44 } 45 }
45 46
46 /** 47 /**
47 * @since 2.0 48 * @since 2.0
48 */ 49 */
49 @Override 50 @Override
50 protected boolean fillInValue(Tuple result, MatchingFrame frame, ISearchContext context) { 51 protected boolean fillInValue(Tuple result, MatchingFrame frame, ISearchContext context) {
51 TupleMask mask = information.getFullFrameMask(); 52 TupleMask mask = information.getFullFrameMask();
52 // The first loop clears out the elements from a possible previous iteration 53 // The first loop clears out the elements from a possible previous iteration
53 for(int i : information.getFreeParameterIndices()) { 54 for(int i : information.getFreeParameterIndices()) {
54 mask.set(frame, i, null); 55 mask.set(frame, i, null);
55 } 56 }
@@ -57,7 +58,7 @@ public class ExtendPositivePatternCall implements ISearchOperation, IPatternMatc
57 Object oldValue = mask.getValue(frame, i); 58 Object oldValue = mask.getValue(frame, i);
58 Object valueToFill = result.get(i); 59 Object valueToFill = result.get(i);
59 if (oldValue != null && !oldValue.equals(valueToFill)){ 60 if (oldValue != null && !oldValue.equals(valueToFill)){
60 // If the inverse map contains more than one values for the same key, it means that these arguments are unified by the caller. 61 // If the inverse map contains more than one values for the same key, it means that these arguments are unified by the caller.
61 // In this case if the callee assigns different values the frame shall be dropped 62 // In this case if the callee assigns different values the frame shall be dropped
62 return false; 63 return false;
63 } 64 }
@@ -65,31 +66,31 @@ public class ExtendPositivePatternCall implements ISearchOperation, IPatternMatc
65 } 66 }
66 return true; 67 return true;
67 } 68 }
68 69
69 @Override 70 @Override
70 protected void cleanup(MatchingFrame frame, ISearchContext context) { 71 protected void cleanup(MatchingFrame frame, ISearchContext context) {
71 TupleMask mask = information.getFullFrameMask(); 72 TupleMask mask = information.getFullFrameMask();
72 for(int i : information.getFreeParameterIndices()){ 73 for(int i : information.getFreeParameterIndices()){
73 mask.set(frame, i, null); 74 mask.set(frame, i, null);
74 } 75 }
75 76
76 } 77 }
77 78
78 @Override 79 @Override
79 public ISearchOperation getOperation() { 80 public ISearchOperation getOperation() {
80 return ExtendPositivePatternCall.this; 81 return ExtendPositivePatternCall.this;
81 } 82 }
82 } 83 }
83 84
84 private final CallInformation information; 85 private final CallInformation information;
85 86
86 /** 87 /**
87 * @since 1.7 88 * @since 1.7
88 */ 89 */
89 public ExtendPositivePatternCall(CallInformation information) { 90 public ExtendPositivePatternCall(CallInformation information) {
90 this.information = information; 91 this.information = information;
91 } 92 }
92 93
93 @Override 94 @Override
94 public ISearchOperationExecutor createExecutor() { 95 public ISearchOperationExecutor createExecutor() {
95 return new Executor(); 96 return new Executor();
@@ -99,17 +100,17 @@ public class ExtendPositivePatternCall implements ISearchOperation, IPatternMatc
99 public List<Integer> getVariablePositions() { 100 public List<Integer> getVariablePositions() {
100 return information.getVariablePositions(); 101 return information.getVariablePositions();
101 } 102 }
102 103
103 @Override 104 @Override
104 public String toString() { 105 public String toString() {
105 return toString(Object::toString); 106 return toString(Object::toString);
106 } 107 }
107 108
108 @Override 109 @Override
109 public String toString(@SuppressWarnings("squid:S4276") Function<Integer, String> variableMapping) { 110 public String toString(Function<Integer, String> variableMapping) {
110 return "extend find " + information.toString(variableMapping); 111 return "extend find " + information.toString(variableMapping);
111 } 112 }
112 113
113 @Override 114 @Override
114 public CallInformation getCallInformation() { 115 public CallInformation getCallInformation() {
115 return information; 116 return information;
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/SingleValueExtendOperationExecutor.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/SingleValueExtendOperationExecutor.java
new file mode 100644
index 00000000..a04ffcca
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/extend/SingleValueExtendOperationExecutor.java
@@ -0,0 +1,40 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.extend;
10
11import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
12import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
13import tools.refinery.viatra.runtime.localsearch.operations.ExtendOperationExecutor;
14
15/**
16 * @since 2.0
17 * @noextend This class is not intended to be subclassed by clients.
18 */
19public abstract class SingleValueExtendOperationExecutor<T> extends ExtendOperationExecutor<T> {
20 protected int position;
21
22 /**
23 * @param position the frame position all values are to be added
24 */
25 public SingleValueExtendOperationExecutor(int position) {
26 super();
27 this.position = position;
28 }
29
30 @Override
31 protected final boolean fillInValue(T newValue, MatchingFrame frame, ISearchContext context) {
32 frame.setValue(position, newValue);
33 return true;
34 }
35
36 @Override
37 protected final void cleanup(MatchingFrame frame, ISearchContext context) {
38 frame.setValue(position, null);
39 }
40} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeCheck.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeCheck.java
new file mode 100644
index 00000000..2b189c57
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeCheck.java
@@ -0,0 +1,96 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.generic;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.List;
14import java.util.function.Function;
15import java.util.stream.Collectors;
16
17import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
18import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
19import tools.refinery.viatra.runtime.localsearch.operations.CheckOperationExecutor;
20import tools.refinery.viatra.runtime.localsearch.operations.IIteratingSearchOperation;
21import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
22import tools.refinery.viatra.runtime.matchers.context.IInputKey;
23import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
24import tools.refinery.viatra.runtime.matchers.tuple.VolatileMaskedTuple;
25import tools.refinery.viatra.runtime.matchers.util.Preconditions;
26
27/**
28 * @author Zoltan Ujhelyi
29 * @since 1.7
30 * @noextend This class is not intended to be subclassed by clients.
31 */
32public class GenericTypeCheck implements ISearchOperation, IIteratingSearchOperation {
33
34 private class Executor extends CheckOperationExecutor {
35 private VolatileMaskedTuple maskedTuple;
36
37 private Executor() {
38 this.maskedTuple = new VolatileMaskedTuple(callMask);
39 }
40
41 @Override
42 protected boolean check(MatchingFrame frame, ISearchContext context) {
43 maskedTuple.updateTuple(frame);
44 return context.getRuntimeContext().containsTuple(type, maskedTuple);
45 }
46
47 @Override
48 public ISearchOperation getOperation() {
49 return GenericTypeCheck.this;
50 }
51 }
52
53 private final IInputKey type;
54 private final List<Integer> positionList;
55 private final TupleMask callMask;
56
57 public GenericTypeCheck(IInputKey type, int[] positions, TupleMask callMask) {
58 this.callMask = callMask;
59 Preconditions.checkArgument(positions.length == type.getArity(),
60 "The type %s requires %d parameters, but %d positions are provided", type.getPrettyPrintableName(),
61 type.getArity(), positions.length);
62 List<Integer> modifiablePositionList = new ArrayList<>();
63 for (int position : positions) {
64 modifiablePositionList.add(position);
65 }
66 this.positionList = Collections.unmodifiableList(modifiablePositionList);
67 this.type = type;
68 }
69
70 @Override
71 public List<Integer> getVariablePositions() {
72 return positionList;
73 }
74
75 @Override
76 public ISearchOperationExecutor createExecutor() {
77 return new Executor();
78 }
79
80 @Override
81 public String toString() {
82 return toString(Object::toString);
83 }
84
85 @Override
86 public String toString(Function<Integer, String> variableMapping) {
87 return "check " + type.getPrettyPrintableName() + "("
88 + positionList.stream().map(input -> String.format("+%s", variableMapping.apply(input))).collect(Collectors.joining(", "))
89 + ")";
90 }
91
92 @Override
93 public IInputKey getIteratedInputKey() {
94 return type;
95 }
96}
diff --git a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/GenericTypeExtend.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeExtend.java
index 96ac4a72..dfc3e9ad 100644
--- a/subprojects/store-query-viatra/src/main/java/tools/refinery/store/query/viatra/internal/localsearch/GenericTypeExtend.java
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeExtend.java
@@ -1,39 +1,47 @@
1/******************************************************************************* 1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd. 2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the 3 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at 4 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html. 5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0 7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/ 8 *******************************************************************************/
9package tools.refinery.store.query.viatra.internal.localsearch; 9package tools.refinery.viatra.runtime.localsearch.operations.generic;
10 10
11import org.eclipse.viatra.query.runtime.localsearch.MatchingFrame; 11import java.util.ArrayList;
12import org.eclipse.viatra.query.runtime.localsearch.matcher.ISearchContext; 12import java.util.Collections;
13import org.eclipse.viatra.query.runtime.localsearch.operations.IIteratingSearchOperation; 13import java.util.Iterator;
14import org.eclipse.viatra.query.runtime.localsearch.operations.ISearchOperation; 14import java.util.List;
15import org.eclipse.viatra.query.runtime.matchers.context.IInputKey; 15import java.util.Objects;
16import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; 16import java.util.Set;
17import org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask;
18import org.eclipse.viatra.query.runtime.matchers.tuple.VolatileMaskedTuple;
19import org.eclipse.viatra.query.runtime.matchers.util.Preconditions;
20
21import java.util.*;
22import java.util.function.Function; 17import java.util.function.Function;
23import java.util.stream.Collectors; 18import java.util.stream.Collectors;
24 19
20import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
21import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
22import tools.refinery.viatra.runtime.localsearch.operations.ExtendOperationExecutor;
23import tools.refinery.viatra.runtime.localsearch.operations.IIteratingSearchOperation;
24import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
25import tools.refinery.viatra.runtime.matchers.context.IInputKey;
26import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
27import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
28import tools.refinery.viatra.runtime.matchers.tuple.VolatileMaskedTuple;
29import tools.refinery.viatra.runtime.matchers.util.Preconditions;
30
25/** 31/**
26 * @author Zoltan Ujhelyi 32 * @author Zoltan Ujhelyi
27 * @since 1.7 33 * @since 1.7
34 * @noextend This class is not intended to be subclassed by clients.
28 */ 35 */
29public class GenericTypeExtend implements IIteratingSearchOperation { 36public class GenericTypeExtend implements IIteratingSearchOperation {
37
30 private class Executor extends ExtendOperationExecutor<Tuple> { 38 private class Executor extends ExtendOperationExecutor<Tuple> {
31 private final VolatileMaskedTuple maskedTuple; 39 private final VolatileMaskedTuple maskedTuple;
32 40
33 public Executor() { 41 public Executor() {
34 this.maskedTuple = new VolatileMaskedTuple(callMask); 42 this.maskedTuple = new VolatileMaskedTuple(callMask);
35 } 43 }
36 44
37 @Override 45 @Override
38 protected Iterator<? extends Tuple> getIterator(MatchingFrame frame, ISearchContext context) { 46 protected Iterator<? extends Tuple> getIterator(MatchingFrame frame, ISearchContext context) {
39 maskedTuple.updateTuple(frame); 47 maskedTuple.updateTuple(frame);
@@ -65,13 +73,13 @@ public class GenericTypeExtend implements IIteratingSearchOperation {
65 frame.setValue(position, null); 73 frame.setValue(position, null);
66 } 74 }
67 } 75 }
68 76
69 @Override 77 @Override
70 public ISearchOperation getOperation() { 78 public ISearchOperation getOperation() {
71 return GenericTypeExtend.this; 79 return GenericTypeExtend.this;
72 } 80 }
73 } 81 }
74 82
75 private final IInputKey type; 83 private final IInputKey type;
76 private final int[] positions; 84 private final int[] positions;
77 private final List<Integer> positionList; 85 private final List<Integer> positionList;
@@ -80,7 +88,7 @@ public class GenericTypeExtend implements IIteratingSearchOperation {
80 private final TupleMask callMask; 88 private final TupleMask callMask;
81 89
82 /** 90 /**
83 * 91 *
84 * @param type 92 * @param type
85 * the type to execute the extend operation on 93 * the type to execute the extend operation on
86 * @param positions 94 * @param positions
@@ -119,14 +127,14 @@ public class GenericTypeExtend implements IIteratingSearchOperation {
119 public List<Integer> getVariablePositions() { 127 public List<Integer> getVariablePositions() {
120 return positionList; 128 return positionList;
121 } 129 }
122 130
123 @Override 131 @Override
124 public String toString() { 132 public String toString() {
125 return toString(Object::toString); 133 return toString(Object::toString);
126 } 134 }
127 135
128 @Override 136 @Override
129 public String toString(@SuppressWarnings("squid:S4276") Function<Integer, String> variableMapping) { 137 public String toString(Function<Integer, String> variableMapping) {
130 return "extend " + type.getPrettyPrintableName() + "(" 138 return "extend " + type.getPrettyPrintableName() + "("
131 + positionList.stream() 139 + positionList.stream()
132 .map(input -> String.format("%s%s", unboundVariableIndices.contains(input) ? "-" : "+", variableMapping.apply(input))) 140 .map(input -> String.format("%s%s", unboundVariableIndices.contains(input) ? "-" : "+", variableMapping.apply(input)))
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeExtendSingleValue.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeExtendSingleValue.java
new file mode 100644
index 00000000..45e4fd0e
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/generic/GenericTypeExtendSingleValue.java
@@ -0,0 +1,114 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.generic;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.List;
15import java.util.Objects;
16import java.util.function.Function;
17import java.util.stream.Collectors;
18
19import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
20import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
21import tools.refinery.viatra.runtime.localsearch.operations.IIteratingSearchOperation;
22import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
23import tools.refinery.viatra.runtime.localsearch.operations.extend.SingleValueExtendOperationExecutor;
24import tools.refinery.viatra.runtime.matchers.context.IInputKey;
25import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
26import tools.refinery.viatra.runtime.matchers.tuple.VolatileMaskedTuple;
27import tools.refinery.viatra.runtime.matchers.util.Preconditions;
28
29/**
30 * @author Zoltan Ujhelyi
31 * @since 1.7
32 * @noextend This class is not intended to be subclassed by clients.
33 */
34public class GenericTypeExtendSingleValue implements IIteratingSearchOperation {
35
36 private class Executor extends SingleValueExtendOperationExecutor<Object> {
37
38 private final VolatileMaskedTuple maskedTuple;
39
40 public Executor(int position) {
41 super(position);
42 this.maskedTuple = new VolatileMaskedTuple(callMask);
43 }
44
45 @Override
46 protected Iterator<? extends Object> getIterator(MatchingFrame frame, ISearchContext context) {
47 maskedTuple.updateTuple(frame);
48 return context.getRuntimeContext().enumerateValues(type, indexerMask, maskedTuple).iterator();
49 }
50
51 @Override
52 public ISearchOperation getOperation() {
53 return GenericTypeExtendSingleValue.this;
54 }
55 }
56
57 private final IInputKey type;
58 private final List<Integer> positionList;
59 private final TupleMask indexerMask;
60 private final TupleMask callMask;
61 private final int unboundVariableIndex;
62
63 /**
64 *
65 * @param type
66 * the type to execute the extend operation on
67 * @param positions
68 * the parameter positions that represent the variables of the input key
69 */
70 public GenericTypeExtendSingleValue(IInputKey type, int[] positions, TupleMask callMask, TupleMask indexerMask, int unboundVariableIndex) {
71 Preconditions.checkArgument(positions.length == type.getArity(),
72 "The type %s requires %d parameters, but %d positions are provided", type.getPrettyPrintableName(),
73 type.getArity(), positions.length);
74 List<Integer> modifiablePositionList = new ArrayList<>();
75 for (int position : positions) {
76 modifiablePositionList.add(position);
77 }
78 this.unboundVariableIndex = unboundVariableIndex;
79 this.positionList = Collections.unmodifiableList(modifiablePositionList);
80 this.type = type;
81
82 this.callMask = callMask;
83 this.indexerMask = indexerMask;
84 }
85
86 @Override
87 public IInputKey getIteratedInputKey() {
88 return type;
89 }
90
91 @Override
92 public ISearchOperationExecutor createExecutor() {
93 return new Executor(unboundVariableIndex);
94 }
95
96 @Override
97 public List<Integer> getVariablePositions() {
98 return positionList;
99 }
100
101 @Override
102 public String toString() {
103 return toString(Object::toString);
104 }
105
106 @Override
107 public String toString(Function<Integer, String> variableMapping) {
108 return "extend " + type.getPrettyPrintableName() + "("
109 + positionList.stream().map(
110 input -> String.format("%s%s", Objects.equals(input, unboundVariableIndex) ? "-" : "+", variableMapping.apply(input)))
111 .collect(Collectors.joining(", "))
112 + ")";
113 }
114}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/util/CallInformation.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/util/CallInformation.java
new file mode 100644
index 00000000..b141a7b0
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/operations/util/CallInformation.java
@@ -0,0 +1,186 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.operations.util;
10
11import java.util.ArrayList;
12import java.util.HashMap;
13import java.util.HashSet;
14import java.util.List;
15import java.util.Map;
16import java.util.Set;
17import java.util.function.Function;
18import java.util.stream.Collectors;
19
20import tools.refinery.viatra.runtime.localsearch.matcher.CallWithAdornment;
21import tools.refinery.viatra.runtime.localsearch.matcher.MatcherReference;
22import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
23import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
24import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.PatternCallBasedDeferred;
25import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.BinaryReflexiveTransitiveClosure;
26import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
27import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
28import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
29import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
30import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
31import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
32
33/**
34 * This class stores a precompiled version of call-related metadata and masks for local search operations
35 *
36 * @author Zoltan Ujhelyi
37 * @since 1.7
38 */
39public final class CallInformation {
40
41 private final TupleMask fullFrameMask;
42 private final TupleMask thinFrameMask;
43 private final TupleMask parameterMask;
44 private final int[] freeParameterIndices;
45
46 private final Map<PParameter, Integer> mapping = new HashMap<>();
47 private final Set<PParameter> adornment = new HashSet<>();
48 private final PQuery referredQuery;
49 private final MatcherReference matcherReference;
50 private final IQueryReference call;
51 private CallWithAdornment callWithAdornment;
52
53 public static CallInformation create(PatternCallBasedDeferred constraint, Map<PVariable, Integer> variableMapping, Set<Integer> bindings) {
54 return new CallInformation(constraint.getActualParametersTuple(), constraint, bindings, variableMapping);
55 }
56
57 public static CallInformation create(PositivePatternCall pCall, Map<PVariable, Integer> variableMapping, Set<Integer> bindings) {
58 return new CallInformation(pCall.getVariablesTuple(), pCall, bindings, variableMapping);
59 }
60
61 public static CallInformation create(BinaryTransitiveClosure constraint, Map<PVariable, Integer> variableMapping, Set<Integer> bindings) {
62 return new CallInformation(constraint.getVariablesTuple(), constraint, bindings, variableMapping);
63 }
64
65 /**
66 * @since 2.0
67 */
68 public static CallInformation create(BinaryReflexiveTransitiveClosure constraint, Map<PVariable, Integer> variableMapping, Set<Integer> bindings) {
69 return new CallInformation(constraint.getVariablesTuple(), constraint, bindings, variableMapping);
70 }
71
72 private CallInformation(Tuple actualParameters, IQueryReference call, final Set<Integer> bindings,
73 Map<PVariable, Integer> variableMapping) {
74 this.call = call;
75 this.referredQuery = call.getReferredQuery();
76 int keySize = actualParameters.getSize();
77 List<Integer> parameterMaskIndices = new ArrayList<>();
78 int[] fullParameterMaskIndices = new int[keySize];
79 for (int i = 0; i < keySize; i++) {
80 PParameter symbolicParameter = referredQuery.getParameters().get(i);
81 PVariable parameter = (PVariable) actualParameters.get(i);
82 Integer originalFrameIndex = variableMapping.get(parameter);
83 mapping.put(symbolicParameter, originalFrameIndex);
84 fullParameterMaskIndices[i] = originalFrameIndex;
85 if (bindings.contains(originalFrameIndex)) {
86 parameterMaskIndices.add(originalFrameIndex);
87 adornment.add(symbolicParameter);
88 }
89 }
90
91 thinFrameMask = TupleMask.fromSelectedIndices(variableMapping.size(), parameterMaskIndices);
92 fullFrameMask = TupleMask.fromSelectedIndices(variableMapping.size(), fullParameterMaskIndices);
93
94 // This second iteration is necessary as we don't know beforehand the number of bound parameters
95 int[] boundParameterIndices = new int[adornment.size()];
96 int boundIndex = 0;
97 freeParameterIndices = new int[keySize - adornment.size()];
98 int freeIndex = 0;
99 for (int i = 0; i < keySize; i++) {
100 if (bindings.contains(variableMapping.get(actualParameters.get(i)))) {
101 boundParameterIndices[boundIndex] = i;
102 boundIndex++;
103 } else {
104 freeParameterIndices[freeIndex] = i;
105 freeIndex++;
106 }
107 }
108 parameterMask = TupleMask.fromSelectedIndices(keySize, boundParameterIndices);
109 callWithAdornment = new CallWithAdornment(call, adornment);
110 matcherReference = callWithAdornment.getMatcherReference();
111 }
112
113 /**
114 * Returns a mask describing how the bound variables of a Matching Frame are mapped to parameter indexes
115 */
116 public TupleMask getThinFrameMask() {
117 return thinFrameMask;
118 }
119
120 /**
121 * Returns a mask describing how all variables of a Matching Frame are mapped to parameter indexes
122 */
123 public TupleMask getFullFrameMask() {
124 return fullFrameMask;
125 }
126
127 /**
128 * Returns a mask describing the adornment the called pattern uses
129 */
130 public TupleMask getParameterMask() {
131 return parameterMask;
132 }
133
134 public MatcherReference getReference() {
135 return matcherReference;
136 }
137
138 /**
139 * @since 2.1
140 */
141 public IQueryReference getCall() {
142 return call;
143 }
144
145 /**
146 * @since 2.1
147 */
148 public CallWithAdornment getCallWithAdornment() {
149 return callWithAdornment;
150 }
151
152 /**
153 * Returns the parameter indices that are unbound before the call
154 */
155 public int[] getFreeParameterIndices() {
156 return freeParameterIndices;
157 }
158
159 public List<Integer> getVariablePositions() {
160 List<Integer> variables = new ArrayList<>(mapping.size());
161 for(PParameter p : referredQuery.getParameters()){
162 variables.add(mapping.get(p));
163 }
164 return variables;
165 }
166
167
168
169 @Override
170 public String toString() {
171 return toString(Object::toString);
172 }
173
174 /**
175 * @since 2.0
176 */
177 public String toString(Function<Integer, String> variableMapping) {
178 return referredQuery.getFullyQualifiedName() + "("
179 + referredQuery.getParameters().stream().map(
180 input -> (adornment.contains(input) ? "+" : "-") + variableMapping.apply(mapping.get(input)))
181 .collect(Collectors.joining(","))
182 + ")";
183 }
184
185
186}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanDescriptor.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanDescriptor.java
new file mode 100644
index 00000000..987996c9
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanDescriptor.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.plan;
10
11import java.util.Collection;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.context.IInputKey;
15import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
17
18/**
19 * Denotes an executable plan
20 *
21 * @author Grill Balázs
22 * @since 1.4
23 *
24 */
25public interface IPlanDescriptor {
26
27 /**
28 * The query which this plan implements
29 */
30 public PQuery getQuery();
31
32 /**
33 * The executable search plans for each body in the query
34 * @since 2.0
35 */
36 public Collection<SearchPlanForBody> getPlan();
37
38 /**
39 * The set of parameters this plan assumes to be bound
40 */
41 public Set<PParameter> getAdornment();
42
43 /**
44 * The collection of {@link IInputKey}s which needs to be iterated during the execution of this plan. For optimal
45 * performance, instances of these keys might be indexed.
46 */
47 public Set<IInputKey> getIteratedKeys();
48
49}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanProvider.java
new file mode 100644
index 00000000..b74282ca
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/IPlanProvider.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.plan;
10
11import tools.refinery.viatra.runtime.localsearch.matcher.MatcherReference;
12import tools.refinery.viatra.runtime.localsearch.matcher.integration.LocalSearchHints;
13import tools.refinery.viatra.runtime.localsearch.planner.compiler.IOperationCompiler;
14import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
15import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
16import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
17
18/**
19 * @author Grill Balázs
20 * @since 1.4
21 * @noreference This interface is not intended to be referenced by clients.
22 */
23public interface IPlanProvider {
24
25 /**
26 * @throws ViatraQueryRuntimeException
27 * @since 2.1
28 */
29 public IPlanDescriptor getPlan(IQueryBackendContext backend, IOperationCompiler compiler,
30 ResultProviderRequestor resultProviderRequestor,
31 LocalSearchHints configuration, MatcherReference key);
32
33}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/PlanDescriptor.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/PlanDescriptor.java
new file mode 100644
index 00000000..a5565546
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/PlanDescriptor.java
@@ -0,0 +1,84 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.plan;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.Collections;
14import java.util.HashSet;
15import java.util.List;
16import java.util.Set;
17import java.util.stream.Collectors;
18
19import tools.refinery.viatra.runtime.localsearch.operations.IIteratingSearchOperation;
20import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
21import tools.refinery.viatra.runtime.matchers.context.IInputKey;
22import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
23import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
24
25/**
26 * @author Grill Balázs
27 * @since 1.4
28 *
29 */
30public class PlanDescriptor implements IPlanDescriptor {
31
32 private final PQuery pquery;
33 private final List<SearchPlanForBody> plan;
34 private final Set<PParameter> adornment;
35 private Set<IInputKey> iteratedKeys = null;
36
37 public PlanDescriptor(PQuery pquery, Collection<SearchPlanForBody> plan, Set<PParameter> adornment) {
38 this.pquery = pquery;
39 this.plan = new ArrayList<>(plan);
40 this.adornment = adornment;
41 }
42
43 @Override
44 public PQuery getQuery() {
45 return pquery;
46 }
47
48 @Override
49 public Collection<SearchPlanForBody> getPlan() {
50 return plan;
51 }
52
53 @Override
54 public Set<PParameter> getAdornment() {
55 return adornment;
56 }
57
58 @Override
59 public Set<IInputKey> getIteratedKeys() {
60 if (iteratedKeys == null){
61 Set<IInputKey> keys = new HashSet<>();
62 for(SearchPlanForBody bodyPlan : plan){
63 for(ISearchOperation operation : bodyPlan.getCompiledOperations()){
64 if (operation instanceof IIteratingSearchOperation){
65 keys.add(((IIteratingSearchOperation) operation).getIteratedInputKey());
66 }
67 }
68 }
69 iteratedKeys = Collections.unmodifiableSet(keys);
70 }
71 return iteratedKeys;
72 }
73
74 @Override
75 public String toString() {
76 return new StringBuilder().append("Plan for ").append(pquery.getFullyQualifiedName()).append("(")
77 .append(adornment.stream().map(PParameter::getName).collect(Collectors.joining(",")))
78 .append("{")
79 .append(plan.stream().map(Object::toString).collect(Collectors.joining("}\n{")))
80 .append("}")
81 .toString();
82 }
83
84}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlan.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlan.java
new file mode 100644
index 00000000..3159f707
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlan.java
@@ -0,0 +1,99 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.plan;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.List;
14import java.util.Map;
15import java.util.Map.Entry;
16import java.util.stream.Collectors;
17
18import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
19import tools.refinery.viatra.runtime.matchers.psystem.PBody;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
22
23/**
24 * A SearchPlan stores a collection of SearchPlanOperations for a fixed order of variables.
25 *
26 * @author Zoltan Ujhelyi
27 *
28 */
29public class SearchPlan {
30
31 private final List<ISearchOperation> operations;
32 private final Map<Integer, PVariable> variableMapping;
33 private final TupleMask parameterMask;
34 private final PBody body;
35
36 /**
37 * @since 2.0
38 */
39 public SearchPlan(PBody body, List<ISearchOperation> operations, TupleMask parameterMask, Map<PVariable, Integer> variableMapping) {
40 this.body = body;
41 this.operations = Collections.unmodifiableList(new ArrayList<>(operations));
42 this.parameterMask = parameterMask;
43 this.variableMapping = Collections.unmodifiableMap(variableMapping.entrySet().stream()
44 .collect(Collectors.toMap(Entry::getValue, Entry::getKey)));
45 }
46
47
48 /**
49 * Returns an immutable list of operations stored in the plan.
50 * @return the operations
51 */
52 public List<ISearchOperation> getOperations() {
53 return operations;
54 }
55
56 /**
57 * Returns an immutable map of variable mappings for the plan
58 * @since 2.0
59 */
60 public Map<Integer, PVariable> getVariableMapping() {
61 return variableMapping;
62 }
63
64 /**
65 * Returns the index of a given operation in the plan
66 * @since 2.0
67 */
68 public int getOperationIndex(ISearchOperation operation) {
69 return operations.indexOf(operation);
70 }
71
72 /**
73 * @since 2.0
74 */
75 public TupleMask getParameterMask() {
76 return parameterMask;
77 }
78
79 /**
80 * @since 2.0
81 */
82 public PBody getSourceBody() {
83 return body;
84 }
85
86 @Override
87 public String toString() {
88 StringBuilder sb = new StringBuilder();
89
90 sb.append("{\n");
91 for(ISearchOperation operation : this.getOperations()){
92 sb.append("\t");
93 sb.append(operation);
94 sb.append("\n");
95 }
96 sb.append("}");
97 return sb.toString();
98 }
99}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanExecutor.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanExecutor.java
new file mode 100644
index 00000000..4a4e2450
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanExecutor.java
@@ -0,0 +1,210 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro Zoltan Ujhelyi and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10 package tools.refinery.viatra.runtime.localsearch.plan;
11
12
13import java.util.Collections;
14import java.util.List;
15import java.util.Map;
16import java.util.concurrent.CopyOnWriteArrayList;
17import java.util.stream.Collectors;
18
19import org.apache.log4j.Logger;
20import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
21import tools.refinery.viatra.runtime.localsearch.exceptions.LocalSearchException;
22import tools.refinery.viatra.runtime.localsearch.matcher.ILocalSearchAdaptable;
23import tools.refinery.viatra.runtime.localsearch.matcher.ILocalSearchAdapter;
24import tools.refinery.viatra.runtime.localsearch.matcher.ISearchContext;
25import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
26import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation.ISearchOperationExecutor;
27import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
28import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
29import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
30import tools.refinery.viatra.runtime.matchers.util.Preconditions;
31
32/**
33 * A search plan executor is used to execute {@link SearchPlan} instances.
34 * @noinstantiate This class is not intended to be instantiated by clients.
35 */
36public class SearchPlanExecutor implements ILocalSearchAdaptable {
37
38 private int currentOperation;
39 private final List<ISearchOperationExecutor> operations;
40 private final SearchPlan plan;
41 private final ISearchContext context;
42 private final List<ILocalSearchAdapter> adapters = new CopyOnWriteArrayList<>();
43
44 /**
45 * @since 2.0
46 */
47 public Map<Integer, PVariable> getVariableMapping() {
48 return plan.getVariableMapping();
49 }
50
51 public int getCurrentOperation() {
52 return currentOperation;
53 }
54
55 public SearchPlan getSearchPlan() {
56 return plan;
57 }
58
59 /**
60 * @since 1.7
61 */
62 public TupleMask getParameterMask() {
63 return plan.getParameterMask();
64 }
65
66 @Override
67 public void addAdapters(List<ILocalSearchAdapter> adapters) {
68 for(ILocalSearchAdapter adapter : adapters){
69 if (!this.adapters.contains(adapter)){
70 this.adapters.add(adapter);
71 adapter.adapterRegistered(this);
72 }
73 }
74 }
75
76 @Override
77 public void removeAdapters(List<ILocalSearchAdapter> adapters) {
78 for (ILocalSearchAdapter adapter : adapters) {
79 if (this.adapters.remove(adapter)){
80 adapter.adapterUnregistered(this);
81 }
82 }
83 }
84
85 /**
86 * @since 2.0
87 */
88 public SearchPlanExecutor(SearchPlan plan, ISearchContext context) {
89 Preconditions.checkArgument(context != null, "Context cannot be null");
90 this.plan = plan;
91 this.context = context;
92 operations = plan.getOperations().stream().map(ISearchOperation::createExecutor).collect(Collectors.toList());
93 this.currentOperation = -1;
94 }
95
96
97 private void init(MatchingFrame frame) {
98 if (currentOperation == -1) {
99 currentOperation++;
100 ISearchOperationExecutor operation = operations.get(currentOperation);
101 if (!adapters.isEmpty()){
102 for (ILocalSearchAdapter adapter : adapters) {
103 adapter.executorInitializing(plan, frame);
104 }
105 }
106 operation.onInitialize(frame, context);
107 } else if (currentOperation == operations.size()) {
108 currentOperation--;
109 } else {
110 throw new LocalSearchException(LocalSearchException.PLAN_EXECUTION_ERROR);
111 }
112 }
113
114
115 /**
116 * Calculates the cost of the search plan.
117 */
118 public double cost() {
119 /* default generated stub */
120 return 0.0;
121 }
122
123 /**
124 * @throws ViatraQueryRuntimeException
125 */
126 public boolean execute(MatchingFrame frame) {
127 int upperBound = operations.size() - 1;
128 init(frame);
129 operationSelected(frame, currentOperation, false);
130 while (currentOperation >= 0 && currentOperation <= upperBound) {
131 if (operations.get(currentOperation).execute(frame, context)) {
132 operationExecuted(frame, currentOperation, true);
133 currentOperation++;
134 operationSelected(frame, currentOperation, false);
135 if (currentOperation <= upperBound) {
136 ISearchOperationExecutor operation = operations.get(currentOperation);
137 operation.onInitialize(frame, context);
138 }
139 } else {
140 operationExecuted(frame, currentOperation, false);
141 ISearchOperationExecutor operation = operations.get(currentOperation);
142 operation.onBacktrack(frame, context);
143 currentOperation--;
144 operationSelected(frame, currentOperation, true);
145 }
146 }
147 boolean matchFound = currentOperation > upperBound;
148 if (matchFound && !adapters.isEmpty()) {
149 for (ILocalSearchAdapter adapter : adapters) {
150 adapter.matchFound(plan, frame);
151 }
152 }
153 return matchFound;
154 }
155
156 public void resetPlan() {
157 currentOperation = -1;
158 }
159
160 public void printDebugInformation() {
161 for (int i = 0; i < operations.size(); i++) {
162 Logger.getRootLogger().debug("[" + i + "]\t" + operations.get(i).toString());
163 }
164 }
165
166 private void operationExecuted(MatchingFrame frame, int operationIndex, boolean isSuccessful) {
167 if (!adapters.isEmpty()){
168 for (ILocalSearchAdapter adapter : adapters) {
169 adapter.operationExecuted(plan, operations.get(operationIndex).getOperation(), frame, isSuccessful);
170 }
171 }
172 }
173
174 private void operationSelected(MatchingFrame frame, int operationIndex, boolean isBacktrack) {
175 if (!adapters.isEmpty() && operationIndex >= 0 && operationIndex < operations.size()){
176 for (ILocalSearchAdapter adapter : adapters) {
177 adapter.operationSelected(plan, operations.get(operationIndex).getOperation(), frame, isBacktrack);
178 }
179 }
180 }
181
182 public ISearchContext getContext() {
183 return context;
184 }
185
186 @Override
187 public List<ILocalSearchAdapter> getAdapters() {
188 return Collections.<ILocalSearchAdapter>unmodifiableList(this.adapters);
189 }
190
191 @Override
192 public void addAdapter(ILocalSearchAdapter adapter) {
193 addAdapters(Collections.singletonList(adapter));
194 }
195
196 @Override
197 public void removeAdapter(ILocalSearchAdapter adapter) {
198 removeAdapters(Collections.singletonList(adapter));
199 }
200
201 @Override
202 public String toString() {
203 if (operations == null) {
204 return "Unspecified plan";
205 } else {
206 return operations.stream().map(Object::toString).collect(Collectors.joining("\n"));
207 }
208 }
209
210}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanForBody.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanForBody.java
new file mode 100644
index 00000000..e0300da4
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SearchPlanForBody.java
@@ -0,0 +1,115 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.plan;
10
11import java.util.ArrayList;
12import java.util.Arrays;
13import java.util.Collection;
14import java.util.List;
15import java.util.Map;
16import java.util.stream.Collectors;
17
18import tools.refinery.viatra.runtime.localsearch.matcher.CallWithAdornment;
19import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
20import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
21import tools.refinery.viatra.runtime.matchers.psystem.PBody;
22import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
23import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
24
25/**
26 * This class is responsible for storing the results of the planner and operation compiler for a selected body.
27 * @since 2.0
28 * @noinstantiate This class is not intended to be instantiated by clients.
29 */
30public class SearchPlanForBody {
31
32 private final PBody body;
33 private final Map<PVariable, Integer> variableKeys;
34 private final int[] parameterKeys;
35 private final SubPlan plan;
36 private final List<ISearchOperation> compiledOperations;
37 private final Collection<CallWithAdornment> dependencies;
38 private final double cost;
39 private final Object internalRepresentation;
40
41 /**
42 * @since 2.1
43 */
44 public SearchPlanForBody(PBody body, Map<PVariable, Integer> variableKeys,
45 SubPlan plan, List<ISearchOperation> compiledOperations, Collection<CallWithAdornment> dependencies,
46 Object internalRepresentation, double cost) {
47 super();
48 this.body = body;
49 this.variableKeys = variableKeys;
50 this.plan = plan;
51 this.internalRepresentation = internalRepresentation;
52 this.cost = cost;
53 List<PVariable> parameters = body.getSymbolicParameterVariables();
54 parameterKeys = new int[parameters.size()];
55 for (int i=0; i<parameters.size(); i++) {
56 parameterKeys[i] = variableKeys.get(parameters.get(i));
57 }
58 this.compiledOperations = new ArrayList<>(compiledOperations.size()+1);
59 this.compiledOperations.addAll(compiledOperations);
60
61 this.dependencies = new ArrayList<>(dependencies);
62 }
63
64 public PBody getBody() {
65 return body;
66 }
67
68 public Map<PVariable, Integer> getVariableKeys() {
69 return variableKeys;
70 }
71
72 public int[] getParameterKeys() {
73 return Arrays.copyOf(parameterKeys, parameterKeys.length);
74 }
75
76 public List<ISearchOperation> getCompiledOperations() {
77 return compiledOperations;
78 }
79
80 public SubPlan getPlan() {
81 return plan;
82 }
83
84 public Collection<CallWithAdornment> getDependencies() {
85 return dependencies;
86 }
87
88 public TupleMask calculateParameterMask() {
89 return TupleMask.fromSelectedIndices(variableKeys.size(), parameterKeys);
90 }
91
92 @Override
93 public String toString() {
94 return compiledOperations.stream().map(Object::toString).collect(Collectors.joining("\n"));
95 }
96
97 /**
98 * @since 2.1
99 */
100 public double getCost() {
101 return cost;
102 }
103
104 /**
105 * @return The internal representation of the search plan, if any, for traceability
106 * @since 2.1
107 */
108 public Object getInternalRepresentation() {
109 return internalRepresentation;
110 }
111
112
113
114
115}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SimplePlanProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SimplePlanProvider.java
new file mode 100644
index 00000000..ed31bcb0
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/plan/SimplePlanProvider.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.plan;
10
11import java.util.Collection;
12
13import org.apache.log4j.Logger;
14import tools.refinery.viatra.runtime.localsearch.matcher.MatcherReference;
15import tools.refinery.viatra.runtime.localsearch.matcher.integration.LocalSearchHints;
16import tools.refinery.viatra.runtime.localsearch.planner.LocalSearchPlanner;
17import tools.refinery.viatra.runtime.localsearch.planner.compiler.IOperationCompiler;
18import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
19import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
20
21/**
22 * A plan provider implementation which caches previously calculated plans to avoid re-planning for the same adornment
23 *
24 * @author Grill Balázs
25 * @since 1.7
26 *
27 */
28public class SimplePlanProvider implements IPlanProvider {
29
30 private final Logger logger;
31
32 public SimplePlanProvider(Logger logger) {
33 this.logger = logger;
34 }
35
36 @Override
37 public IPlanDescriptor getPlan(IQueryBackendContext backend, IOperationCompiler compiler,
38 final ResultProviderRequestor resultRequestor,
39 final LocalSearchHints configuration, MatcherReference key) {
40
41 LocalSearchPlanner planner = new LocalSearchPlanner(backend, compiler, logger, configuration, resultRequestor);
42
43 Collection<SearchPlanForBody> plansForBodies = planner.plan(key.getQuery(), key.getAdornment());
44
45 IPlanDescriptor plan = new PlanDescriptor(key.getQuery(), plansForBodies, key.getAdornment());
46 return plan;
47 }
48
49}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ILocalSearchPlanner.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ILocalSearchPlanner.java
new file mode 100644
index 00000000..dfd9a3c8
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ILocalSearchPlanner.java
@@ -0,0 +1,38 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11import java.util.Collection;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.localsearch.plan.SearchPlanForBody;
15import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
18
19/**
20 * @author Zoltan Ujhelyi
21 * @since 1.7
22 */
23public interface ILocalSearchPlanner {
24
25 /**
26 * Creates executable plans for the provided query. It is required to call one of the
27 * <code>initializePlanner()</code> methods before calling this method.
28 *
29 * @param querySpec
30 * @param boundParameters
31 * a set of bound parameters
32 * @return a mapping between ISearchOperation list and a mapping, that holds a PVariable-Integer mapping for the
33 * list of ISearchOperations
34 * @throws ViatraQueryRuntimeException
35 */
36 Collection<SearchPlanForBody> plan(PQuery querySpec, Set<PParameter> boundParameters);
37
38} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ISearchPlanCodeGenerator.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ISearchPlanCodeGenerator.java
new file mode 100644
index 00000000..72218337
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/ISearchPlanCodeGenerator.java
@@ -0,0 +1,23 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11import java.util.List;
12
13import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
14
15/**
16 * @author Marton Bur
17 *
18 */
19public interface ISearchPlanCodeGenerator {
20
21 void compile(List<List<ISearchOperation>> plans);
22
23}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchPlanner.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchPlanner.java
new file mode 100644
index 00000000..f44be655
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchPlanner.java
@@ -0,0 +1,140 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.HashMap;
14import java.util.HashSet;
15import java.util.List;
16import java.util.Map;
17import java.util.Set;
18
19import org.apache.log4j.Logger;
20import tools.refinery.viatra.runtime.localsearch.matcher.integration.LocalSearchHints;
21import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
22import tools.refinery.viatra.runtime.localsearch.plan.SearchPlanForBody;
23import tools.refinery.viatra.runtime.localsearch.planner.compiler.IOperationCompiler;
24import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
25import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
26import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
27import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
28import tools.refinery.viatra.runtime.matchers.psystem.PBody;
29import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
30import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
31import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
32import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
33import tools.refinery.viatra.runtime.matchers.psystem.rewriters.PBodyNormalizer;
34import tools.refinery.viatra.runtime.matchers.psystem.rewriters.PDisjunctionRewriter;
35import tools.refinery.viatra.runtime.matchers.psystem.rewriters.PDisjunctionRewriterCacher;
36import tools.refinery.viatra.runtime.matchers.psystem.rewriters.PQueryFlattener;
37
38/**
39 *
40 * @author Marton Bur
41 * @noreference This class is not intended to be referenced by clients.
42 */
43public class LocalSearchPlanner implements ILocalSearchPlanner {
44
45 // Externally set tools for planning
46 private final PDisjunctionRewriter preprocessor;
47 private final LocalSearchRuntimeBasedStrategy plannerStrategy;
48 private final IQueryRuntimeContext runtimeContext;
49 private final LocalSearchHints configuration;
50 private final IOperationCompiler operationCompiler;
51 private final IQueryBackendContext context;
52 private final ResultProviderRequestor resultRequestor;
53
54 /**
55 * @param resultRequestor
56 * @since 1.7
57 */
58 public LocalSearchPlanner(IQueryBackendContext backendContext, IOperationCompiler compiler, Logger logger,
59 final LocalSearchHints configuration, ResultProviderRequestor resultRequestor)
60 {
61
62 this.runtimeContext = backendContext.getRuntimeContext();
63 this.configuration = configuration;
64 this.operationCompiler = compiler;
65 this.resultRequestor = resultRequestor;
66 PQueryFlattener flattener = new PQueryFlattener(configuration.getFlattenCallPredicate());
67 /*
68 * TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=439358: The normalizer is initialized with the false
69 * parameter to turn off unary constraint elimination to work around an issue related to plan ordering: the
70 * current implementation of the feature target checking operations expect that the source types were checked
71 * before. However, this causes duplicate constraint checks in the search plan that might affect performance
72 * negatively.
73 */
74 PBodyNormalizer normalizer = new PBodyNormalizer(runtimeContext.getMetaContext()) {
75
76 @Override
77 protected boolean shouldCalculateImpliedTypes(PQuery query) {
78 return false;
79 }
80 };
81 preprocessor = new PDisjunctionRewriterCacher(flattener, normalizer);
82
83 plannerStrategy = new LocalSearchRuntimeBasedStrategy();
84
85 context = backendContext;
86 }
87
88 /**
89 * Creates executable plans for the provided query. It is required to call one of the
90 * <code>initializePlanner()</code> methods before calling this method.
91 *
92 * @param querySpec
93 * @param boundParameters
94 * a set of bound parameters
95 * @return a mapping between ISearchOperation list and a mapping, that holds a PVariable-Integer mapping for the
96 * list of ISearchOperations
97 */
98 @Override
99 public Collection<SearchPlanForBody> plan(PQuery querySpec, Set<PParameter> boundParameters) {
100 // 1. Preparation
101 preprocessor.setTraceCollector(configuration.getTraceCollector());
102 Set<PBody> normalizedBodies = preprocessor.rewrite(querySpec.getDisjunctBodies()).getBodies();
103
104 List<SearchPlanForBody> plansForBodies = new ArrayList<>(normalizedBodies.size());
105
106 for (PBody normalizedBody : normalizedBodies) {
107 // 2. Plan creation
108 // Context has matchers for the referred Queries (IQuerySpecifications)
109 Set<PVariable> boundVariables = calculatePatternAdornmentForPlanner(boundParameters, normalizedBody);
110 PlanState searchPlanInternal = plannerStrategy.plan(normalizedBody, boundVariables, context, resultRequestor, configuration);
111 SubPlan plan = plannerStrategy.convertPlan(boundVariables, searchPlanInternal);
112 // 3. PConstraint -> POperation compilation step
113 // * Pay extra caution to extend operations, when more than one variables are unbound
114 List<ISearchOperation> compiledOperations = operationCompiler.compile(plan, boundParameters);
115 // Store the variable mappings for the plans for debug purposes (traceability information)
116 SearchPlanForBody compiledPlan = new SearchPlanForBody(normalizedBody,
117 operationCompiler.getVariableMappings(), plan, compiledOperations,
118 operationCompiler.getDependencies(),
119 searchPlanInternal, searchPlanInternal.getCost());
120
121 plansForBodies.add(compiledPlan);
122 }
123
124 return plansForBodies;
125 }
126
127 private Set<PVariable> calculatePatternAdornmentForPlanner(Set<PParameter> boundParameters, PBody normalizedBody) {
128 Map<PParameter, PVariable> parameterMapping = new HashMap<>();
129 for (ExportedParameter constraint : normalizedBody.getSymbolicParameters()) {
130 parameterMapping.put(constraint.getPatternParameter(), constraint.getParameterVariable());
131 }
132 Set<PVariable> boundVariables = new HashSet<>();
133 for (PParameter parameter : boundParameters) {
134 PVariable mappedParameter = parameterMapping.get(parameter);
135 boundVariables.add(mappedParameter);
136 }
137 return boundVariables;
138 }
139
140}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchRuntimeBasedStrategy.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchRuntimeBasedStrategy.java
new file mode 100644
index 00000000..1bebe37e
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/LocalSearchRuntimeBasedStrategy.java
@@ -0,0 +1,257 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.Collections;
14import java.util.HashMap;
15import java.util.List;
16import java.util.Map;
17import java.util.Set;
18
19import tools.refinery.viatra.runtime.localsearch.matcher.integration.LocalSearchHints;
20import tools.refinery.viatra.runtime.localsearch.planner.cost.ICostFunction;
21import tools.refinery.viatra.runtime.localsearch.planner.util.OperationCostComparator;
22import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
23import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
24import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
25import tools.refinery.viatra.runtime.matchers.planning.SubPlanFactory;
26import tools.refinery.viatra.runtime.matchers.planning.operations.PApply;
27import tools.refinery.viatra.runtime.matchers.planning.operations.PProject;
28import tools.refinery.viatra.runtime.matchers.planning.operations.PStart;
29import tools.refinery.viatra.runtime.matchers.psystem.PBody;
30import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
31import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
32import tools.refinery.viatra.runtime.matchers.util.Sets;
33
34/**
35 * This class contains the logic for local search plan calculation based on costs of the operations.
36 * Its name refers to the fact that the strategy tries to use as much information as available about
37 * the model on which the matching is initiated. When no runtime info is available, it falls back to
38 * the information available from the metamodel durint operation cost calculation.
39 *
40 * The implementation is based on the paper "Gergely Varró, Frederik Deckwerth, Martin Wieber, and Andy Schürr:
41 * An algorithm for generating model-sensitive search plans for pattern matching on EMF models"
42 * (DOI: 10.1007/s10270-013-0372-2)
43 *
44 * @author Marton Bur
45 * @noreference This class is not intended to be referenced by clients.
46 */
47public class LocalSearchRuntimeBasedStrategy {
48
49 private final OperationCostComparator infoComparator = new OperationCostComparator();
50
51
52 /**
53 * Converts a plan to the standard format
54 */
55 protected SubPlan convertPlan(Set<PVariable> initialBoundVariables, PlanState searchPlan) {
56 PBody pBody;
57 pBody = searchPlan.getAssociatedPBody();
58
59 // Create a starting plan
60 SubPlanFactory subPlanFactory = new SubPlanFactory(pBody);
61
62 // We assume that the adornment (now the bound variables) is previously set
63 SubPlan plan = subPlanFactory.createSubPlan(new PStart(initialBoundVariables));
64
65 List<PConstraintInfo> operations = searchPlan.getOperations();
66 for (PConstraintInfo pConstraintPlanInfo : operations) {
67 PConstraint pConstraint = pConstraintPlanInfo.getConstraint();
68 plan = subPlanFactory.createSubPlan(new PApply(pConstraint), plan);
69 }
70
71 return subPlanFactory.createSubPlan(new PProject(pBody.getSymbolicParameterVariables()), plan);
72 }
73
74 /**
75 * The implementation of a local search-based algorithm to create a search plan for a flattened (and normalized)
76 * PBody
77 * @param pBody for which the plan is to be created
78 * @param initialBoundVariables variables that are known to have already assigned values
79 * @param context the backend context
80 * @param resultProviderRequestor requestor for accessing result providers of called patterns
81 * @param configuration the planner configuration
82 * @return the complete search plan for the given {@link PBody}
83 * @since 2.1
84 */
85 protected PlanState plan(PBody pBody, Set<PVariable> initialBoundVariables,
86 IQueryBackendContext context, final ResultProviderRequestor resultProviderRequestor,
87 LocalSearchHints configuration) {
88 final ICostFunction costFunction = configuration.getCostFunction();
89 PConstraintInfoInferrer pConstraintInfoInferrer = new PConstraintInfoInferrer(
90 configuration.isUseBase(), context, resultProviderRequestor, costFunction::apply);
91
92 // Create mask infos
93 Set<PConstraint> constraintSet = pBody.getConstraints();
94 List<PConstraintInfo> constraintInfos =
95 pConstraintInfoInferrer.createPConstraintInfos(constraintSet);
96
97 // Calculate the characteristic function
98 // The characteristic function tells whether a given adornment is backward reachable from the (B)* state, where
99 // each variable is bound.
100 // The characteristic function is represented as a set of set of variables
101 // TODO this calculation is not not implemented yet, thus the contents of the returned set is not considered later
102 List<Set<PVariable>> reachableBoundVariableSets = reachabilityAnalysis(pBody, constraintInfos);
103 int k = configuration.getRowCount();
104 PlanState searchPlan = calculateSearchPlan(pBody, initialBoundVariables, k, reachableBoundVariableSets, constraintInfos);
105 return searchPlan;
106 }
107
108 private PlanState calculateSearchPlan(PBody pBody, Set<PVariable> initialBoundVariables, int k,
109 List<Set<PVariable>> reachableBoundVariableSets, List<PConstraintInfo> allMaskInfos) {
110
111 List<PConstraintInfo> allPotentialExtendInfos = new ArrayList<>();
112 List<PConstraintInfo> allPotentialCheckInfos = new ArrayList<>();
113 Map<PVariable, List<PConstraintInfo>> checkOpsByVariables = new HashMap<>();
114 Map<PVariable, Collection<PConstraintInfo>> extendOpsByBoundVariables = new HashMap<>();
115
116 for (PConstraintInfo op : allMaskInfos) {
117 if (op.getFreeVariables().isEmpty()) { // CHECK
118 allPotentialCheckInfos.add(op);
119 } else { // EXTEND
120 allPotentialExtendInfos.add(op);
121 for (PVariable variable : op.getBoundVariables()) {
122 extendOpsByBoundVariables.computeIfAbsent(variable, v -> new ArrayList<>()).add(op);
123 }
124 }
125 }
126 // For CHECKs only, we must start from lists that are ordered by the cost of the constraint application
127 Collections.sort(allPotentialCheckInfos, infoComparator); // costs are eagerly needed for check ops
128 for (PConstraintInfo op : allPotentialCheckInfos) {
129 for (PVariable variable : op.getBoundVariables()) {
130 checkOpsByVariables.computeIfAbsent(variable, v -> new ArrayList<>()).add(op);
131 }
132 }
133 // costs are not needed for extend ops until they are first applied (TODO make cost computaiton on demand)
134
135
136 // rename for better understanding
137 Set<PVariable> boundVariables = initialBoundVariables;
138 Set<PVariable> freeVariables = Sets.difference(pBody.getUniqueVariables(), initialBoundVariables);
139
140 int variableCount = pBody.getUniqueVariables().size();
141 int n = freeVariables.size();
142
143 List<List<PlanState>> stateTable = initializeStateTable(k, n);
144
145 // Set initial state: begin with an empty operation list
146 PlanState initialState = new PlanState(pBody, boundVariables);
147
148 // Initial state creation, categorizes all operations; add present checks to operationsList
149 initialState.updateExtends(allPotentialExtendInfos);
150 initialState.applyChecks(allPotentialCheckInfos);
151 stateTable.get(n).add(0, initialState);
152
153 // stateTable.get(0) will contain the states with adornment B*
154 for (int i = n; i > 0; i--) {
155 for (int j = 0; j < k && j < stateTable.get(i).size(); j++) {
156 PlanState currentState = stateTable.get(i).get(j);
157
158 for (PConstraintInfo constraintInfo : currentState.getPresentExtends()) {
159 // for each present EXTEND operation
160 PlanState newState = calculateNextState(currentState, constraintInfo);
161 // also eagerly perform any CHECK operations that become applicable (extends still deferred)
162 newState.applyChecksBasedOnDelta(checkOpsByVariables);
163
164 if(currentState.getBoundVariables().size() == newState.getBoundVariables().size()){
165 // This means no variable binding was done, go on with the next constraint info
166 continue;
167 }
168 int i2 = variableCount - newState.getBoundVariables().size();
169
170 List<Integer> newIndices = determineIndices(stateTable, i2, newState, k);
171 int a = newIndices.get(0);
172 int c = newIndices.get(1);
173
174 if (checkInsertCondition(stateTable.get(i2), newState, reachableBoundVariableSets, a, c, k)) {
175 updateExtends(newState, currentState, extendOpsByBoundVariables); // preprocess next steps
176 insert(stateTable,i2, newState, a, c, k);
177 }
178 }
179 }
180 }
181
182 return stateTable.get(0).get(0);
183 }
184
185 private List<List<PlanState>> initializeStateTable(int k, int n) {
186 List<List<PlanState>> stateTable = new ArrayList<>();
187 // Initialize state table and fill it with null
188 for (int i = 0; i <= n ; i++) {
189 stateTable.add(new ArrayList<>());
190 }
191 return stateTable;
192 }
193
194 private void insert(List<List<PlanState>> stateTable, int idx, PlanState newState, int a, int c, int k) {
195 stateTable.get(idx).add(c, newState);
196 while(stateTable.get(idx).size() > k){
197 // Truncate back to size k when grows too big
198 stateTable.set(idx, stateTable.get(idx).subList(0, k));
199 }
200 }
201
202 private void updateExtends(PlanState newState, PlanState currentState,
203 Map<PVariable, ? extends Collection<PConstraintInfo>> extendOpsByBoundVariables)
204 {
205 List<PConstraintInfo> presentExtends = currentState.getPresentExtends();
206
207 // Recategorize operations
208 newState.updateExtendsBasedOnDelta(presentExtends, extendOpsByBoundVariables);
209
210 return;
211 }
212
213 private boolean checkInsertCondition(List<PlanState> list, PlanState newState,
214 List<Set<PVariable>> reachableBoundVariableSets, int a, int c, int k) {
215// boolean isAmongBestK = (a == (k + 1)) && c < a && reachableBoundVariableSets.contains(newState.getBoundVariables());
216 boolean isAmongBestK = a == k && c < a ;
217 boolean isBetterThanCurrent = a < k && c <= a;
218
219 return isAmongBestK || isBetterThanCurrent;
220 }
221
222 private List<Integer> determineIndices(List<List<PlanState>> stateTable, int i2, PlanState newState, int k) {
223 int a = k;
224 int c = 0;
225 List<Integer> acIndices = new ArrayList<>();
226 for (int j = 0; j < k; j++) {
227 if (j < stateTable.get(i2).size()) {
228 PlanState stateInTable = stateTable.get(i2).get(j);
229 if (newState.getBoundVariables().equals(stateInTable.getBoundVariables())) {
230 // The new state has the same adornment as the stored one - they are not adornment disjoint
231 a = j;
232 }
233 if (newState.getCost() >= stateInTable.getCost()) {
234 c = j + 1;
235 }
236 } else {
237 break;
238 }
239 }
240
241 acIndices.add(a);
242 acIndices.add(c);
243 return acIndices;
244 }
245
246 private PlanState calculateNextState(PlanState currentState, PConstraintInfo constraintInfo) {
247 return currentState.cloneWithApplied(constraintInfo);
248 }
249
250 private List<Set<PVariable>> reachabilityAnalysis(PBody pBody, List<PConstraintInfo> constraintInfos) {
251 // TODO implement reachability analisys, also save/persist the results somewhere
252 List<Set<PVariable>> reachableBoundVariableSets = new ArrayList<>();
253 return reachableBoundVariableSets;
254 }
255
256
257}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintCategory.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintCategory.java
new file mode 100644
index 00000000..b98dd12e
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintCategory.java
@@ -0,0 +1,41 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11
12/**
13 * Expresses the state of a PConstraint application
14 * condition with respect to a given adornment.
15 *
16 * @author Marton Bur
17 * @noreference This enum is not intended to be referenced by clients.
18 */
19public enum PConstraintCategory {
20 /*
21 * During plan creation an operation is considered a past
22 * operation, if an already bound variable is free in the
23 * mask of the operation.
24 * (Mask of the operation: the required binding state of
25 * the affected variables)
26 */
27 PAST,
28 /*
29 * The binding states of the variables in the operation
30 * mask correspond to the current binding states of the
31 * variables in the search plan
32 */
33 PRESENT,
34 /*
35 * There is at least one bound variable in the mask of
36 * a future operation that is still free at the current
37 * state of the plan. Also, a future operation can't be
38 * PAST.
39 */
40 FUTURE;
41}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfo.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfo.java
new file mode 100644
index 00000000..c2c76ef2
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfo.java
@@ -0,0 +1,142 @@
1/**
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Danil Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 */
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11import java.util.Collections;
12import java.util.LinkedHashSet;
13import java.util.Set;
14import java.util.function.Function;
15
16import tools.refinery.viatra.runtime.localsearch.planner.cost.IConstraintEvaluationContext;
17import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
18import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
19import tools.refinery.viatra.runtime.matchers.context.IQueryResultProviderAccess;
20import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
21import tools.refinery.viatra.runtime.matchers.psystem.PBody;
22import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
23import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
24import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
25
26/**
27 * Wraps a PConstraint together with information required for the planner. Currently contains information about the expected binding state of
28 * the affected variables also called application condition, and the cost of the enforcement, based on the meta and/or the runtime context.
29 *
30 * @author Marton Bur
31 * @noreference This class is not intended to be referenced by clients.
32 */
33public class PConstraintInfo implements IConstraintEvaluationContext {
34
35 private PConstraint constraint;
36 private Set<PVariable> boundMaskVariables;
37 private Set<PVariable> freeMaskVariables;
38 private Set<PConstraintInfo> sameWithDifferentBindings;
39 private IQueryRuntimeContext runtimeContext;
40 private QueryAnalyzer queryAnalyzer;
41 private IQueryResultProviderAccess resultProviderAccess;
42 private ResultProviderRequestor resultRequestor;
43
44 private Double cost;
45 private Function<IConstraintEvaluationContext, Double> costFunction;
46
47
48 /**
49 * Instantiates the wrapper
50 * @param constraintfor which the information is added and stored
51 * @param boundMaskVariables the bound variables in the operation mask
52 * @param freeMaskVariables the free variables in the operation mask
53 * @param sameWithDifferentBindings during the planning process, multiple operation adornments are considered for a constraint, so that it
54 * is represented by multiple plan infos. This parameter contains all plan infos that are for the same
55 * constraint, but with different adornment
56 * @param context the query backend context
57 */
58 public PConstraintInfo(PConstraint constraint, Set<PVariable> boundMaskVariables, Set<PVariable> freeMaskVariables,
59 Set<PConstraintInfo> sameWithDifferentBindings,
60 IQueryBackendContext context,
61 ResultProviderRequestor resultRequestor,
62 Function<IConstraintEvaluationContext, Double> costFunction) {
63 this.constraint = constraint;
64 this.costFunction = costFunction;
65 this.boundMaskVariables = new LinkedHashSet<>(boundMaskVariables);
66 this.freeMaskVariables = new LinkedHashSet<>(freeMaskVariables);
67 this.sameWithDifferentBindings = sameWithDifferentBindings;
68 this.resultRequestor = resultRequestor;
69 this.runtimeContext = context.getRuntimeContext();
70 this.queryAnalyzer = context.getQueryAnalyzer();
71 this.resultProviderAccess = context.getResultProviderAccess();
72
73 this.cost = null; // cost will be computed lazily (esp. important for pattern calls)
74 }
75
76 @Override
77 public IQueryRuntimeContext getRuntimeContext() {
78 return runtimeContext;
79 }
80
81 @Override
82 public QueryAnalyzer getQueryAnalyzer() {
83 return queryAnalyzer;
84 }
85
86 @Override
87 public PConstraint getConstraint() {
88 return constraint;
89 }
90
91 @Override
92 public Set<PVariable> getFreeVariables() {
93 return freeMaskVariables;
94 }
95
96 @Override
97 public Set<PVariable> getBoundVariables() {
98 return boundMaskVariables;
99 }
100
101 public Set<PConstraintInfo> getSameWithDifferentBindings() {
102 return sameWithDifferentBindings;
103 }
104
105 public double getCost() {
106 if (cost == null) {
107 // Calculate cost of the constraint based on its type
108 cost = costFunction.apply(this);
109 }
110 return cost;
111 }
112
113 public PConstraintCategory getCategory(PBody pBody, Set<PVariable> boundVariables) {
114 if (!Collections.disjoint(boundVariables, this.freeMaskVariables)) {
115 return PConstraintCategory.PAST;
116 } else if (!boundVariables.containsAll(this.boundMaskVariables)) {
117 return PConstraintCategory.FUTURE;
118 } else {
119 return PConstraintCategory.PRESENT;
120 }
121 }
122
123 @Override
124 public String toString() {
125 return String.format("%s, bound variables: %s, cost: \"%.2f\"", constraint.toString(), boundMaskVariables.toString(), cost);
126 }
127
128 /**
129 * @deprecated use {@link #resultProviderRequestor()}
130 */
131 @Override
132 @Deprecated
133 public IQueryResultProviderAccess resultProviderAccess() {
134 return resultProviderAccess;
135 }
136
137 @Override
138 public ResultProviderRequestor resultProviderRequestor() {
139 return resultRequestor;
140 }
141
142}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfoInferrer.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfoInferrer.java
new file mode 100644
index 00000000..eeac07ce
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PConstraintInfoInferrer.java
@@ -0,0 +1,278 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11import tools.refinery.viatra.runtime.localsearch.planner.cost.IConstraintEvaluationContext;
12import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
13import tools.refinery.viatra.runtime.matchers.context.IInputKey;
14import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
15import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
16import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
17import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.*;
18import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.AbstractTransitiveClosure;
19import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
20import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
21import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
22import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
23import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameterDirection;
24import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
25import tools.refinery.viatra.runtime.matchers.util.Sets;
26
27import java.util.*;
28import java.util.function.Function;
29import java.util.function.Predicate;
30import java.util.stream.Collectors;
31import java.util.stream.Stream;
32
33
34/**
35 * @author Grill Balázs
36 * @noreference This class is not intended to be referenced by clients.
37 */
38class PConstraintInfoInferrer {
39
40 private static final Predicate<PVariable> SINGLE_USE_VARIABLE = input -> input != null && input.getReferringConstraints().size() == 1;
41
42 private final boolean useIndex;
43 private final Function<IConstraintEvaluationContext, Double> costFunction;
44 private final IQueryBackendContext context;
45 private final ResultProviderRequestor resultRequestor;
46
47
48 public PConstraintInfoInferrer(boolean useIndex,
49 IQueryBackendContext backendContext,
50 ResultProviderRequestor resultRequestor,
51 Function<IConstraintEvaluationContext, Double> costFunction) {
52 this.useIndex = useIndex;
53 this.context = backendContext;
54 this.resultRequestor = resultRequestor;
55 this.costFunction = costFunction;
56 }
57
58
59 /**
60 * Create all possible application condition for all constraint
61 *
62 * @param constraintSet the set of constraints
63 * @return a collection of the wrapper PConstraintInfo objects with all the allowed application conditions
64 */
65 public List<PConstraintInfo> createPConstraintInfos(Set<PConstraint> constraintSet) {
66 List<PConstraintInfo> constraintInfos = new ArrayList<>();
67
68 for (PConstraint pConstraint : constraintSet) {
69 createPConstraintInfoDispatch(constraintInfos, pConstraint);
70 }
71 return constraintInfos;
72 }
73
74 private void createPConstraintInfoDispatch(List<PConstraintInfo> resultList, PConstraint pConstraint){
75 if(pConstraint instanceof ExportedParameter){
76 createConstraintInfoExportedParameter(resultList, (ExportedParameter) pConstraint);
77 } else if(pConstraint instanceof TypeConstraint){
78 createConstraintInfoTypeConstraint(resultList, (TypeConstraint)pConstraint);
79 } else if(pConstraint instanceof TypeFilterConstraint){
80 createConstraintInfoTypeFilterConstraint(resultList, (TypeFilterConstraint)pConstraint);
81 } else if(pConstraint instanceof ConstantValue){
82 createConstraintInfoConstantValue(resultList, (ConstantValue)pConstraint);
83 } else if (pConstraint instanceof Inequality){
84 createConstraintInfoInequality(resultList, (Inequality) pConstraint);
85 } else if (pConstraint instanceof ExpressionEvaluation){
86 createConstraintInfoExpressionEvaluation(resultList, (ExpressionEvaluation)pConstraint);
87 } else if (pConstraint instanceof AggregatorConstraint){
88 createConstraintInfoAggregatorConstraint(resultList, pConstraint, ((AggregatorConstraint) pConstraint).getResultVariable());
89 } else if (pConstraint instanceof PatternMatchCounter){
90 createConstraintInfoAggregatorConstraint(resultList, pConstraint, ((PatternMatchCounter) pConstraint).getResultVariable());
91 } else if (pConstraint instanceof PositivePatternCall){
92 createConstraintInfoPositivePatternCall(resultList, (PositivePatternCall) pConstraint);
93 } else if (pConstraint instanceof AbstractTransitiveClosure) {
94 createConstraintInfoBinaryTransitiveClosure(resultList, (AbstractTransitiveClosure) pConstraint);
95 } else{
96 createConstraintInfoGeneric(resultList, pConstraint);
97 }
98 }
99
100 private void createConstraintInfoConstantValue(List<PConstraintInfo> resultList,
101 ConstantValue pConstraint) {
102 // A ConstantValue constraint has a single variable, which is allowed to be unbound
103 // (extending through ConstantValue is considered a cheap operation)
104 Set<PVariable> affectedVariables = pConstraint.getAffectedVariables();
105 Set<? extends Set<PVariable>> bindings = Sets.powerSet(affectedVariables);
106 doCreateConstraintInfos(resultList, pConstraint, affectedVariables, bindings);
107 }
108
109
110 private void createConstraintInfoPositivePatternCall(List<PConstraintInfo> resultList,
111 PositivePatternCall pCall) {
112 // A pattern call can have any of its variables unbound
113 Set<PVariable> affectedVariables = pCall.getAffectedVariables();
114 // IN parameters cannot be unbound and
115 // OUT parameters cannot be bound
116 Tuple variables = pCall.getVariablesTuple();
117 final Set<PVariable> inVariables = new HashSet<>();
118 Set<PVariable> inoutVariables = new HashSet<>();
119 List<PParameter> parameters = pCall.getReferredQuery().getParameters();
120 for(int i=0;i<parameters.size();i++){
121 switch(parameters.get(i).getDirection()){
122 case IN:
123 inVariables.add((PVariable) variables.get(i));
124 break;
125 case INOUT:
126 inoutVariables.add((PVariable) variables.get(i));
127 break;
128 case OUT:
129 default:
130 break;
131
132 }
133 }
134 Iterable<Set<PVariable>> bindings = Sets.powerSet(inoutVariables).stream()
135 .map(input -> Stream.concat(input.stream(), inVariables.stream()).collect(Collectors.toSet()))
136 .collect(Collectors.toSet());
137
138 doCreateConstraintInfos(resultList, pCall, affectedVariables, bindings);
139 }
140
141 private void createConstraintInfoBinaryTransitiveClosure(List<PConstraintInfo> resultList,
142 AbstractTransitiveClosure closure) {
143 // A pattern call can have any of its variables unbound
144
145 List<PParameter> parameters = closure.getReferredQuery().getParameters();
146 Tuple variables = closure.getVariablesTuple();
147
148 Set<Set<PVariable>> bindings = new HashSet<>();
149 PVariable firstVariable = (PVariable) variables.get(0);
150 PVariable secondVariable = (PVariable) variables.get(1);
151 // Check is always supported
152 bindings.add(new HashSet<>(Arrays.asList(firstVariable, secondVariable)));
153 // If first parameter is not bound mandatorily, it can be left out
154 if (parameters.get(0).getDirection() != PParameterDirection.IN) {
155 bindings.add(Collections.singleton(secondVariable));
156 }
157 // If second parameter is not bound mandatorily, it can be left out
158 if (parameters.get(1).getDirection() != PParameterDirection.IN) {
159 bindings.add(Collections.singleton(firstVariable));
160 }
161
162 doCreateConstraintInfos(resultList, closure, closure.getAffectedVariables(), bindings);
163 }
164
165
166
167 private void createConstraintInfoExportedParameter(List<PConstraintInfo> resultList,
168 ExportedParameter parameter) {
169 // In case of an exported parameter constraint, the parameter must be bound in order to execute
170 Set<PVariable> affectedVariables = parameter.getAffectedVariables();
171 doCreateConstraintInfos(resultList, parameter, affectedVariables, Collections.singleton(affectedVariables));
172 }
173
174 private void createConstraintInfoExpressionEvaluation(List<PConstraintInfo> resultList,
175 ExpressionEvaluation expressionEvaluation) {
176 // An expression evaluation can only have its output variable unbound. All other variables shall be bound
177 PVariable output = expressionEvaluation.getOutputVariable();
178 Set<Set<PVariable>> bindings = new HashSet<>();
179 Set<PVariable> affectedVariables = expressionEvaluation.getAffectedVariables();
180 // All variables bound -> check
181 bindings.add(affectedVariables);
182 // Output variable is not bound -> extend
183 bindings.add(affectedVariables.stream().filter(var -> !Objects.equals(var, output)).collect(Collectors.toSet()));
184 doCreateConstraintInfos(resultList, expressionEvaluation, affectedVariables, bindings);
185 }
186
187 private void createConstraintInfoTypeFilterConstraint(List<PConstraintInfo> resultList,
188 TypeFilterConstraint filter){
189 // In case of type filter, all affected variables must be bound in order to execute
190 Set<PVariable> affectedVariables = filter.getAffectedVariables();
191 doCreateConstraintInfos(resultList, filter, affectedVariables, Collections.singleton(affectedVariables));
192 }
193
194 private void createConstraintInfoInequality(List<PConstraintInfo> resultList,
195 Inequality inequality){
196 // In case of inequality, all affected variables must be bound in order to execute
197 Set<PVariable> affectedVariables = inequality.getAffectedVariables();
198 doCreateConstraintInfos(resultList, inequality, affectedVariables, Collections.singleton(affectedVariables));
199 }
200
201 private void createConstraintInfoAggregatorConstraint(List<PConstraintInfo> resultList,
202 PConstraint pConstraint, PVariable resultVariable){
203 Set<PVariable> affectedVariables = pConstraint.getAffectedVariables();
204
205 // The only variables which can be unbound are single-use
206 Set<PVariable> canBeUnboundVariables =
207 Stream.concat(Stream.of(resultVariable), affectedVariables.stream().filter(SINGLE_USE_VARIABLE)).collect(Collectors.toSet());
208
209 Set<Set<PVariable>> bindings = calculatePossibleBindings(canBeUnboundVariables, affectedVariables);
210
211 doCreateConstraintInfos(resultList, pConstraint, affectedVariables, bindings);
212 }
213
214 /**
215 *
216 * @param canBeUnboundVariables Variables which are allowed to be unbound
217 * @param affectedVariables All affected variables
218 * @return The set of possible bound variable sets
219 */
220 private Set<Set<PVariable>> calculatePossibleBindings(Set<PVariable> canBeUnboundVariables, Set<PVariable> affectedVariables){
221 final Set<PVariable> mustBindVariables = affectedVariables.stream().filter(input -> !canBeUnboundVariables.contains(input)).collect(Collectors.toSet());
222 return Sets.powerSet(canBeUnboundVariables).stream()
223 .map(input -> {
224 //some variables have to be bound before executing this constraint
225 Set<PVariable> result= new HashSet<>(input);
226 result.addAll(mustBindVariables);
227 return result;
228 })
229 .collect(Collectors.toSet());
230 }
231
232 private void createConstraintInfoGeneric(List<PConstraintInfo> resultList, PConstraint pConstraint){
233 Set<PVariable> affectedVariables = pConstraint.getAffectedVariables();
234
235 // The only variables which can be unbound are single use variables
236 Set<PVariable> canBeUnboundVariables = affectedVariables.stream().filter(SINGLE_USE_VARIABLE).collect(Collectors.toSet());
237
238 Set<Set<PVariable>> bindings = calculatePossibleBindings(canBeUnboundVariables, affectedVariables);
239
240 doCreateConstraintInfos(resultList, pConstraint, affectedVariables, bindings);
241 }
242
243 private void createConstraintInfoTypeConstraint(List<PConstraintInfo> resultList,
244 TypeConstraint typeConstraint) {
245 Set<PVariable> affectedVariables = typeConstraint.getAffectedVariables();
246 Set<? extends Set<PVariable>> bindings = null;
247
248 IInputKey inputKey = typeConstraint.getSupplierKey();
249 if(inputKey.isEnumerable()){
250 bindings = Sets.powerSet(affectedVariables);
251 }else{
252 // For not enumerable types, this constraint can only be a check
253 bindings = Collections.singleton(affectedVariables);
254 }
255
256 doCreateConstraintInfos(resultList, typeConstraint, affectedVariables, bindings);
257 }
258
259 private void doCreateConstraintInfos(List<PConstraintInfo> constraintInfos,
260 PConstraint pConstraint, Set<PVariable> affectedVariables, Iterable<? extends Set<PVariable>> bindings) {
261 Set<PConstraintInfo> sameWithDifferentBindings = new HashSet<>();
262 for (Set<PVariable> boundVariables : bindings) {
263
264 PConstraintInfo info = new PConstraintInfo(pConstraint, boundVariables,
265 affectedVariables.stream().filter(input -> !boundVariables.contains(input)).collect(Collectors.toSet()),
266 sameWithDifferentBindings, context, resultRequestor, costFunction);
267 constraintInfos.add(info);
268 sameWithDifferentBindings.add(info);
269 }
270 }
271
272 private Set<Set<PVariable>> excludeUnnavigableOperationMasks(TypeConstraint typeConstraint, Set<? extends Set<PVariable>> bindings) {
273 PVariable firstVariable = typeConstraint.getVariableInTuple(0);
274 return bindings.stream().filter(
275 boundVariablesSet -> (boundVariablesSet.isEmpty() || boundVariablesSet.contains(firstVariable)))
276 .collect(Collectors.toSet());
277 }
278}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PlanState.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PlanState.java
new file mode 100644
index 00000000..e93b07bc
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/PlanState.java
@@ -0,0 +1,283 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.Collections;
14import java.util.Comparator;
15import java.util.HashSet;
16import java.util.List;
17import java.util.Map;
18import java.util.Set;
19
20import tools.refinery.viatra.runtime.localsearch.planner.util.OperationCostComparator;
21import tools.refinery.viatra.runtime.matchers.algorithms.OrderedIterableMerge;
22import tools.refinery.viatra.runtime.matchers.psystem.PBody;
23import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
24import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
25
26/**
27 * This class represents the state of the plan during planning.
28 *
29 * <p> A PlanState represents a sequence of operations (operationsList) and caches the computed cost
30 * for this operation sequence. The list and the cost are initialized in the constructor.
31 * However, #categorizeChecks() also updates the operations list (by suffixing checks)
32 *
33 * @author Marton Bur
34 * @noreference This class is not intended to be referenced by clients.
35 */
36public class PlanState {
37
38 private final PBody pBody;
39 private final List<PConstraintInfo> operationsList;
40 private final Set<PVariable> boundVariables;
41 private final Collection<PVariable> deltaVariables; /* bound since ancestor plan */
42 private final Set<PConstraint> enforcedConstraints;
43
44 private double cummulativeProduct;
45 private double cost;
46
47 private static Comparator<PConstraintInfo> infoComparator = new OperationCostComparator();
48
49 /*
50 * For a short explanation of past, present and future operations,
51 * see class
52 */
53 private List<PConstraintInfo> presentExtends;
54
55 /**
56 * Creates an initial state
57 */
58 public PlanState(PBody pBody, Set<PVariable> boundVariables) {
59
60 this(pBody, new ArrayList<>(), boundVariables, boundVariables /* also the delta */,
61 0.0 /* initial cost */, 1.0 /*initial branch count */);
62 }
63
64 public PlanState cloneWithApplied(PConstraintInfo op) {
65 // Create operation list based on the current state
66 ArrayList<PConstraintInfo> newOperationsList =
67 // pre-reserve excess capacity for later addition of CHECK ops
68 new ArrayList<>(pBody.getConstraints().size());
69 newOperationsList.addAll(this.getOperations());
70 newOperationsList.add(op);
71
72 // Bind the variables of the op
73 Collection<PVariable> deltaVariables = op.getFreeVariables();
74 Set<PVariable> allBoundVariables =
75 // pre-reserve exact capacity as variables are known
76 // (will not be affected by adding CHECK ops later)
77 new HashSet<>(this.getBoundVariables().size() + deltaVariables.size());
78 allBoundVariables.addAll(this.getBoundVariables());
79 allBoundVariables.addAll(deltaVariables);
80
81 PlanState newState = new PlanState(getAssociatedPBody(), newOperationsList, allBoundVariables, deltaVariables,
82 cost, cummulativeProduct);
83 newState.accountNewOperation(op);
84 return newState;
85 }
86
87 private PlanState(PBody pBody, List<PConstraintInfo> operationsList,
88 Set<PVariable> boundVariables, Collection<PVariable> deltaVariables,
89 double cost, double cummulativeProduct)
90 {
91 this.pBody = pBody;
92 this.operationsList = operationsList;
93 this.boundVariables = boundVariables;
94 this.enforcedConstraints = new HashSet<>();
95 this.deltaVariables = deltaVariables;
96 this.cost = cost;
97 this.cummulativeProduct = cummulativeProduct;
98 }
99
100 // NOT included for EXTEND: bind all variables of op
101 private void accountNewOperation(PConstraintInfo constraintInfo) {
102 this.enforcedConstraints.add(constraintInfo.getConstraint());
103 accountCost(constraintInfo);
104 }
105
106 private void accountCost(PConstraintInfo constraintInfo) {
107 double constraintCost = constraintInfo.getCost();
108 double branchFactor = constraintCost;
109 if (constraintCost > 0){
110 cost += cummulativeProduct * constraintCost;
111 cummulativeProduct *= branchFactor;
112 }
113 }
114
115
116 public Set<PConstraint> getEnforcedConstraints() {
117 return enforcedConstraints;
118 }
119
120 /**
121 * Re-categorizes given extend operations into already applied or no longer applicable ones (discarded),
122 * immediately applicable ones (saved as presently viable extends),
123 * and not yet applicable ones (discarded).
124 *
125 * @param allPotentialExtendInfos all other extends that may be applicable
126 * to this plan state now or in the future;
127 * MUST consist of "extend" constraint applications only (at least one free variable)
128 */
129 public void updateExtends(Iterable<PConstraintInfo> allPotentialExtendInfos) {
130 presentExtends = new ArrayList<>();
131
132
133 // categorize future/present extend constraint infos
134 for (PConstraintInfo op : allPotentialExtendInfos) {
135 updateExtendInternal(op);
136 }
137 }
138
139 /**
140 * Re-categorizes given extend operations into already applied or no longer applicable ones (discarded),
141 * immediately applicable ones (saved as presently viable extends),
142 * and not yet applicable ones (discarded).
143 *
144 * @param extendOpsByBoundVariables all EXTEND operations indexed by affected <i>bound</i> variables
145 * MUST consist of "extend" constraint applications only (at least one free variable)
146 */
147 public void updateExtendsBasedOnDelta(
148 Iterable<PConstraintInfo> previousPresentExtends,
149 Map<PVariable, ? extends Collection<PConstraintInfo>> extendOpsByBoundVariables)
150 {
151 presentExtends = new ArrayList<>();
152 if (operationsList.isEmpty())
153 throw new IllegalStateException("Not applicable as starting step");
154
155 for (PConstraintInfo extend: previousPresentExtends) {
156 updateExtendInternal(extend);
157 }
158
159 Set<PConstraintInfo> affectedExtends = new HashSet<>();
160 for (PVariable variable : deltaVariables) {
161 // only those check ops may become applicable that have an affected variable in the delta
162 Collection<PConstraintInfo> extendsForVariable = extendOpsByBoundVariables.get(variable);
163 if (null != extendsForVariable) {
164 affectedExtends.addAll(extendsForVariable);
165 }
166 }
167 for (PConstraintInfo extend: affectedExtends) {
168 updateExtendInternal(extend);
169 }
170 }
171
172 private void updateExtendInternal(PConstraintInfo op) {
173 if(!enforcedConstraints.contains(op.getConstraint())) {
174 categorizeExtend(op);
175 }
176 }
177
178 /**
179 * Check operations that newly became applicable (see {@link #getDeltaVariables()})
180 * are appended to operations lists.
181 *
182 * <p> Will never discover degenerate checks (of PConstraints with zero variables),
183 * so must not use on initial state.
184 *
185 * @param allPotentialCheckInfos all CHECK operations
186 * MUST consist of "check" constraint applications only (no free variables)
187 * and must be iterable in decreasing order of cost
188 *
189 *
190 */
191 public void applyChecks(List<PConstraintInfo> allPotentialCheckInfos) {
192 applyChecksInternal(allPotentialCheckInfos);
193 }
194
195 /**
196 * Immediately applicable checks are appended to operations lists.
197 *
198 * @param checkOpsByVariables all CHECK operations indexed by affected variables
199 * MUST consist of "check" constraint applications only (no free variables)
200 * and each bucket must be iterable in decreasing order of cost
201 */
202 public void applyChecksBasedOnDelta(Map<PVariable, List<PConstraintInfo>> checkOpsByVariables) {
203 if (operationsList.isEmpty())
204 throw new IllegalStateException("Not applicable as starting step");
205
206 Iterable<PConstraintInfo> affectedChecks = Collections.emptyList();
207
208 for (PVariable variable : deltaVariables) {
209 // only those check ops may become applicable that have an affected variable in the delta
210 List<PConstraintInfo> checksForVariable = checkOpsByVariables.get(variable);
211 if (null != checksForVariable) {
212 affectedChecks = OrderedIterableMerge.mergeUniques(affectedChecks, checksForVariable, infoComparator);
213 }
214 }
215
216 // checks retain their order, no re-sorting needed
217 applyChecksInternal(affectedChecks);
218 }
219
220 private void applyChecksInternal(Iterable<PConstraintInfo> checks) {
221 for (PConstraintInfo checkInfo : checks) {
222 if (this.boundVariables.containsAll(checkInfo.getBoundVariables()) &&
223 !enforcedConstraints.contains(checkInfo.getConstraint()))
224 {
225 operationsList.add(checkInfo);
226 accountNewOperation(checkInfo);
227 }
228 }
229 }
230
231
232 private void categorizeExtend(PConstraintInfo constraintInfo) {
233 PConstraintCategory category = constraintInfo.getCategory(pBody, boundVariables);
234 if (category == PConstraintCategory.PRESENT) {
235 presentExtends.add(constraintInfo);
236 } else {
237 // do not categorize past/future operations
238 }
239 }
240
241
242 public PBody getAssociatedPBody() {
243 return pBody;
244 }
245
246 public List<PConstraintInfo> getOperations() {
247 return operationsList;
248 }
249
250 public Set<PVariable> getBoundVariables() {
251 return boundVariables;
252 }
253
254 /**
255 * @return the derived cost of the plan contained in the state
256 */
257 public double getCost() {
258 return cost;
259 }
260
261
262 /**
263 * @return cumulative branching factor
264 * @since 2.1
265 */
266 public double getCummulativeProduct() {
267 return cummulativeProduct;
268 }
269
270 public List<PConstraintInfo> getPresentExtends() {
271 return presentExtends;
272 }
273
274 /**
275 * Contains only those variables that are added by the newest extend
276 * (or the initially bound ones if no extend yet)
277 */
278 public Collection<PVariable> getDeltaVariables() {
279 return deltaVariables;
280 }
281
282
283}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/AbstractOperationCompiler.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/AbstractOperationCompiler.java
new file mode 100644
index 00000000..73312dc9
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/AbstractOperationCompiler.java
@@ -0,0 +1,430 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.compiler;
10
11import java.util.ArrayList;
12import java.util.HashMap;
13import java.util.HashSet;
14import java.util.List;
15import java.util.Map;
16import java.util.Set;
17import java.util.stream.Collectors;
18import java.util.stream.Stream;
19
20import tools.refinery.viatra.runtime.localsearch.matcher.CallWithAdornment;
21import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
22import tools.refinery.viatra.runtime.localsearch.operations.check.AggregatorCheck;
23import tools.refinery.viatra.runtime.localsearch.operations.check.BinaryTransitiveClosureCheck;
24import tools.refinery.viatra.runtime.localsearch.operations.check.CheckConstant;
25import tools.refinery.viatra.runtime.localsearch.operations.check.CheckPositivePatternCall;
26import tools.refinery.viatra.runtime.localsearch.operations.check.CountCheck;
27import tools.refinery.viatra.runtime.localsearch.operations.check.ExpressionCheck;
28import tools.refinery.viatra.runtime.localsearch.operations.check.ExpressionEvalCheck;
29import tools.refinery.viatra.runtime.localsearch.operations.check.InequalityCheck;
30import tools.refinery.viatra.runtime.localsearch.operations.check.NACOperation;
31import tools.refinery.viatra.runtime.localsearch.operations.extend.AggregatorExtend;
32import tools.refinery.viatra.runtime.localsearch.operations.extend.CountOperation;
33import tools.refinery.viatra.runtime.localsearch.operations.extend.ExpressionEval;
34import tools.refinery.viatra.runtime.localsearch.operations.extend.ExtendBinaryTransitiveClosure;
35import tools.refinery.viatra.runtime.localsearch.operations.extend.ExtendConstant;
36import tools.refinery.viatra.runtime.localsearch.operations.extend.ExtendPositivePatternCall;
37import tools.refinery.viatra.runtime.localsearch.operations.util.CallInformation;
38import tools.refinery.viatra.runtime.localsearch.planner.util.CompilerHelper;
39import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
40import tools.refinery.viatra.runtime.matchers.context.IInputKey;
41import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
42import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
43import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
44import tools.refinery.viatra.runtime.matchers.planning.operations.PApply;
45import tools.refinery.viatra.runtime.matchers.planning.operations.POperation;
46import tools.refinery.viatra.runtime.matchers.planning.operations.PProject;
47import tools.refinery.viatra.runtime.matchers.planning.operations.PStart;
48import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
49import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
50import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
51import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
52import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
53import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.Inequality;
54import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
55import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.PatternMatchCounter;
56import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
57import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.BinaryReflexiveTransitiveClosure;
58import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
59import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
60import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
61import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
62import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
63
64/**
65 * @author Zoltan Ujhelyi
66 * @since 1.7
67 *
68 */
69public abstract class AbstractOperationCompiler implements IOperationCompiler {
70
71 protected static final String UNSUPPORTED_TYPE_MESSAGE = "Unsupported type: ";
72
73 protected abstract void createExtend(TypeConstraint typeConstraint, Map<PVariable, Integer> variableMapping);
74
75 /**
76 * @throws ViatraQueryRuntimeException
77 */
78 protected abstract void createCheck(TypeConstraint typeConstraint, Map<PVariable, Integer> variableMapping);
79
80 /**
81 * @throws ViatraQueryRuntimeException
82 */
83 protected abstract void createCheck(TypeFilterConstraint typeConstraint, Map<PVariable, Integer> variableMapping);
84
85 /**
86 * @since 2.0
87 * @throws ViatraQueryRuntimeException
88 */
89 protected abstract void createUnaryTypeCheck(IInputKey type, int position);
90
91 protected List<ISearchOperation> operations;
92 protected Set<CallWithAdornment> dependencies = new HashSet<>();
93 protected Map<PConstraint, Set<Integer>> variableBindings;
94 private Map<PVariable, Integer> variableMappings;
95 protected final IQueryRuntimeContext runtimeContext;
96
97 public AbstractOperationCompiler(IQueryRuntimeContext runtimeContext) {
98 this.runtimeContext = runtimeContext;
99 }
100
101 /**
102 * Compiles a plan of <code>POperation</code>s to a list of type <code>List&ltISearchOperation></code>
103 *
104 * @param plan
105 * @param boundParameters
106 * @return an ordered list of POperations that make up the compiled search plan
107 * @throws ViatraQueryRuntimeException
108 */
109 @Override
110 public List<ISearchOperation> compile(SubPlan plan, Set<PParameter> boundParameters) {
111
112 variableMappings = CompilerHelper.createVariableMapping(plan);
113 variableBindings = CompilerHelper.cacheVariableBindings(plan, variableMappings, boundParameters);
114
115 operations = new ArrayList<>();
116
117 List<POperation> operationList = CompilerHelper.createOperationsList(plan);
118 for (POperation pOperation : operationList) {
119 compile(pOperation, variableMappings);
120 }
121
122 return operations;
123 }
124
125 private void compile(POperation pOperation, Map<PVariable, Integer> variableMapping) {
126
127 if (pOperation instanceof PApply) {
128 PApply pApply = (PApply) pOperation;
129 PConstraint pConstraint = pApply.getPConstraint();
130
131 if (isCheck(pConstraint, variableMapping)) {
132 // check
133 createCheckDispatcher(pConstraint, variableMapping);
134 } else {
135 // extend
136 createExtendDispatcher(pConstraint, variableMapping);
137 }
138
139 } else if (pOperation instanceof PStart) {
140 // nop
141 } else if (pOperation instanceof PProject) {
142 // nop
143 } else {
144 throw new QueryProcessingException("PStart, PApply or PProject was expected, received: " + pOperation.getClass(), null,"Unexpected POperation type", null);
145 }
146
147 }
148
149 private void createCheckDispatcher(PConstraint pConstraint, Map<PVariable, Integer> variableMapping) {
150
151
152 // DeferredPConstraint subclasses
153
154 // Equalities are normalized
155
156 if (pConstraint instanceof Inequality) {
157 createCheck((Inequality) pConstraint, variableMapping);
158 } else if (pConstraint instanceof PositivePatternCall){
159 createCheck((PositivePatternCall) pConstraint, variableMapping);
160 } else if (pConstraint instanceof NegativePatternCall) {
161 createCheck((NegativePatternCall) pConstraint,variableMapping);
162 } else if (pConstraint instanceof AggregatorConstraint) {
163 createCheck((AggregatorConstraint) pConstraint, variableMapping);
164 } else if (pConstraint instanceof PatternMatchCounter) {
165 createCheck((PatternMatchCounter) pConstraint, variableMapping);
166 } else if (pConstraint instanceof ExpressionEvaluation) {
167 createCheck((ExpressionEvaluation) pConstraint, variableMapping);
168 } else if (pConstraint instanceof TypeFilterConstraint) {
169 createCheck((TypeFilterConstraint) pConstraint,variableMapping);
170 } else if (pConstraint instanceof ExportedParameter) {
171 // Nothing to do here
172 } else
173
174 // EnumerablePConstraint subclasses
175
176 if (pConstraint instanceof BinaryTransitiveClosure) {
177 createCheck((BinaryTransitiveClosure) pConstraint, variableMapping);
178 } else if (pConstraint instanceof BinaryReflexiveTransitiveClosure) {
179 createCheck((BinaryReflexiveTransitiveClosure)pConstraint, variableMapping);
180 } else if (pConstraint instanceof ConstantValue) {
181 createCheck((ConstantValue) pConstraint, variableMapping);
182 } else if (pConstraint instanceof TypeConstraint) {
183 createCheck((TypeConstraint) pConstraint,variableMapping);
184 } else {
185 String msg = "Unsupported Check constraint: "+pConstraint.toString();
186 throw new QueryProcessingException(msg, null, msg, null);
187 }
188
189 }
190
191 protected void createExtendDispatcher(PConstraint pConstraint, Map<PVariable, Integer> variableMapping) {
192
193 // DeferredPConstraint subclasses
194
195 // Equalities are normalized
196 if (pConstraint instanceof PositivePatternCall) {
197 createExtend((PositivePatternCall)pConstraint, variableMapping);
198 } else if (pConstraint instanceof AggregatorConstraint) {
199 createExtend((AggregatorConstraint) pConstraint, variableMapping);
200 } else if (pConstraint instanceof PatternMatchCounter) {
201 createExtend((PatternMatchCounter) pConstraint, variableMapping);
202 } else if (pConstraint instanceof ExpressionEvaluation) {
203 createExtend((ExpressionEvaluation) pConstraint, variableMapping);
204 } else if (pConstraint instanceof ExportedParameter) {
205 // ExportedParameters are compiled to NOP
206 } else
207
208 // EnumerablePConstraint subclasses
209
210 if (pConstraint instanceof ConstantValue) {
211 createExtend((ConstantValue) pConstraint, variableMapping);
212 } else if (pConstraint instanceof TypeConstraint) {
213 createExtend((TypeConstraint) pConstraint, variableMapping);
214 } else if (pConstraint instanceof BinaryTransitiveClosure) {
215 createExtend((BinaryTransitiveClosure)pConstraint, variableMapping);
216 } else if (pConstraint instanceof BinaryReflexiveTransitiveClosure) {
217 createExtend((BinaryReflexiveTransitiveClosure)pConstraint, variableMapping);
218 } else {
219 String msg = "Unsupported Extend constraint: "+pConstraint.toString();
220 throw new QueryProcessingException(msg, null, msg, null);
221 }
222 }
223
224 private boolean isCheck(PConstraint pConstraint, final Map<PVariable, Integer> variableMapping) {
225 if (pConstraint instanceof NegativePatternCall){
226 return true;
227 }else if (pConstraint instanceof PositivePatternCall){
228 // Positive pattern call is check if all non-single used variables are bound
229 List<Integer> callVariables = pConstraint.getAffectedVariables().stream()
230 .filter(input -> input.getReferringConstraints().size() > 1)
231 .map(variableMapping::get)
232 .collect(Collectors.toList());
233 return variableBindings.get(pConstraint).containsAll(callVariables);
234 }else if (pConstraint instanceof AggregatorConstraint){
235 PVariable outputvar = ((AggregatorConstraint) pConstraint).getResultVariable();
236 return variableBindings.get(pConstraint).contains(variableMapping.get(outputvar));
237 }else if (pConstraint instanceof PatternMatchCounter){
238 PVariable outputvar = ((PatternMatchCounter) pConstraint).getResultVariable();
239 return variableBindings.get(pConstraint).contains(variableMapping.get(outputvar));
240 }else if (pConstraint instanceof ExpressionEvaluation){
241 PVariable outputvar = ((ExpressionEvaluation) pConstraint).getOutputVariable();
242 return outputvar == null || variableBindings.get(pConstraint).contains(variableMapping.get(outputvar));
243 } else {
244 // In other cases, all variables shall be bound to be a check
245 Set<PVariable> affectedVariables = pConstraint.getAffectedVariables();
246 Set<Integer> varIndices = new HashSet<>();
247 for (PVariable variable : affectedVariables) {
248 varIndices.add(variableMapping.get(variable));
249 }
250 return variableBindings.get(pConstraint).containsAll(varIndices);
251 }
252 }
253
254 @Override
255 public Set<CallWithAdornment> getDependencies() {
256 return dependencies;
257 }
258
259 /**
260 * @return the cached variable bindings for the previously created plan
261 */
262 @Override
263 public Map<PVariable, Integer> getVariableMappings() {
264 return variableMappings;
265 }
266
267 protected void createCheck(PatternMatchCounter counter, Map<PVariable, Integer> variableMapping) {
268 CallInformation information = CallInformation.create(counter, variableMapping, variableBindings.get(counter));
269 operations.add(new CountCheck(information, variableMapping.get(counter.getResultVariable())));
270 dependencies.add(information.getCallWithAdornment());
271 }
272
273 protected void createCheck(PositivePatternCall pCall, Map<PVariable, Integer> variableMapping) {
274 CallInformation information = CallInformation.create(pCall, variableMapping, variableBindings.get(pCall));
275 operations.add(new CheckPositivePatternCall(information));
276 dependencies.add(information.getCallWithAdornment());
277 }
278
279 protected void createCheck(ConstantValue constant, Map<PVariable, Integer> variableMapping) {
280 int position = variableMapping.get(constant.getVariablesTuple().get(0));
281 operations.add(new CheckConstant(position, constant.getSupplierKey()));
282 }
283
284 protected void createCheck(BinaryTransitiveClosure binaryTransitiveClosure, Map<PVariable, Integer> variableMapping) {
285 int sourcePosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(0));
286 int targetPosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(1));
287
288 //The second parameter is NOT bound during execution!
289 CallInformation information = CallInformation.create(binaryTransitiveClosure, variableMapping, Stream.of(sourcePosition).collect(Collectors.toSet()));
290 operations.add(new BinaryTransitiveClosureCheck(information, sourcePosition, targetPosition, false));
291 dependencies.add(information.getCallWithAdornment());
292 }
293
294 /**
295 * @since 2.0
296 */
297 protected void createCheck(BinaryReflexiveTransitiveClosure binaryTransitiveClosure, Map<PVariable, Integer> variableMapping) {
298 int sourcePosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(0));
299 int targetPosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(1));
300
301 //The second parameter is NOT bound during execution!
302 CallInformation information = CallInformation.create(binaryTransitiveClosure, variableMapping, Stream.of(sourcePosition).collect(Collectors.toSet()));
303 createUnaryTypeCheck(binaryTransitiveClosure.getUniverseType(), sourcePosition);
304 operations.add(new BinaryTransitiveClosureCheck(information, sourcePosition, targetPosition, true));
305 dependencies.add(information.getCallWithAdornment());
306 }
307
308 protected void createCheck(ExpressionEvaluation expressionEvaluation, Map<PVariable, Integer> variableMapping) {
309 // Fill unbound variables with null; simply copy all variables. Unbound variables will be null anyway
310 Iterable<String> inputParameterNames = expressionEvaluation.getEvaluator().getInputParameterNames();
311 Map<String, Integer> nameMap = new HashMap<>();
312
313 for (String pVariableName : inputParameterNames) {
314 PVariable pVariable = expressionEvaluation.getPSystem().getVariableByNameChecked(pVariableName);
315 nameMap.put(pVariableName, variableMapping.get(pVariable));
316 }
317
318 // output variable can be null; if null it is an ExpressionCheck
319 if(expressionEvaluation.getOutputVariable() == null){
320 operations.add(new ExpressionCheck(expressionEvaluation.getEvaluator(), nameMap));
321 } else {
322 operations.add(new ExpressionEvalCheck(expressionEvaluation.getEvaluator(), nameMap, expressionEvaluation.isUnwinding(), variableMapping.get(expressionEvaluation.getOutputVariable())));
323 }
324 }
325
326 protected void createCheck(AggregatorConstraint aggregator, Map<PVariable, Integer> variableMapping) {
327 CallInformation information = CallInformation.create(aggregator, variableMapping, variableBindings.get(aggregator));
328 operations.add(new AggregatorCheck(information, aggregator, variableMapping.get(aggregator.getResultVariable())));
329 dependencies.add(information.getCallWithAdornment());
330 }
331
332 protected void createCheck(NegativePatternCall negativePatternCall, Map<PVariable, Integer> variableMapping) {
333 CallInformation information = CallInformation.create(negativePatternCall, variableMapping, variableBindings.get(negativePatternCall));
334 operations.add(new NACOperation(information));
335 dependencies.add(information.getCallWithAdornment());
336 }
337
338 protected void createCheck(Inequality inequality, Map<PVariable, Integer> variableMapping) {
339 operations.add(new InequalityCheck(variableMapping.get(inequality.getWho()), variableMapping.get(inequality.getWithWhom())));
340 }
341
342 protected void createExtend(PositivePatternCall pCall, Map<PVariable, Integer> variableMapping) {
343 CallInformation information = CallInformation.create(pCall, variableMapping, variableBindings.get(pCall));
344 operations.add(new ExtendPositivePatternCall(information));
345 dependencies.add(information.getCallWithAdornment());
346 }
347
348 protected void createExtend(BinaryTransitiveClosure binaryTransitiveClosure, Map<PVariable, Integer> variableMapping) {
349 int sourcePosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(0));
350 int targetPosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(1));
351
352 boolean sourceBound = variableBindings.get(binaryTransitiveClosure).contains(sourcePosition);
353 boolean targetBound = variableBindings.get(binaryTransitiveClosure).contains(targetPosition);
354
355 CallInformation information = CallInformation.create(binaryTransitiveClosure, variableMapping, variableBindings.get(binaryTransitiveClosure));
356
357 if (sourceBound && !targetBound) {
358 operations.add(new ExtendBinaryTransitiveClosure.Forward(information, sourcePosition, targetPosition, false));
359 dependencies.add(information.getCallWithAdornment());
360 } else if (!sourceBound && targetBound) {
361 operations.add(new ExtendBinaryTransitiveClosure.Backward(information, sourcePosition, targetPosition, false));
362 dependencies.add(information.getCallWithAdornment());
363 } else {
364 String msg = "Binary transitive closure not supported with two unbound parameters";
365 throw new QueryProcessingException(msg, null, msg, binaryTransitiveClosure.getPSystem().getPattern());
366 }
367 }
368
369 /**
370 * @since 2.0
371 */
372 protected void createExtend(BinaryReflexiveTransitiveClosure binaryTransitiveClosure, Map<PVariable, Integer> variableMapping) {
373 int sourcePosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(0));
374 int targetPosition = variableMapping.get(binaryTransitiveClosure.getVariablesTuple().get(1));
375
376 boolean sourceBound = variableBindings.get(binaryTransitiveClosure).contains(sourcePosition);
377 boolean targetBound = variableBindings.get(binaryTransitiveClosure).contains(targetPosition);
378
379 CallInformation information = CallInformation.create(binaryTransitiveClosure, variableMapping, variableBindings.get(binaryTransitiveClosure));
380
381 if (sourceBound && !targetBound) {
382 createUnaryTypeCheck(binaryTransitiveClosure.getUniverseType(), sourcePosition);
383 operations.add(new ExtendBinaryTransitiveClosure.Forward(information, sourcePosition, targetPosition, true));
384 dependencies.add(information.getCallWithAdornment());
385 } else if (!sourceBound && targetBound) {
386 createUnaryTypeCheck(binaryTransitiveClosure.getUniverseType(), targetPosition);
387 operations.add(new ExtendBinaryTransitiveClosure.Backward(information, sourcePosition, targetPosition, true));
388 dependencies.add(information.getCallWithAdornment());
389 } else {
390 String msg = "Binary reflective transitive closure not supported with two unbound parameters";
391 throw new QueryProcessingException(msg, null, msg, binaryTransitiveClosure.getPSystem().getPattern());
392 }
393 }
394
395 protected void createExtend(ConstantValue constant, Map<PVariable, Integer> variableMapping) {
396 int position = variableMapping.get(constant.getVariablesTuple().get(0));
397 operations.add(new ExtendConstant(position, constant.getSupplierKey()));
398 }
399
400 protected void createExtend(ExpressionEvaluation expressionEvaluation, Map<PVariable, Integer> variableMapping) {
401 // Fill unbound variables with null; simply copy all variables. Unbound variables will be null anyway
402 Iterable<String> inputParameterNames = expressionEvaluation.getEvaluator().getInputParameterNames();
403 Map<String, Integer> nameMap = new HashMap<>();
404
405 for (String pVariableName : inputParameterNames) {
406 PVariable pVariable = expressionEvaluation.getPSystem().getVariableByNameChecked(pVariableName);
407 nameMap.put(pVariableName, variableMapping.get(pVariable));
408 }
409
410 // output variable can be null; if null it is an ExpressionCheck
411 if(expressionEvaluation.getOutputVariable() == null){
412 operations.add(new ExpressionCheck(expressionEvaluation.getEvaluator(), nameMap));
413 } else {
414 operations.add(new ExpressionEval(expressionEvaluation.getEvaluator(), nameMap, expressionEvaluation.isUnwinding(), variableMapping.get(expressionEvaluation.getOutputVariable())));
415 }
416 }
417
418 protected void createExtend(AggregatorConstraint aggregator, Map<PVariable, Integer> variableMapping) {
419 CallInformation information = CallInformation.create(aggregator, variableMapping, variableBindings.get(aggregator));
420 operations.add(new AggregatorExtend(information, aggregator, variableMapping.get(aggregator.getResultVariable())));
421 dependencies.add(information.getCallWithAdornment());
422 }
423
424 protected void createExtend(PatternMatchCounter patternMatchCounter, Map<PVariable, Integer> variableMapping) {
425 CallInformation information = CallInformation.create(patternMatchCounter, variableMapping, variableBindings.get(patternMatchCounter));
426 operations.add(new CountOperation(information, variableMapping.get(patternMatchCounter.getResultVariable())));
427 dependencies.add(information.getCallWithAdornment());
428 }
429
430} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/GenericOperationCompiler.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/GenericOperationCompiler.java
new file mode 100644
index 00000000..d86982e9
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/GenericOperationCompiler.java
@@ -0,0 +1,101 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.viatra.runtime.localsearch.planner.compiler;
11
12import tools.refinery.viatra.runtime.localsearch.operations.generic.GenericTypeCheck;
13import tools.refinery.viatra.runtime.localsearch.operations.generic.GenericTypeExtend;
14import tools.refinery.viatra.runtime.localsearch.operations.generic.GenericTypeExtendSingleValue;
15import tools.refinery.viatra.runtime.matchers.context.IInputKey;
16import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
17import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
18import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
19import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
20import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
21import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
22
23import java.util.*;
24
25/**
26 * @author Zoltan Ujhelyi
27 * @since 1.7
28 *
29 */
30public class GenericOperationCompiler extends AbstractOperationCompiler {
31
32 public GenericOperationCompiler(IQueryRuntimeContext runtimeContext) {
33 super(runtimeContext);
34 }
35
36 @Override
37 protected void createCheck(TypeFilterConstraint typeConstraint, Map<PVariable, Integer> variableMapping) {
38 IInputKey inputKey = typeConstraint.getInputKey();
39 Tuple tuple = typeConstraint.getVariablesTuple();
40 int[] positions = new int[tuple.getSize()];
41 for (int i = 0; i < tuple.getSize(); i++) {
42 PVariable variable = (PVariable) tuple.get(i);
43 positions[i] = variableMapping.get(variable);
44 }
45 operations.add(new GenericTypeCheck(inputKey, positions, TupleMask.fromSelectedIndices(variableMapping.size(), positions)));
46
47 }
48
49 @Override
50 protected void createCheck(TypeConstraint typeConstraint, Map<PVariable, Integer> variableMapping) {
51 IInputKey inputKey = typeConstraint.getSupplierKey();
52 Tuple tuple = typeConstraint.getVariablesTuple();
53 int[] positions = new int[tuple.getSize()];
54 for (int i = 0; i < tuple.getSize(); i++) {
55 PVariable variable = (PVariable) tuple.get(i);
56 positions[i] = variableMapping.get(variable);
57 }
58 operations.add(new GenericTypeCheck(inputKey, positions, TupleMask.fromSelectedIndices(variableMapping.size(), positions)));
59 }
60
61 @Override
62 protected void createUnaryTypeCheck(IInputKey inputKey, int position) {
63 int[] positions = new int[] {position};
64 operations.add(new GenericTypeCheck(inputKey, positions, TupleMask.fromSelectedIndices(1, positions)));
65 }
66
67 @Override
68 protected void createExtend(TypeConstraint typeConstraint, Map<PVariable, Integer> variableMapping) {
69 IInputKey inputKey = typeConstraint.getSupplierKey();
70 Tuple tuple = typeConstraint.getVariablesTuple();
71
72 int[] positions = new int[tuple.getSize()];
73 List<Integer> boundVariableIndices = new ArrayList<>();
74 List<Integer> boundVariables = new ArrayList<>();
75 Set<Integer> unboundVariables = new HashSet<>();
76 for (int i = 0; i < tuple.getSize(); i++) {
77 PVariable variable = (PVariable) tuple.get(i);
78 Integer position = variableMapping.get(variable);
79 positions[i] = position;
80 if (variableBindings.get(typeConstraint).contains(position)) {
81 boundVariableIndices.add(i);
82 boundVariables.add(position);
83 } else {
84 unboundVariables.add(position);
85 }
86 }
87 TupleMask indexerMask = TupleMask.fromSelectedIndices(inputKey.getArity(), boundVariableIndices);
88 TupleMask callMask = TupleMask.fromSelectedIndices(variableMapping.size(), boundVariables);
89 // If multiple tuple elements from the indexer should be bound to the same variable, we must use a
90 // {@link GenericTypeExtend} check whether the tuple elements have the same value.
91 if (unboundVariables.size() == 1 && indexerMask.getSize() + 1 == indexerMask.getSourceWidth()) {
92 operations.add(new GenericTypeExtendSingleValue(inputKey, positions, callMask, indexerMask, unboundVariables.iterator().next()));
93 } else {
94 operations.add(new GenericTypeExtend(inputKey, positions, callMask, indexerMask, unboundVariables));
95 }
96
97 }
98
99
100
101}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/IOperationCompiler.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/IOperationCompiler.java
new file mode 100644
index 00000000..625a7eb2
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/compiler/IOperationCompiler.java
@@ -0,0 +1,53 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.compiler;
10
11import java.util.List;
12import java.util.Map;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.localsearch.matcher.CallWithAdornment;
16import tools.refinery.viatra.runtime.localsearch.matcher.MatcherReference;
17import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
18import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
19import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
22
23/**
24 * An operation compiler is responsible for creating executable search plans from the subplan structure.
25 *
26 * @author Zoltan Ujhelyi
27 * @since 1.7
28 *
29 */
30public interface IOperationCompiler {
31
32 /**
33 * Compiles a plan of <code>POperation</code>s to a list of type <code>List&ltISearchOperation></code>
34 *
35 * @param plan
36 * @param boundParameters
37 * @return an ordered list of POperations that make up the compiled search plan
38 * @throws ViatraQueryRuntimeException
39 */
40 List<ISearchOperation> compile(SubPlan plan, Set<PParameter> boundParameters);
41
42 /**
43 * Replaces previous method returning {@link MatcherReference}
44 * @since 2.1
45 */
46 Set<CallWithAdornment> getDependencies();
47
48 /**
49 * @return the cached variable bindings for the previously created plan
50 */
51 Map<PVariable, Integer> getVariableMappings();
52
53} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/IConstraintEvaluationContext.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/IConstraintEvaluationContext.java
new file mode 100644
index 00000000..9b44612b
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/IConstraintEvaluationContext.java
@@ -0,0 +1,63 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.cost;
10
11import tools.refinery.viatra.runtime.matchers.backend.ResultProviderRequestor;
12import tools.refinery.viatra.runtime.matchers.context.IQueryResultProviderAccess;
13import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
14import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
15import java.util.Collection;
16import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
17import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
18
19/**
20 * This interface denotes the evaluation context of a constraint, intended for cost estimation. Provides access to information
21 * on which the cost function can base its calculation.
22 *
23 * @author Grill Balázs
24 * @since 1.4
25 * @noimplement
26 */
27public interface IConstraintEvaluationContext {
28
29 /**
30 * Get the constraint to be evaluated
31 */
32 public PConstraint getConstraint();
33
34 /**
35 * Unbound variables at the time of evaluating the constraint
36 */
37 public Collection<PVariable> getFreeVariables();
38
39 /**
40 * Bound variables at the time of evaluating the constraint
41 */
42 public Collection<PVariable> getBoundVariables();
43
44 public IQueryRuntimeContext getRuntimeContext();
45
46 /**
47 * @since 1.5
48 */
49 public QueryAnalyzer getQueryAnalyzer();
50
51 /**
52 * @deprecated use {@link #resultProviderRequestor()}
53 * @since 1.5
54 */
55 @Deprecated
56 public IQueryResultProviderAccess resultProviderAccess();
57
58 /**
59 * @since 2.1
60 */
61 public ResultProviderRequestor resultProviderRequestor();
62
63}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/ICostFunction.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/ICostFunction.java
new file mode 100644
index 00000000..4d9d0708
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/ICostFunction.java
@@ -0,0 +1,22 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.cost;
10
11/**
12 * Common interface for cost function implementation
13 *
14 * @author Grill Balázs
15 * @since 1.4
16 *
17 */
18public interface ICostFunction{
19
20 public double apply(IConstraintEvaluationContext input);
21
22}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/HybridMatcherConstraintCostFunction.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/HybridMatcherConstraintCostFunction.java
new file mode 100644
index 00000000..df9292f0
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/HybridMatcherConstraintCostFunction.java
@@ -0,0 +1,91 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.cost.impl;
10
11import java.util.HashMap;
12import java.util.List;
13import java.util.Map;
14import java.util.Set;
15import java.util.stream.Collectors;
16
17import tools.refinery.viatra.runtime.localsearch.planner.cost.IConstraintEvaluationContext;
18import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
19import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
22import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
25
26/**
27 * This cost function is intended to be used on hybrid configuration, with the strict restriction than any
28 * non-flattened positive pattern call is executed with Rete engine. This implementation provides the exact number
29 * of matches by invoking the result provider for the called pattern.
30 *
31 * @deprecated {@link StatisticsBasedConstraintCostFunction} should use {@link IQueryResultProvider#estimateCardinality(tools.refinery.viatra.runtime.matchers.tuple.TupleMask, org.eclipse.viatra.query.runtime.matchers.util.Accuracy)}
32 */
33@Deprecated
34public class HybridMatcherConstraintCostFunction extends IndexerBasedConstraintCostFunction {
35
36 @Override
37 protected double _calculateCost(PositivePatternCall patternCall, IConstraintEvaluationContext context) {
38 // Determine local constant constraints which is used to filter results
39 Tuple variables = patternCall.getVariablesTuple();
40 Set<Object> variablesSet = variables.getDistinctElements();
41 final Map<PVariable, Object> constantMap = new HashMap<>();
42 for (PConstraint _constraint : patternCall.getPSystem().getConstraints()) {
43 if (_constraint instanceof ConstantValue){
44 ConstantValue constraint = (ConstantValue) _constraint;
45 PVariable variable = (PVariable) constraint.getVariablesTuple().get(0);
46 if (variablesSet.contains(variable) && context.getBoundVariables().contains(variable)) {
47 constantMap.put(variable, constraint.getSupplierKey());
48 }
49 }
50 }
51
52 // Determine filter
53 Object[] filter = new Object[variables.getSize()];
54 for(int i=0; i < variables.getSize(); i++){
55 filter[i] = constantMap.get(variables.get(i));
56 }
57
58 // aggregate keys are the bound and not filtered variables
59 // These will be fixed in runtime, but unknown at planning time
60 // This is represented by indices to ease working with result tuples
61 final Map<Object, Integer> variableIndices = variables.invertIndex();
62 List<Integer> aggregateKeys = context.getBoundVariables().stream()
63 .filter(input -> !constantMap.containsKey(input))
64 .map(variableIndices::get)
65 .collect(Collectors.toList());
66
67 IQueryResultProvider resultProvider = context.resultProviderRequestor().requestResultProvider(patternCall, null);
68 Map<Tuple, Integer> aggregatedCounts = new HashMap<>();
69
70 // Iterate over all matches and count together matches that has equal values on
71 // aggregateKeys positions. The cost of the pattern call is considered to be the
72 // Maximum of these counted values
73
74 int result = 0;
75 // NOTE: a stream is not an iterable (cannot be iterated more than once), so to use it in a for-loop
76 // it has to be wrapped; in the following line a lambda is used to implement Iterable#iterator()
77 for (Tuple match : (Iterable<Tuple>) () -> resultProvider.getAllMatches(filter).iterator()) {
78 Tuple extracted = Tuples.flatTupleOf(aggregateKeys.stream().map(match::get).toArray());
79 int count = (aggregatedCounts.containsKey(extracted))
80 ? aggregatedCounts.get(extracted) + 1
81 : 1;
82 aggregatedCounts.put(extracted, count);
83 if (result < count) {
84 result = count;
85 }
86 }
87
88 return result;
89 }
90
91} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/IndexerBasedConstraintCostFunction.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/IndexerBasedConstraintCostFunction.java
new file mode 100644
index 00000000..9e2c8680
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/IndexerBasedConstraintCostFunction.java
@@ -0,0 +1,49 @@
1/**
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 */
9package tools.refinery.viatra.runtime.localsearch.planner.cost.impl;
10
11import java.util.Optional;
12
13import tools.refinery.viatra.runtime.localsearch.planner.cost.IConstraintEvaluationContext;
14import tools.refinery.viatra.runtime.matchers.context.IInputKey;
15import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
16import tools.refinery.viatra.runtime.matchers.util.Accuracy;
17
18/**
19 * Cost function which calculates cost based on the cardinality of items in the runtime model, provided by the base indexer
20 *
21 * @author Grill Balázs
22 * @since 1.4
23 */
24public class IndexerBasedConstraintCostFunction extends StatisticsBasedConstraintCostFunction {
25
26
27
28
29 /**
30 *
31 */
32 public IndexerBasedConstraintCostFunction() {
33 super();
34 }
35
36 /**
37 * @param inverseNavigationPenalty
38 * @since 2.1
39 */
40 public IndexerBasedConstraintCostFunction(double inverseNavigationPenalty) {
41 super(inverseNavigationPenalty);
42 }
43
44 @Override
45 public Optional<Long> projectionSize(IConstraintEvaluationContext input, IInputKey supplierKey, TupleMask groupMask, Accuracy requiredAccuracy) {
46 return input.getRuntimeContext().estimateCardinality(supplierKey, groupMask, requiredAccuracy);
47 }
48
49}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/StatisticsBasedConstraintCostFunction.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/StatisticsBasedConstraintCostFunction.java
new file mode 100644
index 00000000..873be31d
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/StatisticsBasedConstraintCostFunction.java
@@ -0,0 +1,413 @@
1/**
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 */
9package tools.refinery.viatra.runtime.localsearch.planner.cost.impl;
10
11import static tools.refinery.viatra.runtime.matchers.planning.helpers.StatisticsHelper.min;
12
13import java.util.ArrayList;
14import java.util.Arrays;
15import java.util.Collection;
16import java.util.Collections;
17import java.util.List;
18import java.util.Map;
19import java.util.Optional;
20import java.util.Set;
21
22import tools.refinery.viatra.runtime.localsearch.matcher.integration.AbstractLocalSearchResultProvider;
23import tools.refinery.viatra.runtime.localsearch.planner.cost.IConstraintEvaluationContext;
24import tools.refinery.viatra.runtime.localsearch.planner.cost.ICostFunction;
25import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
26import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
27import tools.refinery.viatra.runtime.matchers.context.IInputKey;
28import tools.refinery.viatra.runtime.matchers.planning.helpers.FunctionalDependencyHelper;
29import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
30import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
31import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
32import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
33import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
34import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
35import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
36import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.Inequality;
37import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
38import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.PatternMatchCounter;
39import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
40import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.BinaryReflexiveTransitiveClosure;
41import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
42import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
43import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
44import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
45import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
46import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
47import tools.refinery.viatra.runtime.matchers.util.Accuracy;
48import tools.refinery.viatra.runtime.matchers.util.Preconditions;
49
50/**
51 * Cost function which calculates cost based on the cardinality of items in the runtime model
52 *
53 * <p> To provide custom statistics, override
54 * {@link #projectionSize(IConstraintEvaluationContext, IInputKey, TupleMask, Accuracy)}
55 * and {@link #bucketSize(IQueryReference, IConstraintEvaluationContext, TupleMask)}.
56 *
57 * @author Grill Balázs
58 * @since 1.4
59 */
60public abstract class StatisticsBasedConstraintCostFunction implements ICostFunction {
61 protected static final double MAX_COST = 250.0;
62
63 protected static final double DEFAULT_COST = StatisticsBasedConstraintCostFunction.MAX_COST - 100.0;
64
65 /**
66 * @since 2.1
67 */
68 public static final double INVERSE_NAVIGATION_PENALTY_DEFAULT = 0.10;
69 /**
70 * @since 2.1
71 */
72 public static final double INVERSE_NAVIGATION_PENALTY_GENERIC = 0.01;
73 /**
74 * @since 2.7
75 */
76 public static final double EVAL_UNWIND_EXTENSION_FACTOR = 3.0;
77
78 private final double inverseNavigationPenalty;
79
80
81 /**
82 * @since 2.1
83 */
84 public StatisticsBasedConstraintCostFunction(double inverseNavigationPenalty) {
85 super();
86 this.inverseNavigationPenalty = inverseNavigationPenalty;
87 }
88 public StatisticsBasedConstraintCostFunction() {
89 this(INVERSE_NAVIGATION_PENALTY_DEFAULT);
90 }
91
92 /**
93 * @deprecated call and implement {@link #projectionSize(IConstraintEvaluationContext, IInputKey, TupleMask, Accuracy)} instead
94 */
95 @Deprecated
96 public long countTuples(final IConstraintEvaluationContext input, final IInputKey supplierKey) {
97 return projectionSize(input, supplierKey, TupleMask.identity(supplierKey.getArity()), Accuracy.EXACT_COUNT).orElse(-1L);
98 }
99
100 /**
101 * Override this to provide custom statistics on edge/node counts.
102 * New implementors shall implement this instead of {@link #countTuples(IConstraintEvaluationContext, IInputKey)}
103 * @since 2.1
104 */
105 public Optional<Long> projectionSize(final IConstraintEvaluationContext input, final IInputKey supplierKey,
106 final TupleMask groupMask, Accuracy requiredAccuracy) {
107 long legacyCount = countTuples(input, supplierKey);
108 return legacyCount < 0 ? Optional.empty() : Optional.of(legacyCount);
109 }
110
111 /**
112 * Override this to provide custom estimates for match set sizes of called patterns.
113 * @since 2.1
114 */
115 public Optional<Double> bucketSize(final IQueryReference patternCall,
116 final IConstraintEvaluationContext input, TupleMask projMask) {
117 IQueryResultProvider resultProvider = input.resultProviderRequestor().requestResultProvider(patternCall, null);
118 // TODO hack: use LS cost instead of true bucket size estimate
119 if (resultProvider instanceof AbstractLocalSearchResultProvider) {
120 double estimatedCost = ((AbstractLocalSearchResultProvider) resultProvider).estimateCost(projMask);
121 return Optional.of(estimatedCost);
122 } else {
123 return resultProvider.estimateAverageBucketSize(projMask, Accuracy.APPROXIMATION);
124 }
125 }
126
127
128
129 @Override
130 public double apply(final IConstraintEvaluationContext input) {
131 return this.calculateCost(input.getConstraint(), input);
132 }
133
134 protected double _calculateCost(final ConstantValue constant, final IConstraintEvaluationContext input) {
135 return 0.0f;
136 }
137
138 protected double _calculateCost(final TypeConstraint constraint, final IConstraintEvaluationContext input) {
139 final Collection<PVariable> freeMaskVariables = input.getFreeVariables();
140 final Collection<PVariable> boundMaskVariables = input.getBoundVariables();
141 IInputKey supplierKey = constraint.getSupplierKey();
142 long arity = supplierKey.getArity();
143
144 if ((arity == 1)) {
145 // unary constraint
146 return calculateUnaryConstraintCost(constraint, input);
147 } else if ((arity == 2)) {
148 // binary constraint
149 PVariable srcVariable = ((PVariable) constraint.getVariablesTuple().get(0));
150 PVariable dstVariable = ((PVariable) constraint.getVariablesTuple().get(1));
151 boolean isInverse = false;
152 // Check if inverse navigation is needed along the edge
153 if ((freeMaskVariables.contains(srcVariable) && boundMaskVariables.contains(dstVariable))) {
154 isInverse = true;
155 }
156 double binaryExtendCost = calculateBinaryCost(supplierKey, srcVariable, dstVariable, isInverse, input);
157 // Make inverse navigation slightly more expensive than forward navigation
158 // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=501078
159 return (isInverse) ? binaryExtendCost + inverseNavigationPenalty : binaryExtendCost;
160 } else {
161 // n-ary constraint
162 throw new UnsupportedOperationException("Cost calculation for arity " + arity + " is not implemented yet");
163 }
164 }
165
166
167 /**
168 * @deprecated use/implement {@link #calculateBinaryCost(IInputKey, PVariable, PVariable, boolean, IConstraintEvaluationContext)} instead
169 */
170 @Deprecated
171 protected double calculateBinaryExtendCost(final IInputKey supplierKey, final PVariable srcVariable,
172 final PVariable dstVariable, final boolean isInverse, long edgeCount /* TODO remove */,
173 final IConstraintEvaluationContext input) {
174 throw new UnsupportedOperationException();
175 }
176
177 /**
178 * @since 2.1
179 */
180 protected double calculateBinaryCost(final IInputKey supplierKey, final PVariable srcVariable,
181 final PVariable dstVariable, final boolean isInverse,
182 final IConstraintEvaluationContext input) {
183 final Collection<PVariable> freeMaskVariables = input.getFreeVariables();
184 final PConstraint constraint = input.getConstraint();
185
186// IQueryMetaContext metaContext = input.getRuntimeContext().getMetaContext();
187// Collection<InputKeyImplication> implications = metaContext.getImplications(supplierKey);
188
189 Optional<Long> edgeUpper = projectionSize(input, supplierKey, TupleMask.identity(2), Accuracy.BEST_UPPER_BOUND);
190 Optional<Long> srcUpper = projectionSize(input, supplierKey, TupleMask.selectSingle(0, 2), Accuracy.BEST_UPPER_BOUND);
191 Optional<Long> dstUpper = projectionSize(input, supplierKey, TupleMask.selectSingle(1, 2), Accuracy.BEST_UPPER_BOUND);
192
193 if (freeMaskVariables.contains(srcVariable) && freeMaskVariables.contains(dstVariable)) {
194 Double branchCount = edgeUpper.map(Long::doubleValue).orElse(
195 srcUpper.map(Long::doubleValue).orElse(DEFAULT_COST)
196 *
197 dstUpper.map(Long::doubleValue).orElse(DEFAULT_COST)
198 );
199 return branchCount;
200
201 } else {
202
203 Optional<Long> srcLower = projectionSize(input, supplierKey, TupleMask.selectSingle(0, 2), Accuracy.APPROXIMATION);
204 Optional<Long> dstLower = projectionSize(input, supplierKey, TupleMask.selectSingle(1, 2), Accuracy.APPROXIMATION);
205
206 List<Optional<Long>> nodeLower = Arrays.asList(srcLower, dstLower);
207 List<Optional<Long>> nodeUpper = Arrays.asList(srcUpper, dstUpper);
208
209 int from = isInverse ? 1 : 0;
210 int to = isInverse ? 0 : 1;
211
212 Optional<Double> costEstimate = Optional.empty();
213
214 if (!freeMaskVariables.contains(srcVariable) && !freeMaskVariables.contains(dstVariable)) {
215 // both variables bound, this is a simple check
216 costEstimate = min(costEstimate, 0.9);
217 } // TODO use bucket size estimation in the runtime context
218 costEstimate = min(costEstimate,
219 edgeUpper.flatMap(edges ->
220 nodeLower.get(from).map(fromNodes ->
221 // amortize edges over start nodes
222 (fromNodes == 0) ? 0.0 : (((double) edges) / fromNodes)
223 )));
224 if (navigatesThroughFunctionalDependencyInverse(input, constraint)) {
225 costEstimate = min(costEstimate, nodeUpper.get(to).flatMap(toNodes ->
226 nodeLower.get(from).map(fromNodes ->
227 // due to a reverse functional dependency, the destination count is an upper bound for the edge count
228 (fromNodes == 0) ? 0.0 : ((double) toNodes) / fromNodes
229 )));
230 }
231 if (! edgeUpper.isPresent()) {
232 costEstimate = min(costEstimate, nodeUpper.get(to).flatMap(toNodes ->
233 nodeLower.get(from).map(fromNodes ->
234 // If count is 0, no such element exists in the model, so there will be no branching
235 // TODO rethink, why dstNodeCount / srcNodeCount instead of dstNodeCount?
236 // The universally valid bound would be something like sparseEdgeEstimate = dstNodeCount + 1.0
237 // If we assume sparseness, we can reduce it by a SPARSENESS_FACTOR (e.g. 0.1).
238 // Alternatively, discount dstNodeCount * srcNodeCount on a SPARSENESS_EXPONENT (e.g 0.75) and then amortize over srcNodeCount.
239 fromNodes != 0 ? Math.max(1.0, ((double) toNodes) / fromNodes) : 1.0
240 )));
241 }
242 if (navigatesThroughFunctionalDependency(input, constraint)) {
243 // At most one destination value
244 costEstimate = min(costEstimate, 1.0);
245 }
246
247 return costEstimate.orElse(DEFAULT_COST);
248
249 }
250 }
251
252 /**
253 * @since 1.7
254 */
255 protected boolean navigatesThroughFunctionalDependency(final IConstraintEvaluationContext input,
256 final PConstraint constraint) {
257 return navigatesThroughFunctionalDependency(input, constraint, input.getBoundVariables(), input.getFreeVariables());
258 }
259 /**
260 * @since 2.1
261 */
262 protected boolean navigatesThroughFunctionalDependencyInverse(final IConstraintEvaluationContext input,
263 final PConstraint constraint) {
264 return navigatesThroughFunctionalDependency(input, constraint, input.getFreeVariables(), input.getBoundVariables());
265 }
266 /**
267 * @since 2.1
268 */
269 protected boolean navigatesThroughFunctionalDependency(final IConstraintEvaluationContext input,
270 final PConstraint constraint, Collection<PVariable> determining, Collection<PVariable> determined) {
271 final QueryAnalyzer queryAnalyzer = input.getQueryAnalyzer();
272 final Map<Set<PVariable>, Set<PVariable>> functionalDependencies = queryAnalyzer
273 .getFunctionalDependencies(Collections.singleton(constraint), false);
274 final Set<PVariable> impliedVariables = FunctionalDependencyHelper.closureOf(determining,
275 functionalDependencies);
276 return ((impliedVariables != null) && impliedVariables.containsAll(determined));
277 }
278
279 protected double calculateUnaryConstraintCost(final TypeConstraint constraint,
280 final IConstraintEvaluationContext input) {
281 PVariable variable = (PVariable) constraint.getVariablesTuple().get(0);
282 if (input.getBoundVariables().contains(variable)) {
283 return 0.9;
284 } else {
285 return projectionSize(input, constraint.getSupplierKey(), TupleMask.identity(1), Accuracy.APPROXIMATION)
286 .map(count -> 1.0 + count).orElse(DEFAULT_COST);
287 }
288 }
289
290 protected double _calculateCost(final ExportedParameter exportedParam, final IConstraintEvaluationContext input) {
291 return 0.0;
292 }
293
294 protected double _calculateCost(final TypeFilterConstraint exportedParam,
295 final IConstraintEvaluationContext input) {
296 return 0.0;
297 }
298
299 protected double _calculateCost(final PositivePatternCall patternCall, final IConstraintEvaluationContext input) {
300 final List<Integer> boundPositions = new ArrayList<>();
301 final List<PParameter> parameters = patternCall.getReferredQuery().getParameters();
302 for (int i = 0; (i < parameters.size()); i++) {
303 final PVariable variable = patternCall.getVariableInTuple(i);
304 if (input.getBoundVariables().contains(variable)) boundPositions.add(i);
305 }
306 TupleMask projMask = TupleMask.fromSelectedIndices(parameters.size(), boundPositions);
307
308 return bucketSize(patternCall, input, projMask).orElse(DEFAULT_COST);
309 }
310
311
312 /**
313 * @since 1.7
314 */
315 protected double _calculateCost(final ExpressionEvaluation evaluation, final IConstraintEvaluationContext input) {
316 // Even if there are multiple results here, if all output variable is bound eval unwind will not result in
317 // multiple branches in search graph
318 final double multiplier = evaluation.isUnwinding() && !input.getFreeVariables().isEmpty()
319 ? EVAL_UNWIND_EXTENSION_FACTOR
320 : 1.0;
321 return _calculateCost((PConstraint) evaluation, input) * multiplier;
322 }
323
324 /**
325 * @since 1.7
326 */
327 protected double _calculateCost(final Inequality inequality, final IConstraintEvaluationContext input) {
328 return _calculateCost((PConstraint)inequality, input);
329 }
330
331 /**
332 * @since 1.7
333 */
334 protected double _calculateCost(final AggregatorConstraint aggregator, final IConstraintEvaluationContext input) {
335 return _calculateCost((PConstraint)aggregator, input);
336 }
337
338 /**
339 * @since 1.7
340 */
341 protected double _calculateCost(final NegativePatternCall call, final IConstraintEvaluationContext input) {
342 return _calculateCost((PConstraint)call, input);
343 }
344
345 /**
346 * @since 1.7
347 */
348 protected double _calculateCost(final PatternMatchCounter counter, final IConstraintEvaluationContext input) {
349 return _calculateCost((PConstraint)counter, input);
350 }
351
352 /**
353 * @since 1.7
354 */
355 protected double _calculateCost(final BinaryTransitiveClosure closure, final IConstraintEvaluationContext input) {
356 // if (input.getFreeVariables().size() == 1) return 3.0;
357 return StatisticsBasedConstraintCostFunction.DEFAULT_COST;
358 }
359
360 /**
361 * @since 2.0
362 */
363 protected double _calculateCost(final BinaryReflexiveTransitiveClosure closure, final IConstraintEvaluationContext input) {
364 // if (input.getFreeVariables().size() == 1) return 3.0;
365 return StatisticsBasedConstraintCostFunction.DEFAULT_COST;
366 }
367
368 /**
369 * Default cost calculation strategy
370 */
371 protected double _calculateCost(final PConstraint constraint, final IConstraintEvaluationContext input) {
372 if (input.getFreeVariables().isEmpty()) {
373 return 1.0;
374 } else {
375 return StatisticsBasedConstraintCostFunction.DEFAULT_COST;
376 }
377 }
378
379 /**
380 * @throws ViatraQueryRuntimeException
381 */
382 public double calculateCost(final PConstraint constraint, final IConstraintEvaluationContext input) {
383 Preconditions.checkArgument(constraint != null, "Set constraint value correctly");
384 if (constraint instanceof ExportedParameter) {
385 return _calculateCost((ExportedParameter) constraint, input);
386 } else if (constraint instanceof TypeFilterConstraint) {
387 return _calculateCost((TypeFilterConstraint) constraint, input);
388 } else if (constraint instanceof ConstantValue) {
389 return _calculateCost((ConstantValue) constraint, input);
390 } else if (constraint instanceof PositivePatternCall) {
391 return _calculateCost((PositivePatternCall) constraint, input);
392 } else if (constraint instanceof TypeConstraint) {
393 return _calculateCost((TypeConstraint) constraint, input);
394 } else if (constraint instanceof ExpressionEvaluation) {
395 return _calculateCost((ExpressionEvaluation) constraint, input);
396 } else if (constraint instanceof Inequality) {
397 return _calculateCost((Inequality) constraint, input);
398 } else if (constraint instanceof AggregatorConstraint) {
399 return _calculateCost((AggregatorConstraint) constraint, input);
400 } else if (constraint instanceof NegativePatternCall) {
401 return _calculateCost((NegativePatternCall) constraint, input);
402 } else if (constraint instanceof PatternMatchCounter) {
403 return _calculateCost((PatternMatchCounter) constraint, input);
404 } else if (constraint instanceof BinaryTransitiveClosure) {
405 return _calculateCost((BinaryTransitiveClosure) constraint, input);
406 } else if (constraint instanceof BinaryReflexiveTransitiveClosure) {
407 return _calculateCost((BinaryReflexiveTransitiveClosure) constraint, input);
408 } else {
409 // Default cost calculation
410 return _calculateCost(constraint, input);
411 }
412 }
413}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/VariableBindingBasedCostFunction.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/VariableBindingBasedCostFunction.java
new file mode 100644
index 00000000..a517af25
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/cost/impl/VariableBindingBasedCostFunction.java
@@ -0,0 +1,95 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Balazs Grill, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.cost.impl;
10
11import java.util.Set;
12
13import tools.refinery.viatra.runtime.localsearch.planner.cost.IConstraintEvaluationContext;
14import tools.refinery.viatra.runtime.localsearch.planner.cost.ICostFunction;
15import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
16import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
17import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
18import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
19import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
20import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
21import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
22
23/**
24 * This class can be used to calculate cost of application of a constraint with a given adornment.
25 *
26 * For now the logic is based on the following principles:
27 *
28 * <li>The transitive closures, NACs and count finds are the most expensive operations
29 *
30 * <li>The number of free variables increase the cost
31 *
32 * <li>If all the variables of a constraint are free, then its cost equals to twice the number of its parameter
33 * variables. This solves the problem of unnecessary iteration over instances at the beginning of a plan (thus causing
34 * very long run times when executing the plan) by applying constraints based on structural features as soon as
35 * possible.
36 *
37 * <br>
38 *
39 * @author Marton Bur
40 * @since 1.4
41 *
42 */
43public class VariableBindingBasedCostFunction implements ICostFunction {
44
45 // Static cost definitions
46 private static int MAX = 1000;
47 private static int exportedParameterCost = MAX - 20;
48 private static int binaryTransitiveClosureCost = MAX - 50;
49 private static int nacCost = MAX - 100;
50 private static int aggregatorCost = MAX - 200;
51 private static int constantCost = 0;
52
53 @Override
54 public double apply(IConstraintEvaluationContext input) {
55 PConstraint constraint = input.getConstraint();
56 Set<PVariable> affectedVariables = constraint.getAffectedVariables();
57
58 int cost = 0;
59
60 // For constants the cost is determined to be 0.0
61 // The following constraints should be checks:
62 // * Binary transitive closure
63 // * NAC
64 // * count
65 // * exported parameter - only a metadata
66 if (constraint instanceof ConstantValue) {
67 cost = constantCost;
68 } else if (constraint instanceof BinaryTransitiveClosure) {
69 cost = binaryTransitiveClosureCost;
70 } else if (constraint instanceof NegativePatternCall) {
71 cost = nacCost;
72 } else if (constraint instanceof AggregatorConstraint) {
73 cost = aggregatorCost;
74 } else if (constraint instanceof ExportedParameter) {
75 cost = exportedParameterCost;
76 } else {
77 // In case of other constraints count the number of unbound variables
78 for (PVariable pVariable : affectedVariables) {
79 if (input.getFreeVariables().contains(pVariable)) {
80 // For each free variable ('without-value-variable') increase cost
81 cost += 1;
82 }
83 }
84 if (cost == affectedVariables.size()) {
85 // If all the variables are free, double the cost.
86 // This ensures that iteration costs more
87 cost *= 2;
88 }
89
90 }
91
92 return Float.valueOf(cost);
93 }
94
95}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/CompilerHelper.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/CompilerHelper.java
new file mode 100644
index 00000000..9b4e9ea5
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/CompilerHelper.java
@@ -0,0 +1,209 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Daniel Segesdi, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.util;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.HashSet;
15import java.util.List;
16import java.util.Map;
17import java.util.Set;
18
19import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
20import tools.refinery.viatra.runtime.matchers.planning.operations.PApply;
21import tools.refinery.viatra.runtime.matchers.planning.operations.POperation;
22import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
23import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
24import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
25import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
26
27/**
28 *
29 * Helper methods for compiling SubPlans
30 *
31 * @author Marton Bur
32 *
33 */
34public class CompilerHelper {
35
36 private CompilerHelper() {/*Utility class constructor*/}
37
38 private static boolean isUserSpecified(PVariable var) {
39 return !var.isVirtual() && !var.getName().startsWith("_");
40 }
41
42 public static Map<PVariable, Integer> createVariableMapping(SubPlan plan) {
43 Map<PVariable, Integer> variableMapping = new HashMap<>();
44
45 int variableNumber = 0;
46
47 // Important note: this list might contain duplications when parameters are made equal inside the pattern
48 // This is the expected and normal behavior
49 List<PVariable> symbolicParameterVariables = plan.getBody().getSymbolicParameterVariables();
50 for (PVariable pVariable : symbolicParameterVariables) {
51 if (!variableMapping.containsKey(pVariable)) {
52 variableMapping.put(pVariable, variableNumber++);
53 }
54 }
55
56 List<PVariable> allVariables = new ArrayList<>(plan.getBody().getUniqueVariables());
57 Collections.sort(allVariables, (left, right) -> {
58 boolean leftUserSpecified = isUserSpecified(left);
59 boolean rightUserSpecified = isUserSpecified(right);
60 if (leftUserSpecified && !rightUserSpecified) {
61 return -1;
62 } else if (!leftUserSpecified && rightUserSpecified) {
63 return +1;
64 } else {
65 return left.getName().compareTo(right.getName());
66 }
67 });
68 for (PVariable pVariable : allVariables) {
69 if (!variableMapping.containsKey(pVariable)) {
70 variableMapping.put(pVariable, variableNumber++);
71 }
72 }
73
74 return variableMapping;
75 }
76
77 public static Map<PConstraint, Set<Integer>> cacheVariableBindings(SubPlan plan,
78 Map<PVariable, Integer> variableMappings, Set<PParameter> adornment) {
79
80 Set<Integer> externallyBoundVariables = getVariableIndicesForParameters(plan, variableMappings,
81 adornment);
82
83 Map<PConstraint, Set<Integer>> variableBindings = new HashMap<>();
84
85 List<SubPlan> allPlansInHierarchy = getAllParentPlans(plan);
86 for (SubPlan subPlan : allPlansInHierarchy) {
87 POperation operation = subPlan.getOperation();
88
89 if (operation instanceof PApply) {
90 PConstraint pConstraint = ((PApply) operation).getPConstraint();
91 Set<Integer> boundVariableIndices = getParametersBoundByParentPlan(variableMappings, subPlan);
92 boundVariableIndices.addAll(externallyBoundVariables);
93
94 variableBindings.put(pConstraint, boundVariableIndices);
95 }
96 }
97 return variableBindings;
98 }
99
100 /**
101 * Returns the list of variable indexes that are bound by the parent plan.
102 */
103 private static Set<Integer> getParametersBoundByParentPlan(Map<PVariable, Integer> variableMappings,
104 SubPlan subPlan) {
105 if (!subPlan.getParentPlans().isEmpty()) {
106 SubPlan parentPlan = subPlan.getParentPlans().get(0);
107 Set<PConstraint> enforcedConstraints = parentPlan.getAllEnforcedConstraints();
108 Set<PVariable> affectedVariables = getAffectedVariables(enforcedConstraints);
109 return getVariableIndices(variableMappings, affectedVariables);
110 }
111 return Collections.emptySet();
112 }
113
114 /**
115 * @param plan
116 * @return all the ancestor plans including the given plan
117 */
118 private static List<SubPlan> getAllParentPlans(SubPlan plan) {
119 SubPlan currentPlan = plan;
120 List<SubPlan> allPlans = new ArrayList<>();
121 allPlans.add(plan);
122 while (!currentPlan.getParentPlans().isEmpty()) {
123 // In the local search it is assumed that only a single parent exists
124 currentPlan = currentPlan.getParentPlans().get(0);
125 allPlans.add(currentPlan);
126 }
127
128 return allPlans;
129 }
130
131 /**
132 * @param variableMappings
133 * the mapping between variables and their indices
134 * @param variables
135 * variables to get the indices for
136 * @return the set of variable indices for the given variables
137 */
138 private static Set<Integer> getVariableIndices(Map<PVariable, Integer> variableMappings,
139 Iterable<PVariable> variables) {
140 Set<Integer> variableIndices = new HashSet<>();
141 for (PVariable pVariable : variables) {
142 variableIndices.add(variableMappings.get(pVariable));
143 }
144 return variableIndices;
145 }
146
147 /**
148 * Returns all affected variables of the given PConstraints.
149 */
150 private static Set<PVariable> getAffectedVariables(Set<PConstraint> pConstraints) {
151 Set<PVariable> allDeducedVariables = new HashSet<>();
152 for (PConstraint pConstraint : pConstraints) {
153 allDeducedVariables.addAll(pConstraint.getAffectedVariables());
154 }
155 return allDeducedVariables;
156 }
157
158 /**
159 * Transforms the index of a parameter into the index of a variable of the normalized body.
160 *
161 * @param plan
162 * the SubPlan containing the original body and its parameters
163 * @param variableMappings
164 * the mapping of PVariables to their indices
165 * @param parameters
166 * a set of parameters
167 * @return the index of the variable corresponding to the parameter at the given index
168 */
169 private static Set<Integer> getVariableIndicesForParameters(SubPlan plan,
170 Map<PVariable, Integer> variableMappings, Set<PParameter> parameters) {
171 Map<PParameter, PVariable> parameterMapping = new HashMap<>();
172 for (ExportedParameter constraint : plan.getBody().getSymbolicParameters()) {
173 parameterMapping.put(constraint.getPatternParameter(), constraint.getParameterVariable());
174 }
175
176 Set<Integer> variableIndices = new HashSet<>();
177 for (PParameter parameter : parameters) {
178 PVariable parameterVariable = parameterMapping.get(parameter);
179 if (parameterVariable == null) {
180 // XXX In case of older (pre-1.4) VIATRA versions, PParameters were not stable, see bug 498348
181 parameterVariable = plan.getBody().getVariableByNameChecked(parameter.getName());
182 }
183 Integer variableIndex = variableMappings.get(parameterVariable);
184 variableIndices.add(variableIndex);
185 }
186 return variableIndices;
187 }
188
189 /**
190 * Extracts the operations from a SubPlan into a list of POperations in the order of execution
191 *
192 * @param plan
193 * the SubPlan from wich the POperations should be extracted
194 * @return list of POperations extracted from the <code>plan</code>
195 */
196 public static List<POperation> createOperationsList(SubPlan plan) {
197 List<POperation> operationsList = new ArrayList<>();
198 while (plan.getParentPlans().size() > 0) {
199 operationsList.add(plan.getOperation());
200 SubPlan parentPlan = plan.getParentPlans().get(0);
201 plan = parentPlan;
202 }
203 operationsList.add(plan.getOperation());
204
205 Collections.reverse(operationsList);
206 return operationsList;
207 }
208
209}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/OperationCostComparator.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/OperationCostComparator.java
new file mode 100644
index 00000000..58f4fc41
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/planner/util/OperationCostComparator.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Danil Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.planner.util;
10
11import java.util.Comparator;
12
13import tools.refinery.viatra.runtime.localsearch.planner.PConstraintInfo;
14
15/**
16 * @author Marton Bur
17 *
18 */
19public class OperationCostComparator implements Comparator<PConstraintInfo>{
20
21 @Override
22 public int compare(PConstraintInfo o1, PConstraintInfo o2) {
23 return Double.compare(o1.getCost(), o2.getCost());
24 }
25
26}
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/profiler/LocalSearchProfilerAdapter.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/profiler/LocalSearchProfilerAdapter.java
new file mode 100644
index 00000000..8c50c694
--- /dev/null
+++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/profiler/LocalSearchProfilerAdapter.java
@@ -0,0 +1,83 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.localsearch.profiler;
10
11import java.util.HashMap;
12import java.util.List;
13import java.util.Map;
14import java.util.stream.Collectors;
15
16import tools.refinery.viatra.runtime.localsearch.MatchingFrame;
17import tools.refinery.viatra.runtime.localsearch.matcher.ILocalSearchAdapter;
18import tools.refinery.viatra.runtime.localsearch.matcher.LocalSearchMatcher;
19import tools.refinery.viatra.runtime.localsearch.matcher.MatcherReference;
20import tools.refinery.viatra.runtime.localsearch.operations.ISearchOperation;
21import tools.refinery.viatra.runtime.localsearch.plan.SearchPlan;
22import tools.refinery.viatra.runtime.localsearch.plan.SearchPlanExecutor;
23
24/**
25 * This is a simple {@link ILocalSearchAdapter} which capable of counting
26 * each search operation execution then printing it in human readably form
27 * (along with the executed plans) using {@link #toString()}
28 * @author Grill Balázs
29 * @since 1.5
30 *
31 */
32public class LocalSearchProfilerAdapter implements ILocalSearchAdapter {
33
34 private final Map<MatcherReference, List<SearchPlan>> planReference = new HashMap<>();
35
36 private final Map<ISearchOperation, Integer> successfulOperationCounts = new HashMap<>();
37 private final Map<ISearchOperation, Integer> failedOperationCounts = new HashMap<>();
38
39 @Override
40 public void patternMatchingStarted(LocalSearchMatcher lsMatcher) {
41 MatcherReference key = new MatcherReference(lsMatcher.getPlanDescriptor().getQuery(),
42 lsMatcher.getPlanDescriptor().getAdornment());
43 planReference.put(key, lsMatcher.getPlan().stream().map(SearchPlanExecutor::getSearchPlan).collect(Collectors.toList()));
44 }
45
46 @Override
47 public void operationExecuted(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isSuccessful) {
48 Map<ISearchOperation, Integer> counts = isSuccessful ? successfulOperationCounts : failedOperationCounts;
49 counts.merge(operation,
50 /*no previous entry*/1,
51 /*increase previous value*/(oldValue, v) -> oldValue + 1);
52 }
53
54 @Override
55 public String toString() {
56 StringBuilder sb = new StringBuilder();
57 for (java.util.Map.Entry<MatcherReference, List<SearchPlan>> entry: planReference.entrySet()){
58 sb.append(entry.getKey());
59 sb.append("\n");
60
61 sb.append(entry.getValue());
62
63 List<SearchPlan> bodies = entry.getValue();
64 sb.append("{\n");
65 for(int i=0;i<bodies.size();i++){
66 sb.append("\tbody #");sb.append(i);sb.append("(\n");
67 for(ISearchOperation operation : bodies.get(i).getOperations()){
68 final int successCount = successfulOperationCounts.computeIfAbsent(operation, op -> 0);
69 final int failCount = failedOperationCounts.computeIfAbsent(operation, op -> 0);
70 sb.append("\t\t");sb.append(successCount);
71 sb.append("\t");sb.append(failCount);
72 sb.append("\t");sb.append(successCount + failCount);
73 sb.append("\t");sb.append(operation);
74 sb.append("\n");
75 }
76 sb.append("\t)\n");
77 }
78 sb.append("}\n");
79 }
80 return sb.toString();
81 }
82
83}
diff --git a/subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF b/subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..c732af46
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
1Manifest-Version: 1.0
2Bundle-ManifestVersion: 2
3Bundle-Name: %pluginName
4Bundle-SymbolicName: viatra-runtime-rete-recipes;singleton:=true
5Automatic-Module-Name: viatra-runtime-rete-recipes
6Bundle-Version: 1.0.0.qualifier
7Bundle-ClassPath: viatra-runtime-rete-recipes.jar
8Bundle-Vendor: %providerName
9Bundle-Localization: plugin
10Bundle-RequiredExecutionEnvironment: JavaSE-1.7
11Export-Package: org.eclipse.viatra.query.runtime.rete.recipes,
12 org.eclipse.viatra.query.runtime.rete.recipes.impl,
13 org.eclipse.viatra.query.runtime.rete.recipes.util
14Require-Bundle: org.eclipse.core.runtime,
15 org.eclipse.emf.ecore;visibility:=reexport,
16 org.eclipse.xtext.xbase.lib,
17 org.eclipse.emf.ecore.xcore.lib
18Bundle-ActivationPolicy: lazy
diff --git a/subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF.license b/subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF.license
new file mode 100644
index 00000000..03d1d42b
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/META-INF/MANIFEST.MF.license
@@ -0,0 +1,4 @@
1Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
2Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
3
4SPDX-License-Identifier: EPL-2.0
diff --git a/subprojects/viatra-runtime-rete-recipes/about.html b/subprojects/viatra-runtime-rete-recipes/about.html
new file mode 100644
index 00000000..d1d5593a
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/about.html
@@ -0,0 +1,26 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3<!--
4 Copyright (c) 2017, Eclipse.org Foundation, Inc.
5
6 SPDX-License-Identifier: LicenseRef-EPL-Steward
7-->
8<head>
9<title>About</title>
10<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
11</head>
12<body lang="EN-US">
13<h2>About This Content</h2>
14
15<p>March 18, 2019</p>
16<h3>License</h3>
17
18<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
19Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/org/documents/epl-v20.php">http://www.eclipse.org/legal/epl-v20.html</a>.
20For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
21
22<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
23apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
24indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
25</body>
26</html>
diff --git a/subprojects/viatra-runtime-rete-recipes/build.gradle.kts b/subprojects/viatra-runtime-rete-recipes/build.gradle.kts
new file mode 100644
index 00000000..b1b11b4e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/build.gradle.kts
@@ -0,0 +1,62 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import tools.refinery.gradle.utils.SonarPropertiesUtils
8
9plugins {
10 id("tools.refinery.gradle.java-library")
11 id("tools.refinery.gradle.mwe2")
12 id("tools.refinery.gradle.sonarqube")
13}
14
15dependencies {
16 api(project(":refinery-viatra-runtime"))
17 api(libs.ecore)
18 mwe2(libs.ecore.codegen)
19 mwe2(libs.mwe.utils)
20 mwe2(libs.mwe2.lib)
21 mwe2(libs.slf4j.simple)
22 mwe2(libs.xtext.core)
23 mwe2(libs.xtext.xbase)
24}
25
26sourceSets {
27 main {
28 java.srcDir("src/main/emf-gen")
29 }
30}
31
32tasks {
33 val generateEPackage by registering(JavaExec::class) {
34 mainClass.set("org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher")
35 classpath(configurations.mwe2)
36 inputs.file("src/main/java/tools/refinery/viatra/runtime/rete/recipes/GenerateReteRecipes.mwe2")
37 inputs.file("src/main/resources/model/recipes.ecore")
38 inputs.file("src/main/resources/model/rete-recipes.genmodel")
39 outputs.file("build.properties")
40 outputs.file("META-INF/MANIFEST.MF")
41 outputs.file("plugin.xml")
42 outputs.file("plugin.properties")
43 outputs.dir("src/main/emf-gen")
44 args("src/main/java/tools/refinery/viatra/runtime/rete/recipes/GenerateReteRecipes.mwe2",
45 "-p", "rootPath=/$projectDir")
46 }
47
48 for (taskName in listOf("compileJava", "processResources", "generateEclipseSourceFolders")) {
49 named(taskName) {
50 dependsOn(generateEPackage)
51 }
52 }
53
54 clean {
55 delete("src/main/emf-gen")
56 }
57}
58
59sonarqube.properties {
60 SonarPropertiesUtils.addToList(properties, "sonar.exclusions", "src/main/emf-gen/**")
61}
62
diff --git a/subprojects/viatra-runtime-rete-recipes/build.properties b/subprojects/viatra-runtime-rete-recipes/build.properties
new file mode 100644
index 00000000..97e4d6bd
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/build.properties
@@ -0,0 +1,15 @@
1# Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
2# This program and the accompanying materials are made available under the
3# terms of the Eclipse Public License v. 2.0 which is available at
4# http://www.eclipse.org/legal/epl-v20.html.
5#
6# SPDX-License-Identifier: EPL-2.0
7
8bin.includes = viatra-runtime-rete-recipes.jar,\
9 model/,\
10 META-INF/,\
11 plugin.xml,\
12 plugin.properties
13jars.compile.order = viatra-runtime-rete-recipes.jar
14source.viatra-runtime-rete-recipes.jar = src-gen/
15output.viatra-runtime-rete-recipes.jar = bin/
diff --git a/subprojects/viatra-runtime-rete-recipes/plugin.properties b/subprojects/viatra-runtime-rete-recipes/plugin.properties
new file mode 100644
index 00000000..43a7236d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/plugin.properties
@@ -0,0 +1,9 @@
1# Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
2# This program and the accompanying materials are made available under the
3# terms of the Eclipse Public License v. 2.0 which is available at
4# http://www.eclipse.org/legal/epl-v20.html.
5#
6# SPDX-License-Identifier: EPL-2.0
7
8pluginName = Rete-recipes Model
9providerName = www.example.org
diff --git a/subprojects/viatra-runtime-rete-recipes/plugin.xml b/subprojects/viatra-runtime-rete-recipes/plugin.xml
new file mode 100644
index 00000000..e4917f5d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/plugin.xml
@@ -0,0 +1,23 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?eclipse version="3.0"?>
3
4<!--
5 Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
6 This program and the accompanying materials are made available under the
7 terms of the Eclipse Public License v. 2.0 which is available at
8 http://www.eclipse.org/legal/epl-v20.html.
9
10 SPDX-License-Identifier: EPL-2.0
11-->
12
13<plugin>
14
15 <extension point="org.eclipse.emf.ecore.generated_package">
16 <!-- @generated rete-recipes -->
17 <package
18 uri="https://refinery.tools/emf/2023/ViatraReteRecipes"
19 class="tools.refinery.viatra.runtime.rete.recipes.RecipesPackage"
20 genModel="src/main/resources/model/rete-recipes.genmodel"/>
21 </extension>
22
23</plugin>
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/GenerateReteRecipes.mwe2 b/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/GenerateReteRecipes.mwe2
new file mode 100644
index 00000000..424cc9f5
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/GenerateReteRecipes.mwe2
@@ -0,0 +1,25 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6module tools.refinery.viatra.runtime.rete.recipes.GenerateReteRecipes
7
8Workflow {
9 bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
10 projectMapping = {
11 projectName = "tools.refinery.refinery-viatra-runtime-rete-recipes"
12 path = "."
13 }
14 }
15
16 component = org.eclipse.emf.mwe.utils.DirectoryCleaner {
17 directory = "src/main/emf-gen"
18 }
19
20 component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
21 generateCustomClasses = false
22 genModel = "platform:/resource/tools.refinery.refinery-viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel"
23 srcPath = "platform:/resource/tools.refinery.refinery-viatra-runtime-rete-recipes/src/main/emf-gen"
24 }
25}
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipeRecognizer.java b/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipeRecognizer.java
new file mode 100644
index 00000000..2c252593
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipeRecognizer.java
@@ -0,0 +1,204 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.recipes.helper;
10
11import org.eclipse.emf.common.util.EList;
12import org.eclipse.emf.ecore.EAttribute;
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.EObject;
15import org.eclipse.emf.ecore.EStructuralFeature;
16import org.eclipse.emf.ecore.util.EcoreUtil;
17import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
18import tools.refinery.viatra.runtime.rete.recipes.RecipesPackage;
19import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
20
21import java.util.*;
22
23/**
24 * Stores a set of known <em>canonical</em> recipes, each representing a disjoint equivalence class of recipes, modulo
25 * {@link #isEquivalentRecipe(ReteNodeRecipe, ReteNodeRecipe)}.
26 *
27 * @author Gabor Bergmann
28 * @since 1.3
29 *
30 */
31public class RecipeRecognizer {
32 private static long nextRecipeEquivalenceClassID = 0;
33
34 /**
35 * if EcoreUtil.equals(recipe1, recipe2), only one of them will be included here
36 */
37 Map<EClass, Set<ReteNodeRecipe>> canonicalRecipesByClass = new HashMap<>();
38 Map<Long, ReteNodeRecipe> canonicalRecipeByEquivalenceClassID = new HashMap<>();
39
40 private IQueryRuntimeContext runtimeContext;
41
42 /**
43 * @param can be null; if provided, further equivalences can be detected based on {@link IQueryRuntimeContext#wrapElement(Object)}
44 * @since 1.6
45 */
46 public RecipeRecognizer(IQueryRuntimeContext runtimeContext) {
47 this.runtimeContext = runtimeContext;
48 }
49 public RecipeRecognizer() {
50 this(null);
51 }
52
53 /**
54 * Recognizes when an equivalent canonical recipe is already known.
55 *
56 * @return an equivalent canonical recipe, or the null if no known equivalent found
57 */
58 public ReteNodeRecipe peekCanonicalRecipe(final ReteNodeRecipe recipe) {
59 // equivalence class already known
60 for (Long classID : recipe.getEquivalenceClassIDs()) {
61 ReteNodeRecipe knownRecipe = canonicalRecipeByEquivalenceClassID.get(classID);
62 if (knownRecipe != null)
63 return knownRecipe;
64 }
65
66 // equivalence class not known, but maybe equivalent recipe still
67 // available
68 Collection<ReteNodeRecipe> sameClassRecipes = getSameClassCanonicalRecipes(recipe);
69 for (ReteNodeRecipe knownRecipe : sameClassRecipes) {
70 if (isEquivalentRecipe(recipe, knownRecipe)) {
71 // FOUND EQUIVALENT RECIPE
72 recipe.getEquivalenceClassIDs().add(knownRecipe.getEquivalenceClassIDs().get(0));
73 return knownRecipe;
74 }
75 }
76
77 return null;
78 }
79
80 /**
81 * This recipe will be remembered as a canonical recipe. Method maintains both internal data structures and the
82 * equivalence class attribute of the recipe. PRECONDITION: {@link #peekCanonicalRecipe(ReteNodeRecipe)} must return
83 * null or the recipe itself
84 */
85 public void makeCanonical(final ReteNodeRecipe recipe) {
86 // this is a canonical recipe, chosen representative of its new
87 // equivalence class
88 if (recipe.getEquivalenceClassIDs().isEmpty()) {
89 recipe.getEquivalenceClassIDs().add(nextRecipeEquivalenceClassID++);
90 }
91 for (Long classID : recipe.getEquivalenceClassIDs()) {
92 canonicalRecipeByEquivalenceClassID.put(classID, recipe);
93 }
94 getSameClassCanonicalRecipes(recipe).add(recipe);
95 }
96
97 /**
98 * Ensures that there is an equivalent canonical recipe; if none is known yet, this recipe will be remembered as
99 * canonical.
100 *
101 * @return an equivalent canonical recipe; the argument recipe itself (which is made canonical) if no known
102 * equivalent found
103 */
104 public ReteNodeRecipe canonicalizeRecipe(final ReteNodeRecipe recipe) {
105 ReteNodeRecipe knownRecipe = peekCanonicalRecipe(recipe);
106 if (knownRecipe == null) {
107 knownRecipe = recipe;
108 makeCanonical(recipe);
109 }
110 return knownRecipe;
111 }
112
113 /**
114 * @return true iff recipe is a canonical recipe
115 */
116 public boolean isKnownCanonicalRecipe(final ReteNodeRecipe recipe) {
117 if (recipe.getEquivalenceClassIDs().isEmpty()) {
118 return false;
119 }
120 ReteNodeRecipe knownRecipe = canonicalRecipeByEquivalenceClassID.get(recipe.getEquivalenceClassIDs().get(0));
121 return recipe == knownRecipe;
122 }
123
124 private Set<ReteNodeRecipe> getSameClassCanonicalRecipes(final ReteNodeRecipe recipe) {
125 Set<ReteNodeRecipe> sameClassRecipes = canonicalRecipesByClass.get(recipe.eClass());
126 if (sameClassRecipes == null) {
127 sameClassRecipes = new HashSet<>();
128 canonicalRecipesByClass.put(recipe.eClass(), sameClassRecipes);
129 }
130 return sameClassRecipes;
131 }
132
133 private boolean isEquivalentRecipe(ReteNodeRecipe recipe, ReteNodeRecipe knownRecipe) {
134 return new EqualityHelper(runtimeContext).equals(recipe, knownRecipe);
135 }
136
137 // TODO reuse in more cases later, e.g. switching join node parents, etc.
138 private static class EqualityHelper extends EcoreUtil.EqualityHelper {
139
140
141
142
143 private static final long serialVersionUID = -8841971394686015188L;
144
145 private static final EAttribute RETE_NODE_RECIPE_EQUIVALENCE_CLASS_IDS =
146 RecipesPackage.eINSTANCE.getReteNodeRecipe_EquivalenceClassIDs();
147 private static final EAttribute CONSTANT_RECIPE_CONSTANT_VALUES =
148 RecipesPackage.eINSTANCE.getConstantRecipe_ConstantValues();
149 private static final EAttribute DISCRIMINATOR_BUCKET_RECIPE_BUCKET_KEY =
150 RecipesPackage.eINSTANCE.getDiscriminatorBucketRecipe_BucketKey();
151
152 private IQueryRuntimeContext runtimeContext;
153
154 public EqualityHelper(IQueryRuntimeContext runtimeContext) {
155 this.runtimeContext = runtimeContext;
156 }
157
158 @Override
159 protected boolean haveEqualFeature(EObject eObject1, EObject eObject2, EStructuralFeature feature) {
160 // ignore differences in this attribute, as it may only be assigned
161 // after the equivalence check
162 if (RETE_NODE_RECIPE_EQUIVALENCE_CLASS_IDS.equals(feature))
163 return true;
164
165 if (runtimeContext != null) {
166 // constant values
167 if (/*CONSTANT_RECIPE_CONSTANT_VALUES.equals(feature) ||*/ DISCRIMINATOR_BUCKET_RECIPE_BUCKET_KEY.equals(feature)) {
168 // use runtime context to map to canonical wrapped form
169 // this is costly for constant recipes (TODO improve this), but essential for discriminator buckets
170
171 Object val1 = eObject1.eGet(feature);
172 Object val2 = eObject2.eGet(feature);
173
174 if (val1 != null && val2 != null) {
175 return runtimeContext.wrapElement(val1).equals(runtimeContext.wrapElement(val2));
176 } else {
177 return val1 == null && val2 == null;
178 }
179
180 }
181 }
182
183 // fallback to general comparison
184 return super.haveEqualFeature(eObject1, eObject2, feature);
185 }
186
187 @Override
188 public boolean equals(EObject eObject1, EObject eObject2) {
189 // short-circuit if already known to be equivalent
190 if (eObject1 instanceof ReteNodeRecipe) {
191 if (eObject2 instanceof ReteNodeRecipe) {
192 EList<Long> eqClassIDs1 = ((ReteNodeRecipe) eObject1).getEquivalenceClassIDs();
193 EList<Long> eqClassIDs2 = ((ReteNodeRecipe) eObject2).getEquivalenceClassIDs();
194
195 if (!Collections.disjoint(eqClassIDs1, eqClassIDs2))
196 return true;
197 }
198 }
199
200 // fallback to general comparison
201 return super.equals(eObject1, eObject2);
202 }
203 }
204}
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipesHelper.java b/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipesHelper.java
new file mode 100644
index 00000000..3070fcf5
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/src/main/java/tools/refinery/viatra/runtime/rete/recipes/helper/RecipesHelper.java
@@ -0,0 +1,81 @@
1/**
2 * Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 */
9package tools.refinery.viatra.runtime.rete.recipes.helper;
10
11import org.eclipse.emf.common.util.EList;
12import tools.refinery.viatra.runtime.rete.recipes.*;
13
14import java.util.Collection;
15
16/**
17 * Static helper class for easy construction of recipes.
18 *
19 * @author Bergmann Gabor
20 */
21public class RecipesHelper {
22 private static final RecipesFactory FACTORY = RecipesFactory.eINSTANCE;
23
24 private RecipesHelper() {/* Utility class constructor */}
25
26 /**
27 * @since 2.0
28 */
29 public static Mask mask(final int sourceArity, final Collection<Integer> sourceIndices) {
30 Mask mask = RecipesHelper.FACTORY.createMask();
31 mask.setSourceArity(sourceArity);
32 mask.getSourceIndices().addAll(sourceIndices);
33 return mask;
34 }
35
36 public static Mask mask(final int sourceArity, final int... sourceIndices) {
37 Mask mask = RecipesHelper.FACTORY.createMask();
38 mask.setSourceArity(sourceArity);
39 final EList<Integer> maskIndeces = mask.getSourceIndices();
40 for (int index : sourceIndices) {
41 maskIndeces.add(index);
42 }
43 return mask;
44 }
45
46 public static ProjectionIndexerRecipe projectionIndexerRecipe(final ReteNodeRecipe parent, final Mask mask) {
47 ProjectionIndexerRecipe recipe = RecipesHelper.FACTORY.createProjectionIndexerRecipe();
48 recipe.setParent(parent);
49 recipe.setMask(mask);
50 return recipe;
51 }
52
53 public static ExpressionDefinition expressionDefinition(final Object evaluator) {
54 ExpressionDefinition definition = RecipesHelper.FACTORY.createExpressionDefinition();
55 definition.setEvaluator(evaluator);
56 return definition;
57 }
58
59 public static InputRecipe inputRecipe(final Object inputKey, final String inputKeyID, final int arity) {
60 InputRecipe recipe = RecipesHelper.FACTORY.createInputRecipe();
61 recipe.setInputKey(inputKey);
62 recipe.setKeyArity(arity);
63 recipe.setKeyID(inputKeyID);
64 recipe.setTraceInfo(inputKeyID);
65 return recipe;
66 }
67
68 /**
69 * Mask can be null in case no tuple reordering or trimming is needed
70 */
71 public static InputFilterRecipe inputFilterRecipe(final ReteNodeRecipe parent, final Object inputKey,
72 final String inputKeyID, final Mask mask) {
73 InputFilterRecipe it = RecipesHelper.FACTORY.createInputFilterRecipe();
74 it.setParent(parent);
75 it.setInputKey(inputKey);
76 it.setKeyID(inputKeyID);
77 it.setTraceInfo(inputKeyID);
78 it.setMask(mask);
79 return it;
80 }
81}
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore
new file mode 100644
index 00000000..4eda701e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore
@@ -0,0 +1,400 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="recipes" nsURI="https://refinery.tools/emf/2023/ViatraReteRecipes"
4 nsPrefix="recipes">
5 <eClassifiers xsi:type="ecore:EClass" name="ReteRecipe">
6 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
7 <details key="documentation" value="Container for Rete recipes."/>
8 </eAnnotations>
9 <eStructuralFeatures xsi:type="ecore:EReference" name="recipeNodes" upperBound="-1"
10 eType="#//ReteNodeRecipe" containment="true" resolveProxies="false"/>
11 </eClassifiers>
12 <eClassifiers xsi:type="ecore:EClass" name="ReteNodeRecipe" abstract="true">
13 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
14 <details key="documentation" value="Abstract base class for model elements that represent &quot;Rete node recipes&quot;,&#xD;&#xA;that is DTOs that carry information for Rete network construction.&#xD;&#xA;&#xD;&#xA;@noimplement"/>
15 </eAnnotations>
16 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
17 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
18 <details key="documentation" value=" The width of tuples contained by this node."/>
19 <details key="body" value="throw new &lt;%java.lang.UnsupportedOperationException%>();"/>
20 </eAnnotations>
21 </eOperations>
22 <eStructuralFeatures xsi:type="ecore:EAttribute" name="traceInfo" unique="false"
23 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
24 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
25 <details key="documentation" value="Temporary construct for storing traceability information."/>
26 </eAnnotations>
27 </eStructuralFeatures>
28 <eStructuralFeatures xsi:type="ecore:EAttribute" name="equivalenceClassIDs" upperBound="-1"
29 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong" transient="true">
30 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
31 <details key="documentation" value="If two recipes were found equivalent, a matching equivalence ID can be assigned to them by {@link RecipeRecognizer}. &#xD;&#xA;If two recipes share (at least one) equivalence ID, they are known to be equivalent.&#xD;&#xA;&#xD;&#xA;&lt;p>&#xD;&#xA;A difference in this attribute only does not preclude two recipe elements to be considered equal. &#xD;&#xA;If they are shown to be equivalent using deeper analysis, equivalence ids can be set so that the equivalence is recognized more easily the next time.&#xD;&#xA;&#xD;&#xA;@since 1.3"/>
32 </eAnnotations>
33 </eStructuralFeatures>
34 </eClassifiers>
35 <eClassifiers xsi:type="ecore:EClass" name="SingleParentNodeRecipe" abstract="true"
36 eSuperTypes="#//ReteNodeRecipe">
37 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
38 <details key="documentation" value="Abstract base class for single-parent node recipes."/>
39 </eAnnotations>
40 <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//ReteNodeRecipe"/>
41 </eClassifiers>
42 <eClassifiers xsi:type="ecore:EClass" name="AlphaRecipe" abstract="true" eSuperTypes="#//SingleParentNodeRecipe">
43 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
44 <details key="documentation" value="Abstract base class for alpha node recipes."/>
45 </eAnnotations>
46 </eClassifiers>
47 <eClassifiers xsi:type="ecore:EClass" name="MultiParentNodeRecipe" abstract="true"
48 eSuperTypes="#//ReteNodeRecipe">
49 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
50 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
51 <details key="body" value="&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%>> _parents = this.getParents();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _get = _parents.get(0);&#xA;return _get.getArity();"/>
52 </eAnnotations>
53 </eOperations>
54 <eStructuralFeatures xsi:type="ecore:EReference" name="parents" upperBound="-1"
55 eType="#//ReteNodeRecipe"/>
56 </eClassifiers>
57 <eClassifiers xsi:type="ecore:EClass" name="MonotonicityInfo">
58 <eStructuralFeatures xsi:type="ecore:EReference" name="coreMask" eType="#//Mask"
59 containment="true" resolveProxies="false"/>
60 <eStructuralFeatures xsi:type="ecore:EReference" name="posetMask" eType="#//Mask"
61 containment="true" resolveProxies="false"/>
62 <eStructuralFeatures xsi:type="ecore:EAttribute" name="posetComparator" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
63 </eClassifiers>
64 <eClassifiers xsi:type="ecore:EClass" name="UniquenessEnforcerRecipe" eSuperTypes="#//MultiParentNodeRecipe #//RederivableNodeRecipe">
65 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
66 <details key="documentation" value="Represents nodes that enforce tuple uniqueness, i.e. filter out&#xA;duplicate input tuples for output."/>
67 </eAnnotations>
68 </eClassifiers>
69 <eClassifiers xsi:type="ecore:EClass" name="ProductionRecipe" eSuperTypes="#//MultiParentNodeRecipe #//RederivableNodeRecipe">
70 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
71 <details key="documentation" value="The production node represents the output of the Rete network,&#xA;from which the results of a query can be read."/>
72 </eAnnotations>
73 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
74 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
75 <details key="body" value="return this.getMappedIndices().size();"/>
76 </eAnnotations>
77 </eOperations>
78 <eStructuralFeatures xsi:type="ecore:EReference" name="mappedIndices" upperBound="-1"
79 eType="#//StringIndexMapEntry" containment="true" resolveProxies="false">
80 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
81 <details key="documentation" value="String -> Index map.&#xA;Indicates the positions of parameters."/>
82 </eAnnotations>
83 </eStructuralFeatures>
84 <eStructuralFeatures xsi:type="ecore:EAttribute" name="pattern" unique="false"
85 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
86 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
87 <details key="documentation" value="Traceability link to defining pattern object (from EMFPatternLanguage)&#xA;TODO unused?"/>
88 </eAnnotations>
89 </eStructuralFeatures>
90 <eStructuralFeatures xsi:type="ecore:EAttribute" name="patternFQN" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
91 </eClassifiers>
92 <eClassifiers xsi:type="ecore:EClass" name="IndexerRecipe" abstract="true" eSuperTypes="#//SingleParentNodeRecipe">
93 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
94 <details key="documentation" value="Represents a node that indexes the contents of a parent based on a projection defined by a Mask."/>
95 </eAnnotations>
96 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
97 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
98 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();&#xA;return _mask.getSourceArity();"/>
99 </eAnnotations>
100 </eOperations>
101 <eStructuralFeatures xsi:type="ecore:EReference" name="mask" eType="#//Mask" containment="true"
102 resolveProxies="false"/>
103 </eClassifiers>
104 <eClassifiers xsi:type="ecore:EClass" name="ProjectionIndexerRecipe" eSuperTypes="#//IndexerRecipe">
105 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
106 <details key="documentation" value="Represents helper nodes that provide projection indexing for Beta nodes and user queries."/>
107 </eAnnotations>
108 </eClassifiers>
109 <eClassifiers xsi:type="ecore:EClass" name="AggregatorIndexerRecipe" eSuperTypes="#//IndexerRecipe">
110 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
111 <details key="documentation" value="Attached to an aggregator node, provides the aggregated values for outer join."/>
112 </eAnnotations>
113 </eClassifiers>
114 <eClassifiers xsi:type="ecore:EClass" name="BetaRecipe" abstract="true" eSuperTypes="#//ReteNodeRecipe">
115 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
116 <details key="documentation" value="Abstract base class for Beta node recipes."/>
117 </eAnnotations>
118 <eStructuralFeatures xsi:type="ecore:EReference" name="leftParent" eType="#//ProjectionIndexerRecipe"
119 containment="true" resolveProxies="false"/>
120 <eStructuralFeatures xsi:type="ecore:EReference" name="rightParent" eType="#//IndexerRecipe"
121 containment="true" resolveProxies="false">
122 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
123 <details key="documentation" value=" can be an AggregatorIndexer"/>
124 </eAnnotations>
125 </eStructuralFeatures>
126 </eClassifiers>
127 <eClassifiers xsi:type="ecore:EClass" name="Mask">
128 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
129 <details key="documentation" value="A mask defines the set of tuple variables that need to be taken into consideration for operations."/>
130 </eAnnotations>
131 <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceIndices" unique="false"
132 upperBound="-1" eType="#//Index">
133 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
134 <details key="documentation" value="The indices that are relevant for tuple operations."/>
135 </eAnnotations>
136 </eStructuralFeatures>
137 <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceArity" unique="false"
138 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
139 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
140 <details key="documentation" value="The arity of tuples."/>
141 </eAnnotations>
142 </eStructuralFeatures>
143 </eClassifiers>
144 <eClassifiers xsi:type="ecore:EDataType" name="Index" instanceClassName="java.lang.Integer">
145 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
146 <details key="documentation" value="Indexes tell which variable of tuples are relevant for a given operation.&#xA;TODO: is this necessary at all?"/>
147 </eAnnotations>
148 </eClassifiers>
149 <eClassifiers xsi:type="ecore:EClass" name="StringIndexMapEntry" instanceClassName="java.util.Map$Entry">
150 <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
151 <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" eType="#//Index"/>
152 </eClassifiers>
153 <eClassifiers xsi:type="ecore:EClass" name="InputRecipe" eSuperTypes="#//ReteNodeRecipe">
154 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
155 <details key="documentation" value="Represents input nodes for the Rete network, i.e. nodes&#xA;that generate input tuples for processing."/>
156 </eAnnotations>
157 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
158 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
159 <details key="body" value="return getKeyArity();"/>
160 </eAnnotations>
161 </eOperations>
162 <eStructuralFeatures xsi:type="ecore:EAttribute" name="inputKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"
163 transient="true"/>
164 <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyID" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
165 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
166 <details key="documentation" value="Temporary construct for identifying types over the wire.&#xA;TODO improve type references"/>
167 </eAnnotations>
168 </eStructuralFeatures>
169 <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyArity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
170 </eClassifiers>
171 <eClassifiers xsi:type="ecore:EClass" name="ConstantRecipe" eSuperTypes="#//ReteNodeRecipe">
172 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
173 <details key="documentation" value="Simple node that stores constant values."/>
174 </eAnnotations>
175 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
176 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
177 <details key="body" value="return this.getConstantValues().size();"/>
178 </eAnnotations>
179 </eOperations>
180 <eStructuralFeatures xsi:type="ecore:EAttribute" name="constantValues" unique="false"
181 upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
182 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
183 <details key="documentation" value="Stores constant values. May be empty.&#xA;&#xA;TODO store constants as strings instead? (for easier serialization)"/>
184 </eAnnotations>
185 </eStructuralFeatures>
186 </eClassifiers>
187 <eClassifiers xsi:type="ecore:EClass" name="TransitiveClosureRecipe" eSuperTypes="#//AlphaRecipe">
188 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
189 <details key="documentation" value="Represents transitive closure."/>
190 </eAnnotations>
191 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
192 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
193 <details key="body" value="return 2;"/>
194 </eAnnotations>
195 </eOperations>
196 </eClassifiers>
197 <eClassifiers xsi:type="ecore:EClass" name="FilterRecipe" abstract="true" eSuperTypes="#//AlphaRecipe">
198 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
199 <details key="documentation" value="Abstract base class for nodes that implement filtering operations."/>
200 </eAnnotations>
201 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
202 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
203 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
204 </eAnnotations>
205 </eOperations>
206 </eClassifiers>
207 <eClassifiers xsi:type="ecore:EClass" name="InequalityFilterRecipe" eSuperTypes="#//FilterRecipe">
208 <eStructuralFeatures xsi:type="ecore:EAttribute" name="subject" unique="false"
209 eType="#//Index"/>
210 <eStructuralFeatures xsi:type="ecore:EAttribute" name="inequals" unique="false"
211 upperBound="-1" eType="#//Index"/>
212 </eClassifiers>
213 <eClassifiers xsi:type="ecore:EClass" name="EqualityFilterRecipe" eSuperTypes="#//FilterRecipe">
214 <eStructuralFeatures xsi:type="ecore:EAttribute" name="indices" unique="false"
215 upperBound="-1" eType="#//Index"/>
216 </eClassifiers>
217 <eClassifiers xsi:type="ecore:EClass" name="TransparentRecipe" eSuperTypes="#//FilterRecipe"/>
218 <eClassifiers xsi:type="ecore:EClass" name="TrimmerRecipe" eSuperTypes="#//AlphaRecipe">
219 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
220 <details key="documentation" value="Implements projection without uniqueness checking."/>
221 </eAnnotations>
222 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
223 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
224 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();&#xA;&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();&#xA;return _sourceIndices.size();"/>
225 </eAnnotations>
226 </eOperations>
227 <eStructuralFeatures xsi:type="ecore:EReference" name="mask" eType="#//Mask" containment="true"
228 resolveProxies="false"/>
229 </eClassifiers>
230 <eClassifiers xsi:type="ecore:EClass" name="ExpressionDefinition">
231 <eStructuralFeatures xsi:type="ecore:EAttribute" name="evaluator" unique="false"
232 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
233 </eClassifiers>
234 <eClassifiers xsi:type="ecore:EClass" name="ExpressionEnforcerRecipe" abstract="true"
235 eSuperTypes="#//AlphaRecipe">
236 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
237 <details key="documentation" value="type RuntimeExpressionEvaluator wraps tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator&#xA;class RuntimeExpressionDefinition extends ExpressionDefinition {&#xA;&#x9;RuntimeExpressionEvaluator evaluator&#xA;}"/>
238 </eAnnotations>
239 <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="#//ExpressionDefinition"
240 containment="true" resolveProxies="false">
241 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
242 <details key="documentation" value="Provides traceability to expression representation."/>
243 </eAnnotations>
244 </eStructuralFeatures>
245 <eStructuralFeatures xsi:type="ecore:EReference" name="mappedIndices" upperBound="-1"
246 eType="#//StringIndexMapEntry" containment="true" resolveProxies="false">
247 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
248 <details key="documentation" value="String -> Index map.&#xA;Maps variable names in the expression to tuple indices."/>
249 </eAnnotations>
250 </eStructuralFeatures>
251 <eStructuralFeatures xsi:type="ecore:EAttribute" name="cacheOutput" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
252 </eClassifiers>
253 <eClassifiers xsi:type="ecore:EClass" name="CheckRecipe" eSuperTypes="#//ExpressionEnforcerRecipe">
254 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
255 <details key="documentation" value="Computes the result of the boolean expression evaluation and&#xA;only passes tuples for which the result is true."/>
256 </eAnnotations>
257 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
258 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
259 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
260 </eAnnotations>
261 </eOperations>
262 </eClassifiers>
263 <eClassifiers xsi:type="ecore:EClass" name="EvalRecipe" eSuperTypes="#//ExpressionEnforcerRecipe">
264 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
265 <details key="documentation" value="Computes the result of expression evaluation and suffixes the result&#xA;to output tuples as the last element."/>
266 </eAnnotations>
267 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
268 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
269 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;int _arity = _parent.getArity();&#xA;return (1 + _arity);"/>
270 </eAnnotations>
271 </eOperations>
272 <eStructuralFeatures xsi:type="ecore:EAttribute" name="unwinding" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
273 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
274 <details key="documentation" value="@since 2.4"/>
275 </eAnnotations>
276 </eStructuralFeatures>
277 </eClassifiers>
278 <eClassifiers xsi:type="ecore:EClass" name="IndexerBasedAggregatorRecipe" abstract="true"
279 eSuperTypes="#//ReteNodeRecipe">
280 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
281 <details key="documentation" value="Represents a (compound) node that performs an aggregation operation.&#xA;Parent must be a ProjectionIndexer, which defines how tuples are to be aggregated.&#xA;Usable only through an Join with an AggregatorIndexer as the right parent"/>
282 </eAnnotations>
283 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
284 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
285 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _parent = this.getParent();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _parent.getMask();&#xA;&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();&#xA;int _size = _sourceIndices.size();&#xA;return (1 + _size);"/>
286 </eAnnotations>
287 </eOperations>
288 <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//ProjectionIndexerRecipe"
289 containment="true" resolveProxies="false"/>
290 </eClassifiers>
291 <eClassifiers xsi:type="ecore:EClass" name="CountAggregatorRecipe" eSuperTypes="#//IndexerBasedAggregatorRecipe">
292 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
293 <details key="documentation" value="The count aggregator node represents a &quot;count find&quot; operation."/>
294 </eAnnotations>
295 </eClassifiers>
296 <eClassifiers xsi:type="ecore:EClass" name="JoinRecipe" eSuperTypes="#//BetaRecipe">
297 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
298 <details key="documentation" value="The most basic beta operation, the join node performs a join operation over two input tuple sets."/>
299 </eAnnotations>
300 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
301 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
302 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();&#xA;int _arity = _leftParent.getArity();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent = this.getRightParent();&#xA;int _arity_1 = _rightParent.getArity();&#xA;int _plus = (_arity + _arity_1);&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent_1 = this.getRightParent();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _rightParent_1.getMask();&#xA;&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();&#xA;int _size = _sourceIndices.size();&#xA;return (_plus - _size);"/>
303 </eAnnotations>
304 </eOperations>
305 <eStructuralFeatures xsi:type="ecore:EReference" name="rightParentComplementaryMask"
306 eType="#//Mask" containment="true" resolveProxies="false"/>
307 </eClassifiers>
308 <eClassifiers xsi:type="ecore:EClass" name="ExistenceJoinRecipe" abstract="true"
309 eSuperTypes="#//BetaRecipe">
310 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
311 <details key="documentation" value="Existence joins are TODO&#xA;&#xA;See http://en.wikipedia.org/wiki/Relational_algebra"/>
312 </eAnnotations>
313 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
314 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
315 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();&#xA;return _leftParent.getArity();"/>
316 </eAnnotations>
317 </eOperations>
318 </eClassifiers>
319 <eClassifiers xsi:type="ecore:EClass" name="SemiJoinRecipe" eSuperTypes="#//ExistenceJoinRecipe">
320 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
321 <details key="documentation" value="A semi-join is TODO&#xA;&#xA;See http://en.wikipedia.org/wiki/Relational_algebra"/>
322 </eAnnotations>
323 </eClassifiers>
324 <eClassifiers xsi:type="ecore:EClass" name="AntiJoinRecipe" eSuperTypes="#//ExistenceJoinRecipe">
325 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
326 <details key="documentation" value="An anti-join is TODO&#xA;&#xA;See http://en.wikipedia.org/wiki/Relational_algebra"/>
327 </eAnnotations>
328 </eClassifiers>
329 <eClassifiers xsi:type="ecore:EClass" name="InputFilterRecipe" eSuperTypes="#//FilterRecipe">
330 <eStructuralFeatures xsi:type="ecore:EAttribute" name="inputKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"
331 transient="true"/>
332 <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyID" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
333 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
334 <details key="documentation" value="Temporary construct for identifying types over the wire.&#xA;TODO improve type references"/>
335 </eAnnotations>
336 </eStructuralFeatures>
337 <eStructuralFeatures xsi:type="ecore:EReference" name="mask" eType="#//Mask" containment="true"
338 resolveProxies="false"/>
339 </eClassifiers>
340 <eClassifiers xsi:type="ecore:EClass" name="SingleColumnAggregatorRecipe" eSuperTypes="#//AlphaRecipe #//RederivableNodeRecipe">
341 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
342 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
343 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.MonotonicityInfo%> info = getOptionalMonotonicityInfo();&#xA;if (info == null) {&#xA;&#x9;return 1 + getGroupByMask().getSourceIndices().size();&#xA;} else {&#x9;&#xA;&#x9;return info.getCoreMask().getSourceIndices().size() + info.getPosetMask().getSourceIndices().size();&#xA;}"/>
344 </eAnnotations>
345 </eOperations>
346 <eStructuralFeatures xsi:type="ecore:EAttribute" name="multisetAggregationOperator"
347 eType="#//AggregationOperator"/>
348 <eStructuralFeatures xsi:type="ecore:EAttribute" name="aggregableIndex" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
349 <eStructuralFeatures xsi:type="ecore:EReference" name="groupByMask" lowerBound="1"
350 eType="#//Mask" containment="true"/>
351 </eClassifiers>
352 <eClassifiers xsi:type="ecore:EDataType" name="AggregationOperator" instanceTypeName="tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator&lt;?, ?, ?>"/>
353 <eClassifiers xsi:type="ecore:EClass" name="DiscriminatorDispatcherRecipe" eSuperTypes="#//SingleParentNodeRecipe">
354 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
355 <details key="documentation" value="Node that sends tuples off to different buckets (attached as children) based on the value of a given column."/>
356 </eAnnotations>
357 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
358 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
359 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
360 </eAnnotations>
361 </eOperations>
362 <eStructuralFeatures xsi:type="ecore:EAttribute" name="discriminationColumnIndex"
363 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
364 </eClassifiers>
365 <eClassifiers xsi:type="ecore:EClass" name="DiscriminatorBucketRecipe" eSuperTypes="#//SingleParentNodeRecipe">
366 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
367 <details key="documentation" value="A bucket holds a filtered set of tuples of its parent DiscriminatorDispatcher; exactly those that have the given bucket key at their discrimination column."/>
368 </eAnnotations>
369 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
370 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
371 <details key="body" value="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
372 </eAnnotations>
373 </eOperations>
374 <eStructuralFeatures xsi:type="ecore:EAttribute" name="bucketKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
375 </eClassifiers>
376 <eClassifiers xsi:type="ecore:EClass" name="RederivableNodeRecipe" abstract="true">
377 <eStructuralFeatures xsi:type="ecore:EAttribute" name="deleteRederiveEvaluation"
378 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
379 <eStructuralFeatures xsi:type="ecore:EReference" name="optionalMonotonicityInfo"
380 eType="#//MonotonicityInfo" containment="true"/>
381 </eClassifiers>
382 <eClassifiers xsi:type="ecore:EClass" name="RelationEvaluationRecipe" eSuperTypes="#//MultiParentNodeRecipe">
383 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
384 <details key="documentation" value="@since 2.8"/>
385 </eAnnotations>
386 <eStructuralFeatures xsi:type="ecore:EReference" name="evaluator" eType="#//ExpressionDefinition"/>
387 </eClassifiers>
388 <eClassifiers xsi:type="ecore:EClass" name="RepresentativeElectionRecipe" eSuperTypes="#//AlphaRecipe">
389 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
390 <details key="documentation" value="Represents represenative election."/>
391 </eAnnotations>
392 <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
393 <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
394 <details key="body" value="return 2;"/>
395 </eAnnotations>
396 </eOperations>
397 <eStructuralFeatures xsi:type="ecore:EAttribute" name="connectivity" eType="#//Connectivity"/>
398 </eClassifiers>
399 <eClassifiers xsi:type="ecore:EDataType" name="Connectivity" instanceClassName="tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.Connectivity"/>
400</ecore:EPackage>
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore.license b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore.license
new file mode 100644
index 00000000..03d1d42b
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore.license
@@ -0,0 +1,4 @@
1Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
2Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
3
4SPDX-License-Identifier: EPL-2.0
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel
new file mode 100644
index 00000000..6b44fde6
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel
@@ -0,0 +1,171 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
3 xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro&#xA;Copyright (c) 2023 The Refinery Authors &lt;https://refinery.tools>&#xA;This program and the accompanying materials are made available under the&#xA;terms of the Eclipse Public License v. 2.0 which is available at&#xA;http://www.eclipse.org/legal/epl-v20.html.&#xA;&#xA;SPDX-License-Identifier: EPL-2.0"
4 modelDirectory="/tools.refinery.refinery-viatra-runtime-rete-recipes/src/main/emf-gen"
5 modelPluginID="viatra-runtime-rete-recipes" runtimeJar="true" forceOverwrite="true"
6 modelName="Rete-recipes" updateClasspath="false" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
7 testsDirectory="" importerID="org.eclipse.emf.importer.ecore" containmentProxies="true"
8 complianceLevel="7.0" language="en" operationReflection="true">
9 <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter">
10 <genAnnotations source="selectedPackages">
11 <details key="http://www.eclipse.org/emf/2002/Ecore" value="Ecore.xsd"/>
12 </genAnnotations>
13 <details key="directoryURI" value="."/>
14 </genAnnotations>
15 <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter.xmi">
16 <genAnnotations source="selectedPackages">
17 <details key="http://www.eclipse.org/emf/2002/Ecore" value="EcoreXMI.xsd"/>
18 </genAnnotations>
19 <details key="directoryURI" value="."/>
20 </genAnnotations>
21 <foreignModel>recipes.ecore</foreignModel>
22 <modelPluginVariables>org.eclipse.xtext.xbase.lib</modelPluginVariables>
23 <modelPluginVariables>org.eclipse.emf.ecore.xcore.lib</modelPluginVariables>
24 <genPackages prefix="Recipes" basePackage="tools.refinery.viatra.runtime.rete" disposableProviderFactory="true"
25 ecorePackage="recipes.ecore#/">
26 <genDataTypes ecoreDataType="recipes.ecore#//Index"/>
27 <genDataTypes ecoreDataType="recipes.ecore#//AggregationOperator"/>
28 <genDataTypes ecoreDataType="recipes.ecore#//Connectivity"/>
29 <genClasses ecoreClass="recipes.ecore#//ReteRecipe">
30 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ReteRecipe/recipeNodes"/>
31 </genClasses>
32 <genClasses image="false" ecoreClass="recipes.ecore#//ReteNodeRecipe">
33 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/traceInfo"/>
34 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/equivalenceClassIDs"/>
35 <genOperations ecoreOperation="recipes.ecore#//ReteNodeRecipe/getArity" body="throw new &lt;%java.lang.UnsupportedOperationException%>();"/>
36 </genClasses>
37 <genClasses image="false" ecoreClass="recipes.ecore#//SingleParentNodeRecipe">
38 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference recipes.ecore#//SingleParentNodeRecipe/parent"/>
39 </genClasses>
40 <genClasses image="false" ecoreClass="recipes.ecore#//AlphaRecipe"/>
41 <genClasses image="false" ecoreClass="recipes.ecore#//MultiParentNodeRecipe">
42 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference recipes.ecore#//MultiParentNodeRecipe/parents"/>
43 <genOperations ecoreOperation="recipes.ecore#//MultiParentNodeRecipe/getArity"
44 body="&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%>> _parents = this.getParents();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _get = _parents.get(0);&#xA;return _get.getArity();"/>
45 </genClasses>
46 <genClasses ecoreClass="recipes.ecore#//MonotonicityInfo">
47 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//MonotonicityInfo/coreMask"/>
48 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//MonotonicityInfo/posetMask"/>
49 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//MonotonicityInfo/posetComparator"/>
50 </genClasses>
51 <genClasses ecoreClass="recipes.ecore#//UniquenessEnforcerRecipe"/>
52 <genClasses ecoreClass="recipes.ecore#//ProductionRecipe">
53 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ProductionRecipe/mappedIndices"/>
54 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ProductionRecipe/pattern"/>
55 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ProductionRecipe/patternFQN"/>
56 <genOperations ecoreOperation="recipes.ecore#//ProductionRecipe/getArity" body="return this.getMappedIndices().size();"/>
57 </genClasses>
58 <genClasses image="false" ecoreClass="recipes.ecore#//IndexerRecipe">
59 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//IndexerRecipe/mask"/>
60 <genOperations ecoreOperation="recipes.ecore#//IndexerRecipe/getArity" body="&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();&#xA;return _mask.getSourceArity();"/>
61 </genClasses>
62 <genClasses ecoreClass="recipes.ecore#//ProjectionIndexerRecipe"/>
63 <genClasses ecoreClass="recipes.ecore#//AggregatorIndexerRecipe"/>
64 <genClasses image="false" ecoreClass="recipes.ecore#//BetaRecipe">
65 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//BetaRecipe/leftParent"/>
66 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//BetaRecipe/rightParent"/>
67 </genClasses>
68 <genClasses ecoreClass="recipes.ecore#//Mask">
69 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//Mask/sourceIndices"/>
70 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//Mask/sourceArity"/>
71 </genClasses>
72 <genClasses ecoreClass="recipes.ecore#//StringIndexMapEntry">
73 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//StringIndexMapEntry/key"/>
74 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//StringIndexMapEntry/value"/>
75 </genClasses>
76 <genClasses ecoreClass="recipes.ecore#//InputRecipe">
77 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputRecipe/inputKey"/>
78 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputRecipe/keyID"/>
79 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputRecipe/keyArity"/>
80 <genOperations ecoreOperation="recipes.ecore#//InputRecipe/getArity" body="return getKeyArity();"/>
81 </genClasses>
82 <genClasses ecoreClass="recipes.ecore#//ConstantRecipe">
83 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ConstantRecipe/constantValues"/>
84 <genOperations ecoreOperation="recipes.ecore#//ConstantRecipe/getArity" body="return this.getConstantValues().size();"/>
85 </genClasses>
86 <genClasses ecoreClass="recipes.ecore#//TransitiveClosureRecipe">
87 <genOperations ecoreOperation="recipes.ecore#//TransitiveClosureRecipe/getArity"
88 body="return 2;"/>
89 </genClasses>
90 <genClasses image="false" ecoreClass="recipes.ecore#//FilterRecipe">
91 <genOperations ecoreOperation="recipes.ecore#//FilterRecipe/getArity" body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
92 </genClasses>
93 <genClasses ecoreClass="recipes.ecore#//InequalityFilterRecipe">
94 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InequalityFilterRecipe/subject"/>
95 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InequalityFilterRecipe/inequals"/>
96 </genClasses>
97 <genClasses ecoreClass="recipes.ecore#//EqualityFilterRecipe">
98 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//EqualityFilterRecipe/indices"/>
99 </genClasses>
100 <genClasses ecoreClass="recipes.ecore#//TransparentRecipe"/>
101 <genClasses ecoreClass="recipes.ecore#//TrimmerRecipe">
102 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//TrimmerRecipe/mask"/>
103 <genOperations ecoreOperation="recipes.ecore#//TrimmerRecipe/getArity" body="&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();&#xA;&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();&#xA;return _sourceIndices.size();"/>
104 </genClasses>
105 <genClasses ecoreClass="recipes.ecore#//ExpressionDefinition">
106 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ExpressionDefinition/evaluator"/>
107 </genClasses>
108 <genClasses image="false" ecoreClass="recipes.ecore#//ExpressionEnforcerRecipe">
109 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ExpressionEnforcerRecipe/expression"/>
110 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ExpressionEnforcerRecipe/mappedIndices"/>
111 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ExpressionEnforcerRecipe/cacheOutput"/>
112 </genClasses>
113 <genClasses ecoreClass="recipes.ecore#//CheckRecipe">
114 <genOperations ecoreOperation="recipes.ecore#//CheckRecipe/getArity" body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
115 </genClasses>
116 <genClasses ecoreClass="recipes.ecore#//EvalRecipe">
117 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//EvalRecipe/unwinding"/>
118 <genOperations ecoreOperation="recipes.ecore#//EvalRecipe/getArity" body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;int _arity = _parent.getArity();&#xA;return (1 + _arity);"/>
119 </genClasses>
120 <genClasses image="false" ecoreClass="recipes.ecore#//IndexerBasedAggregatorRecipe">
121 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//IndexerBasedAggregatorRecipe/parent"/>
122 <genOperations ecoreOperation="recipes.ecore#//IndexerBasedAggregatorRecipe/getArity"
123 body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _parent = this.getParent();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _parent.getMask();&#xA;&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();&#xA;int _size = _sourceIndices.size();&#xA;return (1 + _size);"/>
124 </genClasses>
125 <genClasses ecoreClass="recipes.ecore#//CountAggregatorRecipe"/>
126 <genClasses ecoreClass="recipes.ecore#//JoinRecipe">
127 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//JoinRecipe/rightParentComplementaryMask"/>
128 <genOperations ecoreOperation="recipes.ecore#//JoinRecipe/getArity" body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();&#xA;int _arity = _leftParent.getArity();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent = this.getRightParent();&#xA;int _arity_1 = _rightParent.getArity();&#xA;int _plus = (_arity + _arity_1);&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent_1 = this.getRightParent();&#xA;&lt;%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _rightParent_1.getMask();&#xA;&lt;%org.eclipse.emf.common.util.EList%>&lt;&lt;%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();&#xA;int _size = _sourceIndices.size();&#xA;return (_plus - _size);"/>
129 </genClasses>
130 <genClasses image="false" ecoreClass="recipes.ecore#//ExistenceJoinRecipe">
131 <genOperations ecoreOperation="recipes.ecore#//ExistenceJoinRecipe/getArity"
132 body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();&#xA;return _leftParent.getArity();"/>
133 </genClasses>
134 <genClasses ecoreClass="recipes.ecore#//SemiJoinRecipe"/>
135 <genClasses ecoreClass="recipes.ecore#//AntiJoinRecipe"/>
136 <genClasses ecoreClass="recipes.ecore#//InputFilterRecipe">
137 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputFilterRecipe/inputKey"/>
138 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputFilterRecipe/keyID"/>
139 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//InputFilterRecipe/mask"/>
140 </genClasses>
141 <genClasses ecoreClass="recipes.ecore#//SingleColumnAggregatorRecipe">
142 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//SingleColumnAggregatorRecipe/multisetAggregationOperator"/>
143 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//SingleColumnAggregatorRecipe/aggregableIndex"/>
144 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//SingleColumnAggregatorRecipe/groupByMask"/>
145 <genOperations ecoreOperation="recipes.ecore#//SingleColumnAggregatorRecipe/getArity"
146 body="&lt;%tools.refinery.viatra.runtime.rete.recipes.MonotonicityInfo%> info = getOptionalMonotonicityInfo();&#xA;if (info == null) {&#xA;&#x9;return 1 + getGroupByMask().getSourceIndices().size();&#xA;} else {&#x9;&#xA;&#x9;return info.getCoreMask().getSourceIndices().size() + info.getPosetMask().getSourceIndices().size();&#xA;}"/>
147 </genClasses>
148 <genClasses ecoreClass="recipes.ecore#//DiscriminatorDispatcherRecipe">
149 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//DiscriminatorDispatcherRecipe/discriminationColumnIndex"/>
150 <genOperations ecoreOperation="recipes.ecore#//DiscriminatorDispatcherRecipe/getArity"
151 body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
152 </genClasses>
153 <genClasses ecoreClass="recipes.ecore#//DiscriminatorBucketRecipe">
154 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//DiscriminatorBucketRecipe/bucketKey"/>
155 <genOperations ecoreOperation="recipes.ecore#//DiscriminatorBucketRecipe/getArity"
156 body="&lt;%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();&#xA;return _parent.getArity();"/>
157 </genClasses>
158 <genClasses image="false" ecoreClass="recipes.ecore#//RederivableNodeRecipe">
159 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//RederivableNodeRecipe/deleteRederiveEvaluation"/>
160 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//RederivableNodeRecipe/optionalMonotonicityInfo"/>
161 </genClasses>
162 <genClasses ecoreClass="recipes.ecore#//RelationEvaluationRecipe">
163 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference recipes.ecore#//RelationEvaluationRecipe/evaluator"/>
164 </genClasses>
165 <genClasses ecoreClass="recipes.ecore#//RepresentativeElectionRecipe">
166 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//RepresentativeElectionRecipe/connectivity"/>
167 <genOperations ecoreOperation="recipes.ecore#//RepresentativeElectionRecipe/getArity"
168 body="return 2;"/>
169 </genClasses>
170 </genPackages>
171</genmodel:GenModel>
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license
new file mode 100644
index 00000000..03d1d42b
--- /dev/null
+++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license
@@ -0,0 +1,4 @@
1Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
2Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
3
4SPDX-License-Identifier: EPL-2.0
diff --git a/subprojects/viatra-runtime-rete/about.html b/subprojects/viatra-runtime-rete/about.html
new file mode 100644
index 00000000..d1d5593a
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/about.html
@@ -0,0 +1,26 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3<!--
4 Copyright (c) 2017, Eclipse.org Foundation, Inc.
5
6 SPDX-License-Identifier: LicenseRef-EPL-Steward
7-->
8<head>
9<title>About</title>
10<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
11</head>
12<body lang="EN-US">
13<h2>About This Content</h2>
14
15<p>March 18, 2019</p>
16<h3>License</h3>
17
18<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
19Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/org/documents/epl-v20.php">http://www.eclipse.org/legal/epl-v20.html</a>.
20For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
21
22<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
23apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
24indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
25</body>
26</html>
diff --git a/subprojects/viatra-runtime-rete/build.gradle.kts b/subprojects/viatra-runtime-rete/build.gradle.kts
new file mode 100644
index 00000000..7e795a90
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/build.gradle.kts
@@ -0,0 +1,15 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7plugins {
8 id("tools.refinery.gradle.java-library")
9}
10
11dependencies {
12 implementation(project(":refinery-viatra-runtime"))
13 implementation(project(":refinery-viatra-runtime-rete-recipes"))
14 implementation(libs.slf4j.log4j)
15}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/AbstractColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/AbstractColumnAggregatorNode.java
new file mode 100644
index 00000000..2588bde1
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/AbstractColumnAggregatorNode.java
@@ -0,0 +1,474 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Map;
14import java.util.Map.Entry;
15import java.util.Objects;
16
17import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
18import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
20import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
21import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
22import tools.refinery.viatra.runtime.matchers.util.Clearable;
23import tools.refinery.viatra.runtime.matchers.util.Direction;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
25import tools.refinery.viatra.runtime.rete.index.Indexer;
26import tools.refinery.viatra.runtime.rete.index.StandardIndexer;
27import tools.refinery.viatra.runtime.rete.network.Node;
28import tools.refinery.viatra.runtime.rete.network.Receiver;
29import tools.refinery.viatra.runtime.rete.network.ReteContainer;
30import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
31import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
32import tools.refinery.viatra.runtime.rete.single.SingleInputNode;
33
34/**
35 * Groups incoming tuples by the given mask, and aggregates values at a specific index in each group.
36 * <p>
37 * Direct children are not supported, use via outer join indexers instead.
38 * <p>
39 * There are both timeless and timely implementations.
40 *
41 * @author Tamas Szabo
42 * @since 2.2
43 *
44 */
45public abstract class AbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult> extends SingleInputNode
46 implements Clearable, IAggregatorNode {
47
48 /**
49 * @since 1.6
50 */
51 protected final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator;
52
53 /**
54 * @since 1.6
55 */
56 protected final TupleMask groupMask;
57
58 /**
59 * @since 1.6
60 */
61 protected final TupleMask columnMask;
62
63 /**
64 * @since 1.6
65 */
66 protected final int sourceWidth;
67
68 /**
69 * @since 1.6
70 */
71 protected final IQueryRuntimeContext runtimeContext;
72
73 protected final AggregateResult NEUTRAL;
74
75 protected AggregatorOuterIndexer aggregatorOuterIndexer;
76
77 @SuppressWarnings("rawtypes")
78 protected AbstractColumnAggregatorNode.AggregatorOuterIdentityIndexer[] aggregatorOuterIdentityIndexers;
79
80 /**
81 * Creates a new column aggregator node.
82 *
83 * @param reteContainer
84 * the RETE container of the node
85 * @param operator
86 * the aggregation operator
87 * @param deleteRederiveEvaluation
88 * true if the node should run in DRED mode, false otherwise
89 * @param groupMask
90 * the mask that masks a tuple to obtain the key that we are grouping-by
91 * @param columnMask
92 * the mask that masks a tuple to obtain the tuple element(s) that we are aggregating over
93 * @param posetComparator
94 * the poset comparator for the column, if known, otherwise it can be null
95 * @since 1.6
96 */
97 public AbstractColumnAggregatorNode(final ReteContainer reteContainer,
98 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
99 final TupleMask groupMask, final TupleMask columnMask) {
100 super(reteContainer);
101 this.operator = operator;
102 this.groupMask = groupMask;
103 this.columnMask = columnMask;
104 this.sourceWidth = groupMask.indices.length;
105 this.runtimeContext = reteContainer.getNetwork().getEngine().getRuntimeContext();
106 this.NEUTRAL = operator.getAggregate(operator.createNeutral());
107 reteContainer.registerClearable(this);
108 }
109
110 /**
111 * Creates a new column aggregator node.
112 *
113 * @param reteContainer
114 * the RETE container of the node
115 * @param operator
116 * the aggregation operator
117 * @param groupMask
118 * the mask that masks a tuple to obtain the key that we are grouping-by
119 * @param aggregatedColumn
120 * the index of the column that the aggregator node is aggregating over
121 */
122 public AbstractColumnAggregatorNode(final ReteContainer reteContainer,
123 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
124 final TupleMask groupMask, final int aggregatedColumn) {
125 this(reteContainer, operator, groupMask, TupleMask.selectSingle(aggregatedColumn, groupMask.sourceWidth));
126 }
127
128 @Override
129 public CommunicationTracker getCommunicationTracker() {
130 return this.reteContainer.getCommunicationTracker();
131 }
132
133 @Override
134 public void pullInto(Collection<Tuple> collector, boolean flush) {
135 // DIRECT CHILDREN NOT SUPPORTED
136 throw new UnsupportedOperationException();
137 }
138
139 @Override
140 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
141 // DIRECT CHILDREN NOT SUPPORTED
142 throw new UnsupportedOperationException();
143 }
144
145 @Override
146 public void appendChild(Receiver receiver) {
147 // DIRECT CHILDREN NOT SUPPORTED
148 throw new UnsupportedOperationException();
149 }
150
151 @Override
152 public Indexer getAggregatorOuterIndexer() {
153 if (aggregatorOuterIndexer == null) {
154 aggregatorOuterIndexer = new AggregatorOuterIndexer();
155 this.getCommunicationTracker().registerDependency(this, aggregatorOuterIndexer);
156 }
157 return aggregatorOuterIndexer;
158 }
159
160 @Override
161 public Indexer getAggregatorOuterIdentityIndexer(final int resultPositionInSignature) {
162 if (aggregatorOuterIdentityIndexers == null) {
163 aggregatorOuterIdentityIndexers = new AbstractColumnAggregatorNode.AggregatorOuterIdentityIndexer[sourceWidth
164 + 1];
165 }
166 if (aggregatorOuterIdentityIndexers[resultPositionInSignature] == null) {
167 aggregatorOuterIdentityIndexers[resultPositionInSignature] = new AggregatorOuterIdentityIndexer(
168 resultPositionInSignature);
169 this.getCommunicationTracker().registerDependency(this,
170 aggregatorOuterIdentityIndexers[resultPositionInSignature]);
171 }
172 return aggregatorOuterIdentityIndexers[resultPositionInSignature];
173 }
174
175 /**
176 * @since 2.4
177 */
178 public void propagateAggregateResultUpdate(final Tuple group, final AggregateResult oldValue,
179 final AggregateResult newValue, final Timestamp timestamp) {
180 if (!Objects.equals(oldValue, newValue)) {
181 propagate(Direction.DELETE, group, oldValue, timestamp);
182 propagate(Direction.INSERT, group, newValue, timestamp);
183 }
184 }
185
186 /**
187 * @since 2.4
188 */
189 @SuppressWarnings("unchecked")
190 public void propagate(final Direction direction, final Tuple group, final AggregateResult value,
191 final Timestamp timestamp) {
192 final Tuple tuple = tupleFromAggregateResult(group, value);
193
194 if (aggregatorOuterIndexer != null) {
195 aggregatorOuterIndexer.propagate(direction, tuple, group, timestamp);
196 }
197 if (aggregatorOuterIdentityIndexers != null) {
198 for (final AggregatorOuterIdentityIndexer aggregatorOuterIdentityIndexer : aggregatorOuterIdentityIndexers) {
199 if (aggregatorOuterIdentityIndexer != null) {
200 aggregatorOuterIdentityIndexer.propagate(direction, tuple, group, timestamp);
201 }
202 }
203 }
204 }
205
206 public abstract Tuple getAggregateTuple(final Tuple key);
207
208 /**
209 * @since 2.4
210 */
211 public abstract Map<Tuple, Timeline<Timestamp>> getAggregateTupleTimeline(final Tuple key);
212
213 public abstract AggregateResult getAggregateResult(final Tuple key);
214
215 /**
216 * @since 2.4
217 */
218 public abstract Map<AggregateResult, Timeline<Timestamp>> getAggregateResultTimeline(final Tuple key);
219
220 protected Tuple tupleFromAggregateResult(final Tuple groupTuple, final AggregateResult aggregateResult) {
221 if (aggregateResult == null) {
222 return null;
223 } else {
224 return Tuples.staticArityLeftInheritanceTupleOf(groupTuple, runtimeContext.wrapElement(aggregateResult));
225 }
226 }
227
228 /**
229 * A special non-iterable index that retrieves the aggregated, packed result (signature+aggregate) for the original
230 * signature.
231 *
232 * @author Gabor Bergmann
233 * @author Tamas Szabo
234 *
235 */
236 protected class AggregatorOuterIndexer extends StandardIndexer {
237
238 /**
239 * @since 2.4
240 */
241 protected NetworkStructureChangeSensitiveLogic logic;
242
243 public AggregatorOuterIndexer() {
244 super(AbstractColumnAggregatorNode.this.reteContainer, TupleMask.omit(sourceWidth, sourceWidth + 1));
245 this.parent = AbstractColumnAggregatorNode.this;
246 this.logic = createLogic();
247 }
248
249 @Override
250 public void networkStructureChanged() {
251 super.networkStructureChanged();
252 this.logic = createLogic();
253 }
254
255 @Override
256 public Collection<Tuple> get(final Tuple signature) {
257 return this.logic.get(signature);
258 }
259
260 @Override
261 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature) {
262 return this.logic.getTimeline(signature);
263 }
264
265 /**
266 * @since 2.4
267 */
268 public void propagate(final Direction direction, final Tuple tuple, final Tuple group,
269 final Timestamp timestamp) {
270 if (tuple != null) {
271 propagate(direction, tuple, group, true, timestamp);
272 }
273 }
274
275 @Override
276 public Node getActiveNode() {
277 return AbstractColumnAggregatorNode.this;
278 }
279
280 /**
281 * @since 2.4
282 */
283 protected NetworkStructureChangeSensitiveLogic createLogic() {
284 if (this.reteContainer.isTimelyEvaluation()
285 && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
286 return this.TIMELY;
287 } else {
288 return this.TIMELESS;
289 }
290 }
291
292 private final NetworkStructureChangeSensitiveLogic TIMELESS = new NetworkStructureChangeSensitiveLogic() {
293
294 @Override
295 public Collection<Tuple> get(final Tuple signature) {
296 final Tuple aggregateTuple = getAggregateTuple(signature);
297 if (aggregateTuple == null) {
298 return null;
299 } else {
300 return Collections.singleton(aggregateTuple);
301 }
302 }
303
304 @Override
305 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature) {
306 throw new UnsupportedOperationException();
307 }
308
309 };
310
311 private final NetworkStructureChangeSensitiveLogic TIMELY = new NetworkStructureChangeSensitiveLogic() {
312
313 @Override
314 public Collection<Tuple> get(final Tuple signatureWithResult) {
315 return TIMELESS.get(signatureWithResult);
316 }
317
318 @Override
319 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature) {
320 final Map<Tuple, Timeline<Timestamp>> aggregateTuples = getAggregateTupleTimeline(signature);
321 if (aggregateTuples.isEmpty()) {
322 return null;
323 } else {
324 return aggregateTuples;
325 }
326 }
327
328 };
329
330 }
331
332 /**
333 * A special non-iterable index that checks a suspected aggregate value for a given signature. The signature for
334 * this index is the original 'group by' masked tuple, with the suspected result inserted at position
335 * resultPositionInSignature.
336 *
337 * @author Gabor Bergmann
338 * @author Tamas Szabo
339 *
340 */
341 protected class AggregatorOuterIdentityIndexer extends StandardIndexer {
342
343 protected final int resultPositionInSignature;
344 protected final TupleMask pruneResult;
345 protected final TupleMask reorderMask;
346 /**
347 * @since 2.4
348 */
349 protected NetworkStructureChangeSensitiveLogic logic;
350
351 public AggregatorOuterIdentityIndexer(final int resultPositionInSignature) {
352 super(AbstractColumnAggregatorNode.this.reteContainer,
353 TupleMask.displace(sourceWidth, resultPositionInSignature, sourceWidth + 1));
354 this.resultPositionInSignature = resultPositionInSignature;
355 this.pruneResult = TupleMask.omit(resultPositionInSignature, sourceWidth + 1);
356 if (resultPositionInSignature == sourceWidth) {
357 this.reorderMask = null;
358 } else {
359 this.reorderMask = mask;
360 }
361 this.logic = createLogic();
362 }
363
364 @Override
365 public void networkStructureChanged() {
366 super.networkStructureChanged();
367 this.logic = createLogic();
368 }
369
370 @Override
371 public Collection<Tuple> get(final Tuple signatureWithResult) {
372 return this.logic.get(signatureWithResult);
373 }
374
375 /**
376 * @since 2.4
377 */
378 @Override
379 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature) {
380 return this.logic.getTimeline(signature);
381 }
382
383 /**
384 * @since 2.4
385 */
386 public void propagate(final Direction direction, final Tuple tuple, final Tuple group,
387 final Timestamp timestamp) {
388 if (tuple != null) {
389 propagate(direction, reorder(tuple), group, true, timestamp);
390 }
391 }
392
393 private Tuple reorder(final Tuple signatureWithResult) {
394 Tuple transformed;
395 if (reorderMask == null) {
396 transformed = signatureWithResult;
397 } else {
398 transformed = reorderMask.transform(signatureWithResult);
399 }
400 return transformed;
401 }
402
403 @Override
404 public Node getActiveNode() {
405 return this.parent;
406 }
407
408 /**
409 * @since 2.4
410 */
411 protected NetworkStructureChangeSensitiveLogic createLogic() {
412 if (this.reteContainer.isTimelyEvaluation()
413 && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
414 return this.TIMELY;
415 } else {
416 return this.TIMELESS;
417 }
418 }
419
420 private final NetworkStructureChangeSensitiveLogic TIMELESS = new NetworkStructureChangeSensitiveLogic() {
421
422 @Override
423 public Collection<Tuple> get(final Tuple signatureWithResult) {
424 final Tuple prunedSignature = pruneResult.transform(signatureWithResult);
425 final AggregateResult result = getAggregateResult(prunedSignature);
426 if (result != null && Objects.equals(signatureWithResult.get(resultPositionInSignature), result)) {
427 return Collections.singleton(signatureWithResult);
428 } else {
429 return null;
430 }
431 }
432
433 @Override
434 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature) {
435 throw new UnsupportedOperationException();
436 }
437
438 };
439
440 private final NetworkStructureChangeSensitiveLogic TIMELY = new NetworkStructureChangeSensitiveLogic() {
441
442 @Override
443 public Collection<Tuple> get(final Tuple signatureWithResult) {
444 return TIMELESS.get(signatureWithResult);
445 }
446
447 @Override
448 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signatureWithResult) {
449 final Tuple prunedSignature = pruneResult.transform(signatureWithResult);
450 final Map<AggregateResult, Timeline<Timestamp>> result = getAggregateResultTimeline(prunedSignature);
451 for (final Entry<AggregateResult, Timeline<Timestamp>> entry : result.entrySet()) {
452 if (Objects.equals(signatureWithResult.get(resultPositionInSignature), entry.getKey())) {
453 return Collections.singletonMap(signatureWithResult, entry.getValue());
454 }
455 }
456 return null;
457 }
458
459 };
460
461 }
462
463 /**
464 * @since 2.4
465 */
466 protected static abstract class NetworkStructureChangeSensitiveLogic {
467
468 public abstract Collection<Tuple> get(final Tuple signatureWithResult);
469
470 public abstract Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature);
471
472 }
473
474}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/ColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/ColumnAggregatorNode.java
new file mode 100644
index 00000000..4480aed8
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/ColumnAggregatorNode.java
@@ -0,0 +1,369 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation;
10
11import java.util.Map;
12import java.util.Map.Entry;
13
14import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
15import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
19import tools.refinery.viatra.runtime.matchers.util.Direction;
20import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
21import tools.refinery.viatra.runtime.rete.network.PosetAwareReceiver;
22import tools.refinery.viatra.runtime.rete.network.RederivableNode;
23import tools.refinery.viatra.runtime.rete.network.ReteContainer;
24import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
25import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
26import tools.refinery.viatra.runtime.rete.network.communication.timeless.RecursiveCommunicationGroup;
27import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
28import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
29import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.PosetAwareMailbox;
30
31/**
32 * Timeless implementation of the column aggregator node.
33 * <p>
34 * The node is capable of operating in the delete and re-derive mode. In this mode, it is also possible to equip the
35 * node with an {@link IPosetComparator} to identify monotone changes; thus, ensuring that a fix-point can be reached
36 * during the evaluation.
37 *
38 * @author Gabor Bergmann
39 * @author Tamas Szabo
40 * @since 1.4
41 */
42public class ColumnAggregatorNode<Domain, Accumulator, AggregateResult>
43 extends AbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult>
44 implements RederivableNode, PosetAwareReceiver {
45
46 /**
47 * @since 1.6
48 */
49 protected final IPosetComparator posetComparator;
50
51 /**
52 * @since 1.6
53 */
54 protected final boolean deleteRederiveEvaluation;
55
56 // invariant: neutral values are not stored
57 /**
58 * @since 1.6
59 */
60 protected final Map<Tuple, Accumulator> memory;
61 /**
62 * @since 1.6
63 */
64 protected final Map<Tuple, Accumulator> rederivableMemory;
65
66 /**
67 * @since 1.7
68 */
69 protected CommunicationGroup currentGroup;
70
71 /**
72 * Creates a new column aggregator node.
73 *
74 * @param reteContainer
75 * the RETE container of the node
76 * @param operator
77 * the aggregation operator
78 * @param deleteRederiveEvaluation
79 * true if the node should run in DRED mode, false otherwise
80 * @param groupMask
81 * the mask that masks a tuple to obtain the key that we are grouping-by
82 * @param columnMask
83 * the mask that masks a tuple to obtain the tuple element(s) that we are aggregating over
84 * @param posetComparator
85 * the poset comparator for the column, if known, otherwise it can be null
86 * @since 1.6
87 */
88 public ColumnAggregatorNode(final ReteContainer reteContainer,
89 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
90 final boolean deleteRederiveEvaluation, final TupleMask groupMask, final TupleMask columnMask,
91 final IPosetComparator posetComparator) {
92 super(reteContainer, operator, groupMask, columnMask);
93 this.memory = CollectionsFactory.createMap();
94 this.rederivableMemory = CollectionsFactory.createMap();
95 this.deleteRederiveEvaluation = deleteRederiveEvaluation;
96 this.posetComparator = posetComparator;
97 // mailbox MUST be instantiated after the fields are all set
98 this.mailbox = instantiateMailbox();
99 }
100
101 /**
102 * Creates a new column aggregator node.
103 *
104 * @param reteContainer
105 * the RETE container of the node
106 * @param operator
107 * the aggregation operator
108 * @param groupMask
109 * the mask that masks a tuple to obtain the key that we are grouping-by
110 * @param aggregatedColumn
111 * the index of the column that the aggregator node is aggregating over
112 */
113 public ColumnAggregatorNode(final ReteContainer reteContainer,
114 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
115 final TupleMask groupMask, final int aggregatedColumn) {
116 this(reteContainer, operator, false, groupMask, TupleMask.selectSingle(aggregatedColumn, groupMask.sourceWidth),
117 null);
118 }
119
120 @Override
121 public boolean isInDRedMode() {
122 return this.deleteRederiveEvaluation;
123 }
124
125 @Override
126 protected Mailbox instantiateMailbox() {
127 if (groupMask != null && columnMask != null && posetComparator != null) {
128 return new PosetAwareMailbox(this, this.reteContainer);
129 } else {
130 return new BehaviorChangingMailbox(this, this.reteContainer);
131 }
132 }
133
134 @Override
135 public TupleMask getCoreMask() {
136 return groupMask;
137 }
138
139 @Override
140 public TupleMask getPosetMask() {
141 return columnMask;
142 }
143
144 @Override
145 public IPosetComparator getPosetComparator() {
146 return posetComparator;
147 }
148
149 @Override
150 public void rederiveOne() {
151 final Entry<Tuple, Accumulator> entry = rederivableMemory.entrySet().iterator().next();
152 final Tuple group = entry.getKey();
153 final Accumulator accumulator = entry.getValue();
154 rederivableMemory.remove(group);
155 memory.put(group, accumulator);
156 // unregister the node if there is nothing left to be re-derived
157 if (this.rederivableMemory.isEmpty()) {
158 ((RecursiveCommunicationGroup) currentGroup).removeRederivable(this);
159 }
160 final AggregateResult value = operator.getAggregate(accumulator);
161 propagateAggregateResultUpdate(group, NEUTRAL, value, Timestamp.ZERO);
162 }
163
164 @Override
165 public void updateWithPosetInfo(final Direction direction, final Tuple update, final boolean monotone) {
166 if (this.deleteRederiveEvaluation) {
167 updateWithDeleteAndRederive(direction, update, monotone);
168 } else {
169 updateDefault(direction, update, Timestamp.ZERO);
170 }
171 }
172
173 @Override
174 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
175 updateWithPosetInfo(direction, update, false);
176 }
177
178 /**
179 * @since 2.4
180 */
181 protected void updateDefault(final Direction direction, final Tuple update, final Timestamp timestamp) {
182 final Tuple key = groupMask.transform(update);
183 final Tuple value = columnMask.transform(update);
184 @SuppressWarnings("unchecked")
185 final Domain aggregableValue = (Domain) runtimeContext.unwrapElement(value.get(0));
186 final boolean isInsertion = direction == Direction.INSERT;
187
188 final Accumulator oldMainAccumulator = getMainAccumulator(key);
189 final AggregateResult oldValue = operator.getAggregate(oldMainAccumulator);
190
191 final Accumulator newMainAccumulator = operator.update(oldMainAccumulator, aggregableValue, isInsertion);
192 storeIfNotNeutral(key, newMainAccumulator, memory);
193 final AggregateResult newValue = operator.getAggregate(newMainAccumulator);
194
195 propagateAggregateResultUpdate(key, oldValue, newValue, timestamp);
196 }
197
198 /**
199 * @since 2.4
200 */
201 protected void updateWithDeleteAndRederive(final Direction direction, final Tuple update, final boolean monotone) {
202 final Tuple group = groupMask.transform(update);
203 final Tuple value = columnMask.transform(update);
204 @SuppressWarnings("unchecked")
205 final Domain aggregableValue = (Domain) runtimeContext.unwrapElement(value.get(0));
206 final boolean isInsertion = direction == Direction.INSERT;
207
208 Accumulator oldMainAccumulator = memory.get(group);
209 Accumulator oldRederivableAccumulator = rederivableMemory.get(group);
210
211 if (direction == Direction.INSERT) {
212 // INSERT
213 if (oldRederivableAccumulator != null) {
214 // the group is in the re-derivable memory
215 final Accumulator newRederivableAccumulator = operator.update(oldRederivableAccumulator,
216 aggregableValue, isInsertion);
217 storeIfNotNeutral(group, newRederivableAccumulator, rederivableMemory);
218 if (rederivableMemory.isEmpty()) {
219 // there is nothing left to be re-derived
220 // this can happen if the accumulator became neutral in response to the INSERT
221 ((RecursiveCommunicationGroup) currentGroup).removeRederivable(this);
222 }
223 } else {
224 // the group is in the main memory
225 // at this point, it can happen that we need to initialize with a neutral accumulator
226 if (oldMainAccumulator == null) {
227 oldMainAccumulator = operator.createNeutral();
228 }
229
230 final AggregateResult oldValue = operator.getAggregate(oldMainAccumulator);
231 final Accumulator newMainAccumulator = operator.update(oldMainAccumulator, aggregableValue,
232 isInsertion);
233 storeIfNotNeutral(group, newMainAccumulator, memory);
234 final AggregateResult newValue = operator.getAggregate(newMainAccumulator);
235 propagateAggregateResultUpdate(group, oldValue, newValue, Timestamp.ZERO);
236 }
237 } else {
238 // DELETE
239 if (oldRederivableAccumulator != null) {
240 // the group is in the re-derivable memory
241 if (oldMainAccumulator != null) {
242 issueError("[INTERNAL ERROR] Inconsistent state for " + update
243 + " because it is present both in the main and re-derivable memory in the ColumnAggregatorNode "
244 + this + " for pattern(s) " + getTraceInfoPatternsEnumerated(), null);
245 }
246 try {
247 final Accumulator newRederivableAccumulator = operator.update(oldRederivableAccumulator,
248 aggregableValue, isInsertion);
249 storeIfNotNeutral(group, newRederivableAccumulator, rederivableMemory);
250 if (rederivableMemory.isEmpty()) {
251 // there is nothing left to be re-derived
252 // this can happen if the accumulator became neutral in response to the DELETE
253 ((RecursiveCommunicationGroup) currentGroup).removeRederivable(this);
254 }
255 } catch (final NullPointerException ex) {
256 issueError("[INTERNAL ERROR] Deleting a domain element in " + update
257 + " which did not exist before in ColumnAggregatorNode " + this + " for pattern(s) "
258 + getTraceInfoPatternsEnumerated(), ex);
259 }
260 } else {
261 // the group is in the main memory
262 // at this point, it can happen that we need to initialize with a neutral accumulator
263 if (oldMainAccumulator == null) {
264 oldMainAccumulator = operator.createNeutral();
265 }
266
267 final AggregateResult oldValue = operator.getAggregate(oldMainAccumulator);
268 final Accumulator newMainAccumulator = operator.update(oldMainAccumulator, aggregableValue,
269 isInsertion);
270 final AggregateResult newValue = operator.getAggregate(newMainAccumulator);
271
272 if (monotone) {
273 storeIfNotNeutral(group, newMainAccumulator, memory);
274 propagateAggregateResultUpdate(group, oldValue, newValue, Timestamp.ZERO);
275 } else {
276 final boolean wasEmpty = rederivableMemory.isEmpty();
277 if (storeIfNotNeutral(group, newMainAccumulator, rederivableMemory) && wasEmpty) {
278 ((RecursiveCommunicationGroup) currentGroup).addRederivable(this);
279 }
280 memory.remove(group);
281 propagateAggregateResultUpdate(group, oldValue, NEUTRAL, Timestamp.ZERO);
282 }
283 }
284 }
285 }
286
287 @Override
288 public void clear() {
289 this.memory.clear();
290 this.rederivableMemory.clear();
291 this.childMailboxes.clear();
292 }
293
294 /**
295 * Returns true if the accumulator was stored, false otherwise.
296 *
297 * @since 1.6
298 */
299 protected boolean storeIfNotNeutral(final Tuple key, final Accumulator accumulator,
300 final Map<Tuple, Accumulator> memory) {
301 if (operator.isNeutral(accumulator)) {
302 memory.remove(key);
303 return false;
304 } else {
305 memory.put(key, accumulator);
306 return true;
307 }
308 }
309
310 @Override
311 public Tuple getAggregateTuple(final Tuple group) {
312 final Accumulator accumulator = getMainAccumulator(group);
313 final AggregateResult result = operator.getAggregate(accumulator);
314 return tupleFromAggregateResult(group, result);
315 }
316
317 @Override
318 public AggregateResult getAggregateResult(final Tuple group) {
319 final Accumulator accumulator = getMainAccumulator(group);
320 return operator.getAggregate(accumulator);
321 }
322
323 @Override
324 public Map<AggregateResult, Timeline<Timestamp>> getAggregateResultTimeline(Tuple key) {
325 throw new UnsupportedOperationException();
326 }
327
328 @Override
329 public Map<Tuple, Timeline<Timestamp>> getAggregateTupleTimeline(Tuple key) {
330 throw new UnsupportedOperationException();
331 }
332
333 /**
334 * @since 1.6
335 */
336 protected Accumulator getMainAccumulator(final Tuple key) {
337 return getAccumulator(key, memory);
338 }
339
340 /**
341 * @since 1.6
342 */
343 protected Accumulator getRederivableAccumulator(final Tuple key) {
344 return getAccumulator(key, rederivableMemory);
345 }
346
347 /**
348 * @since 1.6
349 */
350 protected Accumulator getAccumulator(final Tuple key, final Map<Tuple, Accumulator> memory) {
351 Accumulator accumulator = memory.get(key);
352 if (accumulator == null) {
353 return operator.createNeutral();
354 } else {
355 return accumulator;
356 }
357 }
358
359 @Override
360 public CommunicationGroup getCurrentGroup() {
361 return currentGroup;
362 }
363
364 @Override
365 public void setCurrentGroup(final CommunicationGroup currentGroup) {
366 this.currentGroup = currentGroup;
367 }
368
369}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/CountNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/CountNode.java
new file mode 100644
index 00000000..7c98de0d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/CountNode.java
@@ -0,0 +1,38 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.aggregation;
11
12import java.util.Collection;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15import tools.refinery.viatra.runtime.rete.network.ReteContainer;
16
17/**
18 * An aggregation node that simply counts the number of tuples conforming to the signature.
19 *
20 * @author Gabor Bergmann
21 * @since 1.4
22 */
23public class CountNode extends IndexerBasedAggregatorNode {
24
25 public CountNode(ReteContainer reteContainer) {
26 super(reteContainer);
27 }
28
29 int sizeOf(Collection<Tuple> group) {
30 return group == null ? 0 : group.size();
31 }
32
33 @Override
34 public Object aggregateGroup(Tuple signature, Collection<Tuple> group) {
35 return sizeOf(group);
36 }
37
38}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedMap.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedMap.java
new file mode 100644
index 00000000..3c7850de
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedMap.java
@@ -0,0 +1,120 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation;
10
11import java.util.AbstractMap.SimpleEntry;
12import java.util.Collection;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
19
20/**
21 * An optimized {@link Map} implementation where each key is produced by joining together a group tuple and some other
22 * object (via left inheritance). Only a select few {@link Map} operations are supported. This collection is
23 * unmodifiable.
24 *
25 * Operations on this map assume that client queries also obey the contract that keys are constructed from a group tuple
26 * and an additional object.
27 *
28 * @author Tamas Szabo
29 * @since 2.4
30 */
31public class GroupedMap<GroupedKeyType, ValueType> implements Map<Tuple, ValueType> {
32
33 protected final Tuple group;
34 // cached group size value is to be used in get()
35 private final int groupSize;
36 protected final Map<GroupedKeyType, ValueType> mappings;
37 protected final IQueryRuntimeContext runtimeContext;
38
39 public GroupedMap(final Tuple group, final Map<GroupedKeyType, ValueType> mappings,
40 final IQueryRuntimeContext runtimeContext) {
41 this.group = group;
42 this.groupSize = group.getSize();
43 this.mappings = mappings;
44 this.runtimeContext = runtimeContext;
45 }
46
47 @Override
48 public int size() {
49 return this.mappings.size();
50 }
51
52 @Override
53 public boolean isEmpty() {
54 return this.mappings.isEmpty();
55 }
56
57 @Override
58 public boolean containsKey(final Object key) {
59 throw new UnsupportedOperationException();
60 }
61
62 @Override
63 public boolean containsValue(final Object value) {
64 return this.mappings.containsValue(value);
65 }
66
67 @Override
68 public ValueType get(final Object key) {
69 if (key instanceof Tuple) {
70 final Object value = ((Tuple) key).get(this.groupSize);
71 final Object unwrappedValue = this.runtimeContext.unwrapElement(value);
72 return this.mappings.get(unwrappedValue);
73 } else {
74 return null;
75 }
76 }
77
78 @Override
79 public ValueType put(final Tuple key, final ValueType value) {
80 throw new UnsupportedOperationException();
81 }
82
83 @Override
84 public ValueType remove(final Object key) {
85 throw new UnsupportedOperationException();
86 }
87
88 @Override
89 public void putAll(final Map<? extends Tuple, ? extends ValueType> map) {
90 throw new UnsupportedOperationException();
91 }
92
93 @Override
94 public void clear() {
95 throw new UnsupportedOperationException();
96 }
97
98 @Override
99 public Set<Tuple> keySet() {
100 return new GroupedSet<Tuple, GroupedKeyType, Tuple>(this.group, this.mappings.keySet(), (g, v) -> {
101 return Tuples.staticArityLeftInheritanceTupleOf(g, this.runtimeContext.wrapElement(v));
102 });
103 }
104
105 @Override
106 public Collection<ValueType> values() {
107 return this.mappings.values();
108 }
109
110 @Override
111 public Set<Entry<Tuple, ValueType>> entrySet() {
112 return new GroupedSet<Tuple, GroupedKeyType, Entry<Tuple, ValueType>>(this.group, this.mappings.keySet(),
113 (g, v) -> {
114 final Tuple key = Tuples.staticArityLeftInheritanceTupleOf(g, this.runtimeContext.wrapElement(v));
115 final ValueType value = this.mappings.get(v);
116 return new SimpleEntry<Tuple, ValueType>(key, value);
117 });
118 }
119
120} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedSet.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedSet.java
new file mode 100644
index 00000000..65561e53
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/GroupedSet.java
@@ -0,0 +1,114 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation;
10
11import java.util.Collection;
12import java.util.Iterator;
13import java.util.Set;
14import java.util.function.BiFunction;
15
16/**
17 * An optimized {@link Set} implementation where each contained value is produced by combining together a grouping value
18 * and some other (key) object. The way of combining together these two values is specified by the closure passed to the
19 * constructor. Only a select few {@link Set} operations are supported. This collection is unmodifiable.
20 *
21 * @author Tamas Szabo
22 * @since 2.4
23 */
24public class GroupedSet<GroupingValueType, GroupedKeyType, WholeKeyType> implements Set<WholeKeyType> {
25
26 protected final GroupingValueType group;
27 protected final Collection<GroupedKeyType> values;
28 protected final BiFunction<GroupingValueType, GroupedKeyType, WholeKeyType> valueFunc;
29
30 public GroupedSet(final GroupingValueType group, final Collection<GroupedKeyType> values,
31 final BiFunction<GroupingValueType, GroupedKeyType, WholeKeyType> valueFunc) {
32 this.group = group;
33 this.values = values;
34 this.valueFunc = valueFunc;
35 }
36
37 @Override
38 public int size() {
39 return this.values.size();
40 }
41
42 @Override
43 public boolean isEmpty() {
44 return this.values.isEmpty();
45 }
46
47 @Override
48 public boolean contains(final Object obj) {
49 throw new UnsupportedOperationException();
50 }
51
52 @Override
53 public Iterator<WholeKeyType> iterator() {
54 final Iterator<GroupedKeyType> wrapped = this.values.iterator();
55 return new Iterator<WholeKeyType>() {
56 @Override
57 public boolean hasNext() {
58 return wrapped.hasNext();
59 }
60
61 @Override
62 public WholeKeyType next() {
63 final GroupedKeyType value = wrapped.next();
64 return valueFunc.apply(group, value);
65 }
66 };
67 }
68
69 @Override
70 public Object[] toArray() {
71 throw new UnsupportedOperationException();
72 }
73
74 @Override
75 public <T> T[] toArray(final T[] arr) {
76 throw new UnsupportedOperationException();
77 }
78
79 @Override
80 public boolean add(final WholeKeyType tuple) {
81 throw new UnsupportedOperationException();
82 }
83
84 @Override
85 public boolean remove(final Object obj) {
86 throw new UnsupportedOperationException();
87 }
88
89 @Override
90 public boolean containsAll(final Collection<?> c) {
91 throw new UnsupportedOperationException();
92 }
93
94 @Override
95 public boolean addAll(final Collection<? extends WholeKeyType> coll) {
96 throw new UnsupportedOperationException();
97 }
98
99 @Override
100 public boolean retainAll(final Collection<?> coll) {
101 throw new UnsupportedOperationException();
102 }
103
104 @Override
105 public boolean removeAll(final Collection<?> coll) {
106 throw new UnsupportedOperationException();
107 }
108
109 @Override
110 public void clear() {
111 throw new UnsupportedOperationException();
112 }
113
114} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IAggregatorNode.java
new file mode 100644
index 00000000..6c286364
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IAggregatorNode.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation;
10
11import tools.refinery.viatra.runtime.rete.index.Indexer;
12
13/**
14 * Expresses that aggregators expose specialized non-enumerable indexers for outer joining.
15 * @author Gabor Bergmann
16 *
17 * @since 1.4
18 *
19 */
20public interface IAggregatorNode {
21
22 Indexer getAggregatorOuterIndexer();
23
24 Indexer getAggregatorOuterIdentityIndexer(int resultPositionInSignature);
25
26} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IndexerBasedAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IndexerBasedAggregatorNode.java
new file mode 100644
index 00000000..d9a94a82
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/IndexerBasedAggregatorNode.java
@@ -0,0 +1,278 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.aggregation;
11
12import java.util.Collection;
13import java.util.Collections;
14import java.util.Map;
15import java.util.Map.Entry;
16
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.Direction;
22import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
23import tools.refinery.viatra.runtime.rete.index.DefaultIndexerListener;
24import tools.refinery.viatra.runtime.rete.index.Indexer;
25import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
26import tools.refinery.viatra.runtime.rete.index.StandardIndexer;
27import tools.refinery.viatra.runtime.rete.network.Node;
28import tools.refinery.viatra.runtime.rete.network.ReteContainer;
29import tools.refinery.viatra.runtime.rete.network.StandardNode;
30import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
31import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
32
33/**
34 * A special node depending on a projection indexer to aggregate tuple groups with the same projection. Only propagates
35 * the aggregates of non-empty groups. Use the outer indexers to circumvent.
36 * <p>
37 * This node cannot be used in recursive differential dataflow evaluation.
38 *
39 * @author Gabor Bergmann
40 * @since 1.4
41 */
42public abstract class IndexerBasedAggregatorNode extends StandardNode implements IAggregatorNode {
43
44 ProjectionIndexer projection;
45 IndexerBasedAggregatorNode me;
46 int sourceWidth;
47 Map<Tuple, Object> mainAggregates;
48
49 AggregatorOuterIndexer aggregatorOuterIndexer = null;
50 AggregatorOuterIdentityIndexer[] aggregatorOuterIdentityIndexers = null;
51
52 /**
53 * MUST call initializeWith() afterwards!
54 */
55 public IndexerBasedAggregatorNode(ReteContainer reteContainer) {
56 super(reteContainer);
57 this.me = this;
58 mainAggregates = CollectionsFactory.createMap();
59 }
60
61 @Override
62 public void networkStructureChanged() {
63 if (this.reteContainer.isTimelyEvaluation() && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
64 throw new IllegalStateException(this.toString() + " cannot be used in recursive differential dataflow evaluation!");
65 }
66 super.networkStructureChanged();
67 }
68
69 /**
70 * @param projection
71 * the projection indexer whose tuple groups should be aggregated
72 */
73 public void initializeWith(ProjectionIndexer projection) {
74 this.projection = projection;
75 this.sourceWidth = projection.getMask().indices.length;
76
77 for (Tuple signature : projection.getSignatures()) {
78 mainAggregates.put(signature, aggregateGroup(signature, projection.get(signature)));
79 }
80 projection.attachListener(new DefaultIndexerListener(this) {
81 @Override
82 public void notifyIndexerUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp) {
83 aggregateUpdate(direction, updateElement, signature, change);
84 }
85 });
86 }
87
88 /**
89 * Aggregates (reduces) a group of tuples. The group can be null.
90 */
91 public abstract Object aggregateGroup(Tuple signature, Collection<Tuple> group);
92
93
94 /**
95 * Aggregates (reduces) a group of tuples, having access to the previous aggregated value (before the update) and
96 * the update definition. Defaults to aggregateGroup(). Override to increase performance.
97 * @since 2.4
98 */
99 public Object aggregateGroupAfterUpdate(Tuple signature, Collection<Tuple> currentGroup, Object oldAggregate,
100 Direction direction, Tuple updateElement, boolean change) {
101 return aggregateGroup(signature, currentGroup);
102 }
103
104 protected Tuple aggregateAndPack(Tuple signature, Collection<Tuple> group) {
105 return packResult(signature, aggregateGroup(signature, group));
106 }
107
108 @Override
109 public Indexer getAggregatorOuterIndexer() {
110 if (aggregatorOuterIndexer == null) {
111 aggregatorOuterIndexer = new AggregatorOuterIndexer();
112 this.getCommunicationTracker().registerDependency(this, aggregatorOuterIndexer);
113 // reteContainer.connectAndSynchronize(this, aggregatorOuterIndexer);
114 }
115 return aggregatorOuterIndexer;
116 }
117
118 @Override
119 public Indexer getAggregatorOuterIdentityIndexer(int resultPositionInSignature) {
120 if (aggregatorOuterIdentityIndexers == null)
121 aggregatorOuterIdentityIndexers = new AggregatorOuterIdentityIndexer[sourceWidth + 1];
122 if (aggregatorOuterIdentityIndexers[resultPositionInSignature] == null) {
123 aggregatorOuterIdentityIndexers[resultPositionInSignature] = new AggregatorOuterIdentityIndexer(
124 resultPositionInSignature);
125 this.getCommunicationTracker().registerDependency(this, aggregatorOuterIdentityIndexers[resultPositionInSignature]);
126 // reteContainer.connectAndSynchronize(this, aggregatorOuterIdentityIndexers[resultPositionInSignature]);
127 }
128 return aggregatorOuterIdentityIndexers[resultPositionInSignature];
129 }
130
131 @Override
132 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
133 for (final Entry<Tuple, Object> aggregateEntry : mainAggregates.entrySet()) {
134 collector.add(packResult(aggregateEntry.getKey(), aggregateEntry.getValue()));
135 }
136 }
137
138 @Override
139 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
140 // use all zero timestamps because this node cannot be used in recursive groups anyway
141 for (final Entry<Tuple, Object> aggregateEntry : mainAggregates.entrySet()) {
142 collector.put(packResult(aggregateEntry.getKey(), aggregateEntry.getValue()), Timestamp.INSERT_AT_ZERO_TIMELINE);
143 }
144 }
145
146 protected Tuple packResult(Tuple signature, Object result) {
147 return Tuples.staticArityLeftInheritanceTupleOf(signature, result);
148 }
149
150 /**
151 * @since 2.4
152 */
153 protected void aggregateUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) {
154 Collection<Tuple> currentGroup = projection.get(signature);
155 // these will be null if group is empty
156 Object oldAggregate = mainAggregates.get(signature);
157 Object safeOldAggregate = oldAggregate == null ? aggregateGroup(signature, null) : oldAggregate;
158 boolean empty = currentGroup == null || currentGroup.isEmpty();
159 Object newAggregate = empty ? null : aggregateGroupAfterUpdate(signature, currentGroup, safeOldAggregate/*
160 * non-null
161 */,
162 direction, updateElement, change);
163 if (!empty)
164 mainAggregates.put(signature, newAggregate);
165 else
166 mainAggregates.remove(signature);
167 Tuple oldTuple = packResult(signature, safeOldAggregate);
168 Tuple newTuple = packResult(signature, newAggregate == null ? aggregateGroup(signature, null) : newAggregate);
169 if (oldAggregate != null)
170 propagateUpdate(Direction.DELETE, oldTuple, Timestamp.ZERO); // direct outputs lack non-empty groups
171 if (newAggregate != null)
172 propagateUpdate(Direction.INSERT, newTuple, Timestamp.ZERO); // direct outputs lack non-empty groups
173 if (aggregatorOuterIndexer != null)
174 aggregatorOuterIndexer.propagate(signature, oldTuple, newTuple);
175 if (aggregatorOuterIdentityIndexers != null)
176 for (AggregatorOuterIdentityIndexer aggregatorOuterIdentityIndexer : aggregatorOuterIdentityIndexers)
177 if (aggregatorOuterIdentityIndexer != null)
178 aggregatorOuterIdentityIndexer.propagate(signature, oldTuple, newTuple);
179 }
180
181 private Object getAggregate(Tuple signature) {
182 Object aggregate = mainAggregates.get(signature);
183 return aggregate == null ? aggregateGroup(signature, null) : aggregate;
184 }
185
186 @Override
187 public void assignTraceInfo(TraceInfo traceInfo) {
188 super.assignTraceInfo(traceInfo);
189 if (traceInfo.propagateToIndexerParent() && projection != null)
190 projection.acceptPropagatedTraceInfo(traceInfo);
191 }
192
193 /**
194 * A special non-iterable index that retrieves the aggregated, packed result (signature+aggregate) for the original
195 * signature.
196 *
197 * @author Gabor Bergmann
198 */
199 class AggregatorOuterIndexer extends StandardIndexer {
200
201 public AggregatorOuterIndexer() {
202 super(me.reteContainer, TupleMask.omit(sourceWidth, sourceWidth + 1));
203 this.parent = me;
204 }
205
206 @Override
207 public Collection<Tuple> get(Tuple signature) {
208 return Collections.singleton(packResult(signature, getAggregate(signature)));
209 }
210
211 public void propagate(Tuple signature, Tuple oldTuple, Tuple newTuple) {
212 propagate(Direction.INSERT, newTuple, signature, false, Timestamp.ZERO);
213 propagate(Direction.DELETE, oldTuple, signature, false, Timestamp.ZERO);
214 }
215
216 @Override
217 public Node getActiveNode() {
218 return projection.getActiveNode();
219 }
220
221 }
222
223 /**
224 * A special non-iterable index that checks a suspected aggregate value for a given signature. The signature for
225 * this index is the original signature of the projection index, with the suspected result inserted at position
226 * resultPositionInSignature.
227 *
228 * @author Gabor Bergmann
229 */
230
231 class AggregatorOuterIdentityIndexer extends StandardIndexer {
232 int resultPositionInSignature;
233 TupleMask pruneResult;
234 TupleMask reorderMask;
235
236 public AggregatorOuterIdentityIndexer(int resultPositionInSignature) {
237 super(me.reteContainer, TupleMask.displace(sourceWidth, resultPositionInSignature, sourceWidth + 1));
238 this.parent = me;
239 // this.localAggregates = new HashMap<Tuple, Tuple>();
240 this.resultPositionInSignature = resultPositionInSignature;
241 this.pruneResult = TupleMask.omit(resultPositionInSignature, sourceWidth + 1);
242 if (resultPositionInSignature == sourceWidth)
243 this.reorderMask = null;
244 else
245 this.reorderMask = mask;
246 }
247
248 @Override
249 public Collection<Tuple> get(Tuple signatureWithResult) {
250 Tuple prunedSignature = pruneResult.transform(signatureWithResult);
251 Object result = getAggregate(prunedSignature);
252 if (signatureWithResult.get(resultPositionInSignature).equals(result))
253 return Collections.singleton(signatureWithResult);
254 else
255 return null;
256 }
257
258 public void propagate(Tuple signature, Tuple oldTuple, Tuple newTuple) {
259 propagate(Direction.INSERT, reorder(newTuple), signature, true, Timestamp.ZERO);
260 propagate(Direction.DELETE, reorder(oldTuple), signature, true, Timestamp.ZERO);
261 }
262
263 private Tuple reorder(Tuple signatureWithResult) {
264 Tuple transformed;
265 if (reorderMask == null)
266 transformed = signatureWithResult;
267 else
268 transformed = reorderMask.transform(signatureWithResult);
269 return transformed;
270 }
271
272 @Override
273 public Node getActiveNode() {
274 return projection.getActiveNode();
275 }
276 }
277
278}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulParallelTimelyColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulParallelTimelyColumnAggregatorNode.java
new file mode 100644
index 00000000..19e02f10
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulParallelTimelyColumnAggregatorNode.java
@@ -0,0 +1,212 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation.timely;
10
11import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
14import tools.refinery.viatra.runtime.matchers.util.*;
15import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
16import tools.refinery.viatra.runtime.rete.aggregation.timely.FaithfulParallelTimelyColumnAggregatorNode.CumulativeAggregate;
17import tools.refinery.viatra.runtime.rete.aggregation.timely.FaithfulParallelTimelyColumnAggregatorNode.FoldingState;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20import tools.refinery.viatra.runtime.rete.network.communication.timely.ResumableNode;
21
22import java.util.Collections;
23import java.util.Map;
24import java.util.Map.Entry;
25import java.util.Objects;
26import java.util.TreeMap;
27
28/**
29 * Faithful column aggregator with parallel aggregation architecture.
30 *
31 * @author Tamas Szabo
32 * @since 2.4
33 *
34 */
35public class FaithfulParallelTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult> extends
36 FaithfulTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult, CumulativeAggregate<Domain, Accumulator>, FoldingState<Domain>>
37 implements ResumableNode {
38
39 public FaithfulParallelTimelyColumnAggregatorNode(final ReteContainer reteContainer,
40 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
41 final TupleMask groupMask, final TupleMask columnMask) {
42 super(reteContainer, operator, groupMask, columnMask);
43 }
44
45 public FaithfulParallelTimelyColumnAggregatorNode(final ReteContainer reteContainer,
46 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
47 final TupleMask groupMask, final int aggregatedColumn) {
48 this(reteContainer, operator, groupMask, TupleMask.selectSingle(aggregatedColumn, groupMask.sourceWidth));
49 }
50
51 @Override
52 protected Map<AggregateResult, Diff<Timestamp>> doFoldingStep(final Tuple group, final FoldingState<Domain> state,
53 final Timestamp timestamp) {
54 final CumulativeAggregate<Domain, Accumulator> aggregate = getAggregate(group, timestamp);
55 if (state.delta.isEmpty()) {
56 gcAggregates(aggregate, group, timestamp);
57 return Collections.emptyMap();
58 } else {
59 final Map<AggregateResult, Diff<Timestamp>> diffMap = CollectionsFactory.createMap();
60 final Timestamp nextTimestamp = this.aggregates.get(group).higherKey(timestamp);
61
62 final AggregateResult currentOldResult = operator.getAggregate(aggregate.accumulator);
63
64 for (final Entry<Domain, Integer> entry : state.delta.entriesWithMultiplicities()) {
65 final boolean isInsertion = entry.getValue() > 0;
66 final Domain aggregand = entry.getKey();
67 for (int i = 0; i < Math.abs(entry.getValue()); i++) {
68 aggregate.accumulator = operator.update(aggregate.accumulator, aggregand, isInsertion);
69 }
70 }
71
72 final AggregateResult currentNewResult = operator.getAggregate(aggregate.accumulator);
73
74 if (!Objects.equals(currentOldResult, currentNewResult)) {
75 // current old result disappears here
76 appendDiff(currentOldResult, new Signed<>(Direction.DELETE, timestamp), diffMap);
77 if (nextTimestamp != null) {
78 appendDiff(currentOldResult, new Signed<>(Direction.INSERT, nextTimestamp), diffMap);
79 }
80
81 // current new result appears here
82 appendDiff(currentNewResult, new Signed<>(Direction.INSERT, timestamp), diffMap);
83 if (nextTimestamp != null) {
84 appendDiff(currentNewResult, new Signed<>(Direction.DELETE, nextTimestamp), diffMap);
85 }
86 }
87
88 gcAggregates(aggregate, group, timestamp);
89 updateTimeline(group, diffMap);
90
91 // prepare folding state for next timestamp
92 if (nextTimestamp != null) {
93 final FoldingState<Domain> newState = new FoldingState<>();
94 newState.delta = state.delta;
95 addFoldingState(group, newState, nextTimestamp);
96 }
97
98 return diffMap;
99 }
100 }
101
102 @Override
103 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
104 final Tuple group = groupMask.transform(update);
105 final Tuple value = columnMask.transform(update);
106 @SuppressWarnings("unchecked")
107 final Domain aggregand = (Domain) runtimeContext.unwrapElement(value.get(0));
108 final boolean isInsertion = direction == Direction.INSERT;
109
110 final CumulativeAggregate<Domain, Accumulator> aggregate = getAggregate(group, timestamp);
111 final FoldingState<Domain> state = new FoldingState<>();
112 if (isInsertion) {
113 aggregate.aggregands.addOne(aggregand);
114 state.delta.addOne(aggregand);
115 } else {
116 aggregate.aggregands.removeOne(aggregand);
117 state.delta.removeOne(aggregand);
118 }
119
120 addFoldingState(group, state, timestamp);
121 }
122
123 /**
124 * Garbage collects the counter of the given group and timestamp if the bag of aggregands is empty.
125 */
126 @Override
127 protected void gcAggregates(final CumulativeAggregate<Domain, Accumulator> aggregate, final Tuple group,
128 final Timestamp timestamp) {
129 if (aggregate.aggregands.isEmpty()) {
130 final TreeMap<Timestamp, CumulativeAggregate<Domain, Accumulator>> groupAggregates = this.aggregates
131 .get(group);
132 groupAggregates.remove(timestamp);
133 if (groupAggregates.isEmpty()) {
134 this.aggregates.remove(group);
135 }
136 }
137 }
138
139 /**
140 * On-demand initializes and returns the aggregate for the given group and timestamp.
141 */
142 @Override
143 protected CumulativeAggregate<Domain, Accumulator> getAggregate(final Tuple group, final Timestamp timestamp) {
144 final TreeMap<Timestamp, CumulativeAggregate<Domain, Accumulator>> groupAggregates = this.aggregates
145 .computeIfAbsent(group, k -> CollectionsFactory.createTreeMap());
146 return groupAggregates.computeIfAbsent(timestamp, k -> {
147 final CumulativeAggregate<Domain, Accumulator> aggregate = new CumulativeAggregate<>();
148 final Entry<Timestamp, CumulativeAggregate<Domain, Accumulator>> lowerEntry = groupAggregates
149 .lowerEntry(timestamp);
150 if (lowerEntry == null) {
151 aggregate.accumulator = operator.createNeutral();
152 } else {
153 aggregate.accumulator = operator.clone(lowerEntry.getValue().accumulator);
154 }
155 return aggregate;
156 });
157 }
158
159 @Override
160 public AggregateResult getAggregateResult(final Tuple group) {
161 final TreeMap<Timestamp, CumulativeAggregate<Domain, Accumulator>> groupAggregates = this.aggregates.get(group);
162 if (groupAggregates != null) {
163 final Entry<Timestamp, CumulativeAggregate<Domain, Accumulator>> lastEntry = groupAggregates.lastEntry();
164 return operator.getAggregate(lastEntry.getValue().accumulator);
165 } else {
166 return NEUTRAL;
167 }
168 }
169
170 protected static class CumulativeAggregate<Domain, Accumulator> {
171 protected Accumulator accumulator;
172 protected IDeltaBag<Domain> aggregands;
173
174 protected CumulativeAggregate() {
175 this.aggregands = CollectionsFactory.createDeltaBag();
176 }
177
178 @Override
179 public String toString() {
180 return "accumulator=" + accumulator + " aggregands=" + aggregands;
181 }
182 }
183
184 protected static class FoldingState<Domain> implements MergeableFoldingState<FoldingState<Domain>> {
185 protected IDeltaBag<Domain> delta;
186
187 protected FoldingState() {
188 this.delta = CollectionsFactory.createDeltaBag();
189 }
190
191 @Override
192 public String toString() {
193 return "delta=" + delta;
194 }
195
196 /**
197 * The returned result will never be null, even if the resulting delta set is empty.
198 */
199 @Override
200 public FoldingState<Domain> merge(final FoldingState<Domain> that) {
201 Preconditions.checkArgument(that != null);
202 // 'this' was the previously registered folding state
203 // 'that' is the new folding state being pushed upwards
204 final FoldingState<Domain> result = new FoldingState<>();
205 this.delta.forEachEntryWithMultiplicities((d, m) -> result.delta.addSigned(d, m));
206 that.delta.forEachEntryWithMultiplicities((d, m) -> result.delta.addSigned(d, m));
207 return result;
208 }
209
210 }
211
212}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulSequentialTimelyColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulSequentialTimelyColumnAggregatorNode.java
new file mode 100644
index 00000000..cf2c2b2d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulSequentialTimelyColumnAggregatorNode.java
@@ -0,0 +1,279 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation.timely;
10
11import java.util.Collections;
12import java.util.Map;
13import java.util.Map.Entry;
14import java.util.Objects;
15import java.util.TreeMap;
16
17import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.Direction;
22import tools.refinery.viatra.runtime.matchers.util.IDeltaBag;
23import tools.refinery.viatra.runtime.matchers.util.Preconditions;
24import tools.refinery.viatra.runtime.matchers.util.Signed;
25import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
26import tools.refinery.viatra.runtime.rete.aggregation.timely.FaithfulSequentialTimelyColumnAggregatorNode.CumulativeAggregate;
27import tools.refinery.viatra.runtime.rete.aggregation.timely.FaithfulSequentialTimelyColumnAggregatorNode.FoldingState;
28import tools.refinery.viatra.runtime.rete.network.ReteContainer;
29import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
30import tools.refinery.viatra.runtime.rete.network.communication.timely.ResumableNode;
31
32/**
33 * Faithful column aggregator with sequential aggregation architecture.
34 *
35 * @author Tamas Szabo
36 * @since 2.4
37 *
38 */
39public class FaithfulSequentialTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult> extends
40 FaithfulTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult, CumulativeAggregate<Domain, Accumulator, AggregateResult>, FoldingState<Domain, AggregateResult>>
41 implements ResumableNode {
42
43 protected boolean isRecursiveAggregation;
44
45 public FaithfulSequentialTimelyColumnAggregatorNode(final ReteContainer reteContainer,
46 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
47 final TupleMask groupMask, final TupleMask columnMask) {
48 super(reteContainer, operator, groupMask, columnMask);
49 this.isRecursiveAggregation = false;
50 }
51
52 @Override
53 public void networkStructureChanged() {
54 super.networkStructureChanged();
55 this.isRecursiveAggregation = this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this);
56 }
57
58 @Override
59 protected Map<AggregateResult, Diff<Timestamp>> doFoldingStep(final Tuple group,
60 final FoldingState<Domain, AggregateResult> state, final Timestamp timestamp) {
61 final CumulativeAggregate<Domain, Accumulator, AggregateResult> aggregate = getAggregate(group, timestamp);
62 if (state.delta.isEmpty() && Objects.equals(state.oldResult, state.newResult)) {
63 gcAggregates(aggregate, group, timestamp);
64 return Collections.emptyMap();
65 } else {
66 final Map<AggregateResult, Diff<Timestamp>> diffMap = CollectionsFactory.createMap();
67 final Timestamp nextTimestamp = this.aggregates.get(group).higherKey(timestamp);
68
69 final AggregateResult previousOldResult = state.oldResult;
70 final AggregateResult previousNewResult = state.newResult;
71
72 final AggregateResult currentOldResult = previousOldResult == null
73 ? operator.getAggregate(aggregate.positive)
74 : operator.combine(previousOldResult, aggregate.positive);
75
76 for (final Entry<Domain, Integer> entry : state.delta.entriesWithMultiplicities()) {
77 final boolean isInsertion = entry.getValue() > 0;
78 final Domain aggregand = entry.getKey();
79 if (isInsertion) {
80 for (int i = 0; i < entry.getValue(); i++) {
81 if (isRecursiveAggregation) {
82 final boolean contains = aggregate.negative.containsNonZero(aggregand);
83 if (contains) {
84 aggregate.negative.addOne(aggregand);
85 } else {
86 aggregate.positive = operator.update(aggregate.positive, aggregand, true);
87 }
88 } else {
89 aggregate.positive = operator.update(aggregate.positive, aggregand, true);
90 }
91 }
92 } else {
93 for (int i = 0; i < -entry.getValue(); i++) {
94 if (isRecursiveAggregation) {
95 final boolean contains = operator.contains(aggregand, aggregate.positive);
96 if (contains) {
97 aggregate.positive = operator.update(aggregate.positive, aggregand, false);
98 } else {
99 aggregate.negative.removeOne(aggregand);
100 }
101 } else {
102 aggregate.positive = operator.update(aggregate.positive, aggregand, false);
103 }
104 }
105 }
106 }
107
108 final AggregateResult currentNewResult = previousNewResult == null
109 ? operator.getAggregate(aggregate.positive)
110 : operator.combine(previousNewResult, aggregate.positive);
111
112 aggregate.cachedResult = currentNewResult;
113
114 final boolean sameResult = Objects.equals(currentOldResult, currentNewResult);
115 if (!sameResult) {
116 // current old result disappears here
117 appendDiff(currentOldResult, new Signed<>(Direction.DELETE, timestamp), diffMap);
118 if (nextTimestamp != null) {
119 appendDiff(currentOldResult, new Signed<>(Direction.INSERT, nextTimestamp), diffMap);
120 }
121
122 // current new result appears here
123 appendDiff(currentNewResult, new Signed<>(Direction.INSERT, timestamp), diffMap);
124 if (nextTimestamp != null) {
125 appendDiff(currentNewResult, new Signed<>(Direction.DELETE, nextTimestamp), diffMap);
126 }
127 }
128
129 gcAggregates(aggregate, group, timestamp);
130 updateTimeline(group, diffMap);
131
132 // prepare folding state for next timestamp
133 if (nextTimestamp != null && !sameResult) {
134 final FoldingState<Domain, AggregateResult> newState = new FoldingState<>();
135 // DO NOT push forward the delta in the folding state!!! that one only affects the input timestamp
136 newState.oldResult = currentOldResult;
137 newState.newResult = currentNewResult;
138 addFoldingState(group, newState, nextTimestamp);
139 }
140
141 return diffMap;
142 }
143 }
144
145 @Override
146 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
147 final Tuple group = groupMask.transform(update);
148 final Tuple value = columnMask.transform(update);
149 @SuppressWarnings("unchecked")
150 final Domain aggregand = (Domain) runtimeContext.unwrapElement(value.get(0));
151 final boolean isInsertion = direction == Direction.INSERT;
152
153 final AggregateResult previousResult = getResultRaw(group, timestamp, true);
154 final FoldingState<Domain, AggregateResult> state = new FoldingState<Domain, AggregateResult>();
155 if (isInsertion) {
156 state.delta.addOne(aggregand);
157 } else {
158 state.delta.removeOne(aggregand);
159 }
160 state.oldResult = previousResult;
161 state.newResult = previousResult;
162
163 // it is acceptable if both oldResult and newResult are null at this point
164 // in that case we did not have a previous entry at a lower timestamp
165
166 addFoldingState(group, state, timestamp);
167 }
168
169 protected AggregateResult getResultRaw(final Tuple group, final Timestamp timestamp, final boolean lower) {
170 final TreeMap<Timestamp, CumulativeAggregate<Domain, Accumulator, AggregateResult>> entryMap = this.aggregates
171 .get(group);
172 if (entryMap == null) {
173 return null;
174 } else {
175 CumulativeAggregate<Domain, Accumulator, AggregateResult> aggregate = null;
176 if (lower) {
177 final Entry<Timestamp, CumulativeAggregate<Domain, Accumulator, AggregateResult>> lowerEntry = entryMap
178 .lowerEntry(timestamp);
179 if (lowerEntry != null) {
180 aggregate = lowerEntry.getValue();
181 }
182 } else {
183 aggregate = entryMap.get(timestamp);
184 }
185 if (aggregate == null) {
186 return null;
187 } else {
188 return aggregate.cachedResult;
189 }
190 }
191 }
192
193 @Override
194 protected void gcAggregates(final CumulativeAggregate<Domain, Accumulator, AggregateResult> aggregate,
195 final Tuple group, final Timestamp timestamp) {
196 if (operator.isNeutral(aggregate.positive) && aggregate.negative.isEmpty()) {
197 final TreeMap<Timestamp, CumulativeAggregate<Domain, Accumulator, AggregateResult>> groupAggregates = this.aggregates
198 .get(group);
199 groupAggregates.remove(timestamp);
200 if (groupAggregates.isEmpty()) {
201 this.aggregates.remove(group);
202 }
203 }
204 }
205
206 @Override
207 protected CumulativeAggregate<Domain, Accumulator, AggregateResult> getAggregate(final Tuple group,
208 final Timestamp timestamp) {
209 final TreeMap<Timestamp, CumulativeAggregate<Domain, Accumulator, AggregateResult>> groupAggregates = this.aggregates
210 .computeIfAbsent(group, k -> CollectionsFactory.createTreeMap());
211 return groupAggregates.computeIfAbsent(timestamp, k -> {
212 final CumulativeAggregate<Domain, Accumulator, AggregateResult> aggregate = new CumulativeAggregate<>();
213 aggregate.positive = operator.createNeutral();
214 return aggregate;
215 });
216 }
217
218 @Override
219 public AggregateResult getAggregateResult(final Tuple group) {
220 final TreeMap<Timestamp, CumulativeAggregate<Domain, Accumulator, AggregateResult>> groupAggregates = this.aggregates
221 .get(group);
222 if (groupAggregates != null) {
223 final Entry<Timestamp, CumulativeAggregate<Domain, Accumulator, AggregateResult>> lastEntry = groupAggregates
224 .lastEntry();
225 return lastEntry.getValue().cachedResult;
226 } else {
227 return NEUTRAL;
228 }
229 }
230
231 protected static class CumulativeAggregate<Domain, Accumulator, AggregateResult> {
232 protected Accumulator positive;
233 protected IDeltaBag<Domain> negative;
234 protected AggregateResult cachedResult;
235
236 protected CumulativeAggregate() {
237 this.negative = CollectionsFactory.createDeltaBag();
238 }
239
240 @Override
241 public String toString() {
242 return "positive=" + positive + " negative=" + negative + " cachedResult=" + cachedResult;
243 }
244 }
245
246 protected static class FoldingState<Domain, AggregateResult>
247 implements MergeableFoldingState<FoldingState<Domain, AggregateResult>> {
248 protected IDeltaBag<Domain> delta;
249 protected AggregateResult oldResult;
250 protected AggregateResult newResult;
251
252 protected FoldingState() {
253 this.delta = CollectionsFactory.createDeltaBag();
254 }
255
256 @Override
257 public String toString() {
258 return "delta=" + delta + " oldResult=" + oldResult + " newResult=" + newResult;
259 }
260
261 /**
262 * The returned result will never be null, even if the resulting delta set is empty.
263 */
264 @Override
265 public FoldingState<Domain, AggregateResult> merge(final FoldingState<Domain, AggregateResult> that) {
266 Preconditions.checkArgument(that != null);
267 // 'this' was the previously registered folding state
268 // 'that' is the new folding state being pushed upwards
269 final FoldingState<Domain, AggregateResult> result = new FoldingState<Domain, AggregateResult>();
270 this.delta.forEachEntryWithMultiplicities((d, m) -> result.delta.addSigned(d, m));
271 that.delta.forEachEntryWithMultiplicities((d, m) -> result.delta.addSigned(d, m));
272 result.oldResult = this.oldResult;
273 result.newResult = that.newResult;
274 return result;
275 }
276
277 }
278
279}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulTimelyColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulTimelyColumnAggregatorNode.java
new file mode 100644
index 00000000..8fe9a4e9
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FaithfulTimelyColumnAggregatorNode.java
@@ -0,0 +1,247 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation.timely;
10
11import java.util.Collections;
12import java.util.Map;
13import java.util.Map.Entry;
14import java.util.Objects;
15import java.util.TreeMap;
16
17import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.Signed;
22import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timelines;
25import tools.refinery.viatra.runtime.rete.aggregation.AbstractColumnAggregatorNode;
26import tools.refinery.viatra.runtime.rete.aggregation.GroupedMap;
27import tools.refinery.viatra.runtime.rete.aggregation.timely.FaithfulTimelyColumnAggregatorNode.MergeableFoldingState;
28import tools.refinery.viatra.runtime.rete.network.ReteContainer;
29import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
30import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
31import tools.refinery.viatra.runtime.rete.network.communication.timely.ResumableNode;
32import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
33import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
34
35/**
36 * Faithful timely implementation of the column aggregator node. Complete timelines (series of appearance &
37 * disappearance) are maintained for tuples. <br>
38 * <br>
39 * Subclasses are responsible for implementing the aggregator architecture, and they must use the CumulativeAggregate
40 * type parameter for that. <br>
41 * <br>
42 * This node supports recursive aggregation.
43 *
44 * @author Tamas Szabo
45 * @since 2.4
46 */
47public abstract class FaithfulTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult, CumulativeAggregate, FoldingState extends MergeableFoldingState<FoldingState>>
48 extends AbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult> implements ResumableNode {
49
50 protected final Map<Tuple, TreeMap<Timestamp, CumulativeAggregate>> aggregates;
51 protected final Map<Tuple, Map<AggregateResult, Timeline<Timestamp>>> timelines;
52 protected final TreeMap<Timestamp, Map<Tuple, FoldingState>> foldingState;
53 protected CommunicationGroup communicationGroup;
54
55 public FaithfulTimelyColumnAggregatorNode(final ReteContainer reteContainer,
56 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
57 final TupleMask groupMask, final TupleMask columnMask) {
58 super(reteContainer, operator, groupMask, columnMask);
59 this.aggregates = CollectionsFactory.createMap();
60 this.timelines = CollectionsFactory.createMap();
61 this.foldingState = CollectionsFactory.createTreeMap();
62 // mailbox MUST be instantiated after the fields are all set
63 this.mailbox = instantiateMailbox();
64 }
65
66 @Override
67 protected Mailbox instantiateMailbox() {
68 return new TimelyMailbox(this, this.reteContainer);
69 }
70
71 @Override
72 public void clear() {
73 this.mailbox.clear();
74 this.aggregates.clear();
75 this.timelines.clear();
76 this.children.clear();
77 this.childMailboxes.clear();
78 this.foldingState.clear();
79 }
80
81 /**
82 * Registers the given folding state for the specified timestamp and tuple. If there is already a state stored, the
83 * two states will be merged together.
84 *
85 *
86 */
87 protected void addFoldingState(final Tuple group, final FoldingState state, final Timestamp timestamp) {
88 // assert !state.delta.isEmpty();
89 final Map<Tuple, FoldingState> tupleMap = this.foldingState.computeIfAbsent(timestamp,
90 k -> CollectionsFactory.createMap());
91 tupleMap.compute(group, (k, v) -> {
92 return v == null ? state : v.merge(state);
93 });
94 }
95
96 @Override
97 public Timestamp getResumableTimestamp() {
98 if (this.foldingState.isEmpty()) {
99 return null;
100 } else {
101 return this.foldingState.firstKey();
102 }
103 }
104
105 @Override
106 public void resumeAt(final Timestamp timestamp) {
107 Timestamp current = this.getResumableTimestamp();
108 if (current == null) {
109 throw new IllegalStateException("There is nothing to fold!");
110 } else if (current.compareTo(timestamp) != 0) {
111 throw new IllegalStateException("Expected to continue folding at " + timestamp + "!");
112 }
113
114 final Map<Tuple, FoldingState> tupleMap = this.foldingState.remove(timestamp);
115 for (final Entry<Tuple, FoldingState> groupEntry : tupleMap.entrySet()) {
116 final Tuple group = groupEntry.getKey();
117 final FoldingState value = groupEntry.getValue();
118 final Map<AggregateResult, Diff<Timestamp>> diffMap = doFoldingStep(group, value, timestamp);
119 for (final Entry<AggregateResult, Diff<Timestamp>> resultEntry : diffMap.entrySet()) {
120 for (final Signed<Timestamp> signed : resultEntry.getValue()) {
121 propagate(signed.getDirection(), group, resultEntry.getKey(), signed.getPayload());
122 }
123 }
124 }
125
126 final Timestamp nextTimestamp = this.getResumableTimestamp();
127 if (Objects.equals(timestamp, nextTimestamp)) {
128 throw new IllegalStateException(
129 "Folding at " + timestamp + " produced more folding work at the same timestamp!");
130 } else if (nextTimestamp != null) {
131 this.communicationGroup.notifyHasMessage(this.mailbox, nextTimestamp);
132 }
133 }
134
135 protected abstract Map<AggregateResult, Diff<Timestamp>> doFoldingStep(final Tuple group, final FoldingState state,
136 final Timestamp timestamp);
137
138 /**
139 * Updates and garbage collects the timeline of the given tuple based on the given diffs.
140 */
141 protected void updateTimeline(final Tuple group, final Map<AggregateResult, Diff<Timestamp>> diffs) {
142 if (!diffs.isEmpty()) {
143 this.timelines.compute(group, (k, resultTimelines) -> {
144 if (resultTimelines == null) {
145 resultTimelines = CollectionsFactory.createMap();
146 }
147 for (final Entry<AggregateResult, Diff<Timestamp>> entry : diffs.entrySet()) {
148 final AggregateResult result = entry.getKey();
149 resultTimelines.compute(result, (k2, oldResultTimeline) -> {
150 final Diff<Timestamp> currentResultDiffs = entry.getValue();
151 if (oldResultTimeline == null) {
152 oldResultTimeline = getInitialTimeline(result);
153 }
154 final Timeline<Timestamp> timeline = oldResultTimeline.mergeAdditive(currentResultDiffs);
155 if (timeline.isEmpty()) {
156 return null;
157 } else {
158 return timeline;
159 }
160 });
161 }
162 if (resultTimelines.isEmpty()) {
163 return null;
164 } else {
165 return resultTimelines;
166 }
167 });
168 }
169 }
170
171 /**
172 * Garbage collects the counter of the given group and timestamp if the bag of aggregands is empty.
173 */
174 protected abstract void gcAggregates(final CumulativeAggregate aggregate, final Tuple group,
175 final Timestamp timestamp);
176
177 /**
178 * On-demand initializes and returns the aggregate for the given group and timestamp.
179 */
180 protected abstract CumulativeAggregate getAggregate(final Tuple group, final Timestamp timestamp);
181
182 protected static final Timeline<Timestamp> NEUTRAL_INITIAL_TIMELINE = Timestamp.INSERT_AT_ZERO_TIMELINE;
183 protected static final Timeline<Timestamp> NON_NEUTRAL_INITIAL_TIMELINE = Timelines.createEmpty();
184
185 protected Timeline<Timestamp> getInitialTimeline(final AggregateResult result) {
186 if (NEUTRAL == result) {
187 return NEUTRAL_INITIAL_TIMELINE;
188 } else {
189 return NON_NEUTRAL_INITIAL_TIMELINE;
190 }
191 }
192
193 protected static <AggregateResult> void appendDiff(final AggregateResult result, final Signed<Timestamp> diff,
194 final Map<AggregateResult, Diff<Timestamp>> diffs) {
195 if (result != null) {
196 diffs.compute(result, (k, timeLineDiff) -> {
197 if (timeLineDiff == null) {
198 timeLineDiff = new Diff<>();
199 }
200 timeLineDiff.add(diff);
201 return timeLineDiff;
202 });
203 }
204 }
205
206 @Override
207 public Tuple getAggregateTuple(final Tuple group) {
208 return tupleFromAggregateResult(group, getAggregateResult(group));
209 }
210
211 @Override
212 public Map<AggregateResult, Timeline<Timestamp>> getAggregateResultTimeline(final Tuple group) {
213 final Map<AggregateResult, Timeline<Timestamp>> resultTimelines = this.timelines.get(group);
214 if (resultTimelines == null) {
215 if (NEUTRAL == null) {
216 return Collections.emptyMap();
217 } else {
218 return Collections.singletonMap(NEUTRAL, NEUTRAL_INITIAL_TIMELINE);
219 }
220 } else {
221 return resultTimelines;
222 }
223 }
224
225 @Override
226 public Map<Tuple, Timeline<Timestamp>> getAggregateTupleTimeline(final Tuple group) {
227 final Map<AggregateResult, Timeline<Timestamp>> resultTimelines = getAggregateResultTimeline(group);
228 return new GroupedMap<AggregateResult, Timeline<Timestamp>>(group, resultTimelines, this.runtimeContext);
229 }
230
231 @Override
232 public CommunicationGroup getCurrentGroup() {
233 return communicationGroup;
234 }
235
236 @Override
237 public void setCurrentGroup(final CommunicationGroup currentGroup) {
238 this.communicationGroup = currentGroup;
239 }
240
241 protected interface MergeableFoldingState<T> {
242
243 public abstract T merge(final T that);
244
245 }
246
247} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyParallelTimelyColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyParallelTimelyColumnAggregatorNode.java
new file mode 100644
index 00000000..733d2585
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyParallelTimelyColumnAggregatorNode.java
@@ -0,0 +1,106 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation.timely;
10
11import java.util.Map.Entry;
12import java.util.TreeMap;
13
14import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20
21/**
22 * First-only column aggregator with parallel aggregation architecture.
23 *
24 * @author Tamas Szabo
25 * @since 2.4
26 */
27public class FirstOnlyParallelTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult>
28 extends FirstOnlyTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult> {
29
30 public FirstOnlyParallelTimelyColumnAggregatorNode(final ReteContainer reteContainer,
31 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
32 final TupleMask groupMask, final TupleMask columnMask) {
33 super(reteContainer, operator, groupMask, columnMask);
34 }
35
36 /**
37 * Accumulator gets modified at the input timestamp and at all higher timestamps. Folding cannot be interrupted if
38 * the new aggregate result is the same as the old at an intermediate timestamp because aggregands need to be copied
39 * over to all accumulators at the higher timestamps.
40 */
41 @Override
42 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
43 final Tuple group = groupMask.transform(update);
44 final Tuple value = columnMask.transform(update);
45 @SuppressWarnings("unchecked")
46 final Domain aggregand = (Domain) runtimeContext.unwrapElement(value.get(0));
47 final boolean isInsertion = direction == Direction.INSERT;
48
49 final AggregateResult previousResult = getResultRaw(group, timestamp, true);
50
51 Accumulator oldAccumulator = getAccumulator(group, timestamp);
52 AggregateResult oldResult = operator.getAggregate(oldAccumulator);
53
54 Accumulator newAccumulator = operator.update(oldAccumulator, aggregand, isInsertion);
55 AggregateResult newResult = operator.getAggregate(newAccumulator);
56
57 storeIfNotNeutral(group, newAccumulator, newResult, timestamp);
58
59 propagateWithChecks(group, timestamp, previousResult, previousResult, oldResult, newResult);
60
61 AggregateResult previousOldResult = oldResult;
62 AggregateResult previousNewResult = newResult;
63 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> groupEntries = this.memory
64 .get(group);
65
66 Timestamp currentTimestamp = groupEntries == null ? null : groupEntries.higherKey(timestamp);
67
68 while (currentTimestamp != null) {
69 final CumulativeAggregate<Accumulator, AggregateResult> groupEntry = groupEntries.get(currentTimestamp);
70 oldResult = groupEntry.result;
71 oldAccumulator = groupEntry.accumulator;
72 newAccumulator = operator.update(oldAccumulator, aggregand, isInsertion);
73 newResult = operator.getAggregate(newAccumulator);
74
75 storeIfNotNeutral(group, newAccumulator, newResult, currentTimestamp);
76
77 propagateWithChecks(group, currentTimestamp, previousOldResult, previousNewResult, oldResult, newResult);
78
79 previousOldResult = oldResult;
80 previousNewResult = newResult;
81 currentTimestamp = groupEntries.higherKey(currentTimestamp);
82 }
83 }
84
85 @Override
86 protected Accumulator getAccumulator(final Tuple group, final Timestamp timestamp) {
87 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> entryMap = this.memory.get(group);
88 if (entryMap == null) {
89 return operator.createNeutral();
90 } else {
91 final CumulativeAggregate<Accumulator, AggregateResult> entry = entryMap.get(timestamp);
92 if (entry == null) {
93 final Entry<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> lowerEntry = entryMap
94 .lowerEntry(timestamp);
95 if (lowerEntry == null) {
96 return operator.createNeutral();
97 } else {
98 return operator.clone(lowerEntry.getValue().accumulator);
99 }
100 } else {
101 return entry.accumulator;
102 }
103 }
104 }
105
106}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlySequentialTimelyColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlySequentialTimelyColumnAggregatorNode.java
new file mode 100644
index 00000000..79197aac
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlySequentialTimelyColumnAggregatorNode.java
@@ -0,0 +1,117 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation.timely;
10
11import java.util.Objects;
12import java.util.TreeMap;
13
14import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20
21/**
22 * First-only column aggregator with sequential aggregation architecture.
23 *
24 * @author Tamas Szabo
25 * @since 2.4
26 */
27public class FirstOnlySequentialTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult>
28 extends FirstOnlyTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult> {
29
30 public FirstOnlySequentialTimelyColumnAggregatorNode(final ReteContainer reteContainer,
31 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
32 final TupleMask groupMask, final TupleMask columnMask) {
33 super(reteContainer, operator, groupMask, columnMask);
34 }
35
36 /**
37 * Accumulator gets modified only at the timestamp where the update happened. During the folding, accumulators are
38 * never changed at higher timestamps. Aggregate results at higher timestamps may change due to the change at the
39 * input timestamp. Uniqueness enforcement may require from aggregate results to jump up/down on demand during the
40 * folding.
41 */
42 @Override
43 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
44 final Tuple group = groupMask.transform(update);
45 final Tuple value = columnMask.transform(update);
46 @SuppressWarnings("unchecked")
47 final Domain aggregand = (Domain) runtimeContext.unwrapElement(value.get(0));
48 final boolean isInsertion = direction == Direction.INSERT;
49
50 final AggregateResult previousResult = getResultRaw(group, timestamp, true);
51
52 final Accumulator oldAccumulator = getAccumulator(group, timestamp);
53 final AggregateResult oldResult = previousResult == null ? operator.getAggregate(oldAccumulator)
54 : operator.combine(previousResult, oldAccumulator);
55
56 final Accumulator newAccumulator = operator.update(oldAccumulator, aggregand, isInsertion);
57 final AggregateResult newResult = previousResult == null ? operator.getAggregate(newAccumulator)
58 : operator.combine(previousResult, newAccumulator);
59
60 storeIfNotNeutral(group, newAccumulator, newResult, timestamp);
61
62 propagateWithChecks(group, timestamp, previousResult, previousResult, oldResult, newResult);
63
64 // fold up the state towards higher timestamps
65 if (!Objects.equals(oldResult, newResult)) {
66 AggregateResult previousOldResult = oldResult;
67 AggregateResult previousNewResult = newResult;
68 AggregateResult currentOldResult = null;
69 AggregateResult currentNewResult = null;
70 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> groupEntries = this.memory
71 .get(group);
72
73 Timestamp currentTimestamp = groupEntries == null ? null : groupEntries.higherKey(timestamp);
74
75 while (currentTimestamp != null) {
76 // they cannot be the same, otherwise we would not even be here
77 assert !Objects.equals(previousOldResult, previousNewResult);
78
79 final Accumulator accumulator = getAccumulator(group, currentTimestamp);
80 currentOldResult = groupEntries.get(currentTimestamp).result;
81 currentNewResult = operator.combine(previousNewResult, accumulator);
82
83 // otherwise we would not be iterating over this timestamp
84 assert !operator.isNeutral(accumulator);
85
86 propagateWithChecks(group, currentTimestamp, previousOldResult, previousNewResult, currentOldResult,
87 currentNewResult);
88
89 if (!Objects.equals(currentOldResult, currentNewResult)) {
90 storeIfNotNeutral(group, accumulator, currentNewResult, currentTimestamp);
91 previousOldResult = currentOldResult;
92 previousNewResult = currentNewResult;
93 currentTimestamp = groupEntries.higherKey(currentTimestamp);
94 } else {
95 // we can stop the folding from here
96 break;
97 }
98 }
99 }
100 }
101
102 @Override
103 protected Accumulator getAccumulator(final Tuple group, final Timestamp timestamp) {
104 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> entryMap = this.memory.get(group);
105 if (entryMap == null) {
106 return operator.createNeutral();
107 } else {
108 final CumulativeAggregate<Accumulator, AggregateResult> entry = entryMap.get(timestamp);
109 if (entry == null) {
110 return operator.createNeutral();
111 } else {
112 return entry.accumulator;
113 }
114 }
115 }
116
117}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyTimelyColumnAggregatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyTimelyColumnAggregatorNode.java
new file mode 100644
index 00000000..0c73000e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/aggregation/timely/FirstOnlyTimelyColumnAggregatorNode.java
@@ -0,0 +1,212 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.aggregation.timely;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Map;
14import java.util.Map.Entry;
15import java.util.Objects;
16import java.util.TreeMap;
17
18import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
20import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
21import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
22import tools.refinery.viatra.runtime.matchers.util.Direction;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timelines;
25import tools.refinery.viatra.runtime.rete.aggregation.AbstractColumnAggregatorNode;
26import tools.refinery.viatra.runtime.rete.aggregation.GroupedMap;
27import tools.refinery.viatra.runtime.rete.network.ReteContainer;
28import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
29import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
30import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
31
32/**
33 * First-only timely implementation of the column aggregator node. Only timestamps of appearance are maintained for
34 * tuples instead of complete timelines.
35 * <br><br>
36 * Subclasses are responsible for implementing the aggregator architecture, and they must make use of the inner class {@link CumulativeAggregate}.
37 * <br><br>
38 * This node supports recursive aggregation.
39 *
40 * @author Tamas Szabo
41 * @since 2.4
42 */
43public abstract class FirstOnlyTimelyColumnAggregatorNode<Domain, Accumulator, AggregateResult>
44 extends AbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult> {
45
46 protected final Map<Tuple, TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>>> memory;
47
48 public FirstOnlyTimelyColumnAggregatorNode(final ReteContainer reteContainer,
49 final IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator,
50 final TupleMask groupMask, final TupleMask columnMask) {
51 super(reteContainer, operator, groupMask, columnMask);
52 this.memory = CollectionsFactory.createMap();
53 // mailbox MUST be instantiated after the fields are all set
54 this.mailbox = instantiateMailbox();
55 }
56
57 protected static class CumulativeAggregate<Accumulator, AggregateResult> {
58 // the accumulator storing the aggregands
59 protected Accumulator accumulator;
60 // the aggregate result at the timestamp where this cumulative aggregate is stored
61 protected AggregateResult result;
62
63 private CumulativeAggregate(final Accumulator accumulator, final AggregateResult result) {
64 this.accumulator = accumulator;
65 this.result = result;
66 }
67
68 }
69
70 public Collection<Tuple> getGroups() {
71 return this.memory.keySet();
72 }
73
74 public AggregateResult getLastResult(final Tuple group) {
75 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> groupMap = this.memory.get(group);
76 if (groupMap == null) {
77 return null;
78 } else {
79 return groupMap.lastEntry().getValue().result;
80 }
81 }
82
83 public Timestamp getLastTimestamp(final Tuple group) {
84 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> groupMap = this.memory.get(group);
85 if (groupMap == null) {
86 return null;
87 } else {
88 return groupMap.lastEntry().getKey();
89 }
90 }
91
92 @Override
93 protected Mailbox instantiateMailbox() {
94 return new TimelyMailbox(this, this.reteContainer);
95 }
96
97 @Override
98 public void clear() {
99 this.mailbox.clear();
100 this.memory.clear();
101 this.children.clear();
102 this.childMailboxes.clear();
103 }
104
105 protected void propagateWithChecks(final Tuple group, final Timestamp timestamp,
106 final AggregateResult previousOldResult, final AggregateResult previousNewResult,
107 final AggregateResult currentOldResult, final AggregateResult currentNewResult) {
108 final boolean jumpDown = Objects.equals(previousNewResult, currentOldResult);
109 final boolean jumpUp = Objects.equals(previousOldResult, currentNewResult);
110 final boolean resultsDiffer = !Objects.equals(currentOldResult, currentNewResult);
111
112 // uniqueness enforcement is happening here
113 if ((resultsDiffer || jumpDown) && !Objects.equals(previousOldResult, currentOldResult)) {
114 propagate(Direction.DELETE, group, currentOldResult, timestamp);
115 }
116 if ((resultsDiffer || jumpUp) && !Objects.equals(previousNewResult, currentNewResult)) {
117 propagate(Direction.INSERT, group, currentNewResult, timestamp);
118 }
119 }
120
121 /**
122 * Returns the aggregation architecture-specific accumulator at the specified timestamp for the given group.
123 */
124 protected abstract Accumulator getAccumulator(final Tuple group, final Timestamp timestamp);
125
126 protected AggregateResult getResultRaw(final Tuple group, final Timestamp timestamp, final boolean lower) {
127 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> entryMap = this.memory.get(group);
128 if (entryMap == null) {
129 return null;
130 } else {
131 CumulativeAggregate<Accumulator, AggregateResult> entry = null;
132 if (lower) {
133 final Entry<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> lowerEntry = entryMap
134 .lowerEntry(timestamp);
135 if (lowerEntry != null) {
136 entry = lowerEntry.getValue();
137 }
138 } else {
139 entry = entryMap.get(timestamp);
140 }
141 if (entry == null) {
142 return null;
143 } else {
144 return entry.result;
145 }
146 }
147 }
148
149 protected AggregateResult getResult(final Tuple group, final Timestamp timestamp, final boolean lower) {
150 final AggregateResult result = getResultRaw(group, timestamp, lower);
151 if (result == null) {
152 return NEUTRAL;
153 } else {
154 return result;
155 }
156 }
157
158 protected AggregateResult getResult(final Tuple group, final Timestamp timestamp) {
159 return getResult(group, timestamp, false);
160 }
161
162 protected void storeIfNotNeutral(final Tuple group, final Accumulator accumulator, final AggregateResult value,
163 final Timestamp timestamp) {
164 TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> entryMap = this.memory.get(group);
165 if (operator.isNeutral(accumulator)) {
166 if (entryMap != null) {
167 entryMap.remove(timestamp);
168 if (entryMap.isEmpty()) {
169 this.memory.remove(group);
170 }
171 }
172 } else {
173 if (entryMap == null) {
174 entryMap = CollectionsFactory.createTreeMap();
175 this.memory.put(group, entryMap);
176 }
177 entryMap.put(timestamp, new CumulativeAggregate<>(accumulator, value));
178 }
179 }
180
181 @Override
182 public Tuple getAggregateTuple(final Tuple group) {
183 return tupleFromAggregateResult(group, getResult(group, Timestamp.ZERO));
184 }
185
186 @Override
187 public AggregateResult getAggregateResult(final Tuple group) {
188 return getResult(group, Timestamp.ZERO);
189 }
190
191 @Override
192 public Map<AggregateResult, Timeline<Timestamp>> getAggregateResultTimeline(final Tuple group) {
193 final TreeMap<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> entryMap = this.memory.get(group);
194 if (entryMap == null) {
195 return Collections.emptyMap();
196 } else {
197 final Map<AggregateResult, Timeline<Timestamp>> result = CollectionsFactory.createMap();
198 for (final Entry<Timestamp, CumulativeAggregate<Accumulator, AggregateResult>> entry : entryMap
199 .descendingMap().entrySet()) {
200 result.put(entry.getValue().result, Timelines.createFrom(entry.getKey()));
201 }
202 return result;
203 }
204 }
205
206 @Override
207 public Map<Tuple, Timeline<Timestamp>> getAggregateTupleTimeline(final Tuple group) {
208 final Map<AggregateResult, Timeline<Timestamp>> resultTimelines = getAggregateResultTimeline(group);
209 return new GroupedMap<AggregateResult, Timeline<Timestamp>>(group, resultTimelines, this.runtimeContext);
210 }
211
212}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/Disconnectable.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/Disconnectable.java
new file mode 100644
index 00000000..7bbf74ea
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/Disconnectable.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.boundary;
11
12/**
13 * For objects that connect a RETE implementation to the underlying model.
14 *
15 * @author Gabor Bergmann
16 *
17 */
18public interface Disconnectable {
19
20 /**
21 * Disconnects this rete engine component from the underlying model. Disconnecting enables the garbage collection
22 * mechanisms to dispose of the rete network.
23 */
24 void disconnect();
25
26}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputEnumeratorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputEnumeratorNode.java
new file mode 100644
index 00000000..51f89b52
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputEnumeratorNode.java
@@ -0,0 +1,209 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.boundary;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.context.IInputKey;
16import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
17import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
18import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContextListener;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
20import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
21import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
22import tools.refinery.viatra.runtime.matchers.util.Direction;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
24import tools.refinery.viatra.runtime.rete.matcher.ReteEngine;
25import tools.refinery.viatra.runtime.rete.network.Network;
26import tools.refinery.viatra.runtime.rete.network.Receiver;
27import tools.refinery.viatra.runtime.rete.network.ReteContainer;
28import tools.refinery.viatra.runtime.rete.network.StandardNode;
29import tools.refinery.viatra.runtime.rete.network.Supplier;
30import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
31import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
32import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
33import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
34import tools.refinery.viatra.runtime.rete.remote.Address;
35
36/**
37 * An input node representing an enumerable extensional input relation and receiving external updates.
38 *
39 * <p>
40 * Contains those tuples that are in the extensional relation identified by the input key, and also conform to the
41 * global seed (if any).
42 *
43 * @author Bergmann Gabor
44 *
45 */
46public class ExternalInputEnumeratorNode extends StandardNode
47 implements Disconnectable, Receiver, IQueryRuntimeContextListener {
48
49 private IQueryRuntimeContext context = null;
50 private IInputKey inputKey;
51 private Tuple globalSeed;
52 private InputConnector inputConnector;
53 private Network network;
54 private Address<? extends Receiver> myAddress;
55 private boolean parallelExecutionEnabled;
56 /**
57 * @since 1.6
58 */
59 protected final Mailbox mailbox;
60 private final IQueryBackendContext qBackendContext;
61
62 public ExternalInputEnumeratorNode(ReteContainer reteContainer) {
63 super(reteContainer);
64 myAddress = Address.of(this);
65 network = reteContainer.getNetwork();
66 inputConnector = network.getInputConnector();
67 qBackendContext = network.getEngine().getBackendContext();
68 mailbox = instantiateMailbox();
69 reteContainer.registerClearable(mailbox);
70 }
71
72 /**
73 * Instantiates the {@link Mailbox} of this receiver. Subclasses may override this method to provide their own
74 * mailbox implementation.
75 *
76 * @return the mailbox
77 * @since 2.0
78 */
79 protected Mailbox instantiateMailbox() {
80 if (this.reteContainer.isTimelyEvaluation()) {
81 return new TimelyMailbox(this, this.reteContainer);
82 } else {
83 return new BehaviorChangingMailbox(this, this.reteContainer);
84 }
85 }
86
87 @Override
88 public Mailbox getMailbox() {
89 return this.mailbox;
90 }
91
92 public void connectThroughContext(ReteEngine engine, IInputKey inputKey, Tuple globalSeed) {
93 this.inputKey = inputKey;
94 this.globalSeed = globalSeed;
95 setTag(inputKey);
96
97 final IQueryRuntimeContext context = engine.getRuntimeContext();
98 if (!context.getMetaContext().isEnumerable(inputKey))
99 throw new IllegalArgumentException(this.getClass().getSimpleName()
100 + " only applicable for enumerable input keys; received instead " + inputKey);
101
102 this.context = context;
103 this.parallelExecutionEnabled = engine.isParallelExecutionEnabled();
104
105 engine.addDisconnectable(this);
106 context.addUpdateListener(inputKey, globalSeed, this);
107 }
108
109 @Override
110 public void disconnect() {
111 if (context != null) { // if connected
112 context.removeUpdateListener(inputKey, globalSeed, this);
113 context = null;
114 }
115 }
116
117 /**
118 * @since 2.2
119 */
120 protected Iterable<Tuple> getTuplesInternal() {
121 Iterable<Tuple> tuples = null;
122
123 if (context != null) { // if connected
124 if (globalSeed == null) {
125 tuples = context.enumerateTuples(inputKey, TupleMask.empty(inputKey.getArity()),
126 Tuples.staticArityFlatTupleOf());
127 } else {
128 final TupleMask mask = TupleMask.fromNonNullIndices(globalSeed);
129 tuples = context.enumerateTuples(inputKey, mask, mask.transform(globalSeed));
130 }
131 }
132
133 return tuples;
134 }
135
136 @Override
137 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
138 final Iterable<Tuple> tuples = getTuplesInternal();
139 if (tuples != null) {
140 for (final Tuple tuple : tuples) {
141 collector.add(tuple);
142 }
143 }
144 }
145
146 @Override
147 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
148 final Iterable<Tuple> tuples = getTuplesInternal();
149 if (tuples != null) {
150 for (final Tuple tuple : tuples) {
151 collector.put(tuple, Timestamp.INSERT_AT_ZERO_TIMELINE);
152 }
153 }
154 }
155
156 /* Update from runtime context */
157 @Override
158 public void update(IInputKey key, Tuple update, boolean isInsertion) {
159 if (parallelExecutionEnabled) {
160 // send back to myself as an official external update, and then propagate it transparently
161 network.sendExternalUpdate(myAddress, direction(isInsertion), update);
162 } else {
163 if (qBackendContext.areUpdatesDelayed()) {
164 // post the update into the mailbox of the node
165 mailbox.postMessage(direction(isInsertion), update, Timestamp.ZERO);
166 } else {
167 // just propagate the input
168 update(direction(isInsertion), update, Timestamp.ZERO);
169 }
170 // if the the update method is called from within a delayed execution,
171 // the following invocation will be a no-op
172 network.waitForReteTermination();
173 }
174 }
175
176 private static Direction direction(boolean isInsertion) {
177 return isInsertion ? Direction.INSERT : Direction.DELETE;
178 }
179
180 /* Self-addressed from network */
181 @Override
182 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
183 propagateUpdate(direction, updateElement, timestamp);
184 }
185
186 @Override
187 public void appendParent(Supplier supplier) {
188 throw new UnsupportedOperationException("Input nodes can't have parents");
189 }
190
191 @Override
192 public void removeParent(Supplier supplier) {
193 throw new UnsupportedOperationException("Input nodes can't have parents");
194 }
195
196 @Override
197 public Collection<Supplier> getParents() {
198 return Collections.emptySet();
199 }
200
201 public IInputKey getInputKey() {
202 return inputKey;
203 }
204
205 public Tuple getGlobalSeed() {
206 return globalSeed;
207 }
208
209}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputStatelessFilterNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputStatelessFilterNode.java
new file mode 100644
index 00000000..57e06911
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ExternalInputStatelessFilterNode.java
@@ -0,0 +1,68 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.boundary;
10
11import tools.refinery.viatra.runtime.matchers.context.IInputKey;
12import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
15import tools.refinery.viatra.runtime.rete.matcher.ReteEngine;
16import tools.refinery.viatra.runtime.rete.network.ReteContainer;
17import tools.refinery.viatra.runtime.rete.single.FilterNode;
18
19/**
20 * A filter node representing a (stateless, typically non-enumerable) extensional input relation.
21 *
22 * <p> Contains those tuples of its parents, that (when transformed by a mask, if given) are present in the extensional relation identified by the input key.
23 *
24 * @author Bergmann Gabor
25 *
26 */
27public class ExternalInputStatelessFilterNode extends FilterNode implements Disconnectable {
28
29 IQueryRuntimeContext context = null;
30 IInputKey inputKey;
31 private InputConnector inputConnector;
32 private TupleMask mask;
33
34 public ExternalInputStatelessFilterNode(ReteContainer reteContainer, TupleMask mask) {
35 super(reteContainer);
36 this.mask = mask;
37 this.inputConnector = reteContainer.getNetwork().getInputConnector();
38 }
39
40 @Override
41 public boolean check(Tuple ps) {
42 if (mask != null)
43 ps = mask.transform(ps);
44 return context.containsTuple(inputKey, ps);
45 }
46
47
48 public void connectThroughContext(ReteEngine engine, IInputKey inputKey) {
49 this.inputKey = inputKey;
50 setTag(inputKey);
51
52 final IQueryRuntimeContext context = engine.getRuntimeContext();
53 if (!context.getMetaContext().isStateless(inputKey))
54 throw new IllegalArgumentException(
55 this.getClass().getSimpleName() +
56 " only applicable for stateless input keys; received instead " +
57 inputKey);
58
59 this.context = context;
60
61 engine.addDisconnectable(this);
62 }
63
64 @Override
65 public void disconnect() {
66 this.context = null;
67 }
68}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/InputConnector.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/InputConnector.java
new file mode 100644
index 00000000..c044850f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/InputConnector.java
@@ -0,0 +1,208 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.boundary;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Map;
14import java.util.stream.Stream;
15
16import tools.refinery.viatra.runtime.matchers.context.IInputKey;
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
19import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
20import tools.refinery.viatra.runtime.rete.network.Network;
21import tools.refinery.viatra.runtime.rete.network.Node;
22import tools.refinery.viatra.runtime.rete.recipes.InputFilterRecipe;
23import tools.refinery.viatra.runtime.rete.recipes.InputRecipe;
24import tools.refinery.viatra.runtime.rete.remote.Address;
25
26/**
27 * A class responsible for connecting input nodes to the runtime context.
28 *
29 * @author Bergmann Gabor
30 *
31 */
32public final class InputConnector {
33 Network network;
34
35 private Map<IInputKey, Map<Tuple, Address<ExternalInputEnumeratorNode>>> externalInputRoots = CollectionsFactory.createMap();
36
37// /*
38// * arity:1 used as simple entity constraints label is the object representing the type null label means all entities
39// * regardless of type (global supertype), if allowed
40// */
41// protected Map<Object, Address<? extends Tunnel>> unaryRoots = CollectionsFactory.getMap();
42// /*
43// * arity:3 (rel, from, to) used as VPM relation constraints null label means all relations regardless of type
44// * (global supertype)
45// */
46// protected Map<Object, Address<? extends Tunnel>> ternaryEdgeRoots = CollectionsFactory.getMap();
47// /*
48// * arity:2 (from, to) not used over VPM; can be used as EMF references for instance label is the object representing
49// * the type null label means all entities regardless of type if allowed (global supertype), if allowed
50// */
51// protected Map<Object, Address<? extends Tunnel>> binaryEdgeRoots = CollectionsFactory.getMap();
52//
53// protected Address<? extends Tunnel> containmentRoot = null;
54// protected Address<? extends Supplier> containmentTransitiveRoot = null;
55// protected Address<? extends Tunnel> instantiationRoot = null;
56// protected Address<? extends Supplier> instantiationTransitiveRoot = null;
57// protected Address<? extends Tunnel> generalizationRoot = null;
58// protected Address<? extends Supplier> generalizationTransitiveRoot = null;
59
60
61 public InputConnector(Network network) {
62 super();
63 this.network = network;
64 }
65
66
67 public Network getNetwork() {
68 return network;
69 }
70
71
72 /**
73 * Connects a given input filter node to the external input source.
74 */
75 public void connectInputFilter(InputFilterRecipe recipe, Node freshNode) {
76 final ExternalInputStatelessFilterNode inputNode = (ExternalInputStatelessFilterNode)freshNode;
77
78 IInputKey inputKey = (IInputKey) recipe.getInputKey();
79 inputNode.connectThroughContext(network.getEngine(), inputKey);
80 }
81
82
83 /**
84 * Connects a given input enumerator node to the external input source.
85 */
86 public void connectInput(InputRecipe recipe, Node freshNode) {
87 final ExternalInputEnumeratorNode inputNode = (ExternalInputEnumeratorNode)freshNode;
88
89 IInputKey inputKey = (IInputKey) recipe.getInputKey();
90 Tuple seed = nopSeed(inputKey); // no preseeding as of now
91 final Address<ExternalInputEnumeratorNode> freshAddress = Address.of(inputNode);
92 externalInputRoots.computeIfAbsent(inputKey, k -> CollectionsFactory.createMap()).put(seed, freshAddress);
93 inputNode.connectThroughContext(network.getEngine(), inputKey, seed);
94
95// final Address<Tunnel> freshAddress = Address.of((Tunnel)freshNode);
96// if (recipe instanceof TypeInputRecipe) {
97// final Object typeKey = ((TypeInputRecipe) recipe).getTypeKey();
98//
99// if (recipe instanceof UnaryInputRecipe) {
100// unaryRoots.put(typeKey, freshAddress);
101// new EntityFeeder(freshAddress, this, typeKey).feed();
102//// if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
103//// Collection<? extends Object> subTypes = context.enumerateDirectUnarySubtypes(typeObject);
104////
105//// for (Object subType : subTypes) {
106//// Address<? extends Tunnel> subRoot = accessUnaryRoot(subType);
107//// network.connectRemoteNodes(subRoot, tn, true);
108//// }
109//// }
110// } else if (recipe instanceof BinaryInputRecipe) {
111// binaryEdgeRoots.put(typeKey, freshAddress);
112// externalInputRoots.put(rowKey, columnKey, freshAddress);
113// new ReferenceFeeder(freshAddress, this, typeKey).feed();
114// // if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
115// // Collection<? extends Object> subTypes = context.enumerateDirectTernaryEdgeSubtypes(typeObject);
116// //
117// // for (Object subType : subTypes) {
118// // Address<? extends Tunnel> subRoot = accessTernaryEdgeRoot(subType);
119// // network.connectRemoteNodes(subRoot, tn, true);
120// // }
121// // }
122// }
123//
124//
125// }
126
127 }
128
129// /**
130// * fetches the entity Root node under specified label; returns null if it doesn't exist yet
131// */
132// public Address<? extends Tunnel> getUnaryRoot(Object label) {
133// return unaryRoots.get(label);
134// }
135//
136// public Collection<Address<? extends Tunnel>> getAllUnaryRoots() {
137// return unaryRoots.values();
138// }
139//
140// /**
141// * fetches the relation Root node under specified label; returns null if it doesn't exist yet
142// */
143// public Address<? extends Tunnel> getTernaryEdgeRoot(Object label) {
144// return ternaryEdgeRoots.get(label);
145// }
146//
147// public Collection<Address<? extends Tunnel>> getAllTernaryEdgeRoots() {
148// return ternaryEdgeRoots.values();
149// }
150//
151// /**
152// * fetches the reference Root node under specified label; returns null if it doesn't exist yet
153// */
154// public Address<? extends Tunnel> getBinaryEdgeRoot(Object label) {
155// return binaryEdgeRoots.get(label);
156// }
157//
158// public Collection<Address<? extends Tunnel>> getAllBinaryEdgeRoots() {
159// return binaryEdgeRoots.values();
160// }
161//
162//
163// public Address<? extends Tunnel> getContainmentRoot() {
164// return containmentRoot;
165// }
166//
167//
168// public Address<? extends Supplier> getContainmentTransitiveRoot() {
169// return containmentTransitiveRoot;
170// }
171//
172//
173// public Address<? extends Tunnel> getInstantiationRoot() {
174// return instantiationRoot;
175// }
176//
177//
178// public Address<? extends Supplier> getInstantiationTransitiveRoot() {
179// return instantiationTransitiveRoot;
180// }
181//
182//
183// public Address<? extends Tunnel> getGeneralizationRoot() {
184// return generalizationRoot;
185// }
186
187
188 public Stream<Address<ExternalInputEnumeratorNode>> getAllExternalInputNodes() {
189 return externalInputRoots.values().stream().flatMap(map -> map.values().stream());
190 }
191 public Collection<Address<ExternalInputEnumeratorNode>> getAllExternalInputNodesForKey(IInputKey inputKey) {
192 return externalInputRoots.getOrDefault(inputKey, Collections.emptyMap()).values();
193 }
194 public Address<ExternalInputEnumeratorNode> getExternalInputNodeForKeyUnseeded(IInputKey inputKey) {
195 return externalInputRoots.getOrDefault(inputKey, Collections.emptyMap()).get(nopSeed(inputKey));
196 }
197 public Address<ExternalInputEnumeratorNode> getExternalInputNode(IInputKey inputKey, Tuple seed) {
198 if (seed == null) seed = nopSeed(inputKey);
199 return externalInputRoots.getOrDefault(inputKey, Collections.emptyMap()).get(seed);
200 }
201
202
203 Tuple nopSeed(IInputKey inputKey) {
204 return Tuples.flatTupleOf(new Object[inputKey.getArity()]);
205 }
206
207
208}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ReteBoundary.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ReteBoundary.java
new file mode 100644
index 00000000..fe9c795e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/boundary/ReteBoundary.java
@@ -0,0 +1,551 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.boundary;
11
12import java.util.Collection;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
17import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
18import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.Direction;
22import tools.refinery.viatra.runtime.rete.matcher.ReteEngine;
23import tools.refinery.viatra.runtime.rete.network.Network;
24import tools.refinery.viatra.runtime.rete.network.ProductionNode;
25import tools.refinery.viatra.runtime.rete.network.Receiver;
26import tools.refinery.viatra.runtime.rete.network.ReteContainer;
27import tools.refinery.viatra.runtime.rete.network.Supplier;
28import tools.refinery.viatra.runtime.rete.remote.Address;
29import tools.refinery.viatra.runtime.rete.traceability.CompiledQuery;
30import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
31
32/**
33 * Responsible for the storage, maintenance and communication of the nodes of the network that are accessible form the
34 * outside for various reasons.
35 *
36 * @author Gabor Bergmann
37 *
38 * <p> TODO: should eventually be merged into {@link InputConnector} and deleted
39 *
40 */
41public class ReteBoundary /*implements IPatternMatcherRuntimeContextListener*/ {
42
43 protected ReteEngine engine;
44 protected Network network;
45 protected ReteContainer headContainer;
46
47 public ReteContainer getHeadContainer() {
48 return headContainer;
49 }
50
51 protected final InputConnector inputConnector;
52
53
54 protected Map<SubPlan, Address<? extends Supplier>> subplanToAddressMapping;
55
56
57 /**
58 * SubPlans of parent nodes that have the key node as their child. For RETE --> SubPlan traceability, mainly at production
59 * nodes.
60 */
61 protected Map<Address<? extends Receiver>, Set<SubPlan>> parentPlansOfReceiver;
62
63 /**
64 * Prerequisite: engine has its network and framework fields initialized
65 */
66 public ReteBoundary(ReteEngine engine) {
67 super();
68 this.engine = engine;
69 this.network = engine.getReteNet();
70 this.headContainer = network.getHeadContainer();
71 inputConnector = network.getInputConnector();
72
73 this.parentPlansOfReceiver = CollectionsFactory.createMap();
74
75 // productionsScoped = new HashMap<GTPattern, Map<Map<Integer,Scope>,Address<? extends Production>>>();
76 subplanToAddressMapping = CollectionsFactory.createMap();
77
78 }
79
80 public Collection<? extends RecipeTraceInfo> getAllProductionNodes() {
81 return engine.getCompiler().getCachedCompiledQueries().values();
82 }
83
84// /**
85// * accesses the entity Root node under specified label; creates the node if it doesn't exist yet
86// */
87// public Address<? extends Tunnel> accessUnaryRoot(Object typeObject) {
88// Address<? extends Tunnel> tn;
89// tn = unaryRoots.get(typeObject);
90// if (tn == null) {
91// tn = headContainer.getProvisioner().newUniquenessEnforcerNode(1, typeObject);
92// unaryRoots.put(typeObject, tn);
93//
94// new EntityFeeder(tn, context, network, this, typeObject).feed();
95//
96// if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
97// Collection<? extends Object> subTypes = context.enumerateDirectUnarySubtypes(typeObject);
98//
99// for (Object subType : subTypes) {
100// Address<? extends Tunnel> subRoot = accessUnaryRoot(subType);
101// network.connectRemoteNodes(subRoot, tn, true);
102// }
103// }
104//
105// }
106// return tn;
107// }
108//
109// /**
110// * accesses the relation Root node under specified label; creates the node if it doesn't exist yet
111// */
112// public Address<? extends Tunnel> accessTernaryEdgeRoot(Object typeObject) {
113// Address<? extends Tunnel> tn;
114// tn = ternaryEdgeRoots.get(typeObject);
115// if (tn == null) {
116// tn = headContainer.getProvisioner().newUniquenessEnforcerNode(3, typeObject);
117// ternaryEdgeRoots.put(typeObject, tn);
118//
119// new RelationFeeder(tn, context, network, this, typeObject).feed();
120//
121// if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
122// Collection<? extends Object> subTypes = context.enumerateDirectTernaryEdgeSubtypes(typeObject);
123//
124// for (Object subType : subTypes) {
125// Address<? extends Tunnel> subRoot = accessTernaryEdgeRoot(subType);
126// network.connectRemoteNodes(subRoot, tn, true);
127// }
128// }
129// }
130// return tn;
131// }
132//
133// /**
134// * accesses the reference Root node under specified label; creates the node if it doesn't exist yet
135// */
136// public Address<? extends Tunnel> accessBinaryEdgeRoot(Object typeObject) {
137// Address<? extends Tunnel> tn;
138// tn = binaryEdgeRoots.get(typeObject);
139// if (tn == null) {
140// tn = headContainer.getProvisioner().newUniquenessEnforcerNode(2, typeObject);
141// binaryEdgeRoots.put(typeObject, tn);
142//
143// new ReferenceFeeder(tn, context, network, this, typeObject).feed();
144//
145// if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
146// Collection<? extends Object> subTypes = context.enumerateDirectBinaryEdgeSubtypes(typeObject);
147//
148// for (Object subType : subTypes) {
149// Address<? extends Tunnel> subRoot = accessBinaryEdgeRoot(subType);
150// network.connectRemoteNodes(subRoot, tn, true);
151// }
152// }
153// }
154// return tn;
155// }
156//
157// /**
158// * accesses the special direct containment relation Root node; creates the node if it doesn't exist yet
159// */
160// public Address<? extends Tunnel> accessContainmentRoot() {
161// if (containmentRoot == null) {
162// // containment: relation quasi-type
163// containmentRoot = headContainer.getProvisioner().newUniquenessEnforcerNode(2, "$containment");
164//
165// new ContainmentFeeder(containmentRoot, context, network, this).feed();
166// }
167// return containmentRoot;
168// }
169//
170// /**
171// * accesses the special transitive containment relation Root node; creates the node if it doesn't exist yet
172// */
173// public Address<? extends Supplier> accessContainmentTransitiveRoot() {
174// if (containmentTransitiveRoot == null) {
175// // transitive containment: derived
176// Address<? extends Tunnel> containmentTransitiveRoot = headContainer.getProvisioner().newUniquenessEnforcerNode(
177// 2, "$containmentTransitive");
178// network.connectRemoteNodes(accessContainmentRoot(), containmentTransitiveRoot, true);
179//
180// final int[] actLI = { 1 };
181// final int arcLIw = 2;
182// final int[] actRI = { 0 };
183// final int arcRIw = 2;
184// Address<? extends IterableIndexer> jPrimarySlot = headContainer.getProvisioner().accessProjectionIndexer(
185// accessContainmentRoot(), new TupleMask(actLI, arcLIw));
186// Address<? extends IterableIndexer> jSecondarySlot = headContainer.getProvisioner().accessProjectionIndexer(
187// containmentTransitiveRoot, new TupleMask(actRI, arcRIw));
188//
189// final int[] actRIcomp = { 1 };
190// final int arcRIwcomp = 2;
191// TupleMask complementerMask = new TupleMask(actRIcomp, arcRIwcomp);
192//
193// Address<? extends Supplier> andCT = headContainer.getProvisioner().accessJoinNode(jPrimarySlot, jSecondarySlot,
194// complementerMask);
195//
196// final int[] mask = { 0, 2 };
197// final int maskw = 3;
198// Address<? extends Supplier> tr = headContainer.getProvisioner().accessTrimmerNode(andCT, new TupleMask(mask, maskw));
199// network.connectRemoteNodes(tr, containmentTransitiveRoot, true);
200//
201// this.containmentTransitiveRoot = containmentTransitiveRoot; // cast
202// // back
203// // to
204// // Supplier
205// }
206// return containmentTransitiveRoot;
207// }
208//
209// /**
210// * accesses the special instantiation relation Root node; creates the node if it doesn't exist yet
211// */
212// public Address<? extends Tunnel> accessInstantiationRoot() {
213// if (instantiationRoot == null) {
214// // instantiation: relation quasi-type
215// instantiationRoot = headContainer.getProvisioner().newUniquenessEnforcerNode(2, "$instantiation");
216//
217// new InstantiationFeeder(instantiationRoot, context, network, this).feed();
218// }
219// return instantiationRoot;
220// }
221//
222// /**
223// * accesses the special transitive instantiation relation Root node; creates the node if it doesn't exist yet
224// * InstantiationTransitive = Instantiation o (Generalization)^*
225// */
226// public Address<? extends Supplier> accessInstantiationTransitiveRoot() {
227// if (instantiationTransitiveRoot == null) {
228// // transitive instantiation: derived
229// Address<? extends Tunnel> instantiationTransitiveRoot = headContainer.getProvisioner()
230// .newUniquenessEnforcerNode(2, "$instantiationTransitive");
231// network.connectRemoteNodes(accessInstantiationRoot(), instantiationTransitiveRoot, true);
232//
233// final int[] actLI = { 1 };
234// final int arcLIw = 2;
235// final int[] actRI = { 0 };
236// final int arcRIw = 2;
237// Address<? extends IterableIndexer> jPrimarySlot = headContainer.getProvisioner().accessProjectionIndexer(
238// accessGeneralizationRoot(), new TupleMask(actLI, arcLIw));
239// Address<? extends Indexer> jSecondarySlot = headContainer.getProvisioner().accessProjectionIndexer(
240// instantiationTransitiveRoot, new TupleMask(actRI, arcRIw));
241//
242// final int[] actRIcomp = { 1 };
243// final int arcRIwcomp = 2;
244// TupleMask complementerMask = new TupleMask(actRIcomp, arcRIwcomp);
245//
246// Address<? extends Supplier> andCT = headContainer.getProvisioner().accessJoinNode(jPrimarySlot, jSecondarySlot,
247// complementerMask);
248//
249// final int[] mask = { 0, 2 };
250// final int maskw = 3;
251// Address<? extends Supplier> tr = headContainer.getProvisioner().accessTrimmerNode(andCT,
252// new TupleMask(mask, maskw));
253// network.connectRemoteNodes(tr, instantiationTransitiveRoot, true);
254//
255// this.instantiationTransitiveRoot = instantiationTransitiveRoot; // cast
256// // back
257// // to
258// // Supplier
259// }
260// return instantiationTransitiveRoot;
261// }
262//
263// /**
264// * accesses the special generalization relation Root node; creates the node if it doesn't exist yet
265// */
266// public Address<? extends Tunnel> accessGeneralizationRoot() {
267// if (generalizationRoot == null) {
268// // generalization: relation quasi-type
269// generalizationRoot = headContainer.getProvisioner().newUniquenessEnforcerNode(2, "$generalization");
270//
271// new GeneralizationFeeder(generalizationRoot, context, network, this).feed();
272// }
273// return generalizationRoot;
274// }
275//
276// /**
277// * accesses the special transitive containment relation Root node; creates the node if it doesn't exist yet
278// */
279// public Address<? extends Supplier> accessGeneralizationTransitiveRoot() {
280// if (generalizationTransitiveRoot == null) {
281// // transitive generalization: derived
282// Address<? extends Tunnel> generalizationTransitiveRoot = headContainer.getProvisioner()
283// .newUniquenessEnforcerNode(2, "$generalizationTransitive");
284// network.connectRemoteNodes(accessGeneralizationRoot(), generalizationTransitiveRoot, true);
285//
286// final int[] actLI = { 1 };
287// final int arcLIw = 2;
288// final int[] actRI = { 0 };
289// final int arcRIw = 2;
290// Address<? extends IterableIndexer> jPrimarySlot = headContainer.getProvisioner().accessProjectionIndexer(
291// accessGeneralizationRoot(), new TupleMask(actLI, arcLIw));
292// Address<? extends Indexer> jSecondarySlot = headContainer.getProvisioner().accessProjectionIndexer(
293// generalizationTransitiveRoot, new TupleMask(actRI, arcRIw));
294//
295// final int[] actRIcomp = { 1 };
296// final int arcRIwcomp = 2;
297// TupleMask complementerMask = new TupleMask(actRIcomp, arcRIwcomp);
298//
299// Address<? extends Supplier> andCT = headContainer.getProvisioner().accessJoinNode(jPrimarySlot, jSecondarySlot,
300// complementerMask);
301//
302// final int[] mask = { 0, 2 };
303// final int maskw = 3;
304// Address<? extends Supplier> tr = headContainer.getProvisioner().accessTrimmerNode(andCT, new TupleMask(mask, maskw));
305// network.connectRemoteNodes(tr, generalizationTransitiveRoot, true);
306//
307// this.generalizationTransitiveRoot = generalizationTransitiveRoot; // cast
308// // back
309// // to
310// // Supplier
311// }
312// return generalizationTransitiveRoot;
313// }
314
315 // /**
316 // * Registers and publishes a supplier under specified label.
317 // */
318 // public void publishSupplier(Supplier s, Object label)
319 // {
320 // publishedSuppliers.put(label, s);
321 // }
322 //
323 // /**
324 // * fetches the production node under specified label;
325 // * returns null if it doesn't exist yet
326 // */
327 // public Production getProductionNode(Object label)
328 // {
329 // return productions.get(label);
330 // }
331 //
332 // /**
333 // * fetches the published supplier under specified label;
334 // * returns null if it doesn't exist yet
335 // */
336 // public Supplier getPublishedSupplier(Object label)
337 // {
338 // return publishedSuppliers.get(label);
339 // }
340
341 /**
342 * accesses the production node for specified pattern; builds pattern matcher if it doesn't exist yet
343 * @throws ViatraQueryRuntimeException
344 */
345 public synchronized RecipeTraceInfo accessProductionTrace(PQuery query)
346 {
347 final CompiledQuery compiled = engine.getCompiler().getCompiledForm(query);
348 return compiled;
349// RecipeTraceInfo pn;
350// pn = queryPlans.get(query);
351// if (pn == null) {
352// pn = construct(query);
353// TODO handle recursion by reinterpret-RecipeTrace
354// queryPlans.put(query, pn);
355// if (pn == null) {
356// String[] args = { query.toString() };
357// throw new RetePatternBuildException("Unsuccessful planning of RETE construction recipe for query {1}",
358// args, "Could not create RETE recipe plan.", query);
359// }
360// }
361// return pn;
362 }
363 /**
364 * accesses the production node for specified pattern; builds pattern matcher if it doesn't exist yet
365 * @throws ViatraQueryRuntimeException
366 */
367 public synchronized Address<? extends ProductionNode> accessProductionNode(PQuery query) {
368 final RecipeTraceInfo productionTrace = accessProductionTrace(query);
369 return (Address<? extends ProductionNode>) headContainer.getProvisioner().getOrCreateNodeByRecipe(productionTrace);
370 }
371
372// /**
373// * creates the production node for the specified pattern Contract: only call from the builder (through Buildable)
374// * responsible for building this pattern
375// *
376// * @throws PatternMatcherCompileTimeException
377// * if production node is already created
378// */
379// public synchronized Address<? extends Production> createProductionInternal(PQuery gtPattern)
380// throws QueryPlannerException {
381// if (queryPlans.containsKey(gtPattern)) {
382// String[] args = { gtPattern.toString() };
383// throw new RetePatternBuildException("Multiple creation attempts of production node for {1}", args,
384// "Duplicate RETE production node.", gtPattern);
385// }
386//
387// Map<String, Integer> posMapping = engine.getBuilder().getPosMapping(gtPattern);
388// Address<? extends Production> pn = headContainer.getProvisioner().newProductionNode(posMapping, gtPattern);
389// queryPlans.put(gtPattern, pn);
390// context.reportPatternDependency(gtPattern);
391//
392// return pn;
393// }
394
395 // /**
396 // * accesses the production node for specified pattern and scope map; creates the node if
397 // * it doesn't exist yet
398 // */
399 // public synchronized Address<? extends Production> accessProductionScoped(
400 // GTPattern gtPattern, Map<Integer, Scope> additionalScopeMap) throws PatternMatcherCompileTimeException {
401 // if (additionalScopeMap.isEmpty()) return accessProduction(gtPattern);
402 //
403 // Address<? extends Production> pn;
404 //
405 // Map<Map<Integer, Scope>, Address<? extends Production>> scopes = productionsScoped.get(gtPattern);
406 // if (scopes == null) {
407 // scopes = new HashMap<Map<Integer, Scope>, Address<? extends Production>>();
408 // productionsScoped.put(gtPattern, scopes);
409 // }
410 //
411 // pn = scopes.get(additionalScopeMap);
412 // if (pn == null) {
413 // Address<? extends Production> unscopedProduction = accessProduction(gtPattern);
414 //
415 // HashMap<Object, Integer> posMapping = headContainer.resolveLocal(unscopedProduction).getPosMapping();
416 // pn = headContainer.getLibrary().newProductionNode(posMapping);
417 // scopes.put(additionalScopeMap, pn);
418 //
419 // constructScoper(unscopedProduction, additionalScopeMap, pn);
420 // }
421 // return pn;
422 // }
423
424 // protected void constructScoper(
425 // Address<? extends Production> unscopedProduction,
426 // Map<Integer, Scope> additionalScopeMap,
427 // Address<? extends Production> production)
428 // throws PatternMatcherCompileTimeException {
429 // engine.reteNet.waitForReteTermination();
430 // engine.builder.constructScoper(unscopedProduction, additionalScopeMap, production);
431 // }
432
433 // /**
434 // * Invalidates the subnet constructed for the recognition of a given
435 // pattern.
436 // * The pattern matcher will have to be rebuilt.
437 // * @param gtPattern the pattern whose matcher subnet should be invalidated
438 // */
439 // public void invalidatePattern(GTPattern gtPattern) {
440 // Production production = null;
441 // try {
442 // production = accessProduction(gtPattern);
443 // } catch (PatternMatcherCompileTimeException e) {
444 // // this should not occur here, since we already have a production node
445 // e.printStackTrace();
446 // }
447 //
448 // production.tearOff();
449 // //production.setDirty(true);
450 // }
451
452 // updaters for change notification
453 // if the corresponding rete input isn't created yet, call is ignored
454
455 private static Direction direction(boolean isInsertion) {
456 return isInsertion ? Direction.INSERT : Direction.DELETE;
457 }
458
459// @Override
460// public void updateUnary(boolean isInsertion, Object entity, Object typeObject) {
461// Address<? extends Tunnel> root = inputConnector.getUnaryRoot(typeObject);
462// if (root != null) {
463// network.sendExternalUpdate(root, direction(isInsertion), new FlatTuple(inputConnector.wrapElement(entity)));
464// if (!engine.isParallelExecutionEnabled())
465// network.waitForReteTermination();
466// }
467// if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.SUPERTYPE_ONLY) {
468// for (Object superType : context.enumerateDirectUnarySupertypes(typeObject)) {
469// updateUnary(isInsertion, entity, superType);
470// }
471// }
472// }
473//
474// @Override
475// public void updateTernaryEdge(boolean isInsertion, Object relation, Object from, Object to, Object typeObject) {
476// Address<? extends Tunnel> root = inputConnector.getTernaryEdgeRoot(typeObject);
477// if (root != null) {
478// network.sendExternalUpdate(root, direction(isInsertion), new FlatTuple(inputConnector.wrapElement(relation), inputConnector.wrapElement(from),
479// inputConnector.wrapElement(to)));
480// if (!engine.isParallelExecutionEnabled())
481// network.waitForReteTermination();
482// }
483// if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.SUPERTYPE_ONLY) {
484// for (Object superType : context.enumerateDirectTernaryEdgeSupertypes(typeObject)) {
485// updateTernaryEdge(isInsertion, relation, from, to, superType);
486// }
487// }
488// }
489// @Override
490// public void updateBinaryEdge(boolean isInsertion, Object from, Object to, Object typeObject) {
491// Address<? extends Tunnel> root = inputConnector.getBinaryEdgeRoot(typeObject);
492// if (root != null) {
493// network.sendExternalUpdate(root, direction(isInsertion), new FlatTuple(inputConnector.wrapElement(from), inputConnector.wrapElement(to)));
494// if (!engine.isParallelExecutionEnabled())
495// network.waitForReteTermination();
496// }
497// if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.SUPERTYPE_ONLY) {
498// for (Object superType : context.enumerateDirectBinaryEdgeSupertypes(typeObject)) {
499// updateBinaryEdge(isInsertion, from, to, superType);
500// }
501// }
502// }
503//
504// @Override
505// public void updateContainment(boolean isInsertion, Object container, Object element) {
506// final Address<? extends Tunnel> containmentRoot = inputConnector.getContainmentRoot();
507// if (containmentRoot != null) {
508// network.sendExternalUpdate(containmentRoot, direction(isInsertion), new FlatTuple(inputConnector.wrapElement(container),
509// inputConnector.wrapElement(element)));
510// if (!engine.isParallelExecutionEnabled())
511// network.waitForReteTermination();
512// }
513// }
514//
515// @Override
516// public void updateInstantiation(boolean isInsertion, Object parent, Object child) {
517// final Address<? extends Tunnel> instantiationRoot = inputConnector.getInstantiationRoot();
518// if (instantiationRoot != null) {
519// network.sendExternalUpdate(instantiationRoot, direction(isInsertion), new FlatTuple(inputConnector.wrapElement(parent),
520// inputConnector.wrapElement(child)));
521// if (!engine.isParallelExecutionEnabled())
522// network.waitForReteTermination();
523// }
524// }
525//
526// @Override
527// public void updateGeneralization(boolean isInsertion, Object parent, Object child) {
528// final Address<? extends Tunnel> generalizationRoot = inputConnector.getGeneralizationRoot();
529// if (generalizationRoot != null) {
530// network.sendExternalUpdate(generalizationRoot, direction(isInsertion), new FlatTuple(inputConnector.wrapElement(parent),
531// inputConnector.wrapElement(child)));
532// if (!engine.isParallelExecutionEnabled())
533// network.waitForReteTermination();
534// }
535// }
536
537 // no wrapping needed!
538 public void notifyEvaluator(Address<? extends Receiver> receiver, Tuple tuple) {
539 network.sendExternalUpdate(receiver, Direction.INSERT, tuple);
540 if (!engine.isParallelExecutionEnabled())
541 network.waitForReteTermination();
542 }
543
544 public void mapPlanToAddress(SubPlan plan, Address<? extends Supplier> handle) {
545 subplanToAddressMapping.put(plan, handle);
546 }
547
548 public Address<? extends Supplier> getAddress(SubPlan plan) {
549 return subplanToAddressMapping.get(plan);
550 }
551}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/RetePatternBuildException.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/RetePatternBuildException.java
new file mode 100644
index 00000000..bd1b219e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/RetePatternBuildException.java
@@ -0,0 +1,50 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.construction;
11
12import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
13
14/**
15 * A problem has occurred during the construction of the RETE net.
16 *
17 * @author Gabor Bergmann
18 *
19 */
20public class RetePatternBuildException extends QueryProcessingException {
21
22 private static final long serialVersionUID = 6966585498204577548L;
23
24 /**
25 * @param message
26 * The template of the exception message
27 * @param context
28 * The data elements to be used to instantiate the template. Can be null if no context parameter is
29 * defined
30 * @param patternDescription
31 * the PatternDescription where the exception occurred
32 */
33 public RetePatternBuildException(String message, String[] context, String shortMessage, Object patternDescription) {
34 super(message, context, shortMessage, patternDescription);
35 }
36
37 /**
38 * @param message
39 * The template of the exception message
40 * @param context
41 * The data elements to be used to instantiate the template. Can be null if no context parameter is
42 * defined
43 * @param patternDescription
44 * the PatternDescription where the exception occurred
45 */
46 public RetePatternBuildException(String message, String[] context, String shortMessage, Object patternDescription,
47 Throwable cause) {
48 super(message, context, shortMessage, patternDescription, cause);
49 }
50}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/BasicLinearLayout.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/BasicLinearLayout.java
new file mode 100644
index 00000000..bd22e1a0
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/BasicLinearLayout.java
@@ -0,0 +1,171 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.construction.basiclinear;
11
12import java.util.Arrays;
13import java.util.Collections;
14import java.util.Set;
15
16import org.apache.log4j.Logger;
17import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
18import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
19import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
20import tools.refinery.viatra.runtime.matchers.planning.IQueryPlannerStrategy;
21import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
22import tools.refinery.viatra.runtime.matchers.planning.SubPlanFactory;
23import tools.refinery.viatra.runtime.matchers.planning.helpers.BuildHelper;
24import tools.refinery.viatra.runtime.matchers.planning.operations.PApply;
25import tools.refinery.viatra.runtime.matchers.planning.operations.PProject;
26import tools.refinery.viatra.runtime.matchers.planning.operations.PStart;
27import tools.refinery.viatra.runtime.matchers.psystem.DeferredPConstraint;
28import tools.refinery.viatra.runtime.matchers.psystem.PBody;
29import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
30import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
31import tools.refinery.viatra.runtime.matchers.psystem.VariableDeferredPConstraint;
32import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.Equality;
33import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
34import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
35import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
36import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
37import tools.refinery.viatra.runtime.rete.construction.RetePatternBuildException;
38
39/**
40 * Basic layout that builds a linear RETE net based on a heuristic ordering of constraints.
41 *
42 * @author Gabor Bergmann
43 *
44 */
45public class BasicLinearLayout implements IQueryPlannerStrategy {
46
47 //SubPlanProcessor planProcessor = new SubPlanProcessor();
48
49 private IQueryBackendHintProvider hintProvider;
50 private IQueryBackendContext bContext;
51 /**
52 * @param bContext
53 * @since 1.5
54 */
55 public BasicLinearLayout(IQueryBackendContext bContext) {
56 this.bContext = bContext;
57 this.hintProvider = bContext.getHintProvider();
58 }
59
60 @Override
61 public SubPlan plan(final PBody pSystem, Logger logger, IQueryMetaContext context) {
62 SubPlanFactory planFactory = new SubPlanFactory(pSystem);
63 PQuery query = pSystem.getPattern();
64 //planProcessor.setCompiler(compiler);
65 try {
66 logger.debug(String.format(
67 "%s: patternbody build started for %s",
68 getClass().getSimpleName(),
69 query.getFullyQualifiedName()));
70
71 // STARTING THE LINE
72 SubPlan plan = planFactory.createSubPlan(new PStart());
73
74 Set<PConstraint> pQueue = CollectionsFactory.createSet(pSystem.getConstraints());
75
76 // MAIN LOOP
77 while (!pQueue.isEmpty()) {
78 PConstraint pConstraint = Collections.min(pQueue,
79 new OrderingHeuristics(plan, context)); // pQueue.iterator().next();
80 pQueue.remove(pConstraint);
81
82 // if we have no better option than an unready deferred constraint, raise error
83 if (pConstraint instanceof DeferredPConstraint) {
84 final DeferredPConstraint deferred = (DeferredPConstraint) pConstraint;
85 if (!deferred.isReadyAt(plan, context)) {
86 raiseForeverDeferredError(deferred, plan, context);
87 }
88 }
89 // TODO integrate the check above in SubPlan / POperation??
90
91 // replace incumbent plan with its child
92 plan = planFactory.createSubPlan(new PApply(pConstraint), plan);
93 }
94
95 // PROJECT TO PARAMETERS
96 SubPlan finalPlan = planFactory.createSubPlan(new PProject(pSystem.getSymbolicParameterVariables()), plan);
97
98 // FINAL CHECK, whether all exported variables are present + all constraint satisfied
99 BuildHelper.finalCheck(pSystem, finalPlan, context);
100 // TODO integrate the check above in SubPlan / POperation
101
102 logger.debug(String.format(
103 "%s: patternbody query plan concluded for %s as: %s",
104 getClass().getSimpleName(),
105 query.getFullyQualifiedName(),
106 finalPlan.toLongString()));
107
108 return finalPlan;
109
110 } catch (RetePatternBuildException ex) {
111 ex.setPatternDescription(query);
112 throw ex;
113 }
114 }
115
116 /**
117 * Called when the constraint is not ready, but cannot be deferred further.
118 *
119 * @param plan
120 * @throws RetePatternBuildException
121 * to indicate the error in detail.
122 */
123 private void raiseForeverDeferredError(DeferredPConstraint constraint, SubPlan plan, IQueryMetaContext context) {
124 if (constraint instanceof Equality) {
125 raiseForeverDeferredError((Equality)constraint, plan, context);
126 } else if (constraint instanceof ExportedParameter) {
127 raiseForeverDeferredError((ExportedParameter)constraint, plan, context);
128 } else if (constraint instanceof ExpressionEvaluation) {
129 raiseForeverDeferredError((ExpressionEvaluation)constraint, plan, context);
130 } else if (constraint instanceof VariableDeferredPConstraint) {
131 raiseForeverDeferredError(constraint, plan, context);
132 }
133 }
134
135 private void raiseForeverDeferredError(Equality constraint, SubPlan plan, IQueryMetaContext context) {
136 String[] args = { constraint.getWho().toString(), constraint.getWithWhom().toString() };
137 String msg = "Cannot express equality of variables {1} and {2} if neither of them is deducable.";
138 String shortMsg = "Equality between undeducible variables.";
139 throw new RetePatternBuildException(msg, args, shortMsg, null);
140 }
141 private void raiseForeverDeferredError(ExportedParameter constraint, SubPlan plan, IQueryMetaContext context) {
142 String[] args = { constraint.getParameterName() };
143 String msg = "Pattern Graph Search terminated incompletely: "
144 + "exported pattern variable {1} could not be determined based on the pattern constraints. "
145 + "HINT: certain constructs (e.g. negative patterns or check expressions) cannot output symbolic parameters.";
146 String shortMsg = "Could not deduce value of parameter";
147 throw new RetePatternBuildException(msg, args, shortMsg, null);
148 }
149 private void raiseForeverDeferredError(ExpressionEvaluation constraint, SubPlan plan, IQueryMetaContext context) {
150 if (constraint.checkTypeSafety(plan, context) == null) {
151 raiseForeverDeferredError(constraint, plan);
152 } else {
153 String[] args = { toString(), constraint.checkTypeSafety(plan, context).toString() };
154 String msg = "The checking of pattern constraint {1} cannot be deferred further, but variable {2} is still not type safe. "
155 + "HINT: the incremental matcher is not an equation solver, please make sure that all variable values are deducible.";
156 String shortMsg = "Could not check all constraints due to undeducible type restrictions";
157 throw new RetePatternBuildException(msg, args, shortMsg, null);
158 }
159 }
160 private void raiseForeverDeferredError(VariableDeferredPConstraint constraint, SubPlan plan) {
161 Set<PVariable> missing = CollectionsFactory.createSet(constraint.getDeferringVariables());//new HashSet<PVariable>(getDeferringVariables());
162 missing.removeAll(plan.getVisibleVariables());
163 String[] args = { toString(), Arrays.toString(missing.toArray()) };
164 String msg = "The checking of pattern constraint {1} requires the values of variables {2}, but it cannot be deferred further. "
165 + "HINT: the incremental matcher is not an equation solver, please make sure that all variable values are deducible.";
166 String shortMsg = "Could not check all constraints due to undeducible variables";
167 throw new RetePatternBuildException(msg, args, shortMsg, null);
168 }
169
170
171}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/OrderingHeuristics.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/OrderingHeuristics.java
new file mode 100644
index 00000000..2b4e8890
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/basiclinear/OrderingHeuristics.java
@@ -0,0 +1,90 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.construction.basiclinear;
11
12import java.util.Comparator;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
16import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
17import tools.refinery.viatra.runtime.matchers.psystem.DeferredPConstraint;
18import tools.refinery.viatra.runtime.matchers.psystem.EnumerablePConstraint;
19import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
22import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
23import tools.refinery.viatra.runtime.rete.util.OrderingCompareAgent;
24
25/**
26 * @author Gabor Bergmann
27 *
28 */
29public class OrderingHeuristics implements Comparator<PConstraint> {
30 private SubPlan plan;
31 private IQueryMetaContext context;
32
33 public OrderingHeuristics(SubPlan plan, IQueryMetaContext context) {
34 super();
35 this.plan = plan;
36 this.context = context;
37 }
38
39 @Override
40 public int compare(PConstraint o1, PConstraint o2) {
41 return new OrderingCompareAgent<PConstraint>(o1, o2) {
42 @Override
43 protected void doCompare() {
44 boolean temp = consider(preferTrue(isConstant(a), isConstant(b)))
45 && consider(preferTrue(isReady(a), isReady(b)));
46 if (!temp)
47 return;
48
49 Set<PVariable> bound1 = boundVariables(a);
50 Set<PVariable> bound2 = boundVariables(b);
51 swallowBoolean(temp && consider(preferTrue(isBound(a, bound1), isBound(b, bound2)))
52 && consider(preferMore(degreeBound(a, bound1), degreeBound(b, bound2)))
53 && consider(preferLess(degreeFree(a, bound1), degreeFree(b, bound2)))
54
55 // tie breaking
56 && consider(preferLess(a.getMonotonousID(), b.getMonotonousID())) // this is hopefully deterministic
57 && consider(preferLess(System.identityHashCode(a), System.identityHashCode(b))));
58 }
59 }.compare();
60 }
61
62 boolean isConstant(PConstraint o) {
63 return (o instanceof ConstantValue);
64 }
65
66 boolean isReady(PConstraint o) {
67 return (o instanceof EnumerablePConstraint)
68 || (o instanceof DeferredPConstraint && ((DeferredPConstraint) o)
69 .isReadyAt(plan, context));
70 }
71
72 Set<PVariable> boundVariables(PConstraint o) {
73 Set<PVariable> boundVariables = CollectionsFactory.createSet(o.getAffectedVariables());
74 boundVariables.retainAll(plan.getVisibleVariables());
75 return boundVariables;
76 }
77
78 boolean isBound(PConstraint o, Set<PVariable> boundVariables) {
79 return boundVariables.size() == o.getAffectedVariables().size();
80 }
81
82 int degreeBound(PConstraint o, Set<PVariable> boundVariables) {
83 return boundVariables.size();
84 }
85
86 int degreeFree(PConstraint o, Set<PVariable> boundVariables) {
87 return o.getAffectedVariables().size() - boundVariables.size();
88 }
89
90}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/CompilerHelper.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/CompilerHelper.java
new file mode 100644
index 00000000..da2fb432
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/CompilerHelper.java
@@ -0,0 +1,390 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.construction.plancompiler;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.Collections;
14import java.util.HashMap;
15import java.util.LinkedHashSet;
16import java.util.LinkedList;
17import java.util.List;
18import java.util.Map;
19import java.util.Map.Entry;
20import java.util.Set;
21import java.util.SortedSet;
22import java.util.TreeSet;
23
24import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
25import tools.refinery.viatra.runtime.matchers.context.IInputKey;
26import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
27import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
28import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
29import tools.refinery.viatra.runtime.matchers.planning.helpers.TypeHelper;
30import tools.refinery.viatra.runtime.matchers.psystem.EnumerablePConstraint;
31import tools.refinery.viatra.runtime.matchers.psystem.PBody;
32import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
33import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
34import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
35import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
36import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
37import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration;
38import tools.refinery.viatra.runtime.rete.recipes.EqualityFilterRecipe;
39import tools.refinery.viatra.runtime.rete.recipes.IndexerBasedAggregatorRecipe;
40import tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe;
41import tools.refinery.viatra.runtime.rete.recipes.JoinRecipe;
42import tools.refinery.viatra.runtime.rete.recipes.Mask;
43import tools.refinery.viatra.runtime.rete.recipes.MonotonicityInfo;
44import tools.refinery.viatra.runtime.rete.recipes.ProductionRecipe;
45import tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe;
46import tools.refinery.viatra.runtime.rete.recipes.RecipesFactory;
47import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
48import tools.refinery.viatra.runtime.rete.recipes.SingleColumnAggregatorRecipe;
49import tools.refinery.viatra.runtime.rete.recipes.TrimmerRecipe;
50import tools.refinery.viatra.runtime.rete.recipes.helper.RecipesHelper;
51import tools.refinery.viatra.runtime.rete.traceability.CompiledQuery;
52import tools.refinery.viatra.runtime.rete.traceability.CompiledSubPlan;
53import tools.refinery.viatra.runtime.rete.traceability.PlanningTrace;
54import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
55import tools.refinery.viatra.runtime.rete.util.ReteHintOptions;
56
57/**
58 * @author Bergmann Gabor
59 *
60 */
61public class CompilerHelper {
62
63 private CompilerHelper() {/*Utility class constructor*/}
64
65 static final RecipesFactory FACTORY = RecipesFactory.eINSTANCE;
66
67 /**
68 * Makes sure that all variables in the tuple are different so that it can be used as {@link CompiledSubPlan}. If a
69 * variable occurs multiple times, equality checks are applied and then the results are trimmed so that duplicates
70 * are hidden. If no manipulation is necessary, the original trace is returned.
71 *
72 * <p>
73 * to be used whenever a constraint introduces new variables.
74 */
75 public static PlanningTrace checkAndTrimEqualVariables(SubPlan plan, final PlanningTrace coreTrace) {
76 // are variables in the constraint all different?
77 final List<PVariable> coreVariablesTuple = coreTrace.getVariablesTuple();
78 final int constraintArity = coreVariablesTuple.size();
79 final int distinctVariables = coreTrace.getPosMapping().size();
80 if (constraintArity == distinctVariables) {
81 // all variables occur exactly once in tuple
82 return coreTrace;
83 } else { // apply equality checks and trim
84
85 // find the positions in the tuple for each variable
86 Map<PVariable, SortedSet<Integer>> posMultimap = new HashMap<PVariable, SortedSet<Integer>>();
87 List<PVariable> trimmedVariablesTuple = new ArrayList<PVariable>(distinctVariables);
88 int[] trimIndices = new int[distinctVariables];
89 for (int i = 0; i < constraintArity; ++i) {
90 final PVariable variable = coreVariablesTuple.get(i);
91 SortedSet<Integer> indexSet = posMultimap.get(variable);
92 if (indexSet == null) { // first occurrence of variable
93 indexSet = new TreeSet<Integer>();
94 posMultimap.put(variable, indexSet);
95
96 // this is the first occurrence, set up trimming
97 trimIndices[trimmedVariablesTuple.size()] = i;
98 trimmedVariablesTuple.add(variable);
99 }
100 indexSet.add(i);
101 }
102
103 // construct equality checks for each variable occurring multiple times
104 PlanningTrace lastTrace = coreTrace;
105 for (Entry<PVariable, SortedSet<Integer>> entry : posMultimap.entrySet()) {
106 if (entry.getValue().size() > 1) {
107 EqualityFilterRecipe equalityFilterRecipe = FACTORY.createEqualityFilterRecipe();
108 equalityFilterRecipe.setParent(lastTrace.getRecipe());
109 equalityFilterRecipe.getIndices().addAll(entry.getValue());
110 lastTrace = new PlanningTrace(plan, coreVariablesTuple, equalityFilterRecipe, lastTrace);
111 }
112 }
113
114 // trim so that each variable occurs only once
115 TrimmerRecipe trimmerRecipe = FACTORY.createTrimmerRecipe();
116 trimmerRecipe.setParent(lastTrace.getRecipe());
117 trimmerRecipe.setMask(tools.refinery.viatra.runtime.rete.recipes.helper.RecipesHelper
118 .mask(constraintArity, trimIndices));
119 return new PlanningTrace(plan, trimmedVariablesTuple, trimmerRecipe, lastTrace);
120 }
121 }
122
123 /**
124 * Extracts the variable list representation of the variables tuple.
125 */
126 public static List<PVariable> convertVariablesTuple(EnumerablePConstraint constraint) {
127 return convertVariablesTuple(constraint.getVariablesTuple());
128 }
129
130 /**
131 * Extracts the variable list representation of the variables tuple.
132 */
133 public static List<PVariable> convertVariablesTuple(Tuple variablesTuple) {
134 List<PVariable> result = new ArrayList<PVariable>();
135 for (Object o : variablesTuple.getElements())
136 result.add((PVariable) o);
137 return result;
138 }
139
140 /**
141 * Returns a compiled indexer trace according to a mask
142 */
143 public static RecipeTraceInfo makeIndexerTrace(SubPlan planToCompile, PlanningTrace parentTrace, TupleMask mask) {
144 final ReteNodeRecipe parentRecipe = parentTrace.getRecipe();
145 if (parentRecipe instanceof IndexerBasedAggregatorRecipe
146 || parentRecipe instanceof SingleColumnAggregatorRecipe)
147 throw new IllegalArgumentException(
148 "Cannot take projection indexer of aggregator node at plan " + planToCompile);
149 IndexerRecipe recipe = RecipesHelper.projectionIndexerRecipe(parentRecipe, toRecipeMask(mask));
150 // final List<PVariable> maskedVariables = mask.transform(parentTrace.getVariablesTuple());
151 return new PlanningTrace(planToCompile, /* maskedVariables */ parentTrace.getVariablesTuple(), recipe,
152 parentTrace);
153 // TODO add specialized indexer trace info?
154 }
155
156 /**
157 * Creates a trimmer that keeps selected variables only.
158 */
159 protected static TrimmerRecipe makeTrimmerRecipe(final PlanningTrace compiledParent,
160 List<PVariable> projectedVariables) {
161 final Mask projectionMask = makeProjectionMask(compiledParent, projectedVariables);
162 final TrimmerRecipe trimmerRecipe = ReteRecipeCompiler.FACTORY.createTrimmerRecipe();
163 trimmerRecipe.setParent(compiledParent.getRecipe());
164 trimmerRecipe.setMask(projectionMask);
165 return trimmerRecipe;
166 }
167
168 public static Mask makeProjectionMask(final PlanningTrace compiledParent, Iterable<PVariable> projectedVariables) {
169 List<Integer> projectionSourceIndices = new ArrayList<Integer>();
170 for (PVariable pVariable : projectedVariables) {
171 projectionSourceIndices.add(compiledParent.getPosMapping().get(pVariable));
172 }
173 final Mask projectionMask = RecipesHelper.mask(compiledParent.getRecipe().getArity(), projectionSourceIndices);
174 return projectionMask;
175 }
176
177 /**
178 * @since 1.6
179 */
180 public static final class PosetTriplet {
181 public Mask coreMask;
182 public Mask posetMask;
183 public IPosetComparator comparator;
184 }
185
186 /**
187 * @since 1.6
188 */
189 public static PosetTriplet computePosetInfo(List<PVariable> variables, PBody body, IQueryMetaContext context) {
190 Map<PVariable, Set<IInputKey>> typeMap = TypeHelper.inferUnaryTypesFor(variables, body.getConstraints(),
191 context);
192 List<Set<IInputKey>> keys = new LinkedList<Set<IInputKey>>();
193
194 for (int i = 0; i < variables.size(); i++) {
195 keys.add(typeMap.get(variables.get(i)));
196 }
197
198 return computePosetInfo(keys, context);
199 }
200
201 /**
202 * @since 1.6
203 */
204 public static PosetTriplet computePosetInfo(List<PParameter> parameters, IQueryMetaContext context) {
205 List<Set<IInputKey>> keys = new LinkedList<Set<IInputKey>>();
206 for (int i = 0; i < parameters.size(); i++) {
207 IInputKey key = parameters.get(i).getDeclaredUnaryType();
208 if (key == null) {
209 keys.add(Collections.emptySet());
210 } else {
211 keys.add(Collections.singleton(parameters.get(i).getDeclaredUnaryType()));
212 }
213 }
214 return computePosetInfo(keys, context);
215 }
216
217
218
219 /**
220 * @since 1.6
221 */
222 public static PosetTriplet computePosetInfo(Iterable<Set<IInputKey>> keys, IQueryMetaContext context) {
223 PosetTriplet result = new PosetTriplet();
224 List<Integer> coreIndices = new ArrayList<Integer>();
225 List<Integer> posetIndices = new ArrayList<Integer>();
226 List<IInputKey> filtered = new ArrayList<IInputKey>();
227 boolean posetKey = false;
228 int index = -1;
229
230 for (Set<IInputKey> _keys : keys) {
231 ++index;
232 posetKey = false;
233
234 for (IInputKey key : _keys) {
235 if (key != null && context.isPosetKey(key)) {
236 posetKey = true;
237 filtered.add(key);
238 break;
239 }
240 }
241
242 if (posetKey) {
243 posetIndices.add(index);
244 } else {
245 coreIndices.add(index);
246 }
247 }
248
249 result.comparator = context.getPosetComparator(filtered);
250 result.coreMask = RecipesHelper.mask(index + 1, coreIndices);
251 result.posetMask = RecipesHelper.mask(index + 1, posetIndices);
252
253 return result;
254 }
255
256 /**
257 * Creates a recipe for a production node and the corresponding trace.
258 * <p> PRE: in case this is a recursion cutoff point (see {@link RecursionCutoffPoint})
259 * and bodyFinalTraces will be filled later,
260 * the object yielded now by bodyFinalTraces.values() must return up-to-date results later
261 * @since 2.4
262 */
263 public static CompiledQuery makeQueryTrace(PQuery query, Map<PBody, RecipeTraceInfo> bodyFinalTraces,
264 Collection<ReteNodeRecipe> bodyFinalRecipes, QueryEvaluationHint hint, IQueryMetaContext context,
265 boolean deleteAndRederiveEvaluation, TimelyConfiguration timelyEvaluation) {
266 ProductionRecipe recipe = ReteRecipeCompiler.FACTORY.createProductionRecipe();
267
268 // temporary solution to support the deprecated option for now
269 boolean deleteAndRederiveEvaluationDep = deleteAndRederiveEvaluation || ReteHintOptions.deleteRederiveEvaluation.getValueOrDefault(hint);
270
271 recipe.setDeleteRederiveEvaluation(deleteAndRederiveEvaluationDep);
272
273 if (deleteAndRederiveEvaluationDep || (timelyEvaluation != null)) {
274 PosetTriplet triplet = computePosetInfo(query.getParameters(), context);
275 if (triplet.comparator != null) {
276 MonotonicityInfo info = FACTORY.createMonotonicityInfo();
277 info.setCoreMask(triplet.coreMask);
278 info.setPosetMask(triplet.posetMask);
279 info.setPosetComparator(triplet.comparator);
280 recipe.setOptionalMonotonicityInfo(info);
281 }
282 }
283
284 recipe.setPattern(query);
285 recipe.setPatternFQN(query.getFullyQualifiedName());
286 recipe.setTraceInfo(recipe.getPatternFQN());
287 recipe.getParents().addAll(bodyFinalRecipes);
288 for (int i = 0; i < query.getParameterNames().size(); ++i) {
289 recipe.getMappedIndices().put(query.getParameterNames().get(i), i);
290 }
291
292 return new CompiledQuery(recipe, bodyFinalTraces, query);
293 }
294
295 /**
296 * Calculated index mappings for a join, based on the common variables of the two parent subplans.
297 *
298 * @author Gabor Bergmann
299 *
300 */
301 public static class JoinHelper {
302 private TupleMask primaryMask;
303 private TupleMask secondaryMask;
304 private TupleMask complementerMask;
305 private RecipeTraceInfo primaryIndexer;
306 private RecipeTraceInfo secondaryIndexer;
307 private JoinRecipe naturalJoinRecipe;
308 private List<PVariable> naturalJoinVariablesTuple;
309
310 /**
311 * @pre enforceVariableCoincidences() has been called on both sides.
312 */
313 public JoinHelper(SubPlan planToCompile, PlanningTrace primaryCompiled, PlanningTrace callTrace) {
314 super();
315
316 Set<PVariable> primaryVariables = new LinkedHashSet<PVariable>(primaryCompiled.getVariablesTuple());
317 Set<PVariable> secondaryVariables = new LinkedHashSet<PVariable>(callTrace.getVariablesTuple());
318 int oldNodes = 0;
319 Set<Integer> introducingSecondaryIndices = new TreeSet<Integer>();
320 for (PVariable var : secondaryVariables) {
321 if (primaryVariables.contains(var))
322 oldNodes++;
323 else
324 introducingSecondaryIndices.add(callTrace.getPosMapping().get(var));
325 }
326 List<Integer> primaryIndices = new ArrayList<Integer>(oldNodes);
327 List<Integer> secondaryIndices = new ArrayList<Integer>(oldNodes);
328 for (PVariable var : secondaryVariables) {
329 if (primaryVariables.contains(var)) {
330 primaryIndices.add(primaryCompiled.getPosMapping().get(var));
331 secondaryIndices.add(callTrace.getPosMapping().get(var));
332 }
333 }
334 Collection<Integer> complementerIndices = introducingSecondaryIndices;
335
336 primaryMask = TupleMask.fromSelectedIndices(primaryCompiled.getVariablesTuple().size(), primaryIndices);
337 secondaryMask = TupleMask.fromSelectedIndices(callTrace.getVariablesTuple().size(), secondaryIndices);
338 complementerMask = TupleMask.fromSelectedIndices(callTrace.getVariablesTuple().size(), complementerIndices);
339
340 primaryIndexer = makeIndexerTrace(planToCompile, primaryCompiled, primaryMask);
341 secondaryIndexer = makeIndexerTrace(planToCompile, callTrace, secondaryMask);
342
343 naturalJoinRecipe = FACTORY.createJoinRecipe();
344 naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe());
345 naturalJoinRecipe.setRightParent((IndexerRecipe) secondaryIndexer.getRecipe());
346 naturalJoinRecipe.setRightParentComplementaryMask(CompilerHelper.toRecipeMask(complementerMask));
347
348 naturalJoinVariablesTuple = new ArrayList<PVariable>(primaryCompiled.getVariablesTuple());
349 for (int complementerIndex : complementerMask.indices)
350 naturalJoinVariablesTuple.add(callTrace.getVariablesTuple().get(complementerIndex));
351 }
352
353 public TupleMask getPrimaryMask() {
354 return primaryMask;
355 }
356
357 public TupleMask getSecondaryMask() {
358 return secondaryMask;
359 }
360
361 public TupleMask getComplementerMask() {
362 return complementerMask;
363 }
364
365 public RecipeTraceInfo getPrimaryIndexer() {
366 return primaryIndexer;
367 }
368
369 public RecipeTraceInfo getSecondaryIndexer() {
370 return secondaryIndexer;
371 }
372
373 public JoinRecipe getNaturalJoinRecipe() {
374 return naturalJoinRecipe;
375 }
376
377 public List<PVariable> getNaturalJoinVariablesTuple() {
378 return naturalJoinVariablesTuple;
379 }
380
381 }
382
383 /**
384 * @since 1.4
385 */
386 public static Mask toRecipeMask(TupleMask mask) {
387 return RecipesHelper.mask(mask.sourceWidth, mask.indices);
388 }
389
390}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/RecursionCutoffPoint.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/RecursionCutoffPoint.java
new file mode 100644
index 00000000..7d1e4d3a
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/RecursionCutoffPoint.java
@@ -0,0 +1,86 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.construction.plancompiler;
10
11import java.util.Collections;
12import java.util.HashMap;
13import java.util.List;
14import java.util.Map;
15import java.util.stream.Collectors;
16
17import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
18import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
19import tools.refinery.viatra.runtime.matchers.psystem.PBody;
20import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
21import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration;
22import tools.refinery.viatra.runtime.rete.recipes.ProductionRecipe;
23import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
24import tools.refinery.viatra.runtime.rete.traceability.CompiledQuery;
25import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
26
27/**
28 * In a recursive query structure, query composition references can be cut off so that the remaining structure is DAG.
29 * {@link RecursionCutoffPoint} represents one such cut off query composition.
30 * When the compilation of the recursive query finishes and the compiled form becomes available,
31 * the {@link RecursionCutoffPoint} has to be signaled to update parent traces and recipes of the recursive call.
32 *
33 * @author Bergmann Gabor
34 * @noreference This class is not intended to be referenced by clients
35 *
36 */
37public class RecursionCutoffPoint {
38 final Map<PBody, RecipeTraceInfo> futureTraceMap;
39 final CompiledQuery compiledQuery;
40 final ProductionRecipe recipe;
41 final QueryEvaluationHint hint;
42
43 public RecursionCutoffPoint(PQuery query, QueryEvaluationHint hint, IQueryMetaContext context, boolean deleteAndRederiveEvaluation, TimelyConfiguration timelyEvaluation) {
44 super();
45 this.hint = hint;
46 this.futureTraceMap = new HashMap<>(); // IMPORTANT: the identity of futureTraceMap.values() will not change
47 this.compiledQuery = CompilerHelper.makeQueryTrace(query, futureTraceMap, Collections.<ReteNodeRecipe>emptySet(), hint, context, deleteAndRederiveEvaluation, timelyEvaluation);
48 this.recipe = (ProductionRecipe)compiledQuery.getRecipe();
49 if (!compiledQuery.getParentRecipeTraces().isEmpty()) {
50 throw new IllegalArgumentException(String.format("Recursion cut-off point of query %s has trace parents: %s",
51 compiledQuery.getQuery(),
52 prettyPrintParentRecipeTraces(compiledQuery.getParentRecipeTraces())));
53 }
54 if (!recipe.getParents().isEmpty()) {
55 throw new IllegalArgumentException(String.format("Recursion cut-off point of query %s has recipe parents: %s",
56 compiledQuery.getQuery(),
57 prettyPrintParentRecipeTraces(compiledQuery.getParentRecipeTraces())));
58 }
59 }
60
61
62
63 private String prettyPrintParentRecipeTraces(List<RecipeTraceInfo> trace) {
64 return trace.stream().map(Object::toString).collect(Collectors.joining(", "));
65 }
66
67 /**
68 * Signals that compilation of the recursive query has terminated, culminating into the given compiled form.
69 * The query composition that has been cut off will be connected now.
70 */
71 public void mend(CompiledQuery finalCompiledForm) {
72 futureTraceMap.putAll(finalCompiledForm.getParentRecipeTracesPerBody());
73 recipe.getParents().addAll(((ProductionRecipe)finalCompiledForm.getRecipe()).getParents());
74 }
75
76 public CompiledQuery getCompiledQuery() {
77 return compiledQuery;
78 }
79
80 public ProductionRecipe getRecipe() {
81 return recipe;
82 }
83
84
85
86}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/ReteRecipeCompiler.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/ReteRecipeCompiler.java
new file mode 100644
index 00000000..5df3a971
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/plancompiler/ReteRecipeCompiler.java
@@ -0,0 +1,949 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.viatra.runtime.rete.construction.plancompiler;
11
12import org.apache.log4j.Logger;
13import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
14import tools.refinery.viatra.runtime.matchers.backend.CommonQueryHintOptions;
15import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
16import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
17import tools.refinery.viatra.runtime.matchers.context.IInputKey;
18import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
19import tools.refinery.viatra.runtime.matchers.context.IQueryCacheContext;
20import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
21import tools.refinery.viatra.runtime.matchers.planning.IQueryPlannerStrategy;
22import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
23import tools.refinery.viatra.runtime.matchers.planning.helpers.BuildHelper;
24import tools.refinery.viatra.runtime.matchers.planning.operations.*;
25import tools.refinery.viatra.runtime.matchers.psystem.*;
26import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
27import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
28import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.*;
29import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.*;
30import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
31import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
32import tools.refinery.viatra.runtime.matchers.psystem.queries.PVisibility;
33import tools.refinery.viatra.runtime.matchers.psystem.rewriters.*;
34import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
35import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
36import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
37import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
38import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
39import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
40import tools.refinery.viatra.runtime.rete.construction.plancompiler.CompilerHelper.JoinHelper;
41import tools.refinery.viatra.runtime.rete.construction.plancompiler.CompilerHelper.PosetTriplet;
42import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration;
43import tools.refinery.viatra.runtime.rete.recipes.*;
44import tools.refinery.viatra.runtime.rete.recipes.helper.RecipesHelper;
45import tools.refinery.viatra.runtime.rete.traceability.*;
46import tools.refinery.viatra.runtime.rete.util.ReteHintOptions;
47
48import java.util.*;
49import java.util.Map.Entry;
50import java.util.function.BiFunction;
51import java.util.function.Function;
52
53/**
54 * Compiles queries and query plans into Rete recipes, traced by respectively a {@link CompiledQuery} or
55 * {@link CompiledSubPlan}.
56 *
57 * @author Bergmann Gabor
58 *
59 */
60public class ReteRecipeCompiler {
61
62 private final IQueryPlannerStrategy plannerStrategy;
63 private final IQueryMetaContext metaContext;
64 private final IQueryBackendHintProvider hintProvider;
65 private final PDisjunctionRewriter normalizer;
66 private final QueryAnalyzer queryAnalyzer;
67 private final Logger logger;
68
69 /**
70 * @since 2.2
71 */
72 protected final boolean deleteAndRederiveEvaluation;
73 /**
74 * @since 2.4
75 */
76 protected final TimelyConfiguration timelyEvaluation;
77
78 /**
79 * @since 1.5
80 */
81 public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, Logger logger, IQueryMetaContext metaContext,
82 IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, QueryAnalyzer queryAnalyzer) {
83 this(plannerStrategy, logger, metaContext, queryCacheContext, hintProvider, queryAnalyzer, false, null);
84 }
85
86 /**
87 * @since 2.4
88 */
89 public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, Logger logger, IQueryMetaContext metaContext,
90 IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, QueryAnalyzer queryAnalyzer,
91 boolean deleteAndRederiveEvaluation, TimelyConfiguration timelyEvaluation) {
92 super();
93 this.deleteAndRederiveEvaluation = deleteAndRederiveEvaluation;
94 this.timelyEvaluation = timelyEvaluation;
95 this.plannerStrategy = plannerStrategy;
96 this.logger = logger;
97 this.metaContext = metaContext;
98 this.queryAnalyzer = queryAnalyzer;
99 this.normalizer = new PDisjunctionRewriterCacher(new SurrogateQueryRewriter(),
100 new PBodyNormalizer(metaContext) {
101
102 @Override
103 protected boolean shouldExpandWeakenedAlternatives(PQuery query) {
104 QueryEvaluationHint hint = ReteRecipeCompiler.this.hintProvider.getQueryEvaluationHint(query);
105 Boolean expandWeakenedAlternativeConstraints = ReteHintOptions.expandWeakenedAlternativeConstraints
106 .getValueOrDefault(hint);
107 return expandWeakenedAlternativeConstraints;
108 }
109
110 });
111 this.hintProvider = hintProvider;
112 }
113
114 static final RecipesFactory FACTORY = RecipesFactory.eINSTANCE;
115
116 // INTERNALLY CACHED
117 private Map<PBody, SubPlan> plannerCache = new HashMap<PBody, SubPlan>();
118 private Set<PBody> planningInProgress = new HashSet<PBody>();
119
120 private Map<PQuery, CompiledQuery> queryCompilerCache = new HashMap<PQuery, CompiledQuery>();
121 private Set<PQuery> compilationInProgress = new HashSet<PQuery>();
122 private IMultiLookup<PQuery, RecursionCutoffPoint> recursionCutoffPoints = CollectionsFactory.createMultiLookup(Object.class, MemoryType.SETS, Object.class);
123 private Map<SubPlan, CompiledSubPlan> subPlanCompilerCache = new HashMap<SubPlan, CompiledSubPlan>();
124 private Map<ReteNodeRecipe, SubPlan> compilerBackTrace = new HashMap<ReteNodeRecipe, SubPlan>();
125
126 /**
127 * Clears internal state
128 */
129 public void reset() {
130 plannerCache.clear();
131 planningInProgress.clear();
132 queryCompilerCache.clear();
133 subPlanCompilerCache.clear();
134 compilerBackTrace.clear();
135 }
136
137 /**
138 * Returns a {@link CompiledQuery} compiled from a query
139 * @throws ViatraQueryRuntimeException
140 */
141 public CompiledQuery getCompiledForm(PQuery query) {
142 CompiledQuery compiled = queryCompilerCache.get(query);
143 if (compiled == null) {
144
145 IRewriterTraceCollector traceCollector = CommonQueryHintOptions.normalizationTraceCollector
146 .getValueOrDefault(hintProvider.getQueryEvaluationHint(query));
147 if (traceCollector != null) {
148 traceCollector.addTrace(query, query);
149 }
150
151 boolean reentrant = !compilationInProgress.add(query);
152 if (reentrant) { // oops, recursion into body in progress
153 RecursionCutoffPoint cutoffPoint = new RecursionCutoffPoint(query, getHints(query), metaContext,
154 deleteAndRederiveEvaluation, timelyEvaluation);
155 recursionCutoffPoints.addPair(query, cutoffPoint);
156 return cutoffPoint.getCompiledQuery();
157 } else { // not reentrant, therefore no recursion, do the compilation
158 try {
159 compiled = compileProduction(query);
160 queryCompilerCache.put(query, compiled);
161 // backTrace.put(compiled.getRecipe(), plan);
162
163 // if this was a recursive query, mend all points where recursion was cut off
164 for (RecursionCutoffPoint cutoffPoint : recursionCutoffPoints.lookupOrEmpty(query)) {
165 cutoffPoint.mend(compiled);
166 }
167 } finally {
168 compilationInProgress.remove(query);
169 }
170 }
171 }
172 return compiled;
173 }
174
175 /**
176 * Returns a {@link CompiledSubPlan} compiled from a query plan
177 * @throws ViatraQueryRuntimeException
178 */
179 public CompiledSubPlan getCompiledForm(SubPlan plan) {
180 CompiledSubPlan compiled = subPlanCompilerCache.get(plan);
181 if (compiled == null) {
182 compiled = doCompileDispatch(plan);
183 subPlanCompilerCache.put(plan, compiled);
184 compilerBackTrace.put(compiled.getRecipe(), plan);
185 }
186 return compiled;
187 }
188
189 /**
190 * @throws ViatraQueryRuntimeException
191 */
192 public SubPlan getPlan(PBody pBody) {
193 // if the query is not marked as being compiled, initiate compilation
194 // (this is useful in case of recursion if getPlan() is the entry point)
195 PQuery pQuery = pBody.getPattern();
196 if (!compilationInProgress.contains(pQuery))
197 getCompiledForm(pQuery);
198
199 // Is the plan already cached?
200 SubPlan plan = plannerCache.get(pBody);
201 if (plan == null) {
202 boolean reentrant = !planningInProgress.add(pBody);
203 if (reentrant) { // oops, recursion into body in progress
204 throw new IllegalArgumentException(
205 "Planning-level recursion unsupported: " + pBody.getPattern().getFullyQualifiedName());
206 } else { // not reentrant, therefore no recursion, do the planning
207 try {
208 plan = plannerStrategy.plan(pBody, logger, metaContext);
209 plannerCache.put(pBody, plan);
210 } finally {
211 planningInProgress.remove(pBody);
212 }
213 }
214 }
215 return plan;
216 }
217
218 private CompiledQuery compileProduction(PQuery query) {
219 Collection<SubPlan> bodyPlans = new ArrayList<SubPlan>();
220 normalizer.setTraceCollector(CommonQueryHintOptions.normalizationTraceCollector
221 .getValueOrDefault(hintProvider.getQueryEvaluationHint(query)));
222 for (PBody pBody : normalizer.rewrite(query).getBodies()) {
223 SubPlan bodyPlan = getPlan(pBody);
224 bodyPlans.add(bodyPlan);
225 }
226 return doCompileProduction(query, bodyPlans);
227 }
228
229 private CompiledQuery doCompileProduction(PQuery query, Collection<SubPlan> bodies) {
230 // TODO skip production node if there is just one body and no projection needed?
231 Map<PBody, RecipeTraceInfo> bodyFinalTraces = new HashMap<PBody, RecipeTraceInfo>();
232 Collection<ReteNodeRecipe> bodyFinalRecipes = new HashSet<ReteNodeRecipe>();
233
234 for (SubPlan bodyFinalPlan : bodies) {
235 // skip over any projections at the end
236 bodyFinalPlan = BuildHelper.eliminateTrailingProjections(bodyFinalPlan);
237
238 // TODO checkAndTrimEqualVariables may introduce superfluous trim,
239 // but whatever (no uniqueness enforcer needed)
240
241 // compile body
242 final CompiledSubPlan compiledBody = getCompiledForm(bodyFinalPlan);
243
244 // project to parameter list
245 RecipeTraceInfo finalTrace = projectBodyFinalToParameters(compiledBody, false);
246
247 bodyFinalTraces.put(bodyFinalPlan.getBody(), finalTrace);
248 bodyFinalRecipes.add(finalTrace.getRecipe());
249 }
250
251 CompiledQuery compiled = CompilerHelper.makeQueryTrace(query, bodyFinalTraces, bodyFinalRecipes,
252 getHints(query), metaContext, deleteAndRederiveEvaluation, timelyEvaluation);
253
254 return compiled;
255 }
256
257 private CompiledSubPlan doCompileDispatch(SubPlan plan) {
258 final POperation operation = plan.getOperation();
259 if (operation instanceof PEnumerate) {
260 return doCompileEnumerate(((PEnumerate) operation).getEnumerablePConstraint(), plan);
261 } else if (operation instanceof PApply) {
262 final PConstraint pConstraint = ((PApply) operation).getPConstraint();
263 if (pConstraint instanceof EnumerablePConstraint) {
264 CompiledSubPlan primaryParent = getCompiledForm(plan.getParentPlans().get(0));
265 PlanningTrace secondaryParent = doEnumerateDispatch(plan, (EnumerablePConstraint) pConstraint);
266 return compileToNaturalJoin(plan, primaryParent, secondaryParent);
267 } else if (pConstraint instanceof DeferredPConstraint) {
268 return doDeferredDispatch((DeferredPConstraint) pConstraint, plan);
269 } else {
270 throw new IllegalArgumentException("Unsupported PConstraint in query plan: " + plan.toShortString());
271 }
272 } else if (operation instanceof PJoin) {
273 return doCompileJoin((PJoin) operation, plan);
274 } else if (operation instanceof PProject) {
275 return doCompileProject((PProject) operation, plan);
276 } else if (operation instanceof PStart) {
277 return doCompileStart((PStart) operation, plan);
278 } else {
279 throw new IllegalArgumentException("Unsupported POperation in query plan: " + plan.toShortString());
280 }
281 }
282
283 private CompiledSubPlan doDeferredDispatch(DeferredPConstraint constraint, SubPlan plan) {
284 final SubPlan parentPlan = plan.getParentPlans().get(0);
285 final CompiledSubPlan parentCompiled = getCompiledForm(parentPlan);
286 if (constraint instanceof Equality) {
287 return compileDeferred((Equality) constraint, plan, parentPlan, parentCompiled);
288 } else if (constraint instanceof ExportedParameter) {
289 return compileDeferred((ExportedParameter) constraint, plan, parentPlan, parentCompiled);
290 } else if (constraint instanceof Inequality) {
291 return compileDeferred((Inequality) constraint, plan, parentPlan, parentCompiled);
292 } else if (constraint instanceof NegativePatternCall) {
293 return compileDeferred((NegativePatternCall) constraint, plan, parentPlan, parentCompiled);
294 } else if (constraint instanceof PatternMatchCounter) {
295 return compileDeferred((PatternMatchCounter) constraint, plan, parentPlan, parentCompiled);
296 } else if (constraint instanceof AggregatorConstraint) {
297 return compileDeferred((AggregatorConstraint) constraint, plan, parentPlan, parentCompiled);
298 } else if (constraint instanceof ExpressionEvaluation) {
299 return compileDeferred((ExpressionEvaluation) constraint, plan, parentPlan, parentCompiled);
300 } else if (constraint instanceof TypeFilterConstraint) {
301 return compileDeferred((TypeFilterConstraint) constraint, plan, parentPlan, parentCompiled);
302 }
303 throw new UnsupportedOperationException("Unknown deferred constraint " + constraint);
304 }
305
306 private CompiledSubPlan compileDeferred(Equality constraint, SubPlan plan, SubPlan parentPlan,
307 CompiledSubPlan parentCompiled) {
308 if (constraint.isMoot())
309 return parentCompiled.cloneFor(plan);
310
311 Integer index1 = parentCompiled.getPosMapping().get(constraint.getWho());
312 Integer index2 = parentCompiled.getPosMapping().get(constraint.getWithWhom());
313
314 if (index1 != null && index2 != null && index1.intValue() != index2.intValue()) {
315 Integer indexLower = Math.min(index1, index2);
316 Integer indexHigher = Math.max(index1, index2);
317
318 EqualityFilterRecipe equalityFilterRecipe = FACTORY.createEqualityFilterRecipe();
319 equalityFilterRecipe.setParent(parentCompiled.getRecipe());
320 equalityFilterRecipe.getIndices().add(indexLower);
321 equalityFilterRecipe.getIndices().add(indexHigher);
322
323 return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), equalityFilterRecipe, parentCompiled);
324 } else {
325 throw new IllegalArgumentException(String.format("Unable to interpret %s after compiled parent %s",
326 plan.toShortString(), parentCompiled.toString()));
327 }
328 }
329
330 /**
331 * Precondition: constantTrace must map to a ConstantRecipe, and all of its variables must be contained in
332 * toFilterTrace.
333 */
334 private CompiledSubPlan compileConstantFiltering(SubPlan plan, PlanningTrace toFilterTrace,
335 ConstantRecipe constantRecipe, List<PVariable> filteredVariables) {
336 PlanningTrace resultTrace = toFilterTrace;
337
338 int constantVariablesSize = filteredVariables.size();
339 for (int i = 0; i < constantVariablesSize; ++i) {
340 Object constantValue = constantRecipe.getConstantValues().get(i);
341 PVariable filteredVariable = filteredVariables.get(i);
342 int filteredColumn = resultTrace.getVariablesTuple().indexOf(filteredVariable);
343
344 DiscriminatorDispatcherRecipe dispatcherRecipe = FACTORY.createDiscriminatorDispatcherRecipe();
345 dispatcherRecipe.setDiscriminationColumnIndex(filteredColumn);
346 dispatcherRecipe.setParent(resultTrace.getRecipe());
347
348 PlanningTrace dispatcherTrace = new PlanningTrace(plan, resultTrace.getVariablesTuple(), dispatcherRecipe,
349 resultTrace);
350
351 DiscriminatorBucketRecipe bucketRecipe = FACTORY.createDiscriminatorBucketRecipe();
352 bucketRecipe.setBucketKey(constantValue);
353 bucketRecipe.setParent(dispatcherRecipe);
354
355 PlanningTrace bucketTrace = new PlanningTrace(plan, dispatcherTrace.getVariablesTuple(), bucketRecipe,
356 dispatcherTrace);
357
358 resultTrace = bucketTrace;
359 }
360
361 return resultTrace.cloneFor(plan);
362 }
363
364 private CompiledSubPlan compileDeferred(ExportedParameter constraint, SubPlan plan, SubPlan parentPlan,
365 CompiledSubPlan parentCompiled) {
366 return parentCompiled.cloneFor(plan);
367 }
368
369 private CompiledSubPlan compileDeferred(Inequality constraint, SubPlan plan, SubPlan parentPlan,
370 CompiledSubPlan parentCompiled) {
371 if (constraint.isEliminable())
372 return parentCompiled.cloneFor(plan);
373
374 Integer index1 = parentCompiled.getPosMapping().get(constraint.getWho());
375 Integer index2 = parentCompiled.getPosMapping().get(constraint.getWithWhom());
376
377 if (index1 != null && index2 != null && index1.intValue() != index2.intValue()) {
378 Integer indexLower = Math.min(index1, index2);
379 Integer indexHigher = Math.max(index1, index2);
380
381 InequalityFilterRecipe inequalityFilterRecipe = FACTORY.createInequalityFilterRecipe();
382 inequalityFilterRecipe.setParent(parentCompiled.getRecipe());
383 inequalityFilterRecipe.setSubject(indexLower);
384 inequalityFilterRecipe.getInequals().add(indexHigher);
385
386 return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), inequalityFilterRecipe,
387 parentCompiled);
388 } else {
389 throw new IllegalArgumentException(String.format("Unable to interpret %s after compiled parent %s",
390 plan.toShortString(), parentCompiled.toString()));
391 }
392 }
393
394 private CompiledSubPlan compileDeferred(TypeFilterConstraint constraint, SubPlan plan, SubPlan parentPlan,
395 CompiledSubPlan parentCompiled) {
396 final IInputKey inputKey = constraint.getInputKey();
397 if (!metaContext.isStateless(inputKey))
398 throw new UnsupportedOperationException(
399 "Non-enumerable input keys are currently supported in Rete only if they are stateless, unlike "
400 + inputKey);
401
402 final Tuple constraintVariables = constraint.getVariablesTuple();
403 final List<PVariable> parentVariables = parentCompiled.getVariablesTuple();
404
405 Mask mask; // select elements of the tuple to check against extensional relation
406 if (Tuples.flatTupleOf(parentVariables.toArray()).equals(constraintVariables)) {
407 mask = null; // lucky case, parent signature equals that of input key
408 } else {
409 List<PVariable> variables = new ArrayList<PVariable>();
410 for (Object variable : constraintVariables.getElements()) {
411 variables.add((PVariable) variable);
412 }
413 mask = CompilerHelper.makeProjectionMask(parentCompiled, variables);
414 }
415 InputFilterRecipe inputFilterRecipe = RecipesHelper.inputFilterRecipe(parentCompiled.getRecipe(), inputKey,
416 inputKey.getStringID(), mask);
417 return new CompiledSubPlan(plan, parentVariables, inputFilterRecipe, parentCompiled);
418 }
419
420 private CompiledSubPlan compileDeferred(NegativePatternCall constraint, SubPlan plan, SubPlan parentPlan,
421 CompiledSubPlan parentCompiled) {
422 final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan,
423 constraint.getActualParametersTuple());
424
425 JoinHelper joinHelper = new JoinHelper(plan, parentCompiled, callTrace);
426 final RecipeTraceInfo primaryIndexer = joinHelper.getPrimaryIndexer();
427 final RecipeTraceInfo secondaryIndexer = joinHelper.getSecondaryIndexer();
428
429 AntiJoinRecipe antiJoinRecipe = FACTORY.createAntiJoinRecipe();
430 antiJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe());
431 antiJoinRecipe.setRightParent((IndexerRecipe) secondaryIndexer.getRecipe());
432
433 return new CompiledSubPlan(plan, parentCompiled.getVariablesTuple(), antiJoinRecipe, primaryIndexer,
434 secondaryIndexer);
435 }
436
437 private CompiledSubPlan compileDeferred(PatternMatchCounter constraint, SubPlan plan, SubPlan parentPlan,
438 CompiledSubPlan parentCompiled) {
439 final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan,
440 constraint.getActualParametersTuple());
441
442 // hack: use some mask computations (+ the indexers) from a fake natural join against the called query
443 JoinHelper fakeJoinHelper = new JoinHelper(plan, parentCompiled, callTrace);
444 final RecipeTraceInfo primaryIndexer = fakeJoinHelper.getPrimaryIndexer();
445 final RecipeTraceInfo callProjectionIndexer = fakeJoinHelper.getSecondaryIndexer();
446
447 final List<PVariable> sideVariablesTuple = new ArrayList<PVariable>(
448 fakeJoinHelper.getSecondaryMask().transform(callTrace.getVariablesTuple()));
449 /* if (!booleanCheck) */ sideVariablesTuple.add(constraint.getResultVariable());
450
451 CountAggregatorRecipe aggregatorRecipe = FACTORY.createCountAggregatorRecipe();
452 aggregatorRecipe.setParent((ProjectionIndexerRecipe) callProjectionIndexer.getRecipe());
453 PlanningTrace aggregatorTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorRecipe,
454 callProjectionIndexer);
455
456 IndexerRecipe aggregatorIndexerRecipe = FACTORY.createAggregatorIndexerRecipe();
457 aggregatorIndexerRecipe.setParent(aggregatorRecipe);
458 // aggregatorIndexerRecipe.setMask(RecipesHelper.mask(
459 // sideVariablesTuple.size(),
460 // //use same indices as in the projection indexer
461 // // EVEN if result variable already visible in left parent
462 // fakeJoinHelper.getSecondaryMask().indices
463 // ));
464
465 int aggregatorWidth = sideVariablesTuple.size();
466 int aggregateResultIndex = aggregatorWidth - 1;
467
468 aggregatorIndexerRecipe.setMask(CompilerHelper.toRecipeMask(TupleMask.omit(
469 // aggregate according all but the last index
470 aggregateResultIndex, aggregatorWidth)));
471 PlanningTrace aggregatorIndexerTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorIndexerRecipe,
472 aggregatorTrace);
473
474 JoinRecipe naturalJoinRecipe = FACTORY.createJoinRecipe();
475 naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe());
476 naturalJoinRecipe.setRightParent(aggregatorIndexerRecipe);
477 naturalJoinRecipe.setRightParentComplementaryMask(RecipesHelper.mask(aggregatorWidth,
478 // extend with last element only - the computation value
479 aggregateResultIndex));
480
481 // what if the new variable already has a value?
482 // even if already known, we add the new result variable, so that it can be filtered at the end
483 // boolean alreadyKnown = parentPlan.getVisibleVariables().contains(constraint.getResultVariable());
484
485 final List<PVariable> aggregatedVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple());
486 aggregatedVariablesTuple.add(constraint.getResultVariable());
487
488 PlanningTrace joinTrace = new PlanningTrace(plan, aggregatedVariablesTuple, naturalJoinRecipe, primaryIndexer,
489 aggregatorIndexerTrace);
490
491 return CompilerHelper.checkAndTrimEqualVariables(plan, joinTrace).cloneFor(plan);
492 // if (!alreadyKnown) {
493 // return joinTrace.cloneFor(plan);
494 // } else {
495 // //final Integer equalsWithIndex = parentCompiled.getPosMapping().get(parentCompiled.getVariablesTuple());
496 // }
497 }
498
499 private CompiledSubPlan compileDeferred(AggregatorConstraint constraint, SubPlan plan, SubPlan parentPlan,
500 CompiledSubPlan parentCompiled) {
501 final PlanningTrace callTrace = referQuery(constraint.getReferredQuery(), plan,
502 constraint.getActualParametersTuple());
503
504 // hack: use some mask computations (+ the indexers) from a fake natural join against the called query
505 JoinHelper fakeJoinHelper = new JoinHelper(plan, parentCompiled, callTrace);
506 final RecipeTraceInfo primaryIndexer = fakeJoinHelper.getPrimaryIndexer();
507 TupleMask callGroupMask = fakeJoinHelper.getSecondaryMask();
508
509 final List<PVariable> sideVariablesTuple = new ArrayList<PVariable>(
510 callGroupMask.transform(callTrace.getVariablesTuple()));
511 /* if (!booleanCheck) */ sideVariablesTuple.add(constraint.getResultVariable());
512
513 IMultisetAggregationOperator<?, ?, ?> operator = constraint.getAggregator().getOperator();
514
515 SingleColumnAggregatorRecipe columnAggregatorRecipe = FACTORY.createSingleColumnAggregatorRecipe();
516 columnAggregatorRecipe.setParent(callTrace.getRecipe());
517 columnAggregatorRecipe.setMultisetAggregationOperator(operator);
518
519 int columnIndex = constraint.getAggregatedColumn();
520 IPosetComparator posetComparator = null;
521 Mask groupMask = CompilerHelper.toRecipeMask(callGroupMask);
522
523 // temporary solution to support the deprecated option for now
524 final boolean deleteAndRederiveEvaluationDep = this.deleteAndRederiveEvaluation || ReteHintOptions.deleteRederiveEvaluation.getValueOrDefault(getHints(plan));
525
526 columnAggregatorRecipe.setDeleteRederiveEvaluation(deleteAndRederiveEvaluationDep);
527 if (deleteAndRederiveEvaluationDep || (this.timelyEvaluation != null)) {
528 List<PParameter> parameters = constraint.getReferredQuery().getParameters();
529 IInputKey key = parameters.get(columnIndex).getDeclaredUnaryType();
530 if (key != null && metaContext.isPosetKey(key)) {
531 posetComparator = metaContext.getPosetComparator(Collections.singleton(key));
532 }
533 }
534
535 if (posetComparator == null) {
536 columnAggregatorRecipe.setGroupByMask(groupMask);
537 columnAggregatorRecipe.setAggregableIndex(columnIndex);
538 } else {
539 MonotonicityInfo monotonicityInfo = FACTORY.createMonotonicityInfo();
540 monotonicityInfo.setCoreMask(groupMask);
541 monotonicityInfo.setPosetMask(CompilerHelper.toRecipeMask(
542 TupleMask.selectSingle(columnIndex, constraint.getActualParametersTuple().getSize())));
543 monotonicityInfo.setPosetComparator(posetComparator);
544 columnAggregatorRecipe.setOptionalMonotonicityInfo(monotonicityInfo);
545 }
546
547 ReteNodeRecipe aggregatorRecipe = columnAggregatorRecipe;
548 PlanningTrace aggregatorTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorRecipe, callTrace);
549
550 IndexerRecipe aggregatorIndexerRecipe = FACTORY.createAggregatorIndexerRecipe();
551 aggregatorIndexerRecipe.setParent(aggregatorRecipe);
552
553 int aggregatorWidth = sideVariablesTuple.size();
554 int aggregateResultIndex = aggregatorWidth - 1;
555
556 aggregatorIndexerRecipe.setMask(CompilerHelper.toRecipeMask(TupleMask.omit(
557 // aggregate according all but the last index
558 aggregateResultIndex, aggregatorWidth)));
559 PlanningTrace aggregatorIndexerTrace = new PlanningTrace(plan, sideVariablesTuple, aggregatorIndexerRecipe,
560 aggregatorTrace);
561
562 JoinRecipe naturalJoinRecipe = FACTORY.createJoinRecipe();
563 naturalJoinRecipe.setLeftParent((ProjectionIndexerRecipe) primaryIndexer.getRecipe());
564 naturalJoinRecipe.setRightParent(aggregatorIndexerRecipe);
565 naturalJoinRecipe.setRightParentComplementaryMask(RecipesHelper.mask(aggregatorWidth,
566 // extend with last element only - the computation value
567 aggregateResultIndex));
568
569 // what if the new variable already has a value?
570 // even if already known, we add the new result variable, so that it can be filtered at the end
571 // boolean alreadyKnown = parentPlan.getVisibleVariables().contains(constraint.getResultVariable());
572
573 final List<PVariable> finalVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple());
574 finalVariablesTuple.add(constraint.getResultVariable());
575
576 PlanningTrace joinTrace = new PlanningTrace(plan, finalVariablesTuple, naturalJoinRecipe, primaryIndexer,
577 aggregatorIndexerTrace);
578
579 return CompilerHelper.checkAndTrimEqualVariables(plan, joinTrace).cloneFor(plan);
580 // if (!alreadyKnown) {
581 // return joinTrace.cloneFor(plan);
582 // } else {
583 // //final Integer equalsWithIndex = parentCompiled.getPosMapping().get(parentCompiled.getVariablesTuple());
584 // }
585 }
586
587 private CompiledSubPlan compileDeferred(ExpressionEvaluation constraint, SubPlan plan, SubPlan parentPlan,
588 CompiledSubPlan parentCompiled) {
589 Map<String, Integer> tupleNameMap = new HashMap<String, Integer>();
590 for (String name : constraint.getEvaluator().getInputParameterNames()) {
591 Map<? extends Object, Integer> index = parentCompiled.getPosMapping();
592 PVariable variable = constraint.getPSystem().getVariableByNameChecked(name);
593 Integer position = index.get(variable);
594 tupleNameMap.put(name, position);
595 }
596
597 final PVariable outputVariable = constraint.getOutputVariable();
598 final boolean booleanCheck = outputVariable == null;
599
600 // TODO determine whether expression is costly
601 boolean cacheOutput = ReteHintOptions.cacheOutputOfEvaluatorsByDefault.getValueOrDefault(getHints(plan));
602 // for (PAnnotation pAnnotation :
603 // plan.getBody().getPattern().getAnnotationsByName(EXPRESSION_EVALUATION_ANNOTATION"")) {
604 // for (Object value : pAnnotation.getAllValues("expensive")) {
605 // if (value instanceof Boolean)
606 // cacheOutput = (boolean) value;
607 // }
608 // }
609
610 ExpressionEnforcerRecipe enforcerRecipe = booleanCheck ? FACTORY.createCheckRecipe()
611 : FACTORY.createEvalRecipe();
612 enforcerRecipe.setParent(parentCompiled.getRecipe());
613 enforcerRecipe.setExpression(RecipesHelper.expressionDefinition(constraint.getEvaluator()));
614 enforcerRecipe.setCacheOutput(cacheOutput);
615 if (enforcerRecipe instanceof EvalRecipe) {
616 ((EvalRecipe) enforcerRecipe).setUnwinding(constraint.isUnwinding());
617 }
618 for (Entry<String, Integer> entry : tupleNameMap.entrySet()) {
619 enforcerRecipe.getMappedIndices().put(entry.getKey(), entry.getValue());
620 }
621
622 final List<PVariable> enforcerVariablesTuple = new ArrayList<PVariable>(parentCompiled.getVariablesTuple());
623 if (!booleanCheck)
624 enforcerVariablesTuple.add(outputVariable);
625 PlanningTrace enforcerTrace = new PlanningTrace(plan, enforcerVariablesTuple, enforcerRecipe, parentCompiled);
626
627 return CompilerHelper.checkAndTrimEqualVariables(plan, enforcerTrace).cloneFor(plan);
628 }
629
630 private CompiledSubPlan doCompileJoin(PJoin operation, SubPlan plan) {
631 final List<CompiledSubPlan> compiledParents = getCompiledFormOfParents(plan);
632 final CompiledSubPlan leftCompiled = compiledParents.get(0);
633 final CompiledSubPlan rightCompiled = compiledParents.get(1);
634
635 return compileToNaturalJoin(plan, leftCompiled, rightCompiled);
636 }
637
638 private CompiledSubPlan compileToNaturalJoin(SubPlan plan, final PlanningTrace leftCompiled,
639 final PlanningTrace rightCompiled) {
640 // CHECK IF SPECIAL CASE
641
642 // Is constant filtering applicable?
643 if (ReteHintOptions.useDiscriminatorDispatchersForConstantFiltering.getValueOrDefault(getHints(plan))) {
644 if (leftCompiled.getRecipe() instanceof ConstantRecipe
645 && rightCompiled.getVariablesTuple().containsAll(leftCompiled.getVariablesTuple())) {
646 return compileConstantFiltering(plan, rightCompiled, (ConstantRecipe) leftCompiled.getRecipe(),
647 leftCompiled.getVariablesTuple());
648 }
649 if (rightCompiled.getRecipe() instanceof ConstantRecipe
650 && leftCompiled.getVariablesTuple().containsAll(rightCompiled.getVariablesTuple())) {
651 return compileConstantFiltering(plan, leftCompiled, (ConstantRecipe) rightCompiled.getRecipe(),
652 rightCompiled.getVariablesTuple());
653 }
654 }
655
656 // ELSE: ACTUAL JOIN
657 JoinHelper joinHelper = new JoinHelper(plan, leftCompiled, rightCompiled);
658 return new CompiledSubPlan(plan, joinHelper.getNaturalJoinVariablesTuple(), joinHelper.getNaturalJoinRecipe(),
659 joinHelper.getPrimaryIndexer(), joinHelper.getSecondaryIndexer());
660 }
661
662 private CompiledSubPlan doCompileProject(PProject operation, SubPlan plan) {
663 final List<CompiledSubPlan> compiledParents = getCompiledFormOfParents(plan);
664 final CompiledSubPlan compiledParent = compiledParents.get(0);
665
666 List<PVariable> projectedVariables = new ArrayList<PVariable>(operation.getToVariables());
667 // Determinizing projection: try to keep original order (hopefully facilitates node reuse)
668 Map<PVariable, Integer> parentPosMapping = compiledParent.getPosMapping();
669 Collections.sort(projectedVariables, Comparator.comparing(parentPosMapping::get));
670
671 return doProjectPlan(compiledParent, projectedVariables, true,
672 parentTrace -> parentTrace.cloneFor(plan),
673 (recipe, parentTrace) -> new PlanningTrace(plan, projectedVariables, recipe, parentTrace),
674 (recipe, parentTrace) -> new CompiledSubPlan(plan, projectedVariables, recipe, parentTrace)
675 );
676 }
677
678 /**
679 * Projects a subplan onto the specified variable tuple
680 * @param compiledParentPlan the compiled form of the subplan
681 * @param targetVariables list of variables to project to
682 * @param enforceUniqueness whether distinctness shall be enforced after the projection.
683 * Specify false only if directly connecting to a production node.
684 * @param reinterpretTraceFactory constructs a reinterpreted trace that simply relabels the compiled parent plan, in case it is sufficient
685 * @param intermediateTraceFactory constructs a recipe trace for an intermediate node, given the recipe of the node and its parent trace
686 * @param finalTraceFactory constructs a recipe trace for the final resulting node, given the recipe of the node and its parent trace
687 * @since 2.1
688 */
689 <ResultTrace extends RecipeTraceInfo> ResultTrace doProjectPlan(
690 final CompiledSubPlan compiledParentPlan,
691 final List<PVariable> targetVariables,
692 boolean enforceUniqueness,
693 Function<CompiledSubPlan, ResultTrace> reinterpretTraceFactory,
694 BiFunction<ReteNodeRecipe, RecipeTraceInfo, RecipeTraceInfo> intermediateTraceFactory,
695 BiFunction<ReteNodeRecipe, RecipeTraceInfo, ResultTrace> finalTraceFactory)
696 {
697 if (targetVariables.equals(compiledParentPlan.getVariablesTuple())) // no projection needed
698 return reinterpretTraceFactory.apply(compiledParentPlan);
699
700 // otherwise, we need at least a trimmer
701 TrimmerRecipe trimmerRecipe = CompilerHelper.makeTrimmerRecipe(compiledParentPlan, targetVariables);
702
703 // do we need to eliminate duplicates?
704 SubPlan parentPlan = compiledParentPlan.getSubPlan();
705 if (!enforceUniqueness || BuildHelper.areAllVariablesDetermined(
706 parentPlan,
707 targetVariables,
708 queryAnalyzer,
709 true))
710 {
711 // if uniqueness enforcess is unwanted or unneeeded, skip it
712 return finalTraceFactory.apply(trimmerRecipe, compiledParentPlan);
713 } else {
714 // add a uniqueness enforcer
715 UniquenessEnforcerRecipe recipe = FACTORY.createUniquenessEnforcerRecipe();
716 recipe.getParents().add(trimmerRecipe);
717
718 // temporary solution to support the deprecated option for now
719 final boolean deleteAndRederiveEvaluationDep = this.deleteAndRederiveEvaluation || ReteHintOptions.deleteRederiveEvaluation.getValueOrDefault(getHints(parentPlan));
720
721 recipe.setDeleteRederiveEvaluation(deleteAndRederiveEvaluationDep);
722 if (deleteAndRederiveEvaluationDep || (this.timelyEvaluation != null)) {
723 PosetTriplet triplet = CompilerHelper.computePosetInfo(targetVariables, parentPlan.getBody(), metaContext);
724
725 if (triplet.comparator != null) {
726 MonotonicityInfo info = FACTORY.createMonotonicityInfo();
727 info.setCoreMask(triplet.coreMask);
728 info.setPosetMask(triplet.posetMask);
729 info.setPosetComparator(triplet.comparator);
730 recipe.setOptionalMonotonicityInfo(info);
731 }
732 }
733
734 RecipeTraceInfo trimmerTrace = intermediateTraceFactory.apply(trimmerRecipe, compiledParentPlan);
735 return finalTraceFactory.apply(recipe, trimmerTrace);
736 }
737 }
738
739 /**
740 * Projects the final compiled form of a PBody onto the parameter tuple
741 * @param compiledBody the compiled form of the body, with all constraints enforced, not yet projected to query parameters
742 * @param enforceUniqueness whether distinctness shall be enforced after the projection.
743 * Specify false only if directly connecting to a production node.
744 * @since 2.1
745 */
746 RecipeTraceInfo projectBodyFinalToParameters(
747 final CompiledSubPlan compiledBody,
748 boolean enforceUniqueness)
749 {
750 final PBody body = compiledBody.getSubPlan().getBody();
751 final List<PVariable> parameterList = body.getSymbolicParameterVariables();
752
753 return doProjectPlan(compiledBody, parameterList, enforceUniqueness,
754 parentTrace -> parentTrace,
755 (recipe, parentTrace) -> new ParameterProjectionTrace(body, recipe, parentTrace),
756 (recipe, parentTrace) -> new ParameterProjectionTrace(body, recipe, parentTrace)
757 );
758 }
759
760 private CompiledSubPlan doCompileStart(PStart operation, SubPlan plan) {
761 if (!operation.getAPrioriVariables().isEmpty()) {
762 throw new IllegalArgumentException("Input variables unsupported by Rete: " + plan.toShortString());
763 }
764 final ConstantRecipe recipe = FACTORY.createConstantRecipe();
765 recipe.getConstantValues().clear();
766
767 return new CompiledSubPlan(plan, new ArrayList<PVariable>(), recipe);
768 }
769
770 private CompiledSubPlan doCompileEnumerate(EnumerablePConstraint constraint, SubPlan plan) {
771 final PlanningTrace trimmedTrace = doEnumerateAndDeduplicate(constraint, plan);
772
773 return trimmedTrace.cloneFor(plan);
774 }
775
776 private PlanningTrace doEnumerateAndDeduplicate(EnumerablePConstraint constraint, SubPlan plan) {
777 final PlanningTrace coreTrace = doEnumerateDispatch(plan, constraint);
778 final PlanningTrace trimmedTrace = CompilerHelper.checkAndTrimEqualVariables(plan, coreTrace);
779 return trimmedTrace;
780 }
781
782 private PlanningTrace doEnumerateDispatch(SubPlan plan, EnumerablePConstraint constraint) {
783 if (constraint instanceof RelationEvaluation) {
784 return compileEnumerable(plan, (RelationEvaluation) constraint);
785 } else if (constraint instanceof BinaryTransitiveClosure) {
786 return compileEnumerable(plan, (BinaryTransitiveClosure) constraint);
787 } else if (constraint instanceof BinaryReflexiveTransitiveClosure) {
788 return compileEnumerable(plan, (BinaryReflexiveTransitiveClosure) constraint);
789 } else if (constraint instanceof RepresentativeElectionConstraint) {
790 return compileEnumerable(plan, (RepresentativeElectionConstraint) constraint);
791 } else if (constraint instanceof ConstantValue) {
792 return compileEnumerable(plan, (ConstantValue) constraint);
793 } else if (constraint instanceof PositivePatternCall) {
794 return compileEnumerable(plan, (PositivePatternCall) constraint);
795 } else if (constraint instanceof TypeConstraint) {
796 return compileEnumerable(plan, (TypeConstraint) constraint);
797 }
798 throw new UnsupportedOperationException("Unknown enumerable constraint " + constraint);
799 }
800
801 private PlanningTrace compileEnumerable(SubPlan plan, BinaryReflexiveTransitiveClosure constraint) {
802 // TODO the implementation would perform better if an inequality check would be used after tcRecipe and
803 // uniqueness enforcer be replaced by a transparent node with multiple parents, but such a node is not available
804 // in recipe metamodel in VIATRA 2.0
805
806 // Find called query
807 final PQuery referredQuery = constraint.getSupplierKey();
808 final PlanningTrace callTrace = referQuery(referredQuery, plan, constraint.getVariablesTuple());
809
810 // Calculate irreflexive transitive closure
811 final TransitiveClosureRecipe tcRecipe = FACTORY.createTransitiveClosureRecipe();
812 tcRecipe.setParent(callTrace.getRecipe());
813 final PlanningTrace tcTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), tcRecipe, callTrace);
814
815 // Enumerate universe type
816 final IInputKey inputKey = constraint.getUniverseType();
817 final InputRecipe universeTypeRecipe = RecipesHelper.inputRecipe(inputKey, inputKey.getStringID(), inputKey.getArity());
818 final PlanningTrace universeTypeTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(
819 Tuples.staticArityFlatTupleOf(constraint.getVariablesTuple().get(0))), universeTypeRecipe);
820
821 // Calculate reflexive access by duplicating universe type column
822 final TrimmerRecipe reflexiveRecipe = FACTORY.createTrimmerRecipe();
823 reflexiveRecipe.setMask(RecipesHelper.mask(1, 0, 0));
824 reflexiveRecipe.setParent(universeTypeRecipe);
825 final PlanningTrace reflexiveTrace = new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), reflexiveRecipe, universeTypeTrace);
826
827 // Finally, reduce duplicates after a join
828 final UniquenessEnforcerRecipe brtcRecipe = FACTORY.createUniquenessEnforcerRecipe();
829 brtcRecipe.getParents().add(tcRecipe);
830 brtcRecipe.getParents().add(reflexiveRecipe);
831
832 return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), brtcRecipe, reflexiveTrace, tcTrace);
833 }
834
835 private PlanningTrace compileEnumerable(SubPlan plan, RepresentativeElectionConstraint constraint) {
836 var referredQuery = constraint.getSupplierKey();
837 var callTrace = referQuery(referredQuery, plan, constraint.getVariablesTuple());
838 var recipe = FACTORY.createRepresentativeElectionRecipe();
839 recipe.setParent(callTrace.getRecipe());
840 recipe.setConnectivity(constraint.getConnectivity());
841 return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, callTrace);
842 }
843
844 private PlanningTrace compileEnumerable(SubPlan plan, BinaryTransitiveClosure constraint) {
845 final PQuery referredQuery = constraint.getSupplierKey();
846 final PlanningTrace callTrace = referQuery(referredQuery, plan, constraint.getVariablesTuple());
847
848 final TransitiveClosureRecipe recipe = FACTORY.createTransitiveClosureRecipe();
849 recipe.setParent(callTrace.getRecipe());
850
851 return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, callTrace);
852 }
853
854 private PlanningTrace compileEnumerable(SubPlan plan, RelationEvaluation constraint) {
855 final List<ReteNodeRecipe> parentRecipes = new ArrayList<ReteNodeRecipe>();
856 final List<RecipeTraceInfo> parentTraceInfos = new ArrayList<RecipeTraceInfo>();
857 for (final PQuery inputQuery : constraint.getReferredQueries()) {
858 final CompiledQuery compiledQuery = getCompiledForm(inputQuery);
859 parentRecipes.add(compiledQuery.getRecipe());
860 parentTraceInfos.add(compiledQuery);
861 }
862 final RelationEvaluationRecipe recipe = FACTORY.createRelationEvaluationRecipe();
863 recipe.getParents().addAll(parentRecipes);
864 recipe.setEvaluator(RecipesHelper.expressionDefinition(constraint.getEvaluator()));
865 return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe, parentTraceInfos);
866 }
867
868 private PlanningTrace compileEnumerable(SubPlan plan, PositivePatternCall constraint) {
869 final PQuery referredQuery = constraint.getReferredQuery();
870 return referQuery(referredQuery, plan, constraint.getVariablesTuple());
871 }
872
873 private PlanningTrace compileEnumerable(SubPlan plan, TypeConstraint constraint) {
874 final IInputKey inputKey = constraint.getSupplierKey();
875 final InputRecipe recipe = RecipesHelper.inputRecipe(inputKey, inputKey.getStringID(), inputKey.getArity());
876 return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe);
877 }
878
879 private PlanningTrace compileEnumerable(SubPlan plan, ConstantValue constraint) {
880 final ConstantRecipe recipe = FACTORY.createConstantRecipe();
881 recipe.getConstantValues().add(constraint.getSupplierKey());
882 return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(constraint), recipe);
883 }
884
885 // TODO handle recursion
886 private PlanningTrace referQuery(PQuery query, SubPlan plan, Tuple actualParametersTuple) {
887 RecipeTraceInfo referredQueryTrace = originalTraceOfReferredQuery(query);
888 return new PlanningTrace(plan, CompilerHelper.convertVariablesTuple(actualParametersTuple),
889 referredQueryTrace.getRecipe(), referredQueryTrace.getParentRecipeTracesForCloning());
890 }
891
892 private RecipeTraceInfo originalTraceOfReferredQuery(PQuery query) {
893 // eliminate superfluous production node?
894 if (PVisibility.EMBEDDED == query.getVisibility()) { // currently inline patterns only
895 Set<PBody> rewrittenBodies = normalizer.rewrite(query).getBodies();
896 if (1 == rewrittenBodies.size()) { // non-disjunctive
897 // TODO in the future, check if non-recursive - (not currently permitted)
898
899 PBody pBody = rewrittenBodies.iterator().next();
900 SubPlan bodyFinalPlan = getPlan(pBody);
901
902 // skip over any projections at the end
903 bodyFinalPlan = BuildHelper.eliminateTrailingProjections(bodyFinalPlan);
904
905 // TODO checkAndTrimEqualVariables may introduce superfluous trim,
906 // but whatever (no uniqueness enforcer needed)
907
908 // compile body
909 final CompiledSubPlan compiledBody = getCompiledForm(bodyFinalPlan);
910
911 // project to parameter list, add uniqueness enforcer if necessary
912 return projectBodyFinalToParameters(compiledBody, true /* ensure uniqueness, as no production node is used */);
913 }
914 }
915
916 // otherwise, regular reference to recipe realizing the query
917 return getCompiledForm(query);
918 }
919
920 protected List<CompiledSubPlan> getCompiledFormOfParents(SubPlan plan) {
921 List<CompiledSubPlan> results = new ArrayList<CompiledSubPlan>();
922 for (SubPlan parentPlan : plan.getParentPlans()) {
923 results.add(getCompiledForm(parentPlan));
924 }
925 return results;
926 }
927
928 /**
929 * Returns an unmodifiable view of currently cached compiled queries.
930 */
931 public Map<PQuery, CompiledQuery> getCachedCompiledQueries() {
932 return Collections.unmodifiableMap(queryCompilerCache);
933 }
934
935 /**
936 * Returns an unmodifiable view of currently cached query plans.
937 */
938 public Map<PBody, SubPlan> getCachedQueryPlans() {
939 return Collections.unmodifiableMap(plannerCache);
940 }
941
942 private QueryEvaluationHint getHints(SubPlan plan) {
943 return getHints(plan.getBody().getPattern());
944 }
945
946 private QueryEvaluationHint getHints(PQuery pattern) {
947 return hintProvider.getQueryEvaluationHint(pattern);
948 }
949}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinCandidate.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinCandidate.java
new file mode 100644
index 00000000..45350099
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinCandidate.java
@@ -0,0 +1,162 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.construction.quasitree;
11
12import java.util.ArrayList;
13import java.util.Collections;
14import java.util.List;
15import java.util.Map;
16import java.util.Set;
17import java.util.stream.Collectors;
18import java.util.stream.Stream;
19
20import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
21import tools.refinery.viatra.runtime.matchers.planning.SubPlanFactory;
22import tools.refinery.viatra.runtime.matchers.planning.helpers.FunctionalDependencyHelper;
23import tools.refinery.viatra.runtime.matchers.planning.operations.PJoin;
24import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
25import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
26import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
27import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
28
29/**
30 * @author Gabor Bergmann
31 *
32 */
33class JoinCandidate {
34 private QueryAnalyzer analyzer;
35
36 SubPlan primary;
37 SubPlan secondary;
38
39 Set<PVariable> varPrimary;
40 Set<PVariable> varSecondary;
41 Set<PVariable> varCommon;
42
43 List<PConstraint> consPrimary;
44 List<PConstraint> consSecondary;
45
46
47 JoinCandidate(SubPlan primary, SubPlan secondary, QueryAnalyzer analyzer) {
48 super();
49 this.primary = primary;
50 this.secondary = secondary;
51 this.analyzer = analyzer;
52
53 varPrimary = getPrimary().getVisibleVariables();
54 varSecondary = getSecondary().getVisibleVariables();
55 varCommon = CollectionsFactory.createSet(varPrimary);
56 varCommon.retainAll(varSecondary);
57
58 consPrimary = new ArrayList<PConstraint>(primary.getAllEnforcedConstraints());
59 Collections.sort(consPrimary, TieBreaker.CONSTRAINT_COMPARATOR);
60 consSecondary = new ArrayList<PConstraint>(secondary.getAllEnforcedConstraints());
61 Collections.sort(consSecondary, TieBreaker.CONSTRAINT_COMPARATOR);
62 }
63
64
65
66 /**
67 * @return the a
68 */
69 public SubPlan getPrimary() {
70 return primary;
71 }
72
73 /**
74 * @return the b
75 */
76 public SubPlan getSecondary() {
77 return secondary;
78 }
79
80 public SubPlan getJoinedPlan(SubPlanFactory factory) {
81 // check special cases first
82 if (isTrivial())
83 return primary;
84 if (isSubsumption())
85 return
86 (consPrimary.size() > consSecondary.size()) ? primary : secondary;
87
88
89 // default case
90 return factory.createSubPlan(new PJoin(), primary, secondary);
91 }
92
93 @Override
94 public String toString() {
95 return primary.toString() + " |x| " + secondary.toString();
96 }
97
98 /**
99 * @return the varPrimary
100 */
101 public Set<PVariable> getVarPrimary() {
102 return varPrimary;
103 }
104
105 /**
106 * @return the varSecondary
107 */
108 public Set<PVariable> getVarSecondary() {
109 return varSecondary;
110 }
111
112 /**
113 * @return constraints of primary, sorted according to {@link TieBreaker#CONSTRAINT_COMPARATOR}.
114 */
115 public List<PConstraint> getConsPrimary() {
116 return consPrimary;
117 }
118 /**
119 * @return constraints of secondary, sorted according to {@link TieBreaker#CONSTRAINT_COMPARATOR}.
120 */
121 public List<PConstraint> getConsSecondary() {
122 return consSecondary;
123 }
124
125
126
127 public boolean isTrivial() {
128 return getPrimary().equals(getSecondary());
129 }
130
131 public boolean isSubsumption() {
132 return consPrimary.containsAll(consSecondary) || consSecondary.containsAll(consPrimary);
133 }
134
135 public boolean isCheckOnly() {
136 return varPrimary.containsAll(varSecondary) || varSecondary.containsAll(varPrimary);
137 }
138
139 public boolean isDescartes() {
140 return Collections.disjoint(varPrimary, varSecondary);
141 }
142
143 private Boolean heath;
144
145 // it is a Heath-join iff common variables functionally determine either all primary or all secondary variables
146 public boolean isHeath() {
147 if (heath == null) {
148 Set<PConstraint> union = Stream.concat(
149 primary.getAllEnforcedConstraints().stream(),
150 secondary.getAllEnforcedConstraints().stream()
151 ).collect(Collectors.toSet());
152 Map<Set<PVariable>, Set<PVariable>> dependencies =
153 analyzer.getFunctionalDependencies(union, false);
154 // does varCommon determine either varPrimary or varSecondary?
155 Set<PVariable> varCommonClosure = FunctionalDependencyHelper.closureOf(varCommon, dependencies);
156
157 heath = varCommonClosure.containsAll(varPrimary) || varCommonClosure.containsAll(varSecondary);
158 }
159 return heath;
160 }
161
162}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinOrderingHeuristics.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinOrderingHeuristics.java
new file mode 100644
index 00000000..0ea7c1d9
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/JoinOrderingHeuristics.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.construction.quasitree;
11
12import java.util.Comparator;
13
14import tools.refinery.viatra.runtime.rete.util.Options;
15import tools.refinery.viatra.runtime.rete.util.OrderingCompareAgent;
16
17/**
18 * @author Gabor Bergmann
19 *
20 */
21public class JoinOrderingHeuristics implements Comparator<JoinCandidate> {
22
23 @Override
24 public int compare(JoinCandidate jc1, JoinCandidate jc2) {
25 return new OrderingCompareAgent<JoinCandidate>(jc1, jc2) {
26 @Override
27 protected void doCompare() {
28 swallowBoolean(true && consider(preferTrue(a.isTrivial(), b.isTrivial()))
29 && consider(preferTrue(a.isSubsumption(), b.isSubsumption()))
30 && consider(preferTrue(a.isCheckOnly(), b.isCheckOnly()))
31 && consider(
32 Options.functionalDependencyOption == Options.FunctionalDependencyOption.OFF ?
33 dontCare() :
34 preferTrue(a.isHeath(), b.isHeath())
35 )
36 && consider(preferFalse(a.isDescartes(), b.isDescartes()))
37
38 // TODO main heuristic decisions
39
40 // tie breaking
41 && consider(preferLess(a.getConsPrimary(), b.getConsPrimary(), TieBreaker.CONSTRAINT_LIST_COMPARATOR))
42 && consider(preferLess(a.getConsSecondary(), b.getConsSecondary(), TieBreaker.CONSTRAINT_LIST_COMPARATOR))
43 && consider(preferLess(System.identityHashCode(a), System.identityHashCode(b))));
44 }
45 }.compare();
46
47 }
48
49} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/QuasiTreeLayout.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/QuasiTreeLayout.java
new file mode 100644
index 00000000..9b814376
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/QuasiTreeLayout.java
@@ -0,0 +1,205 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.construction.quasitree;
11
12import java.util.ArrayList;
13import java.util.Collections;
14import java.util.LinkedHashSet;
15import java.util.List;
16import java.util.Set;
17
18import org.apache.log4j.Logger;
19import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
20import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
21import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
22import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
23import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
24import tools.refinery.viatra.runtime.matchers.planning.IQueryPlannerStrategy;
25import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
26import tools.refinery.viatra.runtime.matchers.planning.SubPlanFactory;
27import tools.refinery.viatra.runtime.matchers.planning.helpers.BuildHelper;
28import tools.refinery.viatra.runtime.matchers.planning.operations.PApply;
29import tools.refinery.viatra.runtime.matchers.planning.operations.PEnumerate;
30import tools.refinery.viatra.runtime.matchers.planning.operations.PProject;
31import tools.refinery.viatra.runtime.matchers.planning.operations.PStart;
32import tools.refinery.viatra.runtime.matchers.psystem.DeferredPConstraint;
33import tools.refinery.viatra.runtime.matchers.psystem.EnumerablePConstraint;
34import tools.refinery.viatra.runtime.matchers.psystem.PBody;
35import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
36import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
37import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
38import tools.refinery.viatra.runtime.rete.construction.RetePatternBuildException;
39import tools.refinery.viatra.runtime.rete.util.ReteHintOptions;
40
41/**
42 * Layout ideas: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=398763
43 *
44 * @author Gabor Bergmann
45 *
46 */
47public class QuasiTreeLayout implements IQueryPlannerStrategy {
48
49 private IQueryBackendHintProvider hintProvider;
50 private IQueryBackendContext backendContext;
51 private QueryAnalyzer queryAnalyzer;
52
53 public QuasiTreeLayout(IQueryBackendContext backendContext) {
54 this(backendContext, backendContext.getHintProvider());
55 }
56
57 public QuasiTreeLayout(IQueryBackendContext backendContext, IQueryBackendHintProvider hintProvider) {
58 this.backendContext = backendContext;
59 this.hintProvider = hintProvider;
60 queryAnalyzer = backendContext.getQueryAnalyzer();
61 }
62
63 @Override
64 public SubPlan plan(PBody pSystem, Logger logger, IQueryMetaContext context) {
65 return new Scaffold(pSystem, logger, context).run();
66 }
67
68 public class Scaffold {
69 PBody pSystem;
70 PQuery query;
71 IQueryMetaContext context;
72 private QueryEvaluationHint hints;
73 //IOperationCompiler compiler;
74 //SubPlanProcessor planProcessor = new SubPlanProcessor();
75 SubPlanFactory planFactory;
76
77 Set<DeferredPConstraint> deferredConstraints = null;
78 Set<EnumerablePConstraint> enumerableConstraints = null;
79 Set<ConstantValue> constantConstraints = null;
80 Set<SubPlan> forefront = new LinkedHashSet<SubPlan>();
81 Logger logger;
82
83 Scaffold(PBody pSystem, Logger logger, /*IOperationCompiler compiler,*/ IQueryMetaContext context) {
84 this.pSystem = pSystem;
85 this.logger = logger;
86 this.context = context;
87 this.planFactory = new SubPlanFactory(pSystem);
88 query = pSystem.getPattern();
89 //this.compiler = compiler;
90 //planProcessor.setCompiler(compiler);
91
92 hints = hintProvider.getQueryEvaluationHint(query);
93 }
94
95 /**
96 * @throws ViatraQueryRuntimeException
97 */
98 public SubPlan run() {
99 try {
100 logger.debug(String.format(
101 "%s: patternbody build started for %s",
102 getClass().getSimpleName(),
103 query.getFullyQualifiedName()));
104
105 // PROCESS CONSTRAINTS
106 deferredConstraints = pSystem.getConstraintsOfType(DeferredPConstraint.class);
107 enumerableConstraints = pSystem.getConstraintsOfType(EnumerablePConstraint.class);
108 constantConstraints = pSystem.getConstraintsOfType(ConstantValue.class);
109
110 for (EnumerablePConstraint enumerable : enumerableConstraints) {
111 SubPlan plan = planFactory.createSubPlan(new PEnumerate(enumerable));
112 admitSubPlan(plan);
113 }
114 if (enumerableConstraints.isEmpty()) { // EXTREME CASE
115 SubPlan plan = planFactory.createSubPlan(new PStart());
116 admitSubPlan(plan);
117 }
118
119 // JOIN FOREFRONT PLANS WHILE POSSIBLE
120 while (forefront.size() > 1) {
121 // TODO QUASI-TREE TRIVIAL JOINS?
122
123 List<JoinCandidate> candidates = generateJoinCandidates();
124 JoinOrderingHeuristics ordering = new JoinOrderingHeuristics();
125 JoinCandidate selectedJoin = Collections.min(candidates, ordering);
126 doJoin(selectedJoin);
127 }
128 assert (forefront.size() == 1);
129
130 // PROJECT TO PARAMETERS
131 SubPlan preFinalPlan = forefront.iterator().next();
132 SubPlan finalPlan = planFactory.createSubPlan(new PProject(pSystem.getSymbolicParameterVariables()), preFinalPlan);
133
134 // FINAL CHECK, whether all exported variables are present + all constraint satisfied
135 BuildHelper.finalCheck(pSystem, finalPlan, context);
136 // TODO integrate the check above in SubPlan / POperation
137
138 logger.debug(String.format(
139 "%s: patternbody query plan concluded for %s as: %s",
140 getClass().getSimpleName(),
141 query.getFullyQualifiedName(),
142 finalPlan.toLongString()));
143 return finalPlan;
144 } catch (RetePatternBuildException ex) {
145 ex.setPatternDescription(query);
146 throw ex;
147 }
148 }
149
150 public List<JoinCandidate> generateJoinCandidates() {
151 List<JoinCandidate> candidates = new ArrayList<JoinCandidate>();
152 int bIndex = 0;
153 for (SubPlan b : forefront) {
154 int aIndex = 0;
155 for (SubPlan a : forefront) {
156 if (aIndex++ >= bIndex)
157 break;
158 candidates.add(new JoinCandidate(a, b, queryAnalyzer));
159 }
160 bIndex++;
161 }
162 return candidates;
163 }
164
165 private void admitSubPlan(SubPlan plan) {
166 // are there any unapplied constant filters that we can apply here?
167 if (ReteHintOptions.prioritizeConstantFiltering.getValueOrDefault(hints)) {
168 for (ConstantValue constantConstraint : constantConstraints) {
169 if (!plan.getAllEnforcedConstraints().contains(constantConstraint) &&
170 plan.getVisibleVariables().containsAll(constantConstraint.getAffectedVariables())) {
171 plan = planFactory.createSubPlan(new PApply(constantConstraint), plan);
172 }
173 }
174 }
175 // are there any variables that will not be needed anymore and are worth trimming?
176 // (check only if there are unenforced enumerables, so that there are still upcoming joins)
177// if (Options.planTrimOption != Options.PlanTrimOption.OFF &&
178// !plan.getAllEnforcedConstraints().containsAll(enumerableConstraints)) {
179 if (true) {
180 final SubPlan trimmed = BuildHelper.trimUnneccessaryVariables(
181 planFactory, plan, true, queryAnalyzer);
182 plan = trimmed;
183 }
184 // are there any checkable constraints?
185 for (DeferredPConstraint deferred : deferredConstraints) {
186 if (!plan.getAllEnforcedConstraints().contains(deferred)) {
187 if (deferred.isReadyAt(plan, context)) {
188 admitSubPlan(planFactory.createSubPlan(new PApply(deferred), plan));
189 return;
190 }
191 }
192 }
193 // if no checkable constraints and no unused variables
194 forefront.add(plan);
195 }
196
197 private void doJoin(JoinCandidate selectedJoin) {
198 forefront.remove(selectedJoin.getPrimary());
199 forefront.remove(selectedJoin.getSecondary());
200 admitSubPlan(selectedJoin.getJoinedPlan(planFactory));
201 }
202
203 }
204
205}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/TieBreaker.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/TieBreaker.java
new file mode 100644
index 00000000..0b955922
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/construction/quasitree/TieBreaker.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.construction.quasitree;
10
11import java.util.Comparator;
12
13import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
14import tools.refinery.viatra.runtime.rete.util.LexicographicComparator;
15
16/**
17 * Class providing comparators for breaking ties somewhat more deterministically.
18 * @author Bergmann Gabor
19 *
20 */
21public class TieBreaker {
22
23 private TieBreaker() {/*Utility class constructor*/}
24
25 public static final Comparator<PConstraint> CONSTRAINT_COMPARATOR = (arg0, arg1) -> arg0.getMonotonousID() - arg1.getMonotonousID();
26
27 public static final Comparator<Iterable<? extends PConstraint>> CONSTRAINT_LIST_COMPARATOR =
28 new LexicographicComparator<PConstraint>(CONSTRAINT_COMPARATOR);
29
30}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/AbstractEvaluatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/AbstractEvaluatorNode.java
new file mode 100644
index 00000000..d32a0449
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/AbstractEvaluatorNode.java
@@ -0,0 +1,65 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.eval;
10
11import java.util.Iterator;
12
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.util.Direction;
15import tools.refinery.viatra.runtime.rete.network.ReteContainer;
16import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
17import tools.refinery.viatra.runtime.rete.single.SingleInputNode;
18
19/**
20 * @author Bergmann Gabor
21 */
22public abstract class AbstractEvaluatorNode extends SingleInputNode implements IEvaluatorNode {
23
24 /**
25 * @since 1.5
26 */
27 protected EvaluatorCore core;
28
29
30 /**
31 * @since 1.5
32 */
33 public AbstractEvaluatorNode(ReteContainer reteContainer, EvaluatorCore core) {
34 super(reteContainer);
35 this.core = core;
36 core.init(this);
37 }
38
39 /**
40 * @since 1.5
41 */
42 @Override
43 public ReteContainer getReteContainer() {
44 return getContainer();
45 }
46
47 /**
48 * @since 1.5
49 */
50 @Override
51 public String prettyPrintTraceInfoPatternList() {
52 return getTraceInfoPatternsEnumerated();
53 }
54
55 /**
56 * @since 2.4
57 */
58 protected void propagateIterableUpdate(final Direction direction, final Iterable<Tuple> update, final Timestamp timestamp) {
59 final Iterator<Tuple> itr = update.iterator();
60 while (itr.hasNext()) {
61 propagateUpdate(direction, itr.next(), timestamp);
62 }
63 }
64
65}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/EvaluatorCore.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/EvaluatorCore.java
new file mode 100644
index 00000000..c45c6048
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/EvaluatorCore.java
@@ -0,0 +1,180 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.eval;
10
11import java.util.Collections;
12import java.util.Iterator;
13import java.util.Map;
14import java.util.Set;
15
16import org.apache.log4j.Logger;
17import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
18import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
20import tools.refinery.viatra.runtime.matchers.tuple.TupleValueProvider;
21import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
22import tools.refinery.viatra.runtime.matchers.util.Sets;
23
24/**
25 * An instance of this class performs the evaluation of Java expressions.
26 *
27 * @author Bergmann Gabor
28 * @author Tamas Szabo
29 * @since 1.5
30 */
31public abstract class EvaluatorCore {
32
33 protected Logger logger;
34 protected IExpressionEvaluator evaluator;
35 /**
36 * @since 2.4
37 */
38 protected int sourceTupleWidth;
39 private Map<String, Integer> parameterPositions;
40 protected IQueryRuntimeContext runtimeContext;
41 protected IEvaluatorNode evaluatorNode;
42
43 public EvaluatorCore(final Logger logger, final IExpressionEvaluator evaluator,
44 final Map<String, Integer> parameterPositions, final int sourceTupleWidth) {
45 this.logger = logger;
46 this.evaluator = evaluator;
47 this.parameterPositions = parameterPositions;
48 this.sourceTupleWidth = sourceTupleWidth;
49 }
50
51 public void init(final IEvaluatorNode evaluatorNode) {
52 this.evaluatorNode = evaluatorNode;
53 this.runtimeContext = evaluatorNode.getReteContainer().getNetwork().getEngine().getRuntimeContext();
54 }
55
56 /**
57 * @since 2.4
58 */
59 public abstract Iterable<Tuple> performEvaluation(final Tuple input);
60
61 protected abstract String evaluationKind();
62
63 public Object evaluateTerm(final Tuple input) {
64 // actual evaluation
65 Object result = null;
66 try {
67 final TupleValueProvider tupleParameters = new TupleValueProvider(runtimeContext.unwrapTuple(input),
68 parameterPositions);
69 result = evaluator.evaluateExpression(tupleParameters);
70 } catch (final Exception e) {
71 logger.warn(String.format(
72 "The incremental pattern matcher encountered an error during %s evaluation for pattern(s) %s over values %s. Error message: %s. (Developer note: %s in %s)",
73 evaluationKind(), evaluatorNode.prettyPrintTraceInfoPatternList(), prettyPrintTuple(input),
74 e.getMessage(), e.getClass().getSimpleName(), this.evaluatorNode), e);
75 result = errorResult();
76 }
77
78 return result;
79 }
80
81 protected String prettyPrintTuple(final Tuple tuple) {
82 return tuple.toString();
83 }
84
85 protected Object errorResult() {
86 return null;
87 }
88
89 public static class PredicateEvaluatorCore extends EvaluatorCore {
90
91 public PredicateEvaluatorCore(final Logger logger, final IExpressionEvaluator evaluator,
92 final Map<String, Integer> parameterPositions, final int sourceTupleWidth) {
93 super(logger, evaluator, parameterPositions, sourceTupleWidth);
94 }
95
96 @Override
97 public Iterable<Tuple> performEvaluation(final Tuple input) {
98 final Object result = evaluateTerm(input);
99 if (Boolean.TRUE.equals(result)) {
100 return Collections.singleton(input);
101 } else {
102 return null;
103 }
104 }
105
106 @Override
107 protected String evaluationKind() {
108 return "check()";
109 }
110
111 }
112
113 public static class FunctionEvaluatorCore extends EvaluatorCore {
114
115 /**
116 * @since 2.4
117 */
118 protected final boolean isUnwinding;
119
120 public FunctionEvaluatorCore(final Logger logger, final IExpressionEvaluator evaluator,
121 final Map<String, Integer> parameterPositions, final int sourceTupleWidth) {
122 this(logger, evaluator, parameterPositions, sourceTupleWidth, false);
123 }
124
125 /**
126 * @since 2.4
127 */
128 public FunctionEvaluatorCore(final Logger logger, final IExpressionEvaluator evaluator,
129 final Map<String, Integer> parameterPositions, final int sourceTupleWidth, final boolean isUnwinding) {
130 super(logger, evaluator, parameterPositions, sourceTupleWidth);
131 this.isUnwinding = isUnwinding;
132 }
133
134 @Override
135 public Iterable<Tuple> performEvaluation(final Tuple input) {
136 final Object result = evaluateTerm(input);
137 if (result != null) {
138 if (this.isUnwinding) {
139 final Set<?> resultAsSet = (result instanceof Set<?>) ? (Set<?>) result
140 : (result instanceof Iterable<?>) ? Sets.newSet((Iterable<?>) result) : null;
141
142 if (resultAsSet != null) {
143 return () -> {
144 final Iterator<?> wrapped = resultAsSet.iterator();
145 return new Iterator<Tuple>() {
146 @Override
147 public boolean hasNext() {
148 return wrapped.hasNext();
149 }
150
151 @Override
152 public Tuple next() {
153 final Object next = wrapped.next();
154 return Tuples.staticArityLeftInheritanceTupleOf(input,
155 runtimeContext.wrapElement(next));
156 }
157 };
158 };
159 } else {
160 throw new IllegalStateException(
161 "This is an unwinding evaluator, which expects the evaluation result to either be a set or an iterable, but it was "
162 + result);
163 }
164 } else {
165 return Collections.singleton(
166 Tuples.staticArityLeftInheritanceTupleOf(input, runtimeContext.wrapElement(result)));
167 }
168 } else {
169 return null;
170 }
171 }
172
173 @Override
174 protected String evaluationKind() {
175 return "eval" + (this.isUnwinding ? "Unwind" : "") + "()";
176 }
177
178 }
179
180}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/IEvaluatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/IEvaluatorNode.java
new file mode 100644
index 00000000..177433ab
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/IEvaluatorNode.java
@@ -0,0 +1,25 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.eval;
10
11import tools.refinery.viatra.runtime.rete.network.ReteContainer;
12
13/**
14 * This interface is required for the communication between the evaluation core end the evaluator node.
15 * @author Gabor Bergmann
16 * @since 1.5
17 */
18public interface IEvaluatorNode {
19
20 ReteContainer getReteContainer();
21
22 String prettyPrintTraceInfoPatternList();
23
24
25}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/MemorylessEvaluatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/MemorylessEvaluatorNode.java
new file mode 100644
index 00000000..8928645c
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/MemorylessEvaluatorNode.java
@@ -0,0 +1,75 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.eval;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.Iterator;
14import java.util.Map;
15import java.util.Map.Entry;
16
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
19import tools.refinery.viatra.runtime.matchers.util.Direction;
20import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
23
24/**
25 * @author Bergmann Gabor
26 *
27 */
28public class MemorylessEvaluatorNode extends AbstractEvaluatorNode {
29
30 /**
31 * @since 1.5
32 */
33 public MemorylessEvaluatorNode(final ReteContainer reteContainer, final EvaluatorCore core) {
34 super(reteContainer, core);
35 }
36
37 @Override
38 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
39 final Collection<Tuple> parentTuples = new ArrayList<Tuple>();
40 propagatePullInto(parentTuples, flush);
41 for (final Tuple parentTuple : parentTuples) {
42 final Iterable<Tuple> output = core.performEvaluation(parentTuple);
43 if (output != null) {
44 final Iterator<Tuple> itr = output.iterator();
45 while (itr.hasNext()) {
46 collector.add(itr.next());
47 }
48 }
49 }
50 }
51
52 @Override
53 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
54 final Map<Tuple, Timeline<Timestamp>> parentTuples = CollectionsFactory.createMap();
55 propagatePullIntoWithTimestamp(parentTuples, flush);
56 for (final Entry<Tuple, Timeline<Timestamp>> entry : parentTuples.entrySet()) {
57 final Iterable<Tuple> output = core.performEvaluation(entry.getKey());
58 if (output != null) {
59 final Iterator<Tuple> itr = output.iterator();
60 while (itr.hasNext()) {
61 collector.put(itr.next(), entry.getValue());
62 }
63 }
64 }
65 }
66
67 @Override
68 public void update(final Direction direction, final Tuple input, final Timestamp timestamp) {
69 final Iterable<Tuple> output = core.performEvaluation(input);
70 if (output != null) {
71 propagateIterableUpdate(direction, output, timestamp);
72 }
73 }
74
75}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/OutputCachingEvaluatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/OutputCachingEvaluatorNode.java
new file mode 100644
index 00000000..40a20c4e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/OutputCachingEvaluatorNode.java
@@ -0,0 +1,311 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.eval;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.Map;
15import java.util.Map.Entry;
16
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
19import tools.refinery.viatra.runtime.matchers.util.Clearable;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.Direction;
22import tools.refinery.viatra.runtime.matchers.util.Signed;
23import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
25import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
26import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.TimelineRepresentation;
27import tools.refinery.viatra.runtime.rete.network.ReteContainer;
28import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
29import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
30import tools.refinery.viatra.runtime.rete.network.communication.timely.ResumableNode;
31
32/**
33 * An evaluator node that caches the evaluation result. This node is also capable of caching the timestamps associated
34 * with the result tuples if it is used in recursive differential dataflow evaluation.
35 *
36 * @author Bergmann Gabor
37 * @author Tamas Szabo
38 */
39public class OutputCachingEvaluatorNode extends AbstractEvaluatorNode implements Clearable, ResumableNode {
40
41 /**
42 * @since 2.3
43 */
44 protected NetworkStructureChangeSensitiveLogic logic;
45
46 /**
47 * @since 2.4
48 */
49 protected Map<Tuple, Iterable<Tuple>> outputCache;
50
51 /**
52 * Maps input tuples to timestamps. It is wrong to map evaluation result to timestamps because the different input
53 * tuples may yield the same evaluation result. This field is null as long as this node is in a non-recursive group.
54 *
55 * @since 2.4
56 */
57 protected TimelyMemory<Timestamp> memory;
58
59 /**
60 * @since 2.4
61 */
62 protected CommunicationGroup group;
63
64 /**
65 * @since 1.5
66 */
67 public OutputCachingEvaluatorNode(final ReteContainer reteContainer, final EvaluatorCore core) {
68 super(reteContainer, core);
69 reteContainer.registerClearable(this);
70 this.outputCache = CollectionsFactory.createMap();
71 this.logic = createLogic();
72 }
73
74 @Override
75 public CommunicationGroup getCurrentGroup() {
76 return this.group;
77 }
78
79 @Override
80 public void setCurrentGroup(final CommunicationGroup group) {
81 this.group = group;
82 }
83
84 @Override
85 public void networkStructureChanged() {
86 super.networkStructureChanged();
87 this.logic = createLogic();
88 }
89
90 @Override
91 public void clear() {
92 this.outputCache.clear();
93 if (this.memory != null) {
94 this.memory.clear();
95 }
96 }
97
98 /**
99 * @since 2.3
100 */
101 protected NetworkStructureChangeSensitiveLogic createLogic() {
102 if (this.reteContainer.isTimelyEvaluation()
103 && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
104 if (this.memory == null) {
105 this.memory = new TimelyMemory<Timestamp>(reteContainer.isTimelyEvaluation() && reteContainer
106 .getTimelyConfiguration().getTimelineRepresentation() == TimelineRepresentation.FAITHFUL);
107 }
108 return TIMELY;
109 } else {
110 return TIMELESS;
111 }
112 }
113
114 @Override
115 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
116 this.logic.pullInto(collector, flush);
117 }
118
119 @Override
120 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
121 this.logic.pullIntoWithTimeline(collector, flush);
122 }
123
124 @Override
125 public void update(final Direction direction, final Tuple input, final Timestamp timestamp) {
126 this.logic.update(direction, input, timestamp);
127 }
128
129 /**
130 * @since 2.4
131 */
132 @Override
133 public Timestamp getResumableTimestamp() {
134 if (this.memory == null) {
135 return null;
136 } else {
137 return this.memory.getResumableTimestamp();
138 }
139 }
140
141 /**
142 * @since 2.4
143 */
144 @Override
145 public void resumeAt(final Timestamp timestamp) {
146 this.logic.resumeAt(timestamp);
147 }
148
149 /**
150 * @since 2.3
151 */
152 protected static abstract class NetworkStructureChangeSensitiveLogic {
153
154 /**
155 * @since 2.4
156 */
157 public abstract void update(final Direction direction, final Tuple input, final Timestamp timestamp);
158
159 public abstract void pullInto(final Collection<Tuple> collector, final boolean flush);
160
161 /**
162 * @since 2.4
163 */
164 public abstract void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush);
165
166 /**
167 * @since 2.4
168 */
169 public abstract void resumeAt(final Timestamp timestamp);
170
171 }
172
173 private final NetworkStructureChangeSensitiveLogic TIMELESS = new NetworkStructureChangeSensitiveLogic() {
174
175 @Override
176 public void resumeAt(final Timestamp timestamp) {
177 // there is nothing to resume in the timeless case because we do not even care about timestamps
178 }
179
180 @Override
181 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
182 throw new UnsupportedOperationException();
183 }
184
185 @Override
186 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
187 for (final Iterable<Tuple> output : outputCache.values()) {
188 if (output != NORESULT) {
189 final Iterator<Tuple> itr = output.iterator();
190 while (itr.hasNext()) {
191 collector.add(itr.next());
192 }
193 }
194 }
195 }
196
197 @Override
198 public void update(final Direction direction, final Tuple input, final Timestamp timestamp) {
199 if (direction == Direction.INSERT) {
200 final Iterable<Tuple> output = core.performEvaluation(input);
201 if (output != null) {
202 final Iterable<Tuple> previous = outputCache.put(input, output);
203 if (previous != null) {
204 throw new IllegalStateException(
205 String.format("Duplicate insertion of tuple %s into node %s", input, this));
206 }
207 propagateIterableUpdate(direction, output, timestamp);
208 }
209 } else {
210 final Iterable<Tuple> output = outputCache.remove(input);
211 if (output != null) {
212 // may be null if no result was yielded
213 propagateIterableUpdate(direction, output, timestamp);
214 }
215 }
216 }
217 };
218
219 private final NetworkStructureChangeSensitiveLogic TIMELY = new NetworkStructureChangeSensitiveLogic() {
220
221 @Override
222 public void resumeAt(final Timestamp timestamp) {
223 final Map<Tuple, Diff<Timestamp>> diffMap = memory.resumeAt(timestamp);
224
225 for (final Entry<Tuple, Diff<Timestamp>> entry : diffMap.entrySet()) {
226 final Tuple input = entry.getKey();
227 final Iterable<Tuple> output = outputCache.get(input);
228 if (output != NORESULT) {
229 for (final Signed<Timestamp> signed : entry.getValue()) {
230 propagateIterableUpdate(signed.getDirection(), output, signed.getPayload());
231 }
232 }
233
234 if (memory.get(input) == null) {
235 outputCache.remove(input);
236 }
237 }
238
239 final Timestamp nextTimestamp = memory.getResumableTimestamp();
240 if (nextTimestamp != null) {
241 group.notifyHasMessage(mailbox, nextTimestamp);
242 }
243 }
244
245 @Override
246 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
247 for (final Entry<Tuple, Timeline<Timestamp>> entry : memory.asMap().entrySet()) {
248 final Tuple input = entry.getKey();
249 final Iterable<Tuple> output = outputCache.get(input);
250 if (output != NORESULT) {
251 final Timeline<Timestamp> timestamp = entry.getValue();
252 final Iterator<Tuple> itr = output.iterator();
253 while (itr.hasNext()) {
254 collector.put(itr.next(), timestamp);
255 }
256 }
257 }
258 }
259
260 @Override
261 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
262 TIMELESS.pullInto(collector, flush);
263 }
264
265 @Override
266 public void update(final Direction direction, final Tuple input, final Timestamp timestamp) {
267 if (direction == Direction.INSERT) {
268 Iterable<Tuple> output = outputCache.get(input);
269 if (output == null) {
270 output = core.performEvaluation(input);
271 if (output == null) {
272 // the evaluation result is really null
273 output = NORESULT;
274 }
275 outputCache.put(input, output);
276 }
277 final Diff<Timestamp> diff = memory.put(input, timestamp);
278 if (output != NORESULT) {
279 for (final Signed<Timestamp> signed : diff) {
280 propagateIterableUpdate(signed.getDirection(), output, signed.getPayload());
281 }
282 }
283 } else {
284 final Iterable<Tuple> output = outputCache.get(input);
285 final Diff<Timestamp> diff = memory.remove(input, timestamp);
286 if (memory.get(input) == null) {
287 outputCache.remove(input);
288 }
289 if (output != NORESULT) {
290 for (final Signed<Timestamp> signed : diff) {
291 propagateIterableUpdate(signed.getDirection(), output, signed.getPayload());
292 }
293 }
294 }
295 }
296 };
297
298 /**
299 * This field is used to represent the "null" evaluation result. This is an optimization used in the timely case
300 * where the same tuple may be inserted multiple times with different timestamps. This way, we can also cache if
301 * something evaluated to null (instead of just forgetting about the previously computed result), thus avoiding the
302 * need to re-run a potentially expensive evaluation.
303 */
304 private static final Iterable<Tuple> NORESULT = Collections
305 .singleton(Tuples.staticArityFlatTupleOf(NoResult.INSTANCE));
306
307 private enum NoResult {
308 INSTANCE
309 }
310
311}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/RelationEvaluatorNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/RelationEvaluatorNode.java
new file mode 100644
index 00000000..68d277e8
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/eval/RelationEvaluatorNode.java
@@ -0,0 +1,183 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2022, Tamas Szabo, GitHub
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.eval;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.List;
14import java.util.Map;
15import java.util.Map.Entry;
16import java.util.Set;
17
18import tools.refinery.viatra.runtime.matchers.psystem.IRelationEvaluator;
19import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.RelationEvaluation;
20import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
21import tools.refinery.viatra.runtime.matchers.util.Clearable;
22import tools.refinery.viatra.runtime.matchers.util.Direction;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timelines;
25import tools.refinery.viatra.runtime.rete.misc.SimpleReceiver;
26import tools.refinery.viatra.runtime.rete.network.ProductionNode;
27import tools.refinery.viatra.runtime.rete.network.Receiver;
28import tools.refinery.viatra.runtime.rete.network.ReteContainer;
29import tools.refinery.viatra.runtime.rete.network.StandardNode;
30import tools.refinery.viatra.runtime.rete.network.Supplier;
31import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
32import tools.refinery.viatra.runtime.rete.single.AbstractUniquenessEnforcerNode;
33
34/**
35 * A node that operates in batch-style (see {@link Receiver#doesProcessUpdatesInBatch()} and evaluates arbitrary Java
36 * logic represented by an {@link IRelationEvaluator} on the input relations. This is the backing computation node of a
37 * {@link RelationEvaluation} constraint.
38 *
39 * @author Tamas Szabo
40 * @since 2.8
41 */
42public class RelationEvaluatorNode extends StandardNode implements Supplier, Clearable {
43
44 private final IRelationEvaluator evaluator;
45 private Set<Tuple> cachedOutputs;
46 private Supplier[] inputSuppliers;
47 private BatchingReceiver[] inputReceivers;
48
49 public RelationEvaluatorNode(final ReteContainer container, final IRelationEvaluator evaluator) {
50 super(container);
51 this.evaluator = evaluator;
52 this.reteContainer.registerClearable(this);
53 }
54
55 @Override
56 public void clear() {
57 this.cachedOutputs.clear();
58 }
59
60 public void connectToParents(final List<Supplier> inputSuppliers) {
61 this.inputSuppliers = new Supplier[inputSuppliers.size()];
62 this.inputReceivers = new BatchingReceiver[inputSuppliers.size()];
63
64 final List<Integer> inputArities = evaluator.getInputArities();
65
66 if (inputArities.size() != inputSuppliers.size()) {
67 throw new IllegalStateException(evaluator.toString() + " expects " + inputArities.size()
68 + " inputs, but got " + inputSuppliers.size() + " input(s)!");
69 }
70
71 for (int i = 0; i < inputSuppliers.size(); i++) {
72 final int currentExpectedInputArity = inputArities.get(i);
73 final Supplier inputSupplier = inputSuppliers.get(i);
74 // it is expected that the supplier is a production node because
75 // the corresponding constraint itself accepts a list of PQuery
76 if (!(inputSupplier instanceof ProductionNode)) {
77 throw new IllegalStateException(
78 evaluator.toString() + " expects each one of its suppliers to be instances of "
79 + ProductionNode.class.getSimpleName() + " but got an instance of "
80 + inputSupplier.getClass().getSimpleName() + "!");
81 }
82 final int currentActualInputArity = ((ProductionNode) inputSupplier).getPosMapping().size();
83 if (currentActualInputArity != currentExpectedInputArity) {
84 throw new IllegalStateException(
85 evaluator.toString() + " expects input arity " + currentExpectedInputArity + " at position " + i
86 + " but got " + currentActualInputArity + "!");
87 }
88 final BatchingReceiver inputReceiver = new BatchingReceiver((ProductionNode) inputSupplier,
89 this.reteContainer);
90 this.inputSuppliers[i] = inputSupplier;
91 this.inputReceivers[i] = inputReceiver;
92 this.reteContainer.connectAndSynchronize(inputSupplier, inputReceiver);
93 reteContainer.getCommunicationTracker().registerDependency(inputReceiver, this);
94 }
95
96 // initialize the output relation
97 final List<Set<Tuple>> inputSets = new ArrayList<Set<Tuple>>();
98 for (final BatchingReceiver inputReceiver : this.inputReceivers) {
99 inputSets.add(inputReceiver.getTuples());
100 }
101 this.cachedOutputs = evaluateRelation(inputSets);
102 }
103
104 @Override
105 public void networkStructureChanged() {
106 if (this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
107 throw new IllegalStateException(this.toString() + " cannot be used in recursive evaluation!");
108 }
109 super.networkStructureChanged();
110 }
111
112 @Override
113 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
114 collector.addAll(this.cachedOutputs);
115 }
116
117 @Override
118 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
119 final Timeline<Timestamp> timeline = Timelines.createFrom(Timestamp.ZERO);
120 for (final Tuple output : this.cachedOutputs) {
121 collector.put(output, timeline);
122 }
123 }
124
125 private Set<Tuple> evaluateRelation(final List<Set<Tuple>> inputs) {
126 try {
127 return this.evaluator.evaluateRelation(inputs);
128 } catch (final Exception e) {
129 throw new IllegalStateException("Exception during the evaluation of " + this.evaluator.toString() + "!", e);
130 }
131 }
132
133 private void batchUpdateCompleted() {
134 final List<Set<Tuple>> inputSets = new ArrayList<Set<Tuple>>();
135 for (final BatchingReceiver inputReceiver : this.inputReceivers) {
136 inputSets.add(inputReceiver.getTuples());
137 }
138 final Set<Tuple> newOutputs = evaluateRelation(inputSets);
139 for (final Tuple tuple : newOutputs) {
140 if (this.cachedOutputs != null && this.cachedOutputs.remove(tuple)) {
141 // already known tuple - do nothing
142 } else {
143 // newly inserted tuple
144 propagateUpdate(Direction.INSERT, tuple, Timestamp.ZERO);
145 }
146 }
147 if (this.cachedOutputs != null) {
148 for (final Tuple tuple : this.cachedOutputs) {
149 // lost tuple
150 propagateUpdate(Direction.DELETE, tuple, Timestamp.ZERO);
151 }
152 }
153 this.cachedOutputs = newOutputs;
154 }
155
156 public class BatchingReceiver extends SimpleReceiver {
157 private final ProductionNode source;
158
159 private BatchingReceiver(final ProductionNode source, final ReteContainer container) {
160 super(container);
161 this.source = source;
162 }
163
164 private Set<Tuple> getTuples() {
165 return ((AbstractUniquenessEnforcerNode) this.source).getTuples();
166 }
167
168 @Override
169 public void update(final Direction direction, final Tuple updateElement, final Timestamp timestamp) {
170 throw new UnsupportedOperationException("This receiver only supports batch-style operation!");
171 }
172
173 @Override
174 public void batchUpdate(final Collection<Entry<Tuple, Integer>> updates, final Timestamp timestamp) {
175 assert Timestamp.ZERO.equals(timestamp);
176 // there is nothing to do here because the source production node has already updated itself
177 // the only thing we need to do is to issue the callback
178 RelationEvaluatorNode.this.batchUpdateCompleted();
179 }
180
181 }
182
183}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DefaultIndexerListener.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DefaultIndexerListener.java
new file mode 100644
index 00000000..6306a482
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DefaultIndexerListener.java
@@ -0,0 +1,28 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.index;
10
11import java.lang.ref.WeakReference;
12
13import tools.refinery.viatra.runtime.rete.network.Node;
14
15public abstract class DefaultIndexerListener implements IndexerListener {
16
17 WeakReference<Node> owner;
18
19 public DefaultIndexerListener(Node owner) {
20 this.owner = new WeakReference<Node>(owner);
21 }
22
23 @Override
24 public Node getOwner() {
25 return owner.get();
26 }
27
28}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DualInputNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DualInputNode.java
new file mode 100644
index 00000000..170ac460
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/DualInputNode.java
@@ -0,0 +1,348 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
19import tools.refinery.viatra.runtime.matchers.util.Direction;
20import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
21import tools.refinery.viatra.runtime.rete.network.NetworkStructureChangeSensitiveNode;
22import tools.refinery.viatra.runtime.rete.network.Receiver;
23import tools.refinery.viatra.runtime.rete.network.ReteContainer;
24import tools.refinery.viatra.runtime.rete.network.StandardNode;
25import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
26import tools.refinery.viatra.runtime.rete.network.communication.Timestamp.AllZeroMap;
27import tools.refinery.viatra.runtime.rete.network.delayed.DelayedConnectCommand;
28import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
29import tools.refinery.viatra.runtime.rete.util.Options;
30
31/**
32 * Abstract superclass for nodes with two inputs that are matched against each other.
33 *
34 * @author Gabor Bergmann
35 */
36public abstract class DualInputNode extends StandardNode implements NetworkStructureChangeSensitiveNode {
37
38 /**
39 * @since 2.3
40 */
41 protected NetworkStructureChangeSensitiveLogic logic;
42
43 public IterableIndexer getPrimarySlot() {
44 return primarySlot;
45 }
46
47 public Indexer getSecondarySlot() {
48 return secondarySlot;
49 }
50
51 /**
52 * @author Gabor Bergmann
53 *
54 */
55 public enum Side {
56 PRIMARY, SECONDARY, BOTH;
57
58 public Side opposite() {
59 switch (this) {
60 case PRIMARY:
61 return SECONDARY;
62 case SECONDARY:
63 return PRIMARY;
64 case BOTH:
65 return BOTH;
66 default:
67 return BOTH;
68 }
69 }
70 }
71
72 /**
73 * Holds the primary input slot of this node.
74 */
75 protected IterableIndexer primarySlot;
76
77 /**
78 * Holds the secondary input slot of this node.
79 */
80 protected Indexer secondarySlot;
81
82 /**
83 * Optional complementer mask
84 */
85 protected TupleMask complementerSecondaryMask;
86
87 /**
88 * true if the primary and secondary slots coincide
89 */
90 protected boolean coincidence;
91
92 /**
93 * @param reteContainer
94 */
95 public DualInputNode(final ReteContainer reteContainer, final TupleMask complementerSecondaryMask) {
96 super(reteContainer);
97 this.complementerSecondaryMask = complementerSecondaryMask;
98 this.indexerGroupCache = CollectionsFactory.createMap();
99 this.refreshIndexerGroupCache();
100 }
101
102 /**
103 * Should be called only once, when node is initialized.
104 */
105 public void connectToIndexers(final IterableIndexer primarySlot, final Indexer secondarySlot) {
106 this.primarySlot = primarySlot;
107 this.secondarySlot = secondarySlot;
108
109 reteContainer.getCommunicationTracker().registerDependency(primarySlot, this);
110 reteContainer.getCommunicationTracker().registerDependency(secondarySlot, this);
111
112 // attach listeners
113 // if there is syncing, do this after the flush done for pulling, but before syncing updates
114 coincidence = primarySlot.equals(secondarySlot);
115
116 if (!coincidence) { // regular case
117 primarySlot.attachListener(new DefaultIndexerListener(this) {
118 @Override
119 public void notifyIndexerUpdate(final Direction direction, final Tuple updateElement,
120 final Tuple signature, final boolean change, final Timestamp timestamp) {
121 DualInputNode.this.logic.notifyUpdate(Side.PRIMARY, direction, updateElement, signature, change,
122 timestamp);
123 }
124
125 @Override
126 public String toString() {
127 return "primary@" + DualInputNode.this;
128 }
129 });
130 secondarySlot.attachListener(new DefaultIndexerListener(this) {
131 public void notifyIndexerUpdate(final Direction direction, final Tuple updateElement,
132 final Tuple signature, final boolean change, final Timestamp timestamp) {
133 DualInputNode.this.logic.notifyUpdate(Side.SECONDARY, direction, updateElement, signature, change,
134 timestamp);
135 }
136
137 @Override
138 public String toString() {
139 return "secondary@" + DualInputNode.this;
140 }
141 });
142 } else { // if the two slots are the same, updates have to be handled carefully
143 primarySlot.attachListener(new DefaultIndexerListener(this) {
144 public void notifyIndexerUpdate(final Direction direction, final Tuple updateElement,
145 final Tuple signature, final boolean change, final Timestamp timestamp) {
146 DualInputNode.this.logic.notifyUpdate(Side.BOTH, direction, updateElement, signature, change,
147 timestamp);
148 }
149
150 @Override
151 public String toString() {
152 return "both@" + DualInputNode.this;
153 }
154 });
155 }
156
157 for (final Receiver receiver : getReceivers()) {
158 this.reteContainer.getDelayedCommandQueue()
159 .add(new DelayedConnectCommand(this, receiver, this.reteContainer));
160 }
161
162 // Given that connectToIndexers registers new dependencies, the networkStructureChanged() method will be called
163 // by the CommunicationTracker, and the implementation of that method in turn will call refreshIndexerGroupCache() anyway.
164 this.refreshIndexerGroupCache();
165 }
166
167 /**
168 * Helper: retrieves all stored substitutions from the opposite side memory.
169 *
170 * @return the collection of opposite substitutions if any, or null if none
171 */
172 protected Collection<Tuple> retrieveOpposites(final Side side, final Tuple signature) {
173 return getSlot(side.opposite()).get(signature);
174 }
175
176 /**
177 * @since 2.3
178 */
179 protected NetworkStructureChangeSensitiveLogic createLogic() {
180 if (this.reteContainer.isTimelyEvaluation()
181 && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
182 return createTimelyLogic();
183 } else {
184 return createTimelessLogic();
185 }
186 }
187
188 /**
189 * Helper: unifies a left and right partial matching.
190 */
191 protected Tuple unify(final Tuple left, final Tuple right) {
192 return complementerSecondaryMask.combine(left, right, Options.enableInheritance, true);
193 }
194
195 @Override
196 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
197 this.logic.pullInto(collector, flush);
198 }
199
200 @Override
201 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
202 this.logic.pullIntoWithTimeline(collector, flush);
203 }
204
205 /**
206 * Helper: unifies a substitution from the specified side with another substitution from the other side.
207 */
208 protected Tuple unify(final Side side, final Tuple ps, final Tuple opposite) {
209 switch (side) {
210 case PRIMARY:
211 return unify(ps, opposite);
212 case SECONDARY:
213 return unify(opposite, ps);
214 case BOTH:
215 return unify(ps, opposite);
216 default:
217 return null;
218 }
219 }
220
221 /**
222 * Simulates the behavior of the node for calibration purposes only.
223 */
224 public abstract Tuple calibrate(final Tuple primary, final Tuple secondary);
225
226 /**
227 * @param complementerSecondaryMask
228 * the complementerSecondaryMask to set
229 */
230 public void setComplementerSecondaryMask(final TupleMask complementerSecondaryMask) {
231 this.complementerSecondaryMask = complementerSecondaryMask;
232 }
233
234 /**
235 * Retrieves the slot corresponding to the specified side.
236 */
237 protected Indexer getSlot(final Side side) {
238 if (side == Side.SECONDARY) {
239 return secondarySlot;
240 } else {
241 return primarySlot;
242 }
243 }
244
245 @Override
246 public void assignTraceInfo(final TraceInfo traceInfo) {
247 super.assignTraceInfo(traceInfo);
248 if (traceInfo.propagateToIndexerParent()) {
249 if (primarySlot != null) {
250 primarySlot.acceptPropagatedTraceInfo(traceInfo);
251 }
252 if (secondarySlot != null) {
253 secondarySlot.acceptPropagatedTraceInfo(traceInfo);
254 }
255 }
256 }
257
258 @Override
259 public void networkStructureChanged() {
260 super.networkStructureChanged();
261 this.logic = createLogic();
262 this.refreshIndexerGroupCache();
263 }
264
265 /**
266 * @since 2.3
267 */
268 protected abstract NetworkStructureChangeSensitiveLogic createTimelyLogic();
269
270 /**
271 * @since 2.3
272 */
273 protected abstract NetworkStructureChangeSensitiveLogic createTimelessLogic();
274
275 /**
276 * This map caches the result of a CommunicationTracker.areInSameGroup(indexer, this) call. It does that for both
277 * the primary and secondary slots. This way we can avoid the lookup in the getWithTimestamp call for each tuple.
278 * The cache needs to be maintained when the network structure changes.
279 * @since 2.3
280 */
281 protected Map<Indexer, Boolean> indexerGroupCache;
282
283 /**
284 * @since 2.3
285 */
286 protected void refreshIndexerGroupCache() {
287 this.indexerGroupCache.clear();
288 if (this.primarySlot != null) {
289 this.indexerGroupCache.put(this.primarySlot,
290 this.reteContainer.getCommunicationTracker().areInSameGroup(this.primarySlot, this));
291 }
292 if (this.secondarySlot != null) {
293 this.indexerGroupCache.put(this.secondarySlot,
294 this.reteContainer.getCommunicationTracker().areInSameGroup(this.secondarySlot, this));
295 }
296 }
297
298 /**
299 * @since 2.4
300 */
301 protected Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature, final Indexer indexer) {
302 if (this.indexerGroupCache.get(indexer)) {
303 // recursive timely case
304 return indexer.getTimeline(signature);
305 } else {
306 // the indexer is in a different group, treat all of its tuples as they would have timestamp 0
307 final Collection<Tuple> tuples = indexer.get(signature);
308 if (tuples == null) {
309 return null;
310 } else {
311 return new AllZeroMap<Tuple>((Set<Tuple>) tuples);
312 }
313 }
314 }
315
316 /**
317 * @since 2.3
318 */
319 protected static abstract class NetworkStructureChangeSensitiveLogic {
320
321 /**
322 * Abstract handler for update event.
323 *
324 * @param side
325 * The side on which the event occurred.
326 * @param direction
327 * The direction of the update.
328 * @param updateElement
329 * The partial matching that is inserted.
330 * @param signature
331 * Masked signature of updateElement.
332 * @param change
333 * Indicates whether this is/was the first/last instance of this signature in this slot.
334 * @since 2.4
335 */
336 public abstract void notifyUpdate(final Side side, final Direction direction, final Tuple updateElement,
337 final Tuple signature, final boolean change, final Timestamp timestamp);
338
339 public abstract void pullInto(final Collection<Tuple> collector, final boolean flush);
340
341 /**
342 * @since 2.4
343 */
344 public abstract void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush);
345
346 }
347
348}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ExistenceNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ExistenceNode.java
new file mode 100644
index 00000000..275ff638
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ExistenceNode.java
@@ -0,0 +1,199 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.matchers.util.Signed;
18import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
19import tools.refinery.viatra.runtime.rete.network.ReteContainer;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21
22/**
23 * Propagates all substitutions arriving at the PRIMARY slot if and only if (a matching substitution on the SECONDARY is
24 * present) xor (NEGATIVE).
25 *
26 * The negative parameter specifies whether this node checks for existence or non-existence.
27 * <p>
28 * It is mandatory in differential dataflow evaluation that the secondary parent is in an upstream dependency component
29 * (so that every secondary tuple comes with zero timestamp).
30 *
31 * @author Gabor Bergmann
32 */
33public class ExistenceNode extends DualInputNode {
34
35 protected boolean negative;
36
37 /**
38 * @param reteContainer
39 * @param negative
40 * if false, act as existence checker, otherwise a nonexistence-checker
41 */
42 public ExistenceNode(final ReteContainer reteContainer, final boolean negative) {
43 super(reteContainer, null);
44 this.negative = negative;
45 this.logic = createLogic();
46 }
47
48 @Override
49 public Tuple calibrate(final Tuple primary, final Tuple secondary) {
50 return primary;
51 }
52
53 @Override
54 public void networkStructureChanged() {
55 if (this.reteContainer.isTimelyEvaluation() && this.secondarySlot != null
56 && this.reteContainer.getCommunicationTracker().areInSameGroup(this, this.secondarySlot)) {
57 throw new IllegalStateException("Secondary parent must be in an upstream dependency component!");
58 }
59 super.networkStructureChanged();
60 }
61
62 private final NetworkStructureChangeSensitiveLogic TIMELESS = new NetworkStructureChangeSensitiveLogic() {
63
64 @Override
65 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
66 throw new UnsupportedOperationException();
67 }
68
69 @Override
70 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
71 if (primarySlot == null || secondarySlot == null) {
72 return;
73 }
74 if (flush) {
75 reteContainer.flushUpdates();
76 }
77
78 for (final Tuple signature : primarySlot.getSignatures()) {
79 // primaries can not be null due to the contract of IterableIndex.getSignatures()
80 final Collection<Tuple> primaries = primarySlot.get(signature);
81 final Collection<Tuple> opposites = secondarySlot.get(signature);
82 if ((opposites != null) ^ negative) {
83 collector.addAll(primaries);
84 }
85 }
86 }
87
88 @Override
89 public void notifyUpdate(final Side side, final Direction direction, final Tuple updateElement,
90 final Tuple signature, final boolean change, final Timestamp timestamp) {
91 // in the default case, all timestamps must be zero
92 assert Timestamp.ZERO.equals(timestamp);
93
94 switch (side) {
95 case PRIMARY:
96 if ((retrieveOpposites(side, signature) != null) ^ negative) {
97 propagateUpdate(direction, updateElement, timestamp);
98 }
99 break;
100 case SECONDARY:
101 if (change) {
102 final Collection<Tuple> opposites = retrieveOpposites(side, signature);
103 if (opposites != null) {
104 for (final Tuple opposite : opposites) {
105 propagateUpdate((negative ? direction.opposite() : direction), opposite, timestamp);
106 }
107 }
108 }
109 break;
110 case BOTH:
111 // in case the slots coincide,
112 // negative --> always empty
113 // !positive --> identity
114 if (!negative) {
115 propagateUpdate(direction, updateElement, timestamp);
116 }
117 break;
118 }
119 }
120 };
121
122 private final NetworkStructureChangeSensitiveLogic TIMELY = new NetworkStructureChangeSensitiveLogic() {
123
124 @Override
125 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
126 if (primarySlot == null || secondarySlot == null) {
127 return;
128 }
129 if (flush) {
130 reteContainer.flushUpdates();
131 }
132
133 for (final Tuple signature : primarySlot.getSignatures()) {
134 // primaries can not be null due to the contract of IterableIndex.getSignatures()
135 final Map<Tuple, Timeline<Timestamp>> primaries = getTimeline(signature, primarySlot);
136 // see contract: secondary must be in an upstream SCC
137 final Collection<Tuple> opposites = secondarySlot.get(signature);
138 if ((opposites != null) ^ negative) {
139 for (final Tuple primary : primaries.keySet()) {
140 collector.put(primary, primaries.get(primary));
141 }
142 }
143 }
144 }
145
146 @Override
147 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
148 ExistenceNode.this.TIMELESS.pullInto(collector, flush);
149 }
150
151 @Override
152 public void notifyUpdate(final Side side, final Direction direction, final Tuple updateElement,
153 final Tuple signature, final boolean change, final Timestamp timestamp) {
154 switch (side) {
155 case PRIMARY: {
156 final Collection<Tuple> opposites = secondarySlot.get(signature);
157 if ((opposites != null) ^ negative) {
158 propagateUpdate(direction, updateElement, timestamp);
159 }
160 break;
161 }
162 case SECONDARY: {
163 final Map<Tuple, Timeline<Timestamp>> opposites = primarySlot.getTimeline(signature);
164 if (change) {
165 if (opposites != null) {
166 for (final Tuple opposite : opposites.keySet()) {
167 for (final Signed<Timestamp> oppositeSigned : opposites.get(opposite).asChangeSequence()) {
168 final Direction product = direction.multiply(oppositeSigned.getDirection());
169 propagateUpdate((negative ? product.opposite() : product), opposite,
170 oppositeSigned.getPayload());
171 }
172 }
173 }
174 }
175 break;
176 }
177 case BOTH:
178 // in case the slots coincide,
179 // negative --> always empty
180 // positive --> identity
181 if (!negative) {
182 propagateUpdate(direction, updateElement, timestamp);
183 }
184 break;
185 }
186 }
187 };
188
189 @Override
190 protected NetworkStructureChangeSensitiveLogic createTimelessLogic() {
191 return this.TIMELESS;
192 }
193
194 @Override
195 protected NetworkStructureChangeSensitiveLogic createTimelyLogic() {
196 return this.TIMELY;
197 }
198
199}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/GenericProjectionIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/GenericProjectionIndexer.java
new file mode 100644
index 00000000..3de10def
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/GenericProjectionIndexer.java
@@ -0,0 +1,76 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Iterator;
14import java.util.Map;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.Direction;
19import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
20import tools.refinery.viatra.runtime.rete.network.Receiver;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
23
24/**
25 * A generic Indexer capable of indexing along any valid TupleMask. Does not keep track of parents, because will not
26 * ever pull parents.
27 *
28 * @author Gabor Bergmann
29 *
30 */
31public class GenericProjectionIndexer extends IndexerWithMemory implements ProjectionIndexer {
32
33 public GenericProjectionIndexer(ReteContainer reteContainer, TupleMask mask) {
34 super(reteContainer, mask);
35 }
36
37 @Override
38 protected void update(Direction direction, Tuple updateElement, Tuple signature, boolean change,
39 Timestamp timestamp) {
40 propagate(direction, updateElement, signature, change, timestamp);
41 }
42
43 @Override
44 public Collection<Tuple> get(Tuple signature) {
45 return memory.get(signature);
46 }
47
48 @Override
49 public Map<Tuple, Timeline<Timestamp>> getTimeline(Tuple signature) {
50 return memory.getWithTimeline(signature);
51 }
52
53 @Override
54 public Iterator<Tuple> iterator() {
55 return memory.iterator();
56 }
57
58 @Override
59 public Iterable<Tuple> getSignatures() {
60 return memory.getSignatures();
61 }
62
63 /**
64 * @since 2.0
65 */
66 @Override
67 public int getBucketCount() {
68 return memory.getKeysetSize();
69 }
70
71 @Override
72 public Receiver getActiveNode() {
73 return this;
74 }
75
76}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IdentityIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IdentityIndexer.java
new file mode 100644
index 00000000..6c158f2c
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IdentityIndexer.java
@@ -0,0 +1,76 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2012 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Collections;
14import java.util.Iterator;
15import java.util.List;
16
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19import tools.refinery.viatra.runtime.matchers.util.Direction;
20import tools.refinery.viatra.runtime.rete.network.Node;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.Supplier;
23import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
24
25/**
26 * Defines an abstract trivial indexer that identically projects the contents of some stateful node, and can therefore
27 * save space. Can only exist in connection with a stateful store, and must be operated by another node (the active
28 * node). Do not attach parents directly!
29 *
30 * @author Gabor Bergmann
31 * @noimplement Rely on the provided implementations
32 * @noreference Use only via standard Node and Indexer interfaces
33 * @noinstantiate This class is not intended to be instantiated by clients.
34 */
35public abstract class IdentityIndexer extends SpecializedProjectionIndexer {
36
37 protected abstract Collection<Tuple> getTuples();
38
39 public IdentityIndexer(ReteContainer reteContainer, int tupleWidth, Supplier parent,
40 Node activeNode, List<ListenerSubscription> sharedSubscriptionList) {
41 super(reteContainer, TupleMask.identity(tupleWidth), parent, activeNode, sharedSubscriptionList);
42 }
43
44 @Override
45 public Collection<Tuple> get(Tuple signature) {
46 if (contains(signature)) {
47 return Collections.singleton(signature);
48 } else
49 return null;
50 }
51
52 protected boolean contains(Tuple signature) {
53 return getTuples().contains(signature);
54 }
55
56 @Override
57 public Collection<Tuple> getSignatures() {
58 return getTuples();
59 }
60
61 @Override
62 public int getBucketCount() {
63 return getTuples().size();
64 }
65
66 @Override
67 public Iterator<Tuple> iterator() {
68 return getTuples().iterator();
69 }
70
71 @Override
72 public void propagateToListener(IndexerListener listener, Direction direction, Tuple updateElement, Timestamp timestamp) {
73 listener.notifyIndexerUpdate(direction, updateElement, updateElement, true, timestamp);
74 }
75
76} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/Indexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/Indexer.java
new file mode 100644
index 00000000..fc9d7781
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/Indexer.java
@@ -0,0 +1,71 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
18import tools.refinery.viatra.runtime.rete.network.Node;
19import tools.refinery.viatra.runtime.rete.network.Supplier;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21
22/**
23 * A node that indexes incoming Tuples by their signatures as specified by a TupleMask. Notifies listeners about such
24 * update events through the IndexerListener.
25 *
26 * Signature tuples are created by transforming the update tuples using the mask. Tuples stored with the same signature
27 * are grouped together. The group or a reduction thereof is retrievable.
28 *
29 * @author Gabor Bergmann
30 */
31public interface Indexer extends Node {
32 /**
33 * @return the mask by which the contents are indexed.
34 */
35 public TupleMask getMask();
36
37 /**
38 * @return the node whose contents are indexed.
39 */
40 public Supplier getParent();
41
42 /**
43 * @return all stored tuples that conform to the specified signature, null if there are none such. CONTRACT: do not
44 * modify!
45 */
46 public Collection<Tuple> get(Tuple signature);
47
48 /**
49 * @since 2.4
50 */
51 default public Map<Tuple, Timeline<Timestamp>> getTimeline(Tuple signature) {
52 throw new UnsupportedOperationException();
53 }
54
55 /**
56 * This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot
57 * allotted to it). The active node is typically the indexer itself, but it can be a different node such as its
58 * parent.
59 *
60 * @return the active node that operates this indexer
61 */
62 public Node getActiveNode();
63
64
65 public Collection<IndexerListener> getListeners();
66
67 public void attachListener(IndexerListener listener);
68
69 public void detachListener(IndexerListener listener);
70
71}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerListener.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerListener.java
new file mode 100644
index 00000000..f52b6a06
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerListener.java
@@ -0,0 +1,41 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.matchers.util.Direction;
14import tools.refinery.viatra.runtime.rete.network.Node;
15import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
16
17/**
18 * A listener for update events concerning an Indexer.
19 *
20 * @author Gabor Bergmann
21 *
22 */
23public interface IndexerListener {
24 /**
25 * Notifies recipient that the indexer has just received an update. Contract: indexer already reflects the updated
26 * state.
27 *
28 * @param direction
29 * the direction of the update.
30 * @param updateElement
31 * the tuple that was updated.
32 * @param signature
33 * the signature of the tuple according to the indexer's mask.
34 * @param change
35 * whether this was the first inserted / last revoked update element with this particular signature.
36 * @since 2.4
37 */
38 void notifyIndexerUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp);
39
40 Node getOwner();
41}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerWithMemory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerWithMemory.java
new file mode 100644
index 00000000..a31562e9
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IndexerWithMemory.java
@@ -0,0 +1,284 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Collections;
14import java.util.Map;
15import java.util.Map.Entry;
16
17import tools.refinery.viatra.runtime.matchers.memories.MaskedTupleMemory;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
22import tools.refinery.viatra.runtime.matchers.util.Direction;
23import tools.refinery.viatra.runtime.matchers.util.Signed;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
25import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.TimelineRepresentation;
26import tools.refinery.viatra.runtime.rete.network.NetworkStructureChangeSensitiveNode;
27import tools.refinery.viatra.runtime.rete.network.Receiver;
28import tools.refinery.viatra.runtime.rete.network.ReteContainer;
29import tools.refinery.viatra.runtime.rete.network.Supplier;
30import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
31import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
32import tools.refinery.viatra.runtime.rete.network.communication.timely.ResumableNode;
33import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
34import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
35import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
36
37/**
38 * @author Gabor Bergmann
39 * @author Tamas Szabo
40 */
41public abstract class IndexerWithMemory extends StandardIndexer
42 implements Receiver, NetworkStructureChangeSensitiveNode, ResumableNode {
43
44 protected MaskedTupleMemory<Timestamp> memory;
45
46 /**
47 * @since 2.3
48 */
49 protected NetworkStructureChangeSensitiveLogic logic;
50
51 /**
52 * @since 1.6
53 */
54 protected final Mailbox mailbox;
55
56 /**
57 * @since 2.4
58 */
59 protected CommunicationGroup group;
60
61 public IndexerWithMemory(final ReteContainer reteContainer, final TupleMask mask) {
62 super(reteContainer, mask);
63 final boolean isTimely = reteContainer.isTimelyEvaluation()
64 && reteContainer.getCommunicationTracker().isInRecursiveGroup(this);
65 memory = MaskedTupleMemory.create(mask, MemoryType.SETS, this, isTimely, isTimely && reteContainer
66 .getTimelyConfiguration().getTimelineRepresentation() == TimelineRepresentation.FAITHFUL);
67 reteContainer.registerClearable(memory);
68 mailbox = instantiateMailbox();
69 reteContainer.registerClearable(mailbox);
70 this.logic = createLogic();
71 }
72
73 @Override
74 public CommunicationGroup getCurrentGroup() {
75 return this.group;
76 }
77
78 @Override
79 public void setCurrentGroup(final CommunicationGroup group) {
80 this.group = group;
81 }
82
83 @Override
84 public void networkStructureChanged() {
85 super.networkStructureChanged();
86 final boolean wasTimely = this.memory.isTimely();
87 final boolean isTimely = this.reteContainer.isTimelyEvaluation()
88 && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this);
89 if (wasTimely != isTimely) {
90 final MaskedTupleMemory<Timestamp> newMemory = MaskedTupleMemory.create(mask, MemoryType.SETS, this,
91 isTimely, isTimely && reteContainer.getTimelyConfiguration()
92 .getTimelineRepresentation() == TimelineRepresentation.FAITHFUL);
93 newMemory.initializeWith(this.memory, Timestamp.ZERO);
94 memory.clear();
95 memory = newMemory;
96 }
97 this.logic = createLogic();
98 }
99
100 /**
101 * Instantiates the {@link Mailbox} of this receiver. Subclasses may override this method to provide their own
102 * mailbox implementation.
103 *
104 * @return the mailbox
105 * @since 2.0
106 */
107 protected Mailbox instantiateMailbox() {
108 if (this.reteContainer.isTimelyEvaluation()) {
109 return new TimelyMailbox(this, this.reteContainer);
110 } else {
111 return new BehaviorChangingMailbox(this, this.reteContainer);
112 }
113 }
114
115 @Override
116 public Mailbox getMailbox() {
117 return this.mailbox;
118 }
119
120 /**
121 * @since 2.0
122 */
123 public MaskedTupleMemory<Timestamp> getMemory() {
124 return memory;
125 }
126
127 @Override
128 public void update(final Direction direction, final Tuple updateElement, final Timestamp timestamp) {
129 this.logic.update(direction, updateElement, timestamp);
130 }
131
132 /**
133 * Refined version of update
134 *
135 * @since 2.4
136 */
137 protected abstract void update(final Direction direction, final Tuple updateElement, final Tuple signature,
138 final boolean change, final Timestamp timestamp);
139
140 @Override
141 public void appendParent(final Supplier supplier) {
142 if (parent == null) {
143 parent = supplier;
144 } else {
145 throw new UnsupportedOperationException("Illegal RETE edge: " + this + " already has a parent (" + parent
146 + ") and cannot connect to additional parent (" + supplier + "). ");
147 }
148 }
149
150 @Override
151 public void removeParent(final Supplier supplier) {
152 if (parent == supplier) {
153 parent = null;
154 } else {
155 throw new IllegalArgumentException(
156 "Illegal RETE edge removal: the parent of " + this + " is not " + supplier);
157 }
158 }
159
160 /**
161 * @since 2.4
162 */
163 @Override
164 public Collection<Supplier> getParents() {
165 return Collections.singleton(parent);
166 }
167
168 /**
169 * @since 2.4
170 */
171 @Override
172 public void resumeAt(final Timestamp timestamp) {
173 this.logic.resumeAt(timestamp);
174 }
175
176 /**
177 * @since 2.4
178 */
179 @Override
180 public Timestamp getResumableTimestamp() {
181 return this.memory.getResumableTimestamp();
182 }
183
184 /**
185 * @since 2.3
186 */
187 protected static abstract class NetworkStructureChangeSensitiveLogic {
188
189 /**
190 * @since 2.4
191 */
192 public abstract void update(final Direction direction, final Tuple updateElement, final Timestamp timestamp);
193
194 /**
195 * @since 2.4
196 */
197 public abstract void resumeAt(final Timestamp timestamp);
198
199 }
200
201 /**
202 * @since 2.3
203 */
204 protected NetworkStructureChangeSensitiveLogic createLogic() {
205 if (this.reteContainer.isTimelyEvaluation()
206 && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
207 return TIMELY;
208 } else {
209 return TIMELESS;
210 }
211 }
212
213 private final NetworkStructureChangeSensitiveLogic TIMELY = new NetworkStructureChangeSensitiveLogic() {
214
215 @Override
216 public void resumeAt(final Timestamp timestamp) {
217 final Iterable<Tuple> signatures = memory.getResumableSignatures();
218
219 final Map<Tuple, Boolean> wasPresent = CollectionsFactory.createMap();
220 for (final Tuple signature : signatures) {
221 wasPresent.put(signature, memory.isPresentAtInfinity(signature));
222 }
223
224 final Map<Tuple, Map<Tuple, Diff<Timestamp>>> signatureMap = memory.resumeAt(timestamp);
225
226 for (final Entry<Tuple, Map<Tuple, Diff<Timestamp>>> outerEntry : signatureMap.entrySet()) {
227 final Tuple signature = outerEntry.getKey();
228 final Map<Tuple, Diff<Timestamp>> diffMap = outerEntry.getValue();
229 final boolean isPresent = memory.isPresentAtInfinity(signature);
230 // only send out a potential true value the first time for a given signature, then set it to false
231 boolean change = wasPresent.get(signature) ^ isPresent;
232
233 for (final Entry<Tuple, Diff<Timestamp>> innerEntry : diffMap.entrySet()) {
234 final Tuple tuple = innerEntry.getKey();
235 final Diff<Timestamp> diffs = innerEntry.getValue();
236 for (final Signed<Timestamp> signed : diffs) {
237 IndexerWithMemory.this.update(signed.getDirection(), tuple, signature, change,
238 signed.getPayload());
239 }
240 // change is a signature-wise flag, so it is ok to "try" to signal it for the first tuple only
241 change = false;
242 }
243 }
244
245 final Timestamp nextTimestamp = memory.getResumableTimestamp();
246 if (nextTimestamp != null) {
247 group.notifyHasMessage(mailbox, nextTimestamp);
248 }
249 }
250
251 @Override
252 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
253 final Tuple signature = mask.transform(update);
254 final boolean wasPresent = memory.isPresentAtInfinity(signature);
255 final Diff<Timestamp> resultDiff = direction == Direction.INSERT
256 ? memory.addWithTimestamp(update, signature, timestamp)
257 : memory.removeWithTimestamp(update, signature, timestamp);
258 final boolean isPresent = memory.isPresentAtInfinity(signature);
259 final boolean change = wasPresent ^ isPresent;
260 for (final Signed<Timestamp> signed : resultDiff) {
261 IndexerWithMemory.this.update(signed.getDirection(), update, signature, change, signed.getPayload());
262 }
263 }
264
265 };
266
267 private final NetworkStructureChangeSensitiveLogic TIMELESS = new NetworkStructureChangeSensitiveLogic() {
268
269 @Override
270 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
271 final Tuple signature = mask.transform(update);
272 final boolean change = direction == Direction.INSERT ? memory.add(update, signature)
273 : memory.remove(update, signature);
274 IndexerWithMemory.this.update(direction, update, signature, change, timestamp);
275 }
276
277 @Override
278 public void resumeAt(final Timestamp timestamp) {
279 // there is nothing to resume in the timeless case because we do not even care about timestamps
280 }
281
282 };
283
284} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IterableIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IterableIndexer.java
new file mode 100644
index 00000000..d6f8ef05
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/IterableIndexer.java
@@ -0,0 +1,34 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13
14/**
15 * An indexer that allows the iteration of all retrievable tuple groups (or reduced groups).
16 *
17 * @author Gabor Bergmann
18 *
19 */
20public interface IterableIndexer extends Indexer, Iterable<Tuple> {
21
22 /**
23 * A view consisting of exactly those signatures whose tuple group is not empty
24 * @since 2.0
25 */
26 public Iterable<Tuple> getSignatures();
27
28 /**
29 * @return the number of signatures whose tuple group is not empty
30 * @since 2.0
31 */
32 public int getBucketCount();
33
34}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/JoinNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/JoinNode.java
new file mode 100644
index 00000000..9a6a0de9
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/JoinNode.java
@@ -0,0 +1,193 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.matchers.util.Signed;
19import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
20import tools.refinery.viatra.runtime.rete.network.ReteContainer;
21import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
22
23/**
24 * @author Gabor Bergmann
25 *
26 */
27public class JoinNode extends DualInputNode {
28
29 public JoinNode(final ReteContainer reteContainer, final TupleMask complementerSecondaryMask) {
30 super(reteContainer, complementerSecondaryMask);
31 this.logic = createLogic();
32 }
33
34 @Override
35 public Tuple calibrate(final Tuple primary, final Tuple secondary) {
36 return unify(primary, secondary);
37 }
38
39 private final NetworkStructureChangeSensitiveLogic TIMELESS = new NetworkStructureChangeSensitiveLogic() {
40
41 @Override
42 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
43 throw new UnsupportedOperationException();
44 }
45
46 @Override
47 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
48 if (primarySlot == null || secondarySlot == null) {
49 return;
50 }
51
52 if (flush) {
53 reteContainer.flushUpdates();
54 }
55
56 for (final Tuple signature : primarySlot.getSignatures()) {
57 // primaries can not be null due to the contract of IterableIndex.getSignatures()
58 final Collection<Tuple> primaries = primarySlot.get(signature);
59 final Collection<Tuple> opposites = secondarySlot.get(signature);
60 if (opposites != null) {
61 for (final Tuple primary : primaries) {
62 for (final Tuple opposite : opposites) {
63 collector.add(unify(primary, opposite));
64 }
65 }
66 }
67 }
68 }
69
70 @Override
71 public void notifyUpdate(final Side side, final Direction direction, final Tuple updateElement,
72 final Tuple signature, final boolean change, final Timestamp timestamp) {
73 // in the default case, all timestamps must be zero
74 assert Timestamp.ZERO.equals(timestamp);
75
76 final Collection<Tuple> opposites = retrieveOpposites(side, signature);
77
78 if (!coincidence) {
79 if (opposites != null) {
80 for (final Tuple opposite : opposites) {
81 propagateUpdate(direction, unify(side, updateElement, opposite), timestamp);
82 }
83 }
84 } else {
85 // compensate for coincidence of slots - this is the case when an Indexer is joined with itself
86 if (opposites != null) {
87 for (final Tuple opposite : opposites) {
88 if (opposite.equals(updateElement)) {
89 // handle self-joins of a single tuple separately
90 continue;
91 }
92 propagateUpdate(direction, unify(opposite, updateElement), timestamp);
93 propagateUpdate(direction, unify(updateElement, opposite), timestamp);
94 }
95 }
96
97 // handle self-joins here
98 propagateUpdate(direction, unify(updateElement, updateElement), timestamp);
99 }
100 }
101 };
102
103 private final NetworkStructureChangeSensitiveLogic TIMELY = new NetworkStructureChangeSensitiveLogic() {
104
105 @Override
106 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
107 if (primarySlot == null || secondarySlot == null) {
108 return;
109 }
110
111 if (flush) {
112 reteContainer.flushUpdates();
113 }
114
115 for (final Tuple signature : primarySlot.getSignatures()) {
116 // primaries can not be null due to the contract of IterableIndex.getSignatures()
117 final Map<Tuple, Timeline<Timestamp>> primaries = getTimeline(signature, primarySlot);
118 final Map<Tuple, Timeline<Timestamp>> opposites = getTimeline(signature, secondarySlot);
119 if (opposites != null) {
120 for (final Tuple primary : primaries.keySet()) {
121 for (final Tuple opposite : opposites.keySet()) {
122 final Timeline<Timestamp> primaryTimeline = primaries.get(primary);
123 final Timeline<Timestamp> oppositeTimeline = opposites.get(opposite);
124 final Timeline<Timestamp> mergedTimeline = primaryTimeline
125 .mergeMultiplicative(oppositeTimeline);
126 if (!mergedTimeline.isEmpty()) {
127 collector.put(unify(primary, opposite), mergedTimeline);
128 }
129 }
130 }
131 }
132 }
133 }
134
135 @Override
136 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
137 JoinNode.this.TIMELESS.pullInto(collector, flush);
138 }
139
140 @Override
141 public void notifyUpdate(final Side side, final Direction direction, final Tuple updateElement,
142 final Tuple signature, final boolean change, final Timestamp timestamp) {
143 final Indexer oppositeIndexer = getSlot(side.opposite());
144 final Map<Tuple, Timeline<Timestamp>> opposites = getTimeline(signature, oppositeIndexer);
145
146 if (!coincidence) {
147 if (opposites != null) {
148 for (final Tuple opposite : opposites.keySet()) {
149 final Tuple unifiedTuple = unify(side, updateElement, opposite);
150 for (final Signed<Timestamp> signed : opposites.get(opposite).asChangeSequence()) {
151 // TODO only consider signed timestamps that are greater or equal to timestamp
152 // plus compact the previous timestamps into at most one update
153 propagateUpdate(signed.getDirection().multiply(direction), unifiedTuple,
154 timestamp.max(signed.getPayload()));
155 }
156 }
157 }
158 } else {
159 // compensate for coincidence of slots - this is the case when an Indexer is joined with itself
160 if (opposites != null) {
161 for (final Tuple opposite : opposites.keySet()) {
162 if (opposite.equals(updateElement)) {
163 // handle self-joins of a single tuple separately
164 continue;
165 }
166 final Tuple u1 = unify(opposite, updateElement);
167 final Tuple u2 = unify(updateElement, opposite);
168 for (final Signed<Timestamp> oppositeSigned : opposites.get(opposite).asChangeSequence()) {
169 final Direction updateDirection = direction.multiply(oppositeSigned.getDirection());
170 final Timestamp updateTimestamp = timestamp.max(oppositeSigned.getPayload());
171 propagateUpdate(updateDirection, u1, updateTimestamp);
172 propagateUpdate(updateDirection, u2, updateTimestamp);
173 }
174 }
175 }
176
177 // handle self-join here
178 propagateUpdate(direction, unify(updateElement, updateElement), timestamp);
179 }
180 }
181 };
182
183 @Override
184 protected NetworkStructureChangeSensitiveLogic createTimelessLogic() {
185 return this.TIMELESS;
186 }
187
188 @Override
189 protected NetworkStructureChangeSensitiveLogic createTimelyLogic() {
190 return this.TIMELY;
191 }
192
193}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryIdentityIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryIdentityIndexer.java
new file mode 100644
index 00000000..59b75c33
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryIdentityIndexer.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.List;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.rete.network.Receiver;
17import tools.refinery.viatra.runtime.rete.network.ReteContainer;
18import tools.refinery.viatra.runtime.rete.network.Supplier;
19
20/**
21 * Defines a trivial indexer that identically projects the contents of a memory-equipped node, and can therefore save
22 * space. Can only exist in connection with a memory, and must be operated by another node. Do not attach parents
23 * directly!
24 *
25 * @noimplement Rely on the provided implementations
26 * @noreference Use only via standard Node and Indexer interfaces
27 * @noinstantiate This class is not intended to be instantiated by clients.
28 * @author Gabor Bergmann
29 */
30
31public class MemoryIdentityIndexer extends IdentityIndexer {
32
33 protected final Collection<Tuple> memory;
34
35 /**
36 * @param reteContainer
37 * @param tupleWidth
38 * the width of the tuples of memoryNode
39 * @param memory
40 * the memory whose contents are to be identity-indexed
41 * @param parent
42 * the parent node that owns the memory
43 */
44 public MemoryIdentityIndexer(ReteContainer reteContainer, int tupleWidth, Collection<Tuple> memory,
45 Supplier parent, Receiver activeNode, List<ListenerSubscription> sharedSubscriptionList) {
46 super(reteContainer, tupleWidth, parent, activeNode, sharedSubscriptionList);
47 this.memory = memory;
48 }
49
50 @Override
51 protected Collection<Tuple> getTuples() {
52 return this.memory;
53 }
54
55}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryNullIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryNullIndexer.java
new file mode 100644
index 00000000..204fe433
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/MemoryNullIndexer.java
@@ -0,0 +1,54 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.List;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.rete.network.Receiver;
17import tools.refinery.viatra.runtime.rete.network.ReteContainer;
18import tools.refinery.viatra.runtime.rete.network.Supplier;
19
20/**
21 * Defines a trivial indexer that projects the contents of a memory-equipped node to the empty tuple, and can therefore
22 * save space. Can only exist in connection with a memory, and must be operated by another node. Do not attach parents
23 * directly!
24 *
25 * @author Gabor Bergmann
26 * @noimplement Rely on the provided implementations
27 * @noreference Use only via standard Node and Indexer interfaces
28 * @noinstantiate This class is not intended to be instantiated by clients.
29 */
30public class MemoryNullIndexer extends NullIndexer {
31
32 Collection<Tuple> memory;
33
34 /**
35 * @param reteContainer
36 * @param tupleWidth
37 * the width of the tuples of memoryNode
38 * @param memory
39 * the memory whose contents are to be null-indexed
40 * @param parent
41 * the parent node that owns the memory
42 */
43 public MemoryNullIndexer(ReteContainer reteContainer, int tupleWidth, Collection<Tuple> memory,
44 Supplier parent, Receiver activeNode, List<ListenerSubscription> sharedSubscriptionList) {
45 super(reteContainer, tupleWidth, parent, activeNode, sharedSubscriptionList);
46 this.memory = memory;
47 }
48
49 @Override
50 protected Collection<Tuple> getTuples() {
51 return this.memory;
52 }
53
54}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/NullIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/NullIndexer.java
new file mode 100644
index 00000000..a875b29f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/NullIndexer.java
@@ -0,0 +1,88 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2012 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.Collections;
14import java.util.Iterator;
15import java.util.List;
16
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
20import tools.refinery.viatra.runtime.matchers.util.Direction;
21import tools.refinery.viatra.runtime.rete.network.Node;
22import tools.refinery.viatra.runtime.rete.network.ReteContainer;
23import tools.refinery.viatra.runtime.rete.network.Supplier;
24import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
25
26/**
27 * Defines an abstract trivial indexer that projects the contents of some stateful node to the empty tuple, and can
28 * therefore save space. Can only exist in connection with a stateful store, and must be operated by another node (the
29 * active node). Do not attach parents directly!
30 *
31 * @author Gabor Bergmann
32 * @noimplement Rely on the provided implementations
33 * @noreference Use only via standard Node and Indexer interfaces
34 * @noinstantiate This class is not intended to be instantiated by clients.
35 */
36public abstract class NullIndexer extends SpecializedProjectionIndexer {
37
38 protected abstract Collection<Tuple> getTuples();
39
40 protected static final Tuple nullSignature = Tuples.staticArityFlatTupleOf();
41 protected static final Collection<Tuple> nullSingleton = Collections.singleton(nullSignature);
42 protected static final Collection<Tuple> emptySet = Collections.emptySet();
43
44 public NullIndexer(ReteContainer reteContainer, int tupleWidth, Supplier parent, Node activeNode,
45 List<ListenerSubscription> sharedSubscriptionList) {
46 super(reteContainer, TupleMask.linear(0, tupleWidth), parent, activeNode, sharedSubscriptionList);
47 }
48
49 @Override
50 public Collection<Tuple> get(Tuple signature) {
51 if (nullSignature.equals(signature))
52 return isEmpty() ? null : getTuples();
53 else
54 return null;
55 }
56
57 @Override
58 public Collection<Tuple> getSignatures() {
59 return isEmpty() ? emptySet : nullSingleton;
60 }
61
62 protected boolean isEmpty() {
63 return getTuples().isEmpty();
64 }
65
66 protected boolean isSingleElement() {
67 return getTuples().size() == 1;
68 }
69
70 @Override
71 public Iterator<Tuple> iterator() {
72 return getTuples().iterator();
73 }
74
75 @Override
76 public int getBucketCount() {
77 return getTuples().isEmpty() ? 0 : 1;
78 }
79
80 @Override
81 public void propagateToListener(IndexerListener listener, Direction direction, Tuple updateElement,
82 Timestamp timestamp) {
83 boolean radical = (direction == Direction.DELETE && isEmpty())
84 || (direction == Direction.INSERT && isSingleElement());
85 listener.notifyIndexerUpdate(direction, updateElement, nullSignature, radical, timestamp);
86 }
87
88} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/OnetimeIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/OnetimeIndexer.java
new file mode 100644
index 00000000..fef84bb1
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/OnetimeIndexer.java
@@ -0,0 +1,47 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
16import tools.refinery.viatra.runtime.rete.network.ReteContainer;
17import tools.refinery.viatra.runtime.rete.network.Supplier;
18
19/**
20 * @author Gabor Bergmann Indexer whose lifetime last until the first get() DO NOT connect to nodes!
21 */
22public class OnetimeIndexer extends GenericProjectionIndexer {
23
24 public OnetimeIndexer(ReteContainer reteContainer, TupleMask mask) {
25 super(reteContainer, mask);
26 }
27
28 @Override
29 public Collection<Tuple> get(Tuple signature) {
30 if (tools.refinery.viatra.runtime.rete.util.Options.releaseOnetimeIndexers) {
31 reteContainer.unregisterClearable(memory);
32 reteContainer.unregisterNode(this);
33 }
34 return super.get(signature);
35 }
36
37 @Override
38 public void appendParent(Supplier supplier) {
39 throw new UnsupportedOperationException("onetime indexer cannot have parents");
40 }
41
42 @Override
43 public void attachListener(IndexerListener listener) {
44 throw new UnsupportedOperationException("onetime indexer cannot have listeners");
45 }
46
47}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ProjectionIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ProjectionIndexer.java
new file mode 100644
index 00000000..58e593d9
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/ProjectionIndexer.java
@@ -0,0 +1,21 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12/**
13 * An iterable indexer that receives updates from a node, and groups received tuples intact, i.e. it does not reduce
14 * tuple groups.
15 *
16 * @author Gabor Bergmann
17 *
18 */
19public interface ProjectionIndexer extends IterableIndexer {
20
21}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/SpecializedProjectionIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/SpecializedProjectionIndexer.java
new file mode 100644
index 00000000..9c647aa9
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/SpecializedProjectionIndexer.java
@@ -0,0 +1,176 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2012 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.ArrayList;
13import java.util.List;
14import java.util.Objects;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.Direction;
19import tools.refinery.viatra.runtime.rete.network.Node;
20import tools.refinery.viatra.runtime.rete.network.ReteContainer;
21import tools.refinery.viatra.runtime.rete.network.Supplier;
22import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
23import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
24
25/**
26 * A specialized projection indexer that can be memory-less (relying on an external source of information).
27 *
28 * <p>
29 * All specialized projection indexers of a single node will share the same listener list, so that notification order is
30 * maintained (see Bug 518434).
31 *
32 * @author Gabor Bergmann
33 * @noimplement Rely on the provided implementations
34 * @noreference Use only via standard Node and Indexer interfaces
35 * @noinstantiate This class is not intended to be instantiated by clients.
36 */
37public abstract class SpecializedProjectionIndexer extends StandardIndexer implements ProjectionIndexer {
38
39 protected Node activeNode;
40 protected List<ListenerSubscription> subscriptions;
41
42 /**
43 * @since 1.7
44 */
45 public SpecializedProjectionIndexer(final ReteContainer reteContainer, final TupleMask mask, final Supplier parent,
46 final Node activeNode, final List<ListenerSubscription> subscriptions) {
47 super(reteContainer, mask);
48 this.parent = parent;
49 this.activeNode = activeNode;
50 this.subscriptions = subscriptions;
51 }
52
53 public List<ListenerSubscription> getSubscriptions() {
54 return subscriptions;
55 }
56
57 @Override
58 public Node getActiveNode() {
59 return activeNode;
60 }
61
62 @Override
63 protected void propagate(final Direction direction, final Tuple updateElement, final Tuple signature,
64 final boolean change, final Timestamp timestamp) {
65 throw new UnsupportedOperationException();
66 }
67
68 @Override
69 public void attachListener(final IndexerListener listener) {
70 super.attachListener(listener);
71 final CommunicationTracker tracker = this.getCommunicationTracker();
72 final IndexerListener proxy = tracker.proxifyIndexerListener(this, listener);
73 final ListenerSubscription subscription = new ListenerSubscription(this, proxy);
74 tracker.registerDependency(this, proxy.getOwner());
75 // See Bug 518434
76 // Must add to the first position, so that the later listeners are notified earlier.
77 // Thus if the beta node added as listener is also an indirect descendant of the same indexer on its opposite
78 // slot,
79 // then the beta node is connected later than its ancestor's listener, therefore it will be notified earlier,
80 // eliminating duplicate insertions and lost deletions that would result from fall-through update propagation
81 subscriptions.add(0, subscription);
82 }
83
84 @Override
85 public void detachListener(final IndexerListener listener) {
86 final CommunicationTracker tracker = this.getCommunicationTracker();
87 // obtain the proxy before the super call would unregister the dependency
88 final IndexerListener proxy = tracker.proxifyIndexerListener(this, listener);
89 super.detachListener(listener);
90 final ListenerSubscription subscription = new ListenerSubscription(this, proxy);
91 final boolean wasContained = subscriptions.remove(subscription);
92 assert wasContained;
93 tracker.unregisterDependency(this, proxy.getOwner());
94 }
95
96 @Override
97 public void networkStructureChanged() {
98 super.networkStructureChanged();
99 final List<ListenerSubscription> oldSubscriptions = new ArrayList<ListenerSubscription>();
100 oldSubscriptions.addAll(subscriptions);
101 subscriptions.clear();
102 for (final ListenerSubscription oldSubscription : oldSubscriptions) {
103 // there is no need to unregister and re-register the dependency between indexer and listener
104 // because the owner of the listener is the same (even if it is proxified)
105 final CommunicationTracker tracker = this.getCommunicationTracker();
106 // the subscriptions are shared, so we MUST reuse the indexer of the subscription instead of simply 'this'
107 final IndexerListener proxy = tracker.proxifyIndexerListener(oldSubscription.indexer, oldSubscription.listener);
108 final ListenerSubscription newSubscription = new ListenerSubscription(oldSubscription.indexer, proxy);
109 subscriptions.add(newSubscription);
110 }
111 }
112
113 /**
114 * @since 2.4
115 */
116 public abstract void propagateToListener(IndexerListener listener, Direction direction, Tuple updateElement,
117 Timestamp timestamp);
118
119 /**
120 * Infrastructure to share subscriptions between specialized indexers of the same parent node.
121 *
122 * @author Gabor Bergmann
123 * @since 1.7
124 */
125 public static class ListenerSubscription {
126 protected SpecializedProjectionIndexer indexer;
127 protected IndexerListener listener;
128
129 public ListenerSubscription(SpecializedProjectionIndexer indexer, IndexerListener listener) {
130 super();
131 this.indexer = indexer;
132 this.listener = listener;
133 }
134
135 /**
136 * @since 2.4
137 */
138 public SpecializedProjectionIndexer getIndexer() {
139 return indexer;
140 }
141
142 /**
143 * @since 2.4
144 */
145 public IndexerListener getListener() {
146 return listener;
147 }
148
149 /**
150 * Call this from parent node.
151 * @since 2.4
152 */
153 public void propagate(Direction direction, Tuple updateElement, Timestamp timestamp) {
154 indexer.propagateToListener(listener, direction, updateElement, timestamp);
155 }
156
157 @Override
158 public int hashCode() {
159 return Objects.hash(indexer, listener);
160 }
161
162 @Override
163 public boolean equals(Object obj) {
164 if (this == obj)
165 return true;
166 if (obj == null)
167 return false;
168 if (getClass() != obj.getClass())
169 return false;
170 ListenerSubscription other = (ListenerSubscription) obj;
171 return Objects.equals(listener, other.listener) && Objects.equals(indexer, other.indexer);
172 }
173
174 }
175
176}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/StandardIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/StandardIndexer.java
new file mode 100644
index 00000000..9847a8dd
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/StandardIndexer.java
@@ -0,0 +1,127 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.index;
11
12import java.util.Collection;
13import java.util.List;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
18import tools.refinery.viatra.runtime.matchers.util.Direction;
19import tools.refinery.viatra.runtime.rete.network.BaseNode;
20import tools.refinery.viatra.runtime.rete.network.NetworkStructureChangeSensitiveNode;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.Supplier;
23import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
24import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
25
26/**
27 * An abstract standard implementation of the Indexer interface, providing common bookkeeping functionality.
28 *
29 * @author Gabor Bergmann
30 *
31 */
32public abstract class StandardIndexer extends BaseNode implements Indexer, NetworkStructureChangeSensitiveNode {
33
34 protected Supplier parent;
35 private final List<IndexerListener> originalListeners;
36 private final List<IndexerListener> proxyListeners;
37 protected TupleMask mask;
38
39 public StandardIndexer(ReteContainer reteContainer, TupleMask mask) {
40 super(reteContainer);
41 this.parent = null;
42 this.mask = mask;
43 this.originalListeners = CollectionsFactory.createObserverList();
44 this.proxyListeners = CollectionsFactory.createObserverList();
45 }
46
47 /**
48 * @since 2.4
49 */
50 protected void propagate(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp) {
51 for (IndexerListener listener : proxyListeners) {
52 listener.notifyIndexerUpdate(direction, updateElement, signature, change, timestamp);
53 }
54 }
55
56 @Override
57 public TupleMask getMask() {
58 return mask;
59 }
60
61 @Override
62 public Supplier getParent() {
63 return parent;
64 }
65
66 @Override
67 public void attachListener(IndexerListener listener) {
68 this.getCommunicationTracker().registerDependency(this, listener.getOwner());
69 // obtain the proxy after registering the dependency because then the proxy reflects the new SCC structure
70 final IndexerListener proxy = this.getCommunicationTracker().proxifyIndexerListener(this, listener);
71 // See Bug 518434
72 // Must add to the first position, so that the later listeners are notified earlier.
73 // Thus if the beta node added as listener is also an indirect descendant of the same indexer on its opposite slot,
74 // then the beta node is connected later than its ancestor's listener, therefore it will be notified earlier,
75 // eliminating duplicate insertions and lost deletions that would result from fall-through update propagation
76 this.originalListeners.add(0, listener);
77 this.proxyListeners.add(0, proxy);
78 }
79
80 @Override
81 public void detachListener(IndexerListener listener) {
82 this.originalListeners.remove(listener);
83 IndexerListener listenerToRemove = null;
84 for (final IndexerListener proxyListener : this.proxyListeners) {
85 if (proxyListener.getOwner() == listener.getOwner()) {
86 listenerToRemove = proxyListener;
87 break;
88 }
89 }
90 assert listenerToRemove != null;
91 this.proxyListeners.remove(listenerToRemove);
92 this.getCommunicationTracker().unregisterDependency(this, listener.getOwner());
93 }
94
95 @Override
96 public void networkStructureChanged() {
97 this.proxyListeners.clear();
98 for (final IndexerListener original : this.originalListeners) {
99 this.proxyListeners.add(this.getCommunicationTracker().proxifyIndexerListener(this, original));
100 }
101 }
102
103 @Override
104 public Collection<IndexerListener> getListeners() {
105 return proxyListeners;
106 }
107
108 @Override
109 public ReteContainer getContainer() {
110 return reteContainer;
111 }
112
113 @Override
114 protected String toStringCore() {
115 return super.toStringCore() + "(" + parent + "/" + mask + ")";
116 }
117
118 @Override
119 public void assignTraceInfo(TraceInfo traceInfo) {
120 super.assignTraceInfo(traceInfo);
121 if (traceInfo.propagateFromIndexerToSupplierParent())
122 if (parent != null)
123 parent.acceptPropagatedTraceInfo(traceInfo);
124 }
125
126
127}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/TransitiveClosureNodeIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/TransitiveClosureNodeIndexer.java
new file mode 100644
index 00000000..77202004
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/TransitiveClosureNodeIndexer.java
@@ -0,0 +1,121 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Gabor Bergmann, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.index;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.rete.itc.alg.incscc.IncSCCAlg;
17import tools.refinery.viatra.runtime.matchers.tuple.MaskedTuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
21import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
22import tools.refinery.viatra.runtime.matchers.util.Direction;
23import tools.refinery.viatra.runtime.rete.network.Receiver;
24import tools.refinery.viatra.runtime.rete.single.TransitiveClosureNode;
25
26// UNFINISHED, not used yet
27public class TransitiveClosureNodeIndexer extends StandardIndexer implements IterableIndexer {
28 private TransitiveClosureNode tcNode;
29 private IncSCCAlg<Object> tcAlg;
30 private Collection<Tuple> emptySet;
31
32 public TransitiveClosureNodeIndexer(TupleMask mask, IncSCCAlg<Object> tcAlg, TransitiveClosureNode tcNode) {
33 super(tcNode.getContainer(), mask);
34 this.tcAlg = tcAlg;
35 this.tcNode = tcNode;
36 this.emptySet = Collections.emptySet();
37 this.parent = tcNode;
38 }
39
40 @Override
41 public Collection<Tuple> get(Tuple signature) {
42 if (signature.getSize() == mask.sourceWidth) {
43 if (mask.indices.length == 0) {
44 // mask ()/2
45 return getSignatures();
46 } else if (mask.indices.length == 1) {
47 Set<Tuple> retSet = CollectionsFactory.createSet();
48
49 // mask (0)/2
50 if (mask.indices[0] == 0) {
51 Object source = signature.get(0);
52 for (Object target : tcAlg.getAllReachableTargets(source)) {
53 retSet.add(Tuples.staticArityFlatTupleOf(source, target));
54 }
55 return retSet;
56 }
57 // mask (1)/2
58 if (mask.indices[0] == 1) {
59 Object target = signature.get(1);
60 for (Object source : tcAlg.getAllReachableSources(target)) {
61 retSet.add(Tuples.staticArityFlatTupleOf(source, target));
62 }
63 return retSet;
64 }
65 } else {
66 // mask (0,1)/2
67 if (mask.indices[0] == 0 && mask.indices[1] == 1) {
68 Object source = signature.get(0);
69 Object target = signature.get(1);
70 Tuple singleton = Tuples.staticArityFlatTupleOf(source, target);
71 return (tcAlg.isReachable(source, target) ? Collections.singleton(singleton) : emptySet);
72 }
73 // mask (1,0)/2
74 if (mask.indices[0] == 1 && mask.indices[1] == 0) {
75 Object source = signature.get(1);
76 Object target = signature.get(0);
77 Tuple singleton = Tuples.staticArityFlatTupleOf(source, target);
78 return (tcAlg.isReachable(source, target) ? Collections.singleton(singleton) : emptySet);
79 }
80 }
81 }
82 return null;
83 }
84
85 @Override
86 public int getBucketCount() {
87 throw new UnsupportedOperationException();
88 }
89
90 @Override
91 public Collection<Tuple> getSignatures() {
92 return asTupleCollection(tcAlg.getTcRelation());
93 }
94
95 @Override
96 public Iterator<Tuple> iterator() {
97 return asTupleCollection(tcAlg.getTcRelation()).iterator();
98 }
99
100 private Collection<Tuple> asTupleCollection(
101 Collection<tools.refinery.viatra.runtime.rete.itc.alg.misc.Tuple<Object>> tuples) {
102 Set<Tuple> retSet = CollectionsFactory.createSet();
103 for (tools.refinery.viatra.runtime.rete.itc.alg.misc.Tuple<Object> tuple : tuples) {
104 retSet.add(Tuples.staticArityFlatTupleOf(tuple.getSource(), tuple.getTarget()));
105 }
106 return retSet;
107 }
108
109 /**
110 * @since 2.4
111 */
112 public void propagate(Direction direction, Tuple updateElement, boolean change) {
113 propagate(direction, updateElement, new MaskedTuple(updateElement, mask), change, null);
114 }
115
116 @Override
117 public Receiver getActiveNode() {
118 return tcNode;
119 }
120
121}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryIdentityIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryIdentityIndexer.java
new file mode 100644
index 00000000..4319ee29
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryIdentityIndexer.java
@@ -0,0 +1,51 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.index.timely;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.List;
14import java.util.Map;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
18import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
19import tools.refinery.viatra.runtime.rete.index.IdentityIndexer;
20import tools.refinery.viatra.runtime.rete.network.Receiver;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.Supplier;
23import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
24
25public class TimelyMemoryIdentityIndexer extends IdentityIndexer {
26
27 protected final TimelyMemory<Timestamp> memory;
28
29 public TimelyMemoryIdentityIndexer(final ReteContainer reteContainer, final int tupleWidth,
30 final TimelyMemory<Timestamp> memory, final Supplier parent, final Receiver activeNode,
31 final List<ListenerSubscription> sharedSubscriptionList) {
32 super(reteContainer, tupleWidth, parent, activeNode, sharedSubscriptionList);
33 this.memory = memory;
34 }
35
36 @Override
37 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature) {
38 final Timeline<Timestamp> timestamp = this.memory.get(signature);
39 if (timestamp != null) {
40 return Collections.singletonMap(signature, timestamp);
41 } else {
42 return null;
43 }
44 }
45
46 @Override
47 protected Collection<Tuple> getTuples() {
48 return this.memory.getTuplesAtInfinity();
49 }
50
51}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryNullIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryNullIndexer.java
new file mode 100644
index 00000000..0386b006
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/index/timely/TimelyMemoryNullIndexer.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.index.timely;
10
11import java.util.Collection;
12import java.util.List;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
18import tools.refinery.viatra.runtime.rete.index.NullIndexer;
19import tools.refinery.viatra.runtime.rete.network.Receiver;
20import tools.refinery.viatra.runtime.rete.network.ReteContainer;
21import tools.refinery.viatra.runtime.rete.network.Supplier;
22import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
23
24public class TimelyMemoryNullIndexer extends NullIndexer {
25
26 protected final TimelyMemory<Timestamp> memory;
27
28 public TimelyMemoryNullIndexer(final ReteContainer reteContainer, final int tupleWidth,
29 final TimelyMemory<Timestamp> memory, final Supplier parent,
30 final Receiver activeNode, final List<ListenerSubscription> sharedSubscriptionList) {
31 super(reteContainer, tupleWidth, parent, activeNode, sharedSubscriptionList);
32 this.memory = memory;
33 }
34
35 @Override
36 public Map<Tuple, Timeline<Timestamp>> getTimeline(final Tuple signature) {
37 if (nullSignature.equals(signature)) {
38 return isEmpty() ? null : this.memory.asMap();
39 } else {
40 return null;
41 }
42 }
43
44 @Override
45 protected Collection<Tuple> getTuples() {
46 return this.memory.getTuplesAtInfinity();
47 }
48
49}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingAlg.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingAlg.java
new file mode 100644
index 00000000..199b44b1
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingAlg.java
@@ -0,0 +1,226 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.counting;
11
12import java.util.List;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.rete.itc.alg.misc.DFSPathFinder;
16import tools.refinery.viatra.runtime.rete.itc.alg.misc.IGraphPathFinder;
17import tools.refinery.viatra.runtime.rete.itc.alg.misc.ITcRelation;
18import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalGraphDataSource;
19import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalWrapper;
20import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
21import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphObserver;
22import tools.refinery.viatra.runtime.rete.itc.igraph.ITcDataSource;
23import tools.refinery.viatra.runtime.rete.itc.igraph.ITcObserver;
24import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
25import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
26
27/**
28 * This class is the optimized implementation of the Counting algorithm.
29 *
30 * @author Tamas Szabo
31 *
32 * @param <V>
33 * the type parameter of the nodes in the graph data source
34 */
35public class CountingAlg<V> implements IGraphObserver<V>, ITcDataSource<V> {
36
37 private CountingTcRelation<V> tc = null;
38 private IBiDirectionalGraphDataSource<V> gds = null;
39 private List<ITcObserver<V>> observers;
40
41 /**
42 * Constructs a new Counting algorithm and initializes the transitive closure relation with the given graph data
43 * source. Attach itself on the graph data source as an observer.
44 *
45 * @param gds
46 * the graph data source instance
47 */
48 public CountingAlg(IGraphDataSource<V> gds) {
49
50 if (gds instanceof IBiDirectionalGraphDataSource<?>) {
51 this.gds = (IBiDirectionalGraphDataSource<V>) gds;
52 } else {
53 this.gds = new IBiDirectionalWrapper<V>(gds);
54 }
55
56 observers = CollectionsFactory.<ITcObserver<V>>createObserverList();
57 tc = new CountingTcRelation<V>(true);
58
59 initTc();
60 gds.attachObserver(this);
61 }
62
63 /**
64 * Initializes the transitive closure relation.
65 */
66 private void initTc() {
67 this.setTcRelation(CountingTcRelation.createFrom(gds));
68 }
69
70 @Override
71 public void edgeInserted(V source, V target) {
72 if (!source.equals(target)) {
73 deriveTc(source, target, true);
74 }
75 }
76
77 @Override
78 public void edgeDeleted(V source, V target) {
79 if (!source.equals(target)) {
80 deriveTc(source, target, false);
81 }
82 }
83
84 @Override
85 public void nodeInserted(V n) {
86
87 }
88
89 @Override
90 public void nodeDeleted(V n) {
91 this.tc.deleteTupleEnd(n);
92 }
93
94 /**
95 * Derives the transitive closure relation when an edge is inserted or deleted.
96 *
97 * @param source
98 * the source of the edge
99 * @param target
100 * the target of the edge
101 * @param dCount
102 * the value is -1 if an edge was deleted and +1 if an edge was inserted
103 */
104 private void deriveTc(V source, V target, boolean isInsertion) {
105
106 // if (dCount == 1 && isReachable(target, source)) {
107 // System.out.println("The graph contains cycle with (" + source + ","+ target + ") edge!");
108 // }
109
110 CountingTcRelation<V> dtc = new CountingTcRelation<V>(false);
111 Set<V> tupEnds = null;
112
113 // 1. d(tc(x,y)) :- d(l(x,y))
114 if (tc.updateTuple(source, target, isInsertion)) {
115 dtc.updateTuple(source, target, true /* deltas implicitly have the same sign as isInsertion*/);
116 notifyTcObservers(source, target, isInsertion);
117 }
118
119 // 2. d(tc(x,y)) :- d(l(x,z)) & tc(z,y)
120 tupEnds = tc.getTupleEnds(target);
121 if (tupEnds != null) {
122 for (V tupEnd : tupEnds) {
123 if (!tupEnd.equals(source)) {
124 if (tc.updateTuple(source, tupEnd, isInsertion)) {
125 dtc.updateTuple(source, tupEnd, true /* deltas implicitly have the same sign as isInsertion*/);
126 notifyTcObservers(source, tupEnd, isInsertion);
127 }
128 }
129 }
130 }
131
132 // 3. d(tc(x,y)) :- lv(x,z) & d(tc(z,y))
133 CountingTcRelation<V> newTuples = dtc;
134 CountingTcRelation<V> tmp = null;
135 dtc = new CountingTcRelation<V>(false);
136
137 IMemoryView<V> nodes = null;
138
139 while (!newTuples.isEmpty()) {
140
141 tmp = dtc;
142 dtc = newTuples;
143 newTuples = tmp;
144 newTuples.clear();
145
146 for (V tS : dtc.getTupleStarts()) {
147 nodes = gds.getSourceNodes(tS);
148 for (V nS : nodes.distinctValues()) {
149 int count = nodes.getCount(nS);
150 for (int i = 0; i < count; i++) {
151 tupEnds = dtc.getTupleEnds(tS);
152 if (tupEnds != null) {
153 for (V tT : tupEnds) {
154 if (!nS.equals(tT)) {
155 if (tc.updateTuple(nS, tT, isInsertion)) {
156 newTuples.updateTuple(nS, tT, true /* deltas implicitly have the same sign as isInsertion*/);
157 notifyTcObservers(nS, tT, isInsertion);
158 }
159 }
160 }
161 }
162 }
163 }
164 }
165 }
166
167 // System.out.println(tc);
168 }
169
170 public ITcRelation<V> getTcRelation() {
171 return this.tc;
172 }
173
174 public void setTcRelation(CountingTcRelation<V> tc) {
175 this.tc = tc;
176 }
177
178 @Override
179 public boolean isReachable(V source, V target) {
180 return tc.containsTuple(source, target);
181 }
182
183 @Override
184 public void attachObserver(ITcObserver<V> to) {
185 this.observers.add(to);
186
187 }
188
189 @Override
190 public void detachObserver(ITcObserver<V> to) {
191 this.observers.remove(to);
192 }
193
194 @Override
195 public Set<V> getAllReachableTargets(V source) {
196 return tc.getTupleEnds(source);
197 }
198
199 @Override
200 public Set<V> getAllReachableSources(V target) {
201 return tc.getTupleStarts(target);
202 }
203
204 private void notifyTcObservers(V source, V target, boolean isInsertion) {
205 if (isInsertion) {
206 for (ITcObserver<V> o : observers) {
207 o.tupleInserted(source, target);
208 }
209 } else {
210 for (ITcObserver<V> o : observers) {
211 o.tupleDeleted(source, target);
212 }
213 }
214 }
215
216 @Override
217 public void dispose() {
218 tc.clear();
219 this.gds.detachObserver(this);
220 }
221
222 @Override
223 public IGraphPathFinder<V> getPathFinder() {
224 return new DFSPathFinder<V>(gds, this);
225 }
226}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingTcRelation.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingTcRelation.java
new file mode 100644
index 00000000..474c7461
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/counting/CountingTcRelation.java
@@ -0,0 +1,259 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.counting;
11
12import java.util.Collections;
13import java.util.List;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.rete.itc.alg.misc.topsort.TopologicalSorting;
17import tools.refinery.viatra.runtime.rete.itc.alg.misc.ITcRelation;
18import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalGraphDataSource;
19import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
21import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
22import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
23import tools.refinery.viatra.runtime.matchers.util.IMultiLookup.ChangeGranularity;
24
25/**
26 * Transitive closure relation implementation for the Counting algorithm.
27 *
28 * @author Tamas Szabo
29 *
30 * @param <V>
31 */
32public class CountingTcRelation<V> implements ITcRelation<V> {
33
34 private IMultiLookup<V, V> tuplesForward = null;
35 private IMultiLookup<V, V> tuplesBackward = null;
36
37 protected CountingTcRelation(boolean backwardIndexing) {
38 tuplesForward = CollectionsFactory.createMultiLookup(Object.class, MemoryType.MULTISETS, Object.class);
39 if (backwardIndexing)
40 tuplesBackward = CollectionsFactory.createMultiLookup(Object.class, MemoryType.MULTISETS, Object.class);
41 }
42
43 protected boolean isEmpty() {
44 return 0 == this.tuplesForward.countKeys();
45 }
46
47 protected void clear() {
48 this.tuplesForward.clear();
49
50 if (tuplesBackward != null) {
51 this.tuplesBackward.clear();
52 }
53 }
54
55 protected void union(CountingTcRelation<V> rA) {
56 IMultiLookup<V, V> rForward = rA.tuplesForward;
57 for (V source : rForward.distinctKeys()) {
58 IMemoryView<V> targetBag = rForward.lookup(source);
59 for (V target : targetBag.distinctValues()) {
60 this.addTuple(source, target, targetBag.getCount(target));
61 }
62 }
63 }
64
65 public int getCount(V source, V target) {
66 IMemoryView<V> bucket = tuplesForward.lookup(source);
67 return bucket == null ? 0 : bucket.getCount(target);
68 }
69
70 /**
71 * Returns true if the tc relation did not contain previously such a tuple that is defined by (source,target), false
72 * otherwise (in this case count is incremented with the given count parameter).
73 *
74 * @param source
75 * the source of the tuple
76 * @param target
77 * the target of the tuple
78 * @param count
79 * the count of the tuple, must be positive
80 * @return true if the relation did not contain previously the tuple
81 */
82 public boolean addTuple(V source, V target, int count) {
83 if (tuplesBackward != null) {
84 tuplesBackward.addPairPositiveMultiplicity(target, source, count);
85 }
86
87 ChangeGranularity change =
88 tuplesForward.addPairPositiveMultiplicity(source, target, count);
89
90 return change != ChangeGranularity.DUPLICATE;
91 }
92
93 /**
94 * Derivation count of the tuple (source,target) is incremented or decremented.
95 * Returns true iff updated to / from zero derivation count.
96 * @since 1.7
97 */
98 public boolean updateTuple(V source, V target, boolean isInsertion) {
99 if (isInsertion) {
100 if (tuplesBackward != null) {
101 tuplesBackward.addPair(target, source);
102 }
103 ChangeGranularity change =
104 tuplesForward.addPair(source, target);
105 return change != ChangeGranularity.DUPLICATE;
106 } else {
107 if (tuplesBackward != null) {
108 tuplesBackward.removePair(target, source);
109 }
110 ChangeGranularity change =
111 tuplesForward.removePair(source, target);
112 return change != ChangeGranularity.DUPLICATE;
113 }
114 }
115
116 public void deleteTupleEnd(V deleted) {
117 Set<V> sourcesToDelete = CollectionsFactory.createSet();
118 Set<V> targetsToDelete = CollectionsFactory.createSet();
119
120 for (V target : tuplesForward.lookupOrEmpty(deleted).distinctValues()) {
121 targetsToDelete.add(target);
122 }
123 if (tuplesBackward != null) {
124 for (V source : tuplesBackward.lookupOrEmpty(deleted).distinctValues()) {
125 sourcesToDelete.add(source);
126 }
127 } else {
128 for (V sourceCandidate : tuplesForward.distinctKeys()) {
129 if (tuplesForward.lookupOrEmpty(sourceCandidate).containsNonZero(deleted))
130 sourcesToDelete.add(sourceCandidate);
131 }
132 }
133
134 for (V source : sourcesToDelete) {
135 int count = tuplesForward.lookupOrEmpty(source).getCount(deleted);
136 for (int i=0; i< count; ++i) tuplesForward.removePair(source, deleted);
137 }
138 for (V target : targetsToDelete) {
139 int count = tuplesForward.lookupOrEmpty(deleted).getCount(target);
140 for (int i=0; i< count; ++i) tuplesForward.removePair(deleted, target);
141 }
142
143 if (tuplesBackward != null) {
144 for (V source : sourcesToDelete) {
145 int count = tuplesBackward.lookupOrEmpty(deleted).getCount(source);
146 for (int i=0; i< count; ++i) tuplesBackward.removePair(deleted, source);
147 }
148 for (V target : targetsToDelete) {
149 int count = tuplesBackward.lookupOrEmpty(target).getCount(deleted);
150 for (int i=0; i< count; ++i) tuplesBackward.removePair(target, deleted);
151 }
152 }
153 }
154
155 @Override
156 public String toString() {
157 StringBuilder sb = new StringBuilder("TcRelation = ");
158
159 for (V source : tuplesForward.distinctKeys()) {
160 IMemoryView<V> targets = tuplesForward.lookup(source);
161 for (V target : targets.distinctValues()) {
162 sb.append("{(" + source + "," + target + ")," + targets.getCount(target) + "} ");
163 }
164 }
165
166 return sb.toString();
167 }
168
169 @Override
170 public Set<V> getTupleEnds(V source) {
171 IMemoryView<V> tupEnds = tuplesForward.lookup(source);
172 if (tupEnds == null)
173 return null;
174 return tupEnds.distinctValues();
175 }
176
177 /**
178 * Returns the set of nodes from which the target node is reachable, if already computed.
179 *
180 * @param target
181 * the target node
182 * @return the set of source nodes
183 * @throws UnsupportedOperationException if backwards index not computed
184 */
185 public Set<V> getTupleStarts(V target) {
186 if (tuplesBackward != null) {
187 IMemoryView<V> tupStarts = tuplesBackward.lookup(target);
188 if (tupStarts == null)
189 return null;
190 return tupStarts.distinctValues();
191 } else {
192 throw new UnsupportedOperationException("built without backward indexing");
193 }
194 }
195
196 @Override
197 public Set<V> getTupleStarts() {
198 Set<V> nodes = CollectionsFactory.createSet();
199 for (V s : tuplesForward.distinctKeys()) {
200 nodes.add(s);
201 }
202 return nodes;
203 }
204
205 /**
206 * Returns true if a (source, target) node is present in the transitive closure relation, false otherwise.
207 *
208 * @param source
209 * the source node
210 * @param target
211 * the target node
212 * @return true if tuple is present, false otherwise
213 */
214 public boolean containsTuple(V source, V target) {
215 return tuplesForward.lookupOrEmpty(source).containsNonZero(target);
216 }
217
218 @SuppressWarnings("unchecked")
219 @Override
220 public boolean equals(Object obj) {
221 if (this == obj) {
222 return true;
223 } else if (obj == null || this.getClass() != obj.getClass()) {
224 return false;
225 } else {
226 CountingTcRelation<V> aTR = (CountingTcRelation<V>) obj;
227
228 return tuplesForward.equals(aTR.tuplesForward);
229 }
230 }
231
232 @Override
233 public int hashCode() {
234 return tuplesForward.hashCode();
235 }
236
237 public static <V> CountingTcRelation<V> createFrom(IBiDirectionalGraphDataSource<V> gds) {
238 List<V> topologicalSorting = TopologicalSorting.compute(gds);
239 CountingTcRelation<V> tc = new CountingTcRelation<V>(true);
240 Collections.reverse(topologicalSorting);
241 for (V n : topologicalSorting) {
242 IMemoryView<V> sourceNodes = gds.getSourceNodes(n);
243 Set<V> tupEnds = tc.getTupleEnds(n);
244 for (V s : sourceNodes.distinctValues()) {
245 int count = sourceNodes.getCount(s);
246 for (int i = 0; i < count; i++) {
247 tc.updateTuple(s, n, true);
248 if (tupEnds != null) {
249 for (V t : tupEnds) {
250 tc.updateTuple(s, t, true);
251 }
252 }
253 }
254 }
255 }
256
257 return tc;
258 }
259}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/CountingListener.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/CountingListener.java
new file mode 100644
index 00000000..7d507d82
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/CountingListener.java
@@ -0,0 +1,36 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.itc.alg.incscc;
10
11import tools.refinery.viatra.runtime.rete.itc.igraph.ITcObserver;
12import tools.refinery.viatra.runtime.matchers.util.Direction;
13
14/**
15 * @author Tamas Szabo
16 *
17 */
18public class CountingListener<V> implements ITcObserver<V> {
19
20 private IncSCCAlg<V> alg;
21
22 public CountingListener(IncSCCAlg<V> alg) {
23 this.alg = alg;
24 }
25
26 @Override
27 public void tupleInserted(V source, V target) {
28 alg.notifyTcObservers(alg.sccs.getPartition(source), alg.sccs.getPartition(target), Direction.INSERT);
29 }
30
31 @Override
32 public void tupleDeleted(V source, V target) {
33 alg.notifyTcObservers(alg.sccs.getPartition(source), alg.sccs.getPartition(target), Direction.DELETE);
34 }
35
36}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/IncSCCAlg.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/IncSCCAlg.java
new file mode 100644
index 00000000..774e55eb
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/incscc/IncSCCAlg.java
@@ -0,0 +1,609 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.incscc;
11
12import tools.refinery.viatra.runtime.matchers.algorithms.UnionFind;
13import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
14import tools.refinery.viatra.runtime.matchers.util.Direction;
15import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
16import tools.refinery.viatra.runtime.rete.itc.alg.counting.CountingAlg;
17import tools.refinery.viatra.runtime.rete.itc.alg.misc.DFSPathFinder;
18import tools.refinery.viatra.runtime.rete.itc.alg.misc.GraphHelper;
19import tools.refinery.viatra.runtime.rete.itc.alg.misc.IGraphPathFinder;
20import tools.refinery.viatra.runtime.rete.itc.alg.misc.Tuple;
21import tools.refinery.viatra.runtime.rete.itc.alg.misc.bfs.BFS;
22import tools.refinery.viatra.runtime.rete.itc.alg.misc.scc.SCC;
23import tools.refinery.viatra.runtime.rete.itc.alg.misc.scc.SCCResult;
24import tools.refinery.viatra.runtime.rete.itc.alg.util.CollectionHelper;
25import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
26import tools.refinery.viatra.runtime.rete.itc.igraph.*;
27
28import java.util.*;
29import java.util.Map.Entry;
30
31/**
32 * Incremental SCC maintenance + counting algorithm.
33 *
34 * @author Tamas Szabo
35 *
36 * @param <V>
37 * the type parameter of the nodes in the graph data source
38 */
39public class IncSCCAlg<V> implements IGraphObserver<V>, ITcDataSource<V> {
40
41 public UnionFind<V> sccs;
42 public IBiDirectionalGraphDataSource<V> gds;
43 private CountingAlg<V> counting;
44 private Graph<V> reducedGraph;
45 private IBiDirectionalGraphDataSource<V> reducedGraphIndexer;
46 private List<ITcObserver<V>> observers;
47 private CountingListener<V> countingListener;
48
49 public IncSCCAlg(IGraphDataSource<V> graphDataSource) {
50
51 if (graphDataSource instanceof IBiDirectionalGraphDataSource<?>) {
52 gds = (IBiDirectionalGraphDataSource<V>) graphDataSource;
53 } else {
54 gds = new IBiDirectionalWrapper<V>(graphDataSource);
55 }
56 observers = CollectionsFactory.createObserverList();
57 sccs = new UnionFind<V>();
58 reducedGraph = new Graph<V>();
59 reducedGraphIndexer = new IBiDirectionalWrapper<V>(reducedGraph);
60 countingListener = new CountingListener<V>(this);
61 initalizeInternalDataStructures();
62 gds.attachObserver(this);
63 }
64
65 private void initalizeInternalDataStructures() {
66 SCCResult<V> _sccres = SCC.computeSCC(gds);
67 Set<Set<V>> _sccs = _sccres.getSccs();
68
69 for (Set<V> _set : _sccs) {
70 sccs.makeSet(_set);
71 }
72
73 // Initalization of the reduced graph
74 for (V n : sccs.getPartitionHeads()) {
75 reducedGraph.insertNode(n);
76 }
77
78 for (V source : gds.getAllNodes()) {
79 final IMemoryView<V> targetNodes = gds.getTargetNodes(source);
80 for (Entry<V, Integer> entry : targetNodes.entriesWithMultiplicities()) {
81 for (int i = 0; i < entry.getValue(); i++) {
82 V target = entry.getKey();
83 V sourceRoot = sccs.find(source);
84 V targetRoot = sccs.find(target);
85
86 if (!sourceRoot.equals(targetRoot)) {
87 reducedGraph.insertEdge(sourceRoot, targetRoot);
88 }
89 }
90 }
91 }
92
93 counting = new CountingAlg<V>(reducedGraph);
94 }
95
96 @Override
97 public void edgeInserted(V source, V target) {
98 V sourceRoot = sccs.find(source);
99 V targetRoot = sccs.find(target);
100
101 // Different SCC
102 if (!sourceRoot.equals(targetRoot)) {
103
104 // source is reachable from target?
105 if (counting.isReachable(targetRoot, sourceRoot)) {
106
107 Set<V> predecessorRoots = counting.getAllReachableSources(sourceRoot);
108 Set<V> successorRoots = counting.getAllReachableTargets(targetRoot);
109
110 // 1. intersection of source and target roots, these will be in the merged SCC
111 Set<V> isectRoots = CollectionHelper.intersection(predecessorRoots, successorRoots);
112 isectRoots.add(sourceRoot);
113 isectRoots.add(targetRoot);
114
115 // notifications must be issued before Union-Find modifications
116 if (observers.size() > 0) {
117 Set<V> sourceSCCs = createSetNullTolerant(predecessorRoots);
118 sourceSCCs.add(sourceRoot);
119 Set<V> targetSCCs = createSetNullTolerant(successorRoots);
120 targetSCCs.add(targetRoot);
121
122 // tracing back to actual nodes
123 for (V sourceSCC : sourceSCCs) {
124 targetLoop: for (V targetSCC : targetSCCs) {
125 if (counting.isReachable(sourceSCC, targetSCC)) continue targetLoop;
126
127 boolean needsNotification =
128 // Case 1. sourceSCC and targetSCC are the same and it is a one sized scc.
129 // Issue notifications only if there is no self-loop present at the moment
130 (sourceSCC.equals(targetSCC) && sccs.getPartition(sourceSCC).size() == 1 && GraphHelper
131 .getEdgeCount(sccs.getPartition(sourceSCC).iterator().next(), gds) == 0)
132 ||
133 // Case 2. sourceSCC and targetSCC are different sccs.
134 (!sourceSCC.equals(targetSCC));
135 // if self loop is already present omit the notification
136 if (needsNotification) {
137 notifyTcObservers(sccs.getPartition(sourceSCC), sccs.getPartition(targetSCC),
138 Direction.INSERT);
139 }
140 }
141 }
142 }
143
144 // 2. delete edges, nodes
145 List<V> sourceSCCs = new ArrayList<V>();
146 List<V> targetSCCs = new ArrayList<V>();
147
148 for (V r : isectRoots) {
149 List<V> sourceSCCsOfSCC = getSourceSCCsOfSCC(r);
150 List<V> targetSCCsOfSCC = getTargetSCCsOfSCC(r);
151
152 for (V sourceSCC : sourceSCCsOfSCC) {
153 if (!sourceSCC.equals(r)) {
154 reducedGraph.deleteEdgeIfExists(sourceSCC, r);
155 }
156 }
157
158 for (V targetSCC : targetSCCsOfSCC) {
159 if (!isectRoots.contains(targetSCC) && !r.equals(targetSCC)) {
160 reducedGraph.deleteEdgeIfExists(r, targetSCC);
161 }
162 }
163
164 sourceSCCs.addAll(sourceSCCsOfSCC);
165 targetSCCs.addAll(targetSCCsOfSCC);
166 }
167
168 for (V r : isectRoots) {
169 reducedGraph.deleteNode(r);
170 }
171
172 // 3. union
173 Iterator<V> iterator = isectRoots.iterator();
174 V newRoot = iterator.next();
175 while (iterator.hasNext()) {
176 newRoot = sccs.union(newRoot, iterator.next());
177 }
178
179 // 4. add new node
180 reducedGraph.insertNode(newRoot);
181
182 // 5. add edges
183 Set<V> containedNodes = sccs.getPartition(newRoot);
184
185 for (V sourceSCC : sourceSCCs) {
186 if (!containedNodes.contains(sourceSCC) && !sourceSCC.equals(newRoot)) {
187 reducedGraph.insertEdge(sourceSCC, newRoot);
188 }
189 }
190 for (V targetSCC : targetSCCs) {
191 if (!containedNodes.contains(targetSCC) && !targetSCC.equals(newRoot)) {
192 reducedGraph.insertEdge(newRoot, targetSCC);
193 }
194 }
195 } else {
196 if (observers.size() > 0 && GraphHelper.getEdgeCount(source, target, gds) == 1) {
197 counting.attachObserver(countingListener);
198 }
199 reducedGraph.insertEdge(sourceRoot, targetRoot);
200 counting.detachObserver(countingListener);
201 }
202 } else {
203 // Notifications about self-loops
204 if (observers.size() > 0 && sccs.getPartition(sourceRoot).size() == 1
205 && GraphHelper.getEdgeCount(source, target, gds) == 1) {
206 notifyTcObservers(source, source, Direction.INSERT);
207 }
208 }
209 }
210
211 @Override
212 public void edgeDeleted(V source, V target) {
213 V sourceRoot = sccs.find(source);
214 V targetRoot = sccs.find(target);
215
216 if (!sourceRoot.equals(targetRoot)) {
217 if (observers.size() > 0 && GraphHelper.getEdgeCount(source, target, gds) == 0) {
218 counting.attachObserver(countingListener);
219 }
220 reducedGraph.deleteEdgeIfExists(sourceRoot, targetRoot);
221 counting.detachObserver(countingListener);
222 } else {
223 // get the graph for the scc whose root is sourceRoot
224 Graph<V> g = GraphHelper.getSubGraph(sccs.getPartition(sourceRoot), gds);
225
226 // if source is not reachable from target anymore
227 if (!BFS.isReachable(source, target, g)) {
228 // create copies of the current state before destructive manipulation
229 Map<V, Integer> reachableSources = CollectionsFactory.createMap();
230 for (Entry<V, Integer> entry : reducedGraphIndexer.getSourceNodes(sourceRoot).entriesWithMultiplicities()) {
231 reachableSources.put(entry.getKey(), entry.getValue());
232 }
233 Map<V, Integer> reachableTargets = CollectionsFactory.createMap();
234 for (Entry<V, Integer> entry : reducedGraphIndexer.getTargetNodes(sourceRoot).entriesWithMultiplicities()) {
235 reachableTargets.put(entry.getKey(), entry.getValue());
236 }
237
238 SCCResult<V> _newSccs = SCC.computeSCC(g);
239
240 // delete scc node (and with its edges too)
241 for (Entry<V, Integer> entry : reachableSources.entrySet()) {
242 V s = entry.getKey();
243 for (int i = 0; i < entry.getValue(); i++) {
244 reducedGraph.deleteEdgeIfExists(s, sourceRoot);
245 }
246 }
247
248 for (Entry<V, Integer> entry : reachableTargets.entrySet()) {
249 V t = entry.getKey();
250 for (int i = 0; i < entry.getValue(); i++) {
251 reducedGraph.deleteEdgeIfExists(sourceRoot, t);
252 }
253 }
254
255 sccs.deleteSet(sourceRoot);
256 reducedGraph.deleteNode(sourceRoot);
257
258 Set<Set<V>> newSCCs = _newSccs.getSccs();
259 Set<V> newSCCRoots = CollectionsFactory.createSet();
260
261 // add new nodes and edges to the reduced graph
262 for (Set<V> newSCC : newSCCs) {
263 V newRoot = sccs.makeSet(newSCC);
264 reducedGraph.insertNode(newRoot);
265 newSCCRoots.add(newRoot);
266 }
267 for (V newSCCRoot : newSCCRoots) {
268 List<V> sourceSCCsOfSCC = getSourceSCCsOfSCC(newSCCRoot);
269 List<V> targetSCCsOfSCC = getTargetSCCsOfSCC(newSCCRoot);
270
271 for (V sourceSCC : sourceSCCsOfSCC) {
272 if (!sourceSCC.equals(newSCCRoot)) {
273 reducedGraph.insertEdge(sccs.find(sourceSCC), newSCCRoot);
274 }
275 }
276 for (V targetSCC : targetSCCsOfSCC) {
277 if (!newSCCRoots.contains(targetSCC) && !targetSCC.equals(newSCCRoot))
278 reducedGraph.insertEdge(newSCCRoot, targetSCC);
279 }
280 }
281
282 // Must be after the union-find modifications
283 if (observers.size() > 0) {
284 V newSourceRoot = sccs.find(source);
285 V newTargetRoot = sccs.find(target);
286
287 Set<V> sourceSCCs = createSetNullTolerant(counting.getAllReachableSources(newSourceRoot));
288 sourceSCCs.add(newSourceRoot);
289
290 Set<V> targetSCCs = createSetNullTolerant(counting.getAllReachableTargets(newTargetRoot));
291 targetSCCs.add(newTargetRoot);
292
293 for (V sourceSCC : sourceSCCs) {
294 targetLoop: for (V targetSCC : targetSCCs) {
295 if (counting.isReachable(sourceSCC, targetSCC)) continue targetLoop;
296
297 boolean needsNotification =
298 // Case 1. sourceSCC and targetSCC are the same and it is a one sized scc.
299 // Issue notifications only if there is no self-loop present at the moment
300 (sourceSCC.equals(targetSCC) && sccs.getPartition(sourceSCC).size() == 1 && GraphHelper
301 .getEdgeCount(sccs.getPartition(sourceSCC).iterator().next(), gds) == 0)
302 ||
303 // Case 2. sourceSCC and targetSCC are different sccs.
304 (!sourceSCC.equals(targetSCC));
305 // if self loop is already present omit the notification
306 if (needsNotification) {
307 notifyTcObservers(sccs.getPartition(sourceSCC), sccs.getPartition(targetSCC),
308 Direction.DELETE);
309 }
310 }
311 }
312 }
313 } else {
314 // only handle self-loop notifications - sourceRoot equals to targetRoot
315 if (observers.size() > 0 && sccs.getPartition(sourceRoot).size() == 1
316 && GraphHelper.getEdgeCount(source, target, gds) == 0) {
317 notifyTcObservers(source, source, Direction.DELETE);
318 }
319 }
320 }
321 }
322
323 @Override
324 public void nodeInserted(V n) {
325 sccs.makeSet(n);
326 reducedGraph.insertNode(n);
327 }
328
329 @Override
330 public void nodeDeleted(V n) {
331 IMemoryView<V> sources = gds.getSourceNodes(n);
332 IMemoryView<V> targets = gds.getTargetNodes(n);
333
334 for (Entry<V, Integer> entry : sources.entriesWithMultiplicities()) {
335 for (int i = 0; i < entry.getValue(); i++) {
336 V source = entry.getKey();
337 edgeDeleted(source, n);
338 }
339 }
340
341 for (Entry<V, Integer> entry : targets.entriesWithMultiplicities()) {
342 for (int i = 0; i < entry.getValue(); i++) {
343 V target = entry.getKey();
344 edgeDeleted(n, target);
345 }
346 }
347
348 sccs.deleteSet(n);
349 }
350
351 @Override
352 public void attachObserver(ITcObserver<V> to) {
353 observers.add(to);
354 }
355
356 @Override
357 public void detachObserver(ITcObserver<V> to) {
358 observers.remove(to);
359 }
360
361 @Override
362 public Set<V> getAllReachableTargets(V source) {
363 V sourceRoot = sccs.find(source);
364 Set<V> containedNodes = sccs.getPartition(sourceRoot);
365 Set<V> targets = CollectionsFactory.createSet();
366
367 if (containedNodes.size() > 1 || GraphHelper.getEdgeCount(source, gds) == 1) {
368 targets.addAll(containedNodes);
369 }
370
371 Set<V> rootSet = counting.getAllReachableTargets(sourceRoot);
372 if (rootSet != null) {
373 for (V _root : rootSet) {
374 targets.addAll(sccs.getPartition(_root));
375 }
376 }
377
378 return targets;
379 }
380
381 @Override
382 public Set<V> getAllReachableSources(V target) {
383 V targetRoot = sccs.find(target);
384 Set<V> containedNodes = sccs.getPartition(targetRoot);
385 Set<V> sources = CollectionsFactory.createSet();
386
387 if (containedNodes.size() > 1 || GraphHelper.getEdgeCount(target, gds) == 1) {
388 sources.addAll(containedNodes);
389 }
390
391 Set<V> rootSet = counting.getAllReachableSources(targetRoot);
392 if (rootSet != null) {
393 for (V _root : rootSet) {
394 sources.addAll(sccs.getPartition(_root));
395 }
396 }
397 return sources;
398 }
399
400 @Override
401 public boolean isReachable(V source, V target) {
402 V sourceRoot = sccs.find(source);
403 V targetRoot = sccs.find(target);
404
405 if (sourceRoot.equals(targetRoot))
406 return true;
407 else
408 return counting.isReachable(sourceRoot, targetRoot);
409 }
410
411 public List<V> getReachabilityPath(V source, V target) {
412 if (!isReachable(source, target)) {
413 return null;
414 } else {
415 Set<V> sccsInSubGraph = CollectionHelper.intersection(counting.getAllReachableTargets(source),
416 counting.getAllReachableSources(target));
417 sccsInSubGraph.add(sccs.find(source));
418 sccsInSubGraph.add(sccs.find(target));
419 Set<V> nodesInSubGraph = CollectionsFactory.createSet();
420
421 for (V sccRoot : sccsInSubGraph) {
422 nodesInSubGraph.addAll(sccs.getPartition(sccRoot));
423 }
424
425 return GraphHelper.constructPath(source, target, nodesInSubGraph, gds);
426 }
427 }
428
429 /**
430 * Return the SCCs from which the SCC represented by the root node is reachable. Note that an SCC can be present
431 * multiple times in the returned list (multiple edges between the two SCCs).
432 *
433 * @param root
434 * @return the list of reachable target SCCs
435 */
436 private List<V> getSourceSCCsOfSCC(V root) {
437 List<V> sourceSCCs = new ArrayList<V>();
438
439 for (V containedNode : this.sccs.getPartition(root)) {
440 IMemoryView<V> sourceNodes = this.gds.getSourceNodes(containedNode);
441 for (V source : sourceNodes.distinctValues()) {
442 sourceSCCs.add(this.sccs.find(source));
443 }
444 }
445
446 return sourceSCCs;
447 }
448
449 /**
450 * Returns true if the SCC represented by the given root node has incoming edges in the reduced graph,
451 * false otherwise (if this SCC is a source in the reduced graph).
452 *
453 * @param root the root node of an SCC
454 * @return true if it has incoming edges, false otherwise
455 * @since 1.6
456 */
457 public boolean hasIncomingEdges(final V root) {
458 for (final V containedNode : this.sccs.getPartition(root)) {
459 final IMemoryView<V> sourceNodes = this.gds.getSourceNodes(containedNode);
460 for (final V source : sourceNodes.distinctValues()) {
461 final V otherRoot = this.sccs.find(source);
462 if (!Objects.equals(root, otherRoot)) {
463 return true;
464 }
465 }
466 }
467 return false;
468 }
469
470 /**
471 * Return the SCCs which are reachable from the SCC represented by the root node. Note that an SCC can be present
472 * multiple times in the returned list (multiple edges between the two SCCs).
473 *
474 * @param root
475 * @return the list of reachable target SCCs
476 */
477 private List<V> getTargetSCCsOfSCC(V root) {
478 List<V> targetSCCs = new ArrayList<V>();
479
480 for (V containedNode : this.sccs.getPartition(root)) {
481 IMemoryView<V> targetNodes = this.gds.getTargetNodes(containedNode);
482 for (V target : targetNodes.distinctValues()) {
483 targetSCCs.add(this.sccs.find(target));
484 }
485 }
486
487 return targetSCCs;
488 }
489
490 /**
491 * Returns true if the SCC represented by the given root node has outgoing edges in the reduced graph,
492 * false otherwise (if this SCC is a sink in the reduced graph).
493 *
494 * @param root the root node of an SCC
495 * @return true if it has outgoing edges, false otherwise
496 * @since 1.6
497 */
498 public boolean hasOutgoingEdges(V root) {
499 for (final V containedNode : this.sccs.getPartition(root)) {
500 final IMemoryView<V> targetNodes = this.gds.getTargetNodes(containedNode);
501 for (final V target : targetNodes.distinctValues()) {
502 final V otherRoot = this.sccs.find(target);
503 if (!Objects.equals(root, otherRoot)) {
504 return true;
505 }
506 }
507 }
508 return false;
509 }
510
511 @Override
512 public void dispose() {
513 gds.detachObserver(this);
514 counting.dispose();
515 }
516
517 /**
518 * Call this method to notify the observers of the transitive closure relation. The tuples used in the notification
519 * will be the Descartes product of the two sets given.
520 *
521 * @param sources
522 * the source nodes
523 * @param targets
524 * the target nodes
525 * @param direction
526 */
527 protected void notifyTcObservers(Set<V> sources, Set<V> targets, Direction direction) {
528 for (V s : sources) {
529 for (V t : targets) {
530 notifyTcObservers(s, t, direction);
531 }
532 }
533 }
534
535 private void notifyTcObservers(V source, V target, Direction direction) {
536 for (ITcObserver<V> observer : observers) {
537 if (direction == Direction.INSERT) {
538 observer.tupleInserted(source, target);
539 }
540 if (direction == Direction.DELETE) {
541 observer.tupleDeleted(source, target);
542 }
543 }
544 }
545
546 /**
547 * Returns the node that is selected as the representative of the SCC containing the argument.
548 * @since 1.6
549 */
550 public V getRepresentative(V node) {
551 return sccs.find(node);
552 }
553
554 public Set<Tuple<V>> getTcRelation() {
555 Set<Tuple<V>> resultSet = new HashSet<Tuple<V>>();
556
557 for (V sourceRoot : sccs.getPartitionHeads()) {
558 Set<V> sources = sccs.getPartition(sourceRoot);
559 if (sources.size() > 1 || GraphHelper.getEdgeCount(sources.iterator().next(), gds) == 1) {
560 for (V source : sources) {
561 for (V target : sources) {
562 resultSet.add(new Tuple<V>(source, target));
563 }
564 }
565 }
566
567 Set<V> reachableTargets = counting.getAllReachableTargets(sourceRoot);
568 if (reachableTargets != null) {
569 for (V targetRoot : reachableTargets) {
570 for (V source : sources) {
571 for (V target : sccs.getPartition(targetRoot)) {
572 resultSet.add(new Tuple<V>(source, target));
573 }
574 }
575 }
576 }
577 }
578
579 return resultSet;
580 }
581
582 public boolean isIsolated(V node) {
583 IMemoryView<V> targets = gds.getTargetNodes(node);
584 IMemoryView<V> sources = gds.getSourceNodes(node);
585 return targets.isEmpty() && sources.isEmpty();
586 }
587
588 @Override
589 public IGraphPathFinder<V> getPathFinder() {
590 return new DFSPathFinder<V>(gds, this);
591 }
592
593 /**
594 * The graph of SCCs; each SCC is represented by its representative node (see {@link #getRepresentative(Object)})
595 * @since 1.6
596 */
597 public Graph<V> getReducedGraph() {
598 return reducedGraph;
599 }
600
601 private static <V> Set<V> createSetNullTolerant(Set<V> initial) {
602 if (initial != null)
603 return CollectionsFactory.createSet(initial);
604 else
605 return CollectionsFactory.createSet();
606 }
607
608
609}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/DFSPathFinder.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/DFSPathFinder.java
new file mode 100644
index 00000000..2cec33a2
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/DFSPathFinder.java
@@ -0,0 +1,146 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Abel Hegedus and IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.itc.alg.misc;
10
11import java.util.ArrayList;
12import java.util.Deque;
13import java.util.HashSet;
14import java.util.Iterator;
15import java.util.LinkedList;
16import java.util.List;
17import java.util.Set;
18
19import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
20import tools.refinery.viatra.runtime.rete.itc.igraph.ITcDataSource;
21import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
22
23/**
24 * A depth-first search implementation of the {@link IGraphPathFinder}.
25 *
26 * TODO use ITC to filter nodes that must be traversed, instead of checks
27 *
28 * @author Abel Hegedus
29 *
30 * @param <V>
31 * the node type of the graph
32 */
33public class DFSPathFinder<V> implements IGraphPathFinder<V> {
34
35 private IGraphDataSource<V> graph;
36 private ITcDataSource<V> itc;
37
38 public DFSPathFinder(IGraphDataSource<V> graph, ITcDataSource<V> itc) {
39 this.graph = graph;
40 this.itc = itc;
41 }
42
43 @Override
44 public Iterable<Deque<V>> getAllPaths(V sourceNode, V targetNode) {
45 Set<V> endNodes = new HashSet<V>();
46 endNodes.add(targetNode);
47 return getAllPathsToTargets(sourceNode, endNodes);
48 }
49
50 @Override
51 public Iterable<Deque<V>> getAllPathsToTargets(V sourceNode, Set<V> targetNodes) {
52 List<Deque<V>> paths = new ArrayList<Deque<V>>();
53 Deque<V> visited = new LinkedList<V>();
54 Set<V> reachableTargets = new HashSet<V>();
55 for (V targetNode : targetNodes) {
56 if (itc.isReachable(sourceNode, targetNode)) {
57 reachableTargets.add(targetNode);
58 }
59 }
60 if (!reachableTargets.isEmpty()) {
61 return paths;
62 }
63 visited.add(sourceNode);
64 return getPaths(paths, visited, reachableTargets);
65 }
66
67 protected Iterable<Deque<V>> getPaths(List<Deque<V>> paths, Deque<V> visited, Set<V> targetNodes) {
68 IMemoryView<V> nodes = graph.getTargetNodes(visited.getLast());
69 // examine adjacent nodes
70 for (V node : nodes.distinctValues()) {
71 if (visited.contains(node)) {
72 continue;
73 }
74 if (targetNodes.contains(node)) {
75 visited.add(node);
76 // clone visited LinkedList
77 Deque<V> visitedClone = new LinkedList<V>(visited);
78 paths.add(visitedClone);
79 visited.removeLast();
80 break;
81 }
82 }
83
84 // in breadth-first, recursion needs to come after visiting connected nodes
85 for (V node : nodes.distinctValues()) {
86 if (visited.contains(node) || targetNodes.contains(node)) {
87 continue;
88 }
89 boolean canReachTarget = false;
90 for (V target : targetNodes) {
91 if (itc.isReachable(node, target)) {
92 canReachTarget = true;
93 break;
94 }
95 }
96 if (canReachTarget) {
97 visited.addLast(node);
98 getPaths(paths, visited, targetNodes);
99 visited.removeLast();
100 }
101 }
102
103 return paths;
104 }
105
106 public String printPaths(List<Deque<V>> paths) {
107 StringBuilder sb = new StringBuilder();
108 for (Deque<V> visited : paths) {
109 sb.append("Path: ");
110 for (V node : visited) {
111 sb.append(node);
112 sb.append(" --> ");
113 }
114 sb.append("\n");
115 }
116 return sb.toString();
117 }
118
119 @Override
120 public Deque<V> getPath(V sourceNode, V targetNode) {
121 // TODO optimize
122 Iterable<Deque<V>> allPaths = getAllPaths(sourceNode, targetNode);
123 Iterator<Deque<V>> pathIterator = allPaths.iterator();
124 return pathIterator.hasNext() ? pathIterator.next() : new LinkedList<V>();
125 }
126
127 @Override
128 public Iterable<Deque<V>> getShortestPaths(V sourceNode, V targetNode) {
129 // TODO optimize
130 Iterable<Deque<V>> allPaths = getAllPaths(sourceNode, targetNode);
131 List<Deque<V>> shortestPaths = new ArrayList<Deque<V>>();
132 int shortestPathLength = -1;
133 for (Deque<V> path : allPaths) {
134 int pathLength = path.size();
135 if (shortestPathLength == -1 || pathLength < shortestPathLength) {
136 shortestPaths.clear();
137 shortestPathLength = pathLength;
138 }
139 if (pathLength == shortestPathLength) {
140 shortestPaths.add(path);
141 }
142 }
143 return shortestPaths;
144 }
145
146}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Edge.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Edge.java
new file mode 100644
index 00000000..862c99b3
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Edge.java
@@ -0,0 +1,38 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc;
11
12public class Edge<V> {
13 private V source;
14 private V target;
15
16 public Edge(V source, V target) {
17 super();
18 this.source = source;
19 this.target = target;
20 }
21
22 public V getSource() {
23 return source;
24 }
25
26 public void setSource(V source) {
27 this.source = source;
28 }
29
30 public V getTarget() {
31 return target;
32 }
33
34 public void setTarget(V target) {
35 this.target = target;
36 }
37
38}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/GraphHelper.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/GraphHelper.java
new file mode 100644
index 00000000..b79e4d45
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/GraphHelper.java
@@ -0,0 +1,169 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.itc.alg.misc;
10
11import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
12import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
13import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalGraphDataSource;
14import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
15
16import java.util.*;
17import java.util.Map.Entry;
18
19/**
20 * Utility class for graph related operations.
21 *
22 * @author Tamas Szabo
23 */
24public class GraphHelper {
25
26 private GraphHelper() {/*Utility class constructor*/}
27
28 /**
29 * Returns the subgraph from the given {@link IBiDirectionalGraphDataSource} which contains the given set of nodes.
30 *
31 * @param nodesInSubGraph
32 * the nodes that are present in the subgraph
33 * @param graphDataSource
34 * the graph data source for the original graph
35 * @return the subgraph associated to the given nodes
36 */
37 public static <V> Graph<V> getSubGraph(Collection<V> nodesInSubGraph,
38 IBiDirectionalGraphDataSource<V> graphDataSource) {
39 Graph<V> g = new Graph<V>();
40 if (nodesInSubGraph != null) {
41 for (V node : nodesInSubGraph) {
42 g.insertNode(node);
43 }
44
45 for (V node : nodesInSubGraph) {
46 IMemoryView<V> sources = graphDataSource.getSourceNodes(node);
47 for (Entry<V, Integer> entry : sources.entriesWithMultiplicities()) {
48 for (int i = 0; i < entry.getValue(); i++) {
49 V s = entry.getKey();
50 if (nodesInSubGraph.contains(s)) {
51 g.insertEdge(s, node);
52 }
53 }
54 }
55 }
56 }
57
58 return g;
59 }
60
61 /**
62 * Constructs a path between source and target in the given graph. Both the {@link IGraphDataSource} and the set of
63 * nodes are used, this way it is possible to construct a path in a given subgraph.
64 *
65 * The returned {@link List} contains the nodes along the path (this means that there is an edge in the graph
66 * between two consecutive nodes). A self loop (one edge) is indicated with the source node being present two times
67 * in the returned {@link List}.
68 *
69 * @param source
70 * the source node
71 * @param target
72 * the target node
73 * @param nodesInGraph
74 * the nodes that are present in the subgraph
75 * @param graphDataSource
76 * the graph data source
77 * @return the path between the two nodes
78 */
79 public static <V> List<V> constructPath(V source, V target, Set<V> nodesInGraph,
80 IGraphDataSource<V> graphDataSource) {
81 Set<V> visitedNodes = new HashSet<V>();
82 List<V> path = new ArrayList<V>();
83
84 visitedNodes.add(source);
85 path.add(source);
86 V act = source;
87
88 // if source and target are the same node
89 if (source.equals(target) && graphDataSource.getTargetNodes(source).containsNonZero(target)) {
90 // the node will be present in the path two times
91 path.add(source);
92 return path;
93 } else {
94 while (act != null) {
95 V nextNode = getNextNodeToVisit(act, graphDataSource, nodesInGraph, visitedNodes);
96 if (nextNode == null && path.size() > 1) {
97 // needs to backtrack along path
98 // remove the last element in the path because we can't go
99 // anywhere from there
100 path.remove(path.size() - 1);
101 while (nextNode == null && path.size() > 0) {
102 V lastPathElement = path.get(path.size() - 1);
103 nextNode = getNextNodeToVisit(lastPathElement, graphDataSource, nodesInGraph, visitedNodes);
104 if (nextNode == null) {
105 path.remove(path.size() - 1);
106 }
107 }
108 }
109
110 if (nextNode != null) {
111 visitedNodes.add(nextNode);
112 path.add(nextNode);
113 if (nextNode.equals(target)) {
114 return path;
115 }
116 }
117 act = nextNode;
118 }
119 return null;
120 }
121 }
122
123 private static <V> V getNextNodeToVisit(V act, IGraphDataSource<V> graphDataSource, Set<V> nodesInSubGraph,
124 Set<V> visitedNodes) {
125 IMemoryView<V> targetNodes = graphDataSource.getTargetNodes(act);
126 for (Entry<V, Integer> entry : targetNodes.entriesWithMultiplicities()) {
127 for (int i = 0; i < entry.getValue(); i++) {
128 V node = entry.getKey();
129 if (nodesInSubGraph.contains(node) && !visitedNodes.contains(node)) {
130 return node;
131 }
132 }
133 }
134 return null;
135 }
136
137 /**
138 * Returns the number of self-loop edges for the given node.
139 *
140 * @param node
141 * the node
142 * @param graphDataSource
143 * the graph data source
144 * @return the number of self-loop edges
145 */
146 public static <V> int getEdgeCount(V node, IGraphDataSource<V> graphDataSource) {
147 return getEdgeCount(node, node, graphDataSource);
148 }
149
150 /**
151 * Returns the number of edges between the given source and target nodes.
152 *
153 * @param source
154 * the source node
155 * @param target
156 * the target node
157 * @param graphDataSource
158 * the graph data source
159 * @return the number of parallel edges between the two nodes
160 */
161 public static <V> int getEdgeCount(V source, V target, IGraphDataSource<V> graphDataSource) {
162 Integer count = graphDataSource.getTargetNodes(source).getCount(target);
163 if (count == null) {
164 return 0;
165 } else {
166 return count;
167 }
168 }
169}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/IGraphPathFinder.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/IGraphPathFinder.java
new file mode 100644
index 00000000..624f9f7d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/IGraphPathFinder.java
@@ -0,0 +1,67 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.itc.alg.misc;
10
11import java.util.Deque;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.rete.itc.igraph.ITcDataSource;
15
16/**
17 * The path finder provides methods for retrieving paths in a graph between a source node and one or more target nodes.
18 * Use {@link ITcDataSource#getPathFinder()} for instantiating.
19 *
20 * @author Abel Hegedus
21 *
22 * @param <V> the node type of the graph
23 */
24public interface IGraphPathFinder<V> {
25
26 /**
27 * Returns an arbitrary path from the source node to the target node (if such exists). If there is no path
28 * between them, an empty collection is returned.
29 *
30 * @param sourceNode the source node of the path
31 * @param targetNode the target node of the path
32 * @return the path from the source to the target, or empty collection if target is not reachable from source.
33 */
34 Deque<V> getPath(V sourceNode, V targetNode);
35
36 /**
37 * Returns the collection of shortest paths from the source node to the target node (if such exists). If there is no path
38 * between them, an empty collection is returned.
39 *
40 * @param sourceNode the source node of the path
41 * @param targetNode the target node of the path
42 * @return the collection of shortest paths from the source to the target, or empty collection if target is not reachable from source.
43 */
44 Iterable<Deque<V>> getShortestPaths(V sourceNode, V targetNode);
45
46 /**
47 * Returns the collection of paths from the source node to the target node (if such exists). If there is no path
48 * between them, an empty collection is returned.
49 *
50 * @param sourceNode the source node of the path
51 * @param targetNode the target node of the path
52 * @return the collection of paths from the source to the target, or empty collection if target is not reachable from source.
53 */
54 Iterable<Deque<V>> getAllPaths(V sourceNode, V targetNode);
55
56 /**
57 * Returns the collection of paths from the source node to any of the target nodes (if such exists). If there is no path
58 * between them, an empty collection is returned.
59 *
60 * @param sourceNode the source node of the path
61 * @param targetNodes the set of target nodes of the paths
62 * @return the collection of paths from the source to any of the targets, or empty collection if neither target is reachable from source.
63 */
64 Iterable<Deque<V>> getAllPathsToTargets(V sourceNode, Set<V> targetNodes);
65
66
67}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/ITcRelation.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/ITcRelation.java
new file mode 100644
index 00000000..9fd85ae1
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/ITcRelation.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc;
11
12import java.util.Set;
13
14public interface ITcRelation<V> {
15
16 /**
17 * Returns the starting nodes from a transitive closure relation.
18 *
19 * @return the set of starting nodes
20 */
21 public Set<V> getTupleStarts();
22
23 /**
24 * Returns the set of nodes that are reachable from the given node.
25 *
26 * @param start
27 * the starting node
28 * @return the set of reachable nodes
29 */
30 public Set<V> getTupleEnds(V start);
31}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Tuple.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Tuple.java
new file mode 100644
index 00000000..84c79dcf
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/Tuple.java
@@ -0,0 +1,60 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc;
11
12public class Tuple<V> {
13
14 private V source;
15 private V target;
16
17 public Tuple(V source, V target) {
18 super();
19 this.source = source;
20 this.target = target;
21 }
22
23 public V getSource() {
24 return source;
25 }
26
27 public void setSource(V source) {
28 this.source = source;
29 }
30
31 public V getTarget() {
32 return target;
33 }
34
35 public void setTarget(V target) {
36 this.target = target;
37 }
38
39 @Override
40 public String toString() {
41 return "(" + source.toString() + "," + target.toString() + ")";
42 }
43
44 @Override
45 public boolean equals(Object o) {
46 if (o instanceof Tuple) {
47 Tuple<?> t = (Tuple<?>) o;
48
49 if (t.getSource().equals(this.source) && t.getTarget().equals(this.target)) {
50 return true;
51 }
52 }
53 return false;
54 }
55
56 @Override
57 public int hashCode() {
58 return source.hashCode() + target.hashCode();
59 }
60}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/bfs/BFS.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/bfs/BFS.java
new file mode 100644
index 00000000..22ce8962
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/bfs/BFS.java
@@ -0,0 +1,148 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc.bfs;
11
12import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalGraphDataSource;
13import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
14
15import java.util.*;
16
17public class BFS<V> {
18
19 private BFS() {/*Utility class constructor*/}
20
21 /**
22 * Performs a breadth first search on the given graph to determine whether source is reachable from target.
23 *
24 * @param <V>
25 * the type parameter of the nodes in the graph
26 * @param source
27 * the source node
28 * @param target
29 * the target node
30 * @param graph
31 * the graph data source
32 * @return true if source is reachable from target, false otherwise
33 */
34 public static <V> boolean isReachable(V source, V target, IGraphDataSource<V> graph) {
35 Deque<V> nodeQueue = new ArrayDeque<V>();
36 Set<V> visited = new HashSet<V>();
37
38 nodeQueue.add(source);
39 visited.add(source);
40
41 boolean ret = _isReachable(target, graph, nodeQueue, visited);
42 return ret;
43 }
44
45 private static <V> boolean _isReachable(V target, IGraphDataSource<V> graph, Deque<V> nodeQueue, Set<V> visited) {
46
47 while (!nodeQueue.isEmpty()) {
48 V node = nodeQueue.removeFirst();
49 for (V t : graph.getTargetNodes(node).distinctValues()){
50 if (t.equals(target)) {
51 return true;
52 }
53 if (!visited.contains(t)) {
54 visited.add(t);
55 nodeQueue.addLast(t);
56 }
57 }
58 }
59 return false;
60 }
61
62 public static <V> Set<V> reachableSources(IBiDirectionalGraphDataSource<V> graph, V target) {
63 Set<V> retSet = new HashSet<V>();
64 retSet.add(target);
65 Deque<V> nodeQueue = new ArrayDeque<V>();
66 nodeQueue.add(target);
67
68 _reachableSources(graph, nodeQueue, retSet);
69
70 return retSet;
71 }
72
73 private static <V> void _reachableSources(IBiDirectionalGraphDataSource<V> graph, Deque<V> nodeQueue,
74 Set<V> retSet) {
75 while (!nodeQueue.isEmpty()) {
76 V node = nodeQueue.removeFirst();
77 for (V _node : graph.getSourceNodes(node).distinctValues()) {
78 if (!retSet.contains(_node)) {
79 retSet.add(_node);
80 nodeQueue.addLast(_node);
81 }
82 }
83 }
84 }
85
86 public static <V> Set<V> reachableTargets(IGraphDataSource<V> graph, V source) {
87 Set<V> retSet = new HashSet<V>();
88 retSet.add(source);
89 Deque<V> nodeQueue = new ArrayDeque<V>();
90 nodeQueue.add(source);
91
92 _reachableTargets(graph, nodeQueue, retSet);
93
94 return retSet;
95 }
96
97 private static <V> void _reachableTargets(IGraphDataSource<V> graph, Deque<V> nodeQueue, Set<V> retSet) {
98 while (!nodeQueue.isEmpty()) {
99 V node = nodeQueue.removeFirst();
100
101 for (V _node : graph.getTargetNodes(node).distinctValues()) {
102
103 if (!retSet.contains(_node)) {
104 retSet.add(_node);
105 nodeQueue.addLast(_node);
106 }
107 }
108 }
109 }
110
111 /**
112 * Performs a breadth first search on the given graph and collects all the nodes along the path from source to
113 * target if such path exists.
114 *
115 * @param <V>
116 * the type parameter of the nodes in the graph
117 * @param source
118 * the source node
119 * @param target
120 * the target node
121 * @param graph
122 * the graph data source
123 * @return the set of nodes along the path
124 */
125 public static <V> Set<V> collectNodesAlongPath(V source, V target, IGraphDataSource<V> graph) {
126 Set<V> path = new HashSet<V>();
127 _collectNodesAlongPath(source, target, graph, path);
128 return path;
129 }
130
131 private static <V> boolean _collectNodesAlongPath(V node, V target, IGraphDataSource<V> graph, Set<V> path) {
132
133 boolean res = false;
134
135 // end recursion
136 if (node.equals(target)) {
137 path.add(node);
138 return true;
139 } else {
140 for (V _nodeT : graph.getTargetNodes(node).distinctValues()) {
141 res = (_collectNodesAlongPath(_nodeT, target, graph, path)) || res;
142 }
143 if (res)
144 path.add(node);
145 return res;
146 }
147 }
148}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/PKAlg.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/PKAlg.java
new file mode 100644
index 00000000..892d048e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/PKAlg.java
@@ -0,0 +1,179 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc.scc;
11
12import java.util.ArrayList;
13import java.util.Collections;
14import java.util.HashMap;
15import java.util.List;
16import java.util.Map;
17
18import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalGraphDataSource;
19import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalWrapper;
20import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
21import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphObserver;
22
23public class PKAlg<V> implements IGraphObserver<V> {
24
25 /**
26 * Maps the nodes to their indicies.
27 */
28 private Map<V, Integer> node2index;
29 private Map<Integer, V> index2node;
30 private Map<V, Boolean> node2mark;
31
32 /**
33 * Maps the index of a node to the index in the topsort.
34 */
35 private Map<Integer, Integer> index2topsort;
36 private Map<Integer, Integer> topsort2index;
37
38 /**
39 * Index associated to the inserted nodes (incrementing with every insertion).
40 */
41 private int index;
42
43 /**
44 * Index within the topsort for the target node when edge insertion occurs.
45 */
46 private int lower_bound;
47
48 /**
49 * Index within the topsort for the source node when edge insertion occurs.
50 */
51 private int upper_bound;
52
53 private List<V> RF;
54 private List<V> RB;
55 private IBiDirectionalGraphDataSource<V> gds;
56
57 public PKAlg(IGraphDataSource<V> gds) {
58 if (gds instanceof IBiDirectionalGraphDataSource<?>) {
59 this.gds = (IBiDirectionalGraphDataSource<V>) gds;
60 } else {
61 this.gds = new IBiDirectionalWrapper<V>(gds);
62 }
63
64 node2mark = new HashMap<V, Boolean>();
65 node2index = new HashMap<V, Integer>();
66 index2node = new HashMap<Integer, V>();
67 index2topsort = new HashMap<Integer, Integer>();
68 topsort2index = new HashMap<Integer, Integer>();
69 index = 0;
70
71 gds.attachObserver(this);
72 }
73
74 @Override
75 public void edgeInserted(V source, V target) {
76
77 RF = new ArrayList<V>();
78 RB = new ArrayList<V>();
79
80 lower_bound = index2topsort.get(node2index.get(target));
81 upper_bound = index2topsort.get(node2index.get(source));
82
83 if (lower_bound < upper_bound) {
84 dfsForward(target);
85 dfsBackward(source);
86 reorder();
87 }
88 }
89
90 private List<Integer> getIndicies(List<V> list) {
91 List<Integer> indicies = new ArrayList<Integer>();
92
93 for (V n : list)
94 indicies.add(index2topsort.get(node2index.get(n)));
95
96 return indicies;
97 }
98
99 private void reorder() {
100
101 Collections.reverse(RB);
102
103 // azon csomopontok indexei amelyek sorrendje nem jo
104 List<Integer> L = getIndicies(RF);
105 L.addAll(getIndicies(RB));
106 Collections.sort(L);
107
108 for (int i = 0; i < RB.size(); i++) {
109 index2topsort.put(node2index.get(RB.get(i)), L.get(i));
110 topsort2index.put(L.get(i), node2index.get(RB.get(i)));
111 }
112
113 for (int i = 0; i < RF.size(); i++) {
114 index2topsort.put(node2index.get(RF.get(i)), L.get(i + RB.size()));
115 topsort2index.put(L.get(i + RB.size()), node2index.get(RF.get(i)));
116 }
117 }
118
119 @SuppressWarnings("unused")
120 private List<V> getTopSort() {
121 List<V> topsort = new ArrayList<V>();
122
123 for (int i : topsort2index.values()) {
124 topsort.add(index2node.get(i));
125 }
126
127 return topsort;
128 }
129
130 private void dfsBackward(V node) {
131 node2mark.put(node, true);
132 RB.add(node);
133
134 for (V sn : gds.getSourceNodes(node).distinctValues()) {
135 int top_id = index2topsort.get(node2index.get(sn));
136
137 if (!node2mark.get(sn) && lower_bound < top_id)
138 dfsBackward(sn);
139 }
140 }
141
142 private void dfsForward(V node) {
143 node2mark.put(node, true);
144 RF.add(node);
145
146 for (V tn : gds.getTargetNodes(node).distinctValues()) {
147 int top_id = index2topsort.get(node2index.get(tn));
148
149 if (top_id == upper_bound)
150 System.out.println("!!!Cycle detected!!!");
151 else if (!node2mark.get(tn) && top_id < upper_bound)
152 dfsForward(tn);
153 }
154 }
155
156 @Override
157 public void edgeDeleted(V source, V target) {
158 // Edge deletion does not affect topsort
159 }
160
161 @Override
162 public void nodeInserted(V n) {
163 node2mark.put(n, false);
164 node2index.put(n, index);
165 index2node.put(index, n);
166 index2topsort.put(index, index);
167 topsort2index.put(index, index);
168 index++;
169 }
170
171 @Override
172 public void nodeDeleted(V n) {
173 node2mark.remove(n);
174 int node_id = node2index.remove(n);
175 index2node.remove(node_id);
176 int top_id = index2topsort.remove(node_id);
177 topsort2index.remove(top_id);
178 }
179}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCC.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCC.java
new file mode 100644
index 00000000..de070839
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCC.java
@@ -0,0 +1,143 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc.scc;
11
12import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
13import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
14
15import java.util.*;
16
17/**
18 * Efficient algorithms to compute the Strongly Connected Components in a directed graph.
19 *
20 * @author Tamas Szabo
21 *
22 * @param <V>
23 * the type parameter of the nodes in the graph
24 */
25public class SCC<V> {
26
27 private SCC() {/*Utility class constructor*/}
28
29 public static long sccId = 0;
30
31 /**
32 * Computes the SCCs for the given graph and returns them as a multiset. (Iterative version of Tarjan's algorithm)
33 *
34 * @param g
35 * the directed graph data source
36 * @return the set of SCCs
37 */
38 public static <V> SCCResult<V> computeSCC(IGraphDataSource<V> g) {
39 int index = 0;
40 Set<Set<V>> ret = new HashSet<Set<V>>();
41
42 // stores the lowlink and index information for the given node
43 Map<V, SCCProperty> nodeMap = CollectionsFactory.createMap();
44
45 // stores all target nodes of a given node - the list will be modified
46 Map<V, Set<V>> targetNodeMap = CollectionsFactory.createMap();
47
48 // stores those target nodes for a given node which have not been visited
49 Map<V, Set<V>> notVisitedMap = CollectionsFactory.createMap();
50
51 // stores the nodes during the traversal
52 Deque<V> nodeStack = new ArrayDeque<V>();
53
54 // stores the nodes which belong to an scc (there can be many sccs in the stack at the same time)
55 Deque<V> sccStack = new ArrayDeque<V>();
56
57 boolean sink = false, finishedTraversal = true;
58
59 // initialize all nodes with 0 index and 0 lowlink
60 Set<V> allNodes = g.getAllNodes();
61 for (V n : allNodes) {
62 nodeMap.put(n, new SCCProperty(0, 0));
63 }
64
65 for (V n : allNodes) {
66 // if the node has not been visited yet
67 if (nodeMap.get(n).getIndex() == 0) {
68 nodeStack.push(n);
69
70 while (!nodeStack.isEmpty()) {
71 V currentNode = nodeStack.peekLast();
72 sink = false;
73 finishedTraversal = false;
74 SCCProperty prop = nodeMap.get(currentNode);
75
76 if (nodeMap.get(currentNode).getIndex() == 0) {
77 index++;
78 sccStack.addLast(currentNode);
79 prop.setIndex(index);
80 prop.setLowlink(index);
81
82 notVisitedMap.put(currentNode, new HashSet<V>());
83
84 // storing the target nodes of the actual node
85 if (g.getTargetNodes(currentNode) != null) {
86 Set<V> targets = g.getTargetNodes(currentNode).distinctValues();
87 targetNodeMap.put(currentNode, CollectionsFactory.createSet(targets));
88 }
89 }
90
91 if (targetNodeMap.get(currentNode) != null) {
92
93 // remove node from stack, the exploration of its children has finished
94 if (targetNodeMap.get(currentNode).size() == 0) {
95 targetNodeMap.remove(currentNode);
96
97 nodeStack.removeLast();
98
99 for (V targetNode : g.getTargetNodes(currentNode).distinctValues()) {
100 if (notVisitedMap.get(currentNode).contains(targetNode)) {
101 prop.setLowlink(Math.min(prop.getLowlink(), nodeMap.get(targetNode).getLowlink()));
102 } else if (sccStack.contains(targetNode)) {
103 prop.setLowlink(Math.min(prop.getLowlink(), nodeMap.get(targetNode).getIndex()));
104 }
105 }
106
107 finishedTraversal = true;
108 } else {
109 V targetNode = targetNodeMap.get(currentNode).iterator().next();
110 targetNodeMap.get(currentNode).remove(targetNode);
111 // if the targetNode has not yet been visited push it to the stack
112 // and mark it in the notVisitedMap
113 if (nodeMap.get(targetNode).getIndex() == 0) {
114 notVisitedMap.get(currentNode).add(targetNode);
115 nodeStack.addLast(targetNode);
116 }
117 }
118 }
119 // if currentNode has no target nodes
120 else {
121 nodeStack.removeLast();
122 sink = true;
123 }
124
125 // create scc if node is a sink or an scc has been found
126 if ((sink || finishedTraversal) && (prop.getLowlink() == prop.getIndex())) {
127 Set<V> sc = new HashSet<V>();
128 V targetNode = null;
129
130 do {
131 targetNode = sccStack.removeLast();
132 sc.add(targetNode);
133 } while (!targetNode.equals(currentNode));
134
135 ret.add(sc);
136 }
137 }
138 }
139 }
140
141 return new SCCResult<V>(ret, g);
142 }
143}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCProperty.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCProperty.java
new file mode 100644
index 00000000..51ee834e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCProperty.java
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc.scc;
11
12public class SCCProperty {
13 private int index;
14 private int lowlink;
15
16 public SCCProperty(int index, int lowlink) {
17 super();
18 this.index = index;
19 this.lowlink = lowlink;
20 }
21
22 public int getIndex() {
23 return index;
24 }
25
26 public void setIndex(int index) {
27 this.index = index;
28 }
29
30 public int getLowlink() {
31 return lowlink;
32 }
33
34 public void setLowlink(int lowlink) {
35 this.lowlink = lowlink;
36 }
37}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCResult.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCResult.java
new file mode 100644
index 00000000..2e511fd6
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/scc/SCCResult.java
@@ -0,0 +1,81 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc.scc;
11
12import java.util.Map.Entry;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
16
17public class SCCResult<V> {
18
19 private Set<Set<V>> sccs;
20 private IGraphDataSource<V> gds;
21
22 public SCCResult(Set<Set<V>> sccs, IGraphDataSource<V> gds) {
23 this.sccs = sccs;
24 this.gds = gds;
25 }
26
27 public Set<Set<V>> getSccs() {
28 return sccs;
29 }
30
31 public int getSCCCount() {
32 return sccs.size();
33 }
34
35 public double getAverageNodeCount() {
36 double a = 0;
37
38 for (Set<V> s : sccs) {
39 a += s.size();
40 }
41
42 return a / sccs.size();
43 }
44
45 public double getAverageEdgeCount() {
46 long edgeSum = 0;
47
48 for (Set<V> scc : sccs) {
49 for (V source : scc) {
50 for (Entry<V, Integer> entry : gds.getTargetNodes(source).entriesWithMultiplicities()) {
51 if (scc.contains(entry.getKey())) {
52 edgeSum += entry.getValue();
53 }
54 }
55 }
56 }
57
58 return (double) edgeSum / (double) sccs.size();
59 }
60
61 public int getBiggestSCCSize() {
62 int max = 0;
63
64 for (Set<V> scc : sccs) {
65 if (scc.size() > max)
66 max = scc.size();
67 }
68
69 return max;
70 }
71
72 public long getSumOfSquares() {
73 long sum = 0;
74
75 for (Set<V> scc : sccs) {
76 sum += scc.size() * scc.size();
77 }
78
79 return sum;
80 }
81}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/topsort/TopologicalSorting.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/topsort/TopologicalSorting.java
new file mode 100644
index 00000000..89be6804
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/misc/topsort/TopologicalSorting.java
@@ -0,0 +1,73 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.alg.misc.topsort;
11
12import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
13
14import java.util.*;
15
16/**
17 * @since 1.6
18 */
19public class TopologicalSorting {
20
21 private TopologicalSorting() {/*Utility class constructor*/}
22
23 private static final class Pair<T> {
24 public T element;
25 public boolean isParent;
26
27 public Pair(final T element, final boolean isParent) {
28 this.element = element;
29 this.isParent = isParent;
30 }
31 }
32
33 /**
34 * Returns a topological ordering for the given graph data source.
35 * Output format: if there is an a -> b (transitive) reachability, then node <code>a</code> will come before node <code>b</code> in the resulting list.
36 *
37 * @param gds the graph data source
38 * @return a topological ordering
39 */
40 public static <T> List<T> compute(final IGraphDataSource<T> gds) {
41 final Set<T> visited = new HashSet<T>();
42 final LinkedList<T> result = new LinkedList<T>();
43 final Deque<Pair<T>> dfsStack = new ArrayDeque<Pair<T>>();
44
45 for (final T node : gds.getAllNodes()) {
46 if (!visited.contains(node)) {
47 dfsStack.addLast(new Pair<T>(node, false));
48 }
49
50 while (!dfsStack.isEmpty()) {
51 final Pair<T> head = dfsStack.removeLast();
52 final T source = head.element;
53
54 if (head.isParent) {
55 // we have already seen source, push it to the resulting stack
56 result.addFirst(source);
57 } else {
58 // first time we see source, continue with its children
59 visited.add(source);
60 dfsStack.addLast(new Pair<T>(source, true));
61
62 for (final T target : gds.getTargetNodes(source).distinctValues()) {
63 if (!visited.contains(target)) {
64 dfsStack.addLast(new Pair<T>(target, false));
65 }
66 }
67 }
68 }
69 }
70
71 return result;
72 }
73}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeElectionAlgorithm.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeElectionAlgorithm.java
new file mode 100644
index 00000000..794dabc0
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeElectionAlgorithm.java
@@ -0,0 +1,174 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime.rete.itc.alg.representative;
7
8import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
9import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphObserver;
10import tools.refinery.viatra.runtime.matchers.util.Direction;
11
12import java.util.HashMap;
13import java.util.HashSet;
14import java.util.Map;
15import java.util.Set;
16
17public abstract class RepresentativeElectionAlgorithm implements IGraphObserver<Object> {
18 protected final Graph<Object> graph;
19 protected final Map<Object, Object> representatives = new HashMap<>();
20 protected final Map<Object, Set<Object>> components = new HashMap<>();
21 private RepresentativeObserver observer;
22
23 protected RepresentativeElectionAlgorithm(Graph<Object> graph) {
24 this.graph = graph;
25 initializeComponents();
26 graph.attachObserver(this);
27 }
28
29 protected abstract void initializeComponents();
30
31 protected void initializeSet(Set<Object> set) {
32 var iterator = set.iterator();
33 if (!iterator.hasNext()) {
34 // Set is empty.
35 return;
36 }
37 var representative = iterator.next();
38 for (var node : set) {
39 var oldRepresentative = representatives.put(node, representative);
40 if (oldRepresentative != null && !representative.equals(oldRepresentative)) {
41 throw new IllegalStateException("Node %s is already in a set represented by %s, cannot add it to %s"
42 .formatted(node, oldRepresentative, set));
43 }
44 }
45 components.put(representative, set);
46 }
47
48 protected void merge(Set<Object> toMerge) {
49 if (toMerge.isEmpty()) {
50 return;
51 }
52 var representativesToMerge = new HashSet<>();
53 Object bestRepresentative = null;
54 Set<Object> bestSet = null;
55 for (var object : toMerge) {
56 var representative = getRepresentative(object);
57 if (representativesToMerge.add(representative)) {
58 var component = getComponent(representative);
59 if (bestSet == null || bestSet.size() < component.size()) {
60 bestRepresentative = representative;
61 bestSet = component;
62 }
63 }
64 }
65 if (bestRepresentative == null) {
66 throw new AssertionError("Could not determine best representative");
67 }
68 for (var representative : representativesToMerge) {
69 if (!bestRepresentative.equals(representative)) {
70 components.remove(representative);
71 }
72 }
73 components.put(bestRepresentative, toMerge);
74 for (var object : toMerge) {
75 var previousRepresentative = representatives.put(object, bestRepresentative);
76 if (!bestSet.contains(object)) {
77 notifyToObservers(object, previousRepresentative, bestRepresentative);
78 }
79 }
80 }
81
82 protected void merge(Object leftRepresentative, Object rightRepresentative) {
83 if (leftRepresentative.equals(rightRepresentative)) {
84 return;
85 }
86 var leftSet = getComponent(leftRepresentative);
87 var rightSet = getComponent(rightRepresentative);
88 if (leftSet.size() < rightSet.size()) {
89 merge(rightRepresentative, rightSet, leftRepresentative, leftSet);
90 } else {
91 merge(leftRepresentative, leftSet, rightRepresentative, rightSet);
92 }
93 }
94
95 private void merge(Object preservedRepresentative, Set<Object> preservedSet, Object removedRepresentative,
96 Set<Object> removedSet) {
97 components.remove(removedRepresentative);
98 for (var node : removedSet) {
99 representatives.put(node, preservedRepresentative);
100 preservedSet.add(node);
101 notifyToObservers(node, removedRepresentative, preservedRepresentative);
102 }
103 }
104
105 protected void assignNewRepresentative(Object oldRepresentative, Set<Object> set) {
106 var iterator = set.iterator();
107 if (!iterator.hasNext()) {
108 return;
109 }
110 var newRepresentative = iterator.next();
111 components.put(newRepresentative, set);
112 for (var node : set) {
113 var oldRepresentativeOfNode = representatives.put(node, newRepresentative);
114 if (!oldRepresentative.equals(oldRepresentativeOfNode)) {
115 throw new IllegalArgumentException("Node %s was not represented by %s but by %s"
116 .formatted(node, oldRepresentative, oldRepresentativeOfNode));
117 }
118 notifyToObservers(node, oldRepresentative, newRepresentative);
119 }
120 }
121
122 public void setObserver(RepresentativeObserver observer) {
123 this.observer = observer;
124 }
125
126 public Map<Object, Set<Object>> getComponents() {
127 return components;
128 }
129
130 public Object getRepresentative(Object node) {
131 return representatives.get(node);
132 }
133
134 public Set<Object> getComponent(Object representative) {
135 return components.get(representative);
136 }
137
138 public void dispose() {
139 graph.detachObserver(this);
140 }
141
142 @Override
143 public void nodeInserted(Object n) {
144 var component = new HashSet<>(1);
145 component.add(n);
146 initializeSet(component);
147 notifyToObservers(n, n, Direction.INSERT);
148 }
149
150 @Override
151 public void nodeDeleted(Object n) {
152 var representative = representatives.remove(n);
153 if (!representative.equals(n)) {
154 throw new IllegalStateException("Trying to delete node with dangling edges");
155 }
156 components.remove(representative);
157 notifyToObservers(n, representative, Direction.DELETE);
158 }
159
160 protected void notifyToObservers(Object node, Object oldRepresentative, Object newRepresentative) {
161 notifyToObservers(node, oldRepresentative, Direction.DELETE);
162 notifyToObservers(node, newRepresentative, Direction.INSERT);
163 }
164
165 protected void notifyToObservers(Object node, Object representative, Direction direction) {
166 if (observer != null) {
167 observer.tupleChanged(node, representative, direction);
168 }
169 }
170
171 public interface Factory {
172 RepresentativeElectionAlgorithm create(Graph<Object> graph);
173 }
174}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeObserver.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeObserver.java
new file mode 100644
index 00000000..6b772fa8
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/RepresentativeObserver.java
@@ -0,0 +1,12 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime.rete.itc.alg.representative;
7
8import tools.refinery.viatra.runtime.matchers.util.Direction;
9
10public interface RepresentativeObserver {
11 void tupleChanged(Object node, Object representative, Direction direction);
12}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/StronglyConnectedComponentAlgorithm.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/StronglyConnectedComponentAlgorithm.java
new file mode 100644
index 00000000..0463301b
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/StronglyConnectedComponentAlgorithm.java
@@ -0,0 +1,69 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime.rete.itc.alg.representative;
7
8import tools.refinery.viatra.runtime.rete.itc.alg.misc.GraphHelper;
9import tools.refinery.viatra.runtime.rete.itc.alg.misc.bfs.BFS;
10import tools.refinery.viatra.runtime.rete.itc.alg.misc.scc.SCC;
11import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
12
13import java.util.Collection;
14import java.util.Set;
15
16public class StronglyConnectedComponentAlgorithm extends RepresentativeElectionAlgorithm {
17 public StronglyConnectedComponentAlgorithm(Graph<Object> graph) {
18 super(graph);
19 }
20
21 @Override
22 protected void initializeComponents() {
23 var computedSCCs = SCC.computeSCC(graph).getSccs();
24 for (var computedSCC : computedSCCs) {
25 initializeSet(computedSCC);
26 }
27 }
28
29 @Override
30 public void edgeInserted(Object source, Object target) {
31 var sourceRoot = getRepresentative(source);
32 var targetRoot = getRepresentative(target);
33 if (sourceRoot.equals(targetRoot)) {
34 // New edge does not change strongly connected components.
35 return;
36 }
37 if (BFS.isReachable(target, source, graph)) {
38 var sources = BFS.reachableSources(graph, target);
39 var targets = BFS.reachableTargets(graph, source);
40 sources.retainAll(targets);
41 merge(sources);
42 }
43 }
44
45 @Override
46 public void edgeDeleted(Object source, Object target) {
47 var sourceRoot = getRepresentative(source);
48 var targetRoot = getRepresentative(target);
49 if (!sourceRoot.equals(targetRoot)) {
50 // New edge does not change strongly connected components.
51 return;
52 }
53 var component = GraphHelper.getSubGraph(getComponent(sourceRoot), graph);
54 if (!BFS.isReachable(source, target, component)) {
55 var newSCCs = SCC.computeSCC(component).getSccs();
56 split(sourceRoot, newSCCs);
57 }
58 }
59
60 private void split(Object preservedRepresentative, Collection<? extends Set<Object>> sets) {
61 for (var set : sets) {
62 if (set.contains(preservedRepresentative)) {
63 components.put(preservedRepresentative, set);
64 } else {
65 assignNewRepresentative(preservedRepresentative, set);
66 }
67 }
68 }
69}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/WeaklyConnectedComponentAlgorithm.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/WeaklyConnectedComponentAlgorithm.java
new file mode 100644
index 00000000..704f0235
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/representative/WeaklyConnectedComponentAlgorithm.java
@@ -0,0 +1,85 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime.rete.itc.alg.representative;
7
8import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
9
10import java.util.ArrayDeque;
11import java.util.HashSet;
12import java.util.Set;
13
14public class WeaklyConnectedComponentAlgorithm extends RepresentativeElectionAlgorithm {
15 public WeaklyConnectedComponentAlgorithm(Graph<Object> graph) {
16 super(graph);
17 }
18
19 @Override
20 protected void initializeComponents() {
21 for (var node : graph.getAllNodes()) {
22 if (representatives.containsKey(node)) {
23 continue;
24 }
25 var reachable = getReachableNodes(node);
26 initializeSet(reachable);
27 }
28 }
29
30 @Override
31 public void edgeInserted(Object source, Object target) {
32 var sourceRoot = getRepresentative(source);
33 var targetRoot = getRepresentative(target);
34 merge(sourceRoot, targetRoot);
35 }
36
37 @Override
38 public void edgeDeleted(Object source, Object target) {
39 var sourceRoot = getRepresentative(source);
40 var targetRoot = getRepresentative(target);
41 if (!sourceRoot.equals(targetRoot)) {
42 throw new IllegalArgumentException("Trying to remove edge not in graph");
43 }
44 var targetReachable = getReachableNodes(target);
45 if (!targetReachable.contains(source)) {
46 split(sourceRoot, targetReachable);
47 }
48 }
49
50 private void split(Object sourceRepresentative, Set<Object> targetReachable) {
51 var sourceComponent = getComponent(sourceRepresentative);
52 sourceComponent.removeAll(targetReachable);
53 if (targetReachable.contains(sourceRepresentative)) {
54 components.put(sourceRepresentative, targetReachable);
55 assignNewRepresentative(sourceRepresentative, sourceComponent);
56 } else {
57 assignNewRepresentative(sourceRepresentative, targetReachable);
58 }
59 }
60
61 private Set<Object> getReachableNodes(Object source) {
62 var retSet = new HashSet<>();
63 retSet.add(source);
64 var nodeQueue = new ArrayDeque<>();
65 nodeQueue.addLast(source);
66
67 while (!nodeQueue.isEmpty()) {
68 var node = nodeQueue.removeFirst();
69 for (var neighbor : graph.getTargetNodes(node).distinctValues()) {
70 if (!retSet.contains(neighbor)) {
71 retSet.add(neighbor);
72 nodeQueue.addLast(neighbor);
73 }
74 }
75 for (var neighbor : graph.getSourceNodes(node).distinctValues()) {
76 if (!retSet.contains(neighbor)) {
77 retSet.add(neighbor);
78 nodeQueue.addLast(neighbor);
79 }
80 }
81 }
82
83 return retSet;
84 }
85}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/util/CollectionHelper.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/util/CollectionHelper.java
new file mode 100644
index 00000000..6655be6d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/alg/util/CollectionHelper.java
@@ -0,0 +1,64 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.itc.alg.util;
10
11import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
12
13import java.util.Set;
14
15/**
16 * @author Tamas Szabo
17 *
18 */
19public class CollectionHelper {
20
21 private CollectionHelper() {/*Utility class constructor*/}
22
23 /**
24 * Returns the intersection of two sets. It calls {@link Set#retainAll(java.util.Collection)} but returns a new set
25 * containing the elements of the intersection.
26 *
27 * @param set1
28 * the first set (can be null, interpreted as empty)
29 * @param set2
30 * the second set (can be null, interpreted as empty)
31 * @return the intersection of the sets
32 * @since 1.7
33 */
34 public static <V> Set<V> intersection(Set<V> set1, Set<V> set2) {
35 if (set1 == null || set2 == null)
36 return CollectionsFactory.createSet();
37
38 Set<V> intersection = CollectionsFactory.createSet(set1);
39 intersection.retainAll(set2);
40 return intersection;
41 }
42
43
44 /**
45 * Returns the difference of two sets (S1\S2). It calls {@link Set#removeAll(java.util.Collection)} but returns a
46 * new set containing the elements of the difference.
47 *
48 * @param set1
49 * the first set (can be null, interpreted as empty)
50 * @param set2
51 * the second set (can be null, interpreted as empty)
52 * @return the difference of the sets
53 * @since 1.7
54 */
55 public static <V> Set<V> difference(Set<V> set1, Set<V> set2) {
56 if (set1 == null)
57 return CollectionsFactory.createSet();
58
59 Set<V> difference = CollectionsFactory.createSet(set1);
60 if (set2 != null) difference.removeAll(set2);
61 return difference;
62 }
63
64}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/DotGenerator.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/DotGenerator.java
new file mode 100644
index 00000000..f7f6b5ed
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/DotGenerator.java
@@ -0,0 +1,160 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.itc.graphimpl;
10
11import tools.refinery.viatra.runtime.rete.itc.alg.misc.scc.SCC;
12import tools.refinery.viatra.runtime.rete.itc.alg.misc.scc.SCCResult;
13import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
14
15import java.util.HashMap;
16import java.util.Map;
17import java.util.Set;
18import java.util.function.Function;
19
20/**
21 * This class contains utility methods to generate dot representations for {@link Graph} instances.
22 *
23 * @author Tamas Szabo
24 * @since 2.3
25 */
26public class DotGenerator {
27
28 private static final String[] colors = new String[] { "yellow", "blue", "red", "green", "gray", "cyan" };
29
30 private DotGenerator() {
31
32 }
33
34 /**
35 * Generates the dot representation for the given graph.
36 *
37 * @param graph
38 * the graph
39 * @param colorSCCs
40 * specifies if the strongly connected components with size greater than shall be colored
41 * @param nameFunction
42 * use this function to provide custom names to nodes, null if the default toString shall be used
43 * @param colorFunction
44 * use this function to provide custom color to nodes, null if the default white color shall be used
45 * @param edgeFunction
46 * use this function to provide custom edge labels, null if no edge label shall be printed
47 * @return the dot representation as a string
48 */
49 public static <V> String generateDot(final Graph<V> graph, final boolean colorSCCs,
50 final Function<V, String> nameFunction, final Function<V, String> colorFunction,
51 final Function<V, Function<V, String>> edgeFunction) {
52 final Map<V, String> colorMap = new HashMap<V, String>();
53
54 if (colorSCCs) {
55 final SCCResult<V> result = SCC.computeSCC(graph);
56 final Set<Set<V>> sccs = result.getSccs();
57
58 int i = 0;
59 for (final Set<V> scc : sccs) {
60 if (scc.size() > 1) {
61 for (final V node : scc) {
62 final String color = colorMap.get(node);
63 if (color == null) {
64 colorMap.put(node, colors[i % colors.length]);
65 } else {
66 colorMap.put(node, colorMap.get(node) + ":" + colors[i % colors.length]);
67 }
68 }
69 i++;
70 }
71 }
72
73 // if a node has no color yet, then make it white
74 for (final V node : graph.getAllNodes()) {
75 if (!colorMap.containsKey(node)) {
76 colorMap.put(node, "white");
77 }
78 }
79 } else {
80 for (final V node : graph.getAllNodes()) {
81 colorMap.put(node, "white");
82 }
83 }
84
85 if (colorFunction != null) {
86 for (final V node : graph.getAllNodes()) {
87 colorMap.put(node, colorFunction.apply(node));
88 }
89 }
90
91 final StringBuilder builder = new StringBuilder();
92 builder.append("digraph g {\n");
93
94 for (final V node : graph.getAllNodes()) {
95 final String nodePresentation = nameFunction == null ? node.toString() : nameFunction.apply(node);
96 builder.append("\"" + nodePresentation + "\"");
97 builder.append("[style=filled,fillcolor=" + colorMap.get(node) + "]");
98 builder.append(";\n");
99 }
100
101 for (final V source : graph.getAllNodes()) {
102 final IMemoryView<V> targets = graph.getTargetNodes(source);
103 if (!targets.isEmpty()) {
104 final String sourcePresentation = nameFunction == null ? source.toString() : nameFunction.apply(source);
105 for (final V target : targets.distinctValues()) {
106 String edgeLabel = null;
107 if (edgeFunction != null) {
108 final Function<V, String> v1 = edgeFunction.apply(source);
109 if (v1 != null) {
110 edgeLabel = v1.apply(target);
111 }
112 }
113
114 final String targetPresentation = nameFunction == null ? target.toString()
115 : nameFunction.apply(target);
116
117 builder.append("\"" + sourcePresentation + "\" -> \"" + targetPresentation + "\"");
118 if (edgeLabel != null) {
119 builder.append("[label=\"" + edgeLabel + "\"]");
120 }
121 builder.append(";\n");
122 }
123 }
124 }
125
126 builder.append("}");
127 return builder.toString();
128 }
129
130 /**
131 * Generates the dot representation for the given graph. No special pretty printing customization will be applied.
132 *
133 * @param graph
134 * the graph
135 * @return the dot representation as a string
136 */
137 public static <V> String generateDot(final Graph<V> graph) {
138 return generateDot(graph, false, null, null, null);
139 }
140
141 /**
142 * Returns a simple name shortener function that can be used in the graphviz visualization to help with readability.
143 * WARNING: if you shorten the name of the {@link Node}s too much, the visualization may become incorrect because
144 * grahpviz will treat different nodes as the same if their shortened names are the same.
145 *
146 * @param maxLength
147 * the maximum length of the text that is kept from the toString of the objects in the graph
148 * @return the shrunk toString value
149 */
150 public static <V> Function<V, String> getNameShortener(final int maxLength) {
151 return new Function<V, String>() {
152 @Override
153 public String apply(final V obj) {
154 final String value = obj.toString();
155 return value.substring(0, Math.min(value.length(), maxLength));
156 }
157 };
158 }
159
160}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/Graph.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/Graph.java
new file mode 100644
index 00000000..91604cb2
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/graphimpl/Graph.java
@@ -0,0 +1,185 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.graphimpl;
11
12import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphDataSource;
13import tools.refinery.viatra.runtime.rete.itc.igraph.IGraphObserver;
14import tools.refinery.viatra.runtime.rete.itc.igraph.IBiDirectionalGraphDataSource;
15import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
16import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
17import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
18import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
19
20import java.util.List;
21import java.util.Map;
22import java.util.Map.Entry;
23import java.util.Set;
24
25public class Graph<V> implements IGraphDataSource<V>, IBiDirectionalGraphDataSource<V> {
26
27 // source -> target -> count
28 private IMultiLookup<V, V> outgoingEdges;
29 // target -> source -> count
30 private IMultiLookup<V, V> incomingEdges;
31
32 private Set<V> nodes;
33
34 private List<IGraphObserver<V>> observers;
35
36 public Graph() {
37 outgoingEdges = CollectionsFactory.createMultiLookup(Object.class, MemoryType.MULTISETS, Object.class);
38 incomingEdges = CollectionsFactory.createMultiLookup(Object.class, MemoryType.MULTISETS, Object.class);
39 nodes = CollectionsFactory.createSet();
40 observers = CollectionsFactory.createObserverList();
41 }
42
43 public void insertEdge(V source, V target) {
44 outgoingEdges.addPair(source, target);
45 incomingEdges.addPair(target, source);
46
47 for (IGraphObserver<V> go : observers) {
48 go.edgeInserted(source, target);
49 }
50 }
51
52 /**
53 * No-op if trying to delete edge that does not exist
54 *
55 * @since 2.0
56 * @see #deleteEdgeIfExists(Object, Object)
57 */
58 public void deleteEdgeIfExists(V source, V target) {
59 boolean containedEdge = outgoingEdges.lookupOrEmpty(source).containsNonZero(target);
60 if (containedEdge) {
61 deleteEdgeThatExists(source, target);
62 }
63 }
64
65 /**
66 * @throws IllegalStateException
67 * if trying to delete edge that does not exist
68 * @since 2.0
69 * @see #deleteEdgeIfExists(Object, Object)
70 */
71 public void deleteEdgeThatExists(V source, V target) {
72 outgoingEdges.removePair(source, target);
73 incomingEdges.removePair(target, source);
74 for (IGraphObserver<V> go : observers) {
75 go.edgeDeleted(source, target);
76 }
77 }
78
79 /**
80 * @deprecated use explicitly {@link #deleteEdgeThatExists(Object, Object)} or
81 * {@link #deleteEdgeIfExists(Object, Object)} instead. To preserve backwards compatibility, this method
82 * delegates to the latter.
83 *
84 */
85 @Deprecated
86 public void deleteEdge(V source, V target) {
87 deleteEdgeIfExists(source, target);
88 }
89
90 /**
91 * Insert the given node into the graph.
92 */
93 public void insertNode(V node) {
94 if (nodes.add(node)) {
95 for (IGraphObserver<V> go : observers) {
96 go.nodeInserted(node);
97 }
98 }
99 }
100
101 /**
102 * Deletes the given node AND all of the edges going in and out from the node.
103 */
104 public void deleteNode(V node) {
105 if (nodes.remove(node)) {
106 IMemoryView<V> incomingView = incomingEdges.lookup(node);
107 if (incomingView != null) {
108 Map<V, Integer> incoming = CollectionsFactory.createMap(incomingView.asMap());
109
110 for (Entry<V, Integer> entry : incoming.entrySet()) {
111 for (int i = 0; i < entry.getValue(); i++) {
112 deleteEdgeThatExists(entry.getKey(), node);
113 }
114 }
115 }
116
117 IMemoryView<V> outgoingView = outgoingEdges.lookup(node);
118 if (outgoingView != null) {
119 Map<V, Integer> outgoing = CollectionsFactory.createMap(outgoingView.asMap());
120
121 for (Entry<V, Integer> entry : outgoing.entrySet()) {
122 for (int i = 0; i < entry.getValue(); i++) {
123 deleteEdgeThatExists(node, entry.getKey());
124 }
125 }
126 }
127
128 for (IGraphObserver<V> go : observers) {
129 go.nodeDeleted(node);
130 }
131 }
132 }
133
134 @Override
135 public void attachObserver(IGraphObserver<V> go) {
136 observers.add(go);
137 }
138
139 @Override
140 public void attachAsFirstObserver(IGraphObserver<V> observer) {
141 observers.add(0, observer);
142 }
143
144 @Override
145 public void detachObserver(IGraphObserver<V> go) {
146 observers.remove(go);
147 }
148
149 @Override
150 public Set<V> getAllNodes() {
151 return nodes;
152 }
153
154 @Override
155 public IMemoryView<V> getTargetNodes(V source) {
156 return outgoingEdges.lookupOrEmpty(source);
157 }
158
159 @Override
160 public IMemoryView<V> getSourceNodes(V target) {
161 return incomingEdges.lookupOrEmpty(target);
162 }
163
164 @Override
165 public String toString() {
166 StringBuilder sb = new StringBuilder();
167 sb.append("nodes = ");
168 for (V n : getAllNodes()) {
169 sb.append(n.toString());
170 sb.append(" ");
171 }
172 sb.append(" edges = ");
173 for (V source : outgoingEdges.distinctKeys()) {
174 IMemoryView<V> targets = outgoingEdges.lookup(source);
175 for (V target : targets.distinctValues()) {
176 int count = targets.getCount(target);
177 for (int i = 0; i < count; i++) {
178 sb.append("(" + source + "," + target + ") ");
179 }
180 }
181 }
182 return sb.toString();
183 }
184
185}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalGraphDataSource.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalGraphDataSource.java
new file mode 100644
index 00000000..4fcaa71f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalGraphDataSource.java
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.igraph;
11
12import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
13import tools.refinery.viatra.runtime.matchers.util.IMultiset;
14
15/**
16 * A bi-directional graph data source supports all operations that an {@link IGraphDataSource} does, but it
17 * also makes it possible to query the incoming edges of nodes, not only the outgoing edges.
18 *
19 * @author Tamas Szabo
20 *
21 * @param <V> the type of the nodes in the graph
22 */
23public interface IBiDirectionalGraphDataSource<V> extends IGraphDataSource<V> {
24
25 /**
26 * Returns the source nodes for the given target node.
27 * The returned data structure is an {@link IMultiset} because of potential parallel edges in the graph data source.
28 *
29 * The method must not return null.
30 *
31 * @param target the target node
32 * @return the multiset of source nodes
33 * @since 2.0
34 */
35 public IMemoryView<V> getSourceNodes(V target);
36
37}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalWrapper.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalWrapper.java
new file mode 100644
index 00000000..c4315ca2
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IBiDirectionalWrapper.java
@@ -0,0 +1,110 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.igraph;
11
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
15import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
16import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
17import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
18
19/**
20 * This class can be used to wrap an {@link IGraphDataSource} into an {@link IBiDirectionalGraphDataSource}. This class
21 * provides support for the retrieval of source nodes for a given target which is not supported by standard
22 * {@link IGraphDataSource} implementations.
23 *
24 * @author Tamas Szabo
25 *
26 * @param <V>
27 * the type parameter of the nodes in the graph data source
28 */
29public class IBiDirectionalWrapper<V> implements IBiDirectionalGraphDataSource<V>, IGraphObserver<V> {
30
31 private IGraphDataSource<V> wrappedDataSource;
32 // target -> source -> count
33 private IMultiLookup<V, V> incomingEdges;
34
35 public IBiDirectionalWrapper(IGraphDataSource<V> gds) {
36 this.wrappedDataSource = gds;
37
38 this.incomingEdges = CollectionsFactory.createMultiLookup(
39 Object.class, MemoryType.MULTISETS, Object.class);
40
41 if (gds.getAllNodes() != null) {
42 for (V source : gds.getAllNodes()) {
43 IMemoryView<V> targets = gds.getTargetNodes(source);
44 for (V target : targets.distinctValues()) {
45 int count = targets.getCount(target);
46 for (int i = 0; i < count; i++) {
47 edgeInserted(source, target);
48 }
49 }
50 }
51 }
52
53 gds.attachAsFirstObserver(this);
54 }
55
56 @Override
57 public void attachObserver(IGraphObserver<V> observer) {
58 wrappedDataSource.attachObserver(observer);
59 }
60
61 @Override
62 public void attachAsFirstObserver(IGraphObserver<V> observer) {
63 wrappedDataSource.attachAsFirstObserver(observer);
64 }
65
66 @Override
67 public void detachObserver(IGraphObserver<V> observer) {
68 wrappedDataSource.detachObserver(observer);
69 }
70
71 @Override
72 public Set<V> getAllNodes() {
73 return wrappedDataSource.getAllNodes();
74 }
75
76 @Override
77 public IMemoryView<V> getTargetNodes(V source) {
78 return wrappedDataSource.getTargetNodes(source);
79 }
80
81 @Override
82 public IMemoryView<V> getSourceNodes(V target) {
83 return incomingEdges.lookupOrEmpty(target);
84 }
85
86 @Override
87 public void edgeInserted(V source, V target) {
88 incomingEdges.addPair(target, source);
89 }
90
91 @Override
92 public void edgeDeleted(V source, V target) {
93 incomingEdges.removePair(target, source);
94 }
95
96 @Override
97 public void nodeInserted(V n) {
98
99 }
100
101 @Override
102 public void nodeDeleted(V node) {
103
104 }
105
106 @Override
107 public String toString() {
108 return wrappedDataSource.toString();
109 }
110}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphDataSource.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphDataSource.java
new file mode 100644
index 00000000..9159a692
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphDataSource.java
@@ -0,0 +1,70 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.igraph;
11
12import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
13import tools.refinery.viatra.runtime.matchers.util.IMultiset;
14
15import java.util.Set;
16
17/**
18 * The interface prescribes the set of operations that a graph data source must support.
19 * <p> Note that the old version of the interface is broken at version 1.6;
20 * MultiSets are now presented as Maps instead of Lists.
21 *
22 * @author Tamas Szabo
23 *
24 * @param <V>
25 * the type of the nodes in the graph
26 */
27public interface IGraphDataSource<V> {
28
29 /**
30 * Attaches a new graph observer to this graph data source. Observers will be notified in the order they have been registered.
31 *
32 * @param observer the graph observer
33 */
34 public void attachObserver(IGraphObserver<V> observer);
35
36 /**
37 * Attaches a new graph observer to this graph data source as the first one.
38 * In the notification order this observer will be the first one as long as another call to this method happens.
39 *
40 * @param observer the graph observer
41 * @since 1.6
42 */
43 public void attachAsFirstObserver(IGraphObserver<V> observer);
44
45 /**
46 * Detaches an already registered graph observer from this graph data source.
47 *
48 * @param observer the graph observer
49 */
50 public void detachObserver(IGraphObserver<V> observer);
51
52 /**
53 * Returns the complete set of nodes in the graph data source.
54 *
55 * @return the set of all nodes
56 */
57 public Set<V> getAllNodes();
58
59 /**
60 * Returns the target nodes for the given source node.
61 * The returned data structure is an {@link IMultiset} because of potential parallel edges in the graph data source.
62 *
63 * The method must not return null.
64 *
65 * @param source the source node
66 * @return the multiset of target nodes
67 * @since 2.0
68 */
69 public IMemoryView<V> getTargetNodes(V source);
70}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphObserver.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphObserver.java
new file mode 100644
index 00000000..a282216d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/IGraphObserver.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.igraph;
11
12/**
13 * Interface GraphObserver is used to observ the changes in a graph; edge and node insertion/deleteion.
14 *
15 * @author Tamas Szabo
16 *
17 */
18public interface IGraphObserver<V> {
19
20 /**
21 * Used to notify when an edge is inserted into the graph.
22 *
23 * @param source
24 * the source of the edge
25 * @param target
26 * the target of the edge
27 */
28 public void edgeInserted(V source, V target);
29
30 /**
31 * Used to notify when an edge is deleted from the graph.
32 *
33 * @param source
34 * the source of the edge
35 * @param target
36 * the target of the edge
37 */
38 public void edgeDeleted(V source, V target);
39
40 /**
41 * Used to notify when a node is inserted into the graph.
42 *
43 * @param n
44 * the node
45 */
46 public void nodeInserted(V n);
47
48 /**
49 * Used to notify when a node is deleted from the graph.
50 *
51 * @param n
52 * the node
53 */
54 public void nodeDeleted(V n);
55}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcDataSource.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcDataSource.java
new file mode 100644
index 00000000..5ede600f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcDataSource.java
@@ -0,0 +1,82 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.igraph;
11
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.rete.itc.alg.misc.IGraphPathFinder;
15
16/**
17 * This interface defines those methods that a transitive reachability data source should provide.
18 *
19 * @author Tamas Szabo
20 *
21 * @param <V>
22 * the type parameter of the node
23 */
24public interface ITcDataSource<V> {
25
26 /**
27 * Attach a transitive closure relation observer.
28 *
29 * @param to
30 * the observer object
31 */
32 public void attachObserver(ITcObserver<V> to);
33
34 /**
35 * Detach a transitive closure relation observer.
36 *
37 * @param to
38 * the observer object
39 */
40 public void detachObserver(ITcObserver<V> to);
41
42 /**
43 * Returns all nodes which are reachable from the source node.
44 *
45 * @param source
46 * the source node
47 * @return the set of target nodes
48 */
49 public Set<V> getAllReachableTargets(V source);
50
51 /**
52 * Returns all nodes from which the target node is reachable.
53 *
54 * @param target
55 * the target node
56 * @return the set of source nodes
57 */
58 public Set<V> getAllReachableSources(V target);
59
60 /**
61 * Returns true if the target node is reachable from the source node.
62 *
63 * @param source
64 * the source node
65 * @param target
66 * the target node
67 * @return true if target is reachable from source, false otherwise
68 */
69 public boolean isReachable(V source, V target);
70
71 /**
72 * The returned {@link IGraphPathFinder} can be used to retrieve paths between nodes using transitive reachability.
73 *
74 * @return a path finder for the graph.
75 */
76 public IGraphPathFinder<V> getPathFinder();
77
78 /**
79 * Call this method to properly dispose the data structures of a transitive closure algorithm.
80 */
81 public void dispose();
82}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcObserver.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcObserver.java
new file mode 100644
index 00000000..74e0cb75
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/itc/igraph/ITcObserver.java
@@ -0,0 +1,39 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.itc.igraph;
11
12/**
13 * Interface ITcObserver is used to observe the changes in a transitive closure relation; tuple insertion/deletion.
14 *
15 * @author Szabo Tamas
16 *
17 */
18public interface ITcObserver<V> {
19
20 /**
21 * Used to notify when a tuple is inserted into the transitive closure relation.
22 *
23 * @param source
24 * the source of the tuple
25 * @param target
26 * the target of the tuple
27 */
28 public void tupleInserted(V source, V target);
29
30 /**
31 * Used to notify when a tuple is deleted from the transitive closure relation.
32 *
33 * @param source
34 * the source of the tuple
35 * @param target
36 * the target of the tuple
37 */
38 public void tupleDeleted(V source, V target);
39}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java
new file mode 100644
index 00000000..83e86fe6
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.matcher;
10
11import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
12import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
13
14/**
15 * A {@link ReteBackendFactory} implementation that creates {@link ReteEngine}s that use delete and re-derive
16 * evaluation.
17 *
18 * @author Tamas Szabo
19 * @since 2.2
20 */
21public class DRedReteBackendFactory extends ReteBackendFactory {
22
23 public static final DRedReteBackendFactory INSTANCE = new DRedReteBackendFactory();
24
25 @Override
26 public IQueryBackend create(IQueryBackendContext context) {
27 return create(context, true, null);
28 }
29
30 @Override
31 public int hashCode() {
32 return DRedReteBackendFactory.class.hashCode();
33 }
34
35 @Override
36 public boolean equals(final Object obj) {
37 if (this == obj) {
38 return true;
39 }
40 if (obj == null) {
41 return false;
42 }
43 if (!(obj instanceof DRedReteBackendFactory)) {
44 return false;
45 }
46 return true;
47 }
48
49}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/HintConfigurator.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/HintConfigurator.java
new file mode 100644
index 00000000..a4fa4914
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/HintConfigurator.java
@@ -0,0 +1,46 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.matcher;
10
11import java.util.HashMap;
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
15import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
17
18/**
19 * A configurable hint provider that gathers hints for queries during runtime, and delegates defaults to an external hint provider.
20 *
21 * @author Gabor Bergmann
22 * @since 1.5
23 */
24class HintConfigurator implements IQueryBackendHintProvider {
25
26 private IQueryBackendHintProvider defaultHintProvider;
27 private Map<PQuery, QueryEvaluationHint> storedHints = new HashMap<PQuery, QueryEvaluationHint>();
28
29 public HintConfigurator(IQueryBackendHintProvider defaultHintProvider) {
30 this.defaultHintProvider = defaultHintProvider;
31 }
32
33 @Override
34 public QueryEvaluationHint getQueryEvaluationHint(PQuery query) {
35 return defaultHintProvider.getQueryEvaluationHint(query).overrideBy(storedHints.get(query));
36 }
37
38 public void storeHint(PQuery query, QueryEvaluationHint hint) {
39 QueryEvaluationHint oldHint = storedHints.get(query);
40 if (oldHint == null)
41 storedHints.put(query, hint);
42 else
43 storedHints.put(query, oldHint.overrideBy(hint));
44 }
45
46}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/IncrementalMatcherCapability.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/IncrementalMatcherCapability.java
new file mode 100644
index 00000000..4c64a1a1
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/IncrementalMatcherCapability.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.matcher;
10
11import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
12
13/**
14 * @author Grill Balázs
15 * @since 1.4
16 *
17 */
18public class IncrementalMatcherCapability implements IMatcherCapability {
19
20 @Override
21 public boolean canBeSubstitute(IMatcherCapability capability) {
22 /*
23 * TODO: for now, as we are only prepared for Rete and LS, we can assume that
24 * a matcher created with Rete can always be a substitute for a matcher created
25 * by any backend.
26 */
27 return true;
28 }
29
30}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactory.java
new file mode 100644
index 00000000..347cabc4
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactory.java
@@ -0,0 +1,100 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.matcher;
10
11import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
12import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
13import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
14import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
15import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
16import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
18import tools.refinery.viatra.runtime.rete.construction.plancompiler.ReteRecipeCompiler;
19import tools.refinery.viatra.runtime.rete.util.Options;
20
21public class ReteBackendFactory implements IQueryBackendFactory {
22 /**
23 * EXPERIMENTAL
24 */
25 protected static final int reteThreads = 0;
26
27 /**
28 * @since 2.0
29 */
30 public static final ReteBackendFactory INSTANCE = new ReteBackendFactory();
31
32 /**
33 * @deprecated Use the static {@link #INSTANCE} field instead
34 */
35 @Deprecated
36 public ReteBackendFactory() {
37 }
38
39 /**
40 * @since 1.5
41 */
42 @Override
43 public IQueryBackend create(IQueryBackendContext context) {
44 return create(context, false, null);
45 }
46
47 /**
48 * @since 2.4
49 */
50 public IQueryBackend create(IQueryBackendContext context, boolean deleteAndRederiveEvaluation,
51 TimelyConfiguration timelyConfiguration) {
52 ReteEngine engine;
53 engine = new ReteEngine(context, reteThreads, deleteAndRederiveEvaluation, timelyConfiguration);
54 IQueryBackendHintProvider hintConfiguration = engine.getHintConfiguration();
55 ReteRecipeCompiler compiler = new ReteRecipeCompiler(
56 Options.builderMethod.layoutStrategy(context, hintConfiguration), context.getLogger(),
57 context.getRuntimeContext().getMetaContext(), context.getQueryCacheContext(), hintConfiguration,
58 context.getQueryAnalyzer(), deleteAndRederiveEvaluation, timelyConfiguration);
59 engine.setCompiler(compiler);
60 return engine;
61 }
62
63 @Override
64 public Class<? extends IQueryBackend> getBackendClass() {
65 return ReteEngine.class;
66 }
67
68 @Override
69 public int hashCode() {
70 return ReteBackendFactory.class.hashCode();
71 }
72
73 @Override
74 public boolean equals(Object obj) {
75 if (this == obj) {
76 return true;
77 }
78 if (obj == null) {
79 return false;
80 }
81 if (!(obj instanceof ReteBackendFactory)) {
82 return false;
83 }
84 return true;
85 }
86
87 /**
88 * @since 1.4
89 */
90 @Override
91 public IMatcherCapability calculateRequiredCapability(PQuery query, QueryEvaluationHint hint) {
92 return new IncrementalMatcherCapability();
93 }
94
95 @Override
96 public boolean isCaching() {
97 return true;
98 }
99
100} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactoryProvider.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactoryProvider.java
new file mode 100644
index 00000000..98775ab3
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteBackendFactoryProvider.java
@@ -0,0 +1,35 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.matcher;
10
11import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
12import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactoryProvider;
13
14/**
15 * @since 2.0
16 *
17 */
18public class ReteBackendFactoryProvider implements IQueryBackendFactoryProvider {
19
20 @Override
21 public IQueryBackendFactory getFactory() {
22 return ReteBackendFactory.INSTANCE;
23 }
24
25 @Override
26 public boolean isSystemDefaultEngine() {
27 return true;
28 }
29
30 @Override
31 public boolean isSystemDefaultCachingBackend() {
32 return true;
33 }
34
35}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteEngine.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteEngine.java
new file mode 100644
index 00000000..9bd499f4
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/ReteEngine.java
@@ -0,0 +1,579 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.matcher;
11
12import java.lang.reflect.InvocationTargetException;
13import java.util.Collection;
14import java.util.LinkedList;
15import java.util.Map;
16import java.util.concurrent.Callable;
17
18import org.apache.log4j.Logger;
19import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
20import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
21import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
22import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
23import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
24import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
25import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
26import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
27import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
28import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
29import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
30import tools.refinery.viatra.runtime.rete.boundary.Disconnectable;
31import tools.refinery.viatra.runtime.rete.boundary.ReteBoundary;
32import tools.refinery.viatra.runtime.rete.construction.RetePatternBuildException;
33import tools.refinery.viatra.runtime.rete.construction.plancompiler.ReteRecipeCompiler;
34import tools.refinery.viatra.runtime.rete.index.Indexer;
35import tools.refinery.viatra.runtime.rete.network.Network;
36import tools.refinery.viatra.runtime.rete.network.NodeProvisioner;
37import tools.refinery.viatra.runtime.rete.network.ReteContainer;
38import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
39
40/**
41 * @author Gabor Bergmann
42 *
43 */
44public class ReteEngine implements IQueryBackend {
45
46 protected Network reteNet;
47 protected final int reteThreads;
48 protected ReteBoundary boundary;
49
50 /**
51 * @since 2.2
52 */
53 protected final boolean deleteAndRederiveEvaluation;
54 /**
55 * @since 2.4
56 */
57 protected final TimelyConfiguration timelyConfiguration;
58
59 private IQueryBackendContext context;
60 private Logger logger;
61 protected IQueryRuntimeContext runtimeContext;
62
63 protected Collection<Disconnectable> disconnectables;
64
65 protected Map<PQuery, RetePatternMatcher> matchers;
66
67 protected ReteRecipeCompiler compiler;
68
69 protected final boolean parallelExecutionEnabled; // TRUE if model manipulation can go on
70
71 private boolean disposedOrUninitialized = true;
72
73 private HintConfigurator hintConfigurator;
74
75 /**
76 * @param context
77 * the context of the pattern matcher, conveying all information from the outside world.
78 * @param reteThreads
79 * the number of threads to operate the RETE network with; 0 means single-threaded operation, 1 starts an
80 * asynchronous thread to operate the RETE net, >1 uses multiple RETE containers.
81 */
82 public ReteEngine(IQueryBackendContext context, int reteThreads) {
83 this(context, reteThreads, false, null);
84 }
85
86 /**
87 * @since 2.4
88 */
89 public ReteEngine(IQueryBackendContext context, int reteThreads, boolean deleteAndRederiveEvaluation, TimelyConfiguration timelyConfiguration) {
90 super();
91 this.context = context;
92 this.logger = context.getLogger();
93 this.runtimeContext = context.getRuntimeContext();
94 this.reteThreads = reteThreads;
95 this.parallelExecutionEnabled = reteThreads > 0;
96 this.deleteAndRederiveEvaluation = deleteAndRederiveEvaluation;
97 this.timelyConfiguration = timelyConfiguration;
98 initEngine();
99 this.compiler = null;
100 }
101
102 /**
103 * @since 1.6
104 */
105 public IQueryBackendContext getBackendContext() {
106 return context;
107 }
108
109 /**
110 * @since 2.2
111 */
112 public boolean isDeleteAndRederiveEvaluation() {
113 return this.deleteAndRederiveEvaluation;
114 }
115
116 /**
117 * @since 2.4
118 */
119 public TimelyConfiguration getTimelyConfiguration() {
120 return this.timelyConfiguration;
121 }
122
123 /**
124 * initializes engine components
125 */
126 private synchronized void initEngine() {
127 this.disposedOrUninitialized = false;
128 this.disconnectables = new LinkedList<Disconnectable>();
129 // this.caughtExceptions = new LinkedBlockingQueue<Throwable>();
130
131
132 this.hintConfigurator = new HintConfigurator(context.getHintProvider());
133
134 this.reteNet = new Network(reteThreads, this);
135 this.boundary = new ReteBoundary(this); // prerequisite: network
136
137 this.matchers = CollectionsFactory.createMap();
138 /* this.matchersScoped = new HashMap<PatternDescription, Map<Map<Integer,Scope>,RetePatternMatcher>>(); */
139
140 // prerequisite: network, framework, boundary, disconnectables
141 //context.subscribeBackendForUpdates(this.boundary);
142 // prerequisite: boundary, disconnectables
143// this.traceListener = context.subscribePatternMatcherForTraceInfluences(this);
144
145 }
146
147 @Override
148 public void flushUpdates() {
149 for (ReteContainer container : this.reteNet.getContainers()) {
150 container.deliverMessagesSingleThreaded();
151 }
152 }
153
154 /**
155 * deconstructs engine components
156 */
157 private synchronized void deconstructEngine() {
158 ensureInitialized();
159 reteNet.kill();
160
161 //context.unSubscribeBackendFromUpdates(this.boundary);
162 for (Disconnectable disc : disconnectables) {
163 disc.disconnect();
164 }
165
166 this.matchers = null;
167 this.disconnectables = null;
168
169 this.reteNet = null;
170 this.boundary = null;
171
172 this.hintConfigurator = null;
173
174 // this.machineListener = new MachineListener(this); // prerequisite:
175 // framework, disconnectables
176// this.traceListener = null;
177
178 this.disposedOrUninitialized = true;
179 }
180
181 /**
182 * Deconstructs the engine to get rid of it finally
183 */
184 public void killEngine() {
185 deconstructEngine();
186 // this.framework = null;
187 this.compiler = null;
188 this.logger = null;
189 }
190
191 /**
192 * Resets the engine to an after-initialization phase
193 *
194 */
195 public void reset() {
196 deconstructEngine();
197
198 initEngine();
199
200 compiler.reset();
201 }
202
203 /**
204 * Accesses the patternmatcher for a given pattern, constructs one if a matcher is not available yet.
205 *
206 * @pre: builder is set.
207 * @param query
208 * the pattern to be matched.
209 * @return a patternmatcher object that can match occurences of the given pattern.
210 * @throws ViatraQueryRuntimeException
211 * if construction fails.
212 */
213 public synchronized RetePatternMatcher accessMatcher(final PQuery query) {
214 ensureInitialized();
215 RetePatternMatcher matcher;
216 // String namespace = gtPattern.getNamespace().getName();
217 // String name = gtPattern.getName();
218 // String fqn = namespace + "." + name;
219 matcher = matchers.get(query);
220 if (matcher == null) {
221 constructionWrapper(() -> {
222 RecipeTraceInfo prodNode;
223 prodNode = boundary.accessProductionTrace(query);
224
225 RetePatternMatcher retePatternMatcher = new RetePatternMatcher(ReteEngine.this,
226 prodNode);
227 retePatternMatcher.setTag(query);
228 matchers.put(query, retePatternMatcher);
229 return null;
230 });
231 matcher = matchers.get(query);
232 }
233
234 executeDelayedCommands();
235
236 return matcher;
237 }
238
239
240 /**
241 * Constructs RETE pattern matchers for a collection of patterns, if they are not available yet. Model traversal
242 * during the whole construction period is coalesced (which may have an effect on performance, depending on the
243 * matcher context).
244 *
245 * @pre: builder is set.
246 * @param specifications
247 * the patterns to be matched.
248 * @throws ViatraQueryRuntimeException
249 * if construction fails.
250 */
251 public synchronized void buildMatchersCoalesced(final Collection<PQuery> specifications) {
252 ensureInitialized();
253 constructionWrapper(() -> {
254 for (PQuery specification : specifications) {
255 boundary.accessProductionNode(specification);
256 }
257 return null;
258 });
259 }
260
261 /**
262 * @since 2.4
263 */
264 public <T> T constructionWrapper(final Callable<T> payload) {
265 T result = null;
266// context.modelReadLock();
267// try {
268 if (parallelExecutionEnabled)
269 reteNet.getStructuralChangeLock().lock();
270 try {
271 try {
272 result = runtimeContext.coalesceTraversals(() -> {
273 T innerResult = payload.call();
274 this.executeDelayedCommands();
275 return innerResult;
276 });
277 } catch (InvocationTargetException ex) {
278 final Throwable cause = ex.getCause();
279 if (cause instanceof RetePatternBuildException)
280 throw (RetePatternBuildException) cause;
281 if (cause instanceof RuntimeException)
282 throw (RuntimeException) cause;
283 assert (false);
284 }
285 } finally {
286 if (parallelExecutionEnabled)
287 reteNet.getStructuralChangeLock().unlock();
288 reteNet.waitForReteTermination();
289 }
290// } finally {
291// context.modelReadUnLock();
292// }
293 return result;
294 }
295
296 // /**
297 // * Accesses the patternmatcher for a given pattern with additional scoping, constructs one if
298 // * a matcher is not available yet.
299 // *
300 // * @param gtPattern
301 // * the pattern to be matched.
302 // * @param additionalScopeMap
303 // * additional, optional scopes for the symbolic parameters
304 // * maps the position of the symbolic parameter to its additional scope (if any)
305 // * @pre: scope.parent is non-root, i.e. this is a nontrivial constraint
306 // * use the static method RetePatternMatcher.buildAdditionalScopeMap() to create from PatternCallSignature
307 // * @return a patternmatcher object that can match occurences of the given
308 // * pattern.
309 // * @throws PatternMatcherCompileTimeException
310 // * if construction fails.
311 // */
312 // public synchronized RetePatternMatcher accessMatcherScoped(PatternDescription gtPattern, Map<Integer, Scope>
313 // additionalScopeMap)
314 // throws PatternMatcherCompileTimeException {
315 // if (additionalScopeMap.isEmpty()) return accessMatcher(gtPattern);
316 //
317 // RetePatternMatcher matcher;
318 //
319 // Map<Map<Integer, Scope>, RetePatternMatcher> scopes = matchersScoped.get(gtPattern);
320 // if (scopes == null) {
321 // scopes = new HashMap<Map<Integer, Scope>, RetePatternMatcher>();
322 // matchersScoped.put(gtPattern, scopes);
323 // }
324 //
325 // matcher = scopes.get(additionalScopeMap);
326 // if (matcher == null) {
327 // context.modelReadLock();
328 // try {
329 // reteNet.getStructuralChangeLock().lock();
330 // try {
331 // Address<? extends Production> prodNode;
332 // prodNode = boundary.accessProductionScoped(gtPattern, additionalScopeMap);
333 //
334 // matcher = new RetePatternMatcher(this, prodNode);
335 // scopes.put(additionalScopeMap, matcher);
336 // } finally {
337 // reteNet.getStructuralChangeLock().unlock();
338 // }
339 // } finally {
340 // context.modelReadUnLock();
341 // }
342 // // reteNet.flushUpdates();
343 // }
344 //
345 // return matcher;
346 // }
347
348 /**
349 * Returns an indexer that groups the contents of this Production node by their projections to a given mask.
350 * Designed to be called by a RetePatternMatcher.
351 *
352 * @param production
353 * the production node to be indexed.
354 * @param mask
355 * the mask that defines the projection.
356 * @return the Indexer.
357 */
358 synchronized Indexer accessProjection(RecipeTraceInfo production, TupleMask mask) {
359 ensureInitialized();
360 NodeProvisioner nodeProvisioner = reteNet.getHeadContainer().getProvisioner();
361 Indexer result = nodeProvisioner.peekProjectionIndexer(production, mask);
362 if (result == null) {
363 result = constructionWrapper(() ->
364 nodeProvisioner.accessProjectionIndexerOnetime(production, mask)
365 );
366 }
367
368 return result;
369 }
370
371 // /**
372 // * Retrieves the patternmatcher for a given pattern fqn, returns null if
373 // the matching network hasn't been constructed yet.
374 // *
375 // * @param fqn the fully qualified name of the pattern to be matched.
376 // * @return the previously constructed patternmatcher object that can match
377 // occurences of the given pattern, or null if it doesn't exist.
378 // */
379 // public RetePatternMatcher getMatcher(String fqn)
380 // {
381 // RetePatternMatcher matcher = matchersByFqn.get(fqn);
382 // if (matcher == null)
383 // {
384 // Production prodNode = boundary.getProduction(fqn);
385 //
386 // matcher = new RetePatternMatcher(this, prodNode);
387 // matchersByFqn.put(fqn, matcher);
388 // }
389 //
390 // return matcher;
391 // }
392
393 /**
394 * @since 2.3
395 */
396 public void executeDelayedCommands() {
397 for (final ReteContainer container : this.reteNet.getContainers()) {
398 container.executeDelayedCommands();
399 }
400 }
401
402 /**
403 * Waits until the pattern matcher is in a steady state and output can be retrieved.
404 */
405 public void settle() {
406 ensureInitialized();
407 reteNet.waitForReteTermination();
408 }
409
410 /**
411 * Waits until the pattern matcher is in a steady state and output can be retrieved. When steady state is reached, a
412 * retrieval action is executed before the steady state ceases.
413 *
414 * @param action
415 * the action to be run when reaching the steady-state.
416 */
417 public void settle(Runnable action) {
418 ensureInitialized();
419 reteNet.waitForReteTermination(action);
420 }
421
422 // /**
423 // * @return the framework
424 // */
425 // public IFramework getFramework() {
426 // return framework.get();
427 // }
428
429 /**
430 * @return the reteNet
431 */
432 public Network getReteNet() {
433 ensureInitialized();
434 return reteNet;
435 }
436
437 /**
438 * @return the boundary
439 */
440 public ReteBoundary getBoundary() {
441 ensureInitialized();
442 return boundary;
443 }
444
445 // /**
446 // * @return the pattern matcher builder
447 // */
448 // public IRetePatternBuilder getBuilder() {
449 // return builder;
450 // }
451
452 /**
453 * @param builder
454 * the pattern matcher builder to set
455 */
456 public void setCompiler(ReteRecipeCompiler builder) {
457 ensureInitialized();
458 this.compiler = builder;
459 }
460
461// /**
462// * @return the manipulationListener
463// */
464// public IManipulationListener getManipulationListener() {
465// ensureInitialized();
466// return manipulationListener;
467// }
468
469// /**
470// * @return the traceListener
471// */
472// public IPredicateTraceListener geTraceListener() {
473// ensureInitialized();
474// return traceListener;
475// }
476
477 /**
478 * @param disc
479 * the new Disconnectable adapter.
480 */
481 public void addDisconnectable(Disconnectable disc) {
482 ensureInitialized();
483 disconnectables.add(disc);
484 }
485
486 /**
487 * @return the parallelExecutionEnabled
488 */
489 public boolean isParallelExecutionEnabled() {
490 return parallelExecutionEnabled;
491 }
492
493
494 public Logger getLogger() {
495 ensureInitialized();
496 return logger;
497 }
498
499 public IQueryRuntimeContext getRuntimeContext() {
500 ensureInitialized();
501 return runtimeContext;
502 }
503
504 public ReteRecipeCompiler getCompiler() {
505 ensureInitialized();
506 return compiler;
507 }
508
509 // /**
510 // * For internal use only: logs exceptions occurring during term evaluation inside the RETE net.
511 // * @param e
512 // */
513 // public void logEvaluatorException(Throwable e) {
514 // try {
515 // caughtExceptions.put(e);
516 // } catch (InterruptedException e1) {
517 // logEvaluatorException(e);
518 // }
519 // }
520 // /**
521 // * Polls the exceptions caught and logged during term evaluation by this RETE engine.
522 // * Recommended usage: iterate polling until null is returned.
523 // *
524 // * @return the next caught exception, or null if there are no more.
525 // */
526 // public Throwable getNextLoggedEvaluatorException() {
527 // return caughtExceptions.poll();
528 // }
529
530 void ensureInitialized() {
531 if (disposedOrUninitialized)
532 throw new IllegalStateException("Trying to use a Rete engine that has been disposed or has not yet been initialized.");
533
534 }
535
536 @Override
537 public IQueryResultProvider getResultProvider(PQuery query) {
538 return accessMatcher(query);
539 }
540
541 /**
542 * @since 1.4
543 */
544 @Override
545 public IQueryResultProvider getResultProvider(PQuery query, QueryEvaluationHint hints) {
546 hintConfigurator.storeHint(query, hints);
547 return accessMatcher(query);
548 }
549
550 @Override
551 public IQueryResultProvider peekExistingResultProvider(PQuery query) {
552 ensureInitialized();
553 return matchers.get(query);
554 }
555
556 @Override
557 public void dispose() {
558 killEngine();
559 }
560
561 @Override
562 public boolean isCaching() {
563 return true;
564 }
565
566 /**
567 * @since 1.5
568 * @noreference Internal API, subject to change
569 */
570 public IQueryBackendHintProvider getHintConfiguration() {
571 return hintConfigurator;
572 }
573
574 @Override
575 public IQueryBackendFactory getFactory() {
576 return ReteBackendFactory.INSTANCE;
577 }
578
579}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/RetePatternMatcher.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/RetePatternMatcher.java
new file mode 100644
index 00000000..38fe7c2f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/RetePatternMatcher.java
@@ -0,0 +1,463 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10
11package tools.refinery.viatra.runtime.rete.matcher;
12
13import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
14import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
15import tools.refinery.viatra.runtime.matchers.backend.IUpdateable;
16import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
17import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
21import tools.refinery.viatra.runtime.matchers.util.Accuracy;
22import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
23import tools.refinery.viatra.runtime.rete.index.Indexer;
24import tools.refinery.viatra.runtime.rete.index.IterableIndexer;
25import tools.refinery.viatra.runtime.rete.network.Node;
26import tools.refinery.viatra.runtime.rete.network.ProductionNode;
27import tools.refinery.viatra.runtime.rete.network.Receiver;
28import tools.refinery.viatra.runtime.rete.remote.Address;
29import tools.refinery.viatra.runtime.rete.single.CallbackNode;
30import tools.refinery.viatra.runtime.rete.single.TransformerNode;
31import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
32
33import java.util.Collection;
34import java.util.List;
35import java.util.Map;
36import java.util.Optional;
37import java.util.stream.Collectors;
38import java.util.stream.Stream;
39
40/**
41 * @author Gabor Bergmann
42 *
43 */
44public class RetePatternMatcher extends TransformerNode implements IQueryResultProvider {
45
46 protected ReteEngine engine;
47 protected IQueryRuntimeContext context;
48 protected ProductionNode productionNode;
49 protected RecipeTraceInfo productionNodeTrace;
50 protected Map<String, Integer> posMapping;
51 protected Map<Object, Receiver> taggedChildren = CollectionsFactory.createMap();
52 protected boolean connected = false; // is rete-wise connected to the
53 // production node?
54
55 /**
56 * @param productionNode
57 * a production node that matches this pattern without any parameter bindings
58 * @pre: Production must be local to the head container
59 */
60 public RetePatternMatcher(ReteEngine engine, RecipeTraceInfo productionNodeTrace) {
61 super(engine.getReteNet().getHeadContainer());
62 this.engine = engine;
63 this.context = engine.getRuntimeContext();
64 this.productionNodeTrace = productionNodeTrace;
65 final Address<? extends Node> productionAddress = reteContainer.getProvisioner()
66 .getOrCreateNodeByRecipe(productionNodeTrace);
67 if (!reteContainer.isLocal(productionAddress))
68 throw new IllegalArgumentException("@pre: Production must be local to the head container");
69 this.productionNode = (ProductionNode) reteContainer.resolveLocal(productionAddress);
70 this.posMapping = this.productionNode.getPosMapping();
71 this.reteContainer.getCommunicationTracker().registerDependency(this.productionNode, this);
72 }
73
74 /**
75 * @since 1.6
76 */
77 public ProductionNode getProductionNode() {
78 return productionNode;
79 }
80
81 public Tuple matchOneRandomly(Object[] inputMapping, boolean[] fixed) {
82 List<Tuple> allMatches = matchAll(inputMapping, fixed).collect(Collectors.toList());
83 if (allMatches == null || allMatches.isEmpty())
84 return null;
85 else
86 return allMatches.get((int) (Math.random() * allMatches.size()));
87 }
88
89 /**
90 * @since 2.0
91 */
92 public Stream<Tuple> matchAll(Object[] inputMapping, boolean[] fixed) {
93 // retrieving the projection
94 TupleMask mask = TupleMask.fromKeepIndicators(fixed);
95 Tuple inputSignature = mask.transform(Tuples.flatTupleOf(inputMapping));
96
97 return matchAll(mask, inputSignature);
98
99 }
100
101 /**
102 * @since 2.0
103 */
104 public Stream<Tuple> matchAll(TupleMask mask, ITuple inputSignature) {
105 AllMatchFetcher fetcher = new AllMatchFetcher(engine.accessProjection(productionNodeTrace, mask),
106 context.wrapTuple(inputSignature.toImmutable()));
107 engine.reteNet.waitForReteTermination(fetcher);
108 return fetcher.getMatches();
109
110 }
111
112 /**
113 * @since 2.0
114 */
115 public Optional<Tuple> matchOne(Object[] inputMapping, boolean[] fixed) {
116 // retrieving the projection
117 TupleMask mask = TupleMask.fromKeepIndicators(fixed);
118 Tuple inputSignature = mask.transform(Tuples.flatTupleOf(inputMapping));
119
120 return matchOne(mask, inputSignature);
121 }
122
123 /**
124 * @since 2.0
125 */
126 public Optional<Tuple> matchOne(TupleMask mask, ITuple inputSignature) {
127 SingleMatchFetcher fetcher = new SingleMatchFetcher(engine.accessProjection(productionNodeTrace, mask),
128 context.wrapTuple(inputSignature.toImmutable()));
129 engine.reteNet.waitForReteTermination(fetcher);
130 return Optional.ofNullable(fetcher.getMatch());
131 }
132
133 /**
134 * Counts the number of occurrences of the pattern that match inputMapping on positions where fixed is true.
135 *
136 * @return the number of occurrences
137 */
138 public int count(Object[] inputMapping, boolean[] fixed) {
139 TupleMask mask = TupleMask.fromKeepIndicators(fixed);
140 Tuple inputSignature = mask.transform(Tuples.flatTupleOf(inputMapping));
141
142 return count(mask, inputSignature);
143 }
144
145 /**
146 * Counts the number of occurrences of the pattern that match inputMapping on positions where fixed is true.
147 *
148 * @return the number of occurrences
149 * @since 1.7
150 */
151 public int count(TupleMask mask, ITuple inputSignature) {
152 CountFetcher fetcher = new CountFetcher(engine.accessProjection(productionNodeTrace, mask),
153 context.wrapTuple(inputSignature.toImmutable()));
154 engine.reteNet.waitForReteTermination(fetcher);
155
156 return fetcher.getCount();
157 }
158
159 /**
160 * Counts the number of distinct tuples attainable from the match set by projecting match tuples according to the given mask.
161 *
162 *
163 * @return the size of the projection
164 * @since 2.1
165 */
166 public int projectionSize(TupleMask groupMask) {
167 ProjectionSizeFetcher fetcher = new ProjectionSizeFetcher(
168 (IterableIndexer) engine.accessProjection(productionNodeTrace, groupMask));
169 engine.reteNet.waitForReteTermination(fetcher);
170
171 return fetcher.getSize();
172 }
173
174 /**
175 * Connects a new external receiver that will receive update notifications from now on. The receiver will
176 * practically connect to the production node, the added value is unwrapping the updates for external use.
177 *
178 * @param synchronize
179 * if true, the contents of the production node will be inserted into the receiver after the connection
180 * is established.
181 */
182 public synchronized void connect(Receiver receiver, boolean synchronize) {
183 if (!connected) { // connect to the production node as a RETE-child
184 reteContainer.connect(productionNode, this);
185 connected = true;
186 }
187 if (synchronize)
188 reteContainer.connectAndSynchronize(this, receiver);
189 else
190 reteContainer.connect(this, receiver);
191 }
192
193 /**
194 * Connects a new external receiver that will receive update notifications from now on. The receiver will
195 * practically connect to the production node, the added value is unwrapping the updates for external use.
196 *
197 * The external receiver will be disconnectable later based on its tag.
198 *
199 * @param tag
200 * an identifier to recognize the child node by.
201 *
202 * @param synchronize
203 * if true, the contents of the production node will be inserted into the receiver after the connection
204 * is established.
205 *
206 */
207 public synchronized void connect(Receiver receiver, Object tag, boolean synchronize) {
208 taggedChildren.put(tag, receiver);
209 connect(receiver, synchronize);
210 }
211
212 /**
213 * Disconnects a child node.
214 */
215 public synchronized void disconnect(Receiver receiver) {
216 reteContainer.disconnect(this, receiver);
217 }
218
219 /**
220 * Disconnects the child node that was connected by specifying the given tag.
221 *
222 * @return if a child node was found registered with this tag.
223 */
224 public synchronized boolean disconnectByTag(Object tag) {
225 final Receiver receiver = taggedChildren.remove(tag);
226 final boolean found = receiver != null;
227 if (found)
228 disconnect(receiver);
229 return found;
230 }
231
232 @Override
233 protected Tuple transform(Tuple input) {
234 return context.unwrapTuple(input);
235 }
236
237 abstract class AbstractMatchFetcher implements Runnable {
238 Indexer indexer;
239 Tuple signature;
240
241 public AbstractMatchFetcher(Indexer indexer, Tuple signature) {
242 super();
243 this.indexer = indexer;
244 this.signature = signature;
245 }
246
247 @Override
248 public void run() {
249 fetch(indexer.get(signature));
250 }
251
252 protected abstract void fetch(Collection<Tuple> matches);
253
254 }
255
256 class AllMatchFetcher extends AbstractMatchFetcher {
257
258 public AllMatchFetcher(Indexer indexer, Tuple signature) {
259 super(indexer, signature);
260 }
261
262 Stream<Tuple> matches = null;
263
264 public Stream<Tuple> getMatches() {
265 return matches;
266 }
267
268 @Override
269 protected void fetch(Collection<Tuple> matches) {
270 if (matches == null)
271 this.matches = Stream.of();
272 else {
273 this.matches = matches.stream().map(context::unwrapTuple);
274 }
275
276 }
277
278 }
279
280 class SingleMatchFetcher extends AbstractMatchFetcher {
281
282 public SingleMatchFetcher(Indexer indexer, Tuple signature) {
283 super(indexer, signature);
284 }
285
286 Tuple match = null;
287
288 public Tuple getMatch() {
289 return match;
290 }
291
292 @Override
293 protected void fetch(Collection<Tuple> matches) {
294 if (matches != null && !matches.isEmpty())
295 match = context.unwrapTuple(matches.iterator().next());
296 }
297
298 // public void run() {
299 // Collection<Tuple> unscopedMatches = indexer.get(signature);
300 //
301 // // checking scopes
302 // if (unscopedMatches != null) {
303 // for (Tuple um : /* productionNode */unscopedMatches) {
304 // match = inputConnector.unwrapTuple(um);
305 // return;
306 //
307 // // Tuple ps = inputConnector.unwrapTuple(um);
308 // // boolean ok = true;
309 // // if (!ignoreScope) for (int k = 0; (k < ps.getSize()) && ok; k++) {
310 // // if (pcs[k].getParameterMode() == ParameterMode.INPUT) {
311 // // // ok = ok && (inputMapping[k]==ps.elements[k]);
312 // // // should now be true
313 // // } else // ParameterMode.OUTPUT
314 // // {
315 // // IEntity scopeParent = (IEntity) pcs[k].getParameterScope().getParent();
316 // // Integer containmentMode = pcs[k].getParameterScope().getContainmentMode();
317 // // if (containmentMode == Scope.BELOW)
318 // // ok = ok && ((IModelElement) ps.get(k)).isBelowNamespace(scopeParent);
319 // // else
320 // // /* case Scope.IN: */
321 // // ok = ok && scopeParent.equals(((IModelElement) ps.get(k)).getNamespace());
322 // // // note: getNamespace returns null instead of the
323 // // // (imaginary) modelspace root entity for top level
324 // // // elements;
325 // // // this is not a problem here as Scope.IN implies
326 // // // scopeParent != root.
327 // //
328 // // }
329 // // }
330 // //
331 // // if (ok) {
332 // // reteMatching = new ReteMatching(ps, posMapping);
333 // // return;
334 // // }
335 // }
336 // }
337 //
338 // }
339
340 }
341
342 class CountFetcher extends AbstractMatchFetcher {
343
344 public CountFetcher(Indexer indexer, Tuple signature) {
345 super(indexer, signature);
346 }
347
348 int count = 0;
349
350 public int getCount() {
351 return count;
352 }
353
354 @Override
355 protected void fetch(Collection<Tuple> matches) {
356 count = matches == null ? 0 : matches.size();
357 }
358
359 }
360
361 class ProjectionSizeFetcher implements Runnable {
362 IterableIndexer indexer;
363 int size = 0;
364
365 public ProjectionSizeFetcher(IterableIndexer indexer) {
366 super();
367 this.indexer = indexer;
368 }
369
370 @Override
371 public void run() {
372 size = indexer.getBucketCount();
373 }
374
375 public int getSize() {
376 return size;
377 }
378
379 }
380
381 private boolean[] notNull(Object[] parameters) {
382 boolean[] notNull = new boolean[parameters.length];
383 for (int i = 0; i < parameters.length; ++i)
384 notNull[i] = parameters[i] != null;
385 return notNull;
386 }
387
388
389
390 @Override
391 public boolean hasMatch(Object[] parameters) {
392 return countMatches(parameters) > 0;
393 }
394
395 @Override
396 public boolean hasMatch(TupleMask parameterSeedMask, ITuple parameters) {
397 return count(parameterSeedMask, parameters) > 0;
398 }
399
400 @Override
401 public int countMatches(Object[] parameters) {
402 return count(parameters, notNull(parameters));
403 }
404
405 @Override
406 public int countMatches(TupleMask parameterSeedMask, ITuple parameters) {
407 return count(parameterSeedMask, parameters);
408 }
409
410
411 @Override
412 public Optional<Long> estimateCardinality(TupleMask groupMask, Accuracy requiredAccuracy) {
413 return Optional.of((long)projectionSize(groupMask)); // always accurate
414 }
415
416 @Override
417 public Optional<Tuple> getOneArbitraryMatch(Object[] parameters) {
418 return matchOne(parameters, notNull(parameters));
419 }
420
421 @Override
422 public Optional<Tuple> getOneArbitraryMatch(TupleMask parameterSeedMask, ITuple parameters) {
423 return matchOne(parameterSeedMask, parameters);
424 }
425
426 @Override
427 public Stream<Tuple> getAllMatches(Object[] parameters) {
428 return matchAll(parameters, notNull(parameters));
429 }
430
431 @Override
432 public Stream<Tuple> getAllMatches(TupleMask parameterSeedMask, ITuple parameters) {
433 return matchAll(parameterSeedMask, parameters);
434 }
435
436 @Override
437 public IQueryBackend getQueryBackend() {
438 return engine;
439 }
440
441 @Override
442 public void addUpdateListener(final IUpdateable listener, final Object listenerTag, boolean fireNow) {
443 // As a listener is added as a delayed command, they should be executed to make sure everything is consistent on
444 // return, see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=562369
445 engine.constructionWrapper(() -> {
446 final CallbackNode callbackNode = new CallbackNode(this.reteContainer, listener);
447 connect(callbackNode, listenerTag, fireNow);
448 return null;
449 });
450 }
451
452 @Override
453 public void removeUpdateListener(Object listenerTag) {
454 engine.constructionWrapper(() -> {
455 disconnectByTag(listenerTag);
456 return null;
457 });
458 }
459
460 public Indexer getInternalIndexer(TupleMask mask) {
461 return engine.accessProjection(productionNodeTrace, mask);
462 }
463}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyConfiguration.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyConfiguration.java
new file mode 100644
index 00000000..876ddc99
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyConfiguration.java
@@ -0,0 +1,61 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.matcher;
10
11/**
12 * Configuration of timely evaluation.
13 *
14 * @author Tamas Szabo
15 * @since 2.4
16 */
17public class TimelyConfiguration {
18
19 private final AggregatorArchitecture aggregatorArchitecture;
20 private final TimelineRepresentation timelineRepresentation;
21
22 public TimelyConfiguration(final TimelineRepresentation timelineRepresentation,
23 final AggregatorArchitecture aggregatorArchitecture) {
24 this.aggregatorArchitecture = aggregatorArchitecture;
25 this.timelineRepresentation = timelineRepresentation;
26 }
27
28 public AggregatorArchitecture getAggregatorArchitecture() {
29 return aggregatorArchitecture;
30 }
31
32 public TimelineRepresentation getTimelineRepresentation() {
33 return timelineRepresentation;
34 }
35
36 public enum AggregatorArchitecture {
37 /**
38 * Aggregands are copied over from lower timestamps to higher timestamps.
39 */
40 PARALLEL,
41
42 /**
43 * Aggregands are only present at the timestamp where they are inserted at.
44 * Only aggregate results are pushed towards higher timestamps during folding.
45 */
46 SEQUENTIAL
47 }
48
49 public enum TimelineRepresentation {
50 /**
51 * Only the first moment (timestamp) of appearance is maintained per tuple.
52 */
53 FIRST_ONLY,
54
55 /**
56 * Complete timeline (series of appearance & disappearance) is maintained per tuple.
57 */
58 FAITHFUL
59 }
60
61}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyReteBackendFactory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyReteBackendFactory.java
new file mode 100644
index 00000000..2777f169
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/TimelyReteBackendFactory.java
@@ -0,0 +1,64 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.matcher;
10
11import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
12import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
13import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.AggregatorArchitecture;
14import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.TimelineRepresentation;
15
16/**
17 * A {@link ReteBackendFactory} implementation that creates {@link ReteEngine}s that use non-scattered timely
18 * evaluation.
19 *
20 * @author Tamas Szabo
21 * @since 2.4
22 */
23public class TimelyReteBackendFactory extends ReteBackendFactory {
24
25 private final TimelyConfiguration configuration;
26
27 public static final TimelyReteBackendFactory FIRST_ONLY_SEQUENTIAL = new TimelyReteBackendFactory(
28 new TimelyConfiguration(TimelineRepresentation.FIRST_ONLY, AggregatorArchitecture.SEQUENTIAL));
29 public static final TimelyReteBackendFactory FIRST_ONLY_PARALLEL = new TimelyReteBackendFactory(
30 new TimelyConfiguration(TimelineRepresentation.FIRST_ONLY, AggregatorArchitecture.PARALLEL));
31 public static final TimelyReteBackendFactory FAITHFUL_SEQUENTIAL = new TimelyReteBackendFactory(
32 new TimelyConfiguration(TimelineRepresentation.FAITHFUL, AggregatorArchitecture.SEQUENTIAL));
33 public static final TimelyReteBackendFactory FAITHFUL_PARALLEL = new TimelyReteBackendFactory(
34 new TimelyConfiguration(TimelineRepresentation.FAITHFUL, AggregatorArchitecture.PARALLEL));
35
36 public TimelyReteBackendFactory(final TimelyConfiguration configuration) {
37 this.configuration = configuration;
38 }
39
40 @Override
41 public IQueryBackend create(final IQueryBackendContext context) {
42 return create(context, false, configuration);
43 }
44
45 @Override
46 public int hashCode() {
47 return TimelyReteBackendFactory.class.hashCode();
48 }
49
50 @Override
51 public boolean equals(final Object obj) {
52 if (this == obj) {
53 return true;
54 }
55 if (obj == null) {
56 return false;
57 }
58 if (!(obj instanceof TimelyReteBackendFactory)) {
59 return false;
60 }
61 return true;
62 }
63
64}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/Bag.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/Bag.java
new file mode 100644
index 00000000..4aef0f96
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/Bag.java
@@ -0,0 +1,43 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.misc;
11
12import java.util.Collection;
13import java.util.LinkedList;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.rete.network.ReteContainer;
18import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
19
20/**
21 * @author Gabor Bergmann
22 *
23 * A bag is a container that tuples can be dumped into. Does NOT propagate updates! Optimized for small contents
24 * size OR positive updates only.
25 */
26public class Bag extends SimpleReceiver {
27
28 public Collection<Tuple> contents;
29
30 public Bag(ReteContainer reteContainer) {
31 super(reteContainer);
32 contents = new LinkedList<Tuple>();
33 }
34
35 @Override
36 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
37 if (direction == Direction.INSERT)
38 contents.add(updateElement);
39 else
40 contents.remove(updateElement);
41 }
42
43}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/ConstantNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/ConstantNode.java
new file mode 100644
index 00000000..980d3eee
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/ConstantNode.java
@@ -0,0 +1,50 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.misc;
11
12import java.util.Collection;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.StandardNode;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21
22/**
23 * Node that always contains a single constant Tuple
24 *
25 * @author Gabor Bergmann
26 */
27public class ConstantNode extends StandardNode {
28
29 protected Tuple constant;
30
31 /**
32 * @param constant
33 * will be wrapped using {@link IQueryRuntimeContext#wrapTuple(Tuple)}
34 */
35 public ConstantNode(ReteContainer reteContainer, Tuple constant) {
36 super(reteContainer);
37 this.constant = reteContainer.getNetwork().getEngine().getRuntimeContext().wrapTuple(constant);
38 }
39
40 @Override
41 public void pullInto(Collection<Tuple> collector, boolean flush) {
42 collector.add(constant);
43 }
44
45 @Override
46 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
47 collector.put(constant, Timestamp.INSERT_AT_ZERO_TIMELINE);
48 }
49
50}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DefaultDeltaMonitor.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DefaultDeltaMonitor.java
new file mode 100644
index 00000000..efba3117
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DefaultDeltaMonitor.java
@@ -0,0 +1,43 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.misc;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.rete.network.Network;
14import tools.refinery.viatra.runtime.rete.network.ReteContainer;
15
16/**
17 * Default configuration for DeltaMonitor.
18 *
19 * @author Gabor Bergmann
20 *
21 */
22public class DefaultDeltaMonitor extends DeltaMonitor<Tuple> {
23
24 /**
25 * @param reteContainer
26 */
27 public DefaultDeltaMonitor(ReteContainer reteContainer) {
28 super(reteContainer);
29 }
30
31 /**
32 * @param network
33 */
34 public DefaultDeltaMonitor(Network network) {
35 super(network.getHeadContainer());
36 }
37
38 @Override
39 public Tuple statelessConvert(Tuple tuple) {
40 return tuple;
41 }
42
43}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DeltaMonitor.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DeltaMonitor.java
new file mode 100644
index 00000000..82b6ecda
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/DeltaMonitor.java
@@ -0,0 +1,111 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.misc;
11
12import java.util.Collection;
13import java.util.LinkedHashSet;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.Clearable;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20
21/**
22 * A monitoring object that connects to the rete network as a receiver to reflect changes since an arbitrary state
23 * acknowledged by the client. Match tuples are represented by a type MatchType.
24 *
25 * <p>
26 * <b>Usage</b>. If a new matching is found, it appears in the matchFoundEvents collection, and disappears when that
27 * particular matching cannot be found anymore. If the event of finding a match has been processed by the client, it can
28 * be removed manually. In this case, when a previously found matching is lost, the Tuple will appear in the
29 * matchLostEvents collection, and disappear upon finding the same matching again. "Matching lost" events can also be
30 * acknowledged by removing a Tuple from the collection. If the matching is found once again, it will return to
31 * matchFoundEvents.
32 *
33 * <p>
34 * <b>Technical notes</b>. Does NOT propagate updates!
35 *
36 * By overriding statelessConvert(), results can be stored to a MatchType. MatchType must provide equals() and
37 * hashCode() reflecting its contents. The default implementation (DefaultDeltaMonitor) uses Tuple as MatchType.
38 *
39 * By overriding statelessFilter(), some tuples can be filtered.
40 *
41 * @author Gabor Bergmann
42 *
43 */
44public abstract class DeltaMonitor<MatchType> extends SimpleReceiver implements Clearable {
45
46 /**
47 * matches that are newly found
48 */
49 public Collection<MatchType> matchFoundEvents;
50 /**
51 * matches that are newly lost
52 */
53 public Collection<MatchType> matchLostEvents;
54
55 /**
56 * @param reteContainer
57 */
58 public DeltaMonitor(ReteContainer reteContainer) {
59 super(reteContainer);
60 matchFoundEvents = new LinkedHashSet<MatchType>();
61 matchLostEvents = new LinkedHashSet<MatchType>();
62 reteContainer.registerClearable(this);
63 }
64
65 // /**
66 // * Build a delta monitor into the head container of the network.
67 // *
68 // * @param network
69 // */
70 // public DeltaMonitor(Network network) {
71 // this(network.getHeadContainer());
72 // }
73
74 /**
75 * Override this method to provide a lightweight, stateless filter on the tuples
76 *
77 * @param tuple
78 * the occurrence that is to be filtered
79 * @return true if this tuple should be monitored, false if ignored
80 */
81 public boolean statelessFilter(Tuple tuple) {
82 return true;
83 }
84
85 public abstract MatchType statelessConvert(Tuple tuple);
86
87 @Override
88 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
89 if (statelessFilter(updateElement)) {
90 MatchType match = statelessConvert(updateElement);
91 if (direction == Direction.INSERT) {
92 if (!matchLostEvents.remove(match)) // either had before but
93 // lost
94 matchFoundEvents.add(match); // or brand-new
95 } else // revoke
96 {
97 if (!matchFoundEvents.remove(match)) // either never found
98 // in the first
99 // place
100 matchLostEvents.add(match); // or newly lost
101 }
102 }
103 }
104
105 @Override
106 public void clear() {
107 matchFoundEvents.clear();
108 matchLostEvents.clear();
109 }
110
111}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/SimpleReceiver.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/SimpleReceiver.java
new file mode 100644
index 00000000..dcf9ae78
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/misc/SimpleReceiver.java
@@ -0,0 +1,109 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.misc;
10
11import java.util.Collection;
12import java.util.Collections;
13
14import tools.refinery.viatra.runtime.rete.network.BaseNode;
15import tools.refinery.viatra.runtime.rete.network.Receiver;
16import tools.refinery.viatra.runtime.rete.network.ReteContainer;
17import tools.refinery.viatra.runtime.rete.network.Supplier;
18import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
19import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
20import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
21import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
22
23/**
24 * @author Bergmann Gabor
25 *
26 */
27public abstract class SimpleReceiver extends BaseNode implements Receiver {
28
29 protected Supplier parent = null;
30 /**
31 * @since 1.6
32 */
33 protected final Mailbox mailbox;
34
35 /**
36 * @param reteContainer
37 */
38 public SimpleReceiver(ReteContainer reteContainer) {
39 super(reteContainer);
40 mailbox = instantiateMailbox();
41 reteContainer.registerClearable(mailbox);
42 }
43
44 /**
45 * Instantiates the {@link Mailbox} of this receiver.
46 * Subclasses may override this method to provide their own mailbox implementation.
47 *
48 * @return the mailbox
49 * @since 2.0
50 */
51 protected Mailbox instantiateMailbox() {
52 if (this.reteContainer.isTimelyEvaluation()) {
53 return new TimelyMailbox(this, this.reteContainer);
54 } else {
55 return new BehaviorChangingMailbox(this, this.reteContainer);
56 }
57 }
58
59 @Override
60 public Mailbox getMailbox() {
61 return this.mailbox;
62 }
63
64 @Override
65 public void appendParent(Supplier supplier) {
66 if (parent == null)
67 parent = supplier;
68 else
69 throw new UnsupportedOperationException("Illegal RETE edge: " + this + " already has a parent (" + parent
70 + ") and cannot connect to additional parent (" + supplier
71 + ") as it is not a Uniqueness Enforcer Node. ");
72 }
73
74 @Override
75 public void removeParent(Supplier supplier) {
76 if (parent == supplier)
77 parent = null;
78 else
79 throw new IllegalArgumentException("Illegal RETE edge removal: the parent of " + this + " is not "
80 + supplier);
81 }
82
83 @Override
84 public Collection<Supplier> getParents() {
85 if (parent == null)
86 return Collections.emptySet();
87 else
88 return Collections.singleton(parent);
89 }
90
91 /**
92 * Disconnects this node from the network. Can be called publicly.
93 *
94 * @pre: child nodes, if any, must already be disconnected.
95 */
96 public void disconnectFromNetwork() {
97 if (parent != null)
98 reteContainer.disconnect(parent, this);
99 }
100
101 @Override
102 public void assignTraceInfo(TraceInfo traceInfo) {
103 super.assignTraceInfo(traceInfo);
104 if (traceInfo.propagateFromStandardNodeToSupplierParent())
105 if (parent != null)
106 parent.acceptPropagatedTraceInfo(traceInfo);
107 }
108
109} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/BaseNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/BaseNode.java
new file mode 100644
index 00000000..2469d6bd
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/BaseNode.java
@@ -0,0 +1,108 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network;
10
11import java.util.Collections;
12import java.util.HashSet;
13import java.util.Set;
14import java.util.TreeSet;
15
16import tools.refinery.viatra.runtime.rete.traceability.PatternTraceInfo;
17import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
18
19/**
20 * Base implementation for a Rete node.
21 *
22 * @author Bergmann Gabor
23 *
24 */
25public abstract class BaseNode implements Node {
26
27 protected ReteContainer reteContainer;
28 protected long nodeId;
29 protected Object tag;
30 protected Set<TraceInfo> traceInfos;
31
32 /**
33 * @param reteContainer
34 * the container to create this node in
35 */
36 public BaseNode(ReteContainer reteContainer) {
37 super();
38 this.reteContainer = reteContainer;
39 this.nodeId = reteContainer.registerNode(this);
40 this.traceInfos = new HashSet<TraceInfo>();
41 }
42
43 @Override
44 public String toString() {
45 if (tag != null)
46 return toStringCore() + "->" + getTraceInfoPatternsEnumerated() + "{" + tag.toString() + "}";
47 else
48 return toStringCore() + "->" + getTraceInfoPatternsEnumerated();
49 }
50
51 /**
52 * clients should override this to append before the tag / trace indicators
53 */
54 protected String toStringCore() {
55 return "[" + nodeId + "]" + getClass().getSimpleName();
56 }
57
58 @Override
59 public ReteContainer getContainer() {
60 return reteContainer;
61 }
62
63 @Override
64 public long getNodeId() {
65 return nodeId;
66 }
67
68 @Override
69 public Object getTag() {
70 return tag;
71 }
72
73 @Override
74 public void setTag(Object tag) {
75 this.tag = tag;
76 }
77
78 @Override
79 public Set<TraceInfo> getTraceInfos() {
80 return Collections.unmodifiableSet(traceInfos);
81 }
82
83 @Override
84 public void assignTraceInfo(TraceInfo traceInfo) {
85 traceInfos.add(traceInfo);
86 traceInfo.assignNode(this);
87 }
88
89 @Override
90 public void acceptPropagatedTraceInfo(TraceInfo traceInfo) {
91 assignTraceInfo(traceInfo);
92 }
93
94 /**
95 * Descendants should use this in e.g. logging
96 */
97 protected String getTraceInfoPatternsEnumerated() {
98 TreeSet<String> patternNames = new TreeSet<String>();
99 for (TraceInfo trInfo : traceInfos) {
100 if (trInfo instanceof PatternTraceInfo) {
101 final String pName = ((PatternTraceInfo) trInfo).getPatternName();
102 patternNames.add(pName);
103 }
104 }
105 return patternNames.toString();
106 }
107
108} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ConnectionFactory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ConnectionFactory.java
new file mode 100644
index 00000000..b261d19d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ConnectionFactory.java
@@ -0,0 +1,171 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.viatra.runtime.rete.network;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.rete.aggregation.IndexerBasedAggregatorNode;
14import tools.refinery.viatra.runtime.rete.boundary.InputConnector;
15import tools.refinery.viatra.runtime.rete.eval.RelationEvaluatorNode;
16import tools.refinery.viatra.runtime.rete.index.DualInputNode;
17import tools.refinery.viatra.runtime.rete.index.Indexer;
18import tools.refinery.viatra.runtime.rete.index.IterableIndexer;
19import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
20import tools.refinery.viatra.runtime.rete.recipes.*;
21import tools.refinery.viatra.runtime.rete.remote.Address;
22import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
23
24import java.util.ArrayList;
25import java.util.Collection;
26import java.util.List;
27
28/**
29 * Class responsible for connecting freshly instantiating Rete nodes to their parents.
30 *
31 * @author Bergmann Gabor
32 *
33 */
34class ConnectionFactory {
35 ReteContainer reteContainer;
36
37 public ConnectionFactory(ReteContainer reteContainer) {
38 super();
39 this.reteContainer = reteContainer;
40 }
41
42 // TODO move to node implementation instead?
43 private boolean isStateful(ReteNodeRecipe recipe) {
44 return recipe instanceof ProjectionIndexerRecipe || recipe instanceof IndexerBasedAggregatorRecipe
45 || recipe instanceof SingleColumnAggregatorRecipe || recipe instanceof ExpressionEnforcerRecipe
46 || recipe instanceof TransitiveClosureRecipe || recipe instanceof ProductionRecipe
47 || recipe instanceof UniquenessEnforcerRecipe || recipe instanceof RelationEvaluationRecipe;
48
49 }
50
51 /**
52 * PRE: nodes for parent recipes must already be created and registered
53 * <p>
54 * PRE: must not be an input node (for which {@link InputConnector} is responsible)
55 */
56 public void connectToParents(RecipeTraceInfo recipeTrace, Node freshNode) {
57 final ReteNodeRecipe recipe = recipeTrace.getRecipe();
58 if (recipe instanceof ConstantRecipe) {
59 // NO-OP
60 } else if (recipe instanceof InputRecipe) {
61 throw new IllegalArgumentException(
62 ConnectionFactory.class.getSimpleName() + " not intended for input connection: " + recipe);
63 } else if (recipe instanceof SingleParentNodeRecipe) {
64 final Receiver receiver = (Receiver) freshNode;
65 ReteNodeRecipe parentRecipe = ((SingleParentNodeRecipe) recipe).getParent();
66 connectToParent(recipe, receiver, parentRecipe);
67 } else if (recipe instanceof RelationEvaluationRecipe) {
68 List<ReteNodeRecipe> parentRecipes = ((MultiParentNodeRecipe) recipe).getParents();
69 List<Supplier> parentSuppliers = new ArrayList<Supplier>();
70 for (final ReteNodeRecipe parentRecipe : parentRecipes) {
71 parentSuppliers.add(getSupplierForRecipe(parentRecipe));
72 }
73 ((RelationEvaluatorNode) freshNode).connectToParents(parentSuppliers);
74 } else if (recipe instanceof BetaRecipe) {
75 final DualInputNode beta = (DualInputNode) freshNode;
76 final ArrayList<RecipeTraceInfo> parentTraces = new ArrayList<RecipeTraceInfo>(
77 recipeTrace.getParentRecipeTraces());
78 Slots slots = avoidActiveNodeConflict(parentTraces.get(0), parentTraces.get(1));
79 beta.connectToIndexers(slots.primary, slots.secondary);
80 } else if (recipe instanceof IndexerBasedAggregatorRecipe) {
81 final IndexerBasedAggregatorNode aggregator = (IndexerBasedAggregatorNode) freshNode;
82 final IndexerBasedAggregatorRecipe aggregatorRecipe = (IndexerBasedAggregatorRecipe) recipe;
83 aggregator.initializeWith((ProjectionIndexer) resolveIndexer(aggregatorRecipe.getParent()));
84 } else if (recipe instanceof MultiParentNodeRecipe) {
85 final Receiver receiver = (Receiver) freshNode;
86 List<ReteNodeRecipe> parentRecipes = ((MultiParentNodeRecipe) recipe).getParents();
87 for (ReteNodeRecipe parentRecipe : parentRecipes) {
88 connectToParent(recipe, receiver, parentRecipe);
89 }
90 }
91 }
92
93 private Indexer resolveIndexer(final IndexerRecipe indexerRecipe) {
94 final Address<? extends Node> address = reteContainer.getNetwork().getExistingNodeByRecipe(indexerRecipe);
95 return (Indexer) reteContainer.resolveLocal(address);
96 }
97
98 private void connectToParent(ReteNodeRecipe recipe, Receiver freshNode, ReteNodeRecipe parentRecipe) {
99 final Supplier parentSupplier = getSupplierForRecipe(parentRecipe);
100
101 // special synch
102 if (freshNode instanceof ReinitializedNode) {
103 Collection<Tuple> tuples = new ArrayList<Tuple>();
104 parentSupplier.pullInto(tuples, true);
105 ((ReinitializedNode) freshNode).reinitializeWith(tuples);
106 reteContainer.connect(parentSupplier, freshNode);
107 } else { // default case
108 // stateless nodes do not have to be synced with contents UNLESS they already have children (recursive
109 // corner case)
110 if (isStateful(recipe)
111 || ((freshNode instanceof Supplier) && !((Supplier) freshNode).getReceivers().isEmpty())) {
112 reteContainer.connectAndSynchronize(parentSupplier, freshNode);
113 } else {
114 // stateless node, no synch
115 reteContainer.connect(parentSupplier, freshNode);
116 }
117 }
118 }
119
120 private Supplier getSupplierForRecipe(ReteNodeRecipe recipe) {
121 @SuppressWarnings("unchecked")
122 final Address<? extends Supplier> parentAddress = (Address<? extends Supplier>) reteContainer.getNetwork()
123 .getExistingNodeByRecipe(recipe);
124 final Supplier supplier = reteContainer.getProvisioner().asSupplier(parentAddress);
125 return supplier;
126 }
127
128 /**
129 * If two indexers share their active node, joining them via DualInputNode is error-prone. Exception: coincidence of
130 * the two indexers is supported.
131 *
132 * @return a replacement for the secondary Indexers, if needed
133 */
134 private Slots avoidActiveNodeConflict(final RecipeTraceInfo primarySlot, final RecipeTraceInfo secondarySlot) {
135 Slots result = new Slots() {
136 {
137 primary = (IterableIndexer) resolveIndexer((ProjectionIndexerRecipe) primarySlot.getRecipe());
138 secondary = resolveIndexer((IndexerRecipe) secondarySlot.getRecipe());
139 }
140 };
141 if (activeNodeConflict(result.primary, result.secondary))
142 if (result.secondary instanceof IterableIndexer)
143 result.secondary = resolveActiveIndexer(secondarySlot);
144 else
145 result.primary = (IterableIndexer) resolveActiveIndexer(primarySlot);
146 return result;
147 }
148
149 private Indexer resolveActiveIndexer(final RecipeTraceInfo inactiveIndexerTrace) {
150 final RecipeTraceInfo activeIndexerTrace = reteContainer.getProvisioner()
151 .accessActiveIndexer(inactiveIndexerTrace);
152 reteContainer.getProvisioner().getOrCreateNodeByRecipe(activeIndexerTrace);
153 return resolveIndexer((ProjectionIndexerRecipe) activeIndexerTrace.getRecipe());
154 }
155
156 private static class Slots {
157 IterableIndexer primary;
158 Indexer secondary;
159 }
160
161 /**
162 * If two indexers share their active node, joining them via DualInputNode is error-prone. Exception: coincidence of
163 * the two indexers is supported.
164 *
165 * @return true if there is a conflict of active nodes.
166 */
167 private boolean activeNodeConflict(Indexer primarySlot, Indexer secondarySlot) {
168 return !primarySlot.equals(secondarySlot) && primarySlot.getActiveNode().equals(secondarySlot.getActiveNode());
169 }
170
171}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/IGroupable.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/IGroupable.java
new file mode 100644
index 00000000..c22b06d8
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/IGroupable.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network;
10
11import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
12
13/**
14 * @author Gabor Bergmann
15 * @since 1.7
16 */
17public interface IGroupable {
18
19 /**
20 * @return the current group of the mailbox
21 * @since 1.7
22 */
23 CommunicationGroup getCurrentGroup();
24
25 /**
26 * Sets the current group of the mailbox
27 * @since 1.7
28 */
29 void setCurrentGroup(CommunicationGroup group);
30
31} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Network.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Network.java
new file mode 100644
index 00000000..64f59ff3
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Network.java
@@ -0,0 +1,408 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12import java.util.ArrayList;
13import java.util.Collection;
14import java.util.Collections;
15import java.util.List;
16import java.util.Map;
17import java.util.Map.Entry;
18import java.util.Set;
19import java.util.concurrent.locks.Lock;
20import java.util.concurrent.locks.ReadWriteLock;
21import java.util.concurrent.locks.ReentrantReadWriteLock;
22
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
25import tools.refinery.viatra.runtime.matchers.util.Direction;
26import tools.refinery.viatra.runtime.rete.boundary.InputConnector;
27import tools.refinery.viatra.runtime.rete.matcher.ReteEngine;
28import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
29import tools.refinery.viatra.runtime.rete.remote.Address;
30import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
31import tools.refinery.viatra.runtime.rete.util.Options;
32
33/**
34 * @author Gabor Bergmann
35 *
36 */
37public class Network {
38 final int threads;
39
40 protected ArrayList<ReteContainer> containers;
41 ReteContainer headContainer;
42 private int firstContainer = 0;
43 private int nextContainer = 0;
44
45 // the following fields exist only if threads > 0
46 protected Map<ReteContainer, Long> globalTerminationCriteria = null;
47 protected Map<ReteContainer, Long> reportedClocks = null;
48 protected Lock updateLock = null; // grab during normal update operations
49 protected Lock structuralChangeLock = null; // grab if the network structure
50 // is to
51 // be changed
52
53 // Knowledge of the outside world
54 private ReteEngine engine;
55 protected NodeFactory nodeFactory;
56 protected InputConnector inputConnector;
57
58 // Node and recipe administration
59 // incl. addresses for existing nodes by recipe (where available)
60 // Maintained by NodeProvisioner of each container
61 Map<ReteNodeRecipe, Address<? extends Node>> nodesByRecipe = CollectionsFactory.createMap();
62 Set<RecipeTraceInfo> recipeTraces = CollectionsFactory.createSet();
63
64 /**
65 * @throws IllegalStateException
66 * if no node has been constructed for the recipe
67 */
68 public synchronized Address<? extends Node> getExistingNodeByRecipe(ReteNodeRecipe recipe) {
69 final Address<? extends Node> node = nodesByRecipe.get(recipe);
70 if (node == null)
71 throw new IllegalStateException(String.format("Rete node for recipe %s not constructed yet.", recipe));
72 return node;
73 }
74
75 /**
76 * @return null if no node has been constructed for the recipe
77 */
78 public synchronized Address<? extends Node> getNodeByRecipeIfExists(ReteNodeRecipe recipe) {
79 final Address<? extends Node> node = nodesByRecipe.get(recipe);
80 return node;
81 }
82
83 /**
84 * @param threads
85 * the number of threads to operate the network with; 0 means single-threaded operation, 1 starts an
86 * asynchronous thread to operate the RETE net, >1 uses multiple RETE containers.
87 */
88 public Network(int threads, ReteEngine engine) {
89 super();
90 this.threads = threads;
91 this.engine = engine;
92 this.inputConnector = new InputConnector(this);
93 this.nodeFactory = new NodeFactory(engine.getLogger());
94
95 containers = new ArrayList<ReteContainer>();
96 firstContainer = (threads > 1) ? Options.firstFreeContainer : 0; // NOPMD
97 nextContainer = firstContainer;
98
99 if (threads > 0) {
100 globalTerminationCriteria = CollectionsFactory.createMap();
101 reportedClocks = CollectionsFactory.createMap();
102 ReadWriteLock rwl = new ReentrantReadWriteLock();
103 updateLock = rwl.readLock();
104 structuralChangeLock = rwl.writeLock();
105 for (int i = 0; i < threads; ++i)
106 containers.add(new ReteContainer(this, true));
107 } else
108 containers.add(new ReteContainer(this, false));
109
110 headContainer = containers.get(0);
111 }
112
113 /**
114 * Kills this Network along with all containers and message consumption cycles.
115 */
116 public void kill() {
117 for (ReteContainer container : containers) {
118 container.kill();
119 }
120 containers.clear();
121 }
122
123 /**
124 * Returns the head container, that is guaranteed to reside in the same JVM as the Network object.
125 */
126 public ReteContainer getHeadContainer() {
127 return headContainer;
128 }
129
130 /**
131 * Returns the next container in round-robin fashion. Configurable not to yield head container.
132 */
133 public ReteContainer getNextContainer() {
134 if (nextContainer >= containers.size())
135 nextContainer = firstContainer;
136 return containers.get(nextContainer++);
137 }
138
139 /**
140 * Internal message delivery method.
141 *
142 * @pre threads > 0
143 */
144 private void sendUpdate(Address<? extends Receiver> receiver, Direction direction, Tuple updateElement) {
145 ReteContainer affectedContainer = receiver.getContainer();
146 synchronized (globalTerminationCriteria) {
147 long newCriterion = affectedContainer.sendUpdateToLocalAddress(receiver, direction, updateElement);
148 terminationCriterion(affectedContainer, newCriterion);
149 }
150 }
151
152 /**
153 * Internal message delivery method for single-threaded operation
154 *
155 * @pre threads == 0
156 */
157 private void sendUpdateSingleThreaded(Address<? extends Receiver> receiver, Direction direction,
158 Tuple updateElement) {
159 ReteContainer affectedContainer = receiver.getContainer();
160 affectedContainer.sendUpdateToLocalAddressSingleThreaded(receiver, direction, updateElement);
161 }
162
163 /**
164 * Internal message delivery method.
165 *
166 * @pre threads > 0
167 */
168 private void sendUpdates(Address<? extends Receiver> receiver, Direction direction,
169 Collection<Tuple> updateElements) {
170 if (updateElements.isEmpty())
171 return;
172 ReteContainer affectedContainer = receiver.getContainer();
173 synchronized (globalTerminationCriteria) {
174 long newCriterion = affectedContainer.sendUpdatesToLocalAddress(receiver, direction, updateElements);
175 terminationCriterion(affectedContainer, newCriterion);
176 }
177 }
178
179 /**
180 * Sends an update message to the receiver node, indicating a newly found or lost partial matching. The node may
181 * reside in any of the containers associated with this network. To be called from a user thread during normal
182 * operation, NOT during construction.
183 *
184 * @since 2.4
185 */
186 public void sendExternalUpdate(Address<? extends Receiver> receiver, Direction direction, Tuple updateElement) {
187 if (threads > 0) {
188 try {
189 updateLock.lock();
190 sendUpdate(receiver, direction, updateElement);
191 } finally {
192 updateLock.unlock();
193 }
194 } else {
195 sendUpdateSingleThreaded(receiver, direction, updateElement);
196 // getHeadContainer().
197 }
198 }
199
200 /**
201 * Sends an update message to the receiver node, indicating a newly found or lost partial matching. The node may
202 * reside in any of the containers associated with this network. To be called from a user thread during
203 * construction.
204 *
205 * @pre: structuralChangeLock MUST be grabbed by the sequence (but not necessarily this thread, as the sequence may
206 * span through network calls, that's why it's not enforced here )
207 *
208 * @return the value of the target container's clock at the time when the message was accepted into its message
209 * queue
210 * @since 2.4
211 */
212 public void sendConstructionUpdate(Address<? extends Receiver> receiver, Direction direction, Tuple updateElement) {
213 // structuralChangeLock.lock();
214 if (threads > 0)
215 sendUpdate(receiver, direction, updateElement);
216 else
217 receiver.getContainer().sendUpdateToLocalAddressSingleThreaded(receiver, direction, updateElement);
218 // structuralChangeLock.unlock();
219 }
220
221 /**
222 * Sends multiple update messages atomically to the receiver node, indicating a newly found or lost partial
223 * matching. The node may reside in any of the containers associated with this network. To be called from a user
224 * thread during construction.
225 *
226 * @pre: structuralChangeLock MUST be grabbed by the sequence (but not necessarily this thread, as the sequence may
227 * span through network calls, that's why it's not enforced here )
228 *
229 * @since 2.4
230 */
231 public void sendConstructionUpdates(Address<? extends Receiver> receiver, Direction direction,
232 Collection<Tuple> updateElements) {
233 // structuralChangeLock.lock();
234 if (threads > 0)
235 sendUpdates(receiver, direction, updateElements);
236 else
237 receiver.getContainer().sendUpdatesToLocalAddressSingleThreaded(receiver, direction, updateElements);
238 // structuralChangeLock.unlock();
239 }
240
241 /**
242 * Establishes connection between a supplier and a receiver node, regardless which container they are in. Not to be
243 * called remotely, because this method enforces the structural lock.
244 *
245 * @param supplier
246 * @param receiver
247 * @param synchronise
248 * indicates whether the receiver should be synchronised to the current contents of the supplier
249 */
250 public void connectRemoteNodes(Address<? extends Supplier> supplier, Address<? extends Receiver> receiver,
251 boolean synchronise) {
252 try {
253 if (threads > 0)
254 structuralChangeLock.lock();
255 receiver.getContainer().connectRemoteNodes(supplier, receiver, synchronise);
256 } finally {
257 if (threads > 0)
258 structuralChangeLock.unlock();
259 }
260 }
261
262 /**
263 * Severs connection between a supplier and a receiver node, regardless which container they are in. Not to be
264 * called remotely, because this method enforces the structural lock.
265 *
266 * @param supplier
267 * @param receiver
268 * @param desynchronise
269 * indicates whether the current contents of the supplier should be subtracted from the receiver
270 */
271 public void disconnectRemoteNodes(Address<? extends Supplier> supplier, Address<? extends Receiver> receiver,
272 boolean desynchronise) {
273 try {
274 if (threads > 0)
275 structuralChangeLock.lock();
276 receiver.getContainer().disconnectRemoteNodes(supplier, receiver, desynchronise);
277 } finally {
278 if (threads > 0)
279 structuralChangeLock.unlock();
280 }
281 }
282
283 /**
284 * Containers use this method to report whenever they run out of messages in their queue.
285 *
286 * To be called from the thread of the reporting container.
287 *
288 * @pre threads > 0.
289 * @param reportingContainer
290 * the container reporting the emptiness of its message queue.
291 * @param clock
292 * the value of the container's clock when reporting.
293 * @param localTerminationCriteria
294 * the latest clock values this container has received from other containers since the last time it
295 * reported termination.
296 */
297 void reportLocalUpdateTermination(ReteContainer reportingContainer, long clock,
298 Map<ReteContainer, Long> localTerminationCriteria) {
299 synchronized (globalTerminationCriteria) {
300 for (Entry<ReteContainer, Long> criterion : localTerminationCriteria.entrySet()) {
301 terminationCriterion(criterion.getKey(), criterion.getValue());
302 }
303
304 reportedClocks.put(reportingContainer, clock);
305 Long criterion = globalTerminationCriteria.get(reportingContainer);
306 if (criterion != null && criterion < clock)
307 globalTerminationCriteria.remove(reportingContainer);
308
309 if (globalTerminationCriteria.isEmpty())
310 globalTerminationCriteria.notifyAll();
311 }
312 }
313
314 /**
315 * @pre threads > 0
316 */
317 private void terminationCriterion(ReteContainer affectedContainer, long newCriterion) {
318 synchronized (globalTerminationCriteria) {
319 Long oldCriterion = globalTerminationCriteria.get(affectedContainer);
320 Long oldClock = reportedClocks.get(affectedContainer);
321 long relevantClock = oldClock == null ? 0 : oldClock;
322 if ((relevantClock <= newCriterion) && (oldCriterion == null || oldCriterion < newCriterion)) {
323 globalTerminationCriteria.put(affectedContainer, newCriterion);
324 }
325 }
326 }
327
328 /**
329 * Waits until all rete update operations are settled in all containers. Returns immediately, if no updates are
330 * pending.
331 *
332 * To be called from any user thread.
333 */
334 public void waitForReteTermination() {
335 if (threads > 0) {
336 synchronized (globalTerminationCriteria) {
337 while (!globalTerminationCriteria.isEmpty()) {
338 try {
339 globalTerminationCriteria.wait();
340 } catch (InterruptedException e) {
341
342 }
343 }
344 }
345 } else
346 headContainer.deliverMessagesSingleThreaded();
347 }
348
349 /**
350 * Waits to execute action until all rete update operations are settled in all containers. Runs action and returns
351 * immediately, if no updates are pending. The given action is guaranteed to be run when the terminated state still
352 * persists.
353 *
354 * @param action
355 * the action to be run when reaching the steady-state.
356 *
357 * To be called from any user thread.
358 */
359 public void waitForReteTermination(Runnable action) {
360 if (threads > 0) {
361 synchronized (globalTerminationCriteria) {
362 while (!globalTerminationCriteria.isEmpty()) {
363 try {
364 globalTerminationCriteria.wait();
365 } catch (InterruptedException e) {
366
367 }
368 }
369 action.run();
370 }
371 } else {
372 headContainer.deliverMessagesSingleThreaded();
373 action.run();
374 }
375
376 }
377
378 /**
379 * @return an unmodifiable set of known recipe traces
380 */
381 public Set<RecipeTraceInfo> getRecipeTraces() {
382 return Collections.unmodifiableSet(recipeTraces);
383 }
384
385 /**
386 * @return an unmodifiable list of containers
387 */
388 public List<ReteContainer> getContainers() {
389 return Collections.unmodifiableList(containers);
390 }
391
392 public Lock getStructuralChangeLock() {
393 return structuralChangeLock;
394 }
395
396 public NodeFactory getNodeFactory() {
397 return nodeFactory;
398 }
399
400 public InputConnector getInputConnector() {
401 return inputConnector;
402 }
403
404 public ReteEngine getEngine() {
405 return engine;
406 }
407
408}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NetworkStructureChangeSensitiveNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NetworkStructureChangeSensitiveNode.java
new file mode 100644
index 00000000..c6ba34c4
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NetworkStructureChangeSensitiveNode.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network;
10
11import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
12
13/**
14 * {@link Node}s implementing this interface are sensitive to changes in the dependency graph maintained by the
15 * {@link CommunicationTracker}. The {@link CommunicationTracker} notifies these nodes whenever the SCC of this node is
16 * affected by changes to the dependency graph. Depending on whether this node is contained in a recursive group or not,
17 * it may behave differently, and the {@link NetworkStructureChangeSensitiveNode#networkStructureChanged()} method can
18 * be used to perform changes in behavior.
19 *
20 * @author Tamas Szabo
21 * @since 2.3
22 */
23public interface NetworkStructureChangeSensitiveNode extends Node {
24
25 /**
26 * At the time of the invocation, the dependency graph has already been updated.
27 */
28 public void networkStructureChanged();
29
30}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Node.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Node.java
new file mode 100644
index 00000000..e8ab615a
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Node.java
@@ -0,0 +1,62 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
15import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
16
17/**
18 * A node of a rete network, should be uniquely identified by network and nodeId. NodeId can be requested by registering
19 * at the Network on construction.
20 *
21 * @author Gabor Bergmann
22 */
23public interface Node {
24 /**
25 * @return the network this node belongs to.
26 */
27 ReteContainer getContainer();
28
29 /**
30 * @return the identifier unique to this node within the network.
31 */
32 long getNodeId();
33
34 /**
35 * Assigns a descriptive tag to the node
36 */
37 void setTag(Object tag);
38
39 /**
40 * @return the tag of the node
41 */
42 Object getTag();
43
44 /**
45 * @return unmodifiable view of the list of traceability infos assigned to this node
46 */
47 Set<TraceInfo> getTraceInfos();
48
49 /**
50 * assigns new traceability info to this node
51 */
52 void assignTraceInfo(TraceInfo traceInfo);
53 /**
54 * accepts traceability info propagated to this node
55 */
56 void acceptPropagatedTraceInfo(TraceInfo traceInfo);
57
58 default CommunicationTracker getCommunicationTracker() {
59 return getContainer().getCommunicationTracker();
60 }
61
62}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeFactory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeFactory.java
new file mode 100644
index 00000000..3e4ea4e0
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeFactory.java
@@ -0,0 +1,376 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.viatra.runtime.rete.network;
11
12import org.apache.log4j.Logger;
13import org.eclipse.emf.common.util.EMap;
14import tools.refinery.viatra.runtime.rete.itc.alg.representative.RepresentativeElectionAlgorithm;
15import tools.refinery.viatra.runtime.rete.itc.alg.representative.StronglyConnectedComponentAlgorithm;
16import tools.refinery.viatra.runtime.rete.itc.alg.representative.WeaklyConnectedComponentAlgorithm;
17import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
18import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
19import tools.refinery.viatra.runtime.matchers.psystem.IRelationEvaluator;
20import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
21import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
22import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
23import tools.refinery.viatra.runtime.rete.aggregation.ColumnAggregatorNode;
24import tools.refinery.viatra.runtime.rete.aggregation.CountNode;
25import tools.refinery.viatra.runtime.rete.aggregation.IAggregatorNode;
26import tools.refinery.viatra.runtime.rete.aggregation.timely.FaithfulParallelTimelyColumnAggregatorNode;
27import tools.refinery.viatra.runtime.rete.aggregation.timely.FaithfulSequentialTimelyColumnAggregatorNode;
28import tools.refinery.viatra.runtime.rete.aggregation.timely.FirstOnlyParallelTimelyColumnAggregatorNode;
29import tools.refinery.viatra.runtime.rete.aggregation.timely.FirstOnlySequentialTimelyColumnAggregatorNode;
30import tools.refinery.viatra.runtime.rete.boundary.ExternalInputEnumeratorNode;
31import tools.refinery.viatra.runtime.rete.boundary.ExternalInputStatelessFilterNode;
32import tools.refinery.viatra.runtime.rete.eval.EvaluatorCore;
33import tools.refinery.viatra.runtime.rete.eval.MemorylessEvaluatorNode;
34import tools.refinery.viatra.runtime.rete.eval.OutputCachingEvaluatorNode;
35import tools.refinery.viatra.runtime.rete.eval.RelationEvaluatorNode;
36import tools.refinery.viatra.runtime.rete.index.ExistenceNode;
37import tools.refinery.viatra.runtime.rete.index.Indexer;
38import tools.refinery.viatra.runtime.rete.index.JoinNode;
39import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration;
40import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.AggregatorArchitecture;
41import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.TimelineRepresentation;
42import tools.refinery.viatra.runtime.rete.misc.ConstantNode;
43import tools.refinery.viatra.runtime.rete.recipes.*;
44import tools.refinery.viatra.runtime.rete.single.*;
45import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
46
47import java.util.HashMap;
48import java.util.List;
49import java.util.Map;
50
51/**
52 * Factory for instantiating Rete nodes. The created nodes are not connected to the network yet.
53 *
54 * @author Bergmann Gabor
55 *
56 */
57class NodeFactory {
58 Logger logger;
59
60 public NodeFactory(Logger logger) {
61 super();
62 this.logger = logger;
63 }
64
65 /**
66 * PRE: parent node must already be created
67 */
68 public Indexer createIndexer(ReteContainer reteContainer, IndexerRecipe recipe, Supplier parentNode,
69 TraceInfo... traces) {
70
71 if (recipe instanceof ProjectionIndexerRecipe) {
72 return parentNode.constructIndex(toMask(recipe.getMask()), traces);
73 // already traced
74 } else if (recipe instanceof AggregatorIndexerRecipe) {
75 int indexOfAggregateResult = recipe.getParent().getArity();
76 int resultPosition = recipe.getMask().getSourceIndices().lastIndexOf(indexOfAggregateResult);
77
78 IAggregatorNode aggregatorNode = (IAggregatorNode) parentNode;
79 final Indexer result = (resultPosition == -1) ? aggregatorNode.getAggregatorOuterIndexer()
80 : aggregatorNode.getAggregatorOuterIdentityIndexer(resultPosition);
81
82 for (TraceInfo traceInfo : traces)
83 result.assignTraceInfo(traceInfo);
84 return result;
85 } else
86 throw new IllegalArgumentException("Unkown Indexer recipe: " + recipe);
87 }
88
89 /**
90 * PRE: recipe is not an indexer recipe.
91 */
92 public Supplier createNode(ReteContainer reteContainer, ReteNodeRecipe recipe, TraceInfo... traces) {
93 if (recipe instanceof IndexerRecipe)
94 throw new IllegalArgumentException("Indexers are not created by NodeFactory: " + recipe);
95
96 Supplier result = instantiateNodeDispatch(reteContainer, recipe);
97 for (TraceInfo traceInfo : traces)
98 result.assignTraceInfo(traceInfo);
99 return result;
100 }
101
102 private Supplier instantiateNodeDispatch(ReteContainer reteContainer, ReteNodeRecipe recipe) {
103
104 // Parentless
105
106 if (recipe instanceof ConstantRecipe)
107 return instantiateNode(reteContainer, (ConstantRecipe) recipe);
108 if (recipe instanceof InputRecipe)
109 return instantiateNode(reteContainer, (InputRecipe) recipe);
110
111 // SingleParentNodeRecipe
112
113 // if (recipe instanceof ProjectionIndexer)
114 // return instantiateNode((ProjectionIndexer)recipe);
115 if (recipe instanceof InputFilterRecipe)
116 return instantiateNode(reteContainer, (InputFilterRecipe) recipe);
117 if (recipe instanceof InequalityFilterRecipe)
118 return instantiateNode(reteContainer, (InequalityFilterRecipe) recipe);
119 if (recipe instanceof EqualityFilterRecipe)
120 return instantiateNode(reteContainer, (EqualityFilterRecipe) recipe);
121 if (recipe instanceof TransparentRecipe)
122 return instantiateNode(reteContainer, (TransparentRecipe) recipe);
123 if (recipe instanceof TrimmerRecipe)
124 return instantiateNode(reteContainer, (TrimmerRecipe) recipe);
125 if (recipe instanceof TransitiveClosureRecipe)
126 return instantiateNode(reteContainer, (TransitiveClosureRecipe) recipe);
127 if (recipe instanceof RepresentativeElectionRecipe)
128 return instantiateNode(reteContainer, (RepresentativeElectionRecipe) recipe);
129 if (recipe instanceof RelationEvaluationRecipe)
130 return instantiateNode(reteContainer, (RelationEvaluationRecipe) recipe);
131 if (recipe instanceof ExpressionEnforcerRecipe)
132 return instantiateNode(reteContainer, (ExpressionEnforcerRecipe) recipe);
133 if (recipe instanceof CountAggregatorRecipe)
134 return instantiateNode(reteContainer, (CountAggregatorRecipe) recipe);
135 if (recipe instanceof SingleColumnAggregatorRecipe)
136 return instantiateNode(reteContainer, (SingleColumnAggregatorRecipe) recipe);
137 if (recipe instanceof DiscriminatorDispatcherRecipe)
138 return instantiateNode(reteContainer, (DiscriminatorDispatcherRecipe) recipe);
139 if (recipe instanceof DiscriminatorBucketRecipe)
140 return instantiateNode(reteContainer, (DiscriminatorBucketRecipe) recipe);
141
142 // MultiParentNodeRecipe
143 if (recipe instanceof UniquenessEnforcerRecipe)
144 return instantiateNode(reteContainer, (UniquenessEnforcerRecipe) recipe);
145 if (recipe instanceof ProductionRecipe)
146 return instantiateNode(reteContainer, (ProductionRecipe) recipe);
147
148 // BetaNodeRecipe
149 if (recipe instanceof JoinRecipe)
150 return instantiateNode(reteContainer, (JoinRecipe) recipe);
151 if (recipe instanceof SemiJoinRecipe)
152 return instantiateNode(reteContainer, (SemiJoinRecipe) recipe);
153 if (recipe instanceof AntiJoinRecipe)
154 return instantiateNode(reteContainer, (AntiJoinRecipe) recipe);
155
156 // ... else
157 throw new IllegalArgumentException("Unsupported recipe type: " + recipe);
158 }
159
160 // INSTANTIATION for recipe types
161
162 private Supplier instantiateNode(ReteContainer reteContainer, InputRecipe recipe) {
163 return new ExternalInputEnumeratorNode(reteContainer);
164 }
165
166 private Supplier instantiateNode(ReteContainer reteContainer, InputFilterRecipe recipe) {
167 return new ExternalInputStatelessFilterNode(reteContainer, toMaskOrNull(recipe.getMask()));
168 }
169
170 private Supplier instantiateNode(ReteContainer reteContainer, CountAggregatorRecipe recipe) {
171 return new CountNode(reteContainer);
172 }
173
174 private Supplier instantiateNode(ReteContainer reteContainer, TransparentRecipe recipe) {
175 return new TransparentNode(reteContainer);
176 }
177
178 private Supplier instantiateNode(ReteContainer reteContainer, ExpressionEnforcerRecipe recipe) {
179 final IExpressionEvaluator evaluator = toIExpressionEvaluator(recipe.getExpression());
180 final Map<String, Integer> posMapping = toStringIndexMap(recipe.getMappedIndices());
181 final int sourceTupleWidth = recipe.getParent().getArity();
182 EvaluatorCore core = null;
183 if (recipe instanceof CheckRecipe) {
184 core = new EvaluatorCore.PredicateEvaluatorCore(logger, evaluator, posMapping, sourceTupleWidth);
185 } else if (recipe instanceof EvalRecipe) {
186 final boolean isUnwinding = ((EvalRecipe) recipe).isUnwinding();
187 core = new EvaluatorCore.FunctionEvaluatorCore(logger, evaluator, posMapping, sourceTupleWidth, isUnwinding);
188 } else {
189 throw new IllegalArgumentException("Unhandled expression enforcer recipe: " + recipe.getClass() + "!");
190 }
191 if (recipe.isCacheOutput()) {
192 return new OutputCachingEvaluatorNode(reteContainer, core);
193 } else {
194 return new MemorylessEvaluatorNode(reteContainer, core);
195 }
196 }
197
198 @SuppressWarnings({ "rawtypes", "unchecked" })
199 private Supplier instantiateNode(ReteContainer reteContainer, SingleColumnAggregatorRecipe recipe) {
200 final IMultisetAggregationOperator operator = recipe.getMultisetAggregationOperator();
201 TupleMask coreMask = null;
202 if (recipe.getOptionalMonotonicityInfo() != null) {
203 coreMask = toMask(recipe.getOptionalMonotonicityInfo().getCoreMask());
204 } else {
205 coreMask = toMask(recipe.getGroupByMask());
206 }
207
208 if (reteContainer.isTimelyEvaluation()) {
209 final TimelyConfiguration timelyConfiguration = reteContainer.getTimelyConfiguration();
210 final AggregatorArchitecture aggregatorArchitecture = timelyConfiguration.getAggregatorArchitecture();
211 final TimelineRepresentation timelineRepresentation = timelyConfiguration.getTimelineRepresentation();
212
213 TupleMask posetMask = null;
214
215 if (recipe.getOptionalMonotonicityInfo() != null) {
216 posetMask = toMask(recipe.getOptionalMonotonicityInfo().getPosetMask());
217 } else {
218 final int aggregatedColumn = recipe.getAggregableIndex();
219 posetMask = TupleMask.selectSingle(aggregatedColumn, coreMask.sourceWidth);
220 }
221
222 if (timelineRepresentation == TimelineRepresentation.FIRST_ONLY
223 && aggregatorArchitecture == AggregatorArchitecture.SEQUENTIAL) {
224 return new FirstOnlySequentialTimelyColumnAggregatorNode(reteContainer, operator, coreMask, posetMask);
225 } else if (timelineRepresentation == TimelineRepresentation.FIRST_ONLY
226 && aggregatorArchitecture == AggregatorArchitecture.PARALLEL) {
227 return new FirstOnlyParallelTimelyColumnAggregatorNode(reteContainer, operator, coreMask, posetMask);
228 } else if (timelineRepresentation == TimelineRepresentation.FAITHFUL
229 && aggregatorArchitecture == AggregatorArchitecture.SEQUENTIAL) {
230 return new FaithfulSequentialTimelyColumnAggregatorNode(reteContainer, operator, coreMask, posetMask);
231 } else if (timelineRepresentation == TimelineRepresentation.FAITHFUL
232 && aggregatorArchitecture == AggregatorArchitecture.PARALLEL) {
233 return new FaithfulParallelTimelyColumnAggregatorNode(reteContainer, operator, coreMask, posetMask);
234 } else {
235 throw new IllegalArgumentException("Unsupported timely configuration!");
236 }
237 } else if (recipe.isDeleteRederiveEvaluation() && recipe.getOptionalMonotonicityInfo() != null) {
238 final TupleMask posetMask = toMask(recipe.getOptionalMonotonicityInfo().getPosetMask());
239 final IPosetComparator posetComparator = (IPosetComparator) recipe.getOptionalMonotonicityInfo()
240 .getPosetComparator();
241 return new ColumnAggregatorNode(reteContainer, operator, recipe.isDeleteRederiveEvaluation(), coreMask,
242 posetMask, posetComparator);
243 } else {
244 final int aggregatedColumn = recipe.getAggregableIndex();
245 return new ColumnAggregatorNode(reteContainer, operator, coreMask, aggregatedColumn);
246 }
247 }
248
249 private Supplier instantiateNode(ReteContainer reteContainer, TransitiveClosureRecipe recipe) {
250 return new TransitiveClosureNode(reteContainer);
251 }
252
253 private Supplier instantiateNode(ReteContainer reteContainer, RepresentativeElectionRecipe recipe) {
254 RepresentativeElectionAlgorithm.Factory algorithmFactory = switch (recipe.getConnectivity()) {
255 case STRONG -> StronglyConnectedComponentAlgorithm::new;
256 case WEAK -> WeaklyConnectedComponentAlgorithm::new;
257 };
258 return new RepresentativeElectionNode(reteContainer, algorithmFactory);
259 }
260
261 private Supplier instantiateNode(ReteContainer reteContainer, RelationEvaluationRecipe recipe) {
262 return new RelationEvaluatorNode(reteContainer, toIRelationEvaluator(recipe.getEvaluator()));
263 }
264
265 private Supplier instantiateNode(ReteContainer reteContainer, ProductionRecipe recipe) {
266 if (reteContainer.isTimelyEvaluation()) {
267 return new TimelyProductionNode(reteContainer, toStringIndexMap(recipe.getMappedIndices()));
268 } else if (recipe.isDeleteRederiveEvaluation() && recipe.getOptionalMonotonicityInfo() != null) {
269 TupleMask coreMask = toMask(recipe.getOptionalMonotonicityInfo().getCoreMask());
270 TupleMask posetMask = toMask(recipe.getOptionalMonotonicityInfo().getPosetMask());
271 IPosetComparator posetComparator = (IPosetComparator) recipe.getOptionalMonotonicityInfo()
272 .getPosetComparator();
273 return new DefaultProductionNode(reteContainer, toStringIndexMap(recipe.getMappedIndices()),
274 recipe.isDeleteRederiveEvaluation(), coreMask, posetMask, posetComparator);
275 } else {
276 return new DefaultProductionNode(reteContainer, toStringIndexMap(recipe.getMappedIndices()),
277 recipe.isDeleteRederiveEvaluation());
278 }
279 }
280
281 private Supplier instantiateNode(ReteContainer reteContainer, UniquenessEnforcerRecipe recipe) {
282 if (reteContainer.isTimelyEvaluation()) {
283 return new TimelyUniquenessEnforcerNode(reteContainer, recipe.getArity());
284 } else if (recipe.isDeleteRederiveEvaluation() && recipe.getOptionalMonotonicityInfo() != null) {
285 TupleMask coreMask = toMask(recipe.getOptionalMonotonicityInfo().getCoreMask());
286 TupleMask posetMask = toMask(recipe.getOptionalMonotonicityInfo().getPosetMask());
287 IPosetComparator posetComparator = (IPosetComparator) recipe.getOptionalMonotonicityInfo()
288 .getPosetComparator();
289 return new UniquenessEnforcerNode(reteContainer, recipe.getArity(), recipe.isDeleteRederiveEvaluation(),
290 coreMask, posetMask, posetComparator);
291 } else {
292 return new UniquenessEnforcerNode(reteContainer, recipe.getArity(), recipe.isDeleteRederiveEvaluation());
293 }
294 }
295
296 private Supplier instantiateNode(ReteContainer reteContainer, ConstantRecipe recipe) {
297 final List<Object> constantValues = recipe.getConstantValues();
298 final Object[] constantArray = constantValues.toArray(new Object[constantValues.size()]);
299 return new ConstantNode(reteContainer, Tuples.flatTupleOf(constantArray));
300 }
301
302 private Supplier instantiateNode(ReteContainer reteContainer, DiscriminatorBucketRecipe recipe) {
303 return new DiscriminatorBucketNode(reteContainer, recipe.getBucketKey());
304 }
305
306 private Supplier instantiateNode(ReteContainer reteContainer, DiscriminatorDispatcherRecipe recipe) {
307 return new DiscriminatorDispatcherNode(reteContainer, recipe.getDiscriminationColumnIndex());
308 }
309
310 private Supplier instantiateNode(ReteContainer reteContainer, TrimmerRecipe recipe) {
311 return new TrimmerNode(reteContainer, toMask(recipe.getMask()));
312 }
313
314 private Supplier instantiateNode(ReteContainer reteContainer, InequalityFilterRecipe recipe) {
315 Tunnel result = new InequalityFilterNode(reteContainer, recipe.getSubject(),
316 TupleMask.fromSelectedIndices(recipe.getParent().getArity(), recipe.getInequals()));
317 return result;
318 }
319
320 private Supplier instantiateNode(ReteContainer reteContainer, EqualityFilterRecipe recipe) {
321 final int[] equalIndices = TupleMask.integersToIntArray(recipe.getIndices());
322 return new EqualityFilterNode(reteContainer, equalIndices);
323 }
324
325 private Supplier instantiateNode(ReteContainer reteContainer, AntiJoinRecipe recipe) {
326 return new ExistenceNode(reteContainer, true);
327 }
328
329 private Supplier instantiateNode(ReteContainer reteContainer, SemiJoinRecipe recipe) {
330 return new ExistenceNode(reteContainer, false);
331 }
332
333 private Supplier instantiateNode(ReteContainer reteContainer, JoinRecipe recipe) {
334 return new JoinNode(reteContainer, toMask(recipe.getRightParentComplementaryMask()));
335 }
336
337 // HELPERS
338
339 private IExpressionEvaluator toIExpressionEvaluator(ExpressionDefinition expressionDefinition) {
340 final Object evaluator = expressionDefinition.getEvaluator();
341 if (evaluator instanceof IExpressionEvaluator) {
342 return (IExpressionEvaluator) evaluator;
343 }
344 throw new IllegalArgumentException("No runtime support for expression evaluator: " + evaluator);
345 }
346
347 private IRelationEvaluator toIRelationEvaluator(ExpressionDefinition expressionDefinition) {
348 final Object evaluator = expressionDefinition.getEvaluator();
349 if (evaluator instanceof IRelationEvaluator) {
350 return (IRelationEvaluator) evaluator;
351 }
352 throw new IllegalArgumentException("No runtime support for relation evaluator: " + evaluator);
353 }
354
355 private Map<String, Integer> toStringIndexMap(final EMap<String, Integer> mappedIndices) {
356 final HashMap<String, Integer> result = new HashMap<String, Integer>();
357 for (java.util.Map.Entry<String, Integer> entry : mappedIndices) {
358 result.put(entry.getKey(), entry.getValue());
359 }
360 return result;
361 }
362
363 /** Mask can be null */
364 private TupleMask toMaskOrNull(Mask mask) {
365 if (mask == null)
366 return null;
367 else
368 return toMask(mask);
369 }
370
371 /** Mask is non-null. */
372 private TupleMask toMask(Mask mask) {
373 return TupleMask.fromSelectedIndices(mask.getSourceArity(), mask.getSourceIndices());
374 }
375
376}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeProvisioner.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeProvisioner.java
new file mode 100644
index 00000000..9121fc44
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/NodeProvisioner.java
@@ -0,0 +1,346 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
16import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
17import tools.refinery.viatra.runtime.rete.boundary.InputConnector;
18import tools.refinery.viatra.runtime.rete.construction.plancompiler.CompilerHelper;
19import tools.refinery.viatra.runtime.rete.index.Indexer;
20import tools.refinery.viatra.runtime.rete.index.OnetimeIndexer;
21import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
22import tools.refinery.viatra.runtime.rete.network.delayed.DelayedConnectCommand;
23import tools.refinery.viatra.runtime.rete.recipes.*;
24import tools.refinery.viatra.runtime.rete.recipes.helper.RecipeRecognizer;
25import tools.refinery.viatra.runtime.rete.recipes.helper.RecipesHelper;
26import tools.refinery.viatra.runtime.rete.remote.Address;
27import tools.refinery.viatra.runtime.rete.remote.RemoteReceiver;
28import tools.refinery.viatra.runtime.rete.remote.RemoteSupplier;
29import tools.refinery.viatra.runtime.rete.traceability.ActiveNodeConflictTrace;
30import tools.refinery.viatra.runtime.rete.traceability.RecipeTraceInfo;
31import tools.refinery.viatra.runtime.rete.traceability.UserRequestTrace;
32import tools.refinery.viatra.runtime.rete.util.Options;
33
34import java.util.Map;
35import java.util.Set;
36
37/**
38 * Stores the internal parts of a rete network. Nodes are stored according to type and parameters.
39 *
40 * @author Gabor Bergmann
41 */
42public class NodeProvisioner {
43
44 // boolean activeStorage = true;
45
46 ReteContainer reteContainer;
47 NodeFactory nodeFactory;
48 ConnectionFactory connectionFactory;
49 InputConnector inputConnector;
50 IQueryRuntimeContext runtimeContext;
51
52 // TODO as recipe?
53 Map<Supplier, RemoteReceiver> remoteReceivers = CollectionsFactory.createMap();
54 Map<Address<? extends Supplier>, RemoteSupplier> remoteSuppliers = CollectionsFactory.createMap();
55
56 private RecipeRecognizer recognizer;
57
58 /**
59 * PRE: NodeFactory, ConnectionFactory must exist
60 *
61 * @param reteContainer
62 * the ReteNet whose interior is to be mapped.
63 */
64 public NodeProvisioner(ReteContainer reteContainer) {
65 super();
66 this.reteContainer = reteContainer;
67 this.nodeFactory = reteContainer.getNodeFactory();
68 this.connectionFactory = reteContainer.getConnectionFactory();
69 this.inputConnector = reteContainer.getInputConnectionFactory();
70 runtimeContext = reteContainer.getNetwork().getEngine().getRuntimeContext();
71 recognizer = new RecipeRecognizer(runtimeContext);
72 }
73
74 public synchronized Address<? extends Node> getOrCreateNodeByRecipe(RecipeTraceInfo recipeTrace) {
75 ReteNodeRecipe recipe = recipeTrace.getRecipe();
76 Address<? extends Node> result = getNodesByRecipe().get(recipe);
77 if (result != null) {
78 // NODE ALREADY CONSTRUCTED FOR RECIPE, only needs to add trace
79 if (getRecipeTraces().add(recipeTrace))
80 result.getNodeCache().assignTraceInfo(recipeTrace);
81 } else {
82 // No node for this recipe object - but equivalent recipes still
83 // reusable
84 ReteNodeRecipe canonicalRecipe = recognizer.canonicalizeRecipe(recipe);
85 if (canonicalRecipe != recipe) {
86 // FOUND EQUIVALENT RECIPE
87 result = getNodesByRecipe().get(canonicalRecipe);
88 if (result != null) {
89 // NODE ALREADY CONSTRUCTED FOR EQUIVALENT RECIPE
90 recipeTrace.shadowWithEquivalentRecipe(canonicalRecipe);
91 getNodesByRecipe().put(recipe, result);
92 if (getRecipeTraces().add(recipeTrace))
93 result.getNodeCache().assignTraceInfo(recipeTrace);
94 // Bug 491922: ensure that recipe shadowing propagates to
95 // parent traces
96 // note that if equivalentRecipes() becomes more
97 // sophisticated
98 // and considers recipes with different parents, this might
99 // have to be changed
100 ensureParents(recipeTrace);
101 } else {
102 // CONSTRUCTION IN PROGRESS FOR EQUIVALENT RECIPE
103 if (recipe instanceof IndexerRecipe) {
104 // this is allowed for indexers;
105 // go on with the construction, as the same indexer node
106 // will be obtained anyways
107 } else {
108 throw new IllegalStateException(
109 "This should not happen: " + "non-indexer nodes are are supposed to be constructed "
110 + "as soon as they are designated as canonical recipes");
111 }
112 }
113 }
114 if (result == null) {
115 // MUST INSTANTIATE NEW NODE FOR RECIPE
116 final Node freshNode = instantiateNodeForRecipe(recipeTrace, recipe);
117 result = reteContainer.makeAddress(freshNode);
118 }
119 }
120 return result;
121 }
122
123 private Set<RecipeTraceInfo> getRecipeTraces() {
124 return reteContainer.network.recipeTraces;
125 }
126
127 private Node instantiateNodeForRecipe(RecipeTraceInfo recipeTrace, final ReteNodeRecipe recipe) {
128 this.getRecipeTraces().add(recipeTrace);
129 if (recipe instanceof IndexerRecipe) {
130
131 // INSTANTIATE AND HOOK UP
132 // (cannot delay hooking up, because parent determines indexer
133 // implementation)
134 ensureParents(recipeTrace);
135 final ReteNodeRecipe parentRecipe = recipeTrace.getParentRecipeTraces().iterator().next().getRecipe();
136 final Indexer result = nodeFactory.createIndexer(reteContainer, (IndexerRecipe) recipe,
137 asSupplier(
138 (Address<? extends Supplier>) reteContainer.network.getExistingNodeByRecipe(parentRecipe)),
139 recipeTrace);
140
141 // REMEMBER
142 if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER) {
143 getNodesByRecipe().put(recipe, reteContainer.makeAddress(result));
144 }
145
146 return result;
147 } else {
148
149 // INSTANTIATE
150 Node result = nodeFactory.createNode(reteContainer, recipe, recipeTrace);
151
152 // REMEMBER
153 if (Options.nodeSharingOption == Options.NodeSharingOption.ALL) {
154 getNodesByRecipe().put(recipe, reteContainer.makeAddress(result));
155 }
156
157 // HOOK UP
158 // (recursion-tolerant due to this delayed order of initialization)
159 if (recipe instanceof InputRecipe) {
160 inputConnector.connectInput((InputRecipe) recipe, result);
161 } else {
162 if (recipe instanceof InputFilterRecipe)
163 inputConnector.connectInputFilter((InputFilterRecipe) recipe, result);
164 ensureParents(recipeTrace);
165 connectionFactory.connectToParents(recipeTrace, result);
166 }
167 return result;
168 }
169 }
170
171 private Map<ReteNodeRecipe, Address<? extends Node>> getNodesByRecipe() {
172 return reteContainer.network.nodesByRecipe;
173 }
174
175 private void ensureParents(RecipeTraceInfo recipeTrace) {
176 for (RecipeTraceInfo parentTrace : recipeTrace.getParentRecipeTraces()) {
177 getOrCreateNodeByRecipe(parentTrace);
178 }
179 }
180
181 //// Remoting - TODO eliminate?
182
183 synchronized RemoteReceiver accessRemoteReceiver(Address<? extends Supplier> address) {
184 throw new UnsupportedOperationException("Multi-container Rete not supported yet");
185 // if (!reteContainer.isLocal(address))
186 // return
187 // address.getContainer().getProvisioner().accessRemoteReceiver(address);
188 // Supplier localSupplier = reteContainer.resolveLocal(address);
189 // RemoteReceiver result = remoteReceivers.get(localSupplier);
190 // if (result == null) {
191 // result = new RemoteReceiver(reteContainer);
192 // reteContainer.connect(localSupplier, result); // stateless node, no
193 // // synch required
194 //
195 // if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
196 // remoteReceivers.put(localSupplier, result);
197 // }
198 // return result;
199 }
200
201 /**
202 * @pre: address is NOT local
203 */
204 synchronized RemoteSupplier accessRemoteSupplier(Address<? extends Supplier> address) {
205 throw new UnsupportedOperationException("Multi-container Rete not supported yet");
206 // RemoteSupplier result = remoteSuppliers.get(address);
207 // if (result == null) {
208 // result = new RemoteSupplier(reteContainer,
209 // address.getContainer().getProvisioner()
210 // .accessRemoteReceiver(address));
211 // // network.connectAndSynchronize(supplier, result);
212 //
213 // if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
214 // remoteSuppliers.put(address, result);
215 // }
216 // return result;
217 }
218
219 /**
220 * The powerful method for accessing any (supplier) Address as a local supplier.
221 */
222 public Supplier asSupplier(Address<? extends Supplier> address) {
223 if (!reteContainer.isLocal(address))
224 return accessRemoteSupplier(address);
225 else
226 return reteContainer.resolveLocal(address);
227 }
228
229 /** the composite key tuple is formed as (RecipeTraceInfo, TupleMask) */
230 private Map<Tuple, UserRequestTrace> projectionIndexerUserRequests = CollectionsFactory.createMap();
231
232 // local version
233 // TODO remove?
234 public synchronized ProjectionIndexer accessProjectionIndexer(RecipeTraceInfo productionTrace, TupleMask mask) {
235 Tuple tableKey = Tuples.staticArityFlatTupleOf(productionTrace, mask);
236 UserRequestTrace indexerTrace = projectionIndexerUserRequests.computeIfAbsent(tableKey, k -> {
237 final ProjectionIndexerRecipe projectionIndexerRecipe = projectionIndexerRecipe(
238 productionTrace, mask);
239 return new UserRequestTrace(projectionIndexerRecipe, productionTrace);
240 });
241 final Address<? extends Node> address = getOrCreateNodeByRecipe(indexerTrace);
242 return (ProjectionIndexer) reteContainer.resolveLocal(address);
243 }
244
245 // local version
246 public synchronized ProjectionIndexer accessProjectionIndexerOnetime(RecipeTraceInfo supplierTrace,
247 TupleMask mask) {
248 if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
249 return accessProjectionIndexer(supplierTrace, mask);
250
251 final Address<? extends Node> supplierAddress = getOrCreateNodeByRecipe(supplierTrace);
252 Supplier supplier = (Supplier) reteContainer.resolveLocal(supplierAddress);
253
254 OnetimeIndexer result = new OnetimeIndexer(reteContainer, mask);
255 reteContainer.getDelayedCommandQueue().add(new DelayedConnectCommand(supplier, result, reteContainer));
256
257 return result;
258 }
259
260 // local, read-only version
261 public synchronized ProjectionIndexer peekProjectionIndexer(RecipeTraceInfo supplierTrace, TupleMask mask) {
262 final Address<? extends Node> address = getNodesByRecipe().get(projectionIndexerRecipe(supplierTrace, mask));
263 return address == null ? null : (ProjectionIndexer) reteContainer.resolveLocal(address);
264 }
265
266 private ProjectionIndexerRecipe projectionIndexerRecipe(
267 RecipeTraceInfo parentTrace, TupleMask mask) {
268 final ReteNodeRecipe parentRecipe = parentTrace.getRecipe();
269 Tuple tableKey = Tuples.staticArityFlatTupleOf(parentRecipe, mask);
270 ProjectionIndexerRecipe projectionIndexerRecipe = resultSeedRecipes.computeIfAbsent(tableKey, k ->
271 RecipesHelper.projectionIndexerRecipe(parentRecipe, CompilerHelper.toRecipeMask(mask))
272 );
273 return projectionIndexerRecipe;
274 }
275
276 /** the composite key tuple is formed as (ReteNodeRecipe, TupleMask) */
277 private Map<Tuple, ProjectionIndexerRecipe> resultSeedRecipes = CollectionsFactory.createMap();
278
279 // public synchronized Address<? extends Supplier>
280 // accessValueBinderFilterNode(
281 // Address<? extends Supplier> supplierAddress, int bindingIndex, Object
282 // bindingValue) {
283 // Supplier supplier = asSupplier(supplierAddress);
284 // Object[] paramsArray = { supplier.getNodeId(), bindingIndex, bindingValue
285 // };
286 // Tuple params = new FlatTuple(paramsArray);
287 // ValueBinderFilterNode result = valueBinderFilters.get(params);
288 // if (result == null) {
289 // result = new ValueBinderFilterNode(reteContainer, bindingIndex,
290 // bindingValue);
291 // reteContainer.connect(supplier, result); // stateless node, no synch
292 // // required
293 //
294 // if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
295 // valueBinderFilters.put(params, result);
296 // }
297 // return reteContainer.makeAddress(result);
298 // }
299
300 /**
301 * Returns a copy of the given indexer that is an active node by itself (created if does not exist). (Convention:
302 * attached with same mask to a transparent node that is attached to parent node.) Node is created if it does not
303 * exist yet.
304 *
305 * @return an identical but active indexer
306 */
307 // TODO rethink traceability
308 RecipeTraceInfo accessActiveIndexer(RecipeTraceInfo inactiveIndexerRecipeTrace) {
309 final RecipeTraceInfo parentRecipeTrace = inactiveIndexerRecipeTrace.getParentRecipeTraces().iterator().next();
310 final ProjectionIndexerRecipe inactiveIndexerRecipe = (ProjectionIndexerRecipe) inactiveIndexerRecipeTrace
311 .getRecipe();
312
313 final TransparentRecipe transparentRecipe = RecipesFactory.eINSTANCE.createTransparentRecipe();
314 transparentRecipe.setParent(parentRecipeTrace.getRecipe());
315 final ActiveNodeConflictTrace transparentRecipeTrace = new ActiveNodeConflictTrace(transparentRecipe,
316 parentRecipeTrace, inactiveIndexerRecipeTrace);
317
318 final ProjectionIndexerRecipe activeIndexerRecipe = RecipesFactory.eINSTANCE
319 .createProjectionIndexerRecipe();
320 activeIndexerRecipe.setParent(transparentRecipe);
321 activeIndexerRecipe.setMask(inactiveIndexerRecipe.getMask());
322 final ActiveNodeConflictTrace activeIndexerRecipeTrace = new ActiveNodeConflictTrace(activeIndexerRecipe,
323 transparentRecipeTrace, inactiveIndexerRecipeTrace);
324
325 return activeIndexerRecipeTrace;
326 }
327
328 // /**
329 // * @param parent
330 // * @return
331 // */
332 // private TransparentNode accessTransparentNodeInternal(Supplier parent) {
333 // nodeFactory.
334 // return null;
335 // }
336
337 // public synchronized void registerSpecializedProjectionIndexer(Node node,
338 // ProjectionIndexer indexer) {
339 // if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER) {
340 // Object[] paramsArray = { node.getNodeId(), indexer.getMask() };
341 // Tuple params = new FlatTuple(paramsArray);
342 // projectionIndexers.put(params, indexer);
343 // }
344 // }
345
346}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/PosetAwareReceiver.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/PosetAwareReceiver.java
new file mode 100644
index 00000000..1eaa18e7
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/PosetAwareReceiver.java
@@ -0,0 +1,39 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network;
10
11import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
14import tools.refinery.viatra.runtime.matchers.util.Direction;
15
16/**
17 * @author Tamas Szabo
18 * @since 2.0
19 */
20public interface PosetAwareReceiver extends Receiver {
21
22 public TupleMask getCoreMask();
23
24 public TupleMask getPosetMask();
25
26 public IPosetComparator getPosetComparator();
27
28 /**
29 * Updates the receiver with a newly found or lost partial matching also providing information
30 * whether the update is a monotone change or not.
31 *
32 * @param direction the direction of the update
33 * @param update the update tuple
34 * @param monotone true if the update is monotone, false otherwise
35 * @since 2.4
36 */
37 public void updateWithPosetInfo(Direction direction, Tuple update, boolean monotone);
38
39}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ProductionNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ProductionNode.java
new file mode 100644
index 00000000..211194c0
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ProductionNode.java
@@ -0,0 +1,28 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15
16/**
17 * Interface intended for nodes containing complete matches.
18 *
19 * @author Gabor Bergmann
20 */
21public interface ProductionNode extends Tunnel, Iterable<Tuple> {
22
23 /**
24 * @return the position mapping of this particular pattern that maps members of the tuple type to their positions
25 */
26 Map<String, Integer> getPosMapping();
27
28}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Receiver.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Receiver.java
new file mode 100644
index 00000000..3dc9aad7
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Receiver.java
@@ -0,0 +1,85 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12import java.util.Collection;
13import java.util.Map;
14import java.util.Map.Entry;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
19import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
20
21/**
22 * ALL METHODS: FOR INTERNAL USE ONLY; ONLY INVOKE FROM {@link ReteContainer}
23 *
24 * @author Gabor Bergmann
25 * @noimplement This interface is not intended to be implemented by external clients.
26 */
27public interface Receiver extends Node {
28
29 /**
30 * Updates the receiver with a newly found or lost partial matching.
31 *
32 * @since 2.4
33 */
34 public void update(final Direction direction, final Tuple updateElement, final Timestamp timestamp);
35
36 /**
37 * Updates the receiver in batch style with a collection of updates. The input collection consists of pairs in the
38 * form (t, c) where t is an update tuple and c is the count. The count can also be negative, and it specifies how
39 * many times the tuple t gets deleted or inserted. The default implementation of this method simply calls
40 * {@link #update(Direction, Tuple, Timestamp)} individually for all updates.
41 *
42 * @since 2.8
43 */
44 public default void batchUpdate(final Collection<Map.Entry<Tuple, Integer>> updates, final Timestamp timestamp) {
45 for (final Entry<Tuple, Integer> entry : updates) {
46 int count = entry.getValue();
47
48 Direction direction;
49 if (count < 0) {
50 direction = Direction.DELETE;
51 count = -count;
52 } else {
53 direction = Direction.INSERT;
54 }
55
56 for (int i = 0; i < count; i++) {
57 update(direction, entry.getKey(), timestamp);
58 }
59 }
60 }
61
62 /**
63 * Returns the {@link Mailbox} of this receiver.
64 *
65 * @return the mailbox
66 * @since 2.0
67 */
68 public Mailbox getMailbox();
69
70 /**
71 * appends a parent that will continuously send insert and revoke updates to this supplier
72 */
73 void appendParent(final Supplier supplier);
74
75 /**
76 * removes a parent
77 */
78 void removeParent(final Supplier supplier);
79
80 /**
81 * access active parent
82 */
83 Collection<Supplier> getParents();
84
85}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/RederivableNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/RederivableNode.java
new file mode 100644
index 00000000..cae78d37
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/RederivableNode.java
@@ -0,0 +1,34 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network;
10
11/**
12 * A rederivable node can potentially re-derive tuples after the Rete network has finished the delivery of messages.
13 *
14 * @author Tamas Szabo
15 * @since 1.6
16 */
17public interface RederivableNode extends Node, IGroupable {
18
19 /**
20 * The method is called by the {@link ReteContainer} to re-derive tuples after the normal messages have been
21 * delivered and consumed. The re-derivation process may trigger the creation and delivery of further messages
22 * and further re-derivation rounds.
23 */
24 public void rederiveOne();
25
26 /**
27 * Returns true if this node actually runs in DRed mode (not necessarily).
28 *
29 * @return true if the node is operating in DRed mode
30 * @since 2.0
31 */
32 public boolean isInDRedMode();
33
34}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReinitializedNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReinitializedNode.java
new file mode 100644
index 00000000..09bff29e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReinitializedNode.java
@@ -0,0 +1,14 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime.rete.network;
7
8import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
9
10import java.util.Collection;
11
12public interface ReinitializedNode {
13 void reinitializeWith(Collection<Tuple> tuples);
14}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReteContainer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReteContainer.java
new file mode 100644
index 00000000..79e0526d
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/ReteContainer.java
@@ -0,0 +1,729 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10
11package tools.refinery.viatra.runtime.rete.network;
12
13import org.apache.log4j.Logger;
14import tools.refinery.viatra.runtime.CancellationToken;
15import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.Clearable;
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
19import tools.refinery.viatra.runtime.matchers.util.Direction;
20import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
21import tools.refinery.viatra.runtime.rete.boundary.InputConnector;
22import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration;
23import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
24import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
25import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
26import tools.refinery.viatra.runtime.rete.network.communication.timeless.TimelessCommunicationTracker;
27import tools.refinery.viatra.runtime.rete.network.communication.timely.TimelyCommunicationTracker;
28import tools.refinery.viatra.runtime.rete.network.delayed.DelayedCommand;
29import tools.refinery.viatra.runtime.rete.network.delayed.DelayedConnectCommand;
30import tools.refinery.viatra.runtime.rete.network.delayed.DelayedDisconnectCommand;
31import tools.refinery.viatra.runtime.rete.remote.Address;
32import tools.refinery.viatra.runtime.rete.single.SingleInputNode;
33import tools.refinery.viatra.runtime.rete.single.TrimmerNode;
34import tools.refinery.viatra.runtime.rete.util.Options;
35
36import java.util.*;
37import java.util.function.Function;
38
39/**
40 * @author Gabor Bergmann
41 *
42 * Mutexes: externalMessageLock - enlisting messages into and retrieving from the external message queue
43 * @since 2.2
44 */
45public final class ReteContainer {
46
47 protected Thread consumerThread = null;
48 protected boolean killed = false;
49
50 protected Network network;
51
52 protected LinkedList<Clearable> clearables;
53 protected Map<Long, Node> nodesById;
54 protected long nextId = 0;
55
56 protected ConnectionFactory connectionFactory;
57 protected NodeProvisioner nodeProvisioner;
58
59 protected Deque<UpdateMessage> internalMessageQueue = new ArrayDeque<UpdateMessage>();
60 protected/* volatile */Deque<UpdateMessage> externalMessageQueue = new ArrayDeque<UpdateMessage>();
61 protected Object externalMessageLock = new Object();
62 protected Long clock = 1L; // even: steady state, odd: active queue; access
63 // ONLY with messageQueue locked!
64 protected Map<ReteContainer, Long> terminationCriteria = null;
65 protected final Logger logger;
66 protected final CommunicationTracker tracker;
67
68 protected final IQueryBackendContext backendContext;
69
70 protected Set<DelayedCommand> delayedCommandQueue;
71 protected Set<DelayedCommand> delayedCommandBuffer;
72 protected boolean executingDelayedCommands;
73
74 protected final TimelyConfiguration timelyConfiguration;
75
76 private final CancellationToken cancellationToken;
77
78 /**
79 * @param threaded
80 * false if operating in a single-threaded environment
81 */
82 public ReteContainer(Network network, boolean threaded) {
83 super();
84 this.network = network;
85 this.backendContext = network.getEngine().getBackendContext();
86 this.timelyConfiguration = network.getEngine().getTimelyConfiguration();
87 cancellationToken = backendContext.getRuntimeContext().getCancellationToken();
88
89 this.delayedCommandQueue = new LinkedHashSet<DelayedCommand>();
90 this.delayedCommandBuffer = new LinkedHashSet<DelayedCommand>();
91 this.executingDelayedCommands = false;
92
93 if (this.isTimelyEvaluation()) {
94 this.tracker = new TimelyCommunicationTracker(this.getTimelyConfiguration());
95 } else {
96 this.tracker = new TimelessCommunicationTracker();
97 }
98
99 this.nodesById = CollectionsFactory.createMap();
100 this.clearables = new LinkedList<Clearable>();
101 this.logger = network.getEngine().getLogger();
102
103 this.connectionFactory = new ConnectionFactory(this);
104 this.nodeProvisioner = new NodeProvisioner(this);
105
106 if (threaded) {
107 this.terminationCriteria = CollectionsFactory.createMap();
108 this.consumerThread = new Thread("Rete thread of " + ReteContainer.super.toString()) {
109 @Override
110 public void run() {
111 messageConsumptionCycle();
112 }
113 };
114 this.consumerThread.start();
115 }
116 }
117
118 /**
119 * @since 2.4
120 */
121 public boolean isTimelyEvaluation() {
122 return this.timelyConfiguration != null;
123 }
124
125 /**
126 * @since 2.4
127 */
128 public TimelyConfiguration getTimelyConfiguration() {
129 return this.timelyConfiguration;
130 }
131
132 /**
133 * @since 1.6
134 * @return the communication graph of the nodes, incl. message scheduling
135 */
136 public CommunicationTracker getCommunicationTracker() {
137 return tracker;
138 }
139
140 /**
141 * Stops this container. To be called by Network.kill()
142 */
143 public void kill() {
144 killed = true;
145 if (consumerThread != null)
146 consumerThread.interrupt();
147 }
148
149 /**
150 * Establishes connection between a supplier and a receiver node, regardless which container they are in. Assumption
151 * is that this container is the home of the receiver, but it is not strictly necessary.
152 *
153 * @param synchronise
154 * indicates whether the receiver should be synchronised to the current contents of the supplier
155 */
156 public void connectRemoteNodes(Address<? extends Supplier> supplier, Address<? extends Receiver> receiver,
157 boolean synchronise) {
158 if (!isLocal(receiver))
159 receiver.getContainer().connectRemoteNodes(supplier, receiver, synchronise);
160 else {
161 Receiver child = resolveLocal(receiver);
162 connectRemoteSupplier(supplier, child, synchronise);
163 }
164 }
165
166 /**
167 * Severs connection between a supplier and a receiver node, regardless which container they are in. Assumption is
168 * that this container is the home of the receiver, but it is not strictly necessary.
169 *
170 * @param desynchronise
171 * indicates whether the current contents of the supplier should be subtracted from the receiver
172 */
173 public void disconnectRemoteNodes(Address<? extends Supplier> supplier, Address<? extends Receiver> receiver,
174 boolean desynchronise) {
175 if (!isLocal(receiver))
176 receiver.getContainer().disconnectRemoteNodes(supplier, receiver, desynchronise);
177 else {
178 Receiver child = resolveLocal(receiver);
179 disconnectRemoteSupplier(supplier, child, desynchronise);
180 }
181 }
182
183 /**
184 * Establishes connection between a remote supplier and a local receiver node.
185 *
186 * @param synchronise
187 * indicates whether the receiver should be synchronised to the current contents of the supplier
188 */
189 public void connectRemoteSupplier(Address<? extends Supplier> supplier, Receiver receiver, boolean synchronise) {
190 Supplier parent = nodeProvisioner.asSupplier(supplier);
191 if (synchronise)
192 connectAndSynchronize(parent, receiver);
193 else
194 connect(parent, receiver);
195 }
196
197 /**
198 * Severs connection between a remote supplier and a local receiver node.
199 *
200 * @param desynchronise
201 * indicates whether the current contents of the supplier should be subtracted from the receiver
202 */
203 public void disconnectRemoteSupplier(Address<? extends Supplier> supplier, Receiver receiver,
204 boolean desynchronise) {
205 Supplier parent = nodeProvisioner.asSupplier(supplier);
206 if (desynchronise)
207 disconnectAndDesynchronize(parent, receiver);
208 else
209 disconnect(parent, receiver);
210 }
211
212 /**
213 * Connects a receiver to a supplier
214 */
215 public void connect(Supplier supplier, Receiver receiver) {
216 supplier.appendChild(receiver);
217 receiver.appendParent(supplier);
218 tracker.registerDependency(supplier, receiver);
219 }
220
221 /**
222 * Disconnects a receiver from a supplier
223 */
224 public void disconnect(Supplier supplier, Receiver receiver) {
225 supplier.removeChild(receiver);
226 receiver.removeParent(supplier);
227 tracker.unregisterDependency(supplier, receiver);
228 }
229
230 /**
231 * @since 2.3
232 */
233 public boolean isExecutingDelayedCommands() {
234 return this.executingDelayedCommands;
235 }
236
237 /**
238 * @since 2.3
239 */
240 public Set<DelayedCommand> getDelayedCommandQueue() {
241 if (this.executingDelayedCommands) {
242 return this.delayedCommandBuffer;
243 } else {
244 return this.delayedCommandQueue;
245 }
246 }
247
248 /**
249 * Connects a receiver to a remote supplier, and synchronizes it to the current contents of the supplier
250 */
251 public void connectAndSynchronize(Supplier supplier, Receiver receiver) {
252 supplier.appendChild(receiver);
253 receiver.appendParent(supplier);
254 tracker.registerDependency(supplier, receiver);
255 getDelayedCommandQueue().add(new DelayedConnectCommand(supplier, receiver, this));
256 }
257
258 /**
259 * Disconnects a receiver from a supplier
260 */
261 public void disconnectAndDesynchronize(Supplier supplier, Receiver receiver) {
262 final boolean wasInSameSCC = this.isTimelyEvaluation() && this.tracker.areInSameGroup(supplier, receiver);
263 supplier.removeChild(receiver);
264 receiver.removeParent(supplier);
265 tracker.unregisterDependency(supplier, receiver);
266 getDelayedCommandQueue().add(new DelayedDisconnectCommand(supplier, receiver, this, wasInSameSCC));
267 }
268
269 /**
270 * @since 2.3
271 */
272 public void executeDelayedCommands() {
273 if (!this.delayedCommandQueue.isEmpty()) {
274 flushUpdates();
275 this.executingDelayedCommands = true;
276 for (final DelayedCommand command : this.delayedCommandQueue) {
277 command.run();
278 }
279 this.delayedCommandQueue = this.delayedCommandBuffer;
280 this.delayedCommandBuffer = new LinkedHashSet<DelayedCommand>();
281 flushUpdates();
282 this.executingDelayedCommands = false;
283 }
284 }
285
286 /**
287 * Sends an update message to the receiver node, indicating a newly found or lost partial matching. The receiver is
288 * indicated by the Address. Designed to be called by the Network, DO NOT use in any other way. @pre:
289 * address.container == this, e.g. address MUST be local
290 *
291 * @return the value of the container's clock at the time when the message was accepted into the local message queue
292 */
293 long sendUpdateToLocalAddress(Address<? extends Receiver> address, Direction direction, Tuple updateElement) {
294 long timestamp;
295 Receiver receiver = resolveLocal(address);
296 UpdateMessage message = new UpdateMessage(receiver, direction, updateElement);
297 synchronized (externalMessageLock) {
298 externalMessageQueue.add(message);
299 timestamp = clock;
300 externalMessageLock.notifyAll();
301 }
302
303 return timestamp;
304
305 }
306
307 /**
308 * Sends multiple update messages atomically to the receiver node, indicating a newly found or lost partial
309 * matching. The receiver is indicated by the Address. Designed to be called by the Network, DO NOT use in any other
310 * way. @pre: address.container == this, e.g. address MUST be local @pre: updateElements is nonempty!
311 *
312 * @return the value of the container's clock at the time when the message was accepted into the local message queue
313 */
314 long sendUpdatesToLocalAddress(Address<? extends Receiver> address, Direction direction,
315 Collection<Tuple> updateElements) {
316
317 long timestamp;
318 Receiver receiver = resolveLocal(address);
319 // UpdateMessage message = new UpdateMessage(receiver, direction,
320 // updateElement);
321 synchronized (externalMessageLock) {
322 for (Tuple ps : updateElements)
323 externalMessageQueue.add(new UpdateMessage(receiver, direction, ps));
324 // messageQueue.add(new UpdateMessage(resolveLocal(address),
325 // direction, updateElement));
326 // this.sendUpdateInternal(resolveLocal(address), direction,
327 // updateElement);
328 timestamp = clock;
329 externalMessageLock.notifyAll();
330 }
331
332 return timestamp;
333 }
334
335 /**
336 * Sends an update message to the receiver node, indicating a newly found or lost partial matching. The receiver is
337 * indicated by the Address. Designed to be called by the Network in single-threaded operation, DO NOT use in any
338 * other way.
339 */
340 void sendUpdateToLocalAddressSingleThreaded(Address<? extends Receiver> address, Direction direction,
341 Tuple updateElement) {
342 Receiver receiver = resolveLocal(address);
343 UpdateMessage message = new UpdateMessage(receiver, direction, updateElement);
344 internalMessageQueue.add(message);
345 }
346
347 /**
348 * Sends multiple update messages to the receiver node, indicating a newly found or lost partial matching. The
349 * receiver is indicated by the Address. Designed to be called by the Network in single-threaded operation, DO NOT
350 * use in any other way.
351 *
352 * @pre: address.container == this, e.g. address MUST be local
353 */
354 void sendUpdatesToLocalAddressSingleThreaded(Address<? extends Receiver> address, Direction direction,
355 Collection<Tuple> updateElements) {
356 Receiver receiver = resolveLocal(address);
357 for (Tuple ps : updateElements)
358 internalMessageQueue.add(new UpdateMessage(receiver, direction, ps));
359 }
360
361 /**
362 * Sends an update message to a node in a different container. The receiver is indicated by the Address. Designed to
363 * be called by RemoteReceivers, DO NOT use in any other way.
364 *
365 * @since 2.4
366 */
367 public void sendUpdateToRemoteAddress(Address<? extends Receiver> address, Direction direction,
368 Tuple updateElement) {
369 ReteContainer otherContainer = address.getContainer();
370 long otherClock = otherContainer.sendUpdateToLocalAddress(address, direction, updateElement);
371 // Long criterion = terminationCriteria.get(otherContainer);
372 // if (criterion==null || otherClock > criterion)
373 terminationCriteria.put(otherContainer, otherClock);
374 }
375
376 /**
377 * Finalises all update sequences and returns. To be called from user threads (e.g. network construction).
378 */
379 public void flushUpdates() {
380 network.waitForReteTermination();
381 // synchronized (messageQueue)
382 // {
383 // while (!messageQueue.isEmpty())
384 // {
385 // try {
386 // UpdateMessage message = messageQueue.take();
387 // message.receiver.update(message.direction, message.updateElement);
388 // } catch (InterruptedException e) {}
389 // }
390 // }
391 }
392
393 /**
394 * Retrieves a safe copy of the contents of a supplier.
395 *
396 * <p> Note that there may be multiple copies of a Tuple in case of a {@link TrimmerNode}, so the result is not always a set.
397 *
398 * @param flush if true, a flush is performed before pulling the contents
399 * @since 2.3
400 */
401 public Collection<Tuple> pullContents(final Supplier supplier, final boolean flush) {
402 if (flush) {
403 flushUpdates();
404 }
405 final Collection<Tuple> collector = new ArrayList<Tuple>();
406 supplier.pullInto(collector, flush);
407 return collector;
408 }
409
410 /**
411 * @since 2.4
412 */
413 public Map<Tuple, Timeline<Timestamp>> pullContentsWithTimeline(final Supplier supplier, final boolean flush) {
414 if (flush) {
415 flushUpdates();
416 }
417 final Map<Tuple, Timeline<Timestamp>> collector = CollectionsFactory.createMap();
418 supplier.pullIntoWithTimeline(collector, flush);
419 return collector;
420 }
421
422 /**
423 * Retrieves the contents of a SingleInputNode's parentage.
424 *
425 * @since 2.3
426 */
427 public Collection<Tuple> pullPropagatedContents(final SingleInputNode supplier, final boolean flush) {
428 if (flush) {
429 flushUpdates();
430 }
431 final Collection<Tuple> collector = new LinkedList<Tuple>();
432 supplier.propagatePullInto(collector, flush);
433 return collector;
434 }
435
436 /**
437 * Retrieves the timestamp-aware contents of a SingleInputNode's parentage.
438 *
439 * @since 2.3
440 */
441 public Map<Tuple, Timeline<Timestamp>> pullPropagatedContentsWithTimestamp(final SingleInputNode supplier,
442 final boolean flush) {
443 if (flush) {
444 flushUpdates();
445 }
446 final Map<Tuple, Timeline<Timestamp>> collector = CollectionsFactory.createMap();
447 supplier.propagatePullIntoWithTimestamp(collector, flush);
448 return collector;
449 }
450
451 /**
452 * Retrieves the contents of a supplier for a remote caller. Assumption is that this container is the home of the
453 * supplier, but it is not strictly necessary.
454 *
455 * @param supplier
456 * the address of the supplier to be pulled.
457 * @since 2.3
458 */
459 public Collection<Tuple> remotePull(Address<? extends Supplier> supplier, boolean flush) {
460 if (!isLocal(supplier))
461 return supplier.getContainer().remotePull(supplier, flush);
462 return pullContents(resolveLocal(supplier), flush);
463 }
464
465 /**
466 * Proxies for the getPosMapping() of Production nodes. Retrieves the posmapping of a remote or local Production to
467 * a remote or local caller.
468 */
469 public Map<String, Integer> remotePosMapping(Address<? extends ProductionNode> production) {
470 if (!isLocal(production))
471 return production.getContainer().remotePosMapping(production);
472 return resolveLocal(production).getPosMapping();
473 }
474
475 /**
476 * Continually consumes update messages. Should be run on a dedicated thread.
477 */
478 void messageConsumptionCycle() {
479 while (!killed) // deliver messages on and on and on....
480 {
481 long incrementedClock = 0;
482 UpdateMessage message = null;
483
484 if (!internalMessageQueue.isEmpty()) // take internal messages first
485 message = internalMessageQueue.removeFirst();
486 else
487 // no internal message, take an incoming message
488 synchronized (externalMessageLock) { // no sleeping allowed,
489 // because external
490 // queue is locked for
491 // precise clocking of
492 // termination point!
493 if (!externalMessageQueue.isEmpty()) { // if external queue
494 // is non-empty,
495 // retrieve the next
496 // message instantly
497 message = takeExternalMessage();
498 } else { // if external queue is found empty (and this is
499 // the first time in a row)
500 incrementedClock = ++clock; // local termination point
501 // synchronized(clock){incrementedClock = ++clock;}
502 }
503 }
504
505 if (message == null) // both queues were empty
506 {
507 localUpdateTermination(incrementedClock); // report local
508 // termination point
509 while (message == null) // wait for a message while external
510 // queue is still empty
511 {
512 synchronized (externalMessageLock) {
513 while (externalMessageQueue.isEmpty()) {
514 try {
515 externalMessageLock.wait();
516 } catch (InterruptedException e) {
517 if (killed)
518 return;
519 }
520 }
521 message = takeExternalMessage();
522 }
523
524 }
525 }
526
527 // now we have a message to deliver
528 // NOTE: this method is not compatible with differential dataflow
529 message.receiver.update(message.direction, message.updateElement, Timestamp.ZERO);
530 }
531 }
532
533 /**
534 * @since 1.6
535 */
536 public static final Function<Node, String> NAME_MAPPER = input -> input.toString().substring(0,
537 Math.min(30, input.toString().length()));
538
539 /**
540 * Sends out all pending messages to their receivers. The delivery is governed by the communication tracker.
541 *
542 * @since 1.6
543 */
544 public void deliverMessagesSingleThreaded() {
545 if (!backendContext.areUpdatesDelayed()) {
546 if (Options.MONITOR_VIOLATION_OF_RETE_NODEGROUP_TOPOLOGICAL_SORTING) {
547 // known unreachable; enable for debugging only
548
549 CommunicationGroup lastGroup = null;
550 Set<CommunicationGroup> seenInThisCycle = new HashSet<>();
551
552 while (!tracker.isEmpty()) {
553 final CommunicationGroup group = tracker.getAndRemoveFirstGroup();
554
555 /**
556 * The current group does not violate the communication schema iff (1) it was not seen before OR (2)
557 * the last one that was seen is exactly the same as the current one this can happen if the group
558 * was added back because of in-group message passing
559 */
560 boolean okGroup = (group == lastGroup) || seenInThisCycle.add(group);
561
562 if (!okGroup) {
563 logger.error(
564 "[INTERNAL ERROR] Violation of communication schema! The communication component with representative "
565 + group.getRepresentative() + " has already been processed!");
566 }
567
568 group.deliverMessages();
569
570 lastGroup = group;
571 }
572
573 } else {
574 while (!tracker.isEmpty()) {
575 final CommunicationGroup group = tracker.getAndRemoveFirstGroup();
576 group.deliverMessages();
577 }
578 }
579 }
580 }
581
582 private void localUpdateTermination(long incrementedClock) {
583 network.reportLocalUpdateTermination(this, incrementedClock, terminationCriteria);
584 terminationCriteria.clear();
585
586 // synchronized(clock){++clock;} // +1 incrementing for parity and easy
587 // comparison
588 }
589
590 // @pre: externalMessageQueue synchronized && nonempty
591 private UpdateMessage takeExternalMessage() {
592 UpdateMessage message = externalMessageQueue.removeFirst();
593 if (!externalMessageQueue.isEmpty()) { // copy the whole queue over
594 // for speedup
595 Deque<UpdateMessage> temp = externalMessageQueue;
596 externalMessageQueue = internalMessageQueue;
597 internalMessageQueue = temp;
598 }
599 return message;
600 }
601
602 /**
603 * Provides an external address for the selected node.
604 *
605 * @pre node belongs to this container.
606 */
607 public <N extends Node> Address<N> makeAddress(N node) {
608 return new Address<N>(node);
609 }
610
611 /**
612 * Checks whether a certain address points to a node at this container.
613 */
614 public boolean isLocal(Address<? extends Node> address) {
615 return address.getContainer() == this;
616 }
617
618 /**
619 * Returns an addressed node at this container.
620 *
621 * @pre: address.container == this, e.g. address MUST be local
622 * @throws IllegalArgumentException
623 * if address is non-local
624 */
625 @SuppressWarnings("unchecked")
626 public <N extends Node> N resolveLocal(Address<N> address) {
627 if (this != address.getContainer())
628 throw new IllegalArgumentException(String.format("Address %s non-local at container %s", address, this));
629
630 N cached = address.getNodeCache();
631 if (cached != null)
632 return cached;
633 else {
634 N node = (N) nodesById.get(address.getNodeId());
635 address.setNodeCache(node);
636 return node;
637 }
638 }
639
640 /**
641 * Registers a node into the rete network (should be called by constructor). Every node MUST be registered by its
642 * constructor.
643 *
644 * @return the unique nodeId issued to the node.
645 */
646 public long registerNode(Node n) {
647 long id = nextId++;
648 nodesById.put(id, n);
649 return id;
650 }
651
652 /**
653 * Unregisters a node from the rete network. Do NOT call if node is still connected to other Nodes, or Adressed or
654 * otherwise referenced.
655 */
656 public void unregisterNode(Node n) {
657 nodesById.remove(n.getNodeId());
658 }
659
660 /**
661 * Registers a pattern memory into the rete network. Every memory MUST be registered by its owner node.
662 */
663 public void registerClearable(Clearable c) {
664 clearables.addFirst(c);
665 }
666
667 /**
668 * Unregisters a pattern memory from the rete network.
669 */
670 public void unregisterClearable(Clearable c) {
671 clearables.remove(c);
672 }
673
674 /**
675 * Clears all memory contents in the network. Reverts to initial state.
676 */
677 public void clearAll() {
678 for (Clearable c : clearables) {
679 c.clear();
680 }
681 }
682
683 public NodeFactory getNodeFactory() {
684 return network.getNodeFactory();
685 }
686
687 public ConnectionFactory getConnectionFactory() {
688 return connectionFactory;
689 }
690
691 public NodeProvisioner getProvisioner() {
692 return nodeProvisioner;
693 }
694
695 public Network getNetwork() {
696 return network;
697 }
698
699 @Override
700 public String toString() {
701 StringBuilder sb = new StringBuilder();
702 String separator = System.getProperty("line.separator");
703 sb.append(super.toString() + "[[[" + separator);
704 java.util.List<Long> keys = new java.util.ArrayList<Long>(nodesById.keySet());
705 java.util.Collections.sort(keys);
706 for (Long key : keys) {
707 sb.append(key + " -> " + nodesById.get(key) + separator);
708 }
709 sb.append("]]] of " + network);
710 return sb.toString();
711 }
712
713 /**
714 * Access all the Rete nodes inside this container.
715 *
716 * @return the collection of {@link Node} instances
717 */
718 public Collection<Node> getAllNodes() {
719 return nodesById.values();
720 }
721
722 public InputConnector getInputConnectionFactory() {
723 return network.getInputConnector();
724 }
725
726 public void checkCancelled() {
727 cancellationToken.checkCancelled();
728 }
729}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/StandardNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/StandardNode.java
new file mode 100644
index 00000000..7dc7c4bc
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/StandardNode.java
@@ -0,0 +1,123 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10
11package tools.refinery.viatra.runtime.rete.network;
12
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
15import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.rete.index.GenericProjectionIndexer;
18import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
21import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
22
23import java.util.Collection;
24import java.util.HashSet;
25import java.util.List;
26import java.util.Set;
27
28/**
29 * Base implementation for a supplier node.
30 *
31 * @author Gabor Bergmann
32 *
33 */
34public abstract class StandardNode extends BaseNode implements Supplier, NetworkStructureChangeSensitiveNode {
35 protected final List<Receiver> children = CollectionsFactory.createObserverList();
36 /**
37 * @since 2.2
38 */
39 protected final List<Mailbox> childMailboxes = CollectionsFactory.createObserverList();
40
41 public StandardNode(final ReteContainer reteContainer) {
42 super(reteContainer);
43 }
44
45 /**
46 * @since 2.4
47 */
48 protected void propagateUpdate(final Direction direction, final Tuple updateElement, final Timestamp timestamp) {
49 reteContainer.checkCancelled();
50 for (final Mailbox childMailbox : childMailboxes) {
51 childMailbox.postMessage(direction, updateElement, timestamp);
52 }
53 }
54
55 @Override
56 public void appendChild(final Receiver receiver) {
57 children.add(receiver);
58 childMailboxes.add(this.getCommunicationTracker().proxifyMailbox(this, receiver.getMailbox()));
59 }
60
61 @Override
62 public void removeChild(final Receiver receiver) {
63 children.remove(receiver);
64 Mailbox mailboxToRemove = null;
65 for (final Mailbox mailbox : childMailboxes) {
66 if (mailbox.getReceiver() == receiver) {
67 mailboxToRemove = mailbox;
68 break;
69 }
70 }
71 assert mailboxToRemove != null;
72 childMailboxes.remove(mailboxToRemove);
73 }
74
75 @Override
76 public void networkStructureChanged() {
77 childMailboxes.clear();
78 for (final Receiver receiver : children) {
79 childMailboxes.add(this.getCommunicationTracker().proxifyMailbox(this, receiver.getMailbox()));
80 }
81 }
82
83 @Override
84 public Collection<Receiver> getReceivers() {
85 return children;
86 }
87
88 /**
89 * @since 2.2
90 */
91 public Collection<Mailbox> getChildMailboxes() {
92 return this.childMailboxes;
93 }
94
95 @Override
96 public Set<Tuple> getPulledContents(final boolean flush) {
97 final HashSet<Tuple> results = new HashSet<Tuple>();
98 pullInto(results, flush);
99 return results;
100 }
101
102 @Override
103 public ProjectionIndexer constructIndex(final TupleMask mask, final TraceInfo... traces) {
104 final GenericProjectionIndexer indexer = new GenericProjectionIndexer(reteContainer, mask);
105 for (final TraceInfo traceInfo : traces) {
106 indexer.assignTraceInfo(traceInfo);
107 }
108 reteContainer.connectAndSynchronize(this, indexer);
109 return indexer;
110 }
111
112 /**
113 * @since 1.6
114 */
115 protected void issueError(final String message, final Exception ex) {
116 if (ex == null) {
117 this.reteContainer.getNetwork().getEngine().getLogger().error(message);
118 } else {
119 this.reteContainer.getNetwork().getEngine().getLogger().error(message, ex);
120 }
121 }
122
123}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Supplier.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Supplier.java
new file mode 100644
index 00000000..1917a7cf
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Supplier.java
@@ -0,0 +1,82 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12import java.util.Collection;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
19import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21import tools.refinery.viatra.runtime.rete.single.TrimmerNode;
22import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
23
24/**
25 * @author Gabor Bergmann
26 *
27 * A supplier is an object that can propagate insert or revoke events towards receivers.
28 */
29public interface Supplier extends Node {
30
31 /**
32 * Pulls the contents of this object in this particular moment into a target collection.
33 *
34 * @param flush if true, flushing of messages is allowed during the pull, otherwise flushing is not allowed
35 * @since 2.3
36 */
37 public void pullInto(Collection<Tuple> collector, boolean flush);
38
39 /**
40 * @since 2.4
41 */
42 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush);
43
44 /**
45 * Returns the contents of this object in this particular moment.
46 * For memoryless nodes, this may involve a costly recomputation of contents.
47 *
48 * The result is returned as a Set, even when it has multiplicities (at the output of {@link TrimmerNode}).
49 *
50 * <p> Intended mainly for debug purposes; therefore flushing is performed only if explicitly requested
51 * During runtime, flushing may be preferred; see {@link ReteContainer#pullContents(Supplier)}
52 * @since 2.3
53 */
54 public Set<Tuple> getPulledContents(boolean flush);
55
56 default public Set<Tuple> getPulledContents() {
57 return getPulledContents(true);
58 }
59
60 /**
61 * appends a receiver that will continously receive insert and revoke updates from this supplier
62 */
63 void appendChild(Receiver receiver);
64
65 /**
66 * removes a receiver
67 */
68 void removeChild(Receiver receiver);
69
70 /**
71 * Instantiates (or reuses, depending on implementation) an index according to the given mask.
72 *
73 * Intended for internal use; clients should invoke through Library instead to enable reusing.
74 */
75 ProjectionIndexer constructIndex(TupleMask mask, TraceInfo... traces);
76
77 /**
78 * lists receivers
79 */
80 Collection<Receiver> getReceivers();
81
82}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Tunnel.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Tunnel.java
new file mode 100644
index 00000000..f238f47b
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/Tunnel.java
@@ -0,0 +1,19 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12/**
13 * @author Gabor Bergmann
14 *
15 * A Tunnel is an interface into which elments can be instered and from which productions can be extracted.
16 */
17public interface Tunnel extends Supplier, Receiver {
18
19}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/UpdateMessage.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/UpdateMessage.java
new file mode 100644
index 00000000..1334a3a9
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/UpdateMessage.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.network;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.matchers.util.Direction;
14
15class UpdateMessage {
16 public Receiver receiver;
17 public Direction direction;
18 public Tuple updateElement;
19
20 public UpdateMessage(Receiver receiver, Direction direction, Tuple updateElement) {
21 this.receiver = receiver;
22 this.direction = direction;
23 this.updateElement = updateElement;
24 }
25
26 @Override
27 public String toString() {
28 return "M." + direction + ": " + updateElement + " -> " + receiver;
29 }
30
31}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationGroup.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationGroup.java
new file mode 100644
index 00000000..8cedeb11
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationGroup.java
@@ -0,0 +1,103 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication;
10
11import java.util.Collection;
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.rete.network.Node;
15import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
16
17/**
18 * A communication group represents a set of nodes in the communication graph that form a strongly connected component.
19 *
20 * @author Tamas Szabo
21 * @since 1.6
22 */
23public abstract class CommunicationGroup implements Comparable<CommunicationGroup> {
24
25 public static final String UNSUPPORTED_MESSAGE_KIND = "Unsupported message kind ";
26
27 /**
28 * Marker for the {@link CommunicationTracker}
29 */
30 public boolean isEnqueued = false;
31
32 protected final Node representative;
33
34 /**
35 * May be changed during bumping in {@link CommunicationTracker.registerDependency}
36 */
37 protected int identifier;
38
39 /**
40 * @since 1.7
41 */
42 protected final CommunicationTracker tracker;
43
44 /**
45 * @since 1.7
46 */
47 public CommunicationGroup(final CommunicationTracker tracker, final Node representative, final int identifier) {
48 this.tracker = tracker;
49 this.representative = representative;
50 this.identifier = identifier;
51 }
52
53 public abstract void deliverMessages();
54
55 public Node getRepresentative() {
56 return representative;
57 }
58
59 public abstract boolean isEmpty();
60
61 /**
62 * @since 2.0
63 */
64 public abstract void notifyLostAllMessages(final Mailbox mailbox, final MessageSelector kind);
65
66 /**
67 * @since 2.0
68 */
69 public abstract void notifyHasMessage(final Mailbox mailbox, final MessageSelector kind);
70
71 public abstract Map<MessageSelector, Collection<Mailbox>> getMailboxes();
72
73 public abstract boolean isRecursive();
74
75 @Override
76 public int hashCode() {
77 return this.identifier;
78 }
79
80 @Override
81 public String toString() {
82 return this.getClass().getSimpleName() + " " + this.identifier + " - representative: " + this.representative
83 + " - isEmpty: " + isEmpty();
84 }
85
86 @Override
87 public boolean equals(final Object obj) {
88 if (obj == null || this.getClass() != obj.getClass()) {
89 return false;
90 } else if (this == obj) {
91 return true;
92 } else {
93 final CommunicationGroup that = (CommunicationGroup) obj;
94 return this.identifier == that.identifier;
95 }
96 }
97
98 @Override
99 public int compareTo(final CommunicationGroup that) {
100 return this.identifier - that.identifier;
101 }
102
103}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationTracker.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationTracker.java
new file mode 100644
index 00000000..d244e644
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/CommunicationTracker.java
@@ -0,0 +1,467 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication;
10
11import java.util.HashMap;
12import java.util.HashSet;
13import java.util.List;
14import java.util.Map;
15import java.util.PriorityQueue;
16import java.util.Queue;
17import java.util.Set;
18
19import tools.refinery.viatra.runtime.rete.itc.alg.incscc.IncSCCAlg;
20import tools.refinery.viatra.runtime.rete.itc.alg.misc.topsort.TopologicalSorting;
21import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
22import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
23import tools.refinery.viatra.runtime.rete.aggregation.IAggregatorNode;
24import tools.refinery.viatra.runtime.rete.boundary.ExternalInputEnumeratorNode;
25import tools.refinery.viatra.runtime.rete.eval.RelationEvaluatorNode;
26import tools.refinery.viatra.runtime.rete.index.DualInputNode;
27import tools.refinery.viatra.runtime.rete.index.ExistenceNode;
28import tools.refinery.viatra.runtime.rete.index.Indexer;
29import tools.refinery.viatra.runtime.rete.index.IndexerListener;
30import tools.refinery.viatra.runtime.rete.index.IterableIndexer;
31import tools.refinery.viatra.runtime.rete.index.SpecializedProjectionIndexer;
32import tools.refinery.viatra.runtime.rete.network.IGroupable;
33import tools.refinery.viatra.runtime.rete.network.NetworkStructureChangeSensitiveNode;
34import tools.refinery.viatra.runtime.rete.network.Node;
35import tools.refinery.viatra.runtime.rete.network.ProductionNode;
36import tools.refinery.viatra.runtime.rete.network.Receiver;
37import tools.refinery.viatra.runtime.rete.network.ReteContainer;
38import tools.refinery.viatra.runtime.rete.network.communication.timely.TimelyIndexerListenerProxy;
39import tools.refinery.viatra.runtime.rete.network.communication.timely.TimelyMailboxProxy;
40import tools.refinery.viatra.runtime.rete.network.mailbox.FallThroughCapableMailbox;
41import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
42import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
43import tools.refinery.viatra.runtime.rete.single.TransitiveClosureNode;
44import tools.refinery.viatra.runtime.rete.single.TrimmerNode;
45
46/**
47 * An instance of this class is associated with every {@link ReteContainer}. The tracker serves two purposes: <br>
48 * (1) It allows RETE nodes to register their communication dependencies on-the-fly. These dependencies can be
49 * registered or unregistered when nodes are disposed of. <br>
50 * (2) It allows RETE nodes to register their mailboxes as dirty, that is, they can tell the tracker that they have
51 * something to send to other nodes in the network. The tracker is then responsible for ordering these messages (more
52 * precisely, the mailboxes that contain the messages) for the associated {@link ReteContainer}. The ordering is
53 * governed by the strongly connected components in the dependency network and follows a topological sorting scheme;
54 * those mailboxes will be emptied first whose owner nodes do not depend on other undelivered messages.
55 *
56 * @author Tamas Szabo
57 * @since 1.6
58 *
59 */
60public abstract class CommunicationTracker {
61
62 /**
63 * The minimum group id assigned so far
64 */
65 protected int minGroupId;
66
67 /**
68 * The maximum group id assigned so far
69 */
70 protected int maxGroupId;
71
72 /**
73 * The dependency graph of the communications in the RETE network
74 */
75 protected final Graph<Node> dependencyGraph;
76
77 /**
78 * Incremental SCC information about the dependency graph
79 */
80 protected final IncSCCAlg<Node> sccInformationProvider;
81
82 /**
83 * Precomputed node -> communication group map
84 */
85 protected final Map<Node, CommunicationGroup> groupMap;
86
87 /**
88 * Priority queue of active communication groups
89 */
90 protected final Queue<CommunicationGroup> groupQueue;
91
92 // groups should have a simple integer flag which represents its position in a priority queue
93 // priority queue only contains the ACTIVE groups
94
95 public CommunicationTracker() {
96 this.dependencyGraph = new Graph<Node>();
97 this.sccInformationProvider = new IncSCCAlg<Node>(this.dependencyGraph);
98 this.groupQueue = new PriorityQueue<CommunicationGroup>();
99 this.groupMap = new HashMap<Node, CommunicationGroup>();
100 }
101
102 public Graph<Node> getDependencyGraph() {
103 return dependencyGraph;
104 }
105
106 public CommunicationGroup getGroup(final Node node) {
107 return this.groupMap.get(node);
108 }
109
110 private void precomputeGroups() {
111 groupMap.clear();
112
113 // reconstruct group map from dependency graph
114 final Graph<Node> reducedGraph = sccInformationProvider.getReducedGraph();
115 final List<Node> representatives = TopologicalSorting.compute(reducedGraph);
116
117 for (int i = 0; i < representatives.size(); i++) { // groups for SCC representatives
118 final Node representative = representatives.get(i);
119 createAndStoreGroup(representative, i);
120 }
121
122 minGroupId = 0;
123 maxGroupId = representatives.size() - 1;
124
125 for (final Node node : dependencyGraph.getAllNodes()) { // extend group map to the rest of nodes
126 final Node representative = sccInformationProvider.getRepresentative(node);
127 final CommunicationGroup group = groupMap.get(representative);
128 if (representative != node) {
129 addToGroup(node, group);
130 }
131 }
132
133 for (final Node node : dependencyGraph.getAllNodes()) {
134 // set fall-through flags of default mailboxes
135 precomputeFallThroughFlag(node);
136 // perform further tracker-specific post-processing
137 postProcessNode(node);
138 }
139
140 // reconstruct new queue contents based on new group map
141 if (!groupQueue.isEmpty()) {
142 final Set<CommunicationGroup> oldActiveGroups = new HashSet<CommunicationGroup>(groupQueue);
143 groupQueue.clear();
144 reconstructQueueContents(oldActiveGroups);
145 }
146
147 // post process the groups
148 for (final CommunicationGroup group : groupMap.values()) {
149 postProcessGroup(group);
150 }
151 }
152
153 /**
154 * This method is responsible for reconstructing the active queue contents after the network structure has changed.
155 * It it defined as abstract because the reconstruction logic is specific to each {@link CommunicationTracker}.
156 * @since 2.4
157 */
158 protected abstract void reconstructQueueContents(final Set<CommunicationGroup> oldActiveGroups);
159
160 private void addToGroup(final Node node, final CommunicationGroup group) {
161 groupMap.put(node, group);
162 if (node instanceof Receiver) {
163 ((Receiver) node).getMailbox().setCurrentGroup(group);
164 if (node instanceof IGroupable) {
165 ((IGroupable) node).setCurrentGroup(group);
166 }
167 }
168 }
169
170 /**
171 * Depends on the groups, as well as the parent nodes of the argument, so recomputation is needed if these change
172 */
173 private void precomputeFallThroughFlag(final Node node) {
174 CommunicationGroup group = groupMap.get(node);
175 if (node instanceof Receiver) {
176 IGroupable mailbox = ((Receiver) node).getMailbox();
177 if (mailbox instanceof FallThroughCapableMailbox) {
178 Set<Node> directParents = dependencyGraph.getSourceNodes(node).distinctValues();
179 // decide between using quick&cheap fall-through, or allowing for update cancellation
180 boolean fallThrough =
181 // disallow fallthrough: updates at production nodes should cancel, if they can be trimmed or
182 // disjunctive
183 (!(node instanceof ProductionNode && ( // it is a production node...
184 // with more than one parent
185 directParents.size() > 0 ||
186 // or true trimming in its sole parent
187 directParents.size() == 1 && trueTrimming(directParents.iterator().next())))) &&
188 // disallow fallthrough: external updates should be stored (if updates are delayed)
189 (!(node instanceof ExternalInputEnumeratorNode)) &&
190 // disallow fallthrough: RelationEvaluatorNode needs to be notified in batch-style, and the batching is done by the mailbox
191 // however, it is not the RelationEvaluatorNode itself that is interesting here, as that indirectly uses the BatchingReceiver
192 // so we need to disable fall-through for the BatchingReceiver
193 (!(node instanceof RelationEvaluatorNode.BatchingReceiver));
194 // do additional checks
195 if (fallThrough) {
196 // recursive parent groups generate excess updates that should be cancelled after delete&rederive
197 // phases
198 // aggregator and transitive closure parent nodes also generate excess updates that should be
199 // cancelled
200 directParentLoop: for (Node directParent : directParents) {
201 Set<Node> parentsToCheck = new HashSet<>();
202 // check the case where a direct parent is the reason for mailbox usage
203 parentsToCheck.add(directParent);
204 // check the case where an indirect parent (join slot) is the reason for mailbox usage
205 if (directParent instanceof DualInputNode) {
206 // in case of existence join (typically antijoin), a mailbox should allow
207 // an insertion and deletion (at the secondary slot) to cancel each other out
208 if (directParent instanceof ExistenceNode) {
209 fallThrough = false;
210 break directParentLoop;
211 }
212 // in beta nodes, indexer slots (or their active nodes) are considered indirect parents
213 DualInputNode dualInput = (DualInputNode) directParent;
214 IterableIndexer primarySlot = dualInput.getPrimarySlot();
215 if (primarySlot != null)
216 parentsToCheck.add(primarySlot.getActiveNode());
217 Indexer secondarySlot = dualInput.getSecondarySlot();
218 if (secondarySlot != null)
219 parentsToCheck.add(secondarySlot.getActiveNode());
220 }
221 for (Node parent : parentsToCheck) {
222 CommunicationGroup parentGroup = groupMap.get(parent);
223 if ( // parent is in a different, recursive group
224 (group != parentGroup && parentGroup.isRecursive()) ||
225 // node and parent within the same recursive group, and...
226 (group == parentGroup && group.isRecursive() && (
227 // parent is a transitive closure or aggregator node, or a trimmer
228 // allow trimmed or disjunctive tuple updates to cancel each other
229 (parent instanceof TransitiveClosureNode) || (parent instanceof IAggregatorNode)
230 || trueTrimming(parent)))) {
231 fallThrough = false;
232 break directParentLoop;
233 }
234 }
235 }
236 }
237 // overwrite fallthrough flag with newly computed value
238 ((FallThroughCapableMailbox) mailbox).setFallThrough(fallThrough);
239 }
240 }
241 }
242
243 /**
244 * A trimmer node that actually eliminates some columns (not just reorders)
245 */
246 private boolean trueTrimming(Node node) {
247 if (node instanceof TrimmerNode) {
248 TupleMask mask = ((TrimmerNode) node).getMask();
249 return (mask.indices.length != mask.sourceWidth);
250 }
251 return false;
252 }
253
254 public void activateUnenqueued(final CommunicationGroup group) {
255 groupQueue.add(group);
256 group.isEnqueued = true;
257 }
258
259 public void deactivate(final CommunicationGroup group) {
260 groupQueue.remove(group);
261 group.isEnqueued = false;
262 }
263
264 public CommunicationGroup getAndRemoveFirstGroup() {
265 final CommunicationGroup group = groupQueue.poll();
266 group.isEnqueued = false;
267 return group;
268 }
269
270 public boolean isEmpty() {
271 return groupQueue.isEmpty();
272 }
273
274 protected abstract CommunicationGroup createGroup(final Node representative, final int index);
275
276 protected CommunicationGroup createAndStoreGroup(final Node representative, final int index) {
277 final CommunicationGroup group = createGroup(representative, index);
278 addToGroup(representative, group);
279 return group;
280 }
281
282 /**
283 * Registers the dependency that the target {@link Node} depends on the source {@link Node}. In other words, source
284 * may send messages to target in the RETE network. If the dependency edge is already present, this method call is a
285 * noop.
286 *
287 * @param source
288 * the source node
289 * @param target
290 * the target node
291 */
292 public void registerDependency(final Node source, final Node target) {
293 // nodes can be immediately inserted, if they already exist in the graph, this is a noop
294 dependencyGraph.insertNode(source);
295 dependencyGraph.insertNode(target);
296
297 if (!this.dependencyGraph.getTargetNodes(source).containsNonZero(target)) {
298
299 // query all these information before the actual edge insertion
300 // because SCCs may be unified during the process
301 final Node sourceRepresentative = sccInformationProvider.getRepresentative(source);
302 final Node targetRepresentative = sccInformationProvider.getRepresentative(target);
303 final boolean targetHadOutgoingEdges = sccInformationProvider.hasOutgoingEdges(targetRepresentative);
304
305 // insert the edge
306 dependencyGraph.insertEdge(source, target);
307
308 // create groups if they do not yet exist
309 CommunicationGroup sourceGroup = groupMap.get(sourceRepresentative);
310 if (sourceGroup == null) {
311 // create on-demand with the next smaller group id
312 sourceGroup = createAndStoreGroup(sourceRepresentative, --minGroupId);
313 }
314 final int sourceIndex = sourceGroup.identifier;
315
316 CommunicationGroup targetGroup = groupMap.get(targetRepresentative);
317 if (targetGroup == null) {
318 // create on-demand with the next larger group id
319 targetGroup = createAndStoreGroup(targetRepresentative, ++maxGroupId);
320 }
321 final int targetIndex = targetGroup.identifier;
322
323 if (sourceIndex <= targetIndex) {
324 // indices obey current topological ordering
325 refreshFallThroughFlag(target);
326 postProcessNode(source);
327 postProcessNode(target);
328 postProcessGroup(sourceGroup);
329 if (sourceGroup != targetGroup) {
330 postProcessGroup(targetGroup);
331 }
332 } else if (sourceIndex > targetIndex && !targetHadOutgoingEdges) {
333 // indices violate current topological ordering, but we can simply bump the target index
334 final boolean wasEnqueued = targetGroup.isEnqueued;
335 if (wasEnqueued) {
336 groupQueue.remove(targetGroup);
337 }
338 targetGroup.identifier = ++maxGroupId;
339 if (wasEnqueued) {
340 groupQueue.add(targetGroup);
341 }
342
343 refreshFallThroughFlag(target);
344 postProcessNode(source);
345 postProcessNode(target);
346 postProcessGroup(sourceGroup);
347 postProcessGroup(targetGroup);
348 } else {
349 // needs a full re-computation because of more complex change
350 precomputeGroups();
351 }
352 }
353 }
354
355 /**
356 * Returns true if the given {@link Node} is in a recursive {@link CommunicationGroup}, false otherwise.
357 */
358 public boolean isInRecursiveGroup(final Node node) {
359 final CommunicationGroup group = this.getGroup(node);
360 if (group == null) {
361 return false;
362 } else {
363 return group.isRecursive();
364 }
365 }
366
367 /**
368 * Returns true if the given two {@link Node}s are in the same {@link CommunicationGroup}.
369 */
370 public boolean areInSameGroup(final Node left, final Node right) {
371 final CommunicationGroup leftGroup = this.getGroup(left);
372 final CommunicationGroup rightGroup = this.getGroup(right);
373 return leftGroup != null && leftGroup == rightGroup;
374 }
375
376 /**
377 * Unregisters a dependency between source and target.
378 *
379 * @param source
380 * the source node
381 * @param target
382 * the target node
383 */
384 public void unregisterDependency(final Node source, final Node target) {
385 // delete the edge first, and then query the SCC info provider
386 this.dependencyGraph.deleteEdgeIfExists(source, target);
387
388 final Node sourceRepresentative = sccInformationProvider.getRepresentative(source);
389 final Node targetRepresentative = sccInformationProvider.getRepresentative(target);
390
391 // if they are still in the same SCC,
392 // then this deletion did not affect the SCCs,
393 // and it is sufficient to recompute affected fall-through flags;
394 // otherwise, we need a new pre-computation for the groupMap and groupQueue
395 if (sourceRepresentative.equals(targetRepresentative)) {
396 // this deletion could not have affected the split flags
397 refreshFallThroughFlag(target);
398 postProcessNode(source);
399 postProcessNode(target);
400 } else {
401 // preComputeGroups takes care of the split flag maintenance
402 precomputeGroups();
403 }
404 }
405
406 /**
407 * Refresh fall-through flags if dependencies change for given target, but no SCC change
408 */
409 private void refreshFallThroughFlag(final Node target) {
410 precomputeFallThroughFlag(target);
411 if (target instanceof DualInputNode) {
412 for (final Node indirectTarget : dependencyGraph.getTargetNodes(target).distinctValues()) {
413 precomputeFallThroughFlag(indirectTarget);
414 }
415 }
416 }
417
418 /**
419 * Returns true if the given source-target edge in the communication network acts as a recursion cut point.
420 * The current implementation considers edges leading into {@link ProductionNode}s as cut point iff
421 * both source and target belong to the same group.
422 *
423 * @param source the source node
424 * @param target the target node
425 * @return true if the edge is a cut point, false otherwise
426 * @since 2.4
427 */
428 protected boolean isRecursionCutPoint(final Node source, final Node target) {
429 final Node effectiveSource = source instanceof SpecializedProjectionIndexer
430 ? ((SpecializedProjectionIndexer) source).getActiveNode()
431 : source;
432 final CommunicationGroup sourceGroup = this.getGroup(effectiveSource);
433 final CommunicationGroup targetGroup = this.getGroup(target);
434 return sourceGroup != null && sourceGroup == targetGroup && target instanceof ProductionNode;
435 }
436
437 /**
438 * This hook allows concrete tracker implementations to perform tracker-specific post processing on nodes (cf.
439 * {@link NetworkStructureChangeSensitiveNode} and {@link BehaviorChangingMailbox}). At the time of the invocation,
440 * the network topology has already been updated.
441 */
442 protected abstract void postProcessNode(final Node node);
443
444 /**
445 * This hook allows concrete tracker implementations to perform tracker-specific post processing on groups. At the
446 * time of the invocation, the network topology has already been updated.
447 * @since 2.4
448 */
449 protected abstract void postProcessGroup(final CommunicationGroup group);
450
451 /**
452 * Creates a proxy for the given {@link Mailbox} for the given requester {@link Node}. The proxy creation is
453 * {@link CommunicationTracker}-specific and depends on the identity of the requester. This method is primarily used
454 * to create {@link TimelyMailboxProxy}s depending on the network topology. There is no guarantee that the same
455 * proxy instance is returned when this method is called multiple times with the same arguments.
456 */
457 public abstract Mailbox proxifyMailbox(final Node requester, final Mailbox original);
458
459 /**
460 * Creates a proxy for the given {@link IndexerListener} for the given requester {@link Node}. The proxy creation is
461 * {@link CommunicationTracker}-specific and depends on the identity of the requester. This method is primarily used
462 * to create {@link TimelyIndexerListenerProxy}s depending on the network topology. There is no guarantee that the
463 * same proxy instance is returned when this method is called multiple times with the same arguments.
464 */
465 public abstract IndexerListener proxifyIndexerListener(final Node requester, final IndexerListener original);
466
467}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/MessageSelector.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/MessageSelector.java
new file mode 100644
index 00000000..e1a61693
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/MessageSelector.java
@@ -0,0 +1,19 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication;
10
11/**
12 * Subclasses of this interface represent meta data of update messages in Rete.
13 *
14 * @author Tamas Szabo
15 * @since 2.3
16 */
17public interface MessageSelector {
18
19}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/NodeComparator.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/NodeComparator.java
new file mode 100644
index 00000000..27779352
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/NodeComparator.java
@@ -0,0 +1,32 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication;
10
11import java.util.Comparator;
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.rete.network.Node;
15
16/**
17 * @since 2.4
18 */
19public class NodeComparator implements Comparator<Node> {
20
21 protected final Map<Node, Integer> nodeMap;
22
23 public NodeComparator(final Map<Node, Integer> nodeMap) {
24 this.nodeMap = nodeMap;
25 }
26
27 @Override
28 public int compare(final Node left, final Node right) {
29 return this.nodeMap.get(left) - this.nodeMap.get(right);
30 }
31
32} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/PhasedSelector.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/PhasedSelector.java
new file mode 100644
index 00000000..41cd8cd3
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/PhasedSelector.java
@@ -0,0 +1,34 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication;
10
11/**
12 * A default message selector that can be used to associate phases to messages.
13 *
14 * @author Tamas Szabo
15 * @since 2.3
16 */
17public enum PhasedSelector implements MessageSelector {
18
19 /**
20 * No special distinguishing feature
21 */
22 DEFAULT,
23
24 /**
25 * Inserts and delete-insert monotone change pairs
26 */
27 MONOTONE,
28
29 /**
30 * Deletes
31 */
32 ANTI_MONOTONE
33
34}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/Timestamp.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/Timestamp.java
new file mode 100644
index 00000000..a50a63a8
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/Timestamp.java
@@ -0,0 +1,124 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication;
10
11import java.util.AbstractMap;
12import java.util.Collection;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timelines;
18
19/**
20 * A timestamp associated with update messages in timely evaluation.
21 *
22 * @author Tamas Szabo
23 * @since 2.3
24 */
25public class Timestamp implements Comparable<Timestamp>, MessageSelector {
26
27 protected final int value;
28 public static final Timestamp ZERO = new Timestamp(0);
29 /**
30 * @since 2.4
31 */
32 public static final Timeline<Timestamp> INSERT_AT_ZERO_TIMELINE = Timelines.createFrom(Timestamp.ZERO);
33
34 public Timestamp(final int value) {
35 this.value = value;
36 }
37
38 public int getValue() {
39 return value;
40 }
41
42 public Timestamp max(final Timestamp that) {
43 if (this.value >= that.value) {
44 return this;
45 } else {
46 return that;
47 }
48 }
49
50 /**
51 * @since 2.4
52 */
53 public Timestamp min(final Timestamp that) {
54 if (this.value <= that.value) {
55 return this;
56 } else {
57 return that;
58 }
59 }
60
61 @Override
62 public int compareTo(final Timestamp that) {
63 return this.value - that.value;
64 }
65
66 @Override
67 public boolean equals(final Object obj) {
68 if (obj == null || !(obj instanceof Timestamp)) {
69 return false;
70 } else {
71 return this.value == ((Timestamp) obj).value;
72 }
73 }
74
75 @Override
76 public int hashCode() {
77 return this.value;
78 }
79
80 @Override
81 public String toString() {
82 return Integer.toString(this.value);
83 }
84
85 /**
86 * A {@link Map} implementation that associates the zero timestamp with every key. There is no suppor for
87 * {@link Map#entrySet()} due to performance reasons.
88 *
89 * @author Tamas Szabo
90 */
91 public static final class AllZeroMap<T> extends AbstractMap<T, Timeline<Timestamp>> {
92
93 private final Collection<T> wrapped;
94
95 public AllZeroMap(Set<T> wrapped) {
96 this.wrapped = wrapped;
97 }
98
99 @Override
100 public Set<Entry<T, Timeline<Timestamp>>> entrySet() {
101 throw new UnsupportedOperationException("Use the combination of keySet() and get()!");
102 }
103
104 /**
105 * @since 2.4
106 */
107 @Override
108 public Timeline<Timestamp> get(final Object key) {
109 return INSERT_AT_ZERO_TIMELINE;
110 }
111
112 @Override
113 public Set<T> keySet() {
114 return (Set<T>) this.wrapped;
115 }
116
117 @Override
118 public String toString() {
119 return this.getClass().getSimpleName() + ": " + this.keySet().toString();
120 }
121
122 }
123
124}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/RecursiveCommunicationGroup.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/RecursiveCommunicationGroup.java
new file mode 100644
index 00000000..d8260384
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/RecursiveCommunicationGroup.java
@@ -0,0 +1,164 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timeless;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.EnumMap;
14import java.util.LinkedHashSet;
15import java.util.Map;
16import java.util.Set;
17
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
19import tools.refinery.viatra.runtime.rete.network.Node;
20import tools.refinery.viatra.runtime.rete.network.RederivableNode;
21import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
22import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
23import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
24import tools.refinery.viatra.runtime.rete.network.communication.PhasedSelector;
25import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
26
27/**
28 * A communication group representing either a single node where the
29 * node is a monotonicity aware one or a set of nodes that form an SCC.
30 *
31 * @author Tamas Szabo
32 * @since 2.4
33 */
34public class RecursiveCommunicationGroup extends CommunicationGroup {
35
36 private final Set<Mailbox> antiMonotoneMailboxes;
37 private final Set<Mailbox> monotoneMailboxes;
38 private final Set<Mailbox> defaultMailboxes;
39 private final Set<RederivableNode> rederivables;
40 private boolean currentlyDelivering;
41
42 /**
43 * @since 1.7
44 */
45 public RecursiveCommunicationGroup(final CommunicationTracker tracker, final Node representative, final int identifier) {
46 super(tracker, representative, identifier);
47 this.antiMonotoneMailboxes = CollectionsFactory.createSet();
48 this.monotoneMailboxes = CollectionsFactory.createSet();
49 this.defaultMailboxes = CollectionsFactory.createSet();
50 this.rederivables = new LinkedHashSet<RederivableNode>();
51 this.currentlyDelivering = false;
52 }
53
54 @Override
55 public void deliverMessages() {
56 this.currentlyDelivering = true;
57
58 // ANTI-MONOTONE PHASE
59 while (!this.antiMonotoneMailboxes.isEmpty() || !this.defaultMailboxes.isEmpty()) {
60 while (!this.antiMonotoneMailboxes.isEmpty()) {
61 final Mailbox mailbox = this.antiMonotoneMailboxes.iterator().next();
62 this.antiMonotoneMailboxes.remove(mailbox);
63 mailbox.deliverAll(PhasedSelector.ANTI_MONOTONE);
64 }
65 while (!this.defaultMailboxes.isEmpty()) {
66 final Mailbox mailbox = this.defaultMailboxes.iterator().next();
67 this.defaultMailboxes.remove(mailbox);
68 mailbox.deliverAll(PhasedSelector.DEFAULT);
69 }
70 }
71
72 // REDERIVE PHASE
73 while (!this.rederivables.isEmpty()) {
74 // re-derivable nodes take care of their unregistration!!
75 final RederivableNode node = this.rederivables.iterator().next();
76 node.rederiveOne();
77 }
78
79 // MONOTONE PHASE
80 while (!this.monotoneMailboxes.isEmpty() || !this.defaultMailboxes.isEmpty()) {
81 while (!this.monotoneMailboxes.isEmpty()) {
82 final Mailbox mailbox = this.monotoneMailboxes.iterator().next();
83 this.monotoneMailboxes.remove(mailbox);
84 mailbox.deliverAll(PhasedSelector.MONOTONE);
85 }
86 while (!this.defaultMailboxes.isEmpty()) {
87 final Mailbox mailbox = this.defaultMailboxes.iterator().next();
88 this.defaultMailboxes.remove(mailbox);
89 mailbox.deliverAll(PhasedSelector.DEFAULT);
90 }
91 }
92
93 this.currentlyDelivering = false;
94 }
95
96 @Override
97 public boolean isEmpty() {
98 return this.rederivables.isEmpty() && this.antiMonotoneMailboxes.isEmpty()
99 && this.monotoneMailboxes.isEmpty() && this.defaultMailboxes.isEmpty();
100 }
101
102 @Override
103 public void notifyHasMessage(final Mailbox mailbox, final MessageSelector kind) {
104 final Collection<Mailbox> mailboxes = getMailboxContainer(kind);
105 mailboxes.add(mailbox);
106 if (!this.isEnqueued && !this.currentlyDelivering) {
107 this.tracker.activateUnenqueued(this);
108 }
109 }
110
111 @Override
112 public void notifyLostAllMessages(final Mailbox mailbox, final MessageSelector kind) {
113 final Collection<Mailbox> mailboxes = getMailboxContainer(kind);
114 mailboxes.remove(mailbox);
115 if (isEmpty()) {
116 this.tracker.deactivate(this);
117 }
118 }
119
120 private Collection<Mailbox> getMailboxContainer(final MessageSelector kind) {
121 if (kind == PhasedSelector.ANTI_MONOTONE) {
122 return this.antiMonotoneMailboxes;
123 } else if (kind == PhasedSelector.MONOTONE) {
124 return this.monotoneMailboxes;
125 } else if (kind == PhasedSelector.DEFAULT) {
126 return this.defaultMailboxes;
127 } else {
128 throw new IllegalArgumentException(UNSUPPORTED_MESSAGE_KIND + kind);
129 }
130 }
131
132 public void addRederivable(final RederivableNode node) {
133 this.rederivables.add(node);
134 if (!this.isEnqueued) {
135 this.tracker.activateUnenqueued(this);
136 }
137 }
138
139 public void removeRederivable(final RederivableNode node) {
140 this.rederivables.remove(node);
141 if (isEmpty()) {
142 this.tracker.deactivate(this);
143 }
144 }
145
146 public Collection<RederivableNode> getRederivables() {
147 return this.rederivables;
148 }
149
150 @Override
151 public Map<MessageSelector, Collection<Mailbox>> getMailboxes() {
152 Map<PhasedSelector, Collection<Mailbox>> map = new EnumMap<>(PhasedSelector.class);
153 map.put(PhasedSelector.ANTI_MONOTONE, antiMonotoneMailboxes);
154 map.put(PhasedSelector.MONOTONE, monotoneMailboxes);
155 map.put(PhasedSelector.DEFAULT, defaultMailboxes);
156 return Collections.unmodifiableMap(map);
157 }
158
159 @Override
160 public boolean isRecursive() {
161 return true;
162 }
163
164}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/SingletonCommunicationGroup.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/SingletonCommunicationGroup.java
new file mode 100644
index 00000000..c51c7dbf
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/SingletonCommunicationGroup.java
@@ -0,0 +1,86 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timeless;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.rete.network.Node;
16import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
17import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
18import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
19import tools.refinery.viatra.runtime.rete.network.communication.PhasedSelector;
20import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
21
22/**
23 * A communication group containing only a single node with a single default
24 * mailbox.
25 *
26 * @author Tamas Szabo
27 * @since 1.6
28 */
29public class SingletonCommunicationGroup extends CommunicationGroup {
30
31 private Mailbox mailbox;
32
33 /**
34 * @since 1.7
35 */
36 public SingletonCommunicationGroup(final CommunicationTracker tracker, final Node representative, final int identifier) {
37 super(tracker, representative, identifier);
38 }
39
40 @Override
41 public void deliverMessages() {
42 this.mailbox.deliverAll(PhasedSelector.DEFAULT);
43 }
44
45 @Override
46 public boolean isEmpty() {
47 return this.mailbox == null;
48 }
49
50 @Override
51 public void notifyHasMessage(final Mailbox mailbox, final MessageSelector kind) {
52 if (kind == PhasedSelector.DEFAULT) {
53 this.mailbox = mailbox;
54 if (!this.isEnqueued) {
55 this.tracker.activateUnenqueued(this);
56 }
57 } else {
58 throw new IllegalArgumentException(UNSUPPORTED_MESSAGE_KIND + kind);
59 }
60 }
61
62 @Override
63 public void notifyLostAllMessages(final Mailbox mailbox, final MessageSelector kind) {
64 if (kind == PhasedSelector.DEFAULT) {
65 this.mailbox = null;
66 this.tracker.deactivate(this);
67 } else {
68 throw new IllegalArgumentException(UNSUPPORTED_MESSAGE_KIND + kind);
69 }
70 }
71
72 @Override
73 public Map<MessageSelector, Collection<Mailbox>> getMailboxes() {
74 if (mailbox != null) {
75 return Collections.singletonMap(PhasedSelector.DEFAULT, Collections.singleton(mailbox));
76 } else {
77 return Collections.emptyMap();
78 }
79 }
80
81 @Override
82 public boolean isRecursive() {
83 return false;
84 }
85
86}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/TimelessCommunicationTracker.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/TimelessCommunicationTracker.java
new file mode 100644
index 00000000..1c18c1cd
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timeless/TimelessCommunicationTracker.java
@@ -0,0 +1,149 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timeless;
10
11import java.util.Collection;
12import java.util.HashSet;
13import java.util.Set;
14import java.util.Map.Entry;
15
16import tools.refinery.viatra.runtime.rete.index.DualInputNode;
17import tools.refinery.viatra.runtime.rete.index.Indexer;
18import tools.refinery.viatra.runtime.rete.index.IndexerListener;
19import tools.refinery.viatra.runtime.rete.index.IterableIndexer;
20import tools.refinery.viatra.runtime.rete.network.Node;
21import tools.refinery.viatra.runtime.rete.network.Receiver;
22import tools.refinery.viatra.runtime.rete.network.RederivableNode;
23import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
24import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
25import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
26import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
27import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
28
29/**
30 * Timeless implementation of the communication tracker.
31 *
32 * @author Tamas Szabo
33 * @since 2.2
34 */
35public class TimelessCommunicationTracker extends CommunicationTracker {
36
37 @Override
38 protected CommunicationGroup createGroup(Node representative, int index) {
39 final boolean isSingleton = this.sccInformationProvider.sccs.getPartition(representative).size() == 1;
40 final boolean isReceiver = representative instanceof Receiver;
41 final boolean isPosetIndifferent = isReceiver
42 && ((Receiver) representative).getMailbox() instanceof BehaviorChangingMailbox;
43 final boolean isSingletonInDRedMode = isSingleton && (representative instanceof RederivableNode)
44 && ((RederivableNode) representative).isInDRedMode();
45
46 CommunicationGroup group = null;
47 // we can only use a singleton group iff
48 // (1) the SCC has one node AND
49 // (2) either we have a poset-indifferent mailbox OR the node is not even a receiver AND
50 // (3) the node does not run in DRed mode in a singleton group
51 if (isSingleton && (isPosetIndifferent || !isReceiver) && !isSingletonInDRedMode) {
52 group = new SingletonCommunicationGroup(this, representative, index);
53 } else {
54 group = new RecursiveCommunicationGroup(this, representative, index);
55 }
56
57 return group;
58 }
59
60 @Override
61 protected void reconstructQueueContents(final Set<CommunicationGroup> oldActiveGroups) {
62 for (final CommunicationGroup oldGroup : oldActiveGroups) {
63 for (final Entry<MessageSelector, Collection<Mailbox>> entry : oldGroup.getMailboxes().entrySet()) {
64 for (final Mailbox mailbox : entry.getValue()) {
65 final CommunicationGroup newGroup = this.groupMap.get(mailbox.getReceiver());
66 newGroup.notifyHasMessage(mailbox, entry.getKey());
67 }
68 }
69
70 if (oldGroup instanceof RecursiveCommunicationGroup) {
71 for (final RederivableNode node : ((RecursiveCommunicationGroup) oldGroup).getRederivables()) {
72 final CommunicationGroup newGroup = this.groupMap.get(node);
73 if (!(newGroup instanceof RecursiveCommunicationGroup)) {
74 throw new IllegalStateException("The new group must also be recursive! " + newGroup);
75 }
76 ((RecursiveCommunicationGroup) newGroup).addRederivable(node);
77 }
78 }
79 }
80 }
81
82 @Override
83 public Mailbox proxifyMailbox(final Node requester, final Mailbox original) {
84 return original;
85 }
86
87 @Override
88 public IndexerListener proxifyIndexerListener(final Node requester, final IndexerListener original) {
89 return original;
90 }
91
92 @Override
93 protected void postProcessNode(final Node node) {
94 if (node instanceof Receiver) {
95 final Mailbox mailbox = ((Receiver) node).getMailbox();
96 if (mailbox instanceof BehaviorChangingMailbox) {
97 final CommunicationGroup group = this.groupMap.get(node);
98 final Set<Node> sccNodes = this.sccInformationProvider.sccs.getPartition(node);
99 // a default mailbox must split its messages iff
100 // (1) its receiver is in a recursive group and
101 final boolean c1 = group.isRecursive();
102 // (2) its receiver is at the SCC boundary of that group
103 final boolean c2 = isAtSCCBoundary(node);
104 // (3) its group consists of more than one node
105 final boolean c3 = sccNodes.size() > 1;
106 ((BehaviorChangingMailbox) mailbox).setSplitFlag(c1 && c2 && c3);
107 }
108 }
109 }
110
111 @Override
112 protected void postProcessGroup(final CommunicationGroup group) {
113
114 }
115
116 /**
117 * @since 2.0
118 */
119 private boolean isAtSCCBoundary(final Node node) {
120 final CommunicationGroup ownGroup = this.groupMap.get(node);
121 assert ownGroup != null;
122 for (final Node source : this.dependencyGraph.getSourceNodes(node).distinctValues()) {
123 final Set<Node> sourcesToCheck = new HashSet<Node>();
124 sourcesToCheck.add(source);
125 // DualInputNodes must be checked additionally because they do not use a mailbox directly.
126 // It can happen that their indexers actually belong to other SCCs.
127 if (source instanceof DualInputNode) {
128 final DualInputNode dualInput = (DualInputNode) source;
129 final IterableIndexer primarySlot = dualInput.getPrimarySlot();
130 if (primarySlot != null) {
131 sourcesToCheck.add(primarySlot.getActiveNode());
132 }
133 final Indexer secondarySlot = dualInput.getSecondarySlot();
134 if (secondarySlot != null) {
135 sourcesToCheck.add(secondarySlot.getActiveNode());
136 }
137 }
138 for (final Node current : sourcesToCheck) {
139 final CommunicationGroup otherGroup = this.groupMap.get(current);
140 assert otherGroup != null;
141 if (!ownGroup.equals(otherGroup)) {
142 return true;
143 }
144 }
145 }
146 return false;
147 }
148
149}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java
new file mode 100644
index 00000000..8097bd91
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java
@@ -0,0 +1,36 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timely;
10
11import tools.refinery.viatra.runtime.rete.network.IGroupable;
12import tools.refinery.viatra.runtime.rete.network.Node;
13import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
14
15/**
16 * {@link Node}s that implement this interface can resume folding of their states when instructed during timely evaluation.
17 *
18 * @since 2.3
19 * @author Tamas Szabo
20 */
21public interface ResumableNode extends Node, IGroupable {
22
23 /**
24 * When called, the folding of the state shall be resumed at the given timestamp. The resumable is expected to
25 * do a folding step at the given timestamp only. Afterwards, folding shall be interrupted, even if there is more
26 * folding to do towards higher timestamps.
27 */
28 public void resumeAt(final Timestamp timestamp);
29
30 /**
31 * Returns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this
32 * resumable.
33 */
34 public Timestamp getResumableTimestamp();
35
36}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationGroup.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationGroup.java
new file mode 100644
index 00000000..0394d92c
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationGroup.java
@@ -0,0 +1,171 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timely;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Comparator;
14import java.util.HashMap;
15import java.util.Map;
16import java.util.Map.Entry;
17import java.util.Set;
18import java.util.TreeMap;
19import java.util.TreeSet;
20
21import org.apache.log4j.Logger;
22import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
23import tools.refinery.viatra.runtime.rete.network.Node;
24import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
25import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
26import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
27import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
28import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
29import tools.refinery.viatra.runtime.rete.util.Options;
30
31/**
32 * A timely communication group implementation. {@link TimelyMailbox}es and {@link LazyFoldingNode}s are ordered in the
33 * increasing order of timestamps.
34 *
35 * @author Tamas Szabo
36 * @since 2.3
37 */
38public class TimelyCommunicationGroup extends CommunicationGroup {
39
40 private final boolean isSingleton;
41 private final TreeMap<Timestamp, Set<Mailbox>> mailboxQueue;
42 // may be null - only used in the scattered case where we need to take care of mailboxes and resumables too
43 private Comparator<Node> nodeComparator;
44 private boolean currentlyDelivering;
45 private Timestamp currentlyDeliveredTimestamp;
46
47 public TimelyCommunicationGroup(final TimelyCommunicationTracker tracker, final Node representative,
48 final int identifier, final boolean isSingleton) {
49 super(tracker, representative, identifier);
50 this.isSingleton = isSingleton;
51 this.mailboxQueue = CollectionsFactory.createTreeMap();
52 this.currentlyDelivering = false;
53 }
54
55 /**
56 * Sets the {@link Comparator} to be used to order the {@link Mailbox}es at a given {@link Timestamp} in the mailbox
57 * queue. Additionally, reorders already queued {@link Mailbox}es to reflect the new comparator. The comparator may
58 * be null, in this case, no set ordering will be enforced among the {@link Mailbox}es.
59 */
60 public void setComparatorAndReorderMailboxes(final Comparator<Node> nodeComparator) {
61 this.nodeComparator = nodeComparator;
62 if (!this.mailboxQueue.isEmpty()) {
63 final HashMap<Timestamp, Set<Mailbox>> queueCopy = new HashMap<Timestamp, Set<Mailbox>>(this.mailboxQueue);
64 this.mailboxQueue.clear();
65 for (final Entry<Timestamp, Set<Mailbox>> entry : queueCopy.entrySet()) {
66 for (final Mailbox mailbox : entry.getValue()) {
67 this.notifyHasMessage(mailbox, entry.getKey());
68 }
69 }
70 }
71 }
72
73 @Override
74 public void deliverMessages() {
75 this.currentlyDelivering = true;
76 while (!this.mailboxQueue.isEmpty()) {
77 // care must be taken here how we iterate over the mailboxes
78 // it is not okay to loop over the mailboxes at once because a mailbox may disappear from the collection as
79 // a result of delivering messages from another mailboxes under the same timestamp
80 // because of this, it is crucial that we pick the mailboxes one by one
81 final Entry<Timestamp, Set<Mailbox>> entry = this.mailboxQueue.firstEntry();
82 final Timestamp timestamp = entry.getKey();
83 final Set<Mailbox> mailboxes = entry.getValue();
84 final Mailbox mailbox = mailboxes.iterator().next();
85 mailboxes.remove(mailbox);
86 if (mailboxes.isEmpty()) {
87 this.mailboxQueue.pollFirstEntry();
88 }
89 assert mailbox instanceof TimelyMailbox;
90 /* debug */ this.currentlyDeliveredTimestamp = timestamp;
91 mailbox.deliverAll(timestamp);
92 /* debug */ this.currentlyDeliveredTimestamp = null;
93 }
94 this.currentlyDelivering = false;
95 }
96
97 @Override
98 public boolean isEmpty() {
99 return this.mailboxQueue.isEmpty();
100 }
101
102 @Override
103 public void notifyHasMessage(final Mailbox mailbox, MessageSelector kind) {
104 if (kind instanceof Timestamp) {
105 final Timestamp timestamp = (Timestamp) kind;
106 if (Options.MONITOR_VIOLATION_OF_DIFFERENTIAL_DATAFLOW_TIMESTAMPS) {
107 if (timestamp.compareTo(this.currentlyDeliveredTimestamp) < 0) {
108 final Logger logger = this.representative.getContainer().getNetwork().getEngine().getLogger();
109 logger.error(
110 "[INTERNAL ERROR] Violation of differential dataflow communication schema! The communication component with representative "
111 + this.representative + " observed decreasing timestamp during message delivery!");
112 }
113 }
114 final Set<Mailbox> mailboxes = this.mailboxQueue.computeIfAbsent(timestamp, k -> {
115 if (this.nodeComparator == null) {
116 return CollectionsFactory.createSet();
117 } else {
118 return new TreeSet<Mailbox>(new Comparator<Mailbox>() {
119 @Override
120 public int compare(final Mailbox left, final Mailbox right) {
121 return nodeComparator.compare(left.getReceiver(), right.getReceiver());
122 }
123 });
124 }
125 });
126 mailboxes.add(mailbox);
127 if (!this.isEnqueued && !this.currentlyDelivering) {
128 this.tracker.activateUnenqueued(this);
129 }
130 } else {
131 throw new IllegalArgumentException(UNSUPPORTED_MESSAGE_KIND + kind);
132 }
133 }
134
135 @Override
136 public void notifyLostAllMessages(final Mailbox mailbox, final MessageSelector kind) {
137 if (kind instanceof Timestamp) {
138 final Timestamp timestamp = (Timestamp) kind;
139 this.mailboxQueue.compute(timestamp, (k, v) -> {
140 if (v == null) {
141 throw new IllegalStateException("No mailboxes registered at timestamp " + timestamp + "!");
142 }
143 if (!v.remove(mailbox)) {
144 throw new IllegalStateException(
145 "The mailbox " + mailbox + " was not registered at timestamp " + timestamp + "!");
146 }
147 if (v.isEmpty()) {
148 return null;
149 } else {
150 return v;
151 }
152 });
153 if (this.mailboxQueue.isEmpty()) {
154 this.tracker.deactivate(this);
155 }
156 } else {
157 throw new IllegalArgumentException(UNSUPPORTED_MESSAGE_KIND + kind);
158 }
159 }
160
161 @Override
162 public Map<MessageSelector, Collection<Mailbox>> getMailboxes() {
163 return Collections.unmodifiableMap(this.mailboxQueue);
164 }
165
166 @Override
167 public boolean isRecursive() {
168 return !this.isSingleton;
169 }
170
171}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationTracker.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationTracker.java
new file mode 100644
index 00000000..79179880
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyCommunicationTracker.java
@@ -0,0 +1,216 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timely;
10
11import java.util.Collection;
12import java.util.List;
13import java.util.Map;
14import java.util.Map.Entry;
15import java.util.Set;
16import java.util.function.Function;
17
18import tools.refinery.viatra.runtime.rete.itc.alg.misc.topsort.TopologicalSorting;
19import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.rete.index.IndexerListener;
22import tools.refinery.viatra.runtime.rete.index.SpecializedProjectionIndexer;
23import tools.refinery.viatra.runtime.rete.index.SpecializedProjectionIndexer.ListenerSubscription;
24import tools.refinery.viatra.runtime.rete.index.StandardIndexer;
25import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration;
26import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.TimelineRepresentation;
27import tools.refinery.viatra.runtime.rete.network.NetworkStructureChangeSensitiveNode;
28import tools.refinery.viatra.runtime.rete.network.Node;
29import tools.refinery.viatra.runtime.rete.network.ProductionNode;
30import tools.refinery.viatra.runtime.rete.network.StandardNode;
31import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
32import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
33import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
34import tools.refinery.viatra.runtime.rete.network.communication.NodeComparator;
35import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
36import tools.refinery.viatra.runtime.rete.single.DiscriminatorDispatcherNode;
37
38/**
39 * Timely (DDF) implementation of the {@link CommunicationTracker}.
40 *
41 * @author Tamas Szabo
42 * @since 2.3
43 */
44public class TimelyCommunicationTracker extends CommunicationTracker {
45
46 protected final TimelyConfiguration configuration;
47
48 public TimelyCommunicationTracker(final TimelyConfiguration configuration) {
49 this.configuration = configuration;
50 }
51
52 @Override
53 protected CommunicationGroup createGroup(final Node representative, final int index) {
54 final boolean isSingleton = this.sccInformationProvider.sccs.getPartition(representative).size() == 1;
55 return new TimelyCommunicationGroup(this, representative, index, isSingleton);
56 }
57
58 @Override
59 protected void reconstructQueueContents(final Set<CommunicationGroup> oldActiveGroups) {
60 for (final CommunicationGroup oldGroup : oldActiveGroups) {
61 for (final Entry<MessageSelector, Collection<Mailbox>> entry : oldGroup.getMailboxes().entrySet()) {
62 for (final Mailbox mailbox : entry.getValue()) {
63 final CommunicationGroup newGroup = this.groupMap.get(mailbox.getReceiver());
64 newGroup.notifyHasMessage(mailbox, entry.getKey());
65 }
66 }
67 }
68 }
69
70 @Override
71 public Mailbox proxifyMailbox(final Node requester, final Mailbox original) {
72 final Mailbox mailboxToProxify = (original instanceof TimelyMailboxProxy)
73 ? ((TimelyMailboxProxy) original).getWrappedMailbox()
74 : original;
75 final TimestampTransformation preprocessor = getPreprocessor(requester, mailboxToProxify.getReceiver());
76 if (preprocessor == null) {
77 return mailboxToProxify;
78 } else {
79 return new TimelyMailboxProxy(mailboxToProxify, preprocessor);
80 }
81 }
82
83 @Override
84 public IndexerListener proxifyIndexerListener(final Node requester, final IndexerListener original) {
85 final IndexerListener listenerToProxify = (original instanceof TimelyIndexerListenerProxy)
86 ? ((TimelyIndexerListenerProxy) original).getWrappedIndexerListener()
87 : original;
88 final TimestampTransformation preprocessor = getPreprocessor(requester, listenerToProxify.getOwner());
89 if (preprocessor == null) {
90 return listenerToProxify;
91 } else {
92 return new TimelyIndexerListenerProxy(listenerToProxify, preprocessor);
93 }
94 }
95
96 protected TimestampTransformation getPreprocessor(final Node source, final Node target) {
97 final Node effectiveSource = source instanceof SpecializedProjectionIndexer
98 ? ((SpecializedProjectionIndexer) source).getActiveNode()
99 : source;
100 final CommunicationGroup sourceGroup = this.getGroup(effectiveSource);
101 final CommunicationGroup targetGroup = this.getGroup(target);
102
103 if (sourceGroup != null && targetGroup != null) {
104 // during RETE construction, the groups may be still null
105 if (sourceGroup != targetGroup && sourceGroup.isRecursive()) {
106 // targetGroup is a successor SCC of sourceGroup
107 // and sourceGroup is a recursive SCC
108 // then we need to zero out the timestamps
109 return TimestampTransformation.RESET;
110 }
111 if (sourceGroup == targetGroup && target instanceof ProductionNode) {
112 // if requester and receiver are in the same SCC
113 // and receiver is a production node
114 // then we need to increment the timestamps
115 return TimestampTransformation.INCREMENT;
116 }
117 }
118
119 return null;
120 }
121
122 @Override
123 protected void postProcessNode(final Node node) {
124 if (node instanceof NetworkStructureChangeSensitiveNode) {
125 ((NetworkStructureChangeSensitiveNode) node).networkStructureChanged();
126 }
127 }
128
129 @Override
130 protected void postProcessGroup(final CommunicationGroup group) {
131 if (this.configuration.getTimelineRepresentation() == TimelineRepresentation.FAITHFUL) {
132 final Node representative = group.getRepresentative();
133 final Set<Node> groupMembers = this.sccInformationProvider.sccs.getPartition(representative);
134 if (groupMembers.size() > 1) {
135 final Graph<Node> graph = new Graph<Node>();
136
137 for (final Node node : groupMembers) {
138 graph.insertNode(node);
139 }
140
141 for (final Node source : groupMembers) {
142 for (final Node target : this.dependencyGraph.getTargetNodes(source)) {
143 // (1) the edge is not a recursion cut point
144 // (2) the edge is within this group
145 if (!this.isRecursionCutPoint(source, target) && groupMembers.contains(target)) {
146 graph.insertEdge(source, target);
147 }
148 }
149 }
150
151 final List<Node> orderedNodes = TopologicalSorting.compute(graph);
152 final Map<Node, Integer> nodeMap = CollectionsFactory.createMap();
153 int identifier = 0;
154 for (final Node orderedNode : orderedNodes) {
155 nodeMap.put(orderedNode, identifier++);
156 }
157
158 ((TimelyCommunicationGroup) group).setComparatorAndReorderMailboxes(new NodeComparator(nodeMap));
159 }
160 }
161 }
162
163 /**
164 * This static field is used for debug purposes in the DotGenerator.
165 */
166 public static final Function<Node, Function<Node, String>> EDGE_LABEL_FUNCTION = new Function<Node, Function<Node, String>>() {
167
168 @Override
169 public Function<Node, String> apply(final Node source) {
170 return new Function<Node, String>() {
171 @Override
172 public String apply(final Node target) {
173 if (source instanceof SpecializedProjectionIndexer) {
174 final Collection<ListenerSubscription> subscriptions = ((SpecializedProjectionIndexer) source)
175 .getSubscriptions();
176 for (final ListenerSubscription subscription : subscriptions) {
177 if (subscription.getListener().getOwner() == target
178 && subscription.getListener() instanceof TimelyIndexerListenerProxy) {
179 return ((TimelyIndexerListenerProxy) subscription.getListener()).preprocessor
180 .toString();
181 }
182 }
183 }
184 if (source instanceof StandardIndexer) {
185 final Collection<IndexerListener> listeners = ((StandardIndexer) source).getListeners();
186 for (final IndexerListener listener : listeners) {
187 if (listener.getOwner() == target && listener instanceof TimelyIndexerListenerProxy) {
188 return ((TimelyIndexerListenerProxy) listener).preprocessor.toString();
189 }
190 }
191 }
192 if (source instanceof StandardNode) {
193 final Collection<Mailbox> mailboxes = ((StandardNode) source).getChildMailboxes();
194 for (final Mailbox mailbox : mailboxes) {
195 if (mailbox.getReceiver() == target && mailbox instanceof TimelyMailboxProxy) {
196 return ((TimelyMailboxProxy) mailbox).preprocessor.toString();
197 }
198 }
199 }
200 if (source instanceof DiscriminatorDispatcherNode) {
201 final Collection<Mailbox> mailboxes = ((DiscriminatorDispatcherNode) source)
202 .getBucketMailboxes().values();
203 for (final Mailbox mailbox : mailboxes) {
204 if (mailbox.getReceiver() == target && mailbox instanceof TimelyMailboxProxy) {
205 return ((TimelyMailboxProxy) mailbox).preprocessor.toString();
206 }
207 }
208 }
209 return null;
210 }
211 };
212 }
213
214 };
215
216}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyIndexerListenerProxy.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyIndexerListenerProxy.java
new file mode 100644
index 00000000..e8fbf84e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyIndexerListenerProxy.java
@@ -0,0 +1,81 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timely;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12import tools.refinery.viatra.runtime.matchers.util.Direction;
13import tools.refinery.viatra.runtime.matchers.util.Preconditions;
14import tools.refinery.viatra.runtime.rete.index.IndexerListener;
15import tools.refinery.viatra.runtime.rete.network.Node;
16import tools.refinery.viatra.runtime.rete.network.ProductionNode;
17import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
18
19/**
20 * A timely proxy for another {@link IndexerListener}, which performs some preprocessing
21 * on the differential timestamps before passing it on to the real recipient.
22 * <p>
23 * These proxies are used on edges leading into {@link ProductionNode}s. Because {@link ProductionNode}s
24 * never ask back the indexer for its contents, there is no need to also apply the proxy on that direction.
25 *
26 * @author Tamas Szabo
27 * @since 2.3
28 */
29public class TimelyIndexerListenerProxy implements IndexerListener {
30
31 protected final TimestampTransformation preprocessor;
32 protected final IndexerListener wrapped;
33
34 public TimelyIndexerListenerProxy(final IndexerListener wrapped,
35 final TimestampTransformation preprocessor) {
36 Preconditions.checkArgument(!(wrapped instanceof TimelyIndexerListenerProxy), "Proxy in a proxy is not allowed!");
37 this.wrapped = wrapped;
38 this.preprocessor = preprocessor;
39 }
40
41 public IndexerListener getWrappedIndexerListener() {
42 return wrapped;
43 }
44
45 @Override
46 public Node getOwner() {
47 return this.wrapped.getOwner();
48 }
49
50 @Override
51 public void notifyIndexerUpdate(final Direction direction, final Tuple updateElement, final Tuple signature,
52 final boolean change, final Timestamp timestamp) {
53 this.wrapped.notifyIndexerUpdate(direction, updateElement, signature, change, preprocessor.process(timestamp));
54 }
55
56 @Override
57 public String toString() {
58 return this.preprocessor.toString() + "_PROXY -> " + this.wrapped.toString();
59 }
60
61 @Override
62 public boolean equals(final Object obj) {
63 if (obj == null || obj.getClass() != this.getClass()) {
64 return false;
65 } else if (obj == this) {
66 return true;
67 } else {
68 final TimelyIndexerListenerProxy that = (TimelyIndexerListenerProxy) obj;
69 return this.wrapped.equals(that.wrapped) && this.preprocessor == that.preprocessor;
70 }
71 }
72
73 @Override
74 public int hashCode() {
75 int hash = 1;
76 hash = hash * 17 + this.wrapped.hashCode();
77 hash = hash * 31 + this.preprocessor.hashCode();
78 return hash;
79 }
80
81}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyMailboxProxy.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyMailboxProxy.java
new file mode 100644
index 00000000..550bfbeb
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimelyMailboxProxy.java
@@ -0,0 +1,102 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timely;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12import tools.refinery.viatra.runtime.matchers.util.Direction;
13import tools.refinery.viatra.runtime.matchers.util.Preconditions;
14import tools.refinery.viatra.runtime.rete.network.Receiver;
15import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
16import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
17import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
18import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
19
20/**
21 * A timely proxy for another {@link Mailbox}, which performs some preprocessing
22 * on the differential timestamps before passing it on to the real recipient.
23 *
24 * @author Tamas Szabo
25 * @since 2.3
26 */
27public class TimelyMailboxProxy implements Mailbox {
28
29 protected final TimestampTransformation preprocessor;
30 protected final Mailbox wrapped;
31
32 public TimelyMailboxProxy(final Mailbox wrapped, final TimestampTransformation preprocessor) {
33 Preconditions.checkArgument(!(wrapped instanceof TimelyMailboxProxy), "Proxy in a proxy is not allowed!");
34 this.wrapped = wrapped;
35 this.preprocessor = preprocessor;
36 }
37
38 public Mailbox getWrappedMailbox() {
39 return wrapped;
40 }
41
42 @Override
43 public void postMessage(final Direction direction, final Tuple update, final Timestamp timestamp) {
44 this.wrapped.postMessage(direction, update, preprocessor.process(timestamp));
45 }
46
47 @Override
48 public String toString() {
49 return this.preprocessor.toString() + "_PROXY -> " + this.wrapped.toString();
50 }
51
52 @Override
53 public void clear() {
54 this.wrapped.clear();
55 }
56
57 @Override
58 public void deliverAll(final MessageSelector selector) {
59 this.wrapped.deliverAll(selector);
60 }
61
62 @Override
63 public CommunicationGroup getCurrentGroup() {
64 return this.wrapped.getCurrentGroup();
65 }
66
67 @Override
68 public void setCurrentGroup(final CommunicationGroup group) {
69 this.wrapped.setCurrentGroup(group);
70 }
71
72 @Override
73 public Receiver getReceiver() {
74 return this.wrapped.getReceiver();
75 }
76
77 @Override
78 public boolean isEmpty() {
79 return this.wrapped.isEmpty();
80 }
81
82 @Override
83 public boolean equals(final Object obj) {
84 if (obj == null || obj.getClass() != this.getClass()) {
85 return false;
86 } else if (obj == this) {
87 return true;
88 } else {
89 final TimelyMailboxProxy that = (TimelyMailboxProxy) obj;
90 return this.wrapped.equals(that.wrapped) && this.preprocessor == that.preprocessor;
91 }
92 }
93
94 @Override
95 public int hashCode() {
96 int hash = 1;
97 hash = hash * 17 + this.wrapped.hashCode();
98 hash = hash * 31 + this.preprocessor.hashCode();
99 return hash;
100 }
101
102}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimestampTransformation.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimestampTransformation.java
new file mode 100644
index 00000000..8929eb5c
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/TimestampTransformation.java
@@ -0,0 +1,48 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.communication.timely;
10
11import tools.refinery.viatra.runtime.rete.network.Node;
12import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
13
14/**
15 * Values of this enum perform different kind of preprocessing on {@link Timestamp}s.
16 * This is used on edges leading in and out from {@link Node}s in recursive {@link TimelyCommunicationGroup}s.
17 *
18 * @author Tamas Szabo
19 * @since 2.3
20 */
21public enum TimestampTransformation {
22
23 INCREMENT {
24 @Override
25 public Timestamp process(final Timestamp timestamp) {
26 return new Timestamp(timestamp.getValue() + 1);
27 }
28
29 @Override
30 public String toString() {
31 return "INCREMENT";
32 }
33 },
34 RESET {
35 @Override
36 public Timestamp process(final Timestamp timestamp) {
37 return Timestamp.ZERO;
38 }
39
40 @Override
41 public String toString() {
42 return "RESET";
43 }
44 };
45
46 public abstract Timestamp process(final Timestamp timestamp);
47
48}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedCommand.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedCommand.java
new file mode 100644
index 00000000..d6312671
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedCommand.java
@@ -0,0 +1,81 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.delayed;
10
11import java.util.Collection;
12import java.util.Map;
13import java.util.Map.Entry;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.matchers.util.Signed;
18import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
19import tools.refinery.viatra.runtime.rete.network.Network;
20import tools.refinery.viatra.runtime.rete.network.Node;
21import tools.refinery.viatra.runtime.rete.network.Receiver;
22import tools.refinery.viatra.runtime.rete.network.ReteContainer;
23import tools.refinery.viatra.runtime.rete.network.Supplier;
24import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
25import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
26import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
27
28/**
29 * Instances of this class are responsible for initializing a {@link Receiver} with the contents of a {@link Supplier}.
30 * However, due to the dynamic nature of the Rete {@link Network} and to the fact that certain {@link Node}s in the
31 * {@link Network} are sensitive to the shape of the {@link Network}, the commands must be delayed until the
32 * construction of the {@link Network} has stabilized.
33 *
34 * @author Tamas Szabo
35 * @since 2.3
36 */
37public abstract class DelayedCommand implements Runnable {
38
39 protected final Supplier supplier;
40 protected final Receiver receiver;
41 protected final Direction direction;
42 protected final ReteContainer container;
43
44 public DelayedCommand(final Supplier supplier, final Receiver receiver, final Direction direction,
45 final ReteContainer container) {
46 this.supplier = supplier;
47 this.receiver = receiver;
48 this.direction = direction;
49 this.container = container;
50 }
51
52 @Override
53 public void run() {
54 final CommunicationTracker tracker = this.container.getCommunicationTracker();
55 final Mailbox mailbox = tracker.proxifyMailbox(this.supplier, this.receiver.getMailbox());
56
57 if (this.isTimestampAware()) {
58 final Map<Tuple, Timeline<Timestamp>> contents = this.container.pullContentsWithTimeline(this.supplier,
59 false);
60 for (final Entry<Tuple, Timeline<Timestamp>> entry : contents.entrySet()) {
61 for (final Signed<Timestamp> change : entry.getValue().asChangeSequence()) {
62 mailbox.postMessage(change.getDirection().multiply(this.direction), entry.getKey(),
63 change.getPayload());
64 }
65 }
66 } else {
67 final Collection<Tuple> contents = this.container.pullContents(this.supplier, false);
68 for (final Tuple tuple : contents) {
69 mailbox.postMessage(this.direction, tuple, Timestamp.ZERO);
70 }
71 }
72 }
73
74 @Override
75 public String toString() {
76 return this.supplier + " -> " + this.receiver.toString();
77 }
78
79 protected abstract boolean isTimestampAware();
80
81}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedConnectCommand.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedConnectCommand.java
new file mode 100644
index 00000000..1bfdbec6
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedConnectCommand.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.delayed;
10
11import tools.refinery.viatra.runtime.matchers.util.Direction;
12import tools.refinery.viatra.runtime.rete.network.Receiver;
13import tools.refinery.viatra.runtime.rete.network.ReteContainer;
14import tools.refinery.viatra.runtime.rete.network.Supplier;
15
16public class DelayedConnectCommand extends DelayedCommand {
17
18 public DelayedConnectCommand(final Supplier supplier, final Receiver receiver, final ReteContainer container) {
19 super(supplier, receiver, Direction.INSERT, container);
20 }
21
22 @Override
23 protected boolean isTimestampAware() {
24 return this.container.isTimelyEvaluation() && this.container.getCommunicationTracker().areInSameGroup(this.supplier, this.receiver);
25 }
26
27}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedDisconnectCommand.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedDisconnectCommand.java
new file mode 100644
index 00000000..5825a971
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/delayed/DelayedDisconnectCommand.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.delayed;
10
11import tools.refinery.viatra.runtime.matchers.util.Direction;
12import tools.refinery.viatra.runtime.rete.network.Receiver;
13import tools.refinery.viatra.runtime.rete.network.ReteContainer;
14import tools.refinery.viatra.runtime.rete.network.Supplier;
15
16public class DelayedDisconnectCommand extends DelayedCommand {
17
18 protected final boolean wasInSameSCC;
19
20 public DelayedDisconnectCommand(final Supplier supplier, final Receiver receiver, final ReteContainer container, final boolean wasInSameSCC) {
21 super(supplier, receiver, Direction.DELETE, container);
22 this.wasInSameSCC = wasInSameSCC;
23 }
24
25 @Override
26 protected boolean isTimestampAware() {
27 return this.wasInSameSCC;
28 }
29
30}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/DefaultMessageIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/DefaultMessageIndexer.java
new file mode 100644
index 00000000..da9bc47e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/DefaultMessageIndexer.java
@@ -0,0 +1,74 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.indexer;
10
11import java.util.Collections;
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
16
17/**
18 * @author Tamas Szabo
19 * @since 2.0
20 */
21public class DefaultMessageIndexer implements MessageIndexer {
22
23 protected final Map<Tuple, Integer> indexer;
24
25 public DefaultMessageIndexer() {
26 this.indexer = CollectionsFactory.createMap();
27 }
28
29 public Map<Tuple, Integer> getTuples() {
30 return Collections.unmodifiableMap(this.indexer);
31 }
32
33 @Override
34 public int getCount(final Tuple update) {
35 final Integer count = getTuples().get(update);
36 if (count == null) {
37 return 0;
38 } else {
39 return count;
40 }
41 }
42
43 @Override
44 public void insert(final Tuple update) {
45 update(update, 1);
46 }
47
48 @Override
49 public void delete(final Tuple update) {
50 update(update, -1);
51 }
52
53 @Override
54 public void update(final Tuple update, final int delta) {
55 final Integer oldCount = this.indexer.get(update);
56 final int newCount = (oldCount == null ? 0 : oldCount) + delta;
57 if (newCount == 0) {
58 this.indexer.remove(update);
59 } else {
60 this.indexer.put(update, newCount);
61 }
62 }
63
64 @Override
65 public boolean isEmpty() {
66 return this.indexer.isEmpty();
67 }
68
69 @Override
70 public void clear() {
71 this.indexer.clear();
72 }
73
74}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/GroupBasedMessageIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/GroupBasedMessageIndexer.java
new file mode 100644
index 00000000..80271252
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/GroupBasedMessageIndexer.java
@@ -0,0 +1,95 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.indexer;
10
11import java.util.Collections;
12import java.util.Map;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
18
19/**
20 * @author Tamas Szabo
21 * @since 2.0
22 */
23public class GroupBasedMessageIndexer implements MessageIndexer {
24
25 protected final Map<Tuple, DefaultMessageIndexer> indexer;
26 protected final TupleMask groupMask;
27
28 public GroupBasedMessageIndexer(final TupleMask groupMask) {
29 this.indexer = CollectionsFactory.createMap();
30 this.groupMask = groupMask;
31 }
32
33 public Map<Tuple, Integer> getTuplesByGroup(final Tuple group) {
34 final DefaultMessageIndexer values = this.indexer.get(group);
35 if (values == null) {
36 return Collections.emptyMap();
37 } else {
38 return Collections.unmodifiableMap(values.getTuples());
39 }
40 }
41
42 @Override
43 public int getCount(final Tuple update) {
44 final Tuple group = this.groupMask.transform(update);
45 final Integer count = getTuplesByGroup(group).get(update);
46 if (count == null) {
47 return 0;
48 } else {
49 return count;
50 }
51 }
52
53 public Set<Tuple> getGroups() {
54 return Collections.unmodifiableSet(this.indexer.keySet());
55 }
56
57 @Override
58 public void insert(final Tuple update) {
59 update(update, 1);
60 }
61
62 @Override
63 public void delete(final Tuple update) {
64 update(update, -1);
65 }
66
67 @Override
68 public void update(final Tuple update, final int delta) {
69 final Tuple group = this.groupMask.transform(update);
70 DefaultMessageIndexer valueIndexer = this.indexer.get(group);
71
72 if (valueIndexer == null) {
73 valueIndexer = new DefaultMessageIndexer();
74 this.indexer.put(group, valueIndexer);
75 }
76
77 valueIndexer.update(update, delta);
78
79 // it may happen that the indexer becomes empty as a result of the update
80 if (valueIndexer.isEmpty()) {
81 this.indexer.remove(group);
82 }
83 }
84
85 @Override
86 public boolean isEmpty() {
87 return this.indexer.isEmpty();
88 }
89
90 @Override
91 public void clear() {
92 this.indexer.clear();
93 }
94
95}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/MessageIndexer.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/MessageIndexer.java
new file mode 100644
index 00000000..271aaa44
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/indexer/MessageIndexer.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.indexer;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12import tools.refinery.viatra.runtime.matchers.util.Clearable;
13import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
14
15/**
16 * A message indexer is used by {@link Mailbox}es to index their contents.
17 *
18 * @author Tamas Szabo
19 * @since 2.0
20 */
21public interface MessageIndexer extends Clearable {
22
23 public void insert(final Tuple update);
24
25 public void delete(final Tuple update);
26
27 public void update(final Tuple update, final int delta);
28
29 public boolean isEmpty();
30
31 public int getCount(final Tuple update);
32
33}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java
new file mode 100644
index 00000000..99097f56
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java
@@ -0,0 +1,32 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox;
10
11import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
12import tools.refinery.viatra.runtime.rete.network.communication.timely.TimelyMailboxProxy;
13import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
14
15/**
16 * An adaptable mailbox can be wrapped by another mailbox to act in behalf of that. The significance of the adaptation
17 * is that the adaptee will notify the {@link CommunicationTracker} about updates by promoting the adapter itself.
18 * Adaptable mailboxes are used by the {@link BehaviorChangingMailbox}.
19 *
20 * Compare this with {@link TimelyMailboxProxy}. That one also wraps another mailbox in order to
21 * perform preprocessing on the messages sent to the original recipient.
22 *
23 * @author Tamas Szabo
24 * @since 2.0
25 */
26public interface AdaptableMailbox extends Mailbox {
27
28 public Mailbox getAdapter();
29
30 public void setAdapter(final Mailbox adapter);
31
32}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/FallThroughCapableMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/FallThroughCapableMailbox.java
new file mode 100644
index 00000000..8797e254
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/FallThroughCapableMailbox.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox;
10
11import tools.refinery.viatra.runtime.rete.network.Receiver;
12import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
13
14/**
15 * A fall through capable mailbox can directly call the update method of its {@link Receiver} instead of using the
16 * standard post-deliver mailbox semantics. If the fall through flag is set to true, the mailbox uses direct delivery,
17 * otherwise it operates in the original behavior. The fall through operation is preferable whenever applicable because
18 * it improves performance. The fall through flag is controlled by the {@link CommunicationTracker} based on the
19 * receiver node type and network topology.
20 *
21 * @author Tamas Szabo
22 * @since 2.2
23 */
24public interface FallThroughCapableMailbox extends Mailbox {
25
26 public boolean isFallThrough();
27
28 public void setFallThrough(final boolean fallThrough);
29
30}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/Mailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/Mailbox.java
new file mode 100644
index 00000000..05005974
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/Mailbox.java
@@ -0,0 +1,78 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12import tools.refinery.viatra.runtime.matchers.util.Clearable;
13import tools.refinery.viatra.runtime.matchers.util.Direction;
14import tools.refinery.viatra.runtime.rete.network.IGroupable;
15import tools.refinery.viatra.runtime.rete.network.Receiver;
16import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
17import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
18import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
19
20/**
21 * A mailbox is associated with every {@link Receiver}. Messages can be sent to a {@link Receiver} by posting them into
22 * the mailbox. Different mailbox implementations may differ in the way how they deliver the posted messages.
23 *
24 * @author Tamas Szabo
25 * @since 2.0
26 *
27 */
28public interface Mailbox extends Clearable, IGroupable {
29
30 /**
31 * Posts a new message to this mailbox.
32 *
33 * @param direction
34 * the direction of the update
35 * @param update
36 * the update element
37 * @since 2.4
38 */
39 public void postMessage(final Direction direction, final Tuple update, final Timestamp timestamp);
40
41 /**
42 * Delivers all messages according to the given selector from this mailbox. The selector can also be null. In this case, no
43 * special separation is expected between the messages.
44 *
45 * @param selector the message selector
46 */
47 public void deliverAll(final MessageSelector selector);
48
49 /**
50 * Returns the {@link Receiver} of this mailbox.
51 *
52 * @return the receiver
53 */
54 public Receiver getReceiver();
55
56 /**
57 * Returns the {@link CommunicationGroup} of the receiver of this mailbox.
58 *
59 * @return the communication group
60 */
61 public CommunicationGroup getCurrentGroup();
62
63 /**
64 * Sets the {@link CommunicationGroup} that the receiver of this mailbox is associated with.
65 *
66 * @param group
67 * the communication group
68 */
69 public void setCurrentGroup(final CommunicationGroup group);
70
71 /**
72 * Returns true if this mailbox is empty.
73 *
74 * @return
75 */
76 public boolean isEmpty();
77
78}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/MessageIndexerFactory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/MessageIndexerFactory.java
new file mode 100644
index 00000000..2c5255fb
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/MessageIndexerFactory.java
@@ -0,0 +1,23 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox;
10
11import tools.refinery.viatra.runtime.rete.network.indexer.MessageIndexer;
12
13/**
14 * A factory used to create message indexers for {@link Mailbox}es.
15 *
16 * @author Tamas Szabo
17 * @since 2.0
18 */
19public interface MessageIndexerFactory<I extends MessageIndexer> {
20
21 public I create();
22
23}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/AbstractUpdateSplittingMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/AbstractUpdateSplittingMailbox.java
new file mode 100644
index 00000000..1e1ada71
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/AbstractUpdateSplittingMailbox.java
@@ -0,0 +1,109 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox.timeless;
10
11import tools.refinery.viatra.runtime.rete.network.Receiver;
12import tools.refinery.viatra.runtime.rete.network.ReteContainer;
13import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
14import tools.refinery.viatra.runtime.rete.network.indexer.MessageIndexer;
15import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
16import tools.refinery.viatra.runtime.rete.network.mailbox.MessageIndexerFactory;
17
18/**
19 * An abstract mailbox implementation that is capable of splitting update messages based on some form of monotonicity
20 * (anti-monotone and monotone). The monotonicity is either defined by the less or equal operator of a poset or, it can
21 * be the standard subset ordering among sets of tuples.
22 *
23 * @author Tamas Szabo
24 * @since 2.0
25 *
26 */
27public abstract class AbstractUpdateSplittingMailbox<IndexerType extends MessageIndexer, ReceiverType extends Receiver> implements Mailbox {
28
29 protected IndexerType monotoneQueue;
30 protected IndexerType antiMonotoneQueue;
31 protected IndexerType monotoneBuffer;
32 protected IndexerType antiMonotoneBuffer;
33 protected boolean deliveringMonotone;
34 protected boolean deliveringAntiMonotone;
35 protected final ReceiverType receiver;
36 protected final ReteContainer container;
37 protected CommunicationGroup group;
38
39 public AbstractUpdateSplittingMailbox(final ReceiverType receiver, final ReteContainer container,
40 final MessageIndexerFactory<IndexerType> factory) {
41 this.receiver = receiver;
42 this.container = container;
43 this.monotoneQueue = factory.create();
44 this.antiMonotoneQueue = factory.create();
45 this.monotoneBuffer = factory.create();
46 this.antiMonotoneBuffer = factory.create();
47 this.deliveringMonotone = false;
48 this.deliveringAntiMonotone = false;
49 }
50
51 protected void swapAndClearMonotone() {
52 final IndexerType tmp = this.monotoneQueue;
53 this.monotoneQueue = this.monotoneBuffer;
54 this.monotoneBuffer = tmp;
55 this.monotoneBuffer.clear();
56 }
57
58 protected void swapAndClearAntiMonotone() {
59 final IndexerType tmp = this.antiMonotoneQueue;
60 this.antiMonotoneQueue = this.antiMonotoneBuffer;
61 this.antiMonotoneBuffer = tmp;
62 this.antiMonotoneBuffer.clear();
63 }
64
65 protected IndexerType getActiveMonotoneQueue() {
66 if (this.deliveringMonotone) {
67 return this.monotoneBuffer;
68 } else {
69 return this.monotoneQueue;
70 }
71 }
72
73 protected IndexerType getActiveAntiMonotoneQueue() {
74 if (this.deliveringAntiMonotone) {
75 return this.antiMonotoneBuffer;
76 } else {
77 return this.antiMonotoneQueue;
78 }
79 }
80
81 @Override
82 public ReceiverType getReceiver() {
83 return this.receiver;
84 }
85
86 @Override
87 public void clear() {
88 this.monotoneQueue.clear();
89 this.antiMonotoneQueue.clear();
90 this.monotoneBuffer.clear();
91 this.antiMonotoneBuffer.clear();
92 }
93
94 @Override
95 public boolean isEmpty() {
96 return this.getActiveMonotoneQueue().isEmpty() && this.getActiveAntiMonotoneQueue().isEmpty();
97 }
98
99 @Override
100 public CommunicationGroup getCurrentGroup() {
101 return this.group;
102 }
103
104 @Override
105 public void setCurrentGroup(final CommunicationGroup group) {
106 this.group = group;
107 }
108
109}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/BehaviorChangingMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/BehaviorChangingMailbox.java
new file mode 100644
index 00000000..fe822d7c
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/BehaviorChangingMailbox.java
@@ -0,0 +1,117 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox.timeless;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12import tools.refinery.viatra.runtime.matchers.util.Direction;
13import tools.refinery.viatra.runtime.rete.network.Node;
14import tools.refinery.viatra.runtime.rete.network.Receiver;
15import tools.refinery.viatra.runtime.rete.network.ReteContainer;
16import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
17import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
18import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20import tools.refinery.viatra.runtime.rete.network.communication.timeless.TimelessCommunicationTracker;
21import tools.refinery.viatra.runtime.rete.network.mailbox.AdaptableMailbox;
22import tools.refinery.viatra.runtime.rete.network.mailbox.FallThroughCapableMailbox;
23
24/**
25 * This mailbox changes its behavior based on the position of its {@link Receiver} in the network topology.
26 * It either behaves as a {@link DefaultMailbox} or as an {@link UpdateSplittingMailbox}. The decision is made by the
27 * {@link CommunicationTracker}, see {@link TimelessCommunicationTracker#postProcessNode(Node)} for more details.
28 *
29 * @author Tamas Szabo
30 */
31public class BehaviorChangingMailbox implements FallThroughCapableMailbox {
32
33 protected boolean fallThrough;
34 protected boolean split;
35 protected AdaptableMailbox wrapped;
36 protected final Receiver receiver;
37 protected final ReteContainer container;
38 protected CommunicationGroup group;
39
40 public BehaviorChangingMailbox(final Receiver receiver, final ReteContainer container) {
41 this.fallThrough = false;
42 this.split = false;
43 this.receiver = receiver;
44 this.container = container;
45 this.wrapped = new DefaultMailbox(receiver, container);
46 this.wrapped.setAdapter(this);
47 }
48
49 @Override
50 public void postMessage(final Direction direction, final Tuple update, final Timestamp timestamp) {
51 if (this.fallThrough && !this.container.isExecutingDelayedCommands()) {
52 // disable fall through while we are in the middle of executing delayed construction commands
53 this.receiver.update(direction, update, timestamp);
54 } else {
55 this.wrapped.postMessage(direction, update, timestamp);
56 }
57 }
58
59 @Override
60 public void deliverAll(final MessageSelector kind) {
61 this.wrapped.deliverAll(kind);
62 }
63
64 @Override
65 public String toString() {
66 return "A_MBOX -> " + this.wrapped;
67 }
68
69 public void setSplitFlag(final boolean splitValue) {
70 if (this.split != splitValue) {
71 assert isEmpty();
72 if (splitValue) {
73 this.wrapped = new UpdateSplittingMailbox(this.receiver, this.container);
74 } else {
75 this.wrapped = new DefaultMailbox(this.receiver, this.container);
76 }
77 this.wrapped.setAdapter(this);
78 this.split = splitValue;
79 }
80 }
81
82 @Override
83 public boolean isEmpty() {
84 return this.wrapped.isEmpty();
85 }
86
87 @Override
88 public void clear() {
89 this.wrapped.clear();
90 }
91
92 @Override
93 public Receiver getReceiver() {
94 return this.receiver;
95 }
96
97 @Override
98 public CommunicationGroup getCurrentGroup() {
99 return this.group;
100 }
101
102 @Override
103 public void setCurrentGroup(final CommunicationGroup group) {
104 this.group = group;
105 }
106
107 @Override
108 public boolean isFallThrough() {
109 return this.fallThrough;
110 }
111
112 @Override
113 public void setFallThrough(final boolean fallThrough) {
114 this.fallThrough = fallThrough;
115 }
116
117} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/DefaultMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/DefaultMailbox.java
new file mode 100644
index 00000000..baf7270f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/DefaultMailbox.java
@@ -0,0 +1,163 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox.timeless;
10
11import java.util.Map;
12
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
15import tools.refinery.viatra.runtime.matchers.util.Direction;
16import tools.refinery.viatra.runtime.rete.network.Receiver;
17import tools.refinery.viatra.runtime.rete.network.ReteContainer;
18import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
19import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
20import tools.refinery.viatra.runtime.rete.network.communication.PhasedSelector;
21import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
22import tools.refinery.viatra.runtime.rete.network.mailbox.AdaptableMailbox;
23import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
24
25/**
26 * Default mailbox implementation.
27 * <p>
28 * Usually, the mailbox performs counting of messages so that they can cancel each other out. However, if marked as a
29 * fall-through mailbox, than update messages are delivered directly to the receiver node to reduce overhead.
30 *
31 * @author Tamas Szabo
32 * @since 2.0
33 */
34public class DefaultMailbox implements AdaptableMailbox {
35
36 private static int SIZE_TRESHOLD = 127;
37
38 protected Map<Tuple, Integer> queue;
39 protected Map<Tuple, Integer> buffer;
40 protected final Receiver receiver;
41 protected final ReteContainer container;
42 protected boolean delivering;
43 protected Mailbox adapter;
44 protected CommunicationGroup group;
45
46 public DefaultMailbox(final Receiver receiver, final ReteContainer container) {
47 this.receiver = receiver;
48 this.container = container;
49 this.queue = CollectionsFactory.createMap();
50 this.buffer = CollectionsFactory.createMap();
51 this.adapter = this;
52 }
53
54 protected Map<Tuple, Integer> getActiveQueue() {
55 if (this.delivering) {
56 return this.buffer;
57 } else {
58 return this.queue;
59 }
60 }
61
62 @Override
63 public Mailbox getAdapter() {
64 return this.adapter;
65 }
66
67 @Override
68 public void setAdapter(final Mailbox adapter) {
69 this.adapter = adapter;
70 }
71
72 @Override
73 public boolean isEmpty() {
74 return getActiveQueue().isEmpty();
75 }
76
77 @Override
78 public void postMessage(final Direction direction, final Tuple update, final Timestamp timestamp) {
79 final Map<Tuple, Integer> activeQueue = getActiveQueue();
80 final boolean wasEmpty = activeQueue.isEmpty();
81
82 boolean significantChange = false;
83 Integer count = activeQueue.get(update);
84 if (count == null) {
85 count = 0;
86 significantChange = true;
87 }
88
89 if (direction == Direction.DELETE) {
90 count--;
91 } else {
92 count++;
93 }
94
95 if (count == 0) {
96 activeQueue.remove(update);
97 significantChange = true;
98 } else {
99 activeQueue.put(update, count);
100 }
101
102 if (significantChange) {
103 final Mailbox targetMailbox = this.adapter;
104 final CommunicationGroup targetGroup = this.adapter.getCurrentGroup();
105
106 if (wasEmpty) {
107 targetGroup.notifyHasMessage(targetMailbox, PhasedSelector.DEFAULT);
108 } else if (activeQueue.isEmpty()) {
109 targetGroup.notifyLostAllMessages(targetMailbox, PhasedSelector.DEFAULT);
110 }
111 }
112 }
113
114 @Override
115 public void deliverAll(final MessageSelector kind) {
116 if (kind == PhasedSelector.DEFAULT) {
117 // use the buffer during delivering so that there is a clear
118 // separation between the stages
119 this.delivering = true;
120 this.receiver.batchUpdate(this.queue.entrySet(), Timestamp.ZERO);
121 this.delivering = false;
122
123 if (queue.size() > SIZE_TRESHOLD) {
124 this.queue = this.buffer;
125 this.buffer = CollectionsFactory.createMap();
126 } else {
127 this.queue.clear();
128 final Map<Tuple, Integer> tmpQueue = this.queue;
129 this.queue = this.buffer;
130 this.buffer = tmpQueue;
131 }
132 } else {
133 throw new IllegalArgumentException("Unsupported message kind " + kind);
134 }
135 }
136
137 @Override
138 public String toString() {
139 return "D_MBOX (" + this.receiver + ") " + this.getActiveQueue();
140 }
141
142 @Override
143 public Receiver getReceiver() {
144 return this.receiver;
145 }
146
147 @Override
148 public void clear() {
149 this.queue.clear();
150 this.buffer.clear();
151 }
152
153 @Override
154 public CommunicationGroup getCurrentGroup() {
155 return this.group;
156 }
157
158 @Override
159 public void setCurrentGroup(final CommunicationGroup group) {
160 this.group = group;
161 }
162
163}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/PosetAwareMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/PosetAwareMailbox.java
new file mode 100644
index 00000000..50d19882
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/PosetAwareMailbox.java
@@ -0,0 +1,218 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox.timeless;
10
11import java.util.HashSet;
12import java.util.Map.Entry;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
19import tools.refinery.viatra.runtime.matchers.util.Direction;
20import tools.refinery.viatra.runtime.rete.network.PosetAwareReceiver;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
23import tools.refinery.viatra.runtime.rete.network.communication.PhasedSelector;
24import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
25import tools.refinery.viatra.runtime.rete.network.indexer.GroupBasedMessageIndexer;
26
27/**
28 * A monotonicity aware mailbox implementation. The mailbox uses an {@link IPosetComparator} to identify if a pair of
29 * REVOKE - INSERT updates represent a monotone change pair. The mailbox is used by {@link PosetAwareReceiver}s.
30 *
31 * @author Tamas Szabo
32 * @since 2.0
33 */
34public class PosetAwareMailbox extends AbstractUpdateSplittingMailbox<GroupBasedMessageIndexer, PosetAwareReceiver> {
35
36 protected final TupleMask groupMask;
37
38 public PosetAwareMailbox(final PosetAwareReceiver receiver, final ReteContainer container) {
39 super(receiver, container, () -> new GroupBasedMessageIndexer(receiver.getCoreMask()));
40 this.groupMask = receiver.getCoreMask();
41 }
42
43 @Override
44 public void postMessage(final Direction direction, final Tuple update, final Timestamp timestamp) {
45 final GroupBasedMessageIndexer monotoneQueue = getActiveMonotoneQueue();
46 final GroupBasedMessageIndexer antiMonotoneQueue = getActiveAntiMonotoneQueue();
47 final boolean wasPresentAsMonotone = monotoneQueue.getCount(update) != 0;
48 final boolean wasPresentAsAntiMonotone = antiMonotoneQueue.getCount(update) != 0;
49 final TupleMask coreMask = this.receiver.getCoreMask();
50
51 // it cannot happen that it was present in both
52 assert !(wasPresentAsMonotone && wasPresentAsAntiMonotone);
53
54 if (direction == Direction.INSERT) {
55 if (wasPresentAsAntiMonotone) {
56 // it was an anti-monotone one before
57 antiMonotoneQueue.insert(update);
58 } else {
59 // it was a monotone one before or did not exist at all
60 monotoneQueue.insert(update);
61
62 // if it was not present in the monotone queue before, then
63 // we need to check whether it makes REVOKE updates monotone
64 if (!wasPresentAsMonotone) {
65 final Set<Tuple> counterParts = tryFindCounterPart(update, false, true);
66 for (final Tuple counterPart : counterParts) {
67 final int count = antiMonotoneQueue.getCount(counterPart);
68 assert count < 0;
69 antiMonotoneQueue.update(counterPart, -count);
70 monotoneQueue.update(counterPart, count);
71 }
72 }
73 }
74 } else {
75 if (wasPresentAsAntiMonotone) {
76 // it was an anti-monotone one before
77 antiMonotoneQueue.delete(update);
78 } else if (wasPresentAsMonotone) {
79 // it was a monotone one before
80 monotoneQueue.delete(update);
81
82 // and we need to check whether the monotone REVOKE updates
83 // still have a reinforcing counterpart
84 final Set<Tuple> candidates = new HashSet<Tuple>();
85 final Tuple key = coreMask.transform(update);
86 for (final Entry<Tuple, Integer> entry : monotoneQueue.getTuplesByGroup(key).entrySet()) {
87 if (entry.getValue() < 0) {
88 final Tuple candidate = entry.getKey();
89 final Set<Tuple> counterParts = tryFindCounterPart(candidate, true, false);
90 if (counterParts.isEmpty()) {
91 // all of them are gone
92 candidates.add(candidate);
93 }
94 }
95 }
96
97 // move the candidates from the monotone queue to the
98 // anti-monotone queue because they do not have a
99 // counterpart anymore
100 for (final Tuple candidate : candidates) {
101 final int count = monotoneQueue.getCount(candidate);
102 assert count < 0;
103 monotoneQueue.update(candidate, -count);
104 antiMonotoneQueue.update(candidate, count);
105 }
106 } else {
107 // it did not exist before
108 final Set<Tuple> counterParts = tryFindCounterPart(update, true, false);
109 if (counterParts.isEmpty()) {
110 // there is no tuple that would make this update monotone
111 antiMonotoneQueue.delete(update);
112 } else {
113 // there is a reinforcing counterpart
114 monotoneQueue.delete(update);
115 }
116 }
117 }
118
119 if (antiMonotoneQueue.isEmpty()) {
120 this.group.notifyLostAllMessages(this, PhasedSelector.ANTI_MONOTONE);
121 } else {
122 this.group.notifyHasMessage(this, PhasedSelector.ANTI_MONOTONE);
123 }
124
125 if (monotoneQueue.isEmpty()) {
126 this.group.notifyLostAllMessages(this, PhasedSelector.MONOTONE);
127 } else {
128 this.group.notifyHasMessage(this, PhasedSelector.MONOTONE);
129 }
130 }
131
132 protected Set<Tuple> tryFindCounterPart(final Tuple first, final boolean findPositiveCounterPart,
133 final boolean findAllCounterParts) {
134 final GroupBasedMessageIndexer monotoneQueue = getActiveMonotoneQueue();
135 final GroupBasedMessageIndexer antiMonotoneQueue = getActiveAntiMonotoneQueue();
136 final TupleMask coreMask = this.receiver.getCoreMask();
137 final TupleMask posetMask = this.receiver.getPosetMask();
138 final IPosetComparator posetComparator = this.receiver.getPosetComparator();
139 final Set<Tuple> result = CollectionsFactory.createSet();
140 final Tuple firstKey = coreMask.transform(first);
141 final Tuple firstValue = posetMask.transform(first);
142
143 if (findPositiveCounterPart) {
144 for (final Entry<Tuple, Integer> entry : monotoneQueue.getTuplesByGroup(firstKey).entrySet()) {
145 final Tuple secondValue = posetMask.transform(entry.getKey());
146 if (entry.getValue() > 0 && posetComparator.isLessOrEqual(firstValue, secondValue)) {
147 result.add(entry.getKey());
148 if (!findAllCounterParts) {
149 return result;
150 }
151 }
152 }
153 } else {
154 for (final Entry<Tuple, Integer> entry : antiMonotoneQueue.getTuplesByGroup(firstKey).entrySet()) {
155 final Tuple secondValue = posetMask.transform(entry.getKey());
156 if (posetComparator.isLessOrEqual(secondValue, firstValue)) {
157 result.add(entry.getKey());
158 if (!findAllCounterParts) {
159 return result;
160 }
161 }
162 }
163 }
164
165 return result;
166 }
167
168 @Override
169 public void deliverAll(final MessageSelector kind) {
170 if (kind == PhasedSelector.ANTI_MONOTONE) {
171 // use the buffer during delivering so that there is a clear
172 // separation between the stages
173 this.deliveringAntiMonotone = true;
174
175 for (final Tuple group : this.antiMonotoneQueue.getGroups()) {
176 for (final Entry<Tuple, Integer> entry : this.antiMonotoneQueue.getTuplesByGroup(group).entrySet()) {
177 final Tuple update = entry.getKey();
178 final int count = entry.getValue();
179 assert count < 0;
180 for (int i = 0; i < Math.abs(count); i++) {
181 this.receiver.updateWithPosetInfo(Direction.DELETE, update, false);
182 }
183 }
184 }
185
186 this.deliveringAntiMonotone = false;
187 swapAndClearAntiMonotone();
188 } else if (kind == PhasedSelector.MONOTONE) {
189 // use the buffer during delivering so that there is a clear
190 // separation between the stages
191 this.deliveringMonotone = true;
192
193 for (final Tuple group : this.monotoneQueue.getGroups()) {
194 for (final Entry<Tuple, Integer> entry : this.monotoneQueue.getTuplesByGroup(group).entrySet()) {
195 final Tuple update = entry.getKey();
196 final int count = entry.getValue();
197 assert count != 0;
198 final Direction direction = count < 0 ? Direction.DELETE : Direction.INSERT;
199 for (int i = 0; i < Math.abs(count); i++) {
200 this.receiver.updateWithPosetInfo(direction, update, true);
201 }
202 }
203 }
204
205 this.deliveringMonotone = false;
206 swapAndClearMonotone();
207 } else {
208 throw new IllegalArgumentException("Unsupported message kind " + kind);
209 }
210 }
211
212 @Override
213 public String toString() {
214 return "PA_MBOX (" + this.receiver + ") " + this.getActiveMonotoneQueue() + " "
215 + this.getActiveAntiMonotoneQueue();
216 }
217
218}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/UpdateSplittingMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/UpdateSplittingMailbox.java
new file mode 100644
index 00000000..afa155b2
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timeless/UpdateSplittingMailbox.java
@@ -0,0 +1,135 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox.timeless;
10
11import java.util.Map.Entry;
12
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.util.Direction;
15import tools.refinery.viatra.runtime.rete.network.Receiver;
16import tools.refinery.viatra.runtime.rete.network.ReteContainer;
17import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
18import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
19import tools.refinery.viatra.runtime.rete.network.communication.PhasedSelector;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21import tools.refinery.viatra.runtime.rete.network.indexer.DefaultMessageIndexer;
22import tools.refinery.viatra.runtime.rete.network.mailbox.AdaptableMailbox;
23import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
24
25/**
26 * A mailbox implementation that splits updates messages according to the standard subset ordering into anti-monotonic
27 * (deletions) and monotonic (insertions) updates.
28 *
29 * @author Tamas Szabo
30 * @since 2.0
31 */
32public class UpdateSplittingMailbox extends AbstractUpdateSplittingMailbox<DefaultMessageIndexer, Receiver>
33 implements AdaptableMailbox {
34
35 protected Mailbox adapter;
36
37 public UpdateSplittingMailbox(final Receiver receiver, final ReteContainer container) {
38 super(receiver, container, DefaultMessageIndexer::new);
39 this.adapter = this;
40 }
41
42 @Override
43 public Mailbox getAdapter() {
44 return this.adapter;
45 }
46
47 @Override
48 public void setAdapter(final Mailbox adapter) {
49 this.adapter = adapter;
50 }
51
52 @Override
53 public void postMessage(final Direction direction, final Tuple update, final Timestamp timestamp) {
54 final DefaultMessageIndexer monotoneQueue = getActiveMonotoneQueue();
55 final DefaultMessageIndexer antiMonotoneQueue = getActiveAntiMonotoneQueue();
56 final boolean wasPresentAsMonotone = monotoneQueue.getCount(update) != 0;
57 final boolean wasPresentAsAntiMonotone = antiMonotoneQueue.getCount(update) != 0;
58
59 // it cannot happen that it was present in both
60 assert !(wasPresentAsMonotone && wasPresentAsAntiMonotone);
61
62 if (direction == Direction.INSERT) {
63 if (wasPresentAsAntiMonotone) {
64 // it was an anti-monotone one before
65 antiMonotoneQueue.insert(update);
66 } else {
67 // it was a monotone one before or did not exist at all
68 monotoneQueue.insert(update);
69 }
70 } else {
71 if (wasPresentAsMonotone) {
72 // it was a monotone one before
73 monotoneQueue.delete(update);
74 } else {
75 // it was an anti-monotone one before or did not exist at all
76 antiMonotoneQueue.delete(update);
77 }
78 }
79
80 final Mailbox targetMailbox = this.adapter;
81 final CommunicationGroup targetGroup = this.adapter.getCurrentGroup();
82
83 if (antiMonotoneQueue.isEmpty()) {
84 targetGroup.notifyLostAllMessages(targetMailbox, PhasedSelector.ANTI_MONOTONE);
85 } else {
86 targetGroup.notifyHasMessage(targetMailbox, PhasedSelector.ANTI_MONOTONE);
87 }
88
89 if (monotoneQueue.isEmpty()) {
90 targetGroup.notifyLostAllMessages(targetMailbox, PhasedSelector.MONOTONE);
91 } else {
92 targetGroup.notifyHasMessage(targetMailbox, PhasedSelector.MONOTONE);
93 }
94 }
95
96 @Override
97 public void deliverAll(final MessageSelector kind) {
98 if (kind == PhasedSelector.ANTI_MONOTONE) {
99 // deliver anti-monotone
100 this.deliveringAntiMonotone = true;
101 for (final Entry<Tuple, Integer> entry : this.antiMonotoneQueue.getTuples().entrySet()) {
102 final Tuple update = entry.getKey();
103 final int count = entry.getValue();
104 assert count < 0;
105 for (int i = 0; i < Math.abs(count); i++) {
106 this.receiver.update(Direction.DELETE, update, Timestamp.ZERO);
107 }
108 }
109 this.deliveringAntiMonotone = false;
110 swapAndClearAntiMonotone();
111 } else if (kind == PhasedSelector.MONOTONE) {
112 // deliver monotone
113 this.deliveringMonotone = true;
114 for (final Entry<Tuple, Integer> entry : this.monotoneQueue.getTuples().entrySet()) {
115 final Tuple update = entry.getKey();
116 final int count = entry.getValue();
117 assert count > 0;
118 for (int i = 0; i < count; i++) {
119 this.receiver.update(Direction.INSERT, update, Timestamp.ZERO);
120 }
121 }
122 this.deliveringMonotone = false;
123 swapAndClearMonotone();
124 } else {
125 throw new IllegalArgumentException("Unsupported message kind " + kind);
126 }
127 }
128
129 @Override
130 public String toString() {
131 return "US_MBOX (" + this.receiver + ") " + this.getActiveMonotoneQueue() + " "
132 + this.getActiveAntiMonotoneQueue();
133 }
134
135}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timely/TimelyMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timely/TimelyMailbox.java
new file mode 100644
index 00000000..bf3b8e14
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/timely/TimelyMailbox.java
@@ -0,0 +1,150 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.network.mailbox.timely;
10
11import java.util.Map;
12import java.util.TreeMap;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.TimelineRepresentation;
18import tools.refinery.viatra.runtime.rete.network.Receiver;
19import tools.refinery.viatra.runtime.rete.network.ReteContainer;
20import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
21import tools.refinery.viatra.runtime.rete.network.communication.MessageSelector;
22import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
23import tools.refinery.viatra.runtime.rete.network.communication.timely.ResumableNode;
24import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
25
26public class TimelyMailbox implements Mailbox {
27
28 protected TreeMap<Timestamp, Map<Tuple, Integer>> queue;
29 protected final Receiver receiver;
30 protected final ReteContainer container;
31 protected CommunicationGroup group;
32 protected boolean fallThrough;
33
34 public TimelyMailbox(final Receiver receiver, final ReteContainer container) {
35 this.receiver = receiver;
36 this.container = container;
37 this.queue = CollectionsFactory.createTreeMap();
38 }
39
40 protected TreeMap<Timestamp, Map<Tuple, Integer>> getActiveQueue() {
41 return this.queue;
42 }
43
44 @Override
45 public boolean isEmpty() {
46 return getActiveQueue().isEmpty();
47 }
48
49 @Override
50 public void postMessage(final Direction direction, final Tuple update, final Timestamp timestamp) {
51 final TreeMap<Timestamp, Map<Tuple, Integer>> activeQueue = getActiveQueue();
52
53 Map<Tuple, Integer> tupleMap = activeQueue.get(timestamp);
54 final boolean wasEmpty = tupleMap == null;
55 boolean significantChange = false;
56
57 if (tupleMap == null) {
58 tupleMap = CollectionsFactory.createMap();
59 activeQueue.put(timestamp, tupleMap);
60 significantChange = true;
61 }
62
63 Integer count = tupleMap.get(update);
64 if (count == null) {
65 count = 0;
66 significantChange = true;
67 }
68
69 if (direction == Direction.DELETE) {
70 count--;
71 } else {
72 count++;
73 }
74
75 if (count == 0) {
76 tupleMap.remove(update);
77 if (tupleMap.isEmpty()) {
78 activeQueue.remove(timestamp);
79 }
80 significantChange = true;
81 } else {
82 tupleMap.put(update, count);
83 }
84
85 if (significantChange) {
86 if (wasEmpty) {
87 this.group.notifyHasMessage(this, timestamp);
88 } else if (tupleMap.isEmpty()) {
89 final Timestamp resumableTimestamp = (this.receiver instanceof ResumableNode)
90 ? ((ResumableNode) this.receiver).getResumableTimestamp()
91 : null;
92 // check if there is folding left to do before unsubscribing just based on the message queue being empty
93 if (resumableTimestamp == null || resumableTimestamp.compareTo(timestamp) != 0) {
94 this.group.notifyLostAllMessages(this, timestamp);
95 }
96 }
97 }
98 }
99
100 @Override
101 public void deliverAll(final MessageSelector selector) {
102 if (selector instanceof Timestamp) {
103 final Timestamp timestamp = (Timestamp) selector;
104 // REMOVE the tuples associated with the selector, dont just query them
105 final Map<Tuple, Integer> tupleMap = this.queue.remove(timestamp);
106
107 // tupleMap may be empty if we only have lazy folding to do
108 if (tupleMap != null) {
109 this.receiver.batchUpdate(tupleMap.entrySet(), timestamp);
110 }
111
112 if (this.container.getTimelyConfiguration()
113 .getTimelineRepresentation() == TimelineRepresentation.FAITHFUL) {
114 // (1) either normal delivery, which ended up being a lazy folding state
115 // (2) and/or lazy folding needs to be resumed
116 if (this.receiver instanceof ResumableNode) {
117 ((ResumableNode) this.receiver).resumeAt(timestamp);
118 }
119 }
120 } else {
121 throw new IllegalArgumentException("Unsupported message selector " + selector);
122 }
123 }
124
125 @Override
126 public String toString() {
127 return "DDF_MBOX (" + this.receiver + ") " + this.getActiveQueue();
128 }
129
130 @Override
131 public Receiver getReceiver() {
132 return this.receiver;
133 }
134
135 @Override
136 public void clear() {
137 this.queue.clear();
138 }
139
140 @Override
141 public CommunicationGroup getCurrentGroup() {
142 return this.group;
143 }
144
145 @Override
146 public void setCurrentGroup(final CommunicationGroup group) {
147 this.group = group;
148 }
149
150}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/Address.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/Address.java
new file mode 100644
index 00000000..2fed3225
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/Address.java
@@ -0,0 +1,125 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.remote;
11
12import tools.refinery.viatra.runtime.rete.network.Node;
13import tools.refinery.viatra.runtime.rete.network.ReteContainer;
14
15/**
16 * Remote identifier of a node of type T.
17 *
18 * @author Gabor Bergmann
19 *
20 */
21public class Address<T extends Node> {
22 ReteContainer container;
23 Long nodeId;
24 /**
25 * Feel free to leave null e.g. if node is in a separate JVM.
26 */
27 T nodeCache;
28
29 /**
30 * Address of local node (use only for containers in the same VM!)
31 */
32 public static <N extends Node> Address<N> of(N node) {
33 return new Address<N>(node);
34 }
35
36 /**
37 * General constructor.
38 *
39 * @param container
40 * @param nodeId
41 */
42 public Address(ReteContainer container, Long nodeId) {
43 super();
44 this.container = container;
45 this.nodeId = nodeId;
46 }
47
48 /**
49 * Local-only constructor. (use only for containers in the same VM!)
50 *
51 * @param node
52 * the node to address
53 */
54 public Address(T node) {
55 super();
56 this.nodeCache = node;
57 this.container = node.getContainer();
58 this.nodeId = node.getNodeId();
59 }
60
61 @Override
62 public int hashCode() {
63 final int prime = 31;
64 int result = 1;
65 result = prime * result + ((container == null) ? 0 : container.hashCode());
66 result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
67 return result;
68 }
69
70 @Override
71 public boolean equals(Object obj) {
72 if (this == obj)
73 return true;
74 if (obj == null)
75 return false;
76 if (!(obj instanceof Address<?>))
77 return false;
78 final Address<?> other = (Address<?>) obj;
79 if (container == null) {
80 if (other.container != null)
81 return false;
82 } else if (!container.equals(other.container))
83 return false;
84 if (nodeId == null) {
85 if (other.nodeId != null)
86 return false;
87 } else if (!nodeId.equals(other.nodeId))
88 return false;
89 return true;
90 }
91
92 public ReteContainer getContainer() {
93 return container;
94 }
95
96 public void setContainer(ReteContainer container) {
97 this.container = container;
98 }
99
100 public Long getNodeId() {
101 return nodeId;
102 }
103
104 public void setNodeId(Long nodeId) {
105 this.nodeId = nodeId;
106 }
107
108 public T getNodeCache() {
109 return nodeCache;
110 }
111
112 public void setNodeCache(T nodeCache) {
113 this.nodeCache = nodeCache;
114 }
115
116 @Override
117 public String toString() {
118 if (nodeCache == null)
119 return "A(" + nodeId + " @ " + container + ")";
120 else
121 return "A(" + nodeCache + ")";
122
123 }
124
125}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteReceiver.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteReceiver.java
new file mode 100644
index 00000000..f7d267af
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteReceiver.java
@@ -0,0 +1,63 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.remote;
11
12import java.util.ArrayList;
13import java.util.Collection;
14import java.util.List;
15import java.util.Map;
16
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.util.Direction;
19import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
20import tools.refinery.viatra.runtime.rete.network.Receiver;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
23import tools.refinery.viatra.runtime.rete.single.SingleInputNode;
24
25/**
26 * This node delivers updates to a remote recipient; no updates are propagated further in this network.
27 *
28 * @author Gabor Bergmann
29 *
30 */
31public class RemoteReceiver extends SingleInputNode {
32
33 List<Address<? extends Receiver>> targets;
34
35 public RemoteReceiver(ReteContainer reteContainer) {
36 super(reteContainer);
37 targets = new ArrayList<Address<? extends Receiver>>();
38 }
39
40 public void addTarget(Address<? extends Receiver> target) {
41 targets.add(target);
42 }
43
44 @Override
45 public void pullInto(Collection<Tuple> collector, boolean flush) {
46 propagatePullInto(collector, flush);
47 }
48
49 @Override
50 public void pullIntoWithTimeline(Map<Tuple, Timeline<Timestamp>> collector, boolean flush) {
51 throw new UnsupportedOperationException();
52 }
53
54 public Collection<Tuple> remotePull(boolean flush) {
55 return reteContainer.pullContents(this, flush);
56 }
57
58 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
59 for (Address<? extends Receiver> ad : targets)
60 reteContainer.sendUpdateToRemoteAddress(ad, direction, updateElement);
61 }
62
63}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteSupplier.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteSupplier.java
new file mode 100644
index 00000000..cbe4d177
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/remote/RemoteSupplier.java
@@ -0,0 +1,54 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.remote;
11
12import java.util.Collection;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20import tools.refinery.viatra.runtime.rete.single.SingleInputNode;
21
22/**
23 * This node receives updates from a remote supplier; no local updates are expected.
24 *
25 * @author Gabor Bergmann
26 *
27 */
28public class RemoteSupplier extends SingleInputNode {
29
30 RemoteReceiver counterpart;
31
32 public RemoteSupplier(ReteContainer reteContainer, RemoteReceiver counterpart) {
33 super(reteContainer);
34 this.counterpart = counterpart;
35 counterpart.addTarget(reteContainer.makeAddress(this));
36 }
37
38 @Override
39 public void pullInto(Collection<Tuple> collector, boolean flush) {
40 Collection<Tuple> pulled = counterpart.remotePull(flush);
41 collector.addAll(pulled);
42 }
43
44 @Override
45 public void pullIntoWithTimeline(Map<Tuple, Timeline<Timestamp>> collector, boolean flush) {
46 throw new UnsupportedOperationException();
47 }
48
49 @Override
50 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
51 propagateUpdate(direction, updateElement, timestamp);
52 }
53
54}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/AbstractUniquenessEnforcerNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/AbstractUniquenessEnforcerNode.java
new file mode 100644
index 00000000..e92ce63f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/AbstractUniquenessEnforcerNode.java
@@ -0,0 +1,138 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.List;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.Direction;
19import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
20import tools.refinery.viatra.runtime.rete.index.SpecializedProjectionIndexer.ListenerSubscription;
21import tools.refinery.viatra.runtime.rete.network.ReteContainer;
22import tools.refinery.viatra.runtime.rete.network.StandardNode;
23import tools.refinery.viatra.runtime.rete.network.Supplier;
24import tools.refinery.viatra.runtime.rete.network.Tunnel;
25import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
26import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
27import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
28import tools.refinery.viatra.runtime.rete.util.Options;
29
30/**
31 * Ensures that no identical copies get to the output. Only one replica of each pattern substitution may traverse this
32 * node. There are both timeless and timely implementations.
33 *
34 * @author Gabor Bergmann
35 * @author Tamas Szabo
36 * @noinstantiate This class is not intended to be instantiated by clients.
37 * @noextend This class is not intended to be subclassed by clients.
38 * @since 2.2
39 */
40public abstract class AbstractUniquenessEnforcerNode extends StandardNode implements Tunnel {
41
42 protected final Collection<Supplier> parents;
43 protected ProjectionIndexer memoryNullIndexer;
44 protected ProjectionIndexer memoryIdentityIndexer;
45 protected final int tupleWidth;
46 // MUST BE INSTANTIATED IN THE CONCRETE SUBCLASSES AFTER ALL FIELDS ARE SET
47 protected Mailbox mailbox;
48 protected final TupleMask nullMask;
49 protected final TupleMask identityMask;
50 protected final List<ListenerSubscription> specializedListeners;
51
52 public AbstractUniquenessEnforcerNode(final ReteContainer reteContainer, final int tupleWidth) {
53 super(reteContainer);
54 this.parents = new ArrayList<Supplier>();
55 this.specializedListeners = new ArrayList<ListenerSubscription>();
56 this.tupleWidth = tupleWidth;
57 this.nullMask = TupleMask.linear(0, tupleWidth);
58 this.identityMask = TupleMask.identity(tupleWidth);
59 }
60
61 protected abstract Mailbox instantiateMailbox();
62
63 @Override
64 public Mailbox getMailbox() {
65 return this.mailbox;
66 }
67
68 /**
69 * @since 2.8
70 */
71 public abstract Set<Tuple> getTuples();
72
73 /**
74 * @since 2.4
75 */
76 protected void propagate(final Direction direction, final Tuple update, final Timestamp timestamp) {
77 // See Bug 518434
78 // trivial (non-active) indexers must be updated before other listeners
79 // so that if they are joined against each other, trivial indexers lookups
80 // will be consistent with their notifications;
81 // also, their subscriptions must share a single order
82 for (final ListenerSubscription subscription : specializedListeners) {
83 subscription.propagate(direction, update, timestamp);
84 }
85 propagateUpdate(direction, update, timestamp);
86 }
87
88 @Override
89 public ProjectionIndexer constructIndex(final TupleMask mask, final TraceInfo... traces) {
90 if (Options.employTrivialIndexers) {
91 if (nullMask.equals(mask)) {
92 final ProjectionIndexer indexer = getNullIndexer();
93 for (final TraceInfo traceInfo : traces) {
94 indexer.assignTraceInfo(traceInfo);
95 }
96 return indexer;
97 }
98 if (identityMask.equals(mask)) {
99 final ProjectionIndexer indexer = getIdentityIndexer();
100 for (final TraceInfo traceInfo : traces) {
101 indexer.assignTraceInfo(traceInfo);
102 }
103 return indexer;
104 }
105 }
106 return super.constructIndex(mask, traces);
107 }
108
109 public abstract ProjectionIndexer getNullIndexer();
110
111 public abstract ProjectionIndexer getIdentityIndexer();
112
113 @Override
114 public void appendParent(final Supplier supplier) {
115 parents.add(supplier);
116 }
117
118 @Override
119 public void removeParent(final Supplier supplier) {
120 parents.remove(supplier);
121 }
122
123 @Override
124 public Collection<Supplier> getParents() {
125 return parents;
126 }
127
128 @Override
129 public void assignTraceInfo(final TraceInfo traceInfo) {
130 super.assignTraceInfo(traceInfo);
131 if (traceInfo.propagateFromStandardNodeToSupplierParent()) {
132 for (final Supplier parent : parents) {
133 parent.acceptPropagatedTraceInfo(traceInfo);
134 }
135 }
136 }
137
138} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/CallbackNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/CallbackNode.java
new file mode 100644
index 00000000..c68036b5
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/CallbackNode.java
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import tools.refinery.viatra.runtime.matchers.backend.IUpdateable;
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.matchers.util.Direction;
14import tools.refinery.viatra.runtime.rete.misc.SimpleReceiver;
15import tools.refinery.viatra.runtime.rete.network.ReteContainer;
16import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
17
18/**
19 * @author Bergmann Gabor
20 *
21 */
22public class CallbackNode extends SimpleReceiver {
23
24 IUpdateable updateable;
25
26 public CallbackNode(ReteContainer reteContainer, IUpdateable updateable)
27 {
28 super(reteContainer);
29 this.updateable = updateable;
30 }
31
32 @Override
33 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
34 updateable.update(updateElement, direction == Direction.INSERT);
35 }
36
37}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DefaultProductionNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DefaultProductionNode.java
new file mode 100644
index 00000000..eca8bc17
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DefaultProductionNode.java
@@ -0,0 +1,79 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import java.util.Iterator;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.rete.network.ProductionNode;
19import tools.refinery.viatra.runtime.rete.network.ReteContainer;
20import tools.refinery.viatra.runtime.rete.traceability.CompiledQuery;
21import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
22
23/**
24 * Default implementation of the Production node, based on UniquenessEnforcerNode
25 *
26 * @author Gabor Bergmann
27 * @noinstantiate This class is not intended to be instantiated by clients.
28 */
29public class DefaultProductionNode extends UniquenessEnforcerNode implements ProductionNode {
30
31 protected final Map<String, Integer> posMapping;
32
33 /**
34 * @since 1.6
35 */
36 public DefaultProductionNode(final ReteContainer reteContainer, final Map<String, Integer> posMapping,
37 final boolean deleteRederiveEvaluation) {
38 this(reteContainer, posMapping, deleteRederiveEvaluation, null, null, null);
39 }
40
41 /**
42 * @since 1.6
43 */
44 public DefaultProductionNode(final ReteContainer reteContainer, final Map<String, Integer> posMapping,
45 final boolean deleteRederiveEvaluation, final TupleMask coreMask, final TupleMask posetMask,
46 final IPosetComparator posetComparator) {
47 super(reteContainer, posMapping.size(), deleteRederiveEvaluation, coreMask, posetMask, posetComparator);
48 this.posMapping = posMapping;
49 }
50
51 @Override
52 public Map<String, Integer> getPosMapping() {
53 return posMapping;
54 }
55
56 @Override
57 public Iterator<Tuple> iterator() {
58 return memory.iterator();
59 }
60
61 @Override
62 public void acceptPropagatedTraceInfo(final TraceInfo traceInfo) {
63 if (traceInfo.propagateToProductionNodeParentAlso()) {
64 super.acceptPropagatedTraceInfo(traceInfo);
65 }
66 }
67
68 @Override
69 public String toString() {
70 for (final TraceInfo traceInfo : this.traceInfos) {
71 if (traceInfo instanceof CompiledQuery) {
72 final String patternName = ((CompiledQuery) traceInfo).getPatternName();
73 return String.format(this.getClass().getName() + "<%s>=%s", patternName, super.toString());
74 }
75 }
76 return super.toString();
77 }
78
79}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorBucketNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorBucketNode.java
new file mode 100644
index 00000000..803bab20
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorBucketNode.java
@@ -0,0 +1,85 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import java.util.Collection;
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.Supplier;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21
22/**
23 * A bucket holds a filtered set of tuples of its parent {@link DiscriminatorDispatcherNode}.
24 * Exactly those that have the given bucket key at their discrimination column.
25 *
26 * <p> During operation, tuple contents and bucket keys have already been wrapped using {@link IQueryRuntimeContext#wrapElement(Object)}
27 *
28 * @author Gabor Bergmann
29 * @since 1.5
30 */
31public class DiscriminatorBucketNode extends SingleInputNode {
32
33 private Object bucketKey;
34
35 /**
36 * @param bucketKey will be wrapped using {@link IQueryRuntimeContext#wrapElement(Object)}
37
38 */
39 public DiscriminatorBucketNode(ReteContainer reteContainer, Object bucketKey) {
40 super(reteContainer);
41 this.bucketKey = reteContainer.getNetwork().getEngine().getRuntimeContext().wrapElement(bucketKey);
42 }
43
44 @Override
45 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
46 if (parent != null) {
47 getDispatcher().pullIntoFiltered(collector, bucketKey, flush);
48 }
49 }
50
51 @Override
52 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
53 if (parent != null) {
54 getDispatcher().pullIntoWithTimestampFiltered(collector, bucketKey, flush);
55 }
56 }
57
58 @Override
59 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
60 propagateUpdate(direction, updateElement, timestamp);
61 }
62
63 public Object getBucketKey() {
64 return bucketKey;
65 }
66
67 @Override
68 public void appendParent(Supplier supplier) {
69 if (! (supplier instanceof DiscriminatorDispatcherNode))
70 throw new IllegalArgumentException();
71 super.appendParent(supplier);
72 }
73
74 public DiscriminatorDispatcherNode getDispatcher() {
75 return (DiscriminatorDispatcherNode) parent;
76 }
77
78 @Override
79 protected String toStringCore() {
80 return String.format("%s<%s=='%s'>",
81 super.toStringCore(),
82 (getDispatcher() == null) ? "?" : getDispatcher().getDiscriminationColumnIndex(),
83 bucketKey);
84 }
85}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorDispatcherNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorDispatcherNode.java
new file mode 100644
index 00000000..a8e11fcd
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/DiscriminatorDispatcherNode.java
@@ -0,0 +1,154 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.HashMap;
14import java.util.Map;
15import java.util.Map.Entry;
16
17import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
20import tools.refinery.viatra.runtime.matchers.util.Direction;
21import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
22import tools.refinery.viatra.runtime.rete.network.NetworkStructureChangeSensitiveNode;
23import tools.refinery.viatra.runtime.rete.network.Receiver;
24import tools.refinery.viatra.runtime.rete.network.ReteContainer;
25import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
26import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
27
28/**
29 * Node that sends tuples off to different buckets (attached as children of type {@link DiscriminatorBucketNode}), based
30 * on the value of a given column.
31 *
32 * <p>
33 * Tuple contents and bucket keys have already been wrapped using {@link IQueryRuntimeContext#wrapElement(Object)}
34 *
35 * @author Gabor Bergmann
36 * @since 1.5
37 */
38public class DiscriminatorDispatcherNode extends SingleInputNode implements NetworkStructureChangeSensitiveNode {
39
40 private int discriminationColumnIndex;
41 private Map<Object, DiscriminatorBucketNode> buckets = new HashMap<>();
42 private Map<Object, Mailbox> bucketMailboxes = new HashMap<>();
43
44 /**
45 * @param reteContainer
46 */
47 public DiscriminatorDispatcherNode(ReteContainer reteContainer, int discriminationColumnIndex) {
48 super(reteContainer);
49 this.discriminationColumnIndex = discriminationColumnIndex;
50 }
51
52 @Override
53 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
54 Object dispatchKey = updateElement.get(discriminationColumnIndex);
55 Mailbox bucketMailBox = bucketMailboxes.get(dispatchKey);
56 if (bucketMailBox != null) {
57 bucketMailBox.postMessage(direction, updateElement, timestamp);
58 }
59 }
60
61 public int getDiscriminationColumnIndex() {
62 return discriminationColumnIndex;
63 }
64
65 @Override
66 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
67 propagatePullInto(collector, flush);
68 }
69
70 @Override
71 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
72 propagatePullIntoWithTimestamp(collector, flush);
73 }
74
75 /**
76 * @since 2.3
77 */
78 public void pullIntoFiltered(final Collection<Tuple> collector, final Object bucketKey, final boolean flush) {
79 final ArrayList<Tuple> unfiltered = new ArrayList<Tuple>();
80 propagatePullInto(unfiltered, flush);
81 for (Tuple tuple : unfiltered) {
82 if (bucketKey.equals(tuple.get(discriminationColumnIndex))) {
83 collector.add(tuple);
84 }
85 }
86 }
87
88 /**
89 * @since 2.3
90 */
91 public void pullIntoWithTimestampFiltered(final Map<Tuple, Timeline<Timestamp>> collector, final Object bucketKey,
92 final boolean flush) {
93 final Map<Tuple, Timeline<Timestamp>> unfiltered = CollectionsFactory.createMap();
94 propagatePullIntoWithTimestamp(unfiltered, flush);
95 for (final Entry<Tuple, Timeline<Timestamp>> entry : unfiltered.entrySet()) {
96 if (bucketKey.equals(entry.getKey().get(discriminationColumnIndex))) {
97 collector.put(entry.getKey(), entry.getValue());
98 }
99 }
100 }
101
102 @Override
103 public void appendChild(Receiver receiver) {
104 super.appendChild(receiver);
105 if (receiver instanceof DiscriminatorBucketNode) {
106 DiscriminatorBucketNode bucket = (DiscriminatorBucketNode) receiver;
107 Object bucketKey = bucket.getBucketKey();
108 DiscriminatorBucketNode old = buckets.put(bucketKey, bucket);
109 if (old != null) {
110 throw new IllegalStateException();
111 }
112 bucketMailboxes.put(bucketKey, this.getCommunicationTracker().proxifyMailbox(this, bucket.getMailbox()));
113 }
114 }
115
116 /**
117 * @since 2.2
118 */
119 public Map<Object, Mailbox> getBucketMailboxes() {
120 return this.bucketMailboxes;
121 }
122
123 @Override
124 public void networkStructureChanged() {
125 bucketMailboxes.clear();
126 for (Receiver receiver : children) {
127 if (receiver instanceof DiscriminatorBucketNode) {
128 DiscriminatorBucketNode bucket = (DiscriminatorBucketNode) receiver;
129 Object bucketKey = bucket.getBucketKey();
130 bucketMailboxes.put(bucketKey,
131 this.getCommunicationTracker().proxifyMailbox(this, bucket.getMailbox()));
132 }
133 }
134 }
135
136 @Override
137 public void removeChild(Receiver receiver) {
138 super.removeChild(receiver);
139 if (receiver instanceof DiscriminatorBucketNode) {
140 DiscriminatorBucketNode bucket = (DiscriminatorBucketNode) receiver;
141 Object bucketKey = bucket.getBucketKey();
142 DiscriminatorBucketNode old = buckets.remove(bucketKey);
143 if (old != bucket)
144 throw new IllegalStateException();
145 bucketMailboxes.remove(bucketKey);
146 }
147 }
148
149 @Override
150 protected String toStringCore() {
151 return super.toStringCore() + '<' + discriminationColumnIndex + '>';
152 }
153
154}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/EqualityFilterNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/EqualityFilterNode.java
new file mode 100644
index 00000000..014c2016
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/EqualityFilterNode.java
@@ -0,0 +1,41 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.rete.network.ReteContainer;
14
15public class EqualityFilterNode extends FilterNode {
16
17 int[] indices;
18 int first;
19
20 /**
21 * @param reteContainer
22 * @param indices
23 * indices of the Tuple that should hold equal values
24 */
25 public EqualityFilterNode(ReteContainer reteContainer, int[] indices) {
26 super(reteContainer);
27 this.indices = indices;
28 first = indices[0];
29 }
30
31 @Override
32 public boolean check(Tuple ps) {
33 Object firstElement = ps.get(first);
34 for (int i = 1 /* first is omitted */; i < indices.length; i++) {
35 if (!ps.get(indices[i]).equals(firstElement))
36 return false;
37 }
38 return true;
39 }
40
41}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/FilterNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/FilterNode.java
new file mode 100644
index 00000000..f66f1715
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/FilterNode.java
@@ -0,0 +1,69 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import java.util.Collection;
13import java.util.Map;
14import java.util.Map.Entry;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
19import tools.refinery.viatra.runtime.rete.network.ReteContainer;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21
22/**
23 * This node implements a simple filter. A stateless abstract check() predicate determines whether a matching is allowed
24 * to pass.
25 *
26 * @author Gabor Bergmann
27 *
28 */
29public abstract class FilterNode extends SingleInputNode {
30
31 public FilterNode(final ReteContainer reteContainer) {
32 super(reteContainer);
33 }
34
35 /**
36 * Abstract filtering predicate. Expected to be stateless.
37 *
38 * @param ps
39 * the matching to be checked.
40 * @return true if and only if the parameter matching is allowed to pass through this node.
41 */
42 public abstract boolean check(final Tuple ps);
43
44 @Override
45 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
46 for (final Tuple ps : this.reteContainer.pullPropagatedContents(this, flush)) {
47 if (check(ps)) {
48 collector.add(ps);
49 }
50 }
51 }
52
53 @Override
54 public void pullIntoWithTimeline(Map<Tuple, Timeline<Timestamp>> collector, boolean flush) {
55 for (final Entry<Tuple, Timeline<Timestamp>> entry : this.reteContainer.pullPropagatedContentsWithTimestamp(this, flush).entrySet()) {
56 if (check(entry.getKey())) {
57 collector.put(entry.getKey(), entry.getValue());
58 }
59 }
60 }
61
62 @Override
63 public void update(final Direction direction, final Tuple updateElement, final Timestamp timestamp) {
64 if (check(updateElement)) {
65 propagateUpdate(direction, updateElement, timestamp);
66 }
67 }
68
69}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/InequalityFilterNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/InequalityFilterNode.java
new file mode 100644
index 00000000..8dd3e949
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/InequalityFilterNode.java
@@ -0,0 +1,52 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
14import tools.refinery.viatra.runtime.rete.network.ReteContainer;
15
16/**
17 * This node filters patterns according to equalities and inequalities of elements. The 'subject' element is asserted to
18 * be different from the elements given by the inequalityMask.
19 *
20 *
21 * @author Gabor Bergmann
22 *
23 */
24public class InequalityFilterNode extends FilterNode {
25
26 int subjectIndex;
27 TupleMask inequalityMask;
28
29 /**
30 * @param reteContainer
31 * @param subject
32 * the index of the element that should be compared.
33 * @param inequalityMask
34 * the indices of elements that should be different from the subjectIndex.
35 */
36 public InequalityFilterNode(ReteContainer reteContainer, int subject, TupleMask inequalityMask) {
37 super(reteContainer);
38 this.subjectIndex = subject;
39 this.inequalityMask = inequalityMask;
40 }
41
42 @Override
43 public boolean check(Tuple ps) {
44 Object subject = ps.get(subjectIndex);
45 for (int ineq : inequalityMask.indices) {
46 if (subject.equals(ps.get(ineq)))
47 return false;
48 }
49 return true;
50 }
51
52}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/RepresentativeElectionNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/RepresentativeElectionNode.java
new file mode 100644
index 00000000..95018c4f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/RepresentativeElectionNode.java
@@ -0,0 +1,125 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Gabor Bergmann, Istvan Rath and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import tools.refinery.viatra.runtime.rete.itc.alg.representative.RepresentativeElectionAlgorithm;
12import tools.refinery.viatra.runtime.rete.itc.alg.representative.RepresentativeObserver;
13import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
16import tools.refinery.viatra.runtime.matchers.util.Clearable;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
19import tools.refinery.viatra.runtime.rete.network.ReinitializedNode;
20import tools.refinery.viatra.runtime.rete.network.ReteContainer;
21import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
22
23import java.util.Collection;
24import java.util.Map;
25
26public class RepresentativeElectionNode extends SingleInputNode implements Clearable, RepresentativeObserver,
27 ReinitializedNode {
28 private final RepresentativeElectionAlgorithm.Factory algorithmFactory;
29 private Graph<Object> graph;
30 private RepresentativeElectionAlgorithm algorithm;
31
32 public RepresentativeElectionNode(ReteContainer reteContainer,
33 RepresentativeElectionAlgorithm.Factory algorithmFactory) {
34 super(reteContainer);
35 this.algorithmFactory = algorithmFactory;
36 graph = new Graph<>();
37 algorithm = algorithmFactory.create(graph);
38 algorithm.setObserver(this);
39 reteContainer.registerClearable(this);
40 }
41
42 @Override
43 public void networkStructureChanged() {
44 if (reteContainer.isTimelyEvaluation() && reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
45 throw new IllegalStateException(this + " cannot be used in recursive differential dataflow evaluation!");
46 }
47 super.networkStructureChanged();
48 }
49
50 @Override
51 public void reinitializeWith(Collection<Tuple> tuples) {
52 algorithm.dispose();
53 graph = new Graph<>();
54 for (var tuple : tuples) {
55 insertEdge(tuple.get(0), tuple.get(1));
56 }
57 algorithm = algorithmFactory.create(graph);
58 algorithm.setObserver(this);
59 }
60
61 @Override
62 public void tupleChanged(Object source, Object representative, Direction direction) {
63 var tuple = Tuples.staticArityFlatTupleOf(source, representative);
64 propagateUpdate(direction, tuple, Timestamp.ZERO);
65 }
66
67 @Override
68 public void clear() {
69 algorithm.dispose();
70 graph = new Graph<>();
71 algorithm = algorithmFactory.create(graph);
72 }
73
74 @Override
75 public void update(Direction direction, Tuple updateElement, Timestamp timestamp) {
76 var source = updateElement.get(0);
77 var target = updateElement.get(1);
78 switch (direction) {
79 case INSERT -> insertEdge(source, target);
80 case DELETE -> deleteEdge(source, target);
81 default -> throw new IllegalArgumentException("Unknown direction: " + direction);
82 }
83 }
84
85 private void insertEdge(Object source, Object target) {
86 graph.insertNode(source);
87 graph.insertNode(target);
88 graph.insertEdge(source, target);
89 }
90
91 private void deleteEdge(Object source, Object target) {
92 graph.deleteEdgeIfExists(source, target);
93 if (isIsolated(source)) {
94 graph.deleteNode(source);
95 }
96 if (!source.equals(target) && isIsolated(target)) {
97 graph.deleteNode(target);
98 }
99 }
100
101 private boolean isIsolated(Object node) {
102 return graph.getTargetNodes(node).isEmpty() && graph.getSourceNodes(node).isEmpty();
103 }
104
105 @Override
106 public void pullInto(Collection<Tuple> collector, boolean flush) {
107 for (var entry : algorithm.getComponents().entrySet()) {
108 var representative = entry.getKey();
109 for (var node : entry.getValue()) {
110 collector.add(Tuples.staticArityFlatTupleOf(node, representative));
111 }
112 }
113 }
114
115 @Override
116 public void pullIntoWithTimeline(Map<Tuple, Timeline<Timestamp>> collector, boolean flush) {
117 // Use all zero timestamps because this node cannot be used in recursive groups anyway.
118 for (var entry : algorithm.getComponents().entrySet()) {
119 var representative = entry.getKey();
120 for (var node : entry.getValue()) {
121 collector.put(Tuples.staticArityFlatTupleOf(node, representative), Timestamp.INSERT_AT_ZERO_TIMELINE);
122 }
123 }
124 }
125}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/SingleInputNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/SingleInputNode.java
new file mode 100644
index 00000000..99fc45b2
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/SingleInputNode.java
@@ -0,0 +1,126 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import java.util.Collection;
13import java.util.Collections;
14import java.util.Map;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.StandardNode;
20import tools.refinery.viatra.runtime.rete.network.Supplier;
21import tools.refinery.viatra.runtime.rete.network.Tunnel;
22import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker;
23import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
24import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
25import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
26import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
27import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
28
29/**
30 * @author Gabor Bergmann
31 *
32 */
33public abstract class SingleInputNode extends StandardNode implements Tunnel {
34
35 protected Supplier parent;
36 /**
37 * @since 1.6
38 */
39 protected Mailbox mailbox;
40
41 public SingleInputNode(ReteContainer reteContainer) {
42 super(reteContainer);
43 mailbox = instantiateMailbox();
44 reteContainer.registerClearable(mailbox);
45 parent = null;
46 }
47
48 /**
49 * Instantiates the {@link Mailbox} of this receiver.
50 * Subclasses may override this method to provide their own mailbox implementation.
51 *
52 * @return the mailbox
53 * @since 2.0
54 */
55 protected Mailbox instantiateMailbox() {
56 if (this.reteContainer.isTimelyEvaluation()) {
57 return new TimelyMailbox(this, this.reteContainer);
58 } else {
59 return new BehaviorChangingMailbox(this, this.reteContainer);
60 }
61 }
62
63 @Override
64 public CommunicationTracker getCommunicationTracker() {
65 return this.reteContainer.getCommunicationTracker();
66 }
67
68 @Override
69 public Mailbox getMailbox() {
70 return this.mailbox;
71 }
72
73 @Override
74 public void appendParent(Supplier supplier) {
75 if (parent == null)
76 parent = supplier;
77 else
78 throw new UnsupportedOperationException("Illegal RETE edge: " + this + " already has a parent (" + parent
79 + ") and cannot connect to additional parent (" + supplier
80 + ") as it is not a Uniqueness Enforcer Node. ");
81 }
82
83 @Override
84 public void removeParent(Supplier supplier) {
85 if (parent == supplier)
86 parent = null;
87 else
88 throw new IllegalArgumentException("Illegal RETE edge removal: the parent of " + this + " is not "
89 + supplier);
90 }
91
92 /**
93 * To be called by derived classes and ReteContainer.
94 */
95 public void propagatePullInto(final Collection<Tuple> collector, final boolean flush) {
96 if (parent != null) {
97 parent.pullInto(collector, flush);
98 }
99 }
100
101 /**
102 * To be called by derived classes and ReteContainer.
103 */
104 public void propagatePullIntoWithTimestamp(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
105 if (parent != null) {
106 parent.pullIntoWithTimeline(collector, flush);
107 }
108 }
109
110 @Override
111 public Collection<Supplier> getParents() {
112 if (parent == null)
113 return Collections.emptySet();
114 else
115 return Collections.singleton(parent);
116 }
117
118 @Override
119 public void assignTraceInfo(TraceInfo traceInfo) {
120 super.assignTraceInfo(traceInfo);
121 if (traceInfo.propagateFromStandardNodeToSupplierParent())
122 if (parent != null)
123 parent.acceptPropagatedTraceInfo(traceInfo);
124 }
125
126}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyProductionNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyProductionNode.java
new file mode 100644
index 00000000..82640948
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyProductionNode.java
@@ -0,0 +1,63 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import java.util.Iterator;
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15import tools.refinery.viatra.runtime.rete.network.ProductionNode;
16import tools.refinery.viatra.runtime.rete.network.ReteContainer;
17import tools.refinery.viatra.runtime.rete.traceability.CompiledQuery;
18import tools.refinery.viatra.runtime.rete.traceability.TraceInfo;
19/**
20 * Differential dataflow implementation of the Production node, based on {@link TimelyUniquenessEnforcerNode}.
21 *
22 * @author Tamas Szabo
23 * @noinstantiate This class is not intended to be instantiated by clients.
24 * @since 2.3
25 */
26public class TimelyProductionNode extends TimelyUniquenessEnforcerNode implements ProductionNode {
27
28 protected final Map<String, Integer> posMapping;
29
30 public TimelyProductionNode(final ReteContainer reteContainer, final Map<String, Integer> posMapping) {
31 super(reteContainer, posMapping.size());
32 this.posMapping = posMapping;
33 }
34
35 @Override
36 public Map<String, Integer> getPosMapping() {
37 return this.posMapping;
38 }
39
40 @Override
41 public Iterator<Tuple> iterator() {
42 return this.memory.keySet().iterator();
43 }
44
45 @Override
46 public void acceptPropagatedTraceInfo(final TraceInfo traceInfo) {
47 if (traceInfo.propagateToProductionNodeParentAlso()) {
48 super.acceptPropagatedTraceInfo(traceInfo);
49 }
50 }
51
52 @Override
53 public String toString() {
54 for (final TraceInfo traceInfo : this.traceInfos) {
55 if (traceInfo instanceof CompiledQuery) {
56 final String patternName = ((CompiledQuery) traceInfo).getPatternName();
57 return String.format(this.getClass().getName() + "<%s>=%s", patternName, super.toString());
58 }
59 }
60 return super.toString();
61 }
62
63}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyUniquenessEnforcerNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyUniquenessEnforcerNode.java
new file mode 100644
index 00000000..4c4b4fc0
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TimelyUniquenessEnforcerNode.java
@@ -0,0 +1,161 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import java.util.Collection;
12import java.util.Map;
13import java.util.Map.Entry;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.matchers.util.Signed;
19import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
20import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
21import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
22import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
23import tools.refinery.viatra.runtime.rete.index.timely.TimelyMemoryIdentityIndexer;
24import tools.refinery.viatra.runtime.rete.index.timely.TimelyMemoryNullIndexer;
25import tools.refinery.viatra.runtime.rete.matcher.TimelyConfiguration.TimelineRepresentation;
26import tools.refinery.viatra.runtime.rete.network.ReteContainer;
27import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
28import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
29import tools.refinery.viatra.runtime.rete.network.communication.timely.ResumableNode;
30import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
31import tools.refinery.viatra.runtime.rete.network.mailbox.timely.TimelyMailbox;
32
33/**
34 * Timely uniqueness enforcer node implementation.
35 *
36 * @author Tamas Szabo
37 * @noinstantiate This class is not intended to be instantiated by clients.
38 * @noextend This class is not intended to be subclassed by clients.
39 * @since 2.4
40 */
41public class TimelyUniquenessEnforcerNode extends AbstractUniquenessEnforcerNode implements ResumableNode {
42
43 protected final TimelyMemory<Timestamp> memory;
44 /**
45 * @since 2.4
46 */
47 protected CommunicationGroup group;
48
49 public TimelyUniquenessEnforcerNode(final ReteContainer container, final int tupleWidth) {
50 super(container, tupleWidth);
51 this.memory = new TimelyMemory<Timestamp>(
52 container.getTimelyConfiguration().getTimelineRepresentation() == TimelineRepresentation.FAITHFUL);
53 container.registerClearable(this.memory);
54 this.mailbox = instantiateMailbox();
55 container.registerClearable(this.mailbox);
56 }
57
58 protected Mailbox instantiateMailbox() {
59 return new TimelyMailbox(this, this.reteContainer);
60 }
61
62 @Override
63 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
64 for (final Tuple tuple : this.memory.getTuplesAtInfinity()) {
65 collector.add(tuple);
66 }
67 }
68
69 @Override
70 public CommunicationGroup getCurrentGroup() {
71 return this.group;
72 }
73
74 @Override
75 public void setCurrentGroup(final CommunicationGroup group) {
76 this.group = group;
77 }
78
79 @Override
80 public Set<Tuple> getTuples() {
81 return this.memory.getTuplesAtInfinity();
82 }
83
84 /**
85 * @since 2.4
86 */
87 @Override
88 public Timestamp getResumableTimestamp() {
89 return this.memory.getResumableTimestamp();
90 }
91
92 /**
93 * @since 2.4
94 */
95 @Override
96 public void resumeAt(final Timestamp timestamp) {
97 final Map<Tuple, Diff<Timestamp>> diffMap = this.memory.resumeAt(timestamp);
98 for (final Entry<Tuple, Diff<Timestamp>> entry : diffMap.entrySet()) {
99 for (final Signed<Timestamp> signed : entry.getValue()) {
100 propagate(signed.getDirection(), entry.getKey(), signed.getPayload());
101 }
102 }
103 final Timestamp nextTimestamp = this.memory.getResumableTimestamp();
104 if (nextTimestamp != null) {
105 this.group.notifyHasMessage(this.mailbox, nextTimestamp);
106 }
107 }
108
109 @Override
110 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
111 Diff<Timestamp> resultDiff = null;
112 if (direction == Direction.INSERT) {
113 resultDiff = this.memory.put(update, timestamp);
114 } else {
115 try {
116 resultDiff = this.memory.remove(update, timestamp);
117 } catch (final IllegalStateException e) {
118 issueError("[INTERNAL ERROR] Duplicate deletion of " + update + " was detected in "
119 + this.getClass().getName() + " " + this + " for pattern(s) "
120 + getTraceInfoPatternsEnumerated(), e);
121 // diff will remain unset in case of the exception, it is time to return
122 return;
123 }
124 }
125
126 for (final Signed<Timestamp> signed : resultDiff) {
127 propagate(signed.getDirection(), update, signed.getPayload());
128 }
129 }
130
131 @Override
132 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
133 collector.putAll(this.memory.asMap());
134 }
135
136 @Override
137 public ProjectionIndexer getNullIndexer() {
138 if (this.memoryNullIndexer == null) {
139 this.memoryNullIndexer = new TimelyMemoryNullIndexer(this.reteContainer, this.tupleWidth, this.memory, this,
140 this, this.specializedListeners);
141 this.getCommunicationTracker().registerDependency(this, this.memoryNullIndexer);
142 }
143 return this.memoryNullIndexer;
144 }
145
146 @Override
147 public ProjectionIndexer getIdentityIndexer() {
148 if (this.memoryIdentityIndexer == null) {
149 this.memoryIdentityIndexer = new TimelyMemoryIdentityIndexer(this.reteContainer, this.tupleWidth,
150 this.memory, this, this, this.specializedListeners);
151 this.getCommunicationTracker().registerDependency(this, this.memoryIdentityIndexer);
152 }
153 return this.memoryIdentityIndexer;
154 }
155
156 @Override
157 public void networkStructureChanged() {
158 super.networkStructureChanged();
159 }
160
161} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransformerNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransformerNode.java
new file mode 100644
index 00000000..24750656
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransformerNode.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import java.util.Collection;
13import java.util.Map;
14import java.util.Map.Entry;
15
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.util.Direction;
18import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
19import tools.refinery.viatra.runtime.rete.network.ReteContainer;
20import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
21
22public abstract class TransformerNode extends SingleInputNode {
23
24 public TransformerNode(final ReteContainer reteContainer) {
25 super(reteContainer);
26 }
27
28 protected abstract Tuple transform(final Tuple input);
29
30 @Override
31 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
32 for (Tuple ps : reteContainer.pullPropagatedContents(this, flush)) {
33 collector.add(transform(ps));
34 }
35 }
36
37 @Override
38 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
39 for (final Entry<Tuple, Timeline<Timestamp>> entry : reteContainer.pullPropagatedContentsWithTimestamp(this, flush).entrySet()) {
40 collector.put(transform(entry.getKey()), entry.getValue());
41 }
42 }
43
44 @Override
45 public void update(final Direction direction, final Tuple updateElement, final Timestamp timestamp) {
46 propagateUpdate(direction, transform(updateElement), timestamp);
47 }
48
49}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransitiveClosureNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransitiveClosureNode.java
new file mode 100644
index 00000000..fdda4ef4
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransitiveClosureNode.java
@@ -0,0 +1,147 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Gabor Bergmann, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.single;
10
11import tools.refinery.viatra.runtime.rete.itc.alg.incscc.IncSCCAlg;
12import tools.refinery.viatra.runtime.rete.itc.alg.misc.Tuple;
13import tools.refinery.viatra.runtime.rete.itc.graphimpl.Graph;
14import tools.refinery.viatra.runtime.rete.itc.igraph.ITcDataSource;
15import tools.refinery.viatra.runtime.rete.itc.igraph.ITcObserver;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
17import tools.refinery.viatra.runtime.matchers.util.Clearable;
18import tools.refinery.viatra.runtime.matchers.util.Direction;
19import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
20import tools.refinery.viatra.runtime.rete.network.NetworkStructureChangeSensitiveNode;
21import tools.refinery.viatra.runtime.rete.network.ReinitializedNode;
22import tools.refinery.viatra.runtime.rete.network.ReteContainer;
23import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
24import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
25
26import java.util.Collection;
27import java.util.Map;
28
29/**
30 * This class represents a transitive closure node in the Rete net.
31 * <p>
32 * This node must not be used in recursive {@link CommunicationGroup}s.
33 *
34 * @author Gabor Bergmann
35 *
36 */
37public class TransitiveClosureNode extends SingleInputNode
38 implements Clearable, ITcObserver<Object>, NetworkStructureChangeSensitiveNode, ReinitializedNode {
39
40 private Graph<Object> graphDataSource;
41 private ITcDataSource<Object> transitiveClosureAlgorithm;
42
43 /**
44 * Create a new transitive closure rete node.
45 *
46 * Client may optionally call {@link #reinitializeWith(Collection)} before using the node, instead of inserting the
47 * initial set of tuples one by one.
48 *
49 * @param reteContainer
50 * the rete container of the node
51 */
52 public TransitiveClosureNode(ReteContainer reteContainer) {
53 super(reteContainer);
54 graphDataSource = new Graph<Object>();
55 transitiveClosureAlgorithm = new IncSCCAlg<Object>(graphDataSource);
56 transitiveClosureAlgorithm.attachObserver(this);
57 reteContainer.registerClearable(this);
58 }
59
60 @Override
61 public void networkStructureChanged() {
62 if (this.reteContainer.isTimelyEvaluation() && this.reteContainer.getCommunicationTracker().isInRecursiveGroup(this)) {
63 throw new IllegalStateException(this.toString() + " cannot be used in recursive differential dataflow evaluation!");
64 }
65 super.networkStructureChanged();
66 }
67
68 /**
69 * Initializes the graph data source with the given collection of tuples.
70 *
71 * @param tuples
72 * the initial collection of tuples
73 */
74 @Override
75 public void reinitializeWith(Collection<tools.refinery.viatra.runtime.matchers.tuple.Tuple> tuples) {
76 clear();
77
78 for (tools.refinery.viatra.runtime.matchers.tuple.Tuple t : tuples) {
79 graphDataSource.insertNode(t.get(0));
80 graphDataSource.insertNode(t.get(1));
81 graphDataSource.insertEdge(t.get(0), t.get(1));
82 }
83 transitiveClosureAlgorithm.attachObserver(this);
84 }
85
86 @Override
87 public void pullInto(final Collection<tools.refinery.viatra.runtime.matchers.tuple.Tuple> collector, final boolean flush) {
88 for (final Tuple<Object> tuple : ((IncSCCAlg<Object>) transitiveClosureAlgorithm).getTcRelation()) {
89 collector.add(Tuples.staticArityFlatTupleOf(tuple.getSource(), tuple.getTarget()));
90 }
91 }
92
93 @Override
94 public void pullIntoWithTimeline(
95 final Map<tools.refinery.viatra.runtime.matchers.tuple.Tuple, Timeline<Timestamp>> collector,
96 final boolean flush) {
97 // use all zero timestamps because this node cannot be used in recursive groups anyway
98 for (final Tuple<Object> tuple : ((IncSCCAlg<Object>) transitiveClosureAlgorithm).getTcRelation()) {
99 collector.put(Tuples.staticArityFlatTupleOf(tuple.getSource(), tuple.getTarget()), Timestamp.INSERT_AT_ZERO_TIMELINE);
100 }
101 }
102
103 @Override
104 public void update(Direction direction, tools.refinery.viatra.runtime.matchers.tuple.Tuple updateElement,
105 Timestamp timestamp) {
106 if (updateElement.getSize() == 2) {
107 Object source = updateElement.get(0);
108 Object target = updateElement.get(1);
109
110 if (direction == Direction.INSERT) {
111 graphDataSource.insertNode(source);
112 graphDataSource.insertNode(target);
113 graphDataSource.insertEdge(source, target);
114 }
115 if (direction == Direction.DELETE) {
116 graphDataSource.deleteEdgeIfExists(source, target);
117
118 if (((IncSCCAlg<Object>) transitiveClosureAlgorithm).isIsolated(source)) {
119 graphDataSource.deleteNode(source);
120 }
121 if (!source.equals(target) && ((IncSCCAlg<Object>) transitiveClosureAlgorithm).isIsolated(target)) {
122 graphDataSource.deleteNode(target);
123 }
124 }
125 }
126 }
127
128 @Override
129 public void clear() {
130 transitiveClosureAlgorithm.dispose();
131 graphDataSource = new Graph<Object>();
132 transitiveClosureAlgorithm = new IncSCCAlg<Object>(graphDataSource);
133 }
134
135 @Override
136 public void tupleInserted(Object source, Object target) {
137 tools.refinery.viatra.runtime.matchers.tuple.Tuple tuple = Tuples.staticArityFlatTupleOf(source, target);
138 propagateUpdate(Direction.INSERT, tuple, Timestamp.ZERO);
139 }
140
141 @Override
142 public void tupleDeleted(Object source, Object target) {
143 tools.refinery.viatra.runtime.matchers.tuple.Tuple tuple = Tuples.staticArityFlatTupleOf(source, target);
144 propagateUpdate(Direction.DELETE, tuple, Timestamp.ZERO);
145 }
146
147}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransparentNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransparentNode.java
new file mode 100644
index 00000000..6c21a966
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TransparentNode.java
@@ -0,0 +1,48 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import java.util.Collection;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.util.Direction;
17import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
18import tools.refinery.viatra.runtime.rete.network.ReteContainer;
19import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
20
21/**
22 * Simply propagates everything. Might be used to join or fork.
23 *
24 * @author Gabor Bergmann
25 */
26public class TransparentNode extends SingleInputNode {
27
28 public TransparentNode(final ReteContainer reteContainer) {
29 super(reteContainer);
30 }
31
32 @Override
33 public void update(final Direction direction, final Tuple updateElement, final Timestamp timestamp) {
34 propagateUpdate(direction, updateElement, timestamp);
35
36 }
37
38 @Override
39 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
40 propagatePullInto(collector, flush);
41 }
42
43 @Override
44 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
45 propagatePullIntoWithTimestamp(collector, flush);
46 }
47
48}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TrimmerNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TrimmerNode.java
new file mode 100644
index 00000000..8a72138c
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/TrimmerNode.java
@@ -0,0 +1,61 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
14import tools.refinery.viatra.runtime.rete.network.ReteContainer;
15
16/**
17 * Trims the matchings as specified by a mask.
18 *
19 * @author Gabor Bergmann
20 *
21 */
22public class TrimmerNode extends TransformerNode {
23
24 protected TupleMask mask;
25
26 /**
27 * @param reteContainer
28 * @param mask
29 * The mask used to trim substitutions.
30 */
31 public TrimmerNode(ReteContainer reteContainer, TupleMask mask) {
32 super(reteContainer);
33 this.mask = mask;
34 }
35
36 public TrimmerNode(ReteContainer reteContainer) {
37 super(reteContainer);
38 this.mask = null;
39 }
40
41 /**
42 * @return the mask
43 */
44 public TupleMask getMask() {
45 return mask;
46 }
47
48 /**
49 * @param mask
50 * the mask to set
51 */
52 public void setMask(TupleMask mask) {
53 this.mask = mask;
54 }
55
56 @Override
57 protected Tuple transform(Tuple input) {
58 return mask.transform(input);
59 }
60
61}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/UniquenessEnforcerNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/UniquenessEnforcerNode.java
new file mode 100644
index 00000000..5bfde248
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/UniquenessEnforcerNode.java
@@ -0,0 +1,321 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann, Tamas Szabo and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import java.util.Collection;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.context.IPosetComparator;
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
20import tools.refinery.viatra.runtime.matchers.util.Direction;
21import tools.refinery.viatra.runtime.matchers.util.IMultiset;
22import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
23import tools.refinery.viatra.runtime.rete.index.MemoryIdentityIndexer;
24import tools.refinery.viatra.runtime.rete.index.MemoryNullIndexer;
25import tools.refinery.viatra.runtime.rete.index.ProjectionIndexer;
26import tools.refinery.viatra.runtime.rete.network.PosetAwareReceiver;
27import tools.refinery.viatra.runtime.rete.network.RederivableNode;
28import tools.refinery.viatra.runtime.rete.network.ReteContainer;
29import tools.refinery.viatra.runtime.rete.network.communication.CommunicationGroup;
30import tools.refinery.viatra.runtime.rete.network.communication.Timestamp;
31import tools.refinery.viatra.runtime.rete.network.communication.timeless.RecursiveCommunicationGroup;
32import tools.refinery.viatra.runtime.rete.network.mailbox.Mailbox;
33import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox;
34import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.PosetAwareMailbox;
35
36/**
37 * Timeless uniqueness enforcer node implementation.
38 * <p>
39 * The node is capable of operating in the delete and re-derive mode. In this mode, it is also possible to equip the
40 * node with an {@link IPosetComparator} to identify monotone changes; thus, ensuring that a fix-point can be reached
41 * during the evaluation.
42 *
43 * @author Gabor Bergmann
44 * @author Tamas Szabo
45 * @noinstantiate This class is not intended to be instantiated by clients.
46 * @noextend This class is not intended to be subclassed by clients.
47 */
48public class UniquenessEnforcerNode extends AbstractUniquenessEnforcerNode
49 implements RederivableNode, PosetAwareReceiver {
50
51 protected IMultiset<Tuple> memory;
52 /**
53 * @since 1.6
54 */
55 protected IMultiset<Tuple> rederivableMemory;
56 /**
57 * @since 1.6
58 */
59 protected boolean deleteRederiveEvaluation;
60
61 /**
62 * @since 1.7
63 */
64 protected CommunicationGroup currentGroup;
65
66 public UniquenessEnforcerNode(final ReteContainer reteContainer, final int tupleWidth) {
67 this(reteContainer, tupleWidth, false);
68 }
69
70 /**
71 * OPTIONAL ELEMENT - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE
72 *
73 * @since 1.6
74 */
75 protected final TupleMask coreMask;
76 /**
77 * OPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE
78 *
79 * @since 1.6
80 */
81 protected final TupleMask posetMask;
82 /**
83 * OPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE
84 *
85 * @since 1.6
86 */
87 protected final IPosetComparator posetComparator;
88
89 /**
90 * @since 1.6
91 */
92 public UniquenessEnforcerNode(final ReteContainer reteContainer, final int tupleWidth,
93 final boolean deleteRederiveEvaluation) {
94 this(reteContainer, tupleWidth, deleteRederiveEvaluation, null, null, null);
95 }
96
97 /**
98 * @since 1.6
99 */
100 public UniquenessEnforcerNode(final ReteContainer reteContainer, final int tupleWidth,
101 final boolean deleteRederiveEvaluation, final TupleMask coreMask, final TupleMask posetMask,
102 final IPosetComparator posetComparator) {
103 super(reteContainer, tupleWidth);
104 this.memory = CollectionsFactory.createMultiset();
105 this.rederivableMemory = CollectionsFactory.createMultiset();
106 reteContainer.registerClearable(this.memory);
107 reteContainer.registerClearable(this.rederivableMemory);
108 this.deleteRederiveEvaluation = deleteRederiveEvaluation;
109 this.coreMask = coreMask;
110 this.posetMask = posetMask;
111 this.posetComparator = posetComparator;
112 this.mailbox = instantiateMailbox();
113 reteContainer.registerClearable(this.mailbox);
114 }
115
116 @Override
117 public void pullInto(final Collection<Tuple> collector, final boolean flush) {
118 for (final Tuple tuple : this.memory.distinctValues()) {
119 collector.add(tuple);
120 }
121 }
122
123 /**
124 * @since 2.8
125 */
126 @Override
127 public Set<Tuple> getTuples() {
128 return this.memory.distinctValues();
129 }
130
131 @Override
132 public boolean isInDRedMode() {
133 return this.deleteRederiveEvaluation;
134 }
135
136 @Override
137 public TupleMask getCoreMask() {
138 return coreMask;
139 }
140
141 @Override
142 public TupleMask getPosetMask() {
143 return posetMask;
144 }
145
146 @Override
147 public IPosetComparator getPosetComparator() {
148 return posetComparator;
149 }
150
151 @Override
152 public void pullIntoWithTimeline(final Map<Tuple, Timeline<Timestamp>> collector, final boolean flush) {
153 throw new UnsupportedOperationException("Use the timely version of this node!");
154 }
155
156 /**
157 * @since 2.0
158 */
159 protected Mailbox instantiateMailbox() {
160 if (coreMask != null && posetMask != null && posetComparator != null) {
161 return new PosetAwareMailbox(this, this.reteContainer);
162 } else {
163 return new BehaviorChangingMailbox(this, this.reteContainer);
164 }
165 }
166
167 @Override
168 public void update(final Direction direction, final Tuple update, final Timestamp timestamp) {
169 updateWithPosetInfo(direction, update, false);
170 }
171
172 @Override
173 public void updateWithPosetInfo(final Direction direction, final Tuple update, final boolean monotone) {
174 if (this.deleteRederiveEvaluation) {
175 if (updateWithDeleteAndRederive(direction, update, monotone)) {
176 propagate(direction, update, Timestamp.ZERO);
177 }
178 } else {
179 if (updateDefault(direction, update)) {
180 propagate(direction, update, Timestamp.ZERO);
181 }
182 }
183 }
184
185 /**
186 * @since 2.4
187 */
188 protected boolean updateWithDeleteAndRederive(final Direction direction, final Tuple update,
189 final boolean monotone) {
190 boolean propagate = false;
191
192 final int memoryCount = memory.getCount(update);
193 final int rederivableCount = rederivableMemory.getCount(update);
194
195 if (direction == Direction.INSERT) {
196 // INSERT
197 if (rederivableCount != 0) {
198 // the tuple is in the re-derivable memory
199 rederivableMemory.addOne(update);
200 if (rederivableMemory.isEmpty()) {
201 // there is nothing left to be re-derived
202 // this can happen if the INSERT cancelled out a DELETE
203 ((RecursiveCommunicationGroup) currentGroup).removeRederivable(this);
204 }
205 } else {
206 // the tuple is in the main memory
207 propagate = memory.addOne(update);
208 }
209 } else {
210 // DELETE
211 if (rederivableCount != 0) {
212 // the tuple is in the re-derivable memory
213 if (memoryCount != 0) {
214 issueError("[INTERNAL ERROR] Inconsistent state for " + update
215 + " because it is present both in the main and re-derivable memory in the UniquenessEnforcerNode "
216 + this + " for pattern(s) " + getTraceInfoPatternsEnumerated(), null);
217 }
218
219 try {
220 rederivableMemory.removeOne(update);
221 } catch (final IllegalStateException ex) {
222 issueError(
223 "[INTERNAL ERROR] Duplicate deletion of " + update + " was detected in UniquenessEnforcer "
224 + this + " for pattern(s) " + getTraceInfoPatternsEnumerated(),
225 ex);
226 }
227 if (rederivableMemory.isEmpty()) {
228 // there is nothing left to be re-derived
229 ((RecursiveCommunicationGroup) currentGroup).removeRederivable(this);
230 }
231 } else {
232 // the tuple is in the main memory
233 if (monotone) {
234 propagate = memory.removeOne(update);
235 } else {
236 final int count = memoryCount - 1;
237 if (count > 0) {
238 if (rederivableMemory.isEmpty()) {
239 // there is now something to be re-derived
240 ((RecursiveCommunicationGroup) currentGroup).addRederivable(this);
241 }
242 rederivableMemory.addPositive(update, count);
243 }
244 memory.clearAllOf(update);
245 propagate = true;
246 }
247 }
248 }
249
250 return propagate;
251 }
252
253 /**
254 * @since 2.4
255 */
256 protected boolean updateDefault(final Direction direction, final Tuple update) {
257 boolean propagate = false;
258 if (direction == Direction.INSERT) {
259 // INSERT
260 propagate = memory.addOne(update);
261 } else {
262 // DELETE
263 try {
264 propagate = memory.removeOne(update);
265 } catch (final IllegalStateException ex) {
266 propagate = false;
267 issueError("[INTERNAL ERROR] Duplicate deletion of " + update + " was detected in "
268 + this.getClass().getName() + " " + this + " for pattern(s) "
269 + getTraceInfoPatternsEnumerated(), ex);
270 }
271 }
272 return propagate;
273 }
274
275 /**
276 * @since 1.6
277 */
278 @Override
279 public void rederiveOne() {
280 final Tuple update = rederivableMemory.iterator().next();
281 final int count = rederivableMemory.getCount(update);
282 rederivableMemory.clearAllOf(update);
283 memory.addPositive(update, count);
284 // if there is no other re-derivable tuple, then unregister the node itself
285 if (this.rederivableMemory.isEmpty()) {
286 ((RecursiveCommunicationGroup) currentGroup).removeRederivable(this);
287 }
288 propagate(Direction.INSERT, update, Timestamp.ZERO);
289 }
290
291 @Override
292 public ProjectionIndexer getNullIndexer() {
293 if (this.memoryNullIndexer == null) {
294 this.memoryNullIndexer = new MemoryNullIndexer(this.reteContainer, this.tupleWidth,
295 this.memory.distinctValues(), this, this, this.specializedListeners);
296 this.getCommunicationTracker().registerDependency(this, this.memoryNullIndexer);
297 }
298 return this.memoryNullIndexer;
299 }
300
301 @Override
302 public ProjectionIndexer getIdentityIndexer() {
303 if (this.memoryIdentityIndexer == null) {
304 this.memoryIdentityIndexer = new MemoryIdentityIndexer(this.reteContainer, this.tupleWidth,
305 this.memory.distinctValues(), this, this, this.specializedListeners);
306 this.getCommunicationTracker().registerDependency(this, this.memoryIdentityIndexer);
307 }
308 return this.memoryIdentityIndexer;
309 }
310
311 @Override
312 public CommunicationGroup getCurrentGroup() {
313 return currentGroup;
314 }
315
316 @Override
317 public void setCurrentGroup(final CommunicationGroup currentGroup) {
318 this.currentGroup = currentGroup;
319 }
320
321}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/ValueBinderFilterNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/ValueBinderFilterNode.java
new file mode 100644
index 00000000..c641bf6e
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/single/ValueBinderFilterNode.java
@@ -0,0 +1,44 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.single;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13import tools.refinery.viatra.runtime.rete.network.ReteContainer;
14
15/**
16 * A filter node that keeps only those tuples that contain a certain value at a certain position.
17 *
18 * @author Bergmann Gabor
19 *
20 */
21public class ValueBinderFilterNode extends FilterNode {
22
23 int bindingIndex;
24 Object bindingValue;
25
26 /**
27 * @param reteContainer
28 * @param bindingIndex
29 * the position in the tuple that should be bound
30 * @param bindingValue
31 * the value to which the tuple has to be bound
32 */
33 public ValueBinderFilterNode(ReteContainer reteContainer, int bindingIndex, Object bindingValue) {
34 super(reteContainer);
35 this.bindingIndex = bindingIndex;
36 this.bindingValue = bindingValue;
37 }
38
39 @Override
40 public boolean check(Tuple ps) {
41 return bindingValue.equals(ps.get(bindingIndex));
42 }
43
44}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ActiveNodeConflictTrace.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ActiveNodeConflictTrace.java
new file mode 100644
index 00000000..2055dfe8
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ActiveNodeConflictTrace.java
@@ -0,0 +1,24 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
12
13public class ActiveNodeConflictTrace extends RecipeTraceInfo { // TODO implement PatternTraceInfo
14 RecipeTraceInfo inactiveRecipeTrace;
15 public ActiveNodeConflictTrace(ReteNodeRecipe recipe,
16 RecipeTraceInfo parentRecipeTrace,
17 RecipeTraceInfo inactiveRecipeTrace) {
18 super(recipe, parentRecipeTrace);
19 this.inactiveRecipeTrace = inactiveRecipeTrace;
20 }
21 public RecipeTraceInfo getInactiveRecipeTrace() {
22 return inactiveRecipeTrace;
23 }
24} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java
new file mode 100644
index 00000000..b8c793c5
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java
@@ -0,0 +1,54 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import java.util.Map;
12
13import tools.refinery.viatra.runtime.matchers.psystem.PBody;
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
15import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
16
17/**
18 * Indicates that recipe expresses the finished match set of a query.
19 * @author Bergmann Gabor
20 * @noinstantiate This class is not intended to be instantiated by clients.
21 */
22public class CompiledQuery extends RecipeTraceInfo implements
23 PatternTraceInfo {
24
25 private PQuery query;
26 private final Map<PBody, ? extends RecipeTraceInfo> parentRecipeTracesPerBody;
27
28 /**
29 * @since 1.6
30 */
31 public CompiledQuery(ReteNodeRecipe recipe,
32 Map<PBody, ? extends RecipeTraceInfo> parentRecipeTraces,
33 PQuery query) {
34 super(recipe, parentRecipeTraces.values());
35 parentRecipeTracesPerBody = parentRecipeTraces;
36 this.query = query;
37 }
38 public PQuery getQuery() {
39 return query;
40 }
41
42 @Override
43 public String getPatternName() {
44 return query.getFullyQualifiedName();
45 }
46
47 /**
48 * @since 1.6
49 */
50 public Map<PBody, ? extends RecipeTraceInfo> getParentRecipeTracesPerBody() {
51 return parentRecipeTracesPerBody;
52 }
53
54}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledSubPlan.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledSubPlan.java
new file mode 100644
index 00000000..572e943c
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledSubPlan.java
@@ -0,0 +1,51 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import java.util.Arrays;
12import java.util.Collection;
13import java.util.HashSet;
14import java.util.List;
15import java.util.Set;
16import java.util.stream.Collectors;
17
18import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
19import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
20import tools.refinery.viatra.runtime.matchers.util.Preconditions;
21import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
22
23/**
24 * A trace marker associating a Rete recipe with a query SubPlan.
25 *
26 * <p> The Rete node represented by the recipe is equivalent to the SubPlan.
27 * <p> Invariant: each variable has at most one index associated with it in the tuple, i.e. no duplicates.
28 */
29public class CompiledSubPlan extends PlanningTrace {
30
31 public CompiledSubPlan(SubPlan subPlan, List<PVariable> variablesTuple,
32 ReteNodeRecipe recipe,
33 Collection<? extends RecipeTraceInfo> parentRecipeTraces) {
34 super(subPlan, variablesTuple, recipe, parentRecipeTraces);
35
36 // Make sure that each variable occurs only once
37 Set<PVariable> variablesSet = new HashSet<PVariable>(variablesTuple);
38 Preconditions.checkState(variablesSet.size() == variablesTuple.size(),
39 () -> String.format(
40 "Illegal column duplication (%s) while the query plan %s was compiled into a Rete Recipe %s",
41 variablesTuple.stream().map(PVariable::getName).collect(Collectors.joining(",")),
42 subPlan.toShortString(), recipe));
43 }
44
45 public CompiledSubPlan(SubPlan subPlan, List<PVariable> variablesTuple,
46 ReteNodeRecipe recipe,
47 RecipeTraceInfo... parentRecipeTraces) {
48 this(subPlan, variablesTuple, recipe, Arrays.asList(parentRecipeTraces));
49 }
50
51}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ParameterProjectionTrace.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ParameterProjectionTrace.java
new file mode 100644
index 00000000..8da1e314
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/ParameterProjectionTrace.java
@@ -0,0 +1,42 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import java.util.Arrays;
12import java.util.Collection;
13
14import tools.refinery.viatra.runtime.matchers.psystem.PBody;
15import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
16
17/**
18 * The recipe projects the finished results of a {@link PBody} onto the list of parameters.
19 * @author Bergmann Gabor
20 *
21 */
22public class ParameterProjectionTrace extends RecipeTraceInfo implements PatternTraceInfo {
23
24 public ParameterProjectionTrace(PBody body, ReteNodeRecipe recipe,
25 RecipeTraceInfo... parentRecipeTraces) {
26 this(body, recipe, Arrays.asList(parentRecipeTraces));
27 }
28
29 public ParameterProjectionTrace(PBody body, ReteNodeRecipe recipe,
30 Collection<? extends RecipeTraceInfo> parentRecipeTraces) {
31 super(recipe, parentRecipeTraces);
32 this.body = body;
33 }
34
35 PBody body;
36
37 @Override
38 public String getPatternName() {
39 return body.getPattern().getFullyQualifiedName();
40 }
41
42}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PatternTraceInfo.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PatternTraceInfo.java
new file mode 100644
index 00000000..fb7ef062
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PatternTraceInfo.java
@@ -0,0 +1,17 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11/**
12 * One kind of trace marker that merely establishes the pattern for which the node was built.
13 * @author Bergmann Gabor
14 */
15public interface PatternTraceInfo extends TraceInfo {
16 String getPatternName();
17} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PlanningTrace.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PlanningTrace.java
new file mode 100644
index 00000000..c1cc3a69
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/PlanningTrace.java
@@ -0,0 +1,80 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import java.util.Arrays;
12import java.util.Collection;
13import java.util.HashMap;
14import java.util.List;
15import java.util.Map;
16
17import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
18import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
19import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
20
21/**
22 * A trace marker associating a Rete recipe with a query SubPlan.
23 *
24 * <p> The recipe may be an auxiliary node;
25 * see {@link CompiledSubPlan} if it represents the entire SubPlan instead.
26 */
27public class PlanningTrace extends RecipeTraceInfo implements PatternTraceInfo {
28
29 protected SubPlan subPlan;
30 protected List<PVariable> variablesTuple;
31 protected Map<PVariable, Integer> posMapping;
32
33 public PlanningTrace(SubPlan subPlan, List<PVariable> variablesTuple,
34 ReteNodeRecipe recipe,
35 Collection<? extends RecipeTraceInfo> parentRecipeTraces) {
36 super(recipe, parentRecipeTraces);
37 this.subPlan = subPlan;
38 this.variablesTuple = variablesTuple;
39
40 this.posMapping = new HashMap<PVariable, Integer>();
41 for (int i = 0; i < variablesTuple.size(); ++i)
42 posMapping.put(variablesTuple.get(i), i);
43 }
44
45 public PlanningTrace(SubPlan subPlan, List<PVariable> variablesTuple,
46 ReteNodeRecipe recipe,
47 RecipeTraceInfo... parentRecipeTraces) {
48 this(subPlan, variablesTuple, recipe, Arrays.asList(parentRecipeTraces));
49 }
50
51 public SubPlan getSubPlan() {
52 return subPlan;
53 }
54
55 @Override
56 public String getPatternName() {
57 return subPlan.getBody().getPattern().getFullyQualifiedName();
58 }
59
60 public List<PVariable> getVariablesTuple() {
61 return variablesTuple;
62 }
63
64 public Map<PVariable, Integer> getPosMapping() {
65 return posMapping;
66 }
67
68 /**
69 * Returns a new clone that reinterprets the same compiled form
70 * as the compiled form of a (potentially different) subPlan.
71 * Useful e.g. if child plan turns out to be a no-op, or when promoting a {@link PlanningTrace} to {@link CompiledSubPlan}.
72 */
73 public CompiledSubPlan cloneFor(SubPlan newSubPlan) {
74 return new CompiledSubPlan(newSubPlan,
75 getVariablesTuple(),
76 getRecipe(),
77 getParentRecipeTracesForCloning());
78 }
79
80} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/RecipeTraceInfo.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/RecipeTraceInfo.java
new file mode 100644
index 00000000..8f610550
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/RecipeTraceInfo.java
@@ -0,0 +1,81 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import java.util.ArrayList;
12import java.util.Arrays;
13import java.util.Collection;
14import java.util.Collections;
15import java.util.List;
16
17import tools.refinery.viatra.runtime.rete.network.Node;
18import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
19
20/**
21 * A trace marker that indicates the recipe for which the node was built.
22 * @author Bergmann Gabor
23 */
24public class RecipeTraceInfo implements TraceInfo {
25 public ReteNodeRecipe getRecipe() {return recipe;}
26 /**
27 * For cloning in case of recursion cut-off points, use {@link #getParentRecipeTracesForCloning()} instead.
28 * @return an unmodifiable view on parent traces, to be constructed before this node (or alongside, in case of recursion)
29 */
30 public List<RecipeTraceInfo> getParentRecipeTraces() {return Collections.unmodifiableList(new ArrayList<>(parentRecipeTraces));}
31 /**
32 * Directly return the underlying collection so that changes to it will be transparent. Use only for recursion-tolerant cloning.
33 * @noreference This method is not intended to be referenced by clients.
34 */
35 public Collection<? extends RecipeTraceInfo> getParentRecipeTracesForCloning() {return parentRecipeTraces;}
36 @Override
37 public Node getNode() {return node;}
38
39 private Node node;
40 ReteNodeRecipe recipe;
41 ReteNodeRecipe shadowedRecipe;
42 Collection<? extends RecipeTraceInfo> parentRecipeTraces;
43
44
45 public RecipeTraceInfo(ReteNodeRecipe recipe, Collection<? extends RecipeTraceInfo> parentRecipeTraces) {
46 super();
47 this.recipe = recipe;
48 this.parentRecipeTraces = parentRecipeTraces; //ParentTraceList.from(parentRecipeTraces);
49 }
50 public RecipeTraceInfo(ReteNodeRecipe recipe, RecipeTraceInfo... parentRecipeTraces) {
51 this(recipe, Arrays.asList(parentRecipeTraces));
52 }
53
54 @Override
55 public boolean propagateToIndexerParent() {return false;}
56 @Override
57 public boolean propagateFromIndexerToSupplierParent() {return false;}
58 @Override
59 public boolean propagateFromStandardNodeToSupplierParent() {return false;}
60 @Override
61 public boolean propagateToProductionNodeParentAlso() {return false;}
62 @Override
63 public void assignNode(Node node) {this.node = node;}
64
65 /**
66 * @param knownRecipe a known recipe that is equivalent to the current recipe
67 */
68 public void shadowWithEquivalentRecipe(ReteNodeRecipe knownRecipe) {
69 this.shadowedRecipe = this.recipe;
70 this.recipe = knownRecipe;
71 }
72
73 /**
74 * Get original recipe shadowed by an equivalent
75 */
76 public ReteNodeRecipe getShadowedRecipe() {
77 return shadowedRecipe;
78 }
79
80
81} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/TraceInfo.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/TraceInfo.java
new file mode 100644
index 00000000..e1d440db
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/TraceInfo.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import tools.refinery.viatra.runtime.rete.network.Node;
12
13
14/**
15 * Traces the node back to a purpose for which the node was built,
16 * to explain why the node is there and what it means.
17 * @author Bergmann Gabor
18 */
19public interface TraceInfo {
20 boolean propagateToIndexerParent();
21 boolean propagateFromIndexerToSupplierParent();
22 boolean propagateFromStandardNodeToSupplierParent();
23 boolean propagateToProductionNodeParentAlso();
24
25 void assignNode(Node node);
26 Node getNode();
27}
28// /**
29// * The semantics of the tuples contained in this node.
30// * @return a tuple of correct size representing the semantics of each position.
31// * @post not null
32// */
33// Tuple getSemantics(); \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/UserRequestTrace.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/UserRequestTrace.java
new file mode 100644
index 00000000..11e4db32
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/UserRequestTrace.java
@@ -0,0 +1,36 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.traceability;
10
11import java.util.Collection;
12
13import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe;
14
15// private class AggregatorReferenceIndexTraceInfo extends RecipeTraceInfo {
16// RecipeTraceInfo aggregatorNodeRecipeTrace;
17// public AggregatorReferenceIndexTraceInfo(ProjectionIndexerRecipe recipe,
18// RecipeTraceInfo parentRecipeTrace,
19// RecipeTraceInfo aggregatorNodeRecipeTrace) {
20// super(recipe, parentRecipeTrace);
21// this.aggregatorNodeRecipeTrace = aggregatorNodeRecipeTrace;
22// }
23// public RecipeTraceInfo getAggregatorNodeRecipeTrace() {
24// return aggregatorNodeRecipeTrace;
25// }
26// }
27public class UserRequestTrace extends RecipeTraceInfo {
28 public UserRequestTrace(ReteNodeRecipe recipe,
29 Collection<RecipeTraceInfo> parentRecipeTraces) {
30 super(recipe, parentRecipeTraces);
31 }
32 public UserRequestTrace(ReteNodeRecipe recipe,
33 RecipeTraceInfo... parentRecipeTraces) {
34 super(recipe, parentRecipeTraces);
35 }
36} \ No newline at end of file
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/LexicographicComparator.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/LexicographicComparator.java
new file mode 100644
index 00000000..0efc50af
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/LexicographicComparator.java
@@ -0,0 +1,58 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.util;
10
11import java.util.Comparator;
12import java.util.Iterator;
13
14/**
15 * A comparator that compares two iterables based on the lexicographic sorting induced by a comparator on elements.
16 * @author Bergmann Gabor
17 *
18 */
19public class LexicographicComparator<T> implements Comparator<Iterable<? extends T>> {
20
21 final Comparator<T> elementComparator;
22
23 public LexicographicComparator(Comparator<T> elementComparator) {
24 super();
25 this.elementComparator = elementComparator;
26 }
27
28 @Override
29 public int compare(Iterable<? extends T> o1, Iterable<? extends T> o2) {
30 Iterator<? extends T> it1 = o1.iterator();
31 Iterator<? extends T> it2 = o2.iterator();
32
33 boolean has1, has2, bothHaveNext;
34 do {
35 has1 = it1.hasNext();
36 has2 = it2.hasNext();
37 bothHaveNext = has1 && has2;
38 if (bothHaveNext) {
39 T element1 = it1.next();
40 T element2 = it2.next();
41 int elementComparison = elementComparator.compare(element1, element2);
42 if (elementComparison != 0)
43 return elementComparison;
44 }
45 } while (bothHaveNext);
46 if (has1 && !has2) {
47 return +1;
48 } else if (!has1 && has2) {
49 return -1;
50 } else /*if (!has1 && !has2)*/ {
51 return 0;
52 }
53 }
54
55
56
57
58}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java
new file mode 100644
index 00000000..96cc445f
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/Options.java
@@ -0,0 +1,111 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.util;
11
12import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
13import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
14import tools.refinery.viatra.runtime.matchers.planning.IQueryPlannerStrategy;
15import tools.refinery.viatra.runtime.rete.construction.basiclinear.BasicLinearLayout;
16import tools.refinery.viatra.runtime.rete.construction.quasitree.QuasiTreeLayout;
17import tools.refinery.viatra.runtime.rete.network.communication.timely.TimelyCommunicationGroup;
18
19/**
20 * Feature switches.
21 * @author Gabor Bergmann
22 * @noreference
23 */
24public class Options {
25
26 public enum NodeSharingOption {
27 NEVER, // not recommended, patternmatcher leaks possible
28 INDEXER_AND_REMOTEPROXY, ALL
29 }
30
31 public static final NodeSharingOption nodeSharingOption = NodeSharingOption.ALL;
32 public static final boolean releaseOnetimeIndexers = true; // effective only
33 // with
34 // nodesharing
35 // ==NEVER
36
37 public enum InjectivityStrategy {
38 EAGER, LAZY
39 }
40
41 public static final InjectivityStrategy injectivityStrategy = InjectivityStrategy.EAGER;
42
43 public static final boolean enableInheritance = true;
44
45 // public final static boolean useComplementerMask = true;
46
47 public static final boolean employTrivialIndexers = true;
48
49 // public final static boolean synchronous = false;
50
51 public static final int numberOfLocalContainers = 1;
52 public static final int firstFreeContainer = 0; // 0 if head container is
53 // free to contain pattern
54 // bodies, 1 otherwise
55
56 /**
57 * Enable for internal debugging of Rete communication scheme;
58 * catches cases where the topological sort is violated by a message sent "backwards"
59 * @since 1.6
60 */
61 public static final boolean MONITOR_VIOLATION_OF_RETE_NODEGROUP_TOPOLOGICAL_SORTING = false;
62
63 /**
64 * Enable for internal debugging of message delivery in {@link TimelyCommunicationGroup}s;
65 * catches cases when there is a violation of increasing timestamps during message delivery within a group.
66 * @since 2.3
67 */
68 public static final boolean MONITOR_VIOLATION_OF_DIFFERENTIAL_DATAFLOW_TIMESTAMPS = false;
69
70 /**
71 *
72 * @author Gabor Bergmann
73 * @noreference
74 */
75 public enum BuilderMethod {
76 LEGACY, // ONLY with GTASM
77 PSYSTEM_BASIC_LINEAR, PSYSTEM_QUASITREE;
78 /**
79 * @since 1.5
80 */
81 public IQueryPlannerStrategy layoutStrategy(IQueryBackendContext bContext, IQueryBackendHintProvider hintProvider) {
82 switch (this) {
83 case PSYSTEM_BASIC_LINEAR:
84 return new BasicLinearLayout(bContext);
85 case PSYSTEM_QUASITREE:
86 return new QuasiTreeLayout(bContext, hintProvider);
87 default:
88 throw new UnsupportedOperationException();
89 }
90 }
91 }
92
93 public static final BuilderMethod builderMethod =
94 // BuilderMethod.PSYSTEM_BASIC_LINEAR;
95 BuilderMethod.PSYSTEM_QUASITREE;
96
97 public enum FunctionalDependencyOption {
98 OFF,
99 OPPORTUNISTIC
100 }
101 public static final FunctionalDependencyOption functionalDependencyOption =
102 FunctionalDependencyOption.OPPORTUNISTIC;
103
104 public enum PlanTrimOption {
105 OFF,
106 OPPORTUNISTIC
107 }
108 public static final PlanTrimOption planTrimOption =
109 PlanTrimOption.OPPORTUNISTIC;
110
111}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/OrderingCompareAgent.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/OrderingCompareAgent.java
new file mode 100644
index 00000000..8b147cf6
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/OrderingCompareAgent.java
@@ -0,0 +1,92 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.rete.util;
11
12import java.util.Comparator;
13
14/**
15 * Comparing agent for an ordering. Terminology: the "preferred" item will register as LESS.
16 *
17 * @author Gabor Bergmann
18 *
19 */
20public abstract class OrderingCompareAgent<T> {
21 protected T a;
22 protected T b;
23
24 /**
25 * @param a
26 * @param b
27 */
28 public OrderingCompareAgent(T a, T b) {
29 super();
30 this.a = a;
31 this.b = b;
32 }
33
34 int result = 0;
35
36 protected abstract void doCompare();
37
38 /**
39 * @return the result
40 */
41 public int compare() {
42 doCompare();
43 return result;
44 }
45
46 // COMPARISON HELPERS
47 protected boolean isUnknown() {
48 return result == 0;
49 }
50
51 /**
52 * @pre result == 0
53 */
54 protected boolean consider(int partial) {
55 if (isUnknown())
56 result = partial;
57 return isUnknown();
58 }
59
60 protected boolean swallowBoolean(boolean x) {
61 return x;
62 }
63
64 // PREFERENCE FUNCTIONS
65 protected static int dontCare() {
66 return 0;
67 }
68
69 protected static int preferTrue(boolean b1, boolean b2) {
70 return (b1 ^ b2) ? (b1 ? -1 : +1) : 0;
71 }
72
73 protected static int preferFalse(boolean b1, boolean b2) {
74 return (b1 ^ b2) ? (b2 ? -1 : +1) : 0;
75 }
76
77 protected static <U> int preferLess(Comparable<U> c1, U c2) {
78 return c1.compareTo(c2);
79 }
80
81 protected static <U> int preferLess(U c1, U c2, Comparator<U> comp) {
82 return comp.compare(c1, c2);
83 }
84
85 protected static <U> int preferMore(Comparable<U> c1, U c2) {
86 return -c1.compareTo(c2);
87 }
88 protected static <U> int preferMore(U c1, U c2, Comparator<U> comp) {
89 return -comp.compare(c1, c2);
90 }
91
92}
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/ReteHintOptions.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/ReteHintOptions.java
new file mode 100644
index 00000000..6e685253
--- /dev/null
+++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/util/ReteHintOptions.java
@@ -0,0 +1,60 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.rete.util;
10
11import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
12import tools.refinery.viatra.runtime.matchers.backend.QueryHintOption;
13import tools.refinery.viatra.runtime.rete.matcher.DRedReteBackendFactory;
14
15/**
16 * Provides key objects (of type {@link QueryHintOption}) for {@link QueryEvaluationHint}s.
17 * @author Gabor Bergmann
18 * @since 1.5
19 */
20public final class ReteHintOptions {
21
22 private ReteHintOptions() {/*Utility class constructor*/}
23
24 public static final QueryHintOption<Boolean> useDiscriminatorDispatchersForConstantFiltering =
25 hintOption("useDiscriminatorDispatchersForConstantFiltering", true);
26
27 public static final QueryHintOption<Boolean> prioritizeConstantFiltering =
28 hintOption("prioritizeConstantFiltering", true);
29
30 public static final QueryHintOption<Boolean> cacheOutputOfEvaluatorsByDefault =
31 hintOption("cacheOutputOfEvaluatorsByDefault", true);
32
33 /**
34 * The incremental query evaluator backend can evaluate recursive patterns.
35 * However, by default, instance models that contain cycles are not supported with recursive queries
36 * and can lead to incorrect query results.
37 * Enabling Delete And Rederive (DRED) mode guarantees that recursive query evaluation leads to correct results in these cases as well.
38 *
39 * <p> As DRED may diminish the performance of incremental maintenance, it is not enabled by default.
40 * @since 1.6
41 * @deprecated Use {@link DRedReteBackendFactory} instead of setting this option to true.
42 */
43 @Deprecated
44 public static final QueryHintOption<Boolean> deleteRederiveEvaluation =
45 hintOption("deleteRederiveEvaluation", false);
46
47 /**
48 * This hint allows the query planner to take advantage of "weakened alternative" suggestions of the meta context.
49 * For instance, enumerable unary type constraints may be substituted with a simple type filtering where sufficient.
50 *
51 * @since 1.6
52 */
53 public static final QueryHintOption<Boolean> expandWeakenedAlternativeConstraints =
54 hintOption("expandWeakenedAlternativeConstraints", true);
55
56 // internal helper for conciseness
57 private static <T> QueryHintOption<T> hintOption(String hintKeyLocalName, T defaultValue) {
58 return new QueryHintOption<>(ReteHintOptions.class, hintKeyLocalName, defaultValue);
59 }
60}
diff --git a/subprojects/viatra-runtime/about.html b/subprojects/viatra-runtime/about.html
new file mode 100644
index 00000000..d1d5593a
--- /dev/null
+++ b/subprojects/viatra-runtime/about.html
@@ -0,0 +1,26 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3<!--
4 Copyright (c) 2017, Eclipse.org Foundation, Inc.
5
6 SPDX-License-Identifier: LicenseRef-EPL-Steward
7-->
8<head>
9<title>About</title>
10<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
11</head>
12<body lang="EN-US">
13<h2>About This Content</h2>
14
15<p>March 18, 2019</p>
16<h3>License</h3>
17
18<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
19Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/org/documents/epl-v20.php">http://www.eclipse.org/legal/epl-v20.html</a>.
20For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
21
22<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
23apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
24indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
25</body>
26</html>
diff --git a/subprojects/viatra-runtime/build.gradle.kts b/subprojects/viatra-runtime/build.gradle.kts
new file mode 100644
index 00000000..c4bd9129
--- /dev/null
+++ b/subprojects/viatra-runtime/build.gradle.kts
@@ -0,0 +1,15 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7plugins {
8 id("tools.refinery.gradle.java-library")
9}
10
11dependencies {
12 implementation(libs.slf4j.log4j)
13 implementation(libs.eclipseCollections)
14 implementation(libs.eclipseCollections.api)
15}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/CancellationToken.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/CancellationToken.java
new file mode 100644
index 00000000..a2ae41e3
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/CancellationToken.java
@@ -0,0 +1,13 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime;
7
8@FunctionalInterface
9public interface CancellationToken {
10 CancellationToken NONE = () -> {};
11
12 void checkCancelled();
13}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/AdvancedViatraQueryEngine.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/AdvancedViatraQueryEngine.java
new file mode 100644
index 00000000..32a3430d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/AdvancedViatraQueryEngine.java
@@ -0,0 +1,363 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11import tools.refinery.viatra.runtime.api.scope.QueryScope;
12import tools.refinery.viatra.runtime.internal.apiimpl.ViatraQueryEngineImpl;
13import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
14import tools.refinery.viatra.runtime.matchers.backend.*;
15
16import java.lang.reflect.InvocationTargetException;
17import java.util.concurrent.Callable;
18
19/**
20 * Advanced interface to a VIATRA incremental evaluation engine.
21 *
22 * <p>
23 * You can create a new, private, unmanaged {@link AdvancedViatraQueryEngine} instance using
24 * {@link #createUnmanagedEngine(QueryScope)}. Additionally, you can access the advanced interface on any
25 * {@link ViatraQueryEngine} by {@link AdvancedViatraQueryEngine#from(ViatraQueryEngine)}.
26 *
27 * <p>
28 * While the default interface {@link ViatraQueryEngine}, is suitable for most users, this advanced interface provides more
29 * control over the engine. The most important added functionality is the following:
30 * <ul>
31 * <li>You can have tighter control over the lifecycle of the engine, if you create a private, unmanaged engine
32 * instance. For instance, a (non-managed) engine can be disposed in order to detach from the EMF model and stop
33 * listening on update notifications. The indexes built previously in the engine can then be garbage collected, even if
34 * the model itself is retained. Total lifecycle control is only available for private, unmanaged engines (created using
35 * {@link #createUnmanagedEngine(QueryScope)}); a managed engine (obtained via {@link ViatraQueryEngine#on(QueryScope)}) is
36 * shared among clients and can not be disposed or wiped.
37 * <li>You can add and remove listeners to receive notification when the model or the match sets change.
38 * <li>You can add and remove listeners to receive notification on engine lifecycle events, such as creation of new
39 * matchers. For instance, if you explicitly share a private, unmanaged engine between multiple sites, you should
40 * register a callback using {@link #addLifecycleListener(ViatraQueryEngineLifecycleListener)} to learn when another client
41 * has called the destructive methods {@link #dispose()} or {@link #wipe()}.
42 * </ul>
43 *
44 * @author Bergmann Gabor
45 * @noextend This class is not intended to be subclassed by clients.
46 */
47public abstract class AdvancedViatraQueryEngine extends ViatraQueryEngine {
48
49 /**
50 * Creates a new unmanaged VIATRA Query engine to evaluate queries over a given scope specified by an {@link QueryScope}.
51 *
52 * <p> Repeated invocations will return different instances, so other clients are unable to independently access
53 * and influence the returned engine. Note that unmanaged engines do not benefit from some performance improvements
54 * that stem from sharing incrementally maintained indices and caches between multiple clients using the same managed
55 * engine instance.
56 *
57 * <p>
58 * Client is responsible for the lifecycle of the returned engine, hence the usage of the advanced interface
59 * {@link AdvancedViatraQueryEngine}.
60 *
61 * <p>
62 * The match set of any patterns will be incrementally refreshed upon updates from this scope.
63 *
64 * @param scope
65 * the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
66 * Provide e.g. a {@link EMFScope} for evaluating queries on an EMF model.
67 * @return the advanced interface to a newly created unmanaged engine
68 * @since 0.9
69 */
70 public static AdvancedViatraQueryEngine createUnmanagedEngine(QueryScope scope) {
71 return new ViatraQueryEngineImpl(null, scope);
72 }
73
74 /**
75 * Creates a new unmanaged VIATRA Query engine to evaluate queries over a given scope specified by an {@link QueryScope}.
76 *
77 * <p> Repeated invocations will return different instances, so other clients are unable to independently access
78 * and influence the returned engine. Note that unmanaged engines do not benefit from some performance improvements
79 * that stem from sharing incrementally maintained indices and caches between multiple clients using the same managed
80 * engine instance.
81 *
82 * <p>
83 * Client is responsible for the lifecycle of the returned engine, hence the usage of the advanced interface
84 * {@link AdvancedViatraQueryEngine}.
85 *
86 * <p>
87 * The match set of any patterns will be incrementally refreshed upon updates from this scope.
88 *
89 * @param scope
90 * the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
91 * Provide e.g. a {@link EMFScope} for evaluating queries on an EMF model.
92 * @return the advanced interface to a newly created unmanaged engine
93 * @since 1.4
94 */
95 public static AdvancedViatraQueryEngine createUnmanagedEngine(QueryScope scope, ViatraQueryEngineOptions options) {
96 return new ViatraQueryEngineImpl(null, scope, options);
97 }
98
99 /**
100 * Provides access to a given existing engine through the advanced interface.
101 *
102 * <p>
103 * Caveat: if the referenced engine is managed (i.e. created via {@link ViatraQueryEngine#on(QueryScope)}), the advanced
104 * methods {@link #dispose()} and {@link #wipe()} will not be allowed.
105 *
106 * @param engine
107 * the engine to access using the advanced interface
108 * @return a reference to the same engine conforming to the advanced interface
109 */
110 public static AdvancedViatraQueryEngine from(ViatraQueryEngine engine) {
111 return (AdvancedViatraQueryEngine) engine;
112 }
113
114 /**
115 * Add an engine lifecycle listener to this engine instance.
116 *
117 * @param listener
118 * the {@link ViatraQueryEngineLifecycleListener} that should listen to lifecycle events from this engine
119 */
120 public abstract void addLifecycleListener(ViatraQueryEngineLifecycleListener listener);
121
122 /**
123 * Remove an existing lifecycle listener from this engine instance.
124 *
125 * @param listener
126 * the {@link ViatraQueryEngineLifecycleListener} that should not listen to lifecycle events from this
127 * engine anymore
128 */
129 public abstract void removeLifecycleListener(ViatraQueryEngineLifecycleListener listener);
130
131 /**
132 * Add an model update event listener to this engine instance (that fires its callbacks according to its
133 * notification level).
134 *
135 * @param listener
136 * the {@link ViatraQueryModelUpdateListener} that should listen to model update events from this engine.
137 */
138 public abstract void addModelUpdateListener(ViatraQueryModelUpdateListener listener);
139
140 /**
141 * Remove an existing model update event listener to this engine instance.
142 *
143 * @param listener
144 * the {@link ViatraQueryModelUpdateListener} that should not listen to model update events from this engine
145 * anymore
146 */
147 public abstract void removeModelUpdateListener(ViatraQueryModelUpdateListener listener);
148
149 /**
150 * Registers low-level callbacks for match appearance and disappearance on this pattern matcher.
151 *
152 * <p>
153 * <b>Caution: </b> This is a low-level callback that is invoked when the pattern matcher is not necessarily in a
154 * consistent state yet. Importantly, no model modification permitted during the callback. Most users should use the
155 * databinding support ({@link org.eclipse.viatra.addon.databinding.runtime.api.ViatraObservables ViatraObservables}) or the event-driven API
156 * ({@link org.eclipse.viatra.transformation.evm.api.EventDrivenVM EventDrivenVM}) instead.
157 *
158 * <p>
159 * Performance note: expected to be much more efficient than polling at {@link #addCallbackAfterUpdates(Runnable)},
160 * but prone to "signal hazards", e.g. spurious match appearances that will disappear immediately afterwards.
161 *
162 * <p>
163 * The callback can be unregistered via {@link #removeCallbackOnMatchUpdate(IMatchUpdateListener)}.
164 *
165 * @param fireNow
166 * if true, appearCallback will be immediately invoked on all current matches as a one-time effect. See
167 * also {@link ViatraQueryMatcher#forEachMatch(IMatchProcessor)}.
168 * @param listener
169 * the listener that will be notified of each new match that appears or disappears, starting from now.
170 * @param matcher
171 * the {@link ViatraQueryMatcher} for which this listener should be active
172 */
173 public abstract <Match extends IPatternMatch> void addMatchUpdateListener(ViatraQueryMatcher<Match> matcher,
174 IMatchUpdateListener<? super Match> listener, boolean fireNow);
175
176 /**
177 * Remove an existing match update event listener to this engine instance.
178 *
179 * @param matcher
180 * the {@link ViatraQueryMatcher} for which this listener should not be active anymore
181 * @param listener
182 * the {@link IMatchUpdateListener} that should not receive the callbacks anymore
183 */
184 public abstract <Match extends IPatternMatch> void removeMatchUpdateListener(ViatraQueryMatcher<Match> matcher,
185 IMatchUpdateListener<? super Match> listener);
186
187
188 /**
189 * Access a pattern matcher based on a {@link IQuerySpecification}, overriding some of the default query evaluation hints.
190 * Multiple calls may return the same matcher depending on the actual evaluation hints.
191 *
192 * <p> It is guaranteed that this method will always return a matcher instance which is functionally compatible
193 * with the requested functionality (see {@link IMatcherCapability}).
194 * Otherwise, the query evaluator is free to ignore any hints.
195 *
196 * <p> For stateful query backends (Rete), hints may be effective only the first time a matcher is created.
197 * @param querySpecification a {@link IQuerySpecification} that describes a VIATRA query
198 * @return a pattern matcher corresponding to the specification
199 * @param optionalEvaluationHints additional / overriding options on query evaluation; passing null means default options associated with the query
200 * @throws ViatraQueryRuntimeException if the matcher could not be initialized
201 * @since 0.9
202 */
203 public abstract <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getMatcher(
204 IQuerySpecification<Matcher> querySpecification,
205 QueryEvaluationHint optionalEvaluationHints);
206
207 /**
208 * Initializes matchers for a group of patterns as one step (optionally overriding some of the default query evaluation hints).
209 * If some of the pattern matchers are already
210 * constructed in the engine, no task is performed for them.
211 *
212 * <p>
213 * This preparation step has the advantage that it prepares pattern matchers for an arbitrary number of patterns in a
214 * single-pass traversal of the model.
215 * This is typically more efficient than traversing the model each time an individual pattern matcher is initialized on demand.
216 * The performance benefit only manifests itself if the engine is not in wildcard mode.
217 *
218 * @param queryGroup a {@link IQueryGroup} identifying a set of VIATRA queries
219 * @param optionalEvaluationHints additional / overriding options on query evaluation; passing null means default options associated with each query
220 * @throws ViatraQueryRuntimeException
221 * if there was an error in preparing the engine
222 * @since 0.9
223 */
224 public abstract void prepareGroup(IQueryGroup queryGroup, QueryEvaluationHint optionalEvaluationHints);
225
226 /**
227 * Indicates whether the engine is managed, i.e. the default engine assigned to the given scope root by
228 * {@link ViatraQueryEngine#on(QueryScope)}.
229 *
230 * <p>
231 * If the engine is managed, there may be other clients using it, as all calls to
232 * {@link ViatraQueryEngine#on(QueryScope)} return the same managed engine instance for a given scope root. Therefore the
233 * destructive methods {@link #wipe()} and {@link #dispose()} are not allowed.
234 *
235 * <p>
236 * On the other hand, if the engine is unmanaged (i.e. a private instance created using
237 * {@link #createUnmanagedEngine(QueryScope)}), then {@link #wipe()} and {@link #dispose()} can be called. If you
238 * explicitly share a private, unmanaged engine between multiple sites, register a callback using
239 * {@link #addLifecycleListener(ViatraQueryEngineLifecycleListener)} to learn when another client has called these
240 * destructive methods.
241 *
242 * @return true if the engine is managed, and therefore potentially shared with other clients querying the same EMF
243 * model
244 */
245 public abstract boolean isManaged();
246
247 /**
248 * Indicates whether the engine is in a tainted, inconsistent state due to some internal errors. If true, results
249 * are no longer reliable; engine should be disposed.
250 *
251 * <p>
252 * The engine is in a tainted state if any of its internal processes report back a fatal error. The
253 * {@link ViatraQueryEngineLifecycleListener} interface provides a callback method for entering the tainted state.
254 *
255 * @return the tainted state
256 */
257 public abstract boolean isTainted();
258
259 /**
260 * Discards any pattern matcher caches and forgets known patterns. The base index built directly on the underlying
261 * EMF model, however, is kept in memory to allow reuse when new pattern matchers are built. Use this method if you
262 * have e.g. new versions of the same patterns, to be matched on the same model.
263 *
264 * <p>
265 * Matcher objects will continue to return stale results. If no references are retained to the matchers, they can
266 * eventually be GC'ed.
267 * <p>
268 * Disallowed if the engine is managed (see {@link #isManaged()}), as there may be other clients using it.
269 * <p>
270 * If you explicitly share a private, unmanaged engine between multiple sites, register a callback using
271 * {@link #addLifecycleListener(ViatraQueryEngineLifecycleListener)} to learn when another client has called this
272 * destructive method.
273 *
274 * @throws UnsupportedOperationException
275 * if engine is managed
276 */
277 public abstract void wipe();
278
279 /**
280 * Completely disconnects and dismantles the engine. Cannot be reversed.
281 * <p>
282 * Matcher objects will continue to return stale results. If no references are retained to the matchers or the
283 * engine, they can eventually be GC'ed, and they won't block the EMF model from being GC'ed anymore.
284 * <p>
285 * The base indexer (see {@link #getBaseIndex()}) built on the model will be disposed alongside the engine, unless
286 * the user has manually added listeners on the base index that were not removed yet.
287 * <p>
288 * Disallowed if the engine is managed (see {@link #isManaged()}), as there may be other clients using it.
289 * <p>
290 * If you explicitly share a private, unmanaged engine between multiple sites, register a callback using
291 * {@link #addLifecycleListener(ViatraQueryEngineLifecycleListener)} to learn when another client has called this
292 * destructive method.
293 *
294 * @throws UnsupportedOperationException
295 * if engine is managed
296 */
297 public abstract void dispose();
298
299 /**
300 * Provides access to the selected query backend component of the VIATRA Query engine.
301 * @noreference for internal use only
302 * @throws ViatraQueryRuntimeException
303 */
304 public abstract IQueryBackend getQueryBackend(IQueryBackendFactory iQueryBackendFactory);
305
306 /**
307 * Access an existing pattern matcher based on a {@link IQuerySpecification}, and optional hints override.
308 * @param querySpecification a {@link IQuerySpecification} that describes a VIATRA query specification
309 * @param optionalOverrideHints a {@link QueryEvaluationHint} that may override the pattern hints (can be null)
310 * @return a pattern matcher corresponding to the specification, <code>null</code> if a matcher does not exist yet.
311 * @since 1.4
312 */
313 public abstract <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getExistingMatcher(IQuerySpecification<Matcher> querySpecification, QueryEvaluationHint optionalOverrideHints);
314
315 /**
316 * Returns the immutable {@link ViatraQueryEngineOptions} of the engine.
317 *
318 * @return the engine options
319 * @since 1.4
320 */
321 public abstract ViatraQueryEngineOptions getEngineOptions();
322
323 /**
324 * Return the underlying result provider for the given matcher.
325 *
326 * @beta This method may change in future versions
327 * @since 1.4
328 * @noreference This method is considered internal API
329 */
330 public abstract IQueryResultProvider getResultProviderOfMatcher(ViatraQueryMatcher<? extends IPatternMatch> matcher);
331
332 /**
333 * The given callable will be executed, and all update propagation in stateful query backends
334 * will be delayed until the execution is done. Within the callback, these backends will provide stale results.
335 *
336 * <p> It is optional for a {@link IQueryBackend} to support the delaying of update propagation; stateless backends will display up-to-date results.
337 * In this case, the given callable shall be executed, and the update propagation shall happen just like in non-delayed execution.
338 *
339 * <p> Example: in the Rete network, no messages will be propagated until the given callable is executed.
340 * After the execution of the callable, all accumulated messages will be delivered.
341 *
342 * <p> The purpose of this method is that stateful query backends may save work when multiple model modifications are performed within the callback that partially cancel each other out.
343 *
344 * @param callable the callable to be executed
345 * @return the result of the callable
346 * @since 1.6
347 */
348 public abstract <V> V delayUpdatePropagation(Callable<V> callable) throws InvocationTargetException;
349
350 /**
351 * Returns true if the update propagation in this engine is currently delayed, false otherwise.
352 *
353 * @see {@link #delayUpdatePropagation(Callable)}
354 * @since 1.6
355 */
356 public abstract boolean isUpdatePropagationDelayed();
357
358 /**
359 * Returns true if the {@link #dispose()} method was called on this engine previously.
360 * @since 2.0
361 */
362 public abstract boolean isDisposed();
363}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatch.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatch.java
new file mode 100644
index 00000000..b4de2b70
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatch.java
@@ -0,0 +1,166 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api;
11
12import java.util.Arrays;
13
14import tools.refinery.viatra.runtime.api.impl.BasePatternMatch;
15
16/**
17 * Generic signature object implementation.
18 *
19 * See also the generated matcher and signature of the pattern, with pattern-specific API simplifications.
20 *
21 * @author Bergmann Gábor
22 * @since 0.9
23 *
24 */
25public abstract class GenericPatternMatch extends BasePatternMatch {
26
27 private final GenericQuerySpecification<? extends GenericPatternMatcher> specification;
28 private final Object[] array;
29
30 private GenericPatternMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification, Object[] array) {
31 super();
32 this.specification = specification;
33 this.array = array;
34 }
35
36 @Override
37 public Object get(String parameterName) {
38 Integer index = specification.getPositionOfParameter(parameterName);
39 return index == null ? null : array[index];
40 }
41
42 @Override
43 public Object get(int position) {
44 return array[position];
45 }
46
47 @Override
48 public boolean set(String parameterName, Object newValue) {
49 if (!isMutable()) throw new UnsupportedOperationException();
50 Integer index = specification.getPositionOfParameter(parameterName);
51 if (index == null)
52 return false;
53 array[index] = newValue;
54 return true;
55 }
56
57 @Override
58 public Object[] toArray() {
59 return Arrays.copyOf(array, array.length);
60 }
61
62 @Override
63 public int hashCode() {
64 final int prime = 31;
65 int result = 1;
66 for (int i = 0; i < array.length; ++i)
67 result = prime * result + ((array[i] == null) ? 0 : array[i].hashCode());
68 return result;
69 }
70
71 @Override
72 public boolean equals(Object obj) {
73 if (this == obj)
74 return true;
75 if (!(obj instanceof GenericPatternMatch)) { // this should be infrequent
76 if (obj == null)
77 return false;
78 if (!(obj instanceof IPatternMatch))
79 return false;
80 IPatternMatch other = (IPatternMatch) obj;
81 if (!specification().equals(other.specification()))
82 return false;
83 return Arrays.deepEquals(array, other.toArray());
84 }
85 final GenericPatternMatch other = (GenericPatternMatch) obj;
86 return specification().equals(other.specification()) && Arrays.deepEquals(array, other.array);
87 }
88
89 @Override
90 public String prettyPrint() {
91 StringBuilder result = new StringBuilder();
92 for (int i = 0; i < array.length; ++i) {
93 if (i != 0)
94 result.append(", ");
95 result.append("\"" + parameterNames().get(i) + "\"=" + prettyPrintValue(array[i]));
96 }
97 return result.toString();
98 }
99
100 @Override
101 public GenericQuerySpecification<? extends GenericPatternMatcher> specification() {
102 return specification;
103 }
104
105 /**
106 * Returns an empty, mutable match.
107 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
108 *
109 * @return the empty match
110 */
111 public static GenericPatternMatch newEmptyMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification) {
112 return new Mutable(specification, new Object[specification.getParameters().size()]);
113 }
114
115 /**
116 * Returns a mutable (partial) match.
117 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
118 *
119 * @param parameters
120 * the fixed value of pattern parameters, or null if not bound.
121 * @return the new, mutable (partial) match object.
122 */
123 public static GenericPatternMatch newMutableMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification, Object... parameters) {
124 return new Mutable(specification, parameters);
125 }
126
127 /**
128 * Returns a new (partial) match.
129 * This can be used e.g. to call the matcher with a partial match.
130 *
131 * <p>The returned match will be immutable. Use {@link #newEmptyMatch(GenericQuerySpecification)} to obtain a mutable match object.
132 *
133 * @param parameters
134 * the fixed value of pattern parameters, or null if not bound.
135 * @return the (partial) match object.
136 */
137 public static GenericPatternMatch newMatch(GenericQuerySpecification<? extends GenericPatternMatcher> specification, Object... parameters) {
138 return new Immutable(specification, Arrays.copyOf(parameters, parameters.length));
139 }
140
141 @Override
142 public IPatternMatch toImmutable() {
143 return isMutable() ? newMatch(specification, array) : this;
144 }
145
146 static final class Mutable extends GenericPatternMatch {
147 Mutable(GenericQuerySpecification<? extends GenericPatternMatcher> specification, Object[] array) {
148 super(specification, array);
149 }
150
151 @Override
152 public boolean isMutable() {
153 return true;
154 }
155 }
156 static final class Immutable extends GenericPatternMatch {
157 Immutable(GenericQuerySpecification<? extends GenericPatternMatcher> specification, Object[] array) {
158 super(specification, array);
159 }
160
161 @Override
162 public boolean isMutable() {
163 return false;
164 }
165 }
166}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatcher.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatcher.java
new file mode 100644
index 00000000..9a3fbb44
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericPatternMatcher.java
@@ -0,0 +1,83 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api;
11
12import tools.refinery.viatra.runtime.api.impl.BaseMatcher;
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14
15/**
16 * This is a generic pattern matcher for any VIATRA pattern, with "interpretative" query execution.
17 * To use the pattern matcher on a given model, obtain a {@link GenericQuerySpecification} first, then
18 * invoke e.g. {@link GenericQuerySpecification#getMatcher(ViatraQueryEngine)}.
19 * in conjunction with {@link ViatraQueryEngine#on(tools.refinery.viatra.runtime.api.scope.QueryScope)}.
20 * <p>
21 * Whenever available, consider using the pattern-specific generated matcher API instead.
22 *
23 * <p>
24 * Matches of the pattern will be represented as {@link GenericPatternMatch}.
25 *
26 * @author Bergmann Gábor
27 * @see GenericPatternMatch
28 * @see GenericMatchProcessor
29 * @see GenericQuerySpecification
30 * @since 0.9
31 */
32public class GenericPatternMatcher extends BaseMatcher<GenericPatternMatch> {
33
34 /**
35 * @since 1.4
36 */
37 public GenericPatternMatcher(GenericQuerySpecification<? extends GenericPatternMatcher> specification) {
38 super(specification);
39 }
40
41 @Override
42 public GenericPatternMatch arrayToMatch(Object[] parameters) {
43 return GenericPatternMatch.newMatch(getSpecification(), parameters);
44 }
45
46 @Override
47 public GenericPatternMatch arrayToMatchMutable(Object[] parameters) {
48 return GenericPatternMatch.newMutableMatch(getSpecification(), parameters);
49 }
50
51 @Override
52 protected GenericPatternMatch tupleToMatch(Tuple t) {
53 return new GenericPatternMatch.Immutable(getSpecification(), /*avoid re-cloning*/t.getElements());
54 }
55
56 @SuppressWarnings("unchecked")
57 @Override
58 public GenericQuerySpecification<? extends GenericPatternMatcher> getSpecification() {
59 return (GenericQuerySpecification<? extends GenericPatternMatcher>)querySpecification;
60 }
61
62 /**
63 * Internal method for {@link GenericQuerySpecification}
64 * @noreference
65 */
66 static <Matcher extends GenericPatternMatcher> GenericPatternMatcher instantiate(GenericQuerySpecification<Matcher> querySpecification) {
67 return new GenericPatternMatcher(querySpecification);
68 }
69
70 /**
71 * Internal method for {@link GenericQuerySpecification}
72 * @noreference
73 */
74 static <Matcher extends GenericPatternMatcher> GenericPatternMatcher instantiate(ViatraQueryEngine engine, GenericQuerySpecification<Matcher> querySpecification) {
75 // check if matcher already exists
76 GenericPatternMatcher matcher = engine.getExistingMatcher(querySpecification);
77 if (matcher == null) {
78 matcher = engine.getMatcher(querySpecification);
79 }
80 return matcher;
81 }
82
83}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQueryGroup.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQueryGroup.java
new file mode 100644
index 00000000..a5661bc9
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQueryGroup.java
@@ -0,0 +1,82 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Mark Czotter, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11import java.util.Arrays;
12import java.util.HashSet;
13import java.util.Set;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16
17import tools.refinery.viatra.runtime.api.impl.BaseQueryGroup;
18
19/**
20 * Generic implementation of {@link IQueryGroup}, covering an arbitrarily chosen set of patterns. Use the public
21 * constructor or static GenericQueryGroup.of(...) methods to instantiate.
22 *
23 * @author Mark Czotter
24 *
25 */
26public class GenericQueryGroup extends BaseQueryGroup {
27
28 private final Set<IQuerySpecification<?>> patterns;
29
30 /**
31 * Creates a GenericQueryGroup object with a set of patterns.
32 *
33 * @param patterns
34 */
35 public GenericQueryGroup(Set<IQuerySpecification<?>> patterns) {
36 this.patterns = patterns;
37 }
38
39 @Override
40 public Set<IQuerySpecification<?>> getSpecifications() {
41 return patterns;
42 }
43
44 /**
45 * Creates a generic {@link IQueryGroup} instance from {@link IQuerySpecification} objects.
46 *
47 * @since 2.0
48 */
49 public static IQueryGroup of(Stream<IQuerySpecification<?>> querySpecifications) {
50 return new GenericQueryGroup(querySpecifications.collect(Collectors.toSet()));
51 }
52
53 /**
54 * Creates a generic {@link IQueryGroup} instance from {@link IQuerySpecification} objects.
55 *
56 * @param querySpecifications
57 */
58 public static IQueryGroup of(Set<IQuerySpecification<?>> querySpecifications) {
59 return new GenericQueryGroup(querySpecifications);
60 }
61
62 /**
63 * Creates a generic {@link IQueryGroup} instance from {@link IQuerySpecification} objects.
64 *
65 * @param querySpecifications
66 */
67 public static IQueryGroup of(IQuerySpecification<?>... querySpecifications) {
68 return of(new HashSet<IQuerySpecification<?>>(Arrays.asList(querySpecifications)));
69 }
70
71 /**
72 * Creates a generic {@link IQueryGroup} instance from other {@link IQueryGroup} objects (subgroups).
73 *
74 */
75 public static IQueryGroup of(IQueryGroup... subGroups) {
76 Set<IQuerySpecification<?>> patterns = new HashSet<IQuerySpecification<?>>();
77 for (IQueryGroup group : subGroups) {
78 patterns.addAll(group.getSpecifications());
79 }
80 return new GenericQueryGroup(patterns);
81 }
82}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQuerySpecification.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQuerySpecification.java
new file mode 100644
index 00000000..5681ac19
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/GenericQuerySpecification.java
@@ -0,0 +1,76 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11import tools.refinery.viatra.runtime.api.impl.BaseQuerySpecification;
12import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
13import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PVisibility;
15
16/**
17 * This is a generic query specification for VIATRA pattern matchers, for "interpretative" query execution.
18 * Should be subclassed by query specification implementations specific to query languages.
19 *
20 * <p>
21 * When available, consider using the pattern-specific generated matcher API instead.
22 *
23 * <p>
24 * The created matcher will be of type {@link GenericPatternMatcher}. Matches of the pattern will be represented as
25 * {@link GenericPatternMatch}.
26 *
27 * <p>
28 * Note for overriding (if you have your own query language or ):
29 * Derived classes should use {@link #defaultInstantiate(ViatraQueryEngine)} for implementing
30 * {@link #instantiate(ViatraQueryEngine)} if they use {@link GenericPatternMatcher} proper.
31 *
32 * @see GenericPatternMatcher
33 * @see GenericPatternMatch
34 * @see GenericMatchProcessor
35 * @author Bergmann Gábor
36 * @noinstantiate This class is not intended to be instantiated by end-users.
37 * @since 0.9
38 */
39public abstract class GenericQuerySpecification<Matcher extends GenericPatternMatcher> extends
40 BaseQuerySpecification<Matcher> {
41
42 /**
43 * Instantiates query specification for the given internal query representation.
44 */
45 public GenericQuerySpecification(PQuery wrappedPQuery) {
46 super(wrappedPQuery);
47 }
48
49 @Override
50 public GenericPatternMatch newEmptyMatch() {
51 return GenericPatternMatch.newEmptyMatch(this);
52 }
53
54 @Override
55 public GenericPatternMatch newMatch(Object... parameters) {
56 return GenericPatternMatch.newMatch(this, parameters);
57 }
58
59 /**
60 * Derived classes should use this implementation of {@link #instantiate(ViatraQueryEngine)}
61 * if they use {@link GenericPatternMatcher} proper.
62 * @throws ViatraQueryRuntimeException
63 */
64 protected GenericPatternMatcher defaultInstantiate(ViatraQueryEngine engine) {
65 return GenericPatternMatcher.instantiate(engine, this);
66 }
67
68 /**
69 * @since 2.0
70 */
71 @Override
72 public PVisibility getVisibility() {
73 return getInternalQueryRepresentation().getVisibility();
74 }
75
76} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IMatchUpdateListener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IMatchUpdateListener.java
new file mode 100644
index 00000000..23c64537
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IMatchUpdateListener.java
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11/**
12 * An interface for low-level notifications about match appearance and disappearance.
13 *
14 * <p>
15 * See {@link ViatraQueryMatcher#addCallbackOnMatchUpdate(IMatchUpdateListener, boolean)} for usage. Clients should
16 * consider using {@link MatchUpdateAdapter} or deriving their implementation from it.
17 *
18 * @author Bergmann Gabor
19 *
20 */
21public interface IMatchUpdateListener<Match extends IPatternMatch> {
22 /**
23 * Will be invoked on each new match that appears.
24 *
25 * @param match
26 * the match that has just appeared.
27 */
28 public void notifyAppearance(Match match);
29
30 /**
31 * Will be invoked on each existing match that disappears.
32 *
33 * @param match
34 * the match that has just disappeared.
35 */
36 public void notifyDisappearance(Match match);
37}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IPatternMatch.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IPatternMatch.java
new file mode 100644
index 00000000..be6467cc
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IPatternMatch.java
@@ -0,0 +1,107 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api;
11
12import java.util.List;
13
14/**
15 * Generic interface for a single match of a pattern. Each instance is a (partial) substitution of pattern parameters,
16 * essentially a parameter to value mapping.
17 *
18 * <p>Can also represent a partial match; unsubstituted parameters are assigned to null. Pattern matchers must never return
19 * a partial match, but they accept partial matches as method parameters.
20 *
21 * @author Bergmann Gábor
22 */
23public interface IPatternMatch extends Cloneable /* , Map<String, Object> */{
24 /** @return the pattern for which this is a match. */
25 public IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> specification();
26
27 /** Identifies the name of the pattern for which this is a match. */
28 public String patternName();
29
30 /** Returns the list of symbolic parameter names. */
31 public List<String> parameterNames();
32
33 /** Returns the value of the parameter with the given name, or null if name is invalid. */
34 public Object get(String parameterName);
35
36 /** Returns the value of the parameter at the given position, or null if position is invalid. */
37 public Object get(int position);
38
39 /**
40 * Sets the parameter with the given name to the given value.
41 *
42 * <p> Works only if match is mutable. See {@link #isMutable()}.
43 *
44 * @returns true if successful, false if parameter name is invalid. May also fail and return false if the value type
45 * is incompatible.
46 * @throws UnsupportedOperationException if match is not mutable.
47 */
48 public boolean set(String parameterName, Object newValue);
49
50 /**
51 * Sets the parameter at the given position to the given value.
52 *
53 * <p> Works only if match is mutable. See {@link #isMutable()}.
54 *
55 * @returns true if successful, false if position is invalid. May also fail and return false if the value type is
56 * incompatible.
57 * @throws UnsupportedOperationException if match is not mutable.
58 */
59 public boolean set(int position, Object newValue);
60
61 /**
62 * Returns whether the match object can be further modified after its creation. Setters work only if the match is mutable.
63 *
64 * <p>Matches computed by the pattern matchers are not mutable, so that the match set cannot be modified externally.
65 * Partial matches used as matcher input, however, can be mutable; such match objects can be created using {@link ViatraQueryMatcher#newEmptyMatch()}.
66 *
67 * @return whether the match can be modified
68 */
69 public boolean isMutable();
70
71 /**
72 * Converts the match to an array representation, with each pattern parameter at their respective position.
73 * In case of a partial match, unsubstituted parameters will be represented as null elements in the array.
74 *
75 * @return a newly constructed array containing each parameter substitution of the match in order.
76 */
77 public Object[] toArray();
78
79 /**
80 * Takes an immutable snapshot of this match.
81 * @return the match itself in case of immutable matches, an immutable copy in case of mutable ones.
82 */
83 public IPatternMatch toImmutable();
84
85 /** Prints the list of parameter-value pairs. */
86 public String prettyPrint();
87
88 /**
89 * Checks that this match is compatible with the given other match.
90 * This is used for filtering the match set of a matcher.
91 *
92 * <p/> Two non-null matches are compatible if and only if:
93 * <ul>
94 * <li>They share the same pattern.</li>
95 * <li>For each parameter, where they are set (non-null) in both matches,
96 * their values are equal.</li>
97 * </li>
98 * </ul>
99 *
100 * <p/> Furthermore, all matches are considered compatible with
101 * null matches (e.g. empty filter).
102 *
103 * @param other
104 * @return true, if this is compatible with other, or other is null
105 */
106 public boolean isCompatibleWith(IPatternMatch other);
107}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQueryGroup.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQueryGroup.java
new file mode 100644
index 00000000..a783f823
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQueryGroup.java
@@ -0,0 +1,46 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Mark Czotter, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11import java.util.Set;
12
13/**
14 * Generic interface for group of query specifications.
15 *
16 * <p>It handles more than one patterns as a group, and provides functionality to initialize the matchers together (which
17 * has performance benefits).
18 *
19 * @author Mark Czotter
20 *
21 */
22public interface IQueryGroup {
23
24 /**
25 * Initializes matchers for the group of patterns within an {@link ViatraQueryEngine}. If some of the pattern matchers are already
26 * constructed in the engine, no task is performed for them.
27 *
28 * <p>
29 * This preparation step has the advantage that it prepares pattern matchers for an arbitrary number of patterns in a
30 * single-pass traversal of the model.
31 * This is typically more efficient than traversing the model each time an individual pattern matcher is initialized on demand.
32 * The performance benefit only manifests itself if the engine is not in wildcard mode.
33 *
34 * @param engine
35 * the existing VIATRA Query engine in which the matchers will be created.
36 * @throws ViatraQueryRuntimeException
37 * if there was an error in preparing the engine
38 */
39 public void prepare(ViatraQueryEngine engine);
40
41 /**
42 * Returns the currently assigned {@link IQuerySpecification}s.
43 */
44 public Set<IQuerySpecification<?>> getSpecifications();
45
46}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQuerySpecification.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQuerySpecification.java
new file mode 100644
index 00000000..326d2202
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/IQuerySpecification.java
@@ -0,0 +1,86 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api;
11
12import tools.refinery.viatra.runtime.api.scope.QueryScope;
13import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
15import tools.refinery.viatra.runtime.matchers.psystem.queries.PQueryHeader;
16
17/**
18 * API interface for a VIATRA query specification. Each query is associated with a pattern. Methods instantiate a matcher
19 * of the pattern with various parameters.
20 *
21 * <p> As of 0.9.0, some internal details (mostly relevant for query evaluator backends) have been moved to {@link #getInternalQueryRepresentation()}.
22 *
23 * @author Bergmann Gábor
24 *
25 */
26public interface IQuerySpecification<Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> extends PQueryHeader {
27
28 /**
29 * Initializes the pattern matcher within an existing {@link ViatraQueryEngine}. If the pattern matcher is already
30 * constructed in the engine, only a lightweight reference is created.
31 * <p>
32 * The match set will be incrementally refreshed upon updates.
33 *
34 * @param engine
35 * the existing VIATRA Query engine in which this matcher will be created.
36 * @throws ViatraQueryRuntimeException
37 * if an error occurs during pattern matcher creation
38 */
39 public Matcher getMatcher(ViatraQueryEngine engine);
40
41
42 /**
43 * Returns an empty, mutable Match compatible with matchers of this query.
44 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
45 * This can be used to call the matcher with a partial match
46 * even if the specific class of the matcher or the match is unknown.
47 *
48 * @return the empty match
49 */
50 public abstract IPatternMatch newEmptyMatch();
51
52 /**
53 * Returns a new (partial) Match object compatible with matchers of this query.
54 * This can be used e.g. to call the matcher with a partial
55 * match.
56 *
57 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
58 *
59 * @param parameters
60 * the fixed value of pattern parameters, or null if not bound.
61 * @return the (partial) match object.
62 */
63 public abstract IPatternMatch newMatch(Object... parameters);
64
65 /**
66 * The query is formulated over this kind of modeling platform.
67 * E.g. for queries over EMF models, the {@link EMFScope} class is returned.
68 */
69 public Class<? extends QueryScope> getPreferredScopeClass();
70
71 /**
72 * Returns the definition of the query in a format intended for consumption by the query evaluator.
73 * @return the internal representation of the query.
74 */
75 public PQuery getInternalQueryRepresentation();
76
77 /**
78 * Creates a new uninitialized matcher, which is not functional until an engine initializes it. Clients
79 * should not call this method, it is used by the {@link ViatraQueryEngine} instance to instantiate matchers.
80 * @throws ViatraQueryRuntimeException
81 * @noreference This method is not intended to be referenced by clients.
82 * @since 1.4
83 */
84 public Matcher instantiate();
85
86}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/MatchUpdateAdapter.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/MatchUpdateAdapter.java
new file mode 100644
index 00000000..7de6d2c6
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/MatchUpdateAdapter.java
@@ -0,0 +1,105 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11import java.util.function.Consumer;
12
13/**
14 * A default implementation of {@link IMatchUpdateListener} that contains two match processors, one for appearance, one
15 * for disappearance. Any of the two can be null; in this case, corresponding notifications will be ignored.
16 *
17 * <p>
18 * Instantiate using either constructor.
19 *
20 * @author Bergmann Gabor
21 *
22 */
23public class MatchUpdateAdapter<Match extends IPatternMatch> implements IMatchUpdateListener<Match> {
24
25 Consumer<Match> appearCallback;
26 Consumer<Match> disappearCallback;
27
28 /**
29 * Constructs an instance without any match processors registered yet.
30 *
31 * Use {@link #setAppearCallback(Consumer)} and {@link #setDisappearCallback(Consumer)} to specify
32 * optional match processors for match appearance and disappearance, respectively.
33 */
34 public MatchUpdateAdapter() {
35 super();
36 }
37
38 /**
39 * Constructs an instance by specifying match processors.
40 *
41 * @param appearCallback
42 * a match processor that will be invoked on each new match that appears. If null, no callback will be
43 * executed on match appearance. See {@link Consumer} for details on how to implement.
44 * @param disappearCallback
45 * a match processor that will be invoked on each existing match that disappears. If null, no callback
46 * will be executed on match disappearance. See {@link Consumer} for details on how to implement.
47 * @since 2.0
48 */
49 public MatchUpdateAdapter(Consumer<Match> appearCallback, Consumer<Match> disappearCallback) {
50 super();
51 setAppearCallback(appearCallback);
52 setDisappearCallback(disappearCallback);
53 }
54
55 /**
56 * @return the match processor that will be invoked on each new match that appears. If null, no callback will be
57 * executed on match appearance.
58 * @since 2.0
59 */
60 public Consumer<Match> getAppearCallback() {
61 return appearCallback;
62 }
63
64 /**
65 * @param appearCallback
66 * a match processor that will be invoked on each new match that appears. If null, no callback will be
67 * executed on match appearance. See {@link Consumer} for details on how to implement.
68 * @since 2.0
69 */
70 public void setAppearCallback(Consumer<Match> appearCallback) {
71 this.appearCallback = appearCallback;
72 }
73
74 /**
75 * @return the match processor that will be invoked on each existing match that disappears. If null, no callback
76 * will be executed on match disappearance.
77 * @since 2.0
78 */
79 public Consumer<Match> getDisappearCallback() {
80 return disappearCallback;
81 }
82
83 /**
84 * @param disappearCallback
85 * a match processor that will be invoked on each existing match that disappears. If null, no callback
86 * will be executed on match disappearance. See {@link Consumer} for details on how to implement.
87 * @since 2.0
88 */
89 public void setDisappearCallback(Consumer<Match> disappearCallback) {
90 this.disappearCallback = disappearCallback;
91 }
92
93 @Override
94 public void notifyAppearance(Match match) {
95 if (appearCallback != null)
96 appearCallback.accept(match);
97 }
98
99 @Override
100 public void notifyDisappearance(Match match) {
101 if (disappearCallback != null)
102 disappearCallback.accept(match);
103 }
104
105}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngine.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngine.java
new file mode 100644
index 00000000..0f402b49
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngine.java
@@ -0,0 +1,153 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10
11package tools.refinery.viatra.runtime.api;
12
13import tools.refinery.viatra.runtime.api.scope.IBaseIndex;
14import tools.refinery.viatra.runtime.api.scope.QueryScope;
15import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
16
17import java.util.Set;
18import java.util.function.Supplier;
19import java.util.stream.Collectors;
20
21/**
22 * A Viatra Query (incremental) evaluation engine, attached to a model such as an EMF resource. The engine hosts pattern matchers, and
23 * will listen on model update notifications stemming from the given model in order to maintain live results.
24 *
25 * <p>
26 * By default, ViatraQueryEngines do not need to be separately disposed; they will be garbage collected along with the model.
27 * Advanced users: see {@link AdvancedViatraQueryEngine} if you want fine control over the lifecycle of an engine.
28 *
29 * <p>
30 * Pattern matchers within this engine may be instantiated in the following ways:
31 * <ul>
32 * <li>Recommended: instantiate the specific matcher class generated for the pattern by e.g. MyPatternMatcher.on(engine).
33 * <li>Use {@link #getMatcher(IQuerySpecification)} if the pattern-specific generated matcher API is not available.
34 * <li>Advanced: use the query specification associated with the generated matcher class to achieve the same.
35 * </ul>
36 * Additionally, a group of patterns (see {@link IQueryGroup}) can be initialized together before usage; this may improve
37 * the performance of pattern matcher construction by trying to gather all necessary information from the model in one go.
38 * Note that no such improvement is to be expected if the engine is specifically constructed in wildcard mode,
39 * an option available in some scope implementations
40 * (see {@link EMFScope#EMFScope(Notifier, BaseIndexOptions)} and {@link BaseIndexOptions#withWildcardMode(boolean)}).
41 *
42 *
43 * @author Bergmann Gábor
44 * @noextend This class is not intended to be subclassed by clients.
45 */
46public abstract class ViatraQueryEngine {
47
48
49 /**
50 * Obtain a (managed) {@link ViatraQueryEngine} to evaluate queries over a given scope specified by an {@link QueryScope}.
51 *
52 * <p> For a given matcher scope, the same engine will be returned to any client.
53 * This facilitates the reuse of internal caches of the engine, greatly improving performance.
54 *
55 * <p> The lifecycle of this engine is centrally managed, and will not be disposed as long as the model is retained in memory.
56 * The engine will be garbage collected along with the model.
57 *
58 * <p>
59 * Advanced users: see {@link AdvancedViatraQueryEngine#createUnmanagedEngine(QueryScope)} to obtain a private,
60 * unmanaged engine that is not shared with other clients and allows tight control over its lifecycle.
61 *
62 * @param scope
63 * the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
64 * Provide e.g. a {@link EMFScope} for evaluating queries on an EMF model.
65 * @return a (managed) {@link ViatraQueryEngine} instance
66 */
67 public static ViatraQueryEngine on(QueryScope scope) {
68 return ViatraQueryEngineManager.getInstance().getQueryEngine(scope);
69 }
70
71 /**
72 * Obtain a (managed) {@link ViatraQueryEngine} to evaluate queries over a given scope specified by an {@link QueryScope}.
73 *
74 * <p> For a given matcher scope, the same engine will be returned to any client.
75 * This facilitates the reuse of internal caches of the engine, greatly improving performance.
76 *
77 * <p> The lifecycle of this engine is centrally managed, and will not be disposed as long as the model is retained in memory.
78 * The engine will be garbage collected along with the model.
79 *
80 * <p>
81 * Advanced users: see {@link AdvancedViatraQueryEngine#createUnmanagedEngine(QueryScope)} to obtain a private,
82 * unmanaged engine that is not shared with other clients and allows tight control over its lifecycle.
83 *
84 * @param scope
85 * the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
86 * Provide e.g. a {@link EMFScope} for evaluating queries on an EMF model.
87 * @return a (managed) {@link ViatraQueryEngine} instance
88 * @since 1.4
89 */
90 public static ViatraQueryEngine on(QueryScope scope, ViatraQueryEngineOptions options) {
91 return ViatraQueryEngineManager.getInstance().getQueryEngine(scope, options);
92 }
93
94 /**
95 * Provides access to the internal base index component of the engine, responsible for keeping track of basic
96 * contents of the model.
97 *
98 * <p>If using an {@link EMFScope},
99 * consider {@link EMFScope#extractUnderlyingEMFIndex(ViatraQueryEngine)} instead to access EMF-specific details.
100 *
101 * @return the baseIndex the NavigationHelper maintaining the base index
102 * @throws ViatraQueryRuntimeException
103 * if the base index could not be constructed
104 */
105 public abstract IBaseIndex getBaseIndex();
106
107 /**
108 * Access a pattern matcher based on a {@link IQuerySpecification}.
109 * Multiple calls will return the same matcher.
110 * @param querySpecification a {@link IQuerySpecification} that describes a VIATRA query specification
111 * @return a pattern matcher corresponding to the specification
112 * @throws ViatraQueryRuntimeException if the matcher could not be initialized
113 */
114 public abstract <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getMatcher(IQuerySpecification<Matcher> querySpecification);
115
116 /**
117 * Access a pattern matcher for the graph pattern with the given fully qualified name.
118 * Will succeed only if a query specification for this fully qualified name has been generated and registered.
119 * Multiple calls will return the same matcher unless the registered specification changes.
120 *
121 * @param patternFQN the fully qualified name of a VIATRA query specification
122 * @return a pattern matcher corresponding to the specification
123 * @throws ViatraQueryRuntimeException if the matcher could not be initialized
124 */
125 public abstract ViatraQueryMatcher<? extends IPatternMatch> getMatcher(String patternFQN);
126
127 /**
128 * Access an existing pattern matcher based on a {@link IQuerySpecification}.
129 * @param querySpecification a {@link IQuerySpecification} that describes a VIATRA query specification
130 * @return a pattern matcher corresponding to the specification, <code>null</code> if a matcher does not exist yet.
131 */
132 public abstract <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getExistingMatcher(IQuerySpecification<Matcher> querySpecification);
133
134
135 /**
136 * Access a copy of available {@link ViatraQueryMatcher} pattern matchers.
137 * @return a copy of the set of currently available pattern matchers registered on this engine instance
138 */
139 public abstract Set<? extends ViatraQueryMatcher<? extends IPatternMatch>> getCurrentMatchers();
140
141 public Set<IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> getRegisteredQuerySpecifications() {
142 return getCurrentMatchers().stream().map(ViatraQueryMatcher::getSpecification).collect(Collectors.toSet());
143 }
144
145 /**
146 * @return the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
147 */
148 public abstract QueryScope getScope();
149
150 public abstract void flushChanges();
151
152 public abstract <T> T withFlushingChanges(Supplier<T> supplier);
153}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineInitializationListener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineInitializationListener.java
new file mode 100644
index 00000000..02162a65
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineInitializationListener.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11/**
12 * Listener interface to get notifications when a new managed engine is initialized.
13 *
14 * @author Abel Hegedus
15 *
16 */
17public interface ViatraQueryEngineInitializationListener {
18
19 /**
20 * Called when a managed engine is initialized in the EngineManager.
21 *
22 * @param engine the initialized engine
23 */
24 void engineInitialized(AdvancedViatraQueryEngine engine);
25
26}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineLifecycleListener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineLifecycleListener.java
new file mode 100644
index 00000000..1c4dc264
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineLifecycleListener.java
@@ -0,0 +1,52 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11
12/**
13 * Listener interface for getting notification on changes in an {@link ViatraQueryEngine}.
14 *
15 * You can use it to remove any other listeners that you attached to matchers or the engine,
16 * or to handle matchers that are initialized after you started using the engine.
17 *
18 * @author Abel Hegedus
19 *
20 */
21public interface ViatraQueryEngineLifecycleListener {
22
23 // -------------------------------------------------------------------------------
24 // MATCHERS (methods notifying on changes in the matchers available in the engine)
25 // -------------------------------------------------------------------------------
26
27 /**
28 * Called after a matcher is instantiated in the engine
29 *
30 * @param matcher the new matcher
31 */
32 void matcherInstantiated(ViatraQueryMatcher<? extends IPatternMatch> matcher);
33
34 // -------------------------------------------------------------------------
35 // HEALTH (methods notifying on changes that affect the health of the engine
36 // -------------------------------------------------------------------------
37
38 /**
39 * Called after the engine has become tainted due to a fatal error
40 */
41 void engineBecameTainted(String message, Throwable t);
42
43 /**
44 * Called after the engine has been wiped
45 */
46 void engineWiped();
47
48 /**
49 * Called after the engine has been disposed
50 */
51 void engineDisposed();
52}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineManager.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineManager.java
new file mode 100644
index 00000000..4a256aea
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineManager.java
@@ -0,0 +1,191 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api;
11
12import tools.refinery.viatra.runtime.api.scope.QueryScope;
13import tools.refinery.viatra.runtime.internal.apiimpl.ViatraQueryEngineImpl;
14import tools.refinery.viatra.runtime.util.ViatraQueryLoggingUtil;
15
16import java.lang.ref.WeakReference;
17import java.util.*;
18
19import static tools.refinery.viatra.runtime.matchers.util.Preconditions.checkArgument;
20
21/**
22 * Global registry of active VIATRA Query Engines.
23 *
24 * <p>
25 * Manages an {@link ViatraQueryEngine} for each model (more precisely scope), that is created on demand. Managed engines are shared between
26 * clients querying the same model.
27 *
28 * <p>
29 * It is also possible to create private, unmanaged engines that are not shared between clients.
30 *
31 * <p>
32 * Only weak references are retained on the managed engines. So if there are no other references to the matchers or the
33 * engine, they can eventually be GC'ed, and they won't block the model from being GC'ed either.
34 *
35 *
36 * @author Bergmann Gabor
37 *
38 */
39public class ViatraQueryEngineManager {
40 private static ViatraQueryEngineManager instance = new ViatraQueryEngineManager();
41
42
43 /**
44 * @return the singleton instance
45 */
46 public static ViatraQueryEngineManager getInstance() {
47 return instance;
48 }
49
50 /**
51 * The engine manager keeps track of the managed engines via weak references only, so it will not keep unused
52 * managed engines from being garbage collected. Still, as long as the user keeps the model in memory, the
53 * associated managed engine will not be garbage collected, as it is expected to be strongly reachable from the
54 * model via the scope-specific base index or change notification listeners (see
55 * {@link BaseIndexListener#iqEngine}).
56 */
57 Map<QueryScope, WeakReference<ViatraQueryEngineImpl>> engines;
58
59 ViatraQueryEngineManager() {
60 super();
61 engines = new WeakHashMap<QueryScope, WeakReference<ViatraQueryEngineImpl>>();
62 initializationListeners = new HashSet<ViatraQueryEngineInitializationListener>();
63 }
64
65 /**
66 * Creates a managed VIATRA Query Engine at a given scope (e.g. an EMF Resource or ResourceSet, as in {@link EMFScope})
67 * or retrieves an already existing one. Repeated invocations for a single model root will return the same engine.
68 * Consequently, the engine will be reused between different clients querying the same model, providing performance benefits.
69 *
70 * <p>
71 * The match set of any patterns will be incrementally refreshed upon updates from this scope.
72 *
73 * @param scope
74 * the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
75 * Provide e.g. a {@link EMFScope} for evaluating queries on an EMF model.
76 * @return a new or previously existing engine
77 */
78 public ViatraQueryEngine getQueryEngine(QueryScope scope) {
79 return getQueryEngine(scope, ViatraQueryEngineOptions.getDefault());
80 }
81
82 /**
83 * Creates a managed VIATRA Query Engine at a given scope (e.g. an EMF Resource or ResourceSet, as in {@link EMFScope})
84 * or retrieves an already existing one. Repeated invocations for a single model root will return the same engine.
85 * Consequently, the engine will be reused between different clients querying the same model, providing performance benefits.
86 *
87 * <p>
88 * The match set of any patterns will be incrementally refreshed upon updates from this scope.
89 *
90 * @param scope
91 * the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
92 * Provide e.g. a {@link EMFScope} for evaluating queries on an EMF model.
93 * @return a new or previously existing engine
94 * @since 1.4
95 */
96 public ViatraQueryEngine getQueryEngine(QueryScope scope, ViatraQueryEngineOptions options) {
97 ViatraQueryEngineImpl engine = getEngineInternal(scope);
98 if (engine == null) {
99 engine = new ViatraQueryEngineImpl(this, scope, options);
100 engines.put(scope, new WeakReference<ViatraQueryEngineImpl>(engine));
101 notifyInitializationListeners(engine);
102 }
103 return engine;
104 }
105
106 /**
107 * Retrieves an already existing managed VIATRA Query Engine.
108 *
109 * @param scope
110 * the scope of query evaluation; the definition of the set of model elements that this engine is operates on.
111 * Provide e.g. a {@link EMFScope} for evaluating queries on an EMF model.
112 * @return a previously existing engine, or null if no engine is active for the given EMF model root
113 */
114 public ViatraQueryEngine getQueryEngineIfExists(QueryScope scope) {
115 return getEngineInternal(scope);
116 }
117
118 /**
119 * Collects all {@link ViatraQueryEngine} instances that still exist.
120 *
121 * @return set of engines if there is any, otherwise EMTPY_SET
122 */
123 public Set<ViatraQueryEngine> getExistingQueryEngines(){
124 Set<ViatraQueryEngine> existingEngines = null;
125 for (WeakReference<ViatraQueryEngineImpl> engineRef : engines.values()) {
126 AdvancedViatraQueryEngine engine = engineRef == null ? null : engineRef.get();
127 if(existingEngines == null) {
128 existingEngines = new HashSet<>();
129 }
130 existingEngines.add(engine);
131 }
132 if(existingEngines == null) {
133 existingEngines = Collections.emptySet();
134 }
135 return existingEngines;
136 }
137
138 private final Set<ViatraQueryEngineInitializationListener> initializationListeners;
139
140 /**
141 * Registers a listener for new engine initialization.
142 *
143 * <p/> For removal, use {@link #removeQueryEngineInitializationListener}
144 *
145 * @param listener the listener to register
146 */
147 public void addQueryEngineInitializationListener(ViatraQueryEngineInitializationListener listener) {
148 checkArgument(listener != null, "Cannot add null listener!");
149 initializationListeners.add(listener);
150 }
151
152 /**
153 * Removes a registered listener added with {@link #addQueryEngineInitializationListener}
154 *
155 * @param listener
156 */
157 public void removeQueryEngineInitializationListener(ViatraQueryEngineInitializationListener listener) {
158 checkArgument(listener != null, "Cannot remove null listener!");
159 initializationListeners.remove(listener);
160 }
161
162 /**
163 * Notifies listeners that a new engine has been initialized.
164 *
165 * @param engine the initialized engine
166 */
167 protected void notifyInitializationListeners(AdvancedViatraQueryEngine engine) {
168 try {
169 if (!initializationListeners.isEmpty()) {
170 for (ViatraQueryEngineInitializationListener listener : new HashSet<>(initializationListeners)) {
171 listener.engineInitialized(engine);
172 }
173 }
174 } catch (Exception ex) {
175 ViatraQueryLoggingUtil.getLogger(getClass()).fatal(
176 "VIATRA Query Engine Manager encountered an error in delivering notifications"
177 + " about engine initialization. ", ex);
178 }
179 }
180
181 /**
182 * @param emfRoot
183 * @return
184 */
185 private ViatraQueryEngineImpl getEngineInternal(QueryScope scope) {
186 final WeakReference<ViatraQueryEngineImpl> engineRef = engines.get(scope);
187 ViatraQueryEngineImpl engine = engineRef == null ? null : engineRef.get();
188 return engine;
189 }
190
191}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineOptions.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineOptions.java
new file mode 100644
index 00000000..15bf1f91
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryEngineOptions.java
@@ -0,0 +1,293 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Balázs Grill, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11
12import java.util.Objects;
13import java.util.ServiceLoader;
14
15import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
16import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactoryProvider;
17import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
18import tools.refinery.viatra.runtime.matchers.util.Preconditions;
19
20/**
21 * This class is intended to provide options to a created {@link ViatraQueryEngine} instance. The {@link #DEFAULT}
22 * instance represents the configuration that is selected when no explicit options are provided by the user. To create
23 * new configurations, use the static builder methods {@link #defineOptions()} (starts with empty options) or
24 * {@link #copyOptions(ViatraQueryEngineOptions)} (starts with all options from an existing configuration).
25 *
26 * @author Balázs Grill, Zoltan Ujhelyi
27 * @since 1.4
28 *
29 */
30public final class ViatraQueryEngineOptions {
31
32 private static boolean areSystemDefaultsCalculated = false;
33 private static IQueryBackendFactory systemDefaultBackendFactory;
34 private static IQueryBackendFactory systemDefaultCachingBackendFactory;
35 private static IQueryBackendFactory systemDefaultSearchBackendFactory;
36
37 /**
38 * @since 2.0
39 */
40 public static void setSystemDefaultBackends(IQueryBackendFactory systemDefaultBackendFactory,
41 IQueryBackendFactory systemDefaultCachingBackendFactory,
42 IQueryBackendFactory systemDefaultSearchBackendFactory) {
43 areSystemDefaultsCalculated = true;
44 ViatraQueryEngineOptions.systemDefaultBackendFactory = systemDefaultBackendFactory;
45 ViatraQueryEngineOptions.systemDefaultCachingBackendFactory = systemDefaultCachingBackendFactory;
46 ViatraQueryEngineOptions.systemDefaultSearchBackendFactory = systemDefaultSearchBackendFactory;
47 }
48
49 /**
50 * If {@link #setSystemDefaultBackends(IQueryBackendFactory, IQueryBackendFactory, IQueryBackendFactory)} is not
51 * called, this method is responsible of finding the corresponding backends on the classpath using Java Service
52 * loaders.
53 */
54 private static void calculateSystemDefaultBackends() {
55 for (IQueryBackendFactoryProvider provider : ServiceLoader.load(IQueryBackendFactoryProvider.class)) {
56 if (provider.isSystemDefaultEngine()) {
57 systemDefaultBackendFactory = provider.getFactory();
58 }
59 if (provider.isSystemDefaultCachingBackend()) {
60 systemDefaultCachingBackendFactory = provider.getFactory();
61 }
62 if (provider.isSystemDefaultSearchBackend()) {
63 systemDefaultSearchBackendFactory = provider.getFactory();
64 }
65 }
66 areSystemDefaultsCalculated = true;
67 }
68
69 private static IQueryBackendFactory getSystemDefaultBackend() {
70 if (!areSystemDefaultsCalculated) {
71 calculateSystemDefaultBackends();
72 }
73 return Objects.requireNonNull(systemDefaultBackendFactory, "System default backend not found");
74 }
75
76 private static IQueryBackendFactory getSystemDefaultCachingBackend() {
77 if (!areSystemDefaultsCalculated) {
78 calculateSystemDefaultBackends();
79 }
80 return Objects.requireNonNull(systemDefaultCachingBackendFactory, "System default caching backend not found");
81 }
82
83 private static IQueryBackendFactory getSystemDefaultSearchBackend() {
84 if (!areSystemDefaultsCalculated) {
85 calculateSystemDefaultBackends();
86 }
87 return Objects.requireNonNull(systemDefaultSearchBackendFactory, "System default search backend not found");
88 }
89
90 private final QueryEvaluationHint engineDefaultHints;
91
92 private final IQueryBackendFactory defaultCachingBackendFactory;
93 private final IQueryBackendFactory defaultSearchBackendFactory;
94
95 /** The default engine options; if options are not defined, this version will be used. */
96 private static ViatraQueryEngineOptions DEFAULT;
97
98 /**
99 * @since 2.0
100 */
101 public static final ViatraQueryEngineOptions getDefault() {
102 if (DEFAULT == null) {
103 DEFAULT = new Builder().build();
104 }
105 return DEFAULT;
106 }
107
108 public static final class Builder {
109 private QueryEvaluationHint engineDefaultHints;
110
111 private IQueryBackendFactory defaultBackendFactory;
112 private IQueryBackendFactory defaultCachingBackendFactory;
113 private IQueryBackendFactory defaultSearchBackendFactory;
114
115 public Builder() {
116
117 }
118
119 public Builder(ViatraQueryEngineOptions from) {
120 this.engineDefaultHints = from.engineDefaultHints;
121 this.defaultBackendFactory = engineDefaultHints.getQueryBackendFactory();
122 this.defaultCachingBackendFactory = from.defaultCachingBackendFactory;
123 this.defaultSearchBackendFactory = from.defaultSearchBackendFactory;
124 }
125
126 /**
127 * Note that the backend factory in the hint is overridden by a factory added with
128 * {@link #withDefaultBackend(IQueryBackendFactory)}.
129 */
130 public Builder withDefaultHint(QueryEvaluationHint engineDefaultHints) {
131 this.engineDefaultHints = engineDefaultHints;
132 return this;
133 }
134
135 /**
136 * Note that this backend factory overrides the factory defined by the hint added by
137 * {@link #withDefaultHint(QueryEvaluationHint)}.
138 */
139 public Builder withDefaultBackend(IQueryBackendFactory defaultBackendFactory) {
140 this.defaultBackendFactory = defaultBackendFactory;
141 return this;
142 }
143
144 /**
145 * @since 2.0
146 */
147 public Builder withDefaultSearchBackend(IQueryBackendFactory defaultSearchBackendFactory) {
148 Preconditions.checkArgument(!defaultSearchBackendFactory.isCaching(), "%s is not a search backend", defaultSearchBackendFactory.getClass());
149 this.defaultSearchBackendFactory = defaultSearchBackendFactory;
150 return this;
151 }
152
153 public Builder withDefaultCachingBackend(IQueryBackendFactory defaultCachingBackendFactory) {
154 Preconditions.checkArgument(defaultCachingBackendFactory.isCaching(), "%s is not a caching backend", defaultCachingBackendFactory.getClass());
155 this.defaultCachingBackendFactory = defaultCachingBackendFactory;
156 return this;
157 }
158
159 public ViatraQueryEngineOptions build() {
160 IQueryBackendFactory defaultFactory = getDefaultBackend();
161 QueryEvaluationHint hint = getEngineDefaultHints(defaultFactory);
162 return new ViatraQueryEngineOptions(hint, getDefaultCachingBackend(), getDefaultSearchBackend());
163 }
164
165 private IQueryBackendFactory getDefaultBackend() {
166 if (defaultBackendFactory != null){
167 return defaultBackendFactory;
168 } else if (engineDefaultHints != null) {
169 return engineDefaultHints.getQueryBackendFactory();
170 } else {
171 return getSystemDefaultBackend();
172 }
173 }
174
175 private IQueryBackendFactory getDefaultCachingBackend() {
176 if (defaultCachingBackendFactory != null) {
177 return defaultCachingBackendFactory;
178 } else if (defaultBackendFactory != null && defaultBackendFactory.isCaching()) {
179 return defaultBackendFactory;
180 } else {
181 return getSystemDefaultCachingBackend();
182 }
183 }
184
185 private IQueryBackendFactory getDefaultSearchBackend() {
186 if (defaultSearchBackendFactory != null) {
187 return defaultSearchBackendFactory;
188 } else if (defaultBackendFactory != null && !defaultBackendFactory.isCaching()) {
189 return defaultBackendFactory;
190 } else {
191 return getSystemDefaultSearchBackend();
192 }
193 }
194
195 private QueryEvaluationHint getEngineDefaultHints(IQueryBackendFactory defaultFactory) {
196 if (engineDefaultHints != null){
197 return engineDefaultHints.overrideBy(new QueryEvaluationHint(null, defaultFactory));
198 } else {
199 return new QueryEvaluationHint(null, defaultFactory);
200 }
201 }
202 }
203
204 /**
205 * Initializes an option builder with no previously set options.
206 */
207 public static Builder defineOptions() {
208 return new Builder();
209 }
210
211 /**
212 * Initializes an option builder with settings from an existing configuration.
213 */
214 public static Builder copyOptions(ViatraQueryEngineOptions options) {
215 return new Builder(options);
216 }
217
218 private ViatraQueryEngineOptions(QueryEvaluationHint engineDefaultHints,
219 IQueryBackendFactory defaultCachingBackendFactory, IQueryBackendFactory defaultSearchBackendFactory) {
220 this.engineDefaultHints = engineDefaultHints;
221 this.defaultCachingBackendFactory = defaultCachingBackendFactory;
222 this.defaultSearchBackendFactory = defaultSearchBackendFactory;
223 }
224
225 public QueryEvaluationHint getEngineDefaultHints() {
226 return engineDefaultHints;
227 }
228
229 /**
230 * Returns the configured default backend
231 *
232 * @return the defaultBackendFactory
233 */
234 public IQueryBackendFactory getDefaultBackendFactory() {
235 switch (engineDefaultHints.getQueryBackendRequirementType()) {
236 case DEFAULT_CACHING:
237 return ViatraQueryEngineOptions.getSystemDefaultCachingBackend();
238 case DEFAULT_SEARCH:
239 return ViatraQueryEngineOptions.getSystemDefaultCachingBackend();
240 case SPECIFIC:
241 return engineDefaultHints.getQueryBackendFactory();
242 case UNSPECIFIED:
243 default:
244 return ViatraQueryEngineOptions.getSystemDefaultBackend();
245 }
246 }
247
248 /**
249 * Returns the configured default caching backend. If the default backend caches matches, it is usually expected, but
250 * not mandatory for the two default backends to be the same.
251 */
252 public IQueryBackendFactory getDefaultCachingBackendFactory() {
253 return defaultCachingBackendFactory;
254 }
255
256 /**
257 * Returns the configured default search-based backend. If the default backend is search-based, it is usually expected, but
258 * not mandatory for the two default backends to be the same.
259 * @since 2.0
260 */
261 public IQueryBackendFactory getDefaultSearchBackendFactory() {
262 return defaultSearchBackendFactory;
263 }
264
265 @Override
266 public String toString() {
267 // TODO defaultCachingBackendFactory is ignored
268 if(Objects.equals(engineDefaultHints, DEFAULT.engineDefaultHints))
269 return "defaults";
270 else
271 return engineDefaultHints.toString();
272 }
273
274 /**
275 * @since 2.0
276 */
277 public IQueryBackendFactory getQueryBackendFactory(QueryEvaluationHint hint) {
278 if (hint == null) {
279 return getDefaultBackendFactory();
280 }
281
282 switch (hint.getQueryBackendRequirementType()) {
283 case DEFAULT_CACHING:
284 return getDefaultCachingBackendFactory();
285 case DEFAULT_SEARCH:
286 return getDefaultSearchBackendFactory();
287 case SPECIFIC:
288 return hint.getQueryBackendFactory();
289 default:
290 return getDefaultBackendFactory();
291 }
292 }
293}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryMatcher.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryMatcher.java
new file mode 100644
index 00000000..1ae0c96f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryMatcher.java
@@ -0,0 +1,258 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api;
11
12import java.util.Collection;
13import java.util.List;
14import java.util.Optional;
15import java.util.Set;
16import java.util.function.Consumer;
17import java.util.stream.Stream;
18
19/**
20 * Interface for a VIATRA Query matcher associated with a graph pattern.
21 *
22 * @param <Match>
23 * the IPatternMatch type representing a single match of this pattern.
24 * @author Bergmann Gábor
25 * @noimplement This interface is not intended to be implemented by clients. Implement BaseMatcher instead.
26 */
27public interface ViatraQueryMatcher<Match extends IPatternMatch> {
28 // REFLECTION
29 /** The pattern that will be matched. */
30 IQuerySpecification<? extends ViatraQueryMatcher<Match>> getSpecification();
31
32 /** Fully qualified name of the pattern. */
33 String getPatternName();
34
35 /** Returns the index of the symbolic parameter with the given name. */
36 Integer getPositionOfParameter(String parameterName);
37
38 /** Returns the array of symbolic parameter names. */
39 List<String> getParameterNames();
40
41 // ALL MATCHES
42 /**
43 * Returns the set of all pattern matches.
44 *
45 * @return matches represented as a Match object.
46 */
47 Collection<Match> getAllMatches();
48
49 /**
50 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
51 *
52 * @param partialMatch
53 * a partial match of the pattern where each non-null field binds the corresponding pattern parameter to
54 * a fixed value.
55 * @return matches represented as a Match object.
56 */
57 Collection<Match> getAllMatches(Match partialMatch);
58
59 /**
60 * Returns a stream of all pattern matches.
61 * <p>
62 * <strong>WARNING</strong> If the result set changes while the stream is evaluated, the set of matches included in
63 * the stream are unspecified. In such cases, either rely on {@link #getAllMatches()} or collect the results of the
64 * stream in end-user code.
65 *
66 * @return matches represented as a Match object.
67 * @since 2.0
68 */
69 Stream<Match> streamAllMatches();
70
71 /**
72 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
73 * <p>
74 * <strong>WARNING</strong> If the result set changes while the stream is evaluated, the set of matches included in
75 * the stream are unspecified. In such cases, either rely on {@link #getAllMatches()} or collect the results of the
76 * stream in end-user code.
77 *
78 * @param partialMatch
79 * a partial match of the pattern where each non-null field binds the corresponding pattern parameter to
80 * a fixed value.
81 * @return matches represented as a Match object.
82 * @since 2.0
83 */
84 Stream<Match> streamAllMatches(Match partialMatch);
85
86 // variant(s) with input binding as pattern-specific parameters: not declared in interface
87
88 // SINGLE MATCH
89 /**
90 * Returns an arbitrarily chosen pattern match. Neither determinism nor randomness of selection is guaranteed.
91 *
92 * @return a match represented as a Match object, or an empty Optional if no match is found.
93 * @since 2.0
94 */
95 Optional<Match> getOneArbitraryMatch();
96
97 /**
98 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
99 * Neither determinism nor randomness of selection is guaranteed.
100 *
101 * @param partialMatch
102 * a partial match of the pattern where each non-null field binds the corresponding pattern parameter to
103 * a fixed value.
104 * @return a match represented as a Match object, or an empty Optional if no match is found.
105 * @since 2.0
106 */
107 Optional<Match> getOneArbitraryMatch(Match partialMatch);
108
109 // variant(s) with input binding as pattern-specific parameters: not declared in interface
110
111 // MATCH CHECKING
112 /**
113 * Indicates whether the query has any kind of matches.
114 *
115 * @return true if there exists a valid match of the pattern.
116 * @since 1.7
117 */
118 boolean hasMatch();
119
120 /**
121 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, under
122 * any possible substitution of the unspecified parameters (if any).
123 *
124 * @param partialMatch
125 * a (partial) match of the pattern where each non-null field binds the corresponding pattern parameter
126 * to a fixed value.
127 * @return true if the input is a valid (partial) match of the pattern.
128 */
129 boolean hasMatch(Match partialMatch);
130
131 // variant(s) with input binding as pattern-specific parameters: not declared in interface
132
133 // NUMBER OF MATCHES
134 /**
135 * Returns the number of all pattern matches.
136 *
137 * @return the number of pattern matches found.
138 */
139 int countMatches();
140
141 /**
142 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
143 *
144 * @param partialMatch
145 * a partial match of the pattern where each non-null field binds the corresponding pattern parameter to
146 * a fixed value.
147 * @return the number of pattern matches found.
148 */
149 int countMatches(Match partialMatch);
150
151 // variant(s) with input binding as pattern-specific parameters: not declared in interface
152
153 // FOR EACH MATCH
154 /**
155 * Executes the given processor on each match of the pattern.
156 *
157 * @param processor
158 * the action that will process each pattern match.
159 * @since 2.0
160 */
161 void forEachMatch(Consumer<? super Match> processor);
162
163 /**
164 * Executes the given processor on each match of the pattern that conforms to the given fixed values of some
165 * parameters.
166 *
167 * @param partialMatch
168 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
169 * @param processor
170 * the action that will process each pattern match.
171 * @since 2.0
172 */
173 void forEachMatch(Match partialMatch, Consumer<? super Match> processor);
174
175 // variant(s) with input binding as pattern-specific parameters: not declared in interface
176
177 // FOR ONE ARBITRARY MATCH
178 /**
179 * Executes the given processor on an arbitrarily chosen match of the pattern. Neither determinism nor randomness of
180 * selection is guaranteed.
181 *
182 * @param processor
183 * the action that will process the selected match.
184 * @return true if the pattern has at least one match, false if the processor was not invoked
185 * @since 2.0
186 */
187 boolean forOneArbitraryMatch(Consumer<? super Match> processor);
188
189 /**
190 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed
191 * values of some parameters. Neither determinism nor randomness of selection is guaranteed.
192 *
193 * @param partialMatch
194 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
195 * @param processor
196 * the action that will process the selected match.
197 * @return true if the pattern has at least one match with the given parameter values, false if the processor was
198 * not invoked
199 * @since 2.0
200 */
201 boolean forOneArbitraryMatch(Match partialMatch, Consumer<? super Match> processor);
202
203 // variant(s) with input binding as pattern-specific parameters: not declared in interface
204
205 /**
206 * Returns an empty, mutable Match for the matcher.
207 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
208 * This can be used to call the matcher with a partial match
209 * even if the specific class of the matcher or the match is unknown.
210 *
211 * @return the empty match
212 */
213 Match newEmptyMatch();
214
215 /**
216 * Returns a new (partial) Match object for the matcher.
217 * This can be used e.g. to call the matcher with a partial
218 * match.
219 *
220 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
221 *
222 * @param parameters
223 * the fixed value of pattern parameters, or null if not bound.
224 * @return the (partial) match object.
225 */
226 Match newMatch(Object... parameters);
227
228 /**
229 * Retrieve the set of values that occur in matches for the given parameterName.
230 *
231 * @param parameterName
232 * name of the parameter for which values are returned
233 * @return the Set of all values for the given parameter, null if the parameter with the given name does not exists,
234 * empty set if there are no matches
235 */
236 Set<Object> getAllValues(final String parameterName);
237
238 /**
239 * Retrieve the set of values that occur in matches for the given parameterName, that conforms to the given fixed
240 * values of some parameters.
241 *
242 * @param parameterName
243 * name of the parameter for which values are returned
244 * @param partialMatch
245 * a partial match of the pattern where each non-null field binds the corresponding pattern parameter to
246 * a fixed value.
247 * @return the Set of all values for the given parameter, null if the parameter with the given name does not exists
248 * or if the parameter with the given name is set in partialMatch, empty set if there are no matches
249 */
250 Set<Object> getAllValues(final String parameterName, Match partialMatch);
251
252 /**
253 * Returns the engine that the matcher uses.
254 *
255 * @return the engine
256 */
257 ViatraQueryEngine getEngine();
258} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryModelUpdateListener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryModelUpdateListener.java
new file mode 100644
index 00000000..da8bf87e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/ViatraQueryModelUpdateListener.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api;
10
11
12
13/**
14 * Listener interface for model changes affecting different levels of the VIATRA Query architecture.
15 *
16 * @author Abel Hegedus
17 *
18 */
19public interface ViatraQueryModelUpdateListener {
20
21 /**
22 * Possible notification levels for changes
23 *
24 * @author Abel Hegedus
25 *
26 */
27 enum ChangeLevel {
28 NO_CHANGE, MODEL, INDEX, MATCHSET;
29
30 public ChangeLevel changeOccured(ChangeLevel occuredLevel) {
31 if(this.compareTo(occuredLevel) < 0) {
32 return occuredLevel;
33 } else {
34 return this;
35 }
36 }
37 }
38 /**
39 * Called after each change with also sending the level of change.
40 * Only called if the change level is at least at the level returned by getLevel().
41 *
42 * @param changeLevel
43 */
44 void notifyChanged(ChangeLevel changeLevel);
45
46 /**
47 * This may be queried only ONCE (!!!) at the registration of the listener.
48 *
49 * NOTE: this allows us to only create engine level change providers if there is someone who needs it.
50 *
51 * @return the change level where you want notifications
52 */
53 ChangeLevel getLevel();
54
55}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseGeneratedPatternGroup.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseGeneratedPatternGroup.java
new file mode 100644
index 00000000..2e2a823b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseGeneratedPatternGroup.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Mark Czotter, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.impl;
10
11import java.util.HashSet;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.api.IQuerySpecification;
15
16/**
17 * @author Mark Czotter
18 *
19 */
20public abstract class BaseGeneratedPatternGroup extends BaseQueryGroup {
21
22 @Override
23 public Set<IQuerySpecification<?>> getSpecifications() {
24 return querySpecifications;
25 }
26
27 /**
28 * Returns {@link IQuerySpecification} objects for handling them as a group. To be filled by constructors of subclasses.
29 */
30 protected Set<IQuerySpecification<?>> querySpecifications = new HashSet<IQuerySpecification<?>>();
31}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseMatcher.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseMatcher.java
new file mode 100644
index 00000000..ad79aafd
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseMatcher.java
@@ -0,0 +1,350 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api.impl;
11
12import java.util.Collection;
13import java.util.List;
14import java.util.Optional;
15import java.util.Set;
16import java.util.function.Consumer;
17import java.util.stream.Collectors;
18import java.util.stream.Stream;
19
20import tools.refinery.viatra.runtime.api.IPatternMatch;
21import tools.refinery.viatra.runtime.api.IQuerySpecification;
22import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
23import tools.refinery.viatra.runtime.api.ViatraQueryMatcher;
24import tools.refinery.viatra.runtime.internal.apiimpl.QueryResultWrapper;
25import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
26import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
27import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
28import tools.refinery.viatra.runtime.matchers.util.Preconditions;
29
30/**
31 * Base implementation of ViatraQueryMatcher.
32 *
33 * @author Bergmann Gábor
34 *
35 * @param <Match>
36 */
37public abstract class BaseMatcher<Match extends IPatternMatch> extends QueryResultWrapper implements ViatraQueryMatcher<Match> {
38
39 // FIELDS AND CONSTRUCTOR
40
41 protected ViatraQueryEngine engine;
42 protected IQuerySpecification<? extends BaseMatcher<Match>> querySpecification;
43 private IMatcherCapability capabilities;
44
45 /**
46 * @since 1.4
47 */
48 public BaseMatcher(IQuerySpecification<? extends BaseMatcher<Match>> querySpecification) {
49 this.querySpecification = querySpecification;
50 this.querySpecification.getInternalQueryRepresentation().ensureInitialized();
51 }
52
53 /**
54 * @since 1.4
55 */
56 @Override
57 protected
58 void setBackend(ViatraQueryEngine engine, IQueryResultProvider resultProvider, IMatcherCapability capabilities){
59 this.backend = resultProvider;
60 this.engine = engine;
61 this.capabilities = capabilities;
62 }
63
64 // ARRAY-BASED INTERFACE
65
66 /** Converts the array representation of a pattern match to an immutable Match object. */
67 protected abstract Match arrayToMatch(Object[] parameters);
68 /** Converts the array representation of a pattern match to a mutable Match object. */
69 protected abstract Match arrayToMatchMutable(Object[] parameters);
70
71 /** Converts the Match object of a pattern match to the array representation. */
72 protected Object[] matchToArray(Match partialMatch) {
73 return partialMatch.toArray();
74 }
75 // TODO make me public for performance reasons
76 protected abstract Match tupleToMatch(Tuple t);
77
78 private Object[] fEmptyArray;
79
80 protected Object[] emptyArray() {
81 if (fEmptyArray == null)
82 fEmptyArray = new Object[getSpecification().getParameterNames().size()];
83 return fEmptyArray;
84 }
85
86 // REFLECTION
87
88 @Override
89 public Integer getPositionOfParameter(String parameterName) {
90 return getSpecification().getPositionOfParameter(parameterName);
91 }
92
93 @Override
94 public List<String> getParameterNames() {
95 return getSpecification().getParameterNames();
96 }
97
98 // BASE IMPLEMENTATION
99
100 @Override
101 public Collection<Match> getAllMatches() {
102 return rawStreamAllMatches(emptyArray()).collect(Collectors.toSet());
103 }
104
105 @Override
106 public Stream<Match> streamAllMatches() {
107 return rawStreamAllMatches(emptyArray());
108 }
109
110 /**
111 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
112 *
113 * @param parameters
114 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
115 * @pre size of input array must be equal to the number of parameters.
116 * @return matches represented as a Match object.
117 * @since 2.0
118 */
119 protected Stream<Match> rawStreamAllMatches(Object[] parameters) {
120 // clones the tuples into a match object to protect the Tuples from modifications outside of the ReteMatcher
121 return backend.getAllMatches(parameters).map(this::tupleToMatch);
122 }
123
124 @Override
125 public Collection<Match> getAllMatches(Match partialMatch) {
126 return rawStreamAllMatches(partialMatch.toArray()).collect(Collectors.toSet());
127 }
128
129 @Override
130 public Stream<Match> streamAllMatches(Match partialMatch) {
131 return rawStreamAllMatches(partialMatch.toArray());
132 }
133
134 // with input binding as pattern-specific parameters: not declared in interface
135
136 @Override
137 public Optional<Match> getOneArbitraryMatch() {
138 return rawGetOneArbitraryMatch(emptyArray());
139 }
140
141 /**
142 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
143 * Neither determinism nor randomness of selection is guaranteed.
144 *
145 * @param parameters
146 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
147 * @pre size of input array must be equal to the number of parameters.
148 * @return a match represented as a Match object, or null if no match is found.
149 * @since 2.0
150 */
151 protected Optional<Match> rawGetOneArbitraryMatch(Object[] parameters) {
152 return backend.getOneArbitraryMatch(parameters).map(this::tupleToMatch);
153 }
154
155 @Override
156 public Optional<Match> getOneArbitraryMatch(Match partialMatch) {
157 return rawGetOneArbitraryMatch(partialMatch.toArray());
158 }
159
160 // with input binding as pattern-specific parameters: not declared in interface
161
162 /**
163 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, under
164 * any possible substitution of the unspecified parameters.
165 *
166 * @param parameters
167 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
168 * @return true if the input is a valid (partial) match of the pattern.
169 */
170 protected boolean rawHasMatch(Object[] parameters) {
171 return backend.hasMatch(parameters);
172 }
173
174 @Override
175 public boolean hasMatch() {
176 return rawHasMatch(emptyArray());
177 }
178
179 @Override
180 public boolean hasMatch(Match partialMatch) {
181 return rawHasMatch(partialMatch.toArray());
182 }
183
184 // with input binding as pattern-specific parameters: not declared in interface
185
186 @Override
187 public int countMatches() {
188 return rawCountMatches(emptyArray());
189 }
190
191 /**
192 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
193 *
194 * @param parameters
195 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
196 * @pre size of input array must be equal to the number of parameters.
197 * @return the number of pattern matches found.
198 */
199 protected int rawCountMatches(Object[] parameters) {
200 return backend.countMatches(parameters);
201 }
202
203 @Override
204 public int countMatches(Match partialMatch) {
205 return rawCountMatches(partialMatch.toArray());
206 }
207
208 // with input binding as pattern-specific parameters: not declared in interface
209
210 /**
211 * Executes the given processor on each match of the pattern that conforms to the given fixed values of some
212 * parameters.
213 *
214 * @param parameters
215 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
216 * @pre size of input array must be equal to the number of parameters.
217 * @param action
218 * the action that will process each pattern match.
219 * @since 2.0
220 */
221 protected void rawForEachMatch(Object[] parameters, Consumer<? super Match> processor) {
222 backend.getAllMatches(parameters).map(this::tupleToMatch).forEach(processor);
223 }
224
225 @Override
226 public void forEachMatch(Consumer<? super Match> processor) {
227 rawForEachMatch(emptyArray(), processor);
228 }
229
230 @Override
231 public void forEachMatch(Match match, Consumer<? super Match> processor) {
232 rawForEachMatch(match.toArray(), processor);
233 }
234
235 // with input binding as pattern-specific parameters: not declared in interface
236
237 @Override
238 public boolean forOneArbitraryMatch(Consumer<? super Match> processor) {
239 return rawForOneArbitraryMatch(emptyArray(), processor);
240 }
241
242 @Override
243 public boolean forOneArbitraryMatch(Match partialMatch, Consumer<? super Match> processor) {
244 return rawForOneArbitraryMatch(partialMatch.toArray(), processor);
245 }
246
247 /**
248 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed
249 * values of some parameters. Neither determinism nor randomness of selection is guaranteed.
250 *
251 * @param parameters
252 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
253 * @pre size of input array must be equal to the number of parameters.
254 * @param processor
255 * the action that will process the selected match.
256 * @return true if the pattern has at least one match with the given parameter values, false if the processor was
257 * not invoked
258 * @since 2.0
259 */
260 protected boolean rawForOneArbitraryMatch(Object[] parameters, Consumer<? super Match> processor) {
261 return backend.getOneArbitraryMatch(parameters).map(this::tupleToMatch).map(m -> {
262 processor.accept(m);
263 return true;
264 }).orElse(false);
265 }
266
267 // with input binding as pattern-specific parameters: not declared in interface
268
269
270 @Override
271 public Match newEmptyMatch() {
272 return arrayToMatchMutable(new Object[getParameterNames().size()]);
273 }
274
275 @Override
276 public Match newMatch(Object... parameters) {
277 return arrayToMatch(parameters);
278 }
279
280 @Override
281 public Set<Object> getAllValues(final String parameterName) {
282 return rawStreamAllValues(getPositionOfParameter(parameterName), emptyArray()).collect(Collectors.toSet());
283 }
284
285 @Override
286 public Set<Object> getAllValues(final String parameterName, Match partialMatch) {
287 return rawStreamAllValues(getPositionOfParameter(parameterName), partialMatch.toArray()).collect(Collectors.toSet());
288 }
289
290 /**
291 * Retrieve a stream of values that occur in matches for the given parameterName, that conforms to the given fixed
292 * values of some parameters.
293 *
294 * @param position
295 * position of the parameter for which values are returned
296 * @param parameters
297 * a parameter array corresponding to a partial match of the pattern where each non-null field binds the
298 * corresponding pattern parameter to a fixed value.
299 * @return the stream of all values in the given position
300 * @throws IllegalArgumentException
301 * if length of parameters array does not equal to number of parameters
302 * @throws IndexOutOfBoundsException
303 * if position is not appropriate for the current parameter size
304 * @since 2.0
305 */
306 protected Stream<Object> rawStreamAllValues(final int position, Object[] parameters) {
307 Preconditions.checkElementIndex(position, getParameterNames().size());
308 Preconditions.checkArgument(parameters.length == getParameterNames().size());
309 return rawStreamAllMatches(parameters).map(match -> match.get(position));
310 }
311
312 /**
313 * Uses an existing set to accumulate all values of the parameter with the given name. Since it is a protected
314 * method, no error checking or input validation is performed!
315 *
316 * @param position
317 * position of the parameter for which values are returned
318 * @param parameters
319 * a parameter array corresponding to a partial match of the pattern where each non-null field binds the
320 * corresponding pattern parameter to a fixed value.
321 * @param accumulator
322 * the existing set to fill with the values
323 */
324 @SuppressWarnings("unchecked")
325 protected <T> void rawAccumulateAllValues(final int position, Object[] parameters, final Set<T> accumulator) {
326 rawForEachMatch(parameters, match -> accumulator.add((T) match.get(position)));
327 }
328
329 @Override
330 public ViatraQueryEngine getEngine() {
331 return engine;
332 }
333
334 @Override
335 public IQuerySpecification<? extends BaseMatcher<Match>> getSpecification() {
336 return querySpecification;
337 }
338
339 @Override
340 public String getPatternName() {
341 return querySpecification.getFullyQualifiedName();
342 }
343
344 /**
345 * @since 1.4
346 */
347 public IMatcherCapability getCapabilities() {
348 return capabilities;
349 }
350}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BasePatternMatch.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BasePatternMatch.java
new file mode 100644
index 00000000..182bb466
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BasePatternMatch.java
@@ -0,0 +1,91 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api.impl;
11
12import tools.refinery.viatra.runtime.api.IPatternMatch;
13
14import java.util.Arrays;
15import java.util.Collections;
16import java.util.List;
17
18/**
19 * Base implementation of IPatternMatch.
20 *
21 * @author Bergmann Gábor
22 *
23 */
24public abstract class BasePatternMatch implements IPatternMatch {
25
26 @SafeVarargs
27 protected static <T> List<T> makeImmutableList(T... elements) {
28 return Collections.unmodifiableList(Arrays.asList(elements));
29 }
30
31 public static String prettyPrintValue(Object o) {
32 if (o == null) {
33 return "(null)";
34 }
35 return o.toString();
36 }
37
38 // TODO performance can be improved here somewhat
39
40 @Override
41 public Object get(int position) {
42 if (position >= 0 && position < parameterNames().size())
43 return get(parameterNames().get(position));
44 else
45 return null;
46 }
47
48 @Override
49 public boolean set(int position, Object newValue) {
50 if (!isMutable()) throw new UnsupportedOperationException();
51 if (position >= 0 && position < parameterNames().size()) {
52 return set(parameterNames().get(position), newValue);
53 } else {
54 return false;
55 }
56 }
57
58 @Override
59 public String toString() {
60 return "Match<" + patternName() + ">{" + prettyPrint() + "}";
61 }
62
63 @Override
64 public boolean isCompatibleWith(IPatternMatch other) {
65 if(other == null) {
66 return true;
67 }
68 // we assume that the pattern is set for this match!
69 if (!specification().equals(other.specification())) {
70 return false;
71 }
72 for (int i = 0; i < parameterNames().size(); i++) {
73 Object value = get(i);
74 Object otherValue = other.get(i);
75 if(value != null && otherValue != null && !value.equals(otherValue)) {
76 return false;
77 }
78 }
79 return true;
80 }
81
82 @Override
83 public String patternName() {
84 return specification().getFullyQualifiedName();
85 }
86
87 @Override
88 public List<String> parameterNames() {
89 return specification().getParameterNames();
90 }
91}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQueryGroup.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQueryGroup.java
new file mode 100644
index 00000000..b92727e7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQueryGroup.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Mark Czotter, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.impl;
10
11import tools.refinery.viatra.runtime.api.AdvancedViatraQueryEngine;
12import tools.refinery.viatra.runtime.api.IQueryGroup;
13import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
14
15/**
16 * Base implementation of {@link IQueryGroup}.
17 *
18 * @author Mark Czotter
19 *
20 */
21public abstract class BaseQueryGroup implements IQueryGroup {
22
23 @Override
24 public void prepare(ViatraQueryEngine engine) {
25 prepare(AdvancedViatraQueryEngine.from(engine));
26 }
27
28 protected void prepare(AdvancedViatraQueryEngine engine) {
29 engine.prepareGroup(this, null /* default options */);
30 }
31
32
33}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQuerySpecification.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQuerySpecification.java
new file mode 100644
index 00000000..bee4b93d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/impl/BaseQuerySpecification.java
@@ -0,0 +1,147 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.api.impl;
11
12import java.util.List;
13import java.util.Optional;
14import java.util.stream.Collectors;
15
16import tools.refinery.viatra.runtime.api.IPatternMatch;
17import tools.refinery.viatra.runtime.api.IQuerySpecification;
18import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
19import tools.refinery.viatra.runtime.api.ViatraQueryMatcher;
20import tools.refinery.viatra.runtime.exception.ViatraQueryException;
21import tools.refinery.viatra.runtime.matchers.psystem.annotations.PAnnotation;
22import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
23import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
24import tools.refinery.viatra.runtime.matchers.psystem.queries.QueryInitializationException;
25import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery.PQueryStatus;
26import tools.refinery.viatra.runtime.matchers.psystem.queries.PVisibility;
27
28/**
29 * Base implementation of IQuerySpecification.
30 *
31 * @author Gabor Bergmann
32 *
33 */
34public abstract class BaseQuerySpecification<Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> implements
35 IQuerySpecification<Matcher> {
36
37 /**
38 * @since 1.6
39 */
40 protected static ViatraQueryException processInitializerError(ExceptionInInitializerError err) {
41 Throwable cause1 = err.getCause();
42 if (cause1 instanceof RuntimeException) {
43 Throwable cause2 = ((RuntimeException) cause1).getCause();
44 if (cause2 instanceof ViatraQueryException) {
45 return (ViatraQueryException) cause2;
46 } else if (cause2 instanceof QueryInitializationException) {
47 return new ViatraQueryException((QueryInitializationException) cause2);
48 }
49 }
50 throw err;
51 }
52 protected final PQuery wrappedPQuery;
53
54 protected abstract Matcher instantiate(ViatraQueryEngine engine);
55
56 /**
57 * For backward compatibility of code generated with previous versions of viatra query, this method has a default
58 * implementation returning null, indicating that a matcher can only be created using the old method, which ignores
59 * the hints provided by the user.
60 *
61 * @since 1.4
62 */
63 @Override
64 public Matcher instantiate() {
65 return null;
66 }
67
68
69 /**
70 * Instantiates query specification for the given internal query representation.
71 */
72 public BaseQuerySpecification(PQuery wrappedPQuery) {
73 super();
74 this.wrappedPQuery = wrappedPQuery;
75 wrappedPQuery.publishedAs().add(this);
76 }
77
78
79 @Override
80 public PQuery getInternalQueryRepresentation() {
81 return wrappedPQuery;
82 }
83
84 @Override
85 public Matcher getMatcher(ViatraQueryEngine engine) {
86 ensureInitializedInternal();
87 if (wrappedPQuery.getStatus() == PQueryStatus.ERROR) {
88 String errorMessages = wrappedPQuery.getPProblems().stream()
89 .map(input -> (input == null) ? "" : input.getShortMessage()).collect(Collectors.joining("\n"));
90 throw new ViatraQueryException(String.format("Erroneous query specification: %s %n %s", getFullyQualifiedName(), errorMessages),
91 "Cannot initialize matchers on erroneous query specifications.");
92 } else if (!engine.getScope().isCompatibleWithQueryScope(this.getPreferredScopeClass())) {
93 throw new ViatraQueryException(
94 String.format(
95 "Scope class incompatibility: the query %s is formulated over query scopes of class %s, "
96 + " thus the query engine formulated over scope %s of class %s cannot evaluate it.",
97 this.getFullyQualifiedName(), this.getPreferredScopeClass().getCanonicalName(),
98 engine.getScope(), engine.getScope().getClass().getCanonicalName()),
99 "Incompatible scope classes of engine and query.");
100 }
101 return instantiate(engine);
102 }
103
104 protected void ensureInitializedInternal() {
105 wrappedPQuery.ensureInitialized();
106 }
107
108 // // DELEGATIONS
109
110 @Override
111 public List<PAnnotation> getAllAnnotations() {
112 return wrappedPQuery.getAllAnnotations();
113 }
114 @Override
115 public List<PAnnotation> getAnnotationsByName(String annotationName) {
116 return wrappedPQuery.getAnnotationsByName(annotationName);
117 }
118 @Override
119 public Optional<PAnnotation> getFirstAnnotationByName(String annotationName) {
120 return wrappedPQuery.getFirstAnnotationByName(annotationName);
121 }
122 @Override
123 public String getFullyQualifiedName() {
124 return wrappedPQuery.getFullyQualifiedName();
125 }
126 @Override
127 public List<String> getParameterNames() {
128 return wrappedPQuery.getParameterNames();
129 }
130 @Override
131 public List<PParameter> getParameters() {
132 return wrappedPQuery.getParameters();
133 }
134 @Override
135 public Integer getPositionOfParameter(String parameterName) {
136 return wrappedPQuery.getPositionOfParameter(parameterName);
137 }
138
139 /**
140 * @since 2.0
141 */
142 @Override
143 public PVisibility getVisibility() {
144 return wrappedPQuery.getVisibility();
145 }
146
147}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IBaseIndex.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IBaseIndex.java
new file mode 100644
index 00000000..1795a8ef
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IBaseIndex.java
@@ -0,0 +1,91 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.scope;
10
11import java.lang.reflect.InvocationTargetException;
12import java.util.concurrent.Callable;
13
14/**
15 * Represents the index maintained on the model.
16 * @author Bergmann Gabor
17 * @since 0.9
18 *
19 */
20public interface IBaseIndex {
21 // TODO lightweightObserver?
22 // TODO ViatraBaseIndexChangeListener?
23
24 /**
25 * The given callback will be executed, and all model traversals and index registrations will be delayed until the
26 * execution is done. If there are any outstanding feature, class or datatype registrations, a single coalesced model
27 * traversal will initialize the caches and deliver the notifications.
28 *
29 * @param callable
30 */
31 public <V> V coalesceTraversals(Callable<V> callable) throws InvocationTargetException;
32
33 /**
34 * Adds a coarse-grained listener that will be invoked after the NavigationHelper index or the underlying model is changed. Can be used
35 * e.g. to check model contents. Not intended for general use.
36 *
37 * <p/> See {@link #removeBaseIndexChangeListener(ViatraBaseIndexChangeListener)}
38 * @param listener
39 */
40 public void addBaseIndexChangeListener(ViatraBaseIndexChangeListener listener);
41
42 /**
43 * Removes a registered listener.
44 *
45 * <p/> See {@link #addBaseIndexChangeListener(ViatraBaseIndexChangeListener)}
46 *
47 * @param listener
48 */
49 public void removeBaseIndexChangeListener(ViatraBaseIndexChangeListener listener);
50
51 /**
52 * Updates the value of indexed derived features that are not well-behaving.
53 */
54 void resampleDerivedFeatures();
55
56 /**
57 * Adds a listener for internal errors in the index. A listener can only be added once.
58 * @param listener
59 * @returns true if the listener was not already added
60 * @since 0.8.0
61 */
62 boolean addIndexingErrorListener(IIndexingErrorListener listener);
63 /**
64 * Removes a listener for internal errors in the index
65 * @param listener
66 * @returns true if the listener was successfully removed (e.g. it did exist)
67 * @since 0.8.0
68 */
69 boolean removeIndexingErrorListener(IIndexingErrorListener listener);
70
71 /**
72 * Register a lightweight observer that is notified if any edge starting at the given Object changes.
73 *
74 * @param observer the listener instance
75 * @param observedObject the observed instance object
76 * @return false if no observer can be registered for the given instance (e.g. it is a primitive),
77 * or observer was already registered (call has no effect)
78 */
79 public boolean addInstanceObserver(IInstanceObserver observer, Object observedObject);
80
81 /**
82 * Unregisters a lightweight observer for the given Object.
83 *
84 * @param observer the listener instance
85 * @param observedObject the observed instance object
86 * @return false if no observer can be registered for the given instance (e.g. it is a primitive),
87 * or no observer was registered previously (call has no effect)
88 */
89 public boolean removeInstanceObserver(IInstanceObserver observer, Object observedObject);
90
91}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IEngineContext.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IEngineContext.java
new file mode 100644
index 00000000..55060853
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IEngineContext.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.scope;
10
11import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
12import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
13
14/**
15 * The context of the engine is instantiated by the scope,
16 * and provides information and services regarding the model the towards the engine.
17 *
18 * @author Bergmann Gabor
19 *
20 */
21public interface IEngineContext {
22
23 /**
24 * Returns the base index.
25 * @throws ViatraQueryRuntimeException if the base index cannot be accessed
26 */
27 IBaseIndex getBaseIndex();
28
29 /**
30 * Disposes this context object. Resources in the index may now be freed up.
31 * No more methods should be called after this one.
32 *
33 * @throws IllegalStateException if there are any active listeners to the underlying index
34 */
35 void dispose();
36
37 /**
38 * Provides instance model information for pattern matching.
39 *
40 * <p> Implementors note: must be reentrant.
41 * If called while index loading is already in progress, must return the single runtime context instance that will eventually index the model.
42 * When the runtime query context is invoked in such a case, incomplete indexes are tolerable, but change notifications must be correctly provided as loading commences.
43 *
44 * @return a runtime context for pattern matching
45 * @since 1.2
46 * @throws ViatraQueryRuntimeException if the runtime context cannot be initialized
47 */
48 public IQueryRuntimeContext getQueryRuntimeContext();
49} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IIndexingErrorListener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IIndexingErrorListener.java
new file mode 100644
index 00000000..f61a5edb
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IIndexingErrorListener.java
@@ -0,0 +1,23 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.scope;
10
11/**
12 *
13 * This interface contains callbacks for various internal errors from the {@link NavigationHelper base index}.
14 *
15 * @author Zoltan Ujhelyi
16 * @since 0.9
17 *
18 */
19public interface IIndexingErrorListener {
20
21 void error(String description, Throwable t);
22 void fatal(String description, Throwable t);
23}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IInstanceObserver.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IInstanceObserver.java
new file mode 100644
index 00000000..8ef29cbe
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/IInstanceObserver.java
@@ -0,0 +1,21 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.scope;
10
11
12/**
13 * Listener interface for lightweight observation of changes in edges leaving from given source instance elements.
14 * @author Bergmann Gabor
15 * @since 0.9
16 *
17 */
18public interface IInstanceObserver {
19 void notifyBinaryChanged(Object sourceElement, Object edgeType);
20 void notifyTernaryChanged(Object sourceElement, Object edgeType);
21}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/QueryScope.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/QueryScope.java
new file mode 100644
index 00000000..5456b9ea
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/QueryScope.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.scope;
10
11import tools.refinery.viatra.runtime.api.IQuerySpecification;
12import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
13import tools.refinery.viatra.runtime.internal.apiimpl.EngineContextFactory;
14
15/**
16 * Defines a scope for a VIATRA Query engine, which determines the set of model elements that query evaluation operates on.
17 *
18 * @author Bergmann Gabor
19 *
20 */
21public abstract class QueryScope extends EngineContextFactory {
22
23 /**
24 * Determines whether a query engine initialized on this scope can evaluate queries formulated against the given scope type.
25 * <p> Every query scope class is compatible with a query engine initialized on a scope of the same class or a subclass.
26 * @param queryScopeClass the scope class returned by invoking {@link IQuerySpecification#getPreferredScopeClass()} on a query specification
27 * @return true if an {@link ViatraQueryEngine} initialized on this scope can consume an {@link IQuerySpecification}
28 */
29 public boolean isCompatibleWithQueryScope(Class<? extends QueryScope> queryScopeClass) {
30 return queryScopeClass.isAssignableFrom(this.getClass());
31 }
32
33}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/ViatraBaseIndexChangeListener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/ViatraBaseIndexChangeListener.java
new file mode 100644
index 00000000..b746e637
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/api/scope/ViatraBaseIndexChangeListener.java
@@ -0,0 +1,34 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.api.scope;
10
11/**
12 * Listener interface for change notifications from the VIATRA Base index.
13 *
14 * @author Abel Hegedus
15 * @since 0.9
16 *
17 */
18public interface ViatraBaseIndexChangeListener {
19
20 /**
21 * NOTE: it is possible that this method is called only ONCE! Consider returning a constant value that is set in the constructor.
22 *
23 * @return true, if the listener should be notified only after index changes, false if notification is needed after each model change
24 */
25 public boolean onlyOnIndexChange();
26
27 /**
28 * Called after a model change is handled by the VIATRA Base index and if <code>indexChanged == onlyOnIndexChange()</code>.
29 *
30 * @param indexChanged true, if the model change also affected the contents of the base index
31 */
32 public void notifyChanged(boolean indexChanged);
33
34}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/exception/ViatraQueryException.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/exception/ViatraQueryException.java
new file mode 100644
index 00000000..fec547a6
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/exception/ViatraQueryException.java
@@ -0,0 +1,71 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Akos Horvath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.exception;
10
11import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
12import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
13import tools.refinery.viatra.runtime.matchers.psystem.queries.QueryInitializationException;
14
15/**
16 * A general VIATRA Query-related problem during the operation of the VIATRA Query
17 * engine, or the loading, manipulation and evaluation of queries.
18 *
19 * @author Bergmann Gabor
20 * @since 0.9
21 *
22 */
23public class ViatraQueryException extends ViatraQueryRuntimeException {
24
25 private static final long serialVersionUID = -74252748358355750L;
26
27 public static final String PARAM_NOT_SUITABLE_WITH_NO = "The type of the parameters are not suitable for the operation. Parameter number: ";
28 public static final String CONVERSION_FAILED = "Could not convert the term to the designated type";
29 public static final String CONVERT_NULL_PARAMETER = "Could not convert null to the designated type";
30 public static final String RELATIONAL_PARAM_UNSUITABLE = "The parameters are not acceptable by the operation";
31 /**
32 * @since 0.9
33 */
34 public static final String PROCESSING_PROBLEM = "The following error occurred during the processing of a query (e.g. for the preparation of a VIATRA pattern matcher)";
35 /**
36 * @since 0.9
37 */
38 public static final String QUERY_INIT_PROBLEM = "The following error occurred during the initialization of a VIATRA query specification";
39 public static final String GETNAME_FAILED = "Could not get 'name' attribute of the result";
40
41 public static final String INVALID_EMFROOT = "Incremental EMF query engine can only be attached on the contents of an EMF EObject, Resource, ResourceSet or multiple ResourceSets. Received instead: ";
42 public static final String INVALID_EMFROOT_SHORT = "Invalid EMF model root";
43 // public static final String EMF_MODEL_PROCESSING_ERROR = "Error while processing the EMF model";
44
45 private final String shortMessage;
46
47 public ViatraQueryException(String s, String shortMessage) {
48 super(s);
49 this.shortMessage = shortMessage;
50 }
51
52 public ViatraQueryException(QueryProcessingException e) {
53 super(PROCESSING_PROBLEM + ": " + e.getMessage(), e);
54 this.shortMessage = e.getShortMessage();
55 }
56
57 public ViatraQueryException(QueryInitializationException e) {
58 super(QUERY_INIT_PROBLEM + ": " + e.getMessage(), e);
59 this.shortMessage = e.getShortMessage();
60 }
61
62 public ViatraQueryException(String s, String shortMessage, Throwable e) {
63 super(s + ": " + e.getMessage(), e);
64 this.shortMessage = shortMessage;
65 }
66
67 public String getShortMessage() {
68 return shortMessage;
69 }
70
71}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/EngineContextFactory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/EngineContextFactory.java
new file mode 100644
index 00000000..bed07ebf
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/EngineContextFactory.java
@@ -0,0 +1,24 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.internal.apiimpl;
10
11import org.apache.log4j.Logger;
12import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
13import tools.refinery.viatra.runtime.api.scope.IEngineContext;
14import tools.refinery.viatra.runtime.api.scope.IIndexingErrorListener;
15
16/**
17 * Internal interface for a Scope to reveal model contents to the engine.
18 *
19 * @author Bergmann Gabor
20 *
21 */
22public abstract class EngineContextFactory {
23 protected abstract IEngineContext createEngineContext(ViatraQueryEngine engine, IIndexingErrorListener errorListener, Logger logger);
24}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/QueryResultWrapper.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/QueryResultWrapper.java
new file mode 100644
index 00000000..47f3268d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/QueryResultWrapper.java
@@ -0,0 +1,32 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.internal.apiimpl;
10
11import tools.refinery.viatra.runtime.api.ViatraQueryEngine;
12import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
13import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
14
15/**
16 * Internal class for wrapping a query result providing backend. It's only supported usage is by the
17 * {@link ViatraQueryEngineImpl} class.
18 * </p>
19 *
20 * <strong>Important note</strong>: this class must not introduce any public method, as it will be visible through
21 * BaseMatcher as an API, although this class is not an API itself.
22 *
23 * @author Bergmann Gabor
24 *
25 */
26public abstract class QueryResultWrapper {
27
28 protected IQueryResultProvider backend;
29
30 protected abstract void setBackend(ViatraQueryEngine engine, IQueryResultProvider resultProvider, IMatcherCapability capabilities);
31
32}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/ViatraQueryEngineImpl.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/ViatraQueryEngineImpl.java
new file mode 100644
index 00000000..5317a79e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/apiimpl/ViatraQueryEngineImpl.java
@@ -0,0 +1,714 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10
11package tools.refinery.viatra.runtime.internal.apiimpl;
12
13import org.apache.log4j.Logger;
14import tools.refinery.viatra.runtime.api.*;
15import tools.refinery.viatra.runtime.api.impl.BaseMatcher;
16import tools.refinery.viatra.runtime.api.scope.IBaseIndex;
17import tools.refinery.viatra.runtime.api.scope.IEngineContext;
18import tools.refinery.viatra.runtime.api.scope.IIndexingErrorListener;
19import tools.refinery.viatra.runtime.api.scope.QueryScope;
20import tools.refinery.viatra.runtime.exception.ViatraQueryException;
21import tools.refinery.viatra.runtime.internal.engine.LifecycleProvider;
22import tools.refinery.viatra.runtime.internal.engine.ModelUpdateProvider;
23import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
24import tools.refinery.viatra.runtime.matchers.backend.*;
25import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
26import tools.refinery.viatra.runtime.matchers.context.IQueryCacheContext;
27import tools.refinery.viatra.runtime.matchers.context.IQueryResultProviderAccess;
28import tools.refinery.viatra.runtime.matchers.context.IQueryRuntimeContext;
29import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
30import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
31import tools.refinery.viatra.runtime.matchers.psystem.queries.PQueries;
32import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
33import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery.PQueryStatus;
34import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
35import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
36import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
37import tools.refinery.viatra.runtime.matchers.util.Preconditions;
38import tools.refinery.viatra.runtime.util.ViatraQueryLoggingUtil;
39
40import java.lang.ref.WeakReference;
41import java.lang.reflect.InvocationTargetException;
42import java.util.*;
43import java.util.concurrent.Callable;
44import java.util.function.Supplier;
45import java.util.stream.Collectors;
46
47import static tools.refinery.viatra.runtime.matchers.util.Preconditions.checkArgument;
48
49/**
50 * A VIATRA Query engine back-end (implementation)
51 *
52 * @author Bergmann Gábor
53 */
54public final class ViatraQueryEngineImpl extends AdvancedViatraQueryEngine
55 implements IQueryBackendHintProvider, IQueryCacheContext, IQueryResultProviderAccess {
56
57 /**
58 *
59 */
60 private static final String ERROR_ACCESSING_BACKEND = "Error while accessing query evaluator backend";
61 /**
62 *
63 */
64 private static final String QUERY_ON_DISPOSED_ENGINE_MESSAGE = "Cannot evaluate query on disposed engine!";
65 /**
66 * The engine manager responsible for this engine. Null if this engine is unmanaged.
67 */
68 private final ViatraQueryEngineManager manager;
69 /**
70 * The model to which the engine is attached.
71 */
72 private final QueryScope scope;
73
74 /**
75 * The context of the engine, provided by the scope.
76 */
77 private IEngineContext engineContext;
78
79 /**
80 * Initialized matchers for each query
81 */
82 private final IMultiLookup<IQuerySpecification<? extends ViatraQueryMatcher<?>>, ViatraQueryMatcher<?>> matchers =
83 CollectionsFactory.createMultiLookup(Object.class, MemoryType.SETS, Object.class);
84
85 /**
86 * The RETE and other pattern matcher implementations of the VIATRA Query Engine.
87 */
88 private volatile Map<IQueryBackendFactory, IQueryBackend> queryBackends = new HashMap<>();
89
90 /**
91 * The current engine default hints
92 */
93 private final ViatraQueryEngineOptions engineOptions;
94
95 /**
96 * Common query analysis provided to backends
97 */
98 private QueryAnalyzer queryAnalyzer;
99
100 /**
101 * true if message delivery is currently delayed, false otherwise
102 */
103 private boolean delayMessageDelivery = true;
104
105 private final LifecycleProvider lifecycleProvider;
106 private final ModelUpdateProvider modelUpdateProvider;
107 private Logger logger;
108 private boolean disposed = false;
109
110 /**
111 * @param manager
112 * null if unmanaged
113 * @param scope
114 * @param engineDefaultHint
115 * @since 1.4
116 */
117 public ViatraQueryEngineImpl(ViatraQueryEngineManager manager, QueryScope scope,
118 ViatraQueryEngineOptions engineOptions) {
119 super();
120 this.manager = manager;
121 this.scope = scope;
122 this.lifecycleProvider = new LifecycleProvider(this, getLogger());
123 this.modelUpdateProvider = new ModelUpdateProvider(this, getLogger());
124 this.engineContext = scope.createEngineContext(this, taintListener, getLogger());
125
126 if (engineOptions != null) {
127 this.engineOptions = engineOptions;
128 } else {
129 this.engineOptions = ViatraQueryEngineOptions.getDefault();
130 }
131
132 }
133
134 /**
135 * @param manager
136 * null if unmanaged
137 * @param scope
138 * @param engineDefaultHint
139 */
140 public ViatraQueryEngineImpl(ViatraQueryEngineManager manager, QueryScope scope) {
141 this(manager, scope, ViatraQueryEngineOptions.getDefault());
142 }
143
144 @Override
145 public boolean isUpdatePropagationDelayed() {
146 return this.delayMessageDelivery;
147 }
148
149 @Override
150 public <V> V delayUpdatePropagation(Callable<V> callable) throws InvocationTargetException {
151 if (!delayMessageDelivery) {
152 throw new IllegalStateException("Trying to delay propagation while changes are being flushed");
153 }
154 try {
155 return callable.call();
156 } catch (Exception e) {
157 throw new InvocationTargetException(e);
158 }
159 }
160
161 @Override
162 public void flushChanges() {
163 if (!delayMessageDelivery) {
164 throw new IllegalStateException("Trying to flush changes while changes are already being flushed");
165 }
166 delayMessageDelivery = false;
167 try {
168 flushAllBackends();
169 } finally {
170 delayMessageDelivery = true;
171 }
172 }
173
174 private void flushAllBackends() {
175 for (IQueryBackend backend : this.queryBackends.values()) {
176 backend.flushUpdates();
177 }
178 }
179
180 @Override
181 public <T> T withFlushingChanges(Supplier<T> callback) {
182 if (!delayMessageDelivery) {
183 return callback.get();
184 }
185 delayMessageDelivery = false;
186 try {
187 flushAllBackends();
188 return callback.get();
189 } finally {
190 delayMessageDelivery = true;
191 }
192 }
193
194 @Override
195 public Set<? extends ViatraQueryMatcher<? extends IPatternMatch>> getCurrentMatchers() {
196 return matchers.distinctValuesStream().collect(Collectors.toSet());
197 }
198
199 @Override
200 public <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getMatcher(
201 IQuerySpecification<Matcher> querySpecification) {
202 return getMatcher(querySpecification, null);
203 }
204
205 @Override
206 public <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getMatcher(
207 IQuerySpecification<Matcher> querySpecification, QueryEvaluationHint optionalEvaluationHints) {
208 return withFlushingChanges(() -> {
209 IMatcherCapability capability = getRequestedCapability(querySpecification, optionalEvaluationHints);
210 Matcher matcher = doGetExistingMatcher(querySpecification, capability);
211 if (matcher != null) {
212 return matcher;
213 }
214 matcher = querySpecification.instantiate();
215
216 BaseMatcher<?> baseMatcher = (BaseMatcher<?>) matcher;
217 ((QueryResultWrapper) baseMatcher).setBackend(this,
218 getResultProvider(querySpecification, optionalEvaluationHints), capability);
219 internalRegisterMatcher(querySpecification, baseMatcher);
220 return matcher;
221 });
222 }
223
224 @Override
225 public <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getExistingMatcher(
226 IQuerySpecification<Matcher> querySpecification) {
227 return getExistingMatcher(querySpecification, null);
228 }
229
230 @Override
231 public <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher getExistingMatcher(
232 IQuerySpecification<Matcher> querySpecification, QueryEvaluationHint optionalOverrideHints) {
233 return doGetExistingMatcher(querySpecification, getRequestedCapability(querySpecification, optionalOverrideHints));
234 }
235
236 @SuppressWarnings("unchecked")
237 private <Matcher extends ViatraQueryMatcher<? extends IPatternMatch>> Matcher doGetExistingMatcher(
238 IQuerySpecification<Matcher> querySpecification, IMatcherCapability requestedCapability) {
239 for (ViatraQueryMatcher<?> matcher : matchers.lookupOrEmpty(querySpecification)) {
240 BaseMatcher<?> baseMatcher = (BaseMatcher<?>) matcher;
241 if (baseMatcher.getCapabilities().canBeSubstitute(requestedCapability))
242 return (Matcher) matcher;
243 }
244 return null;
245 }
246
247 @Override
248 public ViatraQueryMatcher<? extends IPatternMatch> getMatcher(String patternFQN) {
249 throw new UnsupportedOperationException("Query specification registry is not available");
250 }
251
252 @Override
253 public IBaseIndex getBaseIndex() {
254 return engineContext.getBaseIndex();
255 }
256
257 public final Logger getLogger() {
258 if (logger == null) {
259 final int hash = System.identityHashCode(this);
260 logger = Logger.getLogger(ViatraQueryLoggingUtil.getLogger(ViatraQueryEngine.class).getName() + "." + hash);
261 if (logger == null)
262 throw new AssertionError(
263 "Configuration error: unable to create VIATRA Query runtime logger for engine " + hash);
264 }
265 return logger;
266 }
267
268 ///////////////// internal stuff //////////////
269 private void internalRegisterMatcher(IQuerySpecification<?> querySpecification, ViatraQueryMatcher<?> matcher) {
270 matchers.addPair(querySpecification, matcher);
271 lifecycleProvider.matcherInstantiated(matcher);
272 }
273
274 /**
275 * Provides access to the selected query backend component of the VIATRA Query Engine.
276 */
277 @Override
278 public IQueryBackend getQueryBackend(IQueryBackendFactory iQueryBackendFactory) {
279 IQueryBackend iQueryBackend = queryBackends.get(iQueryBackendFactory);
280 if (iQueryBackend == null) {
281 // do this first, to make sure the runtime context exists
282 final IQueryRuntimeContext queryRuntimeContext = engineContext.getQueryRuntimeContext();
283
284 // maybe the backend has been created in the meantime when the indexer was initialized and queried for
285 // derived features
286 // no need to instantiate a new backend in that case
287 iQueryBackend = queryBackends.get(iQueryBackendFactory);
288 if (iQueryBackend == null) {
289
290 // need to instantiate the backend
291 iQueryBackend = iQueryBackendFactory.create(new IQueryBackendContext() {
292
293 @Override
294 public IQueryRuntimeContext getRuntimeContext() {
295 return queryRuntimeContext;
296 }
297
298 @Override
299 public IQueryCacheContext getQueryCacheContext() {
300 return ViatraQueryEngineImpl.this;
301 }
302
303 @Override
304 public Logger getLogger() {
305 return logger;
306 }
307
308 @Override
309 public IQueryBackendHintProvider getHintProvider() {
310 return ViatraQueryEngineImpl.this;
311 }
312
313 @Override
314 public IQueryResultProviderAccess getResultProviderAccess() {
315 return ViatraQueryEngineImpl.this;
316 }
317
318 @Override
319 public QueryAnalyzer getQueryAnalyzer() {
320 if (queryAnalyzer == null)
321 queryAnalyzer = new QueryAnalyzer(queryRuntimeContext.getMetaContext());
322 return queryAnalyzer;
323 }
324
325 @Override
326 public boolean areUpdatesDelayed() {
327 return ViatraQueryEngineImpl.this.delayMessageDelivery;
328 }
329
330 @Override
331 public IMatcherCapability getRequiredMatcherCapability(PQuery query,
332 QueryEvaluationHint hint) {
333 return engineOptions.getQueryBackendFactory(hint).calculateRequiredCapability(query, hint);
334 }
335
336
337
338 });
339 queryBackends.put(iQueryBackendFactory, iQueryBackend);
340 }
341 }
342 return iQueryBackend;
343 }
344
345 ///////////////// advanced stuff /////////////
346
347 @Override
348 public void dispose() {
349 if (manager != null) {
350 throw new UnsupportedOperationException(
351 String.format("Cannot dispose() managed VIATRA Query Engine. Attempted for scope %s.", scope));
352 }
353 wipe();
354
355 this.disposed = true;
356
357 // called before base index disposal to allow removal of base listeners
358 lifecycleProvider.engineDisposed();
359
360 try {
361 engineContext.dispose();
362 } catch (IllegalStateException ex) {
363 getLogger().warn(
364 "The base index could not be disposed along with the VIATRA Query engine, as there are still active listeners on it.");
365 }
366 }
367
368 @Override
369 public void wipe() {
370 if (manager != null) {
371 throw new UnsupportedOperationException(
372 String.format("Cannot wipe() managed VIATRA Query Engine. Attempted for scope %s.", scope));
373 }
374 if (queryBackends != null) {
375 for (IQueryBackend backend : queryBackends.values()) {
376 backend.dispose();
377 }
378 queryBackends.clear();
379 }
380 matchers.clear();
381 queryAnalyzer = null;
382 lifecycleProvider.engineWiped();
383 }
384
385 /**
386 * Indicates whether the engine is in a tainted, inconsistent state.
387 */
388 private boolean tainted = false;
389 private IIndexingErrorListener taintListener = new SelfTaintListener(this);
390
391 private static class SelfTaintListener implements IIndexingErrorListener {
392 WeakReference<ViatraQueryEngineImpl> queryEngineRef;
393
394 public SelfTaintListener(ViatraQueryEngineImpl queryEngine) {
395 this.queryEngineRef = new WeakReference<ViatraQueryEngineImpl>(queryEngine);
396 }
397
398 public void engineBecameTainted(String description, Throwable t) {
399 final ViatraQueryEngineImpl queryEngine = queryEngineRef.get();
400 if (queryEngine != null) {
401 queryEngine.tainted = true;
402 queryEngine.lifecycleProvider.engineBecameTainted(description, t);
403 }
404 }
405
406 private boolean noTaintDetectedYet = true;
407
408 protected void notifyTainted(String description, Throwable t) {
409 if (noTaintDetectedYet) {
410 noTaintDetectedYet = false;
411 engineBecameTainted(description, t);
412 }
413 }
414
415 @Override
416 public void error(String description, Throwable t) {
417 // Errors does not mean tainting
418 }
419
420 @Override
421 public void fatal(String description, Throwable t) {
422 notifyTainted(description, t);
423 }
424 }
425
426 @Override
427 public boolean isTainted() {
428 return tainted;
429 }
430
431 @Override
432 public boolean isManaged() {
433 return manager != null;
434 // return isAdvanced; ???
435 }
436
437 private <Match extends IPatternMatch> IQueryResultProvider getUnderlyingResultProvider(
438 final BaseMatcher<Match> matcher) {
439 // IQueryResultProvider resultProvider = reteEngine.accessMatcher(matcher.getSpecification());
440 return matcher.backend;
441 }
442
443 @Override
444 public <Match extends IPatternMatch> void addMatchUpdateListener(final ViatraQueryMatcher<Match> matcher,
445 final IMatchUpdateListener<? super Match> listener, boolean fireNow) {
446
447 checkArgument(listener != null, "Cannot add null listener!");
448 checkArgument(matcher.getEngine() == this, "Cannot register listener for matcher of different engine!");
449 checkArgument(!disposed, "Cannot register listener on matcher of disposed engine!");
450
451 final BaseMatcher<Match> bm = (BaseMatcher<Match>) matcher;
452
453 final IUpdateable updateDispatcher = (updateElement, isInsertion) -> {
454 Match match = null;
455 try {
456 match = bm.newMatch(updateElement.getElements());
457 if (isInsertion)
458 listener.notifyAppearance(match);
459 else
460 listener.notifyDisappearance(match);
461 } catch (Throwable e) { // NOPMD
462 if (e instanceof Error)
463 throw (Error) e;
464 logger.warn(
465 String.format(
466 "The incremental pattern matcher encountered an error during %s a callback on %s of match %s of pattern %s. Error message: %s. (Developer note: %s in %s callback)",
467 match == null ? "preparing" : "invoking", isInsertion ? "insertion" : "removal",
468 match == null ? updateElement.toString() : match.prettyPrint(),
469 matcher.getPatternName(), e.getMessage(), e.getClass().getSimpleName(), listener),
470 e);
471 }
472
473 };
474
475 IQueryResultProvider resultProvider = getUnderlyingResultProvider(bm);
476 resultProvider.addUpdateListener(updateDispatcher, listener, fireNow);
477 }
478
479 @Override
480 public <Match extends IPatternMatch> void removeMatchUpdateListener(ViatraQueryMatcher<Match> matcher,
481 IMatchUpdateListener<? super Match> listener) {
482 checkArgument(listener != null, "Cannot remove null listener!");
483 checkArgument(matcher.getEngine() == this, "Cannot remove listener from matcher of different engine!");
484 checkArgument(!disposed, "Cannot remove listener from matcher of disposed engine!");
485
486 final BaseMatcher<Match> bm = (BaseMatcher<Match>) matcher;
487
488 try {
489 IQueryResultProvider resultProvider = getUnderlyingResultProvider(bm);
490 resultProvider.removeUpdateListener(listener);
491 } catch (Exception e) {
492 logger.error(
493 "Error while removing listener " + listener + " from the matcher of " + matcher.getPatternName(),
494 e);
495 }
496 }
497
498 @Override
499 public void addModelUpdateListener(ViatraQueryModelUpdateListener listener) {
500 modelUpdateProvider.addListener(listener);
501 }
502
503 @Override
504 public void removeModelUpdateListener(ViatraQueryModelUpdateListener listener) {
505 modelUpdateProvider.removeListener(listener);
506 }
507
508 @Override
509 public void addLifecycleListener(ViatraQueryEngineLifecycleListener listener) {
510 lifecycleProvider.addListener(listener);
511 }
512
513 @Override
514 public void removeLifecycleListener(ViatraQueryEngineLifecycleListener listener) {
515 lifecycleProvider.removeListener(listener);
516 }
517
518 /**
519 * Returns an internal interface towards the query backend to feed the matcher with results.
520 *
521 * @param query
522 * the pattern for which the result provider should be delivered
523 *
524 * @throws ViatraQueryRuntimeException
525 */
526 public IQueryResultProvider getResultProvider(IQuerySpecification<?> query) {
527 Preconditions.checkState(!disposed, QUERY_ON_DISPOSED_ENGINE_MESSAGE);
528
529 return getResultProviderInternal(query, null);
530 }
531
532 /**
533 * Returns an internal interface towards the query backend to feed the matcher with results.
534 *
535 * @param query
536 * the pattern for which the result provider should be delivered
537 *
538 * @throws ViatraQueryRuntimeException
539 */
540 public IQueryResultProvider getResultProvider(IQuerySpecification<?> query, QueryEvaluationHint hint) {
541 Preconditions.checkState(!disposed, QUERY_ON_DISPOSED_ENGINE_MESSAGE);
542
543 return getResultProviderInternal(query, hint);
544 }
545
546 /**
547 * This method returns the result provider exactly as described by the passed hint. Query cannot be null! Use
548 * {@link #getQueryEvaluationHint(IQuerySpecification, QueryEvaluationHint)} before passing a hint to this method to
549 * make sure engine and query specific hints are correctly applied.
550 *
551 * @throws ViatraQueryRuntimeException
552 */
553 private IQueryResultProvider getResultProviderInternal(IQuerySpecification<?> query, QueryEvaluationHint hint) {
554 return getResultProviderInternal(query.getInternalQueryRepresentation(), hint);
555 }
556
557 /**
558 * This method returns the result provider exactly as described by the passed hint. Query cannot be null! Use
559 * {@link #getQueryEvaluationHint(IQuerySpecification, QueryEvaluationHint)} before passing a hint to this method to
560 * make sure engine and query specific hints are correctly applied.
561 *
562 * @throws ViatraQueryRuntimeException
563 */
564 private IQueryResultProvider getResultProviderInternal(PQuery query, QueryEvaluationHint hint) {
565 Preconditions.checkArgument(query != null, "Query cannot be null!");
566 Preconditions.checkArgument(query.getStatus() != PQueryStatus.ERROR, "Cannot initialize a result provider for the erronoues query `%s`.", query.getSimpleName());
567 final IQueryBackend backend = getQueryBackend(engineOptions.getQueryBackendFactory(getQueryEvaluationHint(query, hint)));
568 return backend.getResultProvider(query, hint);
569 }
570
571 /**
572 * Returns the query backend (influenced by the hint system), even if it is a non-caching backend.
573 *
574 * @throws ViatraQueryRuntimeException
575 */
576 private IQueryBackend getQueryBackend(PQuery query) {
577 final IQueryBackendFactory factory = engineOptions.getQueryBackendFactory(getQueryEvaluationHint(query));
578 return getQueryBackend(factory);
579 }
580
581 /**
582 * Returns a caching query backend (influenced by the hint system).
583 *
584 * @throws ViatraQueryRuntimeException
585 */
586 private IQueryBackend getCachingQueryBackend(PQuery query) {
587 IQueryBackend regularBackend = getQueryBackend(query);
588 if (regularBackend.isCaching())
589 return regularBackend;
590 else
591 return getQueryBackend(engineOptions.getDefaultCachingBackendFactory());
592 }
593
594 @Override
595 public boolean isResultCached(PQuery query) {
596 try {
597 return null != getCachingQueryBackend(query).peekExistingResultProvider(query);
598 } catch (ViatraQueryException iqe) {
599 getLogger().error(ERROR_ACCESSING_BACKEND, iqe);
600 return false;
601 }
602 }
603
604 @Override
605 public IQueryResultProvider getCachingResultProvider(PQuery query) {
606 try {
607 return getCachingQueryBackend(query).getResultProvider(query);
608 } catch (ViatraQueryException iqe) {
609 getLogger().error(ERROR_ACCESSING_BACKEND, iqe);
610 throw iqe;
611 }
612 }
613
614 private QueryEvaluationHint getEngineDefaultHint() {
615 return engineOptions.getEngineDefaultHints();
616 }
617
618 @Override
619 public QueryEvaluationHint getQueryEvaluationHint(PQuery query) {
620 return getEngineDefaultHint().overrideBy(query.getEvaluationHints());
621 }
622
623 private QueryEvaluationHint getQueryEvaluationHint(IQuerySpecification<?> querySpecification,
624 QueryEvaluationHint optionalOverrideHints) {
625 return getQueryEvaluationHint(querySpecification.getInternalQueryRepresentation())
626 .overrideBy(optionalOverrideHints);
627 }
628
629 private QueryEvaluationHint getQueryEvaluationHint(PQuery query, QueryEvaluationHint optionalOverrideHints) {
630 return getQueryEvaluationHint(query).overrideBy(optionalOverrideHints);
631 }
632
633 private IMatcherCapability getRequestedCapability(IQuerySpecification<?> querySpecification,
634 QueryEvaluationHint optionalOverrideHints) {
635 final QueryEvaluationHint hint = getQueryEvaluationHint(querySpecification, optionalOverrideHints);
636 return engineOptions.getQueryBackendFactory(hint)
637 .calculateRequiredCapability(querySpecification.getInternalQueryRepresentation(), hint);
638 }
639
640 @Override
641 public void prepareGroup(IQueryGroup queryGroup, final QueryEvaluationHint optionalEvaluationHints) {
642 try {
643 Preconditions.checkState(!disposed, QUERY_ON_DISPOSED_ENGINE_MESSAGE);
644
645 final Set<IQuerySpecification<?>> specifications = new HashSet<IQuerySpecification<?>>(
646 queryGroup.getSpecifications());
647 final Collection<PQuery> patterns = specifications.stream().map(
648 IQuerySpecification::getInternalQueryRepresentation).collect(Collectors.toList());
649 patterns.forEach(PQuery::ensureInitialized);
650
651 Collection<String> erroneousPatterns = patterns.stream().
652 filter(PQueries.queryStatusPredicate(PQueryStatus.ERROR)).
653 map(PQuery::getFullyQualifiedName).
654 collect(Collectors.toList());
655 Preconditions.checkState(erroneousPatterns.isEmpty(), "Erroneous query(s) found: %s",
656 erroneousPatterns.stream().collect(Collectors.joining(", ")));
657
658 // TODO maybe do some smarter preparation per backend?
659 try {
660 engineContext.getBaseIndex().coalesceTraversals(new Callable<Void>() {
661 @Override
662 public Void call() throws Exception {
663 for (IQuerySpecification<?> query : specifications) {
664 getResultProviderInternal(query, optionalEvaluationHints);
665 }
666 return null;
667 }
668 });
669 } catch (InvocationTargetException ex) {
670 final Throwable cause = ex.getCause();
671 if (cause instanceof QueryProcessingException)
672 throw (QueryProcessingException) cause;
673 if (cause instanceof ViatraQueryException)
674 throw (ViatraQueryException) cause;
675 if (cause instanceof RuntimeException)
676 throw (RuntimeException) cause;
677 assert (false);
678 }
679 } catch (QueryProcessingException e) {
680 throw new ViatraQueryException(e);
681 }
682 }
683
684 @Override
685 public QueryScope getScope() {
686 return scope;
687 }
688
689 @Override
690 public ViatraQueryEngineOptions getEngineOptions() {
691 return engineOptions;
692 }
693
694 @Override
695 public IQueryResultProvider getResultProviderOfMatcher(ViatraQueryMatcher<? extends IPatternMatch> matcher) {
696 return ((QueryResultWrapper) matcher).backend;
697 }
698
699 @Override
700 public IQueryResultProvider getResultProvider(PQuery query, QueryEvaluationHint overrideHints) {
701 try {
702 return getResultProviderInternal(query, overrideHints);
703 } catch (ViatraQueryException e) {
704 getLogger().error(ERROR_ACCESSING_BACKEND, e);
705 throw e;
706 }
707 }
708
709 @Override
710 public boolean isDisposed() {
711 return disposed;
712 }
713
714}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/LifecycleProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/LifecycleProvider.java
new file mode 100644
index 00000000..8bbf2a66
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/LifecycleProvider.java
@@ -0,0 +1,138 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.internal.engine;
10
11import java.util.ArrayList;
12
13import org.apache.log4j.Logger;
14import tools.refinery.viatra.runtime.api.AdvancedViatraQueryEngine;
15import tools.refinery.viatra.runtime.api.IPatternMatch;
16import tools.refinery.viatra.runtime.api.ViatraQueryEngineLifecycleListener;
17import tools.refinery.viatra.runtime.api.ViatraQueryMatcher;
18
19public final class LifecycleProvider extends ListenerContainer<ViatraQueryEngineLifecycleListener> implements ViatraQueryEngineLifecycleListener{
20
21 private final Logger logger;
22
23 /**
24 * @param queryEngine
25 */
26 public LifecycleProvider(AdvancedViatraQueryEngine queryEngine, Logger logger) {
27 this.logger = logger;
28 }
29
30 @Override
31 protected void listenerAdded(ViatraQueryEngineLifecycleListener listener) {
32 logger.debug("Lifecycle listener " + listener + " added to engine.");
33 }
34
35 @Override
36 protected void listenerRemoved(ViatraQueryEngineLifecycleListener listener) {
37 logger.debug("Lifecycle listener " + listener + " removed from engine.");
38 }
39
40// public void propagateEventToListeners(Predicate<ViatraQueryEngineLifecycleListener> function) {
41// if (!listeners.isEmpty()) {
42// for (ViatraQueryEngineLifecycleListener listener : new ArrayList<ViatraQueryEngineLifecycleListener>(listeners)) {
43// try {
44// function.apply(listener);
45// } catch (Exception ex) {
46// logger.error(
47// "VIATRA Query encountered an error in delivering notification to listener "
48// + listener + ".", ex);
49// }
50// }
51// }
52// }
53
54 @Override
55 public void matcherInstantiated(final ViatraQueryMatcher<? extends IPatternMatch> matcher) {
56 if (!listeners.isEmpty()) {
57 for (ViatraQueryEngineLifecycleListener listener : new ArrayList<ViatraQueryEngineLifecycleListener>(listeners)) {
58 try {
59 listener.matcherInstantiated(matcher);
60 } catch (Exception ex) {
61 logger.error(
62 "VIATRA Query encountered an error in delivering matcher initialization notification to listener "
63 + listener + ".", ex);
64 }
65 }
66 }
67// propagateEventToListeners(new Predicate<ViatraQueryEngineLifecycleListener>() {
68// public boolean apply(ViatraQueryEngineLifecycleListener listener) {
69// listener.matcherInstantiated(matcher);
70// return true;
71// }
72// });
73 }
74
75 @Override
76 public void engineBecameTainted(String description, Throwable t) {
77 if (!listeners.isEmpty()) {
78 for (ViatraQueryEngineLifecycleListener listener : new ArrayList<ViatraQueryEngineLifecycleListener>(listeners)) {
79 try {
80 listener.engineBecameTainted(description, t);
81 } catch (Exception ex) {
82 logger.error(
83 "VIATRA Query encountered an error in delivering engine tainted notification to listener "
84 + listener + ".", ex);
85 }
86 }
87 }
88// propagateEventToListeners(new Predicate<ViatraQueryEngineLifecycleListener>() {
89// public boolean apply(ViatraQueryEngineLifecycleListener listener) {
90// listener.engineBecameTainted();
91// return true;
92// }
93// });
94 }
95
96 @Override
97 public void engineWiped() {
98 if (!listeners.isEmpty()) {
99 for (ViatraQueryEngineLifecycleListener listener : new ArrayList<ViatraQueryEngineLifecycleListener>(listeners)) {
100 try {
101 listener.engineWiped();
102 } catch (Exception ex) {
103 logger.error(
104 "VIATRA Query encountered an error in delivering engine wiped notification to listener "
105 + listener + ".", ex);
106 }
107 }
108 }
109// propagateEventToListeners(new Predicate<ViatraQueryEngineLifecycleListener>() {
110// public boolean apply(ViatraQueryEngineLifecycleListener listener) {
111// listener.engineWiped();
112// return true;
113// }
114// });
115 }
116
117 @Override
118 public void engineDisposed() {
119 if (!listeners.isEmpty()) {
120 for (ViatraQueryEngineLifecycleListener listener : new ArrayList<ViatraQueryEngineLifecycleListener>(listeners)) {
121 try {
122 listener.engineDisposed();
123 } catch (Exception ex) {
124 logger.error(
125 "VIATRA Query encountered an error in delivering engine disposed notification to listener "
126 + listener + ".", ex);
127 }
128 }
129 }
130// propagateEventToListeners(new Predicate<ViatraQueryEngineLifecycleListener>() {
131// public boolean apply(ViatraQueryEngineLifecycleListener listener) {
132// listener.engineDisposed();
133// return true;
134// }
135// });
136 }
137
138 } \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ListenerContainer.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ListenerContainer.java
new file mode 100644
index 00000000..34133bed
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ListenerContainer.java
@@ -0,0 +1,43 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.internal.engine;
10
11import static tools.refinery.viatra.runtime.matchers.util.Preconditions.checkArgument;
12
13import java.util.HashSet;
14import java.util.Set;
15
16public abstract class ListenerContainer<Listener> {
17
18 protected final Set<Listener> listeners;
19
20 public ListenerContainer() {
21 this.listeners = new HashSet<Listener>();
22 }
23
24 public synchronized void addListener(Listener listener) {
25 checkArgument(listener != null, "Cannot add null listener!");
26 boolean added = listeners.add(listener);
27 if(added) {
28 listenerAdded(listener);
29 }
30 }
31
32 public synchronized void removeListener(Listener listener) {
33 checkArgument(listener != null, "Cannot remove null listener!");
34 boolean removed = listeners.remove(listener);
35 if(removed) {
36 listenerRemoved(listener);
37 }
38 }
39
40 protected abstract void listenerAdded(Listener listener);
41
42 protected abstract void listenerRemoved(Listener listener);
43} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ModelUpdateProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ModelUpdateProvider.java
new file mode 100644
index 00000000..1f2c27e8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/internal/engine/ModelUpdateProvider.java
@@ -0,0 +1,214 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.internal.engine;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.Collections;
14import java.util.EnumMap;
15import java.util.HashSet;
16import java.util.Map;
17import java.util.Map.Entry;
18
19import org.apache.log4j.Logger;
20import tools.refinery.viatra.runtime.api.AdvancedViatraQueryEngine;
21import tools.refinery.viatra.runtime.api.IMatchUpdateListener;
22import tools.refinery.viatra.runtime.api.IPatternMatch;
23import tools.refinery.viatra.runtime.api.ViatraQueryEngineLifecycleListener;
24import tools.refinery.viatra.runtime.api.ViatraQueryMatcher;
25import tools.refinery.viatra.runtime.api.ViatraQueryModelUpdateListener;
26import tools.refinery.viatra.runtime.api.ViatraQueryModelUpdateListener.ChangeLevel;
27import tools.refinery.viatra.runtime.api.scope.ViatraBaseIndexChangeListener;
28import tools.refinery.viatra.runtime.exception.ViatraQueryException;
29import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
30
31public final class ModelUpdateProvider extends ListenerContainer<ViatraQueryModelUpdateListener> {
32
33 private final AdvancedViatraQueryEngine queryEngine;
34 private ChangeLevel currentChange = ChangeLevel.NO_CHANGE;
35 private ChangeLevel maxLevel = ChangeLevel.NO_CHANGE;
36 private final Map<ChangeLevel, Collection<ViatraQueryModelUpdateListener>> listenerMap;
37 private final Logger logger;
38
39 public ModelUpdateProvider(AdvancedViatraQueryEngine queryEngine, Logger logger) {
40 super();
41 this.queryEngine = queryEngine;
42 this.logger = logger;
43 listenerMap = new EnumMap<>(ChangeLevel.class);
44 }
45
46 @Override
47 protected void listenerAdded(ViatraQueryModelUpdateListener listener) {
48 // check ChangeLevel
49 // create callback for given level if required
50 if(listenerMap.isEmpty()) {
51 try {
52 this.queryEngine.getBaseIndex().addBaseIndexChangeListener(indexListener);
53 // add listener to new matchers (use lifecycle listener)
54 this.queryEngine.addLifecycleListener(selfListener);
55 } catch (ViatraQueryException e) {
56 throw new IllegalStateException("Model update listener used on engine without base index", e);
57 }
58 }
59
60 ChangeLevel changeLevel = listener.getLevel();
61 listenerMap.computeIfAbsent(changeLevel, k -> CollectionsFactory.createSet()).add(listener);
62 // increase or keep max level of listeners
63 ChangeLevel oldMaxLevel = maxLevel;
64 maxLevel = maxLevel.changeOccured(changeLevel);
65 if(!maxLevel.equals(oldMaxLevel) && ChangeLevel.MATCHSET.compareTo(oldMaxLevel) > 0 && ChangeLevel.MATCHSET.compareTo(maxLevel) <= 0) {
66 // add matchUpdateListener to all matchers
67 for (ViatraQueryMatcher<?> matcher : this.queryEngine.getCurrentMatchers()) {
68 this.queryEngine.addMatchUpdateListener(matcher, matchSetListener, false);
69 }
70 }
71 }
72
73 @Override
74 protected void listenerRemoved(ViatraQueryModelUpdateListener listener) {
75 ChangeLevel changeLevel = listener.getLevel();
76 Collection<ViatraQueryModelUpdateListener> old = listenerMap.getOrDefault(changeLevel, Collections.emptySet());
77 boolean removed = old.remove(listener);
78 if(removed) {
79 if (old.isEmpty()) listenerMap.remove(changeLevel);
80 } else {
81 handleUnsuccesfulRemove(listener);
82 }
83
84 updateMaxLevel();
85
86 if(listenerMap.isEmpty()) {
87 this.queryEngine.removeLifecycleListener(selfListener);
88 removeBaseIndexChangeListener();
89 }
90 }
91
92 private void removeBaseIndexChangeListener() {
93 try {
94 this.queryEngine.getBaseIndex().removeBaseIndexChangeListener(indexListener);
95 } catch (ViatraQueryException e) {
96 throw new IllegalStateException("Model update listener used on engine without base index", e);
97 }
98 }
99
100 private void updateMaxLevel() {
101 if(!listenerMap.containsKey(maxLevel)) {
102 ChangeLevel newMaxLevel = ChangeLevel.NO_CHANGE;
103 for (ChangeLevel level : new HashSet<>(listenerMap.keySet())) {
104 newMaxLevel = newMaxLevel.changeOccured(level);
105 }
106 maxLevel = newMaxLevel;
107 }
108 if(maxLevel.compareTo(ChangeLevel.MATCHSET) < 0) {
109 // remove listener from matchers
110 for (ViatraQueryMatcher<?> matcher : this.queryEngine.getCurrentMatchers()) {
111 this.queryEngine.removeMatchUpdateListener(matcher, matchSetListener);
112 }
113 }
114 }
115
116 private void handleUnsuccesfulRemove(ViatraQueryModelUpdateListener listener) {
117 for (Entry<ChangeLevel, Collection<ViatraQueryModelUpdateListener>> entry : listenerMap.entrySet()) {
118 Collection<ViatraQueryModelUpdateListener> existingListeners = entry.getValue();
119 // if the listener is contained in some other bucket, remove it from there
120 if(existingListeners.remove(listener)) {
121 logger.error("Listener "+listener+" change level changed since initialization!");
122 if (existingListeners.isEmpty()) listenerMap.remove(entry.getKey());
123 return; // listener is contained only once
124 }
125 }
126 logger.error("Listener "+listener+" already removed from map (e.g. engine was already disposed)!");
127 }
128
129 private void notifyListeners() {
130
131 // any change that occurs after this point should be regarded as a new event
132 // FIXME what should happen when a listener creates new notifications?
133 // -> other listeners will get events in different order
134 ChangeLevel tempLevel = currentChange;
135 currentChange = ChangeLevel.NO_CHANGE;
136
137 if(!listenerMap.isEmpty()) {
138 for (ChangeLevel level : new HashSet<>(listenerMap.keySet())) {
139 if(tempLevel.compareTo(level) >= 0) {
140 for (ViatraQueryModelUpdateListener listener : new ArrayList<>(listenerMap.get(level))) {
141 try {
142 listener.notifyChanged(tempLevel);
143 } catch (Exception ex) {
144 logger.error(
145 "VIATRA Query encountered an error in delivering model update notification to listener "
146 + listener + ".", ex);
147 }
148 }
149 }
150 }
151 } else {
152 throw new IllegalStateException("Notify listeners must not be called without listeners! Maybe an update callback was not removed correctly.");
153 }
154
155 }
156
157 // model update "providers":
158 // - model: IQBase callback even if not dirty
159 // - index: IQBase dirty callback
160 private final ViatraBaseIndexChangeListener indexListener = new ViatraBaseIndexChangeListener() {
161
162 @Override
163 public boolean onlyOnIndexChange() {
164 return false;
165 }
166
167 @Override
168 public void notifyChanged(boolean indexChanged) {
169 if(indexChanged) {
170 currentChange = currentChange.changeOccured(ChangeLevel.INDEX);
171 } else {
172 currentChange = currentChange.changeOccured(ChangeLevel.MODEL);
173 }
174 notifyListeners();
175 }
176
177 };
178 // - matchset: add the same listener to each matcher and use a dirty flag. needs IQBase callback as well
179 private final IMatchUpdateListener<IPatternMatch> matchSetListener = new IMatchUpdateListener<IPatternMatch>() {
180
181 @Override
182 public void notifyDisappearance(IPatternMatch match) {
183 currentChange = currentChange.changeOccured(ChangeLevel.MATCHSET);
184 }
185
186 @Override
187 public void notifyAppearance(IPatternMatch match) {
188 currentChange = currentChange.changeOccured(ChangeLevel.MATCHSET);
189 }
190 };
191
192 private final ViatraQueryEngineLifecycleListener selfListener = new ViatraQueryEngineLifecycleListener() {
193
194 @Override
195 public void matcherInstantiated(ViatraQueryMatcher<? extends IPatternMatch> matcher) {
196 if (maxLevel.compareTo(ChangeLevel.MATCHSET) >= 0) {
197 ModelUpdateProvider.this.queryEngine.addMatchUpdateListener(matcher, matchSetListener, false);
198 }
199 }
200
201 @Override
202 public void engineWiped() {}
203
204 @Override
205 public void engineDisposed() {
206 removeBaseIndexChangeListener();
207 listenerMap.clear();
208 maxLevel = ChangeLevel.NO_CHANGE;
209 }
210
211 @Override
212 public void engineBecameTainted(String description, Throwable t) {}
213 };
214}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/ViatraQueryRuntimeException.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/ViatraQueryRuntimeException.java
new file mode 100644
index 00000000..83f6f766
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/ViatraQueryRuntimeException.java
@@ -0,0 +1,42 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers;
10
11/**
12 * A common base class for all exceptions thrown by various VIATRA Query Runtime APIs.
13 *
14 * @author Zoltan Ujhelyi
15 * @since 2.0
16 */
17public abstract class ViatraQueryRuntimeException extends RuntimeException {
18
19 private static final long serialVersionUID = -8505253058035069310L;
20
21 public ViatraQueryRuntimeException() {
22 super();
23 }
24
25 public ViatraQueryRuntimeException(String message) {
26 super(message);
27 }
28
29 public ViatraQueryRuntimeException(Throwable cause) {
30 super(cause);
31 }
32
33 public ViatraQueryRuntimeException(String message, Throwable cause) {
34 super(message, cause);
35 }
36
37 public ViatraQueryRuntimeException(String message, Throwable cause, boolean enableSuppression,
38 boolean writableStackTrace) {
39 super(message, cause, enableSuppression, writableStackTrace);
40 }
41
42}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/AverageAccumulator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/AverageAccumulator.java
new file mode 100644
index 00000000..2c09ede1
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/AverageAccumulator.java
@@ -0,0 +1,24 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11/**
12 * @since 2.0
13 */
14class AverageAccumulator<Domain> {
15 Domain value;
16 long count;
17
18 public AverageAccumulator(Domain value, long count) {
19 super();
20 this.value = value;
21 this.count = count;
22 }
23
24} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleAverageOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleAverageOperator.java
new file mode 100644
index 00000000..e8a26afd
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleAverageOperator.java
@@ -0,0 +1,82 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.util.OptionalDouble;
12import java.util.stream.Stream;
13
14import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
15
16/**
17 * @author Zoltan Ujhelyi
18 * @since 2.0
19 */
20public class DoubleAverageOperator implements IMultisetAggregationOperator<Double, AverageAccumulator<Double>, Double> {
21
22 public static final DoubleAverageOperator INSTANCE = new DoubleAverageOperator();
23
24 private DoubleAverageOperator() {
25 // Singleton, do not call.
26 }
27
28 @Override
29 public String getShortDescription() {
30 return "avg<Integer> incrementally computes the average of java.lang.Integer values";
31 }
32
33 @Override
34 public String getName() {
35 return "avg<Integer>";
36 }
37
38 @Override
39 public AverageAccumulator<Double> createNeutral() {
40 return new AverageAccumulator<Double>(0d, 0l);
41 }
42
43 @Override
44 public boolean isNeutral(AverageAccumulator<Double> result) {
45 return result.count == 0l;
46 }
47
48 @Override
49 public AverageAccumulator<Double> update(AverageAccumulator<Double> oldResult, Double updateValue,
50 boolean isInsertion) {
51 if (isInsertion) {
52 oldResult.value += updateValue;
53 oldResult.count++;
54 } else {
55 oldResult.value -= updateValue;
56 oldResult.count--;
57 }
58 return oldResult;
59 }
60
61 @Override
62 public Double getAggregate(AverageAccumulator<Double> result) {
63 return (result.count == 0)
64 ? null
65 : result.value/result.count;
66 }
67
68 @Override
69 public Double aggregateStream(Stream<Double> stream) {
70 final OptionalDouble averageOpt = stream.mapToDouble(Double::doubleValue).average();
71 return averageOpt.isPresent() ? averageOpt.getAsDouble() : null;
72 }
73
74 /**
75 * @since 2.4
76 */
77 @Override
78 public AverageAccumulator<Double> clone(AverageAccumulator<Double> original) {
79 return new AverageAccumulator<Double>(original.value, original.count);
80 }
81
82} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleSumOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleSumOperator.java
new file mode 100644
index 00000000..744b0cd1
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/DoubleSumOperator.java
@@ -0,0 +1,62 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.util.stream.Stream;
12
13import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AbstractMemorylessAggregationOperator;
14
15/**
16 * Incrementally computes the sum of java.lang.Double values
17 * @author Gabor Bergmann
18 * @since 1.4
19 */
20public class DoubleSumOperator extends AbstractMemorylessAggregationOperator<Double, Double> {
21 public static final DoubleSumOperator INSTANCE = new DoubleSumOperator();
22
23 private DoubleSumOperator() {
24 // Singleton, do not call.
25 }
26
27 @Override
28 public String getShortDescription() {
29 return "sum<Double> incrementally computes the sum of java.lang.Double values";
30 }
31 @Override
32 public String getName() {
33 return "sum<Double>";
34 }
35
36 @Override
37 public Double createNeutral() {
38 return 0d;
39 }
40
41 @Override
42 public boolean isNeutral(Double result) {
43 return createNeutral().equals(result);
44 }
45
46 @Override
47 public Double update(Double oldResult, Double updateValue, boolean isInsertion) {
48 return isInsertion ?
49 oldResult + updateValue :
50 oldResult - updateValue;
51 }
52
53 /**
54 * @since 2.0
55 */
56 @Override
57 public Double aggregateStream(Stream<Double> stream) {
58 return stream.mapToDouble(Double::doubleValue).sum();
59 }
60
61
62}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/ExtremumOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/ExtremumOperator.java
new file mode 100644
index 00000000..ee4ceeb8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/ExtremumOperator.java
@@ -0,0 +1,135 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.util.Comparator;
12import java.util.SortedMap;
13import java.util.TreeMap;
14import java.util.stream.Stream;
15
16import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
17
18/**
19 * Incrementally computes the minimum or maximum of java.lang.Comparable values, using the default comparison
20 *
21 * @author Gabor Bergmann
22 * @since 1.4
23 */
24public class ExtremumOperator<T extends Comparable<T>>
25 implements IMultisetAggregationOperator<T, SortedMap<T, Integer>, T> {
26
27 public enum Extreme {
28 MIN, MAX;
29
30 /**
31 * @since 2.0
32 */
33 public <T> T pickFrom(SortedMap<T, Integer> nonEmptyMultiSet) {
34 switch(this) {
35 case MIN:
36 return nonEmptyMultiSet.firstKey();
37 case MAX:
38 return nonEmptyMultiSet.lastKey();
39 default:
40 return null;
41 }
42 }
43 }
44
45 private static final ExtremumOperator MIN_OP = new ExtremumOperator<>(Extreme.MIN);
46 private static final ExtremumOperator MAX_OP = new ExtremumOperator<>(Extreme.MAX);
47
48 public static <T extends Comparable<T>> ExtremumOperator<T> getMin() {
49 return MIN_OP;
50 }
51 public static <T extends Comparable<T>> ExtremumOperator<T> getMax() {
52 return MAX_OP;
53 }
54
55 Extreme extreme;
56 private ExtremumOperator(Extreme extreme) {
57 super();
58 this.extreme = extreme;
59 }
60
61 @Override
62 public String getShortDescription() {
63 String opName = getName();
64 return String.format(
65 "%s incrementally computes the %simum of java.lang.Comparable values, using the default comparison",
66 opName, opName);
67 }
68
69 @Override
70 public String getName() {
71 return extreme.name().toLowerCase();
72 }
73
74 /**
75 * @since 2.0
76 */
77 @Override
78 public SortedMap<T, Integer> createNeutral() {
79 return new TreeMap<>();
80 }
81
82 /**
83 * @since 2.0
84 */
85 @Override
86 public boolean isNeutral(SortedMap<T, Integer> result) {
87 return result.isEmpty();
88 }
89
90 /**
91 * @since 2.0
92 */
93 @Override
94 public SortedMap<T, Integer> update(SortedMap<T, Integer> oldResult, T updateValue, boolean isInsertion) {
95 oldResult.compute(updateValue, (value, c) -> {
96 int count = (c == null) ? 0 : c;
97 int result = (isInsertion) ? count+1 : count-1;
98 return (result == 0) ? null : result;
99 });
100 return oldResult;
101 }
102
103 /**
104 * @since 2.0
105 */
106 @Override
107 public T getAggregate(SortedMap<T, Integer> result) {
108 return result.isEmpty() ? null :
109 extreme.pickFrom(result);
110 }
111
112 /**
113 * @since 2.0
114 */
115 @Override
116 public T aggregateStream(Stream<T> stream) {
117 switch (extreme) {
118 case MIN:
119 return stream.min(Comparator.naturalOrder()).orElse(null);
120 case MAX:
121 return stream.max(Comparator.naturalOrder()).orElse(null);
122 default:
123 return null;
124 }
125 }
126
127 /**
128 * @since 2.4
129 */
130 @Override
131 public SortedMap<T, Integer> clone(SortedMap<T, Integer> original) {
132 return new TreeMap<T, Integer>(original);
133 }
134
135}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerAverageOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerAverageOperator.java
new file mode 100644
index 00000000..bf422476
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerAverageOperator.java
@@ -0,0 +1,82 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.util.OptionalDouble;
12import java.util.stream.Stream;
13
14import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
15
16/**
17 * @author Zoltan Ujhelyi
18 * @since 2.0
19 */
20public class IntegerAverageOperator implements IMultisetAggregationOperator<Integer, AverageAccumulator<Integer>, Double> {
21
22 public static final IntegerAverageOperator INSTANCE = new IntegerAverageOperator();
23
24 private IntegerAverageOperator() {
25 // Singleton, do not call.
26 }
27
28 @Override
29 public String getShortDescription() {
30 return "avg<Integer> incrementally computes the average of java.lang.Integer values";
31 }
32
33 @Override
34 public String getName() {
35 return "avg<Integer>";
36 }
37
38 @Override
39 public AverageAccumulator<Integer> createNeutral() {
40 return new AverageAccumulator<Integer>(0, 0l);
41 }
42
43 @Override
44 public boolean isNeutral(AverageAccumulator<Integer> result) {
45 return result.count == 0l;
46 }
47
48 @Override
49 public AverageAccumulator<Integer> update(AverageAccumulator<Integer> oldResult, Integer updateValue,
50 boolean isInsertion) {
51 if (isInsertion) {
52 oldResult.value += updateValue;
53 oldResult.count++;
54 } else {
55 oldResult.value -= updateValue;
56 oldResult.count--;
57 }
58 return oldResult;
59 }
60
61 @Override
62 public Double getAggregate(AverageAccumulator<Integer> result) {
63 return (result.count == 0)
64 ? null
65 : ((double)result.value)/result.count;
66 }
67
68 @Override
69 public Double aggregateStream(Stream<Integer> stream) {
70 final OptionalDouble averageOpt = stream.mapToInt(Integer::intValue).average();
71 return averageOpt.isPresent() ? averageOpt.getAsDouble() : null;
72 }
73
74 /**
75 * @since 2.4
76 */
77 @Override
78 public AverageAccumulator<Integer> clone(AverageAccumulator<Integer> original) {
79 return new AverageAccumulator<Integer>(original.value, original.count);
80 }
81
82} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerSumOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerSumOperator.java
new file mode 100644
index 00000000..18584256
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/IntegerSumOperator.java
@@ -0,0 +1,61 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.util.stream.Stream;
12
13import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AbstractMemorylessAggregationOperator;
14
15/**
16 * Incrementally computes the sum of java.lang.Integer values
17 * @author Gabor Bergmann
18 * @since 1.4
19 */
20public class IntegerSumOperator extends AbstractMemorylessAggregationOperator<Integer, Integer> {
21 public static final IntegerSumOperator INSTANCE = new IntegerSumOperator();
22
23 private IntegerSumOperator() {
24 // Singleton, do not call.
25 }
26
27 @Override
28 public String getShortDescription() {
29 return "sum<Integer> incrementally computes the sum of java.lang.Integer values";
30 }
31 @Override
32 public String getName() {
33 return "sum<Integer>";
34 }
35
36 @Override
37 public Integer createNeutral() {
38 return 0;
39 }
40
41 @Override
42 public boolean isNeutral(Integer result) {
43 return createNeutral().equals(result);
44 }
45
46 @Override
47 public Integer update(Integer oldResult, Integer updateValue, boolean isInsertion) {
48 return isInsertion ?
49 oldResult + updateValue :
50 oldResult - updateValue;
51 }
52
53 /**
54 * @since 2.0
55 */
56 @Override
57 public Integer aggregateStream(Stream<Integer> stream) {
58 return stream.mapToInt(Integer::intValue).sum();
59 }
60
61}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongAverageOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongAverageOperator.java
new file mode 100644
index 00000000..d56c9507
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongAverageOperator.java
@@ -0,0 +1,82 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.util.OptionalDouble;
12import java.util.stream.Stream;
13
14import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator;
15
16/**
17 * @author Zoltan Ujhelyi
18 * @since 2.0
19 */
20public class LongAverageOperator implements IMultisetAggregationOperator<Long, AverageAccumulator<Long>, Double> {
21
22 public static final LongAverageOperator INSTANCE = new LongAverageOperator();
23
24 private LongAverageOperator() {
25 // Singleton, do not call.
26 }
27
28 @Override
29 public String getShortDescription() {
30 return "avg<Integer> incrementally computes the average of java.lang.Integer values";
31 }
32
33 @Override
34 public String getName() {
35 return "avg<Integer>";
36 }
37
38 @Override
39 public AverageAccumulator<Long> createNeutral() {
40 return new AverageAccumulator<Long>(0l, 0l);
41 }
42
43 @Override
44 public boolean isNeutral(AverageAccumulator<Long> result) {
45 return result.count == 0l;
46 }
47
48 @Override
49 public AverageAccumulator<Long> update(AverageAccumulator<Long> oldResult, Long updateValue,
50 boolean isInsertion) {
51 if (isInsertion) {
52 oldResult.value += updateValue;
53 oldResult.count++;
54 } else {
55 oldResult.value -= updateValue;
56 oldResult.count--;
57 }
58 return oldResult;
59 }
60
61 @Override
62 public Double getAggregate(AverageAccumulator<Long> result) {
63 return (result.count == 0)
64 ? null
65 : ((double)result.value)/result.count;
66 }
67
68 @Override
69 public Double aggregateStream(Stream<Long> stream) {
70 final OptionalDouble averageOpt = stream.mapToLong(Long::longValue).average();
71 return averageOpt.isPresent() ? averageOpt.getAsDouble() : null;
72 }
73
74 /**
75 * @since 2.4
76 */
77 @Override
78 public AverageAccumulator<Long> clone(AverageAccumulator<Long> original) {
79 return new AverageAccumulator<Long>(original.value, original.count);
80 }
81
82} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongSumOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongSumOperator.java
new file mode 100644
index 00000000..29ded090
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/LongSumOperator.java
@@ -0,0 +1,61 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.util.stream.Stream;
12
13import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AbstractMemorylessAggregationOperator;
14
15/**
16 * Incrementally computes the sum of java.lang.Long values
17 * @author Gabor Bergmann
18 * @since 1.4
19 */
20public class LongSumOperator extends AbstractMemorylessAggregationOperator<Long, Long> {
21 public static final LongSumOperator INSTANCE = new LongSumOperator();
22
23 private LongSumOperator() {
24 // Singleton, do not call.
25 }
26
27 @Override
28 public String getShortDescription() {
29 return "sum<Long> incrementally computes the sum of java.lang.Long values";
30 }
31 @Override
32 public String getName() {
33 return "sum<Long>";
34 }
35
36 @Override
37 public Long createNeutral() {
38 return 0L;
39 }
40
41 @Override
42 public boolean isNeutral(Long result) {
43 return createNeutral().equals(result);
44 }
45
46 @Override
47 public Long update(Long oldResult, Long updateValue, boolean isInsertion) {
48 return isInsertion ?
49 oldResult + updateValue :
50 oldResult - updateValue;
51 }
52
53 /**
54 * @since 2.0
55 */
56 @Override
57 public Long aggregateStream(Stream<Long> stream) {
58 return stream.mapToLong(Long::longValue).sum();
59 }
60
61}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/avg.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/avg.java
new file mode 100644
index 00000000..c25678aa
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/avg.java
@@ -0,0 +1,39 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AggregatorType;
12import tools.refinery.viatra.runtime.matchers.psystem.aggregations.BoundAggregator;
13import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IAggregatorFactory;
14
15/**
16 * This aggregator calculates the average of the values of a selected aggregate parameter of a called pattern. The aggregate
17 * parameter is selected with the '#' symbol; the aggregate parameter must not be used outside the aggregator call. The
18 * other parameters of the call might be bound or unbound; bound parameters limit the matches to consider for the
19 * summation.
20 *
21 * @since 2.0
22 *
23 */
24@AggregatorType(
25 parameterTypes = {Integer.class, Double.class, Long.class},
26 returnTypes = {Double.class, Double.class, Double.class})
27public final class avg implements IAggregatorFactory {
28
29 @Override
30 public BoundAggregator getAggregatorLogic(Class<?> domainClass) {
31 if (Integer.class.equals(domainClass))
32 return new BoundAggregator(IntegerAverageOperator.INSTANCE, Integer.class, Double.class);
33 if (Double.class.equals(domainClass))
34 return new BoundAggregator(DoubleAverageOperator.INSTANCE, Double.class, Double.class);
35 if (Long.class.equals(domainClass))
36 return new BoundAggregator(LongAverageOperator.INSTANCE, Long.class, Double.class);
37 else throw new IllegalArgumentException();
38 }
39}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/count.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/count.java
new file mode 100644
index 00000000..8310a0ce
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/count.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AggregatorType;
12import tools.refinery.viatra.runtime.matchers.psystem.aggregations.BoundAggregator;
13import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IAggregatorFactory;
14
15/**
16 * An aggregator to count the number of matches a pattern has. The return of the aggregator is an non-negative integer
17 * number.
18 *
19 * @since 1.4
20 *
21 */
22@AggregatorType(parameterTypes = {Void.class}, returnTypes = {Integer.class})
23public final class count implements IAggregatorFactory {
24
25 @Override
26 public BoundAggregator getAggregatorLogic(Class<?> domainClass) {
27 if (Void.class.equals(domainClass))
28 return new BoundAggregator(null, Void.class, Integer.class);
29 else throw new IllegalArgumentException();
30 }
31
32
33}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/max.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/max.java
new file mode 100644
index 00000000..e0236223
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/max.java
@@ -0,0 +1,44 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.math.BigDecimal;
12import java.math.BigInteger;
13import java.util.Calendar;
14import java.util.Date;
15
16import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AggregatorType;
17import tools.refinery.viatra.runtime.matchers.psystem.aggregations.BoundAggregator;
18import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IAggregatorFactory;
19
20/**
21 * This aggregator calculates the maximum value of a selected aggregate parameter of a called pattern. The aggregate
22 * parameter is selected with the '#' symbol; the aggregate parameter must not be used outside the aggregator call. The
23 * other parameters of the call might be bound or unbound; bound parameters limit the matches to consider for the
24 * minimum calculation.
25 *
26 * @since 1.4
27 * @author Gabor Bergmann
28 */
29@AggregatorType(
30 // TODO T extends Comparable?
31 parameterTypes = {BigDecimal.class, BigInteger.class, Boolean.class, Byte.class, Calendar.class, Character.class,
32 Date.class, Double.class, Enum.class, Float.class, Integer.class, Long.class, Short.class, String.class},
33 returnTypes = {BigDecimal.class, BigInteger.class, Boolean.class, Byte.class, Calendar.class, Character.class,
34 Date.class, Double.class, Enum.class, Float.class, Integer.class, Long.class, Short.class, String.class})
35public final class max implements IAggregatorFactory {
36
37 @Override
38 public BoundAggregator getAggregatorLogic(Class<?> domainClass) {
39 if (Comparable.class.isAssignableFrom(domainClass))
40 return new BoundAggregator(ExtremumOperator.getMax(), domainClass, domainClass);
41 else throw new IllegalArgumentException();
42 }
43
44}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/min.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/min.java
new file mode 100644
index 00000000..6408c57b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/min.java
@@ -0,0 +1,44 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import java.math.BigDecimal;
12import java.math.BigInteger;
13import java.util.Calendar;
14import java.util.Date;
15
16import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AggregatorType;
17import tools.refinery.viatra.runtime.matchers.psystem.aggregations.BoundAggregator;
18import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IAggregatorFactory;
19
20/**
21 * This aggregator calculates the minimum value of a selected aggregate parameter of a called pattern. The aggregate
22 * parameter is selected with the '#' symbol; the aggregate parameter must not be used outside the aggregator call. The
23 * other parameters of the call might be bound or unbound; bound parameters limit the matches to consider for the
24 * minimum calculation.
25 *
26 * @since 1.4
27 *
28 */
29@AggregatorType(
30 // TODO T extends Comparable?
31 parameterTypes = {BigDecimal.class, BigInteger.class, Boolean.class, Byte.class, Calendar.class, Character.class,
32 Date.class, Double.class, Enum.class, Float.class, Integer.class, Long.class, Short.class, String.class},
33 returnTypes = {BigDecimal.class, BigInteger.class, Boolean.class, Byte.class, Calendar.class, Character.class,
34 Date.class, Double.class, Enum.class, Float.class, Integer.class, Long.class, Short.class, String.class})
35public final class min implements IAggregatorFactory {
36
37 @Override
38 public BoundAggregator getAggregatorLogic(Class<?> domainClass) {
39 if (Comparable.class.isAssignableFrom(domainClass))
40 return new BoundAggregator(ExtremumOperator.getMin(), domainClass, domainClass);
41 else throw new IllegalArgumentException();
42 }
43
44}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/sum.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/sum.java
new file mode 100644
index 00000000..69ff2e75
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/aggregators/sum.java
@@ -0,0 +1,39 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.aggregators;
10
11import tools.refinery.viatra.runtime.matchers.psystem.aggregations.AggregatorType;
12import tools.refinery.viatra.runtime.matchers.psystem.aggregations.BoundAggregator;
13import tools.refinery.viatra.runtime.matchers.psystem.aggregations.IAggregatorFactory;
14
15/**
16 * This aggregator calculates the sum of the values of a selected aggregate parameter of a called pattern. The aggregate
17 * parameter is selected with the '#' symbol; the aggregate parameter must not be used outside the aggregator call. The
18 * other parameters of the call might be bound or unbound; bound parameters limit the matches to consider for the
19 * summation.
20 *
21 * @since 1.4
22 *
23 */
24@AggregatorType(
25 parameterTypes = {Integer.class, Double.class, Long.class},
26 returnTypes = {Integer.class, Double.class, Long.class})
27public final class sum implements IAggregatorFactory {
28
29 @Override
30 public BoundAggregator getAggregatorLogic(Class<?> domainClass) {
31 if (Integer.class.equals(domainClass))
32 return new BoundAggregator(IntegerSumOperator.INSTANCE, Integer.class, Integer.class);
33 if (Double.class.equals(domainClass))
34 return new BoundAggregator(DoubleSumOperator.INSTANCE, Double.class, Double.class);
35 if (Long.class.equals(domainClass))
36 return new BoundAggregator(LongSumOperator.INSTANCE, Long.class, Long.class);
37 else throw new IllegalArgumentException();
38 }
39}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/OrderedIterableMerge.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/OrderedIterableMerge.java
new file mode 100644
index 00000000..1917e909
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/OrderedIterableMerge.java
@@ -0,0 +1,83 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.algorithms;
10
11import java.util.Comparator;
12import java.util.Iterator;
13import java.util.NoSuchElementException;
14
15/**
16 * @author Gabor Bergmann
17 * @since 2.1
18 *
19 */
20public class OrderedIterableMerge {
21
22 private OrderedIterableMerge() {
23 // Hidden utility class constructor
24 }
25
26 /**
27 * Lazily merges two iterables, each ordered according to a given comparator.
28 * Retains order in the result, and also eliminates any duplicates that appear in both arguments.
29 */
30 public static <T> Iterable<T> mergeUniques(Iterable<T> first, Iterable<T> second, Comparator<T> comparator) {
31 return () -> new Iterator<T>() {
32 Iterator<T> firstIterator = first.iterator();
33 Iterator<T> secondIterator = second.iterator();
34 T firstItem;
35 T secondItem;
36
37 {
38 fetchFirst();
39 fetchSecond();
40 }
41
42 private T fetchFirst() {
43 T previous = firstItem;
44 if (firstIterator.hasNext())
45 firstItem = firstIterator.next();
46 else
47 firstItem = null;
48 return previous;
49 }
50 private T fetchSecond() {
51 T previous = secondItem;
52 if (secondIterator.hasNext())
53 secondItem = secondIterator.next();
54 else
55 secondItem = null;
56 return previous;
57 }
58
59 @Override
60 public boolean hasNext() {
61 return firstItem != null || secondItem != null;
62 }
63 @Override
64 public T next() {
65 if (!hasNext()) throw new NoSuchElementException();
66 if (firstItem != null && secondItem != null) {
67 if (secondItem == firstItem) { // duplicates
68 fetchFirst();
69 return fetchSecond();
70 } else if (comparator.compare(firstItem, secondItem) < 0) {
71 return fetchFirst();
72 } else {
73 return fetchSecond();
74 }
75 } else if (firstItem != null) {
76 return fetchFirst();
77 } else { // secondItem must be non-null
78 return fetchSecond();
79 }
80 }
81 };
82 }
83}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFind.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFind.java
new file mode 100644
index 00000000..c69f08e5
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFind.java
@@ -0,0 +1,214 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.algorithms;
11
12import java.util.Collection;
13import java.util.HashSet;
14import java.util.Iterator;
15import java.util.Map;
16import java.util.Set;
17
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
19
20/**
21 * Union-find data structure implementation. Note that the implementation relies on the correct implementation of the
22 * equals method of the type parameter's class.
23 *
24 * @author Tamas Szabo
25 *
26 * @param <V>
27 * the type parameter of the element's stored in the union-find data structure
28 */
29public class UnionFind<V> {
30
31 private final Map<V, UnionFindNodeProperty<V>> nodeMap;
32 final Map<V, Set<V>> setMap;
33
34 /**
35 * Instantiate a new union-find data structure.
36 */
37 public UnionFind() {
38 nodeMap = CollectionsFactory.createMap();
39 setMap = CollectionsFactory.createMap();
40 }
41
42 /**
43 * Instantiate a new union-find data structure with the given elements as separate sets.
44 */
45 public UnionFind(Iterable<V> elements) {
46 this();
47 for (V element : elements) {
48 makeSet(element);
49 }
50 }
51
52 /**
53 * Creates a new union set from a collection of elements.
54 *
55 * @param nodes
56 * the collection of elements
57 * @return the root element
58 */
59 public V makeSet(Collection<V> nodes) {
60 if (!nodes.isEmpty()) {
61 Iterator<V> iterator = nodes.iterator();
62 V root = makeSet(iterator.next());
63 while (iterator.hasNext()) {
64 root = union(root, iterator.next());
65 }
66 return root;
67 } else {
68 return null;
69 }
70 }
71
72 /**
73 * This method creates a single set containing the given node.
74 *
75 * @param node
76 * the root node of the set
77 * @return the root element
78 */
79 public V makeSet(V node) {
80 if (!nodeMap.containsKey(node)) {
81 UnionFindNodeProperty<V> prop = new UnionFindNodeProperty<V>(0, node);
82 nodeMap.put(node, prop);
83 Set<V> set = new HashSet<V>();
84 set.add(node);
85 setMap.put(node, set);
86 }
87 return node;
88 }
89
90 /**
91 * Find method with path compression.
92 *
93 * @param node
94 * the node to find
95 * @return the root node of the set in which the given node can be found
96 */
97 public V find(V node) {
98 UnionFindNodeProperty<V> prop = nodeMap.get(node);
99
100 if (prop != null) {
101 if (prop.parent.equals(node)) {
102 return node;
103 } else {
104 prop.parent = find(prop.parent);
105 return prop.parent;
106 }
107 }
108 return null;
109 }
110
111 /**
112 * Union by rank implementation of the two sets which contain x and y; x and/or y can be a single element from the
113 * universe.
114 *
115 * @param x
116 * set or single element of the universe
117 * @param y
118 * set or single element of the universe
119 * @return the new root of the two sets
120 */
121 public V union(V x, V y) {
122 V xRoot = find(x);
123 V yRoot = find(y);
124
125 if ((xRoot == null) || (yRoot == null)) {
126 return union( (xRoot == null) ? makeSet(x) : xRoot, (yRoot == null) ? makeSet(y) : yRoot);
127 }
128 else if (!xRoot.equals(yRoot)) {
129 UnionFindNodeProperty<V> xRootProp = nodeMap.get(xRoot);
130 UnionFindNodeProperty<V> yRootProp = nodeMap.get(yRoot);
131
132 if (xRootProp.rank < yRootProp.rank) {
133 xRootProp.parent = yRoot;
134 setMap.get(yRoot).addAll(setMap.get(xRoot));
135 setMap.remove(xRoot);
136 return yRoot;
137 } else {// (xRootProp.rank >= yRootProp.rank)
138 yRootProp.parent = xRoot;
139 yRootProp.rank = (xRootProp.rank == yRootProp.rank) ? yRootProp.rank + 1 : yRootProp.rank;
140 setMap.get(xRoot).addAll(setMap.get(yRoot));
141 setMap.remove(yRoot);
142 return xRoot;
143 }
144 } else {
145 return xRoot;
146 }
147 }
148
149 /**
150 * Places the given elements in to the same partition.
151 */
152 public void unite(Set<V> elements) {
153 if (elements.size() > 1) {
154 V current = null;
155 for (V element : elements) {
156 if (current != null) {
157 if (getPartition(element) != null) {
158 union(current, element);
159 }
160 } else {
161 if (getPartition(element) != null) {
162 current = element;
163 }
164 }
165 }
166 }
167 }
168
169 /**
170 * Delete the set whose root is the given node.
171 *
172 * @param root
173 * the root node
174 */
175 public void deleteSet(V root) {
176 // if (setMap.containsKey(root))
177 for (V n : setMap.get(root)) {
178 nodeMap.remove(n);
179 }
180 setMap.remove(root);
181 }
182
183 /**
184 * Returns if all given elements are in the same partition.
185 */
186 public boolean isSameUnion(Set<V> elements) {
187 for (Set<V> partition : setMap.values()) {
188 if (partition.containsAll(elements)) {
189 return true;
190 }
191 }
192 return false;
193 }
194
195
196 /**
197 * Returns the partition in which the given element can be found, or null otherwise.
198 */
199 public Set<V> getPartition(V element) {
200 V root = find(element);
201 return setMap.get(root);
202 }
203
204 /**
205 * Returns all partitions.
206 */
207 public Collection<Set<V>> getPartitions() {
208 return setMap.values();
209 }
210
211 public Set<V> getPartitionHeads() {
212 return setMap.keySet();
213 }
214}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFindNodeProperty.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFindNodeProperty.java
new file mode 100644
index 00000000..82852f9c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/algorithms/UnionFindNodeProperty.java
@@ -0,0 +1,32 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.algorithms;
11
12public class UnionFindNodeProperty<V> {
13
14 public int rank;
15 public V parent;
16
17 public UnionFindNodeProperty() {
18 this.rank = 0;
19 this.parent = null;
20 }
21
22 public UnionFindNodeProperty(int rank, V parent) {
23 super();
24 this.rank = rank;
25 this.parent = parent;
26 }
27
28 @Override
29 public String toString() {
30 return "[rank:" + rank + ", parent:" + parent.toString() + "]";
31 }
32}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/CommonQueryHintOptions.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/CommonQueryHintOptions.java
new file mode 100644
index 00000000..317293bf
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/CommonQueryHintOptions.java
@@ -0,0 +1,36 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IRewriterTraceCollector;
12import tools.refinery.viatra.runtime.matchers.psystem.rewriters.NopTraceCollector;
13
14/**
15 * Query evaluation hints applicable to any engine
16 * @since 1.6
17 *
18 */
19public final class CommonQueryHintOptions {
20
21 private CommonQueryHintOptions() {
22 // Hiding constructor for utility class
23 }
24
25 /**
26 * This hint instructs the query backends to record trace information into the given trace collector
27 */
28 public static final QueryHintOption<IRewriterTraceCollector> normalizationTraceCollector =
29 hintOption("normalizationTraceCollector", NopTraceCollector.INSTANCE);
30
31 // internal helper for conciseness
32 private static <T> QueryHintOption<T> hintOption(String hintKeyLocalName, T defaultValue) {
33 return new QueryHintOption<>(CommonQueryHintOptions.class, hintKeyLocalName, defaultValue);
34 }
35
36}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ICallDelegationStrategy.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ICallDelegationStrategy.java
new file mode 100644
index 00000000..40853f46
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ICallDelegationStrategy.java
@@ -0,0 +1,89 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import tools.refinery.viatra.runtime.matchers.context.IQueryResultProviderAccess;
12import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
13import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
14
15/**
16 * Function object that specifies how hints (including backend preferences) shall propagate through pattern calls.
17 *
18 * <p> A few useful default implementations are included as static fields.
19 *
20 * <p> As of 2.1, only suppported by the local search backend, and only if the pattern call is not flattened.
21 *
22 * @author Gabor Bergmann
23 * @since 2.1
24 */
25@FunctionalInterface
26public interface ICallDelegationStrategy {
27
28 /**
29 * Specifies how hints (including backend preferences) shall propagate through pattern calls.
30 *
31 * @param call a {@link PConstraint} in a query that calls another query.
32 * @param callerHint a hint under which the calling pattern is evaluated,
33 * @param callerBackend the actual backend evaluating the calling pattern.
34 * @param calleeHintProvider the provider of hints for the called pattern.
35 * @return the hints, including backend selection,
36 * that the backend responsible for the caller pattern must specify when
37 * requesting the {@link IQueryResultProvider} for the called pattern via {@link IQueryResultProviderAccess}.
38 */
39 public QueryEvaluationHint transformHints(IQueryReference call,
40 QueryEvaluationHint callerHint,
41 IQueryBackend callerBackend,
42 IQueryBackendHintProvider calleeHintProvider);
43
44
45 /**
46 * Options known for callee are used to override caller options, except the backend selection.
47 * Always use the same backend for the callee and the caller, regardless what is specified for the callee pattern.
48 * @author Gabor Bergmann
49 */
50 public static final ICallDelegationStrategy FULL_BACKEND_ADHESION = (call, callerHint, callerBackend, calleeHintProvider) -> {
51 QueryEvaluationHint calleeHint =
52 calleeHintProvider.getQueryEvaluationHint(call.getReferredQuery());
53 QueryEvaluationHint result =
54 callerHint == null ? calleeHint : callerHint.overrideBy(calleeHint);
55
56 QueryEvaluationHint backendAdhesion = new QueryEvaluationHint(
57 null /* settings-ignorant */, callerBackend.getFactory());
58 result = result.overrideBy(backendAdhesion);
59 return result;
60 };
61 /**
62 * Options known for callee are used to override caller options, including the backend selection.
63 * If callee does not specify a backend requirement, the backend of the caller is kept.
64 * @author Gabor Bergmann
65 */
66 public static final ICallDelegationStrategy PARTIAL_BACKEND_ADHESION = (call, callerHint, callerBackend, calleeHintProvider) -> {
67 QueryEvaluationHint backendAdhesion = new QueryEvaluationHint(
68 null /* settings-ignorant */, callerBackend.getFactory());
69
70 QueryEvaluationHint result =
71 callerHint == null ? backendAdhesion : callerHint.overrideBy(backendAdhesion);
72
73 QueryEvaluationHint calleeHint = calleeHintProvider.getQueryEvaluationHint(call.getReferredQuery());
74 result = result.overrideBy(calleeHint);
75
76 return result;
77 };
78 /**
79 * Options known for callee are used to override caller options, including the backend selection.
80 * Always use the backend specified for the callee (or the default if none), regardless of the backend of the caller.
81 * @author Gabor Bergmann
82 */
83 public static final ICallDelegationStrategy NO_BACKEND_ADHESION = (call, callerHint, callerBackend, calleeHintProvider) -> {
84 QueryEvaluationHint calleeHint = calleeHintProvider.getQueryEvaluationHint(call.getReferredQuery());
85 return callerHint == null ? calleeHint : callerHint.overrideBy(calleeHint);
86 };
87
88
89}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IMatcherCapability.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IMatcherCapability.java
new file mode 100644
index 00000000..104b68a8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IMatcherCapability.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11/**
12 * Implementations of this interface can be used to decide whether a matcher created by an arbitrary backend can
13 * potentially be used as a substitute for another matcher.
14 *
15 * @author Grill Balázs
16 * @since 1.4
17 *
18 */
19public interface IMatcherCapability {
20
21 /**
22 * Returns true if matchers of this capability can be used as a substitute for a matcher implementing the given capability
23 */
24 public boolean canBeSubstitute(IMatcherCapability capability);
25
26}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackend.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackend.java
new file mode 100644
index 00000000..c85f10a4
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackend.java
@@ -0,0 +1,68 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
12import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
13
14/**
15 * Internal interface for a VIATRA query specification. Each query is associated with a pattern. Methods instantiate a matcher
16 * of the pattern with various parameters.
17 *
18 * @author Bergmann Gábor
19 * @since 0.9
20 * @noextend This interface is not intended to be extended by users of the VIATRA framework, and should only be used by the query engine
21 */
22public interface IQueryBackend {
23
24 /**
25 * @return true iff this backend is incremental, i.e. it caches the results of queries for quick retrieval,
26 * and can provide update notifications on result set changes.
27 */
28 public boolean isCaching();
29
30 /**
31 * Returns a result provider for a given query. Repeated calls may return the same instance.
32 * @throws ViatraQueryRuntimeException
33 */
34 public IQueryResultProvider getResultProvider(PQuery query);
35
36 /**
37 * Returns a result provider for a given query. Repeated calls may return the same instance.
38 * @param optional hints that may override engine and query defaults (as provided by {@link IQueryBackendHintProvider}). Can be null.
39 * @throws ViatraQueryRuntimeException
40 * @since 1.4
41 */
42 public IQueryResultProvider getResultProvider(PQuery query, QueryEvaluationHint hints);
43
44 /**
45 * Returns an existing result provider for a given query, if it was previously constructed, returns null otherwise.
46 * Will not construct and initialize new result providers.
47 */
48 public IQueryResultProvider peekExistingResultProvider(PQuery query);
49
50 /**
51 * Propagates all pending updates in this query backend. The implementation of this method is optional, and it
52 * can be ignored entirely if the backend does not delay updates.
53 * @since 1.6
54 */
55 public void flushUpdates();
56
57 /**
58 * Disposes the query backend.
59 */
60 public abstract void dispose();
61
62 /**
63 * @return the factory that created this backend, if this functionality is supported
64 * @since 2.1
65 */
66 public IQueryBackendFactory getFactory();
67
68}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactory.java
new file mode 100644
index 00000000..e264ab3f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactory.java
@@ -0,0 +1,52 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
12import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
13
14/**
15 * A Query Backend Factory identifies a query evaluator implementation, and can create an evaluator instance (an {@link IQueryBackend}) tied to a specific VIATRA Query engine upon request.
16 *
17 * <p> The factory is used as a lookup key for the backend instance,
18 * therefore implementors should either be singletons, or implement equals() / hashCode() accordingly.
19 *
20 * @author Bergmann Gabor
21 *
22 */
23public interface IQueryBackendFactory {
24
25 /**
26 * Creates a new {@link IQueryBackend} instance tied to the given context elements.
27 *
28 * @return an instance of the class returned by {@link #getBackendClass()} that operates in the given context.
29 * @since 1.5
30 */
31 public IQueryBackend
32 create(IQueryBackendContext context);
33
34
35 /**
36 * The backend instances created by this factory are guaranteed to conform to the returned class.
37 */
38 public Class<? extends IQueryBackend> getBackendClass();
39
40 /**
41 * Calculate the required capabilities, which are needed to execute the given pattern
42 *
43 * @since 1.4
44 */
45 public IMatcherCapability calculateRequiredCapability(PQuery query, QueryEvaluationHint hint);
46
47 /**
48 * Returns whether the current backend is caching
49 * @since 2.0
50 */
51 public boolean isCaching();
52}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactoryProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactoryProvider.java
new file mode 100644
index 00000000..8787814e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendFactoryProvider.java
@@ -0,0 +1,46 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11/**
12 * A provider interface for {@link IQueryBackendFactory} instances.
13 * @since 2.0
14 */
15public interface IQueryBackendFactoryProvider {
16
17 /**
18 * Returns a query backend factory instance. The method should return the same instance in case of repeated calls.
19 */
20 IQueryBackendFactory getFactory();
21
22 /**
23 * Returns whether the given query backend should be considered as system default. If multiple backends are
24 * registered as system default, it is undefined which one will be chosen.
25 */
26 default boolean isSystemDefaultEngine() {
27 return false;
28 }
29
30 /**
31 * Returns whether the given query backend should be considered as system default search backend. If multiple
32 * backends are registered as system default, it is undefined which one will be chosen.
33 */
34 default boolean isSystemDefaultSearchBackend() {
35 return false;
36 }
37
38
39 /**
40 * Returns whether the given query backend should be considered as system default caching backend. If multiple
41 * backends are registered as system default, it is undefined which one will be chosen.
42 */
43 default boolean isSystemDefaultCachingBackend() {
44 return false;
45 }
46}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendHintProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendHintProvider.java
new file mode 100644
index 00000000..9bb76349
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryBackendHintProvider.java
@@ -0,0 +1,32 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
12
13/**
14 * Provides query evaluation hints consisting of the Engine default hints and
15 * the hints provided by the pattern itself.
16 *
17 * @author Bergmann Gabor
18 * @since 0.9
19 * @noimplement This interface is not intended to be implemented by clients, except in the tools.refinery.viatra.runtime plugin.
20 */
21public interface IQueryBackendHintProvider {
22
23 /**
24 * Suggests query evaluation hints regarding a query. The returned hints reflects the default hints of the
25 * query engine merged with the hints provided by the pattern itself. These can be overridden via specific
26 * advanced API of the engine.
27 *
28 * @since 1.4
29 */
30 QueryEvaluationHint getQueryEvaluationHint(PQuery query);
31
32}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryResultProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryResultProvider.java
new file mode 100644
index 00000000..cd7d050f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IQueryResultProvider.java
@@ -0,0 +1,202 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import java.util.Optional;
12import java.util.stream.Stream;
13
14import tools.refinery.viatra.runtime.matchers.planning.helpers.StatisticsHelper;
15import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.util.Accuracy;
19
20/**
21 * An internal interface of the query backend that provides results of a given query.
22 * @author Bergmann Gabor
23 * @noimplement This interface is not intended to be implemented by clients.
24 */
25public interface IQueryResultProvider {
26
27 /**
28 * Decides whether there are any matches of the pattern that conform to the given fixed values of some parameters.
29 *
30 * @param parameters
31 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
32 * @pre size of input array must be equal to the number of parameters.
33 * @since 2.0
34 */
35 public boolean hasMatch(Object[] parameters);
36
37 /**
38 * Decides whether there are any matches of the pattern that conform to the given fixed values of some parameters.
39 *
40 * @param parameterSeedMask
41 * a mask that extracts those parameters of the query (from the entire parameter list) that should be
42 * bound to a fixed value
43 * @param parameters
44 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
45 * parameterSeedMask, so that for each considered match tuple,
46 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold
47 * @since 2.0
48 */
49 public boolean hasMatch(TupleMask parameterSeedMask, ITuple projectedParameterSeed);
50
51 /**
52 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
53 *
54 * @param parameters
55 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
56 * @pre size of input array must be equal to the number of parameters.
57 * @return the number of pattern matches found.
58 */
59 public int countMatches(Object[] parameters);
60
61 /**
62 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
63 *
64 * @param parameterSeedMask
65 * a mask that extracts those parameters of the query (from the entire parameter list) that should be
66 * bound to a fixed value
67 * @param parameters
68 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
69 * parameterSeedMask, so that for each considered match tuple,
70 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold
71 * @return the number of pattern matches found.
72 * @since 1.7
73 */
74 public int countMatches(TupleMask parameterSeedMask, ITuple projectedParameterSeed);
75
76 /**
77 * Gives an estimate of the number of different groups the matches are projected into by the given mask
78 * (e.g. for an identity mask, this means the full match set size). The estimate must meet the required accuracy.
79 *
80 * <p> If there is insufficient information to provide an answer up to the required precision, {@link Optional#empty()} may be returned.
81 * In other words, query backends may deny an answer, or do their best to give an estimate without actually determining the match set of the query.
82 * However, caching backends are expected to simply return the indexed (projection) size, initialized on-demand if necessary.
83 *
84 * <p> PRE: {@link TupleMask#isNonrepeating()} must hold for the group mask.
85 *
86 * @return if available, an estimate of the cardinality of the projection of the match set, with the desired accuracy.
87 *
88 * @since 2.1
89 */
90 public Optional<Long> estimateCardinality(TupleMask groupMask, Accuracy requiredAccuracy);
91
92 /**
93 * Gives an estimate of the average size of different groups the matches are projected into by the given mask
94 * (e.g. for an identity mask, this means 1, while for an empty mask, the result is match set size).
95 * The estimate must meet the required accuracy.
96 *
97 * <p> If there is insufficient information to provide an answer up to the required precision, {@link Optional#empty()} may be returned.
98 * In other words, query backends may deny an answer, or do their best to give an estimate without actually determining the match set of the query.
99 * However, caching backends are expected to simply return the exact value from the index, initialized on-demand if necessary.
100 *
101 * <p> For an empty match set, zero is acceptable as an exact answer.
102 *
103 * <p> PRE: {@link TupleMask#isNonrepeating()} must hold for the group mask.
104 *
105 * @return if available, an estimate of the average size of each projection group of the match set, with the desired accuracy.
106 *
107 * @since 2.1
108 */
109 public default Optional<Double> estimateAverageBucketSize(TupleMask groupMask, Accuracy requiredAccuracy) {
110 return StatisticsHelper.estimateAverageBucketSize(groupMask, requiredAccuracy, this::estimateCardinality);
111 }
112
113 /**
114 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
115 * Neither determinism nor randomness of selection is guaranteed.
116 *
117 * @param parameters
118 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
119 * @pre size of input array must be equal to the number of parameters.
120 * @return a match represented in the internal {@link Tuple} representation.
121 * @since 2.0
122 */
123 public Optional<Tuple> getOneArbitraryMatch(Object[] parameters);
124
125 /**
126 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
127 * Neither determinism nor randomness of selection is guaranteed.
128 *
129 * @param parameterSeedMask
130 * a mask that extracts those parameters of the query (from the entire parameter list) that should be
131 * bound to a fixed value
132 * @param parameters
133 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
134 * parameterSeedMask, so that for each considered match tuple,
135 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold
136 * @return a match represented in the internal {@link Tuple} representation.
137 * @since 2.0
138 */
139 public Optional<Tuple> getOneArbitraryMatch(TupleMask parameterSeedMask, ITuple parameters);
140
141 /**
142 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
143 *
144 * @param parameters
145 * array where each non-null element binds the corresponding pattern parameter to a fixed value.
146 * @pre size of input array must be equal to the number of parameters.
147 * @return matches represented in the internal {@link Tuple} representation.
148 * @since 2.0
149 */
150 public Stream<Tuple> getAllMatches(Object[] parameters);
151
152 /**
153 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
154 *
155 * @param parameterSeedMask
156 * a mask that extracts those parameters of the query (from the entire parameter list) that should be
157 * bound to a fixed value
158 * @param parameters
159 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
160 * parameterSeedMask, so that for each considered match tuple,
161 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold
162 * @return matches represented in the internal {@link Tuple} representation.
163 * @since 2.0
164 */
165 public Stream<Tuple> getAllMatches(TupleMask parameterSeedMask, ITuple parameters);
166
167 /**
168 * The underlying query evaluator backend.
169 */
170 public IQueryBackend getQueryBackend();
171
172 /**
173 * Internal method that registers low-level callbacks for match appearance and disappearance.
174 *
175 * <p>
176 * <b>Caution: </b> This is a low-level callback that is invoked when the pattern matcher is not necessarily in a
177 * consistent state yet. Importantly, no model modification permitted during the callback.
178 *
179 * <p>
180 * The callback can be unregistered via invoking {@link #removeUpdateListener(Object)} with the same tag.
181 *
182 * @param listener
183 * the listener that will be notified of each new match that appears or disappears, starting from now.
184 * @param listenerTag
185 * a tag by which to identify the listener for later removal by {@link #removeUpdateListener(Object)}.
186 * @param fireNow
187 * if true, the insertion update allback will be immediately invoked on all current matches as a one-time effect.
188 *
189 * @throws UnsupportedOperationException if this is a non-incremental backend
190 * (i.e. {@link IQueryBackend#isCaching()} on {@link #getQueryBackend()} returns false)
191 */
192 public void addUpdateListener(final IUpdateable listener, final Object listenerTag, boolean fireNow);
193
194 /**
195 * Removes an existing listener previously registered with the given tag.
196 *
197 * @throws UnsupportedOperationException if this is a non-incremental backend
198 * (i.e. {@link IQueryBackend#isCaching()} on {@link #getQueryBackend()} returns false)
199 */
200 public void removeUpdateListener(final Object listenerTag);
201
202}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IUpdateable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IUpdateable.java
new file mode 100644
index 00000000..baf7144a
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/IUpdateable.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12
13/**
14 * Internal interface for the query backend to singal an update to a query result.
15 * @author Bergmann Gabor
16 * @since 0.9
17 *
18 */
19public interface IUpdateable {
20
21 /**
22 * This callback method must be free of exceptions, even {@link RuntimeException}s (though not {@link Error}s).
23 * @param updateElement the tuple that is changed
24 * @param isInsertion true if the tuple appeared in the result set, false if disappeared from the result set
25 */
26 public void update(Tuple updateElement, boolean isInsertion);
27}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryEvaluationHint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryEvaluationHint.java
new file mode 100644
index 00000000..eab92128
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryEvaluationHint.java
@@ -0,0 +1,241 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import java.util.AbstractMap;
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.Map;
15import java.util.Objects;
16import java.util.stream.Collectors;
17
18import tools.refinery.viatra.runtime.matchers.util.Preconditions;
19
20/**
21 * Provides VIATRA Query with additional hints on how a query should be evaluated. The same hint can be provided to multiple queries.
22 *
23 * <p> This class is immutable. Overriding options will create a new instance.
24 *
25 * <p>
26 * Here be dragons: for advanced users only.
27 *
28 * @author Bergmann Gabor
29 *
30 */
31public class QueryEvaluationHint {
32
33 /**
34 * @since 2.0
35 *
36 */
37 public enum BackendRequirement {
38 /**
39 * The current hint does not specify any backend requirement
40 */
41 UNSPECIFIED,
42 /**
43 * The current hint specifies that the default search backend of the engine should be used
44 */
45 DEFAULT_SEARCH,
46 /**
47 * The current hint specifies that the default caching backend of the engine should be used
48 */
49 DEFAULT_CACHING,
50 /**
51 * The current hint specifies that a specific backend is to be used
52 */
53 SPECIFIC
54 }
55
56 final IQueryBackendFactory queryBackendFactory;
57 final Map<QueryHintOption<?>, Object> backendHintSettings;
58 final BackendRequirement requirement;
59
60 /**
61 * Specifies the suggested query backend requirements, and value settings for additional backend-specific options.
62 *
63 * <p>
64 * The backend requirement type must not be {@link BackendRequirement#SPECIFIC} - for that case, use the constructor
65 * {@link #QueryEvaluationHint(Map, IQueryBackendFactory)}.
66 *
67 * @param backendHintSettings
68 * if non-null, each entry in the map overrides backend-specific options regarding query evaluation
69 * (null-valued map entries permitted to erase hints); passing null means default options associated with
70 * the query
71 * @param backendRequirementType
72 * defines the kind of backend requirement
73 * @since 2.0
74 */
75 public QueryEvaluationHint(Map<QueryHintOption<?>, Object> backendHintSettings, BackendRequirement backendRequirementType) {
76 super();
77 Preconditions.checkArgument(backendRequirementType != null, "Specific requirement needs to be set");
78 Preconditions.checkArgument(backendRequirementType != BackendRequirement.SPECIFIC, "Specific backend requirement needs providing a corresponding backend type");
79 this.queryBackendFactory = null;
80 this.requirement = backendRequirementType;
81 this.backendHintSettings = (backendHintSettings == null)
82 ? Collections.<QueryHintOption<?>, Object> emptyMap()
83 : new HashMap<>(backendHintSettings);
84 }
85
86 /**
87 * Specifies the suggested query backend, and value settings for additional backend-specific options. The first
88 * parameter can be null; if the second parameter is null, it is expected that the other constructor is called
89 * instead with a {@link BackendRequirement#UNSPECIFIED} parameter.
90 *
91 * @param backendHintSettings
92 * if non-null, each entry in the map overrides backend-specific options regarding query evaluation
93 * (null-valued map entries permitted to erase hints); passing null means default options associated with
94 * the query
95 * @param queryBackendFactory
96 * overrides the query evaluator algorithm; passing null retains the default algorithm associated with
97 * the query
98 * @since 1.5
99 */
100 public QueryEvaluationHint(
101 Map<QueryHintOption<?>, Object> backendHintSettings,
102 IQueryBackendFactory queryBackendFactory) {
103 super();
104 this.queryBackendFactory = queryBackendFactory;
105 this.requirement = (queryBackendFactory == null) ? BackendRequirement.UNSPECIFIED : BackendRequirement.SPECIFIC;
106 this.backendHintSettings = (backendHintSettings == null)
107 ? Collections.<QueryHintOption<?>, Object> emptyMap()
108 : new HashMap<>(backendHintSettings);
109 }
110
111 /**
112 * Returns the backend requirement described by this hint. If a specific backend is required, that can be queried by {@link #getQueryBackendFactory()}.
113 * @since 2.0
114 */
115 public BackendRequirement getQueryBackendRequirementType() {
116 return requirement;
117 }
118
119 /**
120 * A suggestion for choosing the query evaluator algorithm.
121 *
122 * <p>
123 * Returns null iff {@link #getQueryBackendRequirementType()} does not return {@link BackendRequirement#SPECIFIC};
124 * in such cases a corresponding default backend is selected inside the engine
125 */
126 public IQueryBackendFactory getQueryBackendFactory() {
127 return queryBackendFactory;
128 }
129
130 /**
131 * Each entry in the immutable map overrides backend-specific options regarding query evaluation.
132 *
133 * <p>The map is non-null, even if empty.
134 * Null-valued map entries are also permitted to erase hints via {@link #overrideBy(QueryEvaluationHint)}.
135 *
136 * @since 1.5
137 */
138 public Map<QueryHintOption<?>, Object> getBackendHintSettings() {
139 return backendHintSettings;
140 }
141
142
143 /**
144 * Override values in this hint and return a consolidated instance.
145 *
146 * @since 1.4
147 */
148 public QueryEvaluationHint overrideBy(QueryEvaluationHint overridingHint){
149 if (overridingHint == null)
150 return this;
151
152 BackendRequirement overriddenRequirement = this.getQueryBackendRequirementType();
153 if (overridingHint.getQueryBackendRequirementType() != BackendRequirement.UNSPECIFIED) {
154 overriddenRequirement = overridingHint.getQueryBackendRequirementType();
155 }
156 Map<QueryHintOption<?>, Object> hints = new HashMap<>(this.getBackendHintSettings());
157 if (overridingHint.getBackendHintSettings() != null) {
158 hints.putAll(overridingHint.getBackendHintSettings());
159 }
160 if (overriddenRequirement == BackendRequirement.SPECIFIC) {
161 IQueryBackendFactory factory = this.getQueryBackendFactory();
162 if (overridingHint.getQueryBackendFactory() != null) {
163 factory = overridingHint.getQueryBackendFactory();
164 }
165 return new QueryEvaluationHint(hints, factory);
166 } else {
167 return new QueryEvaluationHint(hints, overriddenRequirement);
168 }
169 }
170
171 /**
172 * Returns whether the given hint option is overridden.
173 * @since 1.5
174 */
175 public boolean isOptionOverridden(QueryHintOption<?> option) {
176 return getBackendHintSettings().containsKey(option);
177 }
178
179 /**
180 * Returns the value of the given hint option from the given hint collection, or null if not defined.
181 * @since 1.5
182 */
183 @SuppressWarnings("unchecked")
184 public <HintValue> HintValue getValueOrNull(QueryHintOption<HintValue> option) {
185 return (HintValue) getBackendHintSettings().get(option);
186 }
187
188 /**
189 * Returns the value of the given hint option from the given hint collection, or the default value if not defined.
190 * Intended to be called by backends to find out the definitive value that should be considered.
191 * @since 1.5
192 */
193 public <HintValue> HintValue getValueOrDefault(QueryHintOption<HintValue> option) {
194 return option.getValueOrDefault(this);
195 }
196
197 @Override
198 public int hashCode() {
199 return Objects.hash(backendHintSettings, queryBackendFactory, requirement);
200 }
201
202 @Override
203 public boolean equals(Object obj) {
204 if (this == obj)
205 return true;
206 if (obj == null)
207 return false;
208 if (getClass() != obj.getClass())
209 return false;
210 QueryEvaluationHint other = (QueryEvaluationHint) obj;
211 return Objects.equals(backendHintSettings, other.backendHintSettings)
212 &&
213 Objects.equals(queryBackendFactory, other.queryBackendFactory)
214 &&
215 Objects.equals(requirement, other.requirement)
216 ;
217 }
218
219 @Override
220 public String toString() {
221 StringBuilder sb = new StringBuilder();
222
223 if (getQueryBackendFactory() != null)
224 sb.append("backend: ").append(getQueryBackendFactory().getBackendClass().getSimpleName());
225 if (! backendHintSettings.isEmpty()) {
226 sb.append("hints: ");
227 if(backendHintSettings instanceof AbstractMap){
228 sb.append(backendHintSettings.toString());
229 } else {
230 // we have to iterate on the contents
231
232 String joinedHintMap = backendHintSettings.entrySet().stream()
233 .map(setting -> setting.getKey() + "=" + setting.getValue()).collect(Collectors.joining(", "));
234 sb.append('{').append(joinedHintMap).append('}');
235 }
236 }
237
238 final String result = sb.toString();
239 return result.isEmpty() ? "defaults" : result;
240 }
241}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryHintOption.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryHintOption.java
new file mode 100644
index 00000000..2c6bb4de
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/QueryHintOption.java
@@ -0,0 +1,122 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import java.util.Map;
12import java.util.Objects;
13
14/**
15 * Each instance of this class corresponds to a given hint option.
16 *
17 * It is recommended to expose options to clients (and query backends) as public static fields.
18 *
19 * @author Gabor Bergmann
20 * @since 1.5
21 */
22public class QueryHintOption<HintValue> {
23
24 private String optionQualifiedName;
25 private HintValue defaultValue;
26
27 /**
28 * Instantiates an option object with the given name and default value.
29 */
30 public QueryHintOption(String optionQualifiedName, HintValue defaultValue) {
31 this.optionQualifiedName = optionQualifiedName;
32 this.defaultValue = defaultValue;
33 }
34
35 /**
36 * This is the recommended constructor for hint options defined as static fields within an enclosing class.
37 * Combines the qualified name of the hint from the (qualified) name of the enclosing class and a local name (unique within that class).
38 */
39 public <T extends HintValue> QueryHintOption(Class<?> optionNamespace, String optionLocalName, T defaultValue) {
40 this(String.format("%s@%s", optionLocalName, optionNamespace.getName()), defaultValue);
41 }
42
43 /**
44 * Returns the qualified name, a unique string identifier of the option.
45 */
46 public String getQualifiedName() {
47 return optionQualifiedName;
48 }
49
50 /**
51 * Returns the default value of this hint option, which is to be used by query backends in the case no overriding value is assigned.
52 */
53 public HintValue getDefaultValue() {
54 return defaultValue;
55 }
56
57 /**
58 * Returns the value of this hint option from the given hint collection, or the default value if not defined.
59 * Intended to be called by backends to find out the definitive value that should be considered.
60 */
61 @SuppressWarnings("unchecked")
62 public HintValue getValueOrDefault(QueryEvaluationHint hints) {
63 Object value = hints.getValueOrNull(this);
64 if (value == null)
65 return getDefaultValue();
66 else {
67 return (HintValue) value;
68 }
69 }
70
71
72 /**
73 * Returns the value of this hint option from the given hint collection, or null if not defined.
74 */
75 public HintValue getValueOrNull(QueryEvaluationHint hints) {
76 return hints.getValueOrNull(this);
77 }
78
79 /**
80 * Returns whether this hint option is defined in the given hint collection.
81 */
82 public boolean isOverriddenIn(QueryEvaluationHint hints) {
83 return hints.isOptionOverridden(this);
84 }
85
86 /**
87 * Puts a value of this hint option into an option-to-value map.
88 *
89 * <p> This method is offered in lieu of a builder API.
90 * Use this method on any number of hint options in order to populate an option-value map.
91 * Then instantiate the immutable {@link QueryEvaluationHint} using the map.
92 *
93 * @see #insertValueIfNondefault(Map, Object)
94 * @return the hint value that was previously present in the map under this hint option, carrying over the semantics of {@link Map#put(Object, Object)}.
95 */
96 @SuppressWarnings("unchecked")
97 public HintValue insertOverridingValue(Map<QueryHintOption<?>, Object> hints, HintValue overridingValue) {
98 return (HintValue) hints.put(this, overridingValue);
99 }
100
101 /**
102 * Puts a value of this hint option into an option-to-value map, if the given value differs from the default value of the option.
103 * If the default value is provided instead, then the map is not updated.
104 *
105 * <p> This method is offered in lieu of a builder API.
106 * Use this method on any number of hint options in order to populate an option-value map.
107 * Then instantiate the immutable {@link QueryEvaluationHint} using the map.
108 *
109 * @see #insertOverridingValue(Map, Object)
110 * @since 2.0
111 */
112 public void insertValueIfNondefault(Map<QueryHintOption<?>, Object> hints, HintValue overridingValue) {
113 if (!Objects.equals(defaultValue, overridingValue))
114 hints.put(this, overridingValue);
115 }
116
117 @Override
118 public String toString() {
119 return optionQualifiedName;
120 }
121
122}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ResultProviderRequestor.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ResultProviderRequestor.java
new file mode 100644
index 00000000..6ec6d53e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/backend/ResultProviderRequestor.java
@@ -0,0 +1,74 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.backend;
10
11import tools.refinery.viatra.runtime.matchers.context.IQueryResultProviderAccess;
12import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
13import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
14
15/**
16 * Uniform way of requesting result providers for pattern calls within queries.
17 * Intended users are query backends, for calling other backends to deliver results of dependee queries.
18 *
19 * @author Gabor Bergmann
20 * @since 2.1
21 */
22public class ResultProviderRequestor {
23 IQueryBackend callerBackend;
24 IQueryResultProviderAccess resultProviderAccess;
25 IQueryBackendHintProvider hintProvider;
26 ICallDelegationStrategy delegationStrategy;
27 QueryEvaluationHint callerHint;
28 QueryEvaluationHint universalOverride;
29
30
31 /**
32 * @param callerBackend the actual backend evaluating the calling pattern.
33 * @param resultProviderAccess
34 * @param hintProvider
35 * @param delegationStrategy
36 * @param callerHint a hint under which the calling pattern is evaluated,
37 * @param universalOverride if non-null, overrides the hint with extra options <i>after</i> the {@link ICallDelegationStrategy}
38 */
39 public ResultProviderRequestor(IQueryBackend callerBackend, IQueryResultProviderAccess resultProviderAccess,
40 IQueryBackendHintProvider hintProvider, ICallDelegationStrategy delegationStrategy,
41 QueryEvaluationHint callerHint, QueryEvaluationHint universalOverride) {
42 super();
43 this.callerBackend = callerBackend;
44 this.resultProviderAccess = resultProviderAccess;
45 this.hintProvider = hintProvider;
46 this.delegationStrategy = delegationStrategy;
47 this.callerHint = callerHint;
48 this.universalOverride = universalOverride;
49 }
50
51
52
53
54 /**
55 *
56 * @param call a {@link PConstraint} in a query that calls another query.
57 * @param spotOverride if non-null, overrides the hint with extra options <i>after</i> the {@link ICallDelegationStrategy}
58 * and the universal override specified in the constructor
59 * @return the obtained result provider
60 */
61 public IQueryResultProvider requestResultProvider(IQueryReference call, QueryEvaluationHint spotOverride) {
62 QueryEvaluationHint hints =
63 delegationStrategy.transformHints(call, callerHint, callerBackend, hintProvider);
64
65 if (universalOverride != null)
66 hints = hints.overrideBy(universalOverride);
67
68 if (spotOverride != null)
69 hints = hints.overrideBy(spotOverride);
70
71 return resultProviderAccess.getResultProvider(call.getReferredQuery(), hints);
72 }
73
74}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryMetaContext.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryMetaContext.java
new file mode 100644
index 00000000..99611758
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryMetaContext.java
@@ -0,0 +1,69 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Comparator;
14import java.util.HashMap;
15import java.util.Map;
16import java.util.Set;
17
18/**
19 * Common abstract class for implementers of {@link IQueryMetaContext}
20 *
21 * @author Grill Balázs
22 * @since 1.3
23 *
24 */
25public abstract class AbstractQueryMetaContext implements IQueryMetaContext {
26
27 /**
28 * @since 2.0
29 */
30 @Override
31 public Map<InputKeyImplication, Set<InputKeyImplication>> getConditionalImplications(IInputKey implyingKey) {
32 return new HashMap<>();
33 }
34
35 /**
36 * @since 1.6
37 */
38 @Override
39 public boolean canLeadOutOfScope(IInputKey key) {
40 return key.getArity() > 1;
41 }
42
43 /**
44 * @since 1.6
45 */
46 @Override
47 public Comparator<IInputKey> getSuggestedEliminationOrdering() {
48 return (o1, o2) -> 0;
49 }
50
51 /**
52 * @since 1.6
53 */
54 @Override
55 public Collection<InputKeyImplication> getWeakenedAlternatives(IInputKey implyingKey) {
56 return Collections.emptySet();
57 }
58
59 @Override
60 public boolean isPosetKey(IInputKey key) {
61 return false;
62 }
63
64 @Override
65 public IPosetComparator getPosetComparator(Iterable<IInputKey> key) {
66 return null;
67 }
68
69}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryRuntimeContext.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryRuntimeContext.java
new file mode 100644
index 00000000..c797eff9
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/AbstractQueryRuntimeContext.java
@@ -0,0 +1,21 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11/**
12 * This class is intended to be extended by implementors. The main purpose of this abstract implementation to protect
13 * implementors from future changes in the interface.
14 *
15 * @author Grill Balázs
16 * @since 1.4
17 *
18 */
19public abstract class AbstractQueryRuntimeContext implements IQueryRuntimeContext {
20
21}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IInputKey.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IInputKey.java
new file mode 100644
index 00000000..4dbcca88
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IInputKey.java
@@ -0,0 +1,45 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11/**
12 * An input key identifies an input (extensional) relation, such as the instance set of a given node or edge type, or the direct containment relation.
13 *
14 * <p> The input key, at the very minimum, is associated with an arity (number of columns), a user-friendly name, and a string identifier (for distributive purposes).
15 *
16 * <p> The input key itself must be an immutable data object that properly overrides equals() and hashCode().
17 * It must be instantiable without using the query context object, so that query specifications may construct the appropriate PQueries.
18 *
19 * @author Bergmann Gabor
20 *
21 */
22public interface IInputKey {
23
24 /**
25 * A user-friendly name that can be shown on screen for debug purposes, included in exceptions, etc.
26 */
27 public String getPrettyPrintableName();
28 /**
29 * An internal string identifier that can be used to uniquely identify to input key (relevant for distributed applications).
30 */
31 public String getStringID();
32
33 /**
34 * The width of tuples in this relation.
35 */
36 public int getArity();
37
38 /**
39 * Returns true iff instance tuples of the key can be enumerated.
40 * <p> If false, the runtime can only test tuple membership in the extensional relation identified by the key, but not enumerate member tuples in general.
41 */
42 boolean isEnumerable();
43
44
45}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IPosetComparator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IPosetComparator.java
new file mode 100644
index 00000000..e2d5bcee
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IPosetComparator.java
@@ -0,0 +1,35 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12
13/**
14 * Implementations of this interface aid the query engine with the ordering of poset elements. This information is
15 * particularly important in the delete and re-derive evaluation mode because they let the engine identify monotone
16 * change pairs.
17 *
18 * @author Tamas Szabo
19 * @since 1.6
20 */
21public interface IPosetComparator {
22
23 /**
24 * Returns true if the 'left' tuple of poset elements is smaller or equal than the 'right' tuple of poset elements according to
25 * the partial order that this poset comparator employs.
26 *
27 * @param left
28 * the left tuple of poset elements
29 * @param right
30 * the right tuple of poset elements
31 * @return true if left is smaller or equal to right, false otherwise
32 */
33 public boolean isLessOrEqual(final Tuple left, final Tuple right);
34
35}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryBackendContext.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryBackendContext.java
new file mode 100644
index 00000000..04f00aaa
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryBackendContext.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import org.apache.log4j.Logger;
12import tools.refinery.viatra.runtime.matchers.backend.IMatcherCapability;
13import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
14import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
15import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
17
18/**
19 * This interface is a collector which holds every API that is provided by the engine to control
20 * the operation of the backends.
21 *
22 * @since 1.5
23 * @noimplement This interface is not intended to be implemented by clients.
24 */
25public interface IQueryBackendContext {
26
27 Logger getLogger();
28
29 IQueryRuntimeContext getRuntimeContext();
30
31 IQueryCacheContext getQueryCacheContext();
32
33 IQueryBackendHintProvider getHintProvider();
34
35 IQueryResultProviderAccess getResultProviderAccess();
36
37 QueryAnalyzer getQueryAnalyzer();
38
39 /**
40 * @since 2.0
41 */
42 IMatcherCapability getRequiredMatcherCapability(PQuery query, QueryEvaluationHint overrideHints);
43
44 /**
45 * @since 1.6
46 */
47 boolean areUpdatesDelayed();
48
49}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryCacheContext.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryCacheContext.java
new file mode 100644
index 00000000..617207f6
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryCacheContext.java
@@ -0,0 +1,39 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
12import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
13import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
15
16/**
17 * Provides information on already cached queries to query evaluator backends at runtime.
18 *
19 * @author Bergmann Gabor
20 *
21 */
22public interface IQueryCacheContext {
23
24 /**
25 * Checks if there already is a caching result provider for the given query.
26 * <p> Returns false if called while the caching result provider of the given query is being constructed in the first place.
27 */
28 public boolean isResultCached(PQuery query);
29
30 /**
31 * Returns a caching result provider for the given query; it must be constructed if it does not exist yet.
32 * <p> <b>Caution:</b> behavior undefined if called while the caching result provider of the given query is being constructed.
33 * Beware of infinite loops.
34 * <p> <b>Postcondition:</b> {@link IQueryBackend#isCaching()} returns true for the {@link #getQueryBackend()} of the returned provider
35 *
36 * @throws ViatraQueryRuntimeException
37 */
38 public IQueryResultProvider getCachingResultProvider(PQuery query);
39}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryMetaContext.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryMetaContext.java
new file mode 100644
index 00000000..4c22a3cb
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryMetaContext.java
@@ -0,0 +1,98 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import java.util.Collection;
12import java.util.Comparator;
13import java.util.Map;
14import java.util.Set;
15
16/**
17 * Provides metamodel information (relationship of input keys) to query evaluator backends at runtime and at query planning time.
18 *
19 * @noimplement Implementors should extend {@link AbstractQueryMetaContext} instead of directly implementing this interface.
20 * @author Bergmann Gabor
21 */
22public interface IQueryMetaContext {
23
24 /**
25 * Returns true iff instance tuples of the given key can be enumerated.
26 * <p> If false, the runtime can only test tuple membership in the extensional relation identified by the key, but not enumerate member tuples in general.
27 * <p> Equivalent to {@link IInputKey#isEnumerable()}.
28 */
29 boolean isEnumerable(IInputKey key);
30
31 /**
32 * Returns true iff the set of instance tuples of the given key is immutable.
33 * <p> If false, the runtime provides notifications upon change.
34 */
35 boolean isStateless(IInputKey key);
36
37 /**
38 * Returns a set of implications (weakened alternatives),
39 * with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.
40 * <p> Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
41 * <p> Must follow directly or transitively from implications of {@link #getImplications(IInputKey)}.
42 * @since 1.6
43 */
44 Collection<InputKeyImplication> getWeakenedAlternatives(IInputKey implyingKey);
45
46 /**
47 * Returns known direct implications, e.g. edge supertypes, edge opposites, node type constraints, etc.
48 * <p> Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
49 */
50 Collection<InputKeyImplication> getImplications(IInputKey implyingKey);
51
52 /**
53 * Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys).
54 * For example, a "type x, unscoped" input key may imply the "type x, in scope" input key under the condition of the input key "x is in scope"
55 *
56 * <p> Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys (either as the implying key or as the additional condition).
57 * <p> Note that symmetry is not required, i.e. the additional conditions do not have to list the same conditional implication.
58 * @return multi-map, where the keys are additional conditions and the values are input key implications jointly implied by the condition and the given implying key.
59 * @since 2.0
60 */
61 Map<InputKeyImplication, Set<InputKeyImplication>> getConditionalImplications(IInputKey implyingKey);
62
63 /**
64 * Returns functional dependencies of the input key expressed in terms of column indices.
65 *
66 * <p> Each entry of the map is a functional dependency rule, where the entry key specifies source columns and the entry value specifies target columns.
67 */
68 Map<Set<Integer>, Set<Integer>> getFunctionalDependencies(IInputKey key);
69
70 /**
71 * For query normalizing, this is the order suggested for trying to eliminate input keys.
72 * @since 1.6
73 */
74 Comparator<IInputKey> getSuggestedEliminationOrdering();
75
76 /**
77 * Tells whether the given {@link IInputKey} is an edge and may lead out of scope.
78 *
79 * @since 1.6
80 */
81 boolean canLeadOutOfScope(IInputKey key);
82
83 /**
84 * Returns true if the given {@link IInputKey} represents a poset type.
85 * @since 1.6
86 */
87 boolean isPosetKey(IInputKey key);
88
89 /**
90 * Returns an {@link IPosetComparator} for the given set of {@link IInputKey}s.
91 *
92 * @param keys an iterable collection of input keys
93 * @return the poset comparator
94 * @since 1.6
95 */
96 IPosetComparator getPosetComparator(Iterable<IInputKey> keys);
97
98}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryResultProviderAccess.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryResultProviderAccess.java
new file mode 100644
index 00000000..7fecd01a
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryResultProviderAccess.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import tools.refinery.viatra.runtime.matchers.backend.IQueryResultProvider;
12import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
13import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
14
15/**
16 * This interface exposes API to request {@link IQueryResultProvider} for {@link PQuery} instances.
17 *
18 * @author Grill Balázs
19 * @since 1.5
20 * @noimplement This interface is not intended to be implemented by clients.
21 */
22public interface IQueryResultProviderAccess {
23
24 /**
25 * Get a result provider for the given {@link PQuery}, which conforms the capabilities requested by the
26 * given {@link QueryEvaluationHint} object.
27 * @throws ViatraQueryRuntimeException
28 */
29 public IQueryResultProvider getResultProvider(PQuery query, QueryEvaluationHint overrideHints);
30
31}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContext.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContext.java
new file mode 100644
index 00000000..61359c1b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContext.java
@@ -0,0 +1,287 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.viatra.runtime.matchers.context;
11
12import tools.refinery.viatra.runtime.CancellationToken;
13import tools.refinery.viatra.runtime.matchers.planning.helpers.StatisticsHelper;
14import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.Accuracy;
18
19import java.lang.reflect.InvocationTargetException;
20import java.util.Optional;
21import java.util.concurrent.Callable;
22
23/**
24 * Provides instance model information (relations corresponding to input keys) to query evaluator backends at runtime.
25 * Implementors shall extend {@link AbstractQueryRuntimeContext} instead directly this interface.
26 *
27 * @author Bergmann Gabor
28 * @noimplement This interface is not intended to be implemented by clients. Extend {@link AbstractQueryRuntimeContext} instead.
29 */
30public interface IQueryRuntimeContext {
31 /**
32 * Provides metamodel-specific info independent of the runtime instance model.
33 */
34 public IQueryMetaContext getMetaContext();
35
36
37 /**
38 * The given callable will be executed, and all model traversals will be delayed until the execution is done. If
39 * there are any outstanding information to be read from the model, a single coalesced model traversal will
40 * initialize the caches and deliver the notifications.
41 *
42 * <p> Calls may be nested. A single coalesced traversal will happen at the end of the outermost call.
43 *
44 * <p> <b>Caution: </b> results returned by the runtime context may be incomplete during the coalescing period, to be corrected by notifications sent during the final coalesced traversal.
45 * For example, if a certain input key is not cached yet, an empty relation may be reported during <code>callable.call()</code>; the cache will be constructed after the call terminates and notifications will deliver the entire content of the relation.
46 * Non-incremental query backends should therefore never enumerate input keys while coalesced (verify using {@link #isCoalescing()}).
47 *
48 * @param callable
49 */
50 public abstract <V> V coalesceTraversals(Callable<V> callable) throws InvocationTargetException;
51 /**
52 * @return true iff currently within a coalescing section (i.e. within the callable of a call to {@link #coalesceTraversals(Callable)}).
53 */
54 public boolean isCoalescing();
55
56 /**
57 * Returns true if index is available for the given key providing the given service.
58 * @throws IllegalArgumentException if key is not enumerable or an unknown type, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
59 * @since 1.4
60 */
61 public boolean isIndexed(IInputKey key, IndexingService service);
62
63 /**
64 * If the given (enumerable) input key is not yet indexed, the model will be traversed
65 * (after the end of the outermost coalescing block, see {@link IQueryRuntimeContext#coalesceTraversals(Callable)})
66 * so that the index can be built. It is possible that the base indexer will select a higher indexing level merging
67 * multiple indexing requests to an appropriate level.
68 *
69 * <p><b>Postcondition:</b> After invoking this method, {@link #getIndexed(IInputKey, IndexingService)} for the same key
70 * and service will be guaranteed to return the requested or a highing indexing level as soon as {@link #isCoalescing()} first returns false.
71 *
72 * <p><b>Precondition:</b> the given key is enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
73 * @throws IllegalArgumentException if key is not enumerable or an unknown type, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
74 * @since 1.4
75 */
76 public void ensureIndexed(IInputKey key, IndexingService service);
77
78 /**
79 * Returns the number of tuples in the extensional relation identified by the input key seeded with the given mask and tuple.
80 *
81 * @param key an input key
82 * @param seedMask
83 * a mask that extracts those parameters of the input key (from the entire parameter list) that should be
84 * bound to a fixed value; must not be null. <strong>Note</strong>: any given index must occur at most once in seedMask.
85 * @param seed
86 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
87 * parameterSeedMask, so that for each considered match tuple,
88 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold. Must not be null.
89 *
90 * @return the number of tuples in the model for the given key and seed
91 *
92 * <p><b>Precondition:</b> the given key is enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
93 * @throws IllegalArgumentException if key is not enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
94 * @since 1.7
95 */
96 public int countTuples(IInputKey key, TupleMask seedMask, ITuple seed);
97
98
99 /**
100 * Gives an estimate of the number of different groups the tuples of the given relation are projected into by the given mask
101 * (e.g. for an identity mask, this means the full relation size). The estimate must meet the required accuracy.
102 *
103 * <p> Must accept any input key, even non-enumerables or those not recognized by this runtime context.
104 * If there is insufficient information to provide an answer up to the required precision, {@link Optional#empty()} is returned.
105 *
106 * <p> PRE: {@link TupleMask#isNonrepeating()} must hold for the group mask.
107 *
108 * @return if available, an estimate of the cardinality of the projection of the given extensional relation, with the desired accuracy.
109 *
110 * @since 2.1
111 */
112 public Optional<Long> estimateCardinality(IInputKey key, TupleMask groupMask, Accuracy requiredAccuracy);
113
114
115 /**
116 * Gives an estimate of the average size of different groups the tuples of the given relation are projected into by the given mask
117 * (e.g. for an identity mask, this means 1, while for an empty mask, the result is the full relation size).
118 * The estimate must meet the required accuracy.
119 *
120 * <p> Must accept any input key, even non-enumerables or those not recognized by this runtime context.
121 * If there is insufficient information to provide an answer up to the required precision, {@link Optional#empty()} may be returned.
122 *
123 * <p> For an empty relation, zero is acceptable as an exact answer.
124 *
125 * <p> PRE: {@link TupleMask#isNonrepeating()} must hold for the group mask.
126 *
127 * @return if available, an estimate of the average size of each projection group of the given extensional relation, with the desired accuracy.
128 *
129 * @since 2.1
130 */
131 public default Optional<Double> estimateAverageBucketSize(IInputKey key, TupleMask groupMask, Accuracy requiredAccuracy) {
132 if (key.isEnumerable()) {
133 return StatisticsHelper.estimateAverageBucketSize(groupMask, requiredAccuracy,
134 (mask, accuracy) -> this.estimateCardinality(key, mask, accuracy));
135 } else return groupMask.isIdentity() ? Optional.of(1.0) : Optional.empty();
136 }
137
138
139 /**
140 * Returns the tuples in the extensional relation identified by the input key, optionally seeded with the given tuple.
141 *
142 * @param key an input key
143 * @param seedMask
144 * a mask that extracts those parameters of the input key (from the entire parameter list) that should be
145 * bound to a fixed value; must not be null. <strong>Note</strong>: any given index must occur at most once in seedMask.
146 * @param seed
147 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
148 * parameterSeedMask, so that for each considered match tuple,
149 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold. Must not be null.
150 * @return the tuples in the model for the given key and seed
151 *
152 * <p><b>Precondition:</b> the given key is enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
153 * @throws IllegalArgumentException if key is not enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
154 * @since 1.7
155 */
156 public Iterable<Tuple> enumerateTuples(IInputKey key, TupleMask seedMask, ITuple seed);
157
158 /**
159 * Simpler form of {@link #enumerateTuples(IInputKey, TupleMask, Tuple)} in the case where all values of the tuples
160 * are bound by the seed except for one.
161 *
162 * <p>
163 * Selects the tuples in the extensional relation identified by the input key, optionally seeded with the given
164 * tuple, and then returns the single value from each tuple which is not bound by the ssed mask.
165 *
166 * @param key
167 * an input key
168 * @param seedMask
169 * a mask that extracts those parameters of the input key (from the entire parameter list) that should be
170 * bound to a fixed value; must not be null. <strong>Note</strong>: any given index must occur at most
171 * once in seedMask, and seedMask must include all parameters in any arbitrary order except one.
172 * @param seed
173 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
174 * parameterSeedMask, so that for each considered match tuple,
175 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold. Must not be null.
176 * @return the objects in the model for the given key and seed
177 *
178 * <p>
179 * <b>Precondition:</b> the given key is enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
180 * @throws IllegalArgumentException
181 * if key is not enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
182 * @since 1.7
183 */
184 public Iterable<? extends Object> enumerateValues(IInputKey key, TupleMask seedMask, ITuple seed);
185
186 /**
187 * Simpler form of {@link #enumerateTuples(IInputKey, TupleMask, Tuple)} in the case where all values of the tuples
188 * are bound by the seed.
189 *
190 * <p>
191 * Returns whether the given tuple is in the extensional relation identified by the input key.
192 *
193 * <p>
194 * Note: this call works for non-enumerable input keys as well.
195 *
196 * @param key
197 * an input key
198 * @param seed
199 * the tuple of fixed values restricting the match set to be considered, in the same order as given in
200 * parameterSeedMask, so that for each considered match tuple,
201 * projectedParameterSeed.equals(parameterSeedMask.transform(match)) should hold. Must not be null.
202 * @return true iff there is at least a single tuple contained in the relation that corresponds to the seed tuple
203 * @since 2.0
204 */
205 public boolean containsTuple(IInputKey key, ITuple seed);
206
207
208 /**
209 * Subscribes for updates in the extensional relation identified by the input key, optionally seeded with the given tuple.
210 * <p> This should be called after invoking
211 *
212 * @param key an input key
213 * @param seed can be null or a tuple with matching arity;
214 * if non-null, only those updates in the model are notified about
215 * that match the seed at positions where the seed is non-null.
216 * @param listener will be notified of future changes
217 *
218 * <p><b>Precondition:</b> the given key is enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
219 * @throws IllegalArgumentException if key is not enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
220 */
221 public void addUpdateListener(IInputKey key, Tuple seed, IQueryRuntimeContextListener listener);
222
223 /**
224 * Unsubscribes from updates in the extensional relation identified by the input key, optionally seeded with the given tuple.
225 *
226 * @param key an input key
227 * @param seed can be null or a tuple with matching arity;
228 * if non-null, only those updates in the model are notified about
229 * that match the seed at positions where the seed is non-null.
230 * @param listener will no longer be notified of future changes
231 *
232 * <p><b>Precondition:</b> the given key is enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
233 * @throws IllegalArgumentException if key is not enumerable, see {@link IQueryMetaContext#isEnumerable(IInputKey)}.
234 */
235 public void removeUpdateListener(IInputKey key, Tuple seed, IQueryRuntimeContextListener listener);
236 /*
237 TODO: uniqueness
238 */
239
240 /**
241 * Wraps the external element into the internal representation that is to be used by the query backend
242 * <p> model element -> internal object.
243 * <p> null must be mapped to null.
244 */
245 public Object wrapElement(Object externalElement);
246
247 /**
248 * Unwraps the internal representation of the element into its original form
249 * <p> internal object -> model element
250 * <p> null must be mapped to null.
251 */
252 public Object unwrapElement(Object internalElement);
253
254 /**
255 * Unwraps the tuple of elements into the internal representation that is to be used by the query backend
256 * <p> model elements -> internal objects
257 * <p> null must be mapped to null.
258 */
259 public Tuple wrapTuple(Tuple externalElements);
260
261 /**
262 * Unwraps the tuple of internal representations of elements into their original forms
263 * <p> internal objects -> model elements
264 * <p> null must be mapped to null.
265 */
266 public Tuple unwrapTuple(Tuple internalElements);
267
268 /**
269 * Starts wildcard indexing for the given service. After this call, no registration is required for this {@link IndexingService}.
270 * a previously set wildcard level cannot be lowered, only extended.
271 * @since 1.4
272 */
273 public void ensureWildcardIndexing(IndexingService service);
274
275 /**
276 * Execute the given runnable after traversal. It is guaranteed that the runnable is executed as soon as
277 * the indexing is finished. The callback is executed only once, then is removed from the callback queue.
278 * @param traversalCallback
279 * @throws InvocationTargetException
280 * @since 1.4
281 */
282 public void executeAfterTraversal(Runnable runnable) throws InvocationTargetException;
283
284 default CancellationToken getCancellationToken() {
285 return CancellationToken.NONE;
286 }
287}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContextListener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContextListener.java
new file mode 100644
index 00000000..7be27d56
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IQueryRuntimeContextListener.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12
13/**
14 * Listens for changes in the runtime context.
15 * @author Bergmann Gabor
16 *
17 */
18public interface IQueryRuntimeContextListener {
19
20 /**
21 * The given tuple was inserted into or removed from the input relation indicated by the given key.
22 * @param key the key identifying the input relation that was updated
23 * @param updateTuple the tuple that was inserted or removed
24 * @param isInsertion true if it was an insertion, false otherwise.
25 */
26 public void update(IInputKey key, Tuple updateTuple, boolean isInsertion);
27}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IndexingService.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IndexingService.java
new file mode 100644
index 00000000..8210765d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/IndexingService.java
@@ -0,0 +1,36 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11/**
12 * These are the different services which can be provided by an {@link IQueryRuntimeContext} implementation.
13 *
14 * @author Grill Balázs
15 * @since 1.4
16 *
17 */
18public enum IndexingService {
19
20 /**
21 * Cardinality information is available. Makes possible to calculate
22 * unseeded calls of {@link IQueryRuntimeContext#countTuples(IInputKey, tools.refinery.viatra.runtime.matchers.tuple.Tuple)}
23 */
24 STATISTICS,
25
26 /**
27 * The indexer can provide notifications about changes in the model.
28 */
29 NOTIFICATIONS,
30
31 /**
32 * Enables enumeration of instances and reverse-navigation.
33 */
34 INSTANCES
35
36}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/InputKeyImplication.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/InputKeyImplication.java
new file mode 100644
index 00000000..2a403810
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/InputKeyImplication.java
@@ -0,0 +1,103 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.List;
14
15/**
16 * Data object representing the implication of an input key, in use cases including edge supertypes, edge opposites, node type constraints, etc.
17 *
18 * <p> Each instance tuple of the <i>implying input key</i> (if given) implies the presence of an instance tuple of the <i>implied input key</i> consisting of elements of the original tuple at given positions.
19 * When the input key is null, it is not an input constraint but some other source that implies input keys.
20 *
21 * <p> The implication is an immutable data object.
22 *
23 * @author Bergmann Gabor
24 *
25 */
26public final class InputKeyImplication {
27 private IInputKey implyingKey;
28 private IInputKey impliedKey;
29 private List<Integer> impliedIndices;
30
31 /**
32 * Optional. Instance tuples of this input key imply an instance tuple of another key.
33 * Sometimes it is not an input key that implies other input keys, so this attribute can be null.
34 */
35 public IInputKey getImplyingKey() {
36 return implyingKey;
37 }
38 /**
39 * An instance tuple of this input key is implied by another key.
40 */
41 public IInputKey getImpliedKey() {
42 return impliedKey;
43 }
44 /**
45 * The implied instance tuple consists of the values in the implying tuple at these indices.
46 */
47 public List<Integer> getImpliedIndices() {
48 return impliedIndices;
49 }
50 /**
51 * @param implyingKey instance tuples of this input key imply an instance tuple of the other key.
52 * @param impliedKey instance tuple of this input key is implied by the other key.
53 * @param implyingIndices the implied instance tuple consists of the values in the implying tuple at these indices.
54 */
55 public InputKeyImplication(IInputKey implyingKey, IInputKey impliedKey,
56 List<Integer> implyingIndices) {
57 super();
58 this.implyingKey = implyingKey;
59 this.impliedKey = impliedKey;
60 this.impliedIndices = Collections.unmodifiableList(new ArrayList<>(implyingIndices));
61 }
62
63 @Override
64 public int hashCode() {
65 final int prime = 31;
66 int result = 1;
67 result = prime * result
68 + ((impliedIndices == null) ? 0 : impliedIndices.hashCode());
69 result = prime * result
70 + ((impliedKey == null) ? 0 : impliedKey.hashCode());
71 result = prime * result
72 + ((implyingKey == null) ? 0 : implyingKey.hashCode());
73 return result;
74 }
75 @Override
76 public boolean equals(Object obj) {
77 if (this == obj)
78 return true;
79 if (obj == null)
80 return false;
81 if (!(obj instanceof InputKeyImplication))
82 return false;
83 InputKeyImplication other = (InputKeyImplication) obj;
84 if (impliedIndices == null) {
85 if (other.impliedIndices != null)
86 return false;
87 } else if (!impliedIndices.equals(other.impliedIndices))
88 return false;
89 if (impliedKey == null) {
90 if (other.impliedKey != null)
91 return false;
92 } else if (!impliedKey.equals(other.impliedKey))
93 return false;
94 if (implyingKey == null) {
95 if (other.implyingKey != null)
96 return false;
97 } else if (!implyingKey.equals(other.implyingKey))
98 return false;
99 return true;
100 }
101
102
103}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/BaseInputKeyWrapper.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/BaseInputKeyWrapper.java
new file mode 100644
index 00000000..f9b05e5b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/BaseInputKeyWrapper.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context.common;
10
11import tools.refinery.viatra.runtime.matchers.context.IInputKey;
12
13
14/**
15 * An input key that is identified by a single wrapped object and the class of the wrapper.
16 * @author Bergmann Gabor
17 *
18 */
19public abstract class BaseInputKeyWrapper<Wrapped> implements IInputKey {
20 protected Wrapped wrappedKey;
21
22 public BaseInputKeyWrapper(Wrapped wrappedKey) {
23 super();
24 this.wrappedKey = wrappedKey;
25 }
26
27 public Wrapped getWrappedKey() {
28 return wrappedKey;
29 }
30
31
32 @Override
33 public int hashCode() {
34 return ((wrappedKey == null) ? 0 : wrappedKey.hashCode());
35 }
36
37 @Override
38 public boolean equals(Object obj) {
39 if (this == obj)
40 return true;
41 if (obj == null)
42 return false;
43 if (!(this.getClass().equals(obj.getClass())))
44 return false;
45 BaseInputKeyWrapper other = (BaseInputKeyWrapper) obj;
46 if (wrappedKey == null) {
47 if (other.wrappedKey != null)
48 return false;
49 } else if (!wrappedKey.equals(other.wrappedKey))
50 return false;
51 return true;
52 }
53
54
55}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/JavaTransitiveInstancesKey.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/JavaTransitiveInstancesKey.java
new file mode 100644
index 00000000..eb972c2d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/common/JavaTransitiveInstancesKey.java
@@ -0,0 +1,165 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context.common;
10
11
12
13/**
14 * Instance tuples are of form (x), where object x is an instance of the given Java class or its subclasses.
15 * <p> Fine print 1: classes with the same name are considered equivalent.
16 * Can be instantiated with class name, even if the class itself is not loaded yet; but if the class is available, passing it in the constructor is beneficial to avoid classloading troubles.
17 * <p> Fine print 2: primitive types (char, etc.) are transparently treated as their wrapper class (Character, etc.).
18 * <p> Non-enumerable type, can only be checked.
19 * <p> Stateless type (objects can't change their type)
20 * @author Bergmann Gabor
21 *
22*/
23public class JavaTransitiveInstancesKey extends BaseInputKeyWrapper<String> {
24
25 /**
26 * The actual Class whose (transitive) instances this relation contains. Can be null at compile time, if only the name is available.
27 * Can be a primitive.
28 */
29 private Class<?> cachedOriginalInstanceClass;
30
31 /**
32 * Same as {@link #cachedOriginalInstanceClass}, but primitive classes are replaced with their wrapper classes (e.g. int --> java.lang.Integer).
33 */
34 private Class<?> cachedWrapperInstanceClass;
35
36 /**
37 * Preferred constructor.
38 */
39 public JavaTransitiveInstancesKey(Class<?> instanceClass) {
40 this(primitiveTypeToWrapperClass(instanceClass).getName());
41 this.cachedOriginalInstanceClass = instanceClass;
42 }
43
44 /**
45 * Call this constructor only in contexts where the class itself is not available for loading, e.g. it has not yet been compiled.
46 */
47 public JavaTransitiveInstancesKey(String className) {
48 super(className);
49 }
50
51
52 /**
53 * Returns null if class cannot be loaded.
54 */
55 private Class<?> getOriginalInstanceClass() {
56 if (cachedOriginalInstanceClass == null) {
57 try {
58 resolveClassInternal();
59 } catch (ClassNotFoundException e) {
60 // class not yet available at this point
61 }
62 }
63 return cachedOriginalInstanceClass;
64 }
65
66
67 /**
68 * @return non-null instance class
69 * @throws ClassNotFoundException
70 */
71 private Class<?> forceGetOriginalInstanceClass() throws ClassNotFoundException {
72 if (cachedOriginalInstanceClass == null) {
73 resolveClassInternal();
74 }
75 return cachedOriginalInstanceClass;
76 }
77
78 /**
79 * @return non-null instance class, wrapped if primitive class
80 * @throws ClassNotFoundException
81 */
82 public Class<?> forceGetWrapperInstanceClass() throws ClassNotFoundException {
83 forceGetOriginalInstanceClass();
84 return getWrapperInstanceClass();
85 }
86 /**
87 * @return non-null instance class, wrapped if primitive class
88 * @throws ClassNotFoundException
89 */
90 public Class<?> forceGetInstanceClass() throws ClassNotFoundException {
91 return forceGetWrapperInstanceClass();
92 }
93
94 /**
95 * @return instance class, wrapped if primitive class, null if class cannot be loaded
96 */
97 public Class<?> getWrapperInstanceClass() {
98 if (cachedWrapperInstanceClass == null) {
99 cachedWrapperInstanceClass = primitiveTypeToWrapperClass(getOriginalInstanceClass());
100 }
101 return cachedWrapperInstanceClass;
102 }
103 /**
104 * @return instance class, wrapped if primitive class, null if class cannot be loaded
105 */
106 public Class<?> getInstanceClass() {
107 return getWrapperInstanceClass();
108 }
109
110 private void resolveClassInternal() throws ClassNotFoundException {
111 cachedOriginalInstanceClass = Class.forName(wrappedKey);
112 }
113
114 @Override
115 public String getPrettyPrintableName() {
116 getWrapperInstanceClass();
117 return cachedWrapperInstanceClass == null ? wrappedKey == null ? "<null>" : wrappedKey : cachedWrapperInstanceClass.getName();
118 }
119
120 @Override
121 public String getStringID() {
122 return "javaClass#"+ getPrettyPrintableName();
123 }
124
125 @Override
126 public int getArity() {
127 return 1;
128 }
129
130 @Override
131 public boolean isEnumerable() {
132 return false;
133 }
134
135 @Override
136 public String toString() {
137 return this.getPrettyPrintableName();
138 }
139
140 private static Class<?> primitiveTypeToWrapperClass(Class<?> instanceClass) {
141 if (instanceClass != null && instanceClass.isPrimitive()) {
142 if (Void.TYPE.equals(instanceClass))
143 return Void.class;
144 if (Boolean.TYPE.equals(instanceClass))
145 return Boolean.class;
146 if (Character.TYPE.equals(instanceClass))
147 return Character.class;
148 if (Byte.TYPE.equals(instanceClass))
149 return Byte.class;
150 if (Short.TYPE.equals(instanceClass))
151 return Short.class;
152 if (Integer.TYPE.equals(instanceClass))
153 return Integer.class;
154 if (Long.TYPE.equals(instanceClass))
155 return Long.class;
156 if (Float.TYPE.equals(instanceClass))
157 return Float.class;
158 if (Double.TYPE.equals(instanceClass))
159 return Double.class;
160 }
161 return instanceClass;
162 }
163
164
165}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/surrogate/SurrogateQueryRegistry.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/surrogate/SurrogateQueryRegistry.java
new file mode 100644
index 00000000..bb24ec8c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/context/surrogate/SurrogateQueryRegistry.java
@@ -0,0 +1,153 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Abel Hegedus, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.context.surrogate;
10
11import java.util.Collections;
12import java.util.HashMap;
13import java.util.HashSet;
14import java.util.Map;
15import java.util.NoSuchElementException;
16import java.util.Set;
17
18import tools.refinery.viatra.runtime.matchers.context.IInputKey;
19import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
20import tools.refinery.viatra.runtime.matchers.util.IProvider;
21import tools.refinery.viatra.runtime.matchers.util.Preconditions;
22import tools.refinery.viatra.runtime.matchers.util.SingletonInstanceProvider;
23
24/**
25 * @author Abel Hegedus
26 *
27 */
28public class SurrogateQueryRegistry {
29
30 private Map<IInputKey, IProvider<PQuery>> registeredSurrogateQueryMap = new HashMap<>();
31 private Map<IInputKey, IProvider<PQuery>> dynamicSurrogateQueryMap = new HashMap<>();
32
33 /**
34 * Hidden constructor
35 */
36 private SurrogateQueryRegistry() {
37 }
38
39 private static final SurrogateQueryRegistry INSTANCE = new SurrogateQueryRegistry();
40
41 public static SurrogateQueryRegistry instance() {
42 return INSTANCE;
43 }
44
45 /**
46 *
47 * @param feature
48 * @param surrogateQuery
49 * @return the previous surrogate query associated with feature, or null if there was no such query FQN registered
50 * @throws IllegalArgumentException if feature or surrogateQuery is null
51 */
52 public IProvider<PQuery> registerSurrogateQueryForFeature(IInputKey feature, PQuery surrogateQuery) {
53 Preconditions.checkArgument(surrogateQuery != null, "Surrogate query must not be null!");
54 return registerSurrogateQueryForFeature(feature, new SingletonInstanceProvider<PQuery>(surrogateQuery));
55 }
56
57 /**
58 *
59 * @param feature
60 * @param surrogateQuery
61 * @return the previous surrogate query associated with feature, or null
62 * if there was no such query registered
63 * @throws IllegalArgumentException
64 * if feature or surrogateQuery is null
65 */
66 public IProvider<PQuery> registerSurrogateQueryForFeature(IInputKey feature, IProvider<PQuery> surrogateQueryProvider) {
67 Preconditions.checkArgument(feature != null, "Feature must not be null!");
68 Preconditions.checkArgument(surrogateQueryProvider != null, "Surrogate query must not be null!");
69 return registeredSurrogateQueryMap.put(feature, surrogateQueryProvider);
70 }
71
72 public IProvider<PQuery> addDynamicSurrogateQueryForFeature(IInputKey feature, PQuery surrogateQuery) {
73 Preconditions.checkArgument(surrogateQuery != null, "Surrogate query FQN must not be null!");
74 return addDynamicSurrogateQueryForFeature(feature, new SingletonInstanceProvider<PQuery>(surrogateQuery));
75 }
76
77 public IProvider<PQuery> addDynamicSurrogateQueryForFeature(IInputKey feature, IProvider<PQuery> surrogateQuery) {
78 Preconditions.checkArgument(feature != null, "Feature must not be null!");
79 Preconditions.checkArgument(surrogateQuery != null, "Surrogate query FQN must not be null!");
80 return dynamicSurrogateQueryMap.put(feature, surrogateQuery);
81 }
82
83 public IProvider<PQuery> removeDynamicSurrogateQueryForFeature(IInputKey feature) {
84 Preconditions.checkArgument(feature != null, "Feature must not be null!");
85 return dynamicSurrogateQueryMap.remove(feature);
86 }
87
88 /**
89 *
90 * @param feature that may have surrogate query defined, null not allowed
91 * @return true if the feature has a surrogate query defined
92 * @throws IllegalArgumentException if feature is null
93 */
94 public boolean hasSurrogateQueryFQN(IInputKey feature) {
95 Preconditions.checkArgument(feature != null, "Feature must not be null!");
96 boolean surrogateExists = dynamicSurrogateQueryMap.containsKey(feature);
97 if(!surrogateExists){
98 surrogateExists = registeredSurrogateQueryMap.containsKey(feature);
99 }
100 return surrogateExists;
101 }
102
103 /**
104 *
105 * @param feature for which the surrogate query FQN should be returned
106 * @return the surrogate query FQN defined for the feature
107 * @throws IllegalArgumentException if feature is null
108 * @throws NoSuchElementException if the feature has no surrogate query defined, use {@link #hasSurrogateQueryFQN} to check
109 */
110 public PQuery getSurrogateQuery(IInputKey feature) {
111 Preconditions.checkArgument(feature != null, "Feature must not be null!");
112 IProvider<PQuery> surrogate = dynamicSurrogateQueryMap.get(feature);
113 if(surrogate == null) {
114 surrogate = registeredSurrogateQueryMap.get(feature);
115 }
116 if(surrogate != null) {
117 return surrogate.get();
118 } else {
119 throw new NoSuchElementException(String.format("Feature %s has no surrogate query defined! Use #hasSurrogateQueryFQN to check existence.", feature));
120 }
121 }
122
123 /**
124 * @return an unmodifiable set of features with registered surrogate queries
125 */
126 public Set<IInputKey> getRegisteredSurrogateQueries() {
127 return Collections.unmodifiableSet(getRegisteredSurrogateQueriesInternal());
128 }
129
130 private Set<IInputKey> getRegisteredSurrogateQueriesInternal() {
131 return registeredSurrogateQueryMap.keySet();
132 }
133
134 /**
135 * @return an unmodifiable set of features with dynamically added surrogate queries
136 */
137 public Set<IInputKey> getDynamicSurrogateQueries() {
138 return Collections.unmodifiableSet(getDynamicSurrogateQueriesInternal());
139 }
140
141 private Set<IInputKey> getDynamicSurrogateQueriesInternal() {
142 return dynamicSurrogateQueryMap.keySet();
143 }
144
145 /**
146 * @return an unmodifiable set that contains all features with surrogate queries.
147 */
148 public Set<IInputKey> getAllSurrogateQueries() {
149 Set<IInputKey> results = new HashSet<>(getRegisteredSurrogateQueriesInternal());
150 results.addAll(getDynamicSurrogateQueriesInternal());
151 return results;
152 }
153}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/AbstractTrivialMaskedMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/AbstractTrivialMaskedMemory.java
new file mode 100644
index 00000000..66587f77
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/AbstractTrivialMaskedMemory.java
@@ -0,0 +1,58 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories;
10
11import java.util.Iterator;
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
18import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
19import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
20import tools.refinery.viatra.runtime.matchers.util.IMemory;
21
22/**
23 * Common parts of nullary and identity specializations.
24 *
25 * @noextend This class is not intended to be subclassed by clients.
26 * @author Gabor Bergmann
27 * @since 2.0
28 */
29abstract class AbstractTrivialMaskedMemory<Timestamp extends Comparable<Timestamp>> extends MaskedTupleMemory<Timestamp> {
30
31 protected IMemory<Tuple> tuples;
32
33 protected AbstractTrivialMaskedMemory(TupleMask mask, MemoryType bucketType, Object owner) {
34 super(mask, owner);
35 tuples = CollectionsFactory.createMemory(Object.class, bucketType);
36 }
37
38 @Override
39 public Map<Tuple, Timeline<Timestamp>> getWithTimeline(ITuple signature) {
40 throw new UnsupportedOperationException("Timeless memories do not support timestamp-based lookup!");
41 }
42
43 @Override
44 public void clear() {
45 tuples.clear();
46 }
47
48 @Override
49 public int getTotalSize() {
50 return tuples.size();
51 }
52
53 @Override
54 public Iterator<Tuple> iterator() {
55 return tuples.iterator();
56 }
57
58}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/DefaultMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/DefaultMaskedTupleMemory.java
new file mode 100644
index 00000000..92081409
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/DefaultMaskedTupleMemory.java
@@ -0,0 +1,127 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.memories;
11
12import java.util.Collection;
13import java.util.Iterator;
14import java.util.Map;
15
16import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
21import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
22import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
23import tools.refinery.viatra.runtime.matchers.util.IMultiLookup.ChangeGranularity;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
25
26/**
27 * @author Gabor Bergmann
28 *
29 * Default implementation that covers all cases.
30 *
31 * @since 2.0
32 */
33public final class DefaultMaskedTupleMemory<Timestamp extends Comparable<Timestamp>>
34 extends MaskedTupleMemory<Timestamp> {
35 /**
36 * Maps a signature tuple to the bucket of tuples with the given signature.
37 *
38 * @since 2.0
39 */
40 protected IMultiLookup<Tuple, Tuple> signatureToTuples;
41
42 /**
43 * @param mask
44 * The mask used to index the matchings
45 * @param owner
46 * the object "owning" this memory
47 * @param bucketType
48 * the kind of tuple collection maintained for each indexer bucket
49 * @since 2.0
50 */
51 public DefaultMaskedTupleMemory(TupleMask mask, MemoryType bucketType, Object owner) {
52 super(mask, owner);
53 signatureToTuples = CollectionsFactory.<Tuple, Tuple> createMultiLookup(Object.class, bucketType, Object.class);
54 }
55
56 @Override
57 public boolean add(Tuple tuple) {
58 Tuple signature = mask.transform(tuple);
59 return add(tuple, signature);
60 }
61
62 @Override
63 public boolean add(Tuple tuple, Tuple signature) {
64 try {
65 return signatureToTuples.addPair(signature, tuple) == ChangeGranularity.KEY;
66 } catch (IllegalStateException ex) { // ignore worthless internal exception details
67 throw raiseDuplicateInsertion(tuple);
68 }
69
70 }
71
72 @Override
73 public boolean remove(Tuple tuple) {
74 Tuple signature = mask.transform(tuple);
75 return remove(tuple, signature);
76 }
77
78 @Override
79 public boolean remove(Tuple tuple, Tuple signature) {
80 try {
81 return signatureToTuples.removePair(signature, tuple) == ChangeGranularity.KEY;
82 } catch (IllegalStateException ex) { // ignore worthless internal exception details
83 throw raiseDuplicateDeletion(tuple);
84 }
85 }
86
87 @Override
88 public Map<Tuple, Timeline<Timestamp>> getWithTimeline(ITuple signature) {
89 throw new UnsupportedOperationException("Timeless memories do not support timestamp-based lookup!");
90 }
91
92 @Override
93 public Collection<Tuple> get(ITuple signature) {
94 IMemoryView<Tuple> bucket = signatureToTuples.lookupUnsafe(signature);
95 return bucket == null ? null : bucket.distinctValues();
96 }
97
98 @Override
99 public void clear() {
100 signatureToTuples.clear();
101 }
102
103 @Override
104 public Iterable<Tuple> getSignatures() {
105 return signatureToTuples.distinctKeys();
106 }
107
108 @Override
109 public Iterator<Tuple> iterator() {
110 return signatureToTuples.distinctValues().iterator();
111 }
112
113 @Override
114 public int getTotalSize() {
115 int i = 0;
116 for (Tuple key : signatureToTuples.distinctKeys()) {
117 i += signatureToTuples.lookup(key).size();
118 }
119 return i;
120 }
121
122 @Override
123 public int getKeysetSize() {
124 return signatureToTuples.countKeys();
125 }
126
127}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/IdentityMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/IdentityMaskedTupleMemory.java
new file mode 100644
index 00000000..dc59daf5
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/IdentityMaskedTupleMemory.java
@@ -0,0 +1,77 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories;
10
11import java.util.Collection;
12import java.util.Collections;
13
14import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
15import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
16import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
17import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
18
19/**
20 * Specialized for identity mask; tuples are stored as a simple set/multiset memory.
21 *
22 * @author Gabor Bergmann
23 * @since 2.0
24 */
25public final class IdentityMaskedTupleMemory<Timestamp extends Comparable<Timestamp>> extends AbstractTrivialMaskedMemory<Timestamp> {
26
27 /**
28 * @param mask
29 * The mask used to index the matchings
30 * @param owner the object "owning" this memory
31 * @param bucketType the kind of tuple collection maintained for each indexer bucket
32 * @since 2.0
33 */
34 public IdentityMaskedTupleMemory(TupleMask mask, MemoryType bucketType, Object owner) {
35 super(mask, bucketType, owner);
36 if (!mask.isIdentity()) throw new IllegalArgumentException(mask.toString());
37 }
38
39 @Override
40 public int getKeysetSize() {
41 return tuples.size();
42 }
43
44 @Override
45 public Iterable<Tuple> getSignatures() {
46 return tuples;
47 }
48
49 @Override
50 public Collection<Tuple> get(ITuple signature) {
51 Tuple contained = tuples.theContainedVersionOfUnsafe(signature);
52 return contained != null ?
53 Collections.singleton(contained) :
54 null;
55 }
56
57 @Override
58 public boolean remove(Tuple tuple, Tuple signature) {
59 return tuples.removeOne(tuple);
60 }
61
62 @Override
63 public boolean remove(Tuple tuple) {
64 return tuples.removeOne(tuple);
65 }
66
67 @Override
68 public boolean add(Tuple tuple, Tuple signature) {
69 return tuples.addOne(tuple);
70 }
71
72 @Override
73 public boolean add(Tuple tuple) {
74 return tuples.addOne(tuple);
75 }
76
77}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/MaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/MaskedTupleMemory.java
new file mode 100644
index 00000000..62377624
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/MaskedTupleMemory.java
@@ -0,0 +1,385 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.Map;
15
16import tools.refinery.viatra.runtime.matchers.memories.timely.TimelyDefaultMaskedTupleMemory;
17import tools.refinery.viatra.runtime.matchers.memories.timely.TimelyIdentityMaskedTupleMemory;
18import tools.refinery.viatra.runtime.matchers.memories.timely.TimelyNullaryMaskedTupleMemory;
19import tools.refinery.viatra.runtime.matchers.memories.timely.TimelyUnaryMaskedTupleMemory;
20import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
21import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
22import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
23import tools.refinery.viatra.runtime.matchers.util.Clearable;
24import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
25import tools.refinery.viatra.runtime.matchers.util.resumable.MaskedResumable;
26import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
27import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
28
29/**
30 * Indexes a collection of tuples by their signature (i.e. footprint, projection) obtained according to a mask. May
31 * belong to an "owner" (for documentation / traceability purposes).
32 * <p>
33 * There are timeless and timely versions of the different memories. Timely versions associate {@link Timeline}s with
34 * the stored tuples.
35 *
36 * @noextend This class is not intended to be subclassed by clients.
37 * @author Gabor Bergmann
38 * @author Tamas Szabo
39 * @since 2.0
40 */
41public abstract class MaskedTupleMemory<Timestamp extends Comparable<Timestamp>>
42 implements Clearable, MaskedResumable<Timestamp> {
43
44 /**
45 * Creates a new memory for the given owner that indexes tuples according to the given mask.
46 */
47 public static <T extends Comparable<T>> MaskedTupleMemory<T> create(final TupleMask mask,
48 final MemoryType bucketType, final Object owner) {
49 return create(mask, bucketType, owner, false);
50 }
51
52 /**
53 * Creates a new memory for the given owner that indexes tuples according to the given mask. Clients can specify if
54 * the created memory should be timely or not. <br>
55 * <br>
56 * Timely means that tuples are associated with a timeline.
57 *
58 * @since 2.3
59 */
60 public static <T extends Comparable<T>> MaskedTupleMemory<T> create(final TupleMask mask,
61 final MemoryType bucketType, final Object owner, final boolean isTimely) {
62 return create(mask, bucketType, owner, isTimely, false);
63 }
64
65 /**
66 * Creates a new memory for the given owner that indexes tuples according to the given mask. Clients can specify if
67 * the created memory should be timely or not. In case of timely memory, clients can also specify if the memory is
68 * lazy or not. <br>
69 * <br>
70 * Timely means that tuples are associated with a timeline. <br>
71 * <br>
72 * Lazyness can only be used together with timely memories. It means that the maintenance of the timelines is lazy,
73 * that is, the memory only updates its internal data structures at the timestamp affected by an update, and can be
74 * instructed later to resume the maintenance at higher timestamps, as well.
75 *
76 * @since 2.4
77 */
78 public static <T extends Comparable<T>> MaskedTupleMemory<T> create(final TupleMask mask,
79 final MemoryType bucketType, final Object owner, final boolean isTimely, final boolean isLazy) {
80 if (isTimely) {
81 if (bucketType != MemoryType.SETS) {
82 throw new IllegalArgumentException("Timely memories only support SETS as the bucket type!");
83 }
84 if (mask.isIdentity()) {
85 return new TimelyIdentityMaskedTupleMemory<T>(mask, owner, isLazy);
86 } else if (0 == mask.getSize()) {
87 return new TimelyNullaryMaskedTupleMemory<T>(mask, owner, isLazy);
88 } else if (1 == mask.getSize()) {
89 return new TimelyUnaryMaskedTupleMemory<T>(mask, owner, isLazy);
90 } else {
91 return new TimelyDefaultMaskedTupleMemory<T>(mask, owner, isLazy);
92 }
93 } else {
94 if (isLazy) {
95 throw new IllegalArgumentException("Lazy maintenance is only supported by timely memories!");
96 }
97 if (mask.isIdentity()) {
98 return new IdentityMaskedTupleMemory<T>(mask, bucketType, owner);
99 } else if (0 == mask.getSize()) {
100 return new NullaryMaskedTupleMemory<T>(mask, bucketType, owner);
101 } else if (1 == mask.getSize()) {
102 return new UnaryMaskedTupleMemory<T>(mask, bucketType, owner);
103 } else {
104 return new DefaultMaskedTupleMemory<T>(mask, bucketType, owner);
105 }
106 }
107 }
108
109 @Override
110 public Map<Tuple, Map<Tuple, Diff<Timestamp>>> resumeAt(final Timestamp timestamp) {
111 throw new UnsupportedOperationException("This is only supported by lazy timely memory implementations!");
112 }
113
114 @Override
115 public Iterable<Tuple> getResumableSignatures() {
116 throw new UnsupportedOperationException("This is only supported by lazy timely memory implementations!");
117 }
118
119 @Override
120 public Timestamp getResumableTimestamp() {
121 return null;
122 }
123
124 /**
125 * Initializes the contents of this memory based on the contents of another memory. The default value is associated
126 * with each tuple in the timely memories.
127 *
128 * @since 2.3
129 */
130 public void initializeWith(final MaskedTupleMemory<Timestamp> other, final Timestamp defaultValue) {
131 throw new UnsupportedOperationException("This is only supported by timely memory implementations!");
132 }
133
134 /**
135 * Returns true if there is any tuple with the given signature that is present at the timestamp +inf, false
136 * otherwise.
137 * @since 2.4
138 */
139 public boolean isPresentAtInfinity(final ITuple signature) {
140 return get(signature) != null;
141 }
142
143 /**
144 * Returns true of this memory is timely, false otherwise.
145 *
146 * @since 2.3
147 */
148 public boolean isTimely() {
149 return false;
150 }
151
152 /**
153 * The mask by which the tuples are indexed.
154 */
155 protected final TupleMask mask;
156
157 /**
158 * The object "owning" this memory. May be null.
159 *
160 * @since 1.7
161 */
162 protected final Object owner;
163
164 /**
165 * The node owning this memory. May be null.
166 *
167 * @since 2.0
168 */
169 public Object getOwner() {
170 return owner;
171 }
172
173 /**
174 * The mask according to which tuples are projected and indexed.
175 *
176 * @since 2.0
177 */
178 public TupleMask getMask() {
179 return mask;
180 }
181
182 /**
183 * @return the number of distinct signatures of all stored tuples.
184 */
185 public abstract int getKeysetSize();
186
187 /**
188 * @return the total number of distinct tuples stored. Multiple copies of the same tuple, if allowed, are counted as
189 * one.
190 *
191 * <p>
192 * This is currently not cached but computed on demand. It is therefore not efficient, and shall only be
193 * used for debug / profiling purposes.
194 */
195 public abstract int getTotalSize();
196
197 /**
198 * Iterates over distinct tuples stored in the memory, regardless of their signatures.
199 */
200 public abstract Iterator<Tuple> iterator();
201
202 /**
203 * Retrieves a read-only view of exactly those signatures for which at least one tuple is stored
204 *
205 * @since 2.0
206 */
207 public abstract Iterable<Tuple> getSignatures();
208
209 /**
210 * Retrieves tuples that have the specified signature
211 *
212 * @return collection of tuples found, null if none
213 */
214 public abstract Collection<Tuple> get(final ITuple signature);
215
216 /**
217 * Retrieves the tuples and their associated timelines that have the specified signature.
218 *
219 * @return the mappings from tuples to timelines, null if there is no mapping for the signature
220 * @since 2.4
221 */
222 public abstract Map<Tuple, Timeline<Timestamp>> getWithTimeline(final ITuple signature);
223
224 /**
225 * Retrieves tuples that have the specified signature.
226 *
227 * @return collection of tuples found, never null
228 * @since 2.1
229 */
230 public Collection<Tuple> getOrEmpty(final ITuple signature) {
231 final Collection<Tuple> result = get(signature);
232 return result == null ? Collections.emptySet() : result;
233 }
234
235 /**
236 * Retrieves tuples with their associated timelines that have the specified signature.
237 *
238 * @return map of tuples and timelines found, never null
239 * @since 2.4
240 */
241 public Map<Tuple, Timeline<Timestamp>> getOrEmptyWithTimeline(final ITuple signature) {
242 final Map<Tuple, Timeline<Timestamp>> result = getWithTimeline(signature);
243 return result == null ? Collections.emptyMap() : result;
244 }
245
246 /**
247 * Removes a tuple occurrence from the memory with the given signature.
248 *
249 * @param tuple
250 * the tuple to be removed from the memory
251 * @param signature
252 * precomputed footprint of the tuple according to the mask
253 *
254 * @return true if this was the the last occurrence of the signature (according to the mask)
255 */
256 public boolean remove(final Tuple tuple, final Tuple signature) {
257 throw new UnsupportedOperationException("This is only supported by timeless memory implementations!");
258 }
259
260 /**
261 * Removes a tuple occurrence from the memory with the given signature and timestamp.
262 *
263 * @param tuple
264 * the tuple to be removed from the memory
265 * @param signature
266 * precomputed footprint of the tuple according to the mask
267 * @param timestamp
268 * the timestamp associated with the tuple
269 *
270 * @return A {@link Diff} describing how the timeline of the given tuple changed.
271 *
272 * @since 2.4
273 */
274 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
275 throw new UnsupportedOperationException("This is only supported by timely memory implementations!");
276 }
277
278 /**
279 * Removes a tuple occurrence from the memory.
280 *
281 * @param tuple
282 * the tuple to be removed from the memory
283 *
284 * @return true if this was the the last occurrence of the signature (according to the mask)
285 */
286 public boolean remove(final Tuple tuple) {
287 throw new UnsupportedOperationException("This is only supported by timeless memory implementations!");
288 }
289
290 /**
291 * Removes a tuple occurrence from the memory with the given timestamp.
292 *
293 * @param tuple
294 * the tuple to be removed from the memory
295 * @param timestamp
296 * the timestamp associated with the tuple
297 *
298 * @return A {@link Diff} describing how the timeline of the given tuple changed.
299 *
300 * @since 2.4
301 */
302 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Timestamp timestamp) {
303 throw new UnsupportedOperationException("This is only supported by timely memory implementations!");
304 }
305
306 /**
307 * Adds a tuple occurrence to the memory with the given signature.
308 *
309 * @param tuple
310 * the tuple to be added to the memory
311 * @param signature
312 * precomputed footprint of the tuple according to the mask
313 *
314 * @return true if new signature encountered (according to the mask)
315 */
316 public boolean add(final Tuple tuple, final Tuple signature) {
317 throw new UnsupportedOperationException("This is only supported by timeless memory implementations!");
318 }
319
320 /**
321 * Adds a tuple occurrence to the memory with the given signature and timestamp.
322 *
323 * @param tuple
324 * the tuple to be added to the memory
325 * @param signature
326 * precomputed footprint of the tuple according to the mask
327 * @param timestamp
328 * the timestamp associated with the tuple
329 *
330 * @return A {@link Diff} describing how the timeline of the given tuple changed.
331 *
332 * @since 2.4
333 */
334 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
335 throw new UnsupportedOperationException("This is only supported by timely memory implementations!");
336 }
337
338 /**
339 * Adds a tuple occurrence to the memory.
340 *
341 * @param tuple
342 * the tuple to be added to the memory
343 *
344 * @return true if new signature encountered (according to the mask)
345 */
346 public boolean add(final Tuple tuple) {
347 throw new UnsupportedOperationException("This is only supported by timeless memory implementations!");
348 }
349
350 /**
351 * Adds a tuple occurrence to the memory with the given timestamp.
352 *
353 * @param tuple
354 * the tuple to be added to the memory
355 * @param timestamp
356 * the timestamp associated with the tuple
357 *
358 * @return A {@link Diff} describing how the timeline of the given tuple changed.
359 *
360 * @since 2.4
361 */
362 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Timestamp timestamp) {
363 throw new UnsupportedOperationException("This is only supported by timely memory implementations!");
364 }
365
366 protected MaskedTupleMemory(final TupleMask mask, final Object owner) {
367 super();
368 this.mask = mask;
369 this.owner = owner;
370 }
371
372 protected IllegalStateException raiseDuplicateInsertion(final Tuple tuple) {
373 return new IllegalStateException(String.format("Duplicate insertion of tuple %s into %s", tuple, owner));
374 }
375
376 protected IllegalStateException raiseDuplicateDeletion(final Tuple tuple) {
377 return new IllegalStateException(String.format("Duplicate deletion of tuple %s from %s", tuple, owner));
378 }
379
380 @Override
381 public String toString() {
382 return getClass().getSimpleName() + "<" + mask + ">@" + owner;
383 }
384
385} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/NullaryMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/NullaryMaskedTupleMemory.java
new file mode 100644
index 00000000..7fa9e053
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/NullaryMaskedTupleMemory.java
@@ -0,0 +1,85 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
19import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
20
21/**
22 * Specialized for nullary mask; tuples are stored as a simple set/multiset memory.
23 *
24 * @author Gabor Bergmann
25 * @since 2.0
26 */
27public final class NullaryMaskedTupleMemory<Timestamp extends Comparable<Timestamp>> extends AbstractTrivialMaskedMemory<Timestamp> {
28
29 protected static final Set<Tuple> UNIT_RELATION =
30 Collections.singleton(Tuples.staticArityFlatTupleOf());
31 protected static final Set<Tuple> EMPTY_RELATION =
32 Collections.emptySet();
33 /**
34 * @param mask
35 * The mask used to index the matchings
36 * @param owner the object "owning" this memory
37 * @param bucketType the kind of tuple collection maintained for each indexer bucket
38 * @since 2.0
39 */
40 public NullaryMaskedTupleMemory(TupleMask mask, MemoryType bucketType, Object owner) {
41 super(mask, bucketType, owner);
42 if (0 != mask.getSize()) throw new IllegalArgumentException(mask.toString());
43 }
44
45 @Override
46 public int getKeysetSize() {
47 return tuples.isEmpty() ? 0 : 1;
48 }
49
50 @Override
51 public Iterable<Tuple> getSignatures() {
52 return tuples.isEmpty() ? EMPTY_RELATION : UNIT_RELATION;
53 }
54
55 @Override
56 public Collection<Tuple> get(ITuple signature) {
57 if (0 == signature.getSize())
58 return tuples.distinctValues();
59 else return null;
60 }
61
62 @Override
63 public boolean remove(Tuple tuple, Tuple signature) {
64 tuples.removeOne(tuple);
65 return tuples.isEmpty();
66 }
67
68 @Override
69 public boolean remove(Tuple tuple) {
70 return remove(tuple, null);
71 }
72
73 @Override
74 public boolean add(Tuple tuple, Tuple signature) {
75 boolean wasEmpty = tuples.isEmpty();
76 tuples.addOne(tuple);
77 return wasEmpty;
78 }
79
80 @Override
81 public boolean add(Tuple tuple) {
82 return add(tuple, null);
83 }
84
85}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/UnaryMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/UnaryMaskedTupleMemory.java
new file mode 100644
index 00000000..f34cc9e3
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/UnaryMaskedTupleMemory.java
@@ -0,0 +1,143 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories;
10
11import java.util.Collection;
12import java.util.Iterator;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
19import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
21import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
22import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
23import tools.refinery.viatra.runtime.matchers.util.IMultiLookup.ChangeGranularity;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
25
26/**
27 * Specialized for unary mask; tuples are indexed by a single column as opposed to a projection (signature) tuple.
28 *
29 * @author Gabor Bergmann
30 * @since 2.0
31 */
32public final class UnaryMaskedTupleMemory<Timestamp extends Comparable<Timestamp>> extends MaskedTupleMemory<Timestamp> {
33
34 protected IMultiLookup<Object, Tuple> columnToTuples;
35 protected final int keyPosition;
36
37 /**
38 * @param mask
39 * The mask used to index the matchings
40 * @param owner the object "owning" this memory
41 * @param bucketType the kind of tuple collection maintained for each indexer bucket
42 * @since 2.0
43 */
44 public UnaryMaskedTupleMemory(TupleMask mask, MemoryType bucketType, Object owner) {
45 super(mask, owner);
46 if (1 != mask.getSize()) throw new IllegalArgumentException(mask.toString());
47
48 columnToTuples = CollectionsFactory.<Object, Tuple>createMultiLookup(
49 Object.class, bucketType, Object.class);
50 keyPosition = mask.indices[0];
51 }
52
53 @Override
54 public void clear() {
55 columnToTuples.clear();
56 }
57
58 @Override
59 public int getKeysetSize() {
60 return columnToTuples.countKeys();
61 }
62
63 @Override
64 public int getTotalSize() {
65 int i = 0;
66 for (Object key : columnToTuples.distinctKeys()) {
67 i += columnToTuples.lookup(key).size();
68 }
69 return i;
70 }
71
72 @Override
73 public Iterator<Tuple> iterator() {
74 return columnToTuples.distinctValues().iterator();
75 }
76
77 @Override
78 public Iterable<Tuple> getSignatures() {
79 return () -> {
80 Iterator<Object> wrapped = columnToTuples.distinctKeys().iterator();
81 return new Iterator<Tuple>() {
82 @Override
83 public boolean hasNext() {
84 return wrapped.hasNext();
85 }
86 @Override
87 public Tuple next() {
88 Object key = wrapped.next();
89 return Tuples.staticArityFlatTupleOf(key);
90 }
91 };
92 };
93 }
94
95 @Override
96 public Collection<Tuple> get(ITuple signature) {
97 Object key = signature.get(0);
98 IMemoryView<Tuple> bucket = columnToTuples.lookup(key);
99 return bucket == null ? null : bucket.distinctValues();
100 }
101
102 @Override
103 public Map<Tuple, Timeline<Timestamp>> getWithTimeline(ITuple signature) {
104 throw new UnsupportedOperationException("Timeless memories do not support timestamp-based lookup!");
105 }
106
107 @Override
108 public boolean remove(Tuple tuple, Tuple signature) {
109 return removeInternal(tuple, tuple.get(keyPosition));
110 }
111
112 @Override
113 public boolean remove(Tuple tuple) {
114 return removeInternal(tuple, tuple.get(keyPosition));
115 }
116
117 @Override
118 public boolean add(Tuple tuple, Tuple signature) {
119 return addInternal(tuple, tuple.get(keyPosition));
120 }
121
122 @Override
123 public boolean add(Tuple tuple) {
124 return addInternal(tuple, tuple.get(keyPosition));
125 }
126
127 protected boolean addInternal(Tuple tuple, Object key) {
128 try {
129 return columnToTuples.addPair(key, tuple) == ChangeGranularity.KEY;
130 } catch (IllegalStateException ex) { // ignore worthless internal exception details
131 throw raiseDuplicateInsertion(tuple);
132 }
133 }
134
135 protected boolean removeInternal(Tuple tuple, Object key) {
136 try {
137 return columnToTuples.removePair(key, tuple) == ChangeGranularity.KEY;
138 } catch (IllegalStateException ex) { // ignore worthless internal exception details
139 throw raiseDuplicateDeletion(tuple);
140 }
141 }
142
143}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyMaskedMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyMaskedMemory.java
new file mode 100644
index 00000000..45ce3a4e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyMaskedMemory.java
@@ -0,0 +1,228 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories.timely;
10
11import java.util.Collection;
12import java.util.Iterator;
13import java.util.Map;
14import java.util.Map.Entry;
15import java.util.Objects;
16import java.util.Set;
17import java.util.TreeMap;
18
19import tools.refinery.viatra.runtime.matchers.memories.MaskedTupleMemory;
20import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
21import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
22import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
23import tools.refinery.viatra.runtime.matchers.util.Direction;
24import tools.refinery.viatra.runtime.matchers.util.Signed;
25import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
26import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
27import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
28
29/**
30 * Common parts of timely default and timely unary implementations.
31 *
32 * @noextend This class is not intended to be subclassed by clients.
33 * @author Tamas Szabo
34 * @since 2.3
35 */
36abstract class AbstractTimelyMaskedMemory<Timestamp extends Comparable<Timestamp>, KeyType>
37 extends MaskedTupleMemory<Timestamp> {
38
39 protected final TreeMap<Timestamp, Set<KeyType>> foldingStates;
40 protected final Map<KeyType, TimelyMemory<Timestamp>> memoryMap;
41 protected final boolean isLazy;
42
43 public AbstractTimelyMaskedMemory(final TupleMask mask, final Object owner, final boolean isLazy) {
44 super(mask, owner);
45 this.isLazy = isLazy;
46 this.memoryMap = CollectionsFactory.createMap();
47 this.foldingStates = this.isLazy ? CollectionsFactory.createTreeMap() : null;
48 }
49
50 @Override
51 public void initializeWith(final MaskedTupleMemory<Timestamp> other, final Timestamp defaultValue) {
52 final Iterable<Tuple> signatures = other.getSignatures();
53 for (final Tuple signature : signatures) {
54 if (other.isTimely()) {
55 final Map<Tuple, Timeline<Timestamp>> tupleMap = other.getWithTimeline(signature);
56 for (final Entry<Tuple, Timeline<Timestamp>> entry : tupleMap.entrySet()) {
57 for (final Signed<Timestamp> signed : entry.getValue().asChangeSequence()) {
58 if (signed.getDirection() == Direction.DELETE) {
59 this.removeWithTimestamp(entry.getKey(), signed.getPayload());
60 } else {
61 this.addWithTimestamp(entry.getKey(), signed.getPayload());
62 }
63 }
64 }
65 } else {
66 final Collection<Tuple> tuples = other.get(signature);
67 for (final Tuple tuple : tuples) {
68 this.addWithTimestamp(tuple, defaultValue);
69 }
70 }
71 }
72 }
73
74 public boolean isPresentAtInfinityInteral(KeyType key) {
75 final TimelyMemory<Timestamp> values = this.memoryMap.get(key);
76 if (values == null) {
77 return false;
78 } else {
79 return values.getCountAtInfinity() != 0;
80 }
81 }
82
83 @Override
84 public void clear() {
85 this.memoryMap.clear();
86 }
87
88 @Override
89 public int getKeysetSize() {
90 return this.memoryMap.keySet().size();
91 }
92
93 @Override
94 public int getTotalSize() {
95 int i = 0;
96 for (final Entry<KeyType, TimelyMemory<Timestamp>> entry : this.memoryMap.entrySet()) {
97 i += entry.getValue().size();
98 }
99 return i;
100 }
101
102 @Override
103 public Iterator<Tuple> iterator() {
104 return this.memoryMap.values().stream().flatMap(e -> e.keySet().stream()).iterator();
105 }
106
107 protected Collection<Tuple> getInternal(final KeyType key) {
108 final TimelyMemory<Timestamp> memory = this.memoryMap.get(key);
109 if (memory == null) {
110 return null;
111 } else {
112 return memory.getTuplesAtInfinity();
113 }
114 }
115
116 public Map<Tuple, Timeline<Timestamp>> getWithTimestampInternal(final KeyType key) {
117 final TimelyMemory<Timestamp> memory = this.memoryMap.get(key);
118 if (memory == null) {
119 return null;
120 } else {
121 return memory.asMap();
122 }
123 }
124
125 protected Diff<Timestamp> removeInternal(final KeyType key, final Tuple tuple, final Timestamp timestamp) {
126 Timestamp oldResumableTimestamp = null;
127 Timestamp newResumableTimestamp = null;
128
129 final TimelyMemory<Timestamp> keyMemory = this.memoryMap.get(key);
130 if (keyMemory == null) {
131 throw raiseDuplicateDeletion(tuple);
132 }
133
134 if (this.isLazy) {
135 oldResumableTimestamp = keyMemory.getResumableTimestamp();
136 }
137
138 Diff<Timestamp> diff = null;
139 try {
140 diff = keyMemory.remove(tuple, timestamp);
141 } catch (final IllegalStateException e) {
142 throw raiseDuplicateDeletion(tuple);
143 }
144 if (keyMemory.isEmpty()) {
145 this.memoryMap.remove(key);
146 }
147
148 if (this.isLazy) {
149 newResumableTimestamp = keyMemory.getResumableTimestamp();
150 if (!Objects.equals(oldResumableTimestamp, newResumableTimestamp)) {
151 unregisterFoldingState(oldResumableTimestamp, key);
152 registerFoldingState(newResumableTimestamp, key);
153 }
154 }
155
156 return diff;
157 }
158
159 protected Diff<Timestamp> addInternal(final KeyType key, final Tuple tuple, final Timestamp timestamp) {
160 Timestamp oldResumableTimestamp = null;
161 Timestamp newResumableTimestamp = null;
162
163 final TimelyMemory<Timestamp> keyMemory = this.memoryMap.computeIfAbsent(key,
164 k -> new TimelyMemory<Timestamp>(this.isLazy));
165
166 if (this.isLazy) {
167 oldResumableTimestamp = keyMemory.getResumableTimestamp();
168 }
169
170 final Diff<Timestamp> diff = keyMemory.put(tuple, timestamp);
171
172 if (this.isLazy) {
173 newResumableTimestamp = keyMemory.getResumableTimestamp();
174 if (!Objects.equals(oldResumableTimestamp, newResumableTimestamp)) {
175 unregisterFoldingState(oldResumableTimestamp, key);
176 registerFoldingState(newResumableTimestamp, key);
177 }
178 }
179
180 return diff;
181 }
182
183 @Override
184 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Timestamp timestamp) {
185 return removeWithTimestamp(tuple, null, timestamp);
186 }
187
188 @Override
189 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Timestamp timestamp) {
190 return addWithTimestamp(tuple, null, timestamp);
191 }
192
193 @Override
194 public boolean isTimely() {
195 return true;
196 }
197
198 protected void registerFoldingState(final Timestamp timestamp, final KeyType key) {
199 if (timestamp != null) {
200 this.foldingStates.compute(timestamp, (k, v) -> {
201 if (v == null) {
202 v = CollectionsFactory.createSet();
203 }
204 v.add(key);
205 return v;
206 });
207 }
208 }
209
210 protected void unregisterFoldingState(final Timestamp timestamp, final KeyType key) {
211 if (timestamp != null) {
212 this.foldingStates.compute(timestamp, (k, v) -> {
213 v.remove(key);
214 return v.isEmpty() ? null : v;
215 });
216 }
217 }
218
219 @Override
220 public Timestamp getResumableTimestamp() {
221 if (this.foldingStates == null || this.foldingStates.isEmpty()) {
222 return null;
223 } else {
224 return this.foldingStates.firstKey();
225 }
226 }
227
228}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyTrivialMaskedMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyTrivialMaskedMemory.java
new file mode 100644
index 00000000..ca06685a
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/AbstractTimelyTrivialMaskedMemory.java
@@ -0,0 +1,100 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories.timely;
10
11import java.util.Collection;
12import java.util.Iterator;
13import java.util.Map;
14import java.util.Map.Entry;
15
16import tools.refinery.viatra.runtime.matchers.memories.MaskedTupleMemory;
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19import tools.refinery.viatra.runtime.matchers.util.Direction;
20import tools.refinery.viatra.runtime.matchers.util.Signed;
21import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
22import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
24
25/**
26 * Common parts of timely nullary and timely identity implementations.
27 *
28 * @noextend This class is not intended to be subclassed by clients.
29 * @author Tamas Szabo
30 * @since 2.3
31 */
32abstract class AbstractTimelyTrivialMaskedMemory<Timestamp extends Comparable<Timestamp>> extends MaskedTupleMemory<Timestamp> {
33
34 protected final TimelyMemory<Timestamp> memory;
35
36 protected AbstractTimelyTrivialMaskedMemory(final TupleMask mask, final Object owner, final boolean isLazy) {
37 super(mask, owner);
38 this.memory = new TimelyMemory<Timestamp>(isLazy);
39 }
40
41 @Override
42 public void initializeWith(final MaskedTupleMemory<Timestamp> other, final Timestamp defaultValue) {
43 final Iterable<Tuple> signatures = other.getSignatures();
44 for (final Tuple signature : signatures) {
45 if (other.isTimely()) {
46 final Map<Tuple, Timeline<Timestamp>> tupleMap = other.getWithTimeline(signature);
47 for (final Entry<Tuple, Timeline<Timestamp>> entry : tupleMap.entrySet()) {
48 for (final Signed<Timestamp> signed : entry.getValue().asChangeSequence()) {
49 if (signed.getDirection() == Direction.DELETE) {
50 this.removeWithTimestamp(entry.getKey(), signed.getPayload());
51 } else {
52 this.addWithTimestamp(entry.getKey(), signed.getPayload());
53 }
54 }
55 }
56 } else {
57 final Collection<Tuple> tuples = other.get(signature);
58 for (final Tuple tuple : tuples) {
59 this.removeWithTimestamp(tuple, defaultValue);
60 }
61 }
62 }
63 }
64
65 @Override
66 public void clear() {
67 this.memory.clear();
68 }
69
70 @Override
71 public int getTotalSize() {
72 return this.memory.size();
73 }
74
75 @Override
76 public Iterator<Tuple> iterator() {
77 return this.memory.keySet().iterator();
78 }
79
80 @Override
81 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Timestamp timestamp) {
82 return removeWithTimestamp(tuple, null, timestamp);
83 }
84
85 @Override
86 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Timestamp timestamp) {
87 return addWithTimestamp(tuple, null, timestamp);
88 }
89
90 @Override
91 public boolean isTimely() {
92 return true;
93 }
94
95 @Override
96 public Timestamp getResumableTimestamp() {
97 return this.memory.getResumableTimestamp();
98 }
99
100}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyDefaultMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyDefaultMaskedTupleMemory.java
new file mode 100644
index 00000000..623d7399
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyDefaultMaskedTupleMemory.java
@@ -0,0 +1,98 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.memories.timely;
11
12import java.util.Collection;
13import java.util.Collections;
14import java.util.Map;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
22import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
24
25/**
26 * Default timely implementation that covers all cases.
27 *
28 * @author Tamas Szabo
29 * @since 2.3
30 */
31public final class TimelyDefaultMaskedTupleMemory<Timestamp extends Comparable<Timestamp>>
32 extends AbstractTimelyMaskedMemory<Timestamp, Tuple> {
33
34 public TimelyDefaultMaskedTupleMemory(final TupleMask mask, final Object owner, final boolean isLazy) {
35 super(mask, owner, isLazy);
36 }
37
38 @Override
39 public Iterable<Tuple> getSignatures() {
40 return this.memoryMap.keySet();
41 }
42
43 @Override
44 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Tuple signature,
45 final Timestamp timestamp) {
46 final Tuple key = mask.transform(tuple);
47 return removeInternal(key, tuple, timestamp);
48 }
49
50 @Override
51 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Tuple signature,
52 final Timestamp timestamp) {
53 final Tuple key = this.mask.transform(tuple);
54 return addInternal(key, tuple, timestamp);
55 }
56
57 @Override
58 public Collection<Tuple> get(final ITuple signature) {
59 return getInternal(signature.toImmutable());
60 }
61
62 @Override
63 public Map<Tuple, Timeline<Timestamp>> getWithTimeline(final ITuple signature) {
64 return getWithTimestampInternal(signature.toImmutable());
65 }
66
67 @Override
68 public boolean isPresentAtInfinity(final ITuple signature) {
69 return isPresentAtInfinityInteral(signature.toImmutable());
70 }
71
72 @Override
73 public Set<Tuple> getResumableSignatures() {
74 if (this.foldingStates == null || this.foldingStates.isEmpty()) {
75 return Collections.emptySet();
76 } else {
77 return this.foldingStates.firstEntry().getValue();
78 }
79 }
80
81 @Override
82 public Map<Tuple, Map<Tuple, Diff<Timestamp>>> resumeAt(final Timestamp timestamp) {
83 final Map<Tuple, Map<Tuple, Diff<Timestamp>>> result = CollectionsFactory.createMap();
84 final Timestamp resumableTimestamp = this.getResumableTimestamp();
85 if (resumableTimestamp == null || resumableTimestamp.compareTo(timestamp) != 0) {
86 throw new IllegalStateException("Expected to continue folding at " + resumableTimestamp + "!");
87 }
88 final Set<Tuple> signatures = this.foldingStates.remove(timestamp);
89 for (final Tuple signature : signatures) {
90 final TimelyMemory<Timestamp> memory = this.memoryMap.get(signature);
91 final Map<Tuple, Diff<Timestamp>> diffMap = memory.resumeAt(resumableTimestamp);
92 result.put(signature, diffMap);
93 registerFoldingState(memory.getResumableTimestamp(), signature);
94 }
95 return result;
96 }
97
98}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyIdentityMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyIdentityMaskedTupleMemory.java
new file mode 100644
index 00000000..568f274d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyIdentityMaskedTupleMemory.java
@@ -0,0 +1,106 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories.timely;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Map;
14import java.util.Map.Entry;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
21import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
22import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
23
24/**
25 * Timely specialization for identity mask.
26 *
27 * @author Tamas Szabo
28 * @since 2.3
29 */
30public final class TimelyIdentityMaskedTupleMemory<Timestamp extends Comparable<Timestamp>>
31 extends AbstractTimelyTrivialMaskedMemory<Timestamp> {
32
33 public TimelyIdentityMaskedTupleMemory(final TupleMask mask, final Object owner, final boolean isLazy) {
34 super(mask, owner, isLazy);
35 if (!mask.isIdentity())
36 throw new IllegalArgumentException(mask.toString());
37 }
38
39 @Override
40 public int getKeysetSize() {
41 return this.memory.size();
42 }
43
44 @Override
45 public Iterable<Tuple> getSignatures() {
46 return this.memory.keySet();
47 }
48
49 @Override
50 public Collection<Tuple> get(final ITuple signature) {
51 if (this.memory.getTuplesAtInfinity().contains(signature)) {
52 return Collections.singleton(signature.toImmutable());
53 } else {
54 return null;
55 }
56 }
57
58 @Override
59 public Map<Tuple, Timeline<Timestamp>> getWithTimeline(final ITuple signature) {
60 final Timeline<Timestamp> value = this.memory.get(signature);
61 if (value != null) {
62 return Collections.singletonMap(signature.toImmutable(), value);
63 } else {
64 return null;
65 }
66 }
67
68 @Override
69 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
70 try {
71 return this.memory.remove(tuple, timestamp);
72 } catch (final IllegalStateException e) {
73 throw raiseDuplicateDeletion(tuple);
74 }
75 }
76
77 @Override
78 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
79 return this.memory.put(tuple, timestamp);
80 }
81
82 @Override
83 public boolean isPresentAtInfinity(final ITuple signature) {
84 return this.memory.isPresentAtInfinity(signature.toImmutable());
85 }
86
87 @Override
88 public Set<Tuple> getResumableSignatures() {
89 if (this.memory.getResumableTimestamp() != null) {
90 return this.memory.getResumableTuples();
91 } else {
92 return Collections.emptySet();
93 }
94 }
95
96 @Override
97 public Map<Tuple, Map<Tuple, Diff<Timestamp>>> resumeAt(final Timestamp timestamp) {
98 final Map<Tuple, Diff<Timestamp>> diffMap = this.memory.resumeAt(timestamp);
99 final Map<Tuple, Map<Tuple, Diff<Timestamp>>> result = CollectionsFactory.createMap();
100 for (final Entry<Tuple, Diff<Timestamp>> entry : diffMap.entrySet()) {
101 result.put(entry.getKey(), Collections.singletonMap(entry.getKey(), entry.getValue()));
102 }
103 return result;
104 }
105
106}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyNullaryMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyNullaryMaskedTupleMemory.java
new file mode 100644
index 00000000..75987a89
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyNullaryMaskedTupleMemory.java
@@ -0,0 +1,108 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories.timely;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
20import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
21import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
22
23/**
24 * Timely specialization for nullary mask.
25 *
26 * @author Tamas Szabo
27 * @since 2.3
28 */
29public final class TimelyNullaryMaskedTupleMemory<Timestamp extends Comparable<Timestamp>>
30 extends AbstractTimelyTrivialMaskedMemory<Timestamp> {
31
32 protected static final Tuple EMPTY_TUPLE = Tuples.staticArityFlatTupleOf();
33 protected static final Set<Tuple> UNIT_RELATION = Collections.singleton(EMPTY_TUPLE);
34 protected static final Set<Tuple> EMPTY_RELATION = Collections.emptySet();
35
36 public TimelyNullaryMaskedTupleMemory(final TupleMask mask, final Object owner, final boolean isLazy) {
37 super(mask, owner, isLazy);
38 if (0 != mask.getSize()) {
39 throw new IllegalArgumentException(mask.toString());
40 }
41 }
42
43 @Override
44 public int getKeysetSize() {
45 return this.memory.isEmpty() ? 0 : 1;
46 }
47
48 @Override
49 public Iterable<Tuple> getSignatures() {
50 return this.memory.isEmpty() ? EMPTY_RELATION : UNIT_RELATION;
51 }
52
53 @Override
54 public Collection<Tuple> get(final ITuple signature) {
55 if (0 == signature.getSize()) {
56 return this.memory.getTuplesAtInfinity();
57 } else {
58 return null;
59 }
60 }
61
62 @Override
63 public Map<Tuple, Timeline<Timestamp>> getWithTimeline(final ITuple signature) {
64 if (0 == signature.getSize()) {
65 return this.memory.asMap();
66 } else {
67 return null;
68 }
69 }
70
71 @Override
72 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
73 try {
74 return this.memory.remove(tuple, timestamp);
75 } catch (final IllegalStateException e) {
76 throw raiseDuplicateDeletion(tuple);
77 }
78 }
79
80 @Override
81 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
82 return this.memory.put(tuple, timestamp);
83 }
84
85 @Override
86 public boolean isPresentAtInfinity(final ITuple signature) {
87 if (0 == signature.getSize()) {
88 return this.memory.getCountAtInfinity() > 0;
89 } else {
90 return false;
91 }
92 }
93
94 @Override
95 public Set<Tuple> getResumableSignatures() {
96 if (this.memory.getResumableTimestamp() != null) {
97 return UNIT_RELATION;
98 } else {
99 return EMPTY_RELATION;
100 }
101 }
102
103 @Override
104 public Map<Tuple, Map<Tuple, Diff<Timestamp>>> resumeAt(final Timestamp timestamp) {
105 return Collections.singletonMap(EMPTY_TUPLE, this.memory.resumeAt(timestamp));
106 }
107
108}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyUnaryMaskedTupleMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyUnaryMaskedTupleMemory.java
new file mode 100644
index 00000000..178193af
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/memories/timely/TimelyUnaryMaskedTupleMemory.java
@@ -0,0 +1,133 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.memories.timely;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.Iterator;
14import java.util.Map;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
20import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
21import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
22import tools.refinery.viatra.runtime.matchers.util.TimelyMemory;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
25
26/**
27 * Timely specialization for unary mask.
28 *
29 * @author Tamas Szabo
30 * @since 2.3
31 */
32public final class TimelyUnaryMaskedTupleMemory<Timestamp extends Comparable<Timestamp>>
33 extends AbstractTimelyMaskedMemory<Timestamp, Object> {
34
35 protected final int keyPosition;
36
37 public TimelyUnaryMaskedTupleMemory(final TupleMask mask, final Object owner, final boolean isLazy) {
38 super(mask, owner, isLazy);
39 if (1 != mask.getSize())
40 throw new IllegalArgumentException(mask.toString());
41 this.keyPosition = mask.indices[0];
42 }
43
44 @Override
45 public Iterable<Tuple> getSignatures() {
46 return () -> {
47 final Iterator<Object> wrapped = this.memoryMap.keySet().iterator();
48 return new Iterator<Tuple>() {
49 @Override
50 public boolean hasNext() {
51 return wrapped.hasNext();
52 }
53
54 @Override
55 public Tuple next() {
56 final Object key = wrapped.next();
57 return Tuples.staticArityFlatTupleOf(key);
58 }
59 };
60 };
61 }
62
63 @Override
64 public Diff<Timestamp> removeWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
65 final Object key = tuple.get(keyPosition);
66 return removeInternal(key, tuple, timestamp);
67 }
68
69 @Override
70 public Diff<Timestamp> addWithTimestamp(final Tuple tuple, final Tuple signature, final Timestamp timestamp) {
71 final Object key = tuple.get(keyPosition);
72 return addInternal(key, tuple, timestamp);
73 }
74
75 @Override
76 public Collection<Tuple> get(final ITuple signature) {
77 return getInternal(signature.get(0));
78 }
79
80 @Override
81 public Map<Tuple, Timeline<Timestamp>> getWithTimeline(final ITuple signature) {
82 return getWithTimestampInternal(signature.get(0));
83 }
84
85 @Override
86 public boolean isPresentAtInfinity(ITuple signature) {
87 return isPresentAtInfinityInteral(signature.get(0));
88 }
89
90 @Override
91 public Iterable<Tuple> getResumableSignatures() {
92 if (this.foldingStates == null || this.foldingStates.isEmpty()) {
93 return Collections.emptySet();
94 } else {
95 return () -> {
96 final Iterator<Object> wrapped = this.foldingStates.firstEntry().getValue().iterator();
97 return new Iterator<Tuple>() {
98 @Override
99 public boolean hasNext() {
100 return wrapped.hasNext();
101 }
102
103 @Override
104 public Tuple next() {
105 final Object key = wrapped.next();
106 return Tuples.staticArityFlatTupleOf(key);
107 }
108 };
109 };
110 }
111 }
112
113 @Override
114 public Map<Tuple, Map<Tuple, Diff<Timestamp>>> resumeAt(final Timestamp timestamp) {
115 final Map<Tuple, Map<Tuple, Diff<Timestamp>>> result = CollectionsFactory.createMap();
116 final Timestamp resumableTimestamp = this.getResumableTimestamp();
117 if (resumableTimestamp == null) {
118 throw new IllegalStateException("There is nothing to fold!");
119 } else if (resumableTimestamp.compareTo(timestamp) != 0) {
120 throw new IllegalStateException("Expected to continue folding at " + resumableTimestamp + "!");
121 }
122
123 final Set<Object> signatures = this.foldingStates.remove(timestamp);
124 for (final Object signature : signatures) {
125 final TimelyMemory<Timestamp> memory = this.memoryMap.get(signature);
126 final Map<Tuple, Diff<Timestamp>> diffMap = memory.resumeAt(resumableTimestamp);
127 result.put(Tuples.staticArityFlatTupleOf(signature), diffMap);
128 registerFoldingState(memory.getResumableTimestamp(), signature);
129 }
130 return result;
131 }
132
133}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IOperationCompiler.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IOperationCompiler.java
new file mode 100644
index 00000000..c9f4b305
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IOperationCompiler.java
@@ -0,0 +1,108 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.planning;
11
12import java.util.Map;
13
14import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
15import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
17import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
18import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
19
20/**
21 *
22 * An implicit common parameter is the "effort" PatternDescription. This
23 * indicates that the build request is part of an effort to build the matcher of
24 * the given pattern; it it important to record this during code generation so
25 * that the generated code can be separated according to patterns.
26 *
27 * @param <Collector>
28 * the handle of a receiver-like RETE ending to which plans can be
29 * connected
30 * @author Gabor Bergmann
31 * @noimplement This interface is not intended to be implemented by clients.
32 */
33public interface IOperationCompiler<Collector> {
34
35 /**
36 * @throws ViatraQueryRuntimeException
37 */
38 public Collector patternCollector(PQuery pattern);
39
40 public void buildConnection(SubPlan parentPlan, Collector collector);
41
42 /**
43 * @since 0.9
44 */
45 public void patternFinished(PQuery pattern, Collector collector);
46
47 /**
48 * @throws ViatraQueryRuntimeException
49 */
50 public SubPlan patternCallPlan(Tuple nodes, PQuery supplierKey);
51
52 public SubPlan transitiveInstantiationPlan(Tuple nodes);
53
54 public SubPlan directInstantiationPlan(Tuple nodes);
55
56 public SubPlan transitiveGeneralizationPlan(Tuple nodes);
57
58 public SubPlan directGeneralizationPlan(Tuple nodes);
59
60 public SubPlan transitiveContainmentPlan(Tuple nodes);
61
62 public SubPlan directContainmentPlan(Tuple nodes);
63
64 public SubPlan binaryEdgeTypePlan(Tuple nodes, Object supplierKey);
65
66 public SubPlan ternaryEdgeTypePlan(Tuple nodes, Object supplierKey);
67
68 public SubPlan unaryTypePlan(Tuple nodes, Object supplierKey);
69
70 public SubPlan buildStartingPlan(Object[] constantValues, Object[] constantNames);
71
72 public SubPlan buildEqualityChecker(SubPlan parentPlan, int[] indices);
73
74 public SubPlan buildInjectivityChecker(SubPlan parentPlan, int subject, int[] inequalIndices);
75
76 public SubPlan buildTransitiveClosure(SubPlan parentPlan);
77
78 public SubPlan buildTrimmer(SubPlan parentPlan, TupleMask trimMask, boolean enforceUniqueness);
79
80 public SubPlan buildBetaNode(SubPlan primaryPlan, SubPlan sidePlan,
81 TupleMask primaryMask, TupleMask sideMask, TupleMask complementer, boolean negative);
82
83 public SubPlan buildCounterBetaNode(SubPlan primaryPlan, SubPlan sidePlan,
84 TupleMask primaryMask, TupleMask originalSideMask, TupleMask complementer,
85 Object aggregateResultCalibrationElement);
86
87 public SubPlan buildCountCheckBetaNode(SubPlan primaryPlan, SubPlan sidePlan,
88 TupleMask primaryMask, TupleMask originalSideMask, int resultPositionInSignature);
89
90 public SubPlan buildPredicateChecker(IExpressionEvaluator evaluator, Map<String, Integer> tupleNameMap,
91 SubPlan parentPlan);
92 public SubPlan buildFunctionEvaluator(IExpressionEvaluator evaluator, Map<String, Integer> tupleNameMap,
93 SubPlan parentPlan, Object computedResultCalibrationElement);
94
95 /**
96 * @return an operation compiler that potentially acts on a separate container
97 */
98 public IOperationCompiler<Collector> getNextContainer();
99
100 /**
101 * @return an operation compiler that puts build actions on the tab of the given pattern
102 * @since 0.9
103 */
104 public IOperationCompiler<Collector> putOnTab(PQuery effort /*, IPatternMatcherContext context*/);
105
106 public void reinitialize();
107
108} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IQueryPlannerStrategy.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IQueryPlannerStrategy.java
new file mode 100644
index 00000000..6ce9d91b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/IQueryPlannerStrategy.java
@@ -0,0 +1,29 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.planning;
11
12import org.apache.log4j.Logger;
13import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
14import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
15import tools.refinery.viatra.runtime.matchers.psystem.PBody;
16
17/**
18 * An algorithm that builds a query plan based on a PSystem representation of a body of constraints. This interface is
19 * for internal use of the various query backends.
20 *
21 * @author Gabor Bergmann
22 */
23public interface IQueryPlannerStrategy {
24
25 /**
26 * @throws ViatraQueryRuntimeException
27 */
28 public SubPlan plan(PBody pSystem, Logger logger, IQueryMetaContext context);
29}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/QueryProcessingException.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/QueryProcessingException.java
new file mode 100644
index 00000000..501ddf73
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/QueryProcessingException.java
@@ -0,0 +1,102 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning;
10
11import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
12
13/**
14 * @author Zoltan Ujhelyi
15 * @since 0.9
16 */
17public class QueryProcessingException extends ViatraQueryRuntimeException {
18
19 private static final long serialVersionUID = -8272290113656867086L;
20 /**
21 * Binding the '{n}' (n = 1..N) strings to contextual conditions in 'context'
22 *
23 * @param context
24 * : array of context-sensitive Strings
25 */
26 protected static String bind(String message, String[] context) {
27 if (context == null)
28 return message;
29
30 String internal = message;
31 for (int i = 0; i < context.length; i++) {
32 internal = internal.replace("{" + (i + 1) + "}", context[i] != null ? context[i] : "<<null>>");
33 }
34 return internal;
35 }
36
37 private Object patternDescription;
38 private String shortMessage;
39
40 /**
41 * @param message
42 * The template of the exception message
43 * @param context
44 * The data elements to be used to instantiate the template. Can be null if no context parameter is
45 * defined
46 * @param patternDescription
47 * the PatternDescription where the exception occurred
48 * @since 2.0
49 */
50 public QueryProcessingException(String message, Object patternDescription) {
51 super(message);
52 initializeFields(message, patternDescription);
53 }
54
55 /**
56 * @param message
57 * The template of the exception message
58 * @param context
59 * The data elements to be used to instantiate the template. Can be null if no context parameter is
60 * defined
61 * @param patternDescription
62 * the PatternDescription where the exception occurred
63 */
64 public QueryProcessingException(String message, String[] context, String shortMessage, Object patternDescription) {
65 super(bind(message, context));
66 initializeFields(shortMessage, patternDescription);
67 }
68
69 /**
70 * @param message
71 * The template of the exception message
72 * @param context
73 * The data elements to be used to instantiate the template. Can be null if no context parameter is
74 * defined
75 * @param patternDescription
76 * the PatternDescription where the exception occurred
77 */
78 public QueryProcessingException(String message, String[] context, String shortMessage, Object patternDescription,
79 Throwable cause) {
80 super(bind(message, context), cause);
81 initializeFields(shortMessage, patternDescription);
82 }
83
84 public Object getPatternDescription() {
85 return patternDescription;
86 }
87
88 public String getShortMessage() {
89 return shortMessage;
90 }
91
92 private void initializeFields(String shortMessage, Object patternDescription) {
93 this.patternDescription = patternDescription;
94 this.shortMessage = shortMessage;
95 }
96
97
98 public void setPatternDescription(Object patternDescription) {
99 this.patternDescription = patternDescription;
100 }
101
102} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlan.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlan.java
new file mode 100644
index 00000000..1998df9d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlan.java
@@ -0,0 +1,240 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.planning;
11
12import java.util.Arrays;
13import java.util.HashSet;
14import java.util.List;
15import java.util.Set;
16import java.util.WeakHashMap;
17import java.util.stream.Collectors;
18
19import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
20import tools.refinery.viatra.runtime.matchers.planning.helpers.TypeHelper;
21import tools.refinery.viatra.runtime.matchers.planning.operations.POperation;
22import tools.refinery.viatra.runtime.matchers.planning.operations.PProject;
23import tools.refinery.viatra.runtime.matchers.planning.operations.PStart;
24import tools.refinery.viatra.runtime.matchers.psystem.PBody;
25import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
26import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
27import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
28
29/**
30 * A plan representing a subset of (or possibly all the) constraints evaluated. A SubPlan instance is responsible for
31 * representing a state of the plan; but after it is initialized it is expected be immutable
32 * (exception: inferred constraints, see {@link #inferConstraint(PConstraint)}).
33 *
34 * <p> A SubPlan is constructed by applying a {@link POperation} on zero or more parent SubPlans.
35 * Important maintained information: <ul>
36 * <li>set of <b>variables</b> whose values are known when the runtime evaluation is at this stage,
37 * <li>set of <b>constraints</b> that are known to hold true at this point.
38 * </ul>
39 *
40 * <p> Recommended to instantiate via a {@link SubPlanFactory} or subclasses,
41 * so that query planners can subclass SubPlan if needed.
42 *
43 * @author Gabor Bergmann
44 *
45 */
46public class SubPlan {
47 private PBody body;
48 private List<? extends SubPlan> parentPlans;
49 private POperation operation;
50
51 private final Set<PVariable> visibleVariables;
52 private final Set<PVariable> allVariables;
53 private final Set<PVariable> introducedVariables; // delta compared to first parent
54 private Set<PConstraint> allConstraints;
55 private Set<PConstraint> deltaConstraints; // delta compared to all parents
56 private Set<PConstraint> externallyInferredConstraints; // inferred in addition to direct consequences of the operation and parents
57
58
59
60
61
62 /**
63 * A SubPlan is constructed by applying a {@link POperation} on zero or more parent SubPlans.
64 */
65 public SubPlan(PBody body, POperation operation, SubPlan... parentPlans) {
66 this(body, operation, Arrays.asList(parentPlans));
67 }
68 /**
69 * A SubPlan is constructed by applying a {@link POperation} on zero or more parent SubPlans.
70 */
71 public SubPlan(PBody body, POperation operation, List<? extends SubPlan> parentPlans) {
72 super();
73 this.body = body;
74 this.parentPlans = parentPlans;
75 this.operation = operation;
76
77 this.externallyInferredConstraints = new HashSet<PConstraint>();
78 this.deltaConstraints = new HashSet<PConstraint>(operation.getDeltaConstraints());
79
80 this.allVariables = new HashSet<PVariable>();
81 for (PConstraint constraint: deltaConstraints) {
82 this.allVariables.addAll(constraint.getDeducedVariables());
83 }
84 this.allConstraints = new HashSet<PConstraint>(deltaConstraints);
85 for (SubPlan parentPlan: parentPlans) {
86 this.allConstraints.addAll(parentPlan.getAllEnforcedConstraints());
87 this.allVariables.addAll(parentPlan.getAllDeducedVariables());
88 }
89
90 // TODO this is ugly a bit
91 if (operation instanceof PStart) {
92 this.visibleVariables = new HashSet<PVariable>(((PStart) operation).getAPrioriVariables());
93 this.allVariables.addAll(visibleVariables);
94 } else if (operation instanceof PProject) {
95 this.visibleVariables = new HashSet<PVariable>(((PProject) operation).getToVariables());
96 } else {
97 this.visibleVariables = new HashSet<PVariable>();
98 for (SubPlan parentPlan: parentPlans)
99 this.visibleVariables.addAll(parentPlan.getVisibleVariables());
100 for (PConstraint constraint: deltaConstraints)
101 this.visibleVariables.addAll(constraint.getDeducedVariables());
102 }
103
104 this.introducedVariables = new HashSet<PVariable>(this.visibleVariables);
105 if (!parentPlans.isEmpty())
106 introducedVariables.removeAll(parentPlans.get(0).getVisibleVariables());
107
108 operation.checkConsistency(this);
109 }
110
111
112 @Override
113 public String toString() {
114 return toLongString();
115 }
116 public String toShortString() {
117 return String.format("Plan{%s}:%s",
118 visibleVariables.stream().map(PVariable::getName).collect(Collectors.joining(",")),
119 operation.getShortName());
120 }
121 public String toLongString() {
122 return String.format("%s<%s>",
123 toShortString(),
124 parentPlans.stream().map(Object::toString).collect(Collectors.joining("; ")));
125 }
126
127
128 /**
129 * All constraints that are known to hold at this point
130 */
131 public Set<PConstraint> getAllEnforcedConstraints() {
132 return allConstraints;
133 }
134
135 /**
136 * The new constraints enforced at this stage of plan, that aren't yet enforced at parents
137 * (results are also included in {@link SubPlan#getAllEnforcedConstraints()})
138 */
139 public Set<PConstraint> getDeltaEnforcedConstraints() {
140 return deltaConstraints;
141 }
142
143 /**
144 * Indicate that a given constraint was found to be automatically satisfied at this point
145 * without additional operations.
146 * (results are also included in {@link SubPlan#getDeltaEnforcedConstraints()})
147 *
148 * <p>Warning: not propagated automatically to child plans,
149 * so best to invoke before constructing further SubPlans. </p>
150 */
151 public void inferConstraint(PConstraint constraint) {
152 externallyInferredConstraints.add(constraint);
153 deltaConstraints.add(constraint);
154 allConstraints.add(constraint);
155 }
156
157 public PBody getBody() {
158 return body;
159 }
160
161 /**
162 * Variables which are assigned a value at this point
163 * (results are also included in {@link SubPlan#getAllDeducedVariables()})
164 */
165 public Set<PVariable> getVisibleVariables() {
166 return visibleVariables;
167 }
168 /**
169 * Variables which have been assigned a value;
170 * includes visible variables (see {@link #getVisibleVariables()})
171 * and additionally any variables hidden by a projection (see {@link PProject}).
172 */
173 public Set<PVariable> getAllDeducedVariables() {
174 return allVariables;
175 }
176 /**
177 * Delta compared to first parent: variables that are visible here but were not visible at the first parent.
178 */
179 public Set<PVariable> getIntroducedVariables() {
180 return introducedVariables;
181 }
182 public List<? extends SubPlan> getParentPlans() {
183 return parentPlans;
184 }
185 public POperation getOperation() {
186 return operation;
187 }
188
189
190 /**
191 * The closure of all type judgments of enforced constraints at this point.
192 * <p> No subsumption applied.
193 */
194 public Set<TypeJudgement> getAllImpliedTypeJudgements(IQueryMetaContext context) {
195 Set<TypeJudgement> impliedJudgements = allImpliedTypeJudgements.get(context);
196 if (impliedJudgements == null) {
197 Set<TypeJudgement> equivalentJudgements = TypeHelper.getDirectJudgements(getAllEnforcedConstraints(), context);
198 impliedJudgements = TypeHelper.typeClosure(equivalentJudgements, context);
199
200 allImpliedTypeJudgements.put(context, impliedJudgements);
201 }
202 return impliedJudgements;
203 }
204 private WeakHashMap<IQueryMetaContext, Set<TypeJudgement>> allImpliedTypeJudgements = new WeakHashMap<IQueryMetaContext, Set<TypeJudgement>>();
205
206
207 @Override
208 public int hashCode() {
209 final int prime = 31;
210 int result = 1;
211 result = prime * result
212 + ((operation == null) ? 0 : operation.hashCode());
213 result = prime * result
214 + ((parentPlans == null) ? 0 : parentPlans.hashCode());
215 return result;
216 }
217 @Override
218 public boolean equals(Object obj) {
219 if (this == obj)
220 return true;
221 if (obj == null)
222 return false;
223 if (!(obj instanceof SubPlan))
224 return false;
225 SubPlan other = (SubPlan) obj;
226 if (operation == null) {
227 if (other.operation != null)
228 return false;
229 } else if (!operation.equals(other.operation))
230 return false;
231 if (parentPlans == null) {
232 if (other.parentPlans != null)
233 return false;
234 } else if (!parentPlans.equals(other.parentPlans))
235 return false;
236 return true;
237 }
238
239
240}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlanFactory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlanFactory.java
new file mode 100644
index 00000000..d0df5fac
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/SubPlanFactory.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning;
10
11import tools.refinery.viatra.runtime.matchers.planning.operations.POperation;
12import tools.refinery.viatra.runtime.matchers.psystem.PBody;
13
14/**
15 * Single entry point for creating subplans.
16 * Can be subclassed by query planner to provide specialized SubPlans.
17 * @author Bergmann Gabor
18 *
19 */
20public class SubPlanFactory {
21
22 protected PBody body;
23
24 public SubPlanFactory(PBody body) {
25 super();
26 this.body = body;
27 }
28
29 public SubPlan createSubPlan(POperation operation, SubPlan... parentPlans) {
30 return new SubPlan(body, operation, parentPlans);
31 }
32
33}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/BuildHelper.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/BuildHelper.java
new file mode 100644
index 00000000..ed5d1cbb
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/BuildHelper.java
@@ -0,0 +1,165 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.planning.helpers;
11
12import java.util.Collection;
13import java.util.HashSet;
14import java.util.Map;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
18import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
19import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
20import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
21import tools.refinery.viatra.runtime.matchers.planning.SubPlanFactory;
22import tools.refinery.viatra.runtime.matchers.planning.operations.PProject;
23import tools.refinery.viatra.runtime.matchers.psystem.PBody;
24import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
25import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
26import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
27import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
28
29/**
30 * @author Gabor Bergmann
31 *
32 */
33public class BuildHelper {
34
35 private BuildHelper() {
36 // Hiding constructor for utility class
37 }
38
39// public static SubPlan naturalJoin(IOperationCompiler buildable,
40// SubPlan primaryPlan, SubPlan secondaryPlan) {
41// JoinHelper joinHelper = new JoinHelper(primaryPlan, secondaryPlan);
42// return buildable.buildBetaNode(primaryPlan, secondaryPlan, joinHelper.getPrimaryMask(),
43// joinHelper.getSecondaryMask(), joinHelper.getComplementerMask(), false);
44// }
45
46
47 /**
48 * Reduces the number of tuples by trimming (existentially quantifying) the set of variables that <ul>
49 * <li> are visible in the subplan,
50 * <li> are not exported parameters,
51 * <li> have all their constraints already enforced in the subplan,
52 * </ul> and thus will not be needed anymore.
53 *
54 * @param onlyIfNotDetermined if true, no trimming performed unless there is at least one variable that is not functionally determined
55 * @return the plan after the trimming (possibly the original)
56 * @since 1.5
57 */
58 public static SubPlan trimUnneccessaryVariables(SubPlanFactory planFactory, /*IOperationCompiler buildable,*/
59 SubPlan plan, boolean onlyIfNotDetermined, QueryAnalyzer analyzer) {
60 Set<PVariable> canBeTrimmed = new HashSet<PVariable>();
61 Set<PVariable> variablesInPlan = plan.getVisibleVariables();
62 for (PVariable trimCandidate : variablesInPlan) {
63 if (trimCandidate.getReferringConstraintsOfType(ExportedParameter.class).isEmpty()) {
64 if (plan.getAllEnforcedConstraints().containsAll(trimCandidate.getReferringConstraints()))
65 canBeTrimmed.add(trimCandidate);
66 }
67 }
68 final Set<PVariable> retainedVars = setMinus(variablesInPlan, canBeTrimmed);
69 if (!canBeTrimmed.isEmpty() && !(onlyIfNotDetermined && areVariablesDetermined(plan, retainedVars, canBeTrimmed, analyzer, false))) {
70 // TODO add smart ordering?
71 plan = planFactory.createSubPlan(new PProject(retainedVars), plan);
72 }
73 return plan;
74 }
75
76 /**
77 * @return true iff a set of given variables functionally determine all visible variables in the subplan according to the subplan's constraints
78 * @param strict if true, only "hard" dependencies are taken into account that are strictly enforced by the model representation;
79 * if false, user-provided soft dependencies are included as well, that are anticipated but not guaranteed by the storage mechanism;
80 * use true if superfluous dependencies may taint the correctness of a computation, false if they would merely impact performance
81 * @since 1.5
82 */
83 public static boolean areAllVariablesDetermined(SubPlan plan, Collection<PVariable> determining, QueryAnalyzer analyzer, boolean strict) {
84 return areVariablesDetermined(plan, determining, plan.getVisibleVariables(), analyzer, strict);
85 }
86
87 /**
88 * @return true iff one set of given variables functionally determine the other set according to the subplan's constraints
89 * @param strict if true, only "hard" dependencies are taken into account that are strictly enforced by the model representation;
90 * if false, user-provided soft dependencies are included as well, that are anticipated but not guaranteed by the storage mechanism;
91 * use true if superfluous dependencies may taint the correctness of a computation, false if they would merely impact performance
92 * @since 1.5
93 */
94 public static boolean areVariablesDetermined(SubPlan plan, Collection<PVariable> determining, Collection<PVariable> determined,
95 QueryAnalyzer analyzer, boolean strict) {
96 Map<Set<PVariable>, Set<PVariable>> dependencies = analyzer.getFunctionalDependencies(plan.getAllEnforcedConstraints(), strict);
97 final Set<PVariable> closure = FunctionalDependencyHelper.closureOf(determining, dependencies);
98 final boolean isDetermined = closure.containsAll(determined);
99 return isDetermined;
100 }
101
102 private static <T> Set<T> setMinus(Set<T> a, Set<T> b) {
103 Set<T> difference = new HashSet<T>(a);
104 difference.removeAll(b);
105 return difference;
106 }
107
108 /**
109 * Finds an arbitrary constraint that is not enforced at the given plan.
110 *
111 * @param pSystem
112 * @param plan
113 * @return a PConstraint that is not enforced, if any, or null if all are enforced
114 */
115 public static PConstraint getAnyUnenforcedConstraint(PBody pSystem,
116 SubPlan plan) {
117 Set<PConstraint> allEnforcedConstraints = plan.getAllEnforcedConstraints();
118 Set<PConstraint> constraints = pSystem.getConstraints();
119 for (PConstraint pConstraint : constraints) {
120 if (!allEnforcedConstraints.contains(pConstraint))
121 return pConstraint;
122 }
123 return null;
124 }
125
126 /**
127 * Skips the last few steps, if any, that are projections, so that a custom projection can be added instead.
128 * Useful for connecting body final plans into the production node.
129 *
130 * @since 2.1
131 */
132 public static SubPlan eliminateTrailingProjections(SubPlan plan) {
133 while (plan.getOperation() instanceof PProject)
134 plan = plan.getParentPlans().get(0);
135 return plan;
136 }
137
138 /**
139 * Verifies whether all constraints are enforced and exported parameters are present.
140 *
141 * @param pSystem
142 * @param plan
143 * @throws ViatraQueryRuntimeException
144 */
145 public static void finalCheck(final PBody pSystem, SubPlan plan, IQueryMetaContext context) {
146 PConstraint unenforcedConstraint = getAnyUnenforcedConstraint(pSystem, plan);
147 if (unenforcedConstraint != null) {
148 throw new QueryProcessingException(
149 "Pattern matcher construction terminated without successfully enforcing constraint {1}."
150 + " Could be caused if the value of some variables can not be deduced, e.g. by circularity of pattern constraints.",
151 new String[] { unenforcedConstraint.toString() }, "Could not enforce a pattern constraint", null);
152 }
153 for (ExportedParameter export : pSystem
154 .getConstraintsOfType(ExportedParameter.class)) {
155 if (!export.isReadyAt(plan, context)) {
156 throw new QueryProcessingException(
157 "Exported pattern parameter {1} could not be deduced during pattern matcher construction."
158 + " A pattern constraint is required to positively deduce its value.",
159 new String[] { export.getParameterName() }, "Could not calculate pattern parameter",
160 null);
161 }
162 }
163 }
164
165}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/FunctionalDependencyHelper.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/FunctionalDependencyHelper.java
new file mode 100644
index 00000000..40835f52
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/FunctionalDependencyHelper.java
@@ -0,0 +1,143 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Adam Dudas, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.helpers;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.HashSet;
15import java.util.Map;
16import java.util.Map.Entry;
17import java.util.Set;
18
19import tools.refinery.viatra.runtime.matchers.util.Sets;
20
21/**
22 * Helper utility class for functional dependency analysis.
23 *
24 * Throughout this class attribute sets are represented as generic sets and functional dependencies as maps from
25 * attribute set (generic sets) to attribute set (generic sets)
26 *
27 * @author Adam Dudas
28 *
29 */
30public class FunctionalDependencyHelper {
31
32 private FunctionalDependencyHelper() {
33 // Hiding constructor for utility class
34 }
35
36 /**
37 * Get the closure of the specified attribute set relative to the specified functional dependencies.
38 *
39 * @param attributes
40 * The attributes to get the closure of.
41 * @param dependencies
42 * The functional dependencies of which the closure operation is relative to.
43 * @return The closure of the specified attribute set relative to the specified functional dependencies.
44 */
45 public static <A> Set<A> closureOf(Collection<A> attributes, Map<Set<A>, Set<A>> dependencies) {
46 Set<A> closureSet = new HashSet<A>();
47
48 for (Set<A> closureSet1 = new HashSet<A>(attributes); closureSet.addAll(closureSet1);) {
49 closureSet1 = new HashSet<A>();
50 for (Entry<Set<A>, Set<A>> dependency : dependencies.entrySet()) {
51 if (closureSet.containsAll(dependency.getKey()))
52 closureSet1.addAll(dependency.getValue());
53 }
54 }
55
56 return closureSet;
57 }
58
59 /**
60 * @return true if the dependency from the left set to the right set is trivial
61 * @since 1.5
62 */
63 public static <A> boolean isTrivial(Set<A> left, Set<A> right) {
64 return left.containsAll(right);
65 }
66
67 /***
68 * Returns the dependency set over attributes in {@link targetAttributes} that are implied by a given source dependency set.
69 * <p> Note: exponential in the size of the target attribute set.
70 * <p> Note: minimality of the returned dependency set is currently not guaranteed.
71 * @param originalDependencies all dependencies that are known to hold on a wider set of attributes
72 * @param targetAttributes the set of attributes we are interested in
73 * @since 1.5
74 */
75 public static <A> Map<Set<A>, Set<A>> projectDependencies(Map<Set<A>, Set<A>> originalDependencies, Set<A> targetAttributes) {
76 // only those attributes are considered as left-hand-side candidates that occur at least once in dependencies
77 Set<A> leftCandidates = new HashSet<A>();
78 for (Entry<Set<A>, Set<A>> dependency : originalDependencies.entrySet()) {
79 if (!isTrivial(dependency.getKey(), dependency.getValue())) // only if non-trivial
80 leftCandidates.addAll(Sets.intersection(dependency.getKey(), targetAttributes));
81 }
82
83 // Compute an initial list of nontrivial projected dependencies - it does not have to be minimal yet
84 Map<Set<A>, Set<A>> initialDependencies = new HashMap<Set<A>, Set<A>>();
85 for (Set<A> leftSet : Sets.powerSet(leftCandidates)) {
86 Set<A> rightSet = Sets.intersection(closureOf(leftSet, originalDependencies), targetAttributes);
87 if (!isTrivial(leftSet, rightSet)) {
88 initialDependencies.put(leftSet, rightSet);
89 }
90 }
91 // Don't forget to include constants!
92 Set<A> constants = Sets.intersection(closureOf(Collections.<A>emptySet(), originalDependencies), targetAttributes);
93 if (! constants.isEmpty()) {
94 initialDependencies.put(Collections.<A>emptySet(), constants);
95 }
96
97 // Omit those dependencies where the LHS has superfluous attributes
98 Map<Set<A>, Set<A>> solidDependencies = new HashMap<Set<A>, Set<A>>();
99 for (Entry<Set<A>, Set<A>> dependency : initialDependencies.entrySet()) {
100 Set<A> leftSet = dependency.getKey();
101 Set<A> rightSet = dependency.getValue();
102 boolean solid = true;
103 for (A skipped : leftSet) { // what if we skip one attribute from the left set?
104 Set<A> singleton = Collections.singleton(skipped);
105 Set<A> candidate = Sets.difference(leftSet, singleton);
106 Set<A> rightCandidate = initialDependencies.get(candidate);
107 if (rightCandidate != null) {
108 if (Sets.union(rightCandidate, singleton).containsAll(rightSet)) {
109 solid = false;
110 break;
111 }
112 }
113 }
114 if (solid) {
115 solidDependencies.put(leftSet, rightSet);
116 }
117 }
118
119 // TODO perform proper minimization,
120 // see e.g. page 45 in http://www.cs.ubc.ca/~hkhosrav/db/slides/03.design%20theory.pdf
121
122 return Collections.unmodifiableMap(solidDependencies);
123 }
124
125 /**
126 * Adds a given dependency to a mutable accumulator.
127 * @since 1.5
128 */
129 public static <A> void includeDependency(Map<Set<A>, Set<A>> accumulator, Set<A> left, Set<A> right) {
130 Set<A> accumulatorRights = accumulator.computeIfAbsent(left, l -> new HashSet<>());
131 accumulatorRights.addAll(right);
132 }
133
134 /**
135 * Adds all given dependencies to a mutable accumulator.
136 * @since 1.5
137 */
138 public static <A> void includeDependencies(Map<Set<A>, Set<A>> accumulator, Map<Set<A>, Set<A>> additionalDependencies) {
139 for (Entry<Set<A>, Set<A>> entry : additionalDependencies.entrySet()) {
140 includeDependency(accumulator, entry.getKey(), entry.getValue());
141 }
142 }
143}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/StatisticsHelper.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/StatisticsHelper.java
new file mode 100644
index 00000000..b4f848a7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/StatisticsHelper.java
@@ -0,0 +1,62 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.helpers;
10
11import java.util.Optional;
12import java.util.function.BiFunction;
13
14import tools.refinery.viatra.runtime.matchers.tuple.TupleMask;
15import tools.refinery.viatra.runtime.matchers.util.Accuracy;
16
17/**
18 * Helpers dealing with optionally present statistics information
19 *
20 * @author Gabor Bergmann
21 * @since 2.1
22 *
23 */
24public class StatisticsHelper {
25
26 private StatisticsHelper() {
27 // Hidden utility class constructor
28 }
29
30 public static Optional<Double> estimateAverageBucketSize(TupleMask groupMask, Accuracy requiredAccuracy,
31 BiFunction<TupleMask, Accuracy, Optional<Long>> estimateCardinality)
32 {
33 if (groupMask.isIdentity()) return Optional.of(1.0);
34
35 Accuracy numeratorAccuracy = requiredAccuracy;
36 Accuracy denominatorAccuracy = requiredAccuracy.reciprocal();
37 TupleMask identityMask = TupleMask.identity(groupMask.sourceWidth);
38
39 Optional<Long> totalCountEstimate = estimateCardinality.apply(identityMask, numeratorAccuracy);
40 Optional<Long> bucketCountEstimate = estimateCardinality.apply(groupMask, denominatorAccuracy);
41
42 return totalCountEstimate.flatMap(matchCount ->
43 bucketCountEstimate.map(bucketCount ->
44 bucketCount == 0L ? 0L : ((double) matchCount) / bucketCount
45 ));
46 }
47
48 public static Optional<Double> min(Optional<Double> a, Optional<Double> b) {
49 if (b.isPresent()) {
50 if (a.isPresent()) {
51 return Optional.of(Math.min(a.get(), b.get()));
52 } else return b;
53 } else return a;
54 }
55 public static Optional<Double> min(Optional<Double> a, double b) {
56 if (a.isPresent()) {
57 return Optional.of(Math.min(a.get(), b));
58 } else return Optional.of(b);
59 }
60
61
62}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/TypeHelper.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/TypeHelper.java
new file mode 100644
index 00000000..926a591f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/helpers/TypeHelper.java
@@ -0,0 +1,217 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.planning.helpers;
11
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.HashSet;
15import java.util.LinkedList;
16import java.util.Map;
17import java.util.Map.Entry;
18import java.util.Queue;
19import java.util.Set;
20import java.util.stream.Collectors;
21
22import tools.refinery.viatra.runtime.matchers.context.IInputKey;
23import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
24import tools.refinery.viatra.runtime.matchers.psystem.ITypeInfoProviderConstraint;
25import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
26import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
27import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
28
29/**
30 * @author Gabor Bergmann
31 * @author Tamas Szabo
32 */
33public class TypeHelper {
34
35 private TypeHelper() {
36 // Hiding constructor for utility class
37 }
38
39 /**
40 * Collects the type constraints for the specified collection of variables. The type constraints consist of the
41 * constraints directly enforced on the variable itself, plus all of those that the given variable is unified with
42 * through equalities.
43 *
44 * @param variables
45 * the variables in question
46 * @param constraints
47 * the constraints in the pattern body
48 * @param context
49 * the query meta context
50 * @return the mapping from variable to set of type constraints
51 * @since 1.6
52 */
53 public static Map<PVariable, Set<IInputKey>> inferUnaryTypesFor(Iterable<PVariable> variables,
54 Set<PConstraint> constraints, IQueryMetaContext context) {
55 Map<PVariable, Set<TypeJudgement>> typeMap = TypeHelper.inferUnaryTypes(constraints, context);
56 return inferUnaryTypesFor(variables, typeMap);
57 }
58
59 /**
60 * Collects the type constraints for the specified collection of variables. The type constraints consist of the
61 * constraints directly enforced on the variable itself, plus all of those that the given variable is unified with
62 * through equalities.
63 *
64 * The method accepts a type map which is the result of the basic type inference from the
65 * {@link TypeHelper.inferUnaryTypes} method. The purpose of this method is that the type map can be reused across
66 * several calls to this method.
67 *
68 * @param variables
69 * the variables in question
70 * @param typeMap
71 * the type map of inference results
72 * @return the mapping from variable to set of type constraints
73 * @since 1.6
74 */
75 public static Map<PVariable, Set<IInputKey>> inferUnaryTypesFor(Iterable<PVariable> variables,
76 Map<PVariable, Set<TypeJudgement>> typeMap) {
77 Map<PVariable, Set<IInputKey>> result = new HashMap<PVariable, Set<IInputKey>>();
78
79 for (PVariable original : variables) {
80 // it can happen that the variable was unified into an other one due to equalities
81 Set<IInputKey> keys = new HashSet<IInputKey>();
82 PVariable current = original;
83
84 while (current != null) {
85 Set<TypeJudgement> judgements = typeMap.get(current);
86 if (judgements != null) {
87 for (TypeJudgement judgement : judgements) {
88 keys.add(judgement.getInputKey());
89 }
90 }
91 current = current.getDirectUnifiedInto();
92 }
93
94 result.put(original, keys);
95 }
96
97 return result;
98 }
99
100 /**
101 * Infers unary type information for variables, based on the given constraints.
102 *
103 * Subsumptions are not taken into account.
104 *
105 * @param constraints
106 * the set of constraints to extract type info from
107 */
108 public static Map<PVariable, Set<TypeJudgement>> inferUnaryTypes(Set<PConstraint> constraints,
109 IQueryMetaContext context) {
110 Set<TypeJudgement> equivalentJudgements = getDirectJudgements(constraints, context);
111 Set<TypeJudgement> impliedJudgements = typeClosure(equivalentJudgements, context);
112
113 Map<PVariable, Set<TypeJudgement>> results = new HashMap<PVariable, Set<TypeJudgement>>();
114 for (TypeJudgement typeJudgement : impliedJudgements) {
115 final IInputKey inputKey = typeJudgement.getInputKey();
116 if (inputKey.getArity() == 1) {
117 PVariable variable = (PVariable) typeJudgement.getVariablesTuple().get(0);
118 Set<TypeJudgement> inferredTypes = results.computeIfAbsent(variable, v -> new HashSet<>());
119 inferredTypes.add(typeJudgement);
120 }
121 }
122 return results;
123 }
124
125 /**
126 * Gets direct judgements reported by constraints. No closure is applied yet.
127 */
128 public static Set<TypeJudgement> getDirectJudgements(Set<PConstraint> constraints, IQueryMetaContext context) {
129 Set<TypeJudgement> equivalentJudgements = new HashSet<TypeJudgement>();
130 for (PConstraint pConstraint : constraints) {
131 if (pConstraint instanceof ITypeInfoProviderConstraint) {
132 equivalentJudgements.addAll(((ITypeInfoProviderConstraint) pConstraint).getImpliedJudgements(context));
133 }
134 }
135 return equivalentJudgements;
136 }
137
138 /**
139 * Calculates the closure of a set of type judgements, with respect to supertyping.
140 *
141 * @return the set of all type judgements in typesToClose and all their direct and indirect supertypes
142 */
143 public static Set<TypeJudgement> typeClosure(Set<TypeJudgement> typesToClose, IQueryMetaContext context) {
144 return typeClosure(Collections.<TypeJudgement> emptySet(), typesToClose, context);
145 }
146
147 /**
148 * Calculates the closure of a set of type judgements (with respect to supertyping), where the closure has been
149 * calculated before for a given base set, but not for a separate delta set.
150 * <p>
151 * Precondition: the set (typesToClose MINUS delta) is already closed w.r.t. supertyping.
152 *
153 * @return the set of all type judgements in typesToClose and all their direct and indirect supertypes
154 * @since 1.6
155 */
156 public static Set<TypeJudgement> typeClosure(Set<TypeJudgement> preclosedBaseSet, Set<TypeJudgement> delta,
157 IQueryMetaContext context) {
158 Queue<TypeJudgement> queue = delta.stream().filter(input -> !preclosedBaseSet.contains(input)).collect(Collectors.toCollection(LinkedList::new));
159 if (queue.isEmpty())
160 return preclosedBaseSet;
161
162 Set<TypeJudgement> closure = new HashSet<TypeJudgement>(preclosedBaseSet);
163
164 Map<TypeJudgement, Set<TypeJudgement>> conditionalImplications = new HashMap<>();
165 for (TypeJudgement typeJudgement : closure) {
166 conditionalImplications.putAll(typeJudgement.getConditionalImpliedJudgements(context));
167 }
168
169 do {
170 TypeJudgement deltaType = queue.poll();
171 if (closure.add(deltaType)) {
172 // direct implications
173 queue.addAll(deltaType.getDirectlyImpliedJudgements(context));
174
175 // conditional implications, source key processed before, this is the condition key
176 final Set<TypeJudgement> implicationSet = conditionalImplications.get(deltaType);
177 if (implicationSet != null) {
178 queue.addAll(implicationSet);
179 }
180
181 // conditional implications, this is the source key
182 Map<TypeJudgement, Set<TypeJudgement>> deltaConditionalImplications = deltaType
183 .getConditionalImpliedJudgements(context);
184 for (Entry<TypeJudgement, Set<TypeJudgement>> entry : deltaConditionalImplications.entrySet()) {
185 if (closure.contains(entry.getKey())) {
186 // condition processed before
187 queue.addAll(entry.getValue());
188 } else {
189 // condition not processed yet
190 conditionalImplications.computeIfAbsent(entry.getKey(), key -> new HashSet<>())
191 .addAll(entry.getValue());
192 }
193 }
194 }
195 } while (!queue.isEmpty());
196
197 return closure;
198 }
199
200 /**
201 * Calculates a remainder set of types from a larger set, that are not subsumed by a given set of subsuming types.
202 *
203 * @param subsumableTypes
204 * a set of types from which some may be implied by the subsuming types
205 * @param subsumingTypes
206 * a set of types that may imply some of the subsuming types
207 * @return the collection of types in subsumableTypes that are NOT identical to or supertypes of any type in
208 * subsumingTypes.
209 */
210 public static Set<TypeJudgement> subsumeTypes(Set<TypeJudgement> subsumableTypes, Set<TypeJudgement> subsumingTypes,
211 IQueryMetaContext context) {
212 Set<TypeJudgement> closure = typeClosure(subsumingTypes, context);
213 Set<TypeJudgement> subsumed = new HashSet<TypeJudgement>(subsumableTypes);
214 subsumed.removeAll(closure);
215 return subsumed;
216 }
217}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PApply.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PApply.java
new file mode 100644
index 00000000..2c285b54
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PApply.java
@@ -0,0 +1,94 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.operations;
10
11import java.util.Collections;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
15import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
16import tools.refinery.viatra.runtime.matchers.util.Preconditions;
17
18/**
19 * Represents a constraint application on a single parent SubPlan.
20 * <p> Either a "selection" filter operation according to a deferred PConstraint (or transform in case of eval/aggregate), or
21 * alternatively a shorthand for PJoin + a PEnumerate on the right input for an enumerable PConstraint.
22 *
23 * <p> <b>WARNING</b>: if there are coinciding variables in the variable tuple of the enumerable constraint,
24 * it is the responsibility of the compiler to check them for equality.
25 *
26 * @author Bergmann Gabor
27 *
28 */
29public class PApply extends POperation {
30
31 private PConstraint pConstraint;
32
33 public PApply(PConstraint pConstraint) {
34 super();
35 this.pConstraint = pConstraint;
36 }
37 public PConstraint getPConstraint() {
38 return pConstraint;
39 }
40
41 @Override
42 public String getShortName() {
43 return String.format("APPLY_%s", pConstraint.toString());
44 }
45
46 @Override
47 public Set<? extends PConstraint> getDeltaConstraints() {
48 return Collections.singleton(pConstraint);
49 }
50
51 @Override
52 public int numParentSubPlans() {
53 return 1;
54 }
55
56 @Override
57 public void checkConsistency(SubPlan subPlan) {
58 super.checkConsistency(subPlan);
59 for (SubPlan parentPlan : subPlan.getParentPlans())
60 Preconditions.checkArgument(!parentPlan.getAllEnforcedConstraints().contains(pConstraint),
61 "Double-checking constraint %s", pConstraint);
62 // TODO obtain context?
63 //if (pConstraint instanceof DeferredPConstraint)
64 // Preconditions.checkArgument(((DeferredPConstraint) pConstraint).isReadyAt(subPlan, context))
65 }
66
67 @Override
68 public int hashCode() {
69 final int prime = 31;
70 int result = 1;
71 result = prime
72 * result
73 + ((pConstraint == null) ? 0 : pConstraint
74 .hashCode());
75 return result;
76 }
77 @Override
78 public boolean equals(Object obj) {
79 if (this == obj)
80 return true;
81 if (obj == null)
82 return false;
83 if (!(obj instanceof PApply))
84 return false;
85 PApply other = (PApply) obj;
86 if (pConstraint == null) {
87 if (other.pConstraint != null)
88 return false;
89 } else if (!pConstraint.equals(other.pConstraint))
90 return false;
91 return true;
92 }
93
94}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PEnumerate.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PEnumerate.java
new file mode 100644
index 00000000..a975d50c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PEnumerate.java
@@ -0,0 +1,76 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.operations;
10
11import java.util.Collections;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.psystem.EnumerablePConstraint;
15import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
16
17/**
18 * Represents a base relation defined by the instance set of an enumerable PConstraint; there are no parent SubPlans.
19 *
20 * <p> <b>WARNING</b>: if there are coinciding variables in the variable tuple of the enumerable constraint,
21 * it is the responsibility of the compiler to check them for equality.
22 * @author Bergmann Gabor
23 *
24 */
25public class PEnumerate extends POperation {
26
27 EnumerablePConstraint enumerablePConstraint;
28
29 public PEnumerate(EnumerablePConstraint enumerablePConstraint) {
30 super();
31 this.enumerablePConstraint = enumerablePConstraint;
32 }
33 public EnumerablePConstraint getEnumerablePConstraint() {
34 return enumerablePConstraint;
35 }
36
37 @Override
38 public Set<? extends PConstraint> getDeltaConstraints() {
39 return Collections.singleton(enumerablePConstraint);
40 }
41 @Override
42 public int numParentSubPlans() {
43 return 0;
44 }
45 @Override
46 public String getShortName() {
47 return enumerablePConstraint.toString();
48 }
49 @Override
50 public int hashCode() {
51 final int prime = 31;
52 int result = 1;
53 result = prime
54 * result
55 + ((enumerablePConstraint == null) ? 0 : enumerablePConstraint
56 .hashCode());
57 return result;
58 }
59 @Override
60 public boolean equals(Object obj) {
61 if (this == obj)
62 return true;
63 if (obj == null)
64 return false;
65 if (!(obj instanceof PEnumerate))
66 return false;
67 PEnumerate other = (PEnumerate) obj;
68 if (enumerablePConstraint == null) {
69 if (other.enumerablePConstraint != null)
70 return false;
71 } else if (!enumerablePConstraint.equals(other.enumerablePConstraint))
72 return false;
73 return true;
74 }
75
76}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PJoin.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PJoin.java
new file mode 100644
index 00000000..10e0a85a
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PJoin.java
@@ -0,0 +1,64 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.operations;
10
11import java.util.Collections;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
15
16/**
17 * Represents a natural join of two parent SubPlans.
18 * @author Bergmann Gabor
19 *
20 */
21public class PJoin extends POperation {
22
23// // TODO leave here? is this a problem in equivalnece checking?
24// private Set<PVariable> onVariables;
25
26 public PJoin(/*Set<PVariable> onVariables*/) {
27 super();
28 //this.onVariables = new HashSet<PVariable>(onVariables);
29 }
30// public Set<PVariable> getOnVariables() {
31// return onVariables;
32// }
33
34 @Override
35 public Set<? extends PConstraint> getDeltaConstraints() {
36 return Collections.emptySet();
37 }
38 @Override
39 public int numParentSubPlans() {
40 return 2;
41 }
42
43 @Override
44 public String getShortName() {
45 return "JOIN"; //String.format("JOIN_{%s}", Joiner.on(",").join(onVariables));
46 }
47
48 @Override
49 public int hashCode() {
50 return getClass().hashCode();
51 }
52 @Override
53 public boolean equals(Object obj) {
54 if (this == obj)
55 return true;
56 if (obj == null)
57 return false;
58 if (!(obj instanceof PJoin))
59 return false;
60 return true;
61 }
62
63
64}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/POperation.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/POperation.java
new file mode 100644
index 00000000..e71cf217
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/POperation.java
@@ -0,0 +1,52 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.operations;
10
11import java.util.Set;
12
13import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
14import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
15import tools.refinery.viatra.runtime.matchers.util.Preconditions;
16
17/**
18 * Abstract superclass for representing a high-level query evaluation operation.
19 *
20 * <p> Subclasses correspond to various POperations modeled after relational algebra.
21 *
22 * @author Bergmann Gabor
23 *
24 */
25public abstract class POperation {
26
27 /**
28 * Newly enforced constraints
29 */
30 public abstract Set<? extends PConstraint> getDeltaConstraints();
31
32 public abstract String getShortName();
33
34 /**
35 * @return the number of SubPlans that must be specified as parents
36 */
37 public abstract int numParentSubPlans();
38
39 /**
40 * Checks whether this constraint can be properly applied at the given SubPlan.
41 */
42 public void checkConsistency(SubPlan subPlan) {
43 Preconditions.checkArgument(this == subPlan.getOperation(), "POperation misalignment");
44 Preconditions.checkArgument(subPlan.getParentPlans().size() == numParentSubPlans(), "Incorrect number of parent SubPlans");
45 }
46
47 @Override
48 public String toString() {
49 return getShortName();
50 }
51
52}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PProject.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PProject.java
new file mode 100644
index 00000000..d0539b2c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PProject.java
@@ -0,0 +1,109 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.operations;
10
11import java.util.Collection;
12import java.util.Collections;
13import java.util.List;
14import java.util.Set;
15import java.util.stream.Collectors;
16
17import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
18import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
19import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
20import tools.refinery.viatra.runtime.matchers.util.Preconditions;
21
22/**
23 * Represents a projection of a single parent SubPlan onto a limited set of variables.
24 * <p> May optionally prescribe an ordering of variables (List, as opposed to Set).
25 *
26 * @author Bergmann Gabor
27 *
28 */
29public class PProject extends POperation {
30
31 private Collection<PVariable> toVariables;
32 private boolean ordered;
33
34
35 public PProject(Set<PVariable> toVariables) {
36 super();
37 this.toVariables = toVariables;
38 this.ordered = false;
39 }
40 public PProject(List<PVariable> toVariables) {
41 super();
42 this.toVariables = toVariables;
43 this.ordered = true;
44 }
45
46 public Collection<PVariable> getToVariables() {
47 return toVariables;
48 }
49 public boolean isOrdered() {
50 return ordered;
51 }
52
53 @Override
54 public Set<? extends PConstraint> getDeltaConstraints() {
55 return Collections.emptySet();
56 }
57 @Override
58 public int numParentSubPlans() {
59 return 1;
60 }
61 @Override
62 public void checkConsistency(SubPlan subPlan) {
63 super.checkConsistency(subPlan);
64 final SubPlan parentPlan = subPlan.getParentPlans().get(0);
65
66 Preconditions.checkArgument(parentPlan.getVisibleVariables().containsAll(toVariables),
67 () -> toVariables.stream()
68 .filter(input -> !parentPlan.getVisibleVariables().contains(input)).map(PVariable::getName)
69 .collect(Collectors.joining(",", "Variables missing from project: ", "")));
70 }
71
72 @Override
73 public String getShortName() {
74 return String.format("PROJECT%s_{%s}", ordered? "!" : "",
75 toVariables.stream().map(PVariable::getName).collect(Collectors.joining(",")));
76 }
77
78 @Override
79 public int hashCode() {
80 final int prime = 31;
81 int result = 1;
82 result = prime * result + (ordered ? 1231 : 1237);
83 result = prime * result
84 + ((toVariables == null) ? 0 : toVariables.hashCode());
85 return result;
86 }
87 @Override
88 public boolean equals(Object obj) {
89 if (this == obj)
90 return true;
91 if (obj == null)
92 return false;
93 if (!(obj instanceof PProject))
94 return false;
95 PProject other = (PProject) obj;
96 if (ordered != other.ordered)
97 return false;
98 if (toVariables == null) {
99 if (other.toVariables != null)
100 return false;
101 } else if (!toVariables.equals(other.toVariables))
102 return false;
103 return true;
104 }
105
106
107
108
109}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PStart.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PStart.java
new file mode 100644
index 00000000..9e6ea10e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/planning/operations/PStart.java
@@ -0,0 +1,90 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.planning.operations;
10
11import java.util.Arrays;
12import java.util.Collections;
13import java.util.HashSet;
14import java.util.Set;
15import java.util.stream.Collectors;
16
17import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
18import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
19
20/**
21 * No constraints, and no parent SubPlan, just a (possibly empty) set of a priori known (input) variables. Satisfied by a single tuple.
22 *
23 * <p> Can also be used without a priori variables,
24 * e.g. as a "virtual parent" in extreme cases,
25 * such as <code>pattern foo(Bar) = {Bar = eval (3*4)} </code>
26 *
27 * @author Bergmann Gabor
28 *
29 */
30public class PStart extends POperation {
31
32 private Set<PVariable> aPrioriVariables;
33
34
35 public PStart(Set<PVariable> aPrioriVariables) {
36 super();
37 this.aPrioriVariables = aPrioriVariables;
38 }
39 public PStart(PVariable... aPrioriVariables) {
40 this(new HashSet<PVariable>(Arrays.asList(aPrioriVariables)));
41 }
42 public Set<PVariable> getAPrioriVariables() {
43 return aPrioriVariables;
44 }
45
46 @Override
47 public String getShortName() {
48 return aPrioriVariables.stream().map(PVariable::getName).collect(Collectors.joining(",", "START_{", "}"));
49 }
50 @Override
51 public int numParentSubPlans() {
52 return 0;
53 }
54
55 @Override
56 public Set<? extends PConstraint> getDeltaConstraints() {
57 return Collections.emptySet();
58 }
59
60 @Override
61 public int hashCode() {
62 final int prime = 31;
63 int result = 1;
64 result = prime
65 * result
66 + ((aPrioriVariables == null) ? 0 : aPrioriVariables.hashCode());
67 return result;
68 }
69
70 @Override
71 public boolean equals(Object obj) {
72 if (this == obj)
73 return true;
74 if (obj == null)
75 return false;
76 if (!(obj instanceof PStart))
77 return false;
78 PStart other = (PStart) obj;
79 if (aPrioriVariables == null) {
80 if (other.aPrioriVariables != null)
81 return false;
82 } else if (!aPrioriVariables.equals(other.aPrioriVariables))
83 return false;
84 return true;
85 }
86
87
88
89
90}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/BasePConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/BasePConstraint.java
new file mode 100644
index 00000000..eda4aa25
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/BasePConstraint.java
@@ -0,0 +1,108 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
13
14import java.util.Collections;
15import java.util.HashSet;
16import java.util.Map;
17import java.util.Set;
18import java.util.concurrent.atomic.AtomicInteger;
19
20/**
21 * @author Gabor Bergmann
22 *
23 */
24public abstract class BasePConstraint implements PConstraint {
25
26
27 protected PBody pBody;
28 private final Set<PVariable> affectedVariables;
29
30
31 private final int sequentialID = nextID.getAndIncrement();
32
33 // Use a static atomic integer to avoid race conditions when creating new constraints.
34 private static AtomicInteger nextID = new AtomicInteger(0);
35
36 public BasePConstraint(PBody pBody, Set<PVariable> affectedVariables) {
37 super();
38 this.pBody = pBody;
39 this.affectedVariables = new HashSet<PVariable>(affectedVariables);
40
41 for (PVariable pVariable : affectedVariables) {
42 pVariable.refer(this);
43 }
44 pBody.registerConstraint(this);
45 }
46
47 @Override
48 public String toString() {
49 return "PC[" + getClass().getSimpleName() + ":" + toStringRest() + "]";
50 }
51
52 protected abstract String toStringRest();
53
54 @Override
55 public Set<PVariable> getAffectedVariables() {
56 return affectedVariables;
57 }
58
59 @Override
60 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
61 return Collections.emptyMap();
62 }
63
64 @Override
65 public void replaceVariable(PVariable obsolete, PVariable replacement) {
66 pBody.checkMutability();
67 if (affectedVariables.remove(obsolete)) {
68 affectedVariables.add(replacement);
69 obsolete.unrefer(this);
70 replacement.refer(this);
71 doReplaceVariable(obsolete, replacement);
72 }
73 }
74
75 protected abstract void doReplaceVariable(PVariable obsolete, PVariable replacement);
76
77 @Override
78 public void delete() {
79 pBody.checkMutability();
80 for (PVariable pVariable : affectedVariables) {
81 pVariable.unrefer(this);
82 }
83 pBody.unregisterConstraint(this);
84 }
85
86 @Override
87 public void checkSanity() {
88 }
89
90 /**
91 * For backwards compatibility. Equivalent to {@link #getBody()}
92 */
93 public PBody getPSystem() {
94 return pBody;
95 }
96 /**
97 * @since 2.1
98 */
99 @Override
100 public PBody getBody() {
101 return pBody;
102 }
103
104 @Override
105 public int getMonotonousID() {
106 return sequentialID;
107 }
108}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/DeferredPConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/DeferredPConstraint.java
new file mode 100644
index 00000000..d2bf088c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/DeferredPConstraint.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
15import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
16
17/**
18 * Any constraint that can only be checked on certain SubPlans (e.g. those plans that already contain some variables).
19 *
20 * @author Gabor Bergmann
21 *
22 */
23public abstract class DeferredPConstraint extends BasePConstraint {
24
25 public DeferredPConstraint(PBody pBody, Set<PVariable> affectedVariables) {
26 super(pBody, affectedVariables);
27 }
28
29 public abstract boolean isReadyAt(SubPlan plan, IQueryMetaContext context);
30
31}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/EnumerablePConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/EnumerablePConstraint.java
new file mode 100644
index 00000000..9129aa47
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/EnumerablePConstraint.java
@@ -0,0 +1,59 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15
16/**
17 * A constraint for which all satisfying tuples of variable values can be enumerated at any point during run-time.
18 *
19 * @author Gabor Bergmann
20 *
21 */
22public abstract class EnumerablePConstraint extends BasePConstraint {
23 protected Tuple variablesTuple;
24
25 protected EnumerablePConstraint(PBody pBody, Tuple variablesTuple) {
26 super(pBody, variablesTuple.<PVariable> getDistinctElements());
27 this.variablesTuple = variablesTuple;
28 }
29
30 @Override
31 public void doReplaceVariable(PVariable obsolete, PVariable replacement) {
32 variablesTuple = variablesTuple.replaceAll(obsolete, replacement);
33 }
34
35 @Override
36 protected String toStringRest() {
37 String stringRestRest = toStringRestRest();
38 String tupleString = "@" + variablesTuple.toString();
39 return stringRestRest == null ? tupleString : ":" + stringRestRest + tupleString;
40 }
41
42 protected String toStringRestRest() {
43 return null;
44 }
45
46 public Tuple getVariablesTuple() {
47 return variablesTuple;
48 }
49
50 @Override
51 public Set<PVariable> getDeducedVariables() {
52 return getAffectedVariables();
53 }
54
55 public PVariable getVariableInTuple(int index) {
56 return (PVariable) this.variablesTuple.get(index);
57 }
58
59}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IExpressionEvaluator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IExpressionEvaluator.java
new file mode 100644
index 00000000..686999f7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IExpressionEvaluator.java
@@ -0,0 +1,42 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11/**
12 * An expression evaluator is used to execute arbitrary Java code during pattern matching. In order to include the
13 * evaluation in the planning seemlessly it is expected from the evaluator implementors to report all used PVariables by
14 * name.
15 *
16 * @author Zoltan Ujhelyi
17 *
18 */
19public interface IExpressionEvaluator {
20
21 /**
22 * A textual description of the expression. Used only for debug purposes, but must not be null.
23 */
24 String getShortDescription();
25
26 /**
27 * All input parameter names should be reported correctly.
28 */
29 Iterable<String> getInputParameterNames();
30
31 /**
32 * The expression evaluator code
33 *
34 * @param provider
35 * the value provider is an engine-specific way of reading internal variable tuples to evaluate the
36 * expression with
37 * @return the result of the expression: in case of predicate evaluation the return value must be true or false;
38 * otherwise the result can be an arbitrary object. No null values should be returned.
39 * @throws Exception
40 */
41 Object evaluateExpression(IValueProvider provider) throws Exception;
42}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IMultiQueryReference.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IMultiQueryReference.java
new file mode 100644
index 00000000..8f647c64
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IMultiQueryReference.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2022, Tamas Szabo, GitHub
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11import java.util.Collection;
12
13import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
14
15/**
16 * A {@link PConstraint} that implements this interface refers to a list of PQueries.
17 *
18 * @author Tamas Szabo
19 * @since 2.8
20 *
21 */
22public interface IMultiQueryReference {
23
24 Collection<PQuery> getReferredQueries();
25
26}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IQueryReference.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IQueryReference.java
new file mode 100644
index 00000000..9ee05b39
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IQueryReference.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11import java.util.Collections;
12import java.util.List;
13
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
15
16/**
17 * A {@link PConstraint} that implements this interface refers to a {@link PQuery}.
18 *
19 * @author Zoltan Ujhelyi
20 *
21 */
22public interface IQueryReference extends IMultiQueryReference {
23
24 PQuery getReferredQuery();
25
26 /**
27 * @since 2.8
28 */
29 @Override
30 default List<PQuery> getReferredQueries() {
31 return Collections.singletonList(getReferredQuery());
32 }
33}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IRelationEvaluator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IRelationEvaluator.java
new file mode 100644
index 00000000..e4c396d8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IRelationEvaluator.java
@@ -0,0 +1,47 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2022, Tamas Szabo, GitHub
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11import java.util.List;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15
16/**
17 * Implementations of this interface take an arbitrary number of input relations with their contents and compute the
18 * tuples of a single output relation.
19 *
20 * @author Tamas Szabo
21 * @since 2.8
22 *
23 */
24public interface IRelationEvaluator {
25
26 /**
27 * A textual description of the evaluator. Used only for debug purposes, but must not be null.
28 */
29 String getShortDescription();
30
31 /**
32 * The relation evaluator code. For performance reasons, it is expected that the returned set is a mutable
33 * collection, and the caller must be allowed to actually perform mutations!
34 */
35 Set<Tuple> evaluateRelation(List<Set<Tuple>> inputs) throws Exception;
36
37 /**
38 * For each input relation that this evaluator requires, this method returns the expected arities of the relations in order.
39 */
40 List<Integer> getInputArities();
41
42 /**
43 * Returns the arity of the output relation that this evaluator computes.
44 */
45 int getOutputArity();
46
47}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeConstraint.java
new file mode 100644
index 00000000..b72035a8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeConstraint.java
@@ -0,0 +1,65 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11import java.util.HashMap;
12import java.util.HashSet;
13import java.util.Map;
14import java.util.Map.Entry;
15
16import tools.refinery.viatra.runtime.matchers.context.IInputKey;
17import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19
20import java.util.Set;
21
22/**
23 * Common superinterface of enumerable and deferred type constraints.
24 * @author Bergmann Gabor
25 *
26 */
27public interface ITypeConstraint extends ITypeInfoProviderConstraint {
28
29 public abstract TypeJudgement getEquivalentJudgement();
30
31 /**
32 * Static internal utility class for implementations of {@link ITypeConstraint}s.
33 * @author Bergmann Gabor
34 */
35 public static class TypeConstraintUtil {
36
37 private TypeConstraintUtil() {
38 // Hiding constructor for utility class
39 }
40
41 public static Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context, IInputKey inputKey, Tuple variablesTuple) {
42 final Map<Set<PVariable>, Set<PVariable>> result = new HashMap<Set<PVariable>, Set<PVariable>>();
43
44 Set<Entry<Set<Integer>, Set<Integer>>> dependencies = context.getFunctionalDependencies(inputKey).entrySet();
45 for (Entry<Set<Integer>, Set<Integer>> dependency : dependencies) {
46 result.put(
47 transcribeVariables(dependency.getKey(), variablesTuple),
48 transcribeVariables(dependency.getValue(), variablesTuple)
49 );
50 }
51
52 return result;
53 }
54
55 private static Set<PVariable> transcribeVariables(Set<Integer> indices, Tuple variablesTuple) {
56 Set<PVariable> result = new HashSet<PVariable>();
57 for (Integer index : indices) {
58 result.add((PVariable) variablesTuple.get(index));
59 }
60 return result;
61 }
62
63 }
64
65}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeInfoProviderConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeInfoProviderConstraint.java
new file mode 100644
index 00000000..ff127d38
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/ITypeInfoProviderConstraint.java
@@ -0,0 +1,28 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
15
16/**
17 * @author Gabor Bergmann
18 *
19 */
20public interface ITypeInfoProviderConstraint extends PConstraint {
21
22 /**
23 * Returns type information implied by this constraint.
24 *
25 */
26 public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context);
27
28}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IValueProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IValueProvider.java
new file mode 100644
index 00000000..d959adc4
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/IValueProvider.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11/**
12 * Helper interface to get values from a tuple of variables. All pattern matching engines are expected to implement this
13 * to handle their internal structures.
14 *
15 * @author Zoltan Ujhelyi
16 *
17 */
18public interface IValueProvider {
19
20 /**
21 * Returns the value of the selected variable
22 * @param variableName
23 * @return the value of the variable; never null
24 * @throws IllegalArgumentException if the variable is not defined
25 */
26 Object getValue(String variableName);
27}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/InitializablePQuery.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/InitializablePQuery.java
new file mode 100644
index 00000000..a82d12ec
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/InitializablePQuery.java
@@ -0,0 +1,56 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11import java.util.Set;
12
13import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
14import tools.refinery.viatra.runtime.matchers.psystem.annotations.PAnnotation;
15import tools.refinery.viatra.runtime.matchers.psystem.queries.PProblem;
16import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
17
18/**
19 * Adds extra methods to the PQuery interface to initialize its contents.
20 *
21 * @author Zoltan Ujhelyi
22 *
23 */
24public interface InitializablePQuery extends PQuery {
25
26 /**
27 * Sets the query status. Only applicable if the pattern is still {@link PQueryStatus#UNINITIALIZED uninitialized}.
28 *
29 * @param status the new status
30 */
31 void setStatus(PQueryStatus status);
32
33 /**
34 * Adds a detected error. Only applicable if the pattern is still {@link PQueryStatus#UNINITIALIZED uninitialized}.
35 *
36 * @param problem the new problem
37 */
38 void addError(PProblem problem);
39
40 /**
41 * Sets up the bodies of the pattern. Only applicable if the pattern is still {@link PQueryStatus#UNINITIALIZED
42 * uninitialized}.
43 *
44 * @param bodies
45 * @throws ViatraQueryRuntimeException
46 */
47 void initializeBodies(Set<PBody> bodies);
48
49 /**
50 * Adds an annotation to the specification. Only applicable if the pattern is still
51 * {@link PQueryStatus#UNINITIALIZED uninitialized}.
52 *
53 * @param annotation
54 */
55 void addAnnotation(PAnnotation annotation);
56}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/KeyedEnumerablePConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/KeyedEnumerablePConstraint.java
new file mode 100644
index 00000000..91eea817
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/KeyedEnumerablePConstraint.java
@@ -0,0 +1,39 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
13
14/**
15 * @author Gabor Bergmann
16 *
17 */
18public abstract class KeyedEnumerablePConstraint<KeyType> extends EnumerablePConstraint {
19
20 protected KeyType supplierKey;
21
22 public KeyedEnumerablePConstraint(PBody pBody, Tuple variablesTuple,
23 KeyType supplierKey) {
24 super(pBody, variablesTuple);
25 this.supplierKey = supplierKey;
26 }
27
28 @Override
29 protected String toStringRestRest() {
30 return supplierKey == null ? "$any(null)" : keyToString();
31 }
32
33 protected abstract String keyToString();
34
35 public KeyType getSupplierKey() {
36 return supplierKey;
37 }
38
39}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PBody.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PBody.java
new file mode 100644
index 00000000..c38dc23a
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PBody.java
@@ -0,0 +1,289 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import java.util.ArrayList;
13import java.util.HashMap;
14import java.util.HashSet;
15import java.util.LinkedHashSet;
16import java.util.List;
17import java.util.Map;
18import java.util.Set;
19import java.util.WeakHashMap;
20import java.util.stream.Collectors;
21
22import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
23import tools.refinery.viatra.runtime.matchers.planning.helpers.TypeHelper;
24import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
25import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.ConstantValue;
26import tools.refinery.viatra.runtime.matchers.psystem.queries.PDisjunction;
27import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
28import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery.PQueryStatus;
29import tools.refinery.viatra.runtime.matchers.util.Preconditions;
30
31/**
32 * A set of constraints representing a pattern body
33 *
34 * @author Gabor Bergmann
35 *
36 */
37public class PBody implements PTraceable {
38
39 public static final String VIRTUAL_VARIABLE_PREFIX = ".virtual";
40 private static final String VIRTUAL_VARIABLE_PATTERN = VIRTUAL_VARIABLE_PREFIX + "{%d}";
41
42 private PQuery query;
43
44 /**
45 * If null, then parent query status is reused
46 */
47 private PQueryStatus status = PQueryStatus.UNINITIALIZED;
48
49 private Set<PVariable> allVariables;
50 private Set<PVariable> uniqueVariables;
51 private List<ExportedParameter> symbolicParameters;
52 private Map<Object, PVariable> variablesByName;
53 private Set<PConstraint> constraints;
54 private int nextVirtualNodeID;
55 private PDisjunction containerDisjunction;
56
57 public PBody(PQuery query) {
58 super();
59 this.query = query;
60 allVariables = new LinkedHashSet<>();
61 uniqueVariables = new LinkedHashSet<>();
62 variablesByName = new HashMap<>();
63 constraints = new LinkedHashSet<>();
64 }
65
66 /**
67 * @return whether the submission of the new variable was successful
68 */
69 private boolean addVariable(PVariable var) {
70 checkMutability();
71 Object name = var.getName();
72 if (!variablesByName.containsKey(name)) {
73 allVariables.add(var);
74 if (var.isUnique())
75 uniqueVariables.add(var);
76 variablesByName.put(name, var);
77 return true;
78 } else {
79 return false;
80 }
81 }
82
83 /**
84 * Use this method to add a newly created constraint to the pSystem.
85 *
86 * @return whether the submission of the new constraint was successful
87 */
88 boolean registerConstraint(PConstraint constraint) {
89 checkMutability();
90 return constraints.add(constraint);
91 }
92
93 /**
94 * Use this method to remove an obsolete constraint from the pSystem.
95 *
96 * @return whether the removal of the constraint was successful
97 */
98 boolean unregisterConstraint(PConstraint constraint) {
99 checkMutability();
100 return constraints.remove(constraint);
101 }
102
103 @SuppressWarnings("unchecked")
104 public <ConstraintType> Set<ConstraintType> getConstraintsOfType(Class<ConstraintType> constraintClass) {
105 Set<ConstraintType> result = new HashSet<ConstraintType>();
106 for (PConstraint pConstraint : constraints) {
107 if (constraintClass.isInstance(pConstraint))
108 result.add((ConstraintType) pConstraint);
109 }
110 return result;
111 }
112
113 public PVariable newVirtualVariable() {
114 checkMutability();
115 String name;
116 do {
117
118 name = String.format(VIRTUAL_VARIABLE_PATTERN, nextVirtualNodeID++);
119 } while (variablesByName.containsKey(name));
120 PVariable var = new PVariable(this, name, true);
121 addVariable(var);
122 return var;
123 }
124
125 public PVariable newVirtualVariable(String name) {
126 checkMutability();
127 Preconditions.checkArgument(!variablesByName.containsKey(name), "ID %s already used for a virtual variable", name);
128 PVariable var = new PVariable(this, name, true);
129 addVariable(var);
130 return var;
131 }
132
133 public PVariable newConstantVariable(Object value) {
134 checkMutability();
135 PVariable virtual = newVirtualVariable();
136 new ConstantValue(this, virtual, value);
137 return virtual;
138 }
139
140 public Set<PVariable> getAllVariables() {
141 return allVariables;
142 }
143
144 public Set<PVariable> getUniqueVariables() {
145 return uniqueVariables;
146 }
147
148 private PVariable getVariableByName(Object name) {
149 return variablesByName.get(name).getUnifiedIntoRoot();
150 }
151
152 /**
153 * Find a PVariable by name
154 *
155 * @param name
156 * @return the found variable
157 * @throws IllegalArgumentException
158 * if no PVariable is found with the selected name
159 */
160 public PVariable getVariableByNameChecked(Object name) {
161 if (!variablesByName.containsKey(name))
162 throw new IllegalArgumentException(String.format("Cannot find PVariable %s", name));
163 return getVariableByName(name);
164 }
165
166 /**
167 * Finds and returns a PVariable by name. If no PVariable exists with the name in the body, a new one is created. If
168 * the name of the variable starts with {@value #VIRTUAL_VARIABLE_PREFIX}, the created variable will be considered
169 * virtual.
170 *
171 * @param name
172 * @return a PVariable with the selected name; never null
173 */
174 public PVariable getOrCreateVariableByName(String name) {
175 checkMutability();
176 if (!variablesByName.containsKey(name)) {
177 addVariable(new PVariable(this, name, name.startsWith(VIRTUAL_VARIABLE_PREFIX)));
178 }
179 return getVariableByName(name);
180 }
181
182 public Set<PConstraint> getConstraints() {
183 return constraints;
184 }
185
186 public PQuery getPattern() {
187 return query;
188 }
189
190 void noLongerUnique(PVariable pVariable) {
191 assert (!pVariable.isUnique());
192 uniqueVariables.remove(pVariable);
193 }
194
195 /**
196 * Returns the symbolic parameters of the body. </p>
197 *
198 * <p>
199 * <strong>Warning</strong>: if two PVariables are unified, the returned list changes. If you want to have a stable
200 * version, consider using {@link #getSymbolicParameters()}.
201 *
202 * @return a non-null, but possibly empty list
203 */
204 public List<PVariable> getSymbolicParameterVariables() {
205 return getSymbolicParameters().stream().map(ExportedParameter::getParameterVariable)
206 .collect(Collectors.toList());
207 }
208
209 /**
210 * Returns the exported parameter constraints of the body.
211 *
212 * @return a non-null, but possibly empty list
213 */
214 public List<ExportedParameter> getSymbolicParameters() {
215 if (symbolicParameters == null)
216 symbolicParameters = new ArrayList<>();
217 return symbolicParameters;
218 }
219
220 /**
221 * Sets the exported parameter constraints of the body, if this instance is mutable.
222 * @param symbolicParameters the new value
223 */
224 public void setSymbolicParameters(List<ExportedParameter> symbolicParameters) {
225 checkMutability();
226 this.symbolicParameters = new ArrayList<>(symbolicParameters);
227 }
228
229 /**
230 * Sets a specific status for the body. If set, the parent PQuery status will not be checked; if set to null, its corresponding PQuery
231 * status is checked for mutability.
232 *
233 * @param status
234 * the status to set
235 */
236 public void setStatus(PQueryStatus status) {
237 this.status = status;
238 }
239
240 public boolean isMutable() {
241 if (status == null) {
242 return query.isMutable();
243 } else {
244 return status.equals(PQueryStatus.UNINITIALIZED);
245 }
246 }
247
248 void checkMutability() {
249 if (status == null) {
250 query.checkMutability();
251 } else {
252 Preconditions.checkState(status.equals(PQueryStatus.UNINITIALIZED), "Initialized queries are not mutable");
253 }
254 }
255
256 /**
257 * Returns the disjunction the body is contained with. This disjunction may either be the
258 * {@link PQuery#getDisjunctBodies() canonical disjunction of the corresponding query} or something equivalent.
259 *
260 * @return the container disjunction of the body. Can be null if body is not in a disjunction yet.
261 */
262 public PDisjunction getContainerDisjunction() {
263 return containerDisjunction;
264 }
265
266 /**
267 * @param containerDisjunction the containerDisjunction to set
268 */
269 public void setContainerDisjunction(PDisjunction containerDisjunction) {
270 Preconditions.checkArgument(query.equals(containerDisjunction.getQuery()), "Disjunction of pattern %s incompatible with body %s", containerDisjunction.getQuery().getFullyQualifiedName(), query.getFullyQualifiedName());
271 Preconditions.checkState(this.containerDisjunction == null, "Disjunction is already set.");
272 this.containerDisjunction = containerDisjunction;
273 }
274
275 /**
276 * All unary input keys directly prescribed by constraints, grouped by variable.
277 * <p> to supertype inference or subsumption applied at this point.
278 */
279 public Map<PVariable, Set<TypeJudgement>> getAllUnaryTypeRestrictions(IQueryMetaContext context) {
280 Map<PVariable, Set<TypeJudgement>> currentRestrictions = allUnaryTypeRestrictions.get(context);
281 if (currentRestrictions == null) {
282 currentRestrictions = TypeHelper.inferUnaryTypes(getConstraints(), context);
283 allUnaryTypeRestrictions.put(context, currentRestrictions);
284 }
285 return currentRestrictions;
286 }
287 private WeakHashMap<IQueryMetaContext, Map<PVariable, Set<TypeJudgement>>> allUnaryTypeRestrictions = new WeakHashMap<IQueryMetaContext, Map<PVariable,Set<TypeJudgement>>>();
288
289}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PConstraint.java
new file mode 100644
index 00000000..ae2c4632
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PConstraint.java
@@ -0,0 +1,70 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import java.util.Comparator;
13import java.util.Map;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
17import tools.refinery.viatra.runtime.matchers.psystem.analysis.QueryAnalyzer;
18
19/**
20 * @author Gabor Bergmann
21 *
22 */
23public interface PConstraint extends PTraceable {
24
25 /**
26 * @since 2.1
27 * @return the query body this constraint belongs to
28 */
29 public PBody getBody();
30
31 /**
32 * All variables affected by this constraint.
33 */
34 public Set<PVariable> getAffectedVariables();
35
36 /**
37 * The set of variables whose potential values can be enumerated (once all non-deduced variables have known values).
38 */
39 public Set<PVariable> getDeducedVariables();
40
41 /**
42 * A (preferably minimal) cover of known functional dependencies between variables.
43 * @noreference Use {@link QueryAnalyzer} instead to properly handle dependencies of pattern calls.
44 * @return non-trivial functional dependencies in the form of {variables} --> {variables}, where dependencies with the same lhs are unified.
45 */
46 public Map<Set<PVariable>,Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context);
47
48 public void replaceVariable(PVariable obsolete, PVariable replacement);
49
50 public void delete();
51
52 public void checkSanity();
53
54 /**
55 * Returns an integer ID that is guaranteed to increase strictly monotonously for constraints within a pBody.
56 */
57 public abstract int getMonotonousID();
58
59
60 /**
61 * A comparator that orders constraints by their {@link #getMonotonousID() monotonous identifiers}. Should only used
62 * for tiebreaking in other comparators.
63 *
64 * @since 2.0
65 */
66 public static final Comparator<PConstraint> COMPARE_BY_MONOTONOUS_ID = (arg0, arg1) -> arg0.getMonotonousID() - arg1.getMonotonousID();
67
68
69
70}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PTraceable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PTraceable.java
new file mode 100644
index 00000000..f0241a9c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PTraceable.java
@@ -0,0 +1,16 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Dénes Harmath, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11/**
12 * Marker interface for PSystem elements that can be traced.
13 * @since 1.6
14 */
15public interface PTraceable {
16}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PVariable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PVariable.java
new file mode 100644
index 00000000..b6ea4861
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/PVariable.java
@@ -0,0 +1,203 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import java.util.HashSet;
13import java.util.Set;
14
15/**
16 * @author Gabor Bergmann
17 *
18 */
19public class PVariable {
20 private PBody pBody;
21 /**
22 * The name of the pattern variable. This is the unique key of the pattern node.
23 */
24 private String name;
25 /**
26 * virtual pVariables are nodes that do not correspond to actual pattern variables; they represent constants or Term
27 * substitutes
28 */
29 private boolean virtual;
30
31 /**
32 * Set of constraints that mention this variable
33 */
34 private Set<PConstraint> referringConstraints;
35
36 /**
37 * Determines whether there are any constraints that can deduce this variable
38 */
39 private Boolean deducable;
40
41 /**
42 * Another PVariable this variable has been unified into. Please use the other variable instead of this. Null iff
43 * this is still a first-class variable.
44 */
45 private PVariable unifiedInto;
46
47 PVariable(PBody pBody, String name) {
48 this(pBody, name, false);
49 }
50
51 PVariable(PBody pBody, String name, boolean virtual) {
52 super();
53 this.pBody = pBody;
54 this.name = name;
55 this.virtual = virtual;
56 // this.exportedParameter = false;
57 this.referringConstraints = new HashSet<PConstraint>();
58 this.unifiedInto = null;
59 this.deducable = false;
60 }
61
62 /**
63 * Replaces this variable with a given other, resulting in their unification. This variable will no longer be
64 * unique.
65 *
66 * @param replacement
67 */
68 public void unifyInto(PVariable replacement) {
69 pBody.checkMutability();
70 replacementCheck();
71 replacement = replacement.getUnifiedIntoRoot();
72
73 if (this.equals(replacement))
74 return;
75
76 if (!this.isVirtual() && replacement.isVirtual()) {
77 replacement.unifyInto(this);
78 } else {
79 // replacement.referringConstraints.addAll(this.referringConstraints);
80 // replacement.exportedParameter |= this.exportedParameter;
81 replacement.virtual &= this.virtual;
82 if (replacement.deducable != null && this.deducable != null)
83 replacement.deducable |= this.deducable;
84 else
85 replacement.deducable = null;
86 Set<PConstraint> snapshotConstraints = // avoid ConcurrentModificationX
87 new HashSet<PConstraint>(this.referringConstraints);
88 for (PConstraint constraint : snapshotConstraints) {
89 constraint.replaceVariable(this, replacement);
90 }
91 // replacementCheck() will fail from this point
92 this.unifiedInto = replacement;
93 pBody.noLongerUnique(this);
94 }
95 }
96
97 /**
98 * Determines whether there are any constraints that can deduce this variable
99 */
100 public boolean isDeducable() {
101 replacementCheck();
102 if (deducable == null) {
103 deducable = false;
104 for (PConstraint pConstraint : getReferringConstraints()) {
105 if (pConstraint.getDeducedVariables().contains(this)) {
106 deducable = true;
107 break;
108 }
109 }
110 }
111 return deducable;
112 }
113
114 /**
115 * Register that this variable is referred by the given constraint.
116 *
117 * @param constraint
118 */
119 public void refer(PConstraint constraint) {
120 pBody.checkMutability();
121 replacementCheck();
122 deducable = null;
123 referringConstraints.add(constraint);
124 }
125
126 /**
127 * Register that this variable is no longer referred by the given constraint.
128 *
129 * @param constraint
130 */
131 public void unrefer(PConstraint constraint) {
132 pBody.checkMutability();
133 replacementCheck();
134 deducable = null;
135 referringConstraints.remove(constraint);
136 }
137
138 /**
139 * @return the name of the pattern variable. This is the unique key of the pattern node.
140 */
141 public String getName() {
142 replacementCheck();
143 return name;
144 }
145
146 /**
147 * @return the virtual
148 */
149 public boolean isVirtual() {
150 replacementCheck();
151 return virtual;
152 }
153
154 /**
155 * @return the referringConstraints
156 */
157 public Set<PConstraint> getReferringConstraints() {
158 replacementCheck();
159 return referringConstraints;
160 }
161
162 @SuppressWarnings("unchecked")
163 public <ConstraintType> Set<ConstraintType> getReferringConstraintsOfType(Class<ConstraintType> constraintClass) {
164 replacementCheck();
165 Set<ConstraintType> result = new HashSet<ConstraintType>();
166 for (PConstraint pConstraint : referringConstraints) {
167 if (constraintClass.isInstance(pConstraint))
168 result.add((ConstraintType) pConstraint);
169 }
170 return result;
171 }
172
173 @Override
174 public String toString() {
175 // replacementCheck();
176 return name;// + ":PatternNode";
177 }
178
179 public PVariable getDirectUnifiedInto() {
180 return unifiedInto;
181 }
182
183 public PVariable getUnifiedIntoRoot() {
184 PVariable nextUnified = unifiedInto;
185 PVariable oldUnifiedInto = this;
186 while (nextUnified != null) {
187 oldUnifiedInto = nextUnified;
188 nextUnified = oldUnifiedInto.getDirectUnifiedInto();
189 }
190 return oldUnifiedInto; // unifiedInto;
191 }
192
193 public boolean isUnique() {
194 return unifiedInto == null;
195 }
196
197 private void replacementCheck() {
198 if (unifiedInto != null)
199 throw new IllegalStateException("Illegal usage of variable " + name + " which has been replaced with "
200 + unifiedInto.name);
201 }
202
203}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/TypeJudgement.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/TypeJudgement.java
new file mode 100644
index 00000000..4447b225
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/TypeJudgement.java
@@ -0,0 +1,153 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem;
10
11import java.util.Collection;
12import java.util.HashSet;
13import java.util.List;
14import java.util.Map;
15import java.util.stream.Collectors;
16import java.util.Set;
17
18import tools.refinery.viatra.runtime.matchers.context.IInputKey;
19import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
20import tools.refinery.viatra.runtime.matchers.context.InputKeyImplication;
21import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
22import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
25
26/**
27 * A judgement that means that the given tuple of variables will represent a tuple of values that is a member of the extensional relation identified by the given input key.
28 * @author Bergmann Gabor
29 *
30 */
31public class TypeJudgement {
32
33 private IInputKey inputKey;
34 private Tuple variablesTuple;
35 /**
36 * @param inputKey
37 * @param variablesTuple
38 */
39 public TypeJudgement(IInputKey inputKey, Tuple variablesTuple) {
40 super();
41 this.inputKey = inputKey;
42 this.variablesTuple = variablesTuple;
43 }
44 public IInputKey getInputKey() {
45 return inputKey;
46 }
47 public Tuple getVariablesTuple() {
48 return variablesTuple;
49 }
50 @Override
51 public int hashCode() {
52 final int prime = 31;
53 int result = 1;
54 result = prime * result
55 + ((inputKey == null) ? 0 : inputKey.hashCode());
56 result = prime * result
57 + ((variablesTuple == null) ? 0 : variablesTuple.hashCode());
58 return result;
59 }
60 @Override
61 public boolean equals(Object obj) {
62 if (this == obj)
63 return true;
64 if (obj == null)
65 return false;
66 if (!(obj instanceof TypeJudgement))
67 return false;
68 TypeJudgement other = (TypeJudgement) obj;
69 if (inputKey == null) {
70 if (other.inputKey != null)
71 return false;
72 } else if (!inputKey.equals(other.inputKey))
73 return false;
74 if (variablesTuple == null) {
75 if (other.variablesTuple != null)
76 return false;
77 } else if (!variablesTuple.equals(other.variablesTuple))
78 return false;
79 return true;
80 }
81
82 public Set<TypeJudgement> getDirectlyImpliedJudgements(IQueryMetaContext context) {
83 Set<TypeJudgement> results = new HashSet<TypeJudgement>();
84 results.add(this);
85
86 Collection<InputKeyImplication> implications = context.getImplications(this.inputKey);
87 for (InputKeyImplication inputKeyImplication : implications) {
88 results.add(
89 transcribeImplication(inputKeyImplication)
90 );
91 }
92
93 return results;
94 }
95
96 /**
97 * @since 1.6
98 */
99 public Set<TypeJudgement> getWeakenedAlternativeJudgements(IQueryMetaContext context) {
100 Set<TypeJudgement> results = new HashSet<TypeJudgement>();
101
102 Collection<InputKeyImplication> implications = context.getWeakenedAlternatives(this.inputKey);
103 for (InputKeyImplication inputKeyImplication : implications) {
104 results.add(
105 transcribeImplication(inputKeyImplication)
106 );
107 }
108
109 return results;
110 }
111
112 /**
113 * @since 2.0
114 */
115 public Map<TypeJudgement, Set<TypeJudgement>> getConditionalImpliedJudgements(IQueryMetaContext context) {
116 return context.getConditionalImplications(this.inputKey).entrySet().stream().collect(Collectors.toMap(
117 entry -> transcribeImplication(entry.getKey()),
118 entry -> entry.getValue().stream().map(this::transcribeImplication).collect(Collectors.toSet())));
119 }
120
121
122
123 private TypeJudgement transcribeImplication(InputKeyImplication inputKeyImplication) {
124 return new TypeJudgement(
125 inputKeyImplication.getImpliedKey(),
126 transcribeVariablesToTuple(inputKeyImplication.getImpliedIndices())
127 );
128 }
129 private Tuple transcribeVariablesToTuple(List<Integer> indices) {
130 Object[] elements = new Object[indices.size()];
131 for (int i = 0; i < indices.size(); ++i)
132 elements[i] = variablesTuple.get(indices.get(i));
133 return Tuples.flatTupleOf(elements);
134 }
135
136 @Override
137 public String toString() {
138 return "TypeJudgement:" + inputKey.getPrettyPrintableName() + "@" + variablesTuple.toString();
139 }
140
141 /**
142 * Creates this judgement as a direct type constraint in the given PBody under construction.
143 * <p> pre: the variables tuple must be formed of variables of that PBody.
144 * @since 1.6
145 */
146 public PConstraint createConstraintFor(PBody pBody) {
147 if (inputKey.isEnumerable()) {
148 return new TypeConstraint(pBody, variablesTuple, inputKey);
149 } else {
150 return new TypeFilterConstraint(pBody, variablesTuple, inputKey);
151 }
152 }
153}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/VariableDeferredPConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/VariableDeferredPConstraint.java
new file mode 100644
index 00000000..8ea6bb93
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/VariableDeferredPConstraint.java
@@ -0,0 +1,40 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem;
11
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
15import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
16
17/**
18 * A kind of deferred constraint that can only be checked when a set of deferring variables are all present in a plan.
19 *
20 * @author Gabor Bergmann
21 *
22 */
23public abstract class VariableDeferredPConstraint extends DeferredPConstraint {
24
25 public VariableDeferredPConstraint(PBody pBody,
26 Set<PVariable> affectedVariables) {
27 super(pBody, affectedVariables);
28 }
29
30 public abstract Set<PVariable> getDeferringVariables();
31
32 /**
33 * Refine further if needed
34 */
35 @Override
36 public boolean isReadyAt(SubPlan plan, IQueryMetaContext context) {
37 return plan.getVisibleVariables().containsAll(getDeferringVariables());
38 }
39
40}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AbstractMemorylessAggregationOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AbstractMemorylessAggregationOperator.java
new file mode 100644
index 00000000..63a37bbe
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AbstractMemorylessAggregationOperator.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.aggregations;
10
11/**
12 *
13 * An aggregation operator that does not store interim results beyond the final aggregated value.
14 * @author Gabor Bergmann
15 * @since 1.4
16 */
17public abstract class AbstractMemorylessAggregationOperator<Domain, AggregateResult>
18 implements IMultisetAggregationOperator<Domain, AggregateResult, AggregateResult>
19{
20
21 @Override
22 public AggregateResult getAggregate(AggregateResult result) {
23 return result;
24 }
25
26 @Override
27 public AggregateResult clone(AggregateResult original) {
28 return original;
29 }
30
31}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AggregatorType.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AggregatorType.java
new file mode 100644
index 00000000..4cc40a2b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/AggregatorType.java
@@ -0,0 +1,49 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.aggregations;
10
11import java.lang.annotation.ElementType;
12import java.lang.annotation.Inherited;
13import java.lang.annotation.Retention;
14import java.lang.annotation.RetentionPolicy;
15import java.lang.annotation.Target;
16
17import tools.refinery.viatra.runtime.matchers.aggregators.count;
18
19/**
20 * The aggregator type annotation describes the type constraints for the selected aggregator. In version 1.4, two kinds of
21 * aggregators are supported:
22 *
23 * <ol>
24 * <li>An aggregator that does not consider any parameter value from the call ({@link count}), just calculates the
25 * number of matches. This is represented by a single {@link Void} and a single corresponding return type.</li>
26 * <li>An aggregator that considers a single parameter from the call, and executes some aggregate operations over it.
27 * Such an aggregate operation can be defined over multiple types, where each possible parameter type has a corresponding return type declared.</li>
28 * </ol>
29 *
30 * <strong>Important!</strong> The parameterTypes and returnTypes arrays must have
31 * <ul>
32 * <li>The same number of classes defined each.</li>
33 * <li>Items are corresponded by index.</li>
34 * <li>Items should represent data types</li>
35 * </ul>
36 *
37 * @author Zoltan Ujhelyi
38 * @since 1.4
39 *
40 */
41@Target({ ElementType.TYPE })
42@Retention(RetentionPolicy.RUNTIME)
43@Inherited
44public @interface AggregatorType {
45
46 Class<?>[] parameterTypes();
47
48 Class<?>[] returnTypes();
49}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/BoundAggregator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/BoundAggregator.java
new file mode 100644
index 00000000..e6972544
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/BoundAggregator.java
@@ -0,0 +1,61 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.aggregations;
10
11import tools.refinery.viatra.runtime.matchers.context.IInputKey;
12import tools.refinery.viatra.runtime.matchers.context.common.JavaTransitiveInstancesKey;
13
14/**
15 * Augments an aggregator operator with type bindings for the type of values being aggregated and the aggregate result.
16 * <p> In case of <em>count</em>, the operator should be null.
17 * @author Gabor Bergmann
18 * @since 1.4
19 */
20public class BoundAggregator {
21 private final IMultisetAggregationOperator<?, ?, ?> operator;
22 private final Class<?> domainType;
23 private final Class<?> aggregateResultType;
24
25 public BoundAggregator(IMultisetAggregationOperator<?, ?, ?> operator,
26 Class<?> domainType,
27 Class<?> aggregateResultType) {
28 super();
29 this.operator = operator;
30 this.domainType = domainType;
31 this.aggregateResultType = aggregateResultType;
32 }
33
34 public IMultisetAggregationOperator<?, ?, ?> getOperator() {
35 return operator;
36 }
37
38 public Class<?> getDomainType() {
39 return domainType;
40 }
41
42 public Class<?> getAggregateResultType() {
43 return aggregateResultType;
44 }
45
46 public IInputKey getDomainTypeAsInputKey() {
47 return toJavaInputKey(domainType);
48 }
49
50 public IInputKey getAggregateResultTypeAsInputKey() {
51 return toJavaInputKey(aggregateResultType);
52 }
53
54 private static IInputKey toJavaInputKey(Class<?> type) {
55 if (type==null) {
56 return null;
57 } else {
58 return new JavaTransitiveInstancesKey(type);
59 }
60 }
61}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IAggregatorFactory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IAggregatorFactory.java
new file mode 100644
index 00000000..c970bd6a
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IAggregatorFactory.java
@@ -0,0 +1,40 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Zoltan Ujhelyi, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.aggregations;
10
11/**
12 *
13 * Describes an aggregation operator keyword, potentially with type polymorphism. The actual runtime
14 * {@link IMultisetAggregationOperator} that implements the aggregation logic may depend on the type context.
15 *
16 * <p>
17 * Implementors are suggested to use lower-case classnames (as it will end up in the language) and are required use the
18 * annotation {@link AggregatorType} to indicate type inference rules.
19 *
20 * <p>
21 * <strong>Important!</strong> Implemented aggregators must be (1) deterministic (2) pure and (3)support incremental
22 * value updates in the internal operation.
23 *
24 * @author Zoltan Ujhelyi
25 * @since 1.4
26 */
27
28public interface IAggregatorFactory {
29
30 /**
31 * Given type parameters selected from {@link AggregatorType} annotations, returns a run-time aggregator operator
32 * that is bound to the actual types.
33 *
34 * @param domainClass
35 * Java type of the values that are being aggregated
36 * @return the actual run-time aggregator logic, with type bindings
37 */
38 public BoundAggregator getAggregatorLogic(Class<?> domainClass);
39
40}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IMultisetAggregationOperator.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IMultisetAggregationOperator.java
new file mode 100644
index 00000000..3bc22274
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/aggregations/IMultisetAggregationOperator.java
@@ -0,0 +1,106 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.aggregations;
10
11import java.util.Collection;
12import java.util.stream.Stream;
13
14import tools.refinery.viatra.runtime.matchers.aggregators.ExtremumOperator;
15
16/**
17 * A single column aggregator is used to incrementally compute the aggregate of a multiset of values according to an aggregator operator.
18 *
19 * <p> The operator provides two methods of computation: <ul>
20 * <li>Stateless aggregation of an explicit multiset, provided by {@link #aggregateStatelessly(Collection)}.</li>
21 * <li>Incremental aggregation, provided by {@link #createNeutral()}, {@link #update(Object, Object, boolean)}, {@link #isNeutral(Object)}, {@link #getAggregate(Object)}.
22 * </ul>
23 *
24 * <p> In case of incremental computation, the aggregable multiset is conceptual; it is not represented by an explicit Collection<Domain> object, but its update operations are tracked.
25 *
26 * <p> In case of incremental computation, internal results, potentially distinct from the final aggregate result, may be stored in a helper data structure called <b>accumulator</b>.
27 * The goal of this distinction is that the final result may not be sufficient for incremental updates (see e.g. {@link ExtremumOperator}).
28 *
29 * @author Gabor Bergmann
30 *
31 * @param <Domain> the type of elements to be aggregated.
32 * @param <Accumulator> the type used to store the interim results of the aggregate computation,
33 * that may be incrementally refreshed upon updates to the multiset, and that can easily yield the final result.
34 * @param <AggregateResult> the type of the final result of the aggregation to be output.
35 *
36 * @since 1.4
37 */
38public interface IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> {
39
40 /**
41 * A textual description of the operator.
42 */
43 String getShortDescription();
44
45 /**
46 * A name or identifier of the operator.
47 */
48 String getName();
49
50 /**
51 * @return the neutral element, i.e. the interim result of aggregating an empty multiset.
52 */
53 Accumulator createNeutral();
54
55 /**
56 * @return true if the interim result is equivalent to the neutral element, as if there are no values in the multiset.
57 * Must return true if the multiset is empty.
58 */
59 boolean isNeutral(Accumulator result);
60
61 /**
62 * @return an updated intermediate result,
63 * changed to reflect that a given object was added to / removed from the multiset
64 * (as indicated by the parameter isInsertion)
65 */
66 Accumulator update(Accumulator oldResult, Domain updateValue, boolean isInsertion);
67
68 /**
69 * @return the aggregate result obtained from the given intermediate result.
70 * May be null to indicate that the current multiset cannot be aggregated (e.g. 0 elements have no minimum).
71 */
72 AggregateResult getAggregate(Accumulator result);
73
74 /**
75 * Calculates the aggregate results from a given stream of values; all values are considered as inserted
76 * @return the aggregate result, or null if no result can be calculated (e.g. because of an empty stream)
77 * @since 2.0
78 */
79 AggregateResult aggregateStream(Stream<Domain> stream);
80
81 /**
82 * Clones the given accumulator (with all its internal contents).
83 */
84 default Accumulator clone(Accumulator original) {
85 throw new UnsupportedOperationException();
86 }
87
88 /**
89 * Combines the given aggregate result and accumulator into a single aggregate result.
90 */
91 default AggregateResult combine(AggregateResult left, Accumulator right) {
92 throw new UnsupportedOperationException();
93 }
94
95 default boolean contains(Domain value, Accumulator accumulator) {
96 throw new UnsupportedOperationException();
97 }
98
99 /**
100 * Pretty prints the contents of the given accumulator.
101 */
102 default String prettyPrint(final Accumulator accumulator) {
103 return accumulator.toString();
104 }
105
106}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/analysis/QueryAnalyzer.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/analysis/QueryAnalyzer.java
new file mode 100644
index 00000000..e3f28cff
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/analysis/QueryAnalyzer.java
@@ -0,0 +1,194 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.analysis;
10
11import java.util.HashMap;
12import java.util.HashSet;
13import java.util.Map;
14import java.util.Map.Entry;
15import java.util.Set;
16import java.util.stream.Collectors;
17
18import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext;
19import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
20import tools.refinery.viatra.runtime.matchers.planning.helpers.FunctionalDependencyHelper;
21import tools.refinery.viatra.runtime.matchers.psystem.PBody;
22import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
23import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
24import tools.refinery.viatra.runtime.matchers.psystem.annotations.PAnnotation;
25import tools.refinery.viatra.runtime.matchers.psystem.annotations.ParameterReference;
26import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
27import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
28import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
29import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
30
31/**
32 * Object responsible for computing and caching static query analysis results.
33 * <p> Any client can instantiate this to statically analyze queries.
34 * Query backends should share an instance obtained via {@link IQueryBackendContext} to save resources.
35 * <p> Precondition: all involved queries must be initialized.
36 * @noinstantiate Considered unstable API; subject to change in future versions.
37 * Either use the analyzer provided by {@link IQueryBackendContext}, or anticipate
38 * potential future breakage when instantiating your own analyzer.
39 * @author Gabor Bergmann
40 * @since 1.5
41 */
42public final class QueryAnalyzer {
43
44 private IQueryMetaContext metaContext;
45
46 public QueryAnalyzer(IQueryMetaContext metaContext) {
47 this.metaContext = metaContext;
48 }
49
50 // Functional dependencies
51
52 /**
53 * Maps query and strictness to functional dependencies
54 */
55 private Map<PQuery, Map<Set<Integer>, Set<Integer>>> strictFunctionalDependencyGuarantees =
56 new HashMap<>();
57 private Map<PQuery, Map<Set<Integer>, Set<Integer>>> softFunctionalDependencyGuarantees =
58 new HashMap<>();
59
60 /**
61 * Functional dependency information, expressed on query parameters, that the match set of the query is guaranteed to respect.
62 * <p> The type dependencies shall be expressed on the <i>parameter index</i> integers, NOT the {@link PParameter} object.
63 * @return a non-null map of functional dependencies on parameters that can be processed by {@link FunctionalDependencyHelper}
64 * @param strict if true, only "hard" dependencies are taken into account that are strictly enforced by the model representation;
65 * if false, user-provided soft dependencies (@FunctionalDependency) are included as well, that are anticipated but not guaranteed by the storage mechanism;
66 * use true if superfluous dependencies may taint the correctness of a computation, false if they would merely impact performance
67 * @since 1.5
68 */
69 public Map<Set<Integer>, Set<Integer>> getProjectedFunctionalDependencies(PQuery query, boolean strict) {
70 Map<PQuery, Map<Set<Integer>, Set<Integer>>> guaranteeStore = strict ? strictFunctionalDependencyGuarantees : softFunctionalDependencyGuarantees;
71 Map<Set<Integer>, Set<Integer>> dependencies = guaranteeStore.get(query);
72 // Why not computeIfAbsent? See Bug 532507
73 // Invoked method #computeFunctionalDependencies may trigger functional dependency computation for called queries;
74 // and may thus recurs back into #getProjectedFunctionalDependencies, causing a ConcurrentModificationException
75 // if the called query has not been previously analyzed.
76 //
77 // Note: if patterns are recursive, the empty accumulator will be found in the store
78 // (this yields a safe lower estimate and guarantees termination for #getProjectedFunctionalDependencies)
79 // But this case probably will not occur due to recursive queries having a disjunction at some point,
80 // and thus ignored by #computeFunctionalDependencies
81 if (dependencies == null) {
82 dependencies = new HashMap<>(); // accumulator
83 guaranteeStore.put(query, dependencies);
84 computeFunctionalDependencies(dependencies, query, strict);
85 }
86 return dependencies;
87 }
88
89 private void computeFunctionalDependencies(Map<Set<Integer>, Set<Integer>> accumulator, PQuery query, boolean strict) {
90 Set<PBody> bodies = query.getDisjunctBodies().getBodies();
91 if (bodies.size() == 1) { // no support for recursion or disjunction
92
93 PBody body = bodies.iterator().next();
94
95 // collect parameter variables
96 Map<PVariable, Integer> parameters = body.getSymbolicParameters().stream()
97 .collect(Collectors.toMap(ExportedParameter::getParameterVariable,
98 param -> query.getParameters().indexOf(param.getPatternParameter())));
99
100 // collect all internal dependencies
101 Map<Set<PVariable>, Set<PVariable>> internalDependencies =
102 getFunctionalDependencies(body.getConstraints(), strict);
103
104 // project onto parameter variables
105 Map<Set<PVariable>, Set<PVariable>> projectedDeps =
106 FunctionalDependencyHelper.projectDependencies(internalDependencies, parameters.keySet());
107
108 // translate into indices
109 for (Entry<Set<PVariable>, Set<PVariable>> entry : projectedDeps.entrySet()) {
110 Set<Integer> left = new HashSet<Integer>();
111 Set<Integer> right = new HashSet<Integer>();
112 for (PVariable pVariable : entry.getKey()) {
113 left.add(parameters.get(pVariable));
114 }
115 for (PVariable pVariable : entry.getValue()) {
116 right.add(parameters.get(pVariable));
117 }
118 accumulator.put(left, right);
119 }
120
121 } else {
122 // Disjunctive case, no dependencies are inferred
123 // TODO: we can still salvage the intersection of dependencies IF
124 // - all bodies have disjoint match sets
125 // - and we avoid recursion
126 }
127
128 // add annotation-based soft dependencies (regardless of number of bodies)
129 if (!strict) {
130 outer:
131 for (PAnnotation annotation : query.getAnnotationsByName("FunctionalDependency")) {
132 Set<Integer> lefts = new HashSet<Integer>();
133 Set<Integer> rights = new HashSet<Integer>();
134
135 for (Object object : annotation.getAllValues("forEach")) {
136 ParameterReference parameter = (ParameterReference) object;
137 Integer position = query.getPositionOfParameter(parameter.getName());
138 if (position == null) continue outer;
139 lefts.add(position);
140 }
141 for (Object object : annotation.getAllValues("unique")) {
142 ParameterReference parameter = (ParameterReference) object;
143 Integer position = query.getPositionOfParameter(parameter.getName());
144 if (position == null) continue outer;
145 rights.add(position);
146 }
147
148 FunctionalDependencyHelper.includeDependency(accumulator, lefts, rights);
149 }
150 }
151 }
152
153 /**
154 * Functional dependency information, expressed on PVariables within a body, that the selected constraints imply.
155 * @return a non-null map of functional dependencies on PVariables that can be processed by {@link FunctionalDependencyHelper}
156 * @param constraints the set of constraints whose consequences will be analyzed
157 * @param strict if true, only "hard" dependencies are taken into account that are strictly enforced by the model representation;
158 * if false, user-provided soft dependencies (@FunctionalDependency) are included as well, that are anticipated but not guaranteed by the storage mechanism;
159 * use true if superfluous dependencies may taint the correctness of a computation, false if they would merely impact performance
160 * @since 1.5
161 */
162 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(Set<? extends PConstraint> constraints, boolean strict) {
163 Map<Set<PVariable>, Set<PVariable>> accumulator = new HashMap<Set<PVariable>, Set<PVariable>>();
164 for (PConstraint pConstraint : constraints){
165 if (pConstraint instanceof PositivePatternCall) {
166 // use query analysis results instead
167 PositivePatternCall call = (PositivePatternCall) pConstraint;
168 PQuery query = call.getSupplierKey();
169 Map<Set<Integer>, Set<Integer>> paramDependencies = getProjectedFunctionalDependencies(query, strict);
170 for (Entry<Set<Integer>, Set<Integer>> entry : paramDependencies.entrySet()) {
171 Set<PVariable> lefts = new HashSet<PVariable>();
172 Set<PVariable> rights = new HashSet<PVariable>();
173
174 for (Integer index : entry.getKey()) {
175 lefts.add(call.getVariableInTuple(index));
176 }
177 for (Integer index : entry.getValue()) {
178 rights.add(call.getVariableInTuple(index));
179 }
180
181 FunctionalDependencyHelper.includeDependency(accumulator,
182 lefts, rights);
183 }
184 } else {
185 // delegate to PConstraint
186 FunctionalDependencyHelper.includeDependencies(accumulator,
187 pConstraint.getFunctionalDependencies(metaContext));
188 }
189 }
190 return accumulator;
191 }
192
193
194}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/PAnnotation.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/PAnnotation.java
new file mode 100644
index 00000000..c4fbe0e9
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/PAnnotation.java
@@ -0,0 +1,94 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.annotations;
10
11import java.util.List;
12import java.util.Optional;
13import java.util.Set;
14import java.util.function.BiConsumer;
15
16import org.eclipse.collections.api.multimap.MutableMultimap;
17import org.eclipse.collections.impl.multimap.list.FastListMultimap;
18
19/**
20 * A container describing query annotations
21 * @author Zoltan Ujhelyi
22 *
23 */
24public class PAnnotation {
25
26 private final String name;
27 private MutableMultimap<String, Object> attributes = FastListMultimap.newMultimap();
28
29 public PAnnotation(String name) {
30 this.name = name;
31
32 }
33
34 /**
35 * Adds an attribute to the annotation
36 * @param attributeName
37 * @param value
38 */
39 public void addAttribute(String attributeName, Object value) {
40 attributes.put(attributeName, value);
41 }
42
43 /**
44 * Return the name of the annotation
45 */
46 public String getName() {
47 return name;
48 }
49
50 /**
51 * Returns the value of the first occurrence of an attribute
52 * @param attributeName
53 * @return the attribute value, or null, if attribute is not available
54 * @since 2.0
55 */
56 public Optional<Object> getFirstValue(String attributeName) {
57 return getAllValues(attributeName).stream().findFirst();
58 }
59
60 /**
61 * Returns the value of the first occurrence of an attribute
62 * @param attributeName
63 * @return the attribute value, or null, if attribute is not available
64 * @since 2.0
65 */
66 public <T> Optional<T> getFirstValue(String attributeName, Class<T> clazz) {
67 return getAllValues(attributeName).stream().filter(clazz::isInstance).map(clazz::cast).findFirst();
68 }
69
70 /**
71 * Returns all values of a selected attribute
72 * @param attributeName
73 * @return a non-null, but possibly empty list of attributes
74 */
75 public List<Object> getAllValues(String attributeName) {
76 return attributes.get(attributeName).toList();
77 }
78
79 /**
80 * Executes a consumer over all attributes. A selected attribute name (key) can appear (and thus consumed) multiple times.
81 * @since 2.0
82 */
83 public void forEachValue(BiConsumer<String, Object> consumer) {
84 attributes.forEachKeyValue(consumer::accept);
85 }
86
87 /**
88 * Returns a set of all attribute names used in this annotation
89 * @since 2.1
90 */
91 public Set<String> getAllAttributeNames() {
92 return attributes.keySet().toSet();
93 }
94}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/ParameterReference.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/ParameterReference.java
new file mode 100644
index 00000000..c67e9046
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/annotations/ParameterReference.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.annotations;
10
11/**
12 * An annotation parameter referencing a query parameter by name. Does not check whether the parameter exists.
13 *
14 * @author Zoltan Ujhelyi
15 *
16 */
17public class ParameterReference {
18
19 final String name;
20
21 public ParameterReference(String name) {
22 super();
23 this.name = name;
24 }
25
26 public String getName() {
27 return name;
28 }
29
30}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/AggregatorConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/AggregatorConstraint.java
new file mode 100644
index 00000000..56f86e89
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/AggregatorConstraint.java
@@ -0,0 +1,98 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
10
11import java.util.Collections;
12import java.util.HashMap;
13import java.util.HashSet;
14import java.util.Map;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.context.IInputKey;
18import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
19import tools.refinery.viatra.runtime.matchers.psystem.ITypeInfoProviderConstraint;
20import tools.refinery.viatra.runtime.matchers.psystem.PBody;
21import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
22import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
23import tools.refinery.viatra.runtime.matchers.psystem.aggregations.BoundAggregator;
24import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
25import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
26import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
27
28/**
29 * The PSystem representation of an aggregation.
30 *
31 * @author Tamas Szabo
32 * @since 1.4
33 */
34public class AggregatorConstraint extends PatternCallBasedDeferred implements ITypeInfoProviderConstraint {
35
36 protected PVariable resultVariable;
37 private BoundAggregator aggregator;
38 protected int aggregatedColumn;
39
40 public AggregatorConstraint(BoundAggregator aggregator, PBody pBody, Tuple actualParametersTuple, PQuery query,
41 PVariable resultVariable, int aggregatedColumn) {
42 super(pBody, actualParametersTuple, query, Collections.singleton(resultVariable));
43 this.resultVariable = resultVariable;
44 this.aggregatedColumn = aggregatedColumn;
45 this.aggregator = aggregator;
46 }
47
48 public int getAggregatedColumn() {
49 return this.aggregatedColumn;
50 }
51
52 public BoundAggregator getAggregator() {
53 return this.aggregator;
54 }
55
56 @Override
57 public Set<PVariable> getDeducedVariables() {
58 return Collections.singleton(resultVariable);
59 }
60
61 @Override
62 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
63 final Map<Set<PVariable>, Set<PVariable>> result = new HashMap<Set<PVariable>, Set<PVariable>>();
64 result.put(getDeferringVariables(), getDeducedVariables());
65 return result;
66 }
67
68 @Override
69 protected void doDoReplaceVariables(PVariable obsolete, PVariable replacement) {
70 if (resultVariable.equals(obsolete))
71 resultVariable = replacement;
72 }
73
74 @Override
75 protected Set<PVariable> getCandidateQuantifiedVariables() {
76 return actualParametersTuple.<PVariable> getDistinctElements();
77 }
78
79 @Override
80 protected String toStringRest() {
81 return query.getFullyQualifiedName() + "@" + actualParametersTuple.toString() + "->"
82 + resultVariable.toString();
83 }
84
85 public PVariable getResultVariable() {
86 return resultVariable;
87 }
88
89 @Override
90 public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context) {
91 Set<TypeJudgement> result = new HashSet<TypeJudgement>();
92 IInputKey aggregateResultType = aggregator.getAggregateResultTypeAsInputKey();
93 if (aggregateResultType != null) {
94 result.add(new TypeJudgement(aggregateResultType, Tuples.staticArityFlatTupleOf(resultVariable)));
95 }
96 return result;
97 }
98}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/BaseTypeSafeConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/BaseTypeSafeConstraint.java
new file mode 100644
index 00000000..7bc949a8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/BaseTypeSafeConstraint.java
@@ -0,0 +1,99 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
11
12import java.util.Collections;
13import java.util.Set;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16
17import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
18import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
19import tools.refinery.viatra.runtime.matchers.psystem.PBody;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
22import tools.refinery.viatra.runtime.matchers.psystem.VariableDeferredPConstraint;
23
24/**
25 * @author Gabor Bergmann
26 *
27 */
28public abstract class BaseTypeSafeConstraint extends
29 VariableDeferredPConstraint {
30
31 protected Set<PVariable> inputVariables;
32 protected PVariable outputVariable;
33
34 public PVariable getOutputVariable() {
35 return outputVariable;
36 }
37
38 /**
39 * @param pBody
40 * @param inputVariables
41 * @param outputVariable null iff no output (check-only)
42 */
43 public BaseTypeSafeConstraint(PBody pBody,
44 Set<PVariable> inputVariables, final PVariable outputVariable) {
45 super(pBody,
46 (outputVariable == null) ?
47 inputVariables :
48 Stream.concat(inputVariables.stream(), Stream.of(outputVariable)).collect(Collectors.toSet())
49 );
50 this.inputVariables = inputVariables;
51 this.outputVariable = outputVariable;
52 }
53
54 @Override
55 public Set<PVariable> getDeducedVariables() {
56 if (outputVariable == null)
57 return Collections.emptySet();
58 else
59 return Collections.singleton(outputVariable);
60 }
61
62 @Override
63 public Set<PVariable> getDeferringVariables() {
64 return inputVariables;
65 }
66
67 @Override
68 public boolean isReadyAt(SubPlan plan, IQueryMetaContext context) {
69 if (super.isReadyAt(plan, context)) {
70 return checkTypeSafety(plan, context) == null;
71 }
72 return false;
73 }
74
75 /**
76 * Checks whether all type restrictions are already enforced on affected variables.
77 *
78 * @param plan
79 * @return a variable whose type safety is not enforced yet, or null if the plan is typesafe
80 */
81 public PVariable checkTypeSafety(SubPlan plan, IQueryMetaContext context) {
82 Set<TypeJudgement> impliedJudgements = plan.getAllImpliedTypeJudgements(context);
83
84 for (PVariable pVariable : inputVariables) {
85 Set<TypeJudgement> allTypeRestrictionsForVariable = pBody.getAllUnaryTypeRestrictions(context).get(pVariable);
86 if (allTypeRestrictionsForVariable != null && !impliedJudgements.containsAll(allTypeRestrictionsForVariable))
87 return pVariable;
88 }
89 return null;
90 }
91
92 @Override
93 protected void doReplaceVariable(PVariable obsolete, PVariable replacement) {
94 if (inputVariables.remove(obsolete))
95 inputVariables.add(replacement);
96 if (outputVariable == obsolete)
97 outputVariable = replacement;
98 }
99}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Equality.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Equality.java
new file mode 100644
index 00000000..b978b62c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Equality.java
@@ -0,0 +1,96 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
11
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.HashSet;
15import java.util.Map;
16import java.util.Set;
17
18import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
19import tools.refinery.viatra.runtime.matchers.planning.SubPlan;
20import tools.refinery.viatra.runtime.matchers.psystem.DeferredPConstraint;
21import tools.refinery.viatra.runtime.matchers.psystem.PBody;
22import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
23
24/**
25 * @author Gabor Bergmann
26 *
27 */
28public class Equality extends DeferredPConstraint {
29
30 private PVariable who;
31 private PVariable withWhom;
32
33 public Equality(PBody pBody, PVariable who, PVariable withWhom) {
34 super(pBody, buildSet(who, withWhom));
35 this.who = who;
36 this.withWhom = withWhom;
37 }
38
39 private static Set<PVariable> buildSet(PVariable who, PVariable withWhom) {
40 Set<PVariable> set = new HashSet<PVariable>();
41 set.add(who);
42 set.add(withWhom);
43 return set;
44 }
45
46 /**
47 * An equality is moot if it compares the a variable with itself.
48 *
49 * @return true, if the equality is moot
50 */
51 public boolean isMoot() {
52 return who.equals(withWhom);
53 }
54
55 @Override
56 public void doReplaceVariable(PVariable obsolete, PVariable replacement) {
57 if (obsolete.equals(who))
58 who = replacement;
59 if (obsolete.equals(withWhom))
60 withWhom = replacement;
61 }
62
63 @Override
64 protected String toStringRest() {
65 return who.getName() + "=" + withWhom.getName();
66 }
67
68 public PVariable getWho() {
69 return who;
70 }
71
72 public PVariable getWithWhom() {
73 return withWhom;
74 }
75
76 @Override
77 public Set<PVariable> getDeducedVariables() {
78 return Collections.emptySet();
79 }
80
81 @Override
82 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
83 final Map<Set<PVariable>, Set<PVariable>> result = new HashMap<Set<PVariable>, Set<PVariable>>();
84 result.put(Collections.singleton(who), Collections.singleton(withWhom));
85 result.put(Collections.singleton(withWhom), Collections.singleton(who));
86 return result;
87 }
88
89 @Override
90 public boolean isReadyAt(SubPlan plan, IQueryMetaContext context) {
91 return plan.getVisibleVariables().contains(who) && plan.getVisibleVariables().contains(withWhom);
92 // will be replaced by || if copierNode is available;
93 // until then, LayoutHelper.unifyVariablesAlongEqualities(PSystem<PatternDescription, StubHandle, Collector>) is
94 // recommended.
95 }
96}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExportedParameter.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExportedParameter.java
new file mode 100644
index 00000000..80706792
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExportedParameter.java
@@ -0,0 +1,108 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
11
12import java.util.Collections;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
16import tools.refinery.viatra.runtime.matchers.psystem.PBody;
17import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
18import tools.refinery.viatra.runtime.matchers.psystem.VariableDeferredPConstraint;
19import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
20import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
21
22/**
23 * @author Gabor Bergmann
24 *
25 */
26public class ExportedParameter extends VariableDeferredPConstraint {
27 PVariable parameterVariable;
28 final String parameterName;
29 final PParameter patternParameter;
30
31 /**
32 * @since 1.4
33 */
34 public ExportedParameter(PBody pBody, PVariable parameterVariable, PParameter patternParameter) {
35 super(pBody, Collections.singleton(parameterVariable));
36 this.parameterVariable = parameterVariable;
37 this.patternParameter = patternParameter;
38 parameterName = patternParameter.getName();
39 }
40
41 @Override
42 public void doReplaceVariable(PVariable obsolete, PVariable replacement) {
43 if (obsolete.equals(parameterVariable))
44 parameterVariable = replacement;
45 }
46
47 @Override
48 protected String toStringRest() {
49 Object varName = parameterVariable.getName();
50 return parameterName.equals(varName) ? parameterName : parameterName + "(" + varName + ")";
51 }
52
53 @Override
54 public Set<PVariable> getDeducedVariables() {
55 return Collections.emptySet();
56 }
57
58 /**
59 * The name of the parameter; usually, it is expected that {@link #getParameterVariable()} is more useful, except
60 * maybe for debugging purposes.
61 *
62 * @return a non-null name of the parameter
63 */
64 public String getParameterName() {
65 return parameterName;
66 }
67
68 public PVariable getParameterVariable() {
69 return parameterVariable;
70 }
71
72 /**
73 * @since 1.4
74 */
75 public PParameter getPatternParameter() {
76 if (patternParameter == null) {
77 PQuery query = pBody.getPattern();
78 Integer index = query.getPositionOfParameter(parameterName);
79 if (index == null) {
80 throw new IllegalStateException(String.format("Pattern %s does not have a parameter named %s",
81 query.getFullyQualifiedName(), parameterName));
82 }
83 return query.getParameters().get(index);
84 } else {
85 return patternParameter;
86 }
87 }
88
89 @Override
90 public Set<PVariable> getDeferringVariables() {
91 return Collections.singleton(parameterVariable);
92 }
93
94 @Override
95 public void checkSanity() {
96 super.checkSanity();
97 if (!parameterVariable.isDeducable()) {
98 String[] args = { parameterName };
99 String msg = "Impossible to match pattern: "
100 + "exported pattern variable {1} can not be determined based on the pattern constraints. "
101 + "HINT: certain constructs (e.g. negative patterns or check expressions) cannot output symbolic parameters.";
102 String shortMsg = "Could not deduce value of parameter";
103 throw new QueryProcessingException(msg, args, shortMsg, null);
104 }
105
106 }
107
108}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExpressionEvaluation.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExpressionEvaluation.java
new file mode 100644
index 00000000..06688c36
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/ExpressionEvaluation.java
@@ -0,0 +1,80 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.LinkedHashSet;
14import java.util.Map;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
18import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
19import tools.refinery.viatra.runtime.matchers.psystem.PBody;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
22
23/**
24 * @author Zoltan Ujhelyi
25 *
26 */
27public class ExpressionEvaluation extends BaseTypeSafeConstraint {
28
29 private IExpressionEvaluator evaluator;
30 private boolean isUnwinding;
31
32 public ExpressionEvaluation(PBody pBody, IExpressionEvaluator evaluator, PVariable outputVariable) {
33 this(pBody, evaluator, outputVariable, false);
34 }
35
36 /**
37 * @since 2.4
38 */
39 public ExpressionEvaluation(PBody pBody, IExpressionEvaluator evaluator, PVariable outputVariable,
40 boolean isUnwinding) {
41 super(pBody, getPVariablesOfExpression(pBody, evaluator), outputVariable);
42 this.evaluator = evaluator;
43 this.isUnwinding = isUnwinding;
44 }
45
46 /**
47 * @since 2.4
48 */
49 public boolean isUnwinding() {
50 return isUnwinding;
51 }
52
53 public IExpressionEvaluator getEvaluator() {
54 return evaluator;
55 }
56
57 @Override
58 protected String toStringRest() {
59 return Tuples.flatTupleOf(new ArrayList<PVariable>(inputVariables).toArray()).toString() + "|="
60 + evaluator.getShortDescription();
61 }
62
63 @Override
64 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
65 if (outputVariable == null)
66 return Collections.emptyMap();
67 else
68 return Collections.singletonMap(inputVariables, Collections.singleton(outputVariable));
69 }
70
71 private static Set<PVariable> getPVariablesOfExpression(PBody pBody, IExpressionEvaluator evaluator) {
72 // use a linked set, so that the variables will come in the order of the parameters
73 Set<PVariable> result = new LinkedHashSet<PVariable>();
74 for (String name : evaluator.getInputParameterNames()) {
75 PVariable variable = pBody.getOrCreateVariableByName(name);
76 result.add(variable);
77 }
78 return result;
79 }
80}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Inequality.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Inequality.java
new file mode 100644
index 00000000..5cac33dc
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/Inequality.java
@@ -0,0 +1,151 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
11
12import java.util.Arrays;
13import java.util.Collections;
14import java.util.HashSet;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.psystem.PBody;
18import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
19import tools.refinery.viatra.runtime.matchers.psystem.VariableDeferredPConstraint;
20
21/**
22 * @author Gabor Bergmann
23 *
24 */
25public class Inequality extends VariableDeferredPConstraint {
26
27 private PVariable who;
28 private PVariable withWhom;
29
30 /**
31 * The inequality constraint is weak if it can be ignored when who is the same as withWhom, or if any if them is
32 * undeducible.
33 */
34 private boolean weak;
35
36 public Inequality(PBody pBody, PVariable who, PVariable withWhom) {
37 this(pBody, who, withWhom, false);
38 }
39
40 public Inequality(PBody pBody, PVariable who, PVariable withWhom,
41 boolean weak) {
42 super(pBody, new HashSet<>(Arrays.asList(who, withWhom) ));
43 this.who = who;
44 this.withWhom = withWhom;
45 this.weak = weak;
46 }
47
48 // private Inequality(
49 // PSystem<PatternDescription, StubHandle, ?> pSystem,
50 // PVariable subject, Set<PVariable> inequals)
51 // {
52 // super(pSystem, include(inequals, subject));
53 // this.subject = subject;
54 // this.inequals = inequals;
55 // }
56
57 // private static HashSet<PVariable> include(Set<PVariable> inequals, PVariable subject) {
58 // HashSet<PVariable> hashSet = new HashSet<PVariable>(inequals);
59 // hashSet.add(subject);
60 // return hashSet;
61 // }
62
63 @Override
64 public Set<PVariable> getDeferringVariables() {
65 return getAffectedVariables();
66 }
67
68 // private static int[] mapIndices(Map<Object, Integer> variablesIndex, Set<PVariable> keys) {
69 // int[] result = new int[keys.size()];
70 // int k = 0;
71 // for (PVariable key : keys) {
72 // result[k++] = variablesIndex.get(key);
73 // }
74 // return result;
75 // }
76
77 // @Override
78 // public IFoldablePConstraint getIncorporator() {
79 // return incorporator;
80 // }
81 //
82 // @Override
83 // public void registerIncorporatationInto(IFoldablePConstraint incorporator) {
84 // this.incorporator = incorporator;
85 // }
86 //
87 // @Override
88 // public boolean incorporate(IFoldablePConstraint other) {
89 // if (other instanceof Inequality<?, ?>) {
90 // Inequality other2 = (Inequality) other;
91 // if (subject.equals(other2.subject)) {
92 // Set<PVariable> newInequals = new HashSet<PVariable>(inequals);
93 // newInequals.addAll(other2.inequals);
94 // return new Inequality<PatternDescription, StubHandle>(buildable, subject, newInequals);
95 // }
96 // } else return false;
97 // }
98
99 @Override
100 protected String toStringRest() {
101 return who.toString() + (isWeak() ? "!=?" : "!=") + withWhom.toString();
102 }
103
104 @Override
105 public void doReplaceVariable(PVariable obsolete, PVariable replacement) {
106 if (obsolete.equals(who))
107 who = replacement;
108 if (obsolete.equals(withWhom))
109 withWhom = replacement;
110 }
111
112 @Override
113 public Set<PVariable> getDeducedVariables() {
114 return Collections.emptySet();
115 }
116
117 /**
118 * The inequality constraint is weak if it can be ignored when who is the same as withWhom, or if any if them is
119 * undeducible.
120 *
121 * @return the weak
122 */
123 public boolean isWeak() {
124 return weak;
125 }
126
127 /**
128 * A weak inequality constraint is eliminable if who is the same as withWhom, or if any if them is undeducible.
129 */
130 public boolean isEliminable() {
131 return isWeak() && (who.equals(withWhom) || !who.isDeducable() || !withWhom.isDeducable());
132 }
133
134 /**
135 * Eliminates a weak inequality constraint if it can be ignored when who is the same as withWhom, or if any if them
136 * is undeducible.
137 */
138 public void eliminateWeak() {
139 if (isEliminable())
140 delete();
141 }
142
143 public PVariable getWho() {
144 return who;
145 }
146
147 public PVariable getWithWhom() {
148 return withWhom;
149 }
150
151}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/NegativePatternCall.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/NegativePatternCall.java
new file mode 100644
index 00000000..87d9d9fc
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/NegativePatternCall.java
@@ -0,0 +1,52 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
11
12import java.util.Collections;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.psystem.PBody;
16import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19
20/**
21 * @author Gabor Bergmann
22 *
23 */
24public class NegativePatternCall extends PatternCallBasedDeferred {
25
26 public NegativePatternCall(PBody pBody, Tuple actualParametersTuple, PQuery query) {
27 super(pBody, actualParametersTuple, query);
28 }
29
30 @Override
31 public Set<PVariable> getDeducedVariables() {
32 return Collections.emptySet();
33 }
34
35 /**
36 * @return all variables that may potentially be quantified they are not used anywhere else
37 */
38 @Override
39 protected Set<PVariable> getCandidateQuantifiedVariables() {
40 return getAffectedVariables();
41 }
42
43 @Override
44 protected void doDoReplaceVariables(PVariable obsolete, PVariable replacement) {
45 }
46
47 @Override
48 protected String toStringRest() {
49 return "!" + query.getFullyQualifiedName() + "@" + actualParametersTuple.toString();
50 }
51
52}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternCallBasedDeferred.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternCallBasedDeferred.java
new file mode 100644
index 00000000..93eeffec
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternCallBasedDeferred.java
@@ -0,0 +1,118 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
11
12import java.util.Collections;
13import java.util.HashSet;
14import java.util.Set;
15
16import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
17import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
18import tools.refinery.viatra.runtime.matchers.psystem.PBody;
19import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.psystem.VariableDeferredPConstraint;
22import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24
25/**
26 * @author Gabor Bergmann
27 *
28 */
29public abstract class PatternCallBasedDeferred extends VariableDeferredPConstraint implements IQueryReference {
30
31 protected Tuple actualParametersTuple;
32
33 protected abstract void doDoReplaceVariables(PVariable obsolete, PVariable replacement);
34
35 protected abstract Set<PVariable> getCandidateQuantifiedVariables();
36
37 protected PQuery query;
38 private Set<PVariable> deferringVariables;
39
40 public PatternCallBasedDeferred(PBody pBody, Tuple actualParametersTuple,
41 PQuery pattern, Set<PVariable> additionalAffectedVariables) {
42 super(pBody, union(actualParametersTuple.<PVariable> getDistinctElements(), additionalAffectedVariables));
43 this.actualParametersTuple = actualParametersTuple;
44 this.query = pattern;
45 }
46
47 public PatternCallBasedDeferred(PBody pBody, Tuple actualParametersTuple,
48 PQuery pattern) {
49 this(pBody, actualParametersTuple, pattern, Collections.<PVariable> emptySet());
50 }
51
52 private static Set<PVariable> union(Set<PVariable> a, Set<PVariable> b) {
53 Set<PVariable> result = new HashSet<PVariable>();
54 result.addAll(a);
55 result.addAll(b);
56 return result;
57 }
58
59 @Override
60 public Set<PVariable> getDeferringVariables() {
61 if (deferringVariables == null) {
62 deferringVariables = new HashSet<PVariable>();
63 for (PVariable var : getCandidateQuantifiedVariables()) {
64 if (var.isDeducable())
65 deferringVariables.add(var);
66 }
67 }
68 return deferringVariables;
69 }
70
71 @Override
72 public void checkSanity() {
73 super.checkSanity();
74 for (Object obj : this.actualParametersTuple.getDistinctElements()) {
75 PVariable var = (PVariable) obj;
76 if (!getDeferringVariables().contains(var)) {
77 // so this is a free variable of the NAC / aggregation?
78 for (PConstraint pConstraint : var.getReferringConstraints()) {
79 if (pConstraint != this
80 && !(pConstraint instanceof Equality && ((Equality) pConstraint).isMoot()))
81 throw new QueryProcessingException (
82 "Variable {1} of constraint {2} is not a positively determined part of the pattern, yet it is also affected by {3}.",
83 new String[] { var.toString(), this.toString(), pConstraint.toString() },
84 "Read-only variable can not be deduced", null);
85 }
86 }
87 }
88
89 }
90
91// public SubPlan getSidePlan(IOperationCompiler compiler) throws QueryPlannerException {
92// SubPlan sidePlan = compiler.patternCallPlan(actualParametersTuple, query);
93// sidePlan = BuildHelper.enforceVariableCoincidences(compiler, sidePlan);
94// return sidePlan;
95// }
96
97 @Override
98 protected void doReplaceVariable(PVariable obsolete, PVariable replacement) {
99 if (deferringVariables != null) {
100 // FAIL instead of hopeless attempt to fix
101 // if (deferringVariables.remove(obsolete)) deferringVariables.add(replacement);
102 throw new IllegalStateException("Cannot replace variables on " + this
103 + " when deferring variables have already been identified.");
104 }
105 actualParametersTuple = actualParametersTuple.replaceAll(obsolete, replacement);
106 doDoReplaceVariables(obsolete, replacement);
107 }
108
109 public Tuple getActualParametersTuple() {
110 return actualParametersTuple;
111 }
112
113 @Override
114 public PQuery getReferredQuery() {
115 return query;
116 }
117
118}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternMatchCounter.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternMatchCounter.java
new file mode 100644
index 00000000..0c40d91e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/PatternMatchCounter.java
@@ -0,0 +1,70 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
11
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.Map;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
18import tools.refinery.viatra.runtime.matchers.psystem.PBody;
19import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
20import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
21import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
22
23/**
24 * @author Gabor Bergmann
25 */
26public class PatternMatchCounter extends PatternCallBasedDeferred {
27
28 private PVariable resultVariable;
29
30 public PatternMatchCounter(PBody pBody, Tuple actualParametersTuple,
31 PQuery query, PVariable resultVariable) {
32 super(pBody, actualParametersTuple, query, Collections.singleton(resultVariable));
33 this.resultVariable = resultVariable;
34 }
35
36 @Override
37 public Set<PVariable> getDeducedVariables() {
38 return Collections.singleton(resultVariable);
39 }
40
41 @Override
42 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
43 final Map<Set<PVariable>, Set<PVariable>> result = new HashMap<Set<PVariable>, Set<PVariable>>();
44 result.put(getDeferringVariables(), getDeducedVariables());
45 return result;
46 }
47
48 @Override
49 protected void doDoReplaceVariables(PVariable obsolete, PVariable replacement) {
50 if (resultVariable.equals(obsolete))
51 resultVariable = replacement;
52 }
53
54 @Override
55 protected Set<PVariable> getCandidateQuantifiedVariables() {
56 return actualParametersTuple.<PVariable> getDistinctElements();
57 }
58
59
60 @Override
61 protected String toStringRest() {
62 return query.getFullyQualifiedName() + "@" + actualParametersTuple.toString() + "->"
63 + resultVariable.toString();
64 }
65
66 public PVariable getResultVariable() {
67 return resultVariable;
68 }
69
70} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/RelationEvaluation.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/RelationEvaluation.java
new file mode 100644
index 00000000..336a83fb
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/RelationEvaluation.java
@@ -0,0 +1,57 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2022, Tamas Szabo, GitHub
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
10
11import java.util.List;
12
13import tools.refinery.viatra.runtime.matchers.psystem.EnumerablePConstraint;
14import tools.refinery.viatra.runtime.matchers.psystem.IMultiQueryReference;
15import tools.refinery.viatra.runtime.matchers.psystem.IRelationEvaluator;
16import tools.refinery.viatra.runtime.matchers.psystem.PBody;
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
18import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
19
20/**
21 * A constraint which prescribes the evaluation of custom Java logic that takes an arbitrary number of input relations
22 * and produces one output relation. Contrast this to {@link ExpressionEvaluation}, which produces a single output value
23 * given an input tuple.
24 *
25 * The assumption is that the relation evaluation logic is not incremental, that is, it can only perform from-scratch
26 * computation of the output relation given the complete input relations. To this end, the relation evaluator always
27 * receives the complete input relations with all their contents as input. However, the evaluator engine makes sure that
28 * the output of the relation evaluation is at least "seemingly" incremental. This means that the underlying computation
29 * network computes the delta on the output compared to the previous output and only propagates the delta further.
30 *
31 * @author Tamas Szabo
32 *
33 * @since 2.8
34 *
35 */
36public class RelationEvaluation extends EnumerablePConstraint implements IMultiQueryReference {
37
38 private final IRelationEvaluator evaluator;
39 private final List<PQuery> inputQueries;
40
41 public RelationEvaluation(final PBody body, final Tuple variablesTuple, final List<PQuery> inputQueries,
42 final IRelationEvaluator evaluator) {
43 super(body, variablesTuple);
44 this.evaluator = evaluator;
45 this.inputQueries = inputQueries;
46 }
47
48 public IRelationEvaluator getEvaluator() {
49 return this.evaluator;
50 }
51
52 @Override
53 public List<PQuery> getReferredQueries() {
54 return this.inputQueries;
55 }
56
57}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/TypeFilterConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/TypeFilterConstraint.java
new file mode 100644
index 00000000..8b6e29ef
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicdeferred/TypeFilterConstraint.java
@@ -0,0 +1,105 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.basicdeferred;
10
11import java.util.Collections;
12import java.util.Map;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.context.IInputKey;
16import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
17import tools.refinery.viatra.runtime.matchers.psystem.ITypeConstraint;
18import tools.refinery.viatra.runtime.matchers.psystem.PBody;
19import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
20import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
21import tools.refinery.viatra.runtime.matchers.psystem.VariableDeferredPConstraint;
22import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24
25/**
26 * Represents a non-enumerable type constraint that asserts that values substituted for the given tuple of variables
27 * form a tuple that belongs to a (typically non-enumerable) extensional relation identified by an {@link IInputKey}.
28 *
29 * <p> The InputKey is typically not enumerable. If it is enumerable, use {@link TypeConstraint} instead, so that the PConstraint carries over the property of enumerability.
30 *
31 * @author Bergmann Gabor
32 *
33 */
34public class TypeFilterConstraint extends VariableDeferredPConstraint implements
35 ITypeConstraint {
36
37 private Tuple variablesTuple;
38 private IInputKey inputKey;
39
40 private TypeJudgement equivalentJudgement;
41
42
43 public TypeFilterConstraint(PBody pBody, Tuple variablesTuple, IInputKey inputKey) {
44 super(pBody, variablesTuple.<PVariable> getDistinctElements());
45 this.equivalentJudgement = new TypeJudgement(inputKey, variablesTuple);
46
47 this.variablesTuple = variablesTuple;
48 this.inputKey = inputKey;
49
50 if (variablesTuple.getSize() != inputKey.getArity())
51 throw new IllegalArgumentException(
52 this.getClass().getSimpleName() +
53 " applied for variable tuple " + variablesTuple + " having wrong arity for input key " +
54 inputKey);
55 }
56
57
58
59 public Tuple getVariablesTuple() {
60 return variablesTuple;
61 }
62
63 public IInputKey getInputKey() {
64 return inputKey;
65 }
66
67 @Override
68 public TypeJudgement getEquivalentJudgement() {
69 return equivalentJudgement;
70 }
71
72 @Override
73 protected void doReplaceVariable(PVariable obsolete, PVariable replacement) {
74 variablesTuple = variablesTuple.replaceAll(obsolete, replacement);
75 this.equivalentJudgement = new TypeJudgement(inputKey, variablesTuple);
76 }
77
78 @Override
79 public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context) {
80 return Collections.singleton(equivalentJudgement);
81 }
82
83 @Override
84 public Set<PVariable> getDeducedVariables() {
85 return Collections.emptySet();
86 }
87
88 @Override
89 public Set<PVariable> getDeferringVariables() {
90 return getAffectedVariables();
91 }
92
93 @Override
94 protected String toStringRest() {
95 return inputKey.getPrettyPrintableName() + "@" + variablesTuple;
96 }
97
98 @Override
99 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
100 return TypeConstraintUtil.getFunctionalDependencies(context, inputKey, variablesTuple);
101 }
102
103
104
105}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/AbstractTransitiveClosure.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/AbstractTransitiveClosure.java
new file mode 100644
index 00000000..7bbf7118
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/AbstractTransitiveClosure.java
@@ -0,0 +1,44 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
10
11import java.util.Set;
12
13import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
14import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
15import tools.refinery.viatra.runtime.matchers.psystem.ITypeInfoProviderConstraint;
16import tools.refinery.viatra.runtime.matchers.psystem.KeyedEnumerablePConstraint;
17import tools.refinery.viatra.runtime.matchers.psystem.PBody;
18import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
19import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
20import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
21
22/**
23 * @since 2.0
24 */
25public abstract class AbstractTransitiveClosure extends KeyedEnumerablePConstraint<PQuery> implements IQueryReference, ITypeInfoProviderConstraint {
26
27 public AbstractTransitiveClosure(PBody pBody, Tuple variablesTuple, PQuery supplierKey) {
28 super(pBody, variablesTuple, supplierKey);
29 }
30
31 @Override
32 public PQuery getReferredQuery() {
33 return supplierKey;
34 }
35
36 /**
37 * @since 1.3
38 */
39 @Override
40 public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context) {
41 return PositivePatternCall.getTypesImpliedByCall(supplierKey, variablesTuple);
42 }
43
44} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryReflexiveTransitiveClosure.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryReflexiveTransitiveClosure.java
new file mode 100644
index 00000000..e3dae240
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryReflexiveTransitiveClosure.java
@@ -0,0 +1,57 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Zoltan Ujhelyi, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
11
12import tools.refinery.viatra.runtime.matchers.context.IInputKey;
13import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
14import tools.refinery.viatra.runtime.matchers.psystem.PBody;
15import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
16import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
17
18/**
19 * For a binary base pattern over an enumerable universe type, computes the reflexive transitive closure (base)*
20 *
21 * @author Gabor Bergmann, Zoltan Ujhelyi
22 * @since 2.0
23 */
24public class BinaryReflexiveTransitiveClosure extends AbstractTransitiveClosure {
25
26 private final IInputKey universeType;
27
28 public BinaryReflexiveTransitiveClosure(PBody pBody, Tuple variablesTuple,
29 PQuery pattern, IInputKey universeType) {
30 super(pBody, variablesTuple, pattern);
31 this.universeType = universeType;
32 }
33
34 @Override
35 protected String keyToString() {
36 return supplierKey.getFullyQualifiedName() + "*";
37 }
38
39 /**
40 * Returns the type whose instances should be returned as 0-long paths.
41 * @since 2.0
42 */
43 public IInputKey getUniverseType() {
44 return universeType;
45 }
46
47 @Override
48 public void checkSanity() {
49 if (!universeType.isEnumerable() || universeType.getArity() != 1) {
50 throw new QueryProcessingException(
51 String.format("Invalid universe type %s - it should be enumerable and must have an arity of 1.",
52 universeType.getPrettyPrintableName()),
53 pBody.getPattern());
54 }
55 }
56
57}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryTransitiveClosure.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryTransitiveClosure.java
new file mode 100644
index 00000000..716d043b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/BinaryTransitiveClosure.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
11
12import tools.refinery.viatra.runtime.matchers.psystem.PBody;
13import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
14import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
15
16/**
17 * For a binary base pattern, computes the irreflexive transitive closure (base)+
18 *
19 * @author Gabor Bergmann
20 *
21 */
22public class BinaryTransitiveClosure extends AbstractTransitiveClosure {
23
24 public BinaryTransitiveClosure(PBody pBody, Tuple variablesTuple,
25 PQuery pattern) {
26 super(pBody, variablesTuple, pattern);
27 }
28
29 @Override
30 protected String keyToString() {
31 return supplierKey.getFullyQualifiedName() + "+";
32 }
33}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/Connectivity.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/Connectivity.java
new file mode 100644
index 00000000..10da2e21
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/Connectivity.java
@@ -0,0 +1,11 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
7
8public enum Connectivity {
9 WEAK,
10 STRONG;
11}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/ConstantValue.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/ConstantValue.java
new file mode 100644
index 00000000..251146c8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/ConstantValue.java
@@ -0,0 +1,57 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
11
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.Map;
15import java.util.Set;
16
17import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
18import tools.refinery.viatra.runtime.matchers.psystem.KeyedEnumerablePConstraint;
19import tools.refinery.viatra.runtime.matchers.psystem.PBody;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
22
23/**
24 * @author Gabor Bergmann
25 *
26 */
27public class ConstantValue extends KeyedEnumerablePConstraint<Object> {
28
29 private PVariable variable;
30
31 public ConstantValue(PBody pBody, PVariable variable, Object value) {
32 super(pBody, Tuples.staticArityFlatTupleOf(variable), value);
33 this.variable = variable;
34 }
35
36 @Override
37 protected String keyToString() {
38 return supplierKey.toString();
39 }
40
41 /**
42 * @since 1.7
43 */
44 public PVariable getVariable() {
45 return variable;
46 }
47
48 @Override
49 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
50 final Map<Set<PVariable>, Set<PVariable>> result = new HashMap<Set<PVariable>, Set<PVariable>>();
51 final Set<PVariable> emptySet = Collections.emptySet(); // a constant value is functionally determined by everything
52 result.put(emptySet, Collections.singleton(getVariableInTuple(0)));
53 return result;
54 }
55
56
57}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/PositivePatternCall.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/PositivePatternCall.java
new file mode 100644
index 00000000..25ab34b4
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/PositivePatternCall.java
@@ -0,0 +1,76 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
11
12import java.util.HashSet;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.context.IInputKey;
16import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
17import tools.refinery.viatra.runtime.matchers.psystem.IQueryReference;
18import tools.refinery.viatra.runtime.matchers.psystem.ITypeInfoProviderConstraint;
19import tools.refinery.viatra.runtime.matchers.psystem.KeyedEnumerablePConstraint;
20import tools.refinery.viatra.runtime.matchers.psystem.PBody;
21import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
22import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
25
26/**
27 * @author Gabor Bergmann
28 *
29 */
30public class PositivePatternCall extends KeyedEnumerablePConstraint<PQuery> implements IQueryReference, ITypeInfoProviderConstraint {
31
32 public PositivePatternCall(PBody pBody, Tuple variablesTuple,
33 PQuery pattern) {
34 super(pBody, variablesTuple, pattern);
35 }
36
37 @Override
38 protected String keyToString() {
39 return supplierKey.getFullyQualifiedName();
40 }
41
42 // Note: #getFunctionalDependencies is intentionally not implemented - use QueryAnalyzer instead!
43// @Override
44// public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
45// return super.getFunctionalDependencies(context);
46// }
47
48 @Override
49 public PQuery getReferredQuery() {
50 return supplierKey;
51 }
52
53 @Override
54 public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context) {
55 return getTypesImpliedByCall(supplierKey, variablesTuple);
56 }
57
58 /**
59 * @since 1.3
60 */
61 public static Set<TypeJudgement> getTypesImpliedByCall(PQuery calledQuery, Tuple actualParametersTuple) {
62 Set<TypeJudgement> result = new HashSet<TypeJudgement>();
63 for (TypeJudgement parameterJudgement : calledQuery.getTypeGuarantees()) {
64 IInputKey inputKey = parameterJudgement.getInputKey();
65 Tuple judgementIndexTuple = parameterJudgement.getVariablesTuple();
66
67 Object[] judgementVariables = new Object[judgementIndexTuple.getSize()];
68 for (int i=0; i<judgementVariables.length; ++i)
69 judgementVariables[i] = actualParametersTuple.get((int) judgementIndexTuple.get(i));
70
71 result.add(new TypeJudgement(inputKey, Tuples.flatTupleOf(judgementVariables)));
72 }
73 return result;
74 }
75
76}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/RepresentativeElectionConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/RepresentativeElectionConstraint.java
new file mode 100644
index 00000000..b97ff55f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/RepresentativeElectionConstraint.java
@@ -0,0 +1,43 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
7
8import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
9import tools.refinery.viatra.runtime.matchers.psystem.*;
10import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
11import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
12
13import java.util.Set;
14
15public class RepresentativeElectionConstraint extends KeyedEnumerablePConstraint<PQuery>
16 implements IQueryReference, ITypeInfoProviderConstraint {
17 private final Connectivity connectivity;
18
19 public RepresentativeElectionConstraint(PBody pBody, Tuple variablesTuple, PQuery supplierKey,
20 Connectivity connectivity) {
21 super(pBody, variablesTuple, supplierKey);
22 this.connectivity = connectivity;
23 }
24
25 public Connectivity getConnectivity() {
26 return connectivity;
27 }
28
29 @Override
30 public PQuery getReferredQuery() {
31 return supplierKey;
32 }
33
34 @Override
35 public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context) {
36 return PositivePatternCall.getTypesImpliedByCall(supplierKey, variablesTuple);
37 }
38
39 @Override
40 protected String keyToString() {
41 return supplierKey.getFullyQualifiedName() + "#" + connectivity + "#representative";
42 }
43}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/TypeConstraint.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/TypeConstraint.java
new file mode 100644
index 00000000..2ca54cc0
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/basicenumerables/TypeConstraint.java
@@ -0,0 +1,79 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.basicenumerables;
10
11import java.util.Collections;
12import java.util.Map;
13import java.util.Set;
14
15import tools.refinery.viatra.runtime.matchers.context.IInputKey;
16import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
17import tools.refinery.viatra.runtime.matchers.psystem.ITypeConstraint;
18import tools.refinery.viatra.runtime.matchers.psystem.KeyedEnumerablePConstraint;
19import tools.refinery.viatra.runtime.matchers.psystem.PBody;
20import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
21import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
22import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
23
24/**
25 * Represents an enumerable type constraint that asserts that values substituted for the given tuple of variables
26 * form a tuple that belongs to an enumerable extensional relation identified by an {@link IInputKey}.
27 *
28 * <p> The InputKey must be enumerable!
29 *
30 * @author Zoltan Ujhelyi
31 *
32 */
33public class TypeConstraint extends KeyedEnumerablePConstraint<IInputKey> implements ITypeConstraint {
34
35 private TypeJudgement equivalentJudgement;
36
37 public TypeConstraint(PBody pBody, Tuple variablesTuple, IInputKey inputKey) {
38 super(pBody, variablesTuple, inputKey);
39 this.equivalentJudgement = new TypeJudgement(inputKey, variablesTuple);
40
41 if (! inputKey.isEnumerable())
42 throw new IllegalArgumentException(
43 this.getClass().getSimpleName() +
44 " applicable for enumerable input keys only; received instead " +
45 inputKey);
46 if (variablesTuple.getSize() != inputKey.getArity())
47 throw new IllegalArgumentException(
48 this.getClass().getSimpleName() +
49 " applied for variable tuple " + variablesTuple + " having wrong arity for input key " +
50 inputKey);
51 }
52
53 @Override
54 protected String keyToString() {
55 return supplierKey.getPrettyPrintableName();
56 }
57
58 @Override
59 public TypeJudgement getEquivalentJudgement() {
60 return equivalentJudgement;
61 }
62
63 @Override
64 public Set<TypeJudgement> getImpliedJudgements(IQueryMetaContext context) {
65 return Collections.singleton(equivalentJudgement);
66 //return equivalentJudgement.getDirectlyImpliedJudgements(context);
67 }
68
69 @Override
70 public Map<Set<PVariable>, Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context) {
71 return TypeConstraintUtil.getFunctionalDependencies(context, supplierKey, variablesTuple);
72 }
73
74 @Override
75 public void doReplaceVariable(PVariable obsolete, PVariable replacement) {
76 super.doReplaceVariable(obsolete, replacement);
77 this.equivalentJudgement = new TypeJudgement(getSupplierKey(), variablesTuple);
78 }
79} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/BasePQuery.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/BasePQuery.java
new file mode 100644
index 00000000..2c03a894
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/BasePQuery.java
@@ -0,0 +1,231 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import java.util.ArrayList;
12import java.util.Collections;
13import java.util.HashSet;
14import java.util.List;
15import java.util.Objects;
16import java.util.Optional;
17import java.util.Set;
18import java.util.stream.Collectors;
19import java.util.stream.Stream;
20
21import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
22import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendFactory;
23import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
24import tools.refinery.viatra.runtime.matchers.context.IInputKey;
25import tools.refinery.viatra.runtime.matchers.psystem.PBody;
26import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
27import tools.refinery.viatra.runtime.matchers.psystem.annotations.PAnnotation;
28import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
29import tools.refinery.viatra.runtime.matchers.util.Preconditions;
30
31/**
32 * Default implementation of PQuery.
33 *
34 * @author Bergmann Gabor
35 */
36public abstract class BasePQuery implements PQuery {
37
38 protected PQueryStatus status = PQueryStatus.UNINITIALIZED;
39 /**
40 * @since 2.0
41 */
42 protected final PVisibility visibility;
43 protected List<PProblem> pProblems = new ArrayList<PProblem>();
44 private List<PAnnotation> annotations = new ArrayList<PAnnotation>();
45 private QueryEvaluationHint evaluationHints = new QueryEvaluationHint(null, (IQueryBackendFactory)null);
46 PDisjunction canonicalDisjunction;
47 private List<String> parameterNames = null; // Lazy initialization
48
49 /** For traceability only. */
50 private List<Object> wrappingQuerySpecifications = new ArrayList<Object>(1);
51
52 @Override
53 public Integer getPositionOfParameter(String parameterName) {
54 ensureInitialized();
55 int index = getParameterNames().indexOf(parameterName);
56 return index != -1 ? index : null;
57 }
58
59 protected void setStatus(PQueryStatus newStatus) {
60 this.status = newStatus;
61 }
62
63 protected void addError(PProblem problem) {
64 status = PQueryStatus.ERROR;
65 pProblems.add(problem);
66 }
67
68 @Override
69 public PQueryStatus getStatus() {
70 return status;
71 }
72
73 @Override
74 public List<PProblem> getPProblems() {
75 return Collections.unmodifiableList(pProblems);
76 }
77
78 @Override
79 public boolean isMutable() {
80 return status.equals(PQueryStatus.UNINITIALIZED) || status.equals(PQueryStatus.INITIALIZING);
81 }
82
83 @Override
84 public void checkMutability() {
85 Preconditions.checkState(isMutable(), "Cannot edit query definition %s", getFullyQualifiedName());
86 }
87
88 /**
89 * @since 1.5
90 */
91 public void setEvaluationHints(QueryEvaluationHint hints) {
92 checkMutability();
93 this.evaluationHints = hints;
94 }
95
96 @Override
97 public QueryEvaluationHint getEvaluationHints() {
98 ensureInitialized();
99 return evaluationHints;
100 // TODO instead of field, compute something from annotations?
101 }
102
103 protected void addAnnotation(PAnnotation annotation) {
104 checkMutability();
105 annotations.add(annotation);
106 }
107
108 @Override
109 public List<PAnnotation> getAllAnnotations() {
110 ensureInitialized();
111 return new ArrayList<>(annotations);
112 }
113
114 private Stream<PAnnotation> getAnnotationStreamByName(final String name) {
115 ensureInitialized();
116 return annotations.stream().filter(Objects::nonNull).filter(annotation -> Objects.equals(name, annotation.getName()));
117 }
118
119 @Override
120 public List<PAnnotation> getAnnotationsByName(final String annotationName) {
121 return getAnnotationStreamByName(annotationName).collect(Collectors.toList());
122 }
123
124 @Override
125 public Optional<PAnnotation> getFirstAnnotationByName(String annotationName) {
126 return getAnnotationStreamByName(annotationName).findFirst();
127 }
128
129 @Override
130 public List<String> getParameterNames() {
131 ensureInitialized();
132 if (parameterNames == null) {
133 parameterNames = getParameters().stream().map(PParameter::getName).collect(Collectors.toList());
134 }
135 return parameterNames;
136 }
137
138 @Override
139 public Set<PQuery> getDirectReferredQueries() {
140 ensureInitialized();
141 return canonicalDisjunction.getDirectReferredQueries();
142 }
143
144 @Override
145 public Set<PQuery> getAllReferredQueries() {
146 ensureInitialized();
147 return canonicalDisjunction.getAllReferredQueries();
148 }
149
150
151 @Override
152 public List<Object> publishedAs() {
153 return wrappingQuerySpecifications;
154 }
155
156 @Override
157 public Set<TypeJudgement> getTypeGuarantees() {
158 ensureInitialized();
159 Set<TypeJudgement> result = new HashSet<TypeJudgement>();
160
161 List<PParameter> parameters = getParameters();
162 for (int i=0; i<parameters.size(); ++i) {
163 PParameter parameter = parameters.get(i);
164 IInputKey declaredUnaryType = parameter.getDeclaredUnaryType();
165 if (declaredUnaryType != null) {
166 result.add(new TypeJudgement(declaredUnaryType, Tuples.staticArityFlatTupleOf(i)));
167 }
168 }
169
170 return result;
171 }
172
173 /**
174 * @since 2.0
175 */
176 public BasePQuery(PVisibility visibility) {
177 super();
178 this.visibility = visibility;
179 }
180
181 @Override
182 public PDisjunction getDisjunctBodies() {
183 ensureInitialized();
184 Preconditions.checkState(!status.equals(PQueryStatus.ERROR), "Query %s contains errors.", getFullyQualifiedName());
185 return canonicalDisjunction;
186 }
187
188 @Override
189 public final void ensureInitialized() {
190 try {
191 if (status.equals(PQueryStatus.UNINITIALIZED)) {
192 setStatus(PQueryStatus.INITIALIZING);
193 setBodies(doGetContainedBodies());
194 setStatus(PQueryStatus.OK);
195 }
196 } catch (QueryInitializationException e) {
197 addError(new PProblem(e, e.getShortMessage()));
198 throw e;
199 }
200 }
201
202 protected final void setBodies(Set<PBody> bodies) {
203 canonicalDisjunction = new PDisjunction(this, bodies);
204 for (PBody body : canonicalDisjunction.getBodies()) {
205 body.setStatus(null);
206 }
207 setStatus(PQueryStatus.OK);
208 }
209
210 /**
211 * Creates and returns the bodies of the query. If recalled again, a new instance is created.
212 *
213 * @return
214 * @throws ViatraQueryRuntimeException
215 */
216 protected abstract Set<PBody> doGetContainedBodies();
217
218 @Override
219 public String toString() {
220 return String.format("PQuery<%s>=%s", getFullyQualifiedName(), super.toString());
221 }
222
223 /**
224 * @since 2.0
225 */
226 @Override
227 public PVisibility getVisibility() {
228 return visibility;
229 }
230
231} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PDisjunction.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PDisjunction.java
new file mode 100644
index 00000000..eae4eacf
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PDisjunction.java
@@ -0,0 +1,104 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import java.util.Collections;
12import java.util.LinkedHashSet;
13import java.util.Set;
14import java.util.stream.Collectors;
15
16import tools.refinery.viatra.runtime.matchers.psystem.PBody;
17
18/**
19 *
20 * A disjunction is a set of bodies representing separate conditions. A {@link PQuery} has a single, canonical
21 * PDisjunction, that can be replaced using rewriter
22 *
23 * @author Zoltan Ujhelyi
24 *
25 */
26public class PDisjunction {
27
28 private Set<PBody> bodies;
29 private PQuery query;
30
31 public PDisjunction(Set<PBody> bodies) {
32 this(bodies.iterator().next().getPattern(), bodies);
33 }
34
35 public PDisjunction(PQuery query, Set<PBody> bodies) {
36 super();
37 this.query = query;
38 this.bodies = Collections.unmodifiableSet(new LinkedHashSet<>(bodies));
39 this.bodies.forEach(body -> body.setContainerDisjunction(this));
40 }
41
42 /**
43 * Returns an immutable set of bodies that consists of this disjunction
44 *
45 * @return the bodies
46 */
47 public Set<PBody> getBodies() {
48 return bodies;
49 }
50
51 /**
52 * Returns the corresponding query specification. May be null if not set.
53 */
54 public PQuery getQuery() {
55 return query;
56 }
57
58 /**
59 * Returns all queries directly referred in the constraints. They are all required to evaluate this query
60 *
61 * @return a non-null, but possibly empty list of query definitions
62 */
63 public Set<PQuery> getDirectReferredQueries() {
64 return this.getBodies().stream().
65 flatMap(PQueries.directlyReferencedQueriesFunction()). // flatten stream of streams
66 collect(Collectors.toCollection(LinkedHashSet::new));
67 }
68
69 /**
70 * Returns all queries required to evaluate this query (transitively).
71 *
72 * @return a non-null, but possibly empty list of query definitions
73 */
74 public Set<PQuery> getAllReferredQueries() {
75 Set<PQuery> processedQueries = new LinkedHashSet<>();
76 processedQueries.add(this.getQuery());
77 Set<PQuery> foundQueries = getDirectReferredQueries();
78 Set<PQuery> newQueries = new LinkedHashSet<>(foundQueries);
79
80 while(!processedQueries.containsAll(newQueries)) {
81 PQuery query = newQueries.iterator().next();
82 processedQueries.add(query);
83 newQueries.remove(query);
84 Set<PQuery> referred = query.getDirectReferredQueries();
85 referred.removeAll(processedQueries);
86 foundQueries.addAll(referred);
87 newQueries.addAll(referred);
88 }
89 return foundQueries;
90 }
91
92 /**
93 * Decides whether a disjunction is mutable. A disjunction is mutable if all its contained bodies are mutable.
94 *
95 */
96 public boolean isMutable() {
97 for (PBody body : bodies) {
98 if (!body.isMutable()) {
99 return false;
100 }
101 }
102 return true;
103 }
104}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameter.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameter.java
new file mode 100644
index 00000000..07165aa2
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameter.java
@@ -0,0 +1,105 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import java.util.Objects;
12
13import tools.refinery.viatra.runtime.matchers.context.IInputKey;
14
15/**
16 * A descriptor for declared PQuery parameters. A parameter has a name, a declared type and a direction constraint
17 *
18 * @author Zoltan Ujhelyi
19 *
20 */
21public class PParameter {
22
23 private final String name;
24 private final String typeName;
25 private final IInputKey declaredUnaryType;
26 private final PParameterDirection direction;
27
28 public PParameter(String name) {
29 this(name, (String) null);
30 }
31
32 public PParameter(String name, String typeName) {
33 this(name, typeName, (IInputKey) null);
34 }
35
36 public PParameter(String name, String typeName, IInputKey declaredUnaryType) {
37 this(name, typeName, declaredUnaryType, PParameterDirection.INOUT);
38 }
39
40 /**
41 * @since 1.4
42 */
43 public PParameter(String name, String typeName, IInputKey declaredUnaryType, PParameterDirection direction) {
44 super();
45 this.name = name;
46 this.typeName = typeName;
47 this.declaredUnaryType = declaredUnaryType;
48 this.direction = direction;
49
50 if (declaredUnaryType != null && declaredUnaryType.getArity() != 1) {
51 throw new IllegalArgumentException(
52 "PParameter declared type must be unary instead of " + declaredUnaryType.getPrettyPrintableName());
53 }
54 }
55
56 /**
57 * @return the direction
58 * @since 1.4
59 */
60 public PParameterDirection getDirection() {
61 return direction;
62 }
63
64 /**
65 * @return the name of the parameter
66 */
67 public String getName() {
68 return name;
69 }
70
71 /**
72 * Returns a textual representation of the declared type of the parameter
73 *
74 * @return the type description, or null if not available
75 */
76 public String getTypeName() {
77 return typeName;
78 }
79
80 /**
81 * Yield an {@link IInputKey} representation of the type declared for this parameter.
82 *
83 * @return the unary type that was declared on this parameter in the query header, or null if not available
84 */
85 public IInputKey getDeclaredUnaryType() {
86 return declaredUnaryType;
87 }
88
89 @Override
90 public boolean equals(Object obj) {
91 if (obj instanceof PParameter) {
92 return Objects.equals(name, ((PParameter) obj).name)
93 && Objects.equals(typeName, ((PParameter) obj).typeName)
94 && Objects.equals(declaredUnaryType, ((PParameter) obj).declaredUnaryType)
95 && Objects.equals(direction, ((PParameter) obj).direction);
96 }
97 return false;
98 }
99
100 @Override
101 public int hashCode() {
102 return Objects.hash(name, typeName, declaredUnaryType);
103 }
104
105}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameterDirection.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameterDirection.java
new file mode 100644
index 00000000..c94d4797
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PParameterDirection.java
@@ -0,0 +1,35 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11/**
12 * Values of this enum describe a constraint to the calling of patterns regarding its parameters.
13 *
14 * @author Grill Balázs
15 * @since 1.4
16 *
17 */
18public enum PParameterDirection {
19
20 /**
21 * Default value, no additional constraint is applied
22 */
23 INOUT,
24
25 /**
26 * The parameters marked with this constraints shall be set to a value before calling the pattern
27 */
28 IN,
29
30 /**
31 * The parameters marked with this constraints shall not be set to a value before calling the pattern
32 */
33 OUT
34
35}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PProblem.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PProblem.java
new file mode 100644
index 00000000..1fe4f541
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PProblem.java
@@ -0,0 +1,68 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
12
13/**
14 * Represents an error that was detected while the {@link PQuery} object was built from a source.
15 * @author Bergmann Gabor
16 *
17 */
18public class PProblem {
19
20 private final String shortMessage;
21 private final String location;
22 private final Exception exception;
23
24 public PProblem(String shortMessage) {
25 this(null, shortMessage, null, null);
26 }
27 /**
28 * @since 2.0
29 */
30 public PProblem(String shortMessage, Integer line, Integer column) {
31 this(null, shortMessage, line, column);
32 }
33 public PProblem(QueryProcessingException exception) {
34 this(exception, exception.getShortMessage(), null, null);
35 }
36 public PProblem(Exception exception, String shortMessage) {
37 this(exception, shortMessage, null, null);
38 }
39
40 /**
41 * @since 2.0
42 */
43 public PProblem(Exception exception, String shortMessage, Integer line, Integer column) {
44 this.shortMessage = shortMessage;
45 this.exception = exception;
46 if (line == null) {
47 location = "Unspecified location";
48 } else if (column == null) {
49 location = String.format("Line %d", line);
50 } else {
51 location = String.format("Line %d Column %d", line, column);
52 }
53 }
54
55 public String getShortMessage() {
56 return shortMessage;
57 }
58 public Exception getException() {
59 return exception;
60 }
61 /**
62 * @since 2.0
63 */
64 public String getLocation() {
65 return location;
66 }
67
68}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueries.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueries.java
new file mode 100644
index 00000000..56f8ca76
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueries.java
@@ -0,0 +1,110 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import java.util.HashSet;
12import java.util.Set;
13import java.util.function.Function;
14import java.util.function.Predicate;
15import java.util.stream.Stream;
16
17import tools.refinery.viatra.runtime.matchers.context.IInputKey;
18import tools.refinery.viatra.runtime.matchers.psystem.IMultiQueryReference;
19import tools.refinery.viatra.runtime.matchers.psystem.ITypeConstraint;
20import tools.refinery.viatra.runtime.matchers.psystem.PBody;
21import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
22import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
23import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery.PQueryStatus;
24
25/**
26 * Utility class for using PQueries in functional/streaming collection operations effectively
27 *
28 * @author Zoltan Ujhelyi
29 *
30 */
31public final class PQueries {
32
33 /**
34 * Hidden constructor for utility class
35 */
36 private PQueries() {
37 }
38
39 /**
40 * Predicate checking for the status of selected queries
41 *
42 */
43 public static Predicate<PQuery> queryStatusPredicate(final PQueryStatus status) {
44 return query -> query.getStatus().equals(status);
45 }
46
47 /**
48 * Enumerates referred queries (without duplicates) for the given body
49 */
50 public static Function<PBody, Stream<PQuery>> directlyReferencedQueriesFunction() {
51 return body -> (body.getConstraintsOfType(IMultiQueryReference.class).stream()
52 .flatMap(e -> e.getReferredQueries().stream()).distinct());
53 }
54
55 /**
56 * Enumerates directly referred extensional relations (without duplicates) in the canonical form of the given query
57 *
58 * @param enumerablesOnly
59 * only enumerable type constraints are considered
60 * @since 2.0
61 */
62 public static Stream<IInputKey> directlyRequiredTypesOfQuery(PQuery query, boolean enumerablesOnly) {
63 return directlyRequiredTypesOfDisjunction(query.getDisjunctBodies(), enumerablesOnly);
64 }
65
66 /**
67 * Enumerates directly referred extensional relations (without duplicates) for the given formulation of a query.
68 *
69 * @param enumerablesOnly
70 * only enumerable type constraints are considered
71 * @since 2.0
72 */
73 public static Stream<IInputKey> directlyRequiredTypesOfDisjunction(PDisjunction disjunctBodies,
74 boolean enumerablesOnly) {
75 Class<? extends ITypeConstraint> filterClass = enumerablesOnly ? TypeConstraint.class : ITypeConstraint.class;
76 return disjunctBodies.getBodies().stream().flatMap(body -> body.getConstraintsOfType(filterClass).stream())
77 .map(constraint -> constraint.getEquivalentJudgement().getInputKey()).distinct();
78 }
79
80 /**
81 * @since 1.4
82 */
83 public static Predicate<PParameter> parameterDirectionPredicate(final PParameterDirection direction) {
84 return input -> input.getDirection() == direction;
85 }
86
87 /**
88 * Returns all {@link PTraceable}s contained in the given {@link PQuery}: itself, its bodies and their constraints.
89 *
90 * @since 1.6
91 */
92 public static Set<PTraceable> getTraceables(PQuery query) {
93 final Set<PTraceable> traceables = new HashSet<>();
94 traceables.add(query);
95 query.getDisjunctBodies().getBodies().forEach(body -> {
96 traceables.add(body);
97 body.getConstraints().forEach(traceables::add);
98 });
99 return traceables;
100 }
101
102 /**
103 * Calculates the simple name related from a given qualified name by finding the part after the last '.' character.
104 *
105 * @since 2.0
106 */
107 public static String calculateSimpleName(String qualifiedName) {
108 return qualifiedName.substring(qualifiedName.lastIndexOf('.') + 1);
109 }
110}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQuery.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQuery.java
new file mode 100644
index 00000000..a909c650
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQuery.java
@@ -0,0 +1,154 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import java.util.List;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException;
15import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend;
16import tools.refinery.viatra.runtime.matchers.backend.IQueryBackendHintProvider;
17import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint;
18import tools.refinery.viatra.runtime.matchers.psystem.PBody;
19import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
20import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
21
22/**
23 * Internal representation of a query / graph pattern (using a constraint system formalism),
24 * to be interpreted by a query evaluator ({@link IQueryBackend}).
25 * End-users of VIATRA Query should access a query as an IQuerySpecification instead.
26 *
27 * <p>
28 * PQuerys are definitions of queries usable inside pattern descriptions. Such description always has (a non-null) name. The query
29 * itself is defined as a (non-empty) set of {@link PBody} instances, the result is the disjunction of the single
30 * {@link PBody} instances. </p>
31 * <p>
32 * A PQuery might be constructed from erroneous patterns or might be uninitialized - this is represented by its status.
33 *
34 * @author Zoltan Ujhelyi
35 * @since 0.8.0
36 * @noimplement This interface is not intended to be implemented by clients. Use {@link BasePQuery} as a base class instead.
37 */
38public interface PQuery extends PQueryHeader, PTraceable {
39
40 // TODO rewritten as / rewritten from traceability to PDisjunction?
41
42 /**
43 * @author Zoltan Ujhelyi
44 *
45 */
46 public enum PQueryStatus {
47 /**
48 * Marks that the query definition is not initialized
49 */
50 UNINITIALIZED,
51 /**
52 * Marks that the query definition is being initialized
53 * @since 1.4
54 */
55 INITIALIZING,
56 /**
57 * The query definition was successfully initialized
58 */
59 OK,
60 /**
61 * The query definition was initialized, but some issues were present
62 */
63 WARNING,
64 /**
65 * The query definition was not successfully initialized because of an error
66 */
67 ERROR
68 }
69
70 /**
71 * Returns all bodies associated with the query in their canonical form. If called multiple times, the same set with
72 * the same contents will be returned.
73 *
74 */
75 PDisjunction getDisjunctBodies();
76
77 /**
78 * Returns all queries directly referred in the constraints. They are all required to evaluate this query
79 *
80 * @return a non-null, but possibly empty list of query definitions
81 */
82 Set<PQuery> getDirectReferredQueries();
83
84 /**
85 * Returns all queries required to evaluate this query (transitively).
86 *
87 * @return a non-null, but possibly empty list of query definitions
88 */
89 Set<PQuery> getAllReferredQueries();
90
91 /**
92 * Returns the initialization status of the definition
93 *
94 */
95 PQueryStatus getStatus();
96
97 /**
98 * Returns a list describing the problems that were found in this query.
99 *
100 * <p> TODO: formulate invariant connecting {@link #getPProblems()} and {@link #getStatus()}.
101 *
102 * @return a non-null, but possibly empty list of problems
103 */
104 List<PProblem> getPProblems();
105
106 /**
107 * Before a modification operation is executed, a mutability check is performed (via the {@link #getStatus()}
108 * implementation, and in case of problems an {@link IllegalStateException} is thrown.
109 */
110 void checkMutability();
111
112 /**
113 * An option to check mutability of the query. It can be used to avoid getting an {@link IllegalStateException} by
114 * the execution of {@link #checkMutability()}.
115 *
116 * @return true if the query specification is still editable
117 */
118 boolean isMutable();
119
120 /**
121 * Optional hints regarding the query evaluation strategy, to be interpreted by the query engine.
122 * <p> To ensure the possibility of external overrides,
123 * the evaluation engine should not directly consult this field,
124 * but use an {@link IQueryBackendHintProvider} instead.
125 */
126 public QueryEvaluationHint getEvaluationHints();
127
128
129 /**
130 * Type information, expressed on query parameters, that all matches of the query are guaranteed to respect.
131 * <p> At the very minimum, this should include the declared types of the parameters.
132 * <p> The type judgement tuples shall contain the <i>parameter index</i>, NOT the {@link PParameter} object.
133 *
134 * @return a non-null set of type judgements that the query guarantees for its matches
135 */
136 public Set<TypeJudgement> getTypeGuarantees();
137
138 /**
139 * If the query definition is uninitialized, initializes it.
140 * @throws ViatraQueryRuntimeException if initialization of query specification fails
141 */
142 public abstract void ensureInitialized();
143
144 /**
145 * Returns the end-user query specification API objects that wrap this query.
146 *
147 * <p> Intended for traceability and debug purposes, not part of normal operation.
148 * Returned list is intended to be appended during query specification construction time.
149 *
150 * @return a non-null, but possibly empty list of query specification objects;
151 */
152 List<Object> publishedAs();
153
154} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueryHeader.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueryHeader.java
new file mode 100644
index 00000000..f3671934
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PQueryHeader.java
@@ -0,0 +1,101 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import java.util.List;
12import java.util.Optional;
13
14import tools.refinery.viatra.runtime.matchers.psystem.annotations.PAnnotation;
15
16/**
17 * Represents header information (metainfo) about a query.
18 * <p> To be implemented both by IQuerySpecifications intended for end users,
19 * and the internal query representation {@link PQuery}.
20 *
21 *
22 * @author Bergmann Gabor
23 * @since 0.9
24 */
25public interface PQueryHeader {
26
27 /**
28 * Identifies the pattern for which matchers can be instantiated.
29 */
30 public String getFullyQualifiedName();
31
32 /**
33 * Return the list of parameter names
34 *
35 * @return a non-null, but possibly empty list of parameter names
36 */
37 public List<String> getParameterNames();
38
39 /**
40 * Returns a list of parameter descriptions
41 *
42 * @return a non-null, but possibly empty list of parameter descriptions
43 */
44 public List<PParameter> getParameters();
45
46 /**
47 * Returns the index of a named parameter
48 *
49 * @param parameterName
50 * @return the index, or null of no such parameter is available
51 */
52 public Integer getPositionOfParameter(String parameterName);
53
54 /**
55 * Returns a parameter by name if exists
56 * @since 2.1
57 */
58 default Optional<PParameter> getParameter(String parameterName) {
59 return Optional.ofNullable(getPositionOfParameter(parameterName))
60 .map(getParameters()::get);
61 }
62
63 /**
64 * Returns the list of annotations specified for this query
65 *
66 * @return a non-null, but possibly empty list of annotations
67 */
68 public List<PAnnotation> getAllAnnotations();
69
70 /**
71 * Returns the list of annotations with a specified name
72 *
73 * @param annotationName
74 * @return a non-null, but possibly empty list of annotations
75 */
76 public List<PAnnotation> getAnnotationsByName(String annotationName);
77
78 /**
79 * Returns the first annotation with a specified name
80 *
81 * @since 2.0
82 */
83 public Optional<PAnnotation> getFirstAnnotationByName(String annotationName);
84
85 /**
86 * Returns the visibility information about the query.
87 * @since 2.0
88 */
89 public PVisibility getVisibility();
90
91 /**
92 * Returns the non-qualified name of the query. By default this means returning the qualified name after the last
93 * '.' character.
94 *
95 * @since 2.0
96 */
97 public default String getSimpleName() {
98 return PQueries.calculateSimpleName(getFullyQualifiedName());
99 }
100
101} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PVisibility.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PVisibility.java
new file mode 100644
index 00000000..7cb312bd
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/PVisibility.java
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11/**
12 * @author Zoltan Ujhelyi
13 * @since 2.0
14 *
15 */
16public enum PVisibility {
17
18 /**
19 * A public (default) visibility means a pattern can be called at any time.
20 */
21 PUBLIC,
22 /**
23 * A private query is not expected to be called directly, only by a different query matcher.
24 */
25 PRIVATE,
26 /**
27 * A query that is only used inside a single caller query and is not visible outside its container query. Such
28 * patterns must also fulfill the following additional constraints:
29 *
30 * <ul>
31 * <li>An embedded query must have only a single body.</li>
32 * <li>An embedded query must not be recursice.</li>
33 * </ul>
34 */
35 EMBEDDED
36
37}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/QueryInitializationException.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/QueryInitializationException.java
new file mode 100644
index 00000000..470d7287
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/queries/QueryInitializationException.java
@@ -0,0 +1,35 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.queries;
10
11import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
12
13/**
14 * Represent an exception that occurred while initializing the specification of a query.
15 * @author Bergmann Gabor
16 * @since 0.9
17 *
18 */
19public class QueryInitializationException extends QueryProcessingException {
20
21 public QueryInitializationException(String message, String[] context, String shortMessage, Object patternDescription,
22 Throwable cause) {
23 super(message, context, shortMessage, patternDescription, cause);
24 }
25
26 public QueryInitializationException(String message, String[] context, String shortMessage, Object patternDescription) {
27 super(message, context, shortMessage, patternDescription);
28 }
29
30 private static final long serialVersionUID = 9106033062252951489L;
31
32
33
34
35}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/AbstractRewriterTraceSource.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/AbstractRewriterTraceSource.java
new file mode 100644
index 00000000..276b2b42
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/AbstractRewriterTraceSource.java
@@ -0,0 +1,53 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.Objects;
12
13import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
14import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
15
16/**
17 * @since 1.6
18 *
19 */
20public class AbstractRewriterTraceSource {
21
22 private IRewriterTraceCollector traceCollector = NopTraceCollector.INSTANCE;
23
24 public void setTraceCollector(IRewriterTraceCollector traceCollector) {
25 this.traceCollector = Objects.requireNonNull(traceCollector);
26 }
27
28 public IPTraceableTraceProvider getTraces() {
29 return traceCollector;
30 }
31
32 protected IRewriterTraceCollector getTraceCollector() {
33 return traceCollector;
34 }
35
36 /**
37 * Mark the given derivative to be originated from the given original constraint.
38 * @since 1.6
39 */
40 protected void addTrace(PTraceable original, PTraceable derivative){
41 traceCollector.addTrace(original, derivative);
42 }
43
44 /**
45 * Indicate that the given derivative is removed from the resulting query, thus its trace
46 * information should be removed also.
47 * @since 1.6
48 */
49 protected void derivativeRemoved(PConstraint derivative, IDerivativeModificationReason reason){
50 traceCollector.derivativeRemoved(derivative, reason);
51 }
52
53}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/ConstraintRemovalReason.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/ConstraintRemovalReason.java
new file mode 100644
index 00000000..237a762d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/ConstraintRemovalReason.java
@@ -0,0 +1,23 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11/**
12 * Common reasons for removing constraint through rewriters
13 *
14 * @noreference This enum is not intended to be referenced by clients.
15 */
16public enum ConstraintRemovalReason implements IDerivativeModificationReason {
17
18 MOOT_EQUALITY,
19 WEAK_INEQUALITY_SELF_LOOP,
20 TYPE_SUBSUMED,
21 DUPLICATE
22
23}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/DefaultFlattenCallPredicate.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/DefaultFlattenCallPredicate.java
new file mode 100644
index 00000000..3b5d7390
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/DefaultFlattenCallPredicate.java
@@ -0,0 +1,23 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
11
12/**
13 * @author Marton Bur
14 *
15 */
16public class DefaultFlattenCallPredicate implements IFlattenCallPredicate {
17
18 @Override
19 public boolean shouldFlatten(PositivePatternCall positivePatternCall) {
20 return true;
21 }
22
23}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/FlattenerCopier.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/FlattenerCopier.java
new file mode 100644
index 00000000..06b8d372
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/FlattenerCopier.java
@@ -0,0 +1,129 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.HashMap;
12import java.util.List;
13import java.util.Map;
14import java.util.Map.Entry;
15import java.util.Objects;
16import java.util.Set;
17import java.util.stream.Collectors;
18
19import tools.refinery.viatra.runtime.matchers.psystem.PBody;
20import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
21import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
22import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.Equality;
23import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
24import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
25import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
26import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
27import tools.refinery.viatra.runtime.matchers.util.Preconditions;
28
29/**
30 * This rewriter class can add new equality constraints to the copied body
31 *
32 * @author Marton Bur
33 *
34 */
35class FlattenerCopier extends PBodyCopier {
36
37 private final Map<PositivePatternCall, CallInformation> calls;
38
39 private static class CallInformation {
40 final PBody body;
41 final Map<PVariable, PVariable> variableMapping;
42
43 private CallInformation(PBody body) {
44 this.body = body;
45 this.variableMapping = new HashMap<>();
46 }
47 }
48
49 public FlattenerCopier(PQuery query, Map<PositivePatternCall, PBody> callsToFlatten) {
50 super(query);
51 this.calls = callsToFlatten.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> new CallInformation(entry.getValue())));
52 }
53
54 protected void copyVariable(PositivePatternCall contextPatternCall, PVariable variable, String newName) {
55 PVariable newPVariable = body.getOrCreateVariableByName(newName);
56 calls.get(contextPatternCall).variableMapping.put(variable, newPVariable);
57 variableMapping.put(variable, newPVariable);
58 }
59
60 /**
61 * Merge all variables and constraints from the body called through the given pattern call to a target body. If
62 * multiple bodies are merged into a single one, use the renamer and filter options to avoid collisions.
63 *
64 * @param sourceBody
65 * @param namingTool
66 * @param filter
67 */
68 public void mergeBody(PositivePatternCall contextPatternCall, IVariableRenamer namingTool,
69 IConstraintFilter filter) {
70
71 PBody sourceBody = calls.get(contextPatternCall).body;
72
73 // Copy variables
74 Set<PVariable> allVariables = sourceBody.getAllVariables();
75 for (PVariable pVariable : allVariables) {
76 if (pVariable.isUnique()) {
77 copyVariable(contextPatternCall, pVariable,
78 namingTool.createVariableName(pVariable, sourceBody.getPattern()));
79 }
80 }
81
82 // Copy constraints which are not filtered
83 Set<PConstraint> constraints = sourceBody.getConstraints();
84 for (PConstraint pConstraint : constraints) {
85 if (!(pConstraint instanceof ExportedParameter) && !filter.filter(pConstraint)) {
86 copyConstraint(pConstraint);
87 }
88 }
89 }
90
91 @Override
92 protected void copyPositivePatternCallConstraint(PositivePatternCall positivePatternCall) {
93
94 if (!calls.containsKey(positivePatternCall)) {
95 // If the call was not flattened, copy the constraint
96 super.copyPositivePatternCallConstraint(positivePatternCall);
97 } else {
98 PBody calledBody = Objects.requireNonNull(calls.get(positivePatternCall).body);
99 Preconditions.checkArgument(positivePatternCall.getReferredQuery().equals(calledBody.getPattern()));
100
101 List<PVariable> symbolicParameters = calledBody.getSymbolicParameterVariables();
102 Object[] elements = positivePatternCall.getVariablesTuple().getElements();
103 for (int i = 0; i < elements.length; i++) {
104 // Create equality constraints between the caller PositivePatternCall and the corresponding body
105 // parameter variables
106 createEqualityConstraint((PVariable) elements[i], symbolicParameters.get(i), positivePatternCall);
107 }
108
109 }
110 }
111
112 private void createEqualityConstraint(PVariable pVariable1, PVariable pVariable2,
113 PositivePatternCall contextPatternCall) {
114 PVariable who = variableMapping.get(pVariable1);
115 PVariable withWhom = calls.get(contextPatternCall).variableMapping.get(pVariable2);
116 addTrace(contextPatternCall, new Equality(body, who, withWhom));
117 }
118
119 @Override
120 protected void copyExpressionEvaluationConstraint(final ExpressionEvaluation expressionEvaluation) {
121 Map<PVariable, PVariable> variableMapping = this.variableMapping.entrySet().stream()
122 .filter(input -> expressionEvaluation.getPSystem().getAllVariables().contains(input.getKey()))
123 .collect(Collectors.toMap(Entry::getKey, Entry::getValue));
124
125 PVariable mappedOutputVariable = variableMapping.get(expressionEvaluation.getOutputVariable());
126 addTrace(expressionEvaluation, new ExpressionEvaluation(body, new VariableMappingExpressionEvaluatorWrapper(expressionEvaluation.getEvaluator(), variableMapping), mappedOutputVariable, expressionEvaluation.isUnwinding()));
127 }
128
129}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IConstraintFilter.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IConstraintFilter.java
new file mode 100644
index 00000000..518b9c64
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IConstraintFilter.java
@@ -0,0 +1,48 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Zoltan Ujhelyi, Marton Bur, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
12import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.ExportedParameter;
13
14/**
15 * Helper interface to exclude constraints from PBody copy processes
16 *
17 * @author Marton Bur
18 *
19 */
20public interface IConstraintFilter {
21 /**
22 * Returns true, if the given constraint should be filtered (thus should not be copied)
23 *
24 * @param constraint
25 * to check
26 * @return true, if the constraint should be filtered
27 */
28 boolean filter(PConstraint constraint);
29
30 public static class ExportedParameterFilter implements IConstraintFilter {
31
32 @Override
33 public boolean filter(PConstraint constraint) {
34 return constraint instanceof ExportedParameter;
35 }
36
37 }
38
39 public static class AllowAllFilter implements IConstraintFilter {
40
41 @Override
42 public boolean filter(PConstraint constraint) {
43 // Nothing is filtered
44 return false;
45 }
46
47 }
48} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IDerivativeModificationReason.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IDerivativeModificationReason.java
new file mode 100644
index 00000000..dbd6a78d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IDerivativeModificationReason.java
@@ -0,0 +1,19 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11/**
12 * This is a role indication interface, implementations may provide a reason about
13 * why a modification is made during PQuery normalization.
14 * @since 1.6
15 *
16 */
17public interface IDerivativeModificationReason {
18
19}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IFlattenCallPredicate.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IFlattenCallPredicate.java
new file mode 100644
index 00000000..7e224e98
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IFlattenCallPredicate.java
@@ -0,0 +1,50 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, Akos Horvath, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
12
13
14/**
15 * Interface used by the PQueryFlattener to decide which positive pattern calls to flatten
16 *
17 * @author Marton Bur
18 *
19 */
20public interface IFlattenCallPredicate {
21
22 /**
23 * Decides whether the called query by the pattern call should be flattened into the caller or not.
24 *
25 * @param positivePatternCall
26 * the pattern call
27 * @return true if the call should be flattened
28 */
29 boolean shouldFlatten(PositivePatternCall positivePatternCall);
30
31 /**
32 * Flattens only if all operand predicates vote for flattening.
33 * @author Gabor Bergmann
34 * @since 2.1
35 */
36 public static class And implements IFlattenCallPredicate {
37 private IFlattenCallPredicate[] operands;
38 public And(IFlattenCallPredicate... operands) {
39 this.operands = operands;
40 }
41
42 @Override
43 public boolean shouldFlatten(PositivePatternCall positivePatternCall) {
44 for (IFlattenCallPredicate operand : operands) {
45 if (!operand.shouldFlatten(positivePatternCall)) return false;
46 }
47 return true;
48 }
49 }
50}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IPTraceableTraceProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IPTraceableTraceProvider.java
new file mode 100644
index 00000000..84da4d1b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IPTraceableTraceProvider.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.stream.Stream;
12
13import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
15
16/**
17 * This interface provides methods to trace the {@link PTraceable}s of a transformed {@link PQuery} produced by
18 * a {@link PDisjunctionRewriter}. In case the associated rewriter is a composite (a.k.a. {@link PDisjunctionRewriterCacher}),
19 * this trace provider handles traces end-to-end, hiding all the intermediate transformation steps.
20 *
21 * @since 1.6
22 * @noimplement This interface is not intended to be implemented by clients.
23 */
24public interface IPTraceableTraceProvider {
25
26 /**
27 * Find and return the canonical {@link PTraceable}s in the original query which are the sources of the given derivative
28 * {@link PTraceable} according to the transformation.
29 *
30 * @param derivative a {@link PTraceable} which is contained by the {@link PQuery} produced by the associated rewriter
31 * @since 2.0
32 */
33 public Stream<PTraceable> getCanonicalTraceables(PTraceable derivative);
34
35 /**
36 * Find and return the {@link PTraceable}s in the rewritten query which are the destinations of the given source
37 * {@link PTraceable} according to the transformation.
38 *
39 * @param source a {@link PTraceable} which is contained by a {@link PQuery} before rewriting
40 * @since 2.0
41 */
42 public Stream<PTraceable> getRewrittenTraceables(PTraceable source);
43
44 /**
45 * Returns whether the given traceable element has been removed by every rewriter for a reason.
46 */
47 public boolean isRemoved(PTraceable traceable);
48
49 /**
50 * Returns the reasons for which the traceable element has been removed by the rewriters.
51 * @return the reasons of removal during rewriting
52 * @since 2.0
53 */
54 public Stream<IDerivativeModificationReason> getRemovalReasons(PTraceable traceable);
55}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IRewriterTraceCollector.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IRewriterTraceCollector.java
new file mode 100644
index 00000000..70771ea7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IRewriterTraceCollector.java
@@ -0,0 +1,33 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
12
13/**
14 * This is the internal API of {@link IPTraceableTraceProvider} expected to be used by
15 * copier and rewriter implementations.
16 *
17 * @since 1.6
18 * @noreference This interface is not intended to be referenced by clients.
19 */
20public interface IRewriterTraceCollector extends IPTraceableTraceProvider {
21
22 /**
23 * Mark the given derivative to be originated from the given original constraint.
24 */
25 public void addTrace(PTraceable origin, PTraceable derivative);
26
27 /**
28 * Indicate that the given derivative is removed from the resulting query, thus its trace
29 * information should be removed also.
30 */
31 public void derivativeRemoved(PTraceable derivative, IDerivativeModificationReason reason);
32
33}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IVariableRenamer.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IVariableRenamer.java
new file mode 100644
index 00000000..ce446e0d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/IVariableRenamer.java
@@ -0,0 +1,59 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Zoltan Ujhelyi, Marton Bur, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
12import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
13
14/**
15 * Helper interface to ease the naming of the new variables during flattening
16 *
17 * @author Marton Bur
18 *
19 */
20public interface IVariableRenamer {
21 /**
22 * Creates a variable name based on a given variable and a given query. It only creates a String, doesn't set
23 * anything.
24 *
25 * @param pVariable
26 * @param query
27 * @return the new variable name as a String
28 */
29 String createVariableName(PVariable pVariable, PQuery query);
30
31 public class SameName implements IVariableRenamer {
32 @Override
33 public String createVariableName(PVariable pVariable, PQuery query) {
34 return pVariable.getName();
35 }
36 }
37
38 public class HierarchicalName implements IVariableRenamer {
39
40 private int callCount;
41
42 public void setCallCount(int callCount) {
43 this.callCount = callCount;
44 }
45
46 @Override
47 public String createVariableName(PVariable pVariable, PQuery query) {
48 // make sure to keep the "_" prefix before anonymous variables
49 String newVarName = getShortName(query) + "<" + callCount + ">" + "_" + pVariable.getName();
50 return pVariable.getName().startsWith("_") ? "_" + newVarName : newVarName ;
51 }
52
53 private String getShortName(PQuery query) {
54 String fullyQualifiedName = query.getFullyQualifiedName();
55 int beginIndex = fullyQualifiedName.lastIndexOf('.') + 1;
56 return fullyQualifiedName.substring(beginIndex);
57 }
58 }
59} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/MappingTraceCollector.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/MappingTraceCollector.java
new file mode 100644
index 00000000..7429fc60
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/MappingTraceCollector.java
@@ -0,0 +1,135 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.Collections;
12import java.util.HashMap;
13import java.util.HashSet;
14import java.util.LinkedList;
15import java.util.Map;
16import java.util.Queue;
17import java.util.Set;
18import java.util.function.Predicate;
19import java.util.stream.Stream;
20
21import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
22import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
23import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
24import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
25import tools.refinery.viatra.runtime.matchers.util.IMemoryView;
26import tools.refinery.viatra.runtime.matchers.util.IMultiLookup;
27import tools.refinery.viatra.runtime.matchers.util.Preconditions;
28
29/**
30 * Multimap-based implementation to contain and query traces
31 *
32 * @since 1.6
33 *
34 */
35public class MappingTraceCollector implements IRewriterTraceCollector {
36
37 /**
38 * Traces from derivative to original
39 */
40 private final IMultiLookup<PTraceable, PTraceable> traces = CollectionsFactory.createMultiLookup(Object.class, MemoryType.SETS, Object.class);
41
42 /**
43 * Traces from original to derivative
44 */
45 private final IMultiLookup<PTraceable, PTraceable> inverseTraces = CollectionsFactory.createMultiLookup(Object.class, MemoryType.SETS, Object.class);
46
47 /**
48 * Reasons for removing {@link PTraceable}s
49 */
50 private final Map<PTraceable, IDerivativeModificationReason> removals = new HashMap<>();
51
52 /**
53 * Decides whether {@link PTraceable} is removed
54 */
55 private final Predicate<PTraceable> removed = removals::containsKey;
56
57 /**
58 * @since 2.0
59 */
60 @Override
61 public Stream<PTraceable> getCanonicalTraceables(PTraceable derivative) {
62 return findTraceEnds(derivative, traces).stream();
63 }
64
65 /**
66 * @since 2.0
67 */
68 @Override
69 public Stream<PTraceable> getRewrittenTraceables(PTraceable source) {
70 return findTraceEnds(source, inverseTraces).stream();
71 }
72
73 /**
74 * Returns the end of trace chains starting from the given {@link PTraceable} along the given trace edges.
75 */
76 private Set<PTraceable> findTraceEnds(PTraceable traceable, IMultiLookup<PTraceable, PTraceable> traceRecords) {
77 if (traceable instanceof PQuery) { // PQueries are preserved
78 return Collections.singleton(traceable);
79 }
80 Set<PTraceable> visited = new HashSet<>();
81 Set<PTraceable> result = new HashSet<>();
82 Queue<PTraceable> queue = new LinkedList<>();
83 queue.add(traceable);
84 while(!queue.isEmpty()){
85 PTraceable aDerivative = queue.poll();
86 // Track visited elements to avoid infinite loop via directed cycles in traces
87 visited.add(aDerivative);
88 IMemoryView<PTraceable> nextOrigins = traceRecords.lookup(aDerivative);
89 if (nextOrigins == null){
90 // End of trace chain
91 result.add(aDerivative);
92 } else {
93 // Follow traces
94 for(PTraceable nextOrigin : nextOrigins){
95 if (!visited.contains(nextOrigin)){
96 queue.add(nextOrigin);
97 }
98 }
99 }
100 }
101 return result;
102 }
103
104 @Override
105 public void addTrace(PTraceable original, PTraceable derivative){
106 traces.addPairOrNop(derivative, original);
107 inverseTraces.addPairOrNop(original, derivative);
108 // Even if this element was marked as removed earlier, now we replace it with another constraint!
109 removals.remove(original);
110 }
111
112 @Override
113 public void derivativeRemoved(PTraceable derivative, IDerivativeModificationReason reason){
114 Preconditions.checkState(!removals.containsKey(derivative), "Traceable %s removed multiple times", derivative);
115 // XXX the derivative must not be removed from the trace chain, as some rewriters, e.g. the normalizer keeps trace links to deleted elements
116 if (!inverseTraces.lookupExists(derivative)) {
117 // If there already exists a trace link, this removal means an update
118 removals.put(derivative, reason);
119 }
120 }
121
122 @Override
123 public boolean isRemoved(PTraceable traceable) {
124 return getRewrittenTraceables(traceable).allMatch(removed);
125 }
126
127 /**
128 * @since 2.0
129 */
130 @Override
131 public Stream<IDerivativeModificationReason> getRemovalReasons(PTraceable traceable) {
132 return getRewrittenTraceables(traceable).filter(removed).map(removals::get);
133 }
134
135}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NeverFlattenCallPredicate.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NeverFlattenCallPredicate.java
new file mode 100644
index 00000000..96c0b205
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NeverFlattenCallPredicate.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
12
13/**
14 * @author Grill Balázs
15 * @since 1.4
16 *
17 */
18public class NeverFlattenCallPredicate implements IFlattenCallPredicate {
19
20
21 @Override
22 public boolean shouldFlatten(PositivePatternCall positivePatternCall) {
23 return false;
24 }
25
26}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NopTraceCollector.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NopTraceCollector.java
new file mode 100644
index 00000000..15cf577e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/NopTraceCollector.java
@@ -0,0 +1,68 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.stream.Stream;
12
13import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
14
15/**
16 * This implementation does not store any traces and scales to NOP for every traceability feature.
17 * @since 1.6
18 *
19 */
20public class NopTraceCollector implements IRewriterTraceCollector {
21
22 public static final IRewriterTraceCollector INSTANCE = new NopTraceCollector();
23
24 private NopTraceCollector() {
25 // Private constructor to force using the common instance
26 }
27
28 /**
29 * @since 2.0
30 */
31 @Override
32 public Stream<PTraceable> getCanonicalTraceables(PTraceable derivative) {
33 return Stream.empty();
34 }
35
36 /**
37 * @since 2.0
38 */
39 @Override
40 public Stream<PTraceable> getRewrittenTraceables(PTraceable source) {
41 return Stream.empty();
42 }
43
44
45 @Override
46 public void addTrace(PTraceable origin, PTraceable derivative) {
47 // ignored
48 }
49
50 @Override
51 public void derivativeRemoved(PTraceable derivative, IDerivativeModificationReason reason) {
52 // ignored
53 }
54
55 @Override
56 public boolean isRemoved(PTraceable traceable) {
57 return false;
58 }
59
60 /**
61 * @since 2.0
62 */
63 @Override
64 public Stream<IDerivativeModificationReason> getRemovalReasons(PTraceable traceable) {
65 return Stream.empty();
66 }
67
68}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyCopier.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyCopier.java
new file mode 100644
index 00000000..10ab19c8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyCopier.java
@@ -0,0 +1,307 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-v20.html.
7 *
8 * SPDX-License-Identifier: EPL-2.0
9 *******************************************************************************/
10package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
11
12import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
13import tools.refinery.viatra.runtime.matchers.psystem.EnumerablePConstraint;
14import tools.refinery.viatra.runtime.matchers.psystem.PBody;
15import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
16import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
17import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.*;
18import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.*;
19import tools.refinery.viatra.runtime.matchers.psystem.queries.PParameter;
20import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
21import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IConstraintFilter.AllowAllFilter;
22import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IVariableRenamer.SameName;
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
25
26import java.util.*;
27import java.util.stream.Collectors;
28
29/**
30 * This class can create a new PBody for a PQuery. The result body contains a copy of given variables and constraints.
31 *
32 * @author Marton Bur
33 *
34 */
35public class PBodyCopier extends AbstractRewriterTraceSource {
36
37 /**
38 * The created body
39 */
40 protected PBody body;
41 /**
42 * Mapping between the original and the copied variables
43 */
44 protected Map<PVariable, PVariable> variableMapping = new HashMap<>();
45
46 public Map<PVariable, PVariable> getVariableMapping() {
47 return variableMapping;
48 }
49
50 /**
51 * @since 1.6
52 */
53 public PBodyCopier(PBody body, IRewriterTraceCollector traceCollector) {
54 this.body = new PBody(body.getPattern());
55 setTraceCollector(traceCollector);
56
57 // do the actual copying
58 mergeBody(body);
59 }
60
61 /**
62 * @since 1.6
63 */
64 public PBodyCopier(PQuery query) {
65 this.body = new PBody(query);
66 }
67
68 public void mergeBody(PBody sourceBody) {
69 mergeBody(sourceBody, new SameName(), new AllowAllFilter());
70 }
71
72 /**
73 * Merge all variables and constraints from a source body to a target body. If multiple bodies are merged into a
74 * single one, use the renamer and filter options to avoid collisions.
75 */
76 public void mergeBody(PBody sourceBody, IVariableRenamer namingTool, IConstraintFilter filter) {
77
78 // Copy variables
79 Set<PVariable> allVariables = sourceBody.getAllVariables();
80 for (PVariable pVariable : allVariables) {
81 if (pVariable.isUnique()) {
82 copyVariable(pVariable, namingTool.createVariableName(pVariable, sourceBody.getPattern()));
83 }
84 }
85
86 // Copy exported parameters
87 this.body.setSymbolicParameters(sourceBody.getSymbolicParameters().stream()
88 .map(this::copyExportedParameterConstraint).collect(Collectors.toList()));
89
90 // Copy constraints which are not filtered
91 Set<PConstraint> constraints = sourceBody.getConstraints();
92 for (PConstraint pConstraint : constraints) {
93 if (!(pConstraint instanceof ExportedParameter) && !filter.filter(pConstraint)) {
94 copyConstraint(pConstraint);
95 }
96 }
97
98 // Add trace between original and copied body
99 addTrace(sourceBody, body);
100 }
101
102 protected void copyVariable(PVariable variable, String newName) {
103 PVariable newPVariable = body.getOrCreateVariableByName(newName);
104 variableMapping.put(variable, newPVariable);
105 }
106
107 /**
108 * Returns the body with the copied variables and constraints. The returned body is still uninitialized.
109 */
110 public PBody getCopiedBody() {
111 return body;
112 }
113
114 protected void copyConstraint(PConstraint constraint) {
115 if (constraint instanceof ExportedParameter) {
116 copyExportedParameterConstraint((ExportedParameter) constraint);
117 } else if (constraint instanceof Equality) {
118 copyEqualityConstraint((Equality) constraint);
119 } else if (constraint instanceof Inequality) {
120 copyInequalityConstraint((Inequality) constraint);
121 } else if (constraint instanceof TypeConstraint) {
122 copyTypeConstraint((TypeConstraint) constraint);
123 } else if (constraint instanceof TypeFilterConstraint) {
124 copyTypeFilterConstraint((TypeFilterConstraint) constraint);
125 } else if (constraint instanceof ConstantValue) {
126 copyConstantValueConstraint((ConstantValue) constraint);
127 } else if (constraint instanceof PositivePatternCall) {
128 copyPositivePatternCallConstraint((PositivePatternCall) constraint);
129 } else if (constraint instanceof NegativePatternCall) {
130 copyNegativePatternCallConstraint((NegativePatternCall) constraint);
131 } else if (constraint instanceof BinaryTransitiveClosure) {
132 copyBinaryTransitiveClosureConstraint((BinaryTransitiveClosure) constraint);
133 } else if (constraint instanceof RepresentativeElectionConstraint) {
134 copyRepresentativeElectionConstraint((RepresentativeElectionConstraint) constraint);
135 } else if (constraint instanceof RelationEvaluation) {
136 copyRelationEvaluationConstraint((RelationEvaluation) constraint);
137 } else if (constraint instanceof BinaryReflexiveTransitiveClosure) {
138 copyBinaryReflexiveTransitiveClosureConstraint((BinaryReflexiveTransitiveClosure) constraint);
139 } else if (constraint instanceof PatternMatchCounter) {
140 copyPatternMatchCounterConstraint((PatternMatchCounter) constraint);
141 } else if (constraint instanceof AggregatorConstraint) {
142 copyAggregatorConstraint((AggregatorConstraint) constraint);
143 } else if (constraint instanceof ExpressionEvaluation) {
144 copyExpressionEvaluationConstraint((ExpressionEvaluation) constraint);
145 } else {
146 throw new QueryProcessingException("Unknown PConstraint {0} encountered while copying PBody",
147 new String[] { constraint.getClass().getName() }, "Unknown PConstraint", body.getPattern());
148 }
149 }
150
151 protected ExportedParameter copyExportedParameterConstraint(ExportedParameter exportedParameter) {
152 PVariable mappedPVariable = variableMapping.get(exportedParameter.getParameterVariable());
153 PParameter parameter = exportedParameter.getPatternParameter();
154 ExportedParameter newExportedParameter;
155 newExportedParameter = new ExportedParameter(body, mappedPVariable, parameter);
156 body.getSymbolicParameters().add(newExportedParameter);
157 addTrace(exportedParameter, newExportedParameter);
158 return newExportedParameter;
159 }
160
161 protected void copyEqualityConstraint(Equality equality) {
162 PVariable who = equality.getWho();
163 PVariable withWhom = equality.getWithWhom();
164 addTrace(equality, new Equality(body, variableMapping.get(who), variableMapping.get(withWhom)));
165 }
166
167 protected void copyInequalityConstraint(Inequality inequality) {
168 PVariable who = inequality.getWho();
169 PVariable withWhom = inequality.getWithWhom();
170 addTrace(inequality, new Inequality(body, variableMapping.get(who), variableMapping.get(withWhom)));
171 }
172
173 protected void copyTypeConstraint(TypeConstraint typeConstraint) {
174 PVariable[] mappedVariables = extractMappedVariables(typeConstraint);
175 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
176 addTrace(typeConstraint, new TypeConstraint(body, variablesTuple, typeConstraint.getSupplierKey()));
177 }
178
179 protected void copyTypeFilterConstraint(TypeFilterConstraint typeConstraint) {
180 PVariable[] mappedVariables = extractMappedVariables(typeConstraint);
181 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
182 addTrace(typeConstraint, new TypeFilterConstraint(body, variablesTuple, typeConstraint.getInputKey()));
183 }
184
185 protected void copyConstantValueConstraint(ConstantValue constantValue) {
186 PVariable pVariable = (PVariable) constantValue.getVariablesTuple().getElements()[0];
187 addTrace(constantValue,
188 new ConstantValue(body, variableMapping.get(pVariable), constantValue.getSupplierKey()));
189 }
190
191 protected void copyPositivePatternCallConstraint(PositivePatternCall positivePatternCall) {
192 PVariable[] mappedVariables = extractMappedVariables(positivePatternCall);
193 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
194 addTrace(positivePatternCall,
195 new PositivePatternCall(body, variablesTuple, positivePatternCall.getReferredQuery()));
196 }
197
198 protected void copyNegativePatternCallConstraint(NegativePatternCall negativePatternCall) {
199 PVariable[] mappedVariables = extractMappedVariables(negativePatternCall);
200 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
201 addTrace(negativePatternCall,
202 new NegativePatternCall(body, variablesTuple, negativePatternCall.getReferredQuery()));
203 }
204
205 protected void copyBinaryTransitiveClosureConstraint(BinaryTransitiveClosure binaryTransitiveClosure) {
206 PVariable[] mappedVariables = extractMappedVariables(binaryTransitiveClosure);
207 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
208 addTrace(binaryTransitiveClosure,
209 new BinaryTransitiveClosure(body, variablesTuple, binaryTransitiveClosure.getReferredQuery()));
210 }
211
212 protected void copyRepresentativeElectionConstraint(RepresentativeElectionConstraint constraint) {
213 var mappedVariables = extractMappedVariables(constraint);
214 var variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
215 addTrace(constraint, new RepresentativeElectionConstraint(body, variablesTuple, constraint.getReferredQuery(),
216 constraint.getConnectivity()));
217 }
218
219 /**
220 * @since 2.8
221 */
222 protected void copyRelationEvaluationConstraint(RelationEvaluation relationEvaluation) {
223 PVariable[] mappedVariables = extractMappedVariables(relationEvaluation);
224 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
225 addTrace(relationEvaluation, new RelationEvaluation(body, variablesTuple, relationEvaluation.getReferredQueries(),
226 relationEvaluation.getEvaluator()));
227 }
228
229 /**
230 * @since 2.0
231 */
232 protected void copyBinaryReflexiveTransitiveClosureConstraint(
233 BinaryReflexiveTransitiveClosure binaryReflexiveTransitiveClosure) {
234 PVariable[] mappedVariables = extractMappedVariables(binaryReflexiveTransitiveClosure);
235 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
236 addTrace(binaryReflexiveTransitiveClosure,
237 new BinaryReflexiveTransitiveClosure(body, variablesTuple,
238 binaryReflexiveTransitiveClosure.getReferredQuery(),
239 binaryReflexiveTransitiveClosure.getUniverseType()));
240 }
241
242 protected void copyPatternMatchCounterConstraint(PatternMatchCounter patternMatchCounter) {
243 PVariable[] mappedVariables = extractMappedVariables(patternMatchCounter);
244 PVariable mappedResultVariable = variableMapping.get(patternMatchCounter.getResultVariable());
245 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
246 addTrace(patternMatchCounter, new PatternMatchCounter(body, variablesTuple,
247 patternMatchCounter.getReferredQuery(), mappedResultVariable));
248 }
249
250 /**
251 * @since 1.4
252 */
253 protected void copyAggregatorConstraint(AggregatorConstraint constraint) {
254 PVariable[] mappedVariables = extractMappedVariables(constraint);
255 PVariable mappedResultVariable = variableMapping.get(constraint.getResultVariable());
256 Tuple variablesTuple = Tuples.flatTupleOf((Object[]) mappedVariables);
257 addTrace(constraint, new AggregatorConstraint(constraint.getAggregator(), body, variablesTuple,
258 constraint.getReferredQuery(), mappedResultVariable, constraint.getAggregatedColumn()));
259 }
260
261 protected void copyExpressionEvaluationConstraint(ExpressionEvaluation expressionEvaluation) {
262 PVariable mappedOutputVariable = variableMapping.get(expressionEvaluation.getOutputVariable());
263 addTrace(expressionEvaluation, new ExpressionEvaluation(body,
264 new VariableMappingExpressionEvaluatorWrapper(expressionEvaluation.getEvaluator(), variableMapping),
265 mappedOutputVariable, expressionEvaluation.isUnwinding()));
266 }
267
268 /**
269 * For positive pattern calls
270 *
271 * @param positivePatternCall
272 * @return the mapped variables to the pattern's parameters
273 */
274 protected PVariable[] extractMappedVariables(EnumerablePConstraint enumerablePConstraint) {
275 Object[] pVariables = enumerablePConstraint.getVariablesTuple().getElements();
276 return mapVariableList(pVariables);
277 }
278
279 /**
280 * For negative and count pattern calls.
281 *
282 * @param patternMatchCounter
283 * @return the mapped variables to the pattern's parameters
284 */
285 private PVariable[] extractMappedVariables(PatternCallBasedDeferred patternCallBasedDeferred) {
286 Object[] pVariables = patternCallBasedDeferred.getActualParametersTuple().getElements();
287 return mapVariableList(pVariables);
288 }
289
290 /**
291 * For type filters.
292 */
293 private PVariable[] extractMappedVariables(TypeFilterConstraint typeFilterConstraint) {
294 Object[] pVariables = typeFilterConstraint.getVariablesTuple().getElements();
295 return mapVariableList(pVariables);
296 }
297
298 private PVariable[] mapVariableList(Object[] pVariables) {
299 List<PVariable> list = new ArrayList<PVariable>();
300 for (int i = 0; i < pVariables.length; i++) {
301 PVariable mappedVariable = variableMapping.get(pVariables[i]);
302 list.add(mappedVariable);
303 }
304 return list.toArray(new PVariable[0]);
305 }
306
307}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyNormalizer.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyNormalizer.java
new file mode 100644
index 00000000..90943129
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PBodyNormalizer.java
@@ -0,0 +1,310 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
11
12import java.util.ArrayList;
13import java.util.Collection;
14import java.util.Collections;
15import java.util.Comparator;
16import java.util.HashMap;
17import java.util.HashSet;
18import java.util.Iterator;
19import java.util.LinkedHashSet;
20import java.util.LinkedList;
21import java.util.List;
22import java.util.Map;
23import java.util.Queue;
24import java.util.Set;
25
26import tools.refinery.viatra.runtime.matchers.context.IInputKey;
27import tools.refinery.viatra.runtime.matchers.context.IQueryMetaContext;
28import tools.refinery.viatra.runtime.matchers.planning.QueryProcessingException;
29import tools.refinery.viatra.runtime.matchers.planning.helpers.TypeHelper;
30import tools.refinery.viatra.runtime.matchers.psystem.ITypeConstraint;
31import tools.refinery.viatra.runtime.matchers.psystem.ITypeInfoProviderConstraint;
32import tools.refinery.viatra.runtime.matchers.psystem.PBody;
33import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
34import tools.refinery.viatra.runtime.matchers.psystem.TypeJudgement;
35import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.Equality;
36import tools.refinery.viatra.runtime.matchers.psystem.basicdeferred.Inequality;
37import tools.refinery.viatra.runtime.matchers.psystem.queries.PDisjunction;
38import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
39import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery.PQueryStatus;
40import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory;
41
42/**
43 * A disjunction rewriter for creating a normalized form of specification, unifying variables and running basic sanity
44 * checks. This rewriter does not copy but modifies directly the original specification, requiring a mutable
45 * disjunction.
46 *
47 * @author Gabor Bergmann
48 *
49 */
50public class PBodyNormalizer extends PDisjunctionRewriter {
51
52 private IQueryMetaContext context;
53
54 public PBodyNormalizer(IQueryMetaContext context) {
55 this.context = context;
56 }
57
58 /**
59 * Returns whether unary constraint elimination is enabled. This behavior can be customized by creating a subclass
60 * with a custom implementation.
61 *
62 * @since 1.6
63 */
64 protected boolean shouldCalculateImpliedTypes(PQuery query) {
65 return true;
66 }
67
68 /**
69 * Returns whether 'weakened alternative' suggestions of the context shall be expanded as additional PConstraints.
70 * This behavior can be customized by creating a subclass
71 * with a custom implementation.
72 *
73 * @since 1.6
74 */
75 protected boolean shouldExpandWeakenedAlternatives(PQuery query) {
76 return false;
77 }
78
79 @Override
80 public PDisjunction rewrite(PDisjunction disjunction) {
81 Set<PBody> normalizedBodies = new LinkedHashSet<>();
82 for (PBody body : disjunction.getBodies()) {
83 PBodyCopier copier = new PBodyCopier(body, getTraceCollector());
84 PBody modifiedBody = copier.getCopiedBody();
85 normalizeBody(modifiedBody);
86 normalizedBodies.add(modifiedBody);
87 modifiedBody.setStatus(PQueryStatus.OK);
88 }
89 return new PDisjunction(normalizedBodies);
90 }
91
92 public void setContext(IQueryMetaContext context) {
93 this.context = context;
94 }
95
96 /**
97 * Provides a normalized version of the pattern body. May return a different version than the original version if
98 * needed.
99 *
100 * @param body
101 */
102 public PBody normalizeBody(PBody body) {
103 try {
104 return normalizeBodyInternal(body);
105 } catch (QueryProcessingException e) {
106 throw new RewriterException("Error during rewriting: {1}", new String[] { e.getMessage() },
107 e.getShortMessage(), body.getPattern(), e);
108 }
109 }
110
111 PBody normalizeBodyInternal(PBody body) {
112 // UNIFICATION AND WEAK INEQUALITY ELIMINATION
113 unifyVariablesAlongEqualities(body);
114 eliminateWeakInequalities(body);
115 removeMootEqualities(body);
116
117 // ADDING WEAKENED ALTERNATIVES
118 if (shouldExpandWeakenedAlternatives(body.getPattern())) {
119 expandWeakenedAlternativeConstraints(body);
120 }
121
122 // CONSTRAINT ELIMINATION WITH TYPE INFERENCE
123 if (shouldCalculateImpliedTypes(body.getPattern())) {
124 eliminateInferrableTypes(body, context);
125 } else {
126 // ELIMINATE DUPLICATE TYPE CONSTRAINTS
127 eliminateDuplicateTypeConstraints(body);
128 }
129
130
131 // PREVENTIVE CHECKS
132 checkSanity(body);
133 return body;
134 }
135
136 private void removeMootEqualities(PBody body) {
137 Set<Equality> equals = body.getConstraintsOfType(Equality.class);
138 for (Equality equality : equals) {
139 if (equality.isMoot()) {
140 equality.delete();
141 derivativeRemoved(equality, ConstraintRemovalReason.MOOT_EQUALITY);
142 }
143 }
144 }
145
146 /**
147 * Unifies allVariables along equalities so that they can be handled as one.
148 *
149 * @param body
150 */
151 void unifyVariablesAlongEqualities(PBody body) {
152 Set<Equality> equals = body.getConstraintsOfType(Equality.class);
153 for (Equality equality : equals) {
154 if (!equality.isMoot()) {
155 equality.getWho().unifyInto(equality.getWithWhom());
156 }
157 }
158 }
159
160 /**
161 * Eliminates weak inequalities if they are not substantiated.
162 *
163 * @param body
164 */
165 void eliminateWeakInequalities(PBody body) {
166 for (Inequality inequality : body.getConstraintsOfType(Inequality.class)){
167 if (inequality.isEliminable()){
168 inequality.eliminateWeak();
169 derivativeRemoved(inequality, ConstraintRemovalReason.WEAK_INEQUALITY_SELF_LOOP);
170 }
171 }
172 }
173
174 /**
175 * Eliminates all type constraints that are inferrable from other constraints.
176 */
177 void eliminateInferrableTypes(final PBody body, IQueryMetaContext context) {
178 Set<TypeJudgement> subsumedByRetainedConstraints = new HashSet<TypeJudgement>();
179 LinkedList<ITypeConstraint> allTypeConstraints = new LinkedList<ITypeConstraint>();
180 for (PConstraint pConstraint : body.getConstraints()) {
181 if (pConstraint instanceof ITypeConstraint) {
182 allTypeConstraints.add((ITypeConstraint) pConstraint);
183 } else if (pConstraint instanceof ITypeInfoProviderConstraint) {
184 // non-type constraints are all retained
185 final Set<TypeJudgement> directJudgements = ((ITypeInfoProviderConstraint) pConstraint)
186 .getImpliedJudgements(context);
187 subsumedByRetainedConstraints = TypeHelper.typeClosure(subsumedByRetainedConstraints, directJudgements,
188 context);
189 }
190 }
191 Comparator<ITypeConstraint> eliminationOrder = (o1, o2) -> {
192 IInputKey type1 = o1.getEquivalentJudgement().getInputKey();
193 IInputKey type2 = o2.getEquivalentJudgement().getInputKey();
194
195 int result = context.getSuggestedEliminationOrdering().compare(type1, type2);
196 return (result == 0)
197 ? PConstraint.COMPARE_BY_MONOTONOUS_ID.compare(o1, o2)
198 : result;
199 };
200
201 Collections.sort(allTypeConstraints, eliminationOrder);
202 Queue<ITypeConstraint> potentialConstraints = allTypeConstraints; // rename for better comprehension
203
204 while (!potentialConstraints.isEmpty()) {
205 ITypeConstraint candidate = potentialConstraints.poll();
206
207 boolean isSubsumed = subsumedByRetainedConstraints.contains(candidate.getEquivalentJudgement());
208 if (!isSubsumed) {
209 Set<TypeJudgement> typeClosure = subsumedByRetainedConstraints;
210 for (ITypeConstraint subsuming : potentialConstraints) { // the remaining ones
211 final Set<TypeJudgement> directJudgements = subsuming.getImpliedJudgements(context);
212 typeClosure = TypeHelper.typeClosure(typeClosure, directJudgements, context);
213
214 if (typeClosure.contains(candidate.getEquivalentJudgement())) {
215 isSubsumed = true;
216 break;
217 }
218 }
219 }
220 if (isSubsumed) { // eliminated
221 candidate.delete();
222 derivativeRemoved(candidate, ConstraintRemovalReason.TYPE_SUBSUMED);
223 } else { // retained
224 subsumedByRetainedConstraints = TypeHelper.typeClosure(subsumedByRetainedConstraints,
225 candidate.getImpliedJudgements(context), context);
226 }
227 }
228 }
229
230 /**
231 * Inserts "weakened alternative" constraints suggested by the meta context that aid in coming up with a query plan.
232 */
233 void expandWeakenedAlternativeConstraints(PBody body) {
234 Set<TypeJudgement> allJudgements = new HashSet<TypeJudgement>();
235 Set<TypeJudgement> newJudgementsToAdd = new HashSet<TypeJudgement>();
236 Queue<TypeJudgement> judgementsToProcess = new LinkedList<TypeJudgement>();
237 Map<TypeJudgement, List<PConstraint>> traceability = CollectionsFactory.createMap();
238
239 for (ITypeConstraint typeConstraint : body.getConstraintsOfType(ITypeConstraint.class)) {
240 TypeJudgement equivalentJudgement = typeConstraint.getEquivalentJudgement();
241 judgementsToProcess.add(equivalentJudgement);
242 allJudgements.add(equivalentJudgement);
243 traceability.computeIfAbsent(equivalentJudgement, k-> new ArrayList<>()).add(typeConstraint);
244 }
245
246 while (!judgementsToProcess.isEmpty()) {
247 TypeJudgement judgement = judgementsToProcess.poll();
248 for (TypeJudgement alternativeJudgement : judgement.getWeakenedAlternativeJudgements(context)) {
249 if (allJudgements.add(alternativeJudgement)) {
250 newJudgementsToAdd.add(alternativeJudgement);
251 judgementsToProcess.add(alternativeJudgement);
252 traceability.merge(
253 alternativeJudgement,
254 traceability.getOrDefault(judgement, new ArrayList<>()),
255 (old,further) -> {old.addAll(further); return old;}
256 );
257 }
258 }
259 }
260
261 for (TypeJudgement typeJudgement : newJudgementsToAdd) {
262 PConstraint newConstraint = typeJudgement.createConstraintFor(body);
263 for (PConstraint source : traceability.getOrDefault(typeJudgement, Collections.emptyList())) {
264 addTrace(source, newConstraint);
265 }
266 }
267 }
268
269 private Object getConstraintKey(PConstraint constraint) {
270 if (constraint instanceof ITypeConstraint) {
271 return ((ITypeConstraint) constraint).getEquivalentJudgement();
272 }
273 // Do not check duplication for any other types
274 return constraint;
275 }
276
277 void eliminateDuplicateTypeConstraints(PBody body) {
278 Map<Object, PConstraint> constraints = new HashMap<>();
279 for (PConstraint constraint : body.getConstraints()) {
280 Object key = getConstraintKey(constraint);
281 // Retain first found instance of a constraint
282 if (!constraints.containsKey(key)) {
283 constraints.put(key, constraint);
284 }
285 }
286
287 // Retain collected constraints, remove everything else
288 Iterator<PConstraint> iterator = body.getConstraints().iterator();
289 Collection<PConstraint> toRetain = constraints.values();
290 while(iterator.hasNext()){
291 PConstraint next = iterator.next();
292 if (!toRetain.contains(next)){
293 derivativeRemoved(next, ConstraintRemovalReason.DUPLICATE);
294 iterator.remove();
295 }
296 }
297 }
298
299 /**
300 * Verifies the sanity of all constraints. Should be issued as a preventive check before layouting.
301 *
302 * @param body
303 * @throws RetePatternBuildException
304 */
305 void checkSanity(PBody body) {
306 for (PConstraint pConstraint : body.getConstraints())
307 pConstraint.checkSanity();
308 }
309
310}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriter.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriter.java
new file mode 100644
index 00000000..c844ccf7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriter.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import tools.refinery.viatra.runtime.matchers.psystem.queries.PDisjunction;
12import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
13
14/**
15 * An abstract base class for creating alternative representations for PDisjunctions.
16 * @author Zoltan Ujhelyi
17 *
18 */
19public abstract class PDisjunctionRewriter extends AbstractRewriterTraceSource{
20
21 public abstract PDisjunction rewrite(PDisjunction disjunction);
22
23 public PDisjunction rewrite(PQuery query) {
24 return rewrite(query.getDisjunctBodies());
25 }
26
27}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriterCacher.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriterCacher.java
new file mode 100644
index 00000000..eb5422ca
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PDisjunctionRewriterCacher.java
@@ -0,0 +1,64 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.ArrayList;
12import java.util.Arrays;
13import java.util.Collections;
14import java.util.List;
15import java.util.WeakHashMap;
16
17import tools.refinery.viatra.runtime.matchers.psystem.queries.PDisjunction;
18
19/**
20 * A rewriter that stores the previously computed results of a rewriter or a rewriter chain.
21 *
22 * @author Zoltan Ujhelyi
23 * @since 1.0
24 */
25public class PDisjunctionRewriterCacher extends PDisjunctionRewriter {
26
27 private final List<PDisjunctionRewriter> rewriterChain;
28 private WeakHashMap<PDisjunction, PDisjunction> cachedResults =
29 new WeakHashMap<PDisjunction, PDisjunction>();
30
31 private void setupTraceCollectorInChain(){
32 IRewriterTraceCollector collector = getTraceCollector();
33 for(PDisjunctionRewriter rewriter: rewriterChain){
34 rewriter.setTraceCollector(collector);
35 }
36 }
37
38 public PDisjunctionRewriterCacher(PDisjunctionRewriter rewriter) {
39 rewriterChain = Collections.singletonList(rewriter);
40 }
41
42 public PDisjunctionRewriterCacher(PDisjunctionRewriter... rewriters) {
43 rewriterChain = new ArrayList<>(Arrays.asList(rewriters));
44 }
45
46 public PDisjunctionRewriterCacher(List<PDisjunctionRewriter> rewriterChain) {
47 this.rewriterChain = new ArrayList<>(rewriterChain);
48 }
49
50 @Override
51 public PDisjunction rewrite(PDisjunction disjunction) {
52 if (!cachedResults.containsKey(disjunction)) {
53 PDisjunction rewritten = disjunction;
54 setupTraceCollectorInChain();
55 for (PDisjunctionRewriter rewriter : rewriterChain) {
56 rewritten = rewriter.rewrite(rewritten);
57 }
58
59 cachedResults.put(disjunction, rewritten);
60 }
61 return cachedResults.get(disjunction);
62 }
63
64}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PQueryFlattener.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PQueryFlattener.java
new file mode 100644
index 00000000..76311d8f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/PQueryFlattener.java
@@ -0,0 +1,253 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.ArrayDeque;
12import java.util.ArrayList;
13import java.util.Collections;
14import java.util.Deque;
15import java.util.HashMap;
16import java.util.HashSet;
17import java.util.LinkedHashSet;
18import java.util.LinkedList;
19import java.util.List;
20import java.util.Map;
21import java.util.Set;
22
23import tools.refinery.viatra.runtime.matchers.psystem.PBody;
24import tools.refinery.viatra.runtime.matchers.psystem.PConstraint;
25import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
26import tools.refinery.viatra.runtime.matchers.psystem.queries.PDisjunction;
27import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
28import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery.PQueryStatus;
29import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IConstraintFilter.AllowAllFilter;
30import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IConstraintFilter.ExportedParameterFilter;
31import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IVariableRenamer.HierarchicalName;
32import tools.refinery.viatra.runtime.matchers.psystem.rewriters.IVariableRenamer.SameName;
33import tools.refinery.viatra.runtime.matchers.util.Preconditions;
34import tools.refinery.viatra.runtime.matchers.util.Sets;
35
36/**
37 * This rewriter class holds the query flattening logic
38 *
39 * @author Marton Bur
40 *
41 */
42public class PQueryFlattener extends PDisjunctionRewriter {
43
44 /**
45 * Utility function to produce the permutation of every possible mapping of values.
46 *
47 * @param values
48 * @return
49 */
50 private static <K, V> Set<Map<K, V>> permutation(Map<K, Set<V>> values) {
51 // An ordering of keys is defined here which will help restoring the appropriate values after the execution of
52 // the cartesian product
53 List<K> keyList = new ArrayList<>(values.keySet());
54
55 // Produce list of value sets with the ordering defined by keyList
56 List<Set<V>> valuesList = new ArrayList<Set<V>>(keyList.size());
57 for (K key : keyList) {
58 valuesList.add(values.get(key));
59 }
60
61 // Cartesian product will obey ordering of the list
62 Set<List<V>> valueMappings = Sets.cartesianProduct(valuesList);
63
64 // Build result
65 Set<Map<K, V>> result = new LinkedHashSet<>();
66 for (List<V> valueList : valueMappings) {
67 Map<K, V> map = new HashMap<>();
68 for (int i = 0; i < keyList.size(); i++) {
69 map.put(keyList.get(i), valueList.get(i));
70 }
71 result.add(map);
72 }
73
74 return result;
75 }
76
77 private IFlattenCallPredicate flattenCallPredicate;
78
79 public PQueryFlattener(IFlattenCallPredicate flattenCallPredicate) {
80 this.flattenCallPredicate = flattenCallPredicate;
81 }
82
83 @Override
84 public PDisjunction rewrite(PDisjunction disjunction) {
85 PQuery query = disjunction.getQuery();
86
87 // Check for recursion
88 Set<PQuery> allReferredQueries = disjunction.getAllReferredQueries();
89 for (PQuery referredQuery : allReferredQueries) {
90 if (referredQuery.getAllReferredQueries().contains(referredQuery)) {
91 throw new RewriterException("Recursive queries are not supported, can't flatten query named \"{1}\"",
92 new String[] { query.getFullyQualifiedName() }, "Unsupported recursive query", query);
93 }
94 }
95
96 return this.doFlatten(disjunction);
97 }
98
99 /**
100 * Return the list of dependencies (including the root) in chronological order
101 *
102 * @param rootDisjunction
103 * @return
104 */
105 private List<PDisjunction> disjunctionDependencies(PDisjunction rootDisjunction) {
106 // Disjunctions are first collected into a list usign a depth-first approach,
107 // which can be iterated backwards while removing duplicates
108 Deque<PDisjunction> stack = new ArrayDeque<>();
109 LinkedList<PDisjunction> list = new LinkedList<>();
110 stack.push(rootDisjunction);
111 list.add(rootDisjunction);
112
113 while (!stack.isEmpty()) {
114 PDisjunction disjunction = stack.pop();
115 // Collect dependencies
116 for (PBody pBody : disjunction.getBodies()) {
117 for (PConstraint constraint : pBody.getConstraints()) {
118 if (constraint instanceof PositivePatternCall) {
119 PositivePatternCall positivePatternCall = (PositivePatternCall) constraint;
120 if (flattenCallPredicate.shouldFlatten(positivePatternCall)) {
121 // If the above preconditions meet, the call should be flattened
122 PDisjunction calledDisjunction = positivePatternCall.getReferredQuery().getDisjunctBodies();
123 stack.push(calledDisjunction);
124 list.add(calledDisjunction);
125 }
126 }
127 }
128 }
129 }
130
131 // Remove duplicates (keeping the last instance) and reverse order
132 Set<PDisjunction> visited = new HashSet<PDisjunction>();
133 List<PDisjunction> result = new ArrayList<PDisjunction>(list.size());
134
135 list.descendingIterator().forEachRemaining(item -> {
136 if (!visited.contains(item)) {
137 result.add(item);
138 visited.add(item);
139 }
140
141 });
142
143 return result;
144 }
145
146 /**
147 * This function holds the actual flattening logic for a PQuery
148 *
149 * @param rootDisjunction
150 * to be flattened
151 * @return the flattened bodies of the pQuery
152 */
153 private PDisjunction doFlatten(PDisjunction rootDisjunction) {
154
155 Map<PDisjunction, Set<PBody>> flatBodyMapping = new HashMap<>();
156
157 List<PDisjunction> dependencies = disjunctionDependencies(rootDisjunction);
158
159 for (PDisjunction disjunction : dependencies) {
160 Set<PBody> flatBodies = new LinkedHashSet<>();
161 for (PBody body : disjunction.getBodies()) {
162 if (isFlatteningNeeded(body)) {
163 Map<PositivePatternCall, Set<PBody>> flattenedBodies = new HashMap<>();
164 for (PConstraint pConstraint : body.getConstraints()) {
165
166 if (pConstraint instanceof PositivePatternCall) {
167 PositivePatternCall positivePatternCall = (PositivePatternCall) pConstraint;
168 if (flattenCallPredicate.shouldFlatten(positivePatternCall)) {
169 // If the above preconditions meet, do the flattening and return the disjoint bodies
170 PDisjunction calledDisjunction = positivePatternCall.getReferredQuery()
171 .getDisjunctBodies();
172
173 Set<PBody> flattenedBodySet = flatBodyMapping.get(calledDisjunction);
174 Preconditions.checkArgument(!flattenedBodySet.isEmpty());
175 flattenedBodies.put(positivePatternCall, flattenedBodySet);
176 }
177 }
178 }
179 flatBodies.addAll(createSetOfFlatPBodies(body, flattenedBodies));
180 } else {
181 flatBodies.add(prepareFlatPBody(body));
182 }
183 }
184 flatBodyMapping.put(disjunction, flatBodies);
185 }
186
187 return new PDisjunction(rootDisjunction.getQuery(), flatBodyMapping.get(rootDisjunction));
188 }
189
190 /**
191 * Creates the flattened bodies based on the caller body and the called (and already flattened) disjunctions
192 *
193 * @param pBody
194 * the body to flatten
195 * @param flattenedDisjunctions
196 * the
197 * @param flattenedCalls
198 * @return
199 */
200 private Set<PBody> createSetOfFlatPBodies(PBody pBody, Map<PositivePatternCall, Set<PBody>> flattenedCalls) {
201 PQuery pQuery = pBody.getPattern();
202
203 Set<Map<PositivePatternCall, PBody>> conjunctedCalls = permutation(flattenedCalls);
204
205 // The result set containing the merged conjuncted bodies
206 Set<PBody> conjunctedBodies = new HashSet<>();
207
208 for (Map<PositivePatternCall, PBody> calledBodies : conjunctedCalls) {
209 FlattenerCopier copier = createBodyCopier(pQuery, calledBodies);
210
211 int i = 0;
212 HierarchicalName hierarchicalNamingTool = new HierarchicalName();
213 for (PositivePatternCall patternCall : calledBodies.keySet()) {
214 // Merge each called body
215 hierarchicalNamingTool.setCallCount(i++);
216 copier.mergeBody(patternCall, hierarchicalNamingTool, new ExportedParameterFilter());
217 }
218
219 // Merge the caller's constraints to the conjunct body
220 copier.mergeBody(pBody);
221
222 PBody copiedBody = copier.getCopiedBody();
223 copiedBody.setStatus(PQueryStatus.OK);
224 conjunctedBodies.add(copiedBody);
225 }
226
227 return conjunctedBodies;
228 }
229
230 private FlattenerCopier createBodyCopier(PQuery query, Map<PositivePatternCall, PBody> calledBodies) {
231 FlattenerCopier flattenerCopier = new FlattenerCopier(query, calledBodies);
232 flattenerCopier.setTraceCollector(getTraceCollector());
233 return flattenerCopier;
234 }
235
236 private PBody prepareFlatPBody(PBody pBody) {
237 PBodyCopier copier = createBodyCopier(pBody.getPattern(), Collections.<PositivePatternCall, PBody> emptyMap());
238 copier.mergeBody(pBody, new SameName(), new AllowAllFilter());
239 // the copying of the body here is necessary for only one containing PDisjunction can be assigned to a PBody
240 return copier.getCopiedBody();
241 }
242
243 private boolean isFlatteningNeeded(PBody pBody) {
244 // Check if the body contains positive pattern call AND if it should be flattened
245 for (PConstraint pConstraint : pBody.getConstraints()) {
246 if (pConstraint instanceof PositivePatternCall) {
247 return flattenCallPredicate.shouldFlatten((PositivePatternCall) pConstraint);
248 }
249 }
250 return false;
251 }
252
253}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/RewriterException.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/RewriterException.java
new file mode 100644
index 00000000..d0fc286b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/RewriterException.java
@@ -0,0 +1,31 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2014, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import tools.refinery.viatra.runtime.matchers.psystem.queries.QueryInitializationException;
12
13/**
14 * An exception to wrap various issues during PDisjunction rewriting.
15 * @author Zoltan Ujhelyi
16 *
17 */
18public class RewriterException extends QueryInitializationException {
19
20 private static final long serialVersionUID = -4703825954995497932L;
21
22 public RewriterException(String message, String[] context, String shortMessage, Object patternDescription,
23 Throwable cause) {
24 super(message, context, shortMessage, patternDescription, cause);
25 }
26
27 public RewriterException(String message, String[] context, String shortMessage, Object patternDescription) {
28 super(message, context, shortMessage, patternDescription);
29 }
30
31}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/SurrogateQueryRewriter.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/SurrogateQueryRewriter.java
new file mode 100644
index 00000000..71459558
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/SurrogateQueryRewriter.java
@@ -0,0 +1,63 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.LinkedHashSet;
12import java.util.Set;
13
14import tools.refinery.viatra.runtime.matchers.context.IInputKey;
15import tools.refinery.viatra.runtime.matchers.context.surrogate.SurrogateQueryRegistry;
16import tools.refinery.viatra.runtime.matchers.psystem.PBody;
17import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
18import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
19import tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.TypeConstraint;
20import tools.refinery.viatra.runtime.matchers.psystem.queries.PDisjunction;
21import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
22import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery.PQueryStatus;
23import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
24import tools.refinery.viatra.runtime.matchers.tuple.Tuples;
25
26/**
27 * @author Zoltan Ujhelyi
28 *
29 */
30public class SurrogateQueryRewriter extends PDisjunctionRewriter {
31
32 @Override
33 public PDisjunction rewrite(PDisjunction disjunction) {
34 Set<PBody> replacedBodies = new LinkedHashSet<>();
35 for (PBody body : disjunction.getBodies()) {
36 PBodyCopier copier = new PBodyCopier(body, getTraceCollector()) {
37
38 @Override
39 protected void copyTypeConstraint(TypeConstraint typeConstraint) {
40 PVariable[] mappedVariables = extractMappedVariables(typeConstraint);
41 Tuple variablesTuple = Tuples.flatTupleOf((Object[])mappedVariables);
42 final IInputKey supplierKey = typeConstraint.getSupplierKey();
43 if(SurrogateQueryRegistry.instance().hasSurrogateQueryFQN(supplierKey)) {
44 PQuery surrogateQuery = SurrogateQueryRegistry.instance().getSurrogateQuery(supplierKey);
45 if (surrogateQuery == null) {
46 throw new IllegalStateException(
47 String.format("Surrogate query for feature %s not found",
48 supplierKey.getPrettyPrintableName()));
49 }
50 addTrace(typeConstraint, new PositivePatternCall(getCopiedBody(), variablesTuple, surrogateQuery));
51 } else {
52 addTrace(typeConstraint, new TypeConstraint(getCopiedBody(), variablesTuple, supplierKey));
53 }
54 }
55 };
56 PBody modifiedBody = copier.getCopiedBody();
57 replacedBodies.add(modifiedBody);
58 modifiedBody.setStatus(PQueryStatus.OK);
59 }
60 return new PDisjunction(replacedBodies);
61 }
62
63}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/VariableMappingExpressionEvaluatorWrapper.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/VariableMappingExpressionEvaluatorWrapper.java
new file mode 100644
index 00000000..10337979
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/psystem/rewriters/VariableMappingExpressionEvaluatorWrapper.java
@@ -0,0 +1,88 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Grill Balázs, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
10
11import java.util.HashMap;
12import java.util.LinkedHashMap;
13import java.util.Map;
14
15import tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator;
16import tools.refinery.viatra.runtime.matchers.psystem.IValueProvider;
17import tools.refinery.viatra.runtime.matchers.psystem.PVariable;
18import tools.refinery.viatra.runtime.matchers.util.Preconditions;
19
20/**
21 * A wrapper for {@link IExpressionEvaluator} which is capable of correctly mapping variable names used by the
22 * expression.
23 *
24 * @author Grill Balázs
25 *
26 */
27class VariableMappingExpressionEvaluatorWrapper implements IExpressionEvaluator {
28
29 private final IExpressionEvaluator wrapped;
30 private final Map<String, String> variableMapping;
31
32 public VariableMappingExpressionEvaluatorWrapper(IExpressionEvaluator wrapped,
33 Map<PVariable, PVariable> variableMapping) {
34
35 // Support to rewrap an already wrapped expression.
36 boolean rewrap = wrapped instanceof VariableMappingExpressionEvaluatorWrapper;
37 this.wrapped = rewrap ? ((VariableMappingExpressionEvaluatorWrapper)wrapped).wrapped : wrapped;
38
39 // Instead of just saving the reference of the mapping, save the actual (trimmed) state of the mapping as it
40 // may change during copying (especially during flattening). A LinkedHashMap is used to retain ordering of
41 // original parameter names iterator.
42 this.variableMapping = new LinkedHashMap<>();
43
44 // Index map by variable names
45 Map<String, PVariable> names = new HashMap<>();
46 for (PVariable originalVar : variableMapping.keySet()) {
47 names.put(originalVar.getName(), originalVar);
48 }
49
50 // In case of rewrapping, current names are contained by the previous mapping
51 Map<String, String> previousMapping = null;
52 if (rewrap){
53 previousMapping = ((VariableMappingExpressionEvaluatorWrapper)wrapped).variableMapping;
54 }
55
56 // Populate mapping
57 for (String inputParameterName : this.wrapped.getInputParameterNames()) {
58 String parameterName = rewrap ? previousMapping.get(inputParameterName) : inputParameterName;
59 Preconditions.checkArgument(parameterName != null);
60 PVariable original = names.get(parameterName);
61 Preconditions.checkArgument(original != null);
62 PVariable mapped = variableMapping.get(original);
63 if (mapped != null){
64 this.variableMapping.put(inputParameterName, mapped.getName());
65 }
66 }
67 }
68
69 @Override
70 public String getShortDescription() {
71 return wrapped.getShortDescription();
72 }
73
74 @Override
75 public Iterable<String> getInputParameterNames() {
76 return variableMapping.values();
77 }
78
79 @Override
80 public Object evaluateExpression(final IValueProvider provider) throws Exception {
81 return wrapped.evaluateExpression(variableName -> {
82 String mappedVariableName = variableMapping.get(variableName);
83 Preconditions.checkArgument(mappedVariableName != null, "Could not find variable %s", variableName);
84 return provider.getValue(mappedVariableName);
85 });
86 }
87
88}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/AbstractTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/AbstractTuple.java
new file mode 100644
index 00000000..a26d9193
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/AbstractTuple.java
@@ -0,0 +1,136 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.ArrayList;
12import java.util.HashMap;
13import java.util.HashSet;
14import java.util.List;
15import java.util.Map;
16import java.util.Objects;
17import java.util.Set;
18
19/**
20 * Common implementation methods for immutable and volatile tuples. The class should not be used directly in client
21 * code, except for the definition of new tuple implementations.
22 *
23 * @author Zoltan Ujhelyi
24 * @since 1.7
25 */
26public abstract class AbstractTuple implements ITuple {
27
28 /**
29 * As the tuple is supposed to be immutable, do not modify the returned array.
30 *
31 * @return the array containing all elements of this Tuple
32 */
33 @Override
34 public Object[] getElements() {
35 Object[] allElements = new Object[getSize()];
36 for (int i = 0; i < allElements.length; ++i)
37 allElements[i] = get(i);
38 return allElements;
39 }
40
41 /**
42 * @return the set containing all distinct elements of this Tuple, cast as type T
43 */
44 @Override
45 @SuppressWarnings("unchecked")
46 public <T> Set<T> getDistinctElements() {
47 Set<T> result = new HashSet<T>();
48 Object[] elements = getElements();
49 for (Object object : elements) {
50 result.add((T) object);
51 }
52 return result;
53 }
54
55 /**
56 * Calculates an inverted index of the elements of this pattern. For each element, the index of the (last)
57 * occurrence is calculated.
58 *
59 * @return the inverted index mapping each element of this pattern to its index in the array
60 */
61 @Override
62 public Map<Object, Integer> invertIndex() {
63 Map<Object, Integer> result = new HashMap<Object, Integer>();
64 for (int i = 0; i < getSize(); i++)
65 result.put(get(i), i);
66 return result;
67 }
68
69 /**
70 * Calculates an inverted index of the elements of this pattern. For each element, the index of all of its
71 * occurrences is calculated.
72 *
73 * @return the inverted index mapping each element of this pattern to its index in the array
74 */
75 @Override
76 public Map<Object, List<Integer>> invertIndexWithMupliplicity() {
77 Map<Object, List<Integer>> result = new HashMap<Object, List<Integer>>();
78 for (int i = 0; i < getSize(); i++) {
79 Object value = get(i);
80 List<Integer> indices = result.computeIfAbsent(value, v -> new ArrayList<>());
81 indices.add(i);
82 }
83 return result;
84 }
85
86 /**
87 * @since 1.7
88 */
89 protected IndexOutOfBoundsException raiseIndexingError(int index) {
90 return new IndexOutOfBoundsException(
91 String.format("No value at position %d for %s instance %s", index, getClass().getSimpleName(), this));
92 }
93
94 /**
95 * Compares the elements stored in this tuple to another tuple
96 */
97 protected boolean internalEquals(ITuple other) {
98 if (getSize() != other.getSize())
99 return false;
100 boolean result = true;
101 for (int i = 0; result && i < getSize(); ++i) {
102 Object ours = get(i);
103 Object theirs = other.get(i);
104 result = result && Objects.equals(ours, theirs);
105 }
106 return result;
107 }
108
109 @Override
110 public String toString() {
111 StringBuilder s = new StringBuilder();
112 s.append("T(");
113 for (Object o : getElements()) {
114 s.append(o == null ? "null" : o.toString());
115 s.append(';');
116 }
117 s.append(')');
118 return s.toString();
119 }
120
121 /**
122 * @since 1.7
123 */
124 protected int doCalcHash() {
125 final int PRIME = 31;
126 int hash = 1;
127 for (int i = 0; i < getSize(); i++) {
128 hash = PRIME * hash;
129 Object element = get(i);
130 if (element != null)
131 hash += element.hashCode();
132 }
133 return hash;
134 }
135
136} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseFlatTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseFlatTuple.java
new file mode 100644
index 00000000..6f46b763
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseFlatTuple.java
@@ -0,0 +1,20 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11/**
12 * Base class for all flat tuple implementations.
13 * Flat tuples store all elements locally (do not reference other tuples).
14 *
15 * @author Gabor Bergmann
16 * @since 1.7
17 */
18public abstract class BaseFlatTuple extends Tuple {
19
20}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseLeftInheritanceTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseLeftInheritanceTuple.java
new file mode 100644
index 00000000..03f9ea89
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/BaseLeftInheritanceTuple.java
@@ -0,0 +1,65 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11/**
12 * Common functionality of left inheritance tuple implementations.
13 *
14 * <p>Left inheritance tuples inherit their first few elements from another tuple,
15 * and extend it with additional "local" elements.
16 *
17 * @author Gabor Bergmann
18 * @since 1.7
19 */
20public abstract class BaseLeftInheritanceTuple extends Tuple {
21
22 /**
23 * The number of elements that aren't stored locally, but inherited from an ancestor Tuple instead.
24 */
25 protected final int inheritedIndex;
26 /**
27 * This object contains the same elements as the ancestor on the first inheritedIndex positions
28 */
29 protected final Tuple ancestor;
30
31 /**
32 * @param ancestor
33 */
34 public BaseLeftInheritanceTuple(Tuple ancestor) {
35 super();
36 this.ancestor = ancestor;
37 this.inheritedIndex = ancestor.getSize();
38 }
39
40 /**
41 * @return the number of local (non-inherited) elements
42 */
43 public abstract int getLocalSize();
44
45 /**
46 * Optimized equals calculation (prediction: true, since hash values match)
47 */
48 @Override
49 protected boolean internalEquals(ITuple other) {
50 if (other instanceof BaseLeftInheritanceTuple) {
51 BaseLeftInheritanceTuple blit = (BaseLeftInheritanceTuple) other;
52 if (blit.inheritedIndex == this.inheritedIndex) {
53 if (this.ancestor.equals(blit.ancestor)) {
54 return localEquals(blit);
55 } else return false;
56 }
57 }
58 return super.internalEquals(other);
59 }
60
61 /**
62 * Checks the equivalence of local elements only, after ancestor tuple has been determined to be equal.
63 */
64 protected abstract boolean localEquals(BaseLeftInheritanceTuple other);
65}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple.java
new file mode 100644
index 00000000..8bbb0ac2
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple.java
@@ -0,0 +1,60 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.tuple;
11
12import java.util.Arrays;
13
14/**
15 * Default Tuple implementation, with statically unknown arity.
16 * @author Gabor Bergmann
17 */
18public final class FlatTuple extends BaseFlatTuple {
19
20 /**
21 * Array of substituted values. DO NOT MODIFY! Use Constructor to build a new instance instead.
22 */
23 private final Object[] elements;
24
25 /**
26 * Creates a FlatTuple instance, fills it with the given array.
27 * <p> Users should consider calling {@link Tuples#flatTupleOf(Object...)} instead to save memory on low-arity tuples.
28 *
29 * @param elements
30 * array of substitution values
31 */
32 protected FlatTuple(Object... elements) {
33 this.elements = Arrays.copyOf(elements, elements.length);
34 calcHash();
35 }
36
37 @Override
38 public Object get(int index) {
39 return elements[index];
40 }
41
42 @Override
43 public int getSize() {
44 return elements.length;
45 }
46
47 @Override
48 public Object[] getElements() {
49 return elements;
50 }
51
52 @Override
53 protected boolean internalEquals(ITuple other) {
54 if (other instanceof FlatTuple) {
55 return Arrays.equals(elements, ((FlatTuple) other).elements);
56 } else
57 return super.internalEquals(other);
58 }
59
60}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple0.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple0.java
new file mode 100644
index 00000000..93f412b7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple0.java
@@ -0,0 +1,46 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11/**
12 * Flat tuple with statically known arity of 0.
13 *
14 * @author Gabor Bergmann
15 * @since 1.7
16 *
17 */
18public final class FlatTuple0 extends BaseFlatTuple {
19 protected static final FlatTuple0 INSTANCE = new FlatTuple0();
20
21 private FlatTuple0() {
22 calcHash();
23 }
24
25 @Override
26 public int getSize() {
27 return 0;
28 }
29
30 @Override
31 public Object get(int index) {
32 throw raiseIndexingError(index);
33 }
34
35 private static final Object[] NULLARY_ARRAY = new Object[0];
36
37 @Override
38 public Object[] getElements() {
39 return NULLARY_ARRAY;
40 }
41
42 @Override
43 protected boolean internalEquals(ITuple other) {
44 return 0 == other.getSize();
45 }
46}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple1.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple1.java
new file mode 100644
index 00000000..b3b1c312
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple1.java
@@ -0,0 +1,44 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * Flat tuple with statically known arity of 1.
15 *
16 * @author Gabor Bergmann
17 * @since 1.7
18 *
19 */
20public final class FlatTuple1 extends BaseFlatTuple {
21 private final Object element0;
22
23 protected FlatTuple1(Object element0) {
24 this.element0 = element0;
25 calcHash();
26 }
27
28 @Override
29 public int getSize() {
30 return 1;
31 }
32
33 @Override
34 public Object get(int index) {
35 if (index == 0) return element0;
36 else throw raiseIndexingError(index);
37 }
38
39 @Override
40 protected boolean internalEquals(ITuple other) {
41 return 1 == other.getSize() &&
42 Objects.equals(element0, other.get(0));
43 }
44}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple2.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple2.java
new file mode 100644
index 00000000..2dcfd718
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple2.java
@@ -0,0 +1,51 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * Flat tuple with statically known arity of 2.
15 *
16 * @author Gabor Bergmann
17 * @since 1.7
18 *
19 */
20public final class FlatTuple2 extends BaseFlatTuple {
21 private final Object element0;
22 private final Object element1;
23
24 protected FlatTuple2(Object element0, Object element1) {
25 this.element0 = element0;
26 this.element1 = element1;
27 calcHash();
28 }
29
30 @Override
31 public int getSize() {
32 return 2;
33 }
34
35 @Override
36 public Object get(int index) {
37 switch(index) {
38 case 0 : return element0;
39 case 1 : return element1;
40 default: throw raiseIndexingError(index);
41 }
42 }
43
44 @Override
45 protected boolean internalEquals(ITuple other) {
46 return 2 == other.getSize() &&
47 Objects.equals(element0, other.get(0)) &&
48 Objects.equals(element1, other.get(1));
49 }
50
51}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple3.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple3.java
new file mode 100644
index 00000000..50cee57e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple3.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * Flat tuple with statically known arity of 3.
15 *
16 * @author Gabor Bergmann
17 * @since 1.7
18 *
19 */
20public final class FlatTuple3 extends BaseFlatTuple {
21 private final Object element0;
22 private final Object element1;
23 private final Object element2;
24
25 protected FlatTuple3(Object element0, Object element1, Object element2) {
26 this.element0 = element0;
27 this.element1 = element1;
28 this.element2 = element2;
29 calcHash();
30 }
31
32 @Override
33 public int getSize() {
34 return 3;
35 }
36
37 @Override
38 public Object get(int index) {
39 switch (index) {
40 case 0: return element0;
41 case 1: return element1;
42 case 2: return element2;
43 default: throw raiseIndexingError(index);
44 }
45 }
46
47 @Override
48 protected boolean internalEquals(ITuple other) {
49 return 3 == other.getSize() &&
50 Objects.equals(element0, other.get(0)) &&
51 Objects.equals(element1, other.get(1)) &&
52 Objects.equals(element2, other.get(2));
53 }
54
55}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple4.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple4.java
new file mode 100644
index 00000000..024c94f4
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/FlatTuple4.java
@@ -0,0 +1,59 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * Flat tuple with statically known arity of 4.
15 *
16 * @author Gabor Bergmann
17 * @since 1.7
18 *
19 */
20public final class FlatTuple4 extends BaseFlatTuple {
21 private final Object element0;
22 private final Object element1;
23 private final Object element2;
24 private final Object element3;
25
26 protected FlatTuple4(Object element0, Object element1, Object element2, Object element3) {
27 this.element0 = element0;
28 this.element1 = element1;
29 this.element2 = element2;
30 this.element3 = element3;
31 calcHash();
32 }
33
34 @Override
35 public int getSize() {
36 return 4;
37 }
38
39 @Override
40 public Object get(int index) {
41 switch(index) {
42 case 0: return element0;
43 case 1: return element1;
44 case 2: return element2;
45 case 3: return element3;
46 default: throw raiseIndexingError(index);
47 }
48 }
49
50 @Override
51 protected boolean internalEquals(ITuple other) {
52 return 4 == other.getSize() &&
53 Objects.equals(element0, other.get(0)) &&
54 Objects.equals(element1, other.get(1)) &&
55 Objects.equals(element2, other.get(2)) &&
56 Objects.equals(element3, other.get(3));
57 }
58
59}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/IModifiableTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/IModifiableTuple.java
new file mode 100644
index 00000000..f5dab2a5
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/IModifiableTuple.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11/**
12 * A tuple that allows modifying the underlying value. Should not be used for non-volatile tuples.
13 *
14 * @author Zoltan Ujhelyi
15 * @since 1.7
16 */
17public interface IModifiableTuple extends ITuple {
18
19 /**
20 * Sets the selected value for a tuple
21 *
22 * @pre: 0 <= index < getSize()
23 *
24 */
25 void set(int index, Object value);
26
27}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/ITuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/ITuple.java
new file mode 100644
index 00000000..92014781
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/ITuple.java
@@ -0,0 +1,64 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.List;
12import java.util.Map;
13import java.util.Set;
14
15/**
16 * Represents both mutable and immutable tuples
17 *
18 * @author Zoltan Ujhelyi
19 * @since 1.7
20 *
21 */
22public interface ITuple {
23
24 /**
25 * @pre: 0 <= index < getSize()
26 *
27 * @return the element at the specified index
28 */
29 Object get(int index);
30
31 /**
32 * As the tuple is supposed to be immutable, do not modify the returned array.
33 * @return the array containing all elements of this Tuple
34 */
35 Object[] getElements();
36
37 /**
38 * @return the set containing all distinct elements of this Tuple, cast as type T
39 */
40 <T> Set<T> getDistinctElements();
41
42 /**
43 * @return number of elements
44 */
45 int getSize();
46
47 /**
48 * Calculates an inverted index of the elements of this pattern. For each element, the index of the (last)
49 * occurrence is calculated.
50 *
51 * @return the inverted index mapping each element of this pattern to its index in the array
52 */
53 Map<Object, Integer> invertIndex();
54
55 /**
56 * Calculates an inverted index of the elements of this pattern. For each element, the index of all of its
57 * occurrences is calculated.
58 *
59 * @return the inverted index mapping each element of this pattern to its index in the array
60 */
61 Map<Object, List<Integer>> invertIndexWithMupliplicity();
62
63 Tuple toImmutable();
64} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple.java
new file mode 100644
index 00000000..dcdfc376
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple.java
@@ -0,0 +1,172 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.tuple;
11
12import java.util.Arrays;
13import java.util.Objects;
14
15/**
16 *
17 * Tuple that inherits another tuple on the left.
18 *
19 * @author Gabor Bergmann
20 *
21 */
22public final class LeftInheritanceTuple extends BaseLeftInheritanceTuple {
23 /**
24 * Array of substituted values above inheritedIndex. DO NOT MODIFY! Use Constructor to build a new instance instead.
25 */
26 private final Object[] localElements;
27
28 //
29 // /**
30 // * Creates a Tuple instance, fills it with the given array.
31 // * @pre: no elements are null
32 // * @param elements array of substitution values
33 // */
34 // public Tuple(Object[] elements)
35 // {
36 // this.localElements = elements;
37 // this.ancestor=null;
38 // this.inheritedIndex = 0;
39 // calcHash();
40 // }
41
42
43
44 /**
45 * Creates a Tuple instance, lets it inherit from an ancestor, extends it with a given array. @pre: no elements are
46 * null
47 *
48 * @param localElements
49 * array of substitution values
50 */
51 LeftInheritanceTuple(Tuple ancestor, Object[] localElements) {
52 super(ancestor);
53 this.localElements = localElements;
54 calcHash();
55 }
56
57 //
58 // /**
59 // * Creates a Tuple instance of size one, fills it with the given object.
60 // * @pre: o!=null
61 // * @param o the single substitution
62 // */
63 // public Tuple(Object o)
64 // {
65 // localElements = new Object [1];
66 // localElements[0] = o;
67 // this.ancestor=null;
68 // this.inheritedIndex = 0;
69 // calcHash();
70 // }
71 //
72 // /**
73 // * Creates a Tuple instance of size two, fills it with the given objects.
74 // * @pre: o1!=null, o2!=null
75 // */
76 // public Tuple(Object o1, Object o2)
77 // {
78 // localElements = new Object [2];
79 // localElements[0] = o1;
80 // localElements[1] = o2;
81 // this.ancestor=null;
82 // this.inheritedIndex = 0;
83 // calcHash();
84 // }
85 //
86 // /**
87 // * Creates a Tuple instance of size three, fills it with the given
88 // objects.
89 // * @pre: o1!=null, o2!=null, o3!=null
90 // */
91 // public Tuple(Object o1, Object o2, Object o3)
92 // {
93 // localElements = new Object [3];
94 // localElements[0] = o1;
95 // localElements[1] = o2;
96 // localElements[2] = o3;
97 // this.ancestor=null;
98 // this.inheritedIndex = 0;
99 // calcHash();
100 // }
101
102 /**
103 * @return number of elements
104 */
105 public int getSize() {
106 return inheritedIndex + localElements.length;
107 }
108
109 @Override
110 public int getLocalSize() {
111 return localElements.length;
112 }
113
114 /**
115 * @pre: 0 <= index < getSize()
116 *
117 * @return the element at the specified index
118 */
119 public Object get(int index) {
120 return (index < inheritedIndex) ? ancestor.get(index) : localElements[index - inheritedIndex];
121 }
122
123 /**
124 * Optimized hash calculation
125 */
126 @Override
127 void calcHash() {
128 final int PRIME = 31;
129 cachedHash = ancestor.hashCode();
130 for (int i = 0; i < localElements.length; i++) {
131 cachedHash = PRIME * cachedHash;
132 Object element = localElements[i];
133 if (element != null)
134 cachedHash += element.hashCode();
135 }
136 }
137
138 /**
139 * Optimized equals calculation (prediction: true, since hash values match)
140 */
141 @Override
142 protected boolean localEquals(BaseLeftInheritanceTuple other) {
143 if (other instanceof LeftInheritanceTuple) {
144 LeftInheritanceTuple lit = (LeftInheritanceTuple)other;
145 return Arrays.equals(this.localElements, lit.localElements);
146 } else {
147 if (localElements.length != other.getLocalSize())
148 return false;
149 int index = inheritedIndex;
150 for (int i = 0; i<localElements.length; ++i) {
151 if (! Objects.equals(localElements[i], other.get(index++)))
152 return false;
153 }
154 return true;
155 }
156 }
157
158 // public int compareTo(Object arg0) {
159 // Tuple other = (Tuple) arg0;
160 //
161 // int retVal = cachedHash - other.cachedHash;
162 // if (retVal==0) retVal = elements.length - other.elements.length;
163 // for (int i=0; retVal==0 && i<elements.length; ++i)
164 // {
165 // if (elements[i] == null && other.elements[i] != null) retVal = -1;
166 // else if (other.elements[i] == null) retVal = 1;
167 // else retVal = elements[i].compareTo(other.elements[i]);
168 // }
169 // return retVal;
170 // }
171
172}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple1.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple1.java
new file mode 100644
index 00000000..61123176
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple1.java
@@ -0,0 +1,83 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * @author Gabor Bergmann
15 * @since 1.7
16 */
17public final class LeftInheritanceTuple1 extends BaseLeftInheritanceTuple {
18 /**
19 * A single substituted value after inheritedIndex.
20 */
21 private final Object localElement;
22
23 /**
24 * @param ancestor
25 * @param localElement
26 */
27 protected LeftInheritanceTuple1(Tuple ancestor, Object localElement) {
28 super(ancestor);
29 this.localElement = localElement;
30 calcHash();
31 }
32
33 /**
34 * @return number of elements
35 */
36 public int getSize() {
37 return inheritedIndex + 1;
38 }
39
40 @Override
41 public int getLocalSize() {
42 return 1;
43 }
44
45 /**
46 * @pre: 0 <= index < getSize()
47 *
48 * @return the element at the specified index
49 */
50 public Object get(int index) {
51 int local = index - inheritedIndex;
52 if (local < 0)
53 return ancestor.get(index);
54 else if (local == 0) return localElement;
55 else throw raiseIndexingError(index);
56 }
57
58 /**
59 * Optimized hash calculation
60 */
61 @Override
62 void calcHash() {
63 final int PRIME = 31;
64 cachedHash = ancestor.hashCode();
65 cachedHash = PRIME * cachedHash;
66 if (localElement != null) cachedHash += localElement.hashCode();
67 }
68
69 /**
70 * Optimized equals calculation (prediction: true, since hash values match)
71 */
72 @Override
73 protected boolean localEquals(BaseLeftInheritanceTuple other) {
74 if (other instanceof LeftInheritanceTuple1) {
75 LeftInheritanceTuple1 lit = (LeftInheritanceTuple1)other;
76 return Objects.equals(this.localElement, lit.localElement);
77 } else {
78 return (1 == other.getLocalSize()) &&
79 Objects.equals(localElement, other.get(inheritedIndex));
80 }
81 }
82
83}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple2.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple2.java
new file mode 100644
index 00000000..e9fb98e8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple2.java
@@ -0,0 +1,73 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * @author Gabor Bergmann
15 * @since 1.7
16 */
17public final class LeftInheritanceTuple2 extends BaseLeftInheritanceTuple {
18 private final Object localElement0;
19 private final Object localElement1;
20
21 protected LeftInheritanceTuple2(Tuple ancestor, Object localElement0, Object localElement1) {
22 super(ancestor);
23 this.localElement0 = localElement0;
24 this.localElement1 = localElement1;
25 calcHash();
26 }
27
28 @Override
29 public int getLocalSize() {
30 return 2;
31 }
32
33 @Override
34 public int getSize() {
35 return inheritedIndex + 2;
36 }
37
38 @Override
39 public Object get(int index) {
40 int local = index - inheritedIndex;
41 if (local < 0)
42 return ancestor.get(index);
43 else if (local == 0) return localElement0;
44 else if (local == 1) return localElement1;
45 else throw raiseIndexingError(index);
46 }
47
48 /**
49 * Optimized hash calculation
50 */
51 @Override
52 void calcHash() {
53 final int PRIME = 31;
54 cachedHash = ancestor.hashCode();
55 cachedHash = PRIME * cachedHash;
56 if (localElement0 != null) cachedHash += localElement0.hashCode();
57 cachedHash = PRIME * cachedHash;
58 if (localElement1 != null) cachedHash += localElement1.hashCode();
59 }
60
61 @Override
62 protected boolean localEquals(BaseLeftInheritanceTuple other) {
63 if (other instanceof LeftInheritanceTuple2) {
64 LeftInheritanceTuple2 lit = (LeftInheritanceTuple2)other;
65 return Objects.equals(this.localElement0, lit.localElement0) &&
66 Objects.equals(this.localElement1, lit.localElement1);
67 } else {
68 return (2 == other.getLocalSize()) &&
69 Objects.equals(localElement0, other.get(inheritedIndex)) &&
70 Objects.equals(localElement1, other.get(inheritedIndex + 1));
71 }
72 }
73}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple3.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple3.java
new file mode 100644
index 00000000..e61d196f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple3.java
@@ -0,0 +1,81 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * @author Gabor Bergmann
15 * @since 1.7
16 */
17public final class LeftInheritanceTuple3 extends BaseLeftInheritanceTuple {
18 private final Object localElement0;
19 private final Object localElement1;
20 private final Object localElement2;
21
22 protected LeftInheritanceTuple3(Tuple ancestor, Object localElement0, Object localElement1, Object localElement2) {
23 super(ancestor);
24 this.localElement0 = localElement0;
25 this.localElement1 = localElement1;
26 this.localElement2 = localElement2;
27 calcHash();
28 }
29
30 @Override
31 public int getLocalSize() {
32 return 3;
33 }
34
35 @Override
36 public int getSize() {
37 return inheritedIndex + 3;
38 }
39
40 @Override
41 public Object get(int index) {
42 int local = index - inheritedIndex;
43 if (local < 0)
44 return ancestor.get(index);
45 else if (local == 0) return localElement0;
46 else if (local == 1) return localElement1;
47 else if (local == 2) return localElement2;
48 else throw raiseIndexingError(index);
49 }
50
51 /**
52 * Optimized hash calculation
53 */
54 @Override
55 void calcHash() {
56 final int PRIME = 31;
57 cachedHash = ancestor.hashCode();
58 cachedHash = PRIME * cachedHash;
59 if (localElement0 != null) cachedHash += localElement0.hashCode();
60 cachedHash = PRIME * cachedHash;
61 if (localElement1 != null) cachedHash += localElement1.hashCode();
62 cachedHash = PRIME * cachedHash;
63 if (localElement2 != null) cachedHash += localElement2.hashCode();
64 }
65
66 @Override
67 protected boolean localEquals(BaseLeftInheritanceTuple other) {
68 if (other instanceof LeftInheritanceTuple3) {
69 LeftInheritanceTuple3 lit = (LeftInheritanceTuple3)other;
70 return Objects.equals(this.localElement0, lit.localElement0) &&
71 Objects.equals(this.localElement1, lit.localElement1) &&
72 Objects.equals(this.localElement2, lit.localElement2);
73 } else {
74 return (3 == other.getLocalSize()) &&
75 Objects.equals(localElement0, other.get(inheritedIndex)) &&
76 Objects.equals(localElement1, other.get(inheritedIndex + 1)) &&
77 Objects.equals(localElement2, other.get(inheritedIndex + 2));
78 }
79 }
80
81}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple4.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple4.java
new file mode 100644
index 00000000..4e50f1e1
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/LeftInheritanceTuple4.java
@@ -0,0 +1,88 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Objects;
12
13/**
14 * @author Gabor Bergmann
15 * @since 1.7
16 */
17public final class LeftInheritanceTuple4 extends BaseLeftInheritanceTuple {
18 private final Object localElement0;
19 private final Object localElement1;
20 private final Object localElement2;
21 private final Object localElement3;
22
23 protected LeftInheritanceTuple4(Tuple ancestor, Object localElement0, Object localElement1, Object localElement2,
24 Object localElement3) {
25 super(ancestor);
26 this.localElement0 = localElement0;
27 this.localElement1 = localElement1;
28 this.localElement2 = localElement2;
29 this.localElement3 = localElement3;
30 calcHash();
31 }
32
33 @Override
34 public int getLocalSize() {
35 return 4;
36 }
37
38 @Override
39 public int getSize() {
40 return inheritedIndex + 4;
41 }
42
43 @Override
44 public Object get(int index) {
45 int local = index - inheritedIndex;
46 if (local < 0)
47 return ancestor.get(index);
48 else if (local == 0) return localElement0;
49 else if (local == 1) return localElement1;
50 else if (local == 2) return localElement2;
51 else if (local == 3) return localElement3;
52 else throw raiseIndexingError(index);
53 }
54
55 /**
56 * Optimized hash calculation
57 */
58 @Override
59 void calcHash() {
60 final int PRIME = 31;
61 cachedHash = ancestor.hashCode();
62 cachedHash = PRIME * cachedHash;
63 if (localElement0 != null) cachedHash += localElement0.hashCode();
64 cachedHash = PRIME * cachedHash;
65 if (localElement1 != null) cachedHash += localElement1.hashCode();
66 cachedHash = PRIME * cachedHash;
67 if (localElement2 != null) cachedHash += localElement2.hashCode();
68 cachedHash = PRIME * cachedHash;
69 if (localElement3 != null) cachedHash += localElement3.hashCode();
70 }
71
72 @Override
73 protected boolean localEquals(BaseLeftInheritanceTuple other) {
74 if (other instanceof LeftInheritanceTuple4) {
75 LeftInheritanceTuple4 lit = (LeftInheritanceTuple4)other;
76 return Objects.equals(this.localElement0, lit.localElement0) &&
77 Objects.equals(this.localElement1, lit.localElement1) &&
78 Objects.equals(this.localElement2, lit.localElement2) &&
79 Objects.equals(this.localElement3, lit.localElement3);
80 } else {
81 return (4 == other.getLocalSize()) &&
82 Objects.equals(localElement0, other.get(inheritedIndex)) &&
83 Objects.equals(localElement1, other.get(inheritedIndex + 1)) &&
84 Objects.equals(localElement2, other.get(inheritedIndex + 2)) &&
85 Objects.equals(localElement3, other.get(inheritedIndex + 3));
86 }
87 }
88}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/MaskedTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/MaskedTuple.java
new file mode 100644
index 00000000..a5d1991c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/MaskedTuple.java
@@ -0,0 +1,48 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.tuple;
11
12/**
13 * A tuple that transparently provides a masked (transformed) view of another tuple.
14 *
15 * @author Gabor Bergmann
16 * @since 2.0
17 *
18 */
19public class MaskedTuple extends Tuple {
20
21 Tuple wrapped;
22 TupleMask mask;
23
24 public MaskedTuple(Tuple wrapped, TupleMask mask) {
25 super();
26 // if (wrapped instanceof MaskedTuple) {
27 // MaskedTuple parent = (MaskedTuple)wrapped;
28 // this.wrapped = parent.wrapped;
29 // this.mask = mask.transform(parent.mask);
30 // }
31 // else
32 //{
33 this.wrapped = wrapped;
34 this.mask = mask;
35 //}
36 }
37
38 @Override
39 public Object get(int index) {
40 return wrapped.get(mask.indices[index]);
41 }
42
43 @Override
44 public int getSize() {
45 return mask.indices.length;
46 }
47
48}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuple.java
new file mode 100644
index 00000000..d94f545f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuple.java
@@ -0,0 +1,69 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.tuple;
11
12/**
13 * Immutable tuple. Obtain instances via utility class {@link Tuples}.
14 * @author Gabor Bergmann
15 *
16 */
17public abstract class Tuple extends AbstractTuple {
18
19 /**
20 * Caches precalculated hash value
21 */
22 protected int cachedHash;
23
24 /**
25 * Creates a Tuple instance Derivatives should call calcHash()
26 */
27 protected Tuple() {
28 // calcHash();
29 }
30
31 /**
32 * Hash calculation. Overrides should keep semantics.
33 */
34 void calcHash() {
35 cachedHash = doCalcHash();
36 }
37
38 @Override
39 public boolean equals(Object obj) {
40 if (this == obj)
41 return true;
42 if (obj instanceof ITuple) {
43 final ITuple other = (ITuple) obj;
44 return cachedHash == other.hashCode() && internalEquals(other);
45 }
46 return false;
47 }
48
49 @Override
50 public int hashCode() {
51 // Calculated by #calcHash
52 return cachedHash;
53 }
54
55 public Tuple replaceAll(Object obsolete, Object replacement) {
56 Object[] oldElements = getElements();
57 Object[] newElements = new Object[oldElements.length];
58 for (int i = 0; i < oldElements.length; ++i) {
59 newElements[i] = obsolete.equals(oldElements[i]) ? replacement : oldElements[i];
60 }
61 return Tuples.flatTupleOf(newElements);
62 }
63
64 @Override
65 public Tuple toImmutable() {
66 return this;
67 }
68
69}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask.java
new file mode 100644
index 00000000..49c55fef
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask.java
@@ -0,0 +1,560 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.tuple;
11
12import java.util.ArrayList;
13import java.util.Arrays;
14import java.util.Collection;
15import java.util.HashSet;
16import java.util.LinkedList;
17import java.util.List;
18import java.util.OptionalInt;
19import java.util.Set;
20
21/**
22 *
23 * Specifies select indices of a tuple. If viewed through this mask (see {@link #transform(ITuple)}), the signature of the pattern will consist of its
24 * individual substitutions at the given positions, in the exact same order as they appear in indices[].
25 *
26 * @author Gabor Bergmann
27 */
28public class TupleMask {
29 /**
30 * indices[i] specifies the index of the substitution in the original tuple that occupies the i-th place in the
31 * masked signature.
32 */
33 public final int[] indices;
34 /**
35 * the size of the tuple this mask is applied to
36 */
37 public int sourceWidth;
38 /**
39 * indicesSorted is indices, sorted in ascending order.
40 * null by default, call {@link #ensureIndicesSorted()} before using
41 */
42 int[] indicesSorted;
43
44 /**
45 * true if no index occurs twice; computed on demand by {@link #isNonrepeating()}
46 */
47 Boolean isNonrepeating;
48
49 /**
50 * Creates a TupleMask instance with the given indices array
51 * <p> indicesSorted and isNonrepeating may be OPTIONALLY given if known.
52 * @since 2.0
53 */
54 protected TupleMask(int[] indices, int sourceWidth, int[] indicesSorted, Boolean isNonrepeating) {
55 this.indices = indices;
56 this.sourceWidth = sourceWidth;
57 this.indicesSorted = indicesSorted;
58 this.isNonrepeating = isNonrepeating;
59 }
60
61 /**
62 * Creates a TupleMask instance that selects given positions.
63 * The mask takes ownership of the array selectedIndices, the client must not modify it afterwards.
64 *
65 * <p> indicesSorted and isNonrepeating may be OPTIONALLY given if known.
66 * @since 2.0
67 */
68 protected static TupleMask fromSelectedIndicesInternal(
69 int[] selectedIndices, int sourceArity,
70 int[] indicesSorted, Boolean isNonrepeating)
71 {
72 if (selectedIndices.length == 0) // is it nullary?
73 return new TupleMask0(sourceArity);
74
75 // is it identity?
76 boolean identity = sourceArity == selectedIndices.length;
77 if (identity) {
78 for (int k=0; k < sourceArity; ++k) {
79 if (selectedIndices[k] != k) {
80 identity = false;
81 break;
82 }
83 }
84 }
85 if (identity)
86 return new TupleMaskIdentity(selectedIndices, sourceArity);
87
88 // generic case
89 return new TupleMask(selectedIndices, sourceArity, indicesSorted, isNonrepeating);
90 }
91
92 /**
93 * Creates a TupleMask instance that selects given positions in monotonically increasing order.
94 * The mask takes ownership of the array selectedIndices, the client must not modify it afterwards.
95 * @since 2.0
96 */
97 protected static TupleMask fromSelectedMonotonicIndicesInternal(int[] selectedIndices, int sourceArity)
98 {
99 return fromSelectedIndicesInternal(selectedIndices, sourceArity, selectedIndices /* also sorted */, true);
100 }
101
102 /**
103 * Creates a TupleMask instance of the given size that maps the first 'size' elements intact
104 */
105 public static TupleMask linear(int size, int sourceWidth) {
106 if (size == sourceWidth) return new TupleMaskIdentity(sourceWidth);
107 int[] indices = constructLinearSequence(size);
108 return fromSelectedMonotonicIndicesInternal(indices, sourceWidth);
109 }
110
111 /**
112 * An array containing the first {@link size} nonnegative integers in order
113 * @since 2.0
114 */
115 protected static int[] constructLinearSequence(int size) {
116 int[] indices = new int[size];
117 for (int i = 0; i < size; i++)
118 indices[i] = i;
119 return indices;
120 }
121
122 /**
123 * Creates a TupleMask instance of the given size that maps every single element intact
124 */
125 public static TupleMask identity(int size) {
126 return new TupleMaskIdentity(size);
127 }
128
129 /**
130 * Creates a TupleMask instance of the given size that does not emit output.
131 */
132 public static TupleMask empty(int sourceWidth) {
133 return linear(0, sourceWidth);
134 }
135
136 /**
137 * Creates a TupleMask instance that maps the tuple intact save for a single element at the specified index which is
138 * omitted
139 */
140 public static TupleMask omit(int omission, int sourceWidth) {
141 int size = sourceWidth - 1;
142 int[] indices = new int[size];
143 for (int i = 0; i < omission; i++)
144 indices[i] = i;
145 for (int i = omission; i < size; i++)
146 indices[i] = i + 1;
147 return fromSelectedMonotonicIndicesInternal(indices, sourceWidth);
148 }
149
150
151 /**
152 * Creates a TupleMask instance that selects positions where keep is true
153 * @since 1.7
154 */
155 public static TupleMask fromKeepIndicators(boolean[] keep) {
156 int size = 0;
157 for (int k = 0; k < keep.length; ++k)
158 if (keep[k])
159 size++;
160 if (size == keep.length) return new TupleMaskIdentity(size);
161 int[] indices = new int[size];
162 int l = 0;
163 for (int k = 0; k < keep.length; ++k)
164 if (keep[k])
165 indices[l++] = k;
166 return fromSelectedMonotonicIndicesInternal(indices, keep.length);
167 }
168
169 /**
170 * Creates a TupleMask instance that selects given positions.
171 * @since 1.7
172 */
173 public static TupleMask fromSelectedIndices(int sourceArity, Collection<Integer> selectedIndices) {
174 int[] selected = integersToIntArray(selectedIndices);
175 return fromSelectedIndicesInternal(selected, sourceArity, null, null);
176 }
177 /**
178 * Creates a TupleMask instance that selects given positions.
179 * @since 1.7
180 */
181 public static TupleMask fromSelectedIndices(int sourceArity, int[] selectedIndices) {
182 return fromSelectedIndicesInternal(Arrays.copyOf(selectedIndices, selectedIndices.length), sourceArity, null, null);
183 }
184 /**
185 * Creates a TupleMask instance that selects non-null positions of a given tuple
186 * @since 1.7
187 */
188 public static TupleMask fromNonNullIndices(ITuple tuple) {
189 List<Integer> indices = new ArrayList<>();
190 for (int i=0; i < tuple.getSize(); i++) {
191 if (tuple.get(i) != null) {
192 indices.add(i);
193 }
194 }
195 if (indices.size() == tuple.getSize()) return new TupleMaskIdentity(indices.size());
196 return fromSelectedMonotonicIndicesInternal(integersToIntArray(indices), tuple.getSize());
197 }
198 /**
199 * @since 1.7
200 */
201 public static int[] integersToIntArray(Collection<Integer> selectedIndices) {
202 int[] selected = new int[selectedIndices.size()];
203 int k=0;
204 for (Integer integer : selectedIndices) {
205 selected[k++] = integer;
206 }
207 return selected;
208 }
209
210
211 /**
212 * Creates a TupleMask instance that moves an element from one index to other, shifting the others if neccessary.
213 */
214 public static TupleMask displace(int from, int to, int sourceWidth) {
215 if (from == to) return new TupleMaskIdentity(sourceWidth);
216 int[] indices = new int[sourceWidth];
217 for (int i = 0; i < sourceWidth; i++)
218 if (i == to)
219 indices[i] = from;
220 else if (i >= from && i < to)
221 indices[i] = i + 1;
222 else if (i > to && i <= from)
223 indices[i] = i - 1;
224 else
225 indices[i] = i;
226 return fromSelectedIndicesInternal(indices, sourceWidth, null, true);
227 }
228
229 /**
230 * Creates a TupleMask instance that selects a single element of the tuple.
231 */
232 public static TupleMask selectSingle(int selected, int sourceWidth) {
233 int[] indices = { selected };
234 return fromSelectedMonotonicIndicesInternal(indices, sourceWidth);
235 }
236
237 /**
238 * Creates a TupleMask instance that selects whatever is selected by left, and appends whatever is selected by
239 * right. PRE: left and right have the same sourcewidth
240 */
241 public static TupleMask append(TupleMask left, TupleMask right) {
242 int leftLength = left.indices.length;
243 int rightLength = right.indices.length;
244 int[] indices = new int[leftLength + rightLength];
245 for (int i = 0; i < leftLength; ++i)
246 indices[i] = left.indices[i];
247 for (int i = 0; i < rightLength; ++i)
248 indices[i + leftLength] = right.indices[i];
249 return fromSelectedIndicesInternal(indices, left.sourceWidth, null, null);
250 }
251
252 /**
253 * Generates indicesSorted from indices on demand
254 */
255 void ensureIndicesSorted() {
256 if (indicesSorted == null) {
257 indicesSorted = new int[indices.length];
258 List<Integer> list = new LinkedList<Integer>();
259 for (int i = 0; i < indices.length; ++i)
260 list.add(indices[i]);
261 java.util.Collections.sort(list);
262 int i = 0;
263 for (Integer a : list)
264 indicesSorted[i++] = a;
265 }
266 }
267
268
269
270 /**
271 * Returns the first index of the source that is not selected by the mask, or empty if all indices are selected.
272 * <p> PRE: mask indices are all different
273 * @since 2.0
274 */
275 public OptionalInt getFirstOmittedIndex() {
276 ensureIndicesSorted();
277 int column = 0;
278 while (column < getSize() && indicesSorted[column] == column) column++;
279 if (column < getSourceWidth()) return OptionalInt.of(column);
280 else return OptionalInt.empty();
281 }
282
283
284 /**
285 * Returns a selected masked value from the selected tuple.
286 * @pre: 0 <= index < getSize()
287 * @since 1.7
288 */
289 public Object getValue(ITuple original, int index) {
290 return original.get(indices[index]);
291 }
292
293 /**
294 * Sets the selected value in the original tuple based on the mask definition
295 *
296 * @pre: 0 <= index < getSize()
297 * @since 1.7
298 */
299 public void set(IModifiableTuple tuple, int index, Object value) {
300 tuple.set(indices[index], value);
301 }
302
303 /**
304 * Generates an immutable, masked view of the original tuple.
305 * <p> The new tuple will have arity {@link #getSize()},
306 * and will consist of the elements of the original tuple, at positions indicated by this mask.
307 * @since 1.7
308 */
309 public Tuple transform(ITuple original) {
310 switch (indices.length) {
311 case 0:
312 return FlatTuple0.INSTANCE;
313 case 1:
314 return new FlatTuple1(original.get(indices[0]));
315 case 2:
316 return new FlatTuple2(original.get(indices[0]), original.get(indices[1]));
317 case 3:
318 return new FlatTuple3(original.get(indices[0]), original.get(indices[1]), original.get(indices[2]));
319 case 4:
320 return new FlatTuple4(original.get(indices[0]), original.get(indices[1]), original.get(indices[2]), original.get(indices[3]));
321 default:
322 Object signature[] = new Object[indices.length];
323 for (int i = 0; i < indices.length; ++i)
324 signature[i] = original.get(indices[i]);
325 return new FlatTuple(signature);
326 }
327 }
328
329 /**
330 * @return true iff no two selected indices are the same
331 * @since 2.0
332 */
333 public boolean isNonrepeating() {
334 if (isNonrepeating == null) {
335 ensureIndicesSorted();
336 int previous = -1;
337 int i;
338 for (i = 0; i < sourceWidth && previous != indicesSorted[i]; ++i) {
339 previous = indicesSorted[i];
340 }
341 isNonrepeating = (i == sourceWidth); // if not, stopped due to detected repetition
342 }
343 return isNonrepeating;
344 }
345
346 /**
347 * Returns a tuple `result` that satisfies `this.transform(result).equals(masked)`. Positions of the result tuple
348 * that are not determined this way will be filled with null.
349 *
350 * @pre: all indices of the mask must be different, i.e {@link #isNonrepeating()} must return true
351 * @since 1.7
352 */
353 public Tuple revertFrom(ITuple masked) {
354 Object[] signature = new Object[sourceWidth];
355 for (int i = 0; i < indices.length; ++i)
356 signature[indices[i]] = masked.get(i);
357 return Tuples.flatTupleOf(signature);
358 }
359
360 /**
361 * Returns a tuple `result`, same arity as the original tuple, that satisfies
362 * `this.transform(result).equals(this.transform(tuple))`.
363 * Positions of the result tuple that are not determined this way will be filled with null.
364 * <p> In other words, a copy of the original tuple is returned,
365 * with null substituted at each position that is <em>not</em> selected by this mask.
366 *
367 * @pre: all indices of the mask must be different, i.e {@link #isNonrepeating()} must return true
368 * @since 2.1
369 */
370 public Tuple keepSelectedIndices(ITuple original) {
371 Object[] signature = new Object[sourceWidth];
372 for (int i = 0; i < indices.length; ++i)
373 signature[indices[i]] = original.get(indices[i]);
374 return Tuples.flatTupleOf(signature);
375 }
376
377 /**
378 * Generates an immutable, masked view of the original tuple.
379 * <p> The list will have arity {@link #getSize()},
380 * and will consist of the elements of the original tuple, at positions indicated by this mask.
381 */
382 public <T> List<T> transform(List<T> original) {
383 List<T> signature = new ArrayList<T>(indices.length);
384 for (int i = 0; i < indices.length; ++i)
385 signature.add(original.get(indices[i]));
386 return signature;
387 }
388
389 /**
390 * Transforms a given mask directly, instead of transforming tuples that were transformed by the other mask.
391 *
392 * @return a mask that cascades the effects this mask after the mask provided as parameter.
393 */
394 public TupleMask transform(TupleMask mask) {
395 int[] cascadeIndices = new int[indices.length];
396 for (int i = 0; i < indices.length; ++i)
397 cascadeIndices[i] = mask.indices[indices[i]];
398 return fromSelectedIndicesInternal(cascadeIndices, mask.sourceWidth, null, null);
399 }
400
401 // /**
402 // * Generates a complementer mask that maps those elements that were
403 // untouched by the original mask.
404 // * Ordering is left intact.
405 // * A Tuple is used for reference concerning possible equalities among
406 // elements.
407 // */
408 // public TupleMask complementer(Tuple reference)
409 // {
410 // HashSet<Object> touched = new HashSet<Object>();
411 // LinkedList<Integer> untouched = new LinkedList<Integer>();
412 //
413 // for (int index : indices) touched.add(reference.get(index));
414 // for (int index=0; index<reference.getSize(); ++index)
415 // {
416 // if (touched.add(reference.get(index))) untouched.addLast(index);
417 // }
418 //
419 // int[] complementer = new int[untouched.size()];
420 // int k = 0;
421 // for (Integer integer : untouched) complementer[k++] = integer;
422 // return new TupleMask(complementer, reference.getSize());
423 // }
424
425 /**
426 * Combines two substitutions. The new pattern will contain all substitutions of masked and unmasked, assuming that
427 * the elements of masked indicated by this mask are already matched against unmasked.
428 *
429 * POST: the result will start with an exact copy of unmasked
430 *
431 * @param unmasked
432 * primary pattern substitution that is left intact.
433 * @param masked
434 * secondary pattern substitution that is transformed to the end of the result.
435 * @param useInheritance
436 * whether to use inheritance or copy umasked into result instead.
437 * @param asComplementer
438 * whether this mask maps from the masked Tuple to the tail of the result or to the unmasked one.
439 * @return new pattern that is a combination of unmasked and masked.
440 */
441 public Tuple combine(Tuple unmasked, Tuple masked, boolean useInheritance, boolean asComplementer) {
442
443 int combinedLength = asComplementer ? indices.length : masked.getSize() - indices.length;
444 if (!useInheritance)
445 combinedLength += unmasked.getSize();
446 Object combined[] = new Object[combinedLength];
447
448 int cPos = 0;
449 if (!useInheritance) {
450 for (int i = 0; i < unmasked.getSize(); ++i)
451 combined[cPos++] = unmasked.get(i);
452 }
453
454 if (asComplementer) {
455 for (int i = 0; i < indices.length; ++i)
456 combined[cPos++] = masked.get(indices[i]);
457 } else {
458 ensureIndicesSorted();
459 int mPos = 0;
460 for (int i = 0; i < masked.getSize(); ++i)
461 if (mPos < indicesSorted.length && i == indicesSorted[mPos])
462 mPos++;
463 else
464 combined[cPos++] = masked.get(i);
465 }
466
467 return useInheritance ? Tuples.leftInheritanceTupleOf(unmasked, combined) : Tuples.flatTupleOf(combined);
468 }
469
470 @Override
471 public int hashCode() {
472 final int PRIME = 31;
473 int result = sourceWidth;
474 for (int i : indices)
475 result = PRIME * result + i;
476 return result;
477 }
478
479 @Override
480 public boolean equals(Object obj) {
481 if (this == obj)
482 return true;
483 if (obj == null)
484 return false;
485 if (getClass() != obj.getClass())
486 return false;
487 final TupleMask other = (TupleMask) obj;
488 if (sourceWidth != other.sourceWidth)
489 return false;
490 if (indices.length != other.indices.length)
491 return false;
492 for (int k = 0; k < indices.length; k++)
493 if (indices[k] != other.indices[k])
494 return false;
495 return true;
496 }
497
498 @Override
499 public String toString() {
500 StringBuilder s = new StringBuilder();
501 s.append("M(" + sourceWidth + "->");
502 for (int i : indices) {
503 s.append(i);
504 s.append(',');
505 }
506 s.append(')');
507 return s.toString();
508 }
509
510 /**
511 * Returns the size of the masked tuples described by this mask
512 * @since 1.7
513 */
514 public int getSize() {
515 return indices.length;
516 }
517
518 /**
519 * Returns the size of the original tuples handled by this mask
520 * @since 1.7
521 */
522 public int getSourceWidth() {
523 return sourceWidth;
524 }
525
526
527 /**
528 * @return true iff this mask is a no-op
529 * @since 2.0
530 */
531 public boolean isIdentity() {
532 // Contract: if identity mask, a specialized subclass is constructed instead
533 return false;
534 }
535
536 /**
537 * Transforms the given list by applying the mask and putting all results into a set; keeping only a single element
538 * in case of the mapping result in duplicate values.
539 *
540 * @since 1.7
541 */
542 public <T> Set<T> transformUnique(List<T> original) {
543 Set<T> signature = new HashSet<>();
544 for (int i = 0; i < indices.length; ++i)
545 signature.add(original.get(indices[i]));
546 return signature;
547 }
548
549 /**
550 * @return the list of selected indices
551 * @since 2.1
552 */
553 public List<Integer> getIndicesAsList() {
554 List<Integer> result = new ArrayList<Integer>(indices.length);
555 for (int i = 0; i < indices.length; ++i)
556 result.add(indices[i]);
557 return result;
558 }
559
560}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask0.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask0.java
new file mode 100644
index 00000000..5a0c79ff
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMask0.java
@@ -0,0 +1,56 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Collections;
12import java.util.List;
13
14/**
15 * @author Gabor Bergmann
16 * @since 1.7
17 */
18public final class TupleMask0 extends TupleMask {
19
20 private final static int[] EMPTY_ARRAY = {};
21
22 /**
23 * PRE: indices.length == 0
24 */
25 TupleMask0(int sourceWidth) {
26 super(EMPTY_ARRAY, sourceWidth, EMPTY_ARRAY, true);
27 }
28
29 @Override
30 public <T> List<T> transform(List<T> original) {
31 return Collections.emptyList();
32 }
33
34 @Override
35 public Tuple transform(ITuple original) {
36 return Tuples.staticArityFlatTupleOf();
37 }
38
39 @Override
40 public TupleMask transform(TupleMask mask) {
41 return new TupleMask0(mask.sourceWidth);
42 }
43
44 @Override
45 public Tuple combine(Tuple unmasked, Tuple masked, boolean useInheritance, boolean asComplementer) {
46 if (asComplementer)
47 return unmasked;
48 else
49 return super.combine(unmasked, masked, useInheritance, asComplementer);
50 }
51
52 @Override
53 public boolean isIdentity() {
54 return 0 == sourceWidth;
55 }
56}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMaskIdentity.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMaskIdentity.java
new file mode 100644
index 00000000..62746587
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleMaskIdentity.java
@@ -0,0 +1,51 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.List;
12
13/**
14 * @author Gabor Bergmann
15 * @since 1.7
16 */
17public final class TupleMaskIdentity extends TupleMask {
18
19 TupleMaskIdentity(int sourceWidth) {
20 this(constructLinearSequence(sourceWidth), sourceWidth);
21 }
22 TupleMaskIdentity(int[] indices, int sourceWidth) {
23 super(indices, sourceWidth, indices, true);
24 }
25
26 @Override
27 public <T> List<T> transform(List<T> original) {
28 return original;
29 }
30
31 @Override
32 public Tuple transform(ITuple original) {
33 return original.toImmutable();
34 }
35
36 @Override
37 public TupleMask transform(TupleMask mask) {
38 return mask;
39 }
40
41 @Override
42 public Tuple revertFrom(ITuple masked) {
43 return masked.toImmutable();
44 }
45
46 @Override
47 public boolean isIdentity() {
48 return true;
49 }
50
51}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleValueProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleValueProvider.java
new file mode 100644
index 00000000..79193516
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/TupleValueProvider.java
@@ -0,0 +1,48 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import java.util.Map;
12
13import tools.refinery.viatra.runtime.matchers.psystem.IValueProvider;
14
15/**
16 * @author Zoltan Ujhelyi
17 * @since 1.7
18 */
19public class TupleValueProvider implements IValueProvider {
20
21 final ITuple tuple;
22 final Map<String, Integer> indexMapping;
23
24 /**
25 * Wraps a tuple with an index mapping
26 * @param tuple
27 * @param indexMapping
28 */
29 public TupleValueProvider(ITuple tuple, Map<String, Integer> indexMapping) {
30 super();
31 this.tuple = tuple;
32 this.indexMapping = indexMapping;
33 }
34
35 @Override
36 public Object getValue(String variableName) {
37 Integer index = indexMapping.get(variableName);
38 if (index == null) {
39 throw new IllegalArgumentException(String.format("Variable %s is not present in mapping.", variableName));
40 }
41 Object value = tuple.get(index);
42 if (value == null) {
43 throw new IllegalArgumentException(String.format("Variable %s is not found using index %d.", variableName, index));
44 }
45 return value;
46 }
47
48}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuples.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuples.java
new file mode 100644
index 00000000..5e41d7d8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/Tuples.java
@@ -0,0 +1,157 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11/**
12 * Common static factory utilities for tuples.
13 *
14 * @author Gabor Bergmann
15 * @since 1.7
16 */
17public class Tuples {
18
19 private Tuples() {
20 // Empty utility class constructor
21 }
22
23 /**
24 * Creates a flat tuple consisting of the given elements.
25 * For low-arity tuples, specialized implementations
26 * (such as {@link FlatTuple2}) will be instantiated.
27 *
28 * <p> In case the exact arity is <i>statically</i> known,
29 * it may be more efficient for the client to instantiate
30 * the appropriate specialized implementation
31 * (via {@link #staticArityFlatTupleOf(Object, Object)} etc.
32 * or {@link #wideFlatTupleOf(Object...)}),
33 * instead of invoking this method.
34 * This method does a runtime arity check, and therefore
35 * also appropriate if the arity is determined at runtime.
36 */
37 public static Tuple flatTupleOf(Object... elements) {
38 switch (elements.length) {
39 case 0:
40 return FlatTuple0.INSTANCE;
41 case 1:
42 return new FlatTuple1(elements[0]);
43 case 2:
44 return new FlatTuple2(elements[0], elements[1]);
45 case 3:
46 return new FlatTuple3(elements[0], elements[1], elements[2]);
47 case 4:
48 return new FlatTuple4(elements[0], elements[1], elements[2], elements[3]);
49 default:
50 return new FlatTuple(elements);
51 }
52 }
53 /**
54 * Creates a left inheritance tuple that extends an ancestor tuple
55 * by the given "local" elements.
56 * For locally low-arity tuples, specialized implementations
57 * (such as {@link LeftInheritanceTuple2}) will be instantiated.
58 *
59 * <p> In case the exact arity is <i>statically</i> known,
60 * it may be more efficient for the client to instantiate
61 * the appropriate specialized implementation
62 * (via {@link #staticArityLeftInheritanceTupleOf(Object, Object)} etc.
63 * or {@link #wideLeftInheritanceTupleOf(Object...)}),
64 * instead of invoking this method.
65 * This method does a runtime arity check, and therefore
66 * also appropriate if the arity is determined at runtime.
67 */
68 public static Tuple leftInheritanceTupleOf(Tuple ancestor, Object... localElements) {
69 switch (localElements.length) {
70 case 0:
71 return ancestor;
72 case 1:
73 return new LeftInheritanceTuple1(ancestor, localElements[0]);
74 case 2:
75 return new LeftInheritanceTuple2(ancestor, localElements[0], localElements[1]);
76 case 3:
77 return new LeftInheritanceTuple3(ancestor, localElements[0], localElements[1], localElements[2]);
78 case 4:
79 return new LeftInheritanceTuple4(ancestor, localElements[0], localElements[1], localElements[2], localElements[3]);
80 default:
81 return new LeftInheritanceTuple(ancestor, localElements);
82 }
83 }
84
85 /**
86 * Creates a flat tuple consisting of no elements.
87 */
88 public static Tuple staticArityFlatTupleOf() {
89 return FlatTuple0.INSTANCE;
90 }
91 /**
92 * Creates a flat tuple consisting of the given single element.
93 */
94 public static Tuple staticArityFlatTupleOf(Object element) {
95 return new FlatTuple1(element);
96 }
97 /**
98 * Creates a flat tuple consisting of the given elements.
99 */
100 public static Tuple staticArityFlatTupleOf(Object element0, Object element1) {
101 return new FlatTuple2(element0, element1);
102 }
103 /**
104 * Creates a flat tuple consisting of the given elements.
105 */
106 public static Tuple staticArityFlatTupleOf(Object element0, Object element1, Object element2) {
107 return new FlatTuple3(element0, element1, element2);
108 }
109 /**
110 * Creates a flat tuple consisting of the given elements.
111 */
112 public static Tuple staticArityFlatTupleOf(Object element0, Object element1, Object element2, Object element3) {
113 return new FlatTuple4(element0, element1, element2, element3);
114 }
115 /**
116 * Creates a flat tuple consisting of the given elements.
117 * <p> Invoke this only if it is statically known that the tuple will be wide.
118 * Otherwise, use {@link #flatTupleOf(Object...)}.
119 */
120 public static Tuple wideFlatTupleOf(Object... elements) {
121 return new FlatTuple(elements);
122 }
123
124 /**
125 * Creates a left inheritance tuple consisting of the given single local element.
126 */
127 public static Tuple staticArityLeftInheritanceTupleOf(Tuple ancestor, Object element) {
128 return new LeftInheritanceTuple1(ancestor, element);
129 }
130 /**
131 * Creates a left inheritance tuple consisting of the given local elements.
132 */
133 public static Tuple staticArityLeftInheritanceTupleOf(Tuple ancestor, Object element0, Object element1) {
134 return new LeftInheritanceTuple2(ancestor, element0, element1);
135 }
136 /**
137 * Creates a left inheritance tuple consisting of the given local elements.
138 */
139 public static Tuple staticArityLeftInheritanceTupleOf(Tuple ancestor, Object element0, Object element1, Object element2) {
140 return new LeftInheritanceTuple3(ancestor, element0, element1, element2);
141 }
142 /**
143 * Creates a left inheritance tuple consisting of the given local elements.
144 */
145 public static Tuple staticArityLeftInheritanceTupleOf(Tuple ancestor, Object element0, Object element1, Object element2, Object element3) {
146 return new LeftInheritanceTuple4(ancestor, element0, element1, element2, element3);
147 }
148 /**
149 * Creates a left inheritance tuple consisting of the given local elements.
150 * <p> Invoke this only if it is statically known that the tuple will be wide.
151 * Otherwise, use {@link #leftInheritanceTupleOf(Tuple, Object...)}.
152 */
153 public static Tuple wideLeftInheritanceTupleOf(Tuple ancestor, Object... elements) {
154 return new LeftInheritanceTuple(ancestor, elements);
155 }
156
157}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileMaskedTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileMaskedTuple.java
new file mode 100644
index 00000000..f683d544
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileMaskedTuple.java
@@ -0,0 +1,50 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import tools.refinery.viatra.runtime.matchers.util.Preconditions;
12
13/**
14 * This class provides a volatile tuple view with a given mask of a given tuple instance. If the masked tuple changes,
15 * the view updates as well.
16 *
17 * @author Zoltan Ujhelyi
18 * @since 1.7
19 *
20 */
21public class VolatileMaskedTuple extends VolatileTuple {
22
23 protected final TupleMask mask;
24 protected ITuple source;
25
26 public VolatileMaskedTuple(ITuple source, TupleMask mask) {
27 this.source = source;
28 this.mask = mask;
29 }
30
31 public VolatileMaskedTuple(TupleMask mask) {
32 this(null, mask);
33 }
34
35 public void updateTuple(ITuple newSource) {
36 source = newSource;
37 }
38
39 @Override
40 public Object get(int index) {
41 Preconditions.checkState(source != null, "Source tuple is not set.");
42 return mask.getValue(source, index);
43 }
44
45 @Override
46 public int getSize() {
47 return mask.getSize();
48 }
49
50}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileModifiableMaskedTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileModifiableMaskedTuple.java
new file mode 100644
index 00000000..92306c6e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileModifiableMaskedTuple.java
@@ -0,0 +1,47 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.tuple;
10
11import tools.refinery.viatra.runtime.matchers.util.Preconditions;
12
13/**
14 * A masked tuple implementation that allows modifying the backing tuple.
15 * @author Zoltan Ujhelyi
16 * @since 1.7
17 *
18 */
19public class VolatileModifiableMaskedTuple extends VolatileMaskedTuple implements IModifiableTuple {
20
21 private IModifiableTuple modifiableTuple;
22
23 public VolatileModifiableMaskedTuple(IModifiableTuple source, TupleMask mask) {
24 super(source, mask);
25 modifiableTuple = source;
26 }
27
28 public VolatileModifiableMaskedTuple(TupleMask mask) {
29 this(null, mask);
30 }
31
32 @Override
33 public void updateTuple(ITuple newSource) {
34 Preconditions.checkArgument(newSource instanceof IModifiableTuple, "Provided tuple does not support updates");
35 this.updateTuple((IModifiableTuple)newSource);
36 }
37
38 public void updateTuple(IModifiableTuple newSource) {
39 super.updateTuple(newSource);
40 modifiableTuple = newSource;
41 }
42
43 @Override
44 public void set(int index, Object value) {
45 mask.set(modifiableTuple, index, value);
46 }
47}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java
new file mode 100644
index 00000000..699105a5
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java
@@ -0,0 +1,47 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017 Zoltan Ujhelyi, IncQuery Labs
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.tuple;
11
12/**
13 * Mutable tuple without explicit modification commands. In practical terms, the values stored in a volatile tuple can
14 * be changed without any notification.
15 *
16 * @author Zoltan Ujhelyi
17 * @since 1.7
18 *
19 */
20public abstract class VolatileTuple extends AbstractTuple {
21
22 @Override
23 public boolean equals(Object obj) {
24 if (this == obj)
25 return true;
26 if (obj == null)
27 return false;
28 if (!(obj instanceof ITuple))
29 return false;
30 final ITuple other = (ITuple) obj;
31 return internalEquals(other);
32 }
33
34 @Override
35 public int hashCode() {
36 return doCalcHash();
37 }
38
39 /**
40 * Creates an immutable tuple from the values stored in the tuple. The created tuple will not be updated when the
41 * current tuple changes.
42 */
43 @Override
44 public Tuple toImmutable() {
45 return Tuples.flatTupleOf(getElements());
46 }
47}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Accuracy.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Accuracy.java
new file mode 100644
index 00000000..338990ab
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Accuracy.java
@@ -0,0 +1,48 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * The degree of accuracy of a cardinality estimate
13 * @author Gabor Bergmann
14 * @since 2.1
15 */
16public enum Accuracy {
17 EXACT_COUNT,
18 BEST_UPPER_BOUND,
19 BEST_LOWER_BOUND,
20 APPROXIMATION;
21
22 /**
23 * Partial order comparison.
24 */
25 public boolean atLeastAsPreciseAs(Accuracy other) {
26 switch (this) {
27 case EXACT_COUNT: return true;
28 case APPROXIMATION: return APPROXIMATION == other;
29 case BEST_UPPER_BOUND: return BEST_UPPER_BOUND == other || APPROXIMATION == other;
30 case BEST_LOWER_BOUND: return BEST_LOWER_BOUND == other || APPROXIMATION == other;
31 default: throw new IllegalArgumentException();
32 }
33 }
34
35 /**
36 * @return another accuracy value that is anti-monotonic to this one,
37 * i.e. an accuracy that should be used in the denominator to obtain a fraction with this accuracy
38 */
39 public Accuracy reciprocal() {
40 switch(this) {
41 case APPROXIMATION: return APPROXIMATION;
42 case BEST_UPPER_BOUND: return BEST_LOWER_BOUND;
43 case BEST_LOWER_BOUND: return BEST_UPPER_BOUND;
44 case EXACT_COUNT: return EXACT_COUNT;
45 default: throw new IllegalArgumentException();
46 }
47 }
48}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Clearable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Clearable.java
new file mode 100644
index 00000000..1b09aec6
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Clearable.java
@@ -0,0 +1,23 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.util;
11
12/**
13 * @author Gabor Bergmann
14 * @since 1.7
15 * An instance of clearable pattern memory.
16 */
17public interface Clearable {
18 /**
19 * Clear all partial matchings stored in memory
20 *
21 */
22 void clear();
23}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/CollectionsFactory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/CollectionsFactory.java
new file mode 100644
index 00000000..590a1ec3
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/CollectionsFactory.java
@@ -0,0 +1,188 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Collection;
12import java.util.List;
13import java.util.Map;
14import java.util.Set;
15import java.util.TreeMap;
16import java.util.function.Function;
17
18/**
19 * Factory class used as an accessor to Collections implementations.
20 * @author istvanrath
21 */
22public final class CollectionsFactory
23{
24
25 /**
26 * Instantiates a new empty map.
27 * @since 1.7
28 */
29 public static <K, V> Map<K, V> createMap() {
30 return FRAMEWORK.createMap();
31 }
32
33 /**
34 * Instantiates a new map with the given initial contents.
35 * @since 1.7
36 */
37 public static <K, V> Map<K, V> createMap(Map<K, V> initial) {
38 return FRAMEWORK.createMap(initial);
39 }
40
41 /**
42 * Instantiates a new tree map.
43 * @since 2.3
44 */
45 public static <K, V> TreeMap<K, V> createTreeMap() {
46 return FRAMEWORK.createTreeMap();
47 }
48
49 /**
50 * Instantiates a new empty set.
51 * @since 1.7
52 */
53 public static <E> Set<E> createSet() {
54 return FRAMEWORK.createSet();
55 }
56
57 /**
58 * Instantiates a new set with the given initial contents.
59 * @since 1.7
60 */
61 public static <E> Set<E> createSet(Collection<E> initial) {
62 return FRAMEWORK.createSet(initial);
63 }
64
65 /**
66 * Instantiates an empty set; the key parameter is used to allow using this as a method reference as a
67 * {@link Function}, e.g. in {@link Map#computeIfAbsent(Object, Function)}.
68 *
69 * @param key
70 * the value of this parameter is ignored
71 * @since 2.0
72 */
73 public static <T> Set<T> emptySet(Object key) {
74 return FRAMEWORK.createSet();
75 }
76
77 /**
78 * Instantiates a new empty multiset.
79 * @since 1.7
80 */
81 public static <T> IMultiset<T> createMultiset() {
82 return FRAMEWORK.createMultiset();
83 }
84
85 /**
86 * Instantiates an empty multiset; the key parameter is used to allow using this as a method reference as a
87 * {@link Function}, e.g. in {@link Map#computeIfAbsent(Object, Function)}.
88 *
89 * @param key
90 * the value of this parameter is ignored
91 * @since 2.0
92 */
93 public static <T> IMultiset<T> emptyMultiset(Object key) {
94 return FRAMEWORK.createMultiset();
95 }
96
97 /**
98 * Instantiates a new empty delta bag.
99 * @since 1.7
100 */
101 public static <T> IDeltaBag<T> createDeltaBag() {
102 return FRAMEWORK.createDeltaBag();
103 }
104
105 /**
106 * Instantiates a new list that is optimized for registering observers / callbacks.
107 * @since 1.7
108 */
109 public static <O> List<O> createObserverList() {
110 return FRAMEWORK.createObserverList();
111 }
112
113 /**
114 * Instantiates a size-optimized multimap from keys to sets of values.
115 * <p>For a single key, many values can be associated according to the given bucket semantics.
116 * <p>The keys and values are stored as type fromKeys resp. ofValues;
117 * currently Object.class and Long.class are supported.
118 * @since 2.0
119 */
120 public static <K, V> IMultiLookup<K, V> createMultiLookup(
121 Class<? super K> fromKeys, MemoryType toBuckets, Class<? super V> ofValues) {
122 return FRAMEWORK.createMultiLookup(fromKeys, toBuckets, ofValues);
123 }
124
125 /**
126 * Instantiates a memory storing values.
127 * <p>For a single key, many values can be associated according to the given memory semantics.
128 * <p>The values are stored as type 'values';
129 * currently Object.class and Long.class are supported.
130 * @since 2.0
131 */
132 public static <T> IMemory<T> createMemory(
133 Class<? super T> values, MemoryType memoryType) {
134 return FRAMEWORK.createMemory(values, memoryType);
135 }
136
137 /**
138 * The type of {@link IMemory}
139 * @since 2.0
140 * TODO add delta as type
141 */
142 public enum MemoryType {
143 /**
144 * A single key-value pair is stored at most once
145 */
146 SETS,
147 /**
148 * Duplicate key-value pairs allowed
149 */
150 MULTISETS
151 }
152
153 /**
154 * The collections framework of the current configuration.
155 * @since 1.7
156 */
157 private static final ICollectionsFramework FRAMEWORK = new EclipseCollectionsFactory();
158
159 /**
160 * Interface abstracting over a collections technology that provides custom collection implementations.
161 * @since 1.7
162 */
163 public static interface ICollectionsFramework {
164
165 public abstract <K,V> Map<K,V> createMap();
166 public abstract <K,V> Map<K,V> createMap(Map<K,V> initial);
167 /**
168 * @since 2.3
169 */
170 public abstract <K, V> TreeMap<K, V> createTreeMap();
171 public abstract <E> Set<E> createSet();
172 public abstract <E> Set<E> createSet(Collection<E> initial);
173 public abstract <T> IMultiset<T> createMultiset();
174 public abstract <T> IDeltaBag<T> createDeltaBag();
175 public abstract <O> List<O> createObserverList();
176
177 /**
178 * @since 2.0
179 */
180 public abstract <K, V> IMultiLookup<K, V> createMultiLookup(
181 Class<? super K> fromKeys, MemoryType toBuckets, Class<? super V> ofValues);
182 /**
183 * @since 2.0
184 */
185 public abstract <T> IMemory<T> createMemory(Class<? super T> values, MemoryType memoryType);
186 }
187
188} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Direction.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Direction.java
new file mode 100644
index 00000000..88f7ec00
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Direction.java
@@ -0,0 +1,61 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * Indicates whether a propagated update event signals the insertion or deletion of an element
13 *
14 * @author Gabor Bergmann
15 */
16public enum Direction {
17 INSERT, DELETE;
18
19 /**
20 * @since 2.4
21 */
22 public Direction opposite() {
23 switch (this) {
24 case INSERT:
25 return DELETE;
26 default:
27 return INSERT;
28 }
29 }
30
31 /**
32 * @since 2.4
33 */
34 public char asSign() {
35 switch (this) {
36 case INSERT:
37 return '+';
38 default:
39 return '-';
40 }
41 }
42
43 /**
44 * Returns the direction that is the product of this direction and the other direction.
45 *
46 * DELETE x DELETE = INSERT
47 * DELETE x INSERT = DELETE
48 * INSERT x DELETE = DELETE
49 * INSERT x INSERT = INSERT
50 * @since 2.4
51 */
52 public Direction multiply(final Direction other) {
53 switch (this) {
54 case DELETE:
55 return other.opposite();
56 default:
57 return other;
58 }
59 }
60
61}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsBagMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsBagMemory.java
new file mode 100644
index 00000000..e24b2448
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsBagMemory.java
@@ -0,0 +1,86 @@
1/*******************************************************************************
2 * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9
10package tools.refinery.viatra.runtime.matchers.util;
11
12import java.util.Iterator;
13import java.util.Set;
14import java.util.function.BiConsumer;
15
16import org.eclipse.collections.impl.map.mutable.primitive.ObjectIntHashMap;
17
18/**
19 * Eclipse Collections-based multiset for tuples. Can contain duplicate occurrences of the same matching.
20 *
21 * <p>Inherits Eclipse Collections' Object-to-Int primitive hashmap and counts the number of occurrences of each value.
22 * Element is deleted if # of occurences drops to 0.
23 *
24 * @author Gabor Bergmann.
25 * @since 1.7
26 * @noreference
27 */
28public abstract class EclipseCollectionsBagMemory<T> extends ObjectIntHashMap<T> implements IMemory<T> {
29
30 public EclipseCollectionsBagMemory() {
31 super();
32 }
33
34 @Override
35 public int getCount(T value) {
36 return super.getIfAbsent(value, 0);
37 }
38 @Override
39 public int getCountUnsafe(Object value) {
40 return super.getIfAbsent(value, 0);
41 }
42 @Override
43 public boolean containsNonZero(T value) {
44 return super.containsKey(value);
45 }
46 @Override
47 public boolean containsNonZeroUnsafe(Object value) {
48 return super.containsKey(value);
49 }
50
51 @Override
52 public void clearAllOf(T value) {
53 super.remove(value);
54 }
55
56
57 @Override
58 public Iterator<T> iterator() {
59 return super.keySet().iterator();
60 }
61
62 @Override
63 public String toString() {
64 return "TM" + super.toString();
65 }
66
67 @Override
68 public Set<T> distinctValues() {
69 return super.keySet();
70 }
71
72 @Override
73 public void forEachEntryWithMultiplicities(BiConsumer<T, Integer> entryConsumer) {
74 super.forEachKeyValue(entryConsumer::accept);
75 }
76
77 @Override
78 public int hashCode() {
79 return IMemoryView.hashCode(this);
80 }
81 @Override
82 public boolean equals(Object obj) {
83 return IMemoryView.equals(this, obj);
84 }
85
86}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsDeltaBag.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsDeltaBag.java
new file mode 100644
index 00000000..94ec33cd
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsDeltaBag.java
@@ -0,0 +1,41 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * @author Gabor Bergmann
13 * @since 1.7
14 */
15public class EclipseCollectionsDeltaBag<T> extends EclipseCollectionsBagMemory<T> implements IDeltaBag<T> {
16
17 @Override
18 public boolean addOne(T value) {
19 return addSigned(value, +1);
20 }
21
22 @Override
23 public boolean addSigned(T value, int count) {
24 int oldCount = super.getIfAbsent(value, 0);
25 int newCount = oldCount + count;
26
27 boolean becomesZero = newCount == 0;
28 if (becomesZero)
29 super.removeKey(value);
30 else
31 super.put(value, newCount);
32
33 return becomesZero || oldCount == 0;
34 }
35
36
37 @Override
38 public boolean removeOne(T value) {
39 return addSigned(value, -1);
40 }
41}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsFactory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsFactory.java
new file mode 100644
index 00000000..5a623c9b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsFactory.java
@@ -0,0 +1,159 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.List;
14import java.util.Map;
15import java.util.Set;
16import java.util.TreeMap;
17
18import org.eclipse.collections.api.map.MutableMap;
19import org.eclipse.collections.impl.factory.Maps;
20import org.eclipse.collections.impl.factory.Sets;
21import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.ICollectionsFramework;
22import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
23
24/**
25 * @author Gabor Bergmann
26 * @since 1.7
27 * @noreference This class is not intended to be referenced by clients.
28 */
29public class EclipseCollectionsFactory implements ICollectionsFramework {
30
31 @Override
32 public <K, V> Map<K, V> createMap() {
33 return Maps.mutable.empty();
34 }
35
36 @Override
37 public <K, V> Map<K, V> createMap(Map<K, V> initial) {
38 MutableMap<K, V> result = Maps.mutable.ofInitialCapacity(initial.size());
39 result.putAll(initial);
40 return result;
41 }
42
43 @Override
44 public <K, V> TreeMap<K, V> createTreeMap() {
45 // eclipse collections is doing the same
46 return new TreeMap<>();
47 }
48
49 @Override
50 public <E> Set<E> createSet() {
51 return Sets.mutable.empty();
52 }
53
54 @Override
55 public <E> Set<E> createSet(Collection<E> initial) {
56 return Sets.mutable.ofAll(initial);
57 }
58
59 @Override
60 public <T> IMultiset<T> createMultiset() {
61 return new EclipseCollectionsMultiset<T>();
62 }
63
64 @Override
65 public <T> IDeltaBag<T> createDeltaBag() {
66 return new EclipseCollectionsDeltaBag<T>();
67 }
68
69 @Override
70 public <O> List<O> createObserverList() {
71 return new ArrayList<O>(1); // keep concurrent modification exceptions for error detection
72 // Lists.mutable.empty
73
74 }
75
76 @Override
77 @SuppressWarnings({ "unchecked", "rawtypes" })
78 public <K, V> IMultiLookup<K, V> createMultiLookup(
79 Class<? super K> fromKeys,
80 MemoryType toBuckets,
81 Class<? super V> ofValues)
82 {
83 boolean longKeys = Long.class.equals(fromKeys);
84 boolean objectKeys = Object.class.equals(fromKeys);
85 if (! (longKeys || objectKeys)) throw new IllegalArgumentException(fromKeys.getName());
86 boolean longValues = Long.class.equals(ofValues);
87 boolean objectValues = Object.class.equals(ofValues);
88 if (! (longValues || objectValues)) throw new IllegalArgumentException(ofValues.getName());
89
90 if (longKeys) { // K == java.lang.Long
91 if (longValues) { // V == java.lang.Long
92 switch(toBuckets) {
93 case MULTISETS:
94 return (IMultiLookup<K, V>) new EclipseCollectionsMultiLookup.FromLongs.ToMultisets.OfLongs();
95 case SETS:
96 return (IMultiLookup<K, V>) new EclipseCollectionsMultiLookup.FromLongs.ToSets.OfLongs();
97 default:
98 throw new IllegalArgumentException(toBuckets.toString());
99 }
100 } else { // objectValues
101 switch(toBuckets) {
102 case MULTISETS:
103 return new EclipseCollectionsMultiLookup.FromLongs.ToMultisets.OfObjects();
104 case SETS:
105 return new EclipseCollectionsMultiLookup.FromLongs.ToSets.OfObjects();
106 default:
107 throw new IllegalArgumentException(toBuckets.toString());
108 }
109 }
110 } else { // objectKeys
111 if (longValues) { // V == java.lang.Long
112 switch(toBuckets) {
113 case MULTISETS:
114 return new EclipseCollectionsMultiLookup.FromObjects.ToMultisets.OfLongs();
115 case SETS:
116 return new EclipseCollectionsMultiLookup.FromObjects.ToSets.OfLongs();
117 default:
118 throw new IllegalArgumentException(toBuckets.toString());
119 }
120 } else { // objectValues
121 switch(toBuckets) {
122 case MULTISETS:
123 return new EclipseCollectionsMultiLookup.FromObjects.ToMultisets.OfObjects();
124 case SETS:
125 return new EclipseCollectionsMultiLookup.FromObjects.ToSets.OfObjects();
126 default:
127 throw new IllegalArgumentException(toBuckets.toString());
128 }
129 }
130 }
131 }
132
133 @Override
134 @SuppressWarnings("unchecked")
135 public <T> IMemory<T> createMemory(Class<? super T> values, MemoryType memoryType) {
136 if (Long.class.equals(values)) { // T == java.lang.Long
137 switch(memoryType) {
138 case MULTISETS:
139 return (IMemory<T>) new EclipseCollectionsLongMultiset();
140 case SETS:
141 return (IMemory<T>) new EclipseCollectionsLongSetMemory();
142 default:
143 throw new IllegalArgumentException(memoryType.toString());
144 }
145 } else { // objectValues
146 switch(memoryType) {
147 case MULTISETS:
148 return new EclipseCollectionsMultiset<>();
149 case SETS:
150 return new EclipseCollectionsSetMemory<>();
151 default:
152 throw new IllegalArgumentException(memoryType.toString());
153 }
154 }
155 }
156
157
158
159}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongMultiset.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongMultiset.java
new file mode 100644
index 00000000..88773c5d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongMultiset.java
@@ -0,0 +1,150 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Iterator;
12import java.util.Set;
13import java.util.function.BiConsumer;
14
15import org.eclipse.collections.impl.map.mutable.primitive.LongIntHashMap;
16
17/**
18 * @author Gabor Bergmann
19 * @since 2.0
20 * <p> TODO refactor common methods with {@link EclipseCollectionsMultiset}
21 * <p> TODO refactor into LongBagMemory etc.
22 */
23public class EclipseCollectionsLongMultiset extends LongIntHashMap implements IMultiset<Long> {
24
25 @Override
26 public boolean addOne(Long value) {
27 int oldCount = super.getIfAbsent(value, 0);
28
29 super.put(value, oldCount + 1);
30
31 return oldCount == 0;
32 }
33
34 @Override
35 public boolean addSigned(Long value, int count) {
36 int oldCount = super.getIfAbsent(value, 0);
37 int newCount = oldCount + count;
38
39 boolean becomesZero = newCount == 0;
40 if (newCount < 0)
41 throw new IllegalStateException(String.format(
42 "Cannot remove %d occurrences of value '%s' as only %d would remain in %s",
43 count, value, newCount, this));
44 else if (becomesZero)
45 super.removeKey(value);
46 else // (newCount > 0)
47 super.put(value, newCount);
48
49 return becomesZero || oldCount == 0;
50 }
51
52 @Override
53 public boolean removeOne(Long value) {
54 return removeOneInternal(value, true);
55 }
56 /**
57 * @since 2.3
58 */
59 @Override
60 public boolean removeOneOrNop(Long value) {
61 return removeOneInternal(value, false);
62 }
63
64
65 /**
66 * @since 2.3
67 */
68 protected boolean removeOneInternal(Long value, boolean throwIfImpossible) {
69 int oldCount = super.getIfAbsent(value, 0);
70 if (oldCount == 0) {
71 if (throwIfImpossible) throw new IllegalStateException(String.format(
72 "Cannot remove value '%s' that is not contained in %s",
73 value, this));
74 else return false;
75 }
76
77 int rest = oldCount - 1;
78 boolean empty = rest == 0;
79
80 if (!empty) {
81 super.put(value, rest);
82 } else {
83 super.remove(value);
84 }
85
86 return empty;
87 }
88
89 @Override
90 public void clearAllOf(Long value) {
91 super.remove(value);
92 }
93
94 @Override
95 public int getCount(Long value) {
96 return super.getIfAbsent(value, 0);
97 }
98 @Override
99 public int getCountUnsafe(Object value) {
100 return value instanceof Long ? getCount((Long) value) : 0;
101 }
102
103 @Override
104 public boolean containsNonZero(Long value) {
105 return super.containsKey(value);
106 }
107
108 @Override
109 public boolean containsNonZeroUnsafe(Object value) {
110 return value instanceof Long && containsNonZero((Long) value);
111 }
112
113 @Override
114 public Iterator<Long> iterator() {
115 return EclipseCollectionsLongSetMemory.iteratorOf(super.keySet());
116 }
117
118 @Override
119 public boolean addPositive(Long value, int count) {
120 if (count < 0) {
121 throw new IllegalArgumentException("The count value must be positive!");
122 }
123
124 int oldCount = super.getIfAbsent(value, 0);
125
126 super.put(value, oldCount + count);
127
128 return oldCount == 0;
129 }
130
131 @Override
132 public Set<Long> distinctValues() {
133 return new EclipseCollectionsLongSetMemory.SetWrapper(super.keySet());
134 }
135
136 @Override
137 public void forEachEntryWithMultiplicities(BiConsumer<Long, Integer> entryConsumer) {
138 super.forEachKeyValue(entryConsumer::accept);
139 }
140
141 @Override
142 public int hashCode() {
143 return IMemoryView.hashCode(this);
144 }
145 @Override
146 public boolean equals(Object obj) {
147 return IMemoryView.equals(this, obj);
148 }
149
150}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongSetMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongSetMemory.java
new file mode 100644
index 00000000..fceb54fc
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsLongSetMemory.java
@@ -0,0 +1,212 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Collection;
12import java.util.Iterator;
13import java.util.Set;
14
15import org.eclipse.collections.api.LongIterable;
16import org.eclipse.collections.api.iterator.LongIterator;
17import org.eclipse.collections.api.set.primitive.LongSet;
18import org.eclipse.collections.impl.set.mutable.primitive.LongHashSet;
19
20/**
21 * @author Gabor Bergmann
22 * @since 2.0
23 */
24public class EclipseCollectionsLongSetMemory extends LongHashSet implements ISetMemory<Long> {
25
26 @Override
27 public boolean addOne(Long value) {
28 return super.add(value);
29 }
30
31 @Override
32 public boolean addSigned(Long value, int count) {
33 if (count == 1) return addOne(value);
34 else if (count == -1) return removeOne(value);
35 else throw new IllegalStateException();
36 }
37
38 @Override
39 public boolean removeOne(Long value) {
40 // Kept for binary compatibility
41 return ISetMemory.super.removeOne(value);
42 }
43
44 /**
45 * @since 2.3
46 */
47 @Override
48 public boolean removeOneOrNop(Long value) {
49 return super.remove(value);
50 }
51
52 @Override
53 public void clearAllOf(Long value) {
54 super.remove(value);
55 }
56
57 @Override
58 public int getCount(Long value) {
59 return super.contains(value) ? 1 : 0;
60 }
61
62 @Override
63 public int getCountUnsafe(Object value) {
64 return value instanceof Long ? getCount((Long) value) : 0;
65 }
66
67 @Override
68 public boolean containsNonZero(Long value) {
69 return super.contains(value);
70 }
71
72 @Override
73 public boolean containsNonZeroUnsafe(Object value) {
74 return value instanceof Long && containsNonZero((Long) value);
75 }
76
77 @Override
78 public Iterator<Long> iterator() {
79 return iteratorOf(this);
80 }
81
82 @Override
83 public Set<Long> distinctValues() {
84 return new SetWrapper(this);
85 }
86
87 @Override
88 public boolean isEmpty() {
89 return super.isEmpty();
90 }
91
92 /**
93 * Helper for iterating a LongIterable
94 */
95 public static Iterator<Long> iteratorOf(LongIterable wrapped) {
96 return new Iterator<Long>() {
97 LongIterator longIterator = wrapped.longIterator();
98
99 @Override
100 public boolean hasNext() {
101 return longIterator.hasNext();
102 }
103
104 @Override
105 public Long next() {
106 return longIterator.next();
107 }
108 };
109 }
110
111 @Override
112 public int hashCode() {
113 return IMemoryView.hashCode(this);
114 }
115 @Override
116 public boolean equals(Object obj) {
117 return IMemoryView.equals(this, obj);
118 }
119
120
121 /**
122 * Helper that presents a primitive collection as a Set view
123 * @author Gabor Bergmann
124 */
125 public static final class SetWrapper implements Set<Long> {
126 private LongSet wrapped;
127
128 /**
129 * @param wrapped
130 */
131 public SetWrapper(LongSet wrapped) {
132 this.wrapped = wrapped;
133 }
134
135 @Override
136 public int size() {
137 return wrapped.size();
138 }
139
140 @Override
141 public boolean isEmpty() {
142 return wrapped.isEmpty();
143 }
144
145 @Override
146 public boolean contains(Object o) {
147 return o instanceof Long && wrapped.contains((Long)o);
148 }
149
150 @Override
151 public Iterator<Long> iterator() {
152 return iteratorOf(wrapped);
153 }
154
155 @Override
156 public boolean containsAll(Collection<?> c) {
157 for (Object object : c) {
158 if (contains(object))
159 return true;
160 }
161 return false;
162 }
163
164 @Override
165 public Object[] toArray() {
166 return toArray(new Long[wrapped.size()]);
167 }
168
169 @Override
170 @SuppressWarnings("unchecked")
171 public <T> T[] toArray(T[] a) {
172 int k = 0;
173 LongIterator iterator = wrapped.longIterator();
174 while (iterator.hasNext())
175 a[k++] = (T) Long.valueOf(iterator.next());
176 return a;
177 }
178
179 @Override
180 public boolean add(Long e) {
181 throw new UnsupportedOperationException();
182 }
183
184 @Override
185 public boolean remove(Object o) {
186 throw new UnsupportedOperationException();
187 }
188
189 @Override
190 public boolean addAll(Collection<? extends Long> c) {
191 throw new UnsupportedOperationException();
192 }
193
194 @Override
195 public boolean retainAll(Collection<?> c) {
196 throw new UnsupportedOperationException();
197 }
198
199 @Override
200 public boolean removeAll(Collection<?> c) {
201 throw new UnsupportedOperationException();
202 }
203
204 @Override
205 public void clear() {
206 throw new UnsupportedOperationException();
207 }
208
209
210 }
211
212}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiLookup.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiLookup.java
new file mode 100644
index 00000000..394135c9
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiLookup.java
@@ -0,0 +1,226 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import org.eclipse.collections.impl.map.mutable.UnifiedMap;
12import org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap;
13import tools.refinery.viatra.runtime.matchers.util.MarkedMemory.MarkedMultiset;
14import tools.refinery.viatra.runtime.matchers.util.MarkedMemory.MarkedSet;
15
16import java.util.Set;
17import java.util.stream.Stream;
18
19
20
21/**
22 * Eclipse Collections-based realizations of {@link IMultiLookup}
23 *
24 * @author Gabor Bergmann
25 * @since 2.0
26 */
27class EclipseCollectionsMultiLookup {
28
29 private EclipseCollectionsMultiLookup() {/* Hidden utility class constructor */}
30
31 private static class MarkedSetImpl<Value> extends EclipseCollectionsSetMemory<Value> implements MarkedMemory.MarkedSet<Value> {}
32 private static class MarkedMultisetImpl<Value> extends EclipseCollectionsMultiset<Value> implements MarkedMemory.MarkedMultiset<Value> {}
33 private static class MarkedLongSetImpl extends EclipseCollectionsLongSetMemory implements MarkedMemory.MarkedSet<Long> {}
34 private static class MarkedLongMultisetImpl extends EclipseCollectionsLongMultiset implements MarkedMemory.MarkedMultiset<Long> {}
35
36 public abstract static class FromObjects<Key, Value, Bucket extends MarkedMemory<Value>>
37 extends UnifiedMap<Key, Object> implements IMultiLookupAbstract<Key, Value, Bucket> {
38
39 @Override
40 public boolean equals(Object obj) {
41 return IMultiLookup.equals(this, obj);
42 }
43 @Override
44 public int hashCode() {
45 return IMultiLookup.hashCode(this);
46 }
47
48
49 @Override
50 public Object lowLevelPutIfAbsent(Key key, Value value) {
51 return super.putIfAbsent(key, value);
52 }
53
54 @Override
55 public Object lowLevelGet(Key key) {
56 return super.get(key);
57 }
58
59 @Override
60 public Object lowLevelGetUnsafe(Object key) {
61 return super.get(key);
62 }
63
64 @Override
65 public Object lowLevelRemove(Key key) {
66 return super.remove(key);
67 }
68
69 @Override
70 public void lowLevelPut(Key key, Object valueOrBucket) {
71 super.put(key, valueOrBucket);
72 }
73 @Override
74 public Iterable<Object> lowLevelValues() {
75 return super.values();
76 }
77 @Override
78 public Set<Key> lowLevelKeySet() {
79 return super.keySet();
80 }
81 @Override
82 public int lowLevelSize() {
83 return super.size();
84 }
85
86 @Override
87 public Stream<Key> distinctKeysStream() {
88 // may be more efficient than the default spliterator
89 return super.keySet().stream();
90 }
91
92 public abstract static class ToSets<Key, Value> extends FromObjects<Key, Value, MarkedSet<Value>>
93 implements IMultiLookupAbstract.ToSetsAbstract<Key, Value>
94 {
95 public static class OfObjects<Key, Value> extends ToSets<Key, Value> {
96 @Override
97 public MarkedSet<Value> createMarkedSet() {
98 return new MarkedSetImpl<Value>();
99 }
100 }
101
102 public static class OfLongs<Key> extends ToSets<Key, Long> {
103 @Override
104 public MarkedSet<Long> createMarkedSet() {
105 return new MarkedLongSetImpl();
106 }
107 }
108
109 }
110
111 public abstract static class ToMultisets<Key, Value> extends FromObjects<Key, Value, MarkedMultiset<Value>>
112 implements IMultiLookupAbstract.ToMultisetsAbstract<Key, Value>
113 {
114 public static class OfObjects<Key, Value> extends ToMultisets<Key, Value> {
115 @Override
116 public MarkedMultiset<Value> createMarkedMultiset() {
117 return new MarkedMultisetImpl<Value>();
118 }
119 }
120
121 public static class OfLongs<Key> extends ToMultisets<Key, Long> {
122 @Override
123 public MarkedMultiset<Long> createMarkedMultiset() {
124 return new MarkedLongMultisetImpl();
125 }
126 }
127
128 }
129
130 }
131
132 public abstract static class FromLongs<Value, Bucket extends MarkedMemory<Value>>
133 extends LongObjectHashMap<Object> implements IMultiLookupAbstract<Long, Value, Bucket> {
134
135 @Override
136 public boolean equals(Object obj) {
137 return IMultiLookup.equals(this, obj);
138 }
139 @Override
140 public int hashCode() {
141 return IMultiLookup.hashCode(this);
142 }
143
144 @Override
145 public Object lowLevelPutIfAbsent(Long key, Value value) {
146 Object old = super.get(key);
147 if (old == null) super.put(key, value);
148 return old;
149 }
150
151 @Override
152 public Object lowLevelGet(Long key) {
153 return super.get(key);
154 }
155
156 @Override
157 public Object lowLevelGetUnsafe(Object key) {
158 return key instanceof Long ? super.get((Long)key) : null;
159 }
160
161 @Override
162 public Object lowLevelRemove(Long key) {
163 return super.remove(key);
164 }
165
166 @Override
167 public void lowLevelPut(Long key, Object valueOrBucket) {
168 super.put(key, valueOrBucket);
169 }
170 @Override
171 public Iterable<Object> lowLevelValues() {
172 return super.values();
173 }
174 @Override
175 public int lowLevelSize() {
176 return super.size();
177 }
178 @Override
179 public Iterable<Long> lowLevelKeySet() {
180 return () -> EclipseCollectionsLongSetMemory.iteratorOf(FromLongs.super.keysView());
181 }
182
183 public abstract static class ToSets<Value> extends FromLongs<Value, MarkedSet<Value>>
184 implements IMultiLookupAbstract.ToSetsAbstract<Long, Value>
185 {
186 public static class OfObjects<Value> extends ToSets<Value> {
187 @Override
188 public MarkedSet<Value> createMarkedSet() {
189 return new MarkedSetImpl<Value>();
190 }
191 }
192
193 public static class OfLongs extends ToSets<Long> {
194 @Override
195 public MarkedSet<Long> createMarkedSet() {
196 return new MarkedLongSetImpl();
197 }
198 }
199
200 }
201
202 public abstract static class ToMultisets<Value> extends FromLongs<Value, MarkedMultiset<Value>>
203 implements IMultiLookupAbstract.ToMultisetsAbstract<Long, Value>
204 {
205 public static class OfObjects<Value> extends ToMultisets<Value> {
206 @Override
207 public MarkedMultiset<Value> createMarkedMultiset() {
208 return new MarkedMultisetImpl<Value>();
209 }
210 }
211
212 public static class OfLongs extends ToMultisets<Long> {
213 @Override
214 public MarkedMultiset<Long> createMarkedMultiset() {
215 return new MarkedLongMultisetImpl();
216 }
217 }
218
219 }
220
221 }
222
223
224}
225
226
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiset.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiset.java
new file mode 100644
index 00000000..46977c8b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsMultiset.java
@@ -0,0 +1,93 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * @author Gabor Bergmann
13 * @since 1.7
14 */
15public class EclipseCollectionsMultiset<T> extends EclipseCollectionsBagMemory<T> implements IMultiset<T> {
16
17 @Override
18 public boolean addOne(T value) {
19 int oldCount = super.getIfAbsent(value, 0);
20
21 super.put(value, oldCount + 1);
22
23 return oldCount == 0;
24 }
25
26 @Override
27 public boolean addPositive(T value, int count) {
28 if (count < 0) {
29 throw new IllegalArgumentException("The count value must be positive!");
30 }
31
32 int oldCount = super.getIfAbsent(value, 0);
33
34 super.put(value, oldCount + count);
35
36 return oldCount == 0;
37 }
38
39 @Override
40 public boolean addSigned(T value, int count) {
41 int oldCount = super.getIfAbsent(value, 0);
42 int newCount = oldCount + count;
43
44 boolean becomesZero = newCount == 0;
45 if (newCount < 0)
46 throw new IllegalStateException(String.format(
47 "Cannot remove %d occurrences of value '%s' as only %d would remain in %s",
48 count, value, newCount, this));
49 else if (becomesZero)
50 super.removeKey(value);
51 else // (newCount > 0)
52 super.put(value, newCount);
53
54 return becomesZero || oldCount == 0;
55 }
56
57
58 @Override
59 public boolean removeOne(T value) {
60 return removeOneInternal(value, true);
61 }
62
63 @Override
64 public boolean removeOneOrNop(T value) {
65 return removeOneInternal(value, false);
66 }
67
68 /**
69 * @since 2.3
70 */
71 protected boolean removeOneInternal(T value, boolean throwIfImpossible) {
72 int oldCount = super.getIfAbsent(value, 0);
73 if (oldCount == 0) {
74 if (throwIfImpossible) throw new IllegalStateException(String.format(
75 "Cannot remove value '%s' that is not contained in %s",
76 value, this));
77 else return false;
78 }
79
80 int rest = oldCount - 1;
81 boolean empty = rest == 0;
82
83 if (!empty) {
84 super.put(value, rest);
85 } else {
86 super.remove(value);
87 }
88
89 return empty;
90 }
91
92
93}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsSetMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsSetMemory.java
new file mode 100644
index 00000000..92f65246
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EclipseCollectionsSetMemory.java
@@ -0,0 +1,94 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Set;
12
13import org.eclipse.collections.impl.set.mutable.UnifiedSet;
14
15/**
16 * @author Gabor Bergmann
17 * @since 2.0
18 */
19public class EclipseCollectionsSetMemory<Value> extends UnifiedSet<Value> implements ISetMemory<Value> {
20 @Override
21 public int getCount(Value value) {
22 return super.contains(value) ? 1 : 0;
23 }
24 @Override
25 public int getCountUnsafe(Object value) {
26 return super.contains(value) ? 1 : 0;
27 }
28 @Override
29 public boolean containsNonZero(Value value) {
30 return super.contains(value);
31 }
32
33 @Override
34 public boolean containsNonZeroUnsafe(Object value) {
35 return super.contains(value);
36 }
37
38 @Override
39 public boolean addOne(Value value) {
40 return super.add(value);
41 }
42
43 @Override
44 public boolean addSigned(Value value, int count) {
45 if (count == 1) return addOne(value);
46 else if (count == -1) return removeOne(value);
47 else throw new IllegalStateException();
48 }
49
50 @Override
51 public boolean removeOne(Value value) {
52 // Kept for binary compatibility
53 return ISetMemory.super.removeOne(value);
54 }
55
56 @Override
57 public boolean removeOneOrNop(Value value) {
58 return super.remove(value);
59 }
60
61 @Override
62 public void clearAllOf(Value value) {
63 super.remove(value);
64 }
65
66 @Override
67 public Set<Value> distinctValues() {
68 return this;
69 }
70
71 @Override
72 public Value theContainedVersionOf(Value value) {
73 return super.get(value);
74 }
75
76 @Override
77 @SuppressWarnings("unchecked")
78 public Value theContainedVersionOfUnsafe(Object value) {
79 if (super.contains(value))
80 return super.get((Value)value);
81 else return null;
82 }
83
84 @Override
85 public int hashCode() {
86 return IMemoryView.hashCode(this);
87 }
88 @Override
89 public boolean equals(Object obj) {
90 return IMemoryView.equals(this, obj);
91 }
92
93
94}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EmptyMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EmptyMemory.java
new file mode 100644
index 00000000..a17b3a3f
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/EmptyMemory.java
@@ -0,0 +1,93 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Collections;
12import java.util.Iterator;
13import java.util.Set;
14
15/**
16 * A singleton immutable empty memory.
17 * @author Gabor Bergmann
18 * @since 2.0
19 *
20 */
21public class EmptyMemory<T> implements IMemoryView<T> {
22
23 @SuppressWarnings("rawtypes")
24 private static final EmptyMemory INSTANCE = new EmptyMemory();
25
26 @SuppressWarnings("unchecked")
27 public static <T> EmptyMemory<T> instance() {
28 return INSTANCE;
29 }
30
31
32
33 /**
34 * Singleton; hidden constructor
35 */
36 private EmptyMemory() {
37 super();
38 }
39
40 @Override
41 public Iterator<T> iterator() {
42 return Collections.<T>emptySet().iterator();
43 }
44
45 @Override
46 public int getCount(T value) {
47 return 0;
48 }
49
50 @Override
51 public int getCountUnsafe(Object value) {
52 return 0;
53 }
54
55 @Override
56 public boolean containsNonZero(T value) {
57 return false;
58 }
59
60 @Override
61 public boolean containsNonZeroUnsafe(Object value) {
62 return false;
63 }
64
65 @Override
66 public int size() {
67 return 0;
68 }
69
70 @Override
71 public boolean isEmpty() {
72 return true;
73 }
74
75 @Override
76 public Set<T> distinctValues() {
77 return Collections.emptySet();
78 }
79
80 @Override
81 public int hashCode() {
82 return IMemoryView.hashCode(this);
83 }
84 @Override
85 public boolean equals(Object obj) {
86 return IMemoryView.equals(this, obj);
87 }
88
89 @Override
90 public String toString() {
91 return "{}";
92 }
93}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ICache.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ICache.java
new file mode 100644
index 00000000..8c2e54ad
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ICache.java
@@ -0,0 +1,32 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.function.Supplier;
12
13/**
14 * A cache is a simple key-value pair that stores calculated values for specific key objects
15 *
16 * <p>
17 * <b>NOTE</b> These caches are not expected to be used outside query backend implementations
18 *
19 * @author Zoltan Ujhelyi
20 * @since 1.7
21 * @noreference This interface is not intended to be referenced by clients.
22 */
23public interface ICache {
24
25 /**
26 * Return a selected value for the key object. If the value is not available in the cache yet, the given provider is
27 * called once
28 * @since 2.0
29 */
30 <T> T getValue(Object key, Class<? extends T> clazz, Supplier<T> valueProvider);
31
32} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IDeltaBag.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IDeltaBag.java
new file mode 100644
index 00000000..99a4cb3b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IDeltaBag.java
@@ -0,0 +1,26 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * An {@link IMemory} that represents the difference between two states of a set or {@link IMultiset}, and therefore
13 * may contain values with a negative multiplicity.
14 *
15 * @author Gabor Bergmann
16 * @since 1.7
17 */
18public interface IDeltaBag<T> extends IMemory<T> {
19
20 @Override
21 default boolean removeOneOrNop(T value) {
22 // makes no difference for delta bags
23 return removeOne(value);
24 }
25
26}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemory.java
new file mode 100644
index 00000000..ea788e53
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemory.java
@@ -0,0 +1,81 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * A memory containing a positive or negative number of equal() copies for some values.
13 * During iterations, each distinct value is iterated only once.
14 *
15 * <p> Refined by: <ul>
16 * <li>{@link IMultiset}, which always contains values with a nonnegative multiplicity. </li>
17 * <li>{@link IDeltaBag}, which may contain values with negative multiplicity. </li>
18 * <li>{@link ISetMemory}, which is just a set (allowed multiplicities: 0 and 1). </li>
19 * </ul>
20 *
21 * @author Gabor Bergmann
22 * @since 1.7
23 * @noimplement This interface is not intended to be implemented by clients.
24 */
25public interface IMemory<T> extends IMemoryView<T>, Clearable {
26
27 /**
28 * Adds one value occurrence to the memory.
29 *
30 * @return true if the tuple was not present before in the memory, or
31 * (in case of {@link IDeltaBag}) is no longer present in the memory
32 */
33 boolean addOne(T value);
34
35 /**
36 * Adds the given number of occurrences to the memory. The count value may or may not be negative.
37 * <p> Precondition if {@link IMultiset}: at least the given amount of occurrences exist, if count is negative.
38 * <p> Precondition if {@link ISetMemory}: count is +1 or -1, the latter is only allowed if the set contains the value.
39 *
40 * @param count
41 * the number of occurrences
42 * @return true if the tuple was not present before in the memory, or is no longer present in the memory
43 * @throws IllegalStateException if {@link IMultiset} or {@link ISetMemory} and the number of occurrences in the memory would underflow to negative
44 */
45 boolean addSigned(T value, int count);
46
47 /**
48 * Removes one occurrence of the given value from the memory.
49 * <p> Precondition if {@link IMultiset} or {@link ISetMemory}: the value must have a positive amount of occurrences in the memory.
50 *
51 * @return true if this was the the last occurrence of the value, or
52 * (in case of {@link IDeltaBag}) is the first negative occurrence of the value
53 * @throws IllegalStateException if {@link IMultiset} or {@link ISetMemory} and value had no occurrences in the memory
54 */
55 boolean removeOne(T value);
56
57 /**
58 * Removes one occurrence of the given value from the memory, if possible.
59 *
60 * <p> Memory is unchanged and false is returned if
61 * {@link IMultiset} or {@link ISetMemory} and value had no occurrences in the memory
62 *
63 * @return true if this was the the last occurrence of the value, or
64 * (in case of {@link IDeltaBag}) is the first negative occurrence of the value
65 *
66 * @since 2.3
67 */
68 boolean removeOneOrNop(T value);
69
70 /**
71 * Removes all occurrences of the given value from the memory.
72 */
73 void clearAllOf(T value);
74
75 /**
76 * Empties out the memory.
77 */
78 @Override
79 void clear();
80
81} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemoryView.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemoryView.java
new file mode 100644
index 00000000..add575c6
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMemoryView.java
@@ -0,0 +1,205 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Iterator;
12import java.util.Map;
13import java.util.Map.Entry;
14import java.util.Set;
15import java.util.function.BiConsumer;
16import java.util.stream.Stream;
17import java.util.stream.StreamSupport;
18
19/**
20 * A read-only view on a memory containing a positive or negative number of equal() copies for some values.
21 * During iterations, each distinct value is iterated only once.
22 *
23 * <p> See {@link IMemory}.
24 *
25 * <p> Implementors must provide semantic (not identity-based) hashCode() and equals() using the static helpers {@link #hashCode(IMemoryView)} and {@link #equals(IMemoryView, Object)} here.
26 *
27 * @author Gabor Bergmann
28 *
29 * @since 2.0
30 */
31public interface IMemoryView<T> extends Iterable<T> {
32
33 /**
34 * Returns the number of occurrences of the given value.
35 *
36 * @return the number of occurrences
37 */
38 int getCount(T value);
39
40 /**
41 * Returns the number of occurrences of the given value (which may be of any type).
42 *
43 * @return the number of occurrences
44 */
45 int getCountUnsafe(Object value);
46
47 /**
48 * @return true if the given value is contained with a nonzero multiplicity
49 */
50 boolean containsNonZero(T value);
51
52 /**
53 * @return true if the given value (which may be of any type) is contained with a nonzero multiplicity
54 */
55 boolean containsNonZeroUnsafe(Object value);
56
57 /**
58 * @return the number of distinct values
59 */
60 int size();
61
62 /**
63 *
64 * @return iff contains at least one value with non-zero occurrences
65 */
66 boolean isEmpty();
67
68 /**
69 * The set of distinct values
70 */
71 Set<T> distinctValues();
72
73
74 /**
75 * Where supported, returns the stored element that is equal to the given value, or null if none.
76 * Useful for canonicalization in case of non-identity equals().
77 *
78 * <p> For collections that do not support canonicalization, simply returns the argument if contained, null if none.
79 *
80 * @return a value equal to the argument if such a value is stored, or null if none
81 */
82 default T theContainedVersionOf(T value) {
83 if (containsNonZero(value)) return value; else return null;
84 }
85
86 /**
87 * Where supported, returns the stored element that is equal to the given value (of any type),
88 * or null if none.
89 * Useful for canonicalization in case of non-identity equals().
90 *
91 * <p> For collections that do not support canonicalization, simply returns the argument if contained, null if none.
92 *
93 * @return a value equal to the argument if such a value is stored, or null if none
94 */
95 @SuppressWarnings("unchecked")
96 default T theContainedVersionOfUnsafe(Object value) {
97 if (containsNonZeroUnsafe(value)) return (T) value; else return null;
98 }
99
100
101 /**
102 * @return an unmodifiable view of contained values with their multiplicities
103 */
104 default Iterable<Map.Entry<T, Integer>> entriesWithMultiplicities() {
105 return () -> {
106 Iterator<T> wrapped = distinctValues().iterator();
107 return new Iterator<Map.Entry<T, Integer>> () {
108 @Override
109 public boolean hasNext() {
110 return wrapped.hasNext();
111 }
112
113 @Override
114 public Map.Entry<T, Integer> next() {
115 T key = wrapped.next();
116 int count = getCount(key);
117 return new Map.Entry<T, Integer>(){
118 @Override
119 public T getKey() {
120 return key;
121 }
122
123 @Override
124 public Integer getValue() {
125 return count;
126 }
127
128 @Override
129 public Integer setValue(Integer value) {
130 throw new UnsupportedOperationException();
131 }
132
133 @Override
134 public String toString() {
135 return String.format("%d of %s", count, key);
136 }
137
138 };
139 }
140
141 };
142 };
143 }
144
145 /**
146 * Process contained values with their multiplicities
147 */
148 default void forEachEntryWithMultiplicities(BiConsumer<T, Integer> entryConsumer) {
149 for (T value : distinctValues()) {
150 entryConsumer.accept(value, getCount(value));
151 }
152 }
153
154
155 /**
156 * For compatibility with legacy code relying on element-to-integer maps.
157 * @return an unmodifiable view of contained values with their multiplicities
158 */
159 public default Map<T, Integer> asMap() {
160 return new MemoryViewBackedMapView<>(this);
161 }
162
163 /**
164 * For compatibility with legacy code relying on element-to-integer maps.
165 * @return an unmodifiable view of contained values with their multiplicities
166 */
167 public static <T> IMemoryView<T> fromMap(Map<T, Integer> wrapped) {
168 return new MapBackedMemoryView<>(wrapped);
169 }
170
171 /**
172 * @return a stream of values, iterable once
173 * @since 2.1
174 */
175 public default Stream<T> asStream() {
176 return StreamSupport.stream(spliterator(), false);
177 }
178
179 /**
180 * Provides semantic equality comparison.
181 */
182 public static <T> boolean equals(IMemoryView<T> self, Object obj) {
183 if (obj instanceof IMemoryView<?>) {
184 IMemoryView<?> other = (IMemoryView<?>) obj;
185 if (other.size() != self.size()) return false;
186 for (Entry<?, Integer> entry : other.entriesWithMultiplicities()) {
187 if ( !entry.getValue().equals(self.getCountUnsafe(entry.getKey())))
188 return false;
189 }
190 return true;
191 }
192 return false;
193 }
194
195 /**
196 * Provides semantic hashCode() comparison.
197 */
198 public static <T> int hashCode(IMemoryView<T> memory) {
199 int hashCode = 0;
200 for (T value : memory.distinctValues()) {
201 hashCode += value.hashCode() ^ Integer.hashCode(memory.getCount(value));
202 }
203 return hashCode;
204 }
205} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookup.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookup.java
new file mode 100644
index 00000000..1ce1d2c9
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookup.java
@@ -0,0 +1,216 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.stream.Stream;
12
13import tools.refinery.viatra.runtime.matchers.util.CollectionsFactory.MemoryType;
14
15/**
16 * A multi-map that associates sets / multisets / delta sets of values to each key.
17 *
18 * <p> Implementors must provide semantic (not identity-based) hashCode() and equals() using the static helpers {@link #hashCode(IMultiLookup)} and {@link #equals(IMultiLookup, Object)} here.
19 *
20 * @author Gabor Bergmann
21 * @since 2.0
22 * @noimplement This interface is not intended to be implemented by clients.
23 */
24public interface IMultiLookup<Key, Value> {
25
26 /**
27 * Returns true if this collection is empty, false otherwise.
28 * @since 2.2
29 */
30 boolean isEmpty();
31
32
33 /**
34 * Returns true if there are any values associated with the given key.
35 * @param key a key for which associated values are sought
36 * @since 2.3
37 */
38 boolean lookupExists(Key key);
39
40 /**
41 * Returns a (read-only) bucket of values associated with the given key.
42 * Clients must not modify the returned bucket.
43 * @param key a key for which associated values are sought
44 * @return null if key not found, a bucket of values otherwise
45 */
46 IMemoryView<Value> lookup(Key key);
47
48 /**
49 * Returns a (read-only) bucket of values associated with the given key.
50 * Clients must not modify the returned bucket.
51 * @param key a key for which associated values are sought
52 * @return a bucket of values, never null
53 */
54 default IMemoryView<Value> lookupOrEmpty(Key key) {
55 IMemoryView<Value> bucket = lookup(key);
56 return bucket == null ? EmptyMemory.instance() : bucket;
57 }
58
59 /**
60 * Returns a (read-only) bucket of values associated with the given key, while simultaneously removing them.
61 * Clients must not modify the returned bucket.
62 * @param key a key for which associated values are sought
63 * @return a bucket of values, never null
64 * @since 2.3
65 */
66 IMemoryView<Value> lookupAndRemoveAll(Key key);
67
68 /**
69 * Returns a (read-only) bucket of values associated with the given key, which can be of any type.
70 * Clients must not modify the returned bucket.
71 * @param key a key for which associated values are sought (may or may not be of Key type)
72 * @return null if key not found, a bucket of values otherwise
73 */
74 IMemoryView<Value> lookupUnsafe(Object key);
75
76 /**
77 * Returns a (read-only) bucket of values associated with the given key.
78 * Clients must not modify the returned bucket.
79 * @param key a key for which associated values are sought (may or may not be of Key type)
80 * @return a bucket of values, never null
81 */
82 default IMemoryView<Value> lookupUnsafeOrEmpty(Object key) {
83 IMemoryView<Value> bucket = lookupUnsafe(key);
84 return bucket == null ? EmptyMemory.instance() : bucket;
85 }
86
87
88
89 /**
90 * @return the set of distinct keys that have values associated.
91 */
92 Iterable<Key> distinctKeys();
93
94 /**
95 * @return the set of distinct keys that have values associated.
96 * @since 2.3
97 */
98 Stream<Key> distinctKeysStream();
99
100 /**
101 * @return the number of distinct keys that have values associated.
102 */
103 int countKeys();
104
105 /**
106 * Iterates once over each distinct value.
107 */
108 Iterable<Value> distinctValues();
109
110 /**
111 * Iterates once over each distinct value.
112 * @since 2.3
113 */
114 Stream<Value> distinctValuesStream();
115
116
117
118 /**
119 * How significant was the change? *
120 * @author Gabor Bergmann
121 */
122 public enum ChangeGranularity {
123 /**
124 * First key-value pair with given key inserted, or last pair with given key deleted.
125 * (In case of delta maps, also if last negative key-value pair with given key neutralized.)
126 */
127 KEY,
128 /**
129 * First occurrence of given key-value pair inserted, or last occurrence of the pair deleted, while key still has values associated.
130 * (In case of delta maps, also if last negative occurrence of key-value pair neutralized.)
131 */
132 VALUE,
133 /**
134 * Duplicate key-value pair inserted or deleted.
135 */
136 DUPLICATE
137 }
138
139 /**
140 * Adds key-value pair to the lookup structure, or fails if not possible.
141 * <p> If the addition would cause duplicates but the bucket type does not allow it ({@link MemoryType#SETS}),
142 * the operation throws an {@link IllegalStateException}.
143 * @return the granularity of the change
144 * @throws IllegalStateException if addition would cause duplication that is not permitted
145 */
146 public ChangeGranularity addPair(Key key, Value value);
147 /**
148 * Adds key-value pair to the lookup structure.
149 * <p> If the addition would cause duplicates but the bucket type does not allow it ({@link MemoryType#SETS}),
150 * the operation is silently ignored and {@link ChangeGranularity#DUPLICATE} is returned.
151 * @return the granularity of the change, or {@link ChangeGranularity#DUPLICATE} if addition would result in a duplicate and therefore ignored
152 * @since 2.3
153 */
154 public ChangeGranularity addPairOrNop(Key key, Value value);
155 /**
156 * Removes key-value pair from the lookup structure, or fails if not possible.
157 * <p> When attempting to remove a key-value pair with zero multiplicity from a non-delta bucket type
158 * ({@link MemoryType#SETS} or {@link MemoryType#MULTISETS}}), an {@link IllegalStateException} is thrown.
159 * @return the granularity of the change
160 * @throws IllegalStateException if removing non-existing element that is not permitted
161 */
162 public ChangeGranularity removePair(Key key, Value value);
163 /**
164 * Removes key-value pair from the lookup structure.
165 * <p> When attempting to remove a key-value pair with zero multiplicity from a non-delta bucket type
166 * ({@link MemoryType#SETS} or {@link MemoryType#MULTISETS}}),
167 * the operation is silently ignored and {@link ChangeGranularity#DUPLICATE} is returned.
168 * @return the granularity of the change
169 * @throws IllegalStateException if removing non-existing element that is not permitted
170 * @since 2.3
171 */
172 public ChangeGranularity removePairOrNop(Key key, Value value);
173
174 /**
175 * Updates multiplicity of key-value pair by a positive amount.
176 *
177 * <p> PRE: count > 0
178 *
179 * @return the granularity of the change
180 * @throws IllegalStateException if addition would cause duplication that is not permitted
181 */
182 public ChangeGranularity addPairPositiveMultiplicity(Key key, Value value, int count);
183
184 /**
185 * Empties out the lookup structure.
186 */
187 public void clear();
188
189 /**
190 * Provides semantic equality comparison.
191 */
192 public static <Key, Value> boolean equals(IMultiLookup<Key, Value> self, Object obj) {
193 if (obj instanceof IMultiLookup<?, ?>) {
194 IMultiLookup<?, ?> other = (IMultiLookup<?, ?>) obj;
195 if (other.countKeys() != self.countKeys()) return false;
196 for (Object key : other.distinctKeys()) {
197 if (! other.lookupUnsafe(key).equals(self.lookupUnsafe(key)))
198 return false;
199 }
200 return true;
201 }
202 return false;
203 }
204
205 /**
206 * Provides semantic hashCode() comparison.
207 */
208 public static <Key, Value> int hashCode(IMultiLookup<Key, Value> memory) {
209 int hashCode = 0;
210 for (Key key : memory.distinctKeys()) {
211 hashCode += key.hashCode() ^ memory.lookup(key).hashCode();
212 }
213 return hashCode;
214 }
215
216}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookupAbstract.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookupAbstract.java
new file mode 100644
index 00000000..8b1944c1
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiLookupAbstract.java
@@ -0,0 +1,485 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Collections;
12import java.util.Iterator;
13import java.util.NoSuchElementException;
14import java.util.Objects;
15import java.util.stream.Stream;
16import java.util.stream.StreamSupport;
17
18import tools.refinery.viatra.runtime.matchers.util.MarkedMemory.MarkedSet;
19
20/**
21 * Specialized multimap implementation that saves memory
22 * by storing singleton value objects (multiplicity 1) instead of multiset buckets
23 * whenever there is only one value associated with a key.
24 *
25 * <p> See specialized {@link ToSetsAbstract}, {@link ToMultisetsAbstract} for various bucket types.
26 *
27 * <p> Implemented as a Key->Object map with invariant: <ul>
28 * <li> key maps to null if associated with no values;
29 * <li> key maps to a single Value iff it is associated with a single value of multiplicity +1;
30 * <li> key maps to Bucket otherwise
31 * </ul>
32 *
33 * Note that due to the above invariant, handling +1 and -1 are asymmetric in case of delta maps.
34 *
35 * <p> Not intended as an API, but rather as a 'base class' for implementors.
36 * Realized as an interface with default implementations, instead of an abstract class,
37 * to ensure that implementors can easily choose a base class such as UnifiedMap to augment.
38 *
39 * <p> Implementor should inherit from a Map<Key, Object>-like class (primitive map possible)
40 * and bind the lowLevel* methods accordingly.
41 *
42 * @noreference This interface is not intended to be referenced by clients.
43 * @noimplement This interface is not intended to be implemented by clients.
44 *
45 * @author Gabor Bergmann
46 * @since 2.0
47 *
48 *
49 */
50public interface IMultiLookupAbstract<Key, Value, Bucket extends MarkedMemory<Value>> extends IMultiLookup<Key, Value> {
51
52 // the following methods must be bound to a concrete Map<Key,Object>-like structure (primitive implementation allowed)
53
54 /**
55 * Implementor shall bind to the low-level get() or equivalent of the underlying Key-to-Object map
56 */
57 abstract Object lowLevelGet(Key key);
58
59 /**
60 * Implementor shall bind to the low-level get() or equivalent of the underlying Key-to-Object map
61 */
62 abstract Object lowLevelGetUnsafe(Object key);
63
64 /**
65 * Implementor shall bind to the low-level remove() or equivalent of the underlying Key-to-Object map
66 */
67 abstract Object lowLevelRemove(Key key);
68
69 /**
70 * Implementor shall bind to the low-level putIfAbsent() or equivalent of the underlying Key-to-Object map
71 */
72 abstract Object lowLevelPutIfAbsent(Key key, Value value);
73
74 /**
75 * Implementor shall bind to the low-level put() or equivalent of the underlying Key-to-Object map
76 */
77 abstract void lowLevelPut(Key key, Object valueOrBucket);
78
79 /**
80 * Implementor shall bind to the low-level values() or equivalent of the underlying Key-to-Object map
81 */
82 abstract Iterable<Object> lowLevelValues();
83
84 /**
85 * Implementor shall bind to the low-level keySet() or equivalent of the underlying Key-to-Object map
86 */
87 abstract Iterable<Key> lowLevelKeySet();
88
89 /**
90 * Implementor shall bind to the low-level size() or equivalent of the underlying Key-to-Object map
91 */
92 abstract int lowLevelSize();
93
94
95 // generic multi-lookup logic
96
97 @Override
98 default boolean lookupExists(Key key) {
99 Object object = lowLevelGet(key);
100 return null != object;
101 }
102
103 @Override
104 public default IMemoryView<Value> lookup(Key key) {
105 Object object = lowLevelGet(key);
106 if (object == null) return null;
107 if (object instanceof MarkedMemory) return (Bucket) object;
108 return yieldSingleton((Value)object);
109 }
110
111 @Override
112 default IMemoryView<Value> lookupAndRemoveAll(Key key) {
113 Object object = lowLevelRemove(key);
114 if (object == null) return EmptyMemory.instance();
115 if (object instanceof MarkedMemory) return (Bucket) object;
116 return yieldSingleton((Value)object);
117 }
118
119 @Override
120 public default IMemoryView<Value> lookupUnsafe(Object key) {
121 Object object = lowLevelGetUnsafe(key);
122 if (object == null) return null;
123 if (object instanceof MarkedMemory) return (Bucket) object;
124 return yieldSingleton((Value)object);
125 }
126
127 @Override
128 public default ChangeGranularity addPair(Key key, Value value) {
129 return addPairInternal(key, value, true);
130 }
131
132 @Override
133 default ChangeGranularity addPairOrNop(Key key, Value value) {
134 return addPairInternal(key, value, false);
135 }
136
137 public default ChangeGranularity addPairInternal(Key key, Value value, boolean throwIfImpossible) {
138 Object old = lowLevelPutIfAbsent(key, value);
139 boolean keyChange = (old == null);
140
141 if (keyChange) { // key was not present
142 return ChangeGranularity.KEY;
143 } else { // key was already present
144 Bucket bucket;
145 if (old instanceof MarkedMemory) { // ... as collection
146 bucket = (Bucket) old;
147 } else { // ... as singleton
148 if (!this.duplicatesAllowed() && Objects.equals(value, old)) {
149 if (throwIfImpossible)
150 throw new IllegalStateException();
151 else
152 return ChangeGranularity.DUPLICATE;
153 }
154 bucket = createSingletonBucket((Value) old);
155 lowLevelPut(key, bucket);
156 }
157 // will throw if forbidden duplicate, return false if allowed duplicate
158 if (addToBucket(bucket, value, throwIfImpossible)) {
159 // deltas may become empty or a singleton after addition!
160 if (negativesAllowed()) {
161 if (bucket.isEmpty()) {
162 lowLevelRemove(key);
163 return ChangeGranularity.KEY;
164 } else {
165 handleSingleton(key, bucket);
166 return ChangeGranularity.VALUE;
167 }
168 } else return ChangeGranularity.VALUE;
169 } else return ChangeGranularity.DUPLICATE;
170 }
171 }
172
173 @Override
174 // TODO deltas not supproted yet
175 default ChangeGranularity addPairPositiveMultiplicity(Key key, Value value, int count) {
176 if (count == 1) return addPair(key, value);
177 // count > 1, always end up with non-singleton bucket
178
179 Object old = lowLevelGet(key);
180 boolean keyChange = (old == null);
181
182 Bucket bucket;
183 if (keyChange) { // ... nothing associated to key yet
184 bucket = createSingletonBucket(value);
185 lowLevelPut(key, bucket);
186 --count; // one less to increment later
187 } else if (old instanceof MarkedMemory) { // ... as collection
188 bucket = (Bucket) old;
189 } else { // ... as singleton
190 bucket = createSingletonBucket((Value) old);
191 lowLevelPut(key, bucket);
192 }
193
194 boolean newValue = bucket.addSigned(value, count);
195
196 if (keyChange) return ChangeGranularity.KEY;
197 else if (newValue) return ChangeGranularity.VALUE;
198 else return ChangeGranularity.DUPLICATE;
199 }
200
201 @Override
202 public default ChangeGranularity removePair(Key key, Value value) {
203 return removePairInternal(key, value, true);
204 }
205
206 @Override
207 default ChangeGranularity removePairOrNop(Key key, Value value) {
208 return removePairInternal(key, value, false);
209 }
210
211 public default ChangeGranularity removePairInternal(Key key, Value value, boolean throwIfImpossible) {
212 Object old = lowLevelGet(key);
213 if (old instanceof MarkedMemory) { // ... as collection
214 @SuppressWarnings("unchecked")
215 Bucket bucket = (Bucket) old;
216 // will throw if removing non-existent, return false if removing duplicate
217 boolean valueChange = removeFromBucket(bucket, value, throwIfImpossible);
218 handleSingleton(key, bucket);
219 if (valueChange)
220 return ChangeGranularity.VALUE;
221 else
222 return ChangeGranularity.DUPLICATE;
223 } else if (value.equals(old)) { // matching singleton
224 lowLevelRemove(key);
225 return ChangeGranularity.KEY;
226 } else { // different singleton, will produce a delta if possible
227 if (negativesAllowed()) {
228 Bucket deltaBucket = createDeltaBucket((Value) old, value); // will throw if no deltas supported
229 lowLevelPut(key, deltaBucket);
230 return ChangeGranularity.VALUE; // no key change
231 } else {
232 if (throwIfImpossible)
233 throw new IllegalStateException();
234 else
235 return ChangeGranularity.DUPLICATE;
236 }
237 }
238 }
239
240 public default void handleSingleton(Key key, Bucket bucket) {
241 Value remainingSingleton = asSingleton(bucket);
242 if (remainingSingleton != null) { // only one remains
243 lowLevelPut(key, remainingSingleton);
244 }
245 }
246
247 @Override
248 public default Iterable<Value> distinctValues() {
249 return new Iterable<Value>() {
250 private final Iterator<Value> EMPTY_ITERATOR = Collections.<Value>emptySet().iterator();
251 @Override
252 public Iterator<Value> iterator() {
253 return new Iterator<Value>() {
254 Iterator<Object> bucketIterator = lowLevelValues().iterator();
255 Iterator<Value> elementIterator = EMPTY_ITERATOR;
256
257 @Override
258 public boolean hasNext() {
259 return (elementIterator.hasNext() || bucketIterator.hasNext());
260 }
261
262 @Override
263 public Value next() {
264 if (elementIterator.hasNext())
265 return elementIterator.next();
266 else if (bucketIterator.hasNext()) {
267 Object bucket = bucketIterator.next();
268 if (bucket instanceof MarkedMemory) {
269 elementIterator =
270 ((MarkedMemory) bucket).distinctValues().iterator();
271 return elementIterator.next();
272 } else {
273 elementIterator = EMPTY_ITERATOR;
274 return (Value) bucket;
275 }
276 } else
277 throw new NoSuchElementException();
278 }
279
280 /**
281 * Not implemented
282 */
283 @Override
284 public void remove() {
285 throw new UnsupportedOperationException();
286 }
287
288 };
289 }
290 };
291 }
292
293 @Override
294 default Stream<Value> distinctValuesStream() {
295 return StreamSupport.stream(distinctValues().spliterator(), false);
296 }
297
298 @Override
299 default Iterable<Key> distinctKeys() {
300 return lowLevelKeySet();
301 }
302
303 @Override
304 default Stream<Key> distinctKeysStream() {
305 return StreamSupport.stream(distinctKeys().spliterator(), false);
306 }
307
308 @Override
309 default int countKeys() {
310 return lowLevelSize();
311 }
312
313 // the following methods are customized for bucket type
314
315 /**
316 * @return iff negative multiplicites are allowed
317 */
318 abstract boolean negativesAllowed();
319
320 /**
321 * @return iff larger-than-1 multiplicites are allowed
322 * @since 2.3
323 */
324 abstract boolean duplicatesAllowed();
325
326 /**
327 * Increases the multiplicity of the value in the bucket.
328 * @return true iff non-duplicate
329 * @throws IllegalStateException if disallowed duplication and throwIfImpossible is specified
330 */
331 abstract boolean addToBucket(Bucket bucket, Value value, boolean throwIfImpossible);
332
333 /**
334 * Decreases the multiplicity of the value in the bucket.
335 * @return false if removing duplicate value
336 * @throws IllegalStateException if removing non-existing value (unless delta map) and throwIfImpossible is specified
337 */
338 abstract boolean removeFromBucket(Bucket bucket, Value value, boolean throwIfImpossible);
339
340 /**
341 * Checks whether the bucket is a singleton, i.e. it contains a single value with multiplicity +1
342 * @return the singleton value, or null if the bucket is not singleton
343 */
344 abstract Value asSingleton(Bucket bucket);
345
346 /**
347 * @return a new bucket consisting of a sole value
348 */
349 abstract Bucket createSingletonBucket(Value value);
350 /**
351 * @return a read-only bucket consisting of a sole value, to be returned to the user
352 */
353 default IMemoryView<Value> yieldSingleton(Value value) {
354 return new SingletonMemoryView<>(value);
355 }
356
357 /**
358 * @param positive the previously existing value, or null if the delta is to contain a single negative tuple
359 * @return a new bucket consisting of a delta of two values
360 * @throws IllegalStateException if deltas not supported
361 */
362 abstract Bucket createDeltaBucket(Value positive, Value negative);
363
364 /**
365 * A multi-lookup whose buckets are sets.
366 *
367 * <p> Not intended as an API, but rather as a 'base class' for implementors.
368 * Realized as an interface with default implementations, instead of an abstract class,
369 * to ensure that implementors can easily choose a base class such as UnifiedMap to augment.
370 *
371 * <p> Implementor should inherit from a Map<Key, Object>-like class (primitive map possible)
372 * and bind the lowLevel* methods accordingly.
373 *
374 * @noreference This interface is not intended to be referenced by clients.
375 * @noimplement This interface is not intended to be implemented by clients.
376 * @author Gabor Bergmann
377 */
378 public static interface ToSetsAbstract<Key, Value> extends IMultiLookupAbstract<Key, Value, MarkedMemory.MarkedSet<Value>> {
379 /**
380 * @return a fresh, empty marked set
381 */
382 public MarkedSet<Value> createMarkedSet();
383
384 @Override
385 public default boolean negativesAllowed() {
386 return false;
387 }
388 @Override
389 default boolean duplicatesAllowed() {
390 return false;
391 }
392
393 @Override
394 public default boolean addToBucket(MarkedSet<Value> bucket, Value value, boolean throwIfImpossible) {
395 if (bucket.addOne(value)) return true;
396 else if (throwIfImpossible) throw new IllegalStateException();
397 else return false;
398 }
399
400 @Override
401 public default boolean removeFromBucket(MarkedSet<Value> bucket, Value value, boolean throwIfImpossible) {
402 return throwIfImpossible ? bucket.removeOne(value) : bucket.removeOneOrNop(value);
403 }
404
405 @Override
406 public default Value asSingleton(MarkedSet<Value> bucket) {
407 return bucket.size() == 1 ? bucket.iterator().next() : null;
408 }
409
410 @Override
411 public default MarkedSet<Value> createSingletonBucket(Value value) {
412 MarkedSet<Value> result = createMarkedSet();
413 result.addOne(value);
414 return result;
415 }
416
417 @Override
418 public default MarkedSet<Value> createDeltaBucket(Value positive, Value negative) {
419 throw new IllegalStateException();
420 }
421 }
422
423 /**
424 * A multi-lookup whose buckets are multisets.
425 *
426 * <p> Not intended as an API, but rather as a 'base class' for implementors.
427 * Realized as an interface with default implementations, instead of an abstract class,
428 * to ensure that implementors can easily choose a base class such as UnifiedMap to augment.
429 *
430 * <p> Implementor should inherit from a Map<Key, Object>-like class (primitive map possible)
431 * and bind the lowLevel* methods accordingly.
432 *
433 * @noreference This interface is not intended to be referenced by clients.
434 * @noimplement This interface is not intended to be implemented by clients.
435 * @author Gabor Bergmann
436 */
437 public static interface ToMultisetsAbstract<Key, Value> extends IMultiLookupAbstract<Key, Value, MarkedMemory.MarkedMultiset<Value>> {
438 /**
439 * @return a fresh, empty marked multiset
440 */
441 public MarkedMemory.MarkedMultiset<Value> createMarkedMultiset();
442
443 @Override
444 public default boolean negativesAllowed() {
445 return false;
446 }
447 @Override
448 default boolean duplicatesAllowed() {
449 return true;
450 }
451
452 @Override
453 public default boolean addToBucket(MarkedMemory.MarkedMultiset<Value> bucket, Value value, boolean throwIfImpossible) {
454 return bucket.addOne(value);
455 }
456
457 @Override
458 public default boolean removeFromBucket(MarkedMemory.MarkedMultiset<Value> bucket, Value value, boolean throwIfImpossible) {
459 return throwIfImpossible ? bucket.removeOne(value) : bucket.removeOneOrNop(value);
460 }
461
462 @Override
463 public default Value asSingleton(MarkedMemory.MarkedMultiset<Value> bucket) {
464 if (bucket.size() != 1) return null;
465 Value candidate = bucket.iterator().next();
466 return bucket.getCount(candidate) == 1 ? candidate : null;
467 }
468
469 @Override
470 public default MarkedMemory.MarkedMultiset<Value> createSingletonBucket(Value value) {
471 MarkedMemory.MarkedMultiset<Value> result = createMarkedMultiset();
472 result.addOne(value);
473 return result;
474 }
475
476 @Override
477 public default MarkedMemory.MarkedMultiset<Value> createDeltaBucket(Value positive, Value negative) {
478 throw new IllegalStateException();
479 }
480 }
481
482
483 // TODO add ToDeltaBagsAbstract
484
485} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiset.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiset.java
new file mode 100644
index 00000000..bdd5d597
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IMultiset.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * An {@link IMemory} that always contains values with a nonnegative multiplicity.
13 *
14 * <p> In case a write operation caused underflow, an {@link IllegalStateException} is thrown.
15 *
16 * @author Gabor Bergmann
17 * @since 1.7
18 */
19public interface IMultiset<T> extends IMemory<T> {
20
21 /**
22 * Adds the given number of occurrences to the memory. The count value must be a positive number.
23 *
24 * @param count
25 * the number of occurrences
26 * @return true if the tuple was not present before in the memory
27 */
28 boolean addPositive(T value, int count);
29
30} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IProvider.java
new file mode 100644
index 00000000..cd25dc95
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/IProvider.java
@@ -0,0 +1,30 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.function.Function;
12import java.util.function.Supplier;
13
14import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery;
15
16/**
17 * A provider interface useful in various registry instances.
18 *
19 * @author Zoltan Ujhelyi
20 *
21 */
22public interface IProvider<T> extends Supplier<T>{
23
24 public final class ProvidedValueFunction implements Function<IProvider<PQuery>, PQuery> {
25 @Override
26 public PQuery apply(IProvider<PQuery> input) {
27 return (input == null) ? null : input.get();
28 }
29 }
30}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ISetMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ISetMemory.java
new file mode 100644
index 00000000..0c03da48
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/ISetMemory.java
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.function.BiConsumer;
12
13/**
14 * An {@link IMemory} that always contains values with a 0 or +1 multiplicity.
15 *
16 * <p> In case a write operation causes underflow or overflow, an {@link IllegalStateException} is thrown.
17 *
18 * @author Gabor Bergmann
19 * @since 2.0
20 */
21public interface ISetMemory<T> extends IMemory<T> {
22
23 @Override
24 default void forEachEntryWithMultiplicities(BiConsumer<T, Integer> entryConsumer) {
25 for (T t : this.distinctValues()) entryConsumer.accept(t, 1);
26 }
27
28
29 @Override
30 default boolean removeOne(T value) {
31 if (!removeOneOrNop(value))
32 throw new IllegalStateException();
33 return true;
34 }
35
36
37}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MapBackedMemoryView.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MapBackedMemoryView.java
new file mode 100644
index 00000000..3be078bd
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MapBackedMemoryView.java
@@ -0,0 +1,102 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Iterator;
12import java.util.Map;
13import java.util.Map.Entry;
14import java.util.Set;
15import java.util.function.BiConsumer;
16
17/**
18 * Wraps a Map<T, Integer> (mapping elements to non-zero multiplicities) into an {@link IMemoryView}.
19 *
20 * @author Gabor Bergmann
21 * @since 2.0
22 */
23public class MapBackedMemoryView<T> implements IMemoryView<T> {
24
25 private Map<T, Integer> wrapped;
26
27 /**
28 * @param wrapped an equivalent map from contained objects to multiplicities
29 */
30 protected MapBackedMemoryView(Map<T, Integer> wrapped) {
31 super();
32 this.wrapped = wrapped;
33 }
34
35 @Override
36 public Iterator<T> iterator() {
37 return wrapped.keySet().iterator();
38 }
39
40 @Override
41 public int getCount(T value) {
42 return getCountUnsafe(value);
43 }
44
45 @Override
46 public int getCountUnsafe(Object value) {
47 Integer count = wrapped.get(value);
48 return count == null ? 0 : count;
49 }
50
51 @Override
52 public boolean containsNonZero(T value) {
53 return wrapped.containsKey(value);
54 }
55
56 @Override
57 public boolean containsNonZeroUnsafe(Object value) {
58 return wrapped.containsKey(value);
59 }
60
61 @Override
62 public int size() {
63 return wrapped.size();
64 }
65
66 @Override
67 public boolean isEmpty() {
68 return wrapped.isEmpty();
69 }
70
71 @Override
72 public Set<T> distinctValues() {
73 return wrapped.keySet();
74 }
75
76
77 @Override
78 public void forEachEntryWithMultiplicities(BiConsumer<T, Integer> entryConsumer) {
79 for (Entry<T, Integer> entry : wrapped.entrySet()) {
80 entryConsumer.accept(entry.getKey(), entry.getValue());
81 }
82 }
83
84 @Override
85 public Iterable<Entry<T, Integer>> entriesWithMultiplicities() {
86 return wrapped.entrySet();
87 }
88
89 @Override
90 public int hashCode() {
91 return IMemoryView.hashCode(this);
92 }
93 @Override
94 public boolean equals(Object obj) {
95 return IMemoryView.equals(this, obj);
96 }
97
98 @Override
99 public String toString() {
100 return wrapped.toString();
101 }
102}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MarkedMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MarkedMemory.java
new file mode 100644
index 00000000..d22dcbe7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MarkedMemory.java
@@ -0,0 +1,21 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQueryLabs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * Internal marker type, must only be instantiated inside implementors of IMultiLookupImpl
13 * @noimplement This interface is not intended to be implemented by clients.
14 * @since 2.0
15 */
16public interface MarkedMemory<Value> extends IMemory<Value> {
17
18 static interface MarkedSet<Value> extends MarkedMemory<Value> {}
19 static interface MarkedMultiset<Value> extends MarkedMemory<Value> {}
20 static interface MarkedDeltaBag<Value> extends MarkedMemory<Value> {}
21} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MemoryViewBackedMapView.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MemoryViewBackedMapView.java
new file mode 100644
index 00000000..49711a89
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/MemoryViewBackedMapView.java
@@ -0,0 +1,117 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.ArrayList;
12import java.util.Collection;
13import java.util.HashSet;
14import java.util.Map;
15import java.util.Set;
16
17/**
18 * A partial and read-only Map implementation, mapping elements to multiplicities backed by an {@link IMemoryView}.
19 *
20 * <p> Not implemented: write methods.
21 *
22 * <p> Inefficiently implemented: {@link #containsValue(Object)}, {@link #values()}, {@link #entrySet()}.
23 *
24 * @author Gabor Bergmann
25 * @since 2.0
26 */
27public class MemoryViewBackedMapView<T> implements Map<T, Integer> {
28
29 private static final String READ_ONLY = "Read only";
30 private final IMemoryView<T> wrapped;
31
32 /**
33 * @param wrapped a memory view whose contents are to be exposed as an element-to-integer map.
34 */
35 protected MemoryViewBackedMapView(IMemoryView<T> wrapped) {
36 super();
37 this.wrapped = wrapped;
38 }
39
40 @Override
41 public int size() {
42 return wrapped.size();
43 }
44
45 @Override
46 public boolean isEmpty() {
47 return wrapped.isEmpty();
48 }
49
50 @Override
51 public boolean containsKey(Object key) {
52 return wrapped.containsNonZeroUnsafe(key);
53 }
54
55 @Override
56 public boolean containsValue(Object value) {
57 if (value instanceof Integer) {
58 for (Entry<T, Integer> entry : wrapped.entriesWithMultiplicities()) {
59 if (entry.getValue().equals(value)) return true;
60 }
61 }
62 return false;
63 }
64
65 @Override
66 public Integer put(T key, Integer value) {
67 throw new UnsupportedOperationException(READ_ONLY);
68 }
69
70 @Override
71 public Integer get(Object key) {
72 int count = wrapped.getCountUnsafe(key);
73 if (count == 0) return null; else return count;
74 }
75
76 @Override
77 public Integer remove(Object key) {
78 throw new UnsupportedOperationException(READ_ONLY);
79 }
80
81 @Override
82 public void putAll(Map<? extends T, ? extends Integer> m) {
83 throw new UnsupportedOperationException(READ_ONLY);
84 }
85
86 @Override
87 public void clear() {
88 throw new UnsupportedOperationException(READ_ONLY);
89 }
90
91 @Override
92 public Set<T> keySet() {
93 return wrapped.distinctValues();
94 }
95
96 @Override
97 public Collection<Integer> values() {
98 Collection<Integer> result = new ArrayList<>();
99 wrapped.forEachEntryWithMultiplicities((value, count) -> result.add(count));
100 return result;
101 }
102
103 @Override
104 public Set<Entry<T, Integer>> entrySet() {
105 Set<Entry<T, Integer>> result = new HashSet<>();
106 for (Entry<T, Integer> entry : wrapped.entriesWithMultiplicities()) {
107 result.add(entry);
108 }
109 return result;
110 }
111
112
113 @Override
114 public String toString() {
115 return wrapped.toString();
116 }
117}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Preconditions.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Preconditions.java
new file mode 100644
index 00000000..e9e5e3a0
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Preconditions.java
@@ -0,0 +1,208 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.function.Supplier;
12
13/**
14 * This class was motivated by the similar Preconditions class from Guava to provide simple precondition checking
15 * functionality. However, as starting with version 2.0 the runtime of VIATRA Query should not depend on Guava, the
16 * relevant functionality of the Preconditions checking functionality will be implemented here.
17 *
18 * @author Zoltan Ujhelyi
19 * @since 2.0
20 *
21 */
22public final class Preconditions {
23
24 private Preconditions() {
25 /* Utility class constructor */ }
26
27 /**
28 * Ensures the truth of an expression involving one or more parameters to the calling method.
29 *
30 * @param expression
31 * a boolean expression
32 * @throws IllegalArgumentException
33 * if {@code expression} is false
34 */
35 public static void checkArgument(boolean expression) {
36 if (!expression) {
37 throw new IllegalArgumentException();
38 }
39 }
40
41 /**
42 * Ensures the truth of an expression involving one or more parameters to the calling method.
43 *
44 * @param expression
45 * a boolean expression
46 * @param errorMessage
47 * the exception message to use if the check fails
48 * @throws IllegalArgumentException
49 * if {@code expression} is false
50 */
51 public static void checkArgument(boolean expression, String errorMessage) {
52 if (!expression) {
53 throw new IllegalArgumentException(errorMessage);
54 }
55 }
56
57 /**
58 * Ensures the truth of an expression involving one or more parameters to the calling method.
59 *
60 * @param expression
61 * a boolean expression
62 * @param errorMessageTemplate
63 * a template for the exception message should the check fail using the Java Formatter syntax; the same
64 * as used by {@link String#format(String, Object...)}.
65 * @param errorMessageArgs
66 * the arguments to be substituted into the message template.
67 * @throws IllegalArgumentException
68 * if {@code expression} is false
69 * @throws NullPointerException
70 * if the check fails and either {@code errorMessageTemplate} or {@code errorMessageArgs} is null (don't
71 * let this happen)
72 */
73 public static void checkArgument(boolean expression, String errorMessageTemplate, Object... errorMessageArgs) {
74 if (!expression) {
75 throw new IllegalArgumentException(String.format(errorMessageTemplate, errorMessageArgs));
76 }
77 }
78
79 /**
80 * Ensures the truth of an expression involving one or more parameters to the calling method.
81 *
82 * @param expression
83 * a boolean expression
84 * @param messageSupplier a supplier that is called to calculate the error message if necessary
85 * @throws IllegalArgumentException
86 * if {@code expression} is false
87 */
88 public static void checkArgument(boolean expression, Supplier<String> messageSupplier) {
89 if (!expression) {
90 throw new IllegalArgumentException(messageSupplier.get());
91 }
92 }
93
94 /**
95 * Ensures the truth of an expression involving one or more fields of a class.
96 *
97 * @param expression
98 * a boolean expression
99 * @throws IllegalStateException
100 * if {@code expression} is false
101 */
102 public static void checkState(boolean expression) {
103 if (!expression) {
104 throw new IllegalStateException();
105 }
106 }
107
108 /**
109 * Ensures the truth of an expression involving one or more fields of a class.
110 *
111 * @param expression
112 * a boolean expression
113 * @param errorMessage
114 * the exception message to use if the check fails
115 * @throws IllegalStateException
116 * if {@code expression} is false
117 */
118 public static void checkState(boolean expression, String errorMessage) {
119 if (!expression) {
120 throw new IllegalStateException(errorMessage);
121 }
122 }
123
124 /**
125 * Ensures the truth of an expression involving one or more fields of a class.
126 *
127 * @param expression
128 * a boolean expression
129 * @param errorMessageTemplate
130 * a template for the exception message should the check fail using the Java Formatter syntax; the same
131 * as used by {@link String#format(String, Object...)}.
132 * @param errorMessageArgs
133 * the arguments to be substituted into the message template.
134 * @throws IllegalStateException
135 * if {@code expression} is false
136 * @throws NullPointerException
137 * if the check fails and either {@code errorMessageTemplate} or {@code errorMessageArgs} is null (don't
138 * let this happen)
139 */
140 public static void checkState(boolean expression, String errorMessageTemplate, Object... errorMessageArgs) {
141 if (!expression) {
142 throw new IllegalStateException(String.format(errorMessageTemplate, errorMessageArgs));
143 }
144 }
145
146 /**
147 * Ensures the truth of an expression involving one or more fields of a class.
148 *
149 * @param expression
150 * a boolean expression
151 * @param messageSupplier a supplier that is called to calculate the error message if necessary
152 * @throws IllegalStateException
153 * if {@code expression} is false
154 */
155 public static void checkState(boolean expression, Supplier<String> messageSupplier) {
156 if (!expression) {
157 throw new IllegalStateException(messageSupplier.get());
158 }
159 }
160
161 /**
162 * Ensures that an index is appropriate for a list or array of given size.
163 *
164 * @param index
165 * @param size
166 * @throws IndexOutOfBoundsException
167 * if index is negative or is greater or equal to size
168 */
169 public static void checkElementIndex(int index, int size) {
170 if (index < 0 || index >= size) {
171 throw new IndexOutOfBoundsException();
172 }
173 }
174
175 /**
176 * Ensures that an index is appropriate for a list or array of given size.
177 *
178 * @param index
179 * @param size
180 * @param errorMessageTemplate
181 * a template for the exception message should the check fail using the Java Formatter syntax; the same
182 * as used by {@link String#format(String, Object...)}.
183 * @param errorMessageArgs
184 * the arguments to be substituted into the message template.
185 * @throws IndexOutOfBoundsException
186 * if index is negative or is greater or equal to size
187 */
188 public static void checkElementIndex(int index, int size, String errorMessageTemplate, Object... errorMessageArgs) {
189 if (index < 0 || index >= size) {
190 throw new IndexOutOfBoundsException(String.format(errorMessageTemplate, errorMessageArgs));
191 }
192 }
193
194 /**
195 * Ensures that an index is appropriate for a list or array of given size.
196 *
197 * @param index
198 * @param size
199 * @param messageSupplier a supplier that is called to calculate the error message if necessary
200 * @throws IndexOutOfBoundsException
201 * if index is negative or is greater or equal to size
202 */
203 public static void checkElementIndex(int index, int size, Supplier<String> messageSupplier) {
204 if (index < 0 || index >= size) {
205 throw new IndexOutOfBoundsException(messageSupplier.get());
206 }
207 }
208}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/PurgableCache.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/PurgableCache.java
new file mode 100644
index 00000000..c4e6b5af
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/PurgableCache.java
@@ -0,0 +1,44 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2017, Zoltan Ujhelyi, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.HashMap;
12import java.util.Map;
13import java.util.function.Supplier;
14
15/**
16 * @author Zoltan Ujhelyi
17 * @since 1.7
18 * @noreference This class is not intended to be referenced by clients.
19 */
20public class PurgableCache implements ICache {
21
22 Map<Object, Object> storage = new HashMap<>();
23
24 @Override
25 @SuppressWarnings("unchecked")
26 public <T> T getValue(Object key, Class<? extends T> clazz, Supplier<T> valueProvider) {
27 if (storage.containsKey(key)) {
28 Object value = storage.get(key);
29 Preconditions.checkState(clazz.isInstance(value), "Cache stores for key %s a value of %s that is incompatible with the requested type %s", key, value, clazz);
30 return (T) value;
31 } else {
32 T value = valueProvider.get();
33 storage.put(key, value);
34 return value;
35 }
36 }
37
38 /**
39 * Removes all values stored in the cache
40 */
41 public void purge() {
42 storage.clear();
43 }
44}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Sets.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Sets.java
new file mode 100644
index 00000000..3749fe06
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Sets.java
@@ -0,0 +1,90 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *
9 * Contributors:
10 * Gabor Bergmann - initial API and implementation
11 *******************************************************************************/
12package tools.refinery.viatra.runtime.matchers.util;
13
14import java.util.ArrayList;
15import java.util.List;
16import java.util.Set;
17import java.util.stream.Collectors;
18import java.util.stream.Stream;
19
20/**
21 * This class was motivated by the similar Sets class from Guava to provide simple set manipulation
22 * functionality. However, as starting with version 2.3 the runtime of VIATRA Query should not depend on Guava,
23 * not even internally, the relevant subset of Sets methods will be reimplemented here.
24 *
25 * <p> The current approach is to delegate to Eclipse Collections wherever possible.
26 * Such glue methods are useful so that downstream clients can avoid directly depending on Eclipse Collections.
27 *
28 * <p> Without an equivalent from Eclipse Collections, {@link #cartesianProduct(List)} is implemented here from scratch.
29 *
30 * @author Gabor Bergmann
31 * @since 2.3
32 */
33public final class Sets {
34
35 /**
36 * @since 2.4
37 */
38 public static <A> Set<A> newSet(Iterable<A> elements) {
39 return org.eclipse.collections.impl.factory.Sets.mutable.ofAll(elements);
40 }
41
42 public static <A> Set<A> intersection(Set<A> left, Set<A> right) {
43 return org.eclipse.collections.impl.factory.Sets.intersect(left, right);
44 }
45
46 public static <A> Set<A> difference(Set<A> left, Set<A> right) {
47 return org.eclipse.collections.impl.factory.Sets.difference(left, right);
48 }
49
50 public static <A> Set<A> union(Set<A> left, Set<A> right) {
51 return org.eclipse.collections.impl.factory.Sets.union(left, right);
52 }
53
54 public static <A> Set<? extends Set<A>> powerSet(Set<A> set) {
55 return org.eclipse.collections.impl.factory.Sets.powerSet(set);
56 }
57
58 public static <A> Set<List<A>> cartesianProduct(List<? extends Set<? extends A>> setsList) {
59
60 class Suffix { // simple immutable linked list
61 private A head;
62 private Suffix next;
63
64 public Suffix(A head, Suffix next) {
65 super();
66 this.head = head;
67 this.next = next;
68 }
69
70 public List<A> toList() {
71 ArrayList<A> result = new ArrayList<>();
72 for (Suffix cursor = this; cursor!=null; cursor = cursor.next)
73 result.add(cursor.head);
74 return result;
75 }
76 }
77
78 // build result lists from end to start, in the form of suffixes
79 Stream<Suffix> suffixes = Stream.of((Suffix) null /* empty suffix*/);
80 for (int i = setsList.size()-1; i>=0; --i) { // iterate sets in reverse order
81 Set<? extends A> set = setsList.get(i);
82 suffixes = suffixes.flatMap(suffix -> set.stream().map(newElement -> new Suffix(newElement, suffix)));
83 }
84
85
86 return suffixes.map(Suffix::toList).collect(Collectors.toSet());
87 }
88
89
90}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Signed.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Signed.java
new file mode 100644
index 00000000..8f8bc228
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/Signed.java
@@ -0,0 +1,60 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Objects;
12
13/**
14 * A piece of data associated with a direction.
15 *
16 * @author Tamas Szabo
17 * @since 2.4
18 */
19public class Signed<Payload extends Comparable<Payload>> {
20
21 private final Payload payload;
22 private final Direction direction;
23
24 public Signed(final Direction direction, final Payload payload) {
25 this.payload = payload;
26 this.direction = direction;
27 }
28
29 public Payload getPayload() {
30 return payload;
31 }
32
33 public Direction getDirection() {
34 return direction;
35 }
36
37 @Override
38 public int hashCode() {
39 return Objects.hash(direction, payload);
40 }
41
42 @Override
43 public boolean equals(final Object obj) {
44 if (this == obj) {
45 return true;
46 } else if (obj == null || this.getClass() != obj.getClass()) {
47 return false;
48 } else {
49 @SuppressWarnings("rawtypes")
50 final Signed other = (Signed) obj;
51 return direction == other.direction && Objects.equals(payload, other.payload);
52 }
53 }
54
55 @Override
56 public String toString() {
57 return this.direction.asSign() + this.payload.toString();
58 }
59
60} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonInstanceProvider.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonInstanceProvider.java
new file mode 100644
index 00000000..cc5963f7
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonInstanceProvider.java
@@ -0,0 +1,29 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2015, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11/**
12 * A provider implementation that always returns the same object instance.
13 * @author Zoltan Ujhelyi
14 */
15public class SingletonInstanceProvider<T> implements IProvider<T>{
16
17 private T instance;
18
19 public SingletonInstanceProvider(T instance) {
20 Preconditions.checkArgument(instance != null, "Instance parameter must not be null.");
21 this.instance = instance;
22 }
23
24 @Override
25 public T get() {
26 return instance;
27 }
28
29} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonMemoryView.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonMemoryView.java
new file mode 100644
index 00000000..b303f9ad
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/SingletonMemoryView.java
@@ -0,0 +1,105 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2018, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Collections;
12import java.util.Iterator;
13import java.util.NoSuchElementException;
14import java.util.Set;
15
16/**
17 * An immutable memory view that consists of a single non-null element with multiplicity 1.
18 * @author Gabor Bergmann
19 * @since 2.0
20 */
21public final class SingletonMemoryView<Value> implements IMemoryView<Value> {
22
23 private Value wrapped;
24 private static final int ONE_HASH = Integer.valueOf(1).hashCode();
25
26 public SingletonMemoryView(Value value) {
27 this.wrapped = value;
28 }
29
30 @Override
31 public Iterator<Value> iterator() {
32 return new Iterator<Value>() {
33 boolean hasNext = true;
34
35 @Override
36 public boolean hasNext() {
37 return hasNext;
38 }
39
40 @Override
41 public Value next() {
42 if (hasNext) {
43 hasNext = false;
44 return wrapped;
45 } else throw new NoSuchElementException();
46 }
47 };
48 }
49
50 @Override
51 public int getCount(Value value) {
52 return wrapped.equals(value) ? 1 : 0;
53 }
54
55 @Override
56 public int getCountUnsafe(Object value) {
57 return wrapped.equals(value) ? 1 : 0;
58 }
59
60 @Override
61 public boolean containsNonZero(Value value) {
62 return wrapped.equals(value);
63 }
64
65 @Override
66 public boolean containsNonZeroUnsafe(Object value) {
67 return wrapped.equals(value);
68 }
69
70 @Override
71 public int size() {
72 return 1;
73 }
74
75 @Override
76 public boolean isEmpty() {
77 return false;
78 }
79
80 @Override
81 public Set<Value> distinctValues() {
82 return Collections.singleton(wrapped);
83 }
84
85 @Override
86 public boolean equals(Object obj) {
87 if (obj instanceof IMemoryView<?>) {
88 IMemoryView<?> other = (IMemoryView<?>) obj;
89 if (1 != other.size()) return false;
90 if (1 != other.getCountUnsafe(wrapped)) return false;
91 return true;
92 }
93 return false;
94 }
95
96 @Override
97 public int hashCode() {
98 return wrapped.hashCode() ^ ONE_HASH;
99 }
100
101 @Override
102 public String toString() {
103 return "{" + wrapped + "}";
104 }
105}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/TimelyMemory.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/TimelyMemory.java
new file mode 100644
index 00000000..90fcad4d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/TimelyMemory.java
@@ -0,0 +1,517 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util;
10
11import java.util.Collections;
12import java.util.Map;
13import java.util.Map.Entry;
14import java.util.NavigableMap;
15import java.util.Set;
16import java.util.TreeMap;
17
18import tools.refinery.viatra.runtime.matchers.tuple.ITuple;
19import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
20import tools.refinery.viatra.runtime.matchers.util.resumable.Resumable;
21import tools.refinery.viatra.runtime.matchers.util.resumable.UnmaskedResumable;
22import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
23import tools.refinery.viatra.runtime.matchers.util.timeline.Timeline;
24import tools.refinery.viatra.runtime.matchers.util.timeline.Timelines;
25
26/**
27 * A timely memory implementation that incrementally maintains the {@link Timeline}s of tuples. The memory is capable of
28 * lazy folding (see {@link Resumable}).
29 *
30 * @author Tamas Szabo
31 * @since 2.3
32 */
33public class TimelyMemory<Timestamp extends Comparable<Timestamp>> implements Clearable, UnmaskedResumable<Timestamp> {
34
35 protected final Map<Tuple, TreeMap<Timestamp, CumulativeCounter>> counters;
36 protected final Map<Tuple, Timeline<Timestamp>> timelines;
37 public final TreeMap<Timestamp, Map<Tuple, FoldingState>> foldingState;
38 protected final Set<Tuple> presentAtInfinity;
39 protected final boolean isLazy;
40 protected final Diff<Timestamp> EMPTY_DIFF = new Diff<Timestamp>();
41
42 public TimelyMemory() {
43 this(false);
44 }
45
46 public TimelyMemory(final boolean isLazy) {
47 this.counters = CollectionsFactory.createMap();
48 this.timelines = CollectionsFactory.createMap();
49 this.presentAtInfinity = CollectionsFactory.createSet();
50 this.isLazy = isLazy;
51 if (isLazy) {
52 this.foldingState = CollectionsFactory.createTreeMap();
53 } else {
54 this.foldingState = null;
55 }
56 }
57
58 @Override
59 public Set<Tuple> getResumableTuples() {
60 if (this.foldingState == null || this.foldingState.isEmpty()) {
61 return Collections.emptySet();
62 } else {
63 return this.foldingState.firstEntry().getValue().keySet();
64 }
65 }
66
67 @Override
68 public Timestamp getResumableTimestamp() {
69 if (this.foldingState == null || this.foldingState.isEmpty()) {
70 return null;
71 } else {
72 return this.foldingState.firstKey();
73 }
74 }
75
76 /**
77 * Registers the given folding state for the specified timestamp and tuple. If there is already a state stored, the
78 * two states will be merged together.
79 */
80 protected void addFoldingState(final Tuple tuple, final FoldingState state, final Timestamp timestamp) {
81 assert state.diff != 0;
82 final Map<Tuple, FoldingState> tupleMap = this.foldingState.computeIfAbsent(timestamp,
83 k -> CollectionsFactory.createMap());
84 tupleMap.compute(tuple, (k, v) -> {
85 return v == null ? state : v.merge(state);
86 });
87 }
88
89 @Override
90 public Map<Tuple, Diff<Timestamp>> resumeAt(final Timestamp timestamp) {
91 Timestamp current = this.getResumableTimestamp();
92 if (current == null) {
93 throw new IllegalStateException("There is othing to fold!");
94 } else if (current.compareTo(timestamp) != 0) {
95 // It can happen that already registered folding states end up having zero diffs,
96 // and we are instructed to continue folding at a timestamp that is higher
97 // than the lowest timestamp with a folding state.
98 // However, we only do garbage collection in doFoldingState, so now it is time to
99 // first clean up those states with zero diffs.
100 while (current != null && current.compareTo(timestamp) < 0) {
101 final Map<Tuple, FoldingState> tupleMap = this.foldingState.remove(current);
102 for (final Entry<Tuple, FoldingState> entry : tupleMap.entrySet()) {
103 final Tuple key = entry.getKey();
104 final FoldingState value = entry.getValue();
105 if (value.diff != 0) {
106 throw new IllegalStateException("Expected zero diff during garbage collection at " + current
107 + ", but the diff was " + value.diff + "!");
108 }
109 doFoldingStep(key, value, current);
110 }
111 current = this.getResumableTimestamp();
112 }
113 if (current == null || current.compareTo(timestamp) != 0) {
114 throw new IllegalStateException("Expected to continue folding at " + timestamp + "!");
115 }
116 }
117
118 final Map<Tuple, Diff<Timestamp>> diffMap = CollectionsFactory.createMap();
119 final Map<Tuple, FoldingState> tupleMap = this.foldingState.remove(timestamp);
120 for (final Entry<Tuple, FoldingState> entry : tupleMap.entrySet()) {
121 final Tuple key = entry.getKey();
122 final FoldingState value = entry.getValue();
123 diffMap.put(key, doFoldingStep(key, value, timestamp));
124 }
125
126 if (this.foldingState.get(timestamp) != null) {
127 throw new IllegalStateException(
128 "Folding at " + timestamp + " produced more folding work at the same timestamp!");
129 }
130
131 return diffMap;
132 }
133
134 protected Diff<Timestamp> doFoldingStep(final Tuple tuple, final FoldingState state, final Timestamp timestamp) {
135 final CumulativeCounter counter = getCounter(tuple, timestamp);
136 if (state.diff == 0) {
137 gcCounters(counter, tuple, timestamp);
138 return EMPTY_DIFF;
139 } else {
140 final Diff<Timestamp> resultDiff = new Diff<>();
141 final Timestamp nextTimestamp = this.counters.get(tuple).higherKey(timestamp);
142
143 final int oldCumulative = counter.cumulative;
144
145 counter.cumulative += state.diff;
146
147 computeDiffsLazy(state.diff < 0 ? Direction.DELETE : Direction.INSERT, oldCumulative, counter.cumulative,
148 timestamp, nextTimestamp, resultDiff);
149
150 gcCounters(counter, tuple, timestamp);
151 updateTimeline(tuple, resultDiff);
152
153 // prepare folding state for next timestamp
154 if (nextTimestamp != null) {
155 // propagate the incoming diff, not the diff stored in counter
156 addFoldingState(tuple, new FoldingState(state.diff), nextTimestamp);
157 }
158
159 return resultDiff;
160 }
161 }
162
163 /**
164 * On-demand initializes and returns the counter for the given tuple and timestamp.
165 */
166 protected CumulativeCounter getCounter(final Tuple tuple, final Timestamp timestamp) {
167 final TreeMap<Timestamp, CumulativeCounter> counterTimeline = this.counters.computeIfAbsent(tuple,
168 k -> CollectionsFactory.createTreeMap());
169
170 final CumulativeCounter counter = counterTimeline.computeIfAbsent(timestamp, k -> {
171 final Entry<Timestamp, CumulativeCounter> previousCounter = counterTimeline.lowerEntry(k);
172 final int previousCumulative = previousCounter == null ? 0 : previousCounter.getValue().cumulative;
173 return new CumulativeCounter(0, previousCumulative);
174 });
175
176 return counter;
177 }
178
179 /**
180 * Garbage collects the counter of the given tuple and timestamp if the new diff is zero.
181 */
182 protected void gcCounters(final CumulativeCounter counter, final Tuple tuple, final Timestamp timestamp) {
183 if (counter.diff == 0) {
184 final TreeMap<Timestamp, CumulativeCounter> counterMap = this.counters.get(tuple);
185 counterMap.remove(timestamp);
186 if (counterMap.isEmpty()) {
187 this.counters.remove(tuple);
188 }
189 }
190 }
191
192 /**
193 * Utility method that computes the timeline diffs in case of lazy memories. The diffs will be inserted into the
194 * input parameter. This method computes diffs for entire plateaus that spans from timestamp to nextTimestamp.
195 *
196 * Compared to the eager version of this method, the lazy version makes use of both the old and the new cumulative
197 * values because it can happen that the cumulative is incremented by a value that is larger than 1 (as folding
198 * states are merged together). This means that we cant decide whether the cumulative became positive by comparing
199 * the new value to 1.
200 */
201 protected void computeDiffsLazy(final Direction direction, final int oldCumulative, final int newCumulative,
202 final Timestamp timestamp, final Timestamp nextTimestamp, final Diff<Timestamp> diffs) {
203 if (direction == Direction.INSERT) {
204 if (newCumulative == 0) {
205 throw new IllegalStateException("Cumulative count can never be negative!");
206 } else {
207 if (oldCumulative == 0 /* current became positive */) {
208 // (1) either we sent out a DELETE before and now we need to cancel it,
209 // (2) or we just INSERT this for the first time
210 diffs.add(new Signed<>(Direction.INSERT, timestamp));
211 if (nextTimestamp != null) {
212 diffs.add(new Signed<>(Direction.DELETE, nextTimestamp));
213 }
214 } else /* current stays positive */ {
215 // nothing to do
216 }
217 }
218 } else {
219 if (newCumulative < 0) {
220 throw new IllegalStateException("Cumulative count can never be negative!");
221 } else {
222 if (newCumulative == 0 /* current became zero */) {
223 diffs.add(new Signed<>(Direction.DELETE, timestamp));
224 if (nextTimestamp != null) {
225 diffs.add(new Signed<>(Direction.INSERT, nextTimestamp));
226 }
227 } else /* current stays positive */ {
228 // nothing to do
229 }
230 }
231 }
232 }
233
234 /**
235 * Utility method that computes the timeline diffs in case of eager memories. The diffs will be inserted into the
236 * input parameter. This method computes diffs that describe momentary changes instead of plateaus. Returns a
237 * {@link SignChange} that describes how the sign has changed at the given timestamp.
238 */
239 protected SignChange computeDiffsEager(final Direction direction, final CumulativeCounter counter,
240 final SignChange signChangeAtPrevious, final Timestamp timestamp, final Diff<Timestamp> diffs) {
241 if (direction == Direction.INSERT) {
242 if (counter.cumulative == 0) {
243 throw new IllegalStateException("Cumulative count can never be negative!");
244 } else {
245 if (counter.cumulative == 1 /* current became positive */) {
246 if (signChangeAtPrevious != SignChange.BECAME_POSITIVE) {
247 // (1) either we sent out a DELETE before and now we need to cancel it,
248 // (2) or we just INSERT this for the first time
249 diffs.add(new Signed<>(Direction.INSERT, timestamp));
250 } else {
251 // we have already emitted this at the previous timestamp
252 // both previous and current became positive
253 throw new IllegalStateException(
254 "This would mean that the diff at current is 0 " + counter.diff);
255 }
256
257 // remember for next timestamp
258 return SignChange.BECAME_POSITIVE;
259 } else /* current stays positive */ {
260 if (signChangeAtPrevious == SignChange.BECAME_POSITIVE) {
261 // we sent out an INSERT before and now the timeline is positive already starting at previous
262 // we need to cancel the effect of this with a DELETE
263 diffs.add(new Signed<>(Direction.DELETE, timestamp));
264 } else {
265 // this is normal, both previous and current was positive and stays positive
266 }
267
268 // remember for next timestamp
269 return SignChange.IRRELEVANT;
270 }
271 }
272 } else {
273 if (counter.cumulative < 0) {
274 throw new IllegalStateException("Cumulative count can never be negative!");
275 } else {
276 if (counter.cumulative == 0 /* current became zero */) {
277 if (signChangeAtPrevious != SignChange.BECAME_ZERO) {
278 // (1) either we sent out a INSERT before and now we need to cancel it,
279 // (2) or we just DELETE this for the first time
280 diffs.add(new Signed<>(Direction.DELETE, timestamp));
281 } else {
282 // we have already emitted this at the previous timestamp
283 // both previous and current became zero
284 throw new IllegalStateException(
285 "This would mean that the diff at current is 0 " + counter.diff);
286 }
287
288 // remember for next timestamp
289 return SignChange.BECAME_ZERO;
290 } else /* current stays positive */ {
291 if (signChangeAtPrevious == SignChange.BECAME_ZERO) {
292 // we sent out a DELETE before and now the timeline is zero already starting at previous
293 // we need to cancel the effect of this with a INSERT
294 diffs.add(new Signed<>(Direction.INSERT, timestamp));
295 } else {
296 // this is normal, both previous and current was positive and stays positive
297 }
298
299 // remember for next timestamp
300 return SignChange.IRRELEVANT;
301 }
302 }
303 }
304 }
305
306 public Diff<Timestamp> put(final Tuple tuple, final Timestamp timestamp) {
307 if (this.isLazy) {
308 return putLazy(tuple, timestamp);
309 } else {
310 return putEager(tuple, timestamp);
311 }
312 }
313
314 public Diff<Timestamp> remove(final Tuple tuple, final Timestamp timestamp) {
315 if (this.isLazy) {
316 return removeLazy(tuple, timestamp);
317 } else {
318 return removeEager(tuple, timestamp);
319 }
320 }
321
322 protected Diff<Timestamp> putEager(final Tuple tuple, final Timestamp timestamp) {
323 final Diff<Timestamp> resultDiff = new Diff<>();
324 final CumulativeCounter counter = getCounter(tuple, timestamp);
325 ++counter.diff;
326
327 // before the INSERT timestamp, no change at all
328 // it cannot happen that those became positive in this round
329 SignChange signChangeAtPrevious = SignChange.IRRELEVANT;
330
331 final NavigableMap<Timestamp, CumulativeCounter> nextCounters = this.counters.get(tuple).tailMap(timestamp,
332 true);
333 for (final Entry<Timestamp, CumulativeCounter> currentEntry : nextCounters.entrySet()) {
334 final Timestamp currentTimestamp = currentEntry.getKey();
335 final CumulativeCounter currentCounter = currentEntry.getValue();
336 ++currentCounter.cumulative;
337 signChangeAtPrevious = computeDiffsEager(Direction.INSERT, currentCounter, signChangeAtPrevious,
338 currentTimestamp, resultDiff);
339 }
340
341 gcCounters(counter, tuple, timestamp);
342 updateTimeline(tuple, resultDiff);
343
344 return resultDiff;
345 }
346
347 protected Diff<Timestamp> putLazy(final Tuple tuple, final Timestamp timestamp) {
348 final CumulativeCounter counter = getCounter(tuple, timestamp);
349 counter.diff += 1;
350 // before the INSERT timestamp, no change at all
351 // it cannot happen that those became positive in this round
352 addFoldingState(tuple, new FoldingState(+1), timestamp);
353 return EMPTY_DIFF;
354 }
355
356 protected Diff<Timestamp> removeEager(final Tuple tuple, final Timestamp timestamp) {
357 final Diff<Timestamp> resultDiff = new Diff<>();
358 final CumulativeCounter counter = getCounter(tuple, timestamp);
359 --counter.diff;
360
361 // before the DELETE timestamp, no change at all
362 // it cannot happen that those became zero in this round
363 SignChange signChangeAtPrevious = SignChange.IRRELEVANT;
364
365 final NavigableMap<Timestamp, CumulativeCounter> nextCounters = this.counters.get(tuple).tailMap(timestamp,
366 true);
367 for (final Entry<Timestamp, CumulativeCounter> currentEntry : nextCounters.entrySet()) {
368 final Timestamp currentTimestamp = currentEntry.getKey();
369 final CumulativeCounter currentCounter = currentEntry.getValue();
370 --currentCounter.cumulative;
371 signChangeAtPrevious = computeDiffsEager(Direction.DELETE, currentCounter, signChangeAtPrevious,
372 currentTimestamp, resultDiff);
373 }
374
375 gcCounters(counter, tuple, timestamp);
376 updateTimeline(tuple, resultDiff);
377
378 return resultDiff;
379 }
380
381 protected Diff<Timestamp> removeLazy(final Tuple tuple, final Timestamp timestamp) {
382 final CumulativeCounter counter = getCounter(tuple, timestamp);
383 counter.diff -= 1;
384 // before the DELETE timestamp, no change at all
385 // it cannot happen that those became zero in this round
386 addFoldingState(tuple, new FoldingState(-1), timestamp);
387 return EMPTY_DIFF;
388 }
389
390 /**
391 * Updates and garbage collects the timeline of the given tuple based on the given timeline diff.
392 */
393 protected void updateTimeline(final Tuple tuple, final Diff<Timestamp> diff) {
394 if (!diff.isEmpty()) {
395 this.timelines.compute(tuple, (k, oldTimeline) -> {
396 this.presentAtInfinity.remove(tuple);
397 final Timeline<Timestamp> timeline = oldTimeline == null ? Timelines.createFrom(diff)
398 : oldTimeline.mergeAdditive(diff);
399 if (timeline.isPresentAtInfinity()) {
400 this.presentAtInfinity.add(tuple);
401 }
402 if (timeline.isEmpty()) {
403 return null;
404 } else {
405 return timeline;
406 }
407 });
408 }
409 }
410
411 /**
412 * @since 2.8
413 */
414 public Set<Tuple> getTuplesAtInfinity() {
415 return this.presentAtInfinity;
416 }
417
418 /**
419 * Returns the number of tuples that are present at the moment 'infinity'.
420 */
421 public int getCountAtInfinity() {
422 return this.presentAtInfinity.size();
423 }
424
425 /**
426 * Returns true if the given tuple is present at the moment 'infinity'.
427 */
428 public boolean isPresentAtInfinity(final Tuple tuple) {
429 final Timeline<Timestamp> timeline = this.timelines.get(tuple);
430 if (timeline == null) {
431 return false;
432 } else {
433 return timeline.isPresentAtInfinity();
434 }
435 }
436
437 public boolean isEmpty() {
438 return this.counters.isEmpty();
439 }
440
441 public int size() {
442 return this.counters.size();
443 }
444
445 public Set<Tuple> keySet() {
446 return this.counters.keySet();
447 }
448
449 public Map<Tuple, Timeline<Timestamp>> asMap() {
450 return this.timelines;
451 }
452
453 public Timeline<Timestamp> get(final ITuple tuple) {
454 return this.timelines.get(tuple);
455 }
456
457 @Override
458 public void clear() {
459 this.counters.clear();
460 this.timelines.clear();
461 if (this.foldingState != null) {
462 this.foldingState.clear();
463 }
464 }
465
466 public boolean containsKey(final ITuple tuple) {
467 return this.counters.containsKey(tuple);
468 }
469
470 @Override
471 public String toString() {
472 return this.counters + "\n" + this.timelines + "\n" + this.foldingState + "\n";
473 }
474
475 protected static final class CumulativeCounter {
476 protected int diff;
477 protected int cumulative;
478
479 protected CumulativeCounter(final int diff, final int cumulative) {
480 this.diff = diff;
481 this.cumulative = cumulative;
482 }
483
484 @Override
485 public String toString() {
486 return "{diff=" + this.diff + ", cumulative=" + this.cumulative + "}";
487 }
488
489 }
490
491 protected static final class FoldingState {
492 protected final int diff;
493
494 protected FoldingState(final int diff) {
495 this.diff = diff;
496 }
497
498 @Override
499 public String toString() {
500 return "{diff=" + this.diff + "}";
501 }
502
503 /**
504 * The returned result will never be null, even if the resulting diff is zero.
505 */
506 public FoldingState merge(final FoldingState that) {
507 Preconditions.checkArgument(that != null);
508 return new FoldingState(this.diff + that.diff);
509 }
510
511 }
512
513 protected enum SignChange {
514 BECAME_POSITIVE, BECAME_ZERO, IRRELEVANT;
515 }
516
517}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java
new file mode 100644
index 00000000..ea70e61d
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java
@@ -0,0 +1,36 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.resumable;
10
11import java.util.Map;
12
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
15
16/**
17 * A masked {@link Resumable} implementation, which maintains lazy folding per tuple signature.
18 *
19 * @author Tamas Szabo
20 * @since 2.4
21 */
22public interface MaskedResumable<Timestamp extends Comparable<Timestamp>> extends Resumable<Timestamp> {
23
24 /**
25 * When called, the folding of the state shall be resumed at the given timestamp. The resumable is expected to
26 * do a folding step at the given timestamp only. Afterwards, folding shall be interrupted, even if there is more
27 * folding to do towards higher timestamps.
28 */
29 public Map<Tuple, Map<Tuple, Diff<Timestamp>>> resumeAt(final Timestamp timestamp);
30
31 /**
32 * Returns the set of signatures for which lazy folding shall be resumed at the next timestamp.
33 */
34 public Iterable<Tuple> getResumableSignatures();
35
36}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/Resumable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/Resumable.java
new file mode 100644
index 00000000..2861df20
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/Resumable.java
@@ -0,0 +1,27 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.resumable;
10
11/**
12 * A resumable lazily folds its state towards higher timestamps. Folding shall be done in the increasing order of
13 * timestamps, and it shall be interrupted after each step. The resumable can then be instructed to resume the folding,
14 * one step at a time.
15 *
16 * @author Tamas Szabo
17 * @since 2.4
18 */
19public interface Resumable<Timestamp extends Comparable<Timestamp>> {
20
21 /**
22 * Returns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this
23 * resumable.
24 */
25 public Timestamp getResumableTimestamp();
26
27}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/UnmaskedResumable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/UnmaskedResumable.java
new file mode 100644
index 00000000..1671940b
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/UnmaskedResumable.java
@@ -0,0 +1,36 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.resumable;
10
11import java.util.Map;
12
13import tools.refinery.viatra.runtime.matchers.tuple.Tuple;
14import tools.refinery.viatra.runtime.matchers.util.timeline.Diff;
15
16/**
17 * A unmasked {@link Resumable} implementation, which maintains lazy folding without caring about tuple signatures.
18 *
19 * @author Tamas Szabo
20 * @since 2.4
21 */
22public interface UnmaskedResumable<Timestamp extends Comparable<Timestamp>> extends Resumable<Timestamp> {
23
24 /**
25 * When called, the folding of the state shall be resumed at the given timestamp. The resumable is expected to
26 * do a folding step at the given timestamp only. Afterwards, folding shall be interrupted, even if there is more
27 * folding to do towards higher timestamps.
28 */
29 public Map<Tuple, Diff<Timestamp>> resumeAt(final Timestamp timestamp);
30
31 /**
32 * Returns the set of tuples for which lazy folding shall be resumed at the next timestamp.
33 */
34 public Iterable<Tuple> getResumableTuples();
35
36}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/CompactTimeline.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/CompactTimeline.java
new file mode 100644
index 00000000..0532d094
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/CompactTimeline.java
@@ -0,0 +1,111 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.timeline;
10
11import java.util.ArrayList;
12import java.util.Iterator;
13import java.util.List;
14
15import tools.refinery.viatra.runtime.matchers.util.Direction;
16import tools.refinery.viatra.runtime.matchers.util.Signed;
17
18/**
19 * A compact timeline may cosist of an arbitrary amount of moments.
20 * It is backed by an {@link ArrayList}.
21 *
22 * @author Tamas Szabo
23 * @since 2.4
24 */
25public class CompactTimeline<Timestamp extends Comparable<Timestamp>> extends Timeline<Timestamp> {
26
27 protected final List<Timestamp> elements;
28
29 CompactTimeline() {
30 this.elements = new ArrayList<>();
31 }
32
33 CompactTimeline(final Timestamp timestamp) {
34 this();
35 this.elements.add(timestamp);
36 }
37
38 CompactTimeline(final List<Timestamp> timestamps) {
39 this.elements = new ArrayList<>(timestamps.size());
40 this.elements.addAll(timestamps);
41 }
42
43 CompactTimeline(final Diff<Timestamp> diff) {
44 this.elements = new ArrayList<>(diff.size());
45 Direction expected = Direction.INSERT;
46 for (Signed<Timestamp> signed : diff) {
47 if (!expected.equals(signed.getDirection())) {
48 throw new IllegalStateException(String.format("Expected direction (%s) constraint violated! %s @%s",
49 expected, diff, signed.getPayload()));
50 }
51 this.elements.add(signed.getPayload());
52 expected = expected.opposite();
53 }
54 }
55
56 @Override
57 public Signed<Timestamp> getSigned(final int index) {
58 final Direction direction = index % 2 == 0 ? Direction.INSERT : Direction.DELETE;
59 return new Signed<>(direction, this.getUnsigned(index));
60 }
61
62 @Override
63 public Timestamp getUnsigned(final int index) {
64 if (this.elements.size() <= index) {
65 throw new IllegalArgumentException(
66 "Timeline size (" + this.size() + ") is smaller than requested index " + index + "!");
67 } else {
68 return this.elements.get(index);
69 }
70 }
71
72 @Override
73 public int size() {
74 return this.elements.size();
75 }
76
77 @Override
78 public boolean isPresentAtInfinity() {
79 // if it has an odd length, then it ends with "INSERT"
80 return this.size() % 2 == 1;
81 }
82
83 @Override
84 public Iterable<Signed<Timestamp>> asChangeSequence() {
85 Iterable<Timestamp> outer = this.elements;
86 return () -> {
87 final Iterator<Timestamp> itr = outer.iterator();
88 return new Iterator<Signed<Timestamp>>() {
89 Direction direction = Direction.INSERT;
90
91 @Override
92 public boolean hasNext() {
93 return itr.hasNext();
94 }
95
96 @Override
97 public Signed<Timestamp> next() {
98 final Signed<Timestamp> result = new Signed<Timestamp>(direction, itr.next());
99 direction = direction.opposite();
100 return result;
101 }
102 };
103 };
104 }
105
106 @Override
107 public boolean isEmpty() {
108 return this.elements.isEmpty();
109 }
110
111}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Diff.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Diff.java
new file mode 100644
index 00000000..cec6049e
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Diff.java
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.timeline;
10
11import java.util.ArrayList;
12
13import tools.refinery.viatra.runtime.matchers.util.Signed;
14
15/**
16 * The description of a delta that specifies how a {@link Timeline} changes. It consists of {@link Signed} timestamps that
17 * depict the moments of insertions and deletions on the timeline.
18 *
19 * @author Tamas Szabo
20 * @since 2.4
21 * @param <Timestamp>
22 * the type representing the timestamps
23 */
24public class Diff<Timestamp extends Comparable<Timestamp>> extends ArrayList<Signed<Timestamp>> {
25
26 private static final long serialVersionUID = 3853460426655994160L;
27
28 public Diff() {
29
30 }
31
32 public void appendWithCancellation(Signed<Timestamp> item) {
33 if (this.isEmpty()) {
34 this.add(item);
35 } else {
36 final Signed<Timestamp> last = this.get(this.size() - 1);
37 final int lastMinusItem = last.getPayload().compareTo(item.getPayload());
38 if (lastMinusItem == 0) {
39 if (last.getDirection() != item.getDirection()) {
40 // cancellation
41 this.remove(this.size() - 1);
42 } else {
43 throw new IllegalStateException(
44 "Trying to insert or delete for the second time at the same timestamp! " + item);
45 }
46 } else if (lastMinusItem > 0) {
47 throw new IllegalStateException(
48 "Trying to append a timestamp that is smaller than the last one! " + last + " " + item);
49 } else {
50 this.add(item);
51 }
52 }
53 }
54
55} \ No newline at end of file
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/SingletonTimeline.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/SingletonTimeline.java
new file mode 100644
index 00000000..526a95f5
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/SingletonTimeline.java
@@ -0,0 +1,73 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.timeline;
10
11import java.util.Collections;
12
13import tools.refinery.viatra.runtime.matchers.util.Direction;
14import tools.refinery.viatra.runtime.matchers.util.Signed;
15
16/**
17 * A timeline which solely consists of one timestamp value, representing a single insertion. Intuitively, a singleton
18 * timeline always represents a bump which starts at the given timestamp and lasts till plus infinity.
19 *
20 * @author Tamas Szabo
21 * @since 2.4
22 */
23public class SingletonTimeline<Timestamp extends Comparable<Timestamp>> extends Timeline<Timestamp> {
24
25 protected final Timestamp start;
26
27 SingletonTimeline(final Timestamp timestamp) {
28 this.start = timestamp;
29 }
30
31 SingletonTimeline(final Diff<Timestamp> diff) {
32 if (diff.size() != 1 || diff.get(0).getDirection() == Direction.DELETE) {
33 throw new IllegalArgumentException("There is only a single (insert) timestamp in the singleton timestamp!");
34 } else {
35 this.start = diff.get(0).getPayload();
36 }
37 }
38
39 @Override
40 public Signed<Timestamp> getSigned(final int index) {
41 return new Signed<>(Direction.INSERT, this.getUnsigned(index));
42 }
43
44 @Override
45 public Timestamp getUnsigned(final int index) {
46 if (index != 0) {
47 throw new IllegalArgumentException("There is only a single (insert) timestamp in the singleton timestamp!");
48 } else {
49 return this.start;
50 }
51 }
52
53 @Override
54 public int size() {
55 return 1;
56 }
57
58 @Override
59 public boolean isPresentAtInfinity() {
60 return true;
61 }
62
63 @Override
64 public Iterable<Signed<Timestamp>> asChangeSequence() {
65 return Collections.singletonList(this.getSigned(0));
66 }
67
68 @Override
69 public boolean isEmpty() {
70 return false;
71 }
72
73}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timeline.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timeline.java
new file mode 100644
index 00000000..9214536c
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timeline.java
@@ -0,0 +1,146 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.timeline;
10
11import java.util.ArrayList;
12import java.util.Iterator;
13import java.util.List;
14
15import tools.refinery.viatra.runtime.matchers.util.Direction;
16import tools.refinery.viatra.runtime.matchers.util.Signed;
17
18/**
19 * A timeline describes the life cycle of a piece of data (typically a tuple in a relation) as a sequence of moments.
20 * Even moments represent appearances, odd moments represent disappearances. A timeline is immutable, once created, it
21 * is not possible to extend it with further moments.
22 *
23 * @author Tamas Szabo
24 * @since 2.4
25 */
26public abstract class Timeline<Timestamp extends Comparable<Timestamp>> {
27
28 public abstract Iterable<Signed<Timestamp>> asChangeSequence();
29
30 public abstract boolean isPresentAtInfinity();
31
32 public abstract boolean isEmpty();
33
34 public abstract int size();
35
36 public abstract Signed<Timestamp> getSigned(final int index);
37
38 public abstract Timestamp getUnsigned(final int index);
39
40 public Timeline<Timestamp> mergeMultiplicative(final Timeline<Timestamp> that) {
41 final List<Timestamp> result = new ArrayList<>();
42 int thisIdx = 0, thatIdx = 0;
43 Timestamp thisNext = thisIdx < this.size() ? this.getUnsigned(thisIdx) : null;
44 Timestamp thatNext = thatIdx < that.size() ? that.getUnsigned(thatIdx) : null;
45
46 while (thisNext != null || thatNext != null) {
47 int thisMinusThat = 0;
48 if (thisNext != null && thatNext != null) {
49 thisMinusThat = thisNext.compareTo(thatNext);
50 }
51 if (thisNext == null || thisMinusThat > 0) {
52 if (thisIdx % 2 == 1) {
53 result.add(thatNext);
54 }
55 thatIdx++;
56 thatNext = thatIdx < that.size() ? that.getUnsigned(thatIdx) : null;
57 } else if (thatNext == null || thisMinusThat < 0) {
58 if (thatIdx % 2 == 1) {
59 result.add(thisNext);
60 }
61 thisIdx++;
62 thisNext = thisIdx < this.size() ? this.getUnsigned(thisIdx) : null;
63 } else {
64 if (thisIdx % 2 == thatIdx % 2) {
65 result.add(thisNext);
66 }
67 thisIdx++;
68 thatIdx++;
69 thatNext = thatIdx < that.size() ? that.getUnsigned(thatIdx) : null;
70 thisNext = thisIdx < this.size() ? this.getUnsigned(thisIdx) : null;
71 }
72 }
73
74 return Timelines.createFrom(result);
75 }
76
77 /**
78 * Merges this timeline with the given timestamp diff. The expectation is that the resulting timeline starts with an
79 * insertion. The logic is similar to a merge sort; we iterate side-by-side over the timeline and the diff. During
80 * the merge, cancellation can happen if at the same timestamp we observe different signs at the corresponding
81 * timeline and diff elements.
82 */
83 public Timeline<Timestamp> mergeAdditive(final Diff<Timestamp> diff) {
84 final Iterator<Signed<Timestamp>> thisItr = this.asChangeSequence().iterator();
85 final Iterator<Signed<Timestamp>> diffItr = diff.iterator();
86 final List<Timestamp> result = new ArrayList<>();
87 Direction expected = Direction.INSERT;
88 Signed<Timestamp> thisNext = thisItr.hasNext() ? thisItr.next() : null;
89 Signed<Timestamp> diffNext = diffItr.hasNext() ? diffItr.next() : null;
90
91 while (thisNext != null || diffNext != null) {
92 int thisMinusDiff = 0;
93 if (thisNext != null && diffNext != null) {
94 thisMinusDiff = thisNext.getPayload().compareTo(diffNext.getPayload());
95 }
96
97 if (thisNext == null || thisMinusDiff > 0) {
98 if (!expected.equals(diffNext.getDirection())) {
99 throw new IllegalStateException(
100 String.format("Expected direction (%s) constraint violated! %s %s @%s", expected, this,
101 diff, diffNext.getPayload()));
102 }
103 result.add(diffNext.getPayload());
104 diffNext = diffItr.hasNext() ? diffItr.next() : null;
105 expected = expected.opposite();
106 } else if (diffNext == null || thisMinusDiff < 0) {
107 if (!expected.equals(thisNext.getDirection())) {
108 throw new IllegalStateException(
109 String.format("Expected direction (%s) constraint violated! %s %s @%s", expected, this,
110 diff, thisNext.getPayload()));
111 }
112 result.add(thisNext.getPayload());
113 thisNext = thisItr.hasNext() ? thisItr.next() : null;
114 expected = expected.opposite();
115 } else {
116 // they cancel out each other
117 if (diffNext.getDirection().equals(thisNext.getDirection())) {
118 throw new IllegalStateException(String.format("Changes do not cancel out each other! %s %s @%s",
119 this, diff, thisNext.getPayload()));
120 }
121 diffNext = diffItr.hasNext() ? diffItr.next() : null;
122 thisNext = thisItr.hasNext() ? thisItr.next() : null;
123 }
124 }
125
126 return Timelines.createFrom(result);
127 }
128
129 @Override
130 public String toString() {
131 final StringBuilder builder = new StringBuilder();
132 builder.append("[");
133 boolean first = true;
134 for (final Signed<Timestamp> element : this.asChangeSequence()) {
135 if (first) {
136 first = false;
137 } else {
138 builder.append(", ");
139 }
140 builder.append(element.toString());
141 }
142 builder.append("]");
143 return builder.toString();
144 }
145
146}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timelines.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timelines.java
new file mode 100644
index 00000000..747fda15
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/timeline/Timelines.java
@@ -0,0 +1,46 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2019, Tamas Szabo, itemis AG, Gabor Bergmann, IncQuery Labs Ltd.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.matchers.util.timeline;
10
11import java.util.List;
12
13/**
14 * Utility class for creating {@link Timeline}s.
15 * @author Tamas Szabo
16 * @since 2.4
17 */
18public final class Timelines<Timestamp extends Comparable<Timestamp>> {
19
20 public static <Timestamp extends Comparable<Timestamp>> Timeline<Timestamp> createEmpty() {
21 return new CompactTimeline<Timestamp>();
22 }
23
24 public static <Timestamp extends Comparable<Timestamp>> Timeline<Timestamp> createFrom(
25 final Diff<Timestamp> diffs) {
26 if (diffs.size() == 1) {
27 return new SingletonTimeline<Timestamp>(diffs);
28 } else {
29 return new CompactTimeline<Timestamp>(diffs);
30 }
31 }
32
33 public static <Timestamp extends Comparable<Timestamp>> Timeline<Timestamp> createFrom(
34 final List<Timestamp> timestamps) {
35 if (timestamps.size() == 1) {
36 return new SingletonTimeline<Timestamp>(timestamps.get(0));
37 } else {
38 return new CompactTimeline<Timestamp>(timestamps);
39 }
40 }
41
42 public static <Timestamp extends Comparable<Timestamp>> Timeline<Timestamp> createFrom(final Timestamp timestamp) {
43 return new SingletonTimeline<Timestamp>(timestamp);
44 }
45
46}
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/util/ViatraQueryLoggingUtil.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/util/ViatraQueryLoggingUtil.java
new file mode 100644
index 00000000..229801f8
--- /dev/null
+++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/util/ViatraQueryLoggingUtil.java
@@ -0,0 +1,72 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2013, Bergmann Gabor, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.util;
10
11import org.apache.log4j.Logger;
12import tools.refinery.viatra.runtime.matchers.util.Preconditions;
13
14/**
15 * Centralized logger of the VIATRA Query runtime.
16 * @author Bergmann Gabor
17 *
18 */
19public class ViatraQueryLoggingUtil {
20
21 private ViatraQueryLoggingUtil() {/*Utility class constructor*/}
22
23 private static Logger externalLogger;
24
25 public static void setExternalLogger(Logger externalLogger) {
26 Preconditions.checkArgument(externalLogger != null, "Must not set up null logger");
27 ViatraQueryLoggingUtil.externalLogger = externalLogger;
28 }
29 /**
30 * Provides a static default logger.
31 */
32 public static Logger getDefaultLogger() {
33 if (defaultRuntimeLogger == null) {
34 Logger parentLogger = externalLogger;
35 if (parentLogger == null) {
36 defaultRuntimeLogger = Logger.getLogger("org.eclipse.viatra");
37 } else {
38 defaultRuntimeLogger = Logger.getLogger(parentLogger.getName() + ".runtime");
39 }
40 if (defaultRuntimeLogger == null)
41 throw new AssertionError("Configuration error: unable to create default VIATRA Query runtime logger.");
42 }
43
44 return defaultRuntimeLogger;
45 }
46
47 private static String getLoggerClassname(Class<?> clazz) {
48 return clazz.getName().startsWith(getDefaultLogger().getName())
49 ? clazz.getName()
50 : getDefaultLogger().getName() + "." + clazz.getName();
51 }
52
53 /**
54 * Provides a class-specific logger that also stores the global logger settings of the VIATRA Query runtime
55 * @param clazz
56 */
57 public static Logger getLogger(Class<?> clazz) {
58 return Logger.getLogger(getLoggerClassname(clazz));
59 }
60
61 /**
62 * Provides a named logger that also stores the global logger settings of the VIATRA Query runtime
63 * @param clazz
64 * @param name a non-empty name to append to the class names
65 * @since 2.5
66 */
67 public static Logger getLogger(Class<?> clazz, String name) {
68 return Logger.getLogger(getLoggerClassname(clazz) + '.' + name);
69 }
70
71 private static Logger defaultRuntimeLogger;
72}
diff --git a/yarn.lock b/yarn.lock
index 10f82f5c..4773ce05 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,8 +2,15 @@
2# Manual changes might be lost - proceed with caution! 2# Manual changes might be lost - proceed with caution!
3 3
4__metadata: 4__metadata:
5 version: 7 5 version: 8
6 cacheKey: 9 6 cacheKey: 10c0
7
8"@aashutoshrathi/word-wrap@npm:^1.2.3":
9 version: 1.2.6
10 resolution: "@aashutoshrathi/word-wrap@npm:1.2.6"
11 checksum: 53c2b231a61a46792b39a0d43bc4f4f776bb4542aa57ee04930676802e5501282c2fc8aac14e4cd1f1120ff8b52616b6ff5ab539ad30aa2277d726444b71619f
12 languageName: node
13 linkType: hard
7 14
8"@ampproject/remapping@npm:^2.2.0": 15"@ampproject/remapping@npm:^2.2.0":
9 version: 2.2.1 16 version: 2.2.1
@@ -11,7 +18,7 @@ __metadata:
11 dependencies: 18 dependencies:
12 "@jridgewell/gen-mapping": "npm:^0.3.0" 19 "@jridgewell/gen-mapping": "npm:^0.3.0"
13 "@jridgewell/trace-mapping": "npm:^0.3.9" 20 "@jridgewell/trace-mapping": "npm:^0.3.9"
14 checksum: a6e71b1b6bcffc909f5527899d9598f30cd7dc8c82845fba07c237232d4404795681dc9a2ff7e24e620415b8b8b60466ebd517f7c00bef53adf3a6a37d5a8f1b 21 checksum: 92ce5915f8901d8c7cd4f4e6e2fe7b9fd335a29955b400caa52e0e5b12ca3796ada7c2f10e78c9c5b0f9c2539dff0ffea7b19850a56e1487aa083531e1e46d43
15 languageName: node 22 languageName: node
16 linkType: hard 23 linkType: hard
17 24
@@ -24,23 +31,24 @@ __metadata:
24 leven: "npm:^3.1.0" 31 leven: "npm:^3.1.0"
25 peerDependencies: 32 peerDependencies:
26 ajv: ">=8" 33 ajv: ">=8"
27 checksum: 51a1ad6f0d8aad5f407f180d7d0354d41f630f2c271e865380f380add0db6934a594b732506d82b87bb6a0ed11f6f1bf378578cf5ac71a252d1355945f80de56 34 checksum: f89a1e16ecbc2ada91c56d4391c8345471e385f0b9c38d62c3bccac40ec94482cdfa496d4c2fe0af411e9851a9931c0d5042a8040f52213f603ba6b6fd7f949b
28 languageName: node 35 languageName: node
29 linkType: hard 36 linkType: hard
30 37
31"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.22.5": 38"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.22.10, @babel/code-frame@npm:^7.22.5":
32 version: 7.22.5 39 version: 7.22.10
33 resolution: "@babel/code-frame@npm:7.22.5" 40 resolution: "@babel/code-frame@npm:7.22.10"
34 dependencies: 41 dependencies:
35 "@babel/highlight": "npm:^7.22.5" 42 "@babel/highlight": "npm:^7.22.10"
36 checksum: 7dfb17395cb9715da9cc93eda0f9a3cca75189de3576b2bf2ee508bb8dcf0319a85d12d7b3957d103f67e2f1a90b4e10f74f3036349acf5e56e2838b70d9bc27 43 chalk: "npm:^2.4.2"
44 checksum: fc5fe681eda128f15b928287b6c8e2ccec45776b8662524945cde005fba725642cc47ab0cfef4e7ff9ba5acccb3e907eebc2b3a7f075b8b31b19011229170b27
37 languageName: node 45 languageName: node
38 linkType: hard 46 linkType: hard
39 47
40"@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.18.8, @babel/compat-data@npm:^7.22.5": 48"@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.18.8, @babel/compat-data@npm:^7.22.5":
41 version: 7.22.5 49 version: 7.22.5
42 resolution: "@babel/compat-data@npm:7.22.5" 50 resolution: "@babel/compat-data@npm:7.22.5"
43 checksum: 921389ebf9a902515adda9f08a0d84ab18303b31fc829cbc6c4a3b90ae38be54393473f4db323a646fa97871e977b59b67d94f25dd88f22574deffb89dd21186 51 checksum: 97f3c24a71b4e7d5f91c5807f6206a9cdb4123e595c51b34a19e9ea22b837003f969f732fde8819928d66e7b64047fd736c6717c8a1b96bf27fbfc30f6834aff
44 languageName: node 52 languageName: node
45 linkType: hard 53 linkType: hard
46 54
@@ -63,19 +71,19 @@ __metadata:
63 gensync: "npm:^1.0.0-beta.2" 71 gensync: "npm:^1.0.0-beta.2"
64 json5: "npm:^2.2.2" 72 json5: "npm:^2.2.2"
65 semver: "npm:^6.3.0" 73 semver: "npm:^6.3.0"
66 checksum: 4dd24af48f3d6d240ac1ee6850dd73a670d8f8466bf5a76e1d068a9d21f2dcfd82a34f54f25d15ba0f1f77813296074f0aecea6ea4a1302ac2a45d3eef185a6e 74 checksum: c00e1474a41c18b669511dd1a1bd757d854cc8128218421a73c3b1c76b44fb22a57bbbd29a73b7a156cb1460af7a94602f81bed76b8d78c6ffae4de954b32a50
67 languageName: node 75 languageName: node
68 linkType: hard 76 linkType: hard
69 77
70"@babel/generator@npm:^7.22.5": 78"@babel/generator@npm:^7.22.10, @babel/generator@npm:^7.22.5":
71 version: 7.22.5 79 version: 7.22.10
72 resolution: "@babel/generator@npm:7.22.5" 80 resolution: "@babel/generator@npm:7.22.10"
73 dependencies: 81 dependencies:
74 "@babel/types": "npm:^7.22.5" 82 "@babel/types": "npm:^7.22.10"
75 "@jridgewell/gen-mapping": "npm:^0.3.2" 83 "@jridgewell/gen-mapping": "npm:^0.3.2"
76 "@jridgewell/trace-mapping": "npm:^0.3.17" 84 "@jridgewell/trace-mapping": "npm:^0.3.17"
77 jsesc: "npm:^2.5.1" 85 jsesc: "npm:^2.5.1"
78 checksum: 752010702bf332ebcde03d3d88da4c6c95093dbb621f7d1bce830631f629fc061aad7520d1797a5c8a514c8374f21c0fa02bcae3bb4999cd9df9ed5d652f85f6 86 checksum: 2f26ac64f0b606cd9e7799eb2bc42d371b378ba2cb3c7c92c01a3bfccca271371990bcd2dc67fee5547721ba3e1fa83ca03fe3aab30bdf417c3078b9759d2f10
79 languageName: node 87 languageName: node
80 linkType: hard 88 linkType: hard
81 89
@@ -84,7 +92,7 @@ __metadata:
84 resolution: "@babel/helper-annotate-as-pure@npm:7.18.6" 92 resolution: "@babel/helper-annotate-as-pure@npm:7.18.6"
85 dependencies: 93 dependencies:
86 "@babel/types": "npm:^7.18.6" 94 "@babel/types": "npm:^7.18.6"
87 checksum: 1fcc8f0e9377623a19e00de620391dba3e0343d82ae2142eb7c94b10d6dbddafc201a7a84d1d9ce45ec82291b887f9d85b83d53a50850cdf1b07cee79de554b9 95 checksum: e413cd022e1e21232c1ce98f3e1198ec5f4774c7eceb81155a45f9cb6d8481f3983c52f83252309856668e728c751f0340d29854b604530a694899208df6bcc3
88 languageName: node 96 languageName: node
89 linkType: hard 97 linkType: hard
90 98
@@ -94,7 +102,7 @@ __metadata:
94 dependencies: 102 dependencies:
95 "@babel/helper-explode-assignable-expression": "npm:^7.18.6" 103 "@babel/helper-explode-assignable-expression": "npm:^7.18.6"
96 "@babel/types": "npm:^7.18.9" 104 "@babel/types": "npm:^7.18.9"
97 checksum: 657a94af70ae7fa17ebf228a9940804bb73bcef1851e36282590258b2630db5ff35439c5b4dc6c02fd9e825ded7e467d208e8beb0dbe5f7d751649dd39f6deb3 105 checksum: 8571b3cebdd3b80349aaa04e0c1595d8fc283aea7f3d7153dfba0d5fcb090e53f3fe98ca4c19ffa185e642a14ea2b97f11eccefc9be9185acca8916e68612c3f
98 languageName: node 106 languageName: node
99 linkType: hard 107 linkType: hard
100 108
@@ -109,7 +117,7 @@ __metadata:
109 semver: "npm:^6.3.0" 117 semver: "npm:^6.3.0"
110 peerDependencies: 118 peerDependencies:
111 "@babel/core": ^7.0.0 119 "@babel/core": ^7.0.0
112 checksum: 680625c948e3872cb0974e7cb054eec206baa575d0bb4fe51d5fb795d94348c12d6e4f1719436ab8e6e140e57de28684ec8d635d4ff4407329fb0eab5c407a1a 120 checksum: f36a2f27d970fa61b32090840ec847f73c6ada50becf7222c8778dd7ae07661c56f83d57e4c18437160e221512f91c442e3b86703741b45fc1277a548a6fd819
113 languageName: node 121 languageName: node
114 linkType: hard 122 linkType: hard
115 123
@@ -126,7 +134,7 @@ __metadata:
126 "@babel/helper-split-export-declaration": "npm:^7.18.6" 134 "@babel/helper-split-export-declaration": "npm:^7.18.6"
127 peerDependencies: 135 peerDependencies:
128 "@babel/core": ^7.0.0 136 "@babel/core": ^7.0.0
129 checksum: 51d4e8fb66d4457199ab505c57e56c4244ea57e63b0980fc31082dc48cfa7e8ceab0574a38229d40de2f8e6d38b7a61ca990da72dd3b5d63883d8634e0da08e1 137 checksum: a5a10eaa776963c1a93a986f6f6f97d6c522f1c1bb168afae5f35ca1e569f29ecd4b81d70c3d0c41cccae22b5bf8c52a79210537892b9ce6981ddc2b1f835920
130 languageName: node 138 languageName: node
131 linkType: hard 139 linkType: hard
132 140
@@ -138,7 +146,7 @@ __metadata:
138 regexpu-core: "npm:^5.1.0" 146 regexpu-core: "npm:^5.1.0"
139 peerDependencies: 147 peerDependencies:
140 "@babel/core": ^7.0.0 148 "@babel/core": ^7.0.0
141 checksum: e5068cbc803e5c5e3ef5dfd6d537754db712c5a3a92f165869b8b9b93f2207a79554666bfb96cbabaa126de58d08f4f157101b283c6ba46676f6d72691935e34 149 checksum: 5151ae268376d9cd9a5fd97263dc2cf21f2c5043076331c9d0b4e4d7bbf8ae83ed1b0d366c5ddcb17c06329f9ed38e10e75b1dbc2dc040bbfab7d5604eada886
142 languageName: node 150 languageName: node
143 linkType: hard 151 linkType: hard
144 152
@@ -154,14 +162,14 @@ __metadata:
154 semver: "npm:^6.1.2" 162 semver: "npm:^6.1.2"
155 peerDependencies: 163 peerDependencies:
156 "@babel/core": ^7.4.0-0 164 "@babel/core": ^7.4.0-0
157 checksum: 2991b9b87f6c3248c343a394c0bb09c14a6f9b5b1c22cd2e51b6127f79d08fb6ea5d65e889b2331466f154e9d407e47b891de2eab2a6dafa4c62b3c59ff1720c 165 checksum: c3668f9ee2b76bfc08398756c504a8823e18bad05d0c2ee039b821c839e2b70f3b6ad8b7a3d3a6be434d981ed2af845a490aafecc50eaefb9b5099f2da156527
158 languageName: node 166 languageName: node
159 linkType: hard 167 linkType: hard
160 168
161"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.22.5": 169"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.22.5":
162 version: 7.22.5 170 version: 7.22.5
163 resolution: "@babel/helper-environment-visitor@npm:7.22.5" 171 resolution: "@babel/helper-environment-visitor@npm:7.22.5"
164 checksum: f48c0f5f4acc69b1f0e60b727145ce4625ad9b7d2dc2622fbc15f9414db0fe69140d2f4fb2e5791f8eba06b94d24db5c7d361d653ab2ab8d4f24113892bf98e6 172 checksum: c9377464c1839741a0a77bbad56de94c896f4313eb034c988fc2ab01293e7c4027244c93b4256606c5f4e34c68cf599a7d31a548d537577c7da836bbca40551b
165 languageName: node 173 languageName: node
166 linkType: hard 174 linkType: hard
167 175
@@ -170,7 +178,7 @@ __metadata:
170 resolution: "@babel/helper-explode-assignable-expression@npm:7.18.6" 178 resolution: "@babel/helper-explode-assignable-expression@npm:7.18.6"
171 dependencies: 179 dependencies:
172 "@babel/types": "npm:^7.18.6" 180 "@babel/types": "npm:^7.18.6"
173 checksum: 24d7f1d5a69a5bae6076db48f0ff83b51f947a5078574409954f93ff95ccc32b69ee71022c52d3385e22a707ed9efdd9185421f38c16fe6595b606ca4d604ffb 181 checksum: 6e2fc5841fd849c840634e55b3a3f373167179bddb3d1c5fa2d7f63c3959425b8f87cd5c5ce5dcbb96e877a5033687840431b84a8e922c323f8e6aac9645db0b
174 languageName: node 182 languageName: node
175 linkType: hard 183 linkType: hard
176 184
@@ -180,7 +188,7 @@ __metadata:
180 dependencies: 188 dependencies:
181 "@babel/template": "npm:^7.22.5" 189 "@babel/template": "npm:^7.22.5"
182 "@babel/types": "npm:^7.22.5" 190 "@babel/types": "npm:^7.22.5"
183 checksum: ab66c2a9ab9e79a3a34f906d9fe4895ec5200d23417a06806cf01fbd38c64048f2ec399559222a1940e6b3769a0639d07d2f593aaafaf65de1ffb5876359e9c7 191 checksum: 3ce2e87967fe54aa463d279150ddda0dae3b5bc3f8c2773b90670b553b61e8fe62da7edcd7b1e1891c5b25af4924a6700dad2e9d8249b910a5bf7caa2eaf4c13
184 languageName: node 192 languageName: node
185 linkType: hard 193 linkType: hard
186 194
@@ -189,7 +197,7 @@ __metadata:
189 resolution: "@babel/helper-hoist-variables@npm:7.22.5" 197 resolution: "@babel/helper-hoist-variables@npm:7.22.5"
190 dependencies: 198 dependencies:
191 "@babel/types": "npm:^7.22.5" 199 "@babel/types": "npm:^7.22.5"
192 checksum: 4df8aa58aebff5d80a12a8dad40220d69f900ef05f62dde1f52cbe162e1e7d4ab621b6352ab8e570e50ec1799ef34158f8b0050ec27fb393566faa68a9b05f3b 200 checksum: 60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208
193 languageName: node 201 languageName: node
194 linkType: hard 202 linkType: hard
195 203
@@ -198,7 +206,7 @@ __metadata:
198 resolution: "@babel/helper-member-expression-to-functions@npm:7.18.9" 206 resolution: "@babel/helper-member-expression-to-functions@npm:7.18.9"
199 dependencies: 207 dependencies:
200 "@babel/types": "npm:^7.18.9" 208 "@babel/types": "npm:^7.18.9"
201 checksum: 17b2a855479ad09457a6f38a6084f6892ce707e4b1959c71a79be9700c68771b30e5cad46b265ced1c0ad92b0be67ac678ec2aa452dfa3eb29151473c08f8cc5 209 checksum: a657703ef57b8932bad7299d9e351afc05b2f80b8380fd12e019651343dfdf2eb3efdaf3758278e19da89b86638b9d0b8023f5b5bc7853e256fe7f6289c18236
202 languageName: node 210 languageName: node
203 linkType: hard 211 linkType: hard
204 212
@@ -207,7 +215,7 @@ __metadata:
207 resolution: "@babel/helper-module-imports@npm:7.22.5" 215 resolution: "@babel/helper-module-imports@npm:7.22.5"
208 dependencies: 216 dependencies:
209 "@babel/types": "npm:^7.22.5" 217 "@babel/types": "npm:^7.22.5"
210 checksum: 5475de0bbd3611a38b8746a2c74495aaad560a283b6c647f9d044bb91bb9375fd8412ea8adae9d077a61d77af6a5138e40ab7f206a6403a2f15f87b9e0aa2aaa 218 checksum: 04f8c0586c485c33017c63e0fc5fc16bd33b883cef3c88e4b3a8bf7bc807b3f9a7bcb9372fbcc01c0a539a5d1cdb477e7bdec77e250669edab00f796683b6b07
211 languageName: node 219 languageName: node
212 linkType: hard 220 linkType: hard
213 221
@@ -223,7 +231,7 @@ __metadata:
223 "@babel/template": "npm:^7.22.5" 231 "@babel/template": "npm:^7.22.5"
224 "@babel/traverse": "npm:^7.22.5" 232 "@babel/traverse": "npm:^7.22.5"
225 "@babel/types": "npm:^7.22.5" 233 "@babel/types": "npm:^7.22.5"
226 checksum: 200649c6a786429aa877cb4d326ad9fccfc5a58e3da844e529ed607e683d2860bf594fa688572ffcf5437e81c0ffa082489d242fff02884a1f49cd956923c9b8 234 checksum: a28cf9a91ed657392f75ada08d96a46e8d0df420b7d5d1ac0bb1633d1404807d0cb6e6a3b0666c747d30f378fbb34985d30c6f25e2fcdd69dc58656e47aafe92
227 languageName: node 235 languageName: node
228 linkType: hard 236 linkType: hard
229 237
@@ -232,14 +240,14 @@ __metadata:
232 resolution: "@babel/helper-optimise-call-expression@npm:7.18.6" 240 resolution: "@babel/helper-optimise-call-expression@npm:7.18.6"
233 dependencies: 241 dependencies:
234 "@babel/types": "npm:^7.18.6" 242 "@babel/types": "npm:^7.18.6"
235 checksum: d8d3756889d051393c30d859bd2b5c5ce039a8e1123ef15b0f96bbb6adc67a71e182a96d3308079faf7be80cfc4718283c981f83a9747e6e23e00088702db9bf 243 checksum: f1352ebc5d9abae6088e7d9b4b6b445c406ba552ef61e967ec77d005ff65752265b002b6faaf16cc293f9e37753760ef05c1f4b26cda1039256917022ba5669c
236 languageName: node 244 languageName: node
237 linkType: hard 245 linkType: hard
238 246
239"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": 247"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3":
240 version: 7.19.0 248 version: 7.19.0
241 resolution: "@babel/helper-plugin-utils@npm:7.19.0" 249 resolution: "@babel/helper-plugin-utils@npm:7.19.0"
242 checksum: 1f5ec25de2ec8789cc9df9ca89ff04a1ea48e372c92c4927a38a96aaf87d2ad2a2aa135630105e9f09a5ec37b220285df1a37e31288b0198f83cbf7d02345f3c 250 checksum: 9ae9c09cf7e3b6023be2bb66f3ca3b5fa8c2b21b58bd09819d494fcd7ab2a1844056c8dfd609ffb474e3c857a1bc979fa7a60931b0c71d69a3e939ba724498ac
243 languageName: node 251 languageName: node
244 linkType: hard 252 linkType: hard
245 253
@@ -253,7 +261,7 @@ __metadata:
253 "@babel/types": "npm:^7.18.9" 261 "@babel/types": "npm:^7.18.9"
254 peerDependencies: 262 peerDependencies:
255 "@babel/core": ^7.0.0 263 "@babel/core": ^7.0.0
256 checksum: b1e869322e1c3a179b5bf3a33831489f801c729875d0ef9d134ab7a634d838550e05bb6a0ed3fc4130a0c2cb387824ce50b52be528f68c07b6d44fbbb2b018b0 264 checksum: e6b2a906bdb3ec40d9cee7b7f8d02a561334603a0c57406a37c77d301ca77412ff33f2cef9d89421d7c3b1359604d613c596621a2ff22129612213198c5d1527
257 languageName: node 265 languageName: node
258 linkType: hard 266 linkType: hard
259 267
@@ -266,7 +274,7 @@ __metadata:
266 "@babel/helper-optimise-call-expression": "npm:^7.18.6" 274 "@babel/helper-optimise-call-expression": "npm:^7.18.6"
267 "@babel/traverse": "npm:^7.18.9" 275 "@babel/traverse": "npm:^7.18.9"
268 "@babel/types": "npm:^7.18.9" 276 "@babel/types": "npm:^7.18.9"
269 checksum: d77a39efeb9b879bf4d4267f2d6452f615f5ecf920f277fbf963dfb8824d464b3fd88d9f82c0a7a109eb19400597fab66e873f70b731ecac22a035a1d384e971 277 checksum: be2f46da56e62300b8c9ff8fab894714f9f914f3c55ae7d0588c6703e944c7bd97eee1c218badf5ec6cf0d1422b2a3659825066c2bee39a308fa090ddd94433a
270 languageName: node 278 languageName: node
271 linkType: hard 279 linkType: hard
272 280
@@ -275,7 +283,7 @@ __metadata:
275 resolution: "@babel/helper-simple-access@npm:7.22.5" 283 resolution: "@babel/helper-simple-access@npm:7.22.5"
276 dependencies: 284 dependencies:
277 "@babel/types": "npm:^7.22.5" 285 "@babel/types": "npm:^7.22.5"
278 checksum: 5a9c37a63b15f3495a46a39dea481043d0363db886117021225849ac4a06664fda9615d62ab6f836224d89fb43189f45b4f48c2057c2f4441b0da5daf6ac3f13 286 checksum: f0cf81a30ba3d09a625fd50e5a9069e575c5b6719234e04ee74247057f8104beca89ed03e9217b6e9b0493434cedc18c5ecca4cea6244990836f1f893e140369
279 languageName: node 287 languageName: node
280 linkType: hard 288 linkType: hard
281 289
@@ -284,37 +292,37 @@ __metadata:
284 resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.18.9" 292 resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.18.9"
285 dependencies: 293 dependencies:
286 "@babel/types": "npm:^7.18.9" 294 "@babel/types": "npm:^7.18.9"
287 checksum: 68ea75a6534ccc1eb9458e027101cd99b3e87f9be0b2700eb8b4be94ef892f4b0a4ea9aac123cc3f8042593603c6e761934a45dd0f508de118abff48b354ba98 295 checksum: 243996398085f93ccde0174beffae3fd1c0d2a762df61713b32f1bd01b16e6eaccb47f38437706b2239e2b26673412e500e380c4b1f2413f801df4c7a6805e78
288 languageName: node 296 languageName: node
289 linkType: hard 297 linkType: hard
290 298
291"@babel/helper-split-export-declaration@npm:^7.18.6, @babel/helper-split-export-declaration@npm:^7.22.5": 299"@babel/helper-split-export-declaration@npm:^7.18.6, @babel/helper-split-export-declaration@npm:^7.22.5, @babel/helper-split-export-declaration@npm:^7.22.6":
292 version: 7.22.5 300 version: 7.22.6
293 resolution: "@babel/helper-split-export-declaration@npm:7.22.5" 301 resolution: "@babel/helper-split-export-declaration@npm:7.22.6"
294 dependencies: 302 dependencies:
295 "@babel/types": "npm:^7.22.5" 303 "@babel/types": "npm:^7.22.5"
296 checksum: 2658ae9ae290ff800f05f7c5c7e3bf89bbee7e4f4098bf4645174a6ff863ecda8f7c7d9ee0cacf32eef00f7bb658d0cc62b398402dc02a08a5567ac4709117f7 304 checksum: d83e4b623eaa9622c267d3c83583b72f3aac567dc393dda18e559d79187961cb29ae9c57b2664137fc3d19508370b12ec6a81d28af73a50e0846819cb21c6e44
297 languageName: node 305 languageName: node
298 linkType: hard 306 linkType: hard
299 307
300"@babel/helper-string-parser@npm:^7.22.5": 308"@babel/helper-string-parser@npm:^7.22.5":
301 version: 7.22.5 309 version: 7.22.5
302 resolution: "@babel/helper-string-parser@npm:7.22.5" 310 resolution: "@babel/helper-string-parser@npm:7.22.5"
303 checksum: b998b01b4778859c301ede18aea41abb0dcd0497191bdb216aa561741fe74f8651a8d7a486d4151a448c44d37a5a8603c0296b4d4e2f5388989dd86003952ad4 311 checksum: 6b0ff8af724377ec41e5587fffa7605198da74cb8e7d8d48a36826df0c0ba210eb9fedb3d9bef4d541156e0bd11040f021945a6cbb731ccec4aefb4affa17aa4
304 languageName: node 312 languageName: node
305 linkType: hard 313 linkType: hard
306 314
307"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.22.5": 315"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.22.5":
308 version: 7.22.5 316 version: 7.22.5
309 resolution: "@babel/helper-validator-identifier@npm:7.22.5" 317 resolution: "@babel/helper-validator-identifier@npm:7.22.5"
310 checksum: ae436e63eca3aa0a70575a1a5ae8234307fdfe3b5c720002899bf49833c3abcde2b9b188ed10905f2c39013a95e49cc8356dd589cae80e03b39c3370c3e9de75 318 checksum: 2ff1d3833154d17ccf773b8a71fdc0cd0e7356aa8033179d0e3133787dfb33d97796cbff8b92a97c56268205337dfc720227aeddc677c1bc08ae1b67a95252d7
311 languageName: node 319 languageName: node
312 linkType: hard 320 linkType: hard
313 321
314"@babel/helper-validator-option@npm:^7.18.6, @babel/helper-validator-option@npm:^7.22.5": 322"@babel/helper-validator-option@npm:^7.18.6, @babel/helper-validator-option@npm:^7.22.5":
315 version: 7.22.5 323 version: 7.22.5
316 resolution: "@babel/helper-validator-option@npm:7.22.5" 324 resolution: "@babel/helper-validator-option@npm:7.22.5"
317 checksum: d6b2f3a8995894f3b6ee58d4b6a64de3a0083b99553485988ba956e2925c6f85a4d1430ae48a0338dc6847cac486abdf9a4393c79c37d9be78cf821006438584 325 checksum: 23e310bf1b90d085b1ae250f31d423fb6cc004da882f0d3409266e5e4c7fd41ed0a172283a6a9a16083c5f2e11f987b32c815c80c60d9a948e23dd6dcf2e0437
318 languageName: node 326 languageName: node
319 linkType: hard 327 linkType: hard
320 328
@@ -326,7 +334,7 @@ __metadata:
326 "@babel/template": "npm:^7.18.10" 334 "@babel/template": "npm:^7.18.10"
327 "@babel/traverse": "npm:^7.18.11" 335 "@babel/traverse": "npm:^7.18.11"
328 "@babel/types": "npm:^7.18.10" 336 "@babel/types": "npm:^7.18.10"
329 checksum: aebb53158db239c07f40257020e4bb38052c5468ad3930bdb2a82dd2e90614e8686f3c6d6f94b20de802573dad693a00aa36026fc3d166d908dcba0566907248 337 checksum: ea8370f87ad5b25624737320b9e7c9d29f0b772d497ae836a08cf698a396303d0adc19dc2e3eaa46f56be52e4ed2da94363c5fdf7ea45c63081db6a61b66c389
330 languageName: node 338 languageName: node
331 linkType: hard 339 linkType: hard
332 340
@@ -337,27 +345,27 @@ __metadata:
337 "@babel/template": "npm:^7.22.5" 345 "@babel/template": "npm:^7.22.5"
338 "@babel/traverse": "npm:^7.22.5" 346 "@babel/traverse": "npm:^7.22.5"
339 "@babel/types": "npm:^7.22.5" 347 "@babel/types": "npm:^7.22.5"
340 checksum: bc83454d78040bf879954fe8bd002486b78abda61b008b8c730299e689b51aa454a54803b35976958599006817884560c0ab6ee31c78461cb023b1330a1e9d46 348 checksum: efa2d0fc2107e270782a784af3a52e5e0b97187b7b34feeeeb00454bc322e802ff4007b22410c387c05580c793f517c4bafc8a6a3acfdb0e3a1b349728f270c4
341 languageName: node 349 languageName: node
342 linkType: hard 350 linkType: hard
343 351
344"@babel/highlight@npm:^7.22.5": 352"@babel/highlight@npm:^7.22.10":
345 version: 7.22.5 353 version: 7.22.10
346 resolution: "@babel/highlight@npm:7.22.5" 354 resolution: "@babel/highlight@npm:7.22.10"
347 dependencies: 355 dependencies:
348 "@babel/helper-validator-identifier": "npm:^7.22.5" 356 "@babel/helper-validator-identifier": "npm:^7.22.5"
349 chalk: "npm:^2.0.0" 357 chalk: "npm:^2.4.2"
350 js-tokens: "npm:^4.0.0" 358 js-tokens: "npm:^4.0.0"
351 checksum: 7f2de83b67bac82c77dc3c2c708bdc315241e071b87152cb7ffee9c6bc90795cbb300f04775c3d1aefc935a115ce2b728da7fe1093b00138f968f5ad573eac4f 359 checksum: ac321ed90d37f76df74a44addc1692658eff64060375550bfb64919959573b14000ac83744e1ed30cc51b8b2f1291b0f0e98a3398d3c33c9c4548dd326a898fc
352 languageName: node 360 languageName: node
353 linkType: hard 361 linkType: hard
354 362
355"@babel/parser@npm:^7.19.4, @babel/parser@npm:^7.22.5": 363"@babel/parser@npm:^7.21.4, @babel/parser@npm:^7.22.10, @babel/parser@npm:^7.22.5":
356 version: 7.22.5 364 version: 7.22.10
357 resolution: "@babel/parser@npm:7.22.5" 365 resolution: "@babel/parser@npm:7.22.10"
358 bin: 366 bin:
359 parser: ./bin/babel-parser.js 367 parser: ./bin/babel-parser.js
360 checksum: 38abd156629454242787f0ff5fb8fdfb8d007bf3bcd8b1a5ddbf293f712232489fc0808d18e763581ea6859c816f276abb4136372b7ce4e3d5082fde8a294f91 368 checksum: 22de4b5b2e20dd5b44a73963e5fceef44501bacdd14f0b3b96fc16975826553c83c3e424e2ea906b4f2fb8c2129b176bcee33ae99e30de9006ceb28ded5c6ac7
361 languageName: node 369 languageName: node
362 linkType: hard 370 linkType: hard
363 371
@@ -368,7 +376,7 @@ __metadata:
368 "@babel/helper-plugin-utils": "npm:^7.18.6" 376 "@babel/helper-plugin-utils": "npm:^7.18.6"
369 peerDependencies: 377 peerDependencies:
370 "@babel/core": ^7.0.0 378 "@babel/core": ^7.0.0
371 checksum: 15cb2c56bf44b12741de13e086d2e73878117357d2c7d94d302fda0f81da9ba63d0f6a43405cc0376c07d8fee15b38da6e6ed54fc9222101d55a63f3a0393db1 379 checksum: be2cccfc101824428a860f8c71d2cd118a691a9ace5525197f3f0cba19a522006dc4f870405beece836452353076ac687aefda20d9d1491ea72ce51179057988
372 languageName: node 380 languageName: node
373 linkType: hard 381 linkType: hard
374 382
@@ -381,7 +389,7 @@ __metadata:
381 "@babel/plugin-proposal-optional-chaining": "npm:^7.18.9" 389 "@babel/plugin-proposal-optional-chaining": "npm:^7.18.9"
382 peerDependencies: 390 peerDependencies:
383 "@babel/core": ^7.13.0 391 "@babel/core": ^7.13.0
384 checksum: 5478bd798d3b8286f85b4c2e92b1c9f59f88ee7a8ccb5e2a380cbb746986e6531bf0bf02283f0cd21c81fb7ccf9082a8783612c05a97ef10d80b0a4b0d358606 392 checksum: 09258c9cf1d1303663d9152ca693bc4ff2ef2f9c6c71ce130b32b96c1a199a73da75e38a3b75ff156b9f070aaab2b816891570a8292ce40ff8edf33b567d631d
385 languageName: node 393 languageName: node
386 linkType: hard 394 linkType: hard
387 395
@@ -395,7 +403,7 @@ __metadata:
395 "@babel/plugin-syntax-async-generators": "npm:^7.8.4" 403 "@babel/plugin-syntax-async-generators": "npm:^7.8.4"
396 peerDependencies: 404 peerDependencies:
397 "@babel/core": ^7.0.0-0 405 "@babel/core": ^7.0.0-0
398 checksum: 486e1a177546a4f5209cc5e1b17039e5b1396f391943be58a1754a561d14f73fda4bdffcaa914d8f40ed756f118b08f746ceb5badecfc66f1b1a1e916d1804f0 406 checksum: 3681e66e993cdc919cc6ed1890c970acce10eaff91d401a2f10cfc1cdc55ed0ef52aecfdf7c587dfc03bb90749efda539b2d62010e406206f82eae502cc56641
399 languageName: node 407 languageName: node
400 linkType: hard 408 linkType: hard
401 409
@@ -407,7 +415,7 @@ __metadata:
407 "@babel/helper-plugin-utils": "npm:^7.18.6" 415 "@babel/helper-plugin-utils": "npm:^7.18.6"
408 peerDependencies: 416 peerDependencies:
409 "@babel/core": ^7.0.0-0 417 "@babel/core": ^7.0.0-0
410 checksum: 31561c055d0693c1f4e6738c26fa6e51f2db703c05d9b3f522d75d2052f3c35dd2eae0a36ed433e84b26e5f41a45ab2c09339873720600c89f5121771396e0fc 418 checksum: d5172ac6c9948cdfc387e94f3493ad86cb04035cf7433f86b5d358270b1b9752dc25e176db0c5d65892a246aca7bdb4636672e15626d7a7de4bc0bd0040168d9
411 languageName: node 419 languageName: node
412 linkType: hard 420 linkType: hard
413 421
@@ -420,7 +428,7 @@ __metadata:
420 "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" 428 "@babel/plugin-syntax-class-static-block": "npm:^7.14.5"
421 peerDependencies: 429 peerDependencies:
422 "@babel/core": ^7.12.0 430 "@babel/core": ^7.12.0
423 checksum: 6ee8ac231dc32ced2f8ad83ee2f26cf75e41bd20debd98e3b8a39b562f3cdba47c6b3f6a24457876d23f3590d91cb76cfe3be159ec88e777012ca552ca743011 431 checksum: 129c6e53d20229a32924fc45fe72597f2c25131fa8c7da51a07d2c8971c7c815703e2a68a645da7872e17a90bb365e63fa813e47f51b62cb61f9e59fefdd71b6
424 languageName: node 432 languageName: node
425 linkType: hard 433 linkType: hard
426 434
@@ -432,7 +440,7 @@ __metadata:
432 "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" 440 "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3"
433 peerDependencies: 441 peerDependencies:
434 "@babel/core": ^7.0.0-0 442 "@babel/core": ^7.0.0-0
435 checksum: 5ae2b563b314b74e740a658eb7735169af91b85867aeaffd4f688dfed8bfcaff404338d88c21d6c5fc3219b945b36088374bc888688367ae73774b461f4dce46 443 checksum: 99be9865edfd65a46afb97d877ea247a8e881b4d0246a1ea0adf6db04c92f4f0959bd2f6f706d73248a2a7167c34f2464c4863137ddb94deadc5c7cc8bfc3e72
436 languageName: node 444 languageName: node
437 linkType: hard 445 linkType: hard
438 446
@@ -444,7 +452,7 @@ __metadata:
444 "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" 452 "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3"
445 peerDependencies: 453 peerDependencies:
446 "@babel/core": ^7.0.0-0 454 "@babel/core": ^7.0.0-0
447 checksum: 7fdc17902f379e554db2b7b17f2b9eb60cc1b1db2fd0c1bbdec0c405c302daa7447b5db0adeffb21e1db6e960fc616f9d1af71e31d52019c03b8d382d3e9ab62 455 checksum: b90346bd3628ebd44138d0628a5aba1e6b11748893fb48e87008cac30f3bc7cd3161362e49433156737350318174164436357a66fbbfdbe952606b460bd8a0e4
448 languageName: node 456 languageName: node
449 linkType: hard 457 linkType: hard
450 458
@@ -456,7 +464,7 @@ __metadata:
456 "@babel/plugin-syntax-json-strings": "npm:^7.8.3" 464 "@babel/plugin-syntax-json-strings": "npm:^7.8.3"
457 peerDependencies: 465 peerDependencies:
458 "@babel/core": ^7.0.0-0 466 "@babel/core": ^7.0.0-0
459 checksum: 07d1b37ca2f3f328180cf22f113af59225059df4712b8a6d41e600a2f3eeddf1d145042c811b4774892d0ef3a49f296974b82cf8d7d46f99c84f2c70dbe0ad28 467 checksum: 83f2ce41262a538ee43450044b9b0de320002473e4849421a7318c0500f9b0385c03d228f1be777ad71fd358aef13392e3551f0be52b5c423b0c34f7c9e5a06d
460 languageName: node 468 languageName: node
461 linkType: hard 469 linkType: hard
462 470
@@ -468,7 +476,7 @@ __metadata:
468 "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" 476 "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4"
469 peerDependencies: 477 peerDependencies:
470 "@babel/core": ^7.0.0-0 478 "@babel/core": ^7.0.0-0
471 checksum: 270048ba31db21089242eb2dfd91d0713825f4ba3d1b58dc69876bf8d9e92ff24181f9d7f4312bc26bb793707db8d2800145f9f34534bf34e016cef5447c8c34 479 checksum: d7abdc1fa4c2aa1fec2cd7cd649adab313e7837043d9ca166e043d3e1b4ece3b4c2a59b0c1dca2ed5a774b16ab688a407f85ad1d8256af3b2cd040678fc0a4dd
472 languageName: node 480 languageName: node
473 linkType: hard 481 linkType: hard
474 482
@@ -480,7 +488,7 @@ __metadata:
480 "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" 488 "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3"
481 peerDependencies: 489 peerDependencies:
482 "@babel/core": ^7.0.0-0 490 "@babel/core": ^7.0.0-0
483 checksum: abe2f48358d1918d741352ee994371b8a934c7dd20e5962fdc564fe28f8986715a10acabc99ca883ee3195823d9f79096373848afb455bf61934fc4f81e11258 491 checksum: f6629158196ee9f16295d16db75825092ef543f8b98f4dfdd516e642a0430c7b1d69319ee676d35485d9b86a53ade6de0b883490d44de6d4336d38cdeccbe0bf
484 languageName: node 492 languageName: node
485 linkType: hard 493 linkType: hard
486 494
@@ -492,7 +500,7 @@ __metadata:
492 "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" 500 "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4"
493 peerDependencies: 501 peerDependencies:
494 "@babel/core": ^7.0.0-0 502 "@babel/core": ^7.0.0-0
495 checksum: 6aea22e506394659f43ce083c31b53f0d79d3942afbabd499efe8b80aec35e60e2ea13559e14397fd753613bc0985a02d2dc0e68e2bd52b03ee325482b007707 503 checksum: a83a65c6ec0d2293d830e9db61406d246f22d8ea03583d68460cb1b6330c6699320acce1b45f66ba3c357830720e49267e3d99f95088be457c66e6450fbfe3fa
496 languageName: node 504 languageName: node
497 linkType: hard 505 linkType: hard
498 506
@@ -507,7 +515,7 @@ __metadata:
507 "@babel/plugin-transform-parameters": "npm:^7.18.8" 515 "@babel/plugin-transform-parameters": "npm:^7.18.8"
508 peerDependencies: 516 peerDependencies:
509 "@babel/core": ^7.0.0-0 517 "@babel/core": ^7.0.0-0
510 checksum: 4b576fe82f63838dc70704f7448b9511ef58e89716f547c7bd9e5f099fc9bb83d09ae51a63fb7a392e4c2f8bfd6a67023e9b6c97415034442243170a174e2e94 518 checksum: 8e58aa40511897256f98dc558003ce3dd41073e30a9a63045eae1d5f4d9a599f5931670e19f3be62099b92be9381ccfa698c261101180dab2c257f23bde89e48
511 languageName: node 519 languageName: node
512 linkType: hard 520 linkType: hard
513 521
@@ -519,7 +527,7 @@ __metadata:
519 "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" 527 "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3"
520 peerDependencies: 528 peerDependencies:
521 "@babel/core": ^7.0.0-0 529 "@babel/core": ^7.0.0-0
522 checksum: 792601eacca8714c25f8e6bb06734e3fed1a52ef5cd3acd070a8480c0e0344c5f3546c165502e59163f09fa7405393a90981106e01c06dff1d7639ca77f2263a 530 checksum: ab20153d9e95e0b73004fdf86b6a2d219be2a0ace9ca76cd9eccddb680c913fec173bca54d761b1bc6044edde0a53811f3e515908c3b16d2d81cfec1e2e17391
523 languageName: node 531 languageName: node
524 linkType: hard 532 linkType: hard
525 533
@@ -532,7 +540,7 @@ __metadata:
532 "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" 540 "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3"
533 peerDependencies: 541 peerDependencies:
534 "@babel/core": ^7.0.0-0 542 "@babel/core": ^7.0.0-0
535 checksum: a86e79b2759d8bfdee5d84f0199ca026eb0016bbbdbe85b835a1426f2a32c3f81a0ec919585fc345d08dbdeec6643aab25008ba1b244c13c8da0cf051a6f06a1 543 checksum: d28eadd292d615c8c97616b2ccef24ac0eb1fde7264dbd41a46df537b75f0038fd474e52409c5ee0e951e8d619020650c0e1cb47d2f856dae6f93bc1795f7611
536 languageName: node 544 languageName: node
537 linkType: hard 545 linkType: hard
538 546
@@ -544,7 +552,7 @@ __metadata:
544 "@babel/helper-plugin-utils": "npm:^7.18.6" 552 "@babel/helper-plugin-utils": "npm:^7.18.6"
545 peerDependencies: 553 peerDependencies:
546 "@babel/core": ^7.0.0-0 554 "@babel/core": ^7.0.0-0
547 checksum: ead2a2435e83b8571a21a26df15502a470a1f73c21a790c1f8830508a21c68621b23866e04495901fa2fc482bfa7909cbab7c55266dfddf3b50c0f65ffbc0201 555 checksum: 1c273d0ec3d49d0fe80bd754ec0191016e5b3ab4fb1e162ac0c014e9d3c1517a5d973afbf8b6dc9f9c98a8605c79e5f9e8b5ee158a4313fa68d1ff7b02084b6a
548 languageName: node 556 languageName: node
549 linkType: hard 557 linkType: hard
550 558
@@ -558,7 +566,7 @@ __metadata:
558 "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" 566 "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5"
559 peerDependencies: 567 peerDependencies:
560 "@babel/core": ^7.0.0-0 568 "@babel/core": ^7.0.0-0
561 checksum: aadc79cc06dfd5298d6dcca269a8f2cb007692ce1c18454933a0fe40780e94ddb3c3b8439ead1a3eec88fe0c67b102b77f703f5f7a988f2cd88bc255df8af34c 569 checksum: 173496cb8b16879cf3dd09d91bd246c6db3dc2b4320950a5a4dc4d4395e7c9d7407e5e5313242bbafcb9466540ddcb36f7b07f279dd471c6585592a141ddae51
562 languageName: node 570 languageName: node
563 linkType: hard 571 linkType: hard
564 572
@@ -570,7 +578,7 @@ __metadata:
570 "@babel/helper-plugin-utils": "npm:^7.18.6" 578 "@babel/helper-plugin-utils": "npm:^7.18.6"
571 peerDependencies: 579 peerDependencies:
572 "@babel/core": ^7.0.0-0 580 "@babel/core": ^7.0.0-0
573 checksum: cb478bcdb48c37c67a8e65903c6fdfea07a3e66447f49f07691a4edfa6a0a3a984f6c685a057884ca13568d6799aaee295b335bece9f046dc9929cc0f201193d 581 checksum: c68feae57d9b1f4d98ecc2da63bda1993980deb509ccb08f6eace712ece8081032eb6532c304524b544c2dd577e2f9c2fe5c5bfd73d1955c946300def6fc7493
574 languageName: node 582 languageName: node
575 linkType: hard 583 linkType: hard
576 584
@@ -581,7 +589,7 @@ __metadata:
581 "@babel/helper-plugin-utils": "npm:^7.8.0" 589 "@babel/helper-plugin-utils": "npm:^7.8.0"
582 peerDependencies: 590 peerDependencies:
583 "@babel/core": ^7.0.0-0 591 "@babel/core": ^7.0.0-0
584 checksum: 518ee81097d43f6a439cfe91c708cca9bf67a32f0ec6f65df3c34d8b1ce51b473f77040345684792c60ac89e1c78c0a6eacbc31592bc1d912f06e9e0c3f80716 592 checksum: d13efb282838481348c71073b6be6245b35d4f2f964a8f71e4174f235009f929ef7613df25f8d2338e2d3e44bc4265a9f8638c6aaa136d7a61fe95985f9725c8
585 languageName: node 593 languageName: node
586 linkType: hard 594 linkType: hard
587 595
@@ -592,7 +600,7 @@ __metadata:
592 "@babel/helper-plugin-utils": "npm:^7.12.13" 600 "@babel/helper-plugin-utils": "npm:^7.12.13"
593 peerDependencies: 601 peerDependencies:
594 "@babel/core": ^7.0.0-0 602 "@babel/core": ^7.0.0-0
595 checksum: 7a9d076a55d11a53bee2b2c5b05a827f0bc5e13b805d7cd801e3e39b4068b88ca6ed5c7ae7ed2df5259e02515cc0f095468bd8ad4f0609f32adf3abfa3d077cf 603 checksum: 95168fa186416195280b1264fb18afcdcdcea780b3515537b766cb90de6ce042d42dd6a204a39002f794ae5845b02afb0fd4861a3308a861204a55e68310a120
596 languageName: node 604 languageName: node
597 linkType: hard 605 linkType: hard
598 606
@@ -603,7 +611,7 @@ __metadata:
603 "@babel/helper-plugin-utils": "npm:^7.14.5" 611 "@babel/helper-plugin-utils": "npm:^7.14.5"
604 peerDependencies: 612 peerDependencies:
605 "@babel/core": ^7.0.0-0 613 "@babel/core": ^7.0.0-0
606 checksum: a9f8be55e4182dedb4204d16c60cfeeda7ab8a1e01943799fca7ef9bbfad1a84a65b4f768649300203d8035cc1ff0c373d0c56a635305e44df90778b1c4424c3 614 checksum: 4464bf9115f4a2d02ce1454411baf9cfb665af1da53709c5c56953e5e2913745b0fcce82982a00463d6facbdd93445c691024e310b91431a1e2f024b158f6371
607 languageName: node 615 languageName: node
608 linkType: hard 616 linkType: hard
609 617
@@ -614,7 +622,7 @@ __metadata:
614 "@babel/helper-plugin-utils": "npm:^7.8.0" 622 "@babel/helper-plugin-utils": "npm:^7.8.0"
615 peerDependencies: 623 peerDependencies:
616 "@babel/core": ^7.0.0-0 624 "@babel/core": ^7.0.0-0
617 checksum: 5552799d34dc934c8b7ccd796bd47f3d6e6413e5f863effdc1f3575bc14865e1737d6c48bf2ac80489c27d0e1240a7a19e38876853b67ab976f6c3554e2675b4 625 checksum: 9c50927bf71adf63f60c75370e2335879402648f468d0172bc912e303c6a3876927d8eb35807331b57f415392732ed05ab9b42c68ac30a936813ab549e0246c5
618 languageName: node 626 languageName: node
619 linkType: hard 627 linkType: hard
620 628
@@ -625,7 +633,7 @@ __metadata:
625 "@babel/helper-plugin-utils": "npm:^7.8.3" 633 "@babel/helper-plugin-utils": "npm:^7.8.3"
626 peerDependencies: 634 peerDependencies:
627 "@babel/core": ^7.0.0-0 635 "@babel/core": ^7.0.0-0
628 checksum: 100efed7687c752a9cc37d32fa64e537838f2cbc128393b078b1d1894b4bd3a9055365a6249f0716710ee427377a0b00e9d7e9573f59842b797b727e3c90b402 636 checksum: 5100d658ba563829700cd8d001ddc09f4c0187b1a13de300d729c5b3e87503f75a6d6c99c1794182f7f1a9f546ee009df4f15a0ce36376e206ed0012fa7cdc24
629 languageName: node 637 languageName: node
630 linkType: hard 638 linkType: hard
631 639
@@ -636,7 +644,7 @@ __metadata:
636 "@babel/helper-plugin-utils": "npm:^7.18.6" 644 "@babel/helper-plugin-utils": "npm:^7.18.6"
637 peerDependencies: 645 peerDependencies:
638 "@babel/core": ^7.0.0-0 646 "@babel/core": ^7.0.0-0
639 checksum: 0401bca7a83dfda76cc8f69f680be52b72f8f1a875ed70752eccf0b571f19e6300a31277a130034c61de11d19d82f48cdd2daf75efd127d2c218a0bc93c2baff 647 checksum: b2673462593bac392d09679b3f6273784d2c5b8424d5c9c37cc9318e66d190b585789f0ec8aea76a4eeb945210f3193757461e34f4ffec3a0011d338512f384d
640 languageName: node 648 languageName: node
641 linkType: hard 649 linkType: hard
642 650
@@ -647,7 +655,7 @@ __metadata:
647 "@babel/helper-plugin-utils": "npm:^7.8.0" 655 "@babel/helper-plugin-utils": "npm:^7.8.0"
648 peerDependencies: 656 peerDependencies:
649 "@babel/core": ^7.0.0-0 657 "@babel/core": ^7.0.0-0
650 checksum: d21aa96f15268f923f70e49155059ca220a7f7da3cec5072121fb8342527fc9e5753455cd61318054a170b1ecba13fd1891eb2c67f28a1c335af5bbaf52b93d0 658 checksum: e98f31b2ec406c57757d115aac81d0336e8434101c224edd9a5c93cefa53faf63eacc69f3138960c8b25401315af03df37f68d316c151c4b933136716ed6906e
651 languageName: node 659 languageName: node
652 linkType: hard 660 linkType: hard
653 661
@@ -658,7 +666,7 @@ __metadata:
658 "@babel/helper-plugin-utils": "npm:^7.10.4" 666 "@babel/helper-plugin-utils": "npm:^7.10.4"
659 peerDependencies: 667 peerDependencies:
660 "@babel/core": ^7.0.0-0 668 "@babel/core": ^7.0.0-0
661 checksum: 3a01f61a5b0f429dadbfb58d979c550c496ead9121282319406398cc76f7a6dfb58c20c9782b6b1b1b74f938add3edd962a3f699bf407deda003f84708b94c7e 669 checksum: 2594cfbe29411ad5bc2ad4058de7b2f6a8c5b86eda525a993959438615479e59c012c14aec979e538d60a584a1a799b60d1b8942c3b18468cb9d99b8fd34cd0b
662 languageName: node 670 languageName: node
663 linkType: hard 671 linkType: hard
664 672
@@ -669,7 +677,7 @@ __metadata:
669 "@babel/helper-plugin-utils": "npm:^7.8.0" 677 "@babel/helper-plugin-utils": "npm:^7.8.0"
670 peerDependencies: 678 peerDependencies:
671 "@babel/core": ^7.0.0-0 679 "@babel/core": ^7.0.0-0
672 checksum: cc19c595a643531cdfa41eb9d5941ae1734049d9fdad127ed262225a657d3c2dce95aeb3e40019e6f1b0403e1656fc6170b43c2fbafceab0d6fa2502a62c91d8 680 checksum: 2024fbb1162899094cfc81152449b12bd0cc7053c6d4bda8ac2852545c87d0a851b1b72ed9560673cbf3ef6248257262c3c04aabf73117215c1b9cc7dd2542ce
673 languageName: node 681 languageName: node
674 linkType: hard 682 linkType: hard
675 683
@@ -680,7 +688,7 @@ __metadata:
680 "@babel/helper-plugin-utils": "npm:^7.10.4" 688 "@babel/helper-plugin-utils": "npm:^7.10.4"
681 peerDependencies: 689 peerDependencies:
682 "@babel/core": ^7.0.0-0 690 "@babel/core": ^7.0.0-0
683 checksum: 32689c162862617fad6bfd12efed7523bf9985d396cb3eec12ef1fc96ba225600d3ea30c22051bb21dd8c8fd156fdef366e44150c3c19ef7eb7a85903a9445b4 691 checksum: c55a82b3113480942c6aa2fcbe976ff9caa74b7b1109ff4369641dfbc88d1da348aceb3c31b6ed311c84d1e7c479440b961906c735d0ab494f688bf2fd5b9bb9
684 languageName: node 692 languageName: node
685 linkType: hard 693 linkType: hard
686 694
@@ -691,7 +699,7 @@ __metadata:
691 "@babel/helper-plugin-utils": "npm:^7.8.0" 699 "@babel/helper-plugin-utils": "npm:^7.8.0"
692 peerDependencies: 700 peerDependencies:
693 "@babel/core": ^7.0.0-0 701 "@babel/core": ^7.0.0-0
694 checksum: 868f8cd0c2e10511056a089dab2e88f329b432b81766702de1d8970a785fdae32bd022a69359a7ca6fc58d4767418b871e88fe99ab4209afbaea5e62ebd82ada 702 checksum: ee1eab52ea6437e3101a0a7018b0da698545230015fc8ab129d292980ec6dff94d265e9e90070e8ae5fed42f08f1622c14c94552c77bcac784b37f503a82ff26
695 languageName: node 703 languageName: node
696 linkType: hard 704 linkType: hard
697 705
@@ -702,7 +710,7 @@ __metadata:
702 "@babel/helper-plugin-utils": "npm:^7.8.0" 710 "@babel/helper-plugin-utils": "npm:^7.8.0"
703 peerDependencies: 711 peerDependencies:
704 "@babel/core": ^7.0.0-0 712 "@babel/core": ^7.0.0-0
705 checksum: c6277360d55c4b4dbaca9fbaf279fe2783e1c0cc1f8edb41feb6f14d5b7ce1f25ca1ab4cf3d0e78411a16d3ee36d4ffd3ee30d07dbf47b67880cd707492c3158 713 checksum: 27e2493ab67a8ea6d693af1287f7e9acec206d1213ff107a928e85e173741e1d594196f99fec50e9dde404b09164f39dec5864c767212154ffe1caa6af0bc5af
706 languageName: node 714 languageName: node
707 linkType: hard 715 linkType: hard
708 716
@@ -713,7 +721,7 @@ __metadata:
713 "@babel/helper-plugin-utils": "npm:^7.8.0" 721 "@babel/helper-plugin-utils": "npm:^7.8.0"
714 peerDependencies: 722 peerDependencies:
715 "@babel/core": ^7.0.0-0 723 "@babel/core": ^7.0.0-0
716 checksum: fd81239a2b6c02b3f8cc2abc94db405afb8292133602a9d649985f40ca92153fdfca812dae6ac273a5bd7752c1a46cd4835e5a8bcf3541388d4ece480657fe7f 724 checksum: 46edddf2faa6ebf94147b8e8540dfc60a5ab718e2de4d01b2c0bdf250a4d642c2bd47cbcbb739febcb2bf75514dbcefad3c52208787994b8d0f8822490f55e81
717 languageName: node 725 languageName: node
718 linkType: hard 726 linkType: hard
719 727
@@ -724,7 +732,7 @@ __metadata:
724 "@babel/helper-plugin-utils": "npm:^7.14.5" 732 "@babel/helper-plugin-utils": "npm:^7.14.5"
725 peerDependencies: 733 peerDependencies:
726 "@babel/core": ^7.0.0-0 734 "@babel/core": ^7.0.0-0
727 checksum: 944728155d4fc2f5dda9e81cac64a773f2b800cb19d2c9361d111a6fccb354dae8517a83bfc5abf5d557b10db2e759d1b48cc002f2330c46cff09339b76a987b 735 checksum: 69822772561706c87f0a65bc92d0772cea74d6bc0911537904a676d5ff496a6d3ac4e05a166d8125fce4a16605bace141afc3611074e170a994e66e5397787f3
728 languageName: node 736 languageName: node
729 linkType: hard 737 linkType: hard
730 738
@@ -735,7 +743,7 @@ __metadata:
735 "@babel/helper-plugin-utils": "npm:^7.14.5" 743 "@babel/helper-plugin-utils": "npm:^7.14.5"
736 peerDependencies: 744 peerDependencies:
737 "@babel/core": ^7.0.0-0 745 "@babel/core": ^7.0.0-0
738 checksum: d62a60c7ade2ee033c6037d1fbabb9802c8e03a79e19d33e2fb597f85b2a1a90f6718cdb532252d69ae005e3ac3b1fd29860c1858f8463c3700a81d681967473 746 checksum: 14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f
739 languageName: node 747 languageName: node
740 linkType: hard 748 linkType: hard
741 749
@@ -746,7 +754,7 @@ __metadata:
746 "@babel/helper-plugin-utils": "npm:^7.18.6" 754 "@babel/helper-plugin-utils": "npm:^7.18.6"
747 peerDependencies: 755 peerDependencies:
748 "@babel/core": ^7.0.0-0 756 "@babel/core": ^7.0.0-0
749 checksum: d4835ab8e4808b67e49daeb473f8e5a1da4bae7253f0f13a5532391b9bfceb447b86274e31df52037457daf8c04950f77348669935899fdc794ad2b72eb30604 757 checksum: 0686ca62e04b8500f0b9238563ed133f796bd6e0f3d38d00e4c7ce1756b51aa13c3f1ee66123d881d3ac4057259325aed104d4db11ded4551ea776af36e4e45b
750 languageName: node 758 languageName: node
751 linkType: hard 759 linkType: hard
752 760
@@ -759,7 +767,7 @@ __metadata:
759 "@babel/helper-remap-async-to-generator": "npm:^7.18.6" 767 "@babel/helper-remap-async-to-generator": "npm:^7.18.6"
760 peerDependencies: 768 peerDependencies:
761 "@babel/core": ^7.0.0-0 769 "@babel/core": ^7.0.0-0
762 checksum: 06c129db0fb250e3711df474a1a7c32c7587bd09291a247e0176e2b9d4143162144b1f88f40f8c09aa14d4c03c6e93d2c42c627d96fec9924e91774e33a03260 770 checksum: 988bac0c376b412c3ca1dd24323219d7d2a1145aa58fe38325afb305ead46af65bf9d2145d24545175ddd54235ac94485c90f3fb9778b2088d16a87800f6fe65
763 languageName: node 771 languageName: node
764 linkType: hard 772 linkType: hard
765 773
@@ -770,7 +778,7 @@ __metadata:
770 "@babel/helper-plugin-utils": "npm:^7.18.6" 778 "@babel/helper-plugin-utils": "npm:^7.18.6"
771 peerDependencies: 779 peerDependencies:
772 "@babel/core": ^7.0.0-0 780 "@babel/core": ^7.0.0-0
773 checksum: 34ec13635c2140b089fb63e79fd3888c0a19ec6c37a24c5157febadf85dfc66c0b1527b07006dca9bfa2bc3e5009eac2b7207f55b505ca3ee65ebdcf7fda98eb 781 checksum: 22e81b52320e6f3929110241d91499a7535d6834b86e8871470f9946b42e093fafc79e1eae4ede376e7c5fe84c5dc5e9fdbe55ff4039b323b5958167202f02e0
774 languageName: node 782 languageName: node
775 linkType: hard 783 linkType: hard
776 784
@@ -781,7 +789,7 @@ __metadata:
781 "@babel/helper-plugin-utils": "npm:^7.18.9" 789 "@babel/helper-plugin-utils": "npm:^7.18.9"
782 peerDependencies: 790 peerDependencies:
783 "@babel/core": ^7.0.0-0 791 "@babel/core": ^7.0.0-0
784 checksum: bf66bb299d677244ad2e505016f5e7d7c347a460a09e2e62d7d8ba6d08c2f57c899add36ac294cc0ee36450bb30ca4ca68030890aa5a5b6bda38a26d03562d30 792 checksum: 1645188b7bd97ee10832607c9072af5184823cfd67cd319b7fb90544d27d45b222e85118dc07581913d14b1c6b36ba100c321ecdd311b107a2fb48427bff762e
785 languageName: node 793 languageName: node
786 linkType: hard 794 linkType: hard
787 795
@@ -799,7 +807,7 @@ __metadata:
799 globals: "npm:^11.1.0" 807 globals: "npm:^11.1.0"
800 peerDependencies: 808 peerDependencies:
801 "@babel/core": ^7.0.0-0 809 "@babel/core": ^7.0.0-0
802 checksum: f6fb44df379840ab6cdff1532d21e2921ccfa60d941f2255e7e1caa7b55680db17a409b5c51a132802d1311554f6fc3effa5b685c7b15edab1b43bd592a5a3de 810 checksum: 792a8dae7dacb3e50021a40c3bb1a928dc9a2c37b3e766c64e7f8e0ab9995c83a74c3e3924f729dc8090185d556851399b99426908f5480f35e43d1ae4b452c2
803 languageName: node 811 languageName: node
804 linkType: hard 812 linkType: hard
805 813
@@ -810,7 +818,7 @@ __metadata:
810 "@babel/helper-plugin-utils": "npm:^7.18.9" 818 "@babel/helper-plugin-utils": "npm:^7.18.9"
811 peerDependencies: 819 peerDependencies:
812 "@babel/core": ^7.0.0-0 820 "@babel/core": ^7.0.0-0
813 checksum: 84ddb59a7c9aef0dbee1f022e3d1a4faa0b4b856f4a483f0b1c267651469008294e64b1a9e433ac1a4600a5d6ef6467ed09e22e66f1cc812ee33014619882fe1 821 checksum: badf6d709a32716d90c2042a1999ef008e283d0491a79edb8396d15ebb3261c3a657368dcdc3182fd2060d73ce4a4e5241c0c04bdc1d64a6c101b71ba0a8efc0
814 languageName: node 822 languageName: node
815 linkType: hard 823 linkType: hard
816 824
@@ -821,7 +829,7 @@ __metadata:
821 "@babel/helper-plugin-utils": "npm:^7.18.9" 829 "@babel/helper-plugin-utils": "npm:^7.18.9"
822 peerDependencies: 830 peerDependencies:
823 "@babel/core": ^7.0.0-0 831 "@babel/core": ^7.0.0-0
824 checksum: c72b3f94384548e88bd7f8ede6a45667b5c0c7a52cbd4292360ee9cf4142db85f72a3d6a625427a933371f3f96984c1a64731c3ddb0443f62126da718b16e363 832 checksum: d894fa122d71e77117957be0fac3d2a7099d2abfae8768f09c0513123ccbf701881f9546204569473b846374b2e72eac0e9bbe7d442e6871bc25e6d20a8b6669
825 languageName: node 833 languageName: node
826 linkType: hard 834 linkType: hard
827 835
@@ -833,7 +841,7 @@ __metadata:
833 "@babel/helper-plugin-utils": "npm:^7.18.6" 841 "@babel/helper-plugin-utils": "npm:^7.18.6"
834 peerDependencies: 842 peerDependencies:
835 "@babel/core": ^7.0.0-0 843 "@babel/core": ^7.0.0-0
836 checksum: 1d2add05dbbaef2b116289ae7d0f8aa6d3e7e7c57cfccebb0e42d7b659b881f7842d058f8849e3a44f1440c34ecc8f56b7ebdc66a2d2641dc5020bf292aa0a4a 844 checksum: cf4c3751e603996f3da0b2060c3aab3c95e267cfc702a95d025b2e9684b66ed73a318949524fad5048515f4a5142629f2c0bd3dbb83558bdbab4008486b8d9a0
837 languageName: node 845 languageName: node
838 linkType: hard 846 linkType: hard
839 847
@@ -844,7 +852,7 @@ __metadata:
844 "@babel/helper-plugin-utils": "npm:^7.18.9" 852 "@babel/helper-plugin-utils": "npm:^7.18.9"
845 peerDependencies: 853 peerDependencies:
846 "@babel/core": ^7.0.0-0 854 "@babel/core": ^7.0.0-0
847 checksum: c4a9d84500f525e0137985d709f84f175ec5f9252977f6775fa34117a6b34afae411e74a5ed455e39bcf29a38254f7b4051440ff0d538ef60850f28b4a6e2c6c 855 checksum: dfb7f7e66c0c862d205fe8f8b87f7ac174549c56937a5186b6e6cf85358ce257115fec0aa55e78fde53e5132d5aae9383e81aba8a4b70faa0e9fb64e3a66ca96
848 languageName: node 856 languageName: node
849 linkType: hard 857 linkType: hard
850 858
@@ -856,7 +864,7 @@ __metadata:
856 "@babel/helper-plugin-utils": "npm:^7.18.6" 864 "@babel/helper-plugin-utils": "npm:^7.18.6"
857 peerDependencies: 865 peerDependencies:
858 "@babel/core": ^7.0.0-0 866 "@babel/core": ^7.0.0-0
859 checksum: f74b8b8e99bdaff935ffe23d4d72ce9d81050e71ba36caa7a0773354877fe51f00626981f822aa0d9ef7abc0a6c3731ccaa14f83e1642ac154c7b418dd2f06e7 867 checksum: 96d300ca3e55dbc98609df2d70c2b343202faca307b3152a04eab77600f6b1dc00b5b90fc3999cb9592922583c83ecbb92217e317d7c08602ca0db87a26eeed3
860 languageName: node 868 languageName: node
861 linkType: hard 869 linkType: hard
862 870
@@ -867,7 +875,7 @@ __metadata:
867 "@babel/helper-plugin-utils": "npm:^7.18.6" 875 "@babel/helper-plugin-utils": "npm:^7.18.6"
868 peerDependencies: 876 peerDependencies:
869 "@babel/core": ^7.0.0-0 877 "@babel/core": ^7.0.0-0
870 checksum: cf76cdab736f2b615f3c084375c600e9df02a6c0b2801f15599ffab6bcfd045b0bb483eb8a5e3b9776485b652745e99aeb01b1277dc7a9bc52df08c5665d1f97 878 checksum: 37708653d9ac69af31f0f5d0abebd726d6b92ba630beed8fea8e1538f035b2877abc0013f26f400ebc23af459fb8e629c83847818614d9fcca086fb5bcd35c4d
871 languageName: node 879 languageName: node
872 linkType: hard 880 linkType: hard
873 881
@@ -880,7 +888,7 @@ __metadata:
880 "@babel/helper-plugin-utils": "npm:^7.18.9" 888 "@babel/helper-plugin-utils": "npm:^7.18.9"
881 peerDependencies: 889 peerDependencies:
882 "@babel/core": ^7.0.0-0 890 "@babel/core": ^7.0.0-0
883 checksum: ab6b97c4d3b02d850527d491d4bf224dfbc0cbfdccbf1222dedaf6817f7aac6269974bed9271790bdc1c5e623c9885a3db0d0ea24b44af006b7447e8c69672c8 891 checksum: 95100707fe00b3e388c059700fbdccf83c2cdf3b7fec8035cdd6c01dd80a1d9efb2821fec1357a62533ebbcbb3f6c361666866a3818486f1172e62f2b692de64
884 languageName: node 892 languageName: node
885 linkType: hard 893 linkType: hard
886 894
@@ -891,7 +899,7 @@ __metadata:
891 "@babel/helper-plugin-utils": "npm:^7.18.9" 899 "@babel/helper-plugin-utils": "npm:^7.18.9"
892 peerDependencies: 900 peerDependencies:
893 "@babel/core": ^7.0.0-0 901 "@babel/core": ^7.0.0-0
894 checksum: 4856c2c3b34c8d828a2ba2301cc6ea5ba06869d82e39b4e81497c02b84dacf487f34c95a1ffff5e36a39a297ec869ed1052b0c975bea387a0192c654126cd6cf 902 checksum: 7b0d59920dd5a1679a2214dde0d785ce7c0ed75cb6d46b618e7822dcd11fb347be2abb99444019262b6561369b85b95ab96603357773a75126b3d1c4c289b822
895 languageName: node 903 languageName: node
896 linkType: hard 904 linkType: hard
897 905
@@ -902,7 +910,7 @@ __metadata:
902 "@babel/helper-plugin-utils": "npm:^7.18.6" 910 "@babel/helper-plugin-utils": "npm:^7.18.6"
903 peerDependencies: 911 peerDependencies:
904 "@babel/core": ^7.0.0-0 912 "@babel/core": ^7.0.0-0
905 checksum: 6f62212c69138d80568e3cff6b2ffafa812da1779095ba7373c253c33db18dc31808b6ee4ad8b188b8cfa6be819a87c316ab1b73cf0f0ff1b9d9e730fc0645f6 913 checksum: 346e5ac45b77f1e58a9b1686eb16c75cca40cbc1de9836b814fbe8ae0767f7d4a0fec5b88fcf26a5e3455af9e33fd3c6424e4f2661d04e38123d80e022ce6e6f
906 languageName: node 914 languageName: node
907 linkType: hard 915 linkType: hard
908 916
@@ -915,7 +923,7 @@ __metadata:
915 babel-plugin-dynamic-import-node: "npm:^2.3.3" 923 babel-plugin-dynamic-import-node: "npm:^2.3.3"
916 peerDependencies: 924 peerDependencies:
917 "@babel/core": ^7.0.0-0 925 "@babel/core": ^7.0.0-0
918 checksum: 62a192e30db5ba68e38eba5471cbf5793a629c966be188313497d49dfca014a7cf0b740d02c16395663fde499a153c642f957cf7776b57567c58d1a3876d5d67 926 checksum: 1391af0dd70959c1a1acb61cd830e18603c06dcc47af811ce06fc321da504993ff72c582e26facef8b55524215ae5ee766ea330498361adc5ad5236835a47bfc
919 languageName: node 927 languageName: node
920 linkType: hard 928 linkType: hard
921 929
@@ -929,7 +937,7 @@ __metadata:
929 babel-plugin-dynamic-import-node: "npm:^2.3.3" 937 babel-plugin-dynamic-import-node: "npm:^2.3.3"
930 peerDependencies: 938 peerDependencies:
931 "@babel/core": ^7.0.0-0 939 "@babel/core": ^7.0.0-0
932 checksum: 9f0e61ccdb996d335bda1cedb3369de242b470ed884065d20ed593f855354722c46ee8f34c7fedebf0afefbbebbae22d29b8eed5a94e0eb0ef982f16e6f0fce9 940 checksum: de3850b3e6a6b6ab206414897f451de332ca29713e8083d1d58ae0072516428fb138f418cae806546aef7c5e130a5cecd4bd1d938c93f20fe8c6312ef6546327
933 languageName: node 941 languageName: node
934 linkType: hard 942 linkType: hard
935 943
@@ -944,7 +952,7 @@ __metadata:
944 babel-plugin-dynamic-import-node: "npm:^2.3.3" 952 babel-plugin-dynamic-import-node: "npm:^2.3.3"
945 peerDependencies: 953 peerDependencies:
946 "@babel/core": ^7.0.0-0 954 "@babel/core": ^7.0.0-0
947 checksum: 59be88ca9fe9cb90917f39b8799f0644d49d4c7ede63e5b4d7e3c32327fa6a349bdc70d8034b965080d299f72b0e2df91a03d5e1bc4dca95bb88e233cc63fffa 955 checksum: ab1e10be15a96c9cdaa05f954d5983523c627e9f701c0989fedf9bff8ff5873461f3035a73e87e4546a31b163897c6f36c5c567d4c1c3edc24ec395d56462715
948 languageName: node 956 languageName: node
949 linkType: hard 957 linkType: hard
950 958
@@ -956,7 +964,7 @@ __metadata:
956 "@babel/helper-plugin-utils": "npm:^7.18.6" 964 "@babel/helper-plugin-utils": "npm:^7.18.6"
957 peerDependencies: 965 peerDependencies:
958 "@babel/core": ^7.0.0-0 966 "@babel/core": ^7.0.0-0
959 checksum: e28c87c53cf8255e44cd04d1f7dcb38f76cf5ab96d96e0444efa6e4c6ed3fb5fb70956dc2f75927dce0357303e2c47bbd193efe1dbf38ab1a057ad72dfae110e 967 checksum: e3e99aef95a3faa15bc2398a919475c9130b783ee0f2439e1622fe73466c9821a5f74f72a46bb25e84906b650b467d73b43269c8b8c13372e97d3f2d96d109c7
960 languageName: node 968 languageName: node
961 linkType: hard 969 linkType: hard
962 970
@@ -968,7 +976,7 @@ __metadata:
968 "@babel/helper-plugin-utils": "npm:^7.18.6" 976 "@babel/helper-plugin-utils": "npm:^7.18.6"
969 peerDependencies: 977 peerDependencies:
970 "@babel/core": ^7.0.0 978 "@babel/core": ^7.0.0
971 checksum: 69dca35797939d77ec48819ac2f82727cf7aabe8d234a5d0961efd4637e5a0f535ea8d30690e83be5263116d98efbd11ec0f9ed03d8363327236398446ccd537 979 checksum: 6695fc0469fa2dbe8133e36f8f5a281fc67a2b565481a13f5f50b95f86f4967d36c2ef8244d2ade09c0adbcd5dc98fddf8d61dd4bb56d6953c0523d11d9e0e5a
972 languageName: node 980 languageName: node
973 linkType: hard 981 linkType: hard
974 982
@@ -979,7 +987,7 @@ __metadata:
979 "@babel/helper-plugin-utils": "npm:^7.18.6" 987 "@babel/helper-plugin-utils": "npm:^7.18.6"
980 peerDependencies: 988 peerDependencies:
981 "@babel/core": ^7.0.0-0 989 "@babel/core": ^7.0.0-0
982 checksum: df67eeb4a8b4bdbba1db57171ceb91d25a5acd668f8407364ab6c669f2a428d0cd9f574603866129b707c20010e95681147d2d5a4ea1676ebd1e115af6fb134c 990 checksum: ea9186087b72d0adff0b9e7ef5769cb7806bc4755ce7b75c323d65053d453fd801a64f97b65c033d89370866e76e8d526dd186acede2fdcd2667fa056b11149b
983 languageName: node 991 languageName: node
984 linkType: hard 992 linkType: hard
985 993
@@ -991,7 +999,7 @@ __metadata:
991 "@babel/helper-replace-supers": "npm:^7.18.6" 999 "@babel/helper-replace-supers": "npm:^7.18.6"
992 peerDependencies: 1000 peerDependencies:
993 "@babel/core": ^7.0.0-0 1001 "@babel/core": ^7.0.0-0
994 checksum: 0d0e4a2750a89fa93505c974d871e8ddcad510c7d5417625154615d787920f34520299f50d47b74157e6460763614f1c4ea35737b25d83bff97a4abe0d87b70b 1002 checksum: 44a1f5a62c6821a4653e23a38a61bed494138a0f12945a1d8b55ff7b83904e7c5615f4ebda8268c6ea877d1ec6b00f7c92a08cf93f4f77dc777e71145342aaf5
995 languageName: node 1003 languageName: node
996 linkType: hard 1004 linkType: hard
997 1005
@@ -1002,7 +1010,7 @@ __metadata:
1002 "@babel/helper-plugin-utils": "npm:^7.18.6" 1010 "@babel/helper-plugin-utils": "npm:^7.18.6"
1003 peerDependencies: 1011 peerDependencies:
1004 "@babel/core": ^7.0.0-0 1012 "@babel/core": ^7.0.0-0
1005 checksum: 7d8c19cbae0ddaf1b7c5205315b3a0ed19884f4732dbf384b35b4710981a678f82bd03a08b089a5fa4f3cd5449701b89d36bd8a95fd341c8fe2d3ac3aea01039 1013 checksum: ca12c2cdb67012fc7d886941bf194225054cb11a117dd2b6a065ca5433f38368e8cf1e23f0fb81ccfc026991e95c7444a4cb594f4fd27b9e292304c0f96724ca
1006 languageName: node 1014 languageName: node
1007 linkType: hard 1015 linkType: hard
1008 1016
@@ -1013,7 +1021,7 @@ __metadata:
1013 "@babel/helper-plugin-utils": "npm:^7.18.6" 1021 "@babel/helper-plugin-utils": "npm:^7.18.6"
1014 peerDependencies: 1022 peerDependencies:
1015 "@babel/core": ^7.0.0-0 1023 "@babel/core": ^7.0.0-0
1016 checksum: bf10d57225db63184b996f48b565e9b3a611ef0e711c889835a4246ac44b11918aa181aa2b59fee384ad7eb33b687e2c593af392803a6d7f13b0f1220467f71e 1024 checksum: b76239098127ee39031db54e4eb9e55cb8a616abc0fc6abba4b22d00e443ec00d7aaa58c7cdef45b224b5e017905fc39a5e1802577a82396acabb32fe9cff7dd
1017 languageName: node 1025 languageName: node
1018 linkType: hard 1026 linkType: hard
1019 1027
@@ -1025,7 +1033,7 @@ __metadata:
1025 regenerator-transform: "npm:^0.15.0" 1033 regenerator-transform: "npm:^0.15.0"
1026 peerDependencies: 1034 peerDependencies:
1027 "@babel/core": ^7.0.0-0 1035 "@babel/core": ^7.0.0-0
1028 checksum: 57e1da7a05c619a9231ded3c33a73aec2d2b90f6266f4bd30f6aeeec86efc7757e32e4100f10cfd4992657b95242a45691ed8f7baf5f238eadeb8992ea24687e 1036 checksum: 74eaaeebd830656c37b11d058c0cae5e93645acdea457e62ea0cc9efb135c4b080df9bb8b453f2b1e0f12c0b38d74628f2807d2de5ca0b9aab0b3ea1c04f9c93
1029 languageName: node 1037 languageName: node
1030 linkType: hard 1038 linkType: hard
1031 1039
@@ -1036,7 +1044,7 @@ __metadata:
1036 "@babel/helper-plugin-utils": "npm:^7.18.6" 1044 "@babel/helper-plugin-utils": "npm:^7.18.6"
1037 peerDependencies: 1045 peerDependencies:
1038 "@babel/core": ^7.0.0-0 1046 "@babel/core": ^7.0.0-0
1039 checksum: 431eada54dabf8d1fc915552665c0f40d37a5d7ce40f67647ccb48535dd29699facb1fe93c26346f00429508fa8a7f7baa277e36a9d7a070c0b0fc54e96e417b 1047 checksum: cbd6a86743c270a1e2a7caa19f6da22112c9dfa28fe08aea46ec9cb79fc1bc48df6b5b12819ae0e53227d4ca4adaee13f80216c03fff3082d3a88c55b4cddeba
1040 languageName: node 1048 languageName: node
1041 linkType: hard 1049 linkType: hard
1042 1050
@@ -1047,7 +1055,7 @@ __metadata:
1047 "@babel/helper-plugin-utils": "npm:^7.18.6" 1055 "@babel/helper-plugin-utils": "npm:^7.18.6"
1048 peerDependencies: 1056 peerDependencies:
1049 "@babel/core": ^7.0.0-0 1057 "@babel/core": ^7.0.0-0
1050 checksum: 2950da9e062bbb3a7fc84d8b9735d06dd93fe896640f197dc75cf85494686b58fa62c435bcbf9295873a206c5b029c650bcbf3ca60fa156e819d5293951cbb35 1058 checksum: e60e02dca182d6ec0e7b571d7e99a0528743692fb911826600374b77832922bf7c4b154194d4fe4a0e8a15c2acad3ea44dbaff5189aaeab59124e4c7ee0b8c30
1051 languageName: node 1059 languageName: node
1052 linkType: hard 1060 linkType: hard
1053 1061
@@ -1059,7 +1067,7 @@ __metadata:
1059 "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.18.9" 1067 "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.18.9"
1060 peerDependencies: 1068 peerDependencies:
1061 "@babel/core": ^7.0.0-0 1069 "@babel/core": ^7.0.0-0
1062 checksum: 9a8a28ebad5db2c7c79c7f54945eb6cb681bc7522c59c422798175d86d6df837d35820d2c48d676db02c102d403811b4c4a891be270a4fd74495dd849acc03b1 1070 checksum: b208ba03d2e0f4e49d0e634f31ded67cd4a76fafc53838e674b535eb993b2a03a4a87717a241ff5c44d41164b74493d197378811a757965cf9bbc95f32aaab2a
1063 languageName: node 1071 languageName: node
1064 linkType: hard 1072 linkType: hard
1065 1073
@@ -1070,7 +1078,7 @@ __metadata:
1070 "@babel/helper-plugin-utils": "npm:^7.18.6" 1078 "@babel/helper-plugin-utils": "npm:^7.18.6"
1071 peerDependencies: 1079 peerDependencies:
1072 "@babel/core": ^7.0.0-0 1080 "@babel/core": ^7.0.0-0
1073 checksum: d9b562dc0625b6210a15d434da49bd01ee10a46476bc7824ea15f9c9207d6e0bee09a7eca5146a5eac82a7d658f0188f65009f87db49871e1627fb8c3d53da7e 1081 checksum: efbcf8f0acdac5757cce8d79c0259e3e5142cf3c782d71675802e97709dfb3cbc3dc08202c3ea950ddc23c8f74cae7c334aa05ec095e3cc6d642fa8b30d8e31c
1074 languageName: node 1082 languageName: node
1075 linkType: hard 1083 linkType: hard
1076 1084
@@ -1081,7 +1089,7 @@ __metadata:
1081 "@babel/helper-plugin-utils": "npm:^7.18.9" 1089 "@babel/helper-plugin-utils": "npm:^7.18.9"
1082 peerDependencies: 1090 peerDependencies:
1083 "@babel/core": ^7.0.0-0 1091 "@babel/core": ^7.0.0-0
1084 checksum: fc06206e58e6fc2d5678349c8d15b96099efdbcf59b6f394ced250c56d87fc6f03d8c4360a96d5d8738c59dc4b6b472395f95489396033769d28be9a2fe9ac91 1092 checksum: d1a5e55ed8c3b1186fbba2a7b3e9d880cb3987b846376f51a73216a8894b9c9d6f6c6e2d3cadb17d76f2477552db5383d817169d5b92fcf08ee0fa5b88213c15
1085 languageName: node 1093 languageName: node
1086 linkType: hard 1094 linkType: hard
1087 1095
@@ -1092,7 +1100,7 @@ __metadata:
1092 "@babel/helper-plugin-utils": "npm:^7.18.9" 1100 "@babel/helper-plugin-utils": "npm:^7.18.9"
1093 peerDependencies: 1101 peerDependencies:
1094 "@babel/core": ^7.0.0-0 1102 "@babel/core": ^7.0.0-0
1095 checksum: 257da06cf9b382ceb1e31ce17c91627cdfd324a03b21f5e20354516d99aaa0fb8be1f8bd0ecc97f83243e3931346b1faf7a6d14cfb5aba97f9e3dcb4bfad6af1 1103 checksum: c42e00635aa9d1c597d339c9023e0f9bfa3cd7af55c00cb8a6461036102b0facdcd3059456d4fee0a63675aeecca62fc84ee01f28b23139c6ae03e6d61c86906
1096 languageName: node 1104 languageName: node
1097 linkType: hard 1105 linkType: hard
1098 1106
@@ -1103,7 +1111,7 @@ __metadata:
1103 "@babel/helper-plugin-utils": "npm:^7.18.9" 1111 "@babel/helper-plugin-utils": "npm:^7.18.9"
1104 peerDependencies: 1112 peerDependencies:
1105 "@babel/core": ^7.0.0-0 1113 "@babel/core": ^7.0.0-0
1106 checksum: bc34b749667e7d6d47cdddd42773b56add519e3cec7d800a32c8573abf5f6e14bd5e14bb0d20ef12925b5c0833f7ef423fd5d13dcd7aab6c0ca62acad2a96d45 1114 checksum: 1587c3497549a4ad1b75d5b63f1d6ced839d4078dc7df3b5df362c8669f3e9cbed975d5c55632bf8c574847d8df03553851e1b85d1e81a568fdfd2466fcd4198
1107 languageName: node 1115 languageName: node
1108 linkType: hard 1116 linkType: hard
1109 1117
@@ -1115,7 +1123,7 @@ __metadata:
1115 "@babel/helper-plugin-utils": "npm:^7.18.6" 1123 "@babel/helper-plugin-utils": "npm:^7.18.6"
1116 peerDependencies: 1124 peerDependencies:
1117 "@babel/core": ^7.0.0-0 1125 "@babel/core": ^7.0.0-0
1118 checksum: b9b7c9b7e57d0db863697a76391a7aa891e9e694b25bd94d1b2fe4beb2d183786469b8fb38084521b76f556b169ac5de14d4bbd281ad4e739ed8d0b219ae7782 1126 checksum: 2f71b5b79df7f8de81c52011d64203b7021f7d23af2470782aef8e8a3be6ca3a208679de8078a12e707342dde1175e5ab44abf8f63c219c997e147118d356dea
1119 languageName: node 1127 languageName: node
1120 linkType: hard 1128 linkType: hard
1121 1129
@@ -1200,7 +1208,7 @@ __metadata:
1200 semver: "npm:^6.3.0" 1208 semver: "npm:^6.3.0"
1201 peerDependencies: 1209 peerDependencies:
1202 "@babel/core": ^7.0.0-0 1210 "@babel/core": ^7.0.0-0
1203 checksum: 076a6ebd0a1fb872e263be7ad6823c31267601cdc03658271602625ffe02ab6f450685df7f6a165289a1d77b3e6320feca8b4f0e9fb0999a8188aa98813a8071 1211 checksum: 4b7ef515702e8c91aa223f60f8a4c8e28ca202fcc090db5c62135e3af16980d7059ba8dc7faf01ba4b818837187d609fdb4d44a56fffa261aa81bfc3d1fa10c3
1204 languageName: node 1212 languageName: node
1205 linkType: hard 1213 linkType: hard
1206 1214
@@ -1215,23 +1223,23 @@ __metadata:
1215 esutils: "npm:^2.0.2" 1223 esutils: "npm:^2.0.2"
1216 peerDependencies: 1224 peerDependencies:
1217 "@babel/core": ^7.0.0-0 1225 "@babel/core": ^7.0.0-0
1218 checksum: ebba2ca33850f53f9f45ed2c9d4bb1add9438e2b0321064d232dc3abc64b5e102194557aa5719bfc8384fc5f76595b8723e4cb8e41cb79599d4efcf6fb650cc3 1226 checksum: bd90081d96b746c1940dc1ce056dee06ed3a128d20936aee1d1795199f789f9a61293ef738343ae10c6d53970c17285d5e147a945dded35423aacb75083b8a89
1219 languageName: node 1227 languageName: node
1220 linkType: hard 1228 linkType: hard
1221 1229
1222"@babel/regjsgen@npm:^0.8.0": 1230"@babel/regjsgen@npm:^0.8.0":
1223 version: 0.8.0 1231 version: 0.8.0
1224 resolution: "@babel/regjsgen@npm:0.8.0" 1232 resolution: "@babel/regjsgen@npm:0.8.0"
1225 checksum: 26a6ef60f1d4b392fc81dd0dbfae4e0fb08c21c8556f16735f02d07ebc89de349ddae48d804b1fe0a450b62eaa119db584c639ae11c3e5a95ccee4e88e88ea7b 1233 checksum: 4f3ddd8c7c96d447e05c8304c1d5ba3a83fcabd8a716bc1091c2f31595cdd43a3a055fff7cb5d3042b8cb7d402d78820fcb4e05d896c605a7d8bcf30f2424c4a
1226 languageName: node 1234 languageName: node
1227 linkType: hard 1235 linkType: hard
1228 1236
1229"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7": 1237"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.22.10, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7":
1230 version: 7.21.0 1238 version: 7.22.11
1231 resolution: "@babel/runtime@npm:7.21.0" 1239 resolution: "@babel/runtime@npm:7.22.11"
1232 dependencies: 1240 dependencies:
1233 regenerator-runtime: "npm:^0.13.11" 1241 regenerator-runtime: "npm:^0.14.0"
1234 checksum: adff473f615f797cffbd64d6839a5e3816e6e7942a6c9bfc23369e6d89a18c92eda974e2f538540a0ce543c28e3d637c59a0a8c391cee978e0b7dc31b606ef08 1242 checksum: 5c875ad67a8b0c06ca3d7b5a3d90271e6b7b27ffc64ca7ce7a84ec11d520d91e5712a2796ef97b97418499cdb85bca11fb31ba605b9336c9728a908b6e0d0a9b
1235 languageName: node 1243 languageName: node
1236 linkType: hard 1244 linkType: hard
1237 1245
@@ -1242,42 +1250,42 @@ __metadata:
1242 "@babel/code-frame": "npm:^7.22.5" 1250 "@babel/code-frame": "npm:^7.22.5"
1243 "@babel/parser": "npm:^7.22.5" 1251 "@babel/parser": "npm:^7.22.5"
1244 "@babel/types": "npm:^7.22.5" 1252 "@babel/types": "npm:^7.22.5"
1245 checksum: 6b06d6cb7b8437d609f0fca32f6ccb6c29e45c4180e364c009fbb6ca98d7e25340659321150badea2629231a84c8a3263ed78169e44424692c407c6a09ddbea9 1253 checksum: dd8fc1b0bfe0128bace25da0e0a708e26320e8030322d3a53bb6366f199b46a277bfa4281dd370d73ab19087c7e27d166070a0659783b4715f7470448c7342b1
1246 languageName: node 1254 languageName: node
1247 linkType: hard 1255 linkType: hard
1248 1256
1249"@babel/traverse@npm:^7.18.11, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.19.4, @babel/traverse@npm:^7.22.5": 1257"@babel/traverse@npm:^7.18.11, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.21.4, @babel/traverse@npm:^7.22.5":
1250 version: 7.22.5 1258 version: 7.22.10
1251 resolution: "@babel/traverse@npm:7.22.5" 1259 resolution: "@babel/traverse@npm:7.22.10"
1252 dependencies: 1260 dependencies:
1253 "@babel/code-frame": "npm:^7.22.5" 1261 "@babel/code-frame": "npm:^7.22.10"
1254 "@babel/generator": "npm:^7.22.5" 1262 "@babel/generator": "npm:^7.22.10"
1255 "@babel/helper-environment-visitor": "npm:^7.22.5" 1263 "@babel/helper-environment-visitor": "npm:^7.22.5"
1256 "@babel/helper-function-name": "npm:^7.22.5" 1264 "@babel/helper-function-name": "npm:^7.22.5"
1257 "@babel/helper-hoist-variables": "npm:^7.22.5" 1265 "@babel/helper-hoist-variables": "npm:^7.22.5"
1258 "@babel/helper-split-export-declaration": "npm:^7.22.5" 1266 "@babel/helper-split-export-declaration": "npm:^7.22.6"
1259 "@babel/parser": "npm:^7.22.5" 1267 "@babel/parser": "npm:^7.22.10"
1260 "@babel/types": "npm:^7.22.5" 1268 "@babel/types": "npm:^7.22.10"
1261 debug: "npm:^4.1.0" 1269 debug: "npm:^4.1.0"
1262 globals: "npm:^11.1.0" 1270 globals: "npm:^11.1.0"
1263 checksum: 3c06ac5697d770d3feafd55e371ee06a52f7336c1ee7f7a165d28f77d36edd1ac2c7f7c4763d24d851c28e8d15009dfbf9401fecdf0a9f4404e9b489c5dd318e 1271 checksum: 8e8b63b053962908408ed9d954810e93f241122222db115327ed5876d020f420fc115ef2d79623c2a4928447ddc002ec220be2a152b241d19de2480c88e10cfb
1264 languageName: node 1272 languageName: node
1265 linkType: hard 1273 linkType: hard
1266 1274
1267"@babel/types@npm:^7.18.10, @babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9, @babel/types@npm:^7.19.4, @babel/types@npm:^7.22.5, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": 1275"@babel/types@npm:^7.18.10, @babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.10, @babel/types@npm:^7.22.5, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3":
1268 version: 7.22.5 1276 version: 7.22.10
1269 resolution: "@babel/types@npm:7.22.5" 1277 resolution: "@babel/types@npm:7.22.10"
1270 dependencies: 1278 dependencies:
1271 "@babel/helper-string-parser": "npm:^7.22.5" 1279 "@babel/helper-string-parser": "npm:^7.22.5"
1272 "@babel/helper-validator-identifier": "npm:^7.22.5" 1280 "@babel/helper-validator-identifier": "npm:^7.22.5"
1273 to-fast-properties: "npm:^2.0.0" 1281 to-fast-properties: "npm:^2.0.0"
1274 checksum: de48a2ae0e3765d0548e439432111c3e01176b6c3193bc155f0dc85f4b766421beced17871a676eab5dc29d8375bb47f77a0a33edb2d617a7a92db70f500eb05 1282 checksum: 34aad930339664a3a5423d6f1d6d2738e30cd73786ff6dfd0a40bfc8f45017e70e24ef397877c86f4e7dee8ada0a53b8fd9f3d86bc0137d09a44e4b3733090f7
1275 languageName: node 1283 languageName: node
1276 linkType: hard 1284 linkType: hard
1277 1285
1278"@codemirror/autocomplete@npm:^6.8.0": 1286"@codemirror/autocomplete@npm:^6.9.0":
1279 version: 6.8.0 1287 version: 6.9.0
1280 resolution: "@codemirror/autocomplete@npm:6.8.0" 1288 resolution: "@codemirror/autocomplete@npm:6.9.0"
1281 dependencies: 1289 dependencies:
1282 "@codemirror/language": "npm:^6.0.0" 1290 "@codemirror/language": "npm:^6.0.0"
1283 "@codemirror/state": "npm:^6.0.0" 1291 "@codemirror/state": "npm:^6.0.0"
@@ -1288,25 +1296,25 @@ __metadata:
1288 "@codemirror/state": ^6.0.0 1296 "@codemirror/state": ^6.0.0
1289 "@codemirror/view": ^6.0.0 1297 "@codemirror/view": ^6.0.0
1290 "@lezer/common": ^1.0.0 1298 "@lezer/common": ^1.0.0
1291 checksum: 8f8116ea9ee7dcd3f00d985327ddca0dd9a070c5b096c0f1e9b14c682b34be482a36529695ee6c5a35f46cbe0e2cb7044facbf13ae0c189b2e194c5a03fe2637 1299 checksum: f6701eda2a5b8c36c2b846acd7d44815535ceb1eb0492010324f3f1dcf3ef142f5f3af72bb32b8d3740950ff4713fc4efe8c6cef6e5f161a1c814309cbd8832f
1292 languageName: node 1300 languageName: node
1293 linkType: hard 1301 linkType: hard
1294 1302
1295"@codemirror/commands@npm:^6.2.4": 1303"@codemirror/commands@npm:^6.2.5":
1296 version: 6.2.4 1304 version: 6.2.5
1297 resolution: "@codemirror/commands@npm:6.2.4" 1305 resolution: "@codemirror/commands@npm:6.2.5"
1298 dependencies: 1306 dependencies:
1299 "@codemirror/language": "npm:^6.0.0" 1307 "@codemirror/language": "npm:^6.0.0"
1300 "@codemirror/state": "npm:^6.2.0" 1308 "@codemirror/state": "npm:^6.2.0"
1301 "@codemirror/view": "npm:^6.0.0" 1309 "@codemirror/view": "npm:^6.0.0"
1302 "@lezer/common": "npm:^1.0.0" 1310 "@lezer/common": "npm:^1.0.0"
1303 checksum: 5f59ddddbc3b914239d33e8402acf42689b854918ff763e164789f88b3eadda47412879814494bc42db89e8cffbdf3d5de003cf651216a221ea0ebcf499c1f4f 1311 checksum: e447b99aba50162fb4544aea1d16367224b31c7496393d1e23ead2ee902836e2580cfc20c3e032f5f561b347e22b257bda8ae2d926cd650f88f9dd41546b90b2
1304 languageName: node 1312 languageName: node
1305 linkType: hard 1313 linkType: hard
1306 1314
1307"@codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.8.0": 1315"@codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.9.0":
1308 version: 6.8.0 1316 version: 6.9.0
1309 resolution: "@codemirror/language@npm:6.8.0" 1317 resolution: "@codemirror/language@npm:6.9.0"
1310 dependencies: 1318 dependencies:
1311 "@codemirror/state": "npm:^6.0.0" 1319 "@codemirror/state": "npm:^6.0.0"
1312 "@codemirror/view": "npm:^6.0.0" 1320 "@codemirror/view": "npm:^6.0.0"
@@ -1314,47 +1322,47 @@ __metadata:
1314 "@lezer/highlight": "npm:^1.0.0" 1322 "@lezer/highlight": "npm:^1.0.0"
1315 "@lezer/lr": "npm:^1.0.0" 1323 "@lezer/lr": "npm:^1.0.0"
1316 style-mod: "npm:^4.0.0" 1324 style-mod: "npm:^4.0.0"
1317 checksum: 9cc39f826b6841fb37f5a0418cb37a2ea34659524f316bf5223c102dcf7cccb069ed5a9630042dddc373d5259484d885d4a81d2f7879f840e1e1ecbefd7ef4ef 1325 checksum: 2310be3db78189e14ded5fb11fb6d78b581c85cae1449050cd24c9ada49c59a70fe4fe0acb6e0ce2e8795793eae99c97600c8d533a4054022397937342c25623
1318 languageName: node 1326 languageName: node
1319 linkType: hard 1327 linkType: hard
1320 1328
1321"@codemirror/lint@npm:^6.2.2": 1329"@codemirror/lint@npm:^6.4.1":
1322 version: 6.2.2 1330 version: 6.4.1
1323 resolution: "@codemirror/lint@npm:6.2.2" 1331 resolution: "@codemirror/lint@npm:6.4.1"
1324 dependencies: 1332 dependencies:
1325 "@codemirror/state": "npm:^6.0.0" 1333 "@codemirror/state": "npm:^6.0.0"
1326 "@codemirror/view": "npm:^6.0.0" 1334 "@codemirror/view": "npm:^6.0.0"
1327 crelt: "npm:^1.0.5" 1335 crelt: "npm:^1.0.5"
1328 checksum: 67781f016bfec4dd1ca734e7621b16fbdfdbc5cc4222ae04fe0691fdf3ea5b609b00081cfc652c6ee9594eef4861bc9e15dbe22fb5f9081e6b1b26c85f069852 1336 checksum: aeb9838a9396c3aec90b92e12c9f906f9cf58469aaf7c1a347583354c27f9c6635f361eeac0e7c1e3f54c66fa03f1a9f67f2924998d229a5b3c08e982e1ed58b
1329 languageName: node 1337 languageName: node
1330 linkType: hard 1338 linkType: hard
1331 1339
1332"@codemirror/search@npm:^6.5.0": 1340"@codemirror/search@npm:^6.5.2":
1333 version: 6.5.0 1341 version: 6.5.2
1334 resolution: "@codemirror/search@npm:6.5.0" 1342 resolution: "@codemirror/search@npm:6.5.2"
1335 dependencies: 1343 dependencies:
1336 "@codemirror/state": "npm:^6.0.0" 1344 "@codemirror/state": "npm:^6.0.0"
1337 "@codemirror/view": "npm:^6.0.0" 1345 "@codemirror/view": "npm:^6.0.0"
1338 crelt: "npm:^1.0.5" 1346 crelt: "npm:^1.0.5"
1339 checksum: dab4e51c1ad8bbacd932c0797f27727b935ce7cf155828a3747943fe091e3c91f7888463b4d43be28fb54c5d0c2df136e3d9be00bde3be1824dedb9116fd6c6b 1347 checksum: 897dcc68dbee89093bb8f60ed4411c285bc8e11dc292ebecab510c09c3144d5c312bc44850e2ffe6944aec42753d9741b82f462bf7fbc275dde8895394076a0c
1340 languageName: node 1348 languageName: node
1341 linkType: hard 1349 linkType: hard
1342 1350
1343"@codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.1.4, @codemirror/state@npm:^6.2.0, @codemirror/state@npm:^6.2.1": 1351"@codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.1.4, @codemirror/state@npm:^6.2.0, @codemirror/state@npm:^6.2.1":
1344 version: 6.2.1 1352 version: 6.2.1
1345 resolution: "@codemirror/state@npm:6.2.1" 1353 resolution: "@codemirror/state@npm:6.2.1"
1346 checksum: 8c9fb092cca960fc66c7997630d4406ebfbf972ba297af1bf8ed5c5fe070b33af2a63ff19caad0c4c75021c18303f0c4af42ae216bb708dfcea055763423d32f 1354 checksum: ebae138825791055366efa3ad5c643a4d4718ae159d67664d5e0a226c1f0bd1528695d2eb5d970ad0cef30c301af1f4a3318b0ca271aacacf38f8800eaf51190
1347 languageName: node 1355 languageName: node
1348 linkType: hard 1356 linkType: hard
1349 1357
1350"@codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.13.2, @codemirror/view@npm:^6.6.0": 1358"@codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.18.1, @codemirror/view@npm:^6.6.0":
1351 version: 6.13.2 1359 version: 6.18.1
1352 resolution: "@codemirror/view@npm:6.13.2" 1360 resolution: "@codemirror/view@npm:6.18.1"
1353 dependencies: 1361 dependencies:
1354 "@codemirror/state": "npm:^6.1.4" 1362 "@codemirror/state": "npm:^6.1.4"
1355 style-mod: "npm:^4.0.0" 1363 style-mod: "npm:^4.1.0"
1356 w3c-keyname: "npm:^2.2.4" 1364 w3c-keyname: "npm:^2.2.4"
1357 checksum: 6a5bb38791cd43c6b4af495fa49e50986c338735c349a1164cd48bca75d6a693482592185a7f11c63c8e51745f95e92068c3bcf8cc61ab4efa421b716f1909df 1365 checksum: 3eae851179083e7c1c0325f499b482f0735597d1758ef0013f5530ffa21a22f5a997b8ee3b898068e5957109793ec9b2500707019b970d9d2b980c0d09110559
1358 languageName: node 1366 languageName: node
1359 linkType: hard 1367 linkType: hard
1360 1368
@@ -1373,7 +1381,7 @@ __metadata:
1373 find-root: "npm:^1.1.0" 1381 find-root: "npm:^1.1.0"
1374 source-map: "npm:^0.5.7" 1382 source-map: "npm:^0.5.7"
1375 stylis: "npm:4.2.0" 1383 stylis: "npm:4.2.0"
1376 checksum: 8016da0104e5d9546eba3eb9d66a58b1fb929e292b921501459923d189610fc2cb88d6838bea2f617e8c93b8a8763e418870f303c4acefc6c117ff8e9efe7cf6 1384 checksum: 89cbb6ec0e52c8ee9c2a4b9889ccd4fc3a75d28091d835bfac6d7c4565d3338621e23af0a85f3bcd133e1cae795c692e1dadada015784d4b0554aa5bb111df43
1377 languageName: node 1385 languageName: node
1378 linkType: hard 1386 linkType: hard
1379 1387
@@ -1386,14 +1394,14 @@ __metadata:
1386 "@emotion/utils": "npm:^1.2.1" 1394 "@emotion/utils": "npm:^1.2.1"
1387 "@emotion/weak-memoize": "npm:^0.3.1" 1395 "@emotion/weak-memoize": "npm:^0.3.1"
1388 stylis: "npm:4.2.0" 1396 stylis: "npm:4.2.0"
1389 checksum: 2564df3c1672e398f95ac47796817cc583d74b5c36f14413492e8cc16aa38393340b292e56e325398c7f975e27eced365a1da36919da8e57041259588f925cf9 1397 checksum: a23ab5ab2fd08e904698106d58ad3536fed51cc1aa0ef228e95bb640eaf11f560dbd91a395477b0d84e1e3c20150263764b4558517cf6576a89d2d6cc5253688
1390 languageName: node 1398 languageName: node
1391 linkType: hard 1399 linkType: hard
1392 1400
1393"@emotion/hash@npm:^0.9.1": 1401"@emotion/hash@npm:^0.9.1":
1394 version: 0.9.1 1402 version: 0.9.1
1395 resolution: "@emotion/hash@npm:0.9.1" 1403 resolution: "@emotion/hash@npm:0.9.1"
1396 checksum: 87587f4a5fd6667866d643293c860781a3ed10cc3cb6397c7de929c65ccb78756f43f2a7e99034dbb7a10dc22cc30d685e2bc6e8fdc9a020c61f450117d40089 1404 checksum: cdafe5da63fc1137f3db6e232fdcde9188b2b47ee66c56c29137199642a4086f42382d866911cfb4833cae2cc00271ab45cad3946b024f67b527bb7fac7f4c9d
1397 languageName: node 1405 languageName: node
1398 linkType: hard 1406 linkType: hard
1399 1407
@@ -1402,14 +1410,14 @@ __metadata:
1402 resolution: "@emotion/is-prop-valid@npm:1.2.1" 1410 resolution: "@emotion/is-prop-valid@npm:1.2.1"
1403 dependencies: 1411 dependencies:
1404 "@emotion/memoize": "npm:^0.8.1" 1412 "@emotion/memoize": "npm:^0.8.1"
1405 checksum: 04624e1cd72287c2f1143890605507f18cb22fb2f9111d89af56d88bea316c0a819040df9aeafa1b5f02facff31ada510e0d4efc1111ae0f4f8979f0da9b3966 1413 checksum: 7c2aabdf0ca9986ca25abc9dae711348308cf18d418d64ffa4c8ffd2114806c47f2e06ba8ee769f38ec67d65bd59ec73f34d94023e81baa1c43510ac86ccd5e6
1406 languageName: node 1414 languageName: node
1407 linkType: hard 1415 linkType: hard
1408 1416
1409"@emotion/memoize@npm:^0.8.1": 1417"@emotion/memoize@npm:^0.8.1":
1410 version: 0.8.1 1418 version: 0.8.1
1411 resolution: "@emotion/memoize@npm:0.8.1" 1419 resolution: "@emotion/memoize@npm:0.8.1"
1412 checksum: f9129e5c6d0fe36572c60eaa58fa7ca882f538440d9332d5f12a15aec8348095cdfd25092ee1af16b4bc55767aca56728411c26e2b0b3725e663039b842d3533 1420 checksum: dffed372fc3b9fa2ba411e76af22b6bb686fb0cb07694fdfaa6dd2baeb0d5e4968c1a7caa472bfcf06a5997d5e7c7d16b90e993f9a6ffae79a2c3dbdc76dfe78
1413 languageName: node 1421 languageName: node
1414 linkType: hard 1422 linkType: hard
1415 1423
@@ -1430,7 +1438,7 @@ __metadata:
1430 peerDependenciesMeta: 1438 peerDependenciesMeta:
1431 "@types/react": 1439 "@types/react":
1432 optional: true 1440 optional: true
1433 checksum: beae1f42b138566242655f6c13a3b0a2301c0fa6ed7de09ad272dad8d7cedcab4d69d0314ca51a485342345f07ab6ebca74f2aac69cbe24cc9de552e7915d30a 1441 checksum: 1aea4d735b537fbfbeda828bbf929488a7e1b5b7d131f14aeede8737e92bb3b611e15fec353e97f85aed7a65a1c86a695a04ba6e9be905231beef6bd624cb705
1434 languageName: node 1442 languageName: node
1435 linkType: hard 1443 linkType: hard
1436 1444
@@ -1443,14 +1451,14 @@ __metadata:
1443 "@emotion/unitless": "npm:^0.8.1" 1451 "@emotion/unitless": "npm:^0.8.1"
1444 "@emotion/utils": "npm:^1.2.1" 1452 "@emotion/utils": "npm:^1.2.1"
1445 csstype: "npm:^3.0.2" 1453 csstype: "npm:^3.0.2"
1446 checksum: e681349d97968880271f840e9e79f672f5c331ac52c90600b9cf5994351711ffe837e0a187aeeccf9c600116b5eee02c9ada395455d246f494e714cae59c30df 1454 checksum: d243e0e5abce8d2183d25a32ec89bf650ee741ebadb29e6405abde05d4e2ed446ba5b3f725a29833ad709d0d08f0a5c8d0532fdcd43f4b23d931d8b6d4f218c1
1447 languageName: node 1455 languageName: node
1448 linkType: hard 1456 linkType: hard
1449 1457
1450"@emotion/sheet@npm:^1.2.2": 1458"@emotion/sheet@npm:^1.2.2":
1451 version: 1.2.2 1459 version: 1.2.2
1452 resolution: "@emotion/sheet@npm:1.2.2" 1460 resolution: "@emotion/sheet@npm:1.2.2"
1453 checksum: b25ec606f076b95d9831feae4ac8bd527c13fab5a31e5a4533d1482eaa8d2620bda7f8d4d350388ed926633339e0feea0555ed175d08265cd1c6f51bc4bb6434 1461 checksum: 69827a1bfa43d7b188f1d8cea42163143a36312543fdade5257c459a2b3efd7ce386aac84ba152bc2517a4f7e54384c04800b26adb382bb284ac7e4ad40e584b
1454 languageName: node 1462 languageName: node
1455 linkType: hard 1463 linkType: hard
1456 1464
@@ -1470,14 +1478,14 @@ __metadata:
1470 peerDependenciesMeta: 1478 peerDependenciesMeta:
1471 "@types/react": 1479 "@types/react":
1472 optional: true 1480 optional: true
1473 checksum: 3433979aad4515933563dc2f14c98802d33b771b5269d989f15f9d2458f0adc0235465a06d27bf51528d4e1d653ec57f8d0e0ecb50e58b39e72afe5a234170ed 1481 checksum: a168bd7a8a6f254e54a321be4c7b7dd4bf65815e6570ba7c5a435b7d5aeebd76434e04886db7799a955817c8d5bf0103a3dcc3c785fba2bb53922320dda59a10
1474 languageName: node 1482 languageName: node
1475 linkType: hard 1483 linkType: hard
1476 1484
1477"@emotion/unitless@npm:^0.8.1": 1485"@emotion/unitless@npm:^0.8.1":
1478 version: 0.8.1 1486 version: 0.8.1
1479 resolution: "@emotion/unitless@npm:0.8.1" 1487 resolution: "@emotion/unitless@npm:0.8.1"
1480 checksum: 6f28915658918cb969acb612c592490b012e7b1a894a232411147f4c810cc4667053479ef126d7deeab589fa4fa0f3b11b0a79e2f40447d550292cc7a6cc591b 1488 checksum: a1ed508628288f40bfe6dd17d431ed899c067a899fa293a13afe3aed1d70fac0412b8a215fafab0b42829360db687fecd763e5f01a64ddc4a4b58ec3112ff548
1481 languageName: node 1489 languageName: node
1482 linkType: hard 1490 linkType: hard
1483 1491
@@ -1486,256 +1494,305 @@ __metadata:
1486 resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" 1494 resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1"
1487 peerDependencies: 1495 peerDependencies:
1488 react: ">=16.8.0" 1496 react: ">=16.8.0"
1489 checksum: 757b7a88000de88dc29e349c1d7d04f49aadf8cb3d5066b99ceb8201e4c3c12db9caf08df7b35ca3a7ca88dbe5a44872d8b7d6326838682cbc2d1b7ca5be4344 1497 checksum: a15b2167940e3a908160687b73fc4fcd81e59ab45136b6967f02c7c419d9a149acd22a416b325c389642d4f1c3d33cf4196cad6b618128b55b7c74f6807a240b
1490 languageName: node 1498 languageName: node
1491 linkType: hard 1499 linkType: hard
1492 1500
1493"@emotion/utils@npm:^1.2.1": 1501"@emotion/utils@npm:^1.2.1":
1494 version: 1.2.1 1502 version: 1.2.1
1495 resolution: "@emotion/utils@npm:1.2.1" 1503 resolution: "@emotion/utils@npm:1.2.1"
1496 checksum: d80f12813e9663a1dc9e824efe57000c3ca296aa5207029682854eee09d34c0395f462cf7b0d057b5460840ac65170053e0f6c57493069c982b8070d26dc79e0 1504 checksum: db43ca803361740c14dfb1cca1464d10d27f4c8b40d3e8864e6932ccf375d1450778ff4e4eadee03fb97f2aeb18de9fae98294905596a12ff7d4cd1910414d8d
1497 languageName: node 1505 languageName: node
1498 linkType: hard 1506 linkType: hard
1499 1507
1500"@emotion/weak-memoize@npm:^0.3.1": 1508"@emotion/weak-memoize@npm:^0.3.1":
1501 version: 0.3.1 1509 version: 0.3.1
1502 resolution: "@emotion/weak-memoize@npm:0.3.1" 1510 resolution: "@emotion/weak-memoize@npm:0.3.1"
1503 checksum: 64f8180e70c0717d7e0fadace95491c8d91c045a5a3a42a12e461efe38a109d56ca66d37a474f7a20835fcd61ed0ac35bda6bd5ebf8786171051acbcc53b0134 1511 checksum: ed514b3cb94bbacece4ac2450d98898066c0a0698bdeda256e312405ca53634cb83c75889b25cd8bbbe185c80f4c05a1f0a0091e1875460ba6be61d0334f0b8a
1504 languageName: node 1512 languageName: node
1505 linkType: hard 1513 linkType: hard
1506 1514
1507"@esbuild/android-arm64@npm:0.17.19": 1515"@esbuild/android-arm64@npm:0.18.20":
1508 version: 0.17.19 1516 version: 0.18.20
1509 resolution: "@esbuild/android-arm64@npm:0.17.19" 1517 resolution: "@esbuild/android-arm64@npm:0.18.20"
1510 conditions: os=android & cpu=arm64 1518 conditions: os=android & cpu=arm64
1511 languageName: node 1519 languageName: node
1512 linkType: hard 1520 linkType: hard
1513 1521
1514"@esbuild/android-arm@npm:0.17.19": 1522"@esbuild/android-arm@npm:0.18.20":
1515 version: 0.17.19 1523 version: 0.18.20
1516 resolution: "@esbuild/android-arm@npm:0.17.19" 1524 resolution: "@esbuild/android-arm@npm:0.18.20"
1517 conditions: os=android & cpu=arm 1525 conditions: os=android & cpu=arm
1518 languageName: node 1526 languageName: node
1519 linkType: hard 1527 linkType: hard
1520 1528
1521"@esbuild/android-x64@npm:0.17.19": 1529"@esbuild/android-x64@npm:0.18.20":
1522 version: 0.17.19 1530 version: 0.18.20
1523 resolution: "@esbuild/android-x64@npm:0.17.19" 1531 resolution: "@esbuild/android-x64@npm:0.18.20"
1524 conditions: os=android & cpu=x64 1532 conditions: os=android & cpu=x64
1525 languageName: node 1533 languageName: node
1526 linkType: hard 1534 linkType: hard
1527 1535
1528"@esbuild/darwin-arm64@npm:0.17.19": 1536"@esbuild/darwin-arm64@npm:0.18.20":
1529 version: 0.17.19 1537 version: 0.18.20
1530 resolution: "@esbuild/darwin-arm64@npm:0.17.19" 1538 resolution: "@esbuild/darwin-arm64@npm:0.18.20"
1531 conditions: os=darwin & cpu=arm64 1539 conditions: os=darwin & cpu=arm64
1532 languageName: node 1540 languageName: node
1533 linkType: hard 1541 linkType: hard
1534 1542
1535"@esbuild/darwin-x64@npm:0.17.19": 1543"@esbuild/darwin-x64@npm:0.18.20":
1536 version: 0.17.19 1544 version: 0.18.20
1537 resolution: "@esbuild/darwin-x64@npm:0.17.19" 1545 resolution: "@esbuild/darwin-x64@npm:0.18.20"
1538 conditions: os=darwin & cpu=x64 1546 conditions: os=darwin & cpu=x64
1539 languageName: node 1547 languageName: node
1540 linkType: hard 1548 linkType: hard
1541 1549
1542"@esbuild/freebsd-arm64@npm:0.17.19": 1550"@esbuild/freebsd-arm64@npm:0.18.20":
1543 version: 0.17.19 1551 version: 0.18.20
1544 resolution: "@esbuild/freebsd-arm64@npm:0.17.19" 1552 resolution: "@esbuild/freebsd-arm64@npm:0.18.20"
1545 conditions: os=freebsd & cpu=arm64 1553 conditions: os=freebsd & cpu=arm64
1546 languageName: node 1554 languageName: node
1547 linkType: hard 1555 linkType: hard
1548 1556
1549"@esbuild/freebsd-x64@npm:0.17.19": 1557"@esbuild/freebsd-x64@npm:0.18.20":
1550 version: 0.17.19 1558 version: 0.18.20
1551 resolution: "@esbuild/freebsd-x64@npm:0.17.19" 1559 resolution: "@esbuild/freebsd-x64@npm:0.18.20"
1552 conditions: os=freebsd & cpu=x64 1560 conditions: os=freebsd & cpu=x64
1553 languageName: node 1561 languageName: node
1554 linkType: hard 1562 linkType: hard
1555 1563
1556"@esbuild/linux-arm64@npm:0.17.19": 1564"@esbuild/linux-arm64@npm:0.18.20":
1557 version: 0.17.19 1565 version: 0.18.20
1558 resolution: "@esbuild/linux-arm64@npm:0.17.19" 1566 resolution: "@esbuild/linux-arm64@npm:0.18.20"
1559 conditions: os=linux & cpu=arm64 1567 conditions: os=linux & cpu=arm64
1560 languageName: node 1568 languageName: node
1561 linkType: hard 1569 linkType: hard
1562 1570
1563"@esbuild/linux-arm@npm:0.17.19": 1571"@esbuild/linux-arm@npm:0.18.20":
1564 version: 0.17.19 1572 version: 0.18.20
1565 resolution: "@esbuild/linux-arm@npm:0.17.19" 1573 resolution: "@esbuild/linux-arm@npm:0.18.20"
1566 conditions: os=linux & cpu=arm 1574 conditions: os=linux & cpu=arm
1567 languageName: node 1575 languageName: node
1568 linkType: hard 1576 linkType: hard
1569 1577
1570"@esbuild/linux-ia32@npm:0.17.19": 1578"@esbuild/linux-ia32@npm:0.18.20":
1571 version: 0.17.19 1579 version: 0.18.20
1572 resolution: "@esbuild/linux-ia32@npm:0.17.19" 1580 resolution: "@esbuild/linux-ia32@npm:0.18.20"
1573 conditions: os=linux & cpu=ia32 1581 conditions: os=linux & cpu=ia32
1574 languageName: node 1582 languageName: node
1575 linkType: hard 1583 linkType: hard
1576 1584
1577"@esbuild/linux-loong64@npm:0.17.19": 1585"@esbuild/linux-loong64@npm:0.18.20":
1578 version: 0.17.19 1586 version: 0.18.20
1579 resolution: "@esbuild/linux-loong64@npm:0.17.19" 1587 resolution: "@esbuild/linux-loong64@npm:0.18.20"
1580 conditions: os=linux & cpu=loong64 1588 conditions: os=linux & cpu=loong64
1581 languageName: node 1589 languageName: node
1582 linkType: hard 1590 linkType: hard
1583 1591
1584"@esbuild/linux-mips64el@npm:0.17.19": 1592"@esbuild/linux-mips64el@npm:0.18.20":
1585 version: 0.17.19 1593 version: 0.18.20
1586 resolution: "@esbuild/linux-mips64el@npm:0.17.19" 1594 resolution: "@esbuild/linux-mips64el@npm:0.18.20"
1587 conditions: os=linux & cpu=mips64el 1595 conditions: os=linux & cpu=mips64el
1588 languageName: node 1596 languageName: node
1589 linkType: hard 1597 linkType: hard
1590 1598
1591"@esbuild/linux-ppc64@npm:0.17.19": 1599"@esbuild/linux-ppc64@npm:0.18.20":
1592 version: 0.17.19 1600 version: 0.18.20
1593 resolution: "@esbuild/linux-ppc64@npm:0.17.19" 1601 resolution: "@esbuild/linux-ppc64@npm:0.18.20"
1594 conditions: os=linux & cpu=ppc64 1602 conditions: os=linux & cpu=ppc64
1595 languageName: node 1603 languageName: node
1596 linkType: hard 1604 linkType: hard
1597 1605
1598"@esbuild/linux-riscv64@npm:0.17.19": 1606"@esbuild/linux-riscv64@npm:0.18.20":
1599 version: 0.17.19 1607 version: 0.18.20
1600 resolution: "@esbuild/linux-riscv64@npm:0.17.19" 1608 resolution: "@esbuild/linux-riscv64@npm:0.18.20"
1601 conditions: os=linux & cpu=riscv64 1609 conditions: os=linux & cpu=riscv64
1602 languageName: node 1610 languageName: node
1603 linkType: hard 1611 linkType: hard
1604 1612
1605"@esbuild/linux-s390x@npm:0.17.19": 1613"@esbuild/linux-s390x@npm:0.18.20":
1606 version: 0.17.19 1614 version: 0.18.20
1607 resolution: "@esbuild/linux-s390x@npm:0.17.19" 1615 resolution: "@esbuild/linux-s390x@npm:0.18.20"
1608 conditions: os=linux & cpu=s390x 1616 conditions: os=linux & cpu=s390x
1609 languageName: node 1617 languageName: node
1610 linkType: hard 1618 linkType: hard
1611 1619
1612"@esbuild/linux-x64@npm:0.17.19": 1620"@esbuild/linux-x64@npm:0.18.20":
1613 version: 0.17.19 1621 version: 0.18.20
1614 resolution: "@esbuild/linux-x64@npm:0.17.19" 1622 resolution: "@esbuild/linux-x64@npm:0.18.20"
1615 conditions: os=linux & cpu=x64 1623 conditions: os=linux & cpu=x64
1616 languageName: node 1624 languageName: node
1617 linkType: hard 1625 linkType: hard
1618 1626
1619"@esbuild/netbsd-x64@npm:0.17.19": 1627"@esbuild/netbsd-x64@npm:0.18.20":
1620 version: 0.17.19 1628 version: 0.18.20
1621 resolution: "@esbuild/netbsd-x64@npm:0.17.19" 1629 resolution: "@esbuild/netbsd-x64@npm:0.18.20"
1622 conditions: os=netbsd & cpu=x64 1630 conditions: os=netbsd & cpu=x64
1623 languageName: node 1631 languageName: node
1624 linkType: hard 1632 linkType: hard
1625 1633
1626"@esbuild/openbsd-x64@npm:0.17.19": 1634"@esbuild/openbsd-x64@npm:0.18.20":
1627 version: 0.17.19 1635 version: 0.18.20
1628 resolution: "@esbuild/openbsd-x64@npm:0.17.19" 1636 resolution: "@esbuild/openbsd-x64@npm:0.18.20"
1629 conditions: os=openbsd & cpu=x64 1637 conditions: os=openbsd & cpu=x64
1630 languageName: node 1638 languageName: node
1631 linkType: hard 1639 linkType: hard
1632 1640
1633"@esbuild/sunos-x64@npm:0.17.19": 1641"@esbuild/sunos-x64@npm:0.18.20":
1634 version: 0.17.19 1642 version: 0.18.20
1635 resolution: "@esbuild/sunos-x64@npm:0.17.19" 1643 resolution: "@esbuild/sunos-x64@npm:0.18.20"
1636 conditions: os=sunos & cpu=x64 1644 conditions: os=sunos & cpu=x64
1637 languageName: node 1645 languageName: node
1638 linkType: hard 1646 linkType: hard
1639 1647
1640"@esbuild/win32-arm64@npm:0.17.19": 1648"@esbuild/win32-arm64@npm:0.18.20":
1641 version: 0.17.19 1649 version: 0.18.20
1642 resolution: "@esbuild/win32-arm64@npm:0.17.19" 1650 resolution: "@esbuild/win32-arm64@npm:0.18.20"
1643 conditions: os=win32 & cpu=arm64 1651 conditions: os=win32 & cpu=arm64
1644 languageName: node 1652 languageName: node
1645 linkType: hard 1653 linkType: hard
1646 1654
1647"@esbuild/win32-ia32@npm:0.17.19": 1655"@esbuild/win32-ia32@npm:0.18.20":
1648 version: 0.17.19 1656 version: 0.18.20
1649 resolution: "@esbuild/win32-ia32@npm:0.17.19" 1657 resolution: "@esbuild/win32-ia32@npm:0.18.20"
1650 conditions: os=win32 & cpu=ia32 1658 conditions: os=win32 & cpu=ia32
1651 languageName: node 1659 languageName: node
1652 linkType: hard 1660 linkType: hard
1653 1661
1654"@esbuild/win32-x64@npm:0.17.19": 1662"@esbuild/win32-x64@npm:0.18.20":
1655 version: 0.17.19 1663 version: 0.18.20
1656 resolution: "@esbuild/win32-x64@npm:0.17.19" 1664 resolution: "@esbuild/win32-x64@npm:0.18.20"
1657 conditions: os=win32 & cpu=x64 1665 conditions: os=win32 & cpu=x64
1658 languageName: node 1666 languageName: node
1659 linkType: hard 1667 linkType: hard
1660 1668
1661"@eslint-community/eslint-utils@npm:^4.2.0": 1669"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0":
1662 version: 4.4.0 1670 version: 4.4.0
1663 resolution: "@eslint-community/eslint-utils@npm:4.4.0" 1671 resolution: "@eslint-community/eslint-utils@npm:4.4.0"
1664 dependencies: 1672 dependencies:
1665 eslint-visitor-keys: "npm:^3.3.0" 1673 eslint-visitor-keys: "npm:^3.3.0"
1666 peerDependencies: 1674 peerDependencies:
1667 eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 1675 eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
1668 checksum: b9d700a83a743f2e152b4038d02a4bf807bc7363d59efeafec93b9498e59a3aa4d2604d206c213b91966416d628f33d88a4b773b8ff0d384b44353e8072ba922 1676 checksum: 7e559c4ce59cd3a06b1b5a517b593912e680a7f981ae7affab0d01d709e99cd5647019be8fafa38c350305bc32f1f7d42c7073edde2ab536c745e365f37b607e
1669 languageName: node 1677 languageName: node
1670 linkType: hard 1678 linkType: hard
1671 1679
1672"@eslint-community/regexpp@npm:^4.4.0": 1680"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1":
1673 version: 4.5.0 1681 version: 4.6.2
1674 resolution: "@eslint-community/regexpp@npm:4.5.0" 1682 resolution: "@eslint-community/regexpp@npm:4.6.2"
1675 checksum: 14f8f9f865bfe07a41e7f274ce5eddc456e194d5e5fe7928b6520f5eaf7312c2da683be06133f3cd775af41fc9992f4181b71dd12e370cfab94a82e9bb74169a 1683 checksum: da800788298f8419f4c4e04eaa4e3c97e7f57537e822e7b150de662e420e3d437816b863e490807bd0b00e715b0989f9d8864bf54357cbcfa84e4255b910789d
1676 languageName: node 1684 languageName: node
1677 linkType: hard 1685 linkType: hard
1678 1686
1679"@eslint/eslintrc@npm:^2.0.3": 1687"@eslint/eslintrc@npm:^2.1.2":
1680 version: 2.0.3 1688 version: 2.1.2
1681 resolution: "@eslint/eslintrc@npm:2.0.3" 1689 resolution: "@eslint/eslintrc@npm:2.1.2"
1682 dependencies: 1690 dependencies:
1683 ajv: "npm:^6.12.4" 1691 ajv: "npm:^6.12.4"
1684 debug: "npm:^4.3.2" 1692 debug: "npm:^4.3.2"
1685 espree: "npm:^9.5.2" 1693 espree: "npm:^9.6.0"
1686 globals: "npm:^13.19.0" 1694 globals: "npm:^13.19.0"
1687 ignore: "npm:^5.2.0" 1695 ignore: "npm:^5.2.0"
1688 import-fresh: "npm:^3.2.1" 1696 import-fresh: "npm:^3.2.1"
1689 js-yaml: "npm:^4.1.0" 1697 js-yaml: "npm:^4.1.0"
1690 minimatch: "npm:^3.1.2" 1698 minimatch: "npm:^3.1.2"
1691 strip-json-comments: "npm:^3.1.1" 1699 strip-json-comments: "npm:^3.1.1"
1692 checksum: 41c404e8cbca6e0717bce15425f15d34514c38ebcef5daf99467d405733bae73908227feea4d04edc64906e89cc53f30391c31864a5e51b3d3838a05a3a97356 1700 checksum: 00efdc3797e6f05518060522b7788e5f5aff02f13facbd0c83b176c3dee86554023283a5f68542df379c5137685d2d29745c87f62bf2406a1d38d95471f44ce6
1693 languageName: node 1701 languageName: node
1694 linkType: hard 1702 linkType: hard
1695 1703
1696"@eslint/js@npm:8.43.0": 1704"@eslint/js@npm:8.49.0":
1697 version: 8.43.0 1705 version: 8.49.0
1698 resolution: "@eslint/js@npm:8.43.0" 1706 resolution: "@eslint/js@npm:8.49.0"
1699 checksum: 3231c88eee1cb8c8b77771eed89d99a26e8d813bc0ada47fbdadaff1a16cbd74000633f4411a74c3d7cc71629f78da177060b369ce6aac461568712175c2ce8c 1707 checksum: 40b4255866161e16b09eae1830c8ff7379276659ee7ce039e4708bcf3c5a5fd8b95418d32c355294e6c738f23ab42f3e3a55100dffb389edd5d5233ca47c01b3
1700 languageName: node 1708 languageName: node
1701 linkType: hard 1709 linkType: hard
1702 1710
1703"@fontsource-variable/inter@npm:^5.0.3": 1711"@floating-ui/core@npm:^1.4.1":
1704 version: 5.0.3 1712 version: 1.4.1
1705 resolution: "@fontsource-variable/inter@npm:5.0.3" 1713 resolution: "@floating-ui/core@npm:1.4.1"
1706 checksum: fafef9eba436bb20803966b47de1ed0bb54aec421d7c979fa2bf5183ea16724f3f11e8c2ac90e7fd5b7941819beafb94648471daa338de32f95c3ca885249e3f 1714 dependencies:
1715 "@floating-ui/utils": "npm:^0.1.1"
1716 checksum: 6a738ff3b5bcca2470904a2462a2700e32081f6e681e077fd63c8d0b389439511a2a16187589df156fac6e8f47d56bdc0afea64303b9341fb5886cff82d87758
1717 languageName: node
1718 linkType: hard
1719
1720"@floating-ui/dom@npm:^1.3.0":
1721 version: 1.5.1
1722 resolution: "@floating-ui/dom@npm:1.5.1"
1723 dependencies:
1724 "@floating-ui/core": "npm:^1.4.1"
1725 "@floating-ui/utils": "npm:^0.1.1"
1726 checksum: cda044e72b6e015af70ef482ff19cae34b085c69a04e3d5d48613a58f6e88b71dbd7cc2f2ae02fc1f5f29ad8ba13c1c3074e2a4416b8c73ede47139177b5749c
1727 languageName: node
1728 linkType: hard
1729
1730"@floating-ui/react-dom@npm:^2.0.1":
1731 version: 2.0.1
1732 resolution: "@floating-ui/react-dom@npm:2.0.1"
1733 dependencies:
1734 "@floating-ui/dom": "npm:^1.3.0"
1735 peerDependencies:
1736 react: ">=16.8.0"
1737 react-dom: ">=16.8.0"
1738 checksum: 856c0c9de0a9117bcc69b1363fd9fa188133b9714394609db937903ab4330e9851becfd2a83453f40834de1a18377caf329b6b71afc1c69d7c5687f87da80ed4
1707 languageName: node 1739 languageName: node
1708 linkType: hard 1740 linkType: hard
1709 1741
1710"@fontsource-variable/jetbrains-mono@npm:^5.0.3": 1742"@floating-ui/utils@npm:^0.1.1":
1711 version: 5.0.4 1743 version: 0.1.1
1712 resolution: "@fontsource-variable/jetbrains-mono@npm:5.0.4" 1744 resolution: "@floating-ui/utils@npm:0.1.1"
1713 checksum: 5e3559b3c2186f6c3f3f73b1fac0d0b296a7d1ccb709da6d7557cbe5dcdb8f6a22f0a2b21cbdd2a29d718a9252ff723074708d07b38d79240b6b390137228109 1745 checksum: 3fca5a8bce10de87f78c9b9377db7d5a4c992f98adc3722e46725d9bd2a3a1051bb1c512caf5fe293752c660455df5f7b6a2153802f9299572fac3b565f4c407
1746 languageName: node
1747 linkType: hard
1748
1749"@fontsource-variable/jetbrains-mono@npm:^5.0.13":
1750 version: 5.0.13
1751 resolution: "@fontsource-variable/jetbrains-mono@npm:5.0.13"
1752 checksum: a8916a87ecd52275b1888fe560d0ba343b75c66c998797554427949f5ddcbbe35a3a41a2923bb6b090372f9f2451dcfdfeb22a7c322101e392f153898bc9868d
1753 languageName: node
1754 linkType: hard
1755
1756"@fontsource-variable/open-sans@npm:^5.0.13":
1757 version: 5.0.13
1758 resolution: "@fontsource-variable/open-sans@npm:5.0.13"
1759 checksum: 93cb251adb3331257a5377aa64f0bf5afbb7b0460703af758b462fba788453c051c78c16b3d5cfb004ff9b5a8bd248914550ee04d0f0d023027bb5f528426d2d
1760 languageName: node
1761 linkType: hard
1762
1763"@hpcc-js/wasm@npm:2.13.1, @hpcc-js/wasm@npm:^2.13.1":
1764 version: 2.13.1
1765 resolution: "@hpcc-js/wasm@npm:2.13.1"
1766 dependencies:
1767 yargs: "npm:17.7.2"
1768 bin:
1769 dot-wasm: bin/dot-wasm.js
1770 checksum: 3ed818f52ad8d9c671abbcdd7553af30ce0c7775b7f2c48997a7a7180d3719c61516972d25aa4942d947b55127257c6137ec0c142b693a87cb235ba1407fc2ed
1714 languageName: node 1771 languageName: node
1715 linkType: hard 1772 linkType: hard
1716 1773
1717"@humanwhocodes/config-array@npm:^0.11.10": 1774"@humanwhocodes/config-array@npm:^0.11.11":
1718 version: 0.11.10 1775 version: 0.11.11
1719 resolution: "@humanwhocodes/config-array@npm:0.11.10" 1776 resolution: "@humanwhocodes/config-array@npm:0.11.11"
1720 dependencies: 1777 dependencies:
1721 "@humanwhocodes/object-schema": "npm:^1.2.1" 1778 "@humanwhocodes/object-schema": "npm:^1.2.1"
1722 debug: "npm:^4.1.1" 1779 debug: "npm:^4.1.1"
1723 minimatch: "npm:^3.0.5" 1780 minimatch: "npm:^3.0.5"
1724 checksum: d8b3afa90dc46f4cbad48dd54e9bb39918a01fbfb16cc931fb55db8c967c1575fc21d4a5f8055f4728697246eafafc95e23c97370ff30ada621f4b581bed3f9d 1781 checksum: 4195f68e485f7d1a7c95cf0f126cc41f7223eeda2f1b46b893123c99b35bb76145c37d25e2ba452d54815ed69bb656c0ce9e343ffa984470c08afa6e82a4713f
1725 languageName: node 1782 languageName: node
1726 linkType: hard 1783 linkType: hard
1727 1784
1728"@humanwhocodes/module-importer@npm:^1.0.1": 1785"@humanwhocodes/module-importer@npm:^1.0.1":
1729 version: 1.0.1 1786 version: 1.0.1
1730 resolution: "@humanwhocodes/module-importer@npm:1.0.1" 1787 resolution: "@humanwhocodes/module-importer@npm:1.0.1"
1731 checksum: 5127055802733906004cf372457fadd0f3d800cfdd3dd39d2291e06f5c44ccc47daa2f22b9f483409f15b0a9ff5e1646deb5570ff43e08ef021f865e42b74608 1788 checksum: 909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529
1732 languageName: node 1789 languageName: node
1733 linkType: hard 1790 linkType: hard
1734 1791
1735"@humanwhocodes/object-schema@npm:^1.2.1": 1792"@humanwhocodes/object-schema@npm:^1.2.1":
1736 version: 1.2.1 1793 version: 1.2.1
1737 resolution: "@humanwhocodes/object-schema@npm:1.2.1" 1794 resolution: "@humanwhocodes/object-schema@npm:1.2.1"
1738 checksum: c860f96faaaaecd6c5c4ee6912f7c761579031b464c3cf55832e59e18b116968d89b570ef6a9a10b1670a67e7998a530c8c549b4a41b118153340772ad10cea9 1795 checksum: c3c35fdb70c04a569278351c75553e293ae339684ed75895edc79facc7276e351115786946658d78133130c0cca80e57e2203bc07f8fa7fe7980300e8deef7db
1739 languageName: node 1796 languageName: node
1740 linkType: hard 1797 linkType: hard
1741 1798
@@ -1749,7 +1806,7 @@ __metadata:
1749 strip-ansi-cjs: "npm:strip-ansi@^6.0.1" 1806 strip-ansi-cjs: "npm:strip-ansi@^6.0.1"
1750 wrap-ansi: "npm:^8.1.0" 1807 wrap-ansi: "npm:^8.1.0"
1751 wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" 1808 wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0"
1752 checksum: b9a4e369729f32ccce5b5764a574da6bbaee7e746c2d9cf35a3701c2907ba82f9bf456602ebd23df537b418fd611d54eb5c5a8ee7d8841dc5dc16c28ede0b258 1809 checksum: b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e
1753 languageName: node 1810 languageName: node
1754 linkType: hard 1811 linkType: hard
1755 1812
@@ -1760,21 +1817,21 @@ __metadata:
1760 "@jridgewell/set-array": "npm:^1.0.1" 1817 "@jridgewell/set-array": "npm:^1.0.1"
1761 "@jridgewell/sourcemap-codec": "npm:^1.4.10" 1818 "@jridgewell/sourcemap-codec": "npm:^1.4.10"
1762 "@jridgewell/trace-mapping": "npm:^0.3.9" 1819 "@jridgewell/trace-mapping": "npm:^0.3.9"
1763 checksum: b2c9c60a0de99e3cb296a90ef949c422537dce3c39f2b9c0451549a4b0eaecd58290c0e1ddc75538f38073dd477b728dedf3493f25c253946fcd52b0af06e561 1820 checksum: 82685c8735c63fe388badee45e2970a6bc83eed1c84d46d8652863bafeca22a6c6cc15812f5999a4535366f4668ccc9ba6d5c67dfb72e846fa8a063806f10afd
1764 languageName: node 1821 languageName: node
1765 linkType: hard 1822 linkType: hard
1766 1823
1767"@jridgewell/resolve-uri@npm:3.1.0": 1824"@jridgewell/resolve-uri@npm:3.1.0":
1768 version: 3.1.0 1825 version: 3.1.0
1769 resolution: "@jridgewell/resolve-uri@npm:3.1.0" 1826 resolution: "@jridgewell/resolve-uri@npm:3.1.0"
1770 checksum: 6b641bb7e25bc92a9848898cc91a77a390f393f086297ec2336d911387bdd708919c418e74a22732cfc21d0e7300b94306f437d2e9de5ab58b33ebc6c39d6f9d 1827 checksum: 78055e2526108331126366572045355051a930f017d1904a4f753d3f4acee8d92a14854948095626f6163cffc24ea4e3efa30637417bb866b84743dec7ef6fd9
1771 languageName: node 1828 languageName: node
1772 linkType: hard 1829 linkType: hard
1773 1830
1774"@jridgewell/set-array@npm:^1.0.1": 1831"@jridgewell/set-array@npm:^1.0.1":
1775 version: 1.1.2 1832 version: 1.1.2
1776 resolution: "@jridgewell/set-array@npm:1.1.2" 1833 resolution: "@jridgewell/set-array@npm:1.1.2"
1777 checksum: e7e3f00d10622a6e48cc59041537f99972ed110dca8bfdf575be101c5920d4e4d4fab315d601df9aebbd6b97f4ce857f0347902701ed034a0627ca554b64db0f 1834 checksum: bc7ab4c4c00470de4e7562ecac3c0c84f53e7ee8a711e546d67c47da7febe7c45cd67d4d84ee3c9b2c05ae8e872656cdded8a707a283d30bd54fbc65aef821ab
1778 languageName: node 1835 languageName: node
1779 linkType: hard 1836 linkType: hard
1780 1837
@@ -1784,14 +1841,14 @@ __metadata:
1784 dependencies: 1841 dependencies:
1785 "@jridgewell/gen-mapping": "npm:^0.3.0" 1842 "@jridgewell/gen-mapping": "npm:^0.3.0"
1786 "@jridgewell/trace-mapping": "npm:^0.3.9" 1843 "@jridgewell/trace-mapping": "npm:^0.3.9"
1787 checksum: a74e3e9d227c24e0918f10cf9d5cce54dc7a8eb3bca07cc4b0a5969baeb026d112511d94dc5822e3c502fbe2ee98ad0a985c29f158ceccb61798b113c1e0c74e 1844 checksum: f341e3ed1e9dfe5ae95201e9e820bee7c0518f20f2831b9964ce6c4bfe59477fb7e3257a45fac193cb4aea0019f0a4f8ed68abb12fd3956610317946f7341e3f
1788 languageName: node 1845 languageName: node
1789 linkType: hard 1846 linkType: hard
1790 1847
1791"@jridgewell/sourcemap-codec@npm:1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.10": 1848"@jridgewell/sourcemap-codec@npm:1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.10":
1792 version: 1.4.14 1849 version: 1.4.14
1793 resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" 1850 resolution: "@jridgewell/sourcemap-codec@npm:1.4.14"
1794 checksum: 2147ea75c966fed8a7d9ed6679b7e8c380fa790a9bea5a64f4ec1c26d24e44b461aa60fc3b228cea03a46708d9d1bcf19508035bf27ad5e8f63d0998ed1d1117 1851 checksum: 3fbaff1387c1338b097eeb6ff92890d7838f7de0dde259e4983763b44540bfd5ca6a1f7644dc8ad003a57f7e80670d5b96a8402f1386ba9aee074743ae9bad51
1795 languageName: node 1852 languageName: node
1796 linkType: hard 1853 linkType: hard
1797 1854
@@ -1801,26 +1858,26 @@ __metadata:
1801 dependencies: 1858 dependencies:
1802 "@jridgewell/resolve-uri": "npm:3.1.0" 1859 "@jridgewell/resolve-uri": "npm:3.1.0"
1803 "@jridgewell/sourcemap-codec": "npm:1.4.14" 1860 "@jridgewell/sourcemap-codec": "npm:1.4.14"
1804 checksum: 56cd5d76d2717f31ccab224094d2cd92918aa612a070f63738160e857045bde2bd9b247aba6147f3ed15b9dd056b4231c6b5f6d6cc7e624f1ad37bda1d49365c 1861 checksum: e5045775f076022b6c7cc64a7b55742faa5442301cb3389fd0e6712fafc46a2bb13c68fa1ffaf7b8bb665a91196f050b4115885fc802094ebc06a1cf665935ac
1805 languageName: node 1862 languageName: node
1806 linkType: hard 1863 linkType: hard
1807 1864
1808"@lezer/common@npm:^1.0.0, @lezer/common@npm:^1.0.2, @lezer/common@npm:^1.0.3": 1865"@lezer/common@npm:^1.0.0, @lezer/common@npm:^1.0.2, @lezer/common@npm:^1.0.4":
1809 version: 1.0.3 1866 version: 1.0.4
1810 resolution: "@lezer/common@npm:1.0.3" 1867 resolution: "@lezer/common@npm:1.0.4"
1811 checksum: 04a7c163ab7ebebf6497799e6c327f64e9da442ed045bae3e59201918b96f8d01c2ad9263487d935e4d0a65fcafc3628cbb71d448377b1086f7f6db7323ff54d 1868 checksum: 7beb82f38e1d370b587c3df84d2147b4197dc509c43c1979eb861c9c5852f5c34ec30939272c552eb0542d45482000454d62a8c725885472edaf715d7b01a908
1812 languageName: node 1869 languageName: node
1813 linkType: hard 1870 linkType: hard
1814 1871
1815"@lezer/generator@npm:^1.3.0": 1872"@lezer/generator@npm:^1.5.0":
1816 version: 1.3.0 1873 version: 1.5.0
1817 resolution: "@lezer/generator@npm:1.3.0" 1874 resolution: "@lezer/generator@npm:1.5.0"
1818 dependencies: 1875 dependencies:
1819 "@lezer/common": "npm:^1.0.2" 1876 "@lezer/common": "npm:^1.0.2"
1820 "@lezer/lr": "npm:^1.3.0" 1877 "@lezer/lr": "npm:^1.3.0"
1821 bin: 1878 bin:
1822 lezer-generator: dist/lezer-generator.cjs 1879 lezer-generator: src/lezer-generator.cjs
1823 checksum: 42da63930b6a7724e24b30141b958bb3016357bc50bb0dcc468f224a329110dd82d9423589d038d98e895abc00babc8ddeb1f805e9d1d18e780996f20e3d04a1 1880 checksum: 2e92bca894b93158d400b71dcfe1d70d39874d1f179e83dcad5542b0014b9462c083423cf1fa24e7ddf127e045426f095d0e65662238cce7d8f6f54cc2b2f1bf
1824 languageName: node 1881 languageName: node
1825 linkType: hard 1882 linkType: hard
1826 1883
@@ -1829,36 +1886,37 @@ __metadata:
1829 resolution: "@lezer/highlight@npm:1.1.6" 1886 resolution: "@lezer/highlight@npm:1.1.6"
1830 dependencies: 1887 dependencies:
1831 "@lezer/common": "npm:^1.0.0" 1888 "@lezer/common": "npm:^1.0.0"
1832 checksum: fc872ec55c6109f1fff8a8653c22ba46454ba09abb3df4bfac899882329fa3f26240332c781326f94f9baadceb3f174b1d35ec5e1e9dc5fcb883725e8c8fcc19 1889 checksum: a67a727b83ee03774e696f06fb0e966de9c743be76b4281830b187b2d3e160fd356d4bb4519fd21af7e094d0a827761587a46e105be461883aac8531b665b816
1833 languageName: node 1890 languageName: node
1834 linkType: hard 1891 linkType: hard
1835 1892
1836"@lezer/lr@npm:^1.0.0, @lezer/lr@npm:^1.3.0, @lezer/lr@npm:^1.3.6": 1893"@lezer/lr@npm:^1.0.0, @lezer/lr@npm:^1.3.0, @lezer/lr@npm:^1.3.10":
1837 version: 1.3.6 1894 version: 1.3.10
1838 resolution: "@lezer/lr@npm:1.3.6" 1895 resolution: "@lezer/lr@npm:1.3.10"
1839 dependencies: 1896 dependencies:
1840 "@lezer/common": "npm:^1.0.0" 1897 "@lezer/common": "npm:^1.0.0"
1841 checksum: 91f07a42c3fbe9a4e5d964f402a20496a06894fe468764d7629c880b27dfbd7d6a8fe0b6a15bc45ce5a3dc448c20b06d767f6997747d4277d59474300fb522bc 1898 checksum: a68ad872f03c612c304df308f6e1527ee08a0577d8c74048640caae3658e9f09d23b13d104da9bc2f99c9b22fc98bf9ff1111defba587e3b32137fb9c1d690dd
1842 languageName: node 1899 languageName: node
1843 linkType: hard 1900 linkType: hard
1844 1901
1845"@material-icons/svg@npm:^1.0.33": 1902"@material-icons/svg@npm:^1.0.33":
1846 version: 1.0.33 1903 version: 1.0.33
1847 resolution: "@material-icons/svg@npm:1.0.33" 1904 resolution: "@material-icons/svg@npm:1.0.33"
1848 checksum: eef7ac5253cf7276639b2d585d2c7e363ec9ea0584a8c68f2d0f8389748eef6f595cd45a9122712c5c48593200829fc3b9bb1eec23bf256b44db282a9c4c8f74 1905 checksum: 5205b710f90283d5184ad542b05d84d0a4ba494daddc3de68de92d81ac09548a64e417d64502eb30537c19a5aff758e227b352faa86a2944c5388712b63e09e7
1849 languageName: node 1906 languageName: node
1850 linkType: hard 1907 linkType: hard
1851 1908
1852"@mui/base@npm:5.0.0-beta.4": 1909"@mui/base@npm:5.0.0-beta.14":
1853 version: 5.0.0-beta.4 1910 version: 5.0.0-beta.14
1854 resolution: "@mui/base@npm:5.0.0-beta.4" 1911 resolution: "@mui/base@npm:5.0.0-beta.14"
1855 dependencies: 1912 dependencies:
1856 "@babel/runtime": "npm:^7.21.0" 1913 "@babel/runtime": "npm:^7.22.10"
1857 "@emotion/is-prop-valid": "npm:^1.2.1" 1914 "@emotion/is-prop-valid": "npm:^1.2.1"
1915 "@floating-ui/react-dom": "npm:^2.0.1"
1858 "@mui/types": "npm:^7.2.4" 1916 "@mui/types": "npm:^7.2.4"
1859 "@mui/utils": "npm:^5.13.1" 1917 "@mui/utils": "npm:^5.14.8"
1860 "@popperjs/core": "npm:^2.11.8" 1918 "@popperjs/core": "npm:^2.11.8"
1861 clsx: "npm:^1.2.1" 1919 clsx: "npm:^2.0.0"
1862 prop-types: "npm:^15.8.1" 1920 prop-types: "npm:^15.8.1"
1863 react-is: "npm:^18.2.0" 1921 react-is: "npm:^18.2.0"
1864 peerDependencies: 1922 peerDependencies:
@@ -1868,22 +1926,22 @@ __metadata:
1868 peerDependenciesMeta: 1926 peerDependenciesMeta:
1869 "@types/react": 1927 "@types/react":
1870 optional: true 1928 optional: true
1871 checksum: e1658227e72881f7b5d34b56bf4dc475f1344efd1ce6c6535dab181d7305e0789b1d58180ac66973c88e1dd64c11c845fb575bc90d6f3ef8c8899cda699559e9 1929 checksum: 9e1bfb7a45b0fd2e39f6175fc3a792bee3344b75903e0de965f12f8f3703efdeb9a06f8712a10de1cea1fe9c438820b98d21f9c32968cfcbe09d720a148b1d19
1872 languageName: node 1930 languageName: node
1873 linkType: hard 1931 linkType: hard
1874 1932
1875"@mui/core-downloads-tracker@npm:^5.13.4": 1933"@mui/core-downloads-tracker@npm:^5.14.8":
1876 version: 5.13.4 1934 version: 5.14.8
1877 resolution: "@mui/core-downloads-tracker@npm:5.13.4" 1935 resolution: "@mui/core-downloads-tracker@npm:5.14.8"
1878 checksum: 77457f55fc547a0f2080c787cfbfb1178987743bea5675c45d2aea99b4bcacbd5f893928b0379c8da1f97f89a471a52a7318a073a202f9fe429b2a34ca448774 1936 checksum: 93d22affbc826e8e60c190548bb178bf1f616c21e1d3cbc8bef097fdefc0fd4f4788e7327063205816536886d0131064f94ff3d42eaf957a46f2234be6e1d040
1879 languageName: node 1937 languageName: node
1880 linkType: hard 1938 linkType: hard
1881 1939
1882"@mui/icons-material@npm:5.11.16": 1940"@mui/icons-material@npm:5.14.8":
1883 version: 5.11.16 1941 version: 5.14.8
1884 resolution: "@mui/icons-material@npm:5.11.16" 1942 resolution: "@mui/icons-material@npm:5.14.8"
1885 dependencies: 1943 dependencies:
1886 "@babel/runtime": "npm:^7.21.0" 1944 "@babel/runtime": "npm:^7.22.10"
1887 peerDependencies: 1945 peerDependencies:
1888 "@mui/material": ^5.0.0 1946 "@mui/material": ^5.0.0
1889 "@types/react": ^17.0.0 || ^18.0.0 1947 "@types/react": ^17.0.0 || ^18.0.0
@@ -1891,22 +1949,22 @@ __metadata:
1891 peerDependenciesMeta: 1949 peerDependenciesMeta:
1892 "@types/react": 1950 "@types/react":
1893 optional: true 1951 optional: true
1894 checksum: b630053414ec48fc66b316822b92d3c18946906c7f8dac710a59ecea59a0db6258903de677ff4e6737f1a42308d45b8317dc530e526fef477ede184a72050be6 1952 checksum: 212e5563d3aa1918ec27dd4d5e4134e043bd002b078e2802e39841c1cce31e1eb2f5fbf13529b86995f402edbfc5f9cd9cb62625a43f8565928860eac537919f
1895 languageName: node 1953 languageName: node
1896 linkType: hard 1954 linkType: hard
1897 1955
1898"@mui/material@npm:5.13.5": 1956"@mui/material@npm:5.14.8":
1899 version: 5.13.5 1957 version: 5.14.8
1900 resolution: "@mui/material@npm:5.13.5" 1958 resolution: "@mui/material@npm:5.14.8"
1901 dependencies: 1959 dependencies:
1902 "@babel/runtime": "npm:^7.21.0" 1960 "@babel/runtime": "npm:^7.22.10"
1903 "@mui/base": "npm:5.0.0-beta.4" 1961 "@mui/base": "npm:5.0.0-beta.14"
1904 "@mui/core-downloads-tracker": "npm:^5.13.4" 1962 "@mui/core-downloads-tracker": "npm:^5.14.8"
1905 "@mui/system": "npm:^5.13.5" 1963 "@mui/system": "npm:^5.14.8"
1906 "@mui/types": "npm:^7.2.4" 1964 "@mui/types": "npm:^7.2.4"
1907 "@mui/utils": "npm:^5.13.1" 1965 "@mui/utils": "npm:^5.14.8"
1908 "@types/react-transition-group": "npm:^4.4.6" 1966 "@types/react-transition-group": "npm:^4.4.6"
1909 clsx: "npm:^1.2.1" 1967 clsx: "npm:^2.0.0"
1910 csstype: "npm:^3.1.2" 1968 csstype: "npm:^3.1.2"
1911 prop-types: "npm:^15.8.1" 1969 prop-types: "npm:^15.8.1"
1912 react-is: "npm:^18.2.0" 1970 react-is: "npm:^18.2.0"
@@ -1924,16 +1982,16 @@ __metadata:
1924 optional: true 1982 optional: true
1925 "@types/react": 1983 "@types/react":
1926 optional: true 1984 optional: true
1927 checksum: 84a32505ce224507820c5364627a3879b2ae96bda1235ee482c549e097af6df6918ac2c3bc39b52d7a673d30e93e1bafe6357691798c0081222135e57c1d7884 1985 checksum: b26fb4966c005cb6bbc6195d0b22f254bf8f34d81e47ea10f459c06b893122958b16f438102ce56f105abc89f21b5705cad0b13d8d4401f2c8f672ed61519861
1928 languageName: node 1986 languageName: node
1929 linkType: hard 1987 linkType: hard
1930 1988
1931"@mui/private-theming@npm:^5.13.1": 1989"@mui/private-theming@npm:^5.14.8":
1932 version: 5.13.1 1990 version: 5.14.8
1933 resolution: "@mui/private-theming@npm:5.13.1" 1991 resolution: "@mui/private-theming@npm:5.14.8"
1934 dependencies: 1992 dependencies:
1935 "@babel/runtime": "npm:^7.21.0" 1993 "@babel/runtime": "npm:^7.22.10"
1936 "@mui/utils": "npm:^5.13.1" 1994 "@mui/utils": "npm:^5.14.8"
1937 prop-types: "npm:^15.8.1" 1995 prop-types: "npm:^15.8.1"
1938 peerDependencies: 1996 peerDependencies:
1939 "@types/react": ^17.0.0 || ^18.0.0 1997 "@types/react": ^17.0.0 || ^18.0.0
@@ -1941,15 +1999,15 @@ __metadata:
1941 peerDependenciesMeta: 1999 peerDependenciesMeta:
1942 "@types/react": 2000 "@types/react":
1943 optional: true 2001 optional: true
1944 checksum: 122b4b3e46ac38d86554c699f6af3c24ebc79768517374b52ad27bc1d34d0deec6fcd06ba7f2f6159cc9490596c34ca9bbb90fb58e279db06b99bd837a777738 2002 checksum: 5d92f9afaf31ff2610cc455277f3ff1be5ce5de5b40d0747a60de7fef7ec82127d167cade843054318885dec634a1fe070757f269045c5fd9ac3610be9ede31a
1945 languageName: node 2003 languageName: node
1946 linkType: hard 2004 linkType: hard
1947 2005
1948"@mui/styled-engine@npm:^5.13.2": 2006"@mui/styled-engine@npm:^5.14.8":
1949 version: 5.13.2 2007 version: 5.14.8
1950 resolution: "@mui/styled-engine@npm:5.13.2" 2008 resolution: "@mui/styled-engine@npm:5.14.8"
1951 dependencies: 2009 dependencies:
1952 "@babel/runtime": "npm:^7.21.0" 2010 "@babel/runtime": "npm:^7.22.10"
1953 "@emotion/cache": "npm:^11.11.0" 2011 "@emotion/cache": "npm:^11.11.0"
1954 csstype: "npm:^3.1.2" 2012 csstype: "npm:^3.1.2"
1955 prop-types: "npm:^15.8.1" 2013 prop-types: "npm:^15.8.1"
@@ -1962,20 +2020,20 @@ __metadata:
1962 optional: true 2020 optional: true
1963 "@emotion/styled": 2021 "@emotion/styled":
1964 optional: true 2022 optional: true
1965 checksum: 4a2b47893bc52e0321e1dfd034999bd817820f6bff53ccbb714174f620978443c1e09dad4773ab7269a40a66550256792f25a430e0f3176b624e3a74987b5ec2 2023 checksum: d1848e34239a2fa4c833d27816845f730cf57481f815212094bcb5fd9f2040efd1e790de7f7b867bfdd6de3d7a5f9406607f853db399129d2789e6a408cb7f87
1966 languageName: node 2024 languageName: node
1967 linkType: hard 2025 linkType: hard
1968 2026
1969"@mui/system@npm:^5.13.5": 2027"@mui/system@npm:^5.14.8":
1970 version: 5.13.5 2028 version: 5.14.8
1971 resolution: "@mui/system@npm:5.13.5" 2029 resolution: "@mui/system@npm:5.14.8"
1972 dependencies: 2030 dependencies:
1973 "@babel/runtime": "npm:^7.21.0" 2031 "@babel/runtime": "npm:^7.22.10"
1974 "@mui/private-theming": "npm:^5.13.1" 2032 "@mui/private-theming": "npm:^5.14.8"
1975 "@mui/styled-engine": "npm:^5.13.2" 2033 "@mui/styled-engine": "npm:^5.14.8"
1976 "@mui/types": "npm:^7.2.4" 2034 "@mui/types": "npm:^7.2.4"
1977 "@mui/utils": "npm:^5.13.1" 2035 "@mui/utils": "npm:^5.14.8"
1978 clsx: "npm:^1.2.1" 2036 clsx: "npm:^2.0.0"
1979 csstype: "npm:^3.1.2" 2037 csstype: "npm:^3.1.2"
1980 prop-types: "npm:^15.8.1" 2038 prop-types: "npm:^15.8.1"
1981 peerDependencies: 2039 peerDependencies:
@@ -1990,7 +2048,7 @@ __metadata:
1990 optional: true 2048 optional: true
1991 "@types/react": 2049 "@types/react":
1992 optional: true 2050 optional: true
1993 checksum: 09c215386c094a2708441a4f0ae7003e30e43331c9f6cf0964c25946a7ad17f7371062dc9ce00c7642f3d374b6eaf583bec8737d07beb2d6bd9e9aecf4b62565 2051 checksum: 3333b2a8af50c3b9cbf8a4955af911635a49151a2ff75f32cd677becaa69d6a3a9814ae798e3aeb4c439ea5f1e24c66747f2434ddab70f7ff690700e69417bdb
1994 languageName: node 2052 languageName: node
1995 linkType: hard 2053 linkType: hard
1996 2054
@@ -2002,22 +2060,40 @@ __metadata:
2002 peerDependenciesMeta: 2060 peerDependenciesMeta:
2003 "@types/react": 2061 "@types/react":
2004 optional: true 2062 optional: true
2005 checksum: 651ad27d90e052ede4698bea349728bfdd4c415aebcf718e4fb401a281956a33c1748743fe70e5664e75585db94555077658ccf33e6a194b7ee26e44d8e6da8e 2063 checksum: 17411effd184eff34d6a1a55b2249c7e1ef195bb30c48154f0b16fdce428ff55be4ec5dde8b4a556c01eda2d34e3dcc18d925f8fdee606f5bc15f91167f0ecbc
2006 languageName: node 2064 languageName: node
2007 linkType: hard 2065 linkType: hard
2008 2066
2009"@mui/utils@npm:^5.13.1": 2067"@mui/utils@npm:^5.13.6, @mui/utils@npm:^5.14.8":
2010 version: 5.13.1 2068 version: 5.14.8
2011 resolution: "@mui/utils@npm:5.13.1" 2069 resolution: "@mui/utils@npm:5.14.8"
2012 dependencies: 2070 dependencies:
2013 "@babel/runtime": "npm:^7.21.0" 2071 "@babel/runtime": "npm:^7.22.10"
2014 "@types/prop-types": "npm:^15.7.5" 2072 "@types/prop-types": "npm:^15.7.5"
2015 "@types/react-is": "npm:^18.2.0" 2073 "@types/react-is": "npm:^18.2.1"
2016 prop-types: "npm:^15.8.1" 2074 prop-types: "npm:^15.8.1"
2017 react-is: "npm:^18.2.0" 2075 react-is: "npm:^18.2.0"
2018 peerDependencies: 2076 peerDependencies:
2019 react: ^17.0.0 || ^18.0.0 2077 react: ^17.0.0 || ^18.0.0
2020 checksum: 37870c7e05bba7b210466483541b948dd2d8b128ef6e1f025d7694bc23fef2a7cbae547df151f82d67b35c741086c198767ea78b2be66a05b7b8c2d4eab20b98 2078 checksum: 1949563a793a36eb31df0bc2f7cad3cffd5537cd18a130d4245e00e9f83deb9e8dccb99c530aec661a9e62262b219a4b19f0cfdaaf09ab31f3df2f28fb7f1201
2079 languageName: node
2080 linkType: hard
2081
2082"@mui/x-data-grid@npm:^6.10.0 <6.10.1":
2083 version: 6.10.0
2084 resolution: "@mui/x-data-grid@npm:6.10.0"
2085 dependencies:
2086 "@babel/runtime": "npm:^7.22.5"
2087 "@mui/utils": "npm:^5.13.6"
2088 clsx: "npm:^1.2.1"
2089 prop-types: "npm:^15.8.1"
2090 reselect: "npm:^4.1.8"
2091 peerDependencies:
2092 "@mui/material": ^5.4.1
2093 "@mui/system": ^5.4.1
2094 react: ^17.0.0 || ^18.0.0
2095 react-dom: ^17.0.0 || ^18.0.0
2096 checksum: 43151b496d25ec5248dbf2f14977eed7d4df34673660a72e754845ada7f46670195b8d6eed821c12a1b5db202a699a3d31b5bcd2ec393292b7fd76a6fdf0570b
2021 languageName: node 2097 languageName: node
2022 linkType: hard 2098 linkType: hard
2023 2099
@@ -2027,14 +2103,14 @@ __metadata:
2027 dependencies: 2103 dependencies:
2028 "@nodelib/fs.stat": "npm:2.0.5" 2104 "@nodelib/fs.stat": "npm:2.0.5"
2029 run-parallel: "npm:^1.1.9" 2105 run-parallel: "npm:^1.1.9"
2030 checksum: 5f309a3b375738e97d4f3cf73ace218690d5a1cfdf98202c6b46bfda61f4317e0e0036c81b040b147e7d1632c7da2e2462e47660de428917cacaebfa2a0a20c7 2106 checksum: 732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb
2031 languageName: node 2107 languageName: node
2032 linkType: hard 2108 linkType: hard
2033 2109
2034"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": 2110"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2":
2035 version: 2.0.5 2111 version: 2.0.5
2036 resolution: "@nodelib/fs.stat@npm:2.0.5" 2112 resolution: "@nodelib/fs.stat@npm:2.0.5"
2037 checksum: 594d04bcf578d15af65b510dbd9c0dc2458d2a7ef1b403924f22f64d397e965efa8c6854b3fee3395244ae642e28d896ab9d04c5ee5c46ef4fda1d48eaaef19c 2113 checksum: 88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d
2038 languageName: node 2114 languageName: node
2039 linkType: hard 2115 linkType: hard
2040 2116
@@ -2044,7 +2120,7 @@ __metadata:
2044 dependencies: 2120 dependencies:
2045 "@nodelib/fs.scandir": "npm:2.1.5" 2121 "@nodelib/fs.scandir": "npm:2.1.5"
2046 fastq: "npm:^1.6.0" 2122 fastq: "npm:^1.6.0"
2047 checksum: 3542284aa2d6e313cfd4ae40a2502b53e1f35da6f4f9890422aad018c04866f6bfb96c4105e23dbd9fb93cfc630cc607777df658a3a525d63a3bfb9bcb2b0f21 2123 checksum: db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1
2048 languageName: node 2124 languageName: node
2049 linkType: hard 2125 linkType: hard
2050 2126
@@ -2053,14 +2129,14 @@ __metadata:
2053 resolution: "@npmcli/fs@npm:3.1.0" 2129 resolution: "@npmcli/fs@npm:3.1.0"
2054 dependencies: 2130 dependencies:
2055 semver: "npm:^7.3.5" 2131 semver: "npm:^7.3.5"
2056 checksum: c17d9f6a57aada6db66302ad0c02ad5df2984333385ba0a7883718cbc513f81ce2d4e41d3b949b05c387c2a49a2fdbfa0808b3cc640d0c1b9dce72a864811a30 2132 checksum: 162b4a0b8705cd6f5c2470b851d1dc6cd228c86d2170e1769d738c1fbb69a87160901411c3c035331e9e99db72f1f1099a8b734bf1637cc32b9a5be1660e4e1e
2057 languageName: node 2133 languageName: node
2058 linkType: hard 2134 linkType: hard
2059 2135
2060"@pkgjs/parseargs@npm:^0.11.0": 2136"@pkgjs/parseargs@npm:^0.11.0":
2061 version: 0.11.0 2137 version: 0.11.0
2062 resolution: "@pkgjs/parseargs@npm:0.11.0" 2138 resolution: "@pkgjs/parseargs@npm:0.11.0"
2063 checksum: 9e828530eb8d3e5370972114de393d9f9cfd368f8a7b541fd0d4497c2f046245e907e05f4e07259bdf91ade8f7a0806f36a67099fbf20f62496dc00b843e2252 2139 checksum: 5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd
2064 languageName: node 2140 languageName: node
2065 linkType: hard 2141 linkType: hard
2066 2142
@@ -2074,14 +2150,14 @@ __metadata:
2074 picocolors: "npm:^1.0.0" 2150 picocolors: "npm:^1.0.0"
2075 tiny-glob: "npm:^0.2.9" 2151 tiny-glob: "npm:^0.2.9"
2076 tslib: "npm:^2.4.0" 2152 tslib: "npm:^2.4.0"
2077 checksum: aa2434a9fb5f4e9c594575186d1251b3acc8f05c90dfa1e7b016340064235600f64d4e684775a5594c269be5d70ba10d41ca48660683a7dd7753707bad6e9478 2153 checksum: 50c2480c3580c0f75b9325271deeb4f4cb24f6a29f1ebc5a7de0c6991380e23625fd554ecdbc7d7e93ad6dab92532a254f7490433cf2b8f1b18d75c9e01636ea
2078 languageName: node 2154 languageName: node
2079 linkType: hard 2155 linkType: hard
2080 2156
2081"@popperjs/core@npm:^2.11.8": 2157"@popperjs/core@npm:^2.11.8":
2082 version: 2.11.8 2158 version: 2.11.8
2083 resolution: "@popperjs/core@npm:2.11.8" 2159 resolution: "@popperjs/core@npm:2.11.8"
2084 checksum: 5c180df0c3fab5f4ebb81c79898186c0df3e13d72e27fe49d2a80873a27d8e12a16866d70da648d3d34caebce638fdb1a0730d1c1c5a8a40451db0160b92b375 2160 checksum: 4681e682abc006d25eb380d0cf3efc7557043f53b6aea7a5057d0d1e7df849a00e281cd8ea79c902a35a414d7919621fc2ba293ecec05f413598e0b23d5a1e63
2085 languageName: node 2161 languageName: node
2086 linkType: hard 2162 linkType: hard
2087 2163
@@ -2089,71 +2165,84 @@ __metadata:
2089 version: 0.0.0-use.local 2165 version: 0.0.0-use.local
2090 resolution: "@refinery/frontend@workspace:subprojects/frontend" 2166 resolution: "@refinery/frontend@workspace:subprojects/frontend"
2091 dependencies: 2167 dependencies:
2092 "@codemirror/autocomplete": "npm:^6.8.0" 2168 "@codemirror/autocomplete": "npm:^6.9.0"
2093 "@codemirror/commands": "npm:^6.2.4" 2169 "@codemirror/commands": "npm:^6.2.5"
2094 "@codemirror/language": "npm:^6.8.0" 2170 "@codemirror/language": "npm:^6.9.0"
2095 "@codemirror/lint": "npm:^6.2.2" 2171 "@codemirror/lint": "npm:^6.4.1"
2096 "@codemirror/search": "npm:^6.5.0" 2172 "@codemirror/search": "npm:^6.5.2"
2097 "@codemirror/state": "npm:^6.2.1" 2173 "@codemirror/state": "npm:^6.2.1"
2098 "@codemirror/view": "npm:^6.13.2" 2174 "@codemirror/view": "npm:^6.18.1"
2099 "@emotion/react": "npm:^11.11.1" 2175 "@emotion/react": "npm:^11.11.1"
2100 "@emotion/styled": "npm:^11.11.0" 2176 "@emotion/styled": "npm:^11.11.0"
2101 "@fontsource-variable/inter": "npm:^5.0.3" 2177 "@fontsource-variable/jetbrains-mono": "npm:^5.0.13"
2102 "@fontsource-variable/jetbrains-mono": "npm:^5.0.3" 2178 "@fontsource-variable/open-sans": "npm:^5.0.13"
2103 "@lezer/common": "npm:^1.0.3" 2179 "@hpcc-js/wasm": "npm:^2.13.1"
2104 "@lezer/generator": "npm:^1.3.0" 2180 "@lezer/common": "npm:^1.0.4"
2181 "@lezer/generator": "npm:^1.5.0"
2105 "@lezer/highlight": "npm:^1.1.6" 2182 "@lezer/highlight": "npm:^1.1.6"
2106 "@lezer/lr": "npm:^1.3.6" 2183 "@lezer/lr": "npm:^1.3.10"
2107 "@material-icons/svg": "npm:^1.0.33" 2184 "@material-icons/svg": "npm:^1.0.33"
2108 "@mui/icons-material": "npm:5.11.16" 2185 "@mui/icons-material": "npm:5.14.8"
2109 "@mui/material": "npm:5.13.5" 2186 "@mui/material": "npm:5.14.8"
2110 "@types/eslint": "npm:^8.40.2" 2187 "@mui/system": "npm:^5.14.8"
2188 "@mui/x-data-grid": "npm:^6.10.0 <6.10.1"
2189 "@types/d3": "npm:^7.4.0"
2190 "@types/d3-graphviz": "npm:^2.6.7"
2191 "@types/d3-selection": "npm:^3.0.6"
2192 "@types/d3-zoom": "npm:^3.0.4"
2193 "@types/eslint": "npm:^8.44.2"
2111 "@types/html-minifier-terser": "npm:^7.0.0" 2194 "@types/html-minifier-terser": "npm:^7.0.0"
2112 "@types/lodash-es": "npm:^4.17.7" 2195 "@types/lodash-es": "npm:^4.17.9"
2113 "@types/micromatch": "npm:^4.0.2" 2196 "@types/micromatch": "npm:^4.0.2"
2114 "@types/ms": "npm:^0.7.31" 2197 "@types/ms": "npm:^0.7.31"
2115 "@types/node": "npm:^18.16.18" 2198 "@types/node": "npm:^18.17.15"
2116 "@types/prettier": "npm:^2.7.3" 2199 "@types/pnpapi": "npm:^0.0.2"
2117 "@types/react": "npm:^18.2.12" 2200 "@types/react": "npm:^18.2.21"
2118 "@types/react-dom": "npm:^18.2.5" 2201 "@types/react-dom": "npm:^18.2.7"
2119 "@typescript-eslint/eslint-plugin": "npm:^5.59.11" 2202 "@typescript-eslint/eslint-plugin": "npm:^6.7.0"
2120 "@typescript-eslint/parser": "npm:^5.59.11" 2203 "@typescript-eslint/parser": "npm:^6.7.0"
2121 "@vitejs/plugin-react-swc": "npm:^3.3.2" 2204 "@vitejs/plugin-react-swc": "npm:^3.3.2"
2122 "@xstate/cli": "npm:^0.5.1" 2205 "@xstate/cli": "npm:^0.5.2"
2123 ansi-styles: "npm:^6.2.1" 2206 ansi-styles: "npm:^6.2.1"
2124 cross-env: "npm:^7.0.3" 2207 cross-env: "npm:^7.0.3"
2125 csstype: "npm:^3.1.2" 2208 csstype: "npm:^3.1.2"
2209 d3: "npm:^7.8.5"
2210 d3-graphviz: "patch:d3-graphviz@npm%3A5.1.0#~/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch"
2211 d3-selection: "npm:^3.0.0"
2212 d3-zoom: "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch"
2126 escape-string-regexp: "npm:^5.0.0" 2213 escape-string-regexp: "npm:^5.0.0"
2127 eslint: "npm:^8.43.0" 2214 eslint: "npm:^8.49.0"
2128 eslint-config-airbnb: "npm:^19.0.4" 2215 eslint-config-airbnb: "npm:^19.0.4"
2129 eslint-config-airbnb-typescript: "npm:^17.0.0" 2216 eslint-config-airbnb-typescript: "npm:^17.1.0"
2130 eslint-config-prettier: "npm:^8.8.0" 2217 eslint-config-prettier: "npm:^9.0.0"
2131 eslint-import-resolver-typescript: "npm:^3.5.5" 2218 eslint-import-resolver-typescript: "npm:^3.6.0"
2132 eslint-plugin-import: "npm:^2.27.5" 2219 eslint-plugin-import: "npm:^2.28.1"
2133 eslint-plugin-jsx-a11y: "npm:^6.7.1" 2220 eslint-plugin-jsx-a11y: "npm:^6.7.1"
2134 eslint-plugin-mobx: "npm:^0.0.9" 2221 eslint-plugin-mobx: "npm:^0.0.9"
2135 eslint-plugin-prettier: "npm:^4.2.1" 2222 eslint-plugin-prettier: "npm:^5.0.0"
2136 eslint-plugin-react: "npm:^7.32.2" 2223 eslint-plugin-react: "npm:^7.33.2"
2137 eslint-plugin-react-hooks: "npm:^4.6.0" 2224 eslint-plugin-react-hooks: "npm:^4.6.0"
2138 html-minifier-terser: "npm:^7.2.0" 2225 html-minifier-terser: "npm:^7.2.0"
2139 lodash-es: "npm:^4.17.21" 2226 lodash-es: "npm:^4.17.21"
2140 loglevel: "npm:^1.8.1" 2227 loglevel: "npm:^1.8.1"
2141 loglevel-plugin-prefix: "npm:^0.8.4" 2228 loglevel-plugin-prefix: "npm:^0.8.4"
2142 micromatch: "npm:^4.0.5" 2229 micromatch: "npm:^4.0.5"
2143 mobx: "npm:^6.9.0" 2230 mobx: "npm:^6.10.2"
2144 mobx-react-lite: "npm:^3.4.3" 2231 mobx-react-lite: "npm:^4.0.4"
2145 ms: "npm:^2.1.3" 2232 ms: "npm:^2.1.3"
2146 nanoid: "npm:^4.0.2" 2233 nanoid: "npm:^4.0.2"
2147 notistack: "npm:^3.0.1" 2234 notistack: "npm:^3.0.1"
2148 prettier: "npm:^2.8.8" 2235 pnpapi: "npm:^0.0.0"
2236 prettier: "npm:^3.0.3"
2149 react: "npm:^18.2.0" 2237 react: "npm:^18.2.0"
2150 react-dom: "npm:^18.2.0" 2238 react-dom: "npm:^18.2.0"
2151 typescript: "npm:5.1.3" 2239 react-resize-detector: "npm:^9.1.0"
2152 vite: "npm:^4.3.9" 2240 typescript: "npm:5.2.2"
2153 vite-plugin-pwa: "npm:^0.16.4" 2241 vite: "npm:^4.4.9"
2242 vite-plugin-pwa: "npm:^0.16.5"
2154 workbox-window: "npm:^7.0.0" 2243 workbox-window: "npm:^7.0.0"
2155 xstate: "npm:^4.37.2" 2244 xstate: "npm:^4.38.2"
2156 zod: "npm:^3.21.4" 2245 zod: "npm:^3.22.2"
2157 languageName: unknown 2246 languageName: unknown
2158 linkType: soft 2247 linkType: soft
2159 2248
@@ -2161,8 +2250,8 @@ __metadata:
2161 version: 0.0.0-use.local 2250 version: 0.0.0-use.local
2162 resolution: "@refinery/root@workspace:." 2251 resolution: "@refinery/root@workspace:."
2163 dependencies: 2252 dependencies:
2164 eslint: "npm:^8.43.0" 2253 eslint: "npm:^8.49.0"
2165 typescript: "npm:5.1.3" 2254 typescript: "npm:5.2.2"
2166 languageName: unknown 2255 languageName: unknown
2167 linkType: soft 2256 linkType: soft
2168 2257
@@ -2179,7 +2268,7 @@ __metadata:
2179 peerDependenciesMeta: 2268 peerDependenciesMeta:
2180 "@types/babel__core": 2269 "@types/babel__core":
2181 optional: true 2270 optional: true
2182 checksum: fb457bba770c4547468c69fa26765ac734d86d07513924e862e91c1d9ee453785717bd08c6f5471a5024d00fbb02553421c9e2bfb5d1267820a4331900d833e7 2271 checksum: 2766134dd5567c0d4fd6909d1f511ce9bf3bd9d727e1bc5ffdd6097a3606faca324107ae8e0961839ee4dbb45e5e579ae601efe472fc0a271259aea79920cafa
2183 languageName: node 2272 languageName: node
2184 linkType: hard 2273 linkType: hard
2185 2274
@@ -2195,7 +2284,7 @@ __metadata:
2195 resolve: "npm:^1.19.0" 2284 resolve: "npm:^1.19.0"
2196 peerDependencies: 2285 peerDependencies:
2197 rollup: ^1.20.0||^2.0.0 2286 rollup: ^1.20.0||^2.0.0
2198 checksum: dc8940a2e1e529054652f82959006f17ca79bc4295c6f162927b2b750d2b060bd4550ce685b9c4d3faa51726f17adc7b28220dd1a864437cd16c764fb455155c 2287 checksum: a8226b01352ee1f7133b1b59b3906267e11c99020a55e3b7a313e03889f790d1cd94e7f7769d3963261e897c3265082533ba595976f8e3f08cf70aa88bf1ddd7
2199 languageName: node 2288 languageName: node
2200 linkType: hard 2289 linkType: hard
2201 2290
@@ -2207,7 +2296,7 @@ __metadata:
2207 magic-string: "npm:^0.25.7" 2296 magic-string: "npm:^0.25.7"
2208 peerDependencies: 2297 peerDependencies:
2209 rollup: ^1.20.0 || ^2.0.0 2298 rollup: ^1.20.0 || ^2.0.0
2210 checksum: 584ba802fbe3e6c9324977650a6b1c1af087f48f528fcc6d18b6665326f8d3d01a947cb62221100a018652bc049473273b1cad3670e070568ffacba12e533a38 2299 checksum: ea3d27291c791661638b91809d0247dde1ee71be0b16fa7060078c2700db3669eada2c3978ea979b917b29ebe06f3fddc8797feae554da966264a22142b5771a
2211 languageName: node 2300 languageName: node
2212 linkType: hard 2301 linkType: hard
2213 2302
@@ -2220,7 +2309,7 @@ __metadata:
2220 picomatch: "npm:^2.2.2" 2309 picomatch: "npm:^2.2.2"
2221 peerDependencies: 2310 peerDependencies:
2222 rollup: ^1.20.0||^2.0.0 2311 rollup: ^1.20.0||^2.0.0
2223 checksum: cd1fa3b565bab5556479aeea8ae14d4c622e2071abbac2de4182715c5220074a55d6ec08be31a1207676d307330eef6697fc739d2d7e1cf34937e87d23770dc3 2312 checksum: 7151753160d15ba2b259461a6c25b3932150994ea52dba8fd3144f634c7647c2e56733d986e2c15de67c4d96a9ee7d6278efa6d2e626a7169898fd64adc0f90c
2224 languageName: node 2313 languageName: node
2225 linkType: hard 2314 linkType: hard
2226 2315
@@ -2232,94 +2321,94 @@ __metadata:
2232 json5: "npm:^2.2.0" 2321 json5: "npm:^2.2.0"
2233 magic-string: "npm:^0.25.0" 2322 magic-string: "npm:^0.25.0"
2234 string.prototype.matchall: "npm:^4.0.6" 2323 string.prototype.matchall: "npm:^4.0.6"
2235 checksum: d7d5dc8e2877694e31f652cc4dc581ba67e80a17610cfbbcc14b6c91414a2c1b5ff1bbec18d0657ab93f4cdae2870f492951216e1d2f085ed4a28d6755a457cf 2324 checksum: 4f36a7488cdae2907053a48231430e8e9aa8f1903a96131bf8325786afba3224011f9120164cae75043558bd051881050b071958388fe477927d340b1cc1a066
2236 languageName: node 2325 languageName: node
2237 linkType: hard 2326 linkType: hard
2238 2327
2239"@swc/core-darwin-arm64@npm:1.3.64": 2328"@swc/core-darwin-arm64@npm:1.3.78":
2240 version: 1.3.64 2329 version: 1.3.78
2241 resolution: "@swc/core-darwin-arm64@npm:1.3.64" 2330 resolution: "@swc/core-darwin-arm64@npm:1.3.78"
2242 conditions: os=darwin & cpu=arm64 2331 conditions: os=darwin & cpu=arm64
2243 languageName: node 2332 languageName: node
2244 linkType: hard 2333 linkType: hard
2245 2334
2246"@swc/core-darwin-x64@npm:1.3.64": 2335"@swc/core-darwin-x64@npm:1.3.78":
2247 version: 1.3.64 2336 version: 1.3.78
2248 resolution: "@swc/core-darwin-x64@npm:1.3.64" 2337 resolution: "@swc/core-darwin-x64@npm:1.3.78"
2249 conditions: os=darwin & cpu=x64 2338 conditions: os=darwin & cpu=x64
2250 languageName: node 2339 languageName: node
2251 linkType: hard 2340 linkType: hard
2252 2341
2253"@swc/core-linux-arm-gnueabihf@npm:1.3.64": 2342"@swc/core-linux-arm-gnueabihf@npm:1.3.78":
2254 version: 1.3.64 2343 version: 1.3.78
2255 resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.64" 2344 resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.78"
2256 conditions: os=linux & cpu=arm 2345 conditions: os=linux & cpu=arm
2257 languageName: node 2346 languageName: node
2258 linkType: hard 2347 linkType: hard
2259 2348
2260"@swc/core-linux-arm64-gnu@npm:1.3.64": 2349"@swc/core-linux-arm64-gnu@npm:1.3.78":
2261 version: 1.3.64 2350 version: 1.3.78
2262 resolution: "@swc/core-linux-arm64-gnu@npm:1.3.64" 2351 resolution: "@swc/core-linux-arm64-gnu@npm:1.3.78"
2263 conditions: os=linux & cpu=arm64 & libc=glibc 2352 conditions: os=linux & cpu=arm64 & libc=glibc
2264 languageName: node 2353 languageName: node
2265 linkType: hard 2354 linkType: hard
2266 2355
2267"@swc/core-linux-arm64-musl@npm:1.3.64": 2356"@swc/core-linux-arm64-musl@npm:1.3.78":
2268 version: 1.3.64 2357 version: 1.3.78
2269 resolution: "@swc/core-linux-arm64-musl@npm:1.3.64" 2358 resolution: "@swc/core-linux-arm64-musl@npm:1.3.78"
2270 conditions: os=linux & cpu=arm64 & libc=musl 2359 conditions: os=linux & cpu=arm64 & libc=musl
2271 languageName: node 2360 languageName: node
2272 linkType: hard 2361 linkType: hard
2273 2362
2274"@swc/core-linux-x64-gnu@npm:1.3.64": 2363"@swc/core-linux-x64-gnu@npm:1.3.78":
2275 version: 1.3.64 2364 version: 1.3.78
2276 resolution: "@swc/core-linux-x64-gnu@npm:1.3.64" 2365 resolution: "@swc/core-linux-x64-gnu@npm:1.3.78"
2277 conditions: os=linux & cpu=x64 & libc=glibc 2366 conditions: os=linux & cpu=x64 & libc=glibc
2278 languageName: node 2367 languageName: node
2279 linkType: hard 2368 linkType: hard
2280 2369
2281"@swc/core-linux-x64-musl@npm:1.3.64": 2370"@swc/core-linux-x64-musl@npm:1.3.78":
2282 version: 1.3.64 2371 version: 1.3.78
2283 resolution: "@swc/core-linux-x64-musl@npm:1.3.64" 2372 resolution: "@swc/core-linux-x64-musl@npm:1.3.78"
2284 conditions: os=linux & cpu=x64 & libc=musl 2373 conditions: os=linux & cpu=x64 & libc=musl
2285 languageName: node 2374 languageName: node
2286 linkType: hard 2375 linkType: hard
2287 2376
2288"@swc/core-win32-arm64-msvc@npm:1.3.64": 2377"@swc/core-win32-arm64-msvc@npm:1.3.78":
2289 version: 1.3.64 2378 version: 1.3.78
2290 resolution: "@swc/core-win32-arm64-msvc@npm:1.3.64" 2379 resolution: "@swc/core-win32-arm64-msvc@npm:1.3.78"
2291 conditions: os=win32 & cpu=arm64 2380 conditions: os=win32 & cpu=arm64
2292 languageName: node 2381 languageName: node
2293 linkType: hard 2382 linkType: hard
2294 2383
2295"@swc/core-win32-ia32-msvc@npm:1.3.64": 2384"@swc/core-win32-ia32-msvc@npm:1.3.78":
2296 version: 1.3.64 2385 version: 1.3.78
2297 resolution: "@swc/core-win32-ia32-msvc@npm:1.3.64" 2386 resolution: "@swc/core-win32-ia32-msvc@npm:1.3.78"
2298 conditions: os=win32 & cpu=ia32 2387 conditions: os=win32 & cpu=ia32
2299 languageName: node 2388 languageName: node
2300 linkType: hard 2389 linkType: hard
2301 2390
2302"@swc/core-win32-x64-msvc@npm:1.3.64": 2391"@swc/core-win32-x64-msvc@npm:1.3.78":
2303 version: 1.3.64 2392 version: 1.3.78
2304 resolution: "@swc/core-win32-x64-msvc@npm:1.3.64" 2393 resolution: "@swc/core-win32-x64-msvc@npm:1.3.78"
2305 conditions: os=win32 & cpu=x64 2394 conditions: os=win32 & cpu=x64
2306 languageName: node 2395 languageName: node
2307 linkType: hard 2396 linkType: hard
2308 2397
2309"@swc/core@npm:^1.3.61": 2398"@swc/core@npm:^1.3.61":
2310 version: 1.3.64 2399 version: 1.3.78
2311 resolution: "@swc/core@npm:1.3.64" 2400 resolution: "@swc/core@npm:1.3.78"
2312 dependencies: 2401 dependencies:
2313 "@swc/core-darwin-arm64": "npm:1.3.64" 2402 "@swc/core-darwin-arm64": "npm:1.3.78"
2314 "@swc/core-darwin-x64": "npm:1.3.64" 2403 "@swc/core-darwin-x64": "npm:1.3.78"
2315 "@swc/core-linux-arm-gnueabihf": "npm:1.3.64" 2404 "@swc/core-linux-arm-gnueabihf": "npm:1.3.78"
2316 "@swc/core-linux-arm64-gnu": "npm:1.3.64" 2405 "@swc/core-linux-arm64-gnu": "npm:1.3.78"
2317 "@swc/core-linux-arm64-musl": "npm:1.3.64" 2406 "@swc/core-linux-arm64-musl": "npm:1.3.78"
2318 "@swc/core-linux-x64-gnu": "npm:1.3.64" 2407 "@swc/core-linux-x64-gnu": "npm:1.3.78"
2319 "@swc/core-linux-x64-musl": "npm:1.3.64" 2408 "@swc/core-linux-x64-musl": "npm:1.3.78"
2320 "@swc/core-win32-arm64-msvc": "npm:1.3.64" 2409 "@swc/core-win32-arm64-msvc": "npm:1.3.78"
2321 "@swc/core-win32-ia32-msvc": "npm:1.3.64" 2410 "@swc/core-win32-ia32-msvc": "npm:1.3.78"
2322 "@swc/core-win32-x64-msvc": "npm:1.3.64" 2411 "@swc/core-win32-x64-msvc": "npm:1.3.78"
2323 peerDependencies: 2412 peerDependencies:
2324 "@swc/helpers": ^0.5.0 2413 "@swc/helpers": ^0.5.0
2325 dependenciesMeta: 2414 dependenciesMeta:
@@ -2346,82 +2435,414 @@ __metadata:
2346 peerDependenciesMeta: 2435 peerDependenciesMeta:
2347 "@swc/helpers": 2436 "@swc/helpers":
2348 optional: true 2437 optional: true
2349 checksum: 39f3a60e769f18497b1045aadf42a8aacfe19dace9963a75d771e254ccadbe54f7f755bb42e21e323fbe03ee51a4f581d2b09e8a31a76a4bb8014bc6535fed5f 2438 checksum: 5936575f2dd8ef18642d4d83622336b0bc2ea073d4554ad20e4af030329b301ad9e7f5f4afa4042ac8d3cffc9d2d5c3140e7d134869e7c656d5e29231ffbc17f
2350 languageName: node 2439 languageName: node
2351 linkType: hard 2440 linkType: hard
2352 2441
2353"@tootallnate/once@npm:2": 2442"@tootallnate/once@npm:2":
2354 version: 2.0.0 2443 version: 2.0.0
2355 resolution: "@tootallnate/once@npm:2.0.0" 2444 resolution: "@tootallnate/once@npm:2.0.0"
2356 checksum: d9f7f2130a0a2e1ea50f3bc90b83a8b99c913bbb80d7a1706f7f4730292ef299d18443c3b57a42dfb17c6559c9085e13f751b1b6c969bcff7bee3eeaf9da4dec 2445 checksum: 073bfa548026b1ebaf1659eb8961e526be22fa77139b10d60e712f46d2f0f05f4e6c8bec62a087d41088ee9e29faa7f54838568e475ab2f776171003c3920858
2357 languageName: node 2446 languageName: node
2358 linkType: hard 2447 linkType: hard
2359 2448
2360"@types/braces@npm:*": 2449"@types/braces@npm:*":
2361 version: 3.0.1 2450 version: 3.0.1
2362 resolution: "@types/braces@npm:3.0.1" 2451 resolution: "@types/braces@npm:3.0.1"
2363 checksum: c0d610f2474b174dc87946b57a8a7ecf5a14a49ef4217fc1134bcd32bcbd8a07eeaee5ea88b861effeee554cf28dc62867008e39049a574a2162985a40586333 2452 checksum: 2052cf78c7378ceb692b823f743ac3a838b05f4c27f6eba3e5b6e298fd11d64322b1c7be1fa0eb53d99d9c6049202bf16a88ec1f40ebfd09e086b54eb69ff767
2453 languageName: node
2454 linkType: hard
2455
2456"@types/d3-array@npm:*":
2457 version: 3.0.5
2458 resolution: "@types/d3-array@npm:3.0.5"
2459 checksum: 145c61ffc88af9ac550d924e2d13a8b6fc95011989662500848e2df2214e7b3e19decaf7e95238a2c5460053137227360ccd00f6859c4ecb2508a807338ab957
2460 languageName: node
2461 linkType: hard
2462
2463"@types/d3-axis@npm:*":
2464 version: 3.0.2
2465 resolution: "@types/d3-axis@npm:3.0.2"
2466 dependencies:
2467 "@types/d3-selection": "npm:*"
2468 checksum: 3efaca6b227fff21eea654b980952e7315dbe5822956d48c6c6047a815adf100b31a901c1cd0e089067f8a409abae2728cfcb81b9da28c02aee96b009237d6e7
2469 languageName: node
2470 linkType: hard
2471
2472"@types/d3-brush@npm:*":
2473 version: 3.0.2
2474 resolution: "@types/d3-brush@npm:3.0.2"
2475 dependencies:
2476 "@types/d3-selection": "npm:*"
2477 checksum: 8ddc4978fd5ef637ddc459a7a26b2b14e59a19cb2c541904ec17005e6d3fc3cea426598b8dd08ca154dc1cf0fe466fef3bf344b3b5bc2d9591d48783f8e76a96
2478 languageName: node
2479 linkType: hard
2480
2481"@types/d3-chord@npm:*":
2482 version: 3.0.2
2483 resolution: "@types/d3-chord@npm:3.0.2"
2484 checksum: e354f29b261d4ff9546e52e1c3e315e62407a8ead85c82bd7e4efb277e89898ae2fa1a7740589e15d32677d76c826a596b198d374749e27598f9d3dec0055d7f
2485 languageName: node
2486 linkType: hard
2487
2488"@types/d3-color@npm:*":
2489 version: 3.1.0
2490 resolution: "@types/d3-color@npm:3.1.0"
2491 checksum: 5b4be21b4b025da9ffd0cef876fb7d82f99116fa26e7ee3449771faf0a953d160246b1ceb2a9bbc7d131e32ab60d7d19013131d098616369a56f9880f25f20ef
2492 languageName: node
2493 linkType: hard
2494
2495"@types/d3-color@npm:^1":
2496 version: 1.4.2
2497 resolution: "@types/d3-color@npm:1.4.2"
2498 checksum: f1c70d7deabe2b30e337361c3fa26b7ce4e9c875dfd1ad75e17379c6a5596f116fb21ca0e595c2f2220e04866bca6bdb2623e772cfb5f8bf4d20ffe6ba5c72ab
2499 languageName: node
2500 linkType: hard
2501
2502"@types/d3-contour@npm:*":
2503 version: 3.0.2
2504 resolution: "@types/d3-contour@npm:3.0.2"
2505 dependencies:
2506 "@types/d3-array": "npm:*"
2507 "@types/geojson": "npm:*"
2508 checksum: b4fc2b783c944b35412080c873ec828896864144675db9376b390c2a64631f5a63939fdefd50bf8f3cf0cb80ac8113429334f303b7806a71dd3155e1f762a304
2509 languageName: node
2510 linkType: hard
2511
2512"@types/d3-delaunay@npm:*":
2513 version: 6.0.1
2514 resolution: "@types/d3-delaunay@npm:6.0.1"
2515 checksum: b03f84560a98e0d08b96095759484de6ebccc4fc137a9114795ece15898ccb67c5b0897ffe1e939658224fe387dd58090b951a2c3ff31c70ec9fe2dddc0df1f9
2516 languageName: node
2517 linkType: hard
2518
2519"@types/d3-dispatch@npm:*":
2520 version: 3.0.2
2521 resolution: "@types/d3-dispatch@npm:3.0.2"
2522 checksum: 4d3afa2ff31abe7207347f7bdf044b5a94ba39935670a745d1599021e56f7f29eb0e09685cb32519d9ee45ec9d0de865ac4c77ed6c1e049cb1d820b5a1085c09
2523 languageName: node
2524 linkType: hard
2525
2526"@types/d3-drag@npm:*":
2527 version: 3.0.2
2528 resolution: "@types/d3-drag@npm:3.0.2"
2529 dependencies:
2530 "@types/d3-selection": "npm:*"
2531 checksum: b8af2eaf78df1acce61bc70c8684fc97be3b2824d096107a93e34c157f3e680d9635aeb6227431c1b226808442a55e728109615690a0ff240479eb04216afb94
2532 languageName: node
2533 linkType: hard
2534
2535"@types/d3-dsv@npm:*":
2536 version: 3.0.1
2537 resolution: "@types/d3-dsv@npm:3.0.1"
2538 checksum: 1daac684901a4b4022213bfd82cb0b2917c950cb2f1d0d925aabe2aab88c7cfdef67f522a08259e6c19d7c54fb98e4a8a994d9e48d8fb8d5bcda813969c5afc6
2539 languageName: node
2540 linkType: hard
2541
2542"@types/d3-ease@npm:*":
2543 version: 3.0.0
2544 resolution: "@types/d3-ease@npm:3.0.0"
2545 checksum: 8fa64035f3b459cbf178e0bbb01cd188ec7337877e959fcf0a6ef08528b6caf93fd9f69635ec1c8fc11f6d2448d0e5d2a4e11988cb16bc6e001f0c0afe609204
2546 languageName: node
2547 linkType: hard
2548
2549"@types/d3-fetch@npm:*":
2550 version: 3.0.2
2551 resolution: "@types/d3-fetch@npm:3.0.2"
2552 dependencies:
2553 "@types/d3-dsv": "npm:*"
2554 checksum: ee592cb03b0651b882851d022df6fc17934ab955d642b9178c2e1e800cd7e75733bde02a1f4936cff1befcec918556144a3525bd0cc6a3c8c5446de4a8bf4bf7
2555 languageName: node
2556 linkType: hard
2557
2558"@types/d3-force@npm:*":
2559 version: 3.0.4
2560 resolution: "@types/d3-force@npm:3.0.4"
2561 checksum: d1c1c00742f55c8f8d99e0fa09be990ae4dc562d2fd1861d86dfdc69efbcc47e1e8a30a97cde64a6c0175dcc8c2cfa1c7ab4c021063f96a13182e14a2d0c5ff1
2562 languageName: node
2563 linkType: hard
2564
2565"@types/d3-format@npm:*":
2566 version: 3.0.1
2567 resolution: "@types/d3-format@npm:3.0.1"
2568 checksum: abfb57288fb26899bac98aeb03d652ed73d7074c12c96bb33d2d67ced9869f52f4b3e37579df883fc69a13d970199331a07e67a8bcd9f858efeb4f3a71e36188
2569 languageName: node
2570 linkType: hard
2571
2572"@types/d3-geo@npm:*":
2573 version: 3.0.3
2574 resolution: "@types/d3-geo@npm:3.0.3"
2575 dependencies:
2576 "@types/geojson": "npm:*"
2577 checksum: f1409f60507644b331a2355e54e3ff497011cb0e1b4faa5962c6ee9f1f5e80f4ca9a400c67c8c7bea2b3e67c3f7684a047c91330d2d0216ddb63b3ddc9ac8f96
2578 languageName: node
2579 linkType: hard
2580
2581"@types/d3-graphviz@npm:^2.6.7":
2582 version: 2.6.7
2583 resolution: "@types/d3-graphviz@npm:2.6.7"
2584 dependencies:
2585 "@types/d3-selection": "npm:^1"
2586 "@types/d3-transition": "npm:^1"
2587 "@types/d3-zoom": "npm:^1"
2588 checksum: 5584a0126bf3baebd92f7cc4082430f554a9a3026e5c2320f1bd9560b62e62cc1f52cf56d96da97b8fb669ab187fbf376509dc8ef359b870004aae905f4289be
2589 languageName: node
2590 linkType: hard
2591
2592"@types/d3-hierarchy@npm:*":
2593 version: 3.1.2
2594 resolution: "@types/d3-hierarchy@npm:3.1.2"
2595 checksum: 9248d1d01f659e30808da58171652542d88d4e07364dac4acffcf3513509b26d5e2971880f56e29091cf89b0d2f8de64fcd9cb86017d9192d0f27e863c965414
2596 languageName: node
2597 linkType: hard
2598
2599"@types/d3-interpolate@npm:*":
2600 version: 3.0.1
2601 resolution: "@types/d3-interpolate@npm:3.0.1"
2602 dependencies:
2603 "@types/d3-color": "npm:*"
2604 checksum: 1c7577045a4a30dc177bca10980c456a28c9b89b1a5406fe7303824dd9cc898f67f8dafd8e22a7702ca5df12a28a5f48f77d92a9b5d8f1fc0939f33831067114
2605 languageName: node
2606 linkType: hard
2607
2608"@types/d3-interpolate@npm:^1":
2609 version: 1.4.2
2610 resolution: "@types/d3-interpolate@npm:1.4.2"
2611 dependencies:
2612 "@types/d3-color": "npm:^1"
2613 checksum: 98bff93ce4d94485a4f6117e554854ec69072382910008e785d2c960b50e643093a8cfa2e0875b3d1dff19f3603b6e16a4eea8122c7c8ead3623daf3044cd22e
2614 languageName: node
2615 linkType: hard
2616
2617"@types/d3-path@npm:*":
2618 version: 3.0.0
2619 resolution: "@types/d3-path@npm:3.0.0"
2620 checksum: 64750aeb3e490112d2f1d812230201140de352743846150e022e44c6924f44d47deb1a50f3dc63b930fd6a8fd6482f8fcb7da2516a14b8e29a4749d2b86f90ca
2621 languageName: node
2622 linkType: hard
2623
2624"@types/d3-polygon@npm:*":
2625 version: 3.0.0
2626 resolution: "@types/d3-polygon@npm:3.0.0"
2627 checksum: 6fce6672581cac3c5bcda6f0014527228bdc25ad9f99d1bf9103764f6ce89bc0d5690db55c92052ad7182fa20623aa4bb6bcb2b85aa7a77535610c06b3c32d97
2628 languageName: node
2629 linkType: hard
2630
2631"@types/d3-quadtree@npm:*":
2632 version: 3.0.2
2633 resolution: "@types/d3-quadtree@npm:3.0.2"
2634 checksum: 0a2a6921bb21d8bd14190bfd048990f80d2369e622822cbc344a897bb88534b1d7332445024e17cf0adfb4cef663a8a79f0e3bf2a4129a7d13f264854f06e379
2635 languageName: node
2636 linkType: hard
2637
2638"@types/d3-random@npm:*":
2639 version: 3.0.1
2640 resolution: "@types/d3-random@npm:3.0.1"
2641 checksum: e2818c15b157df55f48c50ca1ed8ba243859b56eb0eb07fdca162ea34ef77f373e5fd5402df4c2e483d6a71e0b57b97ce189cb9398d0433569be6318e1ede408
2642 languageName: node
2643 linkType: hard
2644
2645"@types/d3-scale-chromatic@npm:*":
2646 version: 3.0.0
2647 resolution: "@types/d3-scale-chromatic@npm:3.0.0"
2648 checksum: 58cef12deab19233d8d06f61993198930248fb7cf5de0754e38a9dd342a8fba2d917bc746b57eeee9f82e50bbc079a867e15cc045e8a338cf8502ebcde4561f9
2649 languageName: node
2650 linkType: hard
2651
2652"@types/d3-scale@npm:*":
2653 version: 4.0.3
2654 resolution: "@types/d3-scale@npm:4.0.3"
2655 dependencies:
2656 "@types/d3-time": "npm:*"
2657 checksum: 5eace4cf45f87b3eec9637ade77e97530e778a3bb7f8356e4712bde732fb9474f3e8ef3aa12bc97dd3e4f76e23343ed81c1f5a3a1dcfdb72868f876b418da117
2658 languageName: node
2659 linkType: hard
2660
2661"@types/d3-selection@npm:*, @types/d3-selection@npm:^3.0.6":
2662 version: 3.0.6
2663 resolution: "@types/d3-selection@npm:3.0.6"
2664 checksum: 49d14befc907f362e5c71c7901ac8360e1cf0529a35a7d3ac9d91dad4621afc61df826a1b2643401b83559cd721ec3a55dc341d30d18d0a18789155acb957652
2665 languageName: node
2666 linkType: hard
2667
2668"@types/d3-selection@npm:^1":
2669 version: 1.4.3
2670 resolution: "@types/d3-selection@npm:1.4.3"
2671 checksum: 47c181f8362ade4df151e01737816356c939bc5728ff87c3a29bd43aaa0413296170119949eb3aa0ef8d9c10fac4463eb1d154b6fd0e89617b45eeb06bdefb8b
2672 languageName: node
2673 linkType: hard
2674
2675"@types/d3-shape@npm:*":
2676 version: 3.1.1
2677 resolution: "@types/d3-shape@npm:3.1.1"
2678 dependencies:
2679 "@types/d3-path": "npm:*"
2680 checksum: e06f0e6f5d74184dfb6a71861085ffad221bde8a11d2de632649118d75e9605fddf9af664601b0841d794e0c27afd6ea37d652350fb47c196905facc04c284d5
2681 languageName: node
2682 linkType: hard
2683
2684"@types/d3-time-format@npm:*":
2685 version: 4.0.0
2686 resolution: "@types/d3-time-format@npm:4.0.0"
2687 checksum: 3b2b95950594ded5bb6c1b21da37b049daa945c93a93ced76eac2ea6d78d6d17ebabbcf226523b07e214fe53c5d0f98f5d2e9ce7c758bc29c25e3563afddcf87
2688 languageName: node
2689 linkType: hard
2690
2691"@types/d3-time@npm:*":
2692 version: 3.0.0
2693 resolution: "@types/d3-time@npm:3.0.0"
2694 checksum: 4f900608d5c557b09b38e4b096723af5eb4508a1b32f9afae253fe77a4bcbbe821a14225bab1c2ea36ddbc5c4154ab3563452c6b6eba7a9f48cefad94276e6b5
2695 languageName: node
2696 linkType: hard
2697
2698"@types/d3-timer@npm:*":
2699 version: 3.0.0
2700 resolution: "@types/d3-timer@npm:3.0.0"
2701 checksum: 7f6cd693f6c99a360dc01e1b5aa1185cfa8f65d603f537c52c810d475c8ef8aa07ac2f8be24cc489d2e69b843e384ab30dd079ac75011dbc91b21cd216a79502
2702 languageName: node
2703 linkType: hard
2704
2705"@types/d3-transition@npm:*":
2706 version: 3.0.3
2707 resolution: "@types/d3-transition@npm:3.0.3"
2708 dependencies:
2709 "@types/d3-selection": "npm:*"
2710 checksum: b91742816f4f8b16c26b8a41065f0b72170b5eb9f5a9af30c7e432ff0b7b78a02fb7228d4e4bb8471e91d8122aa96dd8f8e879ceb181cc006039e87a0c696fbf
2711 languageName: node
2712 linkType: hard
2713
2714"@types/d3-transition@npm:^1":
2715 version: 1.3.2
2716 resolution: "@types/d3-transition@npm:1.3.2"
2717 dependencies:
2718 "@types/d3-selection": "npm:^1"
2719 checksum: 9e1340c2840fde63f224550cbde5531b8b2493218d421f97de138c1e7ca9b1f481dfc9e4c91cb5ce84df9df671e2d95468556be1f8cf1e28f0c33929322115a4
2364 languageName: node 2720 languageName: node
2365 linkType: hard 2721 linkType: hard
2366 2722
2367"@types/eslint@npm:^8.40.2": 2723"@types/d3-zoom@npm:*, @types/d3-zoom@npm:^3.0.4":
2368 version: 8.40.2 2724 version: 3.0.4
2369 resolution: "@types/eslint@npm:8.40.2" 2725 resolution: "@types/d3-zoom@npm:3.0.4"
2726 dependencies:
2727 "@types/d3-interpolate": "npm:*"
2728 "@types/d3-selection": "npm:*"
2729 checksum: 52d1b5f2a1490c25c69b03dcd71601f908ea1e3dedf79e379be4ff23e3a6be85d0694d04c1b23686343a74117e86683a61433ed926637aea545268fd55aa634f
2730 languageName: node
2731 linkType: hard
2732
2733"@types/d3-zoom@npm:^1":
2734 version: 1.8.4
2735 resolution: "@types/d3-zoom@npm:1.8.4"
2736 dependencies:
2737 "@types/d3-interpolate": "npm:^1"
2738 "@types/d3-selection": "npm:^1"
2739 checksum: 3135d2e01ec2eb633a5104025e719d989cdd9d203eeb97fc749128d60c2d19de9693e058e92ea1eb2f63aa0fa47cd4e4a994dc7df614b00eda650952c92f2c8a
2740 languageName: node
2741 linkType: hard
2742
2743"@types/d3@npm:^7.4.0":
2744 version: 7.4.0
2745 resolution: "@types/d3@npm:7.4.0"
2746 dependencies:
2747 "@types/d3-array": "npm:*"
2748 "@types/d3-axis": "npm:*"
2749 "@types/d3-brush": "npm:*"
2750 "@types/d3-chord": "npm:*"
2751 "@types/d3-color": "npm:*"
2752 "@types/d3-contour": "npm:*"
2753 "@types/d3-delaunay": "npm:*"
2754 "@types/d3-dispatch": "npm:*"
2755 "@types/d3-drag": "npm:*"
2756 "@types/d3-dsv": "npm:*"
2757 "@types/d3-ease": "npm:*"
2758 "@types/d3-fetch": "npm:*"
2759 "@types/d3-force": "npm:*"
2760 "@types/d3-format": "npm:*"
2761 "@types/d3-geo": "npm:*"
2762 "@types/d3-hierarchy": "npm:*"
2763 "@types/d3-interpolate": "npm:*"
2764 "@types/d3-path": "npm:*"
2765 "@types/d3-polygon": "npm:*"
2766 "@types/d3-quadtree": "npm:*"
2767 "@types/d3-random": "npm:*"
2768 "@types/d3-scale": "npm:*"
2769 "@types/d3-scale-chromatic": "npm:*"
2770 "@types/d3-selection": "npm:*"
2771 "@types/d3-shape": "npm:*"
2772 "@types/d3-time": "npm:*"
2773 "@types/d3-time-format": "npm:*"
2774 "@types/d3-timer": "npm:*"
2775 "@types/d3-transition": "npm:*"
2776 "@types/d3-zoom": "npm:*"
2777 checksum: f382cb3c78257f77cf4a1f19279bbe46eeb1b8df3ef5ab58edba8e18ce7afda670e79dde91fb8c2b85565ad5d0b138e62909477f3e6452b9d586050ca3e605d7
2778 languageName: node
2779 linkType: hard
2780
2781"@types/eslint@npm:^8.44.2":
2782 version: 8.44.2
2783 resolution: "@types/eslint@npm:8.44.2"
2370 dependencies: 2784 dependencies:
2371 "@types/estree": "npm:*" 2785 "@types/estree": "npm:*"
2372 "@types/json-schema": "npm:*" 2786 "@types/json-schema": "npm:*"
2373 checksum: 84f4da669a839830e3696494ec7ba659f7fa064eb87e3f1d4b60204b4db9c9093bbbd9f59b7bf46370bdba97cae0b959d4b2391c743d69297a8df5d100d35191 2787 checksum: 3c402215f7f495f9267a51fecd6a6d056eb8b3b031a1c472286b7d23a397257327eb03712befa7da60614dd63d31235d27dbc5c586b6a408798dafb8ee0c5eb2
2374 languageName: node 2788 languageName: node
2375 linkType: hard 2789 linkType: hard
2376 2790
2377"@types/estree@npm:*": 2791"@types/estree@npm:*":
2378 version: 1.0.0 2792 version: 1.0.0
2379 resolution: "@types/estree@npm:1.0.0" 2793 resolution: "@types/estree@npm:1.0.0"
2380 checksum: 474df434e3a469cb7a68d44c8b7ac3a21bca344fa3b49651c3451d0f3662ff0c3b2ba52149cbc5b9c9a9f3f1ac37958c163ef29b65a8b36fccb5ccb2acfc9b08 2794 checksum: 4e73ff606bf7c7ccdaa66092de650c410a4ad2ecc388fdbed8242cac9dbcad72407e1ceff041b7da691babb02ff74ab885d6231fb09368fdd1eabbf1b5253d49
2381 languageName: node 2795 languageName: node
2382 linkType: hard 2796 linkType: hard
2383 2797
2384"@types/estree@npm:0.0.39": 2798"@types/estree@npm:0.0.39":
2385 version: 0.0.39 2799 version: 0.0.39
2386 resolution: "@types/estree@npm:0.0.39" 2800 resolution: "@types/estree@npm:0.0.39"
2387 checksum: 17875aa97e2734f4a6c5d1e7d4978888961f4c890694c6e0d1c51b17b3eaceba6be1478cf76c50730860002766e4a05c3e8afa12cccbcd5f0b628c458b607357 2801 checksum: f0af6c95ac1988c4827964bd9d3b51d24da442e2188943f6dfcb1e1559103d5d024d564b2e9d3f84c53714a02a0a7435c7441138eb63d9af5de4dfc66cdc0d92
2802 languageName: node
2803 linkType: hard
2804
2805"@types/geojson@npm:*":
2806 version: 7946.0.10
2807 resolution: "@types/geojson@npm:7946.0.10"
2808 checksum: 4abba554467494c1496a60622c2cb6f8c7f80b0dbb909ff898812a9f67799fd1b254802d7d266361974bd8b0c9ef32a7686183aac83b20c437f6d0eee89cd0a1
2388 languageName: node 2809 languageName: node
2389 linkType: hard 2810 linkType: hard
2390 2811
2391"@types/html-minifier-terser@npm:^7.0.0": 2812"@types/html-minifier-terser@npm:^7.0.0":
2392 version: 7.0.0 2813 version: 7.0.0
2393 resolution: "@types/html-minifier-terser@npm:7.0.0" 2814 resolution: "@types/html-minifier-terser@npm:7.0.0"
2394 checksum: 66d7177d15b38c759b4498c6714e1fad3c2a6275fb39cdfb2bb8668de6cd6213bc6e1006f458cb693e8f644dfe6a1a9cf0caf4cec8724ede9e5244767eef95c6 2815 checksum: 415cfb905752c2a4e7115a7354da0b5fa839a0108fe12a3320f243178e46b5d4114659b55194399ccf5bdffd437100a47bed7ce596ff6a0fbfb32a6efa3b419c
2395 languageName: node 2816 languageName: node
2396 linkType: hard 2817 linkType: hard
2397 2818
2398"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.9": 2819"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12":
2399 version: 7.0.11 2820 version: 7.0.12
2400 resolution: "@types/json-schema@npm:7.0.11" 2821 resolution: "@types/json-schema@npm:7.0.12"
2401 checksum: 8e5c6dd393411418e3d803ab0a09862b4ed47f73e7ed990f3b907dd41cc4d2f2b4f7aed9a39c7fd2acaa80314ac1397a5e2e5e6c25a338f01bbfba708cc70d8e 2822 checksum: 2c39946ae321fe42d085c61a85872a81bbee70f9b2054ad344e8811dfc478fdbaf1ebf5f2989bb87c895ba2dfc3b1dcba85db11e467bbcdc023708814207791c
2402 languageName: node 2823 languageName: node
2403 linkType: hard 2824 linkType: hard
2404 2825
2405"@types/json5@npm:^0.0.29": 2826"@types/json5@npm:^0.0.29":
2406 version: 0.0.29 2827 version: 0.0.29
2407 resolution: "@types/json5@npm:0.0.29" 2828 resolution: "@types/json5@npm:0.0.29"
2408 checksum: 4f7f0667d7573ce2888e01e5e887c9661bb2a7e7fd79aae3c57391e812e87cc2fadc4dc1616530f33e63798a011fabe816f41730b511050aba702688466765fd 2829 checksum: 6bf5337bc447b706bb5b4431d37686aa2ea6d07cfd6f79cc31de80170d6ff9b1c7384a9c0ccbc45b3f512bae9e9f75c2e12109806a15331dc94e8a8db6dbb4ac
2409 languageName: node 2830 languageName: node
2410 linkType: hard 2831 linkType: hard
2411 2832
2412"@types/lodash-es@npm:^4.17.7": 2833"@types/lodash-es@npm:^4.17.9":
2413 version: 4.17.7 2834 version: 4.17.9
2414 resolution: "@types/lodash-es@npm:4.17.7" 2835 resolution: "@types/lodash-es@npm:4.17.9"
2415 dependencies: 2836 dependencies:
2416 "@types/lodash": "npm:*" 2837 "@types/lodash": "npm:*"
2417 checksum: 4dfde517db4cfc7b25b5a20a0851244c0ca4aebbdae272eebe77a3f3388eae6a4f47d7850cca712e0256c033a30bfebd366948b4286743e20e2c862c7c3830ad 2838 checksum: 9fe82df0ec14e2aad50a1bf6488c4457e3378fcc77f5806fbc8035904ef0848b70e50037b13d9bddb66d3a30b425d2998a4a438a5024efe7431b63fde0920378
2418 languageName: node 2839 languageName: node
2419 linkType: hard 2840 linkType: hard
2420 2841
2421"@types/lodash@npm:*": 2842"@types/lodash@npm:*":
2422 version: 4.14.184 2843 version: 4.14.184
2423 resolution: "@types/lodash@npm:4.14.184" 2844 resolution: "@types/lodash@npm:4.14.184"
2424 checksum: acee0bd73f0067cafb7b7a12995e868f64d95c2b6e5361be7d51440e8dafb4ad2be3b2cac352e4e42d777ffc305c46807148cba50072a1fb5a4ab770d4ec2fc2 2845 checksum: 35e81d477603b319179b335b839865f7bc837afcfd08b5fedfe7e01a0a0f192599f7567ffa45dbf95bfa793f1e9f9bc4666f57f47f0b00fe171e857b9178aed9
2425 languageName: node 2846 languageName: node
2426 linkType: hard 2847 linkType: hard
2427 2848
@@ -2430,60 +2851,67 @@ __metadata:
2430 resolution: "@types/micromatch@npm:4.0.2" 2851 resolution: "@types/micromatch@npm:4.0.2"
2431 dependencies: 2852 dependencies:
2432 "@types/braces": "npm:*" 2853 "@types/braces": "npm:*"
2433 checksum: ac7ec28d57ac61a85bd2859c69d096192e8ef66cc9d3c5fcb4531eeec3b090b1ff1be132e65eff6a16be14b9a30083cf488a402c094890c654db861aafee4669 2854 checksum: e557324460e658283778c77d0f8995ee95e371c4fd54474b3186e947486427cc4af66b841393304b65c09a7bb36710158260db7a7cf761384e1a9a728e82e6f4
2434 languageName: node 2855 languageName: node
2435 linkType: hard 2856 linkType: hard
2436 2857
2437"@types/ms@npm:^0.7.31": 2858"@types/ms@npm:^0.7.31":
2438 version: 0.7.31 2859 version: 0.7.31
2439 resolution: "@types/ms@npm:0.7.31" 2860 resolution: "@types/ms@npm:0.7.31"
2440 checksum: cccb52777bb683c65ac5bab61351cd3910c9ce3512b1d903a591fc9694bb83afad6e48bf0beee5b47b6a8b620a05f5d82f8febfd55de05e7d9eb93586cc196c8 2861 checksum: 19fae4f587651e8761c76a0c72ba8af1700d37054476878d164b758edcc926f4420ed06037a1a7fdddc1dbea25265895d743c8b2ea44f3f3f7ac06c449b9221e
2441 languageName: node 2862 languageName: node
2442 linkType: hard 2863 linkType: hard
2443 2864
2444"@types/node@npm:*, @types/node@npm:^18.16.18": 2865"@types/node@npm:*":
2445 version: 18.16.18 2866 version: 20.5.6
2446 resolution: "@types/node@npm:18.16.18" 2867 resolution: "@types/node@npm:20.5.6"
2447 checksum: b6097e7cd65bcfc9fefcf79c4e2360ed7d3dfb64f628a010c45303d56d41cef7f9b65289ad2a86c97f1b98fa26ea74126d8dc864582951166236814fd30395a5 2868 checksum: 27534a00f46ef0aab0a9ba717fdf23f2a32152e576a8c7971eb98cdcbae82cb331903a6a826124de6eb90b970f02bba9f0353fad3ad92b0c65ee2379f1f1b692
2869 languageName: node
2870 linkType: hard
2871
2872"@types/node@npm:^18.17.15":
2873 version: 18.17.15
2874 resolution: "@types/node@npm:18.17.15"
2875 checksum: d2a34687ef948e66e478a24cee81ddd47eba15f3b39067816fc938d201f28da3ccda02ef7cfc875d65e83800d3f0029231e5e0fe88b290bb111397530c1d067e
2448 languageName: node 2876 languageName: node
2449 linkType: hard 2877 linkType: hard
2450 2878
2451"@types/parse-json@npm:^4.0.0": 2879"@types/parse-json@npm:^4.0.0":
2452 version: 4.0.0 2880 version: 4.0.0
2453 resolution: "@types/parse-json@npm:4.0.0" 2881 resolution: "@types/parse-json@npm:4.0.0"
2454 checksum: bea37b307bdeb352d27a4467cac738387641c4f9dfe6c8bf559d474a036952f7b998f0ac54290f9d8765fb79e154f3941dfefbb47296a987fb55ccedf344a0e6 2882 checksum: 1d3012ab2fcdad1ba313e1d065b737578f6506c8958e2a7a5bdbdef517c7e930796cb1599ee067d5dee942fb3a764df64b5eef7e9ae98548d776e86dcffba985
2455 languageName: node 2883 languageName: node
2456 linkType: hard 2884 linkType: hard
2457 2885
2458"@types/prettier@npm:^2.7.3": 2886"@types/pnpapi@npm:^0.0.2":
2459 version: 2.7.3 2887 version: 0.0.2
2460 resolution: "@types/prettier@npm:2.7.3" 2888 resolution: "@types/pnpapi@npm:0.0.2"
2461 checksum: 940c06437f23a12b88ae7d36c40a35dd3ee8cc22f8bc1cba972bcc69904162331ef2fdfafc9cc46762475047194321c0c40ee9285e779353116018c1eeae2b4c 2889 checksum: 4851d742f44dd7d682b27956aec0444a6837114cc9b32fc2830d4cd32959bede3a18c18c659ea0549fdc3e18f2e2d4c1bea08383b1a72f4689491471836fad48
2462 languageName: node 2890 languageName: node
2463 linkType: hard 2891 linkType: hard
2464 2892
2465"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.5": 2893"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.5":
2466 version: 15.7.5 2894 version: 15.7.5
2467 resolution: "@types/prop-types@npm:15.7.5" 2895 resolution: "@types/prop-types@npm:15.7.5"
2468 checksum: a6e04a01e1f632cc3fa5fffd79779f2f83a8fec1293cdf29b5a02aa4e1a1b38a124e824205a40de4e66532a0fa33c4f60337b55cec635080ea2571e55910460f 2896 checksum: 648aae41423821c61c83823ae36116c8d0f68258f8b609bdbc257752dcd616438d6343d554262aa9a7edaee5a19aca2e028a74fa2d0f40fffaf2816bc7056857
2469 languageName: node 2897 languageName: node
2470 linkType: hard 2898 linkType: hard
2471 2899
2472"@types/react-dom@npm:^18.2.5": 2900"@types/react-dom@npm:^18.2.7":
2473 version: 18.2.5 2901 version: 18.2.7
2474 resolution: "@types/react-dom@npm:18.2.5" 2902 resolution: "@types/react-dom@npm:18.2.7"
2475 dependencies: 2903 dependencies:
2476 "@types/react": "npm:*" 2904 "@types/react": "npm:*"
2477 checksum: 7ae5eeb0c9c9aee7eaac10b2afe527774518a4c6e33c84822fc69911ac929c76bb2882585e9052f2ee99b9588924f05f5fd983bfe181b0385f290e5940a0a754 2905 checksum: bd090f5e1b13765fbc191d9eb720dd152d26c20558221963009189c4636ce11e4c1c976e4cde4a74335f997a2be651af27d3727474a8091424101a83a71eebfb
2478 languageName: node 2906 languageName: node
2479 linkType: hard 2907 linkType: hard
2480 2908
2481"@types/react-is@npm:^18.2.0": 2909"@types/react-is@npm:^18.2.1":
2482 version: 18.2.0 2910 version: 18.2.1
2483 resolution: "@types/react-is@npm:18.2.0" 2911 resolution: "@types/react-is@npm:18.2.1"
2484 dependencies: 2912 dependencies:
2485 "@types/react": "npm:*" 2913 "@types/react": "npm:*"
2486 checksum: 5e5f7c9ce0287ddfa83d39ea26bfab64eed0c75f862f65804de9667accfb18da356c3c2677e1e660206278d93bcc40f5904b47ec272a9d9cd640ceef224bcb4b 2914 checksum: 0d426ef34c23383760c718b9902a8262099ff81466685034594bf3b7a183356627806ba19610b16da51358f6389f1d83e6f843b7781c39218cfc7f4da5536e8b
2487 languageName: node 2915 languageName: node
2488 linkType: hard 2916 linkType: hard
2489 2917
@@ -2492,18 +2920,18 @@ __metadata:
2492 resolution: "@types/react-transition-group@npm:4.4.6" 2920 resolution: "@types/react-transition-group@npm:4.4.6"
2493 dependencies: 2921 dependencies:
2494 "@types/react": "npm:*" 2922 "@types/react": "npm:*"
2495 checksum: 67cb6a41704655d5cc1708952b13cbfad74911290928a78a0f27febd3798d2d2838fb501d54439ddac684cb08f26f47d8099f7a8028f52c67264226e105bb128 2923 checksum: 154dc4e94738cff0b2fa183331427c0de3d8daac44a9b79c27aa8a95b78adde44b9f70db8a374399eabe1d44ca50304b1d7bbaeadca0fbdf6f2a91f6f9eb343d
2496 languageName: node 2924 languageName: node
2497 linkType: hard 2925 linkType: hard
2498 2926
2499"@types/react@npm:*, @types/react@npm:^18.2.12": 2927"@types/react@npm:*, @types/react@npm:^18.2.21":
2500 version: 18.2.12 2928 version: 18.2.21
2501 resolution: "@types/react@npm:18.2.12" 2929 resolution: "@types/react@npm:18.2.21"
2502 dependencies: 2930 dependencies:
2503 "@types/prop-types": "npm:*" 2931 "@types/prop-types": "npm:*"
2504 "@types/scheduler": "npm:*" 2932 "@types/scheduler": "npm:*"
2505 csstype: "npm:^3.0.2" 2933 csstype: "npm:^3.0.2"
2506 checksum: 870d0ada47889869660333555d45e8d19befb267c2c0de95995df428a714e5ab71b8cda4b59b01ed0f586da8b9eb7e93cd2baa6212a6563ebc0f664e9160e297 2934 checksum: 5b5aff55d38c358a50108dddb24e06d344e4d578cc177dd2e24a7c5d0fadb034298e5e652b174053b5e75f0d6b0d9f926976c1c9f5e84fe94bb91348c54f5313
2507 languageName: node 2935 languageName: node
2508 linkType: hard 2936 linkType: hard
2509 2937
@@ -2512,149 +2940,150 @@ __metadata:
2512 resolution: "@types/resolve@npm:1.17.1" 2940 resolution: "@types/resolve@npm:1.17.1"
2513 dependencies: 2941 dependencies:
2514 "@types/node": "npm:*" 2942 "@types/node": "npm:*"
2515 checksum: 63e8c26912ee693a069521cbaa9f58f1fa7951d8b611fa96ff9d5a1802ead7e162e2815eed75cc5f93af1285b562989b3c6ac4475b8e872c926e4189da0afd9b 2943 checksum: 6eeb9c27d99bf4b393bf168d43208f63e78cefca5644662a0bdb2bdbf8352386f4f3aca66add138fc41bce5f66fd48a0de430a1473f11b612fbed0375ae78031
2516 languageName: node 2944 languageName: node
2517 linkType: hard 2945 linkType: hard
2518 2946
2519"@types/scheduler@npm:*": 2947"@types/scheduler@npm:*":
2520 version: 0.16.2 2948 version: 0.16.2
2521 resolution: "@types/scheduler@npm:0.16.2" 2949 resolution: "@types/scheduler@npm:0.16.2"
2522 checksum: 223d9b12d1eff3fe857e7eb967d640707c2a76ba1126633bae88dce7693301ea8edcce83586a17134a1822f01265f715809860085547b01db8de6a90f5165706 2950 checksum: 89a3a922f03609b61c270d534226791edeedcb1b06f0225d5543ac17830254624ef9d8a97ad05418e4ce549dd545bddf1ff28cb90658ff10721ad14556ca68a5
2523 languageName: node 2951 languageName: node
2524 linkType: hard 2952 linkType: hard
2525 2953
2526"@types/semver@npm:^7.3.12": 2954"@types/semver@npm:^7.5.0":
2527 version: 7.3.12 2955 version: 7.5.0
2528 resolution: "@types/semver@npm:7.3.12" 2956 resolution: "@types/semver@npm:7.5.0"
2529 checksum: 35ae8150669b266e91d64c514415e69eabedb4d969aa61056b21028d9f35fdb856d745274d163a8c3a72650cd9abbfd78e878a28b79f41894da585a7d7c8229c 2957 checksum: ca4ba4642b5972b6e88e73c5bc02bbaceb8d76bce71748d86e3e95042d4e5a44603113a1dcd2cb9b73ad6f91f6e4ab73185eb41bbfc9c73b11f0ed3db3b7443a
2530 languageName: node 2958 languageName: node
2531 linkType: hard 2959 linkType: hard
2532 2960
2533"@types/trusted-types@npm:^2.0.2": 2961"@types/trusted-types@npm:^2.0.2":
2534 version: 2.0.2 2962 version: 2.0.2
2535 resolution: "@types/trusted-types@npm:2.0.2" 2963 resolution: "@types/trusted-types@npm:2.0.2"
2536 checksum: 0e106fb83a7bb427e24f458f96c957af6e3bae4603cac3635093060c9c3175b5a08d0905c890c595f5de65a03613b74d6f04612c940cac28cd5c43fad80c242e 2964 checksum: 8c5253d7a297ba375b1dff7704013fb8d31c08c681d257db9e7e0624309cbb4a1e0c916bdd5a8c378992391126af0adb731720ba7642244a2f2c1ff42aba5bcf
2537 languageName: node 2965 languageName: node
2538 linkType: hard 2966 linkType: hard
2539 2967
2540"@typescript-eslint/eslint-plugin@npm:^5.59.11": 2968"@typescript-eslint/eslint-plugin@npm:^6.7.0":
2541 version: 5.59.11 2969 version: 6.7.0
2542 resolution: "@typescript-eslint/eslint-plugin@npm:5.59.11" 2970 resolution: "@typescript-eslint/eslint-plugin@npm:6.7.0"
2543 dependencies: 2971 dependencies:
2544 "@eslint-community/regexpp": "npm:^4.4.0" 2972 "@eslint-community/regexpp": "npm:^4.5.1"
2545 "@typescript-eslint/scope-manager": "npm:5.59.11" 2973 "@typescript-eslint/scope-manager": "npm:6.7.0"
2546 "@typescript-eslint/type-utils": "npm:5.59.11" 2974 "@typescript-eslint/type-utils": "npm:6.7.0"
2547 "@typescript-eslint/utils": "npm:5.59.11" 2975 "@typescript-eslint/utils": "npm:6.7.0"
2976 "@typescript-eslint/visitor-keys": "npm:6.7.0"
2548 debug: "npm:^4.3.4" 2977 debug: "npm:^4.3.4"
2549 grapheme-splitter: "npm:^1.0.4" 2978 graphemer: "npm:^1.4.0"
2550 ignore: "npm:^5.2.0" 2979 ignore: "npm:^5.2.4"
2551 natural-compare-lite: "npm:^1.4.0" 2980 natural-compare: "npm:^1.4.0"
2552 semver: "npm:^7.3.7" 2981 semver: "npm:^7.5.4"
2553 tsutils: "npm:^3.21.0" 2982 ts-api-utils: "npm:^1.0.1"
2554 peerDependencies: 2983 peerDependencies:
2555 "@typescript-eslint/parser": ^5.0.0 2984 "@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha
2556 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 2985 eslint: ^7.0.0 || ^8.0.0
2557 peerDependenciesMeta: 2986 peerDependenciesMeta:
2558 typescript: 2987 typescript:
2559 optional: true 2988 optional: true
2560 checksum: 948e8c47bece0b81718f1423930376ea81fe95009c6175fdffef924773b0cece38737907f90de939a12eb802102b0ccc901b3c8f0df060d6687cf4369c0c1122 2989 checksum: f78a8de1311776bb3dd614f4a7d9cb098601ea0ccc1bec2317518794c473a813ccc58262304b999170720c16c280b56b928ba98aaa1c6a2ff9e73b7a7f9a831a
2561 languageName: node 2990 languageName: node
2562 linkType: hard 2991 linkType: hard
2563 2992
2564"@typescript-eslint/parser@npm:^5.59.11": 2993"@typescript-eslint/parser@npm:^6.7.0":
2565 version: 5.59.11 2994 version: 6.7.0
2566 resolution: "@typescript-eslint/parser@npm:5.59.11" 2995 resolution: "@typescript-eslint/parser@npm:6.7.0"
2567 dependencies: 2996 dependencies:
2568 "@typescript-eslint/scope-manager": "npm:5.59.11" 2997 "@typescript-eslint/scope-manager": "npm:6.7.0"
2569 "@typescript-eslint/types": "npm:5.59.11" 2998 "@typescript-eslint/types": "npm:6.7.0"
2570 "@typescript-eslint/typescript-estree": "npm:5.59.11" 2999 "@typescript-eslint/typescript-estree": "npm:6.7.0"
3000 "@typescript-eslint/visitor-keys": "npm:6.7.0"
2571 debug: "npm:^4.3.4" 3001 debug: "npm:^4.3.4"
2572 peerDependencies: 3002 peerDependencies:
2573 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 3003 eslint: ^7.0.0 || ^8.0.0
2574 peerDependenciesMeta: 3004 peerDependenciesMeta:
2575 typescript: 3005 typescript:
2576 optional: true 3006 optional: true
2577 checksum: 3e9b4326721b02d6aa9dad73806e5f34ef26b9e9dc12245a8d5601116de056b5449ea6d39c04fcbf1ba4b7edaf840e5e3623840d1ea92f96e65f4eb1856ecc60 3007 checksum: 2b15d9b1624b68ea0e17f401809d1a6e5f212ff922c45a0e63bf9bc584c1a5608a461f1c5f3d781f2060556ec512b7d957d5162848c957b96f54f485e128a93b
2578 languageName: node 3008 languageName: node
2579 linkType: hard 3009 linkType: hard
2580 3010
2581"@typescript-eslint/scope-manager@npm:5.59.11": 3011"@typescript-eslint/scope-manager@npm:6.7.0":
2582 version: 5.59.11 3012 version: 6.7.0
2583 resolution: "@typescript-eslint/scope-manager@npm:5.59.11" 3013 resolution: "@typescript-eslint/scope-manager@npm:6.7.0"
2584 dependencies: 3014 dependencies:
2585 "@typescript-eslint/types": "npm:5.59.11" 3015 "@typescript-eslint/types": "npm:6.7.0"
2586 "@typescript-eslint/visitor-keys": "npm:5.59.11" 3016 "@typescript-eslint/visitor-keys": "npm:6.7.0"
2587 checksum: 92d4d163c2e2ff76df70511d511dfc8be14a3b47b4b35f3561d3388c6ebca0c4fc72cb9c8b91160ddc12a67f5848779fbcdab339e6b7cfb6b1b50b28658d6607 3017 checksum: c4cfb790c61eec7e1b6309eb6cc7d863b4d3dfc84e844dfee9fe21ddc86e68b4fde1f70ef5f26ce7c0f66b73f410d51c2f80b97dc697b77aef1f54b9fbbd23c4
2588 languageName: node 3018 languageName: node
2589 linkType: hard 3019 linkType: hard
2590 3020
2591"@typescript-eslint/type-utils@npm:5.59.11": 3021"@typescript-eslint/type-utils@npm:6.7.0":
2592 version: 5.59.11 3022 version: 6.7.0
2593 resolution: "@typescript-eslint/type-utils@npm:5.59.11" 3023 resolution: "@typescript-eslint/type-utils@npm:6.7.0"
2594 dependencies: 3024 dependencies:
2595 "@typescript-eslint/typescript-estree": "npm:5.59.11" 3025 "@typescript-eslint/typescript-estree": "npm:6.7.0"
2596 "@typescript-eslint/utils": "npm:5.59.11" 3026 "@typescript-eslint/utils": "npm:6.7.0"
2597 debug: "npm:^4.3.4" 3027 debug: "npm:^4.3.4"
2598 tsutils: "npm:^3.21.0" 3028 ts-api-utils: "npm:^1.0.1"
2599 peerDependencies: 3029 peerDependencies:
2600 eslint: "*" 3030 eslint: ^7.0.0 || ^8.0.0
2601 peerDependenciesMeta: 3031 peerDependenciesMeta:
2602 typescript: 3032 typescript:
2603 optional: true 3033 optional: true
2604 checksum: 227611087687a10da8203236f3efafd3e8d7f122e59e8e81c2651bb004fe652cab0d2043ed9597aac52c5d7fdc31927d4121ebea7d3969d5a6cd92076b8d5206 3034 checksum: 40eff7625ae7a9d32cf3e413891196ab32ef6472eef563e191fa388b3f717515e43395de34e80c763a9e4e36e71494df19a04ad3d0bb4db1df5e8833c5c6b337
2605 languageName: node 3035 languageName: node
2606 linkType: hard 3036 linkType: hard
2607 3037
2608"@typescript-eslint/types@npm:5.59.11": 3038"@typescript-eslint/types@npm:6.7.0":
2609 version: 5.59.11 3039 version: 6.7.0
2610 resolution: "@typescript-eslint/types@npm:5.59.11" 3040 resolution: "@typescript-eslint/types@npm:6.7.0"
2611 checksum: 93b43e9c690b67bb5bb072efa0cffae723c01359233b1fffafc09a34d40be6214a374621555296561c24be10154278588f2febabf31d100e9b08dcdb1d7f37e6 3041 checksum: 7d79d5dafa8003de00721e0c6983dc24bfee249b9d2e072044f3a4ec5d85aa90c7d095531dc081f4da607e2ad8aa67a6f401fa840b5a3b3eea05d8ac6bb6a006
2612 languageName: node 3042 languageName: node
2613 linkType: hard 3043 linkType: hard
2614 3044
2615"@typescript-eslint/typescript-estree@npm:5.59.11": 3045"@typescript-eslint/typescript-estree@npm:6.7.0":
2616 version: 5.59.11 3046 version: 6.7.0
2617 resolution: "@typescript-eslint/typescript-estree@npm:5.59.11" 3047 resolution: "@typescript-eslint/typescript-estree@npm:6.7.0"
2618 dependencies: 3048 dependencies:
2619 "@typescript-eslint/types": "npm:5.59.11" 3049 "@typescript-eslint/types": "npm:6.7.0"
2620 "@typescript-eslint/visitor-keys": "npm:5.59.11" 3050 "@typescript-eslint/visitor-keys": "npm:6.7.0"
2621 debug: "npm:^4.3.4" 3051 debug: "npm:^4.3.4"
2622 globby: "npm:^11.1.0" 3052 globby: "npm:^11.1.0"
2623 is-glob: "npm:^4.0.3" 3053 is-glob: "npm:^4.0.3"
2624 semver: "npm:^7.3.7" 3054 semver: "npm:^7.5.4"
2625 tsutils: "npm:^3.21.0" 3055 ts-api-utils: "npm:^1.0.1"
2626 peerDependenciesMeta: 3056 peerDependenciesMeta:
2627 typescript: 3057 typescript:
2628 optional: true 3058 optional: true
2629 checksum: eea170d64d20e4cb87097f2014391cc065e4f2d2c2e704a90e13d672b3368f1d3e6909a5b656572f2ab37741f96d624854038ef5070aaf6630a34afac800a5af 3059 checksum: 61a9a6988e706c23796bb2a3dce063c216c78cdca62a54268c54a8ebe784794791fde52cf07204f1c026e4d06dee3efd732138a93bd5e6f6d87bc51c0c9c13ca
2630 languageName: node 3060 languageName: node
2631 linkType: hard 3061 linkType: hard
2632 3062
2633"@typescript-eslint/utils@npm:5.59.11": 3063"@typescript-eslint/utils@npm:6.7.0":
2634 version: 5.59.11 3064 version: 6.7.0
2635 resolution: "@typescript-eslint/utils@npm:5.59.11" 3065 resolution: "@typescript-eslint/utils@npm:6.7.0"
2636 dependencies: 3066 dependencies:
2637 "@eslint-community/eslint-utils": "npm:^4.2.0" 3067 "@eslint-community/eslint-utils": "npm:^4.4.0"
2638 "@types/json-schema": "npm:^7.0.9" 3068 "@types/json-schema": "npm:^7.0.12"
2639 "@types/semver": "npm:^7.3.12" 3069 "@types/semver": "npm:^7.5.0"
2640 "@typescript-eslint/scope-manager": "npm:5.59.11" 3070 "@typescript-eslint/scope-manager": "npm:6.7.0"
2641 "@typescript-eslint/types": "npm:5.59.11" 3071 "@typescript-eslint/types": "npm:6.7.0"
2642 "@typescript-eslint/typescript-estree": "npm:5.59.11" 3072 "@typescript-eslint/typescript-estree": "npm:6.7.0"
2643 eslint-scope: "npm:^5.1.1" 3073 semver: "npm:^7.5.4"
2644 semver: "npm:^7.3.7"
2645 peerDependencies: 3074 peerDependencies:
2646 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 3075 eslint: ^7.0.0 || ^8.0.0
2647 checksum: de8ae9ec3ef6fd85ac243b5d5f34c1e7e9250452ada60049c15f1128c2654cd6ae19d1ca902000364dc230763492b1a08e213a36be7827ed49a29fa3ec325cf4 3076 checksum: c8ca9c3c078d7adc2da241046821627c6283a23aece46ee9f6c2464217190efb7838e6a669ca8b194693a6975c2dcbbda45e1376959c30a6be6953ab19d1268d
2648 languageName: node 3077 languageName: node
2649 linkType: hard 3078 linkType: hard
2650 3079
2651"@typescript-eslint/visitor-keys@npm:5.59.11": 3080"@typescript-eslint/visitor-keys@npm:6.7.0":
2652 version: 5.59.11 3081 version: 6.7.0
2653 resolution: "@typescript-eslint/visitor-keys@npm:5.59.11" 3082 resolution: "@typescript-eslint/visitor-keys@npm:6.7.0"
2654 dependencies: 3083 dependencies:
2655 "@typescript-eslint/types": "npm:5.59.11" 3084 "@typescript-eslint/types": "npm:6.7.0"
2656 eslint-visitor-keys: "npm:^3.3.0" 3085 eslint-visitor-keys: "npm:^3.4.1"
2657 checksum: 733ba3db77b0425cea1285d399eea68b25f2c546497baf0a2636fe243828bb9f9b96f404fe304700cd9bf1e7a4253549614209f1e03ad821627e476be2602a21 3086 checksum: 44405ba105d91f47387346c025bfbbefec111b3d7effcb97e47ac179bbc8717ccb3f129d9fa0545c3f56916706362f1b6f0c2ff2bad73b58cfdf2c71ed8cf982
2658 languageName: node 3087 languageName: node
2659 linkType: hard 3088 linkType: hard
2660 3089
@@ -2665,56 +3094,56 @@ __metadata:
2665 "@swc/core": "npm:^1.3.61" 3094 "@swc/core": "npm:^1.3.61"
2666 peerDependencies: 3095 peerDependencies:
2667 vite: ^4 3096 vite: ^4
2668 checksum: f99a8859f81fae07e5991790a65700612e2f118f37716999d6b18e84bea9329f5d7d0d9d6aaddd19149c198d3e9c22f862a100c2a29ab35e54da3bc60a36e919 3097 checksum: 8544023de3dc605d00f66db10de085b2a90887111657db87dd192e02ffc1e4a191b09d58180b4ba498858f01e8861d15e216d744e0f6dfad2550065999890fb2
2669 languageName: node 3098 languageName: node
2670 linkType: hard 3099 linkType: hard
2671 3100
2672"@xstate/cli@npm:^0.5.1": 3101"@xstate/cli@npm:^0.5.2":
2673 version: 0.5.1 3102 version: 0.5.2
2674 resolution: "@xstate/cli@npm:0.5.1" 3103 resolution: "@xstate/cli@npm:0.5.2"
2675 dependencies: 3104 dependencies:
2676 "@babel/core": "npm:^7.21.4" 3105 "@babel/core": "npm:^7.21.4"
2677 "@xstate/machine-extractor": "npm:^0.9.0" 3106 "@xstate/machine-extractor": "npm:^0.10.0"
2678 "@xstate/tools-shared": "npm:^3.0.0" 3107 "@xstate/tools-shared": "npm:^3.0.1"
2679 chokidar: "npm:^3.5.3" 3108 chokidar: "npm:^3.5.3"
2680 commander: "npm:^8.0.0" 3109 commander: "npm:^8.0.0"
2681 prettier: "npm:^2.8.7" 3110 prettier: "npm:^2.8.7"
2682 xstate: "npm:^4.33.4" 3111 xstate: "npm:^4.33.4"
2683 bin: 3112 bin:
2684 xstate: bin/bin.js 3113 xstate: bin/bin.js
2685 checksum: 6bd0f997c821cce510b3b2ba7263dd29eb9ee3c3510c1f5f5e0ad502976eafe335cf59234ace67d192c3a23d1e6194190b92144ccec9b373686b5900e151e233 3114 checksum: a398458d950f3d6bc3ae8c4bd2c1602637e4a936145346cce37d7168bb0466e7f995d8cf2a6e06394387574e09e84cef248c5ce94eac8b52d51d59efd4600e94
2686 languageName: node 3115 languageName: node
2687 linkType: hard 3116 linkType: hard
2688 3117
2689"@xstate/machine-extractor@npm:^0.9.0": 3118"@xstate/machine-extractor@npm:^0.10.0":
2690 version: 0.9.0 3119 version: 0.10.0
2691 resolution: "@xstate/machine-extractor@npm:0.9.0" 3120 resolution: "@xstate/machine-extractor@npm:0.10.0"
2692 dependencies: 3121 dependencies:
2693 "@babel/parser": "npm:^7.19.4" 3122 "@babel/parser": "npm:^7.21.4"
2694 "@babel/traverse": "npm:^7.19.4" 3123 "@babel/traverse": "npm:^7.21.4"
2695 "@babel/types": "npm:^7.19.4" 3124 "@babel/types": "npm:^7.21.4"
2696 recast: "npm:^0.21.2" 3125 recast: "npm:^0.23.1"
2697 peerDependencies: 3126 peerDependencies:
2698 xstate: ^4 3127 xstate: ^4
2699 checksum: 15e90137e816bee994f5ba2ffe84ad2a03f63fdbeb36358db9c572e4a9b426958db88f7777f8eda9771da242c60e00b70705666ff315e05c499fd155687563c7 3128 checksum: 058f301536e8e3622e6748dd5a2956414777b0f5ba1322fbbdeade89701ce8bc2a4612bc98c402aeb70d863bfb14c22d01208dfea48f320884ce9e67c0211322
2700 languageName: node 3129 languageName: node
2701 linkType: hard 3130 linkType: hard
2702 3131
2703"@xstate/tools-shared@npm:^3.0.0": 3132"@xstate/tools-shared@npm:^3.0.1":
2704 version: 3.0.0 3133 version: 3.0.1
2705 resolution: "@xstate/tools-shared@npm:3.0.0" 3134 resolution: "@xstate/tools-shared@npm:3.0.1"
2706 dependencies: 3135 dependencies:
2707 "@xstate/machine-extractor": "npm:^0.9.0" 3136 "@xstate/machine-extractor": "npm:^0.10.0"
2708 peerDependencies: 3137 peerDependencies:
2709 xstate: ^4 3138 xstate: ^4
2710 checksum: c200f68c8f569a222cbc502d84d1b0a19186055912c8e271e034f411845521894b11c5462faf41a6454cd3e43a2b6d1a61c97a8a26cf736964fbe5abf1c19519 3139 checksum: 4cc39c44a31877aa548ef338f84fdcf50455a0533f85dd9aeeec933a71522a144698c8e5d1ab722bdd37dbdb4083e76727e43090bb0a8ead231a9d3b913a77cd
2711 languageName: node 3140 languageName: node
2712 linkType: hard 3141 linkType: hard
2713 3142
2714"abbrev@npm:^1.0.0": 3143"abbrev@npm:^1.0.0":
2715 version: 1.1.1 3144 version: 1.1.1
2716 resolution: "abbrev@npm:1.1.1" 3145 resolution: "abbrev@npm:1.1.1"
2717 checksum: 76e7fb9283b13208d5cf55df46669f9cf5e72007cb66595849be2d5e96c0a43704132d030c5705f9447266183986e1e8a4fc3e9578cb60a1f19cf0157664f957 3146 checksum: 3f762677702acb24f65e813070e306c61fafe25d4b2583f9dfc935131f774863f3addd5741572ed576bd69cabe473c5af18e1e108b829cb7b6b4747884f726e6
2718 languageName: node 3147 languageName: node
2719 linkType: hard 3148 linkType: hard
2720 3149
@@ -2723,16 +3152,16 @@ __metadata:
2723 resolution: "acorn-jsx@npm:5.3.2" 3152 resolution: "acorn-jsx@npm:5.3.2"
2724 peerDependencies: 3153 peerDependencies:
2725 acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 3154 acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
2726 checksum: 868f313daf8fcab419af9bbde57a739f127bf926856c7d3f2eb7d0d5153a0658331bfe3fd4d185687447538ef4154317e003ca25a9cf5cb4eb69c956740caee8 3155 checksum: 4c54868fbef3b8d58927d5e33f0a4de35f59012fe7b12cf9dfbb345fb8f46607709e1c4431be869a23fb63c151033d84c4198fa9f79385cec34fcb1dd53974c1
2727 languageName: node 3156 languageName: node
2728 linkType: hard 3157 linkType: hard
2729 3158
2730"acorn@npm:^8.8.0, acorn@npm:^8.8.2": 3159"acorn@npm:^8.8.2, acorn@npm:^8.9.0":
2731 version: 8.9.0 3160 version: 8.10.0
2732 resolution: "acorn@npm:8.9.0" 3161 resolution: "acorn@npm:8.10.0"
2733 bin: 3162 bin:
2734 acorn: bin/acorn 3163 acorn: bin/acorn
2735 checksum: 82583d7017e93fbbf49b7fd808c7a41ea8756838f8477a7647c3fbb26482e7be98828e44e1a248bab45621057b35cc77d454b26f109b1461e755516d4278d35f 3164 checksum: deaeebfbea6e40f6c0e1070e9b0e16e76ba484de54cbd735914d1d41d19169a450de8630b7a3a0c4e271a3b0c0b075a3427ad1a40d8a69f8747c0e8cb02ee3e2
2736 languageName: node 3165 languageName: node
2737 linkType: hard 3166 linkType: hard
2738 3167
@@ -2741,18 +3170,16 @@ __metadata:
2741 resolution: "agent-base@npm:6.0.2" 3170 resolution: "agent-base@npm:6.0.2"
2742 dependencies: 3171 dependencies:
2743 debug: "npm:4" 3172 debug: "npm:4"
2744 checksum: 2d0cdeccfe3058cb18661db3bcbb6cc092144eaecd7da3ee4321be0490d5654e53dbd08c28690d83f55f791b0369819f5872ee5122a2aad0a39edbc51798f01b 3173 checksum: dc4f757e40b5f3e3d674bc9beb4f1048f4ee83af189bae39be99f57bf1f48dde166a8b0a5342a84b5944ee8e6ed1e5a9d801858f4ad44764e84957122fe46261
2745 languageName: node 3174 languageName: node
2746 linkType: hard 3175 linkType: hard
2747 3176
2748"agentkeepalive@npm:^4.2.1": 3177"agentkeepalive@npm:^4.2.1":
2749 version: 4.3.0 3178 version: 4.5.0
2750 resolution: "agentkeepalive@npm:4.3.0" 3179 resolution: "agentkeepalive@npm:4.5.0"
2751 dependencies: 3180 dependencies:
2752 debug: "npm:^4.1.0"
2753 depd: "npm:^2.0.0"
2754 humanize-ms: "npm:^1.2.1" 3181 humanize-ms: "npm:^1.2.1"
2755 checksum: b3cce4e2faf86c01bad23b471a67f4aa2e6001b833bc2f63a3d5a8b2a671636f8aac7d215e6f8243ce1c07c7a5d8d5fa90ab894ff0d9f0c3e05c2cda801103fb 3182 checksum: 394ea19f9710f230722996e156607f48fdf3a345133b0b1823244b7989426c16019a428b56c82d3eabef616e938812981d9009f4792ecc66bd6a59e991c62612
2756 languageName: node 3183 languageName: node
2757 linkType: hard 3184 linkType: hard
2758 3185
@@ -2762,11 +3189,11 @@ __metadata:
2762 dependencies: 3189 dependencies:
2763 clean-stack: "npm:^2.0.0" 3190 clean-stack: "npm:^2.0.0"
2764 indent-string: "npm:^4.0.0" 3191 indent-string: "npm:^4.0.0"
2765 checksum: 676b1da86a0ff06a29d9a318109752990c28aae4600f6d094845a679f388a2a246402d993d223165d208122d81823235969132dc09439de2eee50a9f48fa9db9 3192 checksum: a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039
2766 languageName: node 3193 languageName: node
2767 linkType: hard 3194 linkType: hard
2768 3195
2769"ajv@npm:^6.10.0, ajv@npm:^6.12.4": 3196"ajv@npm:^6.12.4":
2770 version: 6.12.6 3197 version: 6.12.6
2771 resolution: "ajv@npm:6.12.6" 3198 resolution: "ajv@npm:6.12.6"
2772 dependencies: 3199 dependencies:
@@ -2774,7 +3201,7 @@ __metadata:
2774 fast-json-stable-stringify: "npm:^2.0.0" 3201 fast-json-stable-stringify: "npm:^2.0.0"
2775 json-schema-traverse: "npm:^0.4.1" 3202 json-schema-traverse: "npm:^0.4.1"
2776 uri-js: "npm:^4.2.2" 3203 uri-js: "npm:^4.2.2"
2777 checksum: c8b4c5eb679d58b3b145c914cb328b49622ead05aecd2c8da490809d542d0796d558602a7988745214eff2a7642dcca784f909414cb746d7235a97a3f89fecee 3204 checksum: 41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71
2778 languageName: node 3205 languageName: node
2779 linkType: hard 3206 linkType: hard
2780 3207
@@ -2786,21 +3213,21 @@ __metadata:
2786 json-schema-traverse: "npm:^1.0.0" 3213 json-schema-traverse: "npm:^1.0.0"
2787 require-from-string: "npm:^2.0.2" 3214 require-from-string: "npm:^2.0.2"
2788 uri-js: "npm:^4.2.2" 3215 uri-js: "npm:^4.2.2"
2789 checksum: adab5a15cfce05aa97767b5f01da510f79f351021c643b5593b001dc5063aac3822d9265da94f7e39fd32cc4054277e43728aa522f83d82daca50858a5c29361 3216 checksum: ac4f72adf727ee425e049bc9d8b31d4a57e1c90da8d28bcd23d60781b12fcd6fc3d68db5df16994c57b78b94eed7988f5a6b482fd376dc5b084125e20a0a622e
2790 languageName: node 3217 languageName: node
2791 linkType: hard 3218 linkType: hard
2792 3219
2793"ansi-regex@npm:^5.0.1": 3220"ansi-regex@npm:^5.0.1":
2794 version: 5.0.1 3221 version: 5.0.1
2795 resolution: "ansi-regex@npm:5.0.1" 3222 resolution: "ansi-regex@npm:5.0.1"
2796 checksum: 627f94ee7fcc5e03186646ebd11ca2ccd954f3cb48fc6a3f42883db6bbf3df5dfba06d62647b2f72c975349fc072c5c44808b7da26d08a9313a7f304acda2efb 3223 checksum: 9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737
2797 languageName: node 3224 languageName: node
2798 linkType: hard 3225 linkType: hard
2799 3226
2800"ansi-regex@npm:^6.0.1": 3227"ansi-regex@npm:^6.0.1":
2801 version: 6.0.1 3228 version: 6.0.1
2802 resolution: "ansi-regex@npm:6.0.1" 3229 resolution: "ansi-regex@npm:6.0.1"
2803 checksum: 53669c3634190ead828055bcae5f0feff485fd8d7d05538d4f753ad56ffedb7aa5bcc93efaa8e99e4907ad970682413f2407cf4acac8deb1d408bc564bca9027 3230 checksum: cbe16dbd2c6b2735d1df7976a7070dd277326434f0212f43abf6d87674095d247968209babdaad31bb00882fa68807256ba9be340eec2f1004de14ca75f52a08
2804 languageName: node 3231 languageName: node
2805 linkType: hard 3232 linkType: hard
2806 3233
@@ -2809,7 +3236,7 @@ __metadata:
2809 resolution: "ansi-styles@npm:3.2.1" 3236 resolution: "ansi-styles@npm:3.2.1"
2810 dependencies: 3237 dependencies:
2811 color-convert: "npm:^1.9.0" 3238 color-convert: "npm:^1.9.0"
2812 checksum: 88847a8969fcf787779a2cd03e73cd85ac45cbccace293e1227445dd6452cdf11df752c5f9afdb47343439762b96ae7baad1caf848360576d60be5e92f6842ab 3239 checksum: ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b
2813 languageName: node 3240 languageName: node
2814 linkType: hard 3241 linkType: hard
2815 3242
@@ -2818,14 +3245,14 @@ __metadata:
2818 resolution: "ansi-styles@npm:4.3.0" 3245 resolution: "ansi-styles@npm:4.3.0"
2819 dependencies: 3246 dependencies:
2820 color-convert: "npm:^2.0.1" 3247 color-convert: "npm:^2.0.1"
2821 checksum: d15dab617b78cbc96f10016e929e921ad73695753de4e45a911ecee6e29aa45c71d58f1ffaf8e49889dbe726dbdb2bbe5b4e3a7bf1c517f8740ae83a29b7df25 3248 checksum: 895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041
2822 languageName: node 3249 languageName: node
2823 linkType: hard 3250 linkType: hard
2824 3251
2825"ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": 3252"ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1":
2826 version: 6.2.1 3253 version: 6.2.1
2827 resolution: "ansi-styles@npm:6.2.1" 3254 resolution: "ansi-styles@npm:6.2.1"
2828 checksum: 86fe3fc999c89775171631b32920d1fbf8adc4225895db376057b5a5e6fdcf837ae994ca08756f0a676c0dd8c74e58a7e87515d1fa16d6fcfffdf9069d579e90 3255 checksum: 5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c
2829 languageName: node 3256 languageName: node
2830 linkType: hard 3257 linkType: hard
2831 3258
@@ -2835,14 +3262,14 @@ __metadata:
2835 dependencies: 3262 dependencies:
2836 normalize-path: "npm:^3.0.0" 3263 normalize-path: "npm:^3.0.0"
2837 picomatch: "npm:^2.0.4" 3264 picomatch: "npm:^2.0.4"
2838 checksum: 0d50ce459783767bb68ce635c0a8f3e7de9843ebd6e6733accd59e13a49421a84944b8be5d68b5acecf74eca767a06229e07cae48151757744618e1a32dda0ed 3265 checksum: 57b06ae984bc32a0d22592c87384cd88fe4511b1dd7581497831c56d41939c8a001b28e7b853e1450f2bf61992dfcaa8ae2d0d161a0a90c4fb631ef07098fbac
2839 languageName: node 3266 languageName: node
2840 linkType: hard 3267 linkType: hard
2841 3268
2842"aproba@npm:^1.0.3 || ^2.0.0": 3269"aproba@npm:^1.0.3 || ^2.0.0":
2843 version: 2.0.0 3270 version: 2.0.0
2844 resolution: "aproba@npm:2.0.0" 3271 resolution: "aproba@npm:2.0.0"
2845 checksum: 02a080748877ae9a7d8973c37c688669a59971c5ec38a4c44f4a7176a52313da0b0c1e1518f80d3b80d75d0d4a16f25a4151a2316bad3db06bb34cb0245cc4fa 3272 checksum: d06e26384a8f6245d8c8896e138c0388824e259a329e0c9f196b4fa533c82502a6fd449586e3604950a0c42921832a458bb3aa0aa9f0ba449cfd4f50fd0d09b5
2846 languageName: node 3273 languageName: node
2847 linkType: hard 3274 linkType: hard
2848 3275
@@ -2852,23 +3279,23 @@ __metadata:
2852 dependencies: 3279 dependencies:
2853 delegates: "npm:^1.0.0" 3280 delegates: "npm:^1.0.0"
2854 readable-stream: "npm:^3.6.0" 3281 readable-stream: "npm:^3.6.0"
2855 checksum: 7137e25713c611cf38054434ba377e2f7ad3a4bbdb7ac3565ed5caac786080d1c86ed0b280edd917b4c1001ee0d6ed7bdd53effd69b5af4251e5a4fd18d09fbe 3282 checksum: 8373f289ba42e4b5ec713bb585acdac14b5702c75f2a458dc985b9e4fa5762bc5b46b40a21b72418a3ed0cfb5e35bdc317ef1ae132f3035f633d581dd03168c3
2856 languageName: node 3283 languageName: node
2857 linkType: hard 3284 linkType: hard
2858 3285
2859"argparse@npm:^2.0.1": 3286"argparse@npm:^2.0.1":
2860 version: 2.0.1 3287 version: 2.0.1
2861 resolution: "argparse@npm:2.0.1" 3288 resolution: "argparse@npm:2.0.1"
2862 checksum: e041432563aadcf1267e543c472a756aaf57bb020ee5280093fe3c59fdde30d8b434c8d3c83614610550572acd18198395e2c20a38b3041a400dfe551320e0fb 3289 checksum: c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e
2863 languageName: node 3290 languageName: node
2864 linkType: hard 3291 linkType: hard
2865 3292
2866"aria-query@npm:^5.1.3": 3293"aria-query@npm:^5.1.3":
2867 version: 5.2.1 3294 version: 5.3.0
2868 resolution: "aria-query@npm:5.2.1" 3295 resolution: "aria-query@npm:5.3.0"
2869 dependencies: 3296 dependencies:
2870 dequal: "npm:^2.0.3" 3297 dequal: "npm:^2.0.3"
2871 checksum: 80fffcdf6e45acd43e82e402f60d0b6bdd3771952abe431bbf274f2921c5e933d4de5ee9105732cc504631fd596772cc035e53115426f59605fb317fb8cadea3 3298 checksum: 2bff0d4eba5852a9dd578ecf47eaef0e82cc52569b48469b0aac2db5145db0b17b7a58d9e01237706d1e14b7a1b0ac9b78e9c97027ad97679dd8f91b85da1469
2872 languageName: node 3299 languageName: node
2873 linkType: hard 3300 linkType: hard
2874 3301
@@ -2878,11 +3305,11 @@ __metadata:
2878 dependencies: 3305 dependencies:
2879 call-bind: "npm:^1.0.2" 3306 call-bind: "npm:^1.0.2"
2880 is-array-buffer: "npm:^3.0.1" 3307 is-array-buffer: "npm:^3.0.1"
2881 checksum: ff6fd5a16868943441dc2b8de7c0a8b070677457f1953d13b366e6fd01d7bf187a29268412ca5115f14031d3c00cea22c832af6da61569351d9967d8a5d803cb 3308 checksum: 12f84f6418b57a954caa41654e5e63e019142a4bbb2c6829ba86d1ba65d31ccfaf1461d1743556fd32b091fac34ff44d9dfbdb001402361c45c373b2c86f5c20
2882 languageName: node 3309 languageName: node
2883 linkType: hard 3310 linkType: hard
2884 3311
2885"array-includes@npm:^3.1.5, array-includes@npm:^3.1.6": 3312"array-includes@npm:^3.1.6":
2886 version: 3.1.6 3313 version: 3.1.6
2887 resolution: "array-includes@npm:3.1.6" 3314 resolution: "array-includes@npm:3.1.6"
2888 dependencies: 3315 dependencies:
@@ -2891,14 +3318,27 @@ __metadata:
2891 es-abstract: "npm:^1.20.4" 3318 es-abstract: "npm:^1.20.4"
2892 get-intrinsic: "npm:^1.1.3" 3319 get-intrinsic: "npm:^1.1.3"
2893 is-string: "npm:^1.0.7" 3320 is-string: "npm:^1.0.7"
2894 checksum: b4eb40ff992138350675662bb5a0351553d63bef17fb64c54e2ee9d6434ff3d8ba71d511af90a8f9400cd411c7311604310bd4ead1c101638c660461ea7916ae 3321 checksum: d0caeaa57bea7d14b8480daee30cf8611899321006b15a6cd872b831bd7aaed7649f8764e060d01c5d33b8d9e998e5de5c87f4901874e1c1f467f429b7db2929
2895 languageName: node 3322 languageName: node
2896 linkType: hard 3323 linkType: hard
2897 3324
2898"array-union@npm:^2.1.0": 3325"array-union@npm:^2.1.0":
2899 version: 2.1.0 3326 version: 2.1.0
2900 resolution: "array-union@npm:2.1.0" 3327 resolution: "array-union@npm:2.1.0"
2901 checksum: 0644809ce6ada3bcf5d25379f3c96f0335dd45516da5303fcb9eb2477dc8ad222fe39be2d0b58a7bbc3207e68d714e5f592316b881e2b13a11cd705d11cc5d45 3328 checksum: 429897e68110374f39b771ec47a7161fc6a8fc33e196857c0a396dc75df0b5f65e4d046674db764330b6bb66b39ef48dd7c53b6a2ee75cfb0681e0c1a7033962
3329 languageName: node
3330 linkType: hard
3331
3332"array.prototype.findlastindex@npm:^1.2.2":
3333 version: 1.2.2
3334 resolution: "array.prototype.findlastindex@npm:1.2.2"
3335 dependencies:
3336 call-bind: "npm:^1.0.2"
3337 define-properties: "npm:^1.1.4"
3338 es-abstract: "npm:^1.20.4"
3339 es-shim-unscopables: "npm:^1.0.0"
3340 get-intrinsic: "npm:^1.1.3"
3341 checksum: b8037687a669df4dbdea33055a3817ea59bb0a6c2f17f90e4ad7c232d5edc1780e586b6ad284bcc45ff56e6861b0668c07de47bcc298018c21c0d553ab9480fd
2902 languageName: node 3342 languageName: node
2903 linkType: hard 3343 linkType: hard
2904 3344
@@ -2910,7 +3350,7 @@ __metadata:
2910 define-properties: "npm:^1.1.4" 3350 define-properties: "npm:^1.1.4"
2911 es-abstract: "npm:^1.20.4" 3351 es-abstract: "npm:^1.20.4"
2912 es-shim-unscopables: "npm:^1.0.0" 3352 es-shim-unscopables: "npm:^1.0.0"
2913 checksum: 658d1cd2a573919d0ed5c89f01f5ba54092f08e088db42ce86140a29c95de32c100b4f964dfc3eed574662a115d484007a0bbd9f865518d56f909170badbde18 3353 checksum: 8eda91d6925cc84b73ebf5a3d406ff28745d93a22ef6a0afb967755107081a937cf6c4555d3c18354870b2c5366c0ff51b3f597c11079e689869810a418b1b4f
2914 languageName: node 3354 languageName: node
2915 linkType: hard 3355 linkType: hard
2916 3356
@@ -2922,7 +3362,7 @@ __metadata:
2922 define-properties: "npm:^1.1.4" 3362 define-properties: "npm:^1.1.4"
2923 es-abstract: "npm:^1.20.4" 3363 es-abstract: "npm:^1.20.4"
2924 es-shim-unscopables: "npm:^1.0.0" 3364 es-shim-unscopables: "npm:^1.0.0"
2925 checksum: 7ce9fb7473ea95f24a19241318d5a4f5a69d262ad3352a38331ad3532880c6cca1d221cbc1527dd417535eca26d9c44be513d1a40c1097db9ebfa982ab64543f 3365 checksum: 2bd58a0e79d5d90cb4f5ef0e287edf8b28e87c65428f54025ac6b7b4c204224b92811c266f296c53a2dbc93872117c0fcea2e51d3c9e8cecfd5024d4a4a57db4
2926 languageName: node 3366 languageName: node
2927 linkType: hard 3367 linkType: hard
2928 3368
@@ -2935,51 +3375,86 @@ __metadata:
2935 es-abstract: "npm:^1.20.4" 3375 es-abstract: "npm:^1.20.4"
2936 es-shim-unscopables: "npm:^1.0.0" 3376 es-shim-unscopables: "npm:^1.0.0"
2937 get-intrinsic: "npm:^1.1.3" 3377 get-intrinsic: "npm:^1.1.3"
2938 checksum: e86770e9d6500f44eb4da8d1ee278c39d8b8d3963b7a6ca3282d96a7b017e87ae20410b74747696fd2ddd621e481bf2fde9aa1ed1718592a09534b00ffb51cb5 3378 checksum: fd5f57aca3c7ddcd1bb83965457b625f3a67d8f334f5cbdb8ac8ef33d5b0d38281524114db2936f8c08048115d5158af216c94e6ae1eb966241b9b6f4ab8a7e8
3379 languageName: node
3380 linkType: hard
3381
3382"arraybuffer.prototype.slice@npm:^1.0.1":
3383 version: 1.0.1
3384 resolution: "arraybuffer.prototype.slice@npm:1.0.1"
3385 dependencies:
3386 array-buffer-byte-length: "npm:^1.0.0"
3387 call-bind: "npm:^1.0.2"
3388 define-properties: "npm:^1.2.0"
3389 get-intrinsic: "npm:^1.2.1"
3390 is-array-buffer: "npm:^3.0.2"
3391 is-shared-array-buffer: "npm:^1.0.2"
3392 checksum: db460cb4a96c3c9e27a2a7eed5d0ab1fcfccae9fc8cd1b4883cbb03cd29060b373e0723e78b5c786fdec2025a0ab12eb840c72b2f26016bac906b91bc4e9e4db
3393 languageName: node
3394 linkType: hard
3395
3396"assert@npm:^2.0.0":
3397 version: 2.0.0
3398 resolution: "assert@npm:2.0.0"
3399 dependencies:
3400 es6-object-assign: "npm:^1.1.0"
3401 is-nan: "npm:^1.2.1"
3402 object-is: "npm:^1.0.1"
3403 util: "npm:^0.12.0"
3404 checksum: a25c7ebc07b52cc4dadd5c46d73472e7d4b86e40eb7ebaa12f78c1ba954dbe83612be5dea314b862fc364c305ab3bdbcd1c9d4ec2d92bc37214ae7d5596347f3
2939 languageName: node 3405 languageName: node
2940 linkType: hard 3406 linkType: hard
2941 3407
2942"ast-types-flow@npm:^0.0.7": 3408"ast-types-flow@npm:^0.0.7":
2943 version: 0.0.7 3409 version: 0.0.7
2944 resolution: "ast-types-flow@npm:0.0.7" 3410 resolution: "ast-types-flow@npm:0.0.7"
2945 checksum: f6f0fecb7cd2a31b964582e4a98c494e388041a6925e01e1a2d67a4c450e345d7dbd4ca9e6aaee493018ed03ecf23ce4456e4077b1a52c5c8eae35beb71111ae 3411 checksum: f381529f2da535949ba6cceddbdfaa33b4d5105842e147ec63582f560ea9ecc1a08f66457664f3109841d3053641fa8b9fa94ba607f1ea9f6c804fe5dee44a1d
2946 languageName: node 3412 languageName: node
2947 linkType: hard 3413 linkType: hard
2948 3414
2949"ast-types@npm:0.15.2": 3415"ast-types@npm:^0.16.1":
2950 version: 0.15.2 3416 version: 0.16.1
2951 resolution: "ast-types@npm:0.15.2" 3417 resolution: "ast-types@npm:0.16.1"
2952 dependencies: 3418 dependencies:
2953 tslib: "npm:^2.0.1" 3419 tslib: "npm:^2.0.1"
2954 checksum: 819bc3d2e7b269a92e37fd7665354c18d8792ce93007ff5cf4860612dce8c277f9a91aa4d42851ae8d562f62957411cb3ba4f751e07322d7e399ea7c3398ac97 3420 checksum: abcc49e42eb921a7ebc013d5bec1154651fb6dbc3f497541d488859e681256901b2990b954d530ba0da4d0851271d484f7057d5eff5e07cb73e8b10909f711bf
2955 languageName: node 3421 languageName: node
2956 linkType: hard 3422 linkType: hard
2957 3423
2958"async@npm:^3.2.3": 3424"async@npm:^3.2.3":
2959 version: 3.2.4 3425 version: 3.2.4
2960 resolution: "async@npm:3.2.4" 3426 resolution: "async@npm:3.2.4"
2961 checksum: 9719e38d24e9922c255ee9ae925fb668ef52243f9866a1b59e423a3bb6150a886b3c37287348ceefa09cd3f6fa1a29dcc770eeb70642acb13674363b2d5b2b21 3427 checksum: b5d02fed64717edf49e35b2b156debd9cf524934ea670108fa5528e7615ed66a5e0bf6c65f832c9483b63aa7f0bffe3e588ebe8d58a539b833798d324516e1c9
3428 languageName: node
3429 linkType: hard
3430
3431"asynciterator.prototype@npm:^1.0.0":
3432 version: 1.0.0
3433 resolution: "asynciterator.prototype@npm:1.0.0"
3434 dependencies:
3435 has-symbols: "npm:^1.0.3"
3436 checksum: fb76850e57d931ff59fd16b6cddb79b0d34fe45f400b2c3480d38892e72cd089787401687dbdb7cdb14ece402c275d3e02a648760d1489cd493527129c4c6204
2962 languageName: node 3437 languageName: node
2963 linkType: hard 3438 linkType: hard
2964 3439
2965"at-least-node@npm:^1.0.0": 3440"at-least-node@npm:^1.0.0":
2966 version: 1.0.0 3441 version: 1.0.0
2967 resolution: "at-least-node@npm:1.0.0" 3442 resolution: "at-least-node@npm:1.0.0"
2968 checksum: fed1be4307a3752f3a863a6e0219c58fe6838ee95c77ecafffd2a72bbfe4ff33695777e4bffe2a095ef5671c638b803a55e0d39a728c7b0afa9adaa5900444bd 3443 checksum: 4c058baf6df1bc5a1697cf182e2029c58cd99975288a13f9e70068ef5d6f4e1f1fd7c4d2c3c4912eae44797d1725be9700995736deca441b39f3e66d8dee97ef
2969 languageName: node 3444 languageName: node
2970 linkType: hard 3445 linkType: hard
2971 3446
2972"available-typed-arrays@npm:^1.0.5": 3447"available-typed-arrays@npm:^1.0.5":
2973 version: 1.0.5 3448 version: 1.0.5
2974 resolution: "available-typed-arrays@npm:1.0.5" 3449 resolution: "available-typed-arrays@npm:1.0.5"
2975 checksum: 6b301a7ec3da82181c73101395cc915c049bbcba7e5f354809dab60c5b492440929328eeb73c07431ef8e35e6fa5af505690b20ed91f548d3bac1a456d458a78 3450 checksum: c4df567ca72d2754a6cbad20088f5f98b1065b3360178169fa9b44ea101af62c0f423fc3854fa820fd6895b6b9171b8386e71558203103ff8fc2ad503fdcc660
2976 languageName: node 3451 languageName: node
2977 linkType: hard 3452 linkType: hard
2978 3453
2979"axe-core@npm:^4.6.2": 3454"axe-core@npm:^4.6.2":
2980 version: 4.7.2 3455 version: 4.7.2
2981 resolution: "axe-core@npm:4.7.2" 3456 resolution: "axe-core@npm:4.7.2"
2982 checksum: 4b4e83d68d242b8252089356d0ad3c9c56c25a11c3ef46887ad3b8e3b7b82a6c86fda4cc327ac361110619d0595a3dcae94b605f1c6b38880786883a6d123231 3457 checksum: 8dfc61f038fbd9623ae8a264c8a475d887113a027fb440a2b377b82ffd300e71d1a0bcf042ff13b517a8d548b34c44b4159eff693725c5d7cde240d0aa68feac
2983 languageName: node 3458 languageName: node
2984 linkType: hard 3459 linkType: hard
2985 3460
@@ -2988,7 +3463,7 @@ __metadata:
2988 resolution: "axobject-query@npm:3.2.1" 3463 resolution: "axobject-query@npm:3.2.1"
2989 dependencies: 3464 dependencies:
2990 dequal: "npm:^2.0.3" 3465 dequal: "npm:^2.0.3"
2991 checksum: 1df3a2188b61c6eec6fdd5e2967aa996c08220f912e82806062fb18db5a43a06907ad56dfa88571ab4a4b12dc01429653abe7196ccf854194680e9b3fe1053f3 3466 checksum: f7debc2012e456139b57d888c223f6d3cb4b61eb104164a85e3d346273dd6ef0bc9a04b6660ca9407704a14a8e05fa6b6eb9d55f44f348c7210de7ffb350c3a7
2992 languageName: node 3467 languageName: node
2993 linkType: hard 3468 linkType: hard
2994 3469
@@ -2997,7 +3472,7 @@ __metadata:
2997 resolution: "babel-plugin-dynamic-import-node@npm:2.3.3" 3472 resolution: "babel-plugin-dynamic-import-node@npm:2.3.3"
2998 dependencies: 3473 dependencies:
2999 object.assign: "npm:^4.1.0" 3474 object.assign: "npm:^4.1.0"
3000 checksum: 1c608f6dcf3cbb31222304bb8ae04ae0ed9b62f09692b29ab98f58cbc318305d9d2926467542b3f7efafb187a39c3fb4ea88562c2d5773d4fec5deb7825b0a36 3475 checksum: 1bd80df981e1fc1aff0cd4e390cf27aaa34f95f7620cd14dff07ba3bad56d168c098233a7d2deb2c9b1dc13643e596a6b94fc608a3412ee3c56e74a25cd2167e
3001 languageName: node 3476 languageName: node
3002 linkType: hard 3477 linkType: hard
3003 3478
@@ -3008,7 +3483,7 @@ __metadata:
3008 "@babel/runtime": "npm:^7.12.5" 3483 "@babel/runtime": "npm:^7.12.5"
3009 cosmiconfig: "npm:^7.0.0" 3484 cosmiconfig: "npm:^7.0.0"
3010 resolve: "npm:^1.19.0" 3485 resolve: "npm:^1.19.0"
3011 checksum: da60b82112080f124097bc2cb4250b14d2bce799adf007ad5f70f9d3539aaadca7f3b7b849c47397131b66db6b717b90e1687ef81a49b3be2a61e067dcbb434d 3486 checksum: c6dfb15de96f67871d95bd2e8c58b0c81edc08b9b087dc16755e7157f357dc1090a8dc60ebab955e92587a9101f02eba07e730adc253a1e4cf593ca3ebd3839c
3012 languageName: node 3487 languageName: node
3013 linkType: hard 3488 linkType: hard
3014 3489
@@ -3021,7 +3496,7 @@ __metadata:
3021 semver: "npm:^6.1.1" 3496 semver: "npm:^6.1.1"
3022 peerDependencies: 3497 peerDependencies:
3023 "@babel/core": ^7.0.0-0 3498 "@babel/core": ^7.0.0-0
3024 checksum: a7a7dd4b47129eadcc1cb50ab16ca9876c0353a16dbfb4a8ebe44afd5beb576bb1dc852b6819658695e5f19988517f7428cb5003d86586f977e5bbd2a982689e 3499 checksum: 21e34d4ba961de66d3fe31f3fecca5612d5db99638949766a445d37de72c1f736552fe436f3bd3792e5cc307f48e8f78a498a01e858c84946627ddb662415cc4
3025 languageName: node 3500 languageName: node
3026 linkType: hard 3501 linkType: hard
3027 3502
@@ -3033,7 +3508,7 @@ __metadata:
3033 core-js-compat: "npm:^3.21.0" 3508 core-js-compat: "npm:^3.21.0"
3034 peerDependencies: 3509 peerDependencies:
3035 "@babel/core": ^7.0.0-0 3510 "@babel/core": ^7.0.0-0
3036 checksum: 3b65d6704eb3f81f374d5da1119e9c8d63b74310e44e8a314331ab8bf797a3e19ebf3e73f38ed8c19aa3e8f38b8e87b1adffe848f1c0e039a91dcf042ef6d65f 3511 checksum: 87f9eb8be5e8e115b930624c8e3e91b5396eca8d563120b0cd03853960addf587fd4cab8776ecf3a59ec94a774f214f2321a96c354a667a62fa2dc5eb122eaa0
3037 languageName: node 3512 languageName: node
3038 linkType: hard 3513 linkType: hard
3039 3514
@@ -3044,21 +3519,21 @@ __metadata:
3044 "@babel/helper-define-polyfill-provider": "npm:^0.3.3" 3519 "@babel/helper-define-polyfill-provider": "npm:^0.3.3"
3045 peerDependencies: 3520 peerDependencies:
3046 "@babel/core": ^7.0.0-0 3521 "@babel/core": ^7.0.0-0
3047 checksum: dfa6c1448285c90720cbac9a3237a1de0dce442492dfe20dd3755c7b2bc97f71f364ea1f2a7669785aaa50c058ed19998baff046de625e12da66072994a418ae 3522 checksum: bd915d51e30259201b289a58dfa46c8c1bc8827a38c275ff3134c8194d27e634d5c32ec62137d489d81c7dd5f6ea46b04057eb44b7180d06c19388e3a5f4f8c6
3048 languageName: node 3523 languageName: node
3049 linkType: hard 3524 linkType: hard
3050 3525
3051"balanced-match@npm:^1.0.0": 3526"balanced-match@npm:^1.0.0":
3052 version: 1.0.2 3527 version: 1.0.2
3053 resolution: "balanced-match@npm:1.0.2" 3528 resolution: "balanced-match@npm:1.0.2"
3054 checksum: 9ca7fca1845f06edbd8478e209a2e8eed5bb148a021719e77affeaf0c61e45af20279e4540a9f11942acc27c078fc132ff0ebc9c16a403033cff5af3d8199f40 3529 checksum: 9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee
3055 languageName: node 3530 languageName: node
3056 linkType: hard 3531 linkType: hard
3057 3532
3058"binary-extensions@npm:^2.0.0": 3533"binary-extensions@npm:^2.0.0":
3059 version: 2.2.0 3534 version: 2.2.0
3060 resolution: "binary-extensions@npm:2.2.0" 3535 resolution: "binary-extensions@npm:2.2.0"
3061 checksum: 16cf7c0cfd2d04c0d7a115473b14054d6b01c077d8894f5eadc53e0cc1a0bea512a6187b314b26c99efd0c5f02b2871ab413017916d9ecaa47fa23d0f519adc6 3536 checksum: d73d8b897238a2d3ffa5f59c0241870043aa7471335e89ea5e1ff48edb7c2d0bb471517a3e4c5c3f4c043615caa2717b5f80a5e61e07503d51dc85cb848e665d
3062 languageName: node 3537 languageName: node
3063 linkType: hard 3538 linkType: hard
3064 3539
@@ -3068,7 +3543,7 @@ __metadata:
3068 dependencies: 3543 dependencies:
3069 balanced-match: "npm:^1.0.0" 3544 balanced-match: "npm:^1.0.0"
3070 concat-map: "npm:0.0.1" 3545 concat-map: "npm:0.0.1"
3071 checksum: 5ecc6da29cd3b4d49a832fd8e48f3a8b6ac058f82fe778eb6751ed30a206c5ec5171f6f632aa1946ffb4f8151136740803f620b15edca8437a9348cbb21a8ba8 3546 checksum: 695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668
3072 languageName: node 3547 languageName: node
3073 linkType: hard 3548 linkType: hard
3074 3549
@@ -3077,7 +3552,7 @@ __metadata:
3077 resolution: "brace-expansion@npm:2.0.1" 3552 resolution: "brace-expansion@npm:2.0.1"
3078 dependencies: 3553 dependencies:
3079 balanced-match: "npm:^1.0.0" 3554 balanced-match: "npm:^1.0.0"
3080 checksum: 0f8d0d6a165d636fed93a7dd9321a5ae122cac9a672d8a9e01997e4ae09743cb3cbfb0a6e6b32303cda0f1f40617e2c0953f28f59a6f01d6d12c9698a3f0e41b 3555 checksum: b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f
3081 languageName: node 3556 languageName: node
3082 linkType: hard 3557 linkType: hard
3083 3558
@@ -3086,47 +3561,47 @@ __metadata:
3086 resolution: "braces@npm:3.0.2" 3561 resolution: "braces@npm:3.0.2"
3087 dependencies: 3562 dependencies:
3088 fill-range: "npm:^7.0.1" 3563 fill-range: "npm:^7.0.1"
3089 checksum: 1aa7f7f39e1dff23894196303515503dd945f36adcb78073ee067b421ecc595265556911183b24d1bc4e51011d3536d63d117cb4493e5123fcc7456596a93637 3564 checksum: 321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381
3090 languageName: node 3565 languageName: node
3091 linkType: hard 3566 linkType: hard
3092 3567
3093"browserslist@npm:^4.21.3, browserslist@npm:^4.21.5": 3568"browserslist@npm:^4.21.3, browserslist@npm:^4.21.9":
3094 version: 4.21.9 3569 version: 4.21.10
3095 resolution: "browserslist@npm:4.21.9" 3570 resolution: "browserslist@npm:4.21.10"
3096 dependencies: 3571 dependencies:
3097 caniuse-lite: "npm:^1.0.30001503" 3572 caniuse-lite: "npm:^1.0.30001517"
3098 electron-to-chromium: "npm:^1.4.431" 3573 electron-to-chromium: "npm:^1.4.477"
3099 node-releases: "npm:^2.0.12" 3574 node-releases: "npm:^2.0.13"
3100 update-browserslist-db: "npm:^1.0.11" 3575 update-browserslist-db: "npm:^1.0.11"
3101 bin: 3576 bin:
3102 browserslist: cli.js 3577 browserslist: cli.js
3103 checksum: 0158082dc5c14f6db834b6d46c56fafcdfb203959467f66857dd6c4167af0f95108ed101776e020f84a2bb6771a9219bf2e4f2c35776bbc651d7deaf5d3a1f60 3578 checksum: e8c98496e5f2a5128d0e2f1f186dc0416bfc49c811e568b19c9e07a56cccc1f7f415fa4f532488e6a13dfacbe3332a9b55b152082ff125402696a11a158a0894
3104 languageName: node 3579 languageName: node
3105 linkType: hard 3580 linkType: hard
3106 3581
3107"buffer-from@npm:^1.0.0": 3582"buffer-from@npm:^1.0.0":
3108 version: 1.1.2 3583 version: 1.1.2
3109 resolution: "buffer-from@npm:1.1.2" 3584 resolution: "buffer-from@npm:1.1.2"
3110 checksum: 2d8a264381325ee41959bb21bae76dc85b486f253e227a3fa70082c83f14c41665ce227ccda79e93ea2fc12e37a678fe956a6fa01b1876e6142eaf6554585ea4 3585 checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34
3111 languageName: node 3586 languageName: node
3112 linkType: hard 3587 linkType: hard
3113 3588
3114"builtin-modules@npm:^3.1.0": 3589"builtin-modules@npm:^3.1.0":
3115 version: 3.3.0 3590 version: 3.3.0
3116 resolution: "builtin-modules@npm:3.3.0" 3591 resolution: "builtin-modules@npm:3.3.0"
3117 checksum: 69bd2a742dc2aa7e69fc39b3289123e642c693705b8532ceab120e66496ec7cc599e3bd1352c09b45571910fa923c101abe8e1e36e0bc652e4397b19e6efb0e6 3592 checksum: 2cb3448b4f7306dc853632a4fcddc95e8d4e4b9868c139400027b71938fc6806d4ff44007deffb362ac85724bd40c2c6452fb6a0aa4531650eeddb98d8e5ee8a
3118 languageName: node 3593 languageName: node
3119 linkType: hard 3594 linkType: hard
3120 3595
3121"cacache@npm:^17.0.0": 3596"cacache@npm:^17.0.0":
3122 version: 17.1.3 3597 version: 17.1.4
3123 resolution: "cacache@npm:17.1.3" 3598 resolution: "cacache@npm:17.1.4"
3124 dependencies: 3599 dependencies:
3125 "@npmcli/fs": "npm:^3.1.0" 3600 "@npmcli/fs": "npm:^3.1.0"
3126 fs-minipass: "npm:^3.0.0" 3601 fs-minipass: "npm:^3.0.0"
3127 glob: "npm:^10.2.2" 3602 glob: "npm:^10.2.2"
3128 lru-cache: "npm:^7.7.1" 3603 lru-cache: "npm:^7.7.1"
3129 minipass: "npm:^5.0.0" 3604 minipass: "npm:^7.0.3"
3130 minipass-collect: "npm:^1.0.2" 3605 minipass-collect: "npm:^1.0.2"
3131 minipass-flush: "npm:^1.0.5" 3606 minipass-flush: "npm:^1.0.5"
3132 minipass-pipeline: "npm:^1.2.4" 3607 minipass-pipeline: "npm:^1.2.4"
@@ -3134,7 +3609,7 @@ __metadata:
3134 ssri: "npm:^10.0.0" 3609 ssri: "npm:^10.0.0"
3135 tar: "npm:^6.1.11" 3610 tar: "npm:^6.1.11"
3136 unique-filename: "npm:^3.0.0" 3611 unique-filename: "npm:^3.0.0"
3137 checksum: 19b4f65a5b3e3d38aac2426b39ee5f6ad4da3afa8a40991b5784a07a480585af89904e425459d3ca335dc8ff60e2a213e95d4d4bb6a038fb6854eb9c3e777121 3612 checksum: 21749dcf98c61dd570b179e51573b076c92e3f6c82166d37444242db66b92b1e6c6dc11c6059c027ac7bdef5479b513855059299cc11cda8212c49b0f69a3662
3138 languageName: node 3613 languageName: node
3139 linkType: hard 3614 linkType: hard
3140 3615
@@ -3144,14 +3619,14 @@ __metadata:
3144 dependencies: 3619 dependencies:
3145 function-bind: "npm:^1.1.1" 3620 function-bind: "npm:^1.1.1"
3146 get-intrinsic: "npm:^1.0.2" 3621 get-intrinsic: "npm:^1.0.2"
3147 checksum: 6fccea8a00310bf2e2b2a07aca0eddbdcd5de2eec9dfe880c1c8b0b7fd3c6809bf28aab0209aa530a35a2fba48587733521df7f83f8d5354047afed78b69a36b 3622 checksum: 74ba3f31e715456e22e451d8d098779b861eba3c7cac0d9b510049aced70d75c231ba05071f97e1812c98e34e2bee734c0c6126653e0088c2d9819ca047f4073
3148 languageName: node 3623 languageName: node
3149 linkType: hard 3624 linkType: hard
3150 3625
3151"callsites@npm:^3.0.0": 3626"callsites@npm:^3.0.0":
3152 version: 3.1.0 3627 version: 3.1.0
3153 resolution: "callsites@npm:3.1.0" 3628 resolution: "callsites@npm:3.1.0"
3154 checksum: a0672a95746fb1be281d90ceedafb6584dd7c33e85bb9987d6caad53ac6eb313874fc2045230e8e08ef076e4aaa899342d99bd9c47bb1dd4f6a2740b62482ca2 3629 checksum: fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301
3155 languageName: node 3630 languageName: node
3156 linkType: hard 3631 linkType: hard
3157 3632
@@ -3161,25 +3636,25 @@ __metadata:
3161 dependencies: 3636 dependencies:
3162 pascal-case: "npm:^3.1.2" 3637 pascal-case: "npm:^3.1.2"
3163 tslib: "npm:^2.0.3" 3638 tslib: "npm:^2.0.3"
3164 checksum: 825dd52d9138ece5360a71384722a5f3438ba5df9008470e12b1692b04f4de69c09164fb92ea54bc5ef5716ed6fc14732e0f39d2aad8925c3ea28a71bd2ecc3a 3639 checksum: bf9eefaee1f20edbed2e9a442a226793bc72336e2b99e5e48c6b7252b6f70b080fc46d8246ab91939e2af91c36cdd422e0af35161e58dd089590f302f8f64c8a
3165 languageName: node 3640 languageName: node
3166 linkType: hard 3641 linkType: hard
3167 3642
3168"caniuse-lite@npm:^1.0.30001503": 3643"caniuse-lite@npm:^1.0.30001517":
3169 version: 1.0.30001504 3644 version: 1.0.30001533
3170 resolution: "caniuse-lite@npm:1.0.30001504" 3645 resolution: "caniuse-lite@npm:1.0.30001533"
3171 checksum: 82f3f90a40709aec62cbc4265ad6c6ef513cc86ee9cd0f3af7d9dc2bf520516a0fe97dc24b3986b3a3bafe345b29dbb037d1a14620120f43cc1bc29d4ad782f2 3646 checksum: bb07dc0845f4f05ee833eaf25c0eb93af2c6e1c59b0897ea85218cf9ef2e880c8b5e1f20c1b32916d4687cd557d945f8c43c64c8e3200d1a433681b30b42fe54
3172 languageName: node 3647 languageName: node
3173 linkType: hard 3648 linkType: hard
3174 3649
3175"chalk@npm:^2.0.0": 3650"chalk@npm:^2.4.2":
3176 version: 2.4.2 3651 version: 2.4.2
3177 resolution: "chalk@npm:2.4.2" 3652 resolution: "chalk@npm:2.4.2"
3178 dependencies: 3653 dependencies:
3179 ansi-styles: "npm:^3.2.1" 3654 ansi-styles: "npm:^3.2.1"
3180 escape-string-regexp: "npm:^1.0.5" 3655 escape-string-regexp: "npm:^1.0.5"
3181 supports-color: "npm:^5.3.0" 3656 supports-color: "npm:^5.3.0"
3182 checksum: befd2fe888067cfc8ceac2e7a6a62ee763b26112479dce4ee396981288fa21d5cdf3cc1b45692c94c7c6dc3638c4dc3ee6ec1c794efdf42b02e02f93039285ec 3657 checksum: e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073
3183 languageName: node 3658 languageName: node
3184 linkType: hard 3659 linkType: hard
3185 3660
@@ -3189,7 +3664,7 @@ __metadata:
3189 dependencies: 3664 dependencies:
3190 ansi-styles: "npm:^4.1.0" 3665 ansi-styles: "npm:^4.1.0"
3191 supports-color: "npm:^7.1.0" 3666 supports-color: "npm:^7.1.0"
3192 checksum: cb96ab47eb1b55525e72caac9eed1513bff28e686df7eee6b04379c80922df21c8283d9938af16a645826c94c9e19fb52ad63cbead6b5073d08ae5f8fa2661a2 3667 checksum: 4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880
3193 languageName: node 3668 languageName: node
3194 linkType: hard 3669 linkType: hard
3195 3670
@@ -3208,14 +3683,14 @@ __metadata:
3208 dependenciesMeta: 3683 dependenciesMeta:
3209 fsevents: 3684 fsevents:
3210 optional: true 3685 optional: true
3211 checksum: eb45bf6464f6c871e2b46926eaaf35abc06624d4ca8b894bc7c927d8ac808e680d977c37283276992159360767d51c64b4c9bb91ece91beceaf3cb4abe555f99 3686 checksum: 1076953093e0707c882a92c66c0f56ba6187831aa51bb4de878c1fec59ae611a3bf02898f190efec8e77a086b8df61c2b2a3ea324642a0558bdf8ee6c5dc9ca1
3212 languageName: node 3687 languageName: node
3213 linkType: hard 3688 linkType: hard
3214 3689
3215"chownr@npm:^2.0.0": 3690"chownr@npm:^2.0.0":
3216 version: 2.0.0 3691 version: 2.0.0
3217 resolution: "chownr@npm:2.0.0" 3692 resolution: "chownr@npm:2.0.0"
3218 checksum: 7b240ff920db951fd3841116c5e0e2ec4750e20c85cd044ea78f636202e1fa47ce0a20d48c3c912edc52ea0f1615aba37bdd6297d3a731b517647ed33c3dee09 3693 checksum: 594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6
3219 languageName: node 3694 languageName: node
3220 linkType: hard 3695 linkType: hard
3221 3696
@@ -3224,21 +3699,39 @@ __metadata:
3224 resolution: "clean-css@npm:5.3.2" 3699 resolution: "clean-css@npm:5.3.2"
3225 dependencies: 3700 dependencies:
3226 source-map: "npm:~0.6.0" 3701 source-map: "npm:~0.6.0"
3227 checksum: 3ba045341c3d4bb37b0cb69a2ea20774f60736a9ff7a11ea78bb457bc84fa1e2e7264da28a755d0f02ccfbe841b9e1d8321a9c3938f160f8bdd70c29fbb7dc9a 3702 checksum: 315e0e81306524bd2c1905fa6823bf7658be40799b78f446e5e6922808718d2b80266fb3e96842a06176fa683bc2c1a0d2827b08d154e2f9cf136d7bda909d33
3228 languageName: node 3703 languageName: node
3229 linkType: hard 3704 linkType: hard
3230 3705
3231"clean-stack@npm:^2.0.0": 3706"clean-stack@npm:^2.0.0":
3232 version: 2.2.0 3707 version: 2.2.0
3233 resolution: "clean-stack@npm:2.2.0" 3708 resolution: "clean-stack@npm:2.2.0"
3234 checksum: 0a476c914f0a5e9e12b215729e1a633fcbdd47b8c3d508ebe6441f2ef8d5047fdd0800926349dd18253db4bfcab3e48aa0aca1f2e7f5d614f7194778d7851be4 3709 checksum: 1f90262d5f6230a17e27d0c190b09d47ebe7efdd76a03b5a1127863f7b3c9aec4c3e6c8bb3a7bbf81d553d56a1fd35728f5a8ef4c63f867ac8d690109742a8c1
3710 languageName: node
3711 linkType: hard
3712
3713"cliui@npm:^8.0.1":
3714 version: 8.0.1
3715 resolution: "cliui@npm:8.0.1"
3716 dependencies:
3717 string-width: "npm:^4.2.0"
3718 strip-ansi: "npm:^6.0.1"
3719 wrap-ansi: "npm:^7.0.0"
3720 checksum: 4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5
3235 languageName: node 3721 languageName: node
3236 linkType: hard 3722 linkType: hard
3237 3723
3238"clsx@npm:^1.1.0, clsx@npm:^1.2.1": 3724"clsx@npm:^1.1.0, clsx@npm:^1.2.1":
3239 version: 1.2.1 3725 version: 1.2.1
3240 resolution: "clsx@npm:1.2.1" 3726 resolution: "clsx@npm:1.2.1"
3241 checksum: cae17fd0fd5ea449d000c681169a8a6f7add4929b369cae3e2d5b604fba2798b39334121e467dbf6ac752562c28a6894a443f30761b004317c0668eb031af52d 3727 checksum: 34dead8bee24f5e96f6e7937d711978380647e936a22e76380290e35486afd8634966ce300fc4b74a32f3762c7d4c0303f442c3e259f4ce02374eb0c82834f27
3728 languageName: node
3729 linkType: hard
3730
3731"clsx@npm:^2.0.0":
3732 version: 2.0.0
3733 resolution: "clsx@npm:2.0.0"
3734 checksum: c09f43b3144a0b7826b6b11b6a111b2c7440831004eecc02d333533c5e58ef0aa5f2dce071d3b25fbb8c8ea97b45df96c74bcc1d51c8c2027eb981931107b0cd
3242 languageName: node 3735 languageName: node
3243 linkType: hard 3736 linkType: hard
3244 3737
@@ -3247,7 +3740,7 @@ __metadata:
3247 resolution: "color-convert@npm:1.9.3" 3740 resolution: "color-convert@npm:1.9.3"
3248 dependencies: 3741 dependencies:
3249 color-name: "npm:1.1.3" 3742 color-name: "npm:1.1.3"
3250 checksum: 42f852d574dc58609bba286cd7d10a407e213e20515c0d5d1dd8059b3d4373cd76d1057c3a242f441f2dfc6667badeb790a792662082c8038889c9235f4cd9fa 3743 checksum: 5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c
3251 languageName: node 3744 languageName: node
3252 linkType: hard 3745 linkType: hard
3253 3746
@@ -3256,21 +3749,21 @@ __metadata:
3256 resolution: "color-convert@npm:2.0.1" 3749 resolution: "color-convert@npm:2.0.1"
3257 dependencies: 3750 dependencies:
3258 color-name: "npm:~1.1.4" 3751 color-name: "npm:~1.1.4"
3259 checksum: bf4d19d12621eae71a531e5b977f46717b15e0d3253f25790f5779b7577124e4d9c4597df05cee79e8f8e8fc14add04e738a659ee4336ee0cc5587ebc3c602e7 3752 checksum: 37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7
3260 languageName: node 3753 languageName: node
3261 linkType: hard 3754 linkType: hard
3262 3755
3263"color-name@npm:1.1.3": 3756"color-name@npm:1.1.3":
3264 version: 1.1.3 3757 version: 1.1.3
3265 resolution: "color-name@npm:1.1.3" 3758 resolution: "color-name@npm:1.1.3"
3266 checksum: b7313c98fd745336a5e1d64921591bcd60e4e0b3894afb56286a4793c4fd304d4a38b00b514845381215ca5ed2994be05d2e1a5a80860b996d26f5f285c77dda 3759 checksum: 566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6
3267 languageName: node 3760 languageName: node
3268 linkType: hard 3761 linkType: hard
3269 3762
3270"color-name@npm:~1.1.4": 3763"color-name@npm:~1.1.4":
3271 version: 1.1.4 3764 version: 1.1.4
3272 resolution: "color-name@npm:1.1.4" 3765 resolution: "color-name@npm:1.1.4"
3273 checksum: 80acf64638343898f5b36825f4c9715ced380e738400b308f3f90ca2327f2f98f0c2cfb1f1a6447f267a2e1d1ea2214f26e948d8acab547e5478e2b0816c7c30 3766 checksum: a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95
3274 languageName: node 3767 languageName: node
3275 linkType: hard 3768 linkType: hard
3276 3769
@@ -3279,72 +3772,79 @@ __metadata:
3279 resolution: "color-support@npm:1.1.3" 3772 resolution: "color-support@npm:1.1.3"
3280 bin: 3773 bin:
3281 color-support: bin.js 3774 color-support: bin.js
3282 checksum: 8dc879a976be92306773276728e0bbb0925478b2373f133a98e563c497ccd58f220b9c30cea37c72678fe071627d7391b3751a1b92aaa5e872cd278b00b96b74 3775 checksum: 8ffeaa270a784dc382f62d9be0a98581db43e11eee301af14734a6d089bd456478b1a8b3e7db7ca7dc5b18a75f828f775c44074020b51c05fc00e6d0992b1cc6
3776 languageName: node
3777 linkType: hard
3778
3779"commander@npm:7":
3780 version: 7.2.0
3781 resolution: "commander@npm:7.2.0"
3782 checksum: 8d690ff13b0356df7e0ebbe6c59b4712f754f4b724d4f473d3cc5b3fdcf978e3a5dc3078717858a2ceb50b0f84d0660a7f22a96cdc50fb877d0c9bb31593d23a
3283 languageName: node 3783 languageName: node
3284 linkType: hard 3784 linkType: hard
3285 3785
3286"commander@npm:^10.0.0": 3786"commander@npm:^10.0.0":
3287 version: 10.0.1 3787 version: 10.0.1
3288 resolution: "commander@npm:10.0.1" 3788 resolution: "commander@npm:10.0.1"
3289 checksum: b2a03d799104eac407ca031b94126c98198594fcff41554eb253cef748de57fb1a4cdd591baa075de589f2fddf1f968d1ecd1b79e8b47570ee441ab4f3363776 3789 checksum: 53f33d8927758a911094adadda4b2cbac111a5b377d8706700587650fd8f45b0bbe336de4b5c3fe47fd61f420a3d9bd452b6e0e6e5600a7e74d7bf0174f6efe3
3290 languageName: node 3790 languageName: node
3291 linkType: hard 3791 linkType: hard
3292 3792
3293"commander@npm:^2.20.0": 3793"commander@npm:^2.20.0":
3294 version: 2.20.3 3794 version: 2.20.3
3295 resolution: "commander@npm:2.20.3" 3795 resolution: "commander@npm:2.20.3"
3296 checksum: a6cb7ce73cc1db74a2da4bb6b4fc4f9a655ba35beb90f32bf5831d7d3be610dafc01dcc8a17f8204cf4e3f1f434d2115b7db56dfb0b827d42b10d1ba6ae8cbb4 3796 checksum: 74c781a5248c2402a0a3e966a0a2bba3c054aad144f5c023364be83265e796b20565aa9feff624132ff629aa64e16999fa40a743c10c12f7c61e96a794b99288
3297 languageName: node 3797 languageName: node
3298 linkType: hard 3798 linkType: hard
3299 3799
3300"commander@npm:^8.0.0": 3800"commander@npm:^8.0.0":
3301 version: 8.3.0 3801 version: 8.3.0
3302 resolution: "commander@npm:8.3.0" 3802 resolution: "commander@npm:8.3.0"
3303 checksum: 94dba589da4444bc07d60537438ce36bbf78b52b18bb720fb3727a3b589cb27b53171065742e6e442962e273976f034ca7475cc5517d92c7033fae2f6ed50e76 3803 checksum: 8b043bb8322ea1c39664a1598a95e0495bfe4ca2fad0d84a92d7d1d8d213e2a155b441d2470c8e08de7c4a28cf2bc6e169211c49e1b21d9f7edc6ae4d9356060
3304 languageName: node 3804 languageName: node
3305 linkType: hard 3805 linkType: hard
3306 3806
3307"common-tags@npm:^1.8.0": 3807"common-tags@npm:^1.8.0":
3308 version: 1.8.2 3808 version: 1.8.2
3309 resolution: "common-tags@npm:1.8.2" 3809 resolution: "common-tags@npm:1.8.2"
3310 checksum: e1080df9fd8eefd8c4b4a983dc39b41c251d85a05c15991592762ff0c78b433e9ac7bb02518c12a89d1cb33dbb466872fbbb7030ecfc7142b0810747e7859b3b 3810 checksum: 23efe47ff0a1a7c91489271b3a1e1d2a171c12ec7f9b35b29b2fce51270124aff0ec890087e2bc2182c1cb746e232ab7561aaafe05f1e7452aea733d2bfe3f63
3311 languageName: node 3811 languageName: node
3312 linkType: hard 3812 linkType: hard
3313 3813
3314"concat-map@npm:0.0.1": 3814"concat-map@npm:0.0.1":
3315 version: 0.0.1 3815 version: 0.0.1
3316 resolution: "concat-map@npm:0.0.1" 3816 resolution: "concat-map@npm:0.0.1"
3317 checksum: 88222f18b3a68b71fe4473a146c8ed3315ec0488703104319c53543ad4668af3e79418ab79e2fa8032ee04c3eb45cc478815b89877a048cc5ba34e201bc15c35 3817 checksum: c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f
3318 languageName: node 3818 languageName: node
3319 linkType: hard 3819 linkType: hard
3320 3820
3321"confusing-browser-globals@npm:^1.0.10": 3821"confusing-browser-globals@npm:^1.0.10":
3322 version: 1.0.11 3822 version: 1.0.11
3323 resolution: "confusing-browser-globals@npm:1.0.11" 3823 resolution: "confusing-browser-globals@npm:1.0.11"
3324 checksum: 1e2de021f111bd078564c4c6e03f1259260e297499de229875c583fac9de2de0719c75169bc24ed53020329e6f167c8c598c1228611baa72c6cf309204ddc192 3824 checksum: 475d0a284fa964a5182b519af5738b5b64bf7e413cfd703c1b3496bf6f4df9f827893a9b221c0ea5873c1476835beb1e0df569ba643eff0734010c1eb780589e
3325 languageName: node 3825 languageName: node
3326 linkType: hard 3826 linkType: hard
3327 3827
3328"console-control-strings@npm:^1.1.0": 3828"console-control-strings@npm:^1.1.0":
3329 version: 1.1.0 3829 version: 1.1.0
3330 resolution: "console-control-strings@npm:1.1.0" 3830 resolution: "console-control-strings@npm:1.1.0"
3331 checksum: d286ffd439aac97472557325e6aa4cc3a2eefe495a70a9640b89508880db4bba1bd1b29bb011608c23033d884c84cac8da95c8f12ca0ec69ccc70d6d5f39c618 3831 checksum: 7ab51d30b52d461412cd467721bb82afe695da78fff8f29fe6f6b9cbaac9a2328e27a22a966014df9532100f6dd85370460be8130b9c677891ba36d96a343f50
3332 languageName: node 3832 languageName: node
3333 linkType: hard 3833 linkType: hard
3334 3834
3335"convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.7.0": 3835"convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.7.0":
3336 version: 1.9.0 3836 version: 1.9.0
3337 resolution: "convert-source-map@npm:1.9.0" 3837 resolution: "convert-source-map@npm:1.9.0"
3338 checksum: 7c665ec75a792623eff22413a59fb6646770063eb871efe7550cfba4f17177137ea300f964c2763db69355384398de491126fbe064fa83b25e3023b87711b6e4 3838 checksum: 281da55454bf8126cbc6625385928c43479f2060984180c42f3a86c8b8c12720a24eac260624a7d1e090004028d2dee78602330578ceec1a08e27cb8bb0a8a5b
3339 languageName: node 3839 languageName: node
3340 linkType: hard 3840 linkType: hard
3341 3841
3342"core-js-compat@npm:^3.21.0, core-js-compat@npm:^3.22.1": 3842"core-js-compat@npm:^3.21.0, core-js-compat@npm:^3.22.1":
3343 version: 3.31.0 3843 version: 3.32.0
3344 resolution: "core-js-compat@npm:3.31.0" 3844 resolution: "core-js-compat@npm:3.32.0"
3345 dependencies: 3845 dependencies:
3346 browserslist: "npm:^4.21.5" 3846 browserslist: "npm:^4.21.9"
3347 checksum: 2e04820a0df57bbba1acc6d057792a718c765b7af8a9e59cff986f3c60189d0c8cad1e2c2fa056345da79c86fdd28f587363598a68ee7734cdd0e229ddda6ae6 3847 checksum: 9d3164c4c2ab602d22a6f653611a72fc3fe875b69379dad974786b01e8f93ba338bdb27c0b46d9aaf40ebd97c275a0004d3051c33691de3b2da3e636399a63a0
3348 languageName: node 3848 languageName: node
3349 linkType: hard 3849 linkType: hard
3350 3850
@@ -3357,14 +3857,14 @@ __metadata:
3357 parse-json: "npm:^5.0.0" 3857 parse-json: "npm:^5.0.0"
3358 path-type: "npm:^4.0.0" 3858 path-type: "npm:^4.0.0"
3359 yaml: "npm:^1.10.0" 3859 yaml: "npm:^1.10.0"
3360 checksum: 8add352f0abd55fc5eaef0823937c33992e5ae670831418c8ff98bb301952260467533b09b8e9257dc360baa270610a7a92b288d94eb25d6f577a0d7e507801b 3860 checksum: b923ff6af581638128e5f074a5450ba12c0300b71302398ea38dbeabd33bbcaa0245ca9adbedfcf284a07da50f99ede5658c80bb3e39e2ce770a99d28a21ef03
3361 languageName: node 3861 languageName: node
3362 linkType: hard 3862 linkType: hard
3363 3863
3364"crelt@npm:^1.0.5": 3864"crelt@npm:^1.0.5":
3365 version: 1.0.6 3865 version: 1.0.6
3366 resolution: "crelt@npm:1.0.6" 3866 resolution: "crelt@npm:1.0.6"
3367 checksum: ceed33a9356c4502fefae5941bc4aa9840b5738f5e5ea2f162cace5c755861bf4a738330cdb807d169241aca8135fa9ef798c379d190e3ede9e14dffab2286bf 3867 checksum: e0fb76dff50c5eb47f2ea9b786c17f9425c66276025adee80876bdbf4a84ab72e899e56d3928431ab0cb057a105ef704df80fe5726ef0f7b1658f815521bdf09
3368 languageName: node 3868 languageName: node
3369 linkType: hard 3869 linkType: hard
3370 3870
@@ -3376,7 +3876,7 @@ __metadata:
3376 bin: 3876 bin:
3377 cross-env: src/bin/cross-env.js 3877 cross-env: src/bin/cross-env.js
3378 cross-env-shell: src/bin/cross-env-shell.js 3878 cross-env-shell: src/bin/cross-env-shell.js
3379 checksum: ea325d0a0461ec6e850ce37887fbbc8794ca6aa906f7955550a62493974581a61e41ad4416d7358aa8bc442a6baa6469c842ffddf6e833e3b346739b43ba840c 3879 checksum: f3765c25746c69fcca369655c442c6c886e54ccf3ab8c16847d5ad0e91e2f337d36eedc6599c1227904bf2a228d721e690324446876115bc8e7b32a866735ecf
3380 languageName: node 3880 languageName: node
3381 linkType: hard 3881 linkType: hard
3382 3882
@@ -3387,28 +3887,395 @@ __metadata:
3387 path-key: "npm:^3.1.0" 3887 path-key: "npm:^3.1.0"
3388 shebang-command: "npm:^2.0.0" 3888 shebang-command: "npm:^2.0.0"
3389 which: "npm:^2.0.1" 3889 which: "npm:^2.0.1"
3390 checksum: 37ec685f91f04d4719892f305fa6f632aae256df7f2f3f98d5c36f2197651ad7b77851aaa2d397d19a9555f0fb89fa18f9bb3ff4b440535cc0fb4fe0a72004b9 3890 checksum: 5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750
3391 languageName: node 3891 languageName: node
3392 linkType: hard 3892 linkType: hard
3393 3893
3394"crypto-random-string@npm:^2.0.0": 3894"crypto-random-string@npm:^2.0.0":
3395 version: 2.0.0 3895 version: 2.0.0
3396 resolution: "crypto-random-string@npm:2.0.0" 3896 resolution: "crypto-random-string@npm:2.0.0"
3397 checksum: 6b95ff35ccdc8f2302c008487acfbc164894621cc70ba537c76c8f55315e04cacb6cae6429e76b8cad393529273429b5852cc9acf1ac2095cadd66205e681f3b 3897 checksum: 288589b2484fe787f9e146f56c4be90b940018f17af1b152e4dde12309042ff5a2bf69e949aab8b8ac253948381529cc6f3e5a2427b73643a71ff177fa122b37
3398 languageName: node 3898 languageName: node
3399 linkType: hard 3899 linkType: hard
3400 3900
3401"csstype@npm:^3.0.2, csstype@npm:^3.1.2": 3901"csstype@npm:^3.0.2, csstype@npm:^3.1.2":
3402 version: 3.1.2 3902 version: 3.1.2
3403 resolution: "csstype@npm:3.1.2" 3903 resolution: "csstype@npm:3.1.2"
3404 checksum: 9f4357df50023d227d535beb807ccf8e6d8ad6b639afe375898214ebde729aa275731a19d9bcbf01444a6904008cc0d47fbbefa5fa5fc59d7d40e3595d0d41ae 3904 checksum: 32c038af259897c807ac738d9eab16b3d86747c72b09d5c740978e06f067f9b7b1737e1b75e407c7ab1fe1543dc95f20e202b4786aeb1b8d3bdf5d5ce655e6c6
3905 languageName: node
3906 linkType: hard
3907
3908"d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:2.5.0 - 3, d3-array@npm:3, d3-array@npm:^3.2.0":
3909 version: 3.2.4
3910 resolution: "d3-array@npm:3.2.4"
3911 dependencies:
3912 internmap: "npm:1 - 2"
3913 checksum: 08b95e91130f98c1375db0e0af718f4371ccacef7d5d257727fe74f79a24383e79aba280b9ffae655483ffbbad4fd1dec4ade0119d88c4749f388641c8bf8c50
3914 languageName: node
3915 linkType: hard
3916
3917"d3-axis@npm:3":
3918 version: 3.0.0
3919 resolution: "d3-axis@npm:3.0.0"
3920 checksum: a271e70ba1966daa5aaf6a7f959ceca3e12997b43297e757c7b945db2e1ead3c6ee226f2abcfa22abbd4e2e28bd2b71a0911794c4e5b911bbba271328a582c78
3921 languageName: node
3922 linkType: hard
3923
3924"d3-brush@npm:3":
3925 version: 3.0.0
3926 resolution: "d3-brush@npm:3.0.0"
3927 dependencies:
3928 d3-dispatch: "npm:1 - 3"
3929 d3-drag: "npm:2 - 3"
3930 d3-interpolate: "npm:1 - 3"
3931 d3-selection: "npm:3"
3932 d3-transition: "npm:3"
3933 checksum: 07baf00334c576da2f68a91fc0da5732c3a5fa19bd3d7aed7fd24d1d674a773f71a93e9687c154176f7246946194d77c48c2d8fed757f5dcb1a4740067ec50a8
3934 languageName: node
3935 linkType: hard
3936
3937"d3-chord@npm:3":
3938 version: 3.0.1
3939 resolution: "d3-chord@npm:3.0.1"
3940 dependencies:
3941 d3-path: "npm:1 - 3"
3942 checksum: baa6013914af3f4fe1521f0d16de31a38eb8a71d08ff1dec4741f6f45a828661e5cd3935e39bd14e3032bdc78206c283ca37411da21d46ec3cfc520be6e7a7ce
3943 languageName: node
3944 linkType: hard
3945
3946"d3-color@npm:1 - 3, d3-color@npm:3":
3947 version: 3.1.0
3948 resolution: "d3-color@npm:3.1.0"
3949 checksum: a4e20e1115fa696fce041fbe13fbc80dc4c19150fa72027a7c128ade980bc0eeeba4bcf28c9e21f0bce0e0dbfe7ca5869ef67746541dcfda053e4802ad19783c
3950 languageName: node
3951 linkType: hard
3952
3953"d3-contour@npm:4":
3954 version: 4.0.2
3955 resolution: "d3-contour@npm:4.0.2"
3956 dependencies:
3957 d3-array: "npm:^3.2.0"
3958 checksum: 98bc5fbed6009e08707434a952076f39f1cd6ed8b9288253cc3e6a3286e4e80c63c62d84954b20e64bf6e4ededcc69add54d3db25e990784a59c04edd3449032
3959 languageName: node
3960 linkType: hard
3961
3962"d3-delaunay@npm:6":
3963 version: 6.0.4
3964 resolution: "d3-delaunay@npm:6.0.4"
3965 dependencies:
3966 delaunator: "npm:5"
3967 checksum: 57c3aecd2525664b07c4c292aa11cf49b2752c0cf3f5257f752999399fe3c592de2d418644d79df1f255471eec8057a9cc0c3062ed7128cb3348c45f69597754
3968 languageName: node
3969 linkType: hard
3970
3971"d3-dispatch@npm:1 - 3, d3-dispatch@npm:3, d3-dispatch@npm:^3.0.1":
3972 version: 3.0.1
3973 resolution: "d3-dispatch@npm:3.0.1"
3974 checksum: 6eca77008ce2dc33380e45d4410c67d150941df7ab45b91d116dbe6d0a3092c0f6ac184dd4602c796dc9e790222bad3ff7142025f5fd22694efe088d1d941753
3975 languageName: node
3976 linkType: hard
3977
3978"d3-drag@npm:2 - 3, d3-drag@npm:3":
3979 version: 3.0.0
3980 resolution: "d3-drag@npm:3.0.0"
3981 dependencies:
3982 d3-dispatch: "npm:1 - 3"
3983 d3-selection: "npm:3"
3984 checksum: d2556e8dc720741a443b595a30af403dd60642dfd938d44d6e9bfc4c71a962142f9a028c56b61f8b4790b65a34acad177d1263d66f103c3c527767b0926ef5aa
3985 languageName: node
3986 linkType: hard
3987
3988"d3-dsv@npm:1 - 3, d3-dsv@npm:3":
3989 version: 3.0.1
3990 resolution: "d3-dsv@npm:3.0.1"
3991 dependencies:
3992 commander: "npm:7"
3993 iconv-lite: "npm:0.6"
3994 rw: "npm:1"
3995 bin:
3996 csv2json: bin/dsv2json.js
3997 csv2tsv: bin/dsv2dsv.js
3998 dsv2dsv: bin/dsv2dsv.js
3999 dsv2json: bin/dsv2json.js
4000 json2csv: bin/json2dsv.js
4001 json2dsv: bin/json2dsv.js
4002 json2tsv: bin/json2dsv.js
4003 tsv2csv: bin/dsv2dsv.js
4004 tsv2json: bin/dsv2json.js
4005 checksum: 10e6af9e331950ed258f34ab49ac1b7060128ef81dcf32afc790bd1f7e8c3cc2aac7f5f875250a83f21f39bb5925fbd0872bb209f8aca32b3b77d32bab8a65ab
4006 languageName: node
4007 linkType: hard
4008
4009"d3-ease@npm:1 - 3, d3-ease@npm:3":
4010 version: 3.0.1
4011 resolution: "d3-ease@npm:3.0.1"
4012 checksum: fec8ef826c0cc35cda3092c6841e07672868b1839fcaf556e19266a3a37e6bc7977d8298c0fcb9885e7799bfdcef7db1baaba9cd4dcf4bc5e952cf78574a88b0
4013 languageName: node
4014 linkType: hard
4015
4016"d3-fetch@npm:3":
4017 version: 3.0.1
4018 resolution: "d3-fetch@npm:3.0.1"
4019 dependencies:
4020 d3-dsv: "npm:1 - 3"
4021 checksum: 4f467a79bf290395ac0cbb5f7562483f6a18668adc4c8eb84c9d3eff048b6f6d3b6f55079ba1ebf1908dabe000c941d46be447f8d78453b2dad5fb59fb6aa93b
4022 languageName: node
4023 linkType: hard
4024
4025"d3-force@npm:3":
4026 version: 3.0.0
4027 resolution: "d3-force@npm:3.0.0"
4028 dependencies:
4029 d3-dispatch: "npm:1 - 3"
4030 d3-quadtree: "npm:1 - 3"
4031 d3-timer: "npm:1 - 3"
4032 checksum: 220a16a1a1ac62ba56df61028896e4b52be89c81040d20229c876efc8852191482c233f8a52bb5a4e0875c321b8e5cb6413ef3dfa4d8fe79eeb7d52c587f52cf
4033 languageName: node
4034 linkType: hard
4035
4036"d3-format@npm:1 - 3, d3-format@npm:3, d3-format@npm:^3.1.0":
4037 version: 3.1.0
4038 resolution: "d3-format@npm:3.1.0"
4039 checksum: 049f5c0871ebce9859fc5e2f07f336b3c5bfff52a2540e0bac7e703fce567cd9346f4ad1079dd18d6f1e0eaa0599941c1810898926f10ac21a31fd0a34b4aa75
4040 languageName: node
4041 linkType: hard
4042
4043"d3-geo@npm:3":
4044 version: 3.1.0
4045 resolution: "d3-geo@npm:3.1.0"
4046 dependencies:
4047 d3-array: "npm:2.5.0 - 3"
4048 checksum: 5b0a26d232787ca9e824a660827c28626a51004328dde7c76a1bd300d3cad8c7eeb55fea64c8cd6495d5a34fea434fb1418d59926a6cb24e6fb6e2b6f62c6bd9
4049 languageName: node
4050 linkType: hard
4051
4052"d3-graphviz@npm:5.1.0":
4053 version: 5.1.0
4054 resolution: "d3-graphviz@npm:5.1.0"
4055 dependencies:
4056 "@hpcc-js/wasm": "npm:2.13.1"
4057 d3-dispatch: "npm:^3.0.1"
4058 d3-format: "npm:^3.1.0"
4059 d3-interpolate: "npm:^3.0.1"
4060 d3-path: "npm:^3.1.0"
4061 d3-timer: "npm:^3.0.1"
4062 d3-transition: "npm:^3.0.1"
4063 d3-zoom: "npm:^3.0.0"
4064 peerDependencies:
4065 d3-selection: ^3.0.0
4066 checksum: 81eab7e0ba13e095a16f0accf6aeef6cbc0d3839fbd5cb4ea08ae6b279dabe3555a535d07edf57d33a78e606a02ead45f4362f2bb3ddcbf9c703e61fd95353f2
4067 languageName: node
4068 linkType: hard
4069
4070"d3-graphviz@patch:d3-graphviz@npm%3A5.1.0#~/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch":
4071 version: 5.1.0
4072 resolution: "d3-graphviz@patch:d3-graphviz@npm%3A5.1.0#~/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch::version=5.1.0&hash=dcacac"
4073 dependencies:
4074 "@hpcc-js/wasm": "npm:2.13.1"
4075 d3-dispatch: "npm:^3.0.1"
4076 d3-format: "npm:^3.1.0"
4077 d3-interpolate: "npm:^3.0.1"
4078 d3-path: "npm:^3.1.0"
4079 d3-timer: "npm:^3.0.1"
4080 d3-transition: "npm:^3.0.1"
4081 d3-zoom: "npm:^3.0.0"
4082 peerDependencies:
4083 d3-selection: ^3.0.0
4084 checksum: 47ac96385ebee243fa44898f0f4cd25dce49683d66955511adaf94a584ae7261a485cbcec8910709dd5a6fe857ae7b7e05abe5b1ce0f0e9b69d2691ff0b13d81
4085 languageName: node
4086 linkType: hard
4087
4088"d3-hierarchy@npm:3":
4089 version: 3.1.2
4090 resolution: "d3-hierarchy@npm:3.1.2"
4091 checksum: 6dcdb480539644aa7fc0d72dfc7b03f99dfbcdf02714044e8c708577e0d5981deb9d3e99bbbb2d26422b55bcc342ac89a0fa2ea6c9d7302e2fc0951dd96f89cf
4092 languageName: node
4093 linkType: hard
4094
4095"d3-interpolate@npm:1 - 3, d3-interpolate@npm:1.2.0 - 3, d3-interpolate@npm:3, d3-interpolate@npm:^3.0.1":
4096 version: 3.0.1
4097 resolution: "d3-interpolate@npm:3.0.1"
4098 dependencies:
4099 d3-color: "npm:1 - 3"
4100 checksum: 19f4b4daa8d733906671afff7767c19488f51a43d251f8b7f484d5d3cfc36c663f0a66c38fe91eee30f40327443d799be17169f55a293a3ba949e84e57a33e6a
4101 languageName: node
4102 linkType: hard
4103
4104"d3-path@npm:1 - 3, d3-path@npm:3, d3-path@npm:^3.1.0":
4105 version: 3.1.0
4106 resolution: "d3-path@npm:3.1.0"
4107 checksum: dc1d58ec87fa8319bd240cf7689995111a124b141428354e9637aa83059eb12e681f77187e0ada5dedfce346f7e3d1f903467ceb41b379bfd01cd8e31721f5da
4108 languageName: node
4109 linkType: hard
4110
4111"d3-polygon@npm:3":
4112 version: 3.0.1
4113 resolution: "d3-polygon@npm:3.0.1"
4114 checksum: e236aa7f33efa9a4072907af7dc119f85b150a0716759d4fe5f12f62573018264a6cbde8617fbfa6944a7ae48c1c0c8d3f39ae72e11f66dd471e9b5e668385df
4115 languageName: node
4116 linkType: hard
4117
4118"d3-quadtree@npm:1 - 3, d3-quadtree@npm:3":
4119 version: 3.0.1
4120 resolution: "d3-quadtree@npm:3.0.1"
4121 checksum: 18302d2548bfecaef788152397edec95a76400fd97d9d7f42a089ceb68d910f685c96579d74e3712d57477ed042b056881b47cd836a521de683c66f47ce89090
4122 languageName: node
4123 linkType: hard
4124
4125"d3-random@npm:3":
4126 version: 3.0.1
4127 resolution: "d3-random@npm:3.0.1"
4128 checksum: 987a1a1bcbf26e6cf01fd89d5a265b463b2cea93560fc17d9b1c45e8ed6ff2db5924601bcceb808de24c94133f000039eb7fa1c469a7a844ccbf1170cbb25b41
4129 languageName: node
4130 linkType: hard
4131
4132"d3-scale-chromatic@npm:3":
4133 version: 3.0.0
4134 resolution: "d3-scale-chromatic@npm:3.0.0"
4135 dependencies:
4136 d3-color: "npm:1 - 3"
4137 d3-interpolate: "npm:1 - 3"
4138 checksum: 920a80f2e31b5686798c116e99d1671c32f55fb60fa920b742aa4ac5175b878c615adb4e55a246d65367e6e1061fdbcc55807be731fb5b18ae628d1df62bfac1
4139 languageName: node
4140 linkType: hard
4141
4142"d3-scale@npm:4":
4143 version: 4.0.2
4144 resolution: "d3-scale@npm:4.0.2"
4145 dependencies:
4146 d3-array: "npm:2.10.0 - 3"
4147 d3-format: "npm:1 - 3"
4148 d3-interpolate: "npm:1.2.0 - 3"
4149 d3-time: "npm:2.1.1 - 3"
4150 d3-time-format: "npm:2 - 4"
4151 checksum: 65d9ad8c2641aec30ed5673a7410feb187a224d6ca8d1a520d68a7d6eac9d04caedbff4713d1e8545be33eb7fec5739983a7ab1d22d4e5ad35368c6729d362f1
4152 languageName: node
4153 linkType: hard
4154
4155"d3-selection@npm:2 - 3, d3-selection@npm:3, d3-selection@npm:^3.0.0":
4156 version: 3.0.0
4157 resolution: "d3-selection@npm:3.0.0"
4158 checksum: e59096bbe8f0cb0daa1001d9bdd6dbc93a688019abc97d1d8b37f85cd3c286a6875b22adea0931b0c88410d025563e1643019161a883c516acf50c190a11b56b
4159 languageName: node
4160 linkType: hard
4161
4162"d3-shape@npm:3":
4163 version: 3.2.0
4164 resolution: "d3-shape@npm:3.2.0"
4165 dependencies:
4166 d3-path: "npm:^3.1.0"
4167 checksum: f1c9d1f09926daaf6f6193ae3b4c4b5521e81da7d8902d24b38694517c7f527ce3c9a77a9d3a5722ad1e3ff355860b014557b450023d66a944eabf8cfde37132
4168 languageName: node
4169 linkType: hard
4170
4171"d3-time-format@npm:2 - 4, d3-time-format@npm:4":
4172 version: 4.1.0
4173 resolution: "d3-time-format@npm:4.1.0"
4174 dependencies:
4175 d3-time: "npm:1 - 3"
4176 checksum: 735e00fb25a7fd5d418fac350018713ae394eefddb0d745fab12bbff0517f9cdb5f807c7bbe87bb6eeb06249662f8ea84fec075f7d0cd68609735b2ceb29d206
4177 languageName: node
4178 linkType: hard
4179
4180"d3-time@npm:1 - 3, d3-time@npm:2.1.1 - 3, d3-time@npm:3":
4181 version: 3.1.0
4182 resolution: "d3-time@npm:3.1.0"
4183 dependencies:
4184 d3-array: "npm:2 - 3"
4185 checksum: a984f77e1aaeaa182679b46fbf57eceb6ebdb5f67d7578d6f68ef933f8eeb63737c0949991618a8d29472dbf43736c7d7f17c452b2770f8c1271191cba724ca1
4186 languageName: node
4187 linkType: hard
4188
4189"d3-timer@npm:1 - 3, d3-timer@npm:3, d3-timer@npm:^3.0.1":
4190 version: 3.0.1
4191 resolution: "d3-timer@npm:3.0.1"
4192 checksum: d4c63cb4bb5461d7038aac561b097cd1c5673969b27cbdd0e87fa48d9300a538b9e6f39b4a7f0e3592ef4f963d858c8a9f0e92754db73116770856f2fc04561a
4193 languageName: node
4194 linkType: hard
4195
4196"d3-transition@npm:2 - 3, d3-transition@npm:3, d3-transition@npm:^3.0.1":
4197 version: 3.0.1
4198 resolution: "d3-transition@npm:3.0.1"
4199 dependencies:
4200 d3-color: "npm:1 - 3"
4201 d3-dispatch: "npm:1 - 3"
4202 d3-ease: "npm:1 - 3"
4203 d3-interpolate: "npm:1 - 3"
4204 d3-timer: "npm:1 - 3"
4205 peerDependencies:
4206 d3-selection: 2 - 3
4207 checksum: 4e74535dda7024aa43e141635b7522bb70cf9d3dfefed975eb643b36b864762eca67f88fafc2ca798174f83ca7c8a65e892624f824b3f65b8145c6a1a88dbbad
4208 languageName: node
4209 linkType: hard
4210
4211"d3-zoom@npm:3.0.0":
4212 version: 3.0.0
4213 resolution: "d3-zoom@npm:3.0.0"
4214 dependencies:
4215 d3-dispatch: "npm:1 - 3"
4216 d3-drag: "npm:2 - 3"
4217 d3-interpolate: "npm:1 - 3"
4218 d3-selection: "npm:2 - 3"
4219 d3-transition: "npm:2 - 3"
4220 checksum: ee2036479049e70d8c783d594c444fe00e398246048e3f11a59755cd0e21de62ece3126181b0d7a31bf37bcf32fd726f83ae7dea4495ff86ec7736ce5ad36fd3
4221 languageName: node
4222 linkType: hard
4223
4224"d3-zoom@patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch":
4225 version: 3.0.0
4226 resolution: "d3-zoom@patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch::version=3.0.0&hash=135f1c"
4227 dependencies:
4228 d3-dispatch: "npm:1 - 3"
4229 d3-drag: "npm:2 - 3"
4230 d3-interpolate: "npm:1 - 3"
4231 d3-selection: "npm:2 - 3"
4232 d3-transition: "npm:2 - 3"
4233 checksum: fc56f5be9f492b7d7bba91b166f4b93e1761599a23496b0f2890e295476971a8db040b0c2069b670897984ed28c4f0d151caf1d51e305fe635e80cdb94f2c2af
4234 languageName: node
4235 linkType: hard
4236
4237"d3@npm:^7.8.5":
4238 version: 7.8.5
4239 resolution: "d3@npm:7.8.5"
4240 dependencies:
4241 d3-array: "npm:3"
4242 d3-axis: "npm:3"
4243 d3-brush: "npm:3"
4244 d3-chord: "npm:3"
4245 d3-color: "npm:3"
4246 d3-contour: "npm:4"
4247 d3-delaunay: "npm:6"
4248 d3-dispatch: "npm:3"
4249 d3-drag: "npm:3"
4250 d3-dsv: "npm:3"
4251 d3-ease: "npm:3"
4252 d3-fetch: "npm:3"
4253 d3-force: "npm:3"
4254 d3-format: "npm:3"
4255 d3-geo: "npm:3"
4256 d3-hierarchy: "npm:3"
4257 d3-interpolate: "npm:3"
4258 d3-path: "npm:3"
4259 d3-polygon: "npm:3"
4260 d3-quadtree: "npm:3"
4261 d3-random: "npm:3"
4262 d3-scale: "npm:4"
4263 d3-scale-chromatic: "npm:3"
4264 d3-selection: "npm:3"
4265 d3-shape: "npm:3"
4266 d3-time: "npm:3"
4267 d3-time-format: "npm:4"
4268 d3-timer: "npm:3"
4269 d3-transition: "npm:3"
4270 d3-zoom: "npm:3"
4271 checksum: 408758dcc2437cbff8cd207b9d82760030b5c53c1df6a2ce5b1a76633388a6892fd65c0632cfa83da963e239722d49805062e5fb05d99e0fb078bda14cb22222
3405 languageName: node 4272 languageName: node
3406 linkType: hard 4273 linkType: hard
3407 4274
3408"damerau-levenshtein@npm:^1.0.8": 4275"damerau-levenshtein@npm:^1.0.8":
3409 version: 1.0.8 4276 version: 1.0.8
3410 resolution: "damerau-levenshtein@npm:1.0.8" 4277 resolution: "damerau-levenshtein@npm:1.0.8"
3411 checksum: a405d7fbbd9316fdaecedd50c42d27ed2d669b687e62813d785316de9f9c171a5797de8efda92292f62364a0966edad2581fc0029a27457ce6ec7f3936ad0437 4278 checksum: 4c2647e0f42acaee7d068756c1d396e296c3556f9c8314bac1ac63ffb236217ef0e7e58602b18bb2173deec7ec8e0cac8e27cccf8f5526666b4ff11a13ad54a3
3412 languageName: node 4279 languageName: node
3413 linkType: hard 4280 linkType: hard
3414 4281
@@ -3420,7 +4287,7 @@ __metadata:
3420 peerDependenciesMeta: 4287 peerDependenciesMeta:
3421 supports-color: 4288 supports-color:
3422 optional: true 4289 optional: true
3423 checksum: ab50d98b6f2a0e803379e8f789017f4215efd0e085774623e462c691e9f99bfd359a35f7424ff401da3ea58b31f89ceebc9ea35779b4a94f78b0ee3e235b6640 4290 checksum: cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736
3424 languageName: node 4291 languageName: node
3425 linkType: hard 4292 linkType: hard
3426 4293
@@ -3429,28 +4296,28 @@ __metadata:
3429 resolution: "debug@npm:3.2.7" 4296 resolution: "debug@npm:3.2.7"
3430 dependencies: 4297 dependencies:
3431 ms: "npm:^2.1.1" 4298 ms: "npm:^2.1.1"
3432 checksum: b98f479c1004d349128ba45f38fb1af53fa3ab1a3614f27c56e2cfbee34b58cbf7dc060fead0882a5b64924e49d1dd59fb796a5d90ba7b1987d72d426e199253 4299 checksum: 37d96ae42cbc71c14844d2ae3ba55adf462ec89fd3a999459dec3833944cd999af6007ff29c780f1c61153bcaaf2c842d1e4ce1ec621e4fc4923244942e4a02a
3433 languageName: node 4300 languageName: node
3434 linkType: hard 4301 linkType: hard
3435 4302
3436"deep-is@npm:^0.1.3": 4303"deep-is@npm:^0.1.3":
3437 version: 0.1.4 4304 version: 0.1.4
3438 resolution: "deep-is@npm:0.1.4" 4305 resolution: "deep-is@npm:0.1.4"
3439 checksum: dfee7fc148cb00508a2a4af815144cce85a86ec7a5f658525bf6929095baeef7782c166504a0dc3b18872a1f53e27521de3d308a575c6d8063516815fc553a59 4306 checksum: 7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c
3440 languageName: node 4307 languageName: node
3441 linkType: hard 4308 linkType: hard
3442 4309
3443"deepmerge@npm:^4.2.2": 4310"deepmerge@npm:^4.2.2":
3444 version: 4.3.1 4311 version: 4.3.1
3445 resolution: "deepmerge@npm:4.3.1" 4312 resolution: "deepmerge@npm:4.3.1"
3446 checksum: 367ae28f98c94b2807dd6eba48f4c3d051742c2ab431f1037d60f5cb5af989aac2b170b6a891d5617679bcb95881b4e22a0616161a1f2154894b349b13d384e0 4313 checksum: e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044
3447 languageName: node 4314 languageName: node
3448 linkType: hard 4315 linkType: hard
3449 4316
3450"define-lazy-prop@npm:^2.0.0": 4317"define-lazy-prop@npm:^2.0.0":
3451 version: 2.0.0 4318 version: 2.0.0
3452 resolution: "define-lazy-prop@npm:2.0.0" 4319 resolution: "define-lazy-prop@npm:2.0.0"
3453 checksum: 53656037e7b33e52c0cb39d8348c92087b961711c89fa7df07e6c8cfe5039d17157ee8e22c00bbdd4d1038a114f2d38821fcef4668d4c87854635ec13e87b808 4320 checksum: db6c63864a9d3b7dc9def55d52764968a5af296de87c1b2cc71d8be8142e445208071953649e0386a8cc37cfcf9a2067a47207f1eb9ff250c2a269658fdae422
3454 languageName: node 4321 languageName: node
3455 linkType: hard 4322 linkType: hard
3456 4323
@@ -3460,28 +4327,30 @@ __metadata:
3460 dependencies: 4327 dependencies:
3461 has-property-descriptors: "npm:^1.0.0" 4328 has-property-descriptors: "npm:^1.0.0"
3462 object-keys: "npm:^1.1.1" 4329 object-keys: "npm:^1.1.1"
3463 checksum: f7d87afb83055124b9c0d18d1abb349ca0741d3c5c38e79422447ac800cea5ee1d0ffbc01f121f059964fd0f17e4d80602ba5533427b9dec18df0fa6b9c91585 4330 checksum: 34b58cae4651936a3c8c720310ce393a3227f5123640ab5402e7d6e59bb44f8295b789cb5d74e7513682b2e60ff20586d6f52b726d964d617abffa3da76344e0
3464 languageName: node 4331 languageName: node
3465 linkType: hard 4332 linkType: hard
3466 4333
3467"delegates@npm:^1.0.0": 4334"delaunator@npm:5":
3468 version: 1.0.0 4335 version: 5.0.0
3469 resolution: "delegates@npm:1.0.0" 4336 resolution: "delaunator@npm:5.0.0"
3470 checksum: 2ef8c043c6caea7f00f23236e0606b00f10d2b497657d63d230e50efdef307936b070734187b03960b9c4afe64ce9e09a77c01da60e661d42dcefec11ce41c30 4337 dependencies:
4338 robust-predicates: "npm:^3.0.0"
4339 checksum: 8655c1ad12dc58bd6350f882c12065ea415cfc809e4cac12b7b5c4941e981aaabee1afdcf13985dcd545d13d0143eb3805836f50e2b097af8137b204dfbea4f6
3471 languageName: node 4340 languageName: node
3472 linkType: hard 4341 linkType: hard
3473 4342
3474"depd@npm:^2.0.0": 4343"delegates@npm:^1.0.0":
3475 version: 2.0.0 4344 version: 1.0.0
3476 resolution: "depd@npm:2.0.0" 4345 resolution: "delegates@npm:1.0.0"
3477 checksum: 170e90bfa90081462303140623fdf938aeba2f066b1c7a9a1c599b257ea8127d36b9d39fad5a9d71f5282a3bb5a8ca287ce4d8c6cecd0f65e6bf3779cc6091be 4346 checksum: ba05874b91148e1db4bf254750c042bf2215febd23a6d3cda2e64896aef79745fbd4b9996488bd3cafb39ce19dbce0fd6e3b6665275638befffe1c9b312b91b5
3478 languageName: node 4347 languageName: node
3479 linkType: hard 4348 linkType: hard
3480 4349
3481"dequal@npm:^2.0.3": 4350"dequal@npm:^2.0.3":
3482 version: 2.0.3 4351 version: 2.0.3
3483 resolution: "dequal@npm:2.0.3" 4352 resolution: "dequal@npm:2.0.3"
3484 checksum: 7a633ec0ba78bc08ba217b762b15157d2ec99edb50a82124df2c341255b1943217215872888981cc6a6ee02406ab1b09783f5b51b7db8d8f8f1284092f379aad 4353 checksum: f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888
3485 languageName: node 4354 languageName: node
3486 linkType: hard 4355 linkType: hard
3487 4356
@@ -3490,7 +4359,7 @@ __metadata:
3490 resolution: "dir-glob@npm:3.0.1" 4359 resolution: "dir-glob@npm:3.0.1"
3491 dependencies: 4360 dependencies:
3492 path-type: "npm:^4.0.0" 4361 path-type: "npm:^4.0.0"
3493 checksum: 713590b89f9d09b80da82094419260ee15f4e67da692659876ac747ee38788dbb8b2bd5d2749bbcf298ce934888e378569f01895a136a09b54d1b28753e337c7 4362 checksum: dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c
3494 languageName: node 4363 languageName: node
3495 linkType: hard 4364 linkType: hard
3496 4365
@@ -3499,7 +4368,7 @@ __metadata:
3499 resolution: "doctrine@npm:2.1.0" 4368 resolution: "doctrine@npm:2.1.0"
3500 dependencies: 4369 dependencies:
3501 esutils: "npm:^2.0.2" 4370 esutils: "npm:^2.0.2"
3502 checksum: eee7095cd8e1c2e56203234da6ebd8e337a184637941a0becc0840a78f59b854ed35a50efa95a2a4742cf7e2f77df2b7c03e550962c6a75b7405faaa4546100b 4371 checksum: b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac
3503 languageName: node 4372 languageName: node
3504 linkType: hard 4373 linkType: hard
3505 4374
@@ -3508,7 +4377,7 @@ __metadata:
3508 resolution: "doctrine@npm:3.0.0" 4377 resolution: "doctrine@npm:3.0.0"
3509 dependencies: 4378 dependencies:
3510 esutils: "npm:^2.0.2" 4379 esutils: "npm:^2.0.2"
3511 checksum: 6b38a63fa66847d80e130bb85c83c173b1050037fffac3d5f740c8c691243d5b6fadc5ec502ae8297c474680d879eb24ad8ec7f901673704fe40c8dedc1bee62 4380 checksum: c96bdccabe9d62ab6fea9399fdff04a66e6563c1d6fb3a3a063e8d53c3bb136ba63e84250bbf63d00086a769ad53aef92d2bd483f03f837fc97b71cbee6b2520
3512 languageName: node 4381 languageName: node
3513 linkType: hard 4382 linkType: hard
3514 4383
@@ -3518,7 +4387,7 @@ __metadata:
3518 dependencies: 4387 dependencies:
3519 "@babel/runtime": "npm:^7.8.7" 4388 "@babel/runtime": "npm:^7.8.7"
3520 csstype: "npm:^3.0.2" 4389 csstype: "npm:^3.0.2"
3521 checksum: 4744ec87fd4f09ab51037350ef915371ed0479e7920a23edbb08a9a268c16bcbdbe4a6df76e923956a7465d1d4a5e861f7f5e8bdbfe03546a60b100200f9307a 4390 checksum: f735074d66dd759b36b158fa26e9d00c9388ee0e8c9b16af941c38f014a37fc80782de83afefd621681b19ac0501034b4f1c4a3bff5caa1b8667f0212b5e124c
3522 languageName: node 4391 languageName: node
3523 linkType: hard 4392 linkType: hard
3524 4393
@@ -3528,14 +4397,14 @@ __metadata:
3528 dependencies: 4397 dependencies:
3529 no-case: "npm:^3.0.4" 4398 no-case: "npm:^3.0.4"
3530 tslib: "npm:^2.0.3" 4399 tslib: "npm:^2.0.3"
3531 checksum: 951f9f8423106c57ba5f078e5d81cf810a94d20b16e50ea26369942b634bb30789677756a267320907b250b8c0432b598da719ade592c727968bb1f8cfefa8c6 4400 checksum: 5b859ea65097a7ea870e2c91b5768b72ddf7fa947223fd29e167bcdff58fe731d941c48e47a38ec8aa8e43044c8fbd15cd8fa21689a526bc34b6548197cd5b05
3532 languageName: node 4401 languageName: node
3533 linkType: hard 4402 linkType: hard
3534 4403
3535"eastasianwidth@npm:^0.2.0": 4404"eastasianwidth@npm:^0.2.0":
3536 version: 0.2.0 4405 version: 0.2.0
3537 resolution: "eastasianwidth@npm:0.2.0" 4406 resolution: "eastasianwidth@npm:0.2.0"
3538 checksum: 0b403fab07c8a53488ea6212435f12b8eeec0b0b828554381b333ea1e41104a137cfe812fa83d021ea0270eb6249226bb0dcb61f8f94bed52b943fa2f720542f 4407 checksum: 26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39
3539 languageName: node 4408 languageName: node
3540 linkType: hard 4409 linkType: hard
3541 4410
@@ -3546,28 +4415,28 @@ __metadata:
3546 jake: "npm:^10.8.5" 4415 jake: "npm:^10.8.5"
3547 bin: 4416 bin:
3548 ejs: bin/cli.js 4417 ejs: bin/cli.js
3549 checksum: c970131c2c9831dc260d2420055c1e69500a75a460301cf3cac3bab8ff19cb15de2fcc2c695051420b123cd9f8c20c2a18154916d3494b4870ea68a0d677ac12 4418 checksum: f0e249c79128810f5f6d5cbf347fc906d86bb9384263db0b2a9004aea649f2bc2d112736de5716c509c80afb4721c47281bd5b57c757d3b63f1bf5ac5f885893
3550 languageName: node 4419 languageName: node
3551 linkType: hard 4420 linkType: hard
3552 4421
3553"electron-to-chromium@npm:^1.4.431": 4422"electron-to-chromium@npm:^1.4.477":
3554 version: 1.4.433 4423 version: 1.4.491
3555 resolution: "electron-to-chromium@npm:1.4.433" 4424 resolution: "electron-to-chromium@npm:1.4.491"
3556 checksum: 7bc3350f4a02b9dca6f5b50f73d613caf3549064171213064c16be45b0a1ebd48c1feb5aa4ee7cf0ced244a9e53837300648084ee67eee6bccc039145eeb6367 4425 checksum: 417c9328cf9875f2aed225908e1c7629ff462fe7646c32de56c3e65a3383ea8edd50ecaba017ea06ff1a4b5dedab56aa4c843ee1db726d28065d3ffbe94777dd
3557 languageName: node 4426 languageName: node
3558 linkType: hard 4427 linkType: hard
3559 4428
3560"emoji-regex@npm:^8.0.0": 4429"emoji-regex@npm:^8.0.0":
3561 version: 8.0.0 4430 version: 8.0.0
3562 resolution: "emoji-regex@npm:8.0.0" 4431 resolution: "emoji-regex@npm:8.0.0"
3563 checksum: 0b84c9059a3f051e3da79112ee450f22bc8466dde2a7e09a0b1fc4eff3b98183596e6e2704d5356266851e2a013d95467421eb81c36408fbab1aeb3fc5e4764f 4432 checksum: b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010
3564 languageName: node 4433 languageName: node
3565 linkType: hard 4434 linkType: hard
3566 4435
3567"emoji-regex@npm:^9.2.2": 4436"emoji-regex@npm:^9.2.2":
3568 version: 9.2.2 4437 version: 9.2.2
3569 resolution: "emoji-regex@npm:9.2.2" 4438 resolution: "emoji-regex@npm:9.2.2"
3570 checksum: ef0642d76f5116a04296a85ec167696b91ca8a1373d3cd13ec3acfb0f6a77d4d1c6ce94192ab31f8bad5ca69fbd01b556638fdf389128fea48fb5f6c2c754b45 4439 checksum: af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639
3571 languageName: node 4440 languageName: node
3572 linkType: hard 4441 linkType: hard
3573 4442
@@ -3576,7 +4445,7 @@ __metadata:
3576 resolution: "encoding@npm:0.1.13" 4445 resolution: "encoding@npm:0.1.13"
3577 dependencies: 4446 dependencies:
3578 iconv-lite: "npm:^0.6.2" 4447 iconv-lite: "npm:^0.6.2"
3579 checksum: 954eb7d006c8d466207dcda57ddd15b1d6667607b8da15c7ce400d377504aafcc5e2f5507027cfb045cad7aefd15d18aa3f6e14f3a73ed2b26ad5ff08004536b 4448 checksum: 36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039
3580 languageName: node 4449 languageName: node
3581 linkType: hard 4450 linkType: hard
3582 4451
@@ -3586,28 +4455,28 @@ __metadata:
3586 dependencies: 4455 dependencies:
3587 graceful-fs: "npm:^4.2.4" 4456 graceful-fs: "npm:^4.2.4"
3588 tapable: "npm:^2.2.0" 4457 tapable: "npm:^2.2.0"
3589 checksum: 80df14e9d11ae561b7477866cf5d475aaf5988de7f118ef5a05b94722a107ab58928e3e2cd5a270f696a4f6a16308661872bd6f27cccb2dbe4d8283eee39f62d 4458 checksum: 69984a7990913948b4150855aed26a84afb4cb1c5a94fb8e3a65bd00729a73fc2eaff6871fb8e345377f294831afe349615c93560f2f54d61b43cdfdf668f19a
3590 languageName: node 4459 languageName: node
3591 linkType: hard 4460 linkType: hard
3592 4461
3593"entities@npm:^4.4.0": 4462"entities@npm:^4.4.0":
3594 version: 4.5.0 4463 version: 4.5.0
3595 resolution: "entities@npm:4.5.0" 4464 resolution: "entities@npm:4.5.0"
3596 checksum: 3c45485495e0a5481893b0b618aec46fbe960130bf0437b052ec08c25a8c781b978a06fca889ad7af79634d9111df159c2a37b56d2b2a847c0c4625cd40ab1be 4465 checksum: 5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250
3597 languageName: node 4466 languageName: node
3598 linkType: hard 4467 linkType: hard
3599 4468
3600"env-paths@npm:^2.2.0": 4469"env-paths@npm:^2.2.0":
3601 version: 2.2.1 4470 version: 2.2.1
3602 resolution: "env-paths@npm:2.2.1" 4471 resolution: "env-paths@npm:2.2.1"
3603 checksum: 528af3898854262b86b3adb5de09e6c81b8c0e3f4f675750282281b86782ddc3c33ffc13598d903d9eb23652f339ded86c994b61fe06e5f9cbb69a191f62244b 4472 checksum: 285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4
3604 languageName: node 4473 languageName: node
3605 linkType: hard 4474 linkType: hard
3606 4475
3607"err-code@npm:^2.0.2": 4476"err-code@npm:^2.0.2":
3608 version: 2.0.3 4477 version: 2.0.3
3609 resolution: "err-code@npm:2.0.3" 4478 resolution: "err-code@npm:2.0.3"
3610 checksum: 12244d58c3eeb73a5ebf633ff615b2366cedaccfea3c2b4d6a3295f6440661052e9574c71f89d6dc8a5466e3d84be0b1994e2a4017ab10e1f037f8be1ca89a37 4479 checksum: b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66
3611 languageName: node 4480 languageName: node
3612 linkType: hard 4481 linkType: hard
3613 4482
@@ -3616,21 +4485,22 @@ __metadata:
3616 resolution: "error-ex@npm:1.3.2" 4485 resolution: "error-ex@npm:1.3.2"
3617 dependencies: 4486 dependencies:
3618 is-arrayish: "npm:^0.2.1" 4487 is-arrayish: "npm:^0.2.1"
3619 checksum: 5073bf16fe13e68ffd676d0af3d4bab20e52d917af1cd7e47f61c3cc2b6ec52ec874dc45307a9db6e0b7f8cb47b9f6bb831ff468d2d696cb484a3f7caf2990da 4488 checksum: ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce
3620 languageName: node 4489 languageName: node
3621 linkType: hard 4490 linkType: hard
3622 4491
3623"es-abstract@npm:^1.19.0, es-abstract@npm:^1.20.4": 4492"es-abstract@npm:^1.19.0, es-abstract@npm:^1.20.4, es-abstract@npm:^1.21.2, es-abstract@npm:^1.21.3":
3624 version: 1.21.2 4493 version: 1.22.1
3625 resolution: "es-abstract@npm:1.21.2" 4494 resolution: "es-abstract@npm:1.22.1"
3626 dependencies: 4495 dependencies:
3627 array-buffer-byte-length: "npm:^1.0.0" 4496 array-buffer-byte-length: "npm:^1.0.0"
4497 arraybuffer.prototype.slice: "npm:^1.0.1"
3628 available-typed-arrays: "npm:^1.0.5" 4498 available-typed-arrays: "npm:^1.0.5"
3629 call-bind: "npm:^1.0.2" 4499 call-bind: "npm:^1.0.2"
3630 es-set-tostringtag: "npm:^2.0.1" 4500 es-set-tostringtag: "npm:^2.0.1"
3631 es-to-primitive: "npm:^1.2.1" 4501 es-to-primitive: "npm:^1.2.1"
3632 function.prototype.name: "npm:^1.1.5" 4502 function.prototype.name: "npm:^1.1.5"
3633 get-intrinsic: "npm:^1.2.0" 4503 get-intrinsic: "npm:^1.2.1"
3634 get-symbol-description: "npm:^1.0.0" 4504 get-symbol-description: "npm:^1.0.0"
3635 globalthis: "npm:^1.0.3" 4505 globalthis: "npm:^1.0.3"
3636 gopd: "npm:^1.0.1" 4506 gopd: "npm:^1.0.1"
@@ -3650,15 +4520,41 @@ __metadata:
3650 object-inspect: "npm:^1.12.3" 4520 object-inspect: "npm:^1.12.3"
3651 object-keys: "npm:^1.1.1" 4521 object-keys: "npm:^1.1.1"
3652 object.assign: "npm:^4.1.4" 4522 object.assign: "npm:^4.1.4"
3653 regexp.prototype.flags: "npm:^1.4.3" 4523 regexp.prototype.flags: "npm:^1.5.0"
4524 safe-array-concat: "npm:^1.0.0"
3654 safe-regex-test: "npm:^1.0.0" 4525 safe-regex-test: "npm:^1.0.0"
3655 string.prototype.trim: "npm:^1.2.7" 4526 string.prototype.trim: "npm:^1.2.7"
3656 string.prototype.trimend: "npm:^1.0.6" 4527 string.prototype.trimend: "npm:^1.0.6"
3657 string.prototype.trimstart: "npm:^1.0.6" 4528 string.prototype.trimstart: "npm:^1.0.6"
4529 typed-array-buffer: "npm:^1.0.0"
4530 typed-array-byte-length: "npm:^1.0.0"
4531 typed-array-byte-offset: "npm:^1.0.0"
3658 typed-array-length: "npm:^1.0.4" 4532 typed-array-length: "npm:^1.0.4"
3659 unbox-primitive: "npm:^1.0.2" 4533 unbox-primitive: "npm:^1.0.2"
3660 which-typed-array: "npm:^1.1.9" 4534 which-typed-array: "npm:^1.1.10"
3661 checksum: 63800c131f77145c020be1a4340031f8322f03c6c73cd1336d5893cab09bce257f6c217e60a60188539096f72bc1f4885f474e8bbae8fa949edc8679f905dfd2 4535 checksum: 36abed2b7efa8dd337d938e50d0b97d070c0ef45b2257eec0ae8c3edc5c7e8f3e2906530afda5c0b8a4f44299391d078237fd5ea454ac4e9adb6f8343bf84980
4536 languageName: node
4537 linkType: hard
4538
4539"es-iterator-helpers@npm:^1.0.12":
4540 version: 1.0.13
4541 resolution: "es-iterator-helpers@npm:1.0.13"
4542 dependencies:
4543 asynciterator.prototype: "npm:^1.0.0"
4544 call-bind: "npm:^1.0.2"
4545 define-properties: "npm:^1.2.0"
4546 es-abstract: "npm:^1.21.3"
4547 es-set-tostringtag: "npm:^2.0.1"
4548 function-bind: "npm:^1.1.1"
4549 get-intrinsic: "npm:^1.2.1"
4550 globalthis: "npm:^1.0.3"
4551 has-property-descriptors: "npm:^1.0.0"
4552 has-proto: "npm:^1.0.1"
4553 has-symbols: "npm:^1.0.3"
4554 internal-slot: "npm:^1.0.5"
4555 iterator.prototype: "npm:^1.1.0"
4556 safe-array-concat: "npm:^1.0.0"
4557 checksum: e6109017c432376294d5d6849cd0a5f8d9bcf5819eea612026e4401bb362d798c01e7a8984702b87d9d689c07b1146a31a99f17a761ca4e7e6470d9e8db9bea8
3662 languageName: node 4558 languageName: node
3663 linkType: hard 4559 linkType: hard
3664 4560
@@ -3669,7 +4565,7 @@ __metadata:
3669 get-intrinsic: "npm:^1.1.3" 4565 get-intrinsic: "npm:^1.1.3"
3670 has: "npm:^1.0.3" 4566 has: "npm:^1.0.3"
3671 has-tostringtag: "npm:^1.0.0" 4567 has-tostringtag: "npm:^1.0.0"
3672 checksum: fecdbc1f62b901b58b33d47e2daa6b43105b33dd233792643dc7aa1d7256d2fa13c47816d1e03e121e948d01d009faa366466e436baefb886afa18720945d439 4568 checksum: 9af096365e3861bb29755cc5f76f15f66a7eab0e83befca396129090c1d9737e54090278b8e5357e97b5f0a5b0459fca07c40c6740884c2659cbf90ef8e508cc
3673 languageName: node 4569 languageName: node
3674 linkType: hard 4570 linkType: hard
3675 4571
@@ -3678,7 +4574,7 @@ __metadata:
3678 resolution: "es-shim-unscopables@npm:1.0.0" 4574 resolution: "es-shim-unscopables@npm:1.0.0"
3679 dependencies: 4575 dependencies:
3680 has: "npm:^1.0.3" 4576 has: "npm:^1.0.3"
3681 checksum: d160870a41ecfb1a49e3921d1ca5c05c1fc6f54adafdc48ed98814e8ae3d7b98144ea3f864255f7165c7ba7e82209a6bdbf1c5ad2d84e0c37a9ab7fe79439a0a 4577 checksum: d54a66239fbd19535b3e50333913260394f14d2d7adb136a95396a13ca584bab400cf9cb2ffd9232f3fe2f0362540bd3a708240c493e46e13fe0b90cfcfedc3d
3682 languageName: node 4578 languageName: node
3683 linkType: hard 4579 linkType: hard
3684 4580
@@ -3689,36 +4585,43 @@ __metadata:
3689 is-callable: "npm:^1.1.4" 4585 is-callable: "npm:^1.1.4"
3690 is-date-object: "npm:^1.0.1" 4586 is-date-object: "npm:^1.0.1"
3691 is-symbol: "npm:^1.0.2" 4587 is-symbol: "npm:^1.0.2"
3692 checksum: b419a547ffcbd08c23272e283a20018723bd2f39cbee39f66a8fd0fb110b01728ede799bf1365d5981e57a7afb6901916ad147f374e87bb2b11613ebb1d1aaec 4588 checksum: 0886572b8dc075cb10e50c0af62a03d03a68e1e69c388bd4f10c0649ee41b1fbb24840a1b7e590b393011b5cdbe0144b776da316762653685432df37d6de60f1
3693 languageName: node 4589 languageName: node
3694 linkType: hard 4590 linkType: hard
3695 4591
3696"esbuild@npm:^0.17.5": 4592"es6-object-assign@npm:^1.1.0":
3697 version: 0.17.19 4593 version: 1.1.0
3698 resolution: "esbuild@npm:0.17.19" 4594 resolution: "es6-object-assign@npm:1.1.0"
3699 dependencies: 4595 checksum: 11c165ae16866aca897dee9b689402f0e871589e859809343ef9e0fdd067133684db16fd15abdba2a99e7319222b9f43e6b747baabb909cee9d0ecbac8deebee
3700 "@esbuild/android-arm": "npm:0.17.19" 4596 languageName: node
3701 "@esbuild/android-arm64": "npm:0.17.19" 4597 linkType: hard
3702 "@esbuild/android-x64": "npm:0.17.19" 4598
3703 "@esbuild/darwin-arm64": "npm:0.17.19" 4599"esbuild@npm:^0.18.10":
3704 "@esbuild/darwin-x64": "npm:0.17.19" 4600 version: 0.18.20
3705 "@esbuild/freebsd-arm64": "npm:0.17.19" 4601 resolution: "esbuild@npm:0.18.20"
3706 "@esbuild/freebsd-x64": "npm:0.17.19" 4602 dependencies:
3707 "@esbuild/linux-arm": "npm:0.17.19" 4603 "@esbuild/android-arm": "npm:0.18.20"
3708 "@esbuild/linux-arm64": "npm:0.17.19" 4604 "@esbuild/android-arm64": "npm:0.18.20"
3709 "@esbuild/linux-ia32": "npm:0.17.19" 4605 "@esbuild/android-x64": "npm:0.18.20"
3710 "@esbuild/linux-loong64": "npm:0.17.19" 4606 "@esbuild/darwin-arm64": "npm:0.18.20"
3711 "@esbuild/linux-mips64el": "npm:0.17.19" 4607 "@esbuild/darwin-x64": "npm:0.18.20"
3712 "@esbuild/linux-ppc64": "npm:0.17.19" 4608 "@esbuild/freebsd-arm64": "npm:0.18.20"
3713 "@esbuild/linux-riscv64": "npm:0.17.19" 4609 "@esbuild/freebsd-x64": "npm:0.18.20"
3714 "@esbuild/linux-s390x": "npm:0.17.19" 4610 "@esbuild/linux-arm": "npm:0.18.20"
3715 "@esbuild/linux-x64": "npm:0.17.19" 4611 "@esbuild/linux-arm64": "npm:0.18.20"
3716 "@esbuild/netbsd-x64": "npm:0.17.19" 4612 "@esbuild/linux-ia32": "npm:0.18.20"
3717 "@esbuild/openbsd-x64": "npm:0.17.19" 4613 "@esbuild/linux-loong64": "npm:0.18.20"
3718 "@esbuild/sunos-x64": "npm:0.17.19" 4614 "@esbuild/linux-mips64el": "npm:0.18.20"
3719 "@esbuild/win32-arm64": "npm:0.17.19" 4615 "@esbuild/linux-ppc64": "npm:0.18.20"
3720 "@esbuild/win32-ia32": "npm:0.17.19" 4616 "@esbuild/linux-riscv64": "npm:0.18.20"
3721 "@esbuild/win32-x64": "npm:0.17.19" 4617 "@esbuild/linux-s390x": "npm:0.18.20"
4618 "@esbuild/linux-x64": "npm:0.18.20"
4619 "@esbuild/netbsd-x64": "npm:0.18.20"
4620 "@esbuild/openbsd-x64": "npm:0.18.20"
4621 "@esbuild/sunos-x64": "npm:0.18.20"
4622 "@esbuild/win32-arm64": "npm:0.18.20"
4623 "@esbuild/win32-ia32": "npm:0.18.20"
4624 "@esbuild/win32-x64": "npm:0.18.20"
3722 dependenciesMeta: 4625 dependenciesMeta:
3723 "@esbuild/android-arm": 4626 "@esbuild/android-arm":
3724 optional: true 4627 optional: true
@@ -3766,35 +4669,35 @@ __metadata:
3766 optional: true 4669 optional: true
3767 bin: 4670 bin:
3768 esbuild: bin/esbuild 4671 esbuild: bin/esbuild
3769 checksum: 6df07a802006da7bcf3135f3014fb9f45f0f8772dc76315a4cc021e616e426cf04ed247635c5beed62d66f9aafd1db28d7b01664339fa438aacc2092723980a8 4672 checksum: 473b1d92842f50a303cf948a11ebd5f69581cd254d599dd9d62f9989858e0533f64e83b723b5e1398a5b488c0f5fd088795b4235f65ecaf4f007d4b79f04bc88
3770 languageName: node 4673 languageName: node
3771 linkType: hard 4674 linkType: hard
3772 4675
3773"escalade@npm:^3.1.1": 4676"escalade@npm:^3.1.1":
3774 version: 3.1.1 4677 version: 3.1.1
3775 resolution: "escalade@npm:3.1.1" 4678 resolution: "escalade@npm:3.1.1"
3776 checksum: 37f3535f99193a5ff755af30866bb55828aff044bdc14e1844d0965470ba87ef686761fbbf2cea02955f1bb8510f72c3308e7dbe2d794fa85058a33bf60ea372 4679 checksum: afd02e6ca91ffa813e1108b5e7756566173d6bc0d1eb951cb44d6b21702ec17c1cf116cfe75d4a2b02e05acb0b808a7a9387d0d1ca5cf9c04ad03a8445c3e46d
3777 languageName: node 4680 languageName: node
3778 linkType: hard 4681 linkType: hard
3779 4682
3780"escape-string-regexp@npm:^1.0.5": 4683"escape-string-regexp@npm:^1.0.5":
3781 version: 1.0.5 4684 version: 1.0.5
3782 resolution: "escape-string-regexp@npm:1.0.5" 4685 resolution: "escape-string-regexp@npm:1.0.5"
3783 checksum: 14d2c74a990b4a0ae55f299409693533a620402a6efa02b201d7e2ea60c71a516c36ccfcaf2aa604262eec6c4628bf8b9647e211fb179277cb479bd870c906fa 4686 checksum: a968ad453dd0c2724e14a4f20e177aaf32bb384ab41b674a8454afe9a41c5e6fe8903323e0a1052f56289d04bd600f81278edf140b0fcc02f5cac98d0f5b5371
3784 languageName: node 4687 languageName: node
3785 linkType: hard 4688 linkType: hard
3786 4689
3787"escape-string-regexp@npm:^4.0.0": 4690"escape-string-regexp@npm:^4.0.0":
3788 version: 4.0.0 4691 version: 4.0.0
3789 resolution: "escape-string-regexp@npm:4.0.0" 4692 resolution: "escape-string-regexp@npm:4.0.0"
3790 checksum: 09f81f2e5eb8d6108ea2fe366eb3041b8bc35381c95c7b7e38f0eb64825a3967618bb0840b7a9e950457d9b4c0a6e758b69374fb7906d939a67018d6c53e8cbe 4693 checksum: 9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9
3791 languageName: node 4694 languageName: node
3792 linkType: hard 4695 linkType: hard
3793 4696
3794"escape-string-regexp@npm:^5.0.0": 4697"escape-string-regexp@npm:^5.0.0":
3795 version: 5.0.0 4698 version: 5.0.0
3796 resolution: "escape-string-regexp@npm:5.0.0" 4699 resolution: "escape-string-regexp@npm:5.0.0"
3797 checksum: 9c968d6e975030ef1349f1f011348de4b1fe5e13d5e0c407d38ab141d5e8a8b163ba727a9df22f3e796211aa340b73080455d3a1784af90409e2b8afaed02f76 4700 checksum: 6366f474c6f37a802800a435232395e04e9885919873e382b157ab7e8f0feb8fed71497f84a6f6a81a49aab41815522f5839112bd38026d203aea0c91622df95
3798 languageName: node 4701 languageName: node
3799 linkType: hard 4702 linkType: hard
3800 4703
@@ -3809,21 +4712,21 @@ __metadata:
3809 peerDependencies: 4712 peerDependencies:
3810 eslint: ^7.32.0 || ^8.2.0 4713 eslint: ^7.32.0 || ^8.2.0
3811 eslint-plugin-import: ^2.25.2 4714 eslint-plugin-import: ^2.25.2
3812 checksum: aa9ef296ef02788377f61629222e8b9ab04b1dd63ebc13754011195862cad50cf43521d2147a2e1640ec6c4306d25874f26f1d24648d4ed0fd59c6f0285d515b 4715 checksum: 93639d991654414756f82ad7860aac30b0dc6797277b7904ddb53ed88a32c470598696bbc6c503e066414024d305221974d3769e6642de65043bedf29cbbd30f
3813 languageName: node 4716 languageName: node
3814 linkType: hard 4717 linkType: hard
3815 4718
3816"eslint-config-airbnb-typescript@npm:^17.0.0": 4719"eslint-config-airbnb-typescript@npm:^17.1.0":
3817 version: 17.0.0 4720 version: 17.1.0
3818 resolution: "eslint-config-airbnb-typescript@npm:17.0.0" 4721 resolution: "eslint-config-airbnb-typescript@npm:17.1.0"
3819 dependencies: 4722 dependencies:
3820 eslint-config-airbnb-base: "npm:^15.0.0" 4723 eslint-config-airbnb-base: "npm:^15.0.0"
3821 peerDependencies: 4724 peerDependencies:
3822 "@typescript-eslint/eslint-plugin": ^5.13.0 4725 "@typescript-eslint/eslint-plugin": ^5.13.0 || ^6.0.0
3823 "@typescript-eslint/parser": ^5.0.0 4726 "@typescript-eslint/parser": ^5.0.0 || ^6.0.0
3824 eslint: ^7.32.0 || ^8.2.0 4727 eslint: ^7.32.0 || ^8.2.0
3825 eslint-plugin-import: ^2.25.3 4728 eslint-plugin-import: ^2.25.3
3826 checksum: a408937b6950c58dcce715178a7c4979a5abec6dc0e938be796f4907b6817c03cfdd05a2058da1274b84fe86de919f3c8ec2ef696d036707c7c681a284a5fc6b 4729 checksum: 46d1753d660fe4225ccd89e91dd9f812db490326dfb835cfb786ab0b9a4ca25a39171a838661233b8f6f9a19294aaedaa962e19df915066beb80e7422749f7f1
3827 languageName: node 4730 languageName: node
3828 linkType: hard 4731 linkType: hard
3829 4732
@@ -3840,52 +4743,51 @@ __metadata:
3840 eslint-plugin-jsx-a11y: ^6.5.1 4743 eslint-plugin-jsx-a11y: ^6.5.1
3841 eslint-plugin-react: ^7.28.0 4744 eslint-plugin-react: ^7.28.0
3842 eslint-plugin-react-hooks: ^4.3.0 4745 eslint-plugin-react-hooks: ^4.3.0
3843 checksum: 2b20bc1827bbc56dc66d5f604f3ecb4609223bf81ab6f1e1211cb458d43aaf19e731cdb05bb0bc5b99d51e129139fabdb26220df3fd24f41e9e015b907689184 4746 checksum: 867feeda45c4b480b1b8eff8fabc1bb107e837da8b48e5039e0c175ae6ad34af383b1924fc163bbfcef24a324e6651b1515e5bd12cbcbb19535a8838e2544a02
3844 languageName: node 4747 languageName: node
3845 linkType: hard 4748 linkType: hard
3846 4749
3847"eslint-config-prettier@npm:^8.8.0": 4750"eslint-config-prettier@npm:^9.0.0":
3848 version: 8.8.0 4751 version: 9.0.0
3849 resolution: "eslint-config-prettier@npm:8.8.0" 4752 resolution: "eslint-config-prettier@npm:9.0.0"
3850 peerDependencies: 4753 peerDependencies:
3851 eslint: ">=7.0.0" 4754 eslint: ">=7.0.0"
3852 bin: 4755 bin:
3853 eslint-config-prettier: bin/cli.js 4756 eslint-config-prettier: bin/cli.js
3854 checksum: 942d0b9d162729967a1816a23107066ae176e5f3f3ebaa3be9fd05cc3dbc1d10e389f127a298fbd564f9cc3e419c9635623a974de9327042289d96469dd91528 4757 checksum: bc1f661915845c631824178942e5d02f858fe6d0ea796f0050d63e0f681927b92696e81139dd04714c08c3e7de580fd079c66162e40070155ba79eaee78ab5d0
3855 languageName: node 4758 languageName: node
3856 linkType: hard 4759 linkType: hard
3857 4760
3858"eslint-import-resolver-node@npm:^0.3.7": 4761"eslint-import-resolver-node@npm:^0.3.7":
3859 version: 0.3.7 4762 version: 0.3.9
3860 resolution: "eslint-import-resolver-node@npm:0.3.7" 4763 resolution: "eslint-import-resolver-node@npm:0.3.9"
3861 dependencies: 4764 dependencies:
3862 debug: "npm:^3.2.7" 4765 debug: "npm:^3.2.7"
3863 is-core-module: "npm:^2.11.0" 4766 is-core-module: "npm:^2.13.0"
3864 resolve: "npm:^1.22.1" 4767 resolve: "npm:^1.22.4"
3865 checksum: 13aec906b65aea084311c52f4489ecc9b02606433e9821c5c51d98ad9325575f76da0f1c5955985b1e6571bacdc2066178affca399174f22e53143b80e244c37 4768 checksum: 0ea8a24a72328a51fd95aa8f660dcca74c1429806737cf10261ab90cfcaaf62fd1eff664b76a44270868e0a932711a81b250053942595bcd00a93b1c1575dd61
3866 languageName: node 4769 languageName: node
3867 linkType: hard 4770 linkType: hard
3868 4771
3869"eslint-import-resolver-typescript@npm:^3.5.5": 4772"eslint-import-resolver-typescript@npm:^3.6.0":
3870 version: 3.5.5 4773 version: 3.6.0
3871 resolution: "eslint-import-resolver-typescript@npm:3.5.5" 4774 resolution: "eslint-import-resolver-typescript@npm:3.6.0"
3872 dependencies: 4775 dependencies:
3873 debug: "npm:^4.3.4" 4776 debug: "npm:^4.3.4"
3874 enhanced-resolve: "npm:^5.12.0" 4777 enhanced-resolve: "npm:^5.12.0"
3875 eslint-module-utils: "npm:^2.7.4" 4778 eslint-module-utils: "npm:^2.7.4"
4779 fast-glob: "npm:^3.3.1"
3876 get-tsconfig: "npm:^4.5.0" 4780 get-tsconfig: "npm:^4.5.0"
3877 globby: "npm:^13.1.3"
3878 is-core-module: "npm:^2.11.0" 4781 is-core-module: "npm:^2.11.0"
3879 is-glob: "npm:^4.0.3" 4782 is-glob: "npm:^4.0.3"
3880 synckit: "npm:^0.8.5"
3881 peerDependencies: 4783 peerDependencies:
3882 eslint: "*" 4784 eslint: "*"
3883 eslint-plugin-import: "*" 4785 eslint-plugin-import: "*"
3884 checksum: 4a398b14440ddc3aab1b300defceeea32f70798c8fbe4dfaadbc329ad0965ab85ba91beb5c100bb8e546f8aba996161ac8d73dfde3f26dc168805c02fb54b1ee 4786 checksum: 4f3b7e629e37c52804da0e4fe3eda5fdd727fd1d945fad5662bcd64a87fafa08b986efe07fb2116c81f2259ba29d6d06b99edafd7d3499cfb78ff71b6e8ca4c1
3885 languageName: node 4787 languageName: node
3886 linkType: hard 4788 linkType: hard
3887 4789
3888"eslint-module-utils@npm:^2.7.4": 4790"eslint-module-utils@npm:^2.7.4, eslint-module-utils@npm:^2.8.0":
3889 version: 2.8.0 4791 version: 2.8.0
3890 resolution: "eslint-module-utils@npm:2.8.0" 4792 resolution: "eslint-module-utils@npm:2.8.0"
3891 dependencies: 4793 dependencies:
@@ -3893,32 +4795,34 @@ __metadata:
3893 peerDependenciesMeta: 4795 peerDependenciesMeta:
3894 eslint: 4796 eslint:
3895 optional: true 4797 optional: true
3896 checksum: c4820cf0d710cece498aaae98a15d339e09b04804d478a6af598a6962baaac31db13ce9f025a64edb8f607c20a07f895dacd2e1b80b833b7f3ad38d66d269c29 4798 checksum: c7a8d1a58d76ec8217a8fea49271ec8132d1b9390965a75f6a4ecbc9e5983d742195b46d2e4378231d2186801439fe1aa5700714b0bfd4eb17aac6e1b65309df
3897 languageName: node 4799 languageName: node
3898 linkType: hard 4800 linkType: hard
3899 4801
3900"eslint-plugin-import@npm:^2.27.5": 4802"eslint-plugin-import@npm:^2.28.1":
3901 version: 2.27.5 4803 version: 2.28.1
3902 resolution: "eslint-plugin-import@npm:2.27.5" 4804 resolution: "eslint-plugin-import@npm:2.28.1"
3903 dependencies: 4805 dependencies:
3904 array-includes: "npm:^3.1.6" 4806 array-includes: "npm:^3.1.6"
4807 array.prototype.findlastindex: "npm:^1.2.2"
3905 array.prototype.flat: "npm:^1.3.1" 4808 array.prototype.flat: "npm:^1.3.1"
3906 array.prototype.flatmap: "npm:^1.3.1" 4809 array.prototype.flatmap: "npm:^1.3.1"
3907 debug: "npm:^3.2.7" 4810 debug: "npm:^3.2.7"
3908 doctrine: "npm:^2.1.0" 4811 doctrine: "npm:^2.1.0"
3909 eslint-import-resolver-node: "npm:^0.3.7" 4812 eslint-import-resolver-node: "npm:^0.3.7"
3910 eslint-module-utils: "npm:^2.7.4" 4813 eslint-module-utils: "npm:^2.8.0"
3911 has: "npm:^1.0.3" 4814 has: "npm:^1.0.3"
3912 is-core-module: "npm:^2.11.0" 4815 is-core-module: "npm:^2.13.0"
3913 is-glob: "npm:^4.0.3" 4816 is-glob: "npm:^4.0.3"
3914 minimatch: "npm:^3.1.2" 4817 minimatch: "npm:^3.1.2"
4818 object.fromentries: "npm:^2.0.6"
4819 object.groupby: "npm:^1.0.0"
3915 object.values: "npm:^1.1.6" 4820 object.values: "npm:^1.1.6"
3916 resolve: "npm:^1.22.1" 4821 semver: "npm:^6.3.1"
3917 semver: "npm:^6.3.0" 4822 tsconfig-paths: "npm:^3.14.2"
3918 tsconfig-paths: "npm:^3.14.1"
3919 peerDependencies: 4823 peerDependencies:
3920 eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 4824 eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
3921 checksum: 8b195fc93660f0b6ac5542612e6b73090f9303b0a134dbc662d5d2c158233331ee79d491e650f560916289a35bd03694ffbac6afc8738c62c218668f3fa3158d 4825 checksum: 5a29554d56f26d2bfb4d4f20b99aad6664c64812ef9655d5b3f089bbf70f340a34dabbe0b8ffa38bd9f1eabf828200acc5a56634842ddb83dd1e4ba01ad6d38d
3922 languageName: node 4826 languageName: node
3923 linkType: hard 4827 linkType: hard
3924 4828
@@ -3944,7 +4848,7 @@ __metadata:
3944 semver: "npm:^6.3.0" 4848 semver: "npm:^6.3.0"
3945 peerDependencies: 4849 peerDependencies:
3946 eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 4850 eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8
3947 checksum: 8aebd3313a3a4eddf27da14a5fa1e5b959a5132cc2b0d70332f8576992815d67fc1e28c618a0039d527936a3f60b06fd3ad7559e38a5c387325bca10eb0d1fa5 4851 checksum: 41ad3d0c8036b36cd475685c1ad639157f403b16e8ac23c07f1dbe0226ccf8458f2805cbd5cc8e56856a5d8a356f3276e3139274d819476ccad80c41b9245502
3948 languageName: node 4852 languageName: node
3949 linkType: hard 4853 linkType: hard
3950 4854
@@ -3953,22 +4857,26 @@ __metadata:
3953 resolution: "eslint-plugin-mobx@npm:0.0.9" 4857 resolution: "eslint-plugin-mobx@npm:0.0.9"
3954 peerDependencies: 4858 peerDependencies:
3955 eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 4859 eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0
3956 checksum: ed2cb228533cd61f4ac9f18b04e73c3172e5f8a9648da0281a7610360c15a9467e325b549c108a9951fed4d15b34c5ac10bc43dc684d7613c4f6ee34ae8abf78 4860 checksum: d0668169cf56633ff9b34ff251f59374a267083def5ad64f23772e236464d84e6a0b4fc5f68ad7bda2c1ea53d75c4ce0499e12747e67c3272e5968be939a6e9f
3957 languageName: node 4861 languageName: node
3958 linkType: hard 4862 linkType: hard
3959 4863
3960"eslint-plugin-prettier@npm:^4.2.1": 4864"eslint-plugin-prettier@npm:^5.0.0":
3961 version: 4.2.1 4865 version: 5.0.0
3962 resolution: "eslint-plugin-prettier@npm:4.2.1" 4866 resolution: "eslint-plugin-prettier@npm:5.0.0"
3963 dependencies: 4867 dependencies:
3964 prettier-linter-helpers: "npm:^1.0.0" 4868 prettier-linter-helpers: "npm:^1.0.0"
4869 synckit: "npm:^0.8.5"
3965 peerDependencies: 4870 peerDependencies:
3966 eslint: ">=7.28.0" 4871 "@types/eslint": ">=8.0.0"
3967 prettier: ">=2.0.0" 4872 eslint: ">=8.0.0"
4873 prettier: ">=3.0.0"
3968 peerDependenciesMeta: 4874 peerDependenciesMeta:
4875 "@types/eslint":
4876 optional: true
3969 eslint-config-prettier: 4877 eslint-config-prettier:
3970 optional: true 4878 optional: true
3971 checksum: add67757bf011d6c2f1e7c659975117b43aa9f81ebc799d69205fb2c43ed45ec0d36bdbdcfd3f0242ba1ac7030a73b381468adb82dda5aee0d986d450226442c 4879 checksum: 7a3641196fc7305c11ed53faae4b69e82bd1d58ba3894d1ac77d68af7ea91c9e2b1fd50e2645f5dc2831bbcb866bb3897a0710c955c0a7fc9918ef4fb7687b97
3972 languageName: node 4880 languageName: node
3973 linkType: hard 4881 linkType: hard
3974 4882
@@ -3977,18 +4885,19 @@ __metadata:
3977 resolution: "eslint-plugin-react-hooks@npm:4.6.0" 4885 resolution: "eslint-plugin-react-hooks@npm:4.6.0"
3978 peerDependencies: 4886 peerDependencies:
3979 eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 4887 eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
3980 checksum: 7a7df60fd4f2d39bc4b7baaeb0868382454e38d7fe631a0f71c8e6241ca57a1ec258cfef4b05d3cda72c20e5e8d33afebe4dafa9a8a112f05cd5c006091fb083 4888 checksum: 58c7e10ea5792c33346fcf5cb4024e14837035ce412ff99c2dcb7c4f903dc9b17939078f80bfef826301ce326582c396c00e8e0ac9d10ac2cde2b42d33763c65
3981 languageName: node 4889 languageName: node
3982 linkType: hard 4890 linkType: hard
3983 4891
3984"eslint-plugin-react@npm:^7.32.2": 4892"eslint-plugin-react@npm:^7.33.2":
3985 version: 7.32.2 4893 version: 7.33.2
3986 resolution: "eslint-plugin-react@npm:7.32.2" 4894 resolution: "eslint-plugin-react@npm:7.33.2"
3987 dependencies: 4895 dependencies:
3988 array-includes: "npm:^3.1.6" 4896 array-includes: "npm:^3.1.6"
3989 array.prototype.flatmap: "npm:^1.3.1" 4897 array.prototype.flatmap: "npm:^1.3.1"
3990 array.prototype.tosorted: "npm:^1.1.1" 4898 array.prototype.tosorted: "npm:^1.1.1"
3991 doctrine: "npm:^2.1.0" 4899 doctrine: "npm:^2.1.0"
4900 es-iterator-helpers: "npm:^1.0.12"
3992 estraverse: "npm:^5.3.0" 4901 estraverse: "npm:^5.3.0"
3993 jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" 4902 jsx-ast-utils: "npm:^2.4.1 || ^3.0.0"
3994 minimatch: "npm:^3.1.2" 4903 minimatch: "npm:^3.1.2"
@@ -3998,61 +4907,51 @@ __metadata:
3998 object.values: "npm:^1.1.6" 4907 object.values: "npm:^1.1.6"
3999 prop-types: "npm:^15.8.1" 4908 prop-types: "npm:^15.8.1"
4000 resolve: "npm:^2.0.0-next.4" 4909 resolve: "npm:^2.0.0-next.4"
4001 semver: "npm:^6.3.0" 4910 semver: "npm:^6.3.1"
4002 string.prototype.matchall: "npm:^4.0.8" 4911 string.prototype.matchall: "npm:^4.0.8"
4003 peerDependencies: 4912 peerDependencies:
4004 eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 4913 eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8
4005 checksum: c609be006eeb23f6cc28cbc43a97cc8724fd2ac1c33425bb8d5f93c3bd59ae1c136a9261afa0716ca9a81ffabcfb66ca5952bc84b934cb4f50d00c362fcf69b7 4914 checksum: f9b247861024bafc396c4bd3c9ac946604b3b23077251c98f23602aa22027a0c33a69157fd49564e4ff7f17b3678e5dc366a46c7ec42a09454d7cbce786d5001
4006 languageName: node
4007 linkType: hard
4008
4009"eslint-scope@npm:^5.1.1":
4010 version: 5.1.1
4011 resolution: "eslint-scope@npm:5.1.1"
4012 dependencies:
4013 esrecurse: "npm:^4.3.0"
4014 estraverse: "npm:^4.1.1"
4015 checksum: 50c26e6abd713f6acf27498e37af26dc08d9b2781c038a32d8c44dbab59744233de58b1bd6b3a21286384ea40458962a80d8f3923c33c90369f4d0e891c69065
4016 languageName: node 4915 languageName: node
4017 linkType: hard 4916 linkType: hard
4018 4917
4019"eslint-scope@npm:^7.2.0": 4918"eslint-scope@npm:^7.2.2":
4020 version: 7.2.0 4919 version: 7.2.2
4021 resolution: "eslint-scope@npm:7.2.0" 4920 resolution: "eslint-scope@npm:7.2.2"
4022 dependencies: 4921 dependencies:
4023 esrecurse: "npm:^4.3.0" 4922 esrecurse: "npm:^4.3.0"
4024 estraverse: "npm:^5.2.0" 4923 estraverse: "npm:^5.2.0"
4025 checksum: a68b86c2ab4bd4605f3d1f08007c9dcffebaffe80e12a5afe31ffe4350933d10a1b26b679851d5fbc931ffc59f4afab1778d44ac74ca05c0aa4e591acf403859 4924 checksum: 613c267aea34b5a6d6c00514e8545ef1f1433108097e857225fed40d397dd6b1809dffd11c2fde23b37ca53d7bf935fe04d2a18e6fc932b31837b6ad67e1c116
4026 languageName: node 4925 languageName: node
4027 linkType: hard 4926 linkType: hard
4028 4927
4029"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": 4928"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3":
4030 version: 3.4.1 4929 version: 3.4.3
4031 resolution: "eslint-visitor-keys@npm:3.4.1" 4930 resolution: "eslint-visitor-keys@npm:3.4.3"
4032 checksum: 97db79746bfe11a3ab0e60ce454cd809e7ac167ddd7d28736845ba57b8402d6b5d6c10fed2decf8c4026f7d3d659ebc024336ef30fdf473f0402bb1237c6a410 4931 checksum: 92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820
4033 languageName: node 4932 languageName: node
4034 linkType: hard 4933 linkType: hard
4035 4934
4036"eslint@npm:^8.43.0": 4935"eslint@npm:^8.49.0":
4037 version: 8.43.0 4936 version: 8.49.0
4038 resolution: "eslint@npm:8.43.0" 4937 resolution: "eslint@npm:8.49.0"
4039 dependencies: 4938 dependencies:
4040 "@eslint-community/eslint-utils": "npm:^4.2.0" 4939 "@eslint-community/eslint-utils": "npm:^4.2.0"
4041 "@eslint-community/regexpp": "npm:^4.4.0" 4940 "@eslint-community/regexpp": "npm:^4.6.1"
4042 "@eslint/eslintrc": "npm:^2.0.3" 4941 "@eslint/eslintrc": "npm:^2.1.2"
4043 "@eslint/js": "npm:8.43.0" 4942 "@eslint/js": "npm:8.49.0"
4044 "@humanwhocodes/config-array": "npm:^0.11.10" 4943 "@humanwhocodes/config-array": "npm:^0.11.11"
4045 "@humanwhocodes/module-importer": "npm:^1.0.1" 4944 "@humanwhocodes/module-importer": "npm:^1.0.1"
4046 "@nodelib/fs.walk": "npm:^1.2.8" 4945 "@nodelib/fs.walk": "npm:^1.2.8"
4047 ajv: "npm:^6.10.0" 4946 ajv: "npm:^6.12.4"
4048 chalk: "npm:^4.0.0" 4947 chalk: "npm:^4.0.0"
4049 cross-spawn: "npm:^7.0.2" 4948 cross-spawn: "npm:^7.0.2"
4050 debug: "npm:^4.3.2" 4949 debug: "npm:^4.3.2"
4051 doctrine: "npm:^3.0.0" 4950 doctrine: "npm:^3.0.0"
4052 escape-string-regexp: "npm:^4.0.0" 4951 escape-string-regexp: "npm:^4.0.0"
4053 eslint-scope: "npm:^7.2.0" 4952 eslint-scope: "npm:^7.2.2"
4054 eslint-visitor-keys: "npm:^3.4.1" 4953 eslint-visitor-keys: "npm:^3.4.3"
4055 espree: "npm:^9.5.2" 4954 espree: "npm:^9.6.1"
4056 esquery: "npm:^1.4.2" 4955 esquery: "npm:^1.4.2"
4057 esutils: "npm:^2.0.2" 4956 esutils: "npm:^2.0.2"
4058 fast-deep-equal: "npm:^3.1.3" 4957 fast-deep-equal: "npm:^3.1.3"
@@ -4062,7 +4961,6 @@ __metadata:
4062 globals: "npm:^13.19.0" 4961 globals: "npm:^13.19.0"
4063 graphemer: "npm:^1.4.0" 4962 graphemer: "npm:^1.4.0"
4064 ignore: "npm:^5.2.0" 4963 ignore: "npm:^5.2.0"
4065 import-fresh: "npm:^3.0.0"
4066 imurmurhash: "npm:^0.1.4" 4964 imurmurhash: "npm:^0.1.4"
4067 is-glob: "npm:^4.0.0" 4965 is-glob: "npm:^4.0.0"
4068 is-path-inside: "npm:^3.0.3" 4966 is-path-inside: "npm:^3.0.3"
@@ -4072,24 +4970,23 @@ __metadata:
4072 lodash.merge: "npm:^4.6.2" 4970 lodash.merge: "npm:^4.6.2"
4073 minimatch: "npm:^3.1.2" 4971 minimatch: "npm:^3.1.2"
4074 natural-compare: "npm:^1.4.0" 4972 natural-compare: "npm:^1.4.0"
4075 optionator: "npm:^0.9.1" 4973 optionator: "npm:^0.9.3"
4076 strip-ansi: "npm:^6.0.1" 4974 strip-ansi: "npm:^6.0.1"
4077 strip-json-comments: "npm:^3.1.0"
4078 text-table: "npm:^0.2.0" 4975 text-table: "npm:^0.2.0"
4079 bin: 4976 bin:
4080 eslint: bin/eslint.js 4977 eslint: bin/eslint.js
4081 checksum: 9f7e1cfdbe5219cdcecbf412c4535d68b42d777aa5a1524c565ac50ae192880f8f1ca898552e41d649e1b04e2e64feee33879740c5ab5015709eef529b70e876 4978 checksum: 8d6985a8d60379ea714ad35d7a3d8762ac8c37b986c615e9a7c245794faddf68f61f997ba6f5f903d440e92065a56a4f7832a45adc2d4fc6e977026782f25835
4082 languageName: node 4979 languageName: node
4083 linkType: hard 4980 linkType: hard
4084 4981
4085"espree@npm:^9.5.2": 4982"espree@npm:^9.6.0, espree@npm:^9.6.1":
4086 version: 9.5.2 4983 version: 9.6.1
4087 resolution: "espree@npm:9.5.2" 4984 resolution: "espree@npm:9.6.1"
4088 dependencies: 4985 dependencies:
4089 acorn: "npm:^8.8.0" 4986 acorn: "npm:^8.9.0"
4090 acorn-jsx: "npm:^5.3.2" 4987 acorn-jsx: "npm:^5.3.2"
4091 eslint-visitor-keys: "npm:^3.4.1" 4988 eslint-visitor-keys: "npm:^3.4.1"
4092 checksum: 05c52faae1e5c72ba3ab639d06937a0570d64946d9062762cac1918c70921f67a17e1370a3503af1eb9ff27f36f9c1932389fcc810a98e9ee9887597d07911e5 4989 checksum: 1a2e9b4699b715347f62330bcc76aee224390c28bb02b31a3752e9d07549c473f5f986720483c6469cf3cfb3c9d05df612ffc69eb1ee94b54b739e67de9bb460
4093 languageName: node 4990 languageName: node
4094 linkType: hard 4991 linkType: hard
4095 4992
@@ -4099,7 +4996,7 @@ __metadata:
4099 bin: 4996 bin:
4100 esparse: ./bin/esparse.js 4997 esparse: ./bin/esparse.js
4101 esvalidate: ./bin/esvalidate.js 4998 esvalidate: ./bin/esvalidate.js
4102 checksum: 08b3015538b1f7f087a4ea49b5a3d8ff9590ecf7eb43511182c9198cfe168a5cc1736c2ae33263c79cfbe9e984c1880ee971b64ad96e7c84db74488e6ee93c1b 4999 checksum: ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3
4103 languageName: node 5000 languageName: node
4104 linkType: hard 5001 linkType: hard
4105 5002
@@ -4108,7 +5005,7 @@ __metadata:
4108 resolution: "esquery@npm:1.5.0" 5005 resolution: "esquery@npm:1.5.0"
4109 dependencies: 5006 dependencies:
4110 estraverse: "npm:^5.1.0" 5007 estraverse: "npm:^5.1.0"
4111 checksum: 4bde95396273b2960a330c296e921d88b7d3fb5c9cbc84a1e29cf75664c318b194b1a8b46f507fce30222a68b64527f70e09bdd5863e14248fa2f6da5e78fdfd 5008 checksum: a084bd049d954cc88ac69df30534043fb2aee5555b56246493f42f27d1e168f00d9e5d4192e46f10290d312dc30dc7d58994d61a609c579c1219d636996f9213
4112 languageName: node 5009 languageName: node
4113 linkType: hard 5010 linkType: hard
4114 5011
@@ -4117,83 +5014,76 @@ __metadata:
4117 resolution: "esrecurse@npm:4.3.0" 5014 resolution: "esrecurse@npm:4.3.0"
4118 dependencies: 5015 dependencies:
4119 estraverse: "npm:^5.2.0" 5016 estraverse: "npm:^5.2.0"
4120 checksum: c28c10e80803687b81ccbe90b9b66d9b21144a27f672208970ebfd306d7f2f2ee2827754b2effb771c35de48455de944c434f2fcf3c5d7da27956a5f69464a5a 5017 checksum: 81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5
4121 languageName: node
4122 linkType: hard
4123
4124"estraverse@npm:^4.1.1":
4125 version: 4.3.0
4126 resolution: "estraverse@npm:4.3.0"
4127 checksum: befc0287c32a7844aa00a3bb474189d51afa4c8c1d754937c2b2e70c0ca5bd0750da7ab2c84809aa130e0e1320dd386ea2381aac205f02b83569436e453e320a
4128 languageName: node 5018 languageName: node
4129 linkType: hard 5019 linkType: hard
4130 5020
4131"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": 5021"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0":
4132 version: 5.3.0 5022 version: 5.3.0
4133 resolution: "estraverse@npm:5.3.0" 5023 resolution: "estraverse@npm:5.3.0"
4134 checksum: 4db420d3f0291d3c42e3700aee2986ec1ca8384224236da9441e67555c8af181fe5f883b0b312021ed475f0c138282066b0f5cb2240ee4a0c2ec5142274162d1 5024 checksum: 1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107
4135 languageName: node 5025 languageName: node
4136 linkType: hard 5026 linkType: hard
4137 5027
4138"estree-walker@npm:^1.0.1": 5028"estree-walker@npm:^1.0.1":
4139 version: 1.0.1 5029 version: 1.0.1
4140 resolution: "estree-walker@npm:1.0.1" 5030 resolution: "estree-walker@npm:1.0.1"
4141 checksum: 09ecd33e911a135ff62716f88a48f8dbf1206f8f6d6869205885c1e6d1aebf5049b5e0c725fe2d907b1394a17afb2002f7a57aafdc8b7bbff255dffa8c3b98c9 5031 checksum: fa9e5f8c1bbe8d01e314c0f03067b64a4f22d4c58410fc5237060d0c15b81e58c23921c41acc60abbdab490f1fdfcbd6408ede2d03ca704454272e0244d61a55
4142 languageName: node 5032 languageName: node
4143 linkType: hard 5033 linkType: hard
4144 5034
4145"esutils@npm:^2.0.2": 5035"esutils@npm:^2.0.2":
4146 version: 2.0.3 5036 version: 2.0.3
4147 resolution: "esutils@npm:2.0.3" 5037 resolution: "esutils@npm:2.0.3"
4148 checksum: 179e017b58d3c0c3ecbe5f6d27abf26cdde45cea702c037bc80a74e32b28ab20d7a03820c002c3f7202706fb6baff40bba1a1e0843ec4e8eba6062ab9f976c70 5038 checksum: 9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7
4149 languageName: node 5039 languageName: node
4150 linkType: hard 5040 linkType: hard
4151 5041
4152"exponential-backoff@npm:^3.1.1": 5042"exponential-backoff@npm:^3.1.1":
4153 version: 3.1.1 5043 version: 3.1.1
4154 resolution: "exponential-backoff@npm:3.1.1" 5044 resolution: "exponential-backoff@npm:3.1.1"
4155 checksum: b3010284e8d2161f7a2589b92d41299d5bdffa6c79bac7bbfeee239a67627ae8b878e40c408a4419b19afcf9514442c79929cf3bd5f49f7f19ebd54fd2aa306f 5045 checksum: 160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579
4156 languageName: node 5046 languageName: node
4157 linkType: hard 5047 linkType: hard
4158 5048
4159"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": 5049"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3":
4160 version: 3.1.3 5050 version: 3.1.3
4161 resolution: "fast-deep-equal@npm:3.1.3" 5051 resolution: "fast-deep-equal@npm:3.1.3"
4162 checksum: 5f83fabf1f0bac0df5117e881ee15756dc8a9ee48c8020ed63cb84a7935d78c338dc0982b3b7b6ad0792905f5ef0c35293db9cae2f3208a6f09071c43887a02f 5052 checksum: 40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0
4163 languageName: node 5053 languageName: node
4164 linkType: hard 5054 linkType: hard
4165 5055
4166"fast-diff@npm:^1.1.2": 5056"fast-diff@npm:^1.1.2":
4167 version: 1.3.0 5057 version: 1.3.0
4168 resolution: "fast-diff@npm:1.3.0" 5058 resolution: "fast-diff@npm:1.3.0"
4169 checksum: 424cdf4f5f335fd33bcb4dd6e676746e351c3ed326db6f2ae2920937d224fa36064d7cfdac7521154153a3489b8f8cb59dad27778d127a680b658b7cd70a544e 5059 checksum: 5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29
4170 languageName: node 5060 languageName: node
4171 linkType: hard 5061 linkType: hard
4172 5062
4173"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9": 5063"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.1":
4174 version: 3.2.12 5064 version: 3.3.1
4175 resolution: "fast-glob@npm:3.2.12" 5065 resolution: "fast-glob@npm:3.3.1"
4176 dependencies: 5066 dependencies:
4177 "@nodelib/fs.stat": "npm:^2.0.2" 5067 "@nodelib/fs.stat": "npm:^2.0.2"
4178 "@nodelib/fs.walk": "npm:^1.2.3" 5068 "@nodelib/fs.walk": "npm:^1.2.3"
4179 glob-parent: "npm:^5.1.2" 5069 glob-parent: "npm:^5.1.2"
4180 merge2: "npm:^1.3.0" 5070 merge2: "npm:^1.3.0"
4181 micromatch: "npm:^4.0.4" 5071 micromatch: "npm:^4.0.4"
4182 checksum: 3b98e0cadbf2aea3fa2be76e28b0c895bb18d920ccb7b3d3f603a464e3dc2c6a89a8afb9f9765226bd4d4d74b70e880721ff7a57a267c2eaa11353f35d42d11b 5072 checksum: b68431128fb6ce4b804c5f9622628426d990b66c75b21c0d16e3d80e2d1398bf33f7e1724e66a2e3f299285dcf5b8d745b122d0304e7dd66f5231081f33ec67c
4183 languageName: node 5073 languageName: node
4184 linkType: hard 5074 linkType: hard
4185 5075
4186"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": 5076"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0":
4187 version: 2.1.0 5077 version: 2.1.0
4188 resolution: "fast-json-stable-stringify@npm:2.1.0" 5078 resolution: "fast-json-stable-stringify@npm:2.1.0"
4189 checksum: cc64810b004155f5ac29b208ebd5c862599a1a8aef3c4d27a34dfb694db7797e121dceda183507ec4a2a5413d9cb59521fd2540d0d00a5589ee6ea6bfac3c12e 5079 checksum: 7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b
4190 languageName: node 5080 languageName: node
4191 linkType: hard 5081 linkType: hard
4192 5082
4193"fast-levenshtein@npm:^2.0.6": 5083"fast-levenshtein@npm:^2.0.6":
4194 version: 2.0.6 5084 version: 2.0.6
4195 resolution: "fast-levenshtein@npm:2.0.6" 5085 resolution: "fast-levenshtein@npm:2.0.6"
4196 checksum: 7814143d0352153a7a51ebd9b21341bf1732b9599ec592a398ab5e4584b516aeb5008834ba2a46502253c221b33dad7dddc93ce3f5054acd09218cce1710c81b 5086 checksum: 111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4
4197 languageName: node 5087 languageName: node
4198 linkType: hard 5088 linkType: hard
4199 5089
@@ -4202,7 +5092,7 @@ __metadata:
4202 resolution: "fastq@npm:1.15.0" 5092 resolution: "fastq@npm:1.15.0"
4203 dependencies: 5093 dependencies:
4204 reusify: "npm:^1.0.4" 5094 reusify: "npm:^1.0.4"
4205 checksum: 9c256d4b1c55c2a494ef198632ad19b801f98fb05b804c761c8c733da58b8f63888fdfe5e4c8ec7144f369135b71f23da1457e71b3aebaa943d2d5337bb86262 5095 checksum: 5ce4f83afa5f88c9379e67906b4d31bc7694a30826d6cc8d0f0473c966929017fda65c2174b0ec89f064ede6ace6c67f8a4fe04cef42119b6a55b0d465554c24
4206 languageName: node 5096 languageName: node
4207 linkType: hard 5097 linkType: hard
4208 5098
@@ -4211,7 +5101,7 @@ __metadata:
4211 resolution: "file-entry-cache@npm:6.0.1" 5101 resolution: "file-entry-cache@npm:6.0.1"
4212 dependencies: 5102 dependencies:
4213 flat-cache: "npm:^3.0.4" 5103 flat-cache: "npm:^3.0.4"
4214 checksum: cac7f7775980e696eceb922313887c03204eaea3659e0cd5b9f83ef29c7e5c613a6aa7662a3e9d0f78cf68060b093b82572e554f5464c0b2f626db32ef969cdc 5104 checksum: 58473e8a82794d01b38e5e435f6feaf648e3f36fdb3a56e98f417f4efae71ad1c0d4ebd8a9a7c50c3ad085820a93fc7494ad721e0e4ebc1da3573f4e1c3c7cdd
4215 languageName: node 5105 languageName: node
4216 linkType: hard 5106 linkType: hard
4217 5107
@@ -4220,7 +5110,7 @@ __metadata:
4220 resolution: "filelist@npm:1.0.4" 5110 resolution: "filelist@npm:1.0.4"
4221 dependencies: 5111 dependencies:
4222 minimatch: "npm:^5.0.1" 5112 minimatch: "npm:^5.0.1"
4223 checksum: f24e711620c5f75b3016e09f2dce86f6598237349c0ba825dc2074f4efa50f450bfba4dbdca2592a8ba60c4a6300ddf9a9dd89d25e9baa5c68837c0c549267f5 5113 checksum: 426b1de3944a3d153b053f1c0ebfd02dccd0308a4f9e832ad220707a6d1f1b3c9784d6cadf6b2f68f09a57565f63ebc7bcdc913ccf8012d834f472c46e596f41
4224 languageName: node 5114 languageName: node
4225 linkType: hard 5115 linkType: hard
4226 5116
@@ -4229,14 +5119,14 @@ __metadata:
4229 resolution: "fill-range@npm:7.0.1" 5119 resolution: "fill-range@npm:7.0.1"
4230 dependencies: 5120 dependencies:
4231 to-regex-range: "npm:^5.0.1" 5121 to-regex-range: "npm:^5.0.1"
4232 checksum: e5ccb299de8a12ea5dcef663f658933e2fbdf40aeab3e7e5af9132e82d7f6bdd0984ac2e122dc1825707f33917c308bc40b632b852331c900c317c5d64bb7bf0 5122 checksum: 7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f
4233 languageName: node 5123 languageName: node
4234 linkType: hard 5124 linkType: hard
4235 5125
4236"find-root@npm:^1.1.0": 5126"find-root@npm:^1.1.0":
4237 version: 1.1.0 5127 version: 1.1.0
4238 resolution: "find-root@npm:1.1.0" 5128 resolution: "find-root@npm:1.1.0"
4239 checksum: 8f607da95cb19d55f072b0617996ed3444afac0865606a39e5c838d3d22ef5d3fb01f16c7832219e6bfdd070964b2ba377672028e761963cafad57ba87e51f94 5129 checksum: 1abc7f3bf2f8d78ff26d9e00ce9d0f7b32e5ff6d1da2857bcdf4746134c422282b091c672cde0572cac3840713487e0a7a636af9aa1b74cb11894b447a521efa
4240 languageName: node 5130 languageName: node
4241 linkType: hard 5131 linkType: hard
4242 5132
@@ -4246,7 +5136,7 @@ __metadata:
4246 dependencies: 5136 dependencies:
4247 locate-path: "npm:^6.0.0" 5137 locate-path: "npm:^6.0.0"
4248 path-exists: "npm:^4.0.0" 5138 path-exists: "npm:^4.0.0"
4249 checksum: 4d6f51423a974f370ce34dd00982d764e160121e4d823f46b2b79b180a34c0a23a1d09aa83851f0d1a78226be8281100ef3b4cd6990b226ed961acfa2be4a36c 5139 checksum: 062c5a83a9c02f53cdd6d175a37ecf8f87ea5bbff1fdfb828f04bfa021441bc7583e8ebc0872a4c1baab96221fb8a8a275a19809fb93fbc40bd69ec35634069a
4250 languageName: node 5140 languageName: node
4251 linkType: hard 5141 linkType: hard
4252 5142
@@ -4256,14 +5146,14 @@ __metadata:
4256 dependencies: 5146 dependencies:
4257 flatted: "npm:^3.1.0" 5147 flatted: "npm:^3.1.0"
4258 rimraf: "npm:^3.0.2" 5148 rimraf: "npm:^3.0.2"
4259 checksum: 0a97f11128bd044884981fc0cb381abe69dc3779dc6fdcbffc53d0739fecc580d0f082b6adaeff5e766822dd0d701cb274fbd8afdedddb6b5bc1829cf148b995 5149 checksum: f274dcbadb09ad8d7b6edf2ee9b034bc40bf0c12638f6c4084e9f1d39208cb104a5ebbb24b398880ef048200eaa116852f73d2d8b72e8c9627aba8c3e27ca057
4260 languageName: node 5150 languageName: node
4261 linkType: hard 5151 linkType: hard
4262 5152
4263"flatted@npm:^3.1.0": 5153"flatted@npm:^3.1.0":
4264 version: 3.2.7 5154 version: 3.2.7
4265 resolution: "flatted@npm:3.2.7" 5155 resolution: "flatted@npm:3.2.7"
4266 checksum: d57a559a56f8743f48067b992e70f222921bec6656de4617ee60dab5e531c2aeba67ace287965b759cca80fa0d3f0c7ffc39341ccc9bc874594f4b73c0fea48c 5156 checksum: 207a87c7abfc1ea6928ea16bac84f9eaa6d44d365620ece419e5c41cf44a5e9902b4c1f59c9605771b10e4565a0cb46e99d78e0464e8aabb42c97de880642257
4267 languageName: node 5157 languageName: node
4268 linkType: hard 5158 linkType: hard
4269 5159
@@ -4272,7 +5162,7 @@ __metadata:
4272 resolution: "for-each@npm:0.3.3" 5162 resolution: "for-each@npm:0.3.3"
4273 dependencies: 5163 dependencies:
4274 is-callable: "npm:^1.1.3" 5164 is-callable: "npm:^1.1.3"
4275 checksum: dc4e3e28f5ee9472680b6361a85d0d27aa1e8ddbd1720dfb680020456cddc142ee7ba69145921fe12c4ec2d7740f12c1c6c7f90ecdd7ca2b39c7fcd8bc506ad6 5165 checksum: 22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa
4276 languageName: node 5166 languageName: node
4277 linkType: hard 5167 linkType: hard
4278 5168
@@ -4282,7 +5172,7 @@ __metadata:
4282 dependencies: 5172 dependencies:
4283 cross-spawn: "npm:^7.0.0" 5173 cross-spawn: "npm:^7.0.0"
4284 signal-exit: "npm:^4.0.1" 5174 signal-exit: "npm:^4.0.1"
4285 checksum: eb24fc60e34157c0f05b8689015dfaff98141484992f06f19ee0b4b069304c337af1caf5478eee42aea846235ce54699bbc530889eccd746bf4da1dc29ba6c32 5175 checksum: 9700a0285628abaeb37007c9a4d92bd49f67210f09067638774338e146c8e9c825c5c877f072b2f75f41dc6a2d0be8664f79ffc03f6576649f54a84fb9b47de0
4286 languageName: node 5176 languageName: node
4287 linkType: hard 5177 linkType: hard
4288 5178
@@ -4294,7 +5184,7 @@ __metadata:
4294 graceful-fs: "npm:^4.2.0" 5184 graceful-fs: "npm:^4.2.0"
4295 jsonfile: "npm:^6.0.1" 5185 jsonfile: "npm:^6.0.1"
4296 universalify: "npm:^2.0.0" 5186 universalify: "npm:^2.0.0"
4297 checksum: fc8ff3111ca42a4a3118e63247b1ebe4fbe4abc6daed2d51414699efb5661a2b9aeeb1b9283cb63544011a50b8f59c315e53b06d9c1b38a7786be99f8e59dabb 5187 checksum: 9b808bd884beff5cb940773018179a6b94a966381d005479f00adda6b44e5e3d4abf765135773d849cc27efe68c349e4a7b86acd7d3306d5932c14f3a4b17a92
4298 languageName: node 5188 languageName: node
4299 linkType: hard 5189 linkType: hard
4300 5190
@@ -4303,23 +5193,23 @@ __metadata:
4303 resolution: "fs-minipass@npm:2.1.0" 5193 resolution: "fs-minipass@npm:2.1.0"
4304 dependencies: 5194 dependencies:
4305 minipass: "npm:^3.0.0" 5195 minipass: "npm:^3.0.0"
4306 checksum: 56d19f9a034cbef50b7fe846a71ab1a6a7ee7906205f9f18b7c9696e1f6d83c4d708a0196c65536f34e569205664840dd4f97f1286a26148a4c5bf74a67fe8db 5196 checksum: 703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004
4307 languageName: node 5197 languageName: node
4308 linkType: hard 5198 linkType: hard
4309 5199
4310"fs-minipass@npm:^3.0.0": 5200"fs-minipass@npm:^3.0.0":
4311 version: 3.0.2 5201 version: 3.0.3
4312 resolution: "fs-minipass@npm:3.0.2" 5202 resolution: "fs-minipass@npm:3.0.3"
4313 dependencies: 5203 dependencies:
4314 minipass: "npm:^5.0.0" 5204 minipass: "npm:^7.0.3"
4315 checksum: 2b2cd5428f9c24619f9cffd857508d55eaa3b49d4e060061f775f66c96043c9d9a54a8d05378b63d391ac7d8f9606f180c2b65124b871221d5efcf49781787fe 5205 checksum: 63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94
4316 languageName: node 5206 languageName: node
4317 linkType: hard 5207 linkType: hard
4318 5208
4319"fs.realpath@npm:^1.0.0": 5209"fs.realpath@npm:^1.0.0":
4320 version: 1.0.0 5210 version: 1.0.0
4321 resolution: "fs.realpath@npm:1.0.0" 5211 resolution: "fs.realpath@npm:1.0.0"
4322 checksum: 477fb3547134ce67d71531a19b2597028d2efaeced56a2fcb125ba9994a4204685d256795e4a5b68e5d866d11d8d0dd9050937cb44037beb4caeb3acb75602e2 5212 checksum: 444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948
4323 languageName: node 5213 languageName: node
4324 linkType: hard 5214 linkType: hard
4325 5215
@@ -4328,7 +5218,7 @@ __metadata:
4328 resolution: "fsevents@npm:2.3.2" 5218 resolution: "fsevents@npm:2.3.2"
4329 dependencies: 5219 dependencies:
4330 node-gyp: "npm:latest" 5220 node-gyp: "npm:latest"
4331 checksum: c85eed7a3e0bbe6908f9feae8a823ee63a796ea2b32e20616ee33f0dda9417976f5a087a8cd2ccf228aae1c5b8b6125c9800f05dd69aaf016c34352a0567dcfb 5221 checksum: be78a3efa3e181cda3cf7a4637cb527bcebb0bd0ea0440105a3bb45b86f9245b307dc10a2507e8f4498a7d4ec349d1910f4d73e4d4495b16103106e07eee735b
4332 conditions: os=darwin 5222 conditions: os=darwin
4333 languageName: node 5223 languageName: node
4334 linkType: hard 5224 linkType: hard
@@ -4345,7 +5235,7 @@ __metadata:
4345"function-bind@npm:^1.1.1": 5235"function-bind@npm:^1.1.1":
4346 version: 1.1.1 5236 version: 1.1.1
4347 resolution: "function-bind@npm:1.1.1" 5237 resolution: "function-bind@npm:1.1.1"
4348 checksum: 8a644b8118679030cb3aeb783b024a9ee358b15c5780bdb49fe5d482f6df54672bda860e19bce87d756a5e165740caaa96f5e8487fa98933c327f631e23a5490 5238 checksum: 60b74b2407e1942e1ed7f8c284f8ef714d0689dcfce5319985a5b7da3fc727f40b4a59ec72dc55aa83365ad7b8fa4fac3a30d93c850a2b452f29ae03dbc10a1e
4349 languageName: node 5239 languageName: node
4350 linkType: hard 5240 linkType: hard
4351 5241
@@ -4357,14 +5247,14 @@ __metadata:
4357 define-properties: "npm:^1.1.3" 5247 define-properties: "npm:^1.1.3"
4358 es-abstract: "npm:^1.19.0" 5248 es-abstract: "npm:^1.19.0"
4359 functions-have-names: "npm:^1.2.2" 5249 functions-have-names: "npm:^1.2.2"
4360 checksum: 3c909b6d1d29db8d856e6816189ba46b117e85b00f8261f2dbad5975db20d9830a0484dc6d2a92034aa8dc1e84205de10dc830882e07c6b4a5cfe3e9aa72f5a7 5250 checksum: b75fb8c5261f03a54f7cb53a8c99e0c40297efc3cf750c51d3a2e56f6741701c14eda51986d30c24063136a4c32d1643df9d1dd2f2a14b64fa011edd3e7117ae
4361 languageName: node 5251 languageName: node
4362 linkType: hard 5252 linkType: hard
4363 5253
4364"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": 5254"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3":
4365 version: 1.2.3 5255 version: 1.2.3
4366 resolution: "functions-have-names@npm:1.2.3" 5256 resolution: "functions-have-names@npm:1.2.3"
4367 checksum: 2b58e5d607d7338c29e5ff8c285ddf09d79857b6d0ef9f781ee2e80cf666726d6909b5ab635e13d49ded9dcfd3c7abc01a22a52089bf23833848a6bfb6e8dac1 5257 checksum: 33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca
4368 languageName: node 5258 languageName: node
4369 linkType: hard 5259 linkType: hard
4370 5260
@@ -4380,18 +5270,25 @@ __metadata:
4380 string-width: "npm:^4.2.3" 5270 string-width: "npm:^4.2.3"
4381 strip-ansi: "npm:^6.0.1" 5271 strip-ansi: "npm:^6.0.1"
4382 wide-align: "npm:^1.1.5" 5272 wide-align: "npm:^1.1.5"
4383 checksum: 4fc68f770dba9962a326918f33f58f2458eddea08442c2d716238357e4291dee4223a812ce11084b54f928d607e4dfb6f380ba28d435b2721de94a22d5600669 5273 checksum: ef10d7981113d69225135f994c9f8c4369d945e64a8fc721d655a3a38421b738c9fe899951721d1b47b73c41fdb5404ac87cc8903b2ecbed95d2800363e7e58c
4384 languageName: node 5274 languageName: node
4385 linkType: hard 5275 linkType: hard
4386 5276
4387"gensync@npm:^1.0.0-beta.2": 5277"gensync@npm:^1.0.0-beta.2":
4388 version: 1.0.0-beta.2 5278 version: 1.0.0-beta.2
4389 resolution: "gensync@npm:1.0.0-beta.2" 5279 resolution: "gensync@npm:1.0.0-beta.2"
4390 checksum: c3e28898b5eb6cf92ce2f3bd1230f87bb642803aa743cbce53af55b50283a5283922a8717208edf1912ec1d944f1a4b262e9abfdb9ff9695e61f2939e56c89d8 5280 checksum: 782aba6cba65b1bb5af3b095d96249d20edbe8df32dbf4696fd49be2583faf676173bf4809386588828e4dd76a3354fcbeb577bab1c833ccd9fc4577f26103f8
5281 languageName: node
5282 linkType: hard
5283
5284"get-caller-file@npm:^2.0.5":
5285 version: 2.0.5
5286 resolution: "get-caller-file@npm:2.0.5"
5287 checksum: c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde
4391 languageName: node 5288 languageName: node
4392 linkType: hard 5289 linkType: hard
4393 5290
4394"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0": 5291"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1":
4395 version: 1.2.1 5292 version: 1.2.1
4396 resolution: "get-intrinsic@npm:1.2.1" 5293 resolution: "get-intrinsic@npm:1.2.1"
4397 dependencies: 5294 dependencies:
@@ -4399,14 +5296,14 @@ __metadata:
4399 has: "npm:^1.0.3" 5296 has: "npm:^1.0.3"
4400 has-proto: "npm:^1.0.1" 5297 has-proto: "npm:^1.0.1"
4401 has-symbols: "npm:^1.0.3" 5298 has-symbols: "npm:^1.0.3"
4402 checksum: d1d5511cfe4fc46c1a7ec7e127cb4ac0b9e131124282724d7bd94ae5014db5d12403e6873dfd5feeca44cd57baa39f8b4dbda2147ec9bb3533a7d02ab033e352 5299 checksum: 49eab47f9de8f1a4f9b458b8b74ee5199fb2614414a91973eb175e07db56b52b6df49b255cc7ff704cb0786490fb93bfe8f2ad138b590a8de09b47116a366bc9
4403 languageName: node 5300 languageName: node
4404 linkType: hard 5301 linkType: hard
4405 5302
4406"get-own-enumerable-property-symbols@npm:^3.0.0": 5303"get-own-enumerable-property-symbols@npm:^3.0.0":
4407 version: 3.0.2 5304 version: 3.0.2
4408 resolution: "get-own-enumerable-property-symbols@npm:3.0.2" 5305 resolution: "get-own-enumerable-property-symbols@npm:3.0.2"
4409 checksum: 0756a6f5488210395f80a1da993c1c4d5c1ec90fffd35632a742f1cd299323f65bcbe99d4ca1bfd1ec65f4e8f5aa83cee865f505b5006e5013a518db7ed85822 5306 checksum: 103999855f3d1718c631472437161d76962cbddcd95cc642a34c07bfb661ed41b6c09a9c669ccdff89ee965beb7126b80eec7b2101e20e31e9cc6c4725305e10
4410 languageName: node 5307 languageName: node
4411 linkType: hard 5308 linkType: hard
4412 5309
@@ -4416,16 +5313,16 @@ __metadata:
4416 dependencies: 5313 dependencies:
4417 call-bind: "npm:^1.0.2" 5314 call-bind: "npm:^1.0.2"
4418 get-intrinsic: "npm:^1.1.1" 5315 get-intrinsic: "npm:^1.1.1"
4419 checksum: 81648604501445f5eb384d0193ff821f0c593c8d231205c3e03054dee679cb9aa4a04fb2cb1a44cd9bc81877e1f3677147a430f7203c851122112b48e12435f6 5316 checksum: 23bc3b44c221cdf7669a88230c62f4b9e30393b61eb21ba4400cb3e346801bd8f95fe4330ee78dbae37aecd874646d53e3e76a17a654d0c84c77f6690526d6bb
4420 languageName: node 5317 languageName: node
4421 linkType: hard 5318 linkType: hard
4422 5319
4423"get-tsconfig@npm:^4.5.0": 5320"get-tsconfig@npm:^4.5.0":
4424 version: 4.6.0 5321 version: 4.7.0
4425 resolution: "get-tsconfig@npm:4.6.0" 5322 resolution: "get-tsconfig@npm:4.7.0"
4426 dependencies: 5323 dependencies:
4427 resolve-pkg-maps: "npm:^1.0.0" 5324 resolve-pkg-maps: "npm:^1.0.0"
4428 checksum: f7e7d4e5853f9949a12b84ef5e4af64e2bd5dd0bf48670413300ea8bf818a1424c7af6fc8e218ed4bd1f1f1e9c78c282f3607825bdfc490ee8439792bbef24ce 5325 checksum: 5844d18a705535808cf535010d9443b47b462c6e91ed00d94500602f220ecb8e518325d5b1f9e0c515c67025819c3df193194144a456e1d8f1cd70b5d48b52aa
4429 languageName: node 5326 languageName: node
4430 linkType: hard 5327 linkType: hard
4431 5328
@@ -4434,7 +5331,7 @@ __metadata:
4434 resolution: "glob-parent@npm:5.1.2" 5331 resolution: "glob-parent@npm:5.1.2"
4435 dependencies: 5332 dependencies:
4436 is-glob: "npm:^4.0.1" 5333 is-glob: "npm:^4.0.1"
4437 checksum: 2a8fd4de469543f6160dbfff5c59950e39494fc8b692ca7e1d0a5564450dee53228370b43bcfdeda82c2f96b26de618ef8aa5ece28090fcd568c411b6148241d 5334 checksum: cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee
4438 languageName: node 5335 languageName: node
4439 linkType: hard 5336 linkType: hard
4440 5337
@@ -4443,22 +5340,22 @@ __metadata:
4443 resolution: "glob-parent@npm:6.0.2" 5340 resolution: "glob-parent@npm:6.0.2"
4444 dependencies: 5341 dependencies:
4445 is-glob: "npm:^4.0.3" 5342 is-glob: "npm:^4.0.3"
4446 checksum: 2a27dfeda346942417ffc7ae85483048b277f275d595a760e51cd276475214b79896a2dad0e461bb4ae515f223439197634d183ff34a3be98c4c2b1cc6de8248 5343 checksum: 317034d88654730230b3f43bb7ad4f7c90257a426e872ea0bf157473ac61c99bf5d205fad8f0185f989be8d2fa6d3c7dce1645d99d545b6ea9089c39f838e7f8
4447 languageName: node 5344 languageName: node
4448 linkType: hard 5345 linkType: hard
4449 5346
4450"glob@npm:^10.2.2": 5347"glob@npm:^10.2.2":
4451 version: 10.2.7 5348 version: 10.3.3
4452 resolution: "glob@npm:10.2.7" 5349 resolution: "glob@npm:10.3.3"
4453 dependencies: 5350 dependencies:
4454 foreground-child: "npm:^3.1.0" 5351 foreground-child: "npm:^3.1.0"
4455 jackspeak: "npm:^2.0.3" 5352 jackspeak: "npm:^2.0.3"
4456 minimatch: "npm:^9.0.1" 5353 minimatch: "npm:^9.0.1"
4457 minipass: "npm:^5.0.0 || ^6.0.2" 5354 minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0"
4458 path-scurry: "npm:^1.7.0" 5355 path-scurry: "npm:^1.10.1"
4459 bin: 5356 bin:
4460 glob: dist/cjs/src/bin.js 5357 glob: dist/cjs/src/bin.js
4461 checksum: a0c055e0b47a072f8c59c8a9db4514243945aecb2ed3c2e2bb5bcbf38967bedef0bf268e5cdc49b6fecee6014f943d8d96e85c49c05524544fbc50116f2531ba 5358 checksum: 50effa4208762e508def5688e4d88242db80b5913f65e9c5d5aefb707c59e66a27e845fbf18127157189f6ed0f055e2c94d7112c97a065b9cbfe002e1b26d330
4462 languageName: node 5359 languageName: node
4463 linkType: hard 5360 linkType: hard
4464 5361
@@ -4472,23 +5369,23 @@ __metadata:
4472 minimatch: "npm:^3.1.1" 5369 minimatch: "npm:^3.1.1"
4473 once: "npm:^1.3.0" 5370 once: "npm:^1.3.0"
4474 path-is-absolute: "npm:^1.0.0" 5371 path-is-absolute: "npm:^1.0.0"
4475 checksum: c55966a5db7ed2f30976a1490f3165f9d4e20ac7cabf01b55da4cc4f8f53a4c506e6f427e469c2fbf68636200871f3acf07e159ba6d9b65e7386216b98474a34 5372 checksum: 65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe
4476 languageName: node 5373 languageName: node
4477 linkType: hard 5374 linkType: hard
4478 5375
4479"globals@npm:^11.1.0": 5376"globals@npm:^11.1.0":
4480 version: 11.12.0 5377 version: 11.12.0
4481 resolution: "globals@npm:11.12.0" 5378 resolution: "globals@npm:11.12.0"
4482 checksum: f404eda4b8f32fb5c1a72edf45123ac85a3ec6441f746ec98f7e77fdea8b0bfa580d3cf9b5f8a1977fa6cbbb10b349212c8b699be414491d08f313d3e6dfe6d9 5379 checksum: 758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1
4483 languageName: node 5380 languageName: node
4484 linkType: hard 5381 linkType: hard
4485 5382
4486"globals@npm:^13.19.0": 5383"globals@npm:^13.19.0":
4487 version: 13.20.0 5384 version: 13.21.0
4488 resolution: "globals@npm:13.20.0" 5385 resolution: "globals@npm:13.21.0"
4489 dependencies: 5386 dependencies:
4490 type-fest: "npm:^0.20.2" 5387 type-fest: "npm:^0.20.2"
4491 checksum: 1ba80ad03f29b8ca83b066c9d9ae305e7f0ee46164de36efac286fc3a58efc48986d688bf1f427f164f2a65bb1bdfa53beb8c56ae3092be255fc097bdcab1f1a 5388 checksum: 90573e825401adbe0ef25db1b52e8f74afe4a1087049edd972f1ace77b391753fc3fe51eba9b6962c62e2282645f0a27ce20251662cdc247631c4861f32d56eb
4492 languageName: node 5389 languageName: node
4493 linkType: hard 5390 linkType: hard
4494 5391
@@ -4497,14 +5394,14 @@ __metadata:
4497 resolution: "globalthis@npm:1.0.3" 5394 resolution: "globalthis@npm:1.0.3"
4498 dependencies: 5395 dependencies:
4499 define-properties: "npm:^1.1.3" 5396 define-properties: "npm:^1.1.3"
4500 checksum: 712d9e130f2c47067e6590cb1eee418df1106f53ffeddaadb4c8b0793ac0f46039e5f71008c44089523aa2b58d270bb2c4e5721795ddad114bc23d9eb63ec6d5 5397 checksum: 0db6e9af102a5254630351557ac15e6909bc7459d3e3f6b001e59fe784c96d31108818f032d9095739355a88467459e6488ff16584ee6250cd8c27dec05af4b0
4501 languageName: node 5398 languageName: node
4502 linkType: hard 5399 linkType: hard
4503 5400
4504"globalyzer@npm:0.1.0": 5401"globalyzer@npm:0.1.0":
4505 version: 0.1.0 5402 version: 0.1.0
4506 resolution: "globalyzer@npm:0.1.0" 5403 resolution: "globalyzer@npm:0.1.0"
4507 checksum: e52e064b89ef5a42ce76b92a4919e518c80615c80839f7d214f51c96ce5945308147a422a11c853760fc7a9a41cf8cc8fb7813c5816f2808d8fd4c066d0805a9 5404 checksum: e16e47a5835cbe8a021423d4c7fcd9f5f85815b4190a7f50c1fdb95fc559d72e4fb30be96f106c66a99413f36d72da0f8323d19d27f60a8feec9d936139ec5a8
4508 languageName: node 5405 languageName: node
4509 linkType: hard 5406 linkType: hard
4510 5407
@@ -4518,27 +5415,14 @@ __metadata:
4518 ignore: "npm:^5.2.0" 5415 ignore: "npm:^5.2.0"
4519 merge2: "npm:^1.4.1" 5416 merge2: "npm:^1.4.1"
4520 slash: "npm:^3.0.0" 5417 slash: "npm:^3.0.0"
4521 checksum: 3047df770874d103dafe26084f998f562e8a8e2930896940e0bdbdc27c1f7574570f231dc2aa981d941dc84c93db05ce7cd81667488b040412e88740186fc22e 5418 checksum: b39511b4afe4bd8a7aead3a27c4ade2b9968649abab0a6c28b1a90141b96ca68ca5db1302f7c7bd29eab66bf51e13916b8e0a3d0ac08f75e1e84a39b35691189
4522 languageName: node
4523 linkType: hard
4524
4525"globby@npm:^13.1.3":
4526 version: 13.1.4
4527 resolution: "globby@npm:13.1.4"
4528 dependencies:
4529 dir-glob: "npm:^3.0.1"
4530 fast-glob: "npm:^3.2.11"
4531 ignore: "npm:^5.2.0"
4532 merge2: "npm:^1.4.1"
4533 slash: "npm:^4.0.0"
4534 checksum: 3e433409da6b65206694b0d3fec692f42b9eb9a1d1406851a1237508e6dd12a4e70c3ba3d7b6b26a8c8e71aab6a84e648fca6b955abc18dd37341a44ac341567
4535 languageName: node 5419 languageName: node
4536 linkType: hard 5420 linkType: hard
4537 5421
4538"globrex@npm:^0.1.2": 5422"globrex@npm:^0.1.2":
4539 version: 0.1.2 5423 version: 0.1.2
4540 resolution: "globrex@npm:0.1.2" 5424 resolution: "globrex@npm:0.1.2"
4541 checksum: e1f161f0e15cdfc29df57c8d3d8380063e7f0f8ea0322ae5fbec9fe14ebc62fd337d65a2d80a479faade7c7ef079e062eb11586e43016d0b6b5989bd2e7b1d1b 5425 checksum: a54c029520cf58bda1d8884f72bd49b4cd74e977883268d931fd83bcbd1a9eb96d57c7dbd4ad80148fb9247467ebfb9b215630b2ed7563b2a8de02e1ff7f89d1
4542 languageName: node 5426 languageName: node
4543 linkType: hard 5427 linkType: hard
4544 5428
@@ -4547,7 +5431,7 @@ __metadata:
4547 resolution: "goober@npm:2.1.13" 5431 resolution: "goober@npm:2.1.13"
4548 peerDependencies: 5432 peerDependencies:
4549 csstype: ^3.0.10 5433 csstype: ^3.0.10
4550 checksum: 59f61d7bc565e480f988b2b5a0c19a533200e81c3bffc6c4ab53e8a8d8bcc9e53babb31ecd70f91a82a640f481e975f6c28c320686b32a0444673e84bcf1a489 5434 checksum: a322ea3b688e1140e9e69014169563a1a73ea715d4a6edeaf61b59d40eb2c3b70f8269b09bb178d474764ee1772a0b1719c1d45db689e5c557698e468ce94702
4551 languageName: node 5435 languageName: node
4552 linkType: hard 5436 linkType: hard
4553 5437
@@ -4556,49 +5440,42 @@ __metadata:
4556 resolution: "gopd@npm:1.0.1" 5440 resolution: "gopd@npm:1.0.1"
4557 dependencies: 5441 dependencies:
4558 get-intrinsic: "npm:^1.1.3" 5442 get-intrinsic: "npm:^1.1.3"
4559 checksum: c29f62be0655b0fb6d12d1ba77b1a40fee46fbb80f0a27e0538b696a0ac057899dd997b5aaf3c6daa02bd51af93ec7b8fe2ef7bbb44945c1ea3cf640e4b66cf7 5443 checksum: 505c05487f7944c552cee72087bf1567debb470d4355b1335f2c262d218ebbff805cd3715448fe29b4b380bae6912561d0467233e4165830efd28da241418c63
4560 languageName: node 5444 languageName: node
4561 linkType: hard 5445 linkType: hard
4562 5446
4563"graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": 5447"graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6":
4564 version: 4.2.11 5448 version: 4.2.11
4565 resolution: "graceful-fs@npm:4.2.11" 5449 resolution: "graceful-fs@npm:4.2.11"
4566 checksum: 0228fc1080e6cb20d31920aff457e5d44f137b8864220c204b5ba6461d2d46d30361557a4c054373a8c04a03b59c92a42d40230104bb59c5ea737072bc15709c 5450 checksum: 386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2
4567 languageName: node
4568 linkType: hard
4569
4570"grapheme-splitter@npm:^1.0.4":
4571 version: 1.0.4
4572 resolution: "grapheme-splitter@npm:1.0.4"
4573 checksum: c67a8e522758dd907770a78ad750e6dfdcce327b0696fdd82f4b7acb8bb22b0574c88f806afb3c6597a536fa9016e6e3486071535fd0e9226b8505c67cf2fb01
4574 languageName: node 5451 languageName: node
4575 linkType: hard 5452 linkType: hard
4576 5453
4577"graphemer@npm:^1.4.0": 5454"graphemer@npm:^1.4.0":
4578 version: 1.4.0 5455 version: 1.4.0
4579 resolution: "graphemer@npm:1.4.0" 5456 resolution: "graphemer@npm:1.4.0"
4580 checksum: a4ee139533e1d1683edb24eaf3e598451e7f1577da3dfc68f247f0601d5d11d264d0ccfad3de3bfcabbed891140fbae84c0403b9d68f4fcb6431c418f971434e 5457 checksum: e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31
4581 languageName: node 5458 languageName: node
4582 linkType: hard 5459 linkType: hard
4583 5460
4584"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": 5461"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2":
4585 version: 1.0.2 5462 version: 1.0.2
4586 resolution: "has-bigints@npm:1.0.2" 5463 resolution: "has-bigints@npm:1.0.2"
4587 checksum: 2f15628a0353cfc818b8710f306ac3b7ea05ca36d469484d1b0b91337720844c83c7d71f7346fbfa61a12fc0e3a3c39a0b1b1b294735f4bd0049697314e18b8a 5464 checksum: 724eb1485bfa3cdff6f18d95130aa190561f00b3fcf9f19dc640baf8176b5917c143b81ec2123f8cddb6c05164a198c94b13e1377c497705ccc8e1a80306e83b
4588 languageName: node 5465 languageName: node
4589 linkType: hard 5466 linkType: hard
4590 5467
4591"has-flag@npm:^3.0.0": 5468"has-flag@npm:^3.0.0":
4592 version: 3.0.0 5469 version: 3.0.0
4593 resolution: "has-flag@npm:3.0.0" 5470 resolution: "has-flag@npm:3.0.0"
4594 checksum: b1cb757b71bca736b4f7a060d52a7914b1438d7bd7ba3cb783f71728c7a72d51520955d477d54fce75e19a859d93fadc9b707de019c141c45f2e560c48beb1f9 5471 checksum: 1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473
4595 languageName: node 5472 languageName: node
4596 linkType: hard 5473 linkType: hard
4597 5474
4598"has-flag@npm:^4.0.0": 5475"has-flag@npm:^4.0.0":
4599 version: 4.0.0 5476 version: 4.0.0
4600 resolution: "has-flag@npm:4.0.0" 5477 resolution: "has-flag@npm:4.0.0"
4601 checksum: 71f182c441adda71ea3014dec578691a9d74356dd57c238fb2fc88247a94ca10892fe307cda0eb608b91f982d7da34aa2e46f763c4449351dedac26a0493e591 5478 checksum: 2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1
4602 languageName: node 5479 languageName: node
4603 linkType: hard 5480 linkType: hard
4604 5481
@@ -4607,21 +5484,21 @@ __metadata:
4607 resolution: "has-property-descriptors@npm:1.0.0" 5484 resolution: "has-property-descriptors@npm:1.0.0"
4608 dependencies: 5485 dependencies:
4609 get-intrinsic: "npm:^1.1.1" 5486 get-intrinsic: "npm:^1.1.1"
4610 checksum: 74813c8c23b7e2a8cb8253d77094347d2e0cc380e0475962815764f6b60e815290a7ce82bab1df78418e991f22289aa14151972b6bc66483ad22610ea8ab5c7e 5487 checksum: d4ca882b6960d6257bd28baa3ddfa21f068d260411004a093b30ca357c740e11e985771c85216a6d1eef4161e862657f48c4758ec8ab515223b3895200ad164b
4611 languageName: node 5488 languageName: node
4612 linkType: hard 5489 linkType: hard
4613 5490
4614"has-proto@npm:^1.0.1": 5491"has-proto@npm:^1.0.1":
4615 version: 1.0.1 5492 version: 1.0.1
4616 resolution: "has-proto@npm:1.0.1" 5493 resolution: "has-proto@npm:1.0.1"
4617 checksum: 0aa0de6013c2132a79fb8b885dc0274b99362807195bed0c69e2469eb0de41bf1695067d5e41adcd4bbd8daed8684250716c55db17478249f225ae3d0846e6bf 5494 checksum: c8a8fe411f810b23a564bd5546a8f3f0fff6f1b692740eb7a2fdc9df716ef870040806891e2f23ff4653f1083e3895bf12088703dd1a0eac3d9202d3a4768cd0
4618 languageName: node 5495 languageName: node
4619 linkType: hard 5496 linkType: hard
4620 5497
4621"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": 5498"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3":
4622 version: 1.0.3 5499 version: 1.0.3
4623 resolution: "has-symbols@npm:1.0.3" 5500 resolution: "has-symbols@npm:1.0.3"
4624 checksum: 2d0abb3382da2945b1b8d9a4afebc8a0770fe07198e727b4fbd7f616c70796f040bf2bd8d6db47e0c590507812a2680594fc77f871238289f6c7870318cf62c9 5501 checksum: e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3
4625 languageName: node 5502 languageName: node
4626 linkType: hard 5503 linkType: hard
4627 5504
@@ -4630,14 +5507,14 @@ __metadata:
4630 resolution: "has-tostringtag@npm:1.0.0" 5507 resolution: "has-tostringtag@npm:1.0.0"
4631 dependencies: 5508 dependencies:
4632 has-symbols: "npm:^1.0.2" 5509 has-symbols: "npm:^1.0.2"
4633 checksum: b0091adb3db09932e228b5df39275018c5506ef5c5037beb691afe019919d174a79a14f1fc572e2b341e0ce3feaca49a84ed8fc331bb707325d8a7c4289cf729 5510 checksum: 1cdba76b7d13f65198a92b8ca1560ba40edfa09e85d182bf436d928f3588a9ebd260451d569f0ed1b849c4bf54f49c862aa0d0a77f9552b1855bb6deb526c011
4634 languageName: node 5511 languageName: node
4635 linkType: hard 5512 linkType: hard
4636 5513
4637"has-unicode@npm:^2.0.1": 5514"has-unicode@npm:^2.0.1":
4638 version: 2.0.1 5515 version: 2.0.1
4639 resolution: "has-unicode@npm:2.0.1" 5516 resolution: "has-unicode@npm:2.0.1"
4640 checksum: d7f38422bc8e339b52014ed5aea2fdcb6545e583ac252081bc7d0970ae8eaa6efa3d056aa3119ac5825bc51fc289b53fa7b3588a40b8bf71a0dabc346513c485 5517 checksum: ebdb2f4895c26bb08a8a100b62d362e49b2190bcfd84b76bc4be1a3bd4d254ec52d0dd9f2fbcc093fc5eb878b20c52146f9dfd33e2686ed28982187be593b47c
4641 languageName: node 5518 languageName: node
4642 linkType: hard 5519 linkType: hard
4643 5520
@@ -4646,7 +5523,7 @@ __metadata:
4646 resolution: "has@npm:1.0.3" 5523 resolution: "has@npm:1.0.3"
4647 dependencies: 5524 dependencies:
4648 function-bind: "npm:^1.1.1" 5525 function-bind: "npm:^1.1.1"
4649 checksum: 3e8c4d87ccd9c160d61a5db829b5fb647acac79e482476c857d5d1dc580517c6a77cf84337808f28361f6263008ce1ce5aff44407bd9241af93c623ef8d8d4f1 5526 checksum: e1da0d2bd109f116b632f27782cf23182b42f14972ca9540e4c5aa7e52647407a0a4a76937334fddcb56befe94a3494825ec22b19b51f5e5507c3153fd1a5e1b
4650 languageName: node 5527 languageName: node
4651 linkType: hard 5528 linkType: hard
4652 5529
@@ -4655,7 +5532,7 @@ __metadata:
4655 resolution: "hoist-non-react-statics@npm:3.3.2" 5532 resolution: "hoist-non-react-statics@npm:3.3.2"
4656 dependencies: 5533 dependencies:
4657 react-is: "npm:^16.7.0" 5534 react-is: "npm:^16.7.0"
4658 checksum: fb03b1e426696928dfbae467baf12bdf123fccb051d92fd677c4f290d43dea52ebe7a555c3afc6f3babc657961df2ab50a70bb13739be72904f893598b98b8d7 5535 checksum: fe0889169e845d738b59b64badf5e55fa3cf20454f9203d1eb088df322d49d4318df774828e789898dcb280e8a5521bb59b3203385662ca5e9218a6ca5820e74
4659 languageName: node 5536 languageName: node
4660 linkType: hard 5537 linkType: hard
4661 5538
@@ -4672,14 +5549,14 @@ __metadata:
4672 terser: "npm:^5.15.1" 5549 terser: "npm:^5.15.1"
4673 bin: 5550 bin:
4674 html-minifier-terser: cli.js 5551 html-minifier-terser: cli.js
4675 checksum: 9287823ef09537f522a138930bce6cf28fad9740c194f13dce0b80d22c7870de3814e3e6780f56a4e0bdc2cb20b87af2edbfd12835e3773e60f887bff9e1798f 5552 checksum: ffc97c17299d9ec30e17269781b816ea2fc411a9206fc9e768be8f2decb1ea1470892809babb23bb4e3ab1f64d606d97e1803bf526ae3af71edc0fd3070b94b9
4676 languageName: node 5553 languageName: node
4677 linkType: hard 5554 linkType: hard
4678 5555
4679"http-cache-semantics@npm:^4.1.1": 5556"http-cache-semantics@npm:^4.1.1":
4680 version: 4.1.1 5557 version: 4.1.1
4681 resolution: "http-cache-semantics@npm:4.1.1" 5558 resolution: "http-cache-semantics@npm:4.1.1"
4682 checksum: 7b4d86f99fb3f07b6a49219420ebdffa077ee99bc5fe1df1f353b84c3d321c767a083a48291afb2fc34a627661b6d54c80a927639a7be9e0c43e8c4f921816bd 5559 checksum: ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc
4683 languageName: node 5560 languageName: node
4684 linkType: hard 5561 linkType: hard
4685 5562
@@ -4690,7 +5567,7 @@ __metadata:
4690 "@tootallnate/once": "npm:2" 5567 "@tootallnate/once": "npm:2"
4691 agent-base: "npm:6" 5568 agent-base: "npm:6"
4692 debug: "npm:4" 5569 debug: "npm:4"
4693 checksum: b59a9b4bdd7c1d3450956a2974cb7b685517c758853a873064a536f5a831879ac92a28c717f69eb60ff3c924b262cb5aaf80cf62f5c2c24d1129d2b8dadf1e7c 5570 checksum: 32a05e413430b2c1e542e5c74b38a9f14865301dd69dff2e53ddb684989440e3d2ce0c4b64d25eb63cf6283e6265ff979a61cf93e3ca3d23047ddfdc8df34a32
4694 languageName: node 5571 languageName: node
4695 linkType: hard 5572 linkType: hard
4696 5573
@@ -4700,7 +5577,7 @@ __metadata:
4700 dependencies: 5577 dependencies:
4701 agent-base: "npm:6" 5578 agent-base: "npm:6"
4702 debug: "npm:4" 5579 debug: "npm:4"
4703 checksum: 8e767faec977400c31bca2ef0f5338b843b781b63fd985c00d199adac2d6c8a5ecc6e553588a6821a058198960f167a3c83f014bd64bef9a15b176d992d29dfe 5580 checksum: 6dd639f03434003577c62b27cafdb864784ef19b2de430d8ae2a1d45e31c4fd60719e5637b44db1a88a046934307da7089e03d6089ec3ddacc1189d8de8897d1
4704 languageName: node 5581 languageName: node
4705 linkType: hard 5582 linkType: hard
4706 5583
@@ -4709,54 +5586,54 @@ __metadata:
4709 resolution: "humanize-ms@npm:1.2.1" 5586 resolution: "humanize-ms@npm:1.2.1"
4710 dependencies: 5587 dependencies:
4711 ms: "npm:^2.0.0" 5588 ms: "npm:^2.0.0"
4712 checksum: fded981fd3b507fe78f7ce505c3f060e3b53cb2155d279d794a6bddb451bb1c7f865f4ca495dc0bae695ad0c182fd5be3a581b51ba30770e6adfda960bca0e68 5589 checksum: f34a2c20161d02303c2807badec2f3b49cbfbbb409abd4f95a07377ae01cfe6b59e3d15ac609cffcd8f2521f0eb37b7e1091acf65da99aa2a4f1ad63c21e7e7a
4713 languageName: node 5590 languageName: node
4714 linkType: hard 5591 linkType: hard
4715 5592
4716"iconv-lite@npm:^0.6.2": 5593"iconv-lite@npm:0.6, iconv-lite@npm:^0.6.2":
4717 version: 0.6.3 5594 version: 0.6.3
4718 resolution: "iconv-lite@npm:0.6.3" 5595 resolution: "iconv-lite@npm:0.6.3"
4719 dependencies: 5596 dependencies:
4720 safer-buffer: "npm:>= 2.1.2 < 3.0.0" 5597 safer-buffer: "npm:>= 2.1.2 < 3.0.0"
4721 checksum: 14633c984e398011b4cce3d453e6566e4cc1b58f257e6fc48ae39c25a158b926e6cd7ee6023cd84aff12952a7581bd10bd4e7954af802dd5678e83b4cb8fdbba 5598 checksum: 98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1
4722 languageName: node 5599 languageName: node
4723 linkType: hard 5600 linkType: hard
4724 5601
4725"idb@npm:^7.0.1": 5602"idb@npm:^7.0.1":
4726 version: 7.1.1 5603 version: 7.1.1
4727 resolution: "idb@npm:7.1.1" 5604 resolution: "idb@npm:7.1.1"
4728 checksum: 9f9a55d7ef9409d37a0270104b89137cdd2a29fbc5cab65561a1dc1d4cdb25f1239ce9dcd1abdb25b81bf81269fad0e601be7d3bd3d8f06f2060c4c65d059748 5605 checksum: 72418e4397638797ee2089f97b45fc29f937b830bc0eb4126f4a9889ecf10320ceacf3a177fe5d7ffaf6b4fe38b20bbd210151549bfdc881db8081eed41c870d
4729 languageName: node 5606 languageName: node
4730 linkType: hard 5607 linkType: hard
4731 5608
4732"ignore@npm:^5.2.0": 5609"ignore@npm:^5.2.0, ignore@npm:^5.2.4":
4733 version: 5.2.4 5610 version: 5.2.4
4734 resolution: "ignore@npm:5.2.4" 5611 resolution: "ignore@npm:5.2.4"
4735 checksum: 55c58d848bb753a2b7e0b4a19352f9212eae2e4a05e4a12753e90b921108a6caa140adf958a5084b144bedd886b44e3bc93f6b4839e5aba1fb4a72c6625da4c1 5612 checksum: 7c7cd90edd9fea6e037f9b9da4b01bf0a86b198ce78345f9bbd983929d68ff14830be31111edc5d70c264921f4962404d75b7262b4d9cc3bc12381eccbd03096
4736 languageName: node 5613 languageName: node
4737 linkType: hard 5614 linkType: hard
4738 5615
4739"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": 5616"import-fresh@npm:^3.2.1":
4740 version: 3.3.0 5617 version: 3.3.0
4741 resolution: "import-fresh@npm:3.3.0" 5618 resolution: "import-fresh@npm:3.3.0"
4742 dependencies: 5619 dependencies:
4743 parent-module: "npm:^1.0.0" 5620 parent-module: "npm:^1.0.0"
4744 resolve-from: "npm:^4.0.0" 5621 resolve-from: "npm:^4.0.0"
4745 checksum: 81ec300d4d16df0ba4f4ed99f4c7e8f312c4c6f48c100afe801deae468479cb8d8209a7c71a943b3e6def4fa0c24ad3eac34e72cb4968424930df39e8d16e9c9 5622 checksum: 7f882953aa6b740d1f0e384d0547158bc86efbf2eea0f1483b8900a6f65c5a5123c2cf09b0d542cc419d0b98a759ecaeb394237e97ea427f2da221dc3cd80cc3
4746 languageName: node 5623 languageName: node
4747 linkType: hard 5624 linkType: hard
4748 5625
4749"imurmurhash@npm:^0.1.4": 5626"imurmurhash@npm:^0.1.4":
4750 version: 0.1.4 5627 version: 0.1.4
4751 resolution: "imurmurhash@npm:0.1.4" 5628 resolution: "imurmurhash@npm:0.1.4"
4752 checksum: 6e2473e6083063b9f5f21a9586794b3af5b3f87995bcf60cb64f3824a7323c2ae41b4eaf3d7446e20fb66b5f3410094246aa3c52db7585270c8b10f762b8ffa1 5629 checksum: 8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6
4753 languageName: node 5630 languageName: node
4754 linkType: hard 5631 linkType: hard
4755 5632
4756"indent-string@npm:^4.0.0": 5633"indent-string@npm:^4.0.0":
4757 version: 4.0.0 5634 version: 4.0.0
4758 resolution: "indent-string@npm:4.0.0" 5635 resolution: "indent-string@npm:4.0.0"
4759 checksum: f4ab9e229c120377a63fce905062e5fdf1c300ca01b72401dda5aa991e8f614fdb2f99fe7cc37ef3234413da4ab43d5a4f905356fdffb9d078e83806d274719c 5636 checksum: 1e1904ddb0cb3d6cce7cd09e27a90184908b7a5d5c21b92e232c93579d314f0b83c246ffb035493d0504b1e9147ba2c9b21df0030f48673fba0496ecd698161f
4760 languageName: node 5637 languageName: node
4761 linkType: hard 5638 linkType: hard
4762 5639
@@ -4766,14 +5643,14 @@ __metadata:
4766 dependencies: 5643 dependencies:
4767 once: "npm:^1.3.0" 5644 once: "npm:^1.3.0"
4768 wrappy: "npm:1" 5645 wrappy: "npm:1"
4769 checksum: 40d0e5db34e05d49b9ad9ac678334269745644f73206862a8dee6e50ada1c8b3e70774ce28d5e6e3b03b7b868c9d9ae1edaf6eff253fc50209e4c69decad1811 5646 checksum: 7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2
4770 languageName: node 5647 languageName: node
4771 linkType: hard 5648 linkType: hard
4772 5649
4773"inherits@npm:2, inherits@npm:^2.0.3": 5650"inherits@npm:2, inherits@npm:^2.0.3":
4774 version: 2.0.4 5651 version: 2.0.4
4775 resolution: "inherits@npm:2.0.4" 5652 resolution: "inherits@npm:2.0.4"
4776 checksum: ca76c7e45ec715bfe6c1dd67b780b9a15068f37b37ab56cf8b773537b2654238469a42950f5f4d301212755e7512be888f627752e778e1863d95cfedefc8b8bd 5653 checksum: 4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2
4777 languageName: node 5654 languageName: node
4778 linkType: hard 5655 linkType: hard
4779 5656
@@ -4784,14 +5661,31 @@ __metadata:
4784 get-intrinsic: "npm:^1.2.0" 5661 get-intrinsic: "npm:^1.2.0"
4785 has: "npm:^1.0.3" 5662 has: "npm:^1.0.3"
4786 side-channel: "npm:^1.0.4" 5663 side-channel: "npm:^1.0.4"
4787 checksum: 7ba9f797e33d9f7fb623ed4eb63a8f4697da1423e8dd47a336c759707a14aebc9d2e04c7df286a493f4eac30c178c6ffad89f559beb3e9641992b6a57f933088 5664 checksum: 66d8a66b4b5310c042e8ad00ce895dc55cb25165a3a7da0d7862ca18d69d3b1ba86511b4bf3baf4273d744d3f6e9154574af45189ef11135a444945309e39e4a
5665 languageName: node
5666 linkType: hard
5667
5668"internmap@npm:1 - 2":
5669 version: 2.0.3
5670 resolution: "internmap@npm:2.0.3"
5671 checksum: 8cedd57f07bbc22501516fbfc70447f0c6812871d471096fad9ea603516eacc2137b633633daf432c029712df0baefd793686388ddf5737e3ea15074b877f7ed
4788 languageName: node 5672 languageName: node
4789 linkType: hard 5673 linkType: hard
4790 5674
4791"ip@npm:^2.0.0": 5675"ip@npm:^2.0.0":
4792 version: 2.0.0 5676 version: 2.0.0
4793 resolution: "ip@npm:2.0.0" 5677 resolution: "ip@npm:2.0.0"
4794 checksum: 42a7cf251b844d98a4c3373d06997b991cd1a7f8a5d43bcf2b4f610517d39c5504f6eb3e73e77f5c1453ac766690e82dab28a8a05a49a6fd7d4a40fad93640e9 5678 checksum: 8d186cc5585f57372847ae29b6eba258c68862055e18a75cc4933327232cb5c107f89800ce29715d542eef2c254fbb68b382e780a7414f9ee7caf60b7a473958
5679 languageName: node
5680 linkType: hard
5681
5682"is-arguments@npm:^1.0.4":
5683 version: 1.1.1
5684 resolution: "is-arguments@npm:1.1.1"
5685 dependencies:
5686 call-bind: "npm:^1.0.2"
5687 has-tostringtag: "npm:^1.0.0"
5688 checksum: 5ff1f341ee4475350adfc14b2328b38962564b7c2076be2f5bac7bd9b61779efba99b9f844a7b82ba7654adccf8e8eb19d1bb0cc6d1c1a085e498f6793d4328f
4795 languageName: node 5689 languageName: node
4796 linkType: hard 5690 linkType: hard
4797 5691
@@ -4802,14 +5696,23 @@ __metadata:
4802 call-bind: "npm:^1.0.2" 5696 call-bind: "npm:^1.0.2"
4803 get-intrinsic: "npm:^1.2.0" 5697 get-intrinsic: "npm:^1.2.0"
4804 is-typed-array: "npm:^1.1.10" 5698 is-typed-array: "npm:^1.1.10"
4805 checksum: a16f8a01bef76922e75984bd33e38dff931c512d8bb7b8e994898643513fbfedfd7c270f375d4a9c41819c5161b23d9e7fff6c9cbcbd97189a97c1f934a3f7c0 5699 checksum: 40ed13a5f5746ac3ae2f2e463687d9b5a3f5fd0086f970fb4898f0253c2a5ec2e3caea2d664dd8f54761b1c1948609702416921a22faebe160c7640a9217c80e
4806 languageName: node 5700 languageName: node
4807 linkType: hard 5701 linkType: hard
4808 5702
4809"is-arrayish@npm:^0.2.1": 5703"is-arrayish@npm:^0.2.1":
4810 version: 0.2.1 5704 version: 0.2.1
4811 resolution: "is-arrayish@npm:0.2.1" 5705 resolution: "is-arrayish@npm:0.2.1"
4812 checksum: c701fd85259ab454cfacf4a30123e3e43542a3e60124a670e89f6e5847590ff4a6e4c0d8ccbe940df64f0001547f65856cf6a13b6528a7ce93da34cf2b2ea23d 5706 checksum: e7fb686a739068bb70f860b39b67afc62acc62e36bb61c5f965768abce1873b379c563e61dd2adad96ebb7edf6651111b385e490cf508378959b0ed4cac4e729
5707 languageName: node
5708 linkType: hard
5709
5710"is-async-function@npm:^2.0.0":
5711 version: 2.0.0
5712 resolution: "is-async-function@npm:2.0.0"
5713 dependencies:
5714 has-tostringtag: "npm:^1.0.0"
5715 checksum: 787bc931576aad525d751fc5ce211960fe91e49ac84a5c22d6ae0bc9541945fbc3f686dc590c3175722ce4f6d7b798a93f6f8ff4847fdb2199aea6f4baf5d668
4813 languageName: node 5716 languageName: node
4814 linkType: hard 5717 linkType: hard
4815 5718
@@ -4818,7 +5721,7 @@ __metadata:
4818 resolution: "is-bigint@npm:1.0.4" 5721 resolution: "is-bigint@npm:1.0.4"
4819 dependencies: 5722 dependencies:
4820 has-bigints: "npm:^1.0.1" 5723 has-bigints: "npm:^1.0.1"
4821 checksum: 0e3ca3959ca1a9ee7dd70ce780567f31beeb456993752ba7e33495ed91e734f40decdc258ed450f64f319c0923ea46e2d1de5c4a9dbf89a12de05dc636dd6bfa 5724 checksum: eb9c88e418a0d195ca545aff2b715c9903d9b0a5033bc5922fec600eb0c3d7b1ee7f882dbf2e0d5a6e694e42391be3683e4368737bd3c4a77f8ac293e7773696
4822 languageName: node 5725 languageName: node
4823 linkType: hard 5726 linkType: hard
4824 5727
@@ -4827,7 +5730,7 @@ __metadata:
4827 resolution: "is-binary-path@npm:2.1.0" 5730 resolution: "is-binary-path@npm:2.1.0"
4828 dependencies: 5731 dependencies:
4829 binary-extensions: "npm:^2.0.0" 5732 binary-extensions: "npm:^2.0.0"
4830 checksum: f6ed933392b85facdc081bbe3539602ac70cf35fe5d3d7e02da0b9c4bc65fa673d815142f16bf6253de84a561332a680382be1ade1406c89c9102832a571620f 5733 checksum: a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38
4831 languageName: node 5734 languageName: node
4832 linkType: hard 5735 linkType: hard
4833 5736
@@ -4837,32 +5740,32 @@ __metadata:
4837 dependencies: 5740 dependencies:
4838 call-bind: "npm:^1.0.2" 5741 call-bind: "npm:^1.0.2"
4839 has-tostringtag: "npm:^1.0.0" 5742 has-tostringtag: "npm:^1.0.0"
4840 checksum: 39616788ace17a15b2a4cbc6bee6dbe96be05e86e6afedf8eb1580a2eb05cd6732dfa58949ebc9343a2c9c389fb8a34a4659e0ef7b5bfc4807ccf9814e0cf9b3 5743 checksum: 6090587f8a8a8534c0f816da868bc94f32810f08807aa72fa7e79f7e11c466d281486ffe7a788178809c2aa71fe3e700b167fe80dd96dad68026bfff8ebf39f7
4841 languageName: node 5744 languageName: node
4842 linkType: hard 5745 linkType: hard
4843 5746
4844"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": 5747"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7":
4845 version: 1.2.7 5748 version: 1.2.7
4846 resolution: "is-callable@npm:1.2.7" 5749 resolution: "is-callable@npm:1.2.7"
4847 checksum: 39d7787a6cd66d620ee4e9d09bb36587c29b39f50550d27dd7bea1d0d46b2a87ad9ac2b3d11f751836f08befc20afc4cb36201de1de26aaf02f298c8c512c102 5750 checksum: ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f
4848 languageName: node 5751 languageName: node
4849 linkType: hard 5752 linkType: hard
4850 5753
4851"is-core-module@npm:^2.11.0, is-core-module@npm:^2.12.0, is-core-module@npm:^2.9.0": 5754"is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.9.0":
4852 version: 2.12.1 5755 version: 2.13.0
4853 resolution: "is-core-module@npm:2.12.1" 5756 resolution: "is-core-module@npm:2.13.0"
4854 dependencies: 5757 dependencies:
4855 has: "npm:^1.0.3" 5758 has: "npm:^1.0.3"
4856 checksum: ad50fa9887d64a912837625b54df9489005180d829128c5d979355a969e80e65f772a54ac29e8f25a18a2ad2c6b45115deffb32a3e0c2d5b16ee7ad292066b5a 5759 checksum: a8e7f46f8cefd7c9f6f5d54f3dbf1c40bf79467b6612d6023421ec6ea7e8e4c22593b3963ff7a3f770db07bc19fccbe7987a550a8bc1a4d6ec4115db5e4c5dca
4857 languageName: node 5760 languageName: node
4858 linkType: hard 5761 linkType: hard
4859 5762
4860"is-date-object@npm:^1.0.1": 5763"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5":
4861 version: 1.0.5 5764 version: 1.0.5
4862 resolution: "is-date-object@npm:1.0.5" 5765 resolution: "is-date-object@npm:1.0.5"
4863 dependencies: 5766 dependencies:
4864 has-tostringtag: "npm:^1.0.0" 5767 has-tostringtag: "npm:^1.0.0"
4865 checksum: a961e52c2f846d5522413ccd47d376a926b0ddd04b5db468b8b091f93d455475ca26c4b9beae386202e5d05ad2c75252d15452c8ddf942891712b3f94debd9d4 5768 checksum: eed21e5dcc619c48ccef804dfc83a739dbb2abee6ca202838ee1bd5f760fe8d8a93444f0d49012ad19bb7c006186e2884a1b92f6e1c056da7fd23d0a9ad5992e
4866 languageName: node 5769 languageName: node
4867 linkType: hard 5770 linkType: hard
4868 5771
@@ -4871,21 +5774,39 @@ __metadata:
4871 resolution: "is-docker@npm:2.2.1" 5774 resolution: "is-docker@npm:2.2.1"
4872 bin: 5775 bin:
4873 is-docker: cli.js 5776 is-docker: cli.js
4874 checksum: 4a6decb5f39980f0be8169474b2f2db9f76f77dc83353cdf815e7790b51ed29775eb316e77a868b5c80c4587e8c98d533eef484c0b76f856c576282a8c52920f 5777 checksum: e828365958d155f90c409cdbe958f64051d99e8aedc2c8c4cd7c89dcf35329daed42f7b99346f7828df013e27deb8f721cf9408ba878c76eb9e8290235fbcdcc
4875 languageName: node 5778 languageName: node
4876 linkType: hard 5779 linkType: hard
4877 5780
4878"is-extglob@npm:^2.1.1": 5781"is-extglob@npm:^2.1.1":
4879 version: 2.1.1 5782 version: 2.1.1
4880 resolution: "is-extglob@npm:2.1.1" 5783 resolution: "is-extglob@npm:2.1.1"
4881 checksum: 226b9f6eee1e7da52f72c98ed4ea7fc71ee3a087b6d1c62655c9a81c601caa2fd98b9f9be42fb8163eef2720cdbf046bc7c5548a76755651e540f4b08ff3b120 5784 checksum: 5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912
5785 languageName: node
5786 linkType: hard
5787
5788"is-finalizationregistry@npm:^1.0.2":
5789 version: 1.0.2
5790 resolution: "is-finalizationregistry@npm:1.0.2"
5791 dependencies:
5792 call-bind: "npm:^1.0.2"
5793 checksum: 81caecc984d27b1a35c68741156fc651fb1fa5e3e6710d21410abc527eb226d400c0943a167922b2e920f6b3e58b0dede9aa795882b038b85f50b3a4b877db86
4882 languageName: node 5794 languageName: node
4883 linkType: hard 5795 linkType: hard
4884 5796
4885"is-fullwidth-code-point@npm:^3.0.0": 5797"is-fullwidth-code-point@npm:^3.0.0":
4886 version: 3.0.0 5798 version: 3.0.0
4887 resolution: "is-fullwidth-code-point@npm:3.0.0" 5799 resolution: "is-fullwidth-code-point@npm:3.0.0"
4888 checksum: c06b5792b82dcdedb41858cdb07ca4ae5b9a853ad65c91529533221f384d751bedd8ad8db5a527cb219fd989c32a0faa0833312b6a190fe597acdd23165ef724 5800 checksum: bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc
5801 languageName: node
5802 linkType: hard
5803
5804"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7":
5805 version: 1.0.10
5806 resolution: "is-generator-function@npm:1.0.10"
5807 dependencies:
5808 has-tostringtag: "npm:^1.0.0"
5809 checksum: df03514df01a6098945b5a0cfa1abff715807c8e72f57c49a0686ad54b3b74d394e2d8714e6f709a71eb00c9630d48e73ca1796c1ccc84ac95092c1fecc0d98b
4889 languageName: node 5810 languageName: node
4890 linkType: hard 5811 linkType: hard
4891 5812
@@ -4894,28 +5815,45 @@ __metadata:
4894 resolution: "is-glob@npm:4.0.3" 5815 resolution: "is-glob@npm:4.0.3"
4895 dependencies: 5816 dependencies:
4896 is-extglob: "npm:^2.1.1" 5817 is-extglob: "npm:^2.1.1"
4897 checksum: 0b2f6c06162a1d6c764b2f1cf0f2617b6e0cb1e8125c0e3b7e838a3e06caac81268ab3c0a4699052df59229c99e8a1dd0217b30476d7643a37fa17a49f1b50af 5818 checksum: 17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a
4898 languageName: node 5819 languageName: node
4899 linkType: hard 5820 linkType: hard
4900 5821
4901"is-lambda@npm:^1.0.1": 5822"is-lambda@npm:^1.0.1":
4902 version: 1.0.1 5823 version: 1.0.1
4903 resolution: "is-lambda@npm:1.0.1" 5824 resolution: "is-lambda@npm:1.0.1"
4904 checksum: 8e761e558bf60bd3682648e6ecb6333e9ad9c5a6fef2a9ca879deef1a40478e5f7e18999fc3630ef8b879cf00bc0248ffa5616aa4251917a7f87f066841310aa 5825 checksum: 85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d
5826 languageName: node
5827 linkType: hard
5828
5829"is-map@npm:^2.0.1":
5830 version: 2.0.2
5831 resolution: "is-map@npm:2.0.2"
5832 checksum: 119ff9137a37fd131a72fab3f4ab8c9d6a24b0a1ee26b4eff14dc625900d8675a97785eea5f4174265e2006ed076cc24e89f6e57ebd080a48338d914ec9168a5
4905 languageName: node 5833 languageName: node
4906 linkType: hard 5834 linkType: hard
4907 5835
4908"is-module@npm:^1.0.0": 5836"is-module@npm:^1.0.0":
4909 version: 1.0.0 5837 version: 1.0.0
4910 resolution: "is-module@npm:1.0.0" 5838 resolution: "is-module@npm:1.0.0"
4911 checksum: 56efff366c237c4f3fb263e6b7e8b8358bb5fc63559552e928fecff27cb774d37f634b94461a6c72339b4ef7ea9f6dc95082508f42828ce5cdef2cb0c0600013 5839 checksum: 795a3914bcae7c26a1c23a1e5574c42eac13429625045737bf3e324ce865c0601d61aee7a5afbca1bee8cb300c7d9647e7dc98860c9bdbc3b7fdc51d8ac0bffc
5840 languageName: node
5841 linkType: hard
5842
5843"is-nan@npm:^1.2.1":
5844 version: 1.3.2
5845 resolution: "is-nan@npm:1.3.2"
5846 dependencies:
5847 call-bind: "npm:^1.0.0"
5848 define-properties: "npm:^1.1.3"
5849 checksum: 8bfb286f85763f9c2e28ea32e9127702fe980ffd15fa5d63ade3be7786559e6e21355d3625dd364c769c033c5aedf0a2ed3d4025d336abf1b9241e3d9eddc5b0
4912 languageName: node 5850 languageName: node
4913 linkType: hard 5851 linkType: hard
4914 5852
4915"is-negative-zero@npm:^2.0.2": 5853"is-negative-zero@npm:^2.0.2":
4916 version: 2.0.2 5854 version: 2.0.2
4917 resolution: "is-negative-zero@npm:2.0.2" 5855 resolution: "is-negative-zero@npm:2.0.2"
4918 checksum: ce904d0d03bacd5393b3eba41321333169bd6fe8f87d1341016899e91c700f660e5e6b6dd3f3d9de5a12261cec207cf85914d1a89ad428e19c2983e451a8ac59 5856 checksum: eda024c158f70f2017f3415e471b818d314da5ef5be68f801b16314d4a4b6304a74cbed778acf9e2f955bb9c1c5f2935c1be0c7c99e1ad12286f45366217b6a3
4919 languageName: node 5857 languageName: node
4920 linkType: hard 5858 linkType: hard
4921 5859
@@ -4924,28 +5862,28 @@ __metadata:
4924 resolution: "is-number-object@npm:1.0.7" 5862 resolution: "is-number-object@npm:1.0.7"
4925 dependencies: 5863 dependencies:
4926 has-tostringtag: "npm:^1.0.0" 5864 has-tostringtag: "npm:^1.0.0"
4927 checksum: fd67ff18bad5c64ce2054a03d92c9f264f0f0cd197ea6951207c3dd1b9bea5b40e933be440e7673ea2f1e2a6b265c1842651c94c12d16efd84bbe9310d9cc600 5865 checksum: aad266da1e530f1804a2b7bd2e874b4869f71c98590b3964f9d06cc9869b18f8d1f4778f838ecd2a11011bce20aeecb53cb269ba916209b79c24580416b74b1b
4928 languageName: node 5866 languageName: node
4929 linkType: hard 5867 linkType: hard
4930 5868
4931"is-number@npm:^7.0.0": 5869"is-number@npm:^7.0.0":
4932 version: 7.0.0 5870 version: 7.0.0
4933 resolution: "is-number@npm:7.0.0" 5871 resolution: "is-number@npm:7.0.0"
4934 checksum: 748df55ae14cc960b090a7611932940df9fa703b7e0fb4f73943b4eb94c4b5391f27ba3881fab8f5bf7a2f097490e812db0d58d05c92154e70fdf14f93d6fa95 5872 checksum: b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811
4935 languageName: node 5873 languageName: node
4936 linkType: hard 5874 linkType: hard
4937 5875
4938"is-obj@npm:^1.0.1": 5876"is-obj@npm:^1.0.1":
4939 version: 1.0.1 5877 version: 1.0.1
4940 resolution: "is-obj@npm:1.0.1" 5878 resolution: "is-obj@npm:1.0.1"
4941 checksum: d6b302e2a2758b1074c3c5b5c48d2b7c086159bba6b598096483621aff003addcd4e22f07f782d560301ee4fc347076bbcdaae1eee91f8741272779311c3bd10 5879 checksum: 5003acba0af7aa47dfe0760e545a89bbac89af37c12092c3efadc755372cdaec034f130e7a3653a59eb3c1843cfc72ca71eaf1a6c3bafe5a0bab3611a47f9945
4942 languageName: node 5880 languageName: node
4943 linkType: hard 5881 linkType: hard
4944 5882
4945"is-path-inside@npm:^3.0.3": 5883"is-path-inside@npm:^3.0.3":
4946 version: 3.0.3 5884 version: 3.0.3
4947 resolution: "is-path-inside@npm:3.0.3" 5885 resolution: "is-path-inside@npm:3.0.3"
4948 checksum: ca3976bb491e562794ba9d1884d8679e08a68fbc68bdefabbed393bdb3fefd66958c0b8d166ca6c4b502a5283bcd0bede7a2b223bf740e406db6dcffddc833a5 5886 checksum: cf7d4ac35fb96bab6a1d2c3598fe5ebb29aafb52c0aaa482b5a3ed9d8ba3edc11631e3ec2637660c44b3ce0e61a08d54946e8af30dec0b60a7c27296c68ffd05
4949 languageName: node 5887 languageName: node
4950 linkType: hard 5888 linkType: hard
4951 5889
@@ -4955,14 +5893,21 @@ __metadata:
4955 dependencies: 5893 dependencies:
4956 call-bind: "npm:^1.0.2" 5894 call-bind: "npm:^1.0.2"
4957 has-tostringtag: "npm:^1.0.0" 5895 has-tostringtag: "npm:^1.0.0"
4958 checksum: d5a09a3da9ba262b3c92f415a2d917ff42fb2241ec7a6cc58ac4512b1b4b35da765c79a60677d7125467a0a597f90cc8d20c5472da520d20476dd12b663cfa65 5896 checksum: bb72aae604a69eafd4a82a93002058c416ace8cde95873589a97fc5dac96a6c6c78a9977d487b7b95426a8f5073969124dd228f043f9f604f041f32fcc465fc1
4959 languageName: node 5897 languageName: node
4960 linkType: hard 5898 linkType: hard
4961 5899
4962"is-regexp@npm:^1.0.0": 5900"is-regexp@npm:^1.0.0":
4963 version: 1.0.0 5901 version: 1.0.0
4964 resolution: "is-regexp@npm:1.0.0" 5902 resolution: "is-regexp@npm:1.0.0"
4965 checksum: b545163b0128bb87e1993141ea4840941b5d2c624acdc456c090ebf4d9969da2ac32bd938c6f2182ab3f4c78f4db5a06004bead6e13eaba7de197fd13eba31a5 5903 checksum: 34cacda1901e00f6e44879378f1d2fa96320ea956c1bec27713130aaf1d44f6e7bd963eed28945bfe37e600cb27df1cf5207302680dad8bdd27b9baff8ecf611
5904 languageName: node
5905 linkType: hard
5906
5907"is-set@npm:^2.0.1":
5908 version: 2.0.2
5909 resolution: "is-set@npm:2.0.2"
5910 checksum: 5f8bd1880df8c0004ce694e315e6e1e47a3452014be792880bb274a3b2cdb952fdb60789636ca6e084c7947ca8b7ae03ccaf54c93a7fcfed228af810559e5432
4966 languageName: node 5911 languageName: node
4967 linkType: hard 5912 linkType: hard
4968 5913
@@ -4971,14 +5916,14 @@ __metadata:
4971 resolution: "is-shared-array-buffer@npm:1.0.2" 5916 resolution: "is-shared-array-buffer@npm:1.0.2"
4972 dependencies: 5917 dependencies:
4973 call-bind: "npm:^1.0.2" 5918 call-bind: "npm:^1.0.2"
4974 checksum: 89167fd3a2768021900ea3e5d4d844127bffea24fa9f171e5e621cb454ffac2539e224ba95567f71154cf488eda4e995282491eb5863d312daa0f14eefa4346e 5919 checksum: cfeee6f171f1b13e6cbc6f3b6cc44e192b93df39f3fcb31aa66ffb1d2df3b91e05664311659f9701baba62f5e98c83b0673c628e7adc30f55071c4874fcdccec
4975 languageName: node 5920 languageName: node
4976 linkType: hard 5921 linkType: hard
4977 5922
4978"is-stream@npm:^2.0.0": 5923"is-stream@npm:^2.0.0":
4979 version: 2.0.1 5924 version: 2.0.1
4980 resolution: "is-stream@npm:2.0.1" 5925 resolution: "is-stream@npm:2.0.1"
4981 checksum: 763e33689433924775b560e63fb7c0f7fae6cbc54fd9c410bb3536341b96fca85ce26720ba13ffb9b46446bdf540308771fe5910462b47b1e7d4c42dbd230f46 5926 checksum: 7c284241313fc6efc329b8d7f08e16c0efeb6baab1b4cd0ba579eb78e5af1aa5da11e68559896a2067cd6c526bd29241dda4eb1225e627d5aa1a89a76d4635a5
4982 languageName: node 5927 languageName: node
4983 linkType: hard 5928 linkType: hard
4984 5929
@@ -4987,7 +5932,7 @@ __metadata:
4987 resolution: "is-string@npm:1.0.7" 5932 resolution: "is-string@npm:1.0.7"
4988 dependencies: 5933 dependencies:
4989 has-tostringtag: "npm:^1.0.0" 5934 has-tostringtag: "npm:^1.0.0"
4990 checksum: 1a2c721eeebd6e0b0228d879af6c5e82d4e2574249b5d86fb1975f683ad73f43d1120ea7a36331455a77f7c54c92a4cb5a276ce344a11770dd88fd8ef47aa54b 5935 checksum: 905f805cbc6eedfa678aaa103ab7f626aac9ebbdc8737abb5243acaa61d9820f8edc5819106b8fcd1839e33db21de9f0116ae20de380c8382d16dc2a601921f6
4991 languageName: node 5936 languageName: node
4992 linkType: hard 5937 linkType: hard
4993 5938
@@ -4996,20 +5941,23 @@ __metadata:
4996 resolution: "is-symbol@npm:1.0.4" 5941 resolution: "is-symbol@npm:1.0.4"
4997 dependencies: 5942 dependencies:
4998 has-symbols: "npm:^1.0.2" 5943 has-symbols: "npm:^1.0.2"
4999 checksum: f1bb1364865f405120eb657a70750cdec3e63260eae6bda81509d4c58b456b7e21f22ab1d5cfc55f269e69dddbdc68ba9764757ab4eaa9e3073357ca9c8e17c2 5944 checksum: 9381dd015f7c8906154dbcbf93fad769de16b4b961edc94f88d26eb8c555935caa23af88bda0c93a18e65560f6d7cca0fd5a3f8a8e1df6f1abbb9bead4502ef7
5000 languageName: node 5945 languageName: node
5001 linkType: hard 5946 linkType: hard
5002 5947
5003"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.9": 5948"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.9":
5004 version: 1.1.10 5949 version: 1.1.12
5005 resolution: "is-typed-array@npm:1.1.10" 5950 resolution: "is-typed-array@npm:1.1.12"
5006 dependencies: 5951 dependencies:
5007 available-typed-arrays: "npm:^1.0.5" 5952 which-typed-array: "npm:^1.1.11"
5008 call-bind: "npm:^1.0.2" 5953 checksum: 9863e9cc7223c6fc1c462a2c3898a7beff6b41b1ee0fabb03b7d278ae7de670b5bcbc8627db56bb66ed60902fa37d53fe5cce0fd2f7d73ac64fe5da6f409b6ae
5009 for-each: "npm:^0.3.3" 5954 languageName: node
5010 gopd: "npm:^1.0.1" 5955 linkType: hard
5011 has-tostringtag: "npm:^1.0.0" 5956
5012 checksum: c42bdb03b501a76c1b307f087885bc700952fe1ae1f203264c52e3eb467c8a1f69527c5285bce0898eca66a892a988b94e609ea87bcb78f663c1ab57e6286016 5957"is-weakmap@npm:^2.0.1":
5958 version: 2.0.1
5959 resolution: "is-weakmap@npm:2.0.1"
5960 checksum: 9c9fec9efa7bf5030a4a927f33fff2a6976b93646259f92b517d3646c073cc5b98283a162ce75c412b060a46de07032444b530f0a4c9b6e012ef8f1741c3a987
5013 languageName: node 5961 languageName: node
5014 linkType: hard 5962 linkType: hard
5015 5963
@@ -5018,7 +5966,17 @@ __metadata:
5018 resolution: "is-weakref@npm:1.0.2" 5966 resolution: "is-weakref@npm:1.0.2"
5019 dependencies: 5967 dependencies:
5020 call-bind: "npm:^1.0.2" 5968 call-bind: "npm:^1.0.2"
5021 checksum: fdd5b2df8209f8387a86c8a504f6983fff0f90b46aabfe8d97ffbf34d2cbb6f64edbaec8da16deedd876c228b7b721ead65f42f20f1a0e7ebf294f669542c534 5969 checksum: 1545c5d172cb690c392f2136c23eec07d8d78a7f57d0e41f10078aa4f5daf5d7f57b6513a67514ab4f073275ad00c9822fc8935e00229d0a2089e1c02685d4b1
5970 languageName: node
5971 linkType: hard
5972
5973"is-weakset@npm:^2.0.1":
5974 version: 2.0.2
5975 resolution: "is-weakset@npm:2.0.2"
5976 dependencies:
5977 call-bind: "npm:^1.0.2"
5978 get-intrinsic: "npm:^1.1.1"
5979 checksum: ef5136bd446ae4603229b897f73efd0720c6ab3ec6cc05c8d5c4b51aa9f95164713c4cad0a22ff1fedf04865ff86cae4648bc1d5eead4b6388e1150525af1cc1
5022 languageName: node 5980 languageName: node
5023 linkType: hard 5981 linkType: hard
5024 5982
@@ -5027,27 +5985,47 @@ __metadata:
5027 resolution: "is-wsl@npm:2.2.0" 5985 resolution: "is-wsl@npm:2.2.0"
5028 dependencies: 5986 dependencies:
5029 is-docker: "npm:^2.0.0" 5987 is-docker: "npm:^2.0.0"
5030 checksum: 44a5dd51a565631dc02905673e6fc1eded217f5039a20ded7ab17ced7352746937f08dac3f4eecafe5ac854528d6fef2378d8d2ffaab0e6d10109f6a36ed4986 5988 checksum: a6fa2d370d21be487c0165c7a440d567274fbba1a817f2f0bfa41cc5e3af25041d84267baa22df66696956038a43973e72fca117918c91431920bdef490fa25e
5989 languageName: node
5990 linkType: hard
5991
5992"isarray@npm:^2.0.5":
5993 version: 2.0.5
5994 resolution: "isarray@npm:2.0.5"
5995 checksum: 4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd
5031 languageName: node 5996 languageName: node
5032 linkType: hard 5997 linkType: hard
5033 5998
5034"isexe@npm:^2.0.0": 5999"isexe@npm:^2.0.0":
5035 version: 2.0.0 6000 version: 2.0.0
5036 resolution: "isexe@npm:2.0.0" 6001 resolution: "isexe@npm:2.0.0"
5037 checksum: b37fe0a7983c0c151c7b31ca716405aaea190ac9cd6ef3f79355f4afb043ed4d3182a6addd73b20df7a0b229269737ad0daf64116821a048bfbe6b8fb7eb842c 6002 checksum: 228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d
6003 languageName: node
6004 linkType: hard
6005
6006"iterator.prototype@npm:^1.1.0":
6007 version: 1.1.0
6008 resolution: "iterator.prototype@npm:1.1.0"
6009 dependencies:
6010 define-properties: "npm:^1.1.4"
6011 get-intrinsic: "npm:^1.1.3"
6012 has-symbols: "npm:^1.0.3"
6013 has-tostringtag: "npm:^1.0.0"
6014 reflect.getprototypeof: "npm:^1.0.3"
6015 checksum: fd641c4cc8cf85a1f99c772722589393b6b59562c7b73cae6bea26e0814b9bdd095d40818f061b85a4f386ecebee92f9a01ba79a70951d72bd3dd3e01a6c624c
5038 languageName: node 6016 languageName: node
5039 linkType: hard 6017 linkType: hard
5040 6018
5041"jackspeak@npm:^2.0.3": 6019"jackspeak@npm:^2.0.3":
5042 version: 2.2.1 6020 version: 2.2.3
5043 resolution: "jackspeak@npm:2.2.1" 6021 resolution: "jackspeak@npm:2.2.3"
5044 dependencies: 6022 dependencies:
5045 "@isaacs/cliui": "npm:^8.0.2" 6023 "@isaacs/cliui": "npm:^8.0.2"
5046 "@pkgjs/parseargs": "npm:^0.11.0" 6024 "@pkgjs/parseargs": "npm:^0.11.0"
5047 dependenciesMeta: 6025 dependenciesMeta:
5048 "@pkgjs/parseargs": 6026 "@pkgjs/parseargs":
5049 optional: true 6027 optional: true
5050 checksum: b7c66988fb8575356fcf6b6c0fdcfb89a78fd0aaceb16d1318ae355fb7b6f51a456e9b8cf47ac0875bb7d6b94d82cc649762d5b819f4055ad5c5f5d617a0e20f 6028 checksum: 4e1ac5cff07302dd8452006cebff5b753b347faedf2b96ef82a13ebde8c9e6f3685630733e36ab5baaff34829dbc3b2b9454b1496b2970912151869929bcabd5
5051 languageName: node 6029 languageName: node
5052 linkType: hard 6030 linkType: hard
5053 6031
@@ -5061,7 +6039,7 @@ __metadata:
5061 minimatch: "npm:^3.1.2" 6039 minimatch: "npm:^3.1.2"
5062 bin: 6040 bin:
5063 jake: bin/cli.js 6041 jake: bin/cli.js
5064 checksum: 92991ae6bcb5e0889e68e745a667992fdc4bf17e62dfda1d01db535e494347f20d9d47b9bcd31f149dcd96aad2ccd9e2994f917c33b9c6adc124e8730135137d 6042 checksum: 89326d01a8bc110d02d973729a66394c79a34b34461116f5c530a2a2dbc30265683fe6737928f75df9178e9d369ff1442f5753fb983d525e740eefdadc56a103
5065 languageName: node 6043 languageName: node
5066 linkType: hard 6044 linkType: hard
5067 6045
@@ -5072,14 +6050,14 @@ __metadata:
5072 "@types/node": "npm:*" 6050 "@types/node": "npm:*"
5073 merge-stream: "npm:^2.0.0" 6051 merge-stream: "npm:^2.0.0"
5074 supports-color: "npm:^7.0.0" 6052 supports-color: "npm:^7.0.0"
5075 checksum: 244d4034e43b47cfae2c896ce9273d18597dc18648ca7d7974c522fb3fe61f5bd91a2dae22222c710c5f14f17fbc3033656cca92fb64fd9e677f77e7a66caf62 6053 checksum: 07e4dba650381604cda253ab6d5837fe0279c8d68c25884995b45bfe149a7a1e1b5a97f304b4518f257dac2a9ddc1808d57d650649c3ab855e9e60cf824d2970
5076 languageName: node 6054 languageName: node
5077 linkType: hard 6055 linkType: hard
5078 6056
5079"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": 6057"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0":
5080 version: 4.0.0 6058 version: 4.0.0
5081 resolution: "js-tokens@npm:4.0.0" 6059 resolution: "js-tokens@npm:4.0.0"
5082 checksum: 47d1c18dc6b9eed4baf1db3d81b36feb95b463201c82ffce0d7a4d65ede596ba97d6ac2468974199705db9ef8a3433606af41fc7bbe7cb25c1dd601785413d9b 6060 checksum: e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed
5083 languageName: node 6061 languageName: node
5084 linkType: hard 6062 linkType: hard
5085 6063
@@ -5090,7 +6068,7 @@ __metadata:
5090 argparse: "npm:^2.0.1" 6068 argparse: "npm:^2.0.1"
5091 bin: 6069 bin:
5092 js-yaml: bin/js-yaml.js 6070 js-yaml: bin/js-yaml.js
5093 checksum: 03ab64a1008a68bb534a223f855c1dd595c0fc6b2800517f555803ed6e96c1cd365e19088ae46a466329a7b77b1e7951589db76a6ea2d525374a4167f69ac776 6071 checksum: 184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f
5094 languageName: node 6072 languageName: node
5095 linkType: hard 6073 linkType: hard
5096 6074
@@ -5099,7 +6077,7 @@ __metadata:
5099 resolution: "jsesc@npm:2.5.2" 6077 resolution: "jsesc@npm:2.5.2"
5100 bin: 6078 bin:
5101 jsesc: bin/jsesc 6079 jsesc: bin/jsesc
5102 checksum: 145808bbe202187ed901a7c41d1ca88386fba41da2fc56f8e450ac07a240cc7fdb4828a6a7b7e4773931c0cee8eb938523215b3d2d2ab568ac4640d7abceaef6 6080 checksum: dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88
5103 languageName: node 6081 languageName: node
5104 linkType: hard 6082 linkType: hard
5105 6083
@@ -5108,42 +6086,42 @@ __metadata:
5108 resolution: "jsesc@npm:0.5.0" 6086 resolution: "jsesc@npm:0.5.0"
5109 bin: 6087 bin:
5110 jsesc: bin/jsesc 6088 jsesc: bin/jsesc
5111 checksum: cba3a1fba9401771cf3bad85c8e0e2c604cfdfd85d7b1a7a8ae84317777f76c4b02d6c52da86cb8a70307ca84c3aa40a214e77bf0d5549557826b04df6df2bdf 6089 checksum: f93792440ae1d80f091b65f8ceddf8e55c4bb7f1a09dee5dcbdb0db5612c55c0f6045625aa6b7e8edb2e0a4feabd80ee48616dbe2d37055573a84db3d24f96d9
5112 languageName: node 6090 languageName: node
5113 linkType: hard 6091 linkType: hard
5114 6092
5115"json-parse-even-better-errors@npm:^2.3.0": 6093"json-parse-even-better-errors@npm:^2.3.0":
5116 version: 2.3.1 6094 version: 2.3.1
5117 resolution: "json-parse-even-better-errors@npm:2.3.1" 6095 resolution: "json-parse-even-better-errors@npm:2.3.1"
5118 checksum: ba9ec77806c99530719c8c2a26aa426f421dccd6faafb4ee32f2d71dff25aefe4d150fba814eb58be8b82e765af5e7dc8e88d1c38c7227a1304f4d20a405a67a 6096 checksum: 140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3
5119 languageName: node 6097 languageName: node
5120 linkType: hard 6098 linkType: hard
5121 6099
5122"json-schema-traverse@npm:^0.4.1": 6100"json-schema-traverse@npm:^0.4.1":
5123 version: 0.4.1 6101 version: 0.4.1
5124 resolution: "json-schema-traverse@npm:0.4.1" 6102 resolution: "json-schema-traverse@npm:0.4.1"
5125 checksum: 4c9b10ebd277b894fa66f7130ffcf6b8c0d2c41754ce3784d82149695dbd928c15523aab230b8206c4be5b48127cafc0467760774673ba61045e1abb52e74de2 6103 checksum: 108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce
5126 languageName: node 6104 languageName: node
5127 linkType: hard 6105 linkType: hard
5128 6106
5129"json-schema-traverse@npm:^1.0.0": 6107"json-schema-traverse@npm:^1.0.0":
5130 version: 1.0.0 6108 version: 1.0.0
5131 resolution: "json-schema-traverse@npm:1.0.0" 6109 resolution: "json-schema-traverse@npm:1.0.0"
5132 checksum: 3da4fc677cfedd1745cce0c1acefebcf508c9cfa8d202ae394e38d31acbb398aea24da8e4959d5f9e44b12ebaa963bb4e4f7c25804e17484b3bfbc00519c58ca 6110 checksum: 71e30015d7f3d6dc1c316d6298047c8ef98a06d31ad064919976583eb61e1018a60a0067338f0f79cabc00d84af3fcc489bd48ce8a46ea165d9541ba17fb30c6
5133 languageName: node 6111 languageName: node
5134 linkType: hard 6112 linkType: hard
5135 6113
5136"json-schema@npm:^0.4.0": 6114"json-schema@npm:^0.4.0":
5137 version: 0.4.0 6115 version: 0.4.0
5138 resolution: "json-schema@npm:0.4.0" 6116 resolution: "json-schema@npm:0.4.0"
5139 checksum: 54562ace314c3b4441c8daf87eb45db2a454d19aa0fd402cdf4cda5806e444b9e03c79845a93d9c1bca19694386c40d87282c14749ca02915732a6315b3a54b6 6117 checksum: d4a637ec1d83544857c1c163232f3da46912e971d5bf054ba44fdb88f07d8d359a462b4aec46f2745efbc57053365608d88bc1d7b1729f7b4fc3369765639ed3
5140 languageName: node 6118 languageName: node
5141 linkType: hard 6119 linkType: hard
5142 6120
5143"json-stable-stringify-without-jsonify@npm:^1.0.1": 6121"json-stable-stringify-without-jsonify@npm:^1.0.1":
5144 version: 1.0.1 6122 version: 1.0.1
5145 resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" 6123 resolution: "json-stable-stringify-without-jsonify@npm:1.0.1"
5146 checksum: fcea02bf8b7e6067bec7e4019b1e4e15a2f1c8148ad9ea5f9fbc3098efee939f93f53f475f27a44f4b8996e9990c56b39bef6ff0bdbb4243e485084f619d5399 6124 checksum: cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5
5147 languageName: node 6125 languageName: node
5148 linkType: hard 6126 linkType: hard
5149 6127
@@ -5154,7 +6132,7 @@ __metadata:
5154 minimist: "npm:^1.2.0" 6132 minimist: "npm:^1.2.0"
5155 bin: 6133 bin:
5156 json5: lib/cli.js 6134 json5: lib/cli.js
5157 checksum: 26cc8c0cba94bd7faddd8aaad59e5270d552c04ea2a271f4c610d075f638d666c4168213062341c577597a2b973554262972ccb6637cd071d73595886133c5a0 6135 checksum: 9ee316bf21f000b00752e6c2a3b79ecf5324515a5c60ee88983a1910a45426b643a4f3461657586e8aeca87aaf96f0a519b0516d2ae527a6c3e7eed80f68717f
5158 languageName: node 6136 languageName: node
5159 linkType: hard 6137 linkType: hard
5160 6138
@@ -5163,7 +6141,7 @@ __metadata:
5163 resolution: "json5@npm:2.2.3" 6141 resolution: "json5@npm:2.2.3"
5164 bin: 6142 bin:
5165 json5: lib/cli.js 6143 json5: lib/cli.js
5166 checksum: e298f92c92197e956eb7a93304f74b5b80b4c3fe412f44a1f3d4c966e5ddf2e8ef2ac7ce0b0c40c78735bf2901c29257a653e1da684dae8e7835932e4904d6a0 6144 checksum: 5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c
5167 languageName: node 6145 languageName: node
5168 linkType: hard 6146 linkType: hard
5169 6147
@@ -5176,31 +6154,33 @@ __metadata:
5176 dependenciesMeta: 6154 dependenciesMeta:
5177 graceful-fs: 6155 graceful-fs:
5178 optional: true 6156 optional: true
5179 checksum: d1fe80d443f7b3257aef1ef918231c9cf8a57127f004f74232869dfa408188b6ccf9d8a6724f7dbf7a6797355969cacfe1f2a16779f4ec636999bfaa876c13b0 6157 checksum: 4f95b5e8a5622b1e9e8f33c96b7ef3158122f595998114d1e7f03985649ea99cb3cd99ce1ed1831ae94c8c8543ab45ebd044207612f31a56fd08462140e46865
5180 languageName: node 6158 languageName: node
5181 linkType: hard 6159 linkType: hard
5182 6160
5183"jsonpointer@npm:^5.0.0": 6161"jsonpointer@npm:^5.0.0":
5184 version: 5.0.1 6162 version: 5.0.1
5185 resolution: "jsonpointer@npm:5.0.1" 6163 resolution: "jsonpointer@npm:5.0.1"
5186 checksum: 37c9877fe1f2503a42261ee5eec5b119d80d32a3f8b20ff1c32a9bd95bf6b2f533928f41d71c9ce12a9c019c24306bea75cffe91bcbd52d6755e081d91f85d76 6164 checksum: 89929e58b400fcb96928c0504fcf4fc3f919d81e9543ceb055df125538470ee25290bb4984251e172e6ef8fcc55761eb998c118da763a82051ad89d4cb073fe7
5187 languageName: node 6165 languageName: node
5188 linkType: hard 6166 linkType: hard
5189 6167
5190"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3": 6168"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3":
5191 version: 3.3.3 6169 version: 3.3.5
5192 resolution: "jsx-ast-utils@npm:3.3.3" 6170 resolution: "jsx-ast-utils@npm:3.3.5"
5193 dependencies: 6171 dependencies:
5194 array-includes: "npm:^3.1.5" 6172 array-includes: "npm:^3.1.6"
5195 object.assign: "npm:^4.1.3" 6173 array.prototype.flat: "npm:^1.3.1"
5196 checksum: cb1820fa7f27b2d58a39a236ed5935b5456cc63cd55d134157977e852c50025a13aeaca8a35d1658200bdaf5b1424fc65eaaba5d1aae0f4aa11abf2be7b9dce5 6174 object.assign: "npm:^4.1.4"
6175 object.values: "npm:^1.1.6"
6176 checksum: a32679e9cb55469cb6d8bbc863f7d631b2c98b7fc7bf172629261751a6e7bc8da6ae374ddb74d5fbd8b06cf0eb4572287b259813d92b36e384024ed35e4c13e1
5197 languageName: node 6177 languageName: node
5198 linkType: hard 6178 linkType: hard
5199 6179
5200"language-subtag-registry@npm:~0.3.2": 6180"language-subtag-registry@npm:~0.3.2":
5201 version: 0.3.22 6181 version: 0.3.22
5202 resolution: "language-subtag-registry@npm:0.3.22" 6182 resolution: "language-subtag-registry@npm:0.3.22"
5203 checksum: 5d97350e417c3e06add9d30a7d39f40885578fa06210e9e07ca2eb527b580a16842bfc76ab1a71a7891d3f908a2928d335a8d8712f0049a183ebe2d4d60fee56 6183 checksum: d1e09971260a7cd3b9fdeb190d33af0b6e99c8697013537d9aaa15f7856d9d83aee128ba8078e219df0a7cf4b8dd18d1a0c188f6543b500d92a2689d2d114b70
5204 languageName: node 6184 languageName: node
5205 linkType: hard 6185 linkType: hard
5206 6186
@@ -5209,14 +6189,14 @@ __metadata:
5209 resolution: "language-tags@npm:1.0.5" 6189 resolution: "language-tags@npm:1.0.5"
5210 dependencies: 6190 dependencies:
5211 language-subtag-registry: "npm:~0.3.2" 6191 language-subtag-registry: "npm:~0.3.2"
5212 checksum: d44aee9111335d0fadfc2d5c4baf6f46eb099b28b2fd54c9cc7007820b4b132553e0c855e798cb53a777353ef22959895211b38ca72aef9ac503e352d093ee28 6192 checksum: 04215e821af9a8f1bc6c99ab5aa0a316c3fe1912ca3337eb28596316064bddd8edd22f2883d866069ebdf01b2002e504a760a336b2c728b6d30514e86744f76c
5213 languageName: node 6193 languageName: node
5214 linkType: hard 6194 linkType: hard
5215 6195
5216"leven@npm:^3.1.0": 6196"leven@npm:^3.1.0":
5217 version: 3.1.0 6197 version: 3.1.0
5218 resolution: "leven@npm:3.1.0" 6198 resolution: "leven@npm:3.1.0"
5219 checksum: 615bb49211514d023ee44b92f879c7021f7248712bea059804811efb326ca7567d3bf6b4813c2a73f707d0cec86491c9d7ebcb50db644d942cffdc72574a2e95 6199 checksum: cd778ba3fbab0f4d0500b7e87d1f6e1f041507c56fdcd47e8256a3012c98aaee371d4c15e0a76e0386107af2d42e2b7466160a2d80688aaa03e66e49949f42df
5220 languageName: node 6200 languageName: node
5221 linkType: hard 6201 linkType: hard
5222 6202
@@ -5226,14 +6206,14 @@ __metadata:
5226 dependencies: 6206 dependencies:
5227 prelude-ls: "npm:^1.2.1" 6207 prelude-ls: "npm:^1.2.1"
5228 type-check: "npm:~0.4.0" 6208 type-check: "npm:~0.4.0"
5229 checksum: b281df6770286ddce58d431441772b75ec04f03264af49532c330fdbe070795196538459754cb9e564e7759dbd79c2f88fab01bb3295b2a70249d1a777016cb4 6209 checksum: effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e
5230 languageName: node 6210 languageName: node
5231 linkType: hard 6211 linkType: hard
5232 6212
5233"lines-and-columns@npm:^1.1.6": 6213"lines-and-columns@npm:^1.1.6":
5234 version: 1.2.4 6214 version: 1.2.4
5235 resolution: "lines-and-columns@npm:1.2.4" 6215 resolution: "lines-and-columns@npm:1.2.4"
5236 checksum: c0807326f935ca3bbb725fe1a90d4a15e9b58939a2e75f5e85aa28e488620088b0f110bac2c384537e3c16cf64134afc67f39dd77f9249dcf7d056400d8c303b 6216 checksum: 3da6ee62d4cd9f03f5dc90b4df2540fb85b352081bee77fe4bbcd12c9000ead7f35e0a38b8d09a9bb99b13223446dd8689ff3c4959807620726d788701a83d2d
5237 languageName: node 6217 languageName: node
5238 linkType: hard 6218 linkType: hard
5239 6219
@@ -5242,56 +6222,56 @@ __metadata:
5242 resolution: "locate-path@npm:6.0.0" 6222 resolution: "locate-path@npm:6.0.0"
5243 dependencies: 6223 dependencies:
5244 p-locate: "npm:^5.0.0" 6224 p-locate: "npm:^5.0.0"
5245 checksum: 8a665300e1e248fe80a27db16616059dfb57d7d6cd14a9893f7b66eee097f0bdffeecdc80e8565f74b253efe6c93f46fe65f2af1513883845bcf38956d35667b 6225 checksum: d3972ab70dfe58ce620e64265f90162d247e87159b6126b01314dd67be43d50e96a50b517bce2d9452a79409c7614054c277b5232377de50416564a77ac7aad3
5246 languageName: node 6226 languageName: node
5247 linkType: hard 6227 linkType: hard
5248 6228
5249"lodash-es@npm:^4.17.21": 6229"lodash-es@npm:^4.17.21":
5250 version: 4.17.21 6230 version: 4.17.21
5251 resolution: "lodash-es@npm:4.17.21" 6231 resolution: "lodash-es@npm:4.17.21"
5252 checksum: d1c3ee94118daeeee47c630ab5f91e94cc4e41ebe2452d837edbe599e853eb2d4be7edf82b4fe62f9fc74f27a8ed7f82fdbd9d301d0acef88f00941db64c4843 6232 checksum: fb407355f7e6cd523a9383e76e6b455321f0f153a6c9625e21a8827d10c54c2a2341bd2ae8d034358b60e07325e1330c14c224ff582d04612a46a4f0479ff2f2
5253 languageName: node 6233 languageName: node
5254 linkType: hard 6234 linkType: hard
5255 6235
5256"lodash.debounce@npm:^4.0.8": 6236"lodash.debounce@npm:^4.0.8":
5257 version: 4.0.8 6237 version: 4.0.8
5258 resolution: "lodash.debounce@npm:4.0.8" 6238 resolution: "lodash.debounce@npm:4.0.8"
5259 checksum: 960a803d892fc09976e7b559c36407000c3beb136cf20e88ae6a694b5d7cf64e31dde516079140a945ba695b7d5e5699444d61fd13a70ff7de409bbae7604005 6239 checksum: 762998a63e095412b6099b8290903e0a8ddcb353ac6e2e0f2d7e7d03abd4275fe3c689d88960eb90b0dde4f177554d51a690f22a343932ecbc50a5d111849987
5260 languageName: node 6240 languageName: node
5261 linkType: hard 6241 linkType: hard
5262 6242
5263"lodash.merge@npm:^4.6.2": 6243"lodash.merge@npm:^4.6.2":
5264 version: 4.6.2 6244 version: 4.6.2
5265 resolution: "lodash.merge@npm:4.6.2" 6245 resolution: "lodash.merge@npm:4.6.2"
5266 checksum: aab58997bcad5ab91908498bbe8ce4b78e8e5025a944f9a8b6a1f11bd2afba4dae55c61dfdcefadadd6cd04efb0c998109e14c633f4aa1f8b4541e4d252c69ea 6246 checksum: 402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506
5267 languageName: node 6247 languageName: node
5268 linkType: hard 6248 linkType: hard
5269 6249
5270"lodash.sortby@npm:^4.7.0": 6250"lodash.sortby@npm:^4.7.0":
5271 version: 4.7.0 6251 version: 4.7.0
5272 resolution: "lodash.sortby@npm:4.7.0" 6252 resolution: "lodash.sortby@npm:4.7.0"
5273 checksum: 533eff6eecb504d3fdfe33e994bf89dd1ed377172b6b82b2690b60e0edd80befa5ad1a4089c2714c564c6f239406d40caac328e3daa16a33fa359263ec501a4e 6253 checksum: fc48fb54ff7669f33bb32997cab9460757ee99fafaf72400b261c3e10fde21538e47d8cfcbe6a25a31bcb5b7b727c27d52626386fc2de24eb059a6d64a89cdf5
5274 languageName: node 6254 languageName: node
5275 linkType: hard 6255 linkType: hard
5276 6256
5277"lodash@npm:^4.17.20": 6257"lodash@npm:^4.17.20, lodash@npm:^4.17.21":
5278 version: 4.17.21 6258 version: 4.17.21
5279 resolution: "lodash@npm:4.17.21" 6259 resolution: "lodash@npm:4.17.21"
5280 checksum: 3ac18e92108d68f88429fcddee609e42cf2b653583d9bac22308815a4cd6b185b89a0ad0d9b0c670c371d9d6b61571a98fee6b36e1db14e52766ca253ed9cba0 6260 checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c
5281 languageName: node 6261 languageName: node
5282 linkType: hard 6262 linkType: hard
5283 6263
5284"loglevel-plugin-prefix@npm:^0.8.4": 6264"loglevel-plugin-prefix@npm:^0.8.4":
5285 version: 0.8.4 6265 version: 0.8.4
5286 resolution: "loglevel-plugin-prefix@npm:0.8.4" 6266 resolution: "loglevel-plugin-prefix@npm:0.8.4"
5287 checksum: 92ceb5d7cce5486c94a0eea908be16120dc8d93320fd14afd14fff99f90ca86aff276dbc6cf7423039189b712ea8768759f1d9181cbd757502073c23f2b00a63 6267 checksum: 357524eec4c165ff823b5bbf72e8373ff529e5cb95c1f4b20749847bd5b5b16ab328d6d33d1a9019f1a2dc52e28fca5d595e52f2ee20e24986182a6f9552a9ec
5288 languageName: node 6268 languageName: node
5289 linkType: hard 6269 linkType: hard
5290 6270
5291"loglevel@npm:^1.8.1": 6271"loglevel@npm:^1.8.1":
5292 version: 1.8.1 6272 version: 1.8.1
5293 resolution: "loglevel@npm:1.8.1" 6273 resolution: "loglevel@npm:1.8.1"
5294 checksum: ccd8f46eee43ad65010b44228c2e38506c290b6f2c1a023c86b3dcda72804c4b34ae357f16b9bf645dee935975ec2e0ec0bb0a9ddc331d64de44e5d2abc8da5b 6274 checksum: 21069436c97448a1801b154a77d19ada212225c513d94f0471bfe299c981ffd4dc0d21e6211f9250bd6209ba9837bfe0d40d9295c673d73e3c543ec6b1c5d9ef
5295 languageName: node 6275 languageName: node
5296 linkType: hard 6276 linkType: hard
5297 6277
@@ -5302,7 +6282,7 @@ __metadata:
5302 js-tokens: "npm:^3.0.0 || ^4.0.0" 6282 js-tokens: "npm:^3.0.0 || ^4.0.0"
5303 bin: 6283 bin:
5304 loose-envify: cli.js 6284 loose-envify: cli.js
5305 checksum: 39c5fc44c6a8f7f8a92cccf174554fbb307477ef493760407920fdd4ed5f6cc1aec5b6a5ab3c3767ef79547b3e1aea09d8ca08d773232c662d910cfe473a0590 6285 checksum: 655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e
5306 languageName: node 6286 languageName: node
5307 linkType: hard 6287 linkType: hard
5308 6288
@@ -5311,7 +6291,7 @@ __metadata:
5311 resolution: "lower-case@npm:2.0.2" 6291 resolution: "lower-case@npm:2.0.2"
5312 dependencies: 6292 dependencies:
5313 tslib: "npm:^2.0.3" 6293 tslib: "npm:^2.0.3"
5314 checksum: 2da56ea650669ee9d2427ba349867da18b4cf0190be2fb2b0f8adaa28cffd27bbf4e39b41a619bf653906a584b84c7df606b7f727d3048a8056e4e419407b3e5 6294 checksum: 3d925e090315cf7dc1caa358e0477e186ffa23947740e4314a7429b6e62d72742e0bbe7536a5ae56d19d7618ce998aba05caca53c2902bd5742fdca5fc57fd7b
5315 languageName: node 6295 languageName: node
5316 linkType: hard 6296 linkType: hard
5317 6297
@@ -5320,7 +6300,7 @@ __metadata:
5320 resolution: "lru-cache@npm:5.1.1" 6300 resolution: "lru-cache@npm:5.1.1"
5321 dependencies: 6301 dependencies:
5322 yallist: "npm:^3.0.2" 6302 yallist: "npm:^3.0.2"
5323 checksum: 7e3274d0936ac64611d0053664b5c722f2b869c4962a007752251602020345f385885cfeabd0162aa45c7d2ee8a21f461d9d628db348f553c126126b170ad6d2 6303 checksum: 89b2ef2ef45f543011e38737b8a8622a2f8998cddf0e5437174ef8f1f70a8b9d14a918ab3e232cb3ba343b7abddffa667f0b59075b2b80e6b4d63c3de6127482
5324 languageName: node 6304 languageName: node
5325 linkType: hard 6305 linkType: hard
5326 6306
@@ -5329,21 +6309,21 @@ __metadata:
5329 resolution: "lru-cache@npm:6.0.0" 6309 resolution: "lru-cache@npm:6.0.0"
5330 dependencies: 6310 dependencies:
5331 yallist: "npm:^4.0.0" 6311 yallist: "npm:^4.0.0"
5332 checksum: b2d72088dd27df27189607554990b0fd31d3fbd4037df909ef66f48a14122baf8ffce7f33edc17e6543ea7cd71fa561136518355dde2ad57676fa0b2ea53b85f 6312 checksum: cb53e582785c48187d7a188d3379c181b5ca2a9c78d2bce3e7dee36f32761d1c42983da3fe12b55cb74e1779fa94cdc2e5367c028a9b35317184ede0c07a30a9
5333 languageName: node 6313 languageName: node
5334 linkType: hard 6314 linkType: hard
5335 6315
5336"lru-cache@npm:^7.7.1": 6316"lru-cache@npm:^7.7.1":
5337 version: 7.18.3 6317 version: 7.18.3
5338 resolution: "lru-cache@npm:7.18.3" 6318 resolution: "lru-cache@npm:7.18.3"
5339 checksum: 884c7cb51963cc45bc0d864c704d141c904c93db1bbc236be0eed759e35fc44b5e794a34b0666e193926e5a4320b66e787b1cf531f4f89ed8514a97156f07cb1 6319 checksum: b3a452b491433db885beed95041eb104c157ef7794b9c9b4d647be503be91769d11206bb573849a16b4cc0d03cbd15ffd22df7960997788b74c1d399ac7a4fed
5340 languageName: node 6320 languageName: node
5341 linkType: hard 6321 linkType: hard
5342 6322
5343"lru-cache@npm:^9.1.1": 6323"lru-cache@npm:^9.1.1 || ^10.0.0":
5344 version: 9.1.2 6324 version: 10.0.1
5345 resolution: "lru-cache@npm:9.1.2" 6325 resolution: "lru-cache@npm:10.0.1"
5346 checksum: 95e6da12da11dd05404636c5d8c7f7a3e682bb7d2acb002738f9f6de941eca1e7229aa45a9b4a8375ab55f0ef7a1c34a3b002b066f85c4bc00634ee68e0f978e 6326 checksum: 982dabfb227b9a2daf56d712ae0e72e01115a28c0a2068cd71277bca04568f3417bbf741c6c7941abc5c620fd8059e34f15607f90ebccbfa0a17533322d27a8e
5347 languageName: node 6327 languageName: node
5348 linkType: hard 6328 linkType: hard
5349 6329
@@ -5352,7 +6332,7 @@ __metadata:
5352 resolution: "magic-string@npm:0.25.9" 6332 resolution: "magic-string@npm:0.25.9"
5353 dependencies: 6333 dependencies:
5354 sourcemap-codec: "npm:^1.4.8" 6334 sourcemap-codec: "npm:^1.4.8"
5355 checksum: 8a2cb8470617fbe2fa9b924b4b1de9322686f035f8b506daa9bbe0dc5d1ba182da9e3b53fa9d3a932ab1b003b05ee81a49f9b9ea169f3c790a979f32222af5c2 6335 checksum: 37f5e01a7e8b19a072091f0b45ff127cda676232d373ce2c551a162dd4053c575ec048b9cbb4587a1f03adb6c5d0fd0dd49e8ab070cd2c83a4992b2182d9cb56
5356 languageName: node 6336 languageName: node
5357 linkType: hard 6337 linkType: hard
5358 6338
@@ -5375,21 +6355,21 @@ __metadata:
5375 promise-retry: "npm:^2.0.1" 6355 promise-retry: "npm:^2.0.1"
5376 socks-proxy-agent: "npm:^7.0.0" 6356 socks-proxy-agent: "npm:^7.0.0"
5377 ssri: "npm:^10.0.0" 6357 ssri: "npm:^10.0.0"
5378 checksum: 26053f51534d0886d8f0c1f4312d442f2bd6d2955a7fd12aa0679fc4ed4734ca2e0168eec517d418b73cedd01d107f86749a340a7386ef8b3ef0cacf018995af 6358 checksum: c161bde51dbc03382f9fac091734526a64dd6878205db6c338f70d2133df797b5b5166bff3091cf7d4785869d4b21e99a58139c1790c2fb1b5eec00f528f5f0b
5379 languageName: node 6359 languageName: node
5380 linkType: hard 6360 linkType: hard
5381 6361
5382"merge-stream@npm:^2.0.0": 6362"merge-stream@npm:^2.0.0":
5383 version: 2.0.0 6363 version: 2.0.0
5384 resolution: "merge-stream@npm:2.0.0" 6364 resolution: "merge-stream@npm:2.0.0"
5385 checksum: 39a20c6f74e424ffb406cba0f4907c9ce06a85c84fb42a5628c6a39cd56fb3e70481b6f4d3412cf502cc3416c6e14d8d9ae6b2a4d461e56879350741220bd1e9 6365 checksum: 867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5
5386 languageName: node 6366 languageName: node
5387 linkType: hard 6367 linkType: hard
5388 6368
5389"merge2@npm:^1.3.0, merge2@npm:^1.4.1": 6369"merge2@npm:^1.3.0, merge2@npm:^1.4.1":
5390 version: 1.4.1 6370 version: 1.4.1
5391 resolution: "merge2@npm:1.4.1" 6371 resolution: "merge2@npm:1.4.1"
5392 checksum: d58d7c31e24ccb93509def2af306eca9a55ad8b8862a26ea7deda3c9338e5d33365f57197ad37af68c319e5e2a1faf089e5d05894d0dc29ff07025b30b8ff8b0 6372 checksum: 254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb
5393 languageName: node 6373 languageName: node
5394 linkType: hard 6374 linkType: hard
5395 6375
@@ -5399,7 +6379,7 @@ __metadata:
5399 dependencies: 6379 dependencies:
5400 braces: "npm:^3.0.2" 6380 braces: "npm:^3.0.2"
5401 picomatch: "npm:^2.3.1" 6381 picomatch: "npm:^2.3.1"
5402 checksum: 260305ba8cb1f073a39bbaa31edc93f7587399a094417541dc771402f83c78819ed76743c810c9fcf1c449f09bfb4de263dad8507d532e4e86063a87158a2ad6 6382 checksum: 3d6505b20f9fa804af5d8c596cb1c5e475b9b0cd05f652c5b56141cf941bd72adaeb7a436fda344235cef93a7f29b7472efc779fcdb83b478eab0867b95cdeff
5403 languageName: node 6383 languageName: node
5404 linkType: hard 6384 linkType: hard
5405 6385
@@ -5408,7 +6388,7 @@ __metadata:
5408 resolution: "minimatch@npm:3.1.2" 6388 resolution: "minimatch@npm:3.1.2"
5409 dependencies: 6389 dependencies:
5410 brace-expansion: "npm:^1.1.7" 6390 brace-expansion: "npm:^1.1.7"
5411 checksum: 97f5615ee8f7c0019277dadef7b2b81e5c60d369cb3155cbfb9da72688aef2edb652b105353ff08a6575ae95a6189d1c09a0829b9c254f60849148457c4d8a66 6391 checksum: 0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311
5412 languageName: node 6392 languageName: node
5413 linkType: hard 6393 linkType: hard
5414 6394
@@ -5417,23 +6397,23 @@ __metadata:
5417 resolution: "minimatch@npm:5.1.6" 6397 resolution: "minimatch@npm:5.1.6"
5418 dependencies: 6398 dependencies:
5419 brace-expansion: "npm:^2.0.1" 6399 brace-expansion: "npm:^2.0.1"
5420 checksum: 0c0446ede579b1736bfea4efb288c2dea17ce80fd0339d00547625ed97a60ed403c7c2fb141211119937a811bc635b3f0f44debeb9d7870b3f58cf0fe78ddccc 6400 checksum: 3defdfd230914f22a8da203747c42ee3c405c39d4d37ffda284dac5e45b7e1f6c49aa8be606509002898e73091ff2a3bbfc59c2c6c71d4660609f63aa92f98e3
5421 languageName: node 6401 languageName: node
5422 linkType: hard 6402 linkType: hard
5423 6403
5424"minimatch@npm:^9.0.1": 6404"minimatch@npm:^9.0.1":
5425 version: 9.0.1 6405 version: 9.0.3
5426 resolution: "minimatch@npm:9.0.1" 6406 resolution: "minimatch@npm:9.0.3"
5427 dependencies: 6407 dependencies:
5428 brace-expansion: "npm:^2.0.1" 6408 brace-expansion: "npm:^2.0.1"
5429 checksum: 6648745fd9fc8d5870d59d4fde5defd9d4cb3d44cbb6831e97e103c43f1d9bf5fcc24cea54e9e3bf09eac7e002cce200cc295e30c84180198970a0bed369f037 6409 checksum: 85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac
5430 languageName: node 6410 languageName: node
5431 linkType: hard 6411 linkType: hard
5432 6412
5433"minimist@npm:^1.2.0, minimist@npm:^1.2.6": 6413"minimist@npm:^1.2.0, minimist@npm:^1.2.6":
5434 version: 1.2.8 6414 version: 1.2.8
5435 resolution: "minimist@npm:1.2.8" 6415 resolution: "minimist@npm:1.2.8"
5436 checksum: 8598f846f2b7546b22b01ce486df27da216a302367afe17f2a032da12fcb8d33bfbf2c523051230864abf0b806748bd60d4cd0863fae35fe104da1ff6194a185 6416 checksum: 19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6
5437 languageName: node 6417 languageName: node
5438 linkType: hard 6418 linkType: hard
5439 6419
@@ -5442,22 +6422,22 @@ __metadata:
5442 resolution: "minipass-collect@npm:1.0.2" 6422 resolution: "minipass-collect@npm:1.0.2"
5443 dependencies: 6423 dependencies:
5444 minipass: "npm:^3.0.0" 6424 minipass: "npm:^3.0.0"
5445 checksum: 4d608e8a292ec87dd1a7d881c314effe341a7d7f52eb416270a243f8ea7f4e23b40b2785f5ce9c6c7841e1453841019efd5db05b427288b897c96f62afbc1f17 6425 checksum: 8f82bd1f3095b24f53a991b04b67f4c710c894e518b813f0864a31de5570441a509be1ca17e0bb92b047591a8fdbeb886f502764fefb00d2f144f4011791e898
5446 languageName: node 6426 languageName: node
5447 linkType: hard 6427 linkType: hard
5448 6428
5449"minipass-fetch@npm:^3.0.0": 6429"minipass-fetch@npm:^3.0.0":
5450 version: 3.0.3 6430 version: 3.0.4
5451 resolution: "minipass-fetch@npm:3.0.3" 6431 resolution: "minipass-fetch@npm:3.0.4"
5452 dependencies: 6432 dependencies:
5453 encoding: "npm:^0.1.13" 6433 encoding: "npm:^0.1.13"
5454 minipass: "npm:^5.0.0" 6434 minipass: "npm:^7.0.3"
5455 minipass-sized: "npm:^1.0.3" 6435 minipass-sized: "npm:^1.0.3"
5456 minizlib: "npm:^2.1.2" 6436 minizlib: "npm:^2.1.2"
5457 dependenciesMeta: 6437 dependenciesMeta:
5458 encoding: 6438 encoding:
5459 optional: true 6439 optional: true
5460 checksum: 26c3d698b5869a2d5d7537a52b49bd2be5696f9e11b9eb982b2c5145403cdb81c1f150f59251ef1226e25e4d5fc70998ea251915535eb21854a692affa79968c 6440 checksum: 1b63c1f3313e88eeac4689f1b71c9f086598db9a189400e3ee960c32ed89e06737fa23976c9305c2d57464fb3fcdc12749d3378805c9d6176f5569b0d0ee8a75
5461 languageName: node 6441 languageName: node
5462 linkType: hard 6442 linkType: hard
5463 6443
@@ -5466,7 +6446,7 @@ __metadata:
5466 resolution: "minipass-flush@npm:1.0.5" 6446 resolution: "minipass-flush@npm:1.0.5"
5467 dependencies: 6447 dependencies:
5468 minipass: "npm:^3.0.0" 6448 minipass: "npm:^3.0.0"
5469 checksum: 6e851bd0640e5406633b0aa77e889d4175eb3d12b55173e999e6dd1fc06ed13982277e012d6f41dc28a2167278d9480697893f6cd286c46c10fdfd735e05d45d 6449 checksum: 2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd
5470 languageName: node 6450 languageName: node
5471 linkType: hard 6451 linkType: hard
5472 6452
@@ -5475,7 +6455,7 @@ __metadata:
5475 resolution: "minipass-pipeline@npm:1.2.4" 6455 resolution: "minipass-pipeline@npm:1.2.4"
5476 dependencies: 6456 dependencies:
5477 minipass: "npm:^3.0.0" 6457 minipass: "npm:^3.0.0"
5478 checksum: 07dd09bf3c6f546ef407e7a36bca4cd2235d54695c083dc5815052e36cbdd46e55a7c0dae2801983c73257adc7aa613e375c8350587bc50a6a10e1a6b55f9965 6458 checksum: cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2
5479 languageName: node 6459 languageName: node
5480 linkType: hard 6460 linkType: hard
5481 6461
@@ -5484,7 +6464,7 @@ __metadata:
5484 resolution: "minipass-sized@npm:1.0.3" 6464 resolution: "minipass-sized@npm:1.0.3"
5485 dependencies: 6465 dependencies:
5486 minipass: "npm:^3.0.0" 6466 minipass: "npm:^3.0.0"
5487 checksum: 54591ac7e54571e91df602e3c1018f4048ee12a3407dfab8140e0b03cb149c16ae67e94d36682c0869a683b8443470e354dba123ea83914c87ff22d8d8628fea 6467 checksum: 298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb
5488 languageName: node 6468 languageName: node
5489 linkType: hard 6469 linkType: hard
5490 6470
@@ -5493,21 +6473,21 @@ __metadata:
5493 resolution: "minipass@npm:3.3.6" 6473 resolution: "minipass@npm:3.3.6"
5494 dependencies: 6474 dependencies:
5495 yallist: "npm:^4.0.0" 6475 yallist: "npm:^4.0.0"
5496 checksum: 9704cf677a05e82174c1a0765260f877ce3b4f09858b6c80a07a38a41ff661a2913a482f82faa73b89fc23ee3bcc4cff04d7e8ce6951de4fc2c2108d360b6f1f 6476 checksum: a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c
5497 languageName: node 6477 languageName: node
5498 linkType: hard 6478 linkType: hard
5499 6479
5500"minipass@npm:^5.0.0": 6480"minipass@npm:^5.0.0":
5501 version: 5.0.0 6481 version: 5.0.0
5502 resolution: "minipass@npm:5.0.0" 6482 resolution: "minipass@npm:5.0.0"
5503 checksum: dac2e1960990ca7c288834e7311e029828d9ae4c90fdabae95a3ea269592871feaa755a1ef9241d487e6fe59d86a43e1d8bac41c47f13c3c0add0799ab500a0b 6483 checksum: a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462
5504 languageName: node 6484 languageName: node
5505 linkType: hard 6485 linkType: hard
5506 6486
5507"minipass@npm:^5.0.0 || ^6.0.2": 6487"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.3":
5508 version: 6.0.2 6488 version: 7.0.3
5509 resolution: "minipass@npm:6.0.2" 6489 resolution: "minipass@npm:7.0.3"
5510 checksum: 9d8e7a2dc7dd240f1c2b4255b75ffadb7f296ab917d5289978869436333866a05b5128760847bd6b772ee7f0d78cfe775489669a4ba728f1de0f194ca14fe829 6490 checksum: c85426bce6310368218aad1f20b8f242180b6c2058209c78840959d6fff8a4738076a3224c3a6b651080f95684d559be1bdb084939bc40011c653ec4552cf06e
5511 languageName: node 6491 languageName: node
5512 linkType: hard 6492 linkType: hard
5513 6493
@@ -5517,7 +6497,7 @@ __metadata:
5517 dependencies: 6497 dependencies:
5518 minipass: "npm:^3.0.0" 6498 minipass: "npm:^3.0.0"
5519 yallist: "npm:^4.0.0" 6499 yallist: "npm:^4.0.0"
5520 checksum: c0071edb242d6808652840614193316e82d012b79ff1997352de3df1c19b7580d3d4790c462c8506b1f4225f08162ebba88ebceb1529d168304b06b23757e88d 6500 checksum: 64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78
5521 languageName: node 6501 languageName: node
5522 linkType: hard 6502 linkType: hard
5523 6503
@@ -5526,43 +6506,45 @@ __metadata:
5526 resolution: "mkdirp@npm:1.0.4" 6506 resolution: "mkdirp@npm:1.0.4"
5527 bin: 6507 bin:
5528 mkdirp: bin/cmd.js 6508 mkdirp: bin/cmd.js
5529 checksum: 123361119829ab8115234f36ed8ef8f697b0f6f83ec9f9bc8f76da587487976d74bc874ffa892e7a66df607fa8f2cc758eed8db225e9cd3a84846350209e53db 6509 checksum: 46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf
5530 languageName: node 6510 languageName: node
5531 linkType: hard 6511 linkType: hard
5532 6512
5533"mobx-react-lite@npm:^3.4.3": 6513"mobx-react-lite@npm:^4.0.4":
5534 version: 3.4.3 6514 version: 4.0.4
5535 resolution: "mobx-react-lite@npm:3.4.3" 6515 resolution: "mobx-react-lite@npm:4.0.4"
6516 dependencies:
6517 use-sync-external-store: "npm:^1.2.0"
5536 peerDependencies: 6518 peerDependencies:
5537 mobx: ^6.1.0 6519 mobx: ^6.9.0
5538 react: ^16.8.0 || ^17 || ^18 6520 react: ^16.8.0 || ^17 || ^18
5539 peerDependenciesMeta: 6521 peerDependenciesMeta:
5540 react-dom: 6522 react-dom:
5541 optional: true 6523 optional: true
5542 react-native: 6524 react-native:
5543 optional: true 6525 optional: true
5544 checksum: d7291f504c95e4f83ffca732698c58ec1acee0fc882ffabade5ac29d2f04ff44fc5a027dd7787ebd5ca3be795cf19c5b43b715948d972b685adf89d8826ec1f6 6526 checksum: e661e75b4e15e7cbe62754e44d943b85e30f2a8e253b7bd0458f25289ec1852d74ea68ec16bc1263c071678f3369d7a16a7c916ca00a43e4f31a5f7ef108faee
5545 languageName: node 6527 languageName: node
5546 linkType: hard 6528 linkType: hard
5547 6529
5548"mobx@npm:^6.9.0": 6530"mobx@npm:^6.10.2":
5549 version: 6.9.0 6531 version: 6.10.2
5550 resolution: "mobx@npm:6.9.0" 6532 resolution: "mobx@npm:6.10.2"
5551 checksum: 8e4899424940d3e0e46621ad003c4f629d981fc72873fe3cb2cd01e4e0359895a0ee9c78aa975981dec7e69977dd463b6f8c8c30303bb1169e3d42bec759a32f 6533 checksum: c874e3531047dcd1c0ffa7c118ecab2e1abebd924e3cf361bcfce4304e75529d8c0143b8b72e35e4592eed417b3186b755e56f4e03983461ba1816c1d47499e3
5552 languageName: node 6534 languageName: node
5553 linkType: hard 6535 linkType: hard
5554 6536
5555"ms@npm:2.1.2": 6537"ms@npm:2.1.2":
5556 version: 2.1.2 6538 version: 2.1.2
5557 resolution: "ms@npm:2.1.2" 6539 resolution: "ms@npm:2.1.2"
5558 checksum: 3f46af60a08158f1c77746c06c2f6c7aba7feddafd41335f9baa2d7e0741d7539774aa7d5d1661a7f2b7eed55a7063771297eea016051924dbb04d4c2bf40bcb 6540 checksum: a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc
5559 languageName: node 6541 languageName: node
5560 linkType: hard 6542 linkType: hard
5561 6543
5562"ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.3": 6544"ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.3":
5563 version: 2.1.3 6545 version: 2.1.3
5564 resolution: "ms@npm:2.1.3" 6546 resolution: "ms@npm:2.1.3"
5565 checksum: 78c12f6b473a022ebacc393fc14b76fe40b8feda7218124b86c4684e440e10377a063bec1d3902df1f74714f02b74b36ad7d3a6de9e2fbffa26fc29e5ce018fc 6547 checksum: d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48
5566 languageName: node 6548 languageName: node
5567 linkType: hard 6549 linkType: hard
5568 6550
@@ -5571,7 +6553,7 @@ __metadata:
5571 resolution: "nanoid@npm:3.3.6" 6553 resolution: "nanoid@npm:3.3.6"
5572 bin: 6554 bin:
5573 nanoid: bin/nanoid.cjs 6555 nanoid: bin/nanoid.cjs
5574 checksum: c6f3fad3b9132b17f72f9ca018ff12caf5a9fd474d08881156deffe7c77cc76220e49610232e570e2a33e3aa941214c08634762390a87b1fb9816d6108aa9e64 6556 checksum: 606b355960d0fcbe3d27924c4c52ef7d47d3b57208808ece73279420d91469b01ec1dce10fae512b6d4a8c5a5432b352b228336a8b2202a6ea68e67fa348e2ee
5575 languageName: node 6557 languageName: node
5576 linkType: hard 6558 linkType: hard
5577 6559
@@ -5580,28 +6562,21 @@ __metadata:
5580 resolution: "nanoid@npm:4.0.2" 6562 resolution: "nanoid@npm:4.0.2"
5581 bin: 6563 bin:
5582 nanoid: bin/nanoid.js 6564 nanoid: bin/nanoid.js
5583 checksum: 0e28bade6b10396bc0936980c7569e9710341b3dd8775bcd0645b7d23f59ff64e59c4413f48836bc336711ef1cc4f61f6453946a3bf69c4c235fab9d221f9216 6565 checksum: 3fec62f422bc4727918eda0e7aa43e9cbb2e759be72813a0587b9dac99727d3c7ad972efce7f4f1d4cb5c7c554136a1ec3b1043d1d91d28d818d6acbe98200e5
5584 languageName: node
5585 linkType: hard
5586
5587"natural-compare-lite@npm:^1.4.0":
5588 version: 1.4.0
5589 resolution: "natural-compare-lite@npm:1.4.0"
5590 checksum: e5544056864e990c8fb4fe8ca91d01f8977586969d89adccd2ccea71fea468471b953088021fc90031800410a5042576594dc4005bf02db1794ee4ff0befc07c
5591 languageName: node 6566 languageName: node
5592 linkType: hard 6567 linkType: hard
5593 6568
5594"natural-compare@npm:^1.4.0": 6569"natural-compare@npm:^1.4.0":
5595 version: 1.4.0 6570 version: 1.4.0
5596 resolution: "natural-compare@npm:1.4.0" 6571 resolution: "natural-compare@npm:1.4.0"
5597 checksum: cf6f4ccd700fbeaae533f0821e4de8582e340f9b0324f1e6d2486484e44a64f95acf7c7e5ef274f963934d5b74c3716c8ae58e367e112effae95d8d021158bff 6572 checksum: f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447
5598 languageName: node 6573 languageName: node
5599 linkType: hard 6574 linkType: hard
5600 6575
5601"negotiator@npm:^0.6.3": 6576"negotiator@npm:^0.6.3":
5602 version: 0.6.3 6577 version: 0.6.3
5603 resolution: "negotiator@npm:0.6.3" 6578 resolution: "negotiator@npm:0.6.3"
5604 checksum: d8e3b42d99638b1f363ce114c98e6906ade395c230058e50644417bd398b01381133dbca4bc49f30f6b1c93254e4b5a2d50cc47adcdabf2a8476b6f16311ad5d 6579 checksum: 3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2
5605 languageName: node 6580 languageName: node
5606 linkType: hard 6581 linkType: hard
5607 6582
@@ -5611,7 +6586,7 @@ __metadata:
5611 dependencies: 6586 dependencies:
5612 lower-case: "npm:^2.0.2" 6587 lower-case: "npm:^2.0.2"
5613 tslib: "npm:^2.0.3" 6588 tslib: "npm:^2.0.3"
5614 checksum: 862a2115a3eb27b2293be320faf1408cb0ee75a1da41a463463f53bfeb34f20c89805279fc2c6123b79c3d366f9e445cfcb8e0582611e2bd6712fa8edfaabbda 6589 checksum: 8ef545f0b3f8677c848f86ecbd42ca0ff3cd9dd71c158527b344c69ba14710d816d8489c746b6ca225e7b615108938a0bda0a54706f8c255933703ac1cf8e703
5615 languageName: node 6590 languageName: node
5616 linkType: hard 6591 linkType: hard
5617 6592
@@ -5632,14 +6607,14 @@ __metadata:
5632 which: "npm:^2.0.2" 6607 which: "npm:^2.0.2"
5633 bin: 6608 bin:
5634 node-gyp: bin/node-gyp.js 6609 node-gyp: bin/node-gyp.js
5635 checksum: b180de9e7c1d4c63355d3883b30c03462e5bcb8c810a1ee41d3ef2a3fe2d0ef0244acdbebf9d30a4abe865cfea67b4665e483de79d8249114dbdea454d5263a2 6610 checksum: e8dfbe2b02f23d056f69e01c409381963e92c71cafba6c9cfbf63b038f65ca19ab8183bb6891d080e59c4eb2cc425fc736f42e90afc0f0030ecd97bfc64fb7ad
5636 languageName: node 6611 languageName: node
5637 linkType: hard 6612 linkType: hard
5638 6613
5639"node-releases@npm:^2.0.12": 6614"node-releases@npm:^2.0.13":
5640 version: 2.0.12 6615 version: 2.0.13
5641 resolution: "node-releases@npm:2.0.12" 6616 resolution: "node-releases@npm:2.0.13"
5642 checksum: ae9ed0c2edca1127a0437a55e4467d6f32d496e8674bafdd1ffe42c3b90482727b178f37793a7041cc3287a42c624ada7a6a056857558134ba6b480ad9bc84db 6617 checksum: 2fb44bf70fc949d27f3a48a7fd1a9d1d603ddad4ccd091f26b3fb8b1da976605d919330d7388ccd55ca2ade0dc8b2e12841ba19ef249c8bb29bf82532d401af7
5643 languageName: node 6618 languageName: node
5644 linkType: hard 6619 linkType: hard
5645 6620
@@ -5650,14 +6625,14 @@ __metadata:
5650 abbrev: "npm:^1.0.0" 6625 abbrev: "npm:^1.0.0"
5651 bin: 6626 bin:
5652 nopt: bin/nopt.js 6627 nopt: bin/nopt.js
5653 checksum: 6ae5c083c5b205d0850f3b00c093cb0b1d4fb28fb69c68c3f933048e666695b1f218db6a4a7f61a4bae2f127268f526a7f2764223208e4dd527c51c56c49a5c7 6628 checksum: 837b52c330df16fcaad816b1f54fec6b2854ab1aa771d935c1603fbcf9b023bb073f1466b1b67f48ea4dce127ae675b85b9d9355700e9b109de39db490919786
5654 languageName: node 6629 languageName: node
5655 linkType: hard 6630 linkType: hard
5656 6631
5657"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": 6632"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0":
5658 version: 3.0.0 6633 version: 3.0.0
5659 resolution: "normalize-path@npm:3.0.0" 6634 resolution: "normalize-path@npm:3.0.0"
5660 checksum: 66de83885051c8a7266566cb175281ec583e3d66b5054c744b46a0eebc4eaac1e1d74c640aaf72144086a9661aa60e89ac0b5c92eb76608e5b8a5056dbcf9e27 6635 checksum: e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046
5661 languageName: node 6636 languageName: node
5662 linkType: hard 6637 linkType: hard
5663 6638
@@ -5670,7 +6645,7 @@ __metadata:
5670 peerDependencies: 6645 peerDependencies:
5671 react: ^16.8.0 || ^17.0.0 || ^18.0.0 6646 react: ^16.8.0 || ^17.0.0 || ^18.0.0
5672 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 6647 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
5673 checksum: 2b9f69de8544089501a7b762ca64483eb93b95b1bf4448bc0b2576c9b1aaa44e7f2ea671220a11fb818f2826fe7bb80271b76b3735f7608fef8643394676fc09 6648 checksum: dd5bd492dbaf8d07a1f45a53ae195c5d481bc7136d73a756eb076534d315216a3cd2f4628263be55ad21d8bfed6ec546e5063584ffcc2798fb2aac56e5ccf0cf
5674 languageName: node 6649 languageName: node
5675 linkType: hard 6650 linkType: hard
5676 6651
@@ -5682,32 +6657,42 @@ __metadata:
5682 console-control-strings: "npm:^1.1.0" 6657 console-control-strings: "npm:^1.1.0"
5683 gauge: "npm:^4.0.3" 6658 gauge: "npm:^4.0.3"
5684 set-blocking: "npm:^2.0.0" 6659 set-blocking: "npm:^2.0.0"
5685 checksum: c04307b2991f128df6f3bb71c36fa56a65397f56f02a565ed269786ecd5609818e6cae36de3371555e52fdf049a5649a3591ac3bb432a2a0146d67093c4be93c 6660 checksum: 0cacedfbc2f6139c746d9cd4a85f62718435ad0ca4a2d6459cd331dd33ae58206e91a0742c1558634efcde3f33f8e8e7fd3adf1bfe7978310cf00bd55cccf890
5686 languageName: node 6661 languageName: node
5687 linkType: hard 6662 linkType: hard
5688 6663
5689"object-assign@npm:^4.1.1": 6664"object-assign@npm:^4.1.1":
5690 version: 4.1.1 6665 version: 4.1.1
5691 resolution: "object-assign@npm:4.1.1" 6666 resolution: "object-assign@npm:4.1.1"
5692 checksum: f5cd1f2f1e82e12207e4f2377d9d7d90fbc0d9822a6afa717a6dcab6930d8925e1ebbbb25df770c31ff11335ee423459ba65ffa2e53999926c328b806b4d73d6 6667 checksum: 1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414
5693 languageName: node 6668 languageName: node
5694 linkType: hard 6669 linkType: hard
5695 6670
5696"object-inspect@npm:^1.12.3, object-inspect@npm:^1.9.0": 6671"object-inspect@npm:^1.12.3, object-inspect@npm:^1.9.0":
5697 version: 1.12.3 6672 version: 1.12.3
5698 resolution: "object-inspect@npm:1.12.3" 6673 resolution: "object-inspect@npm:1.12.3"
5699 checksum: 052c374ab0a4c85201480374c1039dddac0aaa8ef0fcbe1b04026f4c832c5632db6cb63617d6403b2b9dca08d4302d781aeb6c4d0260de4a84118ecaf1b5ebda 6674 checksum: 752bb5f4dc595e214157ea8f442adb77bdb850ace762b078d151d8b6486331ab12364997a89ee6509be1023b15adf2b3774437a7105f8a5043dfda11ed622411
6675 languageName: node
6676 linkType: hard
6677
6678"object-is@npm:^1.0.1":
6679 version: 1.1.5
6680 resolution: "object-is@npm:1.1.5"
6681 dependencies:
6682 call-bind: "npm:^1.0.2"
6683 define-properties: "npm:^1.1.3"
6684 checksum: 8c263fb03fc28f1ffb54b44b9147235c5e233dc1ca23768e7d2569740b5d860154d7cc29a30220fe28ed6d8008e2422aefdebfe987c103e1c5d190cf02d9d886
5700 languageName: node 6685 languageName: node
5701 linkType: hard 6686 linkType: hard
5702 6687
5703"object-keys@npm:^1.1.1": 6688"object-keys@npm:^1.1.1":
5704 version: 1.1.1 6689 version: 1.1.1
5705 resolution: "object-keys@npm:1.1.1" 6690 resolution: "object-keys@npm:1.1.1"
5706 checksum: 23343006d68702a85c299dafd4fc4205dbf729561a7d0acc1a75f6211636fcc1bbbdf26f0740119c43a7a98463e56b8afb74cbb4670509452007f5bc2f64cc36 6691 checksum: b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d
5707 languageName: node 6692 languageName: node
5708 linkType: hard 6693 linkType: hard
5709 6694
5710"object.assign@npm:^4.1.0, object.assign@npm:^4.1.2, object.assign@npm:^4.1.3, object.assign@npm:^4.1.4": 6695"object.assign@npm:^4.1.0, object.assign@npm:^4.1.2, object.assign@npm:^4.1.4":
5711 version: 4.1.4 6696 version: 4.1.4
5712 resolution: "object.assign@npm:4.1.4" 6697 resolution: "object.assign@npm:4.1.4"
5713 dependencies: 6698 dependencies:
@@ -5715,7 +6700,7 @@ __metadata:
5715 define-properties: "npm:^1.1.4" 6700 define-properties: "npm:^1.1.4"
5716 has-symbols: "npm:^1.0.3" 6701 has-symbols: "npm:^1.0.3"
5717 object-keys: "npm:^1.1.1" 6702 object-keys: "npm:^1.1.1"
5718 checksum: d1b1bcf947a523140f1f5aa91fcdb9b8fadf6a309e8274bec5e5cfbf897974ead2d0782ac9a2e83ebf59f0ee3994be5cfb1d1483a19e528f472993b2d026a1de 6703 checksum: 2f286118c023e557757620e647b02e7c88d3d417e0c568fca0820de8ec9cca68928304854d5b03e99763eddad6e78a6716e2930f7e6372e4b9b843f3fd3056f3
5719 languageName: node 6704 languageName: node
5720 linkType: hard 6705 linkType: hard
5721 6706
@@ -5726,7 +6711,7 @@ __metadata:
5726 call-bind: "npm:^1.0.2" 6711 call-bind: "npm:^1.0.2"
5727 define-properties: "npm:^1.1.4" 6712 define-properties: "npm:^1.1.4"
5728 es-abstract: "npm:^1.20.4" 6713 es-abstract: "npm:^1.20.4"
5729 checksum: 96acb5488114ab252b78af28402653be6040fb497cfdde0444c2e06a3631af216970dc693eab1ce91651d108354c1671065bf350d1c1291a951bf772d1727230 6714 checksum: 8782c71db3a068ccbae9e0541e6b4ac2c25dc67c63f97b7e6ad3c88271d7820197e7398e37747f96542ed47c27f0b81148cdf14c42df15dc22f64818ae7bb5bf
5730 languageName: node 6715 languageName: node
5731 linkType: hard 6716 linkType: hard
5732 6717
@@ -5737,7 +6722,19 @@ __metadata:
5737 call-bind: "npm:^1.0.2" 6722 call-bind: "npm:^1.0.2"
5738 define-properties: "npm:^1.1.4" 6723 define-properties: "npm:^1.1.4"
5739 es-abstract: "npm:^1.20.4" 6724 es-abstract: "npm:^1.20.4"
5740 checksum: 35f23acb19155a0bc3d8436957aa24f1233492ccff41ed02507876b93c836e1981971e4853478a2e23bdcd140e9ade4cca36d963569b7ae31275ce515fc3a9e9 6725 checksum: db6759ea68131cbdb70b1152f9984b49db03e81de4f6de079b39929bebd8b45501e5333ca2351991e07ee56f4651606c023396644e8f25c0806fa39a26c4c6e6
6726 languageName: node
6727 linkType: hard
6728
6729"object.groupby@npm:^1.0.0":
6730 version: 1.0.0
6731 resolution: "object.groupby@npm:1.0.0"
6732 dependencies:
6733 call-bind: "npm:^1.0.2"
6734 define-properties: "npm:^1.2.0"
6735 es-abstract: "npm:^1.21.2"
6736 get-intrinsic: "npm:^1.2.1"
6737 checksum: 64fff29630d8a9e3260376ece19ffa15f6ac65e2d2c99f4d912dcb06a99571a2cc7ea612c15ee3d335c2aecd961f1ba0eb9bf79cbc12edf3fd2af43973f5eb5a
5741 languageName: node 6738 languageName: node
5742 linkType: hard 6739 linkType: hard
5743 6740
@@ -5747,7 +6744,7 @@ __metadata:
5747 dependencies: 6744 dependencies:
5748 define-properties: "npm:^1.1.4" 6745 define-properties: "npm:^1.1.4"
5749 es-abstract: "npm:^1.20.4" 6746 es-abstract: "npm:^1.20.4"
5750 checksum: b2a1badf970b5997e3aa99b4a0a871ec122acd2e4e46c03db472e1228f2372f65b74db0ab1c6112bda5c738cc017923db30d51a8a52a465507caa6507365e260 6747 checksum: 419fc1c74a2aea7ebb4d49b79d5b1599a010b26c18eae35bd061ccdd013ccb749c499d8dd6ee21a91e6d7264ccc592573d0f13562970f76e25fc844d8c1b02ce
5751 languageName: node 6748 languageName: node
5752 linkType: hard 6749 linkType: hard
5753 6750
@@ -5758,7 +6755,7 @@ __metadata:
5758 call-bind: "npm:^1.0.2" 6755 call-bind: "npm:^1.0.2"
5759 define-properties: "npm:^1.1.4" 6756 define-properties: "npm:^1.1.4"
5760 es-abstract: "npm:^1.20.4" 6757 es-abstract: "npm:^1.20.4"
5761 checksum: 34c61f5568744aefcf59f676fdf2444eff72f84b5006f5fc8eedb9ed8e5094222516807fbebd7b59c143a54476682676645bd5444b2ecaebe1e46322d754c4a7 6758 checksum: 3381204390f10c9f653a4875a50d221c67b5c16cb80a6ac06c706fc82a7cad8400857d4c7a0731193b0abb56b84fe803eabcf7addcf32de76397bbf207e68c66
5762 languageName: node 6759 languageName: node
5763 linkType: hard 6760 linkType: hard
5764 6761
@@ -5767,7 +6764,7 @@ __metadata:
5767 resolution: "once@npm:1.4.0" 6764 resolution: "once@npm:1.4.0"
5768 dependencies: 6765 dependencies:
5769 wrappy: "npm:1" 6766 wrappy: "npm:1"
5770 checksum: 12d5c6ece331855387577e71c96ab5b60269390b131cf9403494206274fa520221c88f8b8d431d7227d080127730460da8907c402ab4142e592c34aacb5c9817 6767 checksum: 5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0
5771 languageName: node 6768 languageName: node
5772 linkType: hard 6769 linkType: hard
5773 6770
@@ -5778,21 +6775,21 @@ __metadata:
5778 define-lazy-prop: "npm:^2.0.0" 6775 define-lazy-prop: "npm:^2.0.0"
5779 is-docker: "npm:^2.1.1" 6776 is-docker: "npm:^2.1.1"
5780 is-wsl: "npm:^2.2.0" 6777 is-wsl: "npm:^2.2.0"
5781 checksum: 132803ca71c3bb0f66bd2db969efbb9a2511d05588c02f7141dd346e74ca817dc605a28ab1426bbeb8cb43c9deb9697bbbe26ad5a8488603677c70c4b84959bd 6778 checksum: bb6b3a58401dacdb0aad14360626faf3fb7fba4b77816b373495988b724fb48941cad80c1b65d62bb31a17609b2cd91c41a181602caea597ca80dfbcc27e84c9
5782 languageName: node 6779 languageName: node
5783 linkType: hard 6780 linkType: hard
5784 6781
5785"optionator@npm:^0.9.1": 6782"optionator@npm:^0.9.3":
5786 version: 0.9.1 6783 version: 0.9.3
5787 resolution: "optionator@npm:0.9.1" 6784 resolution: "optionator@npm:0.9.3"
5788 dependencies: 6785 dependencies:
6786 "@aashutoshrathi/word-wrap": "npm:^1.2.3"
5789 deep-is: "npm:^0.1.3" 6787 deep-is: "npm:^0.1.3"
5790 fast-levenshtein: "npm:^2.0.6" 6788 fast-levenshtein: "npm:^2.0.6"
5791 levn: "npm:^0.4.1" 6789 levn: "npm:^0.4.1"
5792 prelude-ls: "npm:^1.2.1" 6790 prelude-ls: "npm:^1.2.1"
5793 type-check: "npm:^0.4.0" 6791 type-check: "npm:^0.4.0"
5794 word-wrap: "npm:^1.2.3" 6792 checksum: 66fba794d425b5be51353035cf3167ce6cfa049059cbb93229b819167687e0f48d2bc4603fcb21b091c99acb516aae1083624675b15c4765b2e4693a085e959c
5795 checksum: bb7b06099c688d6d4bfc193f66b7aac15bfa84190f076f3f8c57821bdd0be761cbbf8972f0a904e7181aa2ca89441ca51c20f87b631690ca8d3f5bad90b7e0f1
5796 languageName: node 6793 languageName: node
5797 linkType: hard 6794 linkType: hard
5798 6795
@@ -5801,7 +6798,7 @@ __metadata:
5801 resolution: "p-limit@npm:3.1.0" 6798 resolution: "p-limit@npm:3.1.0"
5802 dependencies: 6799 dependencies:
5803 yocto-queue: "npm:^0.1.0" 6800 yocto-queue: "npm:^0.1.0"
5804 checksum: c38ea177d6bd9e8b9a8c296145bfe2aa8963f6aae5c864630a4e1728513953319ab13bc113fe00e2b632e0ec039b23daa311f79b4f7f04b0b50f2d8b994fad46 6801 checksum: 9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a
5805 languageName: node 6802 languageName: node
5806 linkType: hard 6803 linkType: hard
5807 6804
@@ -5810,7 +6807,7 @@ __metadata:
5810 resolution: "p-locate@npm:5.0.0" 6807 resolution: "p-locate@npm:5.0.0"
5811 dependencies: 6808 dependencies:
5812 p-limit: "npm:^3.0.2" 6809 p-limit: "npm:^3.0.2"
5813 checksum: 6f4c66cf65f6f1955de1978a612b3acb94d41663ba72cc6b60ac21b1aa6d7e3e13b2debbef0017b4339e71087c7917f8fd03b6b06db604af74e7eb55347c5206 6810 checksum: 2290d627ab7903b8b70d11d384fee714b797f6040d9278932754a6860845c4d3190603a0772a663c8cb5a7b21d1b16acb3a6487ebcafa9773094edc3dfe6009a
5814 languageName: node 6811 languageName: node
5815 linkType: hard 6812 linkType: hard
5816 6813
@@ -5819,7 +6816,7 @@ __metadata:
5819 resolution: "p-map@npm:4.0.0" 6816 resolution: "p-map@npm:4.0.0"
5820 dependencies: 6817 dependencies:
5821 aggregate-error: "npm:^3.0.0" 6818 aggregate-error: "npm:^3.0.0"
5822 checksum: 619df8954fe81933903bc760e9884d85540ef7e8f6c24c4e28e2c8f0ad14d480bb7d4541787eee2e2d61aa0fae8b54abc42f7afc35db457884e589386e78a922 6819 checksum: 592c05bd6262c466ce269ff172bb8de7c6975afca9b50c975135b974e9bdaafbfe80e61aaaf5be6d1200ba08b30ead04b88cfa7e25ff1e3b93ab28c9f62a2c75
5823 languageName: node 6820 languageName: node
5824 linkType: hard 6821 linkType: hard
5825 6822
@@ -5829,7 +6826,7 @@ __metadata:
5829 dependencies: 6826 dependencies:
5830 dot-case: "npm:^3.0.4" 6827 dot-case: "npm:^3.0.4"
5831 tslib: "npm:^2.0.3" 6828 tslib: "npm:^2.0.3"
5832 checksum: eab62423d2e4fafd0f6dc54d3639dda7a6437bf084d16549bf4df62a7cb972b588cd01ed47511d4fae2165e87f510396edd0fa32935e61d8bc984319a839a9ff 6829 checksum: ccc053f3019f878eca10e70ec546d92f51a592f762917dafab11c8b532715dcff58356118a6f350976e4ab109e321756f05739643ed0ca94298e82291e6f9e76
5833 languageName: node 6830 languageName: node
5834 linkType: hard 6831 linkType: hard
5835 6832
@@ -5838,7 +6835,7 @@ __metadata:
5838 resolution: "parent-module@npm:1.0.1" 6835 resolution: "parent-module@npm:1.0.1"
5839 dependencies: 6836 dependencies:
5840 callsites: "npm:^3.0.0" 6837 callsites: "npm:^3.0.0"
5841 checksum: ac26e4d08ec70f2e03c7e7b80c384fc3201576c04102ecf8cfef29051980208bd41a552802f1c46d6f3c1f0f864ce4f3cfc1f3077c19561a08df214d7b3fe3ec 6838 checksum: c63d6e80000d4babd11978e0d3fee386ca7752a02b035fd2435960ffaa7219dc42146f07069fb65e6e8bf1caef89daf9af7535a39bddf354d78bf50d8294f556
5842 languageName: node 6839 languageName: node
5843 linkType: hard 6840 linkType: hard
5844 6841
@@ -5850,7 +6847,7 @@ __metadata:
5850 error-ex: "npm:^1.3.1" 6847 error-ex: "npm:^1.3.1"
5851 json-parse-even-better-errors: "npm:^2.3.0" 6848 json-parse-even-better-errors: "npm:^2.3.0"
5852 lines-and-columns: "npm:^1.1.6" 6849 lines-and-columns: "npm:^1.1.6"
5853 checksum: 0c094e234bde1a643949a0ab6e46f12dfc8c11b38b3b7fd676a6f13499e208fe290ff94a48450abb7d043b556a31e1b4b781ced9ee3a08ac37cb250479396e50 6850 checksum: 77947f2253005be7a12d858aedbafa09c9ae39eb4863adf330f7b416ca4f4a08132e453e08de2db46459256fb66afaac5ee758b44fe6541b7cdaf9d252e59585
5854 languageName: node 6851 languageName: node
5855 linkType: hard 6852 linkType: hard
5856 6853
@@ -5860,84 +6857,91 @@ __metadata:
5860 dependencies: 6857 dependencies:
5861 no-case: "npm:^3.0.4" 6858 no-case: "npm:^3.0.4"
5862 tslib: "npm:^2.0.3" 6859 tslib: "npm:^2.0.3"
5863 checksum: 1d34b5460567fdbdb0d028bb95faaf10e7eeaa4c013922d2654bea50ce75f51a6e42b502d3257de5136ec8b80eebc395a8d2dda466d452b472a3ced16073567a 6860 checksum: 05ff7c344809fd272fc5030ae0ee3da8e4e63f36d47a1e0a4855ca59736254192c5a27b5822ed4bae96e54048eec5f6907713cfcfff7cdf7a464eaf7490786d8
5864 languageName: node 6861 languageName: node
5865 linkType: hard 6862 linkType: hard
5866 6863
5867"path-exists@npm:^4.0.0": 6864"path-exists@npm:^4.0.0":
5868 version: 4.0.0 6865 version: 4.0.0
5869 resolution: "path-exists@npm:4.0.0" 6866 resolution: "path-exists@npm:4.0.0"
5870 checksum: 28623865ba71cdc25d2d80021407b1500d64bb74d5072f03276221b4febedbb543132f5bcc57d7fc42b32b45f4175bbae919e1810535892faa4ba9e8f2edc6dd 6867 checksum: 8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b
5871 languageName: node 6868 languageName: node
5872 linkType: hard 6869 linkType: hard
5873 6870
5874"path-is-absolute@npm:^1.0.0": 6871"path-is-absolute@npm:^1.0.0":
5875 version: 1.0.1 6872 version: 1.0.1
5876 resolution: "path-is-absolute@npm:1.0.1" 6873 resolution: "path-is-absolute@npm:1.0.1"
5877 checksum: 6bb8fef4324c3f744e5d216980aa053095e1fc533d40fa47f9c1adc16be7fa52d3c4858370c7685406c32ab143a4dca0798f2e2c0f57d7937af66d8dd79267f6 6874 checksum: 127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078
5878 languageName: node 6875 languageName: node
5879 linkType: hard 6876 linkType: hard
5880 6877
5881"path-key@npm:^3.1.0": 6878"path-key@npm:^3.1.0":
5882 version: 3.1.1 6879 version: 3.1.1
5883 resolution: "path-key@npm:3.1.1" 6880 resolution: "path-key@npm:3.1.1"
5884 checksum: 93ee8a32e3be43548ece14eba2620bf5164884d0cc1aa3615d136567a39e02066c9b5aeb5b6747d766af55936151c95d9371ba46d4fcf361db9691505650c001 6881 checksum: 748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c
5885 languageName: node 6882 languageName: node
5886 linkType: hard 6883 linkType: hard
5887 6884
5888"path-parse@npm:^1.0.7": 6885"path-parse@npm:^1.0.7":
5889 version: 1.0.7 6886 version: 1.0.7
5890 resolution: "path-parse@npm:1.0.7" 6887 resolution: "path-parse@npm:1.0.7"
5891 checksum: ca291d7bced407e20480b686d7ef4f9dd112ef00d6f109faa50bbefe8ff9dd51e164781fa0670c7b5d67a88610008e83e594f8294ec809c1b7203c6577ca3777 6888 checksum: 11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1
5892 languageName: node 6889 languageName: node
5893 linkType: hard 6890 linkType: hard
5894 6891
5895"path-scurry@npm:^1.7.0": 6892"path-scurry@npm:^1.10.1":
5896 version: 1.9.2 6893 version: 1.10.1
5897 resolution: "path-scurry@npm:1.9.2" 6894 resolution: "path-scurry@npm:1.10.1"
5898 dependencies: 6895 dependencies:
5899 lru-cache: "npm:^9.1.1" 6896 lru-cache: "npm:^9.1.1 || ^10.0.0"
5900 minipass: "npm:^5.0.0 || ^6.0.2" 6897 minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0"
5901 checksum: c60ad5b0decbff08e45a527de1e22a0e5667e9120ce8a007bc219125f5f2462cd167f9f7622681b2ff760c1deec1d2e49fdead4ff508da3f1ca7a7389240f7e9 6898 checksum: e5dc78a7348d25eec61ab166317e9e9c7b46818aa2c2b9006c507a6ff48c672d011292d9662527213e558f5652ce0afcc788663a061d8b59ab495681840c0c1e
5902 languageName: node 6899 languageName: node
5903 linkType: hard 6900 linkType: hard
5904 6901
5905"path-type@npm:^4.0.0": 6902"path-type@npm:^4.0.0":
5906 version: 4.0.0 6903 version: 4.0.0
5907 resolution: "path-type@npm:4.0.0" 6904 resolution: "path-type@npm:4.0.0"
5908 checksum: 6a9330ad8d96f31e929feb414cde2959078379ba5a48c9e3eab34f280d7850eec6a0fa3ed5be9150e9e4d7df5139c1ae92f891b18167528553a11382d8f54183 6905 checksum: 666f6973f332f27581371efaf303fd6c272cc43c2057b37aa99e3643158c7e4b2626549555d88626e99ea9e046f82f32e41bbde5f1508547e9a11b149b52387c
5909 languageName: node 6906 languageName: node
5910 linkType: hard 6907 linkType: hard
5911 6908
5912"picocolors@npm:^1.0.0": 6909"picocolors@npm:^1.0.0":
5913 version: 1.0.0 6910 version: 1.0.0
5914 resolution: "picocolors@npm:1.0.0" 6911 resolution: "picocolors@npm:1.0.0"
5915 checksum: 447e1f6e4953522a3947f2effa93dca66f2436a7c275327ba1a7fb526eab369fc9847d77ebcd734dc483322256f34b431e93a325e44726e4ec390c11cc7f5c87 6912 checksum: 20a5b249e331c14479d94ec6817a182fd7a5680debae82705747b2db7ec50009a5f6648d0621c561b0572703f84dbef0858abcbd5856d3c5511426afcb1961f7
5916 languageName: node 6913 languageName: node
5917 linkType: hard 6914 linkType: hard
5918 6915
5919"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.3.1": 6916"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.3.1":
5920 version: 2.3.1 6917 version: 2.3.1
5921 resolution: "picomatch@npm:2.3.1" 6918 resolution: "picomatch@npm:2.3.1"
5922 checksum: 6ba5938c24af2c5918e94b39aa0ad48d71f2c30634de69d46e0bd32feb666de4e909406db6ffb78f98d39ef450d6a41b6fa3954dc3659d7b2b750766c1261e5e 6919 checksum: 26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be
6920 languageName: node
6921 linkType: hard
6922
6923"pnpapi@npm:^0.0.0":
6924 version: 0.0.0
6925 resolution: "pnpapi@npm:0.0.0"
6926 checksum: 7e718f0263073729486b35658fc502bc8f6f34e922da288731722fad5fa69f3817d29cce64d0135c41826c7f899999343daff5e49a9367f056ece9f1c1ded391
5923 languageName: node 6927 languageName: node
5924 linkType: hard 6928 linkType: hard
5925 6929
5926"postcss@npm:^8.4.23": 6930"postcss@npm:^8.4.27":
5927 version: 8.4.24 6931 version: 8.4.27
5928 resolution: "postcss@npm:8.4.24" 6932 resolution: "postcss@npm:8.4.27"
5929 dependencies: 6933 dependencies:
5930 nanoid: "npm:^3.3.6" 6934 nanoid: "npm:^3.3.6"
5931 picocolors: "npm:^1.0.0" 6935 picocolors: "npm:^1.0.0"
5932 source-map-js: "npm:^1.0.2" 6936 source-map-js: "npm:^1.0.2"
5933 checksum: 50c4ba61a7fed4d06e084c625f2603cc2448b66f4305d6495a105e73d2f53bdbf34828e5505d33498fa56e87d82e4192e55186e3b5167087d2b93882b6fc9db1 6937 checksum: 41a0476e05cb97514ff8d75e4ff9fdcf778f22b2e0d25b7028f219cd408e01d3c4f50459d4a1cd9a430d8ef08202c881374a4fa4ea6009f4a135a07315d606e5
5934 languageName: node 6938 languageName: node
5935 linkType: hard 6939 linkType: hard
5936 6940
5937"prelude-ls@npm:^1.2.1": 6941"prelude-ls@npm:^1.2.1":
5938 version: 1.2.1 6942 version: 1.2.1
5939 resolution: "prelude-ls@npm:1.2.1" 6943 resolution: "prelude-ls@npm:1.2.1"
5940 checksum: 0fee0e2ba5dc7793340a5861d9d37ce4f3d8ec246099bfae25e1f2a928a4df1c009a91882c35862bdf245f69081160df4ed0ec2438662ae22e50b621a6b7848f 6944 checksum: b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd
5941 languageName: node 6945 languageName: node
5942 linkType: hard 6946 linkType: hard
5943 6947
@@ -5946,30 +6950,39 @@ __metadata:
5946 resolution: "prettier-linter-helpers@npm:1.0.0" 6950 resolution: "prettier-linter-helpers@npm:1.0.0"
5947 dependencies: 6951 dependencies:
5948 fast-diff: "npm:^1.1.2" 6952 fast-diff: "npm:^1.1.2"
5949 checksum: e9b17d00ae7f7ec97a905050a2887e3fc9c9bcf94a91a7e24a9e33392df0b7355d8002d8f0d81ffafe4c11716bf973975cca065fec90fa15ec36a98e0a1db624 6953 checksum: 81e0027d731b7b3697ccd2129470ed9913ecb111e4ec175a12f0fcfab0096516373bf0af2fef132af50cafb0a905b74ff57996d615f59512bb9ac7378fcc64ab
5950 languageName: node 6954 languageName: node
5951 linkType: hard 6955 linkType: hard
5952 6956
5953"prettier@npm:^2.8.7, prettier@npm:^2.8.8": 6957"prettier@npm:^2.8.7":
5954 version: 2.8.8 6958 version: 2.8.8
5955 resolution: "prettier@npm:2.8.8" 6959 resolution: "prettier@npm:2.8.8"
5956 bin: 6960 bin:
5957 prettier: bin-prettier.js 6961 prettier: bin-prettier.js
5958 checksum: 38b0a43ea17e83f54b904f8808f7d0fd1d9705ef9627bb40017ee276cbd6f5e7d15bcf816c4467b64cfe14ef109369a981ce61fad9c6022749d041f74a672188 6962 checksum: 463ea8f9a0946cd5b828d8cf27bd8b567345cf02f56562d5ecde198b91f47a76b7ac9eae0facd247ace70e927143af6135e8cf411986b8cb8478784a4d6d724a
6963 languageName: node
6964 linkType: hard
6965
6966"prettier@npm:^3.0.3":
6967 version: 3.0.3
6968 resolution: "prettier@npm:3.0.3"
6969 bin:
6970 prettier: bin/prettier.cjs
6971 checksum: f950887bc03c5b970d8c6dd129364acfbbc61e7b46aec5d5ce17f4adf6404e2ef43072c98b51c4786e0eaca949b307d362a773fd47502862d754b5a328fa2b26
5959 languageName: node 6972 languageName: node
5960 linkType: hard 6973 linkType: hard
5961 6974
5962"pretty-bytes@npm:^5.3.0": 6975"pretty-bytes@npm:^5.3.0":
5963 version: 5.6.0 6976 version: 5.6.0
5964 resolution: "pretty-bytes@npm:5.6.0" 6977 resolution: "pretty-bytes@npm:5.6.0"
5965 checksum: daaf20c7847618fd7935051ffa3b6a6583048d09f0b49a31db66fdb792a77d23f5ae554d10ff1136c9f0bc76c9a4a110647955a16139be3d3ad57072dc9274b6 6978 checksum: f69f494dcc1adda98dbe0e4a36d301e8be8ff99bfde7a637b2ee2820e7cb583b0fc0f3a63b0e3752c01501185a5cf38602c7be60da41bdf84ef5b70e89c370f3
5966 languageName: node 6979 languageName: node
5967 linkType: hard 6980 linkType: hard
5968 6981
5969"pretty-bytes@npm:^6.0.0": 6982"pretty-bytes@npm:^6.1.1":
5970 version: 6.1.0 6983 version: 6.1.1
5971 resolution: "pretty-bytes@npm:6.1.0" 6984 resolution: "pretty-bytes@npm:6.1.1"
5972 checksum: 6c2df1578394426e89388c1b482138480b9468daa618ceb8c974d0048ea3002d28dc80d61553be978aedaf67b2b2909a1d10280f9d00bb9ff693b088db44e3e1 6985 checksum: c7a660b933355f3b4587ad3f001c266a8dd6afd17db9f89ebc50812354bb142df4b9600396ba5999bdb1f9717300387dc311df91895c5f0f2a1780e22495b5f8
5973 languageName: node 6986 languageName: node
5974 linkType: hard 6987 linkType: hard
5975 6988
@@ -5979,7 +6992,7 @@ __metadata:
5979 dependencies: 6992 dependencies:
5980 err-code: "npm:^2.0.2" 6993 err-code: "npm:^2.0.2"
5981 retry: "npm:^0.12.0" 6994 retry: "npm:^0.12.0"
5982 checksum: cbff149b3327554f3613196ca300a77aefac289624148c37e5c9236242931691a4ba0a76fd1c6171e6a3e6a2b1edfa2acdf122004857e6f3e3efd1be29df6cd2 6995 checksum: 9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96
5983 languageName: node 6996 languageName: node
5984 linkType: hard 6997 linkType: hard
5985 6998
@@ -5990,21 +7003,21 @@ __metadata:
5990 loose-envify: "npm:^1.4.0" 7003 loose-envify: "npm:^1.4.0"
5991 object-assign: "npm:^4.1.1" 7004 object-assign: "npm:^4.1.1"
5992 react-is: "npm:^16.13.1" 7005 react-is: "npm:^16.13.1"
5993 checksum: 196295f119e0f38ec64b43c1121a7e3bdbfcf66b86a01d50df22a247eb22b644033097b53a3b0961ce64d540c7a2c505c844ff245cb548b4f6eda59bbac6fbf0 7006 checksum: 59ece7ca2fb9838031d73a48d4becb9a7cc1ed10e610517c7d8f19a1e02fa47f7c27d557d8a5702bec3cfeccddc853579832b43f449e54635803f277b1c78077
5994 languageName: node 7007 languageName: node
5995 linkType: hard 7008 linkType: hard
5996 7009
5997"punycode@npm:^2.1.0": 7010"punycode@npm:^2.1.0":
5998 version: 2.3.0 7011 version: 2.3.0
5999 resolution: "punycode@npm:2.3.0" 7012 resolution: "punycode@npm:2.3.0"
6000 checksum: c2b408c805927a6614ef581bd3d00deca1fef9f2da0ec95cecaedf6a985d8596a29e931e31f80f7313f94257895f9ac6cf4c2ae81cdca04964daf9c3c3d221c1 7013 checksum: 8e6f7abdd3a6635820049e3731c623bbef3fedbf63bbc696b0d7237fdba4cefa069bc1fa62f2938b0fbae057550df7b5318f4a6bcece27f1907fc75c54160bee
6001 languageName: node 7014 languageName: node
6002 linkType: hard 7015 linkType: hard
6003 7016
6004"queue-microtask@npm:^1.2.2": 7017"queue-microtask@npm:^1.2.2":
6005 version: 1.2.3 7018 version: 1.2.3
6006 resolution: "queue-microtask@npm:1.2.3" 7019 resolution: "queue-microtask@npm:1.2.3"
6007 checksum: 84624bee6c25c9d9776242ce0dcc3e15f703d897f4b7d982f32ef4d88c51048507a0999d9ff038ec46f65901655460b69240e414da1cebc2d723987ec81cbae8 7020 checksum: 900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102
6008 languageName: node 7021 languageName: node
6009 linkType: hard 7022 linkType: hard
6010 7023
@@ -6013,7 +7026,7 @@ __metadata:
6013 resolution: "randombytes@npm:2.1.0" 7026 resolution: "randombytes@npm:2.1.0"
6014 dependencies: 7027 dependencies:
6015 safe-buffer: "npm:^5.1.0" 7028 safe-buffer: "npm:^5.1.0"
6016 checksum: 5d8b58cc7c397c4e23e4ef7d64ecd4a84d4a12781964b5cbd329a92f77f55beef58dda2e8d2f7582aceaf0fd41dac2a9665c630882af1937be8f2fbb5f69d037 7029 checksum: 50395efda7a8c94f5dffab564f9ff89736064d32addf0cc7e8bf5e4166f09f8ded7a0849ca6c2d2a59478f7d90f78f20d8048bca3cdf8be09d8e8a10790388f3
6017 languageName: node 7030 languageName: node
6018 linkType: hard 7031 linkType: hard
6019 7032
@@ -6025,21 +7038,33 @@ __metadata:
6025 scheduler: "npm:^0.23.0" 7038 scheduler: "npm:^0.23.0"
6026 peerDependencies: 7039 peerDependencies:
6027 react: ^18.2.0 7040 react: ^18.2.0
6028 checksum: 7c5b915fb793d63563cec1f721e059e6ff0e2855ac116ab5cb7450b6c59398f5e25f95c960ce5cb93504cc58ab724a75a78e99282354e702a0e667d0d787d028 7041 checksum: 66dfc5f93e13d0674e78ef41f92ed21dfb80f9c4ac4ac25a4b51046d41d4d2186abc915b897f69d3d0ebbffe6184e7c5876f2af26bfa956f179225d921be713a
6029 languageName: node 7042 languageName: node
6030 linkType: hard 7043 linkType: hard
6031 7044
6032"react-is@npm:^16.13.1, react-is@npm:^16.7.0": 7045"react-is@npm:^16.13.1, react-is@npm:^16.7.0":
6033 version: 16.13.1 7046 version: 16.13.1
6034 resolution: "react-is@npm:16.13.1" 7047 resolution: "react-is@npm:16.13.1"
6035 checksum: 0c9adc5d984db733fb1dd298f3e94cdec66bc328d27fb11df65971d2cc9a299008bc64baab8fe8e79943df85b445a1008b2cc9e270825d0fd056e5a0d2df8de6 7048 checksum: 33977da7a5f1a287936a0c85639fec6ca74f4f15ef1e59a6bc20338fc73dc69555381e211f7a3529b8150a1f71e4225525b41b60b52965bda53ce7d47377ada1
6036 languageName: node 7049 languageName: node
6037 linkType: hard 7050 linkType: hard
6038 7051
6039"react-is@npm:^18.2.0": 7052"react-is@npm:^18.2.0":
6040 version: 18.2.0 7053 version: 18.2.0
6041 resolution: "react-is@npm:18.2.0" 7054 resolution: "react-is@npm:18.2.0"
6042 checksum: f542f0effed3f89b4faa237bf56e746d437c9dba4ed1039a2ba6e6fcb463244300b8f3c17d8e610e76476a626c4d97ee4c2ed7a5b5d64e2b2e2d7b2144816ac8 7055 checksum: 6eb5e4b28028c23e2bfcf73371e72cd4162e4ac7ab445ddae2afe24e347a37d6dc22fae6e1748632cd43c6d4f9b8f86dcf26bf9275e1874f436d129952528ae0
7056 languageName: node
7057 linkType: hard
7058
7059"react-resize-detector@npm:^9.1.0":
7060 version: 9.1.0
7061 resolution: "react-resize-detector@npm:9.1.0"
7062 dependencies:
7063 lodash: "npm:^4.17.21"
7064 peerDependencies:
7065 react: ^16.0.0 || ^17.0.0 || ^18.0.0
7066 react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0
7067 checksum: ebd45b54ce68368a8d8b6b32ff3b7949e8f56d5cce21fb18b5044612b16ae9adfdd2eefa6494a700aaf6c64b2cec4c3c33d86c464d1772042dbb4d87dd3dafc6
6043 languageName: node 7068 languageName: node
6044 linkType: hard 7069 linkType: hard
6045 7070
@@ -6054,7 +7079,7 @@ __metadata:
6054 peerDependencies: 7079 peerDependencies:
6055 react: ">=16.6.0" 7080 react: ">=16.6.0"
6056 react-dom: ">=16.6.0" 7081 react-dom: ">=16.6.0"
6057 checksum: e1280cefba98ac056e57d39d008771901bb6d4b36f2a6b3288a106b29af024f0b355320fd5387e1ab6b93da7e27f2a507a9b16e40649a96336013898c360d748 7082 checksum: 2ba754ba748faefa15f87c96dfa700d5525054a0141de8c75763aae6734af0740e77e11261a1e8f4ffc08fd9ab78510122e05c21c2d79066c38bb6861a886c82
6058 languageName: node 7083 languageName: node
6059 linkType: hard 7084 linkType: hard
6060 7085
@@ -6063,7 +7088,7 @@ __metadata:
6063 resolution: "react@npm:18.2.0" 7088 resolution: "react@npm:18.2.0"
6064 dependencies: 7089 dependencies:
6065 loose-envify: "npm:^1.1.0" 7090 loose-envify: "npm:^1.1.0"
6066 checksum: 8434e5782c52b3bf18a80b666348977924ee3827895fa03ec3ffb9faca90c460049f14130428dd1546bab6cf3b2c277f2c243d3c2a856501331d2e69c24b2bb9 7091 checksum: b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8
6067 languageName: node 7092 languageName: node
6068 linkType: hard 7093 linkType: hard
6069 7094
@@ -6074,7 +7099,7 @@ __metadata:
6074 inherits: "npm:^2.0.3" 7099 inherits: "npm:^2.0.3"
6075 string_decoder: "npm:^1.1.1" 7100 string_decoder: "npm:^1.1.1"
6076 util-deprecate: "npm:^1.0.1" 7101 util-deprecate: "npm:^1.0.1"
6077 checksum: b1cbe0fea6b407fc75bfbe4f6c54d48899e638d54a8a1207b5040c60566dd5f65059b32c3edf0ac0ce621ea46929b3337e8a19410870eff98b8be5a3ba543b7a 7102 checksum: e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7
6078 languageName: node 7103 languageName: node
6079 linkType: hard 7104 linkType: hard
6080 7105
@@ -6083,19 +7108,34 @@ __metadata:
6083 resolution: "readdirp@npm:3.6.0" 7108 resolution: "readdirp@npm:3.6.0"
6084 dependencies: 7109 dependencies:
6085 picomatch: "npm:^2.2.1" 7110 picomatch: "npm:^2.2.1"
6086 checksum: 9dea77bef6b47b7c7553da4b5f30606449b49cf2aa043de23e22bee909c2d26c97630b8f8fa43775e318731c5a208d2063a10d3c788a3b0e1a9e32c5ab5fe790 7111 checksum: 6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b
6087 languageName: node 7112 languageName: node
6088 linkType: hard 7113 linkType: hard
6089 7114
6090"recast@npm:^0.21.2": 7115"recast@npm:^0.23.1":
6091 version: 0.21.5 7116 version: 0.23.4
6092 resolution: "recast@npm:0.21.5" 7117 resolution: "recast@npm:0.23.4"
6093 dependencies: 7118 dependencies:
6094 ast-types: "npm:0.15.2" 7119 assert: "npm:^2.0.0"
7120 ast-types: "npm:^0.16.1"
6095 esprima: "npm:~4.0.0" 7121 esprima: "npm:~4.0.0"
6096 source-map: "npm:~0.6.1" 7122 source-map: "npm:~0.6.1"
6097 tslib: "npm:^2.0.1" 7123 tslib: "npm:^2.0.1"
6098 checksum: 40d604be932e17a75ff5e0fc0ee56155229ca572ed62616b6551860e85548b0c7ab88f2d274d24881a95e3da8a362acfd2e3683f6479a56729349727a229f3a9 7124 checksum: d719633be8029e28f23b8191d4a525c5dbdac721792ab3cb5e9dfcf1694fb93f3c147b186916195a9c7fa0711f1e4990ba457cdcee02faed3899d4a80da1bd1f
7125 languageName: node
7126 linkType: hard
7127
7128"reflect.getprototypeof@npm:^1.0.3":
7129 version: 1.0.3
7130 resolution: "reflect.getprototypeof@npm:1.0.3"
7131 dependencies:
7132 call-bind: "npm:^1.0.2"
7133 define-properties: "npm:^1.1.4"
7134 es-abstract: "npm:^1.20.4"
7135 get-intrinsic: "npm:^1.1.1"
7136 globalthis: "npm:^1.0.3"
7137 which-builtin-type: "npm:^1.1.3"
7138 checksum: 6300460adb743c5e710f3d0b9c2f49206a4f2a8cc61640e58565d13df3659747e82a88758666f5d32ed449ac3647cfcf0bbd48b574ceed8cb2ea14f20a719580
6099 languageName: node 7139 languageName: node
6100 linkType: hard 7140 linkType: hard
6101 7141
@@ -6104,41 +7144,41 @@ __metadata:
6104 resolution: "regenerate-unicode-properties@npm:10.1.0" 7144 resolution: "regenerate-unicode-properties@npm:10.1.0"
6105 dependencies: 7145 dependencies:
6106 regenerate: "npm:^1.4.2" 7146 regenerate: "npm:^1.4.2"
6107 checksum: 8abc8d628a7b4733e69a6e113e79fee348d2cecade5b9a65442167ca17410c1aea5213ac4f5e1b7897013b6bae98238703fda09303acd763a6e5eaf849cc0830 7147 checksum: 17818ea6f67c5a4884b9e18842edc4b3838a12f62e24f843e80fbb6d8cb649274b5b86d98bb02075074e02021850e597a92ff6b58bbe5caba4bf5fd8e4e38b56
6108 languageName: node 7148 languageName: node
6109 linkType: hard 7149 linkType: hard
6110 7150
6111"regenerate@npm:^1.4.2": 7151"regenerate@npm:^1.4.2":
6112 version: 1.4.2 7152 version: 1.4.2
6113 resolution: "regenerate@npm:1.4.2" 7153 resolution: "regenerate@npm:1.4.2"
6114 checksum: f2d97117f52ef5bef7757693c3157395c8c542ef4b856addac6e78c76ed7053f2154435912a18a6d1c3ff09702ad525babeffe30a179ef809cacff200cd4d193 7154 checksum: f73c9eba5d398c818edc71d1c6979eaa05af7a808682749dd079f8df2a6d91a9b913db216c2c9b03e0a8ba2bba8701244a93f45211afbff691c32c7b275db1b8
6115 languageName: node 7155 languageName: node
6116 linkType: hard 7156 linkType: hard
6117 7157
6118"regenerator-runtime@npm:^0.13.11": 7158"regenerator-runtime@npm:^0.14.0":
6119 version: 0.13.11 7159 version: 0.14.0
6120 resolution: "regenerator-runtime@npm:0.13.11" 7160 resolution: "regenerator-runtime@npm:0.14.0"
6121 checksum: 0485db63ce47760e28329590cb9f8b208365d076dbf2edaa32e551a7c0451fc6f7557b225268422c960ffa4fbc6ff86d63d6a747aacbf6b10ed6a747b432e3c8 7161 checksum: e25f062c1a183f81c99681691a342760e65c55e8d3a4d4fe347ebe72433b123754b942b70b622959894e11f8a9131dc549bd3c9a5234677db06a4af42add8d12
6122 languageName: node 7162 languageName: node
6123 linkType: hard 7163 linkType: hard
6124 7164
6125"regenerator-transform@npm:^0.15.0": 7165"regenerator-transform@npm:^0.15.0":
6126 version: 0.15.1 7166 version: 0.15.2
6127 resolution: "regenerator-transform@npm:0.15.1" 7167 resolution: "regenerator-transform@npm:0.15.2"
6128 dependencies: 7168 dependencies:
6129 "@babel/runtime": "npm:^7.8.4" 7169 "@babel/runtime": "npm:^7.8.4"
6130 checksum: a3e4421b918fa650962898274588073dce1c49eb08d3a9b3dd7a4859c17cf362c72e5ae23dffef493d44c26cda2ac56ab3c47ad5b9874e2709f6c67c36b52391 7170 checksum: 7cfe6931ec793269701994a93bab89c0cc95379191fad866270a7fea2adfec67ea62bb5b374db77058b60ba4509319d9b608664d0d288bd9989ca8dbd08fae90
6131 languageName: node 7171 languageName: node
6132 linkType: hard 7172 linkType: hard
6133 7173
6134"regexp.prototype.flags@npm:^1.4.3": 7174"regexp.prototype.flags@npm:^1.4.3, regexp.prototype.flags@npm:^1.5.0":
6135 version: 1.5.0 7175 version: 1.5.0
6136 resolution: "regexp.prototype.flags@npm:1.5.0" 7176 resolution: "regexp.prototype.flags@npm:1.5.0"
6137 dependencies: 7177 dependencies:
6138 call-bind: "npm:^1.0.2" 7178 call-bind: "npm:^1.0.2"
6139 define-properties: "npm:^1.2.0" 7179 define-properties: "npm:^1.2.0"
6140 functions-have-names: "npm:^1.2.3" 7180 functions-have-names: "npm:^1.2.3"
6141 checksum: 27e06f7238805b9b315bb43ef60500345cd3c041c9ba2f6b2b7951bd23409314d22741a100e2ce4c6b996d5488dfdc59776486f51f07fef2c2bd36b01dde1092 7181 checksum: 312b7966c5cd2e6837da4073e0e6450191e3c6e8f07276cbed35e170ea5606f91487b435eb3290593f8aed39b1191c44f5340e6e5392650feaf2b34a98378464
6142 languageName: node 7182 languageName: node
6143 linkType: hard 7183 linkType: hard
6144 7184
@@ -6152,7 +7192,7 @@ __metadata:
6152 regjsparser: "npm:^0.9.1" 7192 regjsparser: "npm:^0.9.1"
6153 unicode-match-property-ecmascript: "npm:^2.0.0" 7193 unicode-match-property-ecmascript: "npm:^2.0.0"
6154 unicode-match-property-value-ecmascript: "npm:^2.1.0" 7194 unicode-match-property-value-ecmascript: "npm:^2.1.0"
6155 checksum: bf3f31464f6f11161f6d19659abe771d69210ff148f7fb873074a1dc6a31f6494771e5424f6f9fb97fc708783fec5591efaa4bbc3943fac703775bb4653a39ad 7195 checksum: 7945d5ab10c8bbed3ca383d4274687ea825aee4ab93a9c51c6e31e1365edd5ea807f6908f800ba017b66c462944ba68011164e7055207747ab651f8111ef3770
6156 languageName: node 7196 languageName: node
6157 linkType: hard 7197 linkType: hard
6158 7198
@@ -6163,48 +7203,62 @@ __metadata:
6163 jsesc: "npm:~0.5.0" 7203 jsesc: "npm:~0.5.0"
6164 bin: 7204 bin:
6165 regjsparser: bin/parser 7205 regjsparser: bin/parser
6166 checksum: c706fb5d31aabd1951c0aa5fdfdb193bac82f9bec0e0ba77ab794e1260ec0589fdb270532387b8831124c9191ffccaf4eaceb7cd7df3f0be9572808d47c44266 7206 checksum: fe44fcf19a99fe4f92809b0b6179530e5ef313ff7f87df143b08ce9a2eb3c4b6189b43735d645be6e8f4033bfb015ed1ca54f0583bc7561bed53fd379feb8225
6167 languageName: node 7207 languageName: node
6168 linkType: hard 7208 linkType: hard
6169 7209
6170"relateurl@npm:^0.2.7": 7210"relateurl@npm:^0.2.7":
6171 version: 0.2.7 7211 version: 0.2.7
6172 resolution: "relateurl@npm:0.2.7" 7212 resolution: "relateurl@npm:0.2.7"
6173 checksum: 18af464c6bd59aae9f7906c600ef59ed604b41144a82a9f15aacafa94289edbc13df35b2000aaf6179c881a91b93ef669f67e21a45f6da594560dc4a9d8a3e8a 7213 checksum: c248b4e3b32474f116a804b537fa6343d731b80056fb506dffd91e737eef4cac6be47a65aae39b522b0db9d0b1011d1a12e288d82a109ecd94a5299d82f6573a
7214 languageName: node
7215 linkType: hard
7216
7217"require-directory@npm:^2.1.1":
7218 version: 2.1.1
7219 resolution: "require-directory@npm:2.1.1"
7220 checksum: 83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99
6174 languageName: node 7221 languageName: node
6175 linkType: hard 7222 linkType: hard
6176 7223
6177"require-from-string@npm:^2.0.2": 7224"require-from-string@npm:^2.0.2":
6178 version: 2.0.2 7225 version: 2.0.2
6179 resolution: "require-from-string@npm:2.0.2" 7226 resolution: "require-from-string@npm:2.0.2"
6180 checksum: 3cd7be0f2b19d49ef2ec59c27cc9dbd64343c950c744651d8e31651026585d5da581df35be7a9b825f00921bf134d619fea292360dabbae11da2c211f2b601f2 7227 checksum: aaa267e0c5b022fc5fd4eef49d8285086b15f2a1c54b28240fdf03599cbd9c26049fee3eab894f2e1f6ca65e513b030a7c264201e3f005601e80c49fb2937ce2
7228 languageName: node
7229 linkType: hard
7230
7231"reselect@npm:^4.1.8":
7232 version: 4.1.8
7233 resolution: "reselect@npm:4.1.8"
7234 checksum: 06a305a504affcbb67dd0561ddc8306b35796199c7e15b38934c80606938a021eadcf68cfd58e7bb5e17786601c37602a3362a4665c7bf0a96c1041ceee9d0b7
6181 languageName: node 7235 languageName: node
6182 linkType: hard 7236 linkType: hard
6183 7237
6184"resolve-from@npm:^4.0.0": 7238"resolve-from@npm:^4.0.0":
6185 version: 4.0.0 7239 version: 4.0.0
6186 resolution: "resolve-from@npm:4.0.0" 7240 resolution: "resolve-from@npm:4.0.0"
6187 checksum: bc0ec65a95fae7d644cdb0f14e010c2cbde74d0844232542912f8343a20d66fc30a7b400391a0f118a710b9bc10078a0a13d8444a555f44c00023b3220249865 7241 checksum: 8408eec31a3112ef96e3746c37be7d64020cda07c03a920f5024e77290a218ea758b26ca9529fd7b1ad283947f34b2291c1c0f6aa0ed34acfdda9c6014c8d190
6188 languageName: node 7242 languageName: node
6189 linkType: hard 7243 linkType: hard
6190 7244
6191"resolve-pkg-maps@npm:^1.0.0": 7245"resolve-pkg-maps@npm:^1.0.0":
6192 version: 1.0.0 7246 version: 1.0.0
6193 resolution: "resolve-pkg-maps@npm:1.0.0" 7247 resolution: "resolve-pkg-maps@npm:1.0.0"
6194 checksum: 6d91a6387c12ba1d67e09d35205df09cf6871debe8618d695b828ee2609e382463bbbab42b860f63c000bae39e464772d0ea6b7753802fb42ac3cbe33bd8154e 7248 checksum: fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab
6195 languageName: node 7249 languageName: node
6196 linkType: hard 7250 linkType: hard
6197 7251
6198"resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.22.1": 7252"resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.22.4":
6199 version: 1.22.3 7253 version: 1.22.4
6200 resolution: "resolve@npm:1.22.3" 7254 resolution: "resolve@npm:1.22.4"
6201 dependencies: 7255 dependencies:
6202 is-core-module: "npm:^2.12.0" 7256 is-core-module: "npm:^2.13.0"
6203 path-parse: "npm:^1.0.7" 7257 path-parse: "npm:^1.0.7"
6204 supports-preserve-symlinks-flag: "npm:^1.0.0" 7258 supports-preserve-symlinks-flag: "npm:^1.0.0"
6205 bin: 7259 bin:
6206 resolve: bin/resolve 7260 resolve: bin/resolve
6207 checksum: bf0ce0162ee1b5a2dfe29e982b67fb0867911972ffba9a6903bb2c0c11e6c8eb7db7de5344645f84df7f9ba2a19438d373ddddf3a3125ececba719fccd40dd18 7261 checksum: b1adb7885a05e31fc2be19e85e338b8d48d9e442b568d91e9c925990ed1c3bff66683ccea03b9e9893b857ec25dee0f7951a0d0630be49e4e1f5c1150ddc35dc
6208 languageName: node 7262 languageName: node
6209 linkType: hard 7263 linkType: hard
6210 7264
@@ -6217,20 +7271,20 @@ __metadata:
6217 supports-preserve-symlinks-flag: "npm:^1.0.0" 7271 supports-preserve-symlinks-flag: "npm:^1.0.0"
6218 bin: 7272 bin:
6219 resolve: bin/resolve 7273 resolve: bin/resolve
6220 checksum: 0c90cce20b0899ba61da8151f9ebb39c3027c00af0a64d4c8aa3cb1604b1a7f4c113516af3c2279b8842d949111633c47e221d565373ce4add9f1c31dbc3ee49 7274 checksum: 1de92669e7c46cfe125294c66d5405e13288bb87b97e9bdab71693ceebbcc0255c789bde30e2834265257d330d8ff57414d7d88e3097d8f69951f3ce978bf045
6221 languageName: node 7275 languageName: node
6222 linkType: hard 7276 linkType: hard
6223 7277
6224"resolve@patch:resolve@npm%3A^1.14.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin<compat/resolve>": 7278"resolve@patch:resolve@npm%3A^1.14.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>":
6225 version: 1.22.3 7279 version: 1.22.4
6226 resolution: "resolve@patch:resolve@npm%3A1.22.3#optional!builtin<compat/resolve>::version=1.22.3&hash=c3c19d" 7280 resolution: "resolve@patch:resolve@npm%3A1.22.4#optional!builtin<compat/resolve>::version=1.22.4&hash=c3c19d"
6227 dependencies: 7281 dependencies:
6228 is-core-module: "npm:^2.12.0" 7282 is-core-module: "npm:^2.13.0"
6229 path-parse: "npm:^1.0.7" 7283 path-parse: "npm:^1.0.7"
6230 supports-preserve-symlinks-flag: "npm:^1.0.0" 7284 supports-preserve-symlinks-flag: "npm:^1.0.0"
6231 bin: 7285 bin:
6232 resolve: bin/resolve 7286 resolve: bin/resolve
6233 checksum: 9b982fd1fdbcca23f58d4d97df35bf1182eaccad96df6d8bbc4e9006616c382a10d7617e039a540cc86291e5247ddbb7cda9cceb1fd35688b03b03864b5d4360 7287 checksum: 60ca179599acf8b1bb17b850280a7081781b457d235d48197dc893b82d75741f191c5fe2d93e5729292234d0b0d88e9add273df4b9e04755eeed4fd7d23f1c79
6234 languageName: node 7288 languageName: node
6235 linkType: hard 7289 linkType: hard
6236 7290
@@ -6243,21 +7297,21 @@ __metadata:
6243 supports-preserve-symlinks-flag: "npm:^1.0.0" 7297 supports-preserve-symlinks-flag: "npm:^1.0.0"
6244 bin: 7298 bin:
6245 resolve: bin/resolve 7299 resolve: bin/resolve
6246 checksum: 04c825cca722397520f79c0d7a9160259032af786efcc9d434c728e5e69117a9241da844a9ca3cc430fe63a0c41571c8ac9f193dd3216a3b65a14d7850f8ef5d 7300 checksum: ed2bb51d616b9cd30fe85cf49f7a2240094d9fa01a221d361918462be81f683d1855b7f192391d2ab5325245b42464ca59690db5bd5dad0a326fc0de5974dd10
6247 languageName: node 7301 languageName: node
6248 linkType: hard 7302 linkType: hard
6249 7303
6250"retry@npm:^0.12.0": 7304"retry@npm:^0.12.0":
6251 version: 0.12.0 7305 version: 0.12.0
6252 resolution: "retry@npm:0.12.0" 7306 resolution: "retry@npm:0.12.0"
6253 checksum: 1c3616bdf89aa6f887bcca2b86603c255f4b497577f6a54f33262f4f314b8516d65e251f717b45e2a5ec234359999015a9e2263b38467544188210327e638ac3 7307 checksum: 59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe
6254 languageName: node 7308 languageName: node
6255 linkType: hard 7309 linkType: hard
6256 7310
6257"reusify@npm:^1.0.4": 7311"reusify@npm:^1.0.4":
6258 version: 1.0.4 7312 version: 1.0.4
6259 resolution: "reusify@npm:1.0.4" 7313 resolution: "reusify@npm:1.0.4"
6260 checksum: 3d0f10293851d5a50453257bb837ad973b046fc51fa489c46f3a480e0e3a9cf249babb30a493ad5f802a71510b2ee4e65a4609a644f98b3413575ab707f841d7 7314 checksum: c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107
6261 languageName: node 7315 languageName: node
6262 linkType: hard 7316 linkType: hard
6263 7317
@@ -6268,7 +7322,14 @@ __metadata:
6268 glob: "npm:^7.1.3" 7322 glob: "npm:^7.1.3"
6269 bin: 7323 bin:
6270 rimraf: bin.js 7324 rimraf: bin.js
6271 checksum: b786c9ad52df9fbcd9c7120e105f3150b83b39dd87d9235a93b0c7e806575e1e68936504ff64563dbe67b3f8bbbc00bdfff586157d402ee8990e7143456511c0 7325 checksum: 9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8
7326 languageName: node
7327 linkType: hard
7328
7329"robust-predicates@npm:^3.0.0":
7330 version: 3.0.2
7331 resolution: "robust-predicates@npm:3.0.2"
7332 checksum: 4ecd53649f1c2d49529c85518f2fa69ffb2f7a4453f7fd19c042421c7b4d76c3efb48bc1c740c8f7049346d7cb58cf08ee0c9adaae595cc23564d360adb1fde4
6272 languageName: node 7333 languageName: node
6273 linkType: hard 7334 linkType: hard
6274 7335
@@ -6282,7 +7343,7 @@ __metadata:
6282 terser: "npm:^5.0.0" 7343 terser: "npm:^5.0.0"
6283 peerDependencies: 7344 peerDependencies:
6284 rollup: ^2.0.0 7345 rollup: ^2.0.0
6285 checksum: 9662a666c0545c51afe5474fa43f8eb4019c2210c99f0b765a613c44b79bc5727d7481fa0bbb26a65bebbe208b3539d1ffcd2dd1fdb66cc84089bc0528fb97fe 7346 checksum: f79b851c6f7b06555d3a8ce7a4e32abd2b7cb8318e89fb8db73e662fa6e3af1a59920e881d111efc65a7437fd9582b61b1f4859b6fd839ba948616829d92432d
6286 languageName: node 7347 languageName: node
6287 linkType: hard 7348 linkType: hard
6288 7349
@@ -6296,13 +7357,13 @@ __metadata:
6296 optional: true 7357 optional: true
6297 bin: 7358 bin:
6298 rollup: dist/bin/rollup 7359 rollup: dist/bin/rollup
6299 checksum: b91c27c3b5234af864f282ffa2c13891d9caf25cad8ba7ad11f5201bdb6516f10c90a8c3402a5f72eafc74a555b1c685b6b04d107a6d6866195812a82f4aa308 7360 checksum: 421418687f5dcd7324f4387f203c6bfc7118b7ace789e30f5da022471c43e037a76f5fd93837052754eeeae798a4fb266ac05ccee1e594406d912a59af98dde9
6300 languageName: node 7361 languageName: node
6301 linkType: hard 7362 linkType: hard
6302 7363
6303"rollup@npm:^3.21.0": 7364"rollup@npm:^3.27.1":
6304 version: 3.25.1 7365 version: 3.28.0
6305 resolution: "rollup@npm:3.25.1" 7366 resolution: "rollup@npm:3.28.0"
6306 dependencies: 7367 dependencies:
6307 fsevents: "npm:~2.3.2" 7368 fsevents: "npm:~2.3.2"
6308 dependenciesMeta: 7369 dependenciesMeta:
@@ -6310,7 +7371,7 @@ __metadata:
6310 optional: true 7371 optional: true
6311 bin: 7372 bin:
6312 rollup: dist/bin/rollup 7373 rollup: dist/bin/rollup
6313 checksum: 06824c736c6aea24e138077bb28d8976f3c75b7c8593f7cc77ea0b31a2c37253d983187e2e8b9ff984d311550d0dd37f359360c4ce99fb4cb1ada3c0a20e48c5 7374 checksum: 0a0f963b4e36ec2b91373240cbed4db02ab96669454e9946d7433129cc088ee1f73d452d5920ee8e6c36e5158a7bc8e9fe037b260b9f8dd190ccb945f5be311a
6314 languageName: node 7375 languageName: node
6315 linkType: hard 7376 linkType: hard
6316 7377
@@ -6319,14 +7380,33 @@ __metadata:
6319 resolution: "run-parallel@npm:1.2.0" 7380 resolution: "run-parallel@npm:1.2.0"
6320 dependencies: 7381 dependencies:
6321 queue-microtask: "npm:^1.2.2" 7382 queue-microtask: "npm:^1.2.2"
6322 checksum: 45bff4f6664ae79b8653ebd32c6e9e9e37139683f7bd1d54d5a05c409c9d167ece16c9b7e36a99ac4bb7a08b5f72b4084a1e08eba443bc6e2ca9044ef972752c 7383 checksum: 200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39
7384 languageName: node
7385 linkType: hard
7386
7387"rw@npm:1":
7388 version: 1.3.3
7389 resolution: "rw@npm:1.3.3"
7390 checksum: b1e1ef37d1e79d9dc7050787866e30b6ddcb2625149276045c262c6b4d53075ddc35f387a856a8e76f0d0df59f4cd58fe24707e40797ebee66e542b840ed6a53
7391 languageName: node
7392 linkType: hard
7393
7394"safe-array-concat@npm:^1.0.0":
7395 version: 1.0.0
7396 resolution: "safe-array-concat@npm:1.0.0"
7397 dependencies:
7398 call-bind: "npm:^1.0.2"
7399 get-intrinsic: "npm:^1.2.0"
7400 has-symbols: "npm:^1.0.3"
7401 isarray: "npm:^2.0.5"
7402 checksum: 792d41fde9834583980912cb16bee511ce25e1759d3c467fdbbb3fc3245346a2289a6476d821713aa1ae23cc1d613d17e79c80e55adb29577f6a29e6f45e7f46
6323 languageName: node 7403 languageName: node
6324 linkType: hard 7404 linkType: hard
6325 7405
6326"safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": 7406"safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0":
6327 version: 5.2.1 7407 version: 5.2.1
6328 resolution: "safe-buffer@npm:5.2.1" 7408 resolution: "safe-buffer@npm:5.2.1"
6329 checksum: da8a21b3336a21c152eb3ba8ab41acde5772644f026d4b6e5f9fd8afa4f0cf407c113b19a362580fab9aea8beea295465432fc7684f9ff38aac559bb1b5528cd 7409 checksum: 6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3
6330 languageName: node 7410 languageName: node
6331 linkType: hard 7411 linkType: hard
6332 7412
@@ -6337,14 +7417,14 @@ __metadata:
6337 call-bind: "npm:^1.0.2" 7417 call-bind: "npm:^1.0.2"
6338 get-intrinsic: "npm:^1.1.3" 7418 get-intrinsic: "npm:^1.1.3"
6339 is-regex: "npm:^1.1.4" 7419 is-regex: "npm:^1.1.4"
6340 checksum: f7d330e0337cc12ba90dbf88d2f5815106149226c4741a9b5a906aa453f77bc9862570d5b58ca26f20c03807e8e30ed70e5d087fdf2e547da2c0cccaca58931a 7420 checksum: 14a81a7e683f97b2d6e9c8be61fddcf8ed7a02f4e64a825515f96bb1738eb007145359313741d2704d28b55b703a0f6300c749dde7c1dbc13952a2b85048ede2
6341 languageName: node 7421 languageName: node
6342 linkType: hard 7422 linkType: hard
6343 7423
6344"safer-buffer@npm:>= 2.1.2 < 3.0.0": 7424"safer-buffer@npm:>= 2.1.2 < 3.0.0":
6345 version: 2.1.2 7425 version: 2.1.2
6346 resolution: "safer-buffer@npm:2.1.2" 7426 resolution: "safer-buffer@npm:2.1.2"
6347 checksum: d4199666e9e792968c0b88c2c35dd400f56d3eecb9affbcf5207922822eadf30cc06995bae3c5d0a653851bbd40fc0af578bf046bbf734199ce22433ba4da659 7427 checksum: 7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4
6348 languageName: node 7428 languageName: node
6349 linkType: hard 7429 linkType: hard
6350 7430
@@ -6353,27 +7433,27 @@ __metadata:
6353 resolution: "scheduler@npm:0.23.0" 7433 resolution: "scheduler@npm:0.23.0"
6354 dependencies: 7434 dependencies:
6355 loose-envify: "npm:^1.1.0" 7435 loose-envify: "npm:^1.1.0"
6356 checksum: f4022b95cdc282668643da4850f55fe70c899aa956d11819f196e2ca892271bdb253613e53997852094f9351f7c72d057eea8b28d9b4bcb93bcb1c6d09985c82 7436 checksum: b777f7ca0115e6d93e126ac490dbd82642d14983b3079f58f35519d992fa46260be7d6e6cede433a92db70306310c6f5f06e144f0e40c484199e09c1f7be53dd
6357 languageName: node 7437 languageName: node
6358 linkType: hard 7438 linkType: hard
6359 7439
6360"semver@npm:^6.1.1, semver@npm:^6.1.2, semver@npm:^6.3.0": 7440"semver@npm:^6.1.1, semver@npm:^6.1.2, semver@npm:^6.3.0, semver@npm:^6.3.1":
6361 version: 6.3.0 7441 version: 6.3.1
6362 resolution: "semver@npm:6.3.0" 7442 resolution: "semver@npm:6.3.1"
6363 bin: 7443 bin:
6364 semver: ./bin/semver.js 7444 semver: bin/semver.js
6365 checksum: 18f3d42ec70a542e9efc498ecc3d0b9b088099115e8658b49d2bfc6470b46a6144b294374dac3f343fe1600039cbd80d5e830dd356053fd5abd4f1af5118a928 7445 checksum: e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d
6366 languageName: node 7446 languageName: node
6367 linkType: hard 7447 linkType: hard
6368 7448
6369"semver@npm:^7.3.5, semver@npm:^7.3.7": 7449"semver@npm:^7.3.5, semver@npm:^7.5.4":
6370 version: 7.5.2 7450 version: 7.5.4
6371 resolution: "semver@npm:7.5.2" 7451 resolution: "semver@npm:7.5.4"
6372 dependencies: 7452 dependencies:
6373 lru-cache: "npm:^6.0.0" 7453 lru-cache: "npm:^6.0.0"
6374 bin: 7454 bin:
6375 semver: bin/semver.js 7455 semver: bin/semver.js
6376 checksum: 896fab94563f3e4187b57a883e2efab277488bf4bd823d7794410435c39a1191830ae366470baad3430f74a555534d06cfc85c3e1b82f2bdeb9dd34edc980189 7456 checksum: 5160b06975a38b11c1ab55950cb5b8a23db78df88275d3d8a42ccf1f29e55112ac995b3a26a522c36e3b5f76b0445f1eef70d696b8c7862a2b4303d7b0e7609e
6377 languageName: node 7457 languageName: node
6378 linkType: hard 7458 linkType: hard
6379 7459
@@ -6382,14 +7462,14 @@ __metadata:
6382 resolution: "serialize-javascript@npm:4.0.0" 7462 resolution: "serialize-javascript@npm:4.0.0"
6383 dependencies: 7463 dependencies:
6384 randombytes: "npm:^2.1.0" 7464 randombytes: "npm:^2.1.0"
6385 checksum: f32ca5430abbbc6f72eff8abf62715d6f22abf517d3b398186d4d520e640695c70207319d7c1c758c844df11f56c2deedcf511483b22a0fc845f9f8c93a26b0b 7465 checksum: 510dfe7f0311c0b2f7ab06311afa1668ba2969ab2f1faaac0a4924ede76b7f22ba85cfdeaa0052ec5a047bca42c8cd8ac8df8f0efe52f9bd290b3a39ae69fe9d
6386 languageName: node 7466 languageName: node
6387 linkType: hard 7467 linkType: hard
6388 7468
6389"set-blocking@npm:^2.0.0": 7469"set-blocking@npm:^2.0.0":
6390 version: 2.0.0 7470 version: 2.0.0
6391 resolution: "set-blocking@npm:2.0.0" 7471 resolution: "set-blocking@npm:2.0.0"
6392 checksum: 9e8f5aeb7cd850a60b5dbf47d42051137c14f58f375d9a70ca227b797d6ffed3dabf659587d2f183231085f1da2dc3067e2af9f5fcd66fb65c98da5fb54a22fb 7472 checksum: 9f8c1b2d800800d0b589de1477c753492de5c1548d4ade52f57f1d1f5e04af5481554d75ce5e5c43d4004b80a3eb714398d6907027dc0534177b7539119f4454
6393 languageName: node 7473 languageName: node
6394 linkType: hard 7474 linkType: hard
6395 7475
@@ -6398,14 +7478,14 @@ __metadata:
6398 resolution: "shebang-command@npm:2.0.0" 7478 resolution: "shebang-command@npm:2.0.0"
6399 dependencies: 7479 dependencies:
6400 shebang-regex: "npm:^3.0.0" 7480 shebang-regex: "npm:^3.0.0"
6401 checksum: 5907a8d5facbefbd4dc8d21778d2136d5d22d61b5526452d92d46662614f0ed57090e7adf7184fe9d2d5ef75af9f05d7573437e10b37f2e6fdeeeb5f59fd9ada 7481 checksum: a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e
6402 languageName: node 7482 languageName: node
6403 linkType: hard 7483 linkType: hard
6404 7484
6405"shebang-regex@npm:^3.0.0": 7485"shebang-regex@npm:^3.0.0":
6406 version: 3.0.0 7486 version: 3.0.0
6407 resolution: "shebang-regex@npm:3.0.0" 7487 resolution: "shebang-regex@npm:3.0.0"
6408 checksum: 6be1588a86ed74d05481d09a6ef6a8db44550fda9785ae08c3df06717abc2e5e9a11804b1d0ac9b0641870c5ebf545e18c8d348bc105ba09227e6a32415ea1d6 7488 checksum: 1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690
6409 languageName: node 7489 languageName: node
6410 linkType: hard 7490 linkType: hard
6411 7491
@@ -6416,42 +7496,35 @@ __metadata:
6416 call-bind: "npm:^1.0.0" 7496 call-bind: "npm:^1.0.0"
6417 get-intrinsic: "npm:^1.0.2" 7497 get-intrinsic: "npm:^1.0.2"
6418 object-inspect: "npm:^1.9.0" 7498 object-inspect: "npm:^1.9.0"
6419 checksum: d712a4e682471c1a1c7bf9294a8bb0f066566e016de11fdb01ae0c0ebf8102c97cc2b2d3b0264ca377eb2d3444bf4c06909392c518a162f047b7444608e0e9a2 7499 checksum: 054a5d23ee35054b2c4609b9fd2a0587760737782b5d765a9c7852264710cc39c6dcb56a9bbd6c12cd84071648aea3edb2359d2f6e560677eedadce511ac1da5
6420 languageName: node 7500 languageName: node
6421 linkType: hard 7501 linkType: hard
6422 7502
6423"signal-exit@npm:^3.0.7": 7503"signal-exit@npm:^3.0.7":
6424 version: 3.0.7 7504 version: 3.0.7
6425 resolution: "signal-exit@npm:3.0.7" 7505 resolution: "signal-exit@npm:3.0.7"
6426 checksum: 5cf7525c55a72d8d104d914acf2e470f74b2c156197277ad7b331bc5de3d8790170fed3c82ff98c7c31adaa8ff941bfd5ba44f55171cbe8ed0e939fa82a8322a 7506 checksum: 25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912
6427 languageName: node 7507 languageName: node
6428 linkType: hard 7508 linkType: hard
6429 7509
6430"signal-exit@npm:^4.0.1": 7510"signal-exit@npm:^4.0.1":
6431 version: 4.0.2 7511 version: 4.1.0
6432 resolution: "signal-exit@npm:4.0.2" 7512 resolution: "signal-exit@npm:4.1.0"
6433 checksum: 8d05e3167eb2b9798d10e005c8c8d011d06189089ebf5cace0400cfe20b4f7cad1a5ccc8b613c92425d25da843b08cf76e4c59827f6c6003b186a7c0c336d46c 7513 checksum: 41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83
6434 languageName: node 7514 languageName: node
6435 linkType: hard 7515 linkType: hard
6436 7516
6437"slash@npm:^3.0.0": 7517"slash@npm:^3.0.0":
6438 version: 3.0.0 7518 version: 3.0.0
6439 resolution: "slash@npm:3.0.0" 7519 resolution: "slash@npm:3.0.0"
6440 checksum: b88a0f1086e3cd20c8b61f50d8afff5fba83f95167a86432f54387565c9424e5d1970612371f768c128ed4b5b1c427120382bafc8c9edf0b3737eb226b733687 7520 checksum: e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b
6441 languageName: node
6442 linkType: hard
6443
6444"slash@npm:^4.0.0":
6445 version: 4.0.0
6446 resolution: "slash@npm:4.0.0"
6447 checksum: 0327fcda20ceb59983f59b6016ecc1d8a0c750a66af0205cdb0d0b92b857586c847515d3098a7538816c61a145d3822aec5509b0fe5c9ccff14789e0603c8ea1
6448 languageName: node 7521 languageName: node
6449 linkType: hard 7522 linkType: hard
6450 7523
6451"smart-buffer@npm:^4.2.0": 7524"smart-buffer@npm:^4.2.0":
6452 version: 4.2.0 7525 version: 4.2.0
6453 resolution: "smart-buffer@npm:4.2.0" 7526 resolution: "smart-buffer@npm:4.2.0"
6454 checksum: 898a5ce4651108164625916aa54b6f7c13e86279a31dd321737d27c4b795cfaaeb1c30417f8809029d80d20710d8a5045998afd35e0f1080b32648f5670aa99b 7527 checksum: a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539
6455 languageName: node 7528 languageName: node
6456 linkType: hard 7529 linkType: hard
6457 7530
@@ -6462,7 +7535,7 @@ __metadata:
6462 agent-base: "npm:^6.0.2" 7535 agent-base: "npm:^6.0.2"
6463 debug: "npm:^4.3.3" 7536 debug: "npm:^4.3.3"
6464 socks: "npm:^2.6.2" 7537 socks: "npm:^2.6.2"
6465 checksum: d57c2c68a2c16a2ac0af30971e1c4899e80cab3bbe405fe2fa3fce26ccd007fe855110b97c0e6d96ddc56926e1e5927a868070cb09185a768d1ad8cbe1a68aa5 7538 checksum: b859f7eb8e96ec2c4186beea233ae59c02404094f3eb009946836af27d6e5c1627d1975a69b4d2e20611729ed543b6db3ae8481eb38603433c50d0345c987600
6466 languageName: node 7539 languageName: node
6467 linkType: hard 7540 linkType: hard
6468 7541
@@ -6472,14 +7545,14 @@ __metadata:
6472 dependencies: 7545 dependencies:
6473 ip: "npm:^2.0.0" 7546 ip: "npm:^2.0.0"
6474 smart-buffer: "npm:^4.2.0" 7547 smart-buffer: "npm:^4.2.0"
6475 checksum: a8026d6abfcd168a661240848f6989fbba66276e8fa97ff1cb1079c2f3c6907dcc8284fcbc4f6d3fee8d071afb4fc8313da7e5fbf6d8768f206347a671f1542b 7548 checksum: 43f69dbc9f34fc8220bc51c6eea1c39715ab3cfdb115d6e3285f6c7d1a603c5c75655668a5bbc11e3c7e2c99d60321fb8d7ab6f38cda6a215fadd0d6d0b52130
6476 languageName: node 7549 languageName: node
6477 linkType: hard 7550 linkType: hard
6478 7551
6479"source-map-js@npm:^1.0.2": 7552"source-map-js@npm:^1.0.2":
6480 version: 1.0.2 7553 version: 1.0.2
6481 resolution: "source-map-js@npm:1.0.2" 7554 resolution: "source-map-js@npm:1.0.2"
6482 checksum: 4496d29f371909dbc27dfb302f31cadc70b6f1591b2b433337daf923fac30e9632523e169494b40d06b53228166a577875a3610bce3412de8bb600152f748a9c 7555 checksum: 32f2dfd1e9b7168f9a9715eb1b4e21905850f3b50cf02cf476e47e4eebe8e6b762b63a64357896aa29b37e24922b4282df0f492e0d2ace572b43d15525976ff8
6483 languageName: node 7556 languageName: node
6484 linkType: hard 7557 linkType: hard
6485 7558
@@ -6489,21 +7562,21 @@ __metadata:
6489 dependencies: 7562 dependencies:
6490 buffer-from: "npm:^1.0.0" 7563 buffer-from: "npm:^1.0.0"
6491 source-map: "npm:^0.6.0" 7564 source-map: "npm:^0.6.0"
6492 checksum: ab0f9bfbcfc32018966a7199de5aeafee03a38408852400962d302392aab16d670dc84e6eda937570c5ff09972ae23347804cdffc5fe3c5e382a5b04cee3d580 7565 checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d
6493 languageName: node 7566 languageName: node
6494 linkType: hard 7567 linkType: hard
6495 7568
6496"source-map@npm:^0.5.7": 7569"source-map@npm:^0.5.7":
6497 version: 0.5.7 7570 version: 0.5.7
6498 resolution: "source-map@npm:0.5.7" 7571 resolution: "source-map@npm:0.5.7"
6499 checksum: fd1c3c795c360e43fed3f7e80ff227c2156dbe3c69d20a9bf9c4b299a1cbe412cb6f9561fc6f636496f1bf44a28a06edcc0fb4a16de17db903481a063683f45a 7572 checksum: 904e767bb9c494929be013017380cbba013637da1b28e5943b566031e29df04fba57edf3f093e0914be094648b577372bd8ad247fa98cfba9c600794cd16b599
6500 languageName: node 7573 languageName: node
6501 linkType: hard 7574 linkType: hard
6502 7575
6503"source-map@npm:^0.6.0, source-map@npm:~0.6.0, source-map@npm:~0.6.1": 7576"source-map@npm:^0.6.0, source-map@npm:~0.6.0, source-map@npm:~0.6.1":
6504 version: 0.6.1 7577 version: 0.6.1
6505 resolution: "source-map@npm:0.6.1" 7578 resolution: "source-map@npm:0.6.1"
6506 checksum: cba9f44c3a4a0485f44a7760ebe427eecdd3b58011ae0459c05506b54f898835b2302073d6afa563a19b60ee9e54c82e33bc4a032e28bebacdfc635f1d0bf7e0 7579 checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011
6507 languageName: node 7580 languageName: node
6508 linkType: hard 7581 linkType: hard
6509 7582
@@ -6512,34 +7585,34 @@ __metadata:
6512 resolution: "source-map@npm:0.8.0-beta.0" 7585 resolution: "source-map@npm:0.8.0-beta.0"
6513 dependencies: 7586 dependencies:
6514 whatwg-url: "npm:^7.0.0" 7587 whatwg-url: "npm:^7.0.0"
6515 checksum: 4bc71864ed618ad3a75194fee233aff938dd1716010e34ca8c33e3216a5977ebf56ae6cd1102f72be1a9a7388d25c55865f7710ba30ea5255e8713f38eae89b3 7588 checksum: fb4d9bde9a9fdb2c29b10e5eae6c71d10e09ef467e1afb75fdec2eb7e11fa5b343a2af553f74f18b695dbc0b81f9da2e9fa3d7a317d5985e9939499ec6087835
6516 languageName: node 7589 languageName: node
6517 linkType: hard 7590 linkType: hard
6518 7591
6519"sourcemap-codec@npm:^1.4.8": 7592"sourcemap-codec@npm:^1.4.8":
6520 version: 1.4.8 7593 version: 1.4.8
6521 resolution: "sourcemap-codec@npm:1.4.8" 7594 resolution: "sourcemap-codec@npm:1.4.8"
6522 checksum: 16bd825c262a260854606ce89d836312a36a9b7d70fba54f17c2d9c395ad99a61b4f6b333f3f830ce09a37c234668ff6a7ece172b9964a2d78f9d433bf0e1e93 7595 checksum: f099279fdaae070ff156df7414bbe39aad69cdd615454947ed3e19136bfdfcb4544952685ee73f56e17038f4578091e12b17b283ed8ac013882916594d95b9e6
6523 languageName: node 7596 languageName: node
6524 linkType: hard 7597 linkType: hard
6525 7598
6526"ssri@npm:^10.0.0": 7599"ssri@npm:^10.0.0":
6527 version: 10.0.4 7600 version: 10.0.5
6528 resolution: "ssri@npm:10.0.4" 7601 resolution: "ssri@npm:10.0.5"
6529 dependencies: 7602 dependencies:
6530 minipass: "npm:^5.0.0" 7603 minipass: "npm:^7.0.3"
6531 checksum: 6c98b01cbec2953f24701a207a34b977afafdd306dd8cd1aedf1188cb7066ae656529e04aebbe29f02809510c78a8b509591b3a7ee89a4e5d2c954f07f2b2b0a 7604 checksum: b091f2ae92474183c7ac5ed3f9811457e1df23df7a7e70c9476eaa9a0c4a0c8fc190fb45acefbf023ca9ee864dd6754237a697dc52a0fb182afe65d8e77443d8
6532 languageName: node 7605 languageName: node
6533 linkType: hard 7606 linkType: hard
6534 7607
6535"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.3": 7608"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3":
6536 version: 4.2.3 7609 version: 4.2.3
6537 resolution: "string-width@npm:4.2.3" 7610 resolution: "string-width@npm:4.2.3"
6538 dependencies: 7611 dependencies:
6539 emoji-regex: "npm:^8.0.0" 7612 emoji-regex: "npm:^8.0.0"
6540 is-fullwidth-code-point: "npm:^3.0.0" 7613 is-fullwidth-code-point: "npm:^3.0.0"
6541 strip-ansi: "npm:^6.0.1" 7614 strip-ansi: "npm:^6.0.1"
6542 checksum: aa0f3e082b461e0dc8c54334ef2c748b777e7529c34d348ee16e69690da45e24f223804d94060633126462e2aa4906d6fbfab882f34036a9f4ccd3dbcd2d6931 7615 checksum: 1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b
6543 languageName: node 7616 languageName: node
6544 linkType: hard 7617 linkType: hard
6545 7618
@@ -6550,7 +7623,7 @@ __metadata:
6550 eastasianwidth: "npm:^0.2.0" 7623 eastasianwidth: "npm:^0.2.0"
6551 emoji-regex: "npm:^9.2.2" 7624 emoji-regex: "npm:^9.2.2"
6552 strip-ansi: "npm:^7.0.1" 7625 strip-ansi: "npm:^7.0.1"
6553 checksum: cb2b2392bfd8114452b7adbe578d0472d706e01792a6b7cd35f15fe3afbda37fa26348cb984d01acebd5f9ccdb0e62a0c57cc0ec1fc7c2a5d01ef83e5afd8807 7626 checksum: ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca
6554 languageName: node 7627 languageName: node
6555 linkType: hard 7628 linkType: hard
6556 7629
@@ -6566,7 +7639,7 @@ __metadata:
6566 internal-slot: "npm:^1.0.3" 7639 internal-slot: "npm:^1.0.3"
6567 regexp.prototype.flags: "npm:^1.4.3" 7640 regexp.prototype.flags: "npm:^1.4.3"
6568 side-channel: "npm:^1.0.4" 7641 side-channel: "npm:^1.0.4"
6569 checksum: 3419a05feb3719ec9ad3d51fd29350d46e5b292b67df9488abe70ad50c37f7785a09e132c98b49a2750bf706792d0557da05967a95d828e0734054bea3939dd8 7642 checksum: 644523d05c1ee93bab7474e999a5734ee5f6ad2d7ad24ed6ea8706c270dc92b352bde0f2a5420bfbeed54e28cb6a770c3800e1988a5267a70fd5e677c7750abc
6570 languageName: node 7643 languageName: node
6571 linkType: hard 7644 linkType: hard
6572 7645
@@ -6577,7 +7650,7 @@ __metadata:
6577 call-bind: "npm:^1.0.2" 7650 call-bind: "npm:^1.0.2"
6578 define-properties: "npm:^1.1.4" 7651 define-properties: "npm:^1.1.4"
6579 es-abstract: "npm:^1.20.4" 7652 es-abstract: "npm:^1.20.4"
6580 checksum: 424e6ba5ec9778a637c225c2c06461882367fa91e03b30ab78a50b275ec95e6516f25cb44439e1b98d43931a4a1d9d023bd5d2dd0f9b203d468b541b7ea205f5 7653 checksum: 31698f6d718794e422db6fcfa6685dcd9243097273b3b2a8b7948b5d45a183cd336378893ff0d4a7b2531b604c32bb5c45193dd6da3d2f5504df5cd222372c09
6581 languageName: node 7654 languageName: node
6582 linkType: hard 7655 linkType: hard
6583 7656
@@ -6588,7 +7661,7 @@ __metadata:
6588 call-bind: "npm:^1.0.2" 7661 call-bind: "npm:^1.0.2"
6589 define-properties: "npm:^1.1.4" 7662 define-properties: "npm:^1.1.4"
6590 es-abstract: "npm:^1.20.4" 7663 es-abstract: "npm:^1.20.4"
6591 checksum: 0c6b262932e2f065b4097fd3b17254b8fa2ac953f26d190e4defa2f01bca3313067c6672ff8b853f66edc2b4743af196f00ecd3c75f131d53fa772b16692cbf8 7664 checksum: 51b663e3195a74b58620a250b3fc4efb58951000f6e7d572a9f671c038f2f37f24a2b8c6994500a882aeab2f1c383fac1e8c023c01eb0c8b4e52d2f13b6c4513
6592 languageName: node 7665 languageName: node
6593 linkType: hard 7666 linkType: hard
6594 7667
@@ -6599,7 +7672,7 @@ __metadata:
6599 call-bind: "npm:^1.0.2" 7672 call-bind: "npm:^1.0.2"
6600 define-properties: "npm:^1.1.4" 7673 define-properties: "npm:^1.1.4"
6601 es-abstract: "npm:^1.20.4" 7674 es-abstract: "npm:^1.20.4"
6602 checksum: 87a4f42e4c0bde3508cb8d95260919c73ae4af5573fdbca1cd173d9ce53153d83b0fc3d218d49b9cabdca440ae71cd44b85a659cddd477b27b3f1344dc023a65 7675 checksum: 13b9970d4e234002dfc8069c655c1fe19e83e10ced208b54858c41bb0f7544e581ac0ce746e92b279563664ad63910039f7253f36942113fec413b2b4e7c1fcd
6603 languageName: node 7676 languageName: node
6604 linkType: hard 7677 linkType: hard
6605 7678
@@ -6608,7 +7681,7 @@ __metadata:
6608 resolution: "string_decoder@npm:1.3.0" 7681 resolution: "string_decoder@npm:1.3.0"
6609 dependencies: 7682 dependencies:
6610 safe-buffer: "npm:~5.2.0" 7683 safe-buffer: "npm:~5.2.0"
6611 checksum: c6b892bdb15861a68c4f9599bdff3909c70b1a2cee73d226a235b8fbadfc0aa060bdd265cb3fd86e856cee6d98cd0d657f84098cb51241f4fae19d0cacf9e13e 7684 checksum: 810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d
6612 languageName: node 7685 languageName: node
6613 linkType: hard 7686 linkType: hard
6614 7687
@@ -6619,7 +7692,7 @@ __metadata:
6619 get-own-enumerable-property-symbols: "npm:^3.0.0" 7692 get-own-enumerable-property-symbols: "npm:^3.0.0"
6620 is-obj: "npm:^1.0.1" 7693 is-obj: "npm:^1.0.1"
6621 is-regexp: "npm:^1.0.0" 7694 is-regexp: "npm:^1.0.0"
6622 checksum: da2805ea2128ba2b86fffadce1a3648d46e6e5474a17a928b522374028dd5c71a11fc61b7a11c8870fb5dbac578883000b20d9d51e67af00c394bac10b17dca8 7695 checksum: ba8078f84128979ee24b3de9a083489cbd3c62cb8572a061b47d4d82601a8ae4b4d86fa8c54dd955593da56bb7c16a6de51c27221fdc6b7139bb4f29d815f35b
6623 languageName: node 7696 languageName: node
6624 linkType: hard 7697 linkType: hard
6625 7698
@@ -6628,7 +7701,7 @@ __metadata:
6628 resolution: "strip-ansi@npm:6.0.1" 7701 resolution: "strip-ansi@npm:6.0.1"
6629 dependencies: 7702 dependencies:
6630 ansi-regex: "npm:^5.0.1" 7703 ansi-regex: "npm:^5.0.1"
6631 checksum: 056ca08f8097351060572eee207ec66247937d7248780a3d643b5eed7d6b5ca6a0990a4f921ffd329e8e9b66427a384237892ac3cb47463adf7d040b154084ec 7704 checksum: 1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952
6632 languageName: node 7705 languageName: node
6633 linkType: hard 7706 linkType: hard
6634 7707
@@ -6637,42 +7710,42 @@ __metadata:
6637 resolution: "strip-ansi@npm:7.1.0" 7710 resolution: "strip-ansi@npm:7.1.0"
6638 dependencies: 7711 dependencies:
6639 ansi-regex: "npm:^6.0.1" 7712 ansi-regex: "npm:^6.0.1"
6640 checksum: 09f81cbad0ac6e3dbe1c425429135432e91b1a61b7799587cb38aa24fb661aa5a83eaaf579e241ac1a4cac39fee97501c15226099728e56759abc6846b51917a 7713 checksum: a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4
6641 languageName: node 7714 languageName: node
6642 linkType: hard 7715 linkType: hard
6643 7716
6644"strip-bom@npm:^3.0.0": 7717"strip-bom@npm:^3.0.0":
6645 version: 3.0.0 7718 version: 3.0.0
6646 resolution: "strip-bom@npm:3.0.0" 7719 resolution: "strip-bom@npm:3.0.0"
6647 checksum: 115a5e3d9edddfd0f719604747ccb28c47ffb46a914a854e5430af163ef9965aba377b90a692531310e53c72191733c791fbf1751ae5b2bbe492c169fd759314 7720 checksum: 51201f50e021ef16672593d7434ca239441b7b760e905d9f33df6e4f3954ff54ec0e0a06f100d028af0982d6f25c35cd5cda2ce34eaebccd0250b8befb90d8f1
6648 languageName: node 7721 languageName: node
6649 linkType: hard 7722 linkType: hard
6650 7723
6651"strip-comments@npm:^2.0.1": 7724"strip-comments@npm:^2.0.1":
6652 version: 2.0.1 7725 version: 2.0.1
6653 resolution: "strip-comments@npm:2.0.1" 7726 resolution: "strip-comments@npm:2.0.1"
6654 checksum: 1f4e5c28b608fcdd590cb10b91d875bca0991da9a876c4af24a163ccdfca48fdeba0418e363fd1dc4cea74141a05b516caffb217b87f4269629dc76fa017719f 7727 checksum: 984321b1ec47a531bdcfddd87f217590934e2d2f142198a080ec88588280239a5b58a81ca780730679b6195e52afef83673c6d6466c07c2277f71f44d7d9553d
6655 languageName: node 7728 languageName: node
6656 linkType: hard 7729 linkType: hard
6657 7730
6658"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": 7731"strip-json-comments@npm:^3.1.1":
6659 version: 3.1.1 7732 version: 3.1.1
6660 resolution: "strip-json-comments@npm:3.1.1" 7733 resolution: "strip-json-comments@npm:3.1.1"
6661 checksum: 20cff3f15267a8b603c4dcec9c3cc5217bcf3f1a66481a4f9ecf262eacc1733a0457756288472328d24efef7705f7755e9511f9c383742389add93d4a9207ae5 7734 checksum: 9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd
6662 languageName: node 7735 languageName: node
6663 linkType: hard 7736 linkType: hard
6664 7737
6665"style-mod@npm:^4.0.0": 7738"style-mod@npm:^4.0.0, style-mod@npm:^4.1.0":
6666 version: 4.0.3 7739 version: 4.1.0
6667 resolution: "style-mod@npm:4.0.3" 7740 resolution: "style-mod@npm:4.1.0"
6668 checksum: ca62a9ff3e9cbf4f35e26118916771cbf46d30e2207d7243f4a111b8645e86be544f40fa8d67d4c7c946cfae88a89013dff42746c6b026cc4a6cc0a9d6e85cef 7741 checksum: 1dce7b0f3d1a91c9e6c37200627b5a9ffa943916bb5879dfaa800c3929fcc11b9bfcc2a6097f49ec3462b254b7afcbcf63caeae6895f53c80122523dc9e5ddb7
6669 languageName: node 7742 languageName: node
6670 linkType: hard 7743 linkType: hard
6671 7744
6672"stylis@npm:4.2.0": 7745"stylis@npm:4.2.0":
6673 version: 4.2.0 7746 version: 4.2.0
6674 resolution: "stylis@npm:4.2.0" 7747 resolution: "stylis@npm:4.2.0"
6675 checksum: c7ee385328bfaf1b0de0a13ec773da26d11e534c111f3ef72d1ff751e276ec6cd221c10476d14a9581ff25758ab1dce74c115000aa2eb9140ceca977491e8708 7748 checksum: a7128ad5a8ed72652c6eba46bed4f416521bc9745a460ef5741edc725252cebf36ee45e33a8615a7057403c93df0866ab9ee955960792db210bb80abd5ac6543
6676 languageName: node 7749 languageName: node
6677 linkType: hard 7750 linkType: hard
6678 7751
@@ -6681,7 +7754,7 @@ __metadata:
6681 resolution: "supports-color@npm:5.5.0" 7754 resolution: "supports-color@npm:5.5.0"
6682 dependencies: 7755 dependencies:
6683 has-flag: "npm:^3.0.0" 7756 has-flag: "npm:^3.0.0"
6684 checksum: 2eca8c4c8fccd2bd0027af240f85e99b1c9cb221186288dd478ce0fc61bdc07394e47f1bba2c91fe3ae432764772e3639e9c48bef19817267f151ae4a9b9ebef 7757 checksum: 6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05
6685 languageName: node 7758 languageName: node
6686 linkType: hard 7759 linkType: hard
6687 7760
@@ -6690,14 +7763,14 @@ __metadata:
6690 resolution: "supports-color@npm:7.2.0" 7763 resolution: "supports-color@npm:7.2.0"
6691 dependencies: 7764 dependencies:
6692 has-flag: "npm:^4.0.0" 7765 has-flag: "npm:^4.0.0"
6693 checksum: 9218cc0d12c57f4ae213e6ace98e0cda2d8f47617300f21501a0078e17d9e3b4aa3effdc1006e369dfd5389ff4f99682b9617d4a8fb7566e2964955dd14d4cc3 7766 checksum: afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124
6694 languageName: node 7767 languageName: node
6695 linkType: hard 7768 linkType: hard
6696 7769
6697"supports-preserve-symlinks-flag@npm:^1.0.0": 7770"supports-preserve-symlinks-flag@npm:^1.0.0":
6698 version: 1.0.0 7771 version: 1.0.0
6699 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" 7772 resolution: "supports-preserve-symlinks-flag@npm:1.0.0"
6700 checksum: 14609489b044de2eaffe0e7549173bb39d6997510ac4b7279d07bf2aafe309205abe172a8c8d248062a24e32ab61a2ae85efc5b4cdf7f932c7cdbe81ca1f39ec 7773 checksum: 6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39
6701 languageName: node 7774 languageName: node
6702 linkType: hard 7775 linkType: hard
6703 7776
@@ -6707,14 +7780,14 @@ __metadata:
6707 dependencies: 7780 dependencies:
6708 "@pkgr/utils": "npm:^2.3.1" 7781 "@pkgr/utils": "npm:^2.3.1"
6709 tslib: "npm:^2.5.0" 7782 tslib: "npm:^2.5.0"
6710 checksum: 4f8cad99ececb0f22d91780c9882d1ef51fd551051cbd53f4674876771007e3b0ed6adcf17622a9bca8f9f8b16f49d91c4cc37d25888bc9d7ab3470e496bc4a6 7783 checksum: 9827f828cabc404b3a147c38f824c8d5b846eb6f65189d965aa0b71ea8ecda5048f8f50b4bdfd8813148844175233cff56c6bc8d87a7118cf10707df870519f4
6711 languageName: node 7784 languageName: node
6712 linkType: hard 7785 linkType: hard
6713 7786
6714"tapable@npm:^2.2.0": 7787"tapable@npm:^2.2.0":
6715 version: 2.2.1 7788 version: 2.2.1
6716 resolution: "tapable@npm:2.2.1" 7789 resolution: "tapable@npm:2.2.1"
6717 checksum: d54320ef41e04b13e27e20bfc355bd27bccb4b1ac28123a35d36d903b393944a957a7629b56e808e1a2ef03dcaf1c114e97de7a1b7cbf16e522cd0630219702e 7790 checksum: bc40e6efe1e554d075469cedaba69a30eeb373552aaf41caeaaa45bf56ffacc2674261b106245bd566b35d8f3329b52d838e851ee0a852120acae26e622925c9
6718 languageName: node 7791 languageName: node
6719 linkType: hard 7792 linkType: hard
6720 7793
@@ -6728,14 +7801,14 @@ __metadata:
6728 minizlib: "npm:^2.1.1" 7801 minizlib: "npm:^2.1.1"
6729 mkdirp: "npm:^1.0.3" 7802 mkdirp: "npm:^1.0.3"
6730 yallist: "npm:^4.0.0" 7803 yallist: "npm:^4.0.0"
6731 checksum: 815c25f8812ad65172fa0440c96e5395714cfee8b43e9b2cf85d98964bbd479da49dde364087b9e456c49317f88e19aa2304c45c9853555d85289177c3066555 7804 checksum: bb2babe7b14442f690d83c2b2c571c9dd0bf802314773e05f4a3e4a241fdecd7fb560b8e4e7d6ea34533c8cd692e1b8418a3b8ba3b9687fe78a683dfbad7f82d
6732 languageName: node 7805 languageName: node
6733 linkType: hard 7806 linkType: hard
6734 7807
6735"temp-dir@npm:^2.0.0": 7808"temp-dir@npm:^2.0.0":
6736 version: 2.0.0 7809 version: 2.0.0
6737 resolution: "temp-dir@npm:2.0.0" 7810 resolution: "temp-dir@npm:2.0.0"
6738 checksum: 0b97706876e9982bb5f2bf8c1e040d087ec48051f7d91fe9f460bd8e5a1c833de89c6039e2e402b7388f4096c896392193082f5d78b8d4c89976edead9a88ce0 7811 checksum: b1df969e3f3f7903f3426861887ed76ba3b495f63f6d0c8e1ce22588679d9384d336df6064210fda14e640ed422e2a17d5c40d901f60e161c99482d723f4d309
6739 languageName: node 7812 languageName: node
6740 linkType: hard 7813 linkType: hard
6741 7814
@@ -6747,13 +7820,13 @@ __metadata:
6747 temp-dir: "npm:^2.0.0" 7820 temp-dir: "npm:^2.0.0"
6748 type-fest: "npm:^0.16.0" 7821 type-fest: "npm:^0.16.0"
6749 unique-string: "npm:^2.0.0" 7822 unique-string: "npm:^2.0.0"
6750 checksum: 0f681c3c5c5c1817781bd40536f1751384e98e35f8361c8e5ceb08abd6f92f02347646c81c12b32f2c80ea8434d3d7f19f66bd1f974a5f04facb5a3ec4f9604a 7823 checksum: ca0882276732d1313b85006b0427620cb4a8d7a57738a2311a72befae60ed152be7d5b41b951dcb447a01a35404bed76f33eb4e37c55263cd7f807eee1187f8f
6751 languageName: node 7824 languageName: node
6752 linkType: hard 7825 linkType: hard
6753 7826
6754"terser@npm:^5.0.0, terser@npm:^5.15.1": 7827"terser@npm:^5.0.0, terser@npm:^5.15.1":
6755 version: 5.18.0 7828 version: 5.19.2
6756 resolution: "terser@npm:5.18.0" 7829 resolution: "terser@npm:5.19.2"
6757 dependencies: 7830 dependencies:
6758 "@jridgewell/source-map": "npm:^0.3.3" 7831 "@jridgewell/source-map": "npm:^0.3.3"
6759 acorn: "npm:^8.8.2" 7832 acorn: "npm:^8.8.2"
@@ -6761,14 +7834,14 @@ __metadata:
6761 source-map-support: "npm:~0.5.20" 7834 source-map-support: "npm:~0.5.20"
6762 bin: 7835 bin:
6763 terser: bin/terser 7836 terser: bin/terser
6764 checksum: 7b295efb1f87d2ca4a38e1fbd7cf1fe48d69062a14bacb02f1ba2404593d06bfb244ddc89c55684eb744411b45dd8f6605bb562c6a5a427dcbd283efadac8d92 7837 checksum: 95817b86619af33d8d143d7ae02dfcd9ac2cf4ea5b5cb7b208aaccff4cdc5594893960a4c3dcdac09863ebd43e2835ab173997041790aa77092c1d31ff40c95a
6765 languageName: node 7838 languageName: node
6766 linkType: hard 7839 linkType: hard
6767 7840
6768"text-table@npm:^0.2.0": 7841"text-table@npm:^0.2.0":
6769 version: 0.2.0 7842 version: 0.2.0
6770 resolution: "text-table@npm:0.2.0" 7843 resolution: "text-table@npm:0.2.0"
6771 checksum: 65e9ab9cd26946c5378cd4b8782562f47e017bad4fe8d398356380fdc762d08b177ca6a1c5c8deac14fbe974c46cd09c0cbb86560545cfa49800f3fcacb0c952 7844 checksum: 02805740c12851ea5982686810702e2f14369a5f4c5c40a836821e3eefc65ffeec3131ba324692a37608294b0fd8c1e55a2dd571ffed4909822787668ddbee5c
6772 languageName: node 7845 languageName: node
6773 linkType: hard 7846 linkType: hard
6774 7847
@@ -6778,14 +7851,14 @@ __metadata:
6778 dependencies: 7851 dependencies:
6779 globalyzer: "npm:0.1.0" 7852 globalyzer: "npm:0.1.0"
6780 globrex: "npm:^0.1.2" 7853 globrex: "npm:^0.1.2"
6781 checksum: 41f9a38124164bda6a2149f951e046c555a508ce22cbad2d08b7d4066622faa6933feae503c647815342b9e461ffc93cf7e41b28e835030480b081e000b1caf7 7854 checksum: cbe072f0d213a1395d30aa94845a051d4af18fe8ffb79c8e99ac1787cd25df69083f17791a53997cb65f469f48950cb61426ccc0683cc9df170ac2430e883702
6782 languageName: node 7855 languageName: node
6783 linkType: hard 7856 linkType: hard
6784 7857
6785"to-fast-properties@npm:^2.0.0": 7858"to-fast-properties@npm:^2.0.0":
6786 version: 2.0.0 7859 version: 2.0.0
6787 resolution: "to-fast-properties@npm:2.0.0" 7860 resolution: "to-fast-properties@npm:2.0.0"
6788 checksum: 49d863a314830916634c1a28911db62be419b93fbc430c18955584f112d0e20ccd078c319c5a9af077e11bbf42cdcd8405726262bfb2d4db9fe91ae9f5585ed2 7861 checksum: b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7
6789 languageName: node 7862 languageName: node
6790 linkType: hard 7863 linkType: hard
6791 7864
@@ -6794,7 +7867,7 @@ __metadata:
6794 resolution: "to-regex-range@npm:5.0.1" 7867 resolution: "to-regex-range@npm:5.0.1"
6795 dependencies: 7868 dependencies:
6796 is-number: "npm:^7.0.0" 7869 is-number: "npm:^7.0.0"
6797 checksum: 16564897c76bbd25bd3c375ee8d4b1fd3ac965fc4ab550ff034a1dddb53816ec06dc27095468394ad4de5978d5e831a9d1ae4cb31080dc4ebd9ba80a47dc1a4f 7870 checksum: 487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892
6798 languageName: node 7871 languageName: node
6799 linkType: hard 7872 linkType: hard
6800 7873
@@ -6803,11 +7876,20 @@ __metadata:
6803 resolution: "tr46@npm:1.0.1" 7876 resolution: "tr46@npm:1.0.1"
6804 dependencies: 7877 dependencies:
6805 punycode: "npm:^2.1.0" 7878 punycode: "npm:^2.1.0"
6806 checksum: 077551401b0752fb141ba39d6c287b3783d32ac5a054a0e991b084c888e47789857f2957199840c1f1529deb9c6b9cbd53ab836f3bfcad41411f430e8685ddd8 7879 checksum: 41525c2ccce86e3ef30af6fa5e1464e6d8bb4286a58ea8db09228f598889581ef62347153f6636cd41553dc41685bdfad0a9d032ef58df9fbb0792b3447d0f04
7880 languageName: node
7881 linkType: hard
7882
7883"ts-api-utils@npm:^1.0.1":
7884 version: 1.0.1
7885 resolution: "ts-api-utils@npm:1.0.1"
7886 peerDependencies:
7887 typescript: ">=4.2.0"
7888 checksum: 8e8a54afb44df31c413e6f5b817a305a37780726125db26e85d01d553efc31aacb3ccad111a14844b584776f24e71bcd4db2f2d3e9bce8031a329dc78f3e46e2
6807 languageName: node 7889 languageName: node
6808 linkType: hard 7890 linkType: hard
6809 7891
6810"tsconfig-paths@npm:^3.14.1": 7892"tsconfig-paths@npm:^3.14.2":
6811 version: 3.14.2 7893 version: 3.14.2
6812 resolution: "tsconfig-paths@npm:3.14.2" 7894 resolution: "tsconfig-paths@npm:3.14.2"
6813 dependencies: 7895 dependencies:
@@ -6815,32 +7897,14 @@ __metadata:
6815 json5: "npm:^1.0.2" 7897 json5: "npm:^1.0.2"
6816 minimist: "npm:^1.2.6" 7898 minimist: "npm:^1.2.6"
6817 strip-bom: "npm:^3.0.0" 7899 strip-bom: "npm:^3.0.0"
6818 checksum: e320ed312e798282cbdb037a0de88f7cf9c36514d38e21f1f538da8cfc436e199f44a9faa5073417f1110ef3db76256d873cf14dae1836bce5d541963ddf2c1b 7900 checksum: fdc92bb7b18b31c0e76f8ec4f98d07236b09590fd6578e587ad024792c8b2235d65125a8fd007fa47a84400f84ceccbf33f24e5198d953249e7204f4cef3517c
6819 languageName: node
6820 linkType: hard
6821
6822"tslib@npm:^1.8.1":
6823 version: 1.14.1
6824 resolution: "tslib@npm:1.14.1"
6825 checksum: 441af59dc42ad4ae57140e62cb362369620c6076845c2c2b0ecc863c1d719ce24fdbc301e9053433fef43075e061bf84b702318ff1204b496a5bba10baf9eb9f
6826 languageName: node 7901 languageName: node
6827 linkType: hard 7902 linkType: hard
6828 7903
6829"tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.4.0, tslib@npm:^2.5.0": 7904"tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.4.0, tslib@npm:^2.5.0":
6830 version: 2.5.3 7905 version: 2.6.1
6831 resolution: "tslib@npm:2.5.3" 7906 resolution: "tslib@npm:2.6.1"
6832 checksum: d31480d5acbcb467291d548bffce51692774b831ac8ce73f9f2049ec217f3c741ed85a0c98924bd61f95633f1c48858d18aa861d754c80df3bd67effcc144a3e 7907 checksum: a0382d386f5f1d6e3a39ab22bc56d1e08493da99ab3daf550e63bae6c08fdd6dd4fd20623ef387cad8262ce3fede98439257054fc025f2103cd4603b4509a052
6833 languageName: node
6834 linkType: hard
6835
6836"tsutils@npm:^3.21.0":
6837 version: 3.21.0
6838 resolution: "tsutils@npm:3.21.0"
6839 dependencies:
6840 tslib: "npm:^1.8.1"
6841 peerDependencies:
6842 typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
6843 checksum: 723459d516fe94cd9f798436e9424357200f0cccd2804c3240dbe3d2f51fd85207110a756bb46ae0b0b6bd9420083a048e2b3d44a6534224cc34e5821d8aba7f
6844 languageName: node 7908 languageName: node
6845 linkType: hard 7909 linkType: hard
6846 7910
@@ -6849,21 +7913,57 @@ __metadata:
6849 resolution: "type-check@npm:0.4.0" 7913 resolution: "type-check@npm:0.4.0"
6850 dependencies: 7914 dependencies:
6851 prelude-ls: "npm:^1.2.1" 7915 prelude-ls: "npm:^1.2.1"
6852 checksum: 20afe001f1e32be931a04d1ae0529cf48e5e848cc89bb5a98904481916aa04fb4aa61e795cd94dad4f9b8daf7024bc97b90ac7f24885f0797c3f3c0a096bbece 7916 checksum: 7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58
6853 languageName: node 7917 languageName: node
6854 linkType: hard 7918 linkType: hard
6855 7919
6856"type-fest@npm:^0.16.0": 7920"type-fest@npm:^0.16.0":
6857 version: 0.16.0 7921 version: 0.16.0
6858 resolution: "type-fest@npm:0.16.0" 7922 resolution: "type-fest@npm:0.16.0"
6859 checksum: ffd937eefaad198981a04c906e95b51f369d465bba913d49ae93bd9e85162be328c6798770233363d13aa5d3469f679e188f4e12e88f2b71977ffe9293b1aea1 7923 checksum: 6b4d846534e7bcb49a6160b068ffaed2b62570d989d909ac3f29df5ef1e993859f890a4242eebe023c9e923f96adbcb3b3e88a198c35a1ee9a731e147a6839c3
6860 languageName: node 7924 languageName: node
6861 linkType: hard 7925 linkType: hard
6862 7926
6863"type-fest@npm:^0.20.2": 7927"type-fest@npm:^0.20.2":
6864 version: 0.20.2 7928 version: 0.20.2
6865 resolution: "type-fest@npm:0.20.2" 7929 resolution: "type-fest@npm:0.20.2"
6866 checksum: 9f39d342df851a98443ee9858345a8943bb71ffbf35eee36a2716ba601e810b46294a98ee78b39376120c349d6b2631979cb91afc8be6ea41b8d04eddc55f4d5 7930 checksum: dea9df45ea1f0aaa4e2d3bed3f9a0bfe9e5b2592bddb92eb1bf06e50bcf98dbb78189668cd8bc31a0511d3fc25539b4cd5c704497e53e93e2d40ca764b10bfc3
7931 languageName: node
7932 linkType: hard
7933
7934"typed-array-buffer@npm:^1.0.0":
7935 version: 1.0.0
7936 resolution: "typed-array-buffer@npm:1.0.0"
7937 dependencies:
7938 call-bind: "npm:^1.0.2"
7939 get-intrinsic: "npm:^1.2.1"
7940 is-typed-array: "npm:^1.1.10"
7941 checksum: ebad66cdf00c96b1395dffc7873169cf09801fca5954507a484f41f253feb1388d815db297b0b3bb8ce7421eac6f7ff45e2ec68450a3d68408aa4ae02fcf3a6c
7942 languageName: node
7943 linkType: hard
7944
7945"typed-array-byte-length@npm:^1.0.0":
7946 version: 1.0.0
7947 resolution: "typed-array-byte-length@npm:1.0.0"
7948 dependencies:
7949 call-bind: "npm:^1.0.2"
7950 for-each: "npm:^0.3.3"
7951 has-proto: "npm:^1.0.1"
7952 is-typed-array: "npm:^1.1.10"
7953 checksum: 6696435d53ce0e704ff6760c57ccc35138aec5f87859e03eb2a3246336d546feae367952dbc918116f3f0dffbe669734e3cbd8960283c2fa79aac925db50d888
7954 languageName: node
7955 linkType: hard
7956
7957"typed-array-byte-offset@npm:^1.0.0":
7958 version: 1.0.0
7959 resolution: "typed-array-byte-offset@npm:1.0.0"
7960 dependencies:
7961 available-typed-arrays: "npm:^1.0.5"
7962 call-bind: "npm:^1.0.2"
7963 for-each: "npm:^0.3.3"
7964 has-proto: "npm:^1.0.1"
7965 is-typed-array: "npm:^1.1.10"
7966 checksum: 4036ce007ae9752931bed3dd61e0d6de2a3e5f6a5a85a05f3adb35388d2c0728f9b1a1e638d75579f168e49c289bfb5417f00e96d4ab081f38b647fc854ff7a5
6867 languageName: node 7967 languageName: node
6868 linkType: hard 7968 linkType: hard
6869 7969
@@ -6874,27 +7974,27 @@ __metadata:
6874 call-bind: "npm:^1.0.2" 7974 call-bind: "npm:^1.0.2"
6875 for-each: "npm:^0.3.3" 7975 for-each: "npm:^0.3.3"
6876 is-typed-array: "npm:^1.1.9" 7976 is-typed-array: "npm:^1.1.9"
6877 checksum: bd196be0cb6c267e1fc8c3d54f19c1059d1082e0baf0f6735b39ed2a01e9dd2fef0593b1b03e0bdb9c29d1e6e34bbb1498f951a19b4c78bc5c7af6786fc3c6b6 7977 checksum: c5163c0103d07fefc8a2ad0fc151f9ca9a1f6422098c00f695d55f9896e4d63614cd62cf8d8a031c6cee5f418e8980a533796597174da4edff075b3d275a7e23
6878 languageName: node 7978 languageName: node
6879 linkType: hard 7979 linkType: hard
6880 7980
6881"typescript@npm:5.1.3": 7981"typescript@npm:5.2.2":
6882 version: 5.1.3 7982 version: 5.2.2
6883 resolution: "typescript@npm:5.1.3" 7983 resolution: "typescript@npm:5.2.2"
6884 bin: 7984 bin:
6885 tsc: bin/tsc 7985 tsc: bin/tsc
6886 tsserver: bin/tsserver 7986 tsserver: bin/tsserver
6887 checksum: 34f5c10a175ad596eb9ef7b12a0417d830317859754bddde67d6681c8bd7e67a24c88dfab600bf0deeb7355cb0f58faf7ab2a2c34a5d3c96f8420928f0f69b58 7987 checksum: 91ae3e6193d0ddb8656d4c418a033f0f75dec5e077ebbc2bd6d76439b93f35683936ee1bdc0e9cf94ec76863aa49f27159b5788219b50e1cd0cd6d110aa34b07
6888 languageName: node 7988 languageName: node
6889 linkType: hard 7989 linkType: hard
6890 7990
6891"typescript@patch:typescript@npm%3A5.1.3#optional!builtin<compat/typescript>": 7991"typescript@patch:typescript@npm%3A5.2.2#optional!builtin<compat/typescript>":
6892 version: 5.1.3 7992 version: 5.2.2
6893 resolution: "typescript@patch:typescript@npm%3A5.1.3#optional!builtin<compat/typescript>::version=5.1.3&hash=5da071" 7993 resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin<compat/typescript>::version=5.2.2&hash=f3b441"
6894 bin: 7994 bin:
6895 tsc: bin/tsc 7995 tsc: bin/tsc
6896 tsserver: bin/tsserver 7996 tsserver: bin/tsserver
6897 checksum: ef6d5eaa31049b41bf1ddf091806aed923e65ea3de951bb27e05bc65911c3bf373b3c2bcc9204d2d2dbdca7d2e06c6a645824580638a8c2c18e2e5155cfc33b7 7997 checksum: 062c1cee1990e6b9419ce8a55162b8dc917eb87f807e4de0327dbc1c2fa4e5f61bc0dd4e034d38ff541d1ed0479b53bcee8e4de3a4075c51a1724eb6216cb6f5
6898 languageName: node 7998 languageName: node
6899 linkType: hard 7999 linkType: hard
6900 8000
@@ -6906,14 +8006,14 @@ __metadata:
6906 has-bigints: "npm:^1.0.2" 8006 has-bigints: "npm:^1.0.2"
6907 has-symbols: "npm:^1.0.3" 8007 has-symbols: "npm:^1.0.3"
6908 which-boxed-primitive: "npm:^1.0.2" 8008 which-boxed-primitive: "npm:^1.0.2"
6909 checksum: de21ca5e49bb56d46c7d3672d3d2900b3859ee9541903993bca02a94a317ec1c720b316f025bf5c0f51f7ff9ad383782970acae0408b900ae0537727f614c4e1 8009 checksum: 81ca2e81134167cc8f75fa79fbcc8a94379d6c61de67090986a2273850989dd3bae8440c163121b77434b68263e34787a675cbdcb34bb2f764c6b9c843a11b66
6910 languageName: node 8010 languageName: node
6911 linkType: hard 8011 linkType: hard
6912 8012
6913"unicode-canonical-property-names-ecmascript@npm:^2.0.0": 8013"unicode-canonical-property-names-ecmascript@npm:^2.0.0":
6914 version: 2.0.0 8014 version: 2.0.0
6915 resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" 8015 resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0"
6916 checksum: 47e911d5e1d402ca900065fff87a02135ff25912ba685bf62baf32882db30167ab11bfcb2505d9d6ca494c7e1b056d66aefb21a4c2479b9772133776938dead2 8016 checksum: 0fe812641bcfa3ae433025178a64afb5d9afebc21a922dafa7cba971deebb5e4a37350423890750132a85c936c290fb988146d0b1bd86838ad4897f4fc5bd0de
6917 languageName: node 8017 languageName: node
6918 linkType: hard 8018 linkType: hard
6919 8019
@@ -6923,21 +8023,21 @@ __metadata:
6923 dependencies: 8023 dependencies:
6924 unicode-canonical-property-names-ecmascript: "npm:^2.0.0" 8024 unicode-canonical-property-names-ecmascript: "npm:^2.0.0"
6925 unicode-property-aliases-ecmascript: "npm:^2.0.0" 8025 unicode-property-aliases-ecmascript: "npm:^2.0.0"
6926 checksum: 1f153bf35cb44e664e230214d0dbfca9209125ec4a7097ad7771efd44497fa183d3d3e70ce625d0af42c2f0f37ccc70b18c6ad1d3465dd4c3bab5cb1a2206b6a 8026 checksum: 4d05252cecaf5c8e36d78dc5332e03b334c6242faf7cf16b3658525441386c0a03b5f603d42cbec0f09bb63b9fd25c9b3b09667aee75463cac3efadae2cd17ec
6927 languageName: node 8027 languageName: node
6928 linkType: hard 8028 linkType: hard
6929 8029
6930"unicode-match-property-value-ecmascript@npm:^2.1.0": 8030"unicode-match-property-value-ecmascript@npm:^2.1.0":
6931 version: 2.1.0 8031 version: 2.1.0
6932 resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" 8032 resolution: "unicode-match-property-value-ecmascript@npm:2.1.0"
6933 checksum: ed36ed18f4e49d95634712960967511b8a0da1a808e673e89ade10a317b29c636dbc19138656ff6cb5e90e1999c3ff3c40464d20846d21347b4300eac84698b9 8033 checksum: f5b9499b9e0ffdc6027b744d528f17ec27dd7c15da03254ed06851feec47e0531f20d410910c8a49af4a6a190f4978413794c8d75ce112950b56d583b5d5c7f2
6934 languageName: node 8034 languageName: node
6935 linkType: hard 8035 linkType: hard
6936 8036
6937"unicode-property-aliases-ecmascript@npm:^2.0.0": 8037"unicode-property-aliases-ecmascript@npm:^2.0.0":
6938 version: 2.1.0 8038 version: 2.1.0
6939 resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" 8039 resolution: "unicode-property-aliases-ecmascript@npm:2.1.0"
6940 checksum: 2a731ceba0a6d8e6b9bc576843f54f4ce5af36c1984a5a6023e012ceaa73f76a06dfc104b12a6b06f06decbd447d88980ec6787b44f708259b190d3594a84b85 8040 checksum: 50ded3f8c963c7785e48c510a3b7c6bc4e08a579551489aa0349680a35b1ceceec122e33b2b6c1b579d0be2250f34bb163ac35f5f8695fe10bbc67fb757f0af8
6941 languageName: node 8041 languageName: node
6942 linkType: hard 8042 linkType: hard
6943 8043
@@ -6946,7 +8046,7 @@ __metadata:
6946 resolution: "unique-filename@npm:3.0.0" 8046 resolution: "unique-filename@npm:3.0.0"
6947 dependencies: 8047 dependencies:
6948 unique-slug: "npm:^4.0.0" 8048 unique-slug: "npm:^4.0.0"
6949 checksum: 2624a9c87c31ef208bec3ffede4728770b0f8b1c056e546c7f89403ce55bac2f44d02d501ca4c20f853b7c67001ce4d8fb36d0750a58451b03ed85811ef80c77 8049 checksum: 6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f
6950 languageName: node 8050 languageName: node
6951 linkType: hard 8051 linkType: hard
6952 8052
@@ -6955,7 +8055,7 @@ __metadata:
6955 resolution: "unique-slug@npm:4.0.0" 8055 resolution: "unique-slug@npm:4.0.0"
6956 dependencies: 8056 dependencies:
6957 imurmurhash: "npm:^0.1.4" 8057 imurmurhash: "npm:^0.1.4"
6958 checksum: 4ba7a8d96a490850f9f5b80fd0f5958ce9369aac12c659405885ab9f1c6b908315cfeef218fed65966160dd9ca811eaa8ca6271f95adf5f70493891e9d852d8f 8058 checksum: cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635
6959 languageName: node 8059 languageName: node
6960 linkType: hard 8060 linkType: hard
6961 8061
@@ -6964,21 +8064,21 @@ __metadata:
6964 resolution: "unique-string@npm:2.0.0" 8064 resolution: "unique-string@npm:2.0.0"
6965 dependencies: 8065 dependencies:
6966 crypto-random-string: "npm:^2.0.0" 8066 crypto-random-string: "npm:^2.0.0"
6967 checksum: fbb774926206a5ac78fff1967e20383e4a8bff7f832363ffb5e0c11146bb1db05ff2231caac05773fd331e57ec5863b66261d16a36ec3c850d094cbd38b7947c 8067 checksum: 11820db0a4ba069d174bedfa96c588fc2c96b083066fafa186851e563951d0de78181ac79c744c1ed28b51f9d82ac5b8196ff3e4560d0178046ef455d8c2244b
6968 languageName: node 8068 languageName: node
6969 linkType: hard 8069 linkType: hard
6970 8070
6971"universalify@npm:^2.0.0": 8071"universalify@npm:^2.0.0":
6972 version: 2.0.0 8072 version: 2.0.0
6973 resolution: "universalify@npm:2.0.0" 8073 resolution: "universalify@npm:2.0.0"
6974 checksum: 243b0697a640cda1912e62a79f9439ec24b937df9a9a47ee7dd5fe813c4547300a3dc346e0c7c10dbd925f54a19507e8de915f2562a5e694716bdcd0825d48f6 8074 checksum: 07092b9f46df61b823d8ab5e57f0ee5120c178b39609a95e4a15a98c42f6b0b8e834e66fbb47ff92831786193be42f1fd36347169b88ce8639d0f9670af24a71
6975 languageName: node 8075 languageName: node
6976 linkType: hard 8076 linkType: hard
6977 8077
6978"upath@npm:^1.2.0": 8078"upath@npm:^1.2.0":
6979 version: 1.2.0 8079 version: 1.2.0
6980 resolution: "upath@npm:1.2.0" 8080 resolution: "upath@npm:1.2.0"
6981 checksum: d4bc0a9ff874fb80c2a7b666791f9680a8169a49a6592662123030cbc969c99136f9962097eaf502de74572a01c84e65f1f4e120190820bc8a9ac8691b77e1d1 8081 checksum: 3746f24099bf69dbf8234cecb671e1016e1f6b26bd306de4ff8966fb0bc463fa1014ffc48646b375de1ab573660e3a0256f6f2a87218b2dfa1779a84ef6992fa
6982 languageName: node 8082 languageName: node
6983 linkType: hard 8083 linkType: hard
6984 8084
@@ -6992,7 +8092,7 @@ __metadata:
6992 browserslist: ">= 4.21.0" 8092 browserslist: ">= 4.21.0"
6993 bin: 8093 bin:
6994 update-browserslist-db: cli.js 8094 update-browserslist-db: cli.js
6995 checksum: adce84b01c28606050eb73df75b36404fe531727484ebc5a3f6d12c23413155a82205a7c773ee05b8fb27d0fa719e66c970fb90ecced57a54106b89249dd6bb3 8095 checksum: 280d5cf92e302d8de0c12ef840a6af26ec024a5158aa2020975cd01bf0ded09c709793a6f421e6d0f1a47557d6a1a10dc43af80f9c30b8fd0df9691eb98c1c69
6996 languageName: node 8096 languageName: node
6997 linkType: hard 8097 linkType: hard
6998 8098
@@ -7001,45 +8101,68 @@ __metadata:
7001 resolution: "uri-js@npm:4.4.1" 8101 resolution: "uri-js@npm:4.4.1"
7002 dependencies: 8102 dependencies:
7003 punycode: "npm:^2.1.0" 8103 punycode: "npm:^2.1.0"
7004 checksum: 284fedd1b11512a77e783bfd32b320a9af1f2e39fbfabf4d65d64122344a3f55b8d37ec0c77e0045f7467b99d24bd2c067c1224d74f5c76b069753c7276d8709 8104 checksum: 4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c
8105 languageName: node
8106 linkType: hard
8107
8108"use-sync-external-store@npm:^1.2.0":
8109 version: 1.2.0
8110 resolution: "use-sync-external-store@npm:1.2.0"
8111 peerDependencies:
8112 react: ^16.8.0 || ^17.0.0 || ^18.0.0
8113 checksum: ac4814e5592524f242921157e791b022efe36e451fe0d4fd4d204322d5433a4fc300d63b0ade5185f8e0735ded044c70bcf6d2352db0f74d097a238cebd2da02
7005 languageName: node 8114 languageName: node
7006 linkType: hard 8115 linkType: hard
7007 8116
7008"util-deprecate@npm:^1.0.1": 8117"util-deprecate@npm:^1.0.1":
7009 version: 1.0.2 8118 version: 1.0.2
7010 resolution: "util-deprecate@npm:1.0.2" 8119 resolution: "util-deprecate@npm:1.0.2"
7011 checksum: 6a88ed8344d07f2324b304ee36def365d967953b5a9c15baa3213eb3909e86a7da1ee70a4c2133e80c23d6c1987590e9c3c57d874e20a124f9e41620b462fa57 8120 checksum: 41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942
8121 languageName: node
8122 linkType: hard
8123
8124"util@npm:^0.12.0":
8125 version: 0.12.5
8126 resolution: "util@npm:0.12.5"
8127 dependencies:
8128 inherits: "npm:^2.0.3"
8129 is-arguments: "npm:^1.0.4"
8130 is-generator-function: "npm:^1.0.7"
8131 is-typed-array: "npm:^1.1.3"
8132 which-typed-array: "npm:^1.1.2"
8133 checksum: c27054de2cea2229a66c09522d0fa1415fb12d861d08523a8846bf2e4cbf0079d4c3f725f09dcb87493549bcbf05f5798dce1688b53c6c17201a45759e7253f3
7012 languageName: node 8134 languageName: node
7013 linkType: hard 8135 linkType: hard
7014 8136
7015"vite-plugin-pwa@npm:^0.16.4": 8137"vite-plugin-pwa@npm:^0.16.5":
7016 version: 0.16.4 8138 version: 0.16.5
7017 resolution: "vite-plugin-pwa@npm:0.16.4" 8139 resolution: "vite-plugin-pwa@npm:0.16.5"
7018 dependencies: 8140 dependencies:
7019 debug: "npm:^4.3.4" 8141 debug: "npm:^4.3.4"
7020 fast-glob: "npm:^3.2.12" 8142 fast-glob: "npm:^3.3.1"
7021 pretty-bytes: "npm:^6.0.0" 8143 pretty-bytes: "npm:^6.1.1"
7022 workbox-build: "npm:^7.0.0" 8144 workbox-build: "npm:^7.0.0"
7023 workbox-window: "npm:^7.0.0" 8145 workbox-window: "npm:^7.0.0"
7024 peerDependencies: 8146 peerDependencies:
7025 vite: ^3.1.0 || ^4.0.0 8147 vite: ^3.1.0 || ^4.0.0
7026 workbox-build: ^7.0.0 8148 workbox-build: ^7.0.0
7027 workbox-window: ^7.0.0 8149 workbox-window: ^7.0.0
7028 checksum: 5e097ff7f9fb6626ce7be797b7609f7f3d6f0fc03d3391e999f0d96d4b4619a1f7ac46e6d4d570ebe26c1fd50f36c3891c5719e9158c04827699428d0d7a90d5 8150 checksum: 387ee7ed449aff31589facf79e2a2e252ae47d469fdb71c9083d82d80e38e1ddcfbe9e05a4ef150371612415dd5e808ce33352dd4dca5e800a3df1eb24045143
7029 languageName: node 8151 languageName: node
7030 linkType: hard 8152 linkType: hard
7031 8153
7032"vite@npm:^4.3.9": 8154"vite@npm:^4.4.9":
7033 version: 4.3.9 8155 version: 4.4.9
7034 resolution: "vite@npm:4.3.9" 8156 resolution: "vite@npm:4.4.9"
7035 dependencies: 8157 dependencies:
7036 esbuild: "npm:^0.17.5" 8158 esbuild: "npm:^0.18.10"
7037 fsevents: "npm:~2.3.2" 8159 fsevents: "npm:~2.3.2"
7038 postcss: "npm:^8.4.23" 8160 postcss: "npm:^8.4.27"
7039 rollup: "npm:^3.21.0" 8161 rollup: "npm:^3.27.1"
7040 peerDependencies: 8162 peerDependencies:
7041 "@types/node": ">= 14" 8163 "@types/node": ">= 14"
7042 less: "*" 8164 less: "*"
8165 lightningcss: ^1.21.0
7043 sass: "*" 8166 sass: "*"
7044 stylus: "*" 8167 stylus: "*"
7045 sugarss: "*" 8168 sugarss: "*"
@@ -7052,6 +8175,8 @@ __metadata:
7052 optional: true 8175 optional: true
7053 less: 8176 less:
7054 optional: true 8177 optional: true
8178 lightningcss:
8179 optional: true
7055 sass: 8180 sass:
7056 optional: true 8181 optional: true
7057 stylus: 8182 stylus:
@@ -7062,21 +8187,21 @@ __metadata:
7062 optional: true 8187 optional: true
7063 bin: 8188 bin:
7064 vite: bin/vite.js 8189 vite: bin/vite.js
7065 checksum: 3bdd4d860e646a5abdf9b0af1828d74e7e20f9124cc4081cc7d8a09df1b054286add51051c1127cc3c1ea522e3c756da21a1dc424dabd121fa5b82dd5c6911b1 8190 checksum: 80dbc632fd75b5866567c8fd605115c9d5718654dbf173f509cfd55c53f39dfbee24f62660e57fd5b11eb93f469a65abdbe6bae880ec8392bb70a5d0d7b6e6a9
7066 languageName: node 8191 languageName: node
7067 linkType: hard 8192 linkType: hard
7068 8193
7069"w3c-keyname@npm:^2.2.4": 8194"w3c-keyname@npm:^2.2.4":
7070 version: 2.2.8 8195 version: 2.2.8
7071 resolution: "w3c-keyname@npm:2.2.8" 8196 resolution: "w3c-keyname@npm:2.2.8"
7072 checksum: 32151833a4407c2aacc13279705c9b4dcca120e47d1cf12c5ee4aaa6e889cb1501ae5bc4b16b67e8db7d1cfdbdeb6557d7b6ff271a59a32d51a074cc7dda0141 8197 checksum: 37cf335c90efff31672ebb345577d681e2177f7ff9006a9ad47c68c5a9d265ba4a7b39d6c2599ceea639ca9315584ce4bd9c9fbf7a7217bfb7a599e71943c4c4
7073 languageName: node 8198 languageName: node
7074 linkType: hard 8199 linkType: hard
7075 8200
7076"webidl-conversions@npm:^4.0.2": 8201"webidl-conversions@npm:^4.0.2":
7077 version: 4.0.2 8202 version: 4.0.2
7078 resolution: "webidl-conversions@npm:4.0.2" 8203 resolution: "webidl-conversions@npm:4.0.2"
7079 checksum: 68c1adc8200c122eeb9cd3ccb6407e929dab3108210a249ce485ac71acbe8d943cf97fe03687fe350295be467de1c0538d4ee0e0818267a941f1fbcdb0d8f765 8204 checksum: def5c5ac3479286dffcb604547628b2e6b46c5c5b8a8cfaa8c71dc3bafc85859bde5fbe89467ff861f571ab38987cf6ab3d6e7c80b39b999e50e803c12f3164f
7080 languageName: node 8205 languageName: node
7081 linkType: hard 8206 linkType: hard
7082 8207
@@ -7087,7 +8212,7 @@ __metadata:
7087 lodash.sortby: "npm:^4.7.0" 8212 lodash.sortby: "npm:^4.7.0"
7088 tr46: "npm:^1.0.1" 8213 tr46: "npm:^1.0.1"
7089 webidl-conversions: "npm:^4.0.2" 8214 webidl-conversions: "npm:^4.0.2"
7090 checksum: 81485960495654692080d29ba6c311765eed40d8ea2227dc1a22609302d9091992255aabf6c17529a23efe3afae0527dd24f350895e25fbd2906225b1f389cbd 8215 checksum: 2785fe4647690e5a0225a79509ba5e21fdf4a71f9de3eabdba1192483fe006fc79961198e0b99f82751557309f17fc5a07d4d83c251aa5b2f85ba71e674cbee9
7091 languageName: node 8216 languageName: node
7092 linkType: hard 8217 linkType: hard
7093 8218
@@ -7100,21 +8225,52 @@ __metadata:
7100 is-number-object: "npm:^1.0.4" 8225 is-number-object: "npm:^1.0.4"
7101 is-string: "npm:^1.0.5" 8226 is-string: "npm:^1.0.5"
7102 is-symbol: "npm:^1.0.3" 8227 is-symbol: "npm:^1.0.3"
7103 checksum: 5dca8c7d5df27ace90300270fea1512df427ba557e3509051e18c7992fdbe6f00a89918ae2deb59c346d0771966b3b5da3d2c9bad4e374c09bc2b9aad1e19ae9 8228 checksum: 0a62a03c00c91dd4fb1035b2f0733c341d805753b027eebd3a304b9cb70e8ce33e25317add2fe9b5fea6f53a175c0633ae701ff812e604410ddd049777cd435e
7104 languageName: node 8229 languageName: node
7105 linkType: hard 8230 linkType: hard
7106 8231
7107"which-typed-array@npm:^1.1.9": 8232"which-builtin-type@npm:^1.1.3":
7108 version: 1.1.9 8233 version: 1.1.3
7109 resolution: "which-typed-array@npm:1.1.9" 8234 resolution: "which-builtin-type@npm:1.1.3"
8235 dependencies:
8236 function.prototype.name: "npm:^1.1.5"
8237 has-tostringtag: "npm:^1.0.0"
8238 is-async-function: "npm:^2.0.0"
8239 is-date-object: "npm:^1.0.5"
8240 is-finalizationregistry: "npm:^1.0.2"
8241 is-generator-function: "npm:^1.0.10"
8242 is-regex: "npm:^1.1.4"
8243 is-weakref: "npm:^1.0.2"
8244 isarray: "npm:^2.0.5"
8245 which-boxed-primitive: "npm:^1.0.2"
8246 which-collection: "npm:^1.0.1"
8247 which-typed-array: "npm:^1.1.9"
8248 checksum: 2b7b234df3443b52f4fbd2b65b731804de8d30bcc4210ec84107ef377a81923cea7f2763b7fb78b394175cea59118bf3c41b9ffd2d643cb1d748ef93b33b6bd4
8249 languageName: node
8250 linkType: hard
8251
8252"which-collection@npm:^1.0.1":
8253 version: 1.0.1
8254 resolution: "which-collection@npm:1.0.1"
8255 dependencies:
8256 is-map: "npm:^2.0.1"
8257 is-set: "npm:^2.0.1"
8258 is-weakmap: "npm:^2.0.1"
8259 is-weakset: "npm:^2.0.1"
8260 checksum: 249f913e1758ed2f06f00706007d87dc22090a80591a56917376e70ecf8fc9ab6c41d98e1c87208bb9648676f65d4b09c0e4d23c56c7afb0f0a73a27d701df5d
8261 languageName: node
8262 linkType: hard
8263
8264"which-typed-array@npm:^1.1.10, which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9":
8265 version: 1.1.11
8266 resolution: "which-typed-array@npm:1.1.11"
7110 dependencies: 8267 dependencies:
7111 available-typed-arrays: "npm:^1.0.5" 8268 available-typed-arrays: "npm:^1.0.5"
7112 call-bind: "npm:^1.0.2" 8269 call-bind: "npm:^1.0.2"
7113 for-each: "npm:^0.3.3" 8270 for-each: "npm:^0.3.3"
7114 gopd: "npm:^1.0.1" 8271 gopd: "npm:^1.0.1"
7115 has-tostringtag: "npm:^1.0.0" 8272 has-tostringtag: "npm:^1.0.0"
7116 is-typed-array: "npm:^1.1.10" 8273 checksum: 2cf4ce417beb50ae0ec3b1b479ea6d72d3e71986462ebd77344ca6398f77c7c59804eebe88f4126ce79f85edbcaa6c7783f54b0a5bf34f785eab7cbb35c30499
7117 checksum: 09e7fe714cb797daf3a35f3499b9f7c969b1296ac0d40d68256f2b70f747a728ad5385b1fb3e7514e26bad3d5ca550a13a80e1a7b22b7e9e12872c46ecb6c4a7
7118 languageName: node 8274 languageName: node
7119 linkType: hard 8275 linkType: hard
7120 8276
@@ -7125,7 +8281,7 @@ __metadata:
7125 isexe: "npm:^2.0.0" 8281 isexe: "npm:^2.0.0"
7126 bin: 8282 bin:
7127 node-which: ./bin/node-which 8283 node-which: ./bin/node-which
7128 checksum: 3728616c789b289c36ba2572887145e0736f06fe3435b8fef17e27eb5ec0696f61a21e356dd7fa58486346e57186863afa1b6c27c7665f7e674c8124f7f61157 8284 checksum: 66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f
7129 languageName: node 8285 languageName: node
7130 linkType: hard 8286 linkType: hard
7131 8287
@@ -7134,14 +8290,7 @@ __metadata:
7134 resolution: "wide-align@npm:1.1.5" 8290 resolution: "wide-align@npm:1.1.5"
7135 dependencies: 8291 dependencies:
7136 string-width: "npm:^1.0.2 || 2 || 3 || 4" 8292 string-width: "npm:^1.0.2 || 2 || 3 || 4"
7137 checksum: 39915f81cdc6cee1f54bfd7672619cc6d0bd558089f968ea7831324cd4b5ed00e78e710a64f05e5d75ed7880e45eef97295907f68d5aabb9d2899436c917b275 8293 checksum: 1d9c2a3e36dfb09832f38e2e699c367ef190f96b82c71f809bc0822c306f5379df87bab47bed27ea99106d86447e50eb972d3c516c2f95782807a9d082fbea95
7138 languageName: node
7139 linkType: hard
7140
7141"word-wrap@npm:^1.2.3":
7142 version: 1.2.3
7143 resolution: "word-wrap@npm:1.2.3"
7144 checksum: 17267cdb6baa9d5452b0998531adafd2df52a25159f27cbb754b2fdcff4af8808019efe4c0a2bcc5ceb63becb30df07c792c0125ad21991266aefadb940df74a
7145 languageName: node 8294 languageName: node
7146 linkType: hard 8295 linkType: hard
7147 8296
@@ -7151,7 +8300,7 @@ __metadata:
7151 dependencies: 8300 dependencies:
7152 idb: "npm:^7.0.1" 8301 idb: "npm:^7.0.1"
7153 workbox-core: "npm:7.0.0" 8302 workbox-core: "npm:7.0.0"
7154 checksum: ec46bca63b18e7e2cd0ee8d879f8e2609e7ee04db83e2086d69039f2f5353d15393a24eb32c7729025cb38ca343e68ff5f316e11d6f6d4b69a6e91dd1056e4a4 8303 checksum: 91eb064c608cfb4cf7aa4f062215d8217a99b93d67c4ae571e5abdda1b020c5ab45c7bddab99cb77d334aae8d259f0fe91b7c42ee6e7ad10db32b4a971991489
7155 languageName: node 8304 languageName: node
7156 linkType: hard 8305 linkType: hard
7157 8306
@@ -7160,7 +8309,7 @@ __metadata:
7160 resolution: "workbox-broadcast-update@npm:7.0.0" 8309 resolution: "workbox-broadcast-update@npm:7.0.0"
7161 dependencies: 8310 dependencies:
7162 workbox-core: "npm:7.0.0" 8311 workbox-core: "npm:7.0.0"
7163 checksum: 3ffa7d98ea3fd7d741f28085061c67f5c9883031d6982c40cb2dc0f38bbc113b979e849b9cedb34cd1305dec0eec73557c303886fd1ed7dca3b5c4a439036b34 8312 checksum: 3c3a6e1e72c19d2971d187297b99b242f304b1ec442f6f1ec84ea9c6e125dc01cd626d51e6ecf1c8d89226e6a286dccaa9f950bd5ef6183518af10ba0f4f524e
7164 languageName: node 8313 languageName: node
7165 linkType: hard 8314 linkType: hard
7166 8315
@@ -7205,7 +8354,7 @@ __metadata:
7205 workbox-streams: "npm:7.0.0" 8354 workbox-streams: "npm:7.0.0"
7206 workbox-sw: "npm:7.0.0" 8355 workbox-sw: "npm:7.0.0"
7207 workbox-window: "npm:7.0.0" 8356 workbox-window: "npm:7.0.0"
7208 checksum: 3dd0eded07e8a9ad82ced375bd6ed52591f87797b64e4bd395ea117c0bdbe74eba21909f72d5c3c96a717f32778e2a18766e60ccbc5a99a6d8a59e7daffde2b8 8357 checksum: a090aeee836f59d42ca9eda8b82aa5a0ee8f4ce3f3095b6fcbe157a9a154c492e4ba86b5c4d6aa50ef7c37ea1c38c965442b56d1404911fd0351d0fc9a859a3c
7209 languageName: node 8358 languageName: node
7210 linkType: hard 8359 linkType: hard
7211 8360
@@ -7214,14 +8363,14 @@ __metadata:
7214 resolution: "workbox-cacheable-response@npm:7.0.0" 8363 resolution: "workbox-cacheable-response@npm:7.0.0"
7215 dependencies: 8364 dependencies:
7216 workbox-core: "npm:7.0.0" 8365 workbox-core: "npm:7.0.0"
7217 checksum: 92d2862bbd5814ec520248d23a675babce0509ce42d600d864c75f47562c25b997758fbc9d302877f19ecd0c122c72be2a66d14588f083b52ac73ee5fb218500 8366 checksum: ddf123b3461070e215af51d88c672f3302b540b93ecf61ad5f3853f0a997194973eedb2c9ed21e849b7419f68804ef8a8d876dced3836a7eb2c697099e3d408f
7218 languageName: node 8367 languageName: node
7219 linkType: hard 8368 linkType: hard
7220 8369
7221"workbox-core@npm:7.0.0": 8370"workbox-core@npm:7.0.0":
7222 version: 7.0.0 8371 version: 7.0.0
7223 resolution: "workbox-core@npm:7.0.0" 8372 resolution: "workbox-core@npm:7.0.0"
7224 checksum: 8e4b11940a471a96ed07e992fb950963e3316500f1e5f453f72e77c9436eac2d115b9037c7b9c6955cdea0167b64c2919205474064e7c5c3dd1de4c75acfcdb4 8373 checksum: aaaf7b66978456bf5d6a90b1068b5acd82bf451f4a23c5a416201524b50ea4e0bc62a01365499bc088b4c18cddc513fdebbe8b048ab15aff960fe7cbbf55d5bd
7225 languageName: node 8374 languageName: node
7226 linkType: hard 8375 linkType: hard
7227 8376
@@ -7231,7 +8380,7 @@ __metadata:
7231 dependencies: 8380 dependencies:
7232 idb: "npm:^7.0.1" 8381 idb: "npm:^7.0.1"
7233 workbox-core: "npm:7.0.0" 8382 workbox-core: "npm:7.0.0"
7234 checksum: e6d9c83833ab4e5a777024749b519249b446c7e20345d2e304e93115e2aabd6e255cd173268d442517d3e70bfdc9f9d929cbe86b886f18a594db31e82451ec2e 8383 checksum: 990a6c2c9b177d796c012b0112913621e41b283e2736d83acb58cb9645591ddc7a6aef585145c5686f9b071d73ce12b4b1887765754624322545b0f4125d649f
7235 languageName: node 8384 languageName: node
7236 linkType: hard 8385 linkType: hard
7237 8386
@@ -7243,7 +8392,7 @@ __metadata:
7243 workbox-core: "npm:7.0.0" 8392 workbox-core: "npm:7.0.0"
7244 workbox-routing: "npm:7.0.0" 8393 workbox-routing: "npm:7.0.0"
7245 workbox-strategies: "npm:7.0.0" 8394 workbox-strategies: "npm:7.0.0"
7246 checksum: 4b10c047eab34bc6cddf44ada7c695fdb1426acfecba0a9fd21c512a38910991e64a6be7d34922792094314d064073dd2f433dd7810e0710abaa6fb96302d29b 8395 checksum: 7656ab4bff15fbcbc7f546d86628ccbc74736a99139ec70a166c465fc4ff59656aecd44cc0aef45b4690fd88a4980d6c9f27ce8c6606fd12d026162259a8069d
7247 languageName: node 8396 languageName: node
7248 linkType: hard 8397 linkType: hard
7249 8398
@@ -7252,7 +8401,7 @@ __metadata:
7252 resolution: "workbox-navigation-preload@npm:7.0.0" 8401 resolution: "workbox-navigation-preload@npm:7.0.0"
7253 dependencies: 8402 dependencies:
7254 workbox-core: "npm:7.0.0" 8403 workbox-core: "npm:7.0.0"
7255 checksum: 286d149e9171ffd57eda72c87d58821f58a4f4457fde3567b66f88047d052f47237775695a422d88ac9c60267f5028a85e95b80139b335da0701daa06f424314 8404 checksum: f29ac8364c7f7f392daa1f886134adc780057199b218ab6c6eef298841b8825d6cbc4bc88e655299929bdf14c700edfb9f217ca5c0b46094627247528f655011
7256 languageName: node 8405 languageName: node
7257 linkType: hard 8406 linkType: hard
7258 8407
@@ -7263,7 +8412,7 @@ __metadata:
7263 workbox-core: "npm:7.0.0" 8412 workbox-core: "npm:7.0.0"
7264 workbox-routing: "npm:7.0.0" 8413 workbox-routing: "npm:7.0.0"
7265 workbox-strategies: "npm:7.0.0" 8414 workbox-strategies: "npm:7.0.0"
7266 checksum: 75f2272d0500d9ef308d279fd80e2e0b7424aae519945d396e20729c21509af167c2e20b6af0298d2364138fef7ef7154986b4b7322fa5b87434bf8c3dc34fca 8415 checksum: 1b47cb151bb6ec7442b2dc8981203feff22527a4383510f2399730338b620ef0d03076bd3dbc1eb9a05272d5d6f4803fb4262f320bf5645f0818981e91077f39
7267 languageName: node 8416 languageName: node
7268 linkType: hard 8417 linkType: hard
7269 8418
@@ -7272,7 +8421,7 @@ __metadata:
7272 resolution: "workbox-range-requests@npm:7.0.0" 8421 resolution: "workbox-range-requests@npm:7.0.0"
7273 dependencies: 8422 dependencies:
7274 workbox-core: "npm:7.0.0" 8423 workbox-core: "npm:7.0.0"
7275 checksum: 8332d1209c1594ac8ea4b53d1826cef59d5b6ed373c394bdec89a76f83ea84b7bf307a1487fad7ed60615a34bf477d1455a694d368aa13e3005a86579077f755 8424 checksum: 909f0ed7a176e5dc55692792825e67b577dacf1015a3f3775389fcec34ff5b3441b15595109455fe226f0bc4dce4789a7c86e5e9c5963c13b4d6482f6d01d44f
7276 languageName: node 8425 languageName: node
7277 linkType: hard 8426 linkType: hard
7278 8427
@@ -7286,7 +8435,7 @@ __metadata:
7286 workbox-precaching: "npm:7.0.0" 8435 workbox-precaching: "npm:7.0.0"
7287 workbox-routing: "npm:7.0.0" 8436 workbox-routing: "npm:7.0.0"
7288 workbox-strategies: "npm:7.0.0" 8437 workbox-strategies: "npm:7.0.0"
7289 checksum: 4416f0834dba6575ca88a929fe6eba98d4ff9b40a7726fdcf8de8908543fc441ec683cddbe439f25da3f4fbe4cc97760eaa39f9280b66fc217f627585f6a37eb 8438 checksum: c024141f24b0778355bdfbfe2b4a24a3f74e279f6f7541635758533e79318e15986f9f556a899c97717a9c25a1738d9e112d17dd36aa19cebf901462ebeeb8e4
7290 languageName: node 8439 languageName: node
7291 linkType: hard 8440 linkType: hard
7292 8441
@@ -7295,7 +8444,7 @@ __metadata:
7295 resolution: "workbox-routing@npm:7.0.0" 8444 resolution: "workbox-routing@npm:7.0.0"
7296 dependencies: 8445 dependencies:
7297 workbox-core: "npm:7.0.0" 8446 workbox-core: "npm:7.0.0"
7298 checksum: 7b250c696499f1528913e7bb4c11ecfbe62fc329a70c79d905186e4efd3b983536f64e1a2b810445f4e005336a70ec93305be8b62df236e7aac114f0ff908168 8447 checksum: 74ad651a0643506cfd3ca51eee754f5fe34e3f1460e6b772ed213e0422028cf002d70f91da32d13261bc5ee2160527ffb5436ac209fdbe8d0e7071784aa65190
7299 languageName: node 8448 languageName: node
7300 linkType: hard 8449 linkType: hard
7301 8450
@@ -7304,7 +8453,7 @@ __metadata:
7304 resolution: "workbox-strategies@npm:7.0.0" 8453 resolution: "workbox-strategies@npm:7.0.0"
7305 dependencies: 8454 dependencies:
7306 workbox-core: "npm:7.0.0" 8455 workbox-core: "npm:7.0.0"
7307 checksum: 3e77ce48537177e481958652eeccb950c6cc9c20267c6d2a98ca5b98fbce49c4e5ae412134c2f79fb76e0ff89dbf93b84946c7ca40fcae69cfe70ae8489b2eae 8456 checksum: 4fe122b80e547b347bedf187aeb2c2eb34efc3fbde2733b7709530cccb6b6e03b29adcbccecf301e4fcaad0d5cd4a74e1e704f769d949c32439dca358130a613
7308 languageName: node 8457 languageName: node
7309 linkType: hard 8458 linkType: hard
7310 8459
@@ -7314,14 +8463,14 @@ __metadata:
7314 dependencies: 8463 dependencies:
7315 workbox-core: "npm:7.0.0" 8464 workbox-core: "npm:7.0.0"
7316 workbox-routing: "npm:7.0.0" 8465 workbox-routing: "npm:7.0.0"
7317 checksum: cd1a8e508c6bc5173c18fa0c60c94b617a3d404ef95489a1b25e0b7c690f2916aafac38709f4c0a4d76975d347c0a894c0706e3447dc37f2af79cd3cfacfb106 8466 checksum: 9a1a9b8200f5b315523ac49c61a9b88791009377bbdedd44cf19c4b2258e710bd2fbc6f74ef53b72db7849da7ce9965ced5983f167785ccfc7efa1df761e3371
7318 languageName: node 8467 languageName: node
7319 linkType: hard 8468 linkType: hard
7320 8469
7321"workbox-sw@npm:7.0.0": 8470"workbox-sw@npm:7.0.0":
7322 version: 7.0.0 8471 version: 7.0.0
7323 resolution: "workbox-sw@npm:7.0.0" 8472 resolution: "workbox-sw@npm:7.0.0"
7324 checksum: a687a0ceee1321424e633d54b45bf3e93196b900b72dfe4704ed2973ae1012703ed2b9e8b2ae641d5d204a178b8365bf6ad77aa4688c178967a309720f2e62ca 8473 checksum: 06d9713398ca92d8b2cad70a7d302825ec7650e05e2e0c8e68f453442fdf9a9227350c856484f7b649df6cb429cc03a103f8ecd9596e83bfa52e845bf25ffbcd
7325 languageName: node 8474 languageName: node
7326 linkType: hard 8475 linkType: hard
7327 8476
@@ -7331,18 +8480,18 @@ __metadata:
7331 dependencies: 8480 dependencies:
7332 "@types/trusted-types": "npm:^2.0.2" 8481 "@types/trusted-types": "npm:^2.0.2"
7333 workbox-core: "npm:7.0.0" 8482 workbox-core: "npm:7.0.0"
7334 checksum: 9f357f23264cb32620a0c346e11a21cdaac60cbe41eda405b1d094cb1009fa19a1a5d4a3c13c4dd878371d0583fd09110db48a451d260cb51380548a2340517b 8483 checksum: 8070fb80734a8543248ed6e3b186b8d3ee64419400a6d6d75f78809c44bf16321c5d9739bdf60ee62f631461ebb67a8a7dd78192504678d00bf2a9d3683f1324
7335 languageName: node 8484 languageName: node
7336 linkType: hard 8485 linkType: hard
7337 8486
7338"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": 8487"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0":
7339 version: 7.0.0 8488 version: 7.0.0
7340 resolution: "wrap-ansi@npm:7.0.0" 8489 resolution: "wrap-ansi@npm:7.0.0"
7341 dependencies: 8490 dependencies:
7342 ansi-styles: "npm:^4.0.0" 8491 ansi-styles: "npm:^4.0.0"
7343 string-width: "npm:^4.1.0" 8492 string-width: "npm:^4.1.0"
7344 strip-ansi: "npm:^6.0.0" 8493 strip-ansi: "npm:^6.0.0"
7345 checksum: b72e4a1ebd582221c3d7eae2473c7841af1fd435defe08bb3854600013ced559b10efa767b4fdc6725402ab16b79f86f73e5d4edc7cf9214e15733ee34849aa0 8494 checksum: d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da
7346 languageName: node 8495 languageName: node
7347 linkType: hard 8496 linkType: hard
7348 8497
@@ -7353,55 +8502,84 @@ __metadata:
7353 ansi-styles: "npm:^6.1.0" 8502 ansi-styles: "npm:^6.1.0"
7354 string-width: "npm:^5.0.1" 8503 string-width: "npm:^5.0.1"
7355 strip-ansi: "npm:^7.0.1" 8504 strip-ansi: "npm:^7.0.1"
7356 checksum: f8df96ddeeb43e497c86085f8b009fd374e046aef37d731d13037dbabc2f3d2ba84aa8e583bdff3011b8ef5274a53832d65bb7dd44b30c033e96ef3d0bb72b57 8505 checksum: 138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60
7357 languageName: node 8506 languageName: node
7358 linkType: hard 8507 linkType: hard
7359 8508
7360"wrappy@npm:1": 8509"wrappy@npm:1":
7361 version: 1.0.2 8510 version: 1.0.2
7362 resolution: "wrappy@npm:1.0.2" 8511 resolution: "wrappy@npm:1.0.2"
7363 checksum: 37d243a577dfeee20586eae1e3208dfb4e4cea1211a2a4116a19b50d91e619ff3dbc5ec934e28ca9baaa11a65df826c8d65c5fd1bb81f0ce0dadb469d47061c2 8512 checksum: 56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0
7364 languageName: node 8513 languageName: node
7365 linkType: hard 8514 linkType: hard
7366 8515
7367"xstate@npm:^4.33.4, xstate@npm:^4.37.2": 8516"xstate@npm:^4.33.4, xstate@npm:^4.38.2":
7368 version: 4.37.2 8517 version: 4.38.2
7369 resolution: "xstate@npm:4.37.2" 8518 resolution: "xstate@npm:4.38.2"
7370 checksum: e4d5d7930895b78aa4423143b9f113055554bad9541648180643b2150b67f968ccfae52039667ac4ce849b6487234230824f89e41774b4ceae5667584e983c63 8519 checksum: ce6186dd1f5ea647c4fe44b3df397b8d4e5b523ba043138201487beefb7591632232f4e2618225fb97950456115b08671ce1fee02d66e7f269f73c39a5968642
8520 languageName: node
8521 linkType: hard
8522
8523"y18n@npm:^5.0.5":
8524 version: 5.0.8
8525 resolution: "y18n@npm:5.0.8"
8526 checksum: 4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249
7371 languageName: node 8527 languageName: node
7372 linkType: hard 8528 linkType: hard
7373 8529
7374"yallist@npm:^3.0.2": 8530"yallist@npm:^3.0.2":
7375 version: 3.1.1 8531 version: 3.1.1
7376 resolution: "yallist@npm:3.1.1" 8532 resolution: "yallist@npm:3.1.1"
7377 checksum: 8d382abef6365eb6800ef86a429e8a78347089b7867cdb7ae146e5f3629baebe41967b9d7715ae22c9514659a2855a10e104d68441e339f5060b286b2f3e11c6 8533 checksum: c66a5c46bc89af1625476f7f0f2ec3653c1a1791d2f9407cfb4c2ba812a1e1c9941416d71ba9719876530e3340a99925f697142989371b72d93b9ee628afd8c1
7378 languageName: node 8534 languageName: node
7379 linkType: hard 8535 linkType: hard
7380 8536
7381"yallist@npm:^4.0.0": 8537"yallist@npm:^4.0.0":
7382 version: 4.0.0 8538 version: 4.0.0
7383 resolution: "yallist@npm:4.0.0" 8539 resolution: "yallist@npm:4.0.0"
7384 checksum: cd7fe32508c6942d8b979278fbe13846fe88cd6840d78043d08c6b2c74d67ce38b58bd21618dca8a4e132dcc025fc0e66a7d87ca10cf6ed338465607ebff4378 8540 checksum: 2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a
7385 languageName: node 8541 languageName: node
7386 linkType: hard 8542 linkType: hard
7387 8543
7388"yaml@npm:^1.10.0": 8544"yaml@npm:^1.10.0":
7389 version: 1.10.2 8545 version: 1.10.2
7390 resolution: "yaml@npm:1.10.2" 8546 resolution: "yaml@npm:1.10.2"
7391 checksum: d6f04384bdf1105256581aef39991f825e358f3f48f081974b0e0f39ff5240c60ccafb5842cb79d1287517efa2b9ee172c702f2e4855ba6cc46948b40a43aa6e 8547 checksum: 5c28b9eb7adc46544f28d9a8d20c5b3cb1215a886609a2fd41f51628d8aaa5878ccd628b755dbcd29f6bb4921bd04ffbc6dcc370689bb96e594e2f9813d2605f
8548 languageName: node
8549 linkType: hard
8550
8551"yargs-parser@npm:^21.1.1":
8552 version: 21.1.1
8553 resolution: "yargs-parser@npm:21.1.1"
8554 checksum: f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2
8555 languageName: node
8556 linkType: hard
8557
8558"yargs@npm:17.7.2":
8559 version: 17.7.2
8560 resolution: "yargs@npm:17.7.2"
8561 dependencies:
8562 cliui: "npm:^8.0.1"
8563 escalade: "npm:^3.1.1"
8564 get-caller-file: "npm:^2.0.5"
8565 require-directory: "npm:^2.1.1"
8566 string-width: "npm:^4.2.3"
8567 y18n: "npm:^5.0.5"
8568 yargs-parser: "npm:^21.1.1"
8569 checksum: ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05
7392 languageName: node 8570 languageName: node
7393 linkType: hard 8571 linkType: hard
7394 8572
7395"yocto-queue@npm:^0.1.0": 8573"yocto-queue@npm:^0.1.0":
7396 version: 0.1.0 8574 version: 0.1.0
7397 resolution: "yocto-queue@npm:0.1.0" 8575 resolution: "yocto-queue@npm:0.1.0"
7398 checksum: 63eceacd482622afd71290541a9823a0e5eed88a6b58a5d136a5fb8151ed4d1549c80f28d74d4ad351582f9890635d49e6cf70f8d3cc64948640f839f6a37c70 8576 checksum: dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f
7399 languageName: node 8577 languageName: node
7400 linkType: hard 8578 linkType: hard
7401 8579
7402"zod@npm:^3.21.4": 8580"zod@npm:^3.22.2":
7403 version: 3.21.4 8581 version: 3.22.2
7404 resolution: "zod@npm:3.21.4" 8582 resolution: "zod@npm:3.22.2"
7405 checksum: f25f384f380c49d05a11541093a8d26f07688aa39f6a8adbd6dc338b43f63617bf138734fb1b79800ba374523f6a1bb561f7d401b3cc051fed2715eae5577d0a 8583 checksum: 10afd994bcec3affb81776adc486871bfa6790037f57f0e45280e99baed8c3df5f46c5ab65a6d7921a00dffd9fab299e4492519dd6bb5d2eb3de9a67d3eb8051
7406 languageName: node 8584 languageName: node
7407 linkType: hard 8585 linkType: hard